EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
index.php
Go to the documentation of this file.
1 <?php
2 /* @var $this InviteFunctionCheckboxController */
3 
10 $this->breadcrumbs=array(
11  'Invite Function Checkbox',
12 );
13 ?>
14 
15 
16 <?php
17 
19 
20 $confid = $_POST["val"];
21 if(isset($_POST["type"]))
22  {
23 
24  $type=$_POST["type"];
25 
26  if(isset($_POST['names']))
27  {
28  foreach($_POST['names'] as $name)
29  {
30 
31  $result = mysql_query("SELECT * FROM users WHERE username='$name'");
32 
33  if(mysql_fetch_array($result)==NULL) echo "No such user";
34  else{
35 
36  $result = mysql_query("SELECT * FROM users WHERE username='$name'");
37 
38  while($row = mysql_fetch_array($result))
39  {
40 
41  $sql_insert_invitations="INSERT INTO invitations ( userid, conferenceid, usertype)
42  VALUES
43  ('$row[userid]', '$confid', '$type')";
44  mysql_query($sql_insert_invitations) or die (mysql_error());
45 
46  echo $row['username'];
47  if($type==2)
48  echo" Was Invited to Conference as Author<br><br>";
49  else if($type==3)
50  echo" Was Invited to Conference as Referee<br><br>";
51  else if($type==4)
52  echo" Was Invited to Conference as Attendee<br><br>";
53 
54  }}}}}
55 
56 else echo "No Type Selected";
57 /*
58 if(isset($_POST['names']))
59 {
60  foreach($_POST['names'] as $name)
61  {
62 
63  $result = mysql_query("SELECT * FROM users WHERE username='$name'");
64 
65  if(mysql_fetch_array($result)==NULL) echo "No such user";
66  else{
67 
68  //echo $confid . "<br/>" . $mail . "<br/>" . $ty . "<br/>";
69  $result = mysql_query("SELECT * FROM users WHERE username='$name'");
70 
71  while($row = mysql_fetch_array($result))
72  {
73 
74  $sql_insert_paper_referee="INSERT INTO paper_referee ( paperid, userid)
75  VALUES
76  ('$paperid','$row[userid]')";
77  mysql_query($sql_insert_paper_referee) or die (mysql_error());
78 
79  echo "Referee is assigned to paper";
80 
81  }
82  }
83  }
84 }*/
85 
86 ?>
87 
88 <?php
89 echo "";
90 echo "<a href=\" ./index.php?r=inviteuser/index&va=$confid\">" . "Go Back to the Invitation Page" . "</a>";
91 ?>