friends, pls tell me.. what should i edit the value to stop users to edit n delet their topics. .. its easy but jst nt getting the right place to edit.. chk this pls..
//////////////////////////////////////////Post Options
else if($action=="pstopt")
{
$pid = $_GET["pid"];
$page = $_GET["page"];
$fid = $_GET["fid"];
addonline(getuid_sid($sid),"Post Options - xHTML","");
$pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM ibwf_posts WHERE id='".$pid."'"));
$trid = $pinfo[0];
$tid = $pinfo[1];
$ptext = htmlspecialchars($pinfo[2]);
$pstyle = gettheme($sid);
echo xhtmlhead("Post Options",$pstyle);
echo popup($sid);
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"ptext\" value=\"$ptext\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<b>Post Options</b>";
echo "</p>";
echo "<p>";
$trnick = getnick_uid($trid);
echo ";<a href=\"121inbox121.php?action=sendpm&sid=$sid& amp;who=$trid\">»Send PM to $trnick</a><br/>";
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$trid\">»View $trnick's Profile</a><br/>";
echo "<a href=\"index.php?action=post&sid=$sid&tid= $tid&qut=$pid\">»Quote</a><br/>";
echo "<a href=\"121genproc121.php?action=rpost&sid=$sid &pid=$pid\">»Report</a><br/>";
echo "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$tid&page=$page\">«Back to topic</a><br/><br/>";
if(ismod(getuid_sid($sid)))
{
echo "<form method=\"post\" action=\"121mprocpl121.php?action=edtpst&sid=$ sid&pid=$pid\">";
echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
echo "<br/><a href=\"121mprocpl121.php?action=delp&sid=$sid& amp;pid=$pid\">»DELETE</a><br/>";
}
else if($pinfo[0]==getuid_sid($sid))
{
echo "<form method=\"post\" action=\"121usertpc121.php?action=edtpst&sid=$ sid&pid=$pid\">";
echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
}
echo "</p>";
echo "<p align=\"center\">";
$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
}
else if($action=="tpcopt")
{
$tid = $_GET["tid"];
addonline(getuid_sid($sid),"Topic Options - xHTML","");
$tinfo= mysql_fetch_array(mysql_query("SELECT name,fid, authorid, text, pinned, closed FROM ibwf_topics WHERE id='".$tid."'"));
$trid = $tinfo[2];
$ttext = htmlspecialchars($tinfo[3]);
$tname = htmlspecialchars($tinfo[0]);
$pstyle = gettheme($sid);
echo xhtmlhead("Topic Options",$pstyle);
echo popup($sid);
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"ttext\" value=\"$ttext\"/>
<setvar name=\"tname\" value=\"$tname\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<b>Topic Options</b>";
echo "</p>";
echo "<p>";
echo "Topic ID: <b>$tid</b><br/>";
$trnick = getnick_uid($trid);
echo "<a href=\"121genproc121.php?action=bkmrk&sid=$sid &tid=$tid\">Bookmark This Topic</a><br/>";
echo "<a href=\"121inbox121.php?action=sendpm&sid=$sid& amp;who=$trid\">»Send PM to $trnick</a><br/>";
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$trid\">»View $trnick's Profile</a><br/>";
echo "<a href=\"index.php?action=post&sid=$sid&tid= $tid&qut=$pid\">»Quote</a><br/>";
$plid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'"));
if($plid[0]==0)
{
if(ismod($uid))
{
echo "<a href=\"index.php?action=pltpc&sid=$sid&tid =$tid\">»Add Poll</a><br/>";
}
}else{
if(ismod($uid))
{
echo "<a href=\"121genproc121.php?action=dltpl&sid=$sid &tid=$tid\">»Delete Poll</a><br/>";
}
}
echo "<a href=\"121genproc121.php?action=rtpc&sid=$sid& amp;tid=$tid\">»Report</a><br/>";
echo "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$tid&page=1\">«Back to topic</a><br/>";
if(ismod(getuid_sid($sid)))
{
echo "<form method=\"post\" action=\"121mprocpl121.php?action=rentpc&sid=$ sid&tid=$tid\">";
echo "<br/>Title: <input name=\"tname\" value=\"$tname\" maxlength=\"25\"/>";
echo "<br/><input type=\"submit\" name=\"Submit\" value=\"Rename\"/><br/>";
echo "</form>";
echo "<form method=\"post\" action=\"121mprocpl121.php?action=edttpc&sid=$ sid&tid=$tid\">";
echo "<br/>Text: <input name=\"ttext\" value=\"$ttext\" maxlength=\"500\"/> ";
echo "<br/><input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
if($trid ==$uid){
echo "<form action=\"121genproc121.php?action=edtpst&sid=$ sid&pid=$pid\" method=\"post\">";
echo "User Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
}
echo "<a href=\"121mprocpl121.php?action=delt&sid=$sid& amp;tid=$tid\">»DELETE</a><br/>";
echo "<br/>";
if($tinfo[5]=='1')
{
$ctxt = "Open";
$cact = "0";
}else{
$ctxt = "Close";
$cact = "1";
}
echo "<a href=\"121mprocpl121.php?action=clot&sid=$sid& amp;tid=$tid&tdo=$cact\">»$ctxt</a><br/>";
if($tinfo[4]=='1')
{
$ptxt = "Unpin";
$pact = "0";
}else{
$ptxt = "Pin";
$pact = "1";
}
//////////////////////////////////////////Post Options
else if($action=="pstopt")
{
$pid = $_GET["pid"];
$page = $_GET["page"];
$fid = $_GET["fid"];
addonline(getuid_sid($sid),"Post Options - xHTML","");
$pinfo= mysql_fetch_array(mysql_query("SELECT uid,tid, text FROM ibwf_posts WHERE id='".$pid."'"));
$trid = $pinfo[0];
$tid = $pinfo[1];
$ptext = htmlspecialchars($pinfo[2]);
$pstyle = gettheme($sid);
echo xhtmlhead("Post Options",$pstyle);
echo popup($sid);
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"ptext\" value=\"$ptext\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<b>Post Options</b>";
echo "</p>";
echo "<p>";
$trnick = getnick_uid($trid);
echo ";<a href=\"121inbox121.php?action=sendpm&sid=$sid& amp;who=$trid\">»Send PM to $trnick</a><br/>";
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$trid\">»View $trnick's Profile</a><br/>";
echo "<a href=\"index.php?action=post&sid=$sid&tid= $tid&qut=$pid\">»Quote</a><br/>";
echo "<a href=\"121genproc121.php?action=rpost&sid=$sid &pid=$pid\">»Report</a><br/>";
echo "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$tid&page=$page\">«Back to topic</a><br/><br/>";
if(ismod(getuid_sid($sid)))
{
echo "<form method=\"post\" action=\"121mprocpl121.php?action=edtpst&sid=$ sid&pid=$pid\">";
echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
echo "<br/><a href=\"121mprocpl121.php?action=delp&sid=$sid& amp;pid=$pid\">»DELETE</a><br/>";
}
else if($pinfo[0]==getuid_sid($sid))
{
echo "<form method=\"post\" action=\"121usertpc121.php?action=edtpst&sid=$ sid&pid=$pid\">";
echo "Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
}
echo "</p>";
echo "<p align=\"center\">";
$thid = mysql_fetch_array(mysql_query("SELECT themeid FROM ibwf_users WHERE id='".$uid."'"));
$themeimageset = mysql_fetch_array(mysql_query("SELECT themedir FROM ibwf_iconset WHERE id='".$thid[0]."'"));
echo "<a href=\"index.php?action=main&sid=$sid\"><img src=\"images/themes/$themeimageset[0]/home.gif\" alt=\"*\"/>";
echo "Home</a>";
echo "</p>";
echo xhtmlfoot();
}
else if($action=="tpcopt")
{
$tid = $_GET["tid"];
addonline(getuid_sid($sid),"Topic Options - xHTML","");
$tinfo= mysql_fetch_array(mysql_query("SELECT name,fid, authorid, text, pinned, closed FROM ibwf_topics WHERE id='".$tid."'"));
$trid = $tinfo[2];
$ttext = htmlspecialchars($tinfo[3]);
$tname = htmlspecialchars($tinfo[0]);
$pstyle = gettheme($sid);
echo xhtmlhead("Topic Options",$pstyle);
echo popup($sid);
echo "<onevent type=\"onenterforward\">";
echo "<refresh>
<setvar name=\"ttext\" value=\"$ttext\"/>
<setvar name=\"tname\" value=\"$tname\"/>";
echo "</refresh></onevent>";
echo "<p align=\"center\">";
echo "<b>Topic Options</b>";
echo "</p>";
echo "<p>";
echo "Topic ID: <b>$tid</b><br/>";
$trnick = getnick_uid($trid);
echo "<a href=\"121genproc121.php?action=bkmrk&sid=$sid &tid=$tid\">Bookmark This Topic</a><br/>";
echo "<a href=\"121inbox121.php?action=sendpm&sid=$sid& amp;who=$trid\">»Send PM to $trnick</a><br/>";
echo "<a href=\"index.php?action=viewuser&sid=$sid& who=$trid\">»View $trnick's Profile</a><br/>";
echo "<a href=\"index.php?action=post&sid=$sid&tid= $tid&qut=$pid\">»Quote</a><br/>";
$plid = mysql_fetch_array(mysql_query("SELECT pollid FROM ibwf_topics WHERE id='".$tid."'"));
if($plid[0]==0)
{
if(ismod($uid))
{
echo "<a href=\"index.php?action=pltpc&sid=$sid&tid =$tid\">»Add Poll</a><br/>";
}
}else{
if(ismod($uid))
{
echo "<a href=\"121genproc121.php?action=dltpl&sid=$sid &tid=$tid\">»Delete Poll</a><br/>";
}
}
echo "<a href=\"121genproc121.php?action=rtpc&sid=$sid& amp;tid=$tid\">»Report</a><br/>";
echo "<a href=\"index.php?action=viewtpc&sid=$sid&t id=$tid&page=1\">«Back to topic</a><br/>";
if(ismod(getuid_sid($sid)))
{
echo "<form method=\"post\" action=\"121mprocpl121.php?action=rentpc&sid=$ sid&tid=$tid\">";
echo "<br/>Title: <input name=\"tname\" value=\"$tname\" maxlength=\"25\"/>";
echo "<br/><input type=\"submit\" name=\"Submit\" value=\"Rename\"/><br/>";
echo "</form>";
echo "<form method=\"post\" action=\"121mprocpl121.php?action=edttpc&sid=$ sid&tid=$tid\">";
echo "<br/>Text: <input name=\"ttext\" value=\"$ttext\" maxlength=\"500\"/> ";
echo "<br/><input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
if($trid ==$uid){
echo "<form action=\"121genproc121.php?action=edtpst&sid=$ sid&pid=$pid\" method=\"post\">";
echo "User Text: <input name=\"ptext\" value=\"$ptext\" maxlength=\"500\"/> ";
echo "<input type=\"submit\" name=\"Submit\" value=\"Edit\"/><br/>";
echo "</form>";
}
echo "<a href=\"121mprocpl121.php?action=delt&sid=$sid& amp;tid=$tid\">»DELETE</a><br/>";
echo "<br/>";
if($tinfo[5]=='1')
{
$ctxt = "Open";
$cact = "0";
}else{
$ctxt = "Close";
$cact = "1";
}
echo "<a href=\"121mprocpl121.php?action=clot&sid=$sid& amp;tid=$tid&tdo=$cact\">»$ctxt</a><br/>";
if($tinfo[4]=='1')
{
$ptxt = "Unpin";
$pact = "0";
}else{
$ptxt = "Pin";
$pact = "1";
}
Comment