EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
MyconferencesController.php
Go to the documentation of this file.
1 <?php
2 
9 {
10  public function actionIndex()
11  {
12  $this->render('index');
13  }
14 
19  public function administering()
20  {
21 
23 
24  if(Yii::app()->user->id != NULL)
25  $usid = Yii::app()->user->id;
26  else
27  $usid = 0;
28 
29  //select all conferences that the user has admin as his user type
30  $admin = mysql_query("SELECT DISTINCT conferenceid FROM conference_user_type WHERE userid='$usid' AND usertype=1");
31 
32  $i=0;
33 
34  while($row = mysql_fetch_array($admin))
35  {
36 
37  $asd = $row['conferenceid'];
38  $result1 = mysql_query("SELECT name FROM conference WHERE conferenceid='$asd'");
39 
40  while($row2 = mysql_fetch_array($result1))
41  {
42  echo "<B>".($i+1)."</B>" . ") Conference Name : " . $row2['name'];
43  echo " ";
44  }
45 
46  // echo "<br />";
47  // echo "Conference ID : " . $row['conferenceid'];
48  $co = $row['conferenceid'];
49  echo "<br />";
50  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
51  echo "<a href=\" ./index.php?r=conference/view&id=$co\">View Conference </a>";
52 /* echo " <br/> ";
53  echo "<a href=\" ./index.php?r=editConference/index&va=$co\">Edit Conference </a>";
54  echo "<br/>";
55  echo "<a href=\" ./index.php?r=inviteuser/index&va=$co\">Invite Users </a>";
56  echo "<br/>";
57  echo "<a href=\" ./index.php?r=participation_confirmation/index&va=$co\">View Participation Requests</a>";
58 */ echo "<br />";
59  echo "<br />";
60  $i++;
61  }
62 
63  if($i==0) echo "You are not administering any conference.";
64 
65  }
66 
70  public function authoring()
71  {
72 
74 
75  if(Yii::app()->user->id != NULL)
76  $usid = Yii::app()->user->id;
77  else
78  $usid = 0;
79 
80  $i=0;
81 
82  //select all conferences that the user has author as his user type
83  $author = mysql_query("SELECT DISTINCT conferenceid FROM conference_user_type WHERE userid='$usid' AND usertype=2");
84 
85  while($row = mysql_fetch_array($author))
86  {
87 
88  $asd = $row['conferenceid'];
89  $result1 = mysql_query("SELECT name FROM conference WHERE conferenceid='$asd'");
90 
91  while($row2 = mysql_fetch_array($result1))
92  {
93  echo "<B>".($i+1)."</B>" . ") Conference Name : " . $row2['name'];
94  echo " ";
95  }
96 
97  // echo "<br />";
98  // echo "Conference ID : " . $row['conferenceid'];
99  $co = $row['conferenceid'];
100  echo "<br />";
101  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
102  echo "<a href=\" ./index.php?r=conference/view&id=$co\">View Conference </a>";
103  echo "<br />";
104  echo "<br />";
105  $i++;
106 
107  }
108 
109  if($i==0) echo "You are not authoring in any conference.";
110 
111 
112  }
113 
117  public function refereeing()
118  {
119 
121 
122  if(Yii::app()->user->id != NULL)
123  $usid = Yii::app()->user->id;
124  else
125  $usid = 0;
126 
127  $i=0;
128 
129  //select all conferences that the user has referee as his user type
130  $referee = mysql_query("SELECT DISTINCT conferenceid FROM conference_user_type WHERE userid='$usid' AND usertype=3");
131 
132  while($row = mysql_fetch_array($referee))
133  {
134 
135  $asd = $row['conferenceid'];
136  $result1 = mysql_query("SELECT name FROM conference WHERE conferenceid='$asd'");
137 
138  while($row2 = mysql_fetch_array($result1))
139  {
140  echo "<B>".($i+1)."</B>" . ") Conference Name : " . $row2['name'];
141  echo " ";
142  }
143 
144  // echo "<br />";
145  // echo "Conference ID : " . $row['conferenceid'];
146  $co = $row['conferenceid'];
147  echo "<br />";
148  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
149  echo "<a href=\" ./index.php?r=conference/view&id=$co\">View Conference </a>";
150 
151  echo "<br />";
152  echo "<br />";
153  $i++;
154  }
155 
156  if($i==0) echo "You are not refereeing in any conference.";
157 
158  }
159 
160 
164  public function attending()
165  {
166 
168 
169  if(Yii::app()->user->id != NULL)
170  $usid = Yii::app()->user->id;
171  else
172  $usid = 0;
173 
174  $i=0;
175 
176  //select all conferences that the user has attendee as his user type
177  $attendee = mysql_query("SELECT DISTINCT conferenceid FROM conference_user_type WHERE userid='$usid' AND usertype=4");
178 
179  while($row = mysql_fetch_array($attendee))
180  {
181 
182  $asd = $row['conferenceid'];
183  $result1 = mysql_query("SELECT name FROM conference WHERE conferenceid='$asd'");
184 
185  while($row2 = mysql_fetch_array($result1))
186  {
187  echo "<B>".($i+1)."</B>" . ") Conference Name : " . $row2['name'];
188  echo " ";
189  }
190 
191  // echo "<br />";
192  // echo "Conference ID : " . $row['conferenceid'];
193  $co = $row['conferenceid'];
194  echo "<br />";
195  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
196  echo "<a href=\" ./index.php?r=conference/view&id=$co\">View Conference </a>";
197 
198  echo "<br />";
199  echo "<br />";
200  $i++;
201  }
202 
203  if($i==0) echo "You are not attending any conference.";
204 
205 
206 
207  }
208 
209  // Uncomment the following methods and override them if needed
210  /*
211  public function filters()
212  {
213  // return the filter configuration for this controller, e.g.:
214  return array(
215  'inlineFilterName',
216  array(
217  'class'=>'path.to.FilterClass',
218  'propertyName'=>'propertyValue',
219  ),
220  );
221  }
222 
223  public function actions()
224  {
225  // return external action classes, e.g.:
226  return array(
227  'action1'=>'path.to.ActionClass',
228  'action2'=>array(
229  'class'=>'path.to.AnotherActionClass',
230  'propertyName'=>'propertyValue',
231  ),
232  );
233  }
234  */
235 }