EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
ApprovepaperController.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 save()
20  {
21 
22 if(isset($_POST['approve']) || isset($_POST['reject']))
23 {
24 if(isset($_POST['approve']))
25 {
26  foreach($_POST['approve'] as $accepted)
27  {
28 
29  echo "paper id saved for approval : " . $accepted . "<br>";
30 
31  $sql_edit_paper="UPDATE paper SET saved_approval=1 WHERE id=$accepted";
32  mysql_query($sql_edit_paper) or die (mysql_error());
33 
34  }
35 }
36 
37 if(isset($_POST['reject']))
38 {
39  foreach($_POST['reject'] as $rejected)
40  {
41 
42  echo "paper id saved for rejection: " . $rejected . "<br>";
43 
44  $sql_edit_paper="UPDATE paper SET saved_approval=2 WHERE id=$rejected";
45  mysql_query($sql_edit_paper) or die (mysql_error());
46  }
47 }
48 }
49 
50 else echo "No Selection Was Made.";
51 
52  }
53 
54  // Uncomment the following methods and override them if needed
55  /*
56  public function filters()
57  {
58  // return the filter configuration for this controller, e.g.:
59  return array(
60  'inlineFilterName',
61  array(
62  'class'=>'path.to.FilterClass',
63  'propertyName'=>'propertyValue',
64  ),
65  );
66  }
67 
68  public function actions()
69  {
70  // return external action classes, e.g.:
71  return array(
72  'action1'=>'path.to.ActionClass',
73  'action2'=>array(
74  'class'=>'path.to.AnotherActionClass',
75  'propertyName'=>'propertyValue',
76  ),
77  );
78  }
79  */
80 }