EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
Interests_confirmationController.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 view_topics()
18  {
19 
21 
22  echo "<form action='index.php?r=interests_confirmation_function/index&new=1' method='post'>";
23  $topics = mysql_query("SELECT * FROM interests_topics_confirmation WHERE id IN (SELECT topicid FROM topic_subtopic_confirmation WHERE accepted=0)");
24 
25  $i=0;
26  $k=0;
27  $o=0;
28 
29  while($row = mysql_fetch_array($topics))
30  {
31  $as[$o] = $row['name'];
32  $asd[$o] = $row['id'];
33  $result1 = mysql_query("SELECT subtopicid FROM topic_subtopic_confirmation WHERE topicid='$asd[$o]' AND accepted=0");
34  echo "<h3>$as[$o]</h3>" . "";
35 
36  while($row2 = mysql_fetch_array($result1))
37  {
38  $asd2 = $row2['subtopicid'];
39 
40  $result2 = mysql_query("SELECT name FROM interests_subtopics_confirmation WHERE id='$asd2'");
41 
42  while($row3 = mysql_fetch_array($result2))
43  {
44 
45  $asd3[$k] = $row3['name'];
46 
47  echo "<B>".($k+1)."</B>" . ") ";
48 
49  echo "<input type='checkbox' name='topicid[]' value=$asd2>";
50  echo "<input type='hidden' name='topid[]' value=$asd[$o]>";
51 // echo "<a href=\" /test/index.php?r=user_profile/index&username=$asd3[$k]\">" . $asd3[$k] . "</a><br><br>";
52  echo $asd3[$k] . "</a><br><br>";
53 
54 
55  }
56  $k++;
57 
58  }
59  $co = $row2['subtopicid'];
60  $k=0;
61  $o++;
62  $i++;
63  }
64 
65  echo "<input type='submit' name=\'formSubmit' value='Confirm Requests' />";
66  echo "</form><br>";
67 
68 
69 
70 
71  }
72 
76  public function existing_interests()
77  {
79 
80  echo "<form action='index.php?r=interests_confirmation_function/index&new=0' method='post'>";
81  $topics = mysql_query("SELECT * FROM interests_topics WHERE id IN (SELECT topicid FROM topic_subtopic_existing_confirmation WHERE accepted=0)");
82 
83  $i=0;
84  $k=0;
85  $o=0;
86 
87  while($row = mysql_fetch_array($topics))
88  {
89  $as[$o] = $row['name'];
90  $asd[$o] = $row['id'];
91  $result1 = mysql_query("SELECT subtopicid FROM topic_subtopic_existing_confirmation WHERE topicid='$asd[$o]' AND accepted=0");
92  echo "<h3>$as[$o]</h3>" . "";
93 
94  while($row2 = mysql_fetch_array($result1))
95  {
96  $asd2 = $row2['subtopicid'];
97 
98  $result2 = mysql_query("SELECT name FROM interests_subtopics_confirmation WHERE id='$asd2'");
99 
100 
101  while($row3 = mysql_fetch_array($result2))
102  {
103 
104  $asd3[$k] = $row3['name'];
105 
106  echo "<B>".($k+1)."</B>" . ") ";
107 
108  echo "<input type='checkbox' name='topicid[]' value=$asd2>";
109  echo "<input type='hidden' name='topid[]' value=$asd[$o]>";
110 
111 // echo "<a href=\" /test/index.php?r=user_profile/index&username=$asd3[$k]\">" . $asd3[$k] . "</a><br><br>";
112  echo $asd3[$k] . "</a><br><br>";
113 
114 
115  }
116  $k++;
117 
118  }
119  $co = $row2['subtopicid'];
120  $k=0;
121  $o++;
122  $i++;
123  }
124 
125  echo "<input type='submit' name=\'formSubmit' value='Confirm Requests' />";
126  echo "</form><br>";
127 
128 
129  }
130  // Uncomment the following methods and override them if needed
131  /*
132  public function filters()
133  {
134  // return the filter configuration for this controller, e.g.:
135  return array(
136  'inlineFilterName',
137  array(
138  'class'=>'path.to.FilterClass',
139  'propertyName'=>'propertyValue',
140  ),
141  );
142  }
143 
144  public function actions()
145  {
146  // return external action classes, e.g.:
147  return array(
148  'action1'=>'path.to.ActionClass',
149  'action2'=>array(
150  'class'=>'path.to.AnotherActionClass',
151  'propertyName'=>'propertyValue',
152  ),
153  );
154  }
155  */
156 }