hi... help me to my code! if one of my member reply my topic the system is automaticaly pm me that this member is reply to my topic.. this is my code...
else if($do=="post") { echo "<head>"; echo "<title>Discussions-Post Reply</title>"; echo "<link rel="stylesheet" type="text/css" href="$gsmstyle[0]"/>"; echo "</head>"; $tid = safe(cleanInput($_POST["tid"])); $tfid = mysql_fetch_array(mysql_query("SELECT fid FROM yeh_topics WHERE id='".$tid."'")); if(!canaccess(getuid_sid($sid), $tfid[0])) { echo "Error.! "; echo "You Don't Have A Permission To View The Contents Of This Forum
"; echo "<a href="index.php?do=forums&sid=$sid">Forums</a> <a href="index.php?do=chat&sid=$sid">Chatrooms</a> <a href="index.php?do=main&sid=$sid">Home</a>"; echo "$mysite"; echo " Page Took "; $load = microtime(); print (number_format($load,2)); echo " Seconds"; echo ""; echo "</body></html>"; exit(); } if(chatpost(getuid_sid($sid))<200) {
echo "Posting Reply
"; echo "You Need 200 Chat Points Before You Can Post. "; echo "Go To Our Chatrooms And Start Posting Chat Messages To Earn Chat Points. "; echo " <a href="index.php?do=viewtpc&sid=$sid&tid=$tid">Back</a> <a href="index.php?do=forums&sid=$sid">Forums</a> <a href="index.php?do=chat&sid=$sid">Chatrooms</a> <a href="index.php?do=main&sid=$sid">Home</a>"; echo "$mysite"; echo " Page Took "; $load = microtime(); print (number_format($load,2)); echo " Seconds"; echo ""; echo "</body>"; echo "</html>"; exit(); } $reptxt = safe($_POST["reptxt"]); $qut = safe(cleanInput($_POST["qut"])); if(strlen($reptxt)<20) { echo "Error.! "; echo "Topic Reply Cant Be Posted Message Is Too Short, It Must Contain 20 Characters Above. Please <a href="index.php?do=viewtpc&sid=$sid&tid=$tid">Go Back</a> And Fix It..
"; echo "<a href="index.php?do=forums&sid=$sid">Forums</a> <a href="index.php?do=chat&sid=$sid">Chatrooms</a> <a href="index.php?do=main&sid=$sid">Home</a>"; echo "$mysite"; echo " Page Took "; $load = microtime(); print (number_format($load,2)); echo " Seconds"; echo ""; echo "</body></html>"; exit(); }
addonline(getuid_sid($sid),"Posting Topic Reply","index.php?do=viewtpc&tid=$tid"); echo "Posting Reply "; $crdate = time(); $fid = getfid($tid); //$uid = getuid_sid($sid); $res = false; $closed = mysql_fetch_array(mysql_query("SELECT closed FROM yeh_topics WHERE id='".$tid."'"));
if(($closed[0]!='1')||(ismod($uid)))
{
$lpost = mysql_fetch_array(mysql_query("SELECT dtpost FROM yeh_posts WHERE uid='".$uid."' ORDER BY dtpost DESC LIMIT 1"));
global $post_af;
$antiflood = time()-$lpost[0];
if($antiflood>$post_af)
{ if(trim($reptxt)!="") { $res = mysql_query("INSERT INTO yeh_posts SET text='".$reptxt."', tid='".$tid."', uid='".$uid."', dtpost='".$crdate."', quote='".$qut."'"); }
if($res) { $usts = mysql_fetch_array(mysql_query("SELECT posts, pera1 FROM yeh_users WHERE id='".$uid."'")); $res2 = mysql_fetch_array(mysql_query("SELECT name, authorid FROM yeh_topics WHERE id='".$tid."'")); $ups = $usts[0]+1; $upl = $usts[1]+1; mysql_query("UPDATE yeh_users SET posts='".$ups."', pera1='".$upl."' WHERE id='".$uid."'"); mysql_query("UPDATE yeh_topics SET lastpost='".$crdate."' WHERE id='".$tid."'");
echo "Message Posted Successfully"; echo "
<a href="index.php?do=viewtpc&sid=$sid&tid=$tid&go=last">"; echo "View Topic</a>";
}else{ echo "Error Posting Message"; } }else{ $af = $post_af -$antiflood; echo "Antiflood Control: $af"; } }else{ echo "Topic Is Closed For Posting"; }
$fname = getfname($fid);
echo "
<a href="index.php?do=viewfrm&sid=$sid&fid=$fid">"; echo "$fname</a> "; echo "<a href="index.php?do=forums&sid=$sid">Forums</a> <a href="index.php?do=chat&sid=$sid">Chatrooms</a> <a href="index.php?do=main&sid=$sid">"; echo "Home</a>"; echo "$mysite"; echo " Page Took "; $load = microtime(); print (number_format($load,2)); echo " Seconds"; echo ""; echo "</body>";
}
