source: trunk/www/dch/shiftinfo.php@ 17396

Last change on this file since 17396 was 17150, checked in by Daniela Dorner, 11 years ago
fixed choice of date depending on hour, added general contact info
File size: 1.9 KB
Line 
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>
14Who is on shift?
15(from <a href='https://www.fact-project.org/shift'>FACT shift plan<a>
16and <a href='https://www.fact-project.org/logbook/memberlist.php'>FACT logbook<a>)
17
18<?php
19
20if (date("H")>8)
21 $today=date("Ymd", mktime(0,0,0,date("m"), date("d"), date("Y")));
22else
23 $today=date("Ymd",strtotime(date("Y-m-d", mktime(0,0,0,date("m"), date("d"), date("Y")))." -1 day"));
24
25echo "<br> &nbsp;&nbsp;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;
28include ("db.php");
29$db_id = mysql_connect($host, $user, $pw);
30$result = mysql_query($query);
31echo "&nbsp;&nbsp;Contact Info Shiftcrew: <br>\n <ul>\n";
32while ($row = mysql_fetch_row($result))
33{
34 //echo "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;".$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}
44echo "</ul>\n <br>\n <br>\n ";
45mysql_free_result($result);
46
47echo "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);
50while ($row3 = mysql_fetch_row($result3))
51{
52 echo "<li>".$row3[0].": ".$row3[1]."</li>\n";
53}
54mysql_free_result($result3);
55
56echo "</ul>\n";
57
58?>
59
60</body>
61</html>
Note: See TracBrowser for help on using the repository browser.