Bump In The Night

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Bump In The Night

    Im bored so heres something you may want....
    wml admnproc
    Code:
    //////////////////////////////////////////bump
    else if($action=="bump")
    {
      $tid = $_GET["tid"];
      $fid = getfid($tid);
      $fname = getfname($fid);
      $crdate = time(); 
      addonline(getuid_sid($sid),"admin cp","");
      echo "<card id=\"main\" title=\"$sitename\">";
      echo "<p align=\"center\">";
    
        $res = mysql_query("UPDATE ibwf_topics SET lastpost=&#39;".$crdate."&#39; WHERE id=&#39;".$tid."&#39;");
        if($res)
            {
              echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Topic Bumped Successfully
    ";
            }else{
              echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
    ";
            }
     
       echo "
    
    <a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;go=last\">View Topic</a>";
       echo "
    
    <a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a>
    ";
       echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a>";
       echo "</p></card>";
    }
    xhtml admnproc
    Code:
    //////////////////////////////////////////bump
    else if($action=="bump")
    {
      $tid = $_GET["tid"];
      $fid = getfid($tid);
      $fname = getfname($fid);
      $crdate = time(); 
      addonline(getuid_sid($sid),"admin cp","");
      echo "<head>";
      echo "<title>$sitename</title>";
      echo "</head>";
      echo "<body>"; 
      echo "<div>
    Bump Topic
    </div>"; 
      echo "<p align=\"center\">";
    
        $res = mysql_query("UPDATE ibwf_topics SET lastpost=&#39;".$crdate."&#39; WHERE id=&#39;".$tid."&#39;");
        if($res)
            {
              echo "<img src=\"../images/ok.gif\" alt=\"o\"/>Topic Bumped Successfully
    ";
            }else{
              echo "<img src=\"../images/notok.gif\" alt=\"x\"/>Database Error!
    ";
            }
     
       echo "
    
    <a href=\"index.php?action=viewtpc&amp;sid=$sid&amp;tid=$tid&amp;go=last\">View Topic</a>";
       echo "
    
    <a href=\"index.php?action=viewfrm&amp;sid=$sid&amp;fid=$fid\">$fname</a>
    ";
       echo "<a href=\"index.php?action=main&amp;sid=$sid\"><img src=\"../images/home.gif\" alt=\"*\"/>Home</a>";
       echo "</p>";
       echo "</body>";
       exit();
    }
    (topic options) usage:
    Code:
    if (isadmin(getuid_sid($sid))){
    echo "<a href=\"admproc.php?action=bump&amp;sid=$sid&amp;tid=$tid\">Bump Topic</a>
    ";
    }
    :P

    #2
    in the admnproc scripts change
    Code:
    else if($action=="bump")
    to
    Code:
    else if($action=="bump" && isadmin(getuid_sid($sid)))
    since this is now publicly available code its not hard for someone to craft the URL required to bump topics

    Comment

    Working...
    X