2 ////////////////////////////////////////////////////////////////////////////////
5 // Description: Utility funcitons
6 // Author: Andrew@ClearSCM.com
7 // Created: Mon Apr 28 15:20:06 MST 2008
11 // (c) Copyright 2008, ClearSCM, Inc., all rights reserved.
13 ////////////////////////////////////////////////////////////////////////////////
15 define (VERSION, "1.0");
18 define ("KBYTE", BYTE * 1024);
19 define ("MEG", KBYTE * 1024);
20 define ("GIG", MEG * 1024);
22 function debug ($msg) {
26 print "<font color=red>DEBUG:</font> $msg<br>";
30 function dumpObject ($object) {
36 function error ($msg, $errno = 0) {
37 print "<p><font color=\"red\">ERROR:</font> $msg";
40 print " ($errno)</p>";
51 function YMD2MDY ($date) {
52 return substr ($date, 5, 2) . "/" .
53 substr ($date, 8, 2) . "/" .
57 function MDY2YMD ($date) {
58 return substr ($date, 6, 4) . "-" .
59 substr ($date, 0, 2) . "-" .
63 function copyright () {
66 $thisFile = "$_SERVER[DOCUMENT_ROOT]/$_SERVER[PHP_SELF]";
67 $lastModified = date ("F d Y @ g:i a", filemtime ($thisFile));
73 $copyright .= VERSION;
75 <br>Last Modified: $lastModified<br>
76 Copyright $year © <a href="http://clearscm.com">ClearSCM, Inc.</a>, all rights reserved<br>
77 <a href="/"><img border=0 src="/images/HomeSmall.gif">Home</a>
84 function Today2SQLDatetime () {
85 return date ("Y-m-d H:i:s");
86 } // Today2SQLDatetime
88 function getPeriods () {
97 function getScales () {