-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMailUsers.php
131 lines (109 loc) · 2.69 KB
/
MailUsers.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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<?php
$headcommands='';
include('header.php');
#$userid=isloggedin();
if ($userid)
{
if (isAdmin($userid) == true)
{
?>
<form method="POST" action="mailuserstext.php">
Subject:<INPUT NAME="subject" COL=70><br/>
Email Text (write [username] to insert the name of the person):<br/>
<TEXTAREA NAME="EmailText" ROWS=20 COLS=30></TEXTAREA>
<table border="1">
<tr><td><p>Name</p></td><td>Questions</td><td>Proposals</td><td>Votes</td><td>Facebook</td><td>Spammer?</td><td>Send eMail?</td></tr>
<?php
$sql = 'SELECT id, username, active, fb_userid FROM users WHERE email != "" ';
$response = mysql_query($sql);
while ($row = mysql_fetch_array($response))
{
echo '<tr><td><p>';
echo WriteUserVsReader($row[0],$userid);
echo '</p></td>';
$sqlIn = 'SELECT id FROM questions WHERE usercreatorid ='.$row[0].' ';
$responseIn = mysql_query($sqlIn);
if (mysql_num_rows($responseIn)==0)
{
echo '<td bgcolor="#FFFF00">';
}
else
{
echo '<td>';
}
echo mysql_num_rows($responseIn);
echo '</td>';
$sqlIn = 'SELECT id FROM proposals WHERE usercreatorid ='.$row[0].' ';
$responseIn = mysql_query($sqlIn);
if (mysql_num_rows($responseIn)==0)
{
echo '<td bgcolor="#FFFF00">';
}
else
{
echo '<td>';
}
echo mysql_num_rows($responseIn);
echo '</td>';
$sqlIn = 'SELECT id FROM endorse WHERE userid ='.$row[0].' ';
$responseIn = mysql_query($sqlIn);
if (mysql_num_rows($responseIn)==0)
{
echo '<td bgcolor="#FFFF00">';
}
else
{
echo '<td>';
}
echo mysql_num_rows($responseIn);
echo '</td>';
if ($row[3]=="")
{
echo '<td bgcolor="#FFFF00">';
}
else
{
echo '<td bgcolor="#0000FF">';
}
if ($row[3]=="")
{
echo "NO";
}
else
{
echo "YES";
}
echo '</td>';
if ($row[2]==0)
{
echo '<td bgcolor="#FF0000">';
}
else
{
echo '<td>';
}
if ($row[2]==0)
{
echo "WARNING";
}
else
{
echo "no";
}
echo '</td>';
echo '<td><Input type = "Checkbox" Name ="users[]" title="'.$VGA_CONTENT['check2invite_title'] . '" value="'.$row[0].'" /></td></tr>';
}
?>
</tr>
<tr><td></td><td></td><td></td><td></td><td></td><td></td><td><input type = "Submit" Name = "Submit" title="<?=$VGA_CONTENT['submit2invite_title']?>" VALUE = "<?=$VGA_CONTENT['submit_button']?>"></td>
</tr></table>
</form>
<?php
}
}
else
{
DoLogin();
}
include('footer.php');
?>