-
Notifications
You must be signed in to change notification settings - Fork 0
/
list_emails_ajax.php
executable file
·68 lines (46 loc) · 1.72 KB
/
list_emails_ajax.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/********************************************************
*
* phpAbstracts
* http://www.phpabstracts.com
*
* For copyright and license information, see readme.txt
*
*********************************************************/
//Database Connection Variables
include('db.php');
//Connect to database
mysql_connect($host,$username,$password);
@mysql_select_db($database) or die( "Unable to select database");
$filter = $_GET['q'];
$filter_s = $_GET['r'];
if ($filter_s) {
if ($filter_s == "yes")
$query3 = "SELECT email1, email2 FROM abstracts WHERE master_status = '" . $filter . "' AND scholarship = 'on' ORDER BY abstract_id DESC";
else
$query3 = "SELECT email1, email2 FROM abstracts WHERE master_status = '" . $filter . "' AND scholarship != 'on' ORDER BY abstract_id DESC";
}
else
$query3 = "SELECT email1, email2 FROM abstracts WHERE master_status = '" . $filter . "' ORDER BY abstract_id DESC";
$result = mysql_query($query3);
$num = mysql_numrows($result);
$num_abstracts = $num;
echo "<div style='float:right'>";
echo "<a href='#emails_container' onclick='hide(\"emails_container\");'>x</a>";
echo "</div>";
echo "The following abstracts have been set with a Status of <strong>'" . $filter . "";
if ($filter_s == "yes") echo " w/scholarship";
echo "'</strong>.<br /><br />";
echo "<blockquote style='line-height:15px;'>";
$i=0;
while ($i < $num) {
$email1=mysql_result($result,$i,"email1");
$email2=mysql_result($result,$i,"email2");
if ($email1) echo $email1 . ", ";
if ($email2) echo $email2 . ", ";
$i++;
} //end while loop
echo "</blockquote>";
//Close database
mysql_close();
?>