EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
index.php
Go to the documentation of this file.
1 <?php
2 /* @var $this ScheduleController */
3 
4 $this->breadcrumbs=array(
5  'Schedule',
6 );
7 ?>
8 
9 <?php
10 
12 
13 $confid = $_GET['confid'];
14 
15 $room = mysql_query("SELECT * FROM conference WHERE conferenceid=$confid");
16 
17 $roo = "";
18 
20 while($row = mysql_fetch_array($room))
21 {
22  $roo = $roo . $row['rooms'];
23  $begindate = $row['conf_date_begin'];
24  $enddate = $row['conf_date_end'];
25  $begintime = $row['startTime'];
26  $endtime = $row['endTime'];
27 
28 
29 }
30 
31 //get room names separated by commas
32 $rooms = explode(',', $roo);
33 
34 foreach($rooms as $ro)
35 {
36  echo $ro . "<br>";
37  $roomnum++;
38 }
39 
40 echo "room number : " . $roomnum . "<br><br>";
41 
42  $dStart = new DateTime(date($begindate));
43  $dEnd = new DateTime(date($enddate));
44  $dDiff = $dStart->diff($dEnd);
45  //echo $dDiff->format('%R'); // use for point out relation: smaller/greater
46  echo "gun farki : " . $dDiff->days . "<br>";
47  $daynum = $dDiff->days;
48 
49  $to_time = strtotime($endtime);
50  $from_time = strtotime($begintime);
51  echo round(abs($to_time - $from_time) / 3600). " hours<br>";
52  $timedif = round(abs($to_time - $from_time) / 3600);
53 
54  $papers = mysql_query("SELECT * FROM paper WHERE id IN
55  (SELECT paperid FROM conference_paper WHERE conferenceid=$confid)");
56 
57  $i = 0;
58 
59  while($row2 = mysql_fetch_array($papers))
60  {
61  $papid[$i+1] = $row2['id'];
62  $papname[$i+1] = $row2['paper_name'];
63 
64  $i++;
65  }
66  echo "paper sayisi : " . $i . "<br>";
67 
68 
69 
70  echo "<table>";
71 /*
72 for($b=0;$b<$timedif;$b++)
73 {
74  for($a=0;$a<$daynum; $a++)
75  {
76 
77  if($b==0) echo ("<th><h3>Day " . ($a+1) . "</h3></th>");
78  // else echo ("<th></th>");
79  $hours = $timedif;
80 
81  }
82  echo "</tr>";
83 
84 echo "<th>" . $begintime . "</th>";
85 
86 }*/
87 
88 
89  for($a=0;$a<$daynum; $a++)
90  {
91 
92  echo ("<tr><th><h3>Day " . ($a+1) . "</h3></th>");
93  // else echo ("<th></th>");
94  $hours = $timedif;
95 
96  for($b=0;$b<$timedif;$b++)
97  {
98  echo "</tr>";
99  echo "<th>" . $begintime . "</th>";
100 
101  }
102 
103 
104  echo "<th></th>";
105  echo "<th></th>";
106 
107 }
108 
109 
110  echo "</table>";
111 ?>