Untitled
unknown
php
2 years ago
2.2 kB
6
Indexable
<?php // mysql hata gizleme error_reporting(0); temp_check(); zombie_check(); dead_check(); spam_check(); $q=$db->query("SELECT forum_id,title,locked FROM atc_topics WHERE topic_id='$t'"); list ($forum_id,$forum_title,$locked)=$db->fetch($q); if ((!$db->rows($q)) OR (($atc_level<6) AND ($forum_id==99))) alert("belirtilen baþlýk bulunamadý"); if (($locked==1) and ($atc_level<7)) { alert("bu baþlýk kilitlendi"); } $message = $_POST["message"]?$_POST["message"]:$message; $message = trim($message); if (isset($send)) { if (!is_numeric($t)) { alert("baþlýk numarasý belirtilmemiþ"); } if (strlen($message)<2){ alert("mesaj alaný en az 2 karakter olmalýdýr"); } if ((strlen($message)>3000) and ($atc_level<7)) { alert("mesaj alaný en fazla 3000 karakter olmalýdýr"); } else { if (($last_post>(time()-2)) and ($atc_level<7)) {alert("çok hýzlýsýn yavaþla biraz"); } else { $q=$db->query("SELECT forum_id FROM atc_topics WHERE topic_id='$t'"); list($forum_id)=$db->fetch($q); $time=time(); $q=$db->query("INSERT INTO atc_posts SET topic_id='$t',author='$atc_id',msg='".$message."',date='$time',ip='".IP()."'"); if (!$q) { alert("hata oluþtu"); } else { $db->query("UPDATE atc_topics SET replies=replies+1,last_post_by='$atc_id',last_post_date='$time' WHERE topic_id='$t'"); if ($forum_id!=99) { $total_posts++; $db->query("UPDATE atc_users SET total_posts='$total_posts',last_post='$time' WHERE id='$atc_id'"); } redirect("topic.php?$t"); } } } } $forum_name=forum_name($forum_id); $message=stripslashes($message); $title="$forum_title > cevap yaz"; $page_title="<a href=topic.php?$t>$forum_title</a> > cevap yaz"; $index.="<div class='box box-color'> <form action=topic.php method=post name=post> <input name=a type=hidden value=reply> <input name=t type=hidden value=$topic_id> <input name=send type=hidden> <div class='input-group'> <textarea id='message' name='message' style='height:100px' type='text' class='form-control' rows='5'>".$message."</textarea> <span class='input-group-btn'> <button accesskey='s' class='btn btn-default topic-send-button' style='height:100px' type='submit' value='gönder'>gönder</button> </span> </div> </form> </div>"; make_template(); ?>
Editor is loading...