| 1 | <html> | 
|---|
| 2 | <head> | 
|---|
| 3 | <meta name="Author" content="The FACT Group" /> | 
|---|
| 4 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | 
|---|
| 5 | <title>FACT Project</title> | 
|---|
| 6 | <link rel="StyleSheet" type="text/css" href="../style.css" /> | 
|---|
| 7 | </head> | 
|---|
| 8 |  | 
|---|
| 9 |  | 
|---|
| 10 | <body> | 
|---|
| 11 |  | 
|---|
| 12 |  | 
|---|
| 13 | <a href='https://www.fact-project.org/smartfact'>Is FACT taking data?</a><br><br> | 
|---|
| 14 | Who is on shift? | 
|---|
| 15 | (from <a href='https://www.fact-project.org/shift'>FACT shift plan<a> | 
|---|
| 16 | and <a href='https://www.fact-project.org/logbook/memberlist.php'>FACT logbook<a>) | 
|---|
| 17 |  | 
|---|
| 18 | <?php | 
|---|
| 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 "; | 
|---|
| 27 | //echo $query; | 
|---|
| 28 | include ("db.php"); | 
|---|
| 29 | $db_id = mysql_connect($host, $user, $pw); | 
|---|
| 30 | $result  = mysql_query($query); | 
|---|
| 31 | echo "  Contact Info Shiftcrew: <br>\n <ul>\n"; | 
|---|
| 32 | while ($row = mysql_fetch_row($result)) | 
|---|
| 33 | { | 
|---|
| 34 | //echo "      ".$row[0]." "; | 
|---|
| 35 | $query2="SELECT usertitle, fid8 FROM logbook.userfields LEFT JOIN logbook.users ON (uid=ufid) WHERE username='".$row[0]."'"; | 
|---|
| 36 | //echo $query2; | 
|---|
| 37 | $result2  = mysql_query($query2); | 
|---|
| 38 | while ($row2 = mysql_fetch_row($result2)) | 
|---|
| 39 | { | 
|---|
| 40 | echo "<li>".$row2[0].": ".$row2[1]."</li>\n"; | 
|---|
| 41 | } | 
|---|
| 42 | mysql_free_result($result2); | 
|---|
| 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 |  | 
|---|
| 56 | echo "</ul>\n"; | 
|---|
| 57 |  | 
|---|
| 58 | ?> | 
|---|
| 59 |  | 
|---|
| 60 | </body> | 
|---|
| 61 | </html> | 
|---|