function reply($thread_ID, $corps, $new = 0) { global $lvlUser, $nuked, $user; $thread = recupThread($thread_ID); if (empty($thread["id"])) { ?> <div style="text-align:center;"><h2><?php echo _TICKETDONTEXIST; ?> </h2> <br /><br /><a href="javascript:history.back()"><b>[ <?php echo _BACK; ?> ]</b></a><br /></div><?php $new = 0; redirect("javascript:history.back()", 5); } else { if ($lvlUser == 0 || $thread["auteur_id"] != $user[0]) { ?> <div style="text-align:center;"><h2><?php echo _PASPROPRIOTICKET; ?> </h2> <br /><br /><a href="javascript:history.back()"><b>[ <?php echo _BACK; ?> ]</b></a><br /></div><?php $new = 0; redirect("javascript:history.back()", 5); } else { if (empty($corps)) { ?> <div style="text-align:center;"><h2><?php echo _UNKSUJETCORPS; ?> </h2> <br /><br /><a href="javascript:history.back()"><b>[ <?php echo _BACK; ?> ]</b></a><br /></div><?php $new = 0; redirect("javascript:history.back()", 5); } else { $requete = "INSERT INTO " . mysql_real_escape_string($nuked["prefix"]) . "_support_messages (texte, date, auteur, auteur_id, auteur_ip, thread_id, admin) VALUES ('" . mysql_real_escape_string(secu_html(html_entity_decode($corps, ENT_QUOTES))) . "', '" . time() . "', '" . mysql_real_escape_string(secu_html(html_entity_decode($user[2], ENT_QUOTES))) . "', '" . mysql_real_escape_string($user[0]) . "', '" . mysql_real_escape_string($user[3]) . "', '" . mysql_real_escape_string($thread_ID) . "', '0')"; $sql2 = mysql_query($requete); if (!$sql2) { ?> <div style="text-align:center;"><h2><?php echo _ERREUR . " " . mysql_error($sql2); ?> </h2></div><?php } else { if ($new == 0) { ?> <div style="text-align:center;"> <h2><?php echo _SUPPORT; ?> </h2> <h3><?php echo $thread["titre"]; ?> </h3> <br /><br /> <?php echo _REPLYSUCCESS; ?> <br /><br /><a href="javascript:history.back()"><b>[ <?php echo _BACK; ?> ]</b></a><br /> </div> <?php redirect("javascript:history.back()", 2); } } } } } }
function open($thread_ID) { global $nuked, $language, $user; ?> <div class="content-box"> <div class="content-box-header"><h3><?php echo _ADMINSUPPORT; ?> </h3> <div style="text-align:right;"><a href="help/<?php echo $language; ?> /Support.php" rel="modal"> <img style="border: 0;" src="help/help.gif" alt="" title="<?php echo _HELP; ?> " /></a> </div></div> <div class="tab-content" id="tab2"><?php $thread = recupThread($thread_ID); if (empty($thread["id"])) { echo "<div class=\"notification error png_bg\">\n" . "<div>\n" . "" . _TICKETDONTEXIST . "\n" . "</div>\n" . "</div>\n"; redirect("javascript:history.back()", 5); } else { $sql = mysql_query("UPDATE " . mysql_real_escape_string($nuked["prefix"]) . "_support_threads SET `closed` = '0' WHERE id = '" . mysql_real_escape_string($thread_ID) . "' "); if (!$sql) { ?> <div style="text-align:center;"><h2><?php echo _ERREUR; ?> </h2></div><?php redirect("javascript:history.back()", 5); } else { if ($new == 0) { ?> <div class="notification success png_bg"> <div> <?php echo _OPENSUCCESS; ?> </div> </div> <?php redirect("javascript:history.back()", 2); ?> </div></div> <?php } } } }