EliteConf
 All Data Structures Namespaces Files Functions Variables Pages
AnnouncementfunctionController.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 sendannouncement()
20  {
22 
23  $confid = $_POST['confid'];
24  $header = $_POST['title'];
25  $text = $_POST['content'];
26  $usermail = "mrecan06@hotmail.com";
27 
28  $sql_insert_announcement="INSERT INTO announcements ( header, text)
29 VALUES
30 ('$header', '$text')";
31 mysql_query($sql_insert_announcement) or die (mysql_error());
32 
33  $last = mysql_insert_id();
34 
35  $sql_insert_conf_announcement="INSERT INTO conference_announcement ( conferenceid, announcementid)
36 VALUES
37 ('$confid', '$last')";
38 mysql_query($sql_insert_conf_announcement) or die (mysql_error());
39 
40 
41 
42 
43  }
44 
49  public function mailall()
50  {
51 
53 
54  $confid = $_POST['confid'];
55  $header = $_POST['title'];
56  $text = $_POST['content'];
57 
58  $mails = mysql_query("SELECT * FROM users WHERE userid IN
59  (SELECT userid FROM conference_user_type WHERE conferenceid=$confid)");
60 
61  while($row = mysql_fetch_array($mails))
62  {
63 
64  $usermail = $row['email'];
65  Yii::import('application.extensions.phpmailer.JPhpMailer');
66 
67  $mail = new JPhpMailer;
68  $mail->IsSMTP();
69  $mail->Host = 'smtp.googlemail.com:465';
70  $mail->SMTPSecure = "ssl";
71  $mail->SMTPAuth = true;
72  $mail->Username = 'jjjuk7@gmail.com';
73  $mail->Password = 'klizma23';
74  $mail->SetFrom('jjjuk7@gmail.com', 'HackedHard');
75  $mail->Subject = $header;
76  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
77  $mail->MsgHTML($text);
78  $mail->AddAddress($usermail, 'Hacked Hard');
79  $mail->Send();
80  }
81 
82  }
83 
88  public function mailauth()
89  {
90 
92 
93  $confid = $_POST['confid'];
94  $header = $_POST['title'];
95  $text = $_POST['content'];
96 
97  $mails = mysql_query("SELECT * FROM users WHERE userid IN
98  (SELECT userid FROM conference_user_type WHERE conferenceid=$confid AND usertype=2)");
99 
100  while($row = mysql_fetch_array($mails))
101  {
102 
103  $usermail = $row['email'];
104  Yii::import('application.extensions.phpmailer.JPhpMailer');
105 
106  $mail = new JPhpMailer;
107  $mail->IsSMTP();
108  $mail->Host = 'smtp.googlemail.com:465';
109  $mail->SMTPSecure = "ssl";
110  $mail->SMTPAuth = true;
111  $mail->Username = 'jjjuk7@gmail.com';
112  $mail->Password = 'klizma23';
113  $mail->SetFrom('jjjuk7@gmail.com', 'HackedHard');
114  $mail->Subject = $header;
115  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
116  $mail->MsgHTML($text);
117  $mail->AddAddress($usermail, 'Hacked Hard');
118  $mail->Send();
119  }
120 
121  }
122 
127  public function mailref()
128  {
129 
131 
132  $confid = $_POST['confid'];
133  $header = $_POST['title'];
134  $text = $_POST['content'];
135 
136  $mails = mysql_query("SELECT * FROM users WHERE userid IN
137  (SELECT userid FROM conference_user_type WHERE conferenceid=$confid AND usertype=3)");
138 
139  while($row = mysql_fetch_array($mails))
140  {
141 
142  $usermail = $row['email'];
143  Yii::import('application.extensions.phpmailer.JPhpMailer');
144 
145  $mail = new JPhpMailer;
146  $mail->IsSMTP();
147  $mail->Host = 'smtp.googlemail.com:465';
148  $mail->SMTPSecure = "ssl";
149  $mail->SMTPAuth = true;
150  $mail->Username = 'jjjuk7@gmail.com';
151  $mail->Password = 'klizma23';
152  $mail->SetFrom('jjjuk7@gmail.com', 'HackedHard');
153  $mail->Subject = $header;
154  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
155  $mail->MsgHTML($text);
156  $mail->AddAddress($usermail, 'Hacked Hard');
157  $mail->Send();
158  }
159 
160  }
161 
166  public function mailatt()
167  {
168 
170 
171  $confid = $_POST['confid'];
172  $header = $_POST['title'];
173  $text = $_POST['content'];
174 
175  $mails = mysql_query("SELECT * FROM users WHERE userid IN
176  (SELECT userid FROM conference_user_type WHERE conferenceid=$confid AND usertype=4)");
177 
178  while($row = mysql_fetch_array($mails))
179  {
180 
181  $usermail = $row['email'];
182  Yii::import('application.extensions.phpmailer.JPhpMailer');
183 
184  $mail = new JPhpMailer;
185  $mail->IsSMTP();
186  $mail->Host = 'smtp.googlemail.com:465';
187  $mail->SMTPSecure = "ssl";
188  $mail->SMTPAuth = true;
189  $mail->Username = 'jjjuk7@gmail.com';
190  $mail->Password = 'klizma23';
191  $mail->SetFrom('jjjuk7@gmail.com', 'HackedHard');
192  $mail->Subject = $header;
193  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
194  $mail->MsgHTML($text);
195  $mail->AddAddress($usermail, 'Hacked Hard');
196  $mail->Send();
197  }
198 
199  }
200 
201 
202  // Uncomment the following methods and override them if needed
203  /*
204  public function filters()
205  {
206  // return the filter configuration for this controller, e.g.:
207  return array(
208  'inlineFilterName',
209  array(
210  'class'=>'path.to.FilterClass',
211  'propertyName'=>'propertyValue',
212  ),
213  );
214  }
215 
216  public function actions()
217  {
218  // return external action classes, e.g.:
219  return array(
220  'action1'=>'path.to.ActionClass',
221  'action2'=>array(
222  'class'=>'path.to.AnotherActionClass',
223  'propertyName'=>'propertyValue',
224  ),
225  );
226  }
227  */
228 }