EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
MypapersController.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 administering()
18  {
19 
20  if(Yii::app()->user->id != NULL)
21  $usid = Yii::app()->user->id;
22  else
23  $usid = 0;
24 
26 
27  //select all papers that the user has submitted from paper_author table
28  $administrating = mysql_query("SELECT DISTINCT conferenceid FROM conference_user_type WHERE userid='$usid' AND usertype=1");
29  $i=0;
30 
31  while($row = mysql_fetch_array($administrating))
32  {
33 
34  $asd = $row['conferenceid'];
35 
36  $result1 = mysql_query("SELECT paperid FROM conference_paper WHERE conferenceid=$asd");
37  if($result1!=NULL){
38  while($row2 = mysql_fetch_array($result1))
39  {
40  $paper = $row2['paperid'];
41 
42  $result2 = mysql_query("SELECT paper_name FROM paper WHERE id=$paper");
43 
44  if($result2!=NULL){
45  while($row3 = mysql_fetch_array($result2))
46  {/*
47  $co = $row2['paperid'];
48  echo "<B>".($i+1)."</B>" . ") Paper Name : " . $row3['paper_name'];
49 
50  echo "<br/>";
51  echo "<a href=\" ./index.php?r=paper/view&id=$co\">View Paper </a>";
52  echo "<br/>";
53  echo "<br/>";
54  */
55  $i++;
56  }
57  }
58  }
59 
60  }
61  else {echo "No Papers";}
62 
63  }
64 
65  if($i===0) echo "You are not administrating any papers.";
66  else
67  {
68  echo "<a href=\" ./index.php?r=admintableviewall/index&sort=1\">View All Papers Belonging to Your Conferences </a><br><br>";
69  echo "<a href=\" ./index.php?r=admintableview/index&sort=1\">Approve/Reject Papers Belonging to Your Conferences </a><br><br>";
70  echo "<a href=\" ./index.php?r=assignment_function/index\"> Assign Referees Automatically </a><br><br>";
71  }
72 
73  }
74 
78  public function authoring()
79  {
80 
81  if(Yii::app()->user->id != NULL)
82  $usid = Yii::app()->user->id;
83  else
84  $usid = 0;
85 
87 
88  //select all papers that the user has submitted from paper_author table
89  $authoring = mysql_query("SELECT DISTINCT paperid FROM paper_author WHERE userid='$usid'");
90  $i=0;
91 
92  while($row = mysql_fetch_array($authoring))
93  {
94 
95  $asd = $row['paperid'];
96  $result1 = mysql_query("SELECT * FROM paper WHERE id='$asd'");
97 
98  while($row2 = mysql_fetch_array($result1))
99  {
100  echo "<B>".($i+1)."</B>" . ") Paper Name : " . $row2['name'];
101  echo " ";
102  }
103 
104  // echo "<br />";
105  // echo "Conference ID : " . $row['conferenceid'];
106  $co = $row['paperid'];
107  echo "<br />";
108  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
109  echo "<a href=\" ./index.php?r=paper/view&id=$co\">View Paper </a>";
110  echo "<br/>";
111  echo "<br />";
112  $i++;
113  }
114 
115  if($i===0) echo "You are not authoring any papers.";
116 
117  }
118 
122  public function refereeing()
123  {
124 
125  if(Yii::app()->user->id != NULL)
126  $usid = Yii::app()->user->id;
127  else
128  $usid = 0;
129 
131 
132  $refereeing = mysql_query("SELECT DISTINCT paperid FROM paper_referee WHERE userid='$usid'");
133  $i=0;
134 
135  while($row = mysql_fetch_array($refereeing))
136  {
137 
138  $asd = $row['paperid'];
139  $result1 = mysql_query("SELECT paper_name FROM paper WHERE id='$asd'");
140 
141  while($row2 = mysql_fetch_array($result1))
142  {
143  /*
144  echo "<B>".($i+1)."</B>" . ") Paper Name : " . $row2['paper_name'];
145  echo " ";
146  */
147  }
148 
149 /*
150  // echo "<br />";
151  // echo "Conference ID : " . $row['conferenceid'];
152  $co = $row['paperid'];
153  echo "<br />";
154  // echo CHtml::link("View Conference",array('conference/index', '&va'=>$co));
155  echo "<a href=\" ./index.php?r=paper/view&id=$co\">View Paper </a>";
156  echo "<br/>";
157  echo "<br />";*/
158  $i++;
159  }
160 
161  if($i===0) echo "You are not refereeing any papers.<br><br>";
162  else echo "<a href=\" ./index.php?r=refereetableview/index&sort=1\">View All Assigned Papers </a>";
163 
164  }
165 
166 
167 
168 
169  // Uncomment the following methods and override them if needed
170  /*
171  public function filters()
172  {
173  // return the filter configuration for this controller, e.g.:
174  return array(
175  'inlineFilterName',
176  array(
177  'class'=>'path.to.FilterClass',
178  'propertyName'=>'propertyValue',
179  ),
180  );
181  }
182 
183  public function actions()
184  {
185  // return external action classes, e.g.:
186  return array(
187  'action1'=>'path.to.ActionClass',
188  'action2'=>array(
189  'class'=>'path.to.AnotherActionClass',
190  'propertyName'=>'propertyValue',
191  ),
192  );
193  }
194  */
195 }