EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
ParticipateController.php
Go to the documentation of this file.
1 <?php
2 
8 {
9  public function actionIndex()
10  {
11  $this->render('index');
12  }
13 
17  public function request ($confid, $type)
18  {
20 
21 
22 if(Yii::app()->user->id != NULL)
23 $usid = Yii::app()->user->id;
24 else
25 $usid = 0;
26 
27 
28  if($type == "attendee")
29  {
30  /*
31  $sql_insert_conference_user_type="INSERT INTO conference_user_type ( userid, usertype, conferenceid)
32 VALUES
33 ('$usid', 4 , '$confid')";
34 mysql_query($sql_insert_conference_user_type) or die (mysql_error());
35 
36  echo "You are saved as attendee for this function <br/>";
37 */
38 
39  $sql_insert_request="INSERT INTO request_type ( conferenceid, userid, type)
40 VALUES
41 ('$confid', $usid , '4')";
42 mysql_query($sql_insert_request) or die (mysql_error());
43 
44 
45  echo "Request for attendance is sent to conference administrator." . "<br/>";
46  }
47  else if($type == "author")
48  {
49 
50  $sql_insert_request="INSERT INTO request_type ( conferenceid, userid, type)
51 VALUES
52 ('$confid', $usid , '2')";
53 mysql_query($sql_insert_request) or die (mysql_error());
54 
55 
56  echo "Request for authorship is sent to conference administrator." . "<br/>";
57 
58  }
59 
60  else if($type == "referee")
61  {
62 
63  $sql_insert_request="INSERT INTO request_type ( conferenceid, userid, type)
64 VALUES
65 ('$confid', $usid , '3')";
66 mysql_query($sql_insert_request) or die (mysql_error());
67 
68 
69  echo "Request for refereeing is sent to conference administrator." . "<br/>";
70 
71  }
72 
73 
74  }
75 
76  // Uncomment the following methods and override them if needed
77  /*
78  public function filters()
79  {
80  // return the filter configuration for this controller, e.g.:
81  return array(
82  'inlineFilterName',
83  array(
84  'class'=>'path.to.FilterClass',
85  'propertyName'=>'propertyValue',
86  ),
87  );
88  }
89 
90  public function actions()
91  {
92  // return external action classes, e.g.:
93  return array(
94  'action1'=>'path.to.ActionClass',
95  'action2'=>array(
96  'class'=>'path.to.AnotherActionClass',
97  'propertyName'=>'propertyValue',
98  ),
99  );
100  }
101  */
102 }