Home
E10 Cross Reference Schedule
E10 Time Schedule
E10 Frequency Schedule
function mfDayofweek($strDate) { // parse string into month,day,year list ($intYear,$intMonth,$intDay) = explode('-',$strDate); // create a unix time element from the date $intTime = mktime(12, 0, 0, $intMonth, $intDay,$intYear); // load date and time elements into an array // check the docs on this one, it's useful $aryDateinfo = getdate($intTime); // send back return $aryDateinfo["weekday"]; } $today = gmdate("Y-m-d"); $utc = gmdate("H:i:s"); $n=0; $i=0; require('dbserver.php'); /* MySQL table created to store the data */ $userstable = "E10"; /* make connection to database */ MYSQL_CONNECT($hostname,$username,$password) OR DIE("Unable to connect to database"); @mysql_select_db("$dbName") or die("Unable to select database"); $query = "SELECT * FROM $userstable ORDER BY FREQ,UTC"; $result = MYSQL_QUERY($query); $number = MYSQL_NUMROWS($result); print "Home"; print "\r\n \r\n Number of entries = $number \r\n"; $utc="UTC"; $freq="Freq kHz"; $call="Call"; $ID="ID"; $s=sprintf("%4s %3s %6s \r\n", $utc, $call, $freq); print "$s"; $i=0; while($i<$number) { $utc = mysql_result($result,$i,"utc"); $ID = mysql_result($result,$i,"ID"); $call = mysql_result($result,$i,"call"); $freq = mysql_result($result,$i,"freq"); $s=sprintf("%04d %3s %6s \r\n", $utc, $call, $freq); print "$s"; $i++; } print ""; $i=0; /* CREATE TABLE E10 ( ID int(11) NOT NULL auto_increment, CALL varchar(10) NOT NULL, UTC int(11) DEFAULT '0' NOT NULL, FREQ int(11) DEFAULT '0' NOT NULL, PRIMARY KEY (ID) ); */ /* Close the database connection */ MYSQL_CLOSE(); ?>