function viewThread($thread_ID) { global $lvlUser, $nuked, $user, $color_content2, $color_content1, $color_top, $color_admin; $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 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 redirect("javascript:history.back()", 5); } else { $messages = recupThreadMessages($thread_ID); ?> <div style="text-align:center;"> <h2><?php echo _SUPPORT; ?> </h2> <a href="index.php?file=Support<?php if ($thread["closed"] == 1) { echo "&op=index&tickets=close"; } ?> ">[ <?php echo _RETURNLISTTICKETS; ?> ]</a> - <a href="index.php?file=Support&op=<?php if ($thread["closed"] == 0) { echo "close"; } else { echo "open"; } ?> &id=<?php echo $thread["id"]; ?> ">[ <?php if ($thread["closed"] == 0) { echo _CLOSE; } else { echo _OPEN; } echo " " . _THISTICKET; ?> ]</a> <h3><?php echo $thread["titre"]; ?> </h3> </div> <div style="width:98%; margin-left:auto; margin-right:auto;"> <?php $counter = 0; while ($m = mysql_fetch_assoc($messages)) { $sql = mysql_query("SELECT avatar FROM " . mysql_real_escape_string($nuked["prefix"]) . "_users WHERE id = '" . mysql_real_escape_string($m["auteur_id"]) . "' LIMIT 0,1"); $user_avatar = mysql_fetch_assoc($sql); if ($m["admin"] == 1) { $m["texte"] = stripslashes($m["texte"]); } ?> <div id="message" style="width:100%; padding:1px; margin-bottom:3px; text-align:left; border:1px solid <?php echo $color_top; ?> ; <?php if ($counter != 0) { ?> border-top:0px; <?php } ?> background : <?php if ($m["admin"] == 1) { echo $color_admin; } else { if ($counter % 2 == 0) { echo $color_content1; } else { echo $color_content2; } } ?> ; "> <div style="float:left; width:45px; height:45px; padding-right:3px; "><img src="<?php echo checkimg($user_avatar["avatar"]); ?> " width="45" height="45" alt="" /></div> <div> <div style="left:4px; background: <?php echo $color_top; ?> "><?php if ($m["admin"] == 0) { echo _YOUWROTE; } else { echo $m["auteur"] . _WROTE; } echo strftime("%x à %H:%M", $m["date"]); ?> </div> <div style="padding-left:4px;"><?php echo $m["texte"]; ?> </div> </div> <div style="clear:both;"></div> </div> <?php $counter++; } ?> </div> <br /> <?php if ($thread["closed"] == 0) { define('EDITOR_CHECK', 1); ?> <form method="post" action="index.php?file=Support&op=reply"> <table style="width:100%;" cellspacing="1" cellpadding="3" border="0"> <tr><td align="center"><h3><b><?php echo _REPLY; ?> </b></h3><input type="text" style="display:none;" name="id" id="id" size="5" value="<?php echo $thread_ID; ?> " /></td></tr> <tr><td><textarea id="e_basic" name="corps" cols="70" rows="12"></textarea></td></tr> <tr><td align="center"><input type="submit" class="bouton" value="<?php echo _SEND; ?> "/></td></tr> </table> </form><?php } } } }
function viewThread($thread_ID) { global $nuked, $language, $color_top, $color_content1, $color_content2, $color_admin; $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 { $messages = recupThreadMessages($thread_ID); ?> <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; ?> /Contact.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"><div style="text-align: center;"><b><a href="index.php?file=Support&page=admin"><?php echo _LISTTICKETS . " " . _OUVERTS; ?> </a> | <a href="index.php?file=Support&page=admin&op=listClose"><?php echo _LISTTICKETS . " " . _FERMES; ?> </a> | <a href="index.php?file=Support&page=admin&op=main_pref"><?php echo _PREFS; ?> </a></b></div><br /> <table style="margin-left: auto;margin-right: auto;text-align: left;" cellspacing="1" cellpadding="0" border="0"> <tr><td align="center"><h4> <?php echo _SUJET . " : " . $thread["titre"]; ?> </h4></td></tr> <?php while ($m = mysql_fetch_assoc($messages)) { $sql = mysql_query("SELECT avatar FROM " . mysql_real_escape_string($nuked["prefix"]) . "_users WHERE id = '" . mysql_real_escape_string($m["auteur_id"]) . "' LIMIT 0,1"); $user_avatar = mysql_fetch_assoc($sql); if ($m["admin"] == 1) { $m["texte"] = stripslashes($m["texte"]); } ?> <tr <?php if ($m["admin"] == 1) { ?> style="background:<?php echo $color_admin; ?> ;"<?php } ?> ><td style="padding:5px;"><div id="message" style="width:100%; text-align:left;"> <div style="float:left; width:45px; height:45px; padding-right:3px; "><img src="<?php echo checkimg($user_avatar["avatar"]); ?> " width="45" height="45" alt="" /></div> <div> <div style="left:4px;"><b><?php if ($m["admin"] != 0) { ?> {admin} <?php } echo $m["auteur"] . _WROTE . strftime("%x à %H:%M", $m["date"]); ?> </b></div> <div style="padding-left:4px;"><?php echo $m["texte"]; ?> </div> </div> <div style="clear:both;"></div> </div></td></tr> <?php } ?> </table> <br /> <?php if ($thread["closed"] == 0) { define('EDITOR_CHECK', 1); ?> <form method="post" action="index.php?file=Support&page=admin&op=reply"> <table style="margin-left: auto;margin-right: auto;text-align: left;" cellspacing="1" cellpadding="3" border="0"> <tr><td align="center"><h3><b><?php echo _REPLY; ?> </b></h3><input type="text" style="display:none;" name="id" id="id" size="5" value="<?php echo $thread_ID; ?> " /></td></tr> <tr><td align="center"><textarea id="art_texte" class="editor" name="corps" cols="60" rows="12"></textarea><br /><input type="submit" class="bouton" value="<?php echo _SEND; ?> "/></td></tr> </table> </form><div style="text-align:center;"><br />[ <a href="index.php?file=Support&page=admin&op=close&id=<?php echo $thread["id"]; ?> "><b><?php echo _CLOSE . " " . _THISTICKET; ?> </b></a> ] - [ <a href="index.php?file=Support&page=admin"><b><?php echo _BACK; ?> </b></a> ]<br /><br /></div><?php } else { ?> <div style="text-align:center;"><br />[ <a href="index.php?file=Support&page=admin&op=open&id=<?php echo $thread["id"]; ?> "><b><?php echo _OPEN . " " . _THISTICKET; ?> </b></a> ] - [ <a href="index.php?file=Support&page=admin"><b><?php echo _BACK; ?> </b></a> ]<br /><br /></div><?php } ?> </div></div> <?php } }