i try to recreate a new mod but i think i have an error in it
i think is on this line
i put the whole code also if want to help.
i think is on this line
if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")i put the whole code also if want to help.
<?php
require_once("backend/functions.php");
dbconn(false);
loggedinonly;
if (get_user_class() < 7)
show_error_msg('Error', 'Access denied.');
if ($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST")
{
$updateset = $_POST['class'];
$res = SQL_Query_exec("SELECT id, invites FROM users WHERE class IN (".implode(",", $updateset).")");
while($arr=mysqli_fetch_assoc($res))
{
$curinvites = $arr["invites"];
$toadd = 0 + sqlesc($_POST["inviteadd"]);
$invites = ($curinvites + $toadd);
$shot = SQL_Query_exec("UPDATE users SET invites = $invites WHERE id = $arr[id]");
}
if ($shot)
show_error_msg("Done!", "Invitation were sent with succes!!");
else
show_error_msg("Error", "You didn`t select any class!");
}
stdhead("Invitation per class");
//$class = sqlesc($_POST["class"]);
?>
<style type="text/css">
<!--
.style1 {color: #FF0000}
.style7 {
font-size: 14px;
font-weight: bold;
}
-->
</style>
<table border=1 cellspacing=0 cellpadding=5>
<form method=post action=inviteadder.php>
<table cellspacing=0 cellpadding=10>
<tr>
<td><b><center><font size=3 color=orangered>Select User Class:</font></center></b>
<br>
<table style="border: 0" width="750" cellpadding="0" cellspacing="0">
<td style="border: 0" width="20"><input type="checkbox" name="class" value="1"></td>
<td style="border: 0">Member</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="2"></td>
<td style="border: 0">Power User</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="3"></td>
<td style="border: 0">V.I.P</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="4"></td>
<td style="border: 0">Uploader</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="5"></td>
<td style="border: 0">Moderator</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="6"></td>
<td style="border: 0">S. Moderator</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="7"></td>
<td style="border: 0">Administrator</td>
<td style="border: 0" width="20"><input type="checkbox" name="class" value="8"></td>
<td style="border: 0">Owner</td>
</tr>
<td></td>
<td></td>
<tr></table>
<tr><td><center><h2>
<span class="style1">How manny invites to send:</span>
<br></br>
<strong>Invites</strong><input type=text name=inviteadd size=7>
</h2></center></td></tr>
<tr><td colspan=2 align=center><input type=submit value="Send!" class=btn></td></tr>
</form>
</table>
<?
stdfoot();
?>
