Changeset 17150 for trunk/www/dch
- Timestamp:
- 09/09/13 14:36:05 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/dch/shiftinfo.php
r15312 r17150 11 11 12 12 13 <a href='https://www.fact-project.org/smartfact'>Is FACT taking data?</a><br> 13 <a href='https://www.fact-project.org/smartfact'>Is FACT taking data?</a><br><br> 14 14 Who is on shift? 15 15 (from <a href='https://www.fact-project.org/shift'>FACT shift plan<a> … … 17 17 18 18 <?php 19 $date=date("Ymd", mktime(0,0,date("H"-13),date("m"), date("d"), date("Y"))); 20 echo "<br> Night: ".$date." (date of sunset) <br>"; 21 $query="SELECT u FROM calendar.data WHERE CONCAT(y, LPAD(m+1, 2, 0), LPAD(d,2,0))='".$date."' AND x=0 "; 19 20 if (date("H")>8) 21 $today=date("Ymd", mktime(0,0,0,date("m"), date("d"), date("Y"))); 22 else 23 $today=date("Ymd",strtotime(date("Y-m-d", mktime(0,0,0,date("m"), date("d"), date("Y")))." -1 day")); 24 25 echo "<br> Night: ".$today." (date of sunset) <br>"; 26 $query="SELECT u FROM calendar.data WHERE CONCAT(y, LPAD(m+1, 2, 0), LPAD(d,2,0))='".$today."' AND x=0 "; 22 27 //echo $query; 23 28 include ("db.php"); 24 29 $db_id = mysql_connect($host, $user, $pw); 25 30 $result = mysql_query($query); 26 echo " Contact Info : <br>\n <ul>\n";31 echo " Contact Info Shiftcrew: <br>\n <ul>\n"; 27 32 while ($row = mysql_fetch_row($result)) 28 33 { … … 37 42 mysql_free_result($result2); 38 43 } 44 echo "</ul>\n <br>\n <br>\n "; 45 mysql_free_result($result); 46 47 echo "General Contact Info: <br>\n <ul>\n"; 48 $query3="SELECT usertitle, fid8 FROM logbook.userfields LEFT JOIN logbook.users ON (uid=ufid) WHERE username='dorner'"; 49 $result3 = mysql_query($query3); 50 while ($row3 = mysql_fetch_row($result3)) 51 { 52 echo "<li>".$row3[0].": ".$row3[1]."</li>\n"; 53 } 54 mysql_free_result($result3); 55 39 56 echo "</ul>\n"; 40 mysql_free_result($result);41 57 42 58 ?>
Note:
See TracChangeset
for help on using the changeset viewer.