uid)) != '1') die("Hacking attempt!"); if(isset($_GET['del'])){ $query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC"; $result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink)); for ($i=0; $row=mysqli_fetch_row($result); $i++) { $updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '0' WHERE id = '".$row[0]."'") or die(mysqli_error($database->dblink)); } } if (@$_POST['submit'] == "Send") { unset ($_SESSION['m_message']); $_SESSION['m_message'] = $_POST['message']; $NextStep = true; } if (@isset($_POST['confirm'])) { if ($_POST['confirm'] == 'No' ) $Interupt = true; if ($_POST['confirm'] == 'Yes'){ if(file_exists("Templates/text.tpl")) { $myFile = "Templates/text.tpl"; $fh = fopen($myFile, 'w') or die("


Can't open file: templates/text.tpl"); $text = file_get_contents("Templates/text_format.tpl"); $text = preg_replace("'%TEKST%'",str_replace('"', '\\"', $_SESSION['m_message']) ,$text); // the following is not really needed and results in fhe file starting with BOM which gets displayed when the message is shown // ... also, this very much depends on the underlying system and utf8_encode() is only good if the system is defaulted to ISO-8859-1 // $text = utf8_encode($text); fwrite($fh, $text); $query="SELECT * FROM ".TB_PREFIX."users ORDER BY id + 0 DESC"; $result=mysqli_query($GLOBALS['link'],$query) or die (mysqli_error($database->dblink)); for ($i=0; $row=mysqli_fetch_row($result); $i++) { $updateattquery = mysqli_query($GLOBALS['link'],"UPDATE ".TB_PREFIX."users SET ok = '1' WHERE id = '".$row[0]."'") or die(mysqli_error($database->dblink)); } $done = true; } else { die("


wrong"); } }} ?> <?php echo SERVER_NAME ?> gpack == null || GP_ENABLE == false) { echo " "; } else { echo " "; } ?> gpack == null || GP_ENABLE == false) { echo " "; } else { echo " "; } ?>