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
| function mute()
{
global $nuked ;
echo "<div class=\"content-box\">\n"
. "<div class=\"content-box-headercenter\"><h3>" . _AJOUTMUTE . "</h3>\n"
. "</div>\n";
echo "<form method=\"post\" action=\"index.php?file=Mute&page=admin&op=addmute\" onsubmit=\"return verifForm(this)\">\n"
. "<table style=\"margin-left: auto;margin-right: auto;text-align: left;\" cellspacing=\"1\" cellpadding=\"3\" border=\"0\">\n"
. "<tr><td><strong>" . _PSEUDO . " </strong> <br /><input id=\"1pseudo\" type=\"text\" name=\"pseudo\" value=\"\" size=\"30\" onblur=\"verifPseudo(this)\" required /></td></tr>\n"
. "<tr><td><strong>" . _STEAMID . "</strong> <br /><input id=\"1steamid\" type=\"text\" name=\"steamid\" value=\"\" size=\"30\" onblur=\"verifSteamid(this)\" required /></td></tr>\n"
. "<tr><td><strong>" . _RAISON . "</strong> <SELECT id=\"1raison\" name=\"raison\" />\n";
$sql=mysql_query("SELECT id, raisonperf FROM ". LIST_PERF_TABLE ." ORDER BY id ASC" );
while(list ($id, $raisonperf) = mysql_fetch_array($sql))
echo "<OPTION VALUE=\"". $raisonperf ."\">".$raisonperf."</OPTION>\n";
echo "</td></tr>\n"
. "<tr><td><strong>" . _TIME . " : </strong> <SELECT id=\"datefin1\" name=\"temp\"/>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+7 days'))) ."\">". _1SEMAINE ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+14 days'))) ."\">". _2SEMAINES ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+21 days'))) ."\">". _3SEMAINES ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+1 month'))) ."\">". _1MOIS ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+3 month'))) ."\">". _3MOIS ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+6 month'))) ."\">". _6MOIS ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+9 month'))) ."\">". _9MOIS ."</OPTION>\n"
. "<OPTION VALUE=\"". ($temp = date('d-m-Y', strtotime('+1 year'))) ."\">". _1AN ."</OPTION>\n"
. "</td></tr>\n"
. "<tr><td><strong>" . _MUTE . " : </strong> <input id=\"checkmute\" type=\"radio\" name=\"mute\" value=\"0\" checked=\"checked\" /> <b>" . _UNMUTE . " : </b> <input type=\"radio\" id=\"checkmute\" name=\"mute\" value=\"1\" /></td></tr>\n"
. "<tr><td align=\"center\"><br /><input type=\"submit\" class=\"bouton\" value=\"". _ADD ."\" /></td></tr></table></form></div>\n";
}
function addmute($steamid, $pseudo, $raison, $temp, $mute)
{
global $nuked, $user;
$sql=mysql_query("SELECT * FROM ". LIST_MUTE_TABLE ." WHERE steamid = '" . $steamid . "'");
$sql1=mysql_query("SELECT * FROM ". LIST_PERF_TABLE ." WHERE raisonperf = '" . $raison . "'");
list($raisonperf) = mysql_fetch_array($sql1);
$count = mysql_num_rows($sql);
if($count == 0){
$steamid = printSecuTags($steamid);
$pseudo = printSecuTags($pseudo);
$date = date('d-m-Y H:i:s');
$raisonperf = printSecuTags($raison);
$temp = printSecuTags($temp);
$mute = printSecuTags($mute);
$admin = printSecuTags($user[2]);
$token = printSecuTags($user[0]);
$add = mysql_query("INSERT INTO " . LIST_MUTE_TABLE . " ( `steamid`, `pseudo`, `date`, `raison`, `temp`, `mute`, `admin`, `token` ) VALUES ( '" . $steamid . "', '" . $pseudo . "', '" . $date . "', '" . $raison . "', '" . $temp . "', '" . $mute . "', '" . $user[2] . "', '" . $user[0] . "' )");
?>
<div class="notification success png_bg">
<div align="center"><strong><h3><?php echo _ADDMUTEINFO; ?></h3></strong><br />
<strong><?php echo _ADDADMIN; ?></strong><?php echo ($admin); ?><br />
<strong><?php echo _ADDPSEUDO; ?></strong><?php echo ($pseudo); ?><br />
<strong><?php echo _ADDSTEAMID; ?></strong><?php echo ($steamid); ?><br />
<strong><?php echo _ADDRAISON; ?></strong><?php echo ($raison); ?><br />
<strong><?php echo _ADDMUTE; ?><?php echo _ADDDU; ?></strong><?php echo ($date); ?><strong><?php echo _ADDAU; ?></strong><?php echo ($temp); ?><br />
<div style="text-align:center;"><a href="index.php?file=Mute&page=admin"><b><?php echo _BACK; ?></b></a></div>
</div></div>
<?php
}if ($count != 0){
$sql1=mysql_query("SELECT id, steamid, pseudo, date, temp, mute FROM ". LIST_MUTE_TABLE ." WHERE steamid = '" . $steamid . "'");
while (list ($id, $steamid, $pseudo, $date, $temp, $mute) = mysql_fetch_array($sql1)){
if ($mute != 1){
?>
<div class="notification error png_bg">
<div align="center"><strong><h3><?php echo _DEJAMUTE; ?></h3></strong><br />
<strong><?php echo _ADDPSEUDO; ?></strong><?php echo ($pseudo); ?><br />
<strong><?php echo _ADDSTEAMID; ?></strong><?php echo ($steamid); ?><br />
<strong><?php echo _ADDRAISON; ?></strong><?php echo ($raison); ?><br />
<strong><?php echo _ADDMUTE; ?><?php echo _ADDDU; ?></strong><?php echo ($date); ?><strong><?php echo _ADDAU; ?></strong><?php echo ($temp); ?><br />
<div style="text-align:center;"><a href="javascript:history.back()"><b><?php echo _BACK; ?></b></a></div>
</div></div>
<?php
}elseif ($mute != 0){
?>
<div class="notification error png_bg">
<div align="center"><strong><h3><?php echo _DEJAUNMUTE; ?></h3></strong><br />
<strong><?php echo _ADDPSEUDO; ?></strong><?php echo ($pseudo); ?><br />
<strong><?php echo _ADDSTEAMID; ?></strong><?php echo ($steamid); ?><br />
<strong><?php echo _ADDRAISON; ?></strong><?php echo ($raison); ?><br />
<strong><?php echo _ADDMUTE; ?><?php echo _ADDDU; ?></strong><?php echo ($date); ?><strong><?php echo _ADDAU; ?></strong><?php echo ($temp); ?><br />
<div style="text-align:center;"><a href="javascript:history.back()"><b><?php echo _BACK; ?></b></a></div>
</div></div>
<?php
}
}
}
} |
Partager