All pastes #762001 Raw Edit

cutenews static bot word protect

public text v1 · immutable
·published 2007-11-05 06:37 UTC
rendered paste body
1. open shows.inc.php in inc folder ... important make back-up first.

find
CODE
$name = trim($name);
$mail = trim($mail);
add one more
CODE
$new = trim($_POST['new']);



find
CODE
       if( strlen($name) > 50 ){
               echo"<div style=\"text-align: center;\">Your name is too long!</div>";
                $CN_HALT = TRUE;
                break 1;
        }

add this
CODE
     if( strlen($new) > 50 ){
               echo"<div style=\"text-align: center;\">Your write too long!</div>";
                $CN_HALT = TRUE;
                break 1;
        }



find
CODE
$comments         = replace_comment("add", $comments);
$name                = replace_comment("add", preg_replace("/\n/", "",$name));
$mail                 = replace_comment("add", preg_replace("/\n/", "",$mail));
add
CODE
$new                = replace_comment("add", preg_replace("/\n/", "",$new));


find
CODE
Password: <input type=\"password\" name=\"password\" />
add under
CODE
<input type=\"hidden\" name=\"new\" value=\"$new\" />


find
CODE
    if($name == " " or $name == ""){
            echo("<div style=\"text-align: center;\">You must enter name.<br />
<a href=\"java script:history.go(-1)\"> go back </a> </div>");
                $CN_HALT = TRUE;
                break 1;
        }
add
CODE
if($new == "Hello" or $new == "hello" ){ $ok = TRUE;}
    else
        { echo("<div style=\"text-align: center;color:white;background-color:darkred;\"> You must type <b>Hello</b>.<br /> <a href=\"java script:history.go(-1)\"> go back </a> </div>");
                $CN_HALT = TRUE;
                break 1;
        }

Please ... before you save show.inc.php , make sure javascript dont have space like this
java script:history.go(-1)

2. Go to the comments form template.
add this piece of code to the form
CODE
<tr>
      <td width="49" height="1">
<font color="red">Say <b>Hello</b></font>:
      </td>
      <td width="289" height="1"><input type="text" name="new" tabindex="1"></td>
    </tr>