Jump to content

CBaZ

Members
  • Posts

    128
  • Joined

  • Last visited

Everything posted by CBaZ

  1. it's not writing to any files atm .. this is the form <?php // [ READ & OUTPUT FILE CONTENTS ] ?> <!-- The Form & Table --> <form name="frmls" method="POST" action="<?php $PHP_SELF ?>" style="margin:0;"> <input type="hidden" name="action" value="delete"> <table width="780" height="0" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <tr> <td align="center" width="1%" class="rowA"><input name="chkAll" type="checkbox" id="ids[]" value="1" onClick="CheckAll();" title="Select All"></td> <td align="center" width="5%" class="rowA"><strong>IP</strong></td> <td align="center" width="5%" class="rowA"><strong>Date/Time</strong></td> <td align="center" width="5%" class="rowA"><strong>Browser</strong></td> <td align="center" width="5%" class="rowA"><strong>Hostname</strong</td> </tr> <?php $file_contents = file("banip.txt"); // the file foreach($file_contents as $key=>$value){ // assign a key to each line in the file list($entry[0],$entry[1],$entry[2],$entry[3]) = split('[,|]',$value); $entries[]=array('key'=>$key, 'ip'=>$entry[0], 'date'=>$entry[1], 'hostname'=>$entry[2], 'browser'=>$entry[3]); print "<table width=\"780\" height=\"0\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" class=\"tablehead\"> <tr> <td align=\"center\" width=\"1%\" class=\"rowB\"><input name=\"todelete[$key]\" type=\"checkbox\" id=\"ids[]\" value=\"$value\" onClick=\"this.form.chkAll.checked=false; \"></td> <td align=\"left\" width=\"5%\" class=\"rowB\"><strong>".$entry[0]."</strong></td> <td align=\"left\" width=\"5%\" class=\"rowB\"><strong>".$entry[1]."</strong></td> <td align=\"left\" width=\"5%\" class=\"rowB\"><strong>".$entry[2]."</strong></td> <td align=\"left\" width=\"5%\" class=\"rowB\"><strong>".$entry[3]."</strong></td> </tr>\n"; } ?> <tr> <td colspan="8" align="center" class=\"rowB\"><input type="submit" onClick="CheckIfChecked();" value="Remove IP"></td> </tr> </table> </form> </td> </table>
  2. it writes the line or lines to be deleted correctly into issues_deleted.txt which is line fwrite($file_contents_deleted, $value); and when it refreshes the line still exists in banip.txt it does echo out the line as well just doesnt remove it from banip.txt anyone know why? <?php $file_contents = fopen("banip.txt", "r+"); // the file $file_contents_deleted = fopen("issues_deleted.txt", "r+"); // the file // [ DELETE ROUTINE ] if($_POST['action'] == "delete"){ // delete triggered $arrToDelete = $_POST['todelete']; // assign checked items array to var if($arrToDelete != "") { // if the array isnt open proceed foreach($arrToDelete as $key => $value) { // assign a key and value to //each checked item #$file_contents_deleted[count($file_contents_deleted)] = $file_contents[$key]; $file_contents_deleted[] = $file_contents[$key]; array_splice($file_contents, $key, 1, "");// assign null value to each print("Deleted ".$value.""); fwrite($file_contents_deleted, $value); for($i = 0; $i < count($file_contents); $i++) { // loop through the new if ($x == "file_contents_deleted") //or whatever, it's your comparison to see if this is a line to keep { $cow .= $x . "\n"; } fwrite($file_contents,$cow); } } } } ?>
  3. i think this script is not even being checked for in my current form i type in a word everything till gets posted.
  4. how could i make it multiple words? one word just like you say isn't really going to help me and the space thing is another issue
  5. the $blockwords are like so $blockwords=array('word','word'); function has_bad_words($quote) { global $blockwords; $split = preg_split("#\s+#", $post, -1, PREG_SPLIT_NO_EMPTY); if (is_array($split)) { foreach ($split as $quote_word) { if (in_array($quote_word, $blockwords)) { return true; } } } return false; } if (has_bad_words($quote_word)) { echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $quote_word <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; }
  6. Snippet: This does not get displayed in the form at all. This is the image verification. In order for me to troubleshoot any further with this I need to get this image verification back and I am lost why its not appearing have tried moving things around does not solve it then I get nothing to show up. I am hoping someone has the answer ... <?php include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } } } ?> Full: <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?php include("banip/ban.php"); ?> <html><head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var StayAlive = 60; // Number of seconds to keep window open function KillMe(){ setTimeout("self.close()",StayAlive * 1000); } </SCRIPT> <title>Feedback Form!</title> <script language = "Javascript"> function taLimit() { var taObj=event.srcElement; if (taObj.value.length==taObj.maxLength*1) return false; } function taCount(visCnt) { var taObj=event.srcElement; if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; } </script> <script language="Javascript1.2"> // (C) 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body onload="KillMe();self.focus()" onunload="top.opener.window.location.href='MaloriaN2.php'" background="background/tan-paisley3.jpg"> <center><form name="counter"><input type="text" size="1" name="d2" border="0"></form></center> <script> <!-- // var milisec=0 var seconds=62 document.counter.d2.value='62' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"></h1></td> </tr> <tr> <td valign="top" style="padding: 5em" class="maincontent" height="480"> <?php if (isset($_POST['quote'])) { // This strips the whitespace from either end of each attribute, removes all html and slashes. // (Slashes that were put in by php automaticly) $quote = trim(strip_tags(stripslashes($_POST['quote']))); $name = trim(strip_tags(stripslashes($_POST['name']))); $pass = trim(strip_tags(stripslashes($_POST['pass']))); $spammer_ip = $_SERVER['REMOTE_ADDR']; list($a, $b, $c, $d) = split('.', $spammer_ip); if( gethostbyname("$d.$c.$b.$a.list.dsbl.org") != "$d.$c.$b.$a.list.dsbl.org") { header( "Location: http://dsbl.org/listing?".$spammer_ip); return false; } // If the quote is longer than 300 characters it is striped and a '...' added to the end. // (A client side check is also performed in the form using the 'maxlength="300"' attribute in the form. if (strlen($quote) >= 300) { $quote = substr($quote, 0, 300); $quote = $quote."..."; } // Same thing for the name but with length of 100 characters. if (strlen($name) >= 100) { $name = substr($name, 0, 100); $name = $name."..."; } if (strlen($name) <= 0) { $name = "Anonymous"; } if (strlen($pass) <= 1) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name </strong>Left<strong> Security</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Correction.</center></p>"; exit; } if (strlen($quote) <= 0) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name, </strong>Left<strong> Quote</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Corrections.</center></p>"; exit; } $blockwords=array('photos of singles','meet single people', 'casino', 'find other singles', 'get a DATE', 'Someone Wants to MEET You', 'find other singles', 'Lonely?', 'Dating Tips', 'viagra', 'Viagr@', 'Vi@gra', 'Valium', 'Vinarol', 'Vali~um', 'viagra', 'via-gra', 'viagara', 'v1agara', 'v1agra', 'VIAGRA', 'V.I.A.G.R.A', 'Virility', 'Anti-depressants', 'antidepressant', 'Botox', 'Levitra', 'Lev1tra', 'Lev1tr@', 'Phentermine', 'phentermine', 'phendimetrazine', 'paxil', 'prescriiption', 'propecia', 'prozac', 'Prescription', 'Prescriptions', 'Phermone', 'Pheremone', 'Pheromone', 'pharmacy', 'G=e-n-e-r-i-c', 'Online Pharmacy', 'Medical breakthrough', 'Xanax', 'xanax', 'xenical', 'Better Health', 'DIET', 'D1ET', 'diet', 'Dental Coverage', 'Instant Dental', 'flush fat', 'fat burner', 'fat burning', 'fat-burning', 's.a.f.e', 's a f e', 'surgical', 'lose 10lbs', 'lose 20lbs', 'lose 30lbs', 'lose 40lbs', 'Lose weight', 'Lose the weight', 'lose fat', 'Miracleburn', 'weightloss', 'weight loss', 'we1ght l0ss', 'we1ght', 'w.e.i.g.h.t', 'weight watchers', 'penis', 'PENIS', 'P E N I S', 'p-e-n-i-s', 'pen1s', 'enlarge', 'enlarging your cock', 'enlarge your cock', 'erection', 'manhood', 'supersize', 'add inches', 'add 2 inches', 'add 3 inches', 'add 4 inches', 'add 5 inches', 'add solid inches', '1/2 Price', 'ADV:', '[ADV]', '(ADV)', '{ADV}', 'Absolutely legal', 'Affordable', 'Aprroved', 'Auto Loan', 'Auto Loans', 'Bargain', 'Bingo', 'casino', 'consolidate', 'complimentary', 'credit check', 'credit repair', 'Credit', 'congratulations', 'clear your credit', 'Debt Consolidation', 'debt', 'Debt', 'D-E-B-T', 'Dollar', 'earn cash', 'earn money', 'Easily get a home loan', 'Eliminate Debt', 'extra income', 'fire your boss', 'f-r-e-e', 'F-R-E-E', 'F_R E_E', 'F_R_E_E', 'F.R.E.E', 'F*R*E*E', 'FREEApplication', 'FREEBestseller', 'FREEBlockbuster', 'FREE adult', 'FREE credit', 'Free shipping', 'FREE money', 'free money!', 'Financial freedom', 'free vacation', 'free membership', 'freegift', 'Gift', 'Givaway', 'Giveaway', 'Get a FREE', 'Government auctions', 'GOVT', 'Guaranteed Approval Free', 'how much you can save', 'Home Loans', 'Homeowner', 'Homeowners', 'HGH', 'h g h', 'Increase your salary', 'Investor Insights', 'It Really works!', 'LIFETIME MEMBERSHIP TO THE', 'loan payments', 'Loan Quote', 'LOAN', 'L0AN', 'LOWEST RATES', 'L0WEST RATES', 'LowRateSource', 'make money', 'make cash', 'MAKE MONEY FAST', 'MILLIONAIRE', 'No gimmicks', 'No obligation', 'NOW FREE TRIAL', 'no risk', 'Offer', 'offer', 'Partnership Required!', 'Pay Less', 'Payday', 'payroll', 'perfectly legal', 'Prize', 'risk free', 'Real Estate', 'Reduce Rates', 'REAL MONEY', 'Refinance', 'ReFi', 'savers', 'Salary', 'Save Money', 'SLASH YOUR EXPENSES', 'Student Loan', 'Student Loans', 'This really works', 'unclaimed', 'unsecured credit card', 'unlimited', 'unique gift', 'Virtual Deals', 'visa approval', 'win money', 'win cash', 'WHOLESALE', 'Won', 'Your free daily', '18 YR', 'ADLT:', 'anal', 'adult site', 'adult video', 'barely legal', 'cumshot', 'exploited teens', 'illegal', 'fisting', 'free xxx', 'GRANNY', 'GUARANTEE', 'HARDCORE', 'TEEN', 'TEENS', 'PRETEEN', 'PRETEENS', 'nude celeb', 'Want free porn in your mail?', 'whore', 'XXX Picture For You!', '1NK', 'Brand Ink', 'inkjet cartridges', 'ink cartridges', 'printer cartridges', 'printer ink', 'toner cartridges', 'Toner cartridge', 'inkjets', 'ink sale', 'inkjet', 'ink order', 'ink supplies', 'laser toner', 'printer supplies', 'printpa', 'printpal', 'InkjetCartridges', 'LaserToners', 'Wholesaleink', '$', 'GreatMailRewards', 'GreatAmericanDeals', 'michael.hughes11', 'Michael.hughes', '......', '!!!', '>>>>>>', '**NEW', 'bulk mail', 'bulkmail', 'Copy DVDs', 'COPY ANY DVD', 'Congratulations!You+', 'Descrambler', 'DVD', 'Direct Marketing Tools', 'Fed Up With Annoying', 'Get Promoted', 'HARRY POTTER', 'harry potter', 'I thought you might be interested in this!', 'joke-of-the-day', 'livecam', 'Partnership Required!!!', 'patch from Microsoft', 'Microsoft Security Update', 'Microsoft Update', 'Microsoft news', 'Napster', 'Norton Systemworks', 'Newgrounds', 'PPV', 'RealOne', 'screensaver', 'Security Update by', 'Smallest Digital Camera', 'TheDailySamples', 'Toon Doctor', 'This stuff works', 'Tune up your PC', 'Ultimate Breakthrough', 'update from Microsoft', 'Upgrade Your Career', 'Dating Tips', 'http://',); $quote = 'my motherfucker dog keeps barking'; function has_bad_words($quote) { global $blockwords; $split = preg_split("#\s+#", $post, -1, PREG_SPLIT_NO_EMPTY); if (is_array($split)) { foreach ($split as $quote_word) { if (in_array($quote_word, $blockwords)) { return true; } } } return false; } if (has_bad_words($quote)) { echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $quote_word <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned From Malent.Net</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; } else { // So long as the quote is not null, it is stored in the quotes.txt file // NOTE: Permissions need to be set on this file as 777 so that it can be added if ($quote != "") { $date = date("d.m.Y / H:i:s"); $fp = fopen("quotes.txt", "a"); $domain = GetHostByName($REMOTE_ADDR); // If the name is not null, write directly to the quotes.txt, if not, set $name = 'Anon' fwrite($fp, "\n$quote <BR> - $name <BR> <font size='1'> $date</font>"); // close the 'quotes.txt' file fclose($fp); // Mail the quote to me (or if this code is on your site, to you) mail("service@malent.net", "New quote added", "A new quote has been added to 'quotes.txt'\nThe quote was added by: $name\nThe quote added was: $quote\nDate / Time Submitted: $date\nIP: $ip", "From: webmaster@malent.net\r\n"); print "<center><h1>Malent.Net - Feedback Form!<h1></center> <p><strong>New quote added:</strong> $quote</p><p><strong>Added by:</strong> $name</p><p><strong>Timestamp:</strong> <font size='1'> $date </p> <p><B>Your IP</B>: $ip</p></font>"; print '<strong><p><a href="quote_add.php">Back</a> / <a href="quote_add.php" onClick="window.close()">Close</a><BR><BR>Your Feedback Comment Is Now Live.<BR>We Thank You For Your Submission.</p>'; // close the php statement so it is possible to enter normal html, // just dont forget to end the if statement at the end ?> <?php } // end else block ?> <?php include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } } } ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="0"><img src="main/spacer.gif" width="1" height="1"></td> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="1" height="1"></td> </tr> </tr> <tr> <td style="background: #ffffff; padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"><center>Malent.Net - Feedback Form!</center></h1></td> </tr> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="0" height="0"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="480"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <p>To Submit A Quote, Enter It Along With Your Name.<br> No Name = <strong>'Anonymous'</strong>.</p> <p><strong>Note:</strong> The Quote Will Be Limited To 300 Characters,<br> No HTML, SPAM Allowed.<br>This Window Will Self Destruct In 60 Seconds.</p><br> <form action="quote_add.php?add" method="post" id="quoteform"> <div><label for="nameInput" class="rowA"><strong>Name:</strong></label><input type="text" class="textfield" name="name" size="20" id="nameInput" maxlength="100" /></div> <div><label for="quoteInput" class="rowA"><strong>Quote:</strong></label><textarea onkeypress="return taLimit()" onkeyup="return taCount(myCounter)" class="textfield" name="quote" rows=4 wrap=physical cols=40 maxLength="300"></textarea><font size='1'><left> Number Of Characters Left: <B><SPAN id="myCounter">300</SPAN></left></B></font> </div> <BR><BR><div><input id="submit" type="submit" onclick="check(quoteform,form.elements.length); return true;" onmouseout="this.style.background='#F6EED0';this.style.color='navy';" onmouseover="this.style.background='navy';this.style.color='#F6EED0';" align="absmiddle" tabindex="1" class="submit" value="Submit" /></div><BR><BR> </form> </table> </body>
  7. updated code one part of the code does not show up in form //code <?include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } ?> //code <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?php include("banip/ban.php"); ?> <html><head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var StayAlive = 60; // Number of seconds to keep window open function KillMe(){ setTimeout("self.close()",StayAlive * 1000); } </SCRIPT> <title>Feedback Form!</title> <script language = "Javascript"> function taLimit() { var taObj=event.srcElement; if (taObj.value.length==taObj.maxLength*1) return false; } function taCount(visCnt) { var taObj=event.srcElement; if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; } </script> <script language="Javascript1.2"> // © 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body onload="KillMe();self.focus()" onunload="top.opener.window.location.href='MaloriaN2.php'" background="background/tan-paisley3.jpg"> <center><form name="counter"><input type="text" size="1" name="d2" border="0"></form></center> <script> <!-- // var milisec=0 var seconds=62 document.counter.d2.value='62' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"></h1></td> </tr> <tr> <td valign="top" style="padding: 5em" class="maincontent" height="480"> <?php if (isset($_POST['quote'])) { // This strips the whitespace from either end of each attribute, removes all html and slashes. // (Slashes that were put in by php automaticly) $quote = trim(strip_tags(stripslashes($_POST['quote']))); $name = trim(strip_tags(stripslashes($_POST['name']))); $pass = trim(strip_tags(stripslashes($_POST['pass']))); $spammer_ip = $_SERVER['REMOTE_ADDR']; list($a, $b, $c, $d) = split('.', $spammer_ip); if( gethostbyname("$d.$c.$b.$a.list.dsbl.org") != "$d.$c.$b.$a.list.dsbl.org") { header( "Location: http://dsbl.org/listing?".$spammer_ip); return false; } // If the quote is longer than 300 characters it is striped and a '...' added to the end. // (A client side check is also performed in the form using the 'maxlength="300"' attribute in the form. if (strlen($quote) >= 300) { $quote = substr($quote, 0, 300); $quote = $quote."..."; } // Same thing for the name but with length of 100 characters. if (strlen($name) >= 100) { $name = substr($name, 0, 100); $name = $name."..."; } if (strlen($name) <= 0) { $name = "Anonymous"; } if (strlen($pass) <= 1) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name </strong>Left<strong> Security</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Correction.</center></p>"; exit; } if (strlen($quote) <= 0) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name, </strong>Left<strong> Quote</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Corrections.</center></p>"; exit; } $blockwords=array('photos of singles','meet single people', 'casino', 'find other singles', 'get a DATE', 'Someone Wants to MEET You', 'find other singles', 'Lonely?', 'Dating Tips', 'viagra', 'Viagr@', 'Vi@gra', 'Valium', 'Vinarol', 'Vali~um', 'viagra', 'via-gra', 'viagara', 'v1agara', 'v1agra', 'VIAGRA', 'V.I.A.G.R.A', 'Virility', 'Anti-depressants', 'antidepressant', 'Botox', 'Levitra', 'Lev1tra', 'Lev1tr@', 'Phentermine', 'phentermine', 'phendimetrazine', 'paxil', 'prescriiption', 'propecia', 'prozac', 'Prescription', 'Prescriptions', 'Phermone', 'Pheremone', 'Pheromone', 'pharmacy', 'G=e-n-e-r-i-c', 'Online Pharmacy', 'Medical breakthrough', 'Xanax', 'xanax', 'xenical', 'Better Health', 'DIET', 'D1ET', 'diet', 'Dental Coverage', 'Instant Dental', 'flush fat', 'fat burner', 'fat burning', 'fat-burning', 's.a.f.e', 's a f e', 'surgical', 'lose 10lbs', 'lose 20lbs', 'lose 30lbs', 'lose 40lbs', 'Lose weight', 'Lose the weight', 'lose fat', 'Miracleburn', 'weightloss', 'weight loss', 'we1ght l0ss', 'we1ght', 'w.e.i.g.h.t', 'weight watchers', 'penis', 'PENIS', 'P E N I S', 'p-e-n-i-s', 'pen1s', 'enlarge', 'enlarging your cock', 'enlarge your cock', 'erection', 'manhood', 'supersize', 'add inches', 'add 2 inches', 'add 3 inches', 'add 4 inches', 'add 5 inches', 'add solid inches', '1/2 Price', 'ADV:', '[ADV]', '(ADV)', '{ADV}', 'Absolutely legal', 'Affordable', 'Aprroved', 'Auto Loan', 'Auto Loans', 'Bargain', 'Bingo', 'casino', 'consolidate', 'complimentary', 'credit check', 'credit repair', 'Credit', 'congratulations', 'clear your credit', 'Debt Consolidation', 'debt', 'Debt', 'D-E-B-T', 'Dollar', 'earn cash', 'earn money', 'Easily get a home loan', 'Eliminate Debt', 'extra income', 'fire your boss', 'f-r-e-e', 'F-R-E-E', 'F_R E_E', 'F_R_E_E', 'F.R.E.E', 'F*R*E*E', 'FREEApplication', 'FREEBestseller', 'FREEBlockbuster', 'FREE adult', 'FREE credit', 'Free shipping', 'FREE money', 'free money!', 'Financial freedom', 'free vacation', 'free membership', 'freegift', 'Gift', 'Givaway', 'Giveaway', 'Get a FREE', 'Government auctions', 'GOVT', 'Guaranteed Approval Free', 'how much you can save', 'Home Loans', 'Homeowner', 'Homeowners', 'HGH', 'h g h', 'Increase your salary', 'Investor Insights', 'It Really works!', 'LIFETIME MEMBERSHIP TO THE', 'loan payments', 'Loan Quote', 'LOAN', 'L0AN', 'LOWEST RATES', 'L0WEST RATES', 'LowRateSource', 'make money', 'make cash', 'MAKE MONEY FAST', 'MILLIONAIRE', 'No gimmicks', 'No obligation', 'NOW FREE TRIAL', 'no risk', 'Offer', 'offer', 'Partnership Required!', 'Pay Less', 'Payday', 'payroll', 'perfectly legal', 'Prize', 'risk free', 'Real Estate', 'Reduce Rates', 'REAL MONEY', 'Refinance', 'ReFi', 'savers', 'Salary', 'Save Money', 'SLASH YOUR EXPENSES', 'Student Loan', 'Student Loans', 'This really works', 'unclaimed', 'unsecured credit card', 'unlimited', 'unique gift', 'Virtual Deals', 'visa approval', 'win money', 'win cash', 'WHOLESALE', 'Won', 'Your free daily', '18 YR', 'ADLT:', 'anal', 'adult site', 'adult video', 'barely legal', 'cumshot', 'exploited teens', 'illegal', 'fisting', 'free xxx', 'GRANNY', 'GUARANTEE', 'HARDCORE', 'TEEN', 'TEENS', 'PRETEEN', 'PRETEENS', 'nude celeb', 'Want free porn in your mail?', 'whore', 'XXX Picture For You!', '1NK', 'Brand Ink', 'inkjet cartridges', 'ink cartridges', 'printer cartridges', 'printer ink', 'toner cartridges', 'Toner cartridge', 'inkjets', 'ink sale', 'inkjet', 'ink order', 'ink supplies', 'laser toner', 'printer supplies', 'printpa', 'printpal', 'InkjetCartridges', 'LaserToners', 'Wholesaleink', '$', 'GreatMailRewards', 'GreatAmericanDeals', 'michael.hughes11', 'Michael.hughes', '......', '!!!', '>>>>>>', '**NEW', 'bulk mail', 'bulkmail', 'Copy DVDs', 'COPY ANY DVD', 'Congratulations!You+', 'Descrambler', 'DVD', 'Direct Marketing Tools', 'Fed Up With Annoying', 'Get Promoted', 'HARRY POTTER', 'harry potter', 'I thought you might be interested in this!', 'joke-of-the-day', 'livecam', 'Partnership Required!!!', 'patch from Microsoft', 'Microsoft Security Update', 'Microsoft Update', 'Microsoft news', 'Napster', 'Norton Systemworks', 'Newgrounds', 'PPV', 'RealOne', 'screensaver', 'Security Update by', 'Smallest Digital Camera', 'TheDailySamples', 'Toon Doctor', 'This stuff works', 'Tune up your PC', 'Ultimate Breakthrough', 'update from Microsoft', 'Upgrade Your Career', 'Dating Tips', 'http://',); $quote = 'my motherfucker dog keeps barking'; function has_bad_words($quote) { global $blockwords; $split = preg_split("#\s+#", $post, -1, PREG_SPLIT_NO_EMPTY); if (is_array($split)) { foreach ($split as $quote_word) { if (in_array($quote_word, $blockwords)) { return true; } } } return false; } if (has_bad_words($quote)) { echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $quote_word <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned From Malent.Net</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; } else { // So long as the quote is not null, it is stored in the quotes.txt file // NOTE: Permissions need to be set on this file as 777 so that it can be added if ($quote != "") { $date = date("d.m.Y / H:i:s"); $fp = fopen("quotes.txt", "a"); $domain = GetHostByName($REMOTE_ADDR); // If the name is not null, write directly to the quotes.txt, if not, set $name = 'Anon' fwrite($fp, "\n$quote <BR> - $name <BR> <font size='1'> $date</font>"); // close the 'quotes.txt' file fclose($fp); // Mail the quote to me (or if this code is on your site, to you) mail("service@malent.net", "New quote added", "A new quote has been added to 'quotes.txt'\nThe quote was added by: $name\nThe quote added was: $quote\nDate / Time Submitted: $date\nIP: $ip", "From: webmaster@malent.net\r\n"); print "<center><h1>Malent.Net - Feedback Form!<h1></center> <p><strong>New quote added:</strong> $quote</p><p><strong>Added by:</strong> $name</p><p><strong>Timestamp:</strong> <font size='1'> $date </p> <p><B>Your IP</B>: $ip</p></font>"; print '<strong><p><a href="quote_add.php">Back</a> / <a href="quote_add.php" onClick="window.close()">Close</a><BR><BR>Your Feedback Comment Is Now Live.<BR>We Thank You For Your Submission.</p>'; // close the php statement so it is possible to enter normal html, // just dont forget to end the if statement at the end ?> <?php }} // end else block ?> <?php include(\"class.passgen.php\");\n"; echo " $passGen = new passGen(5);\n"; echo " \n"; echo " $validate = 0;\n"; echo " \n"; echo " if(isset($_POST['submit'])){\n"; echo " $hash = $_POST['hash'];\n"; echo " $pass = $_POST['pass'];\n"; echo " \n"; echo " if($passGen->verify($pass, $hash)){\n"; echo " $validate = 1;\n"; echo " echo 'Validation OK';\n"; echo " }\n"; echo " else {\n"; echo " echo \"Validation not OK\";\n"; echo " }\n"; echo " echo \"<br>\";\n"; echo " }\n"; echo " \n"; echo " if($validate == 0){\n"; echo " $hash = $passGen->password(0, 1);\n"; echo " \n"; echo " echo \"<br>\";\n"; echo " echo $passGen->images('font', 'gif', 'f_', '16', '20');\n"; echo " echo \"<br><br>\";\n"; echo " echo \"<p><label for='securitycode'>Anti-Spam Security: (Required)</label><span style='color:#FF0000;'>*</span><br>\";\n"; echo "echo \"<small>Type The Combination Shown In The Picture.</small><br>\";\n"; echo " echo \"<input type='hidden' value=\"'. $hash .'\" name=\"hash\">\";\n"; echo " echo \"<input type=\"text\" value=\"'. $pass .'\" name=\"pass\" size=\"9\" maxlength=\"9\">\";\n"; echo " echo \"<br><br>\";\n"; echo " \n"; echo " }\n"; echo " }\n"; echo "?>\n"; ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="0"><img src="main/spacer.gif" width="1" height="1"></td> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="1" height="1"></td> </tr> </tr> <tr> <td style="background: #ffffff; padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"><center>Malent.Net - Feedback Form!</center></h1></td> </tr> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="0" height="0"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="480"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <p>To Submit A Quote, Enter It Along With Your Name.<br> No Name = <strong>'Anonymous'</strong>.</p> <p><strong>Note:</strong> The Quote Will Be Limited To 300 Characters,<br> No HTML, SPAM Allowed.<br>This Window Will Self Destruct In 60 Seconds.</p><br> <form action="quote_add.php?add" method="post" id="quoteform"> <div><label for="nameInput" class="rowA"><strong>Name:</strong></label><input type="text" class="textfield" name="name" size="20" id="nameInput" maxlength="100" /></div> <div><label for="quoteInput" class="rowA"><strong>Quote:</strong></label><textarea onkeypress="return taLimit()" onkeyup="return taCount(myCounter)" class="textfield" name="quote" rows=4 wrap=physical cols=40 maxLength="300"></textarea><font size='1'><left> Number Of Characters Left: <B><SPAN id="myCounter">300</SPAN></left></B></font> </div> <BR><BR><div><input id="submit" type="submit" onclick="check(quoteform,form.elements.length); return true;" onmouseout="this.style.background='#F6EED0';this.style.color='navy';" onmouseover="this.style.background='navy';this.style.color='#F6EED0';" align="absmiddle" tabindex="1" class="submit" value="Submit" /></div><BR><BR> </form> </table> </body>
  8. ok i've altered code but now i get this error Parse error: syntax error, unexpected $end on line 596 <?php session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?php include("banip/ban.php"); ?> <html><head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var StayAlive = 60; // Number of seconds to keep window open function KillMe(){ setTimeout("self.close()",StayAlive * 1000); } </SCRIPT> <title>Feedback Form!</title> <script language = "Javascript"> function taLimit() { var taObj=event.srcElement; if (taObj.value.length==taObj.maxLength*1) return false; } function taCount(visCnt) { var taObj=event.srcElement; if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; } </script> <script language="Javascript1.2"> // © 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body onload="KillMe();self.focus()" onunload="top.opener.window.location.href='MaloriaN2.php'" background="background/tan-paisley3.jpg"> <center><form name="counter"><input type="text" size="1" name="d2" border="0"></form></center> <script> <!-- // var milisec=0 var seconds=62 document.counter.d2.value='62' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"></h1></td> </tr> <tr> <td valign="top" style="padding: 5em" class="maincontent" height="480"> <?php if (isset($_POST['quote'])) { // This strips the whitespace from either end of each attribute, removes all html and slashes. // (Slashes that were put in by php automaticly) $quote = trim(strip_tags(stripslashes($_POST['quote']))); $name = trim(strip_tags(stripslashes($_POST['name']))); $pass = trim(strip_tags(stripslashes($_POST['pass']))); $spammer_ip = $_SERVER['REMOTE_ADDR']; list($a, $b, $c, $d) = split('.', $spammer_ip); if( gethostbyname("$d.$c.$b.$a.list.dsbl.org") != "$d.$c.$b.$a.list.dsbl.org") { header( "Location: http://dsbl.org/listing?".$spammer_ip); return false; } // If the quote is longer than 300 characters it is striped and a '...' added to the end. // (A client side check is also performed in the form using the 'maxlength="300"' attribute in the form. if (strlen($quote) >= 300) { $quote = substr($quote, 0, 300); $quote = $quote."..."; } // Same thing for the name but with length of 100 characters. if (strlen($name) >= 100) { $name = substr($name, 0, 100); $name = $name."..."; } if (strlen($name) <= 0) { $name = "Anonymous"; } if (strlen($pass) <= 1) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name </strong>Left<strong> Security</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Correction.</center></p>"; exit; } if (strlen($quote) <= 0) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name, </strong>Left<strong> Quote</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Corrections.</center></p>"; exit; } $blockwords=array('photos of singles','meet single people', 'casino', 'find other singles', 'get a DATE', 'Someone Wants to MEET You', 'find other singles', 'Lonely?', 'Dating Tips', 'viagra', 'Viagr@', 'Vi@gra', 'Valium', 'Vinarol', 'Vali~um', 'viagra', 'via-gra', 'viagara', 'v1agara', 'v1agra', 'VIAGRA', 'V.I.A.G.R.A', 'Virility', 'Anti-depressants', 'antidepressant', 'Botox', 'Levitra', 'Lev1tra', 'Lev1tr@', 'Phentermine', 'phentermine', 'phendimetrazine', 'paxil', 'prescriiption', 'propecia', 'prozac', 'Prescription', 'Prescriptions', 'Phermone', 'Pheremone', 'Pheromone', 'pharmacy', 'G=e-n-e-r-i-c', 'Online Pharmacy', 'Medical breakthrough', 'Xanax', 'xanax', 'xenical', 'Better Health', 'DIET', 'D1ET', 'diet', 'Dental Coverage', 'Instant Dental', 'flush fat', 'fat burner', 'fat burning', 'fat-burning', 's.a.f.e', 's a f e', 'surgical', 'lose 10lbs', 'lose 20lbs', 'lose 30lbs', 'lose 40lbs', 'Lose weight', 'Lose the weight', 'lose fat', 'Miracleburn', 'weightloss', 'weight loss', 'we1ght l0ss', 'we1ght', 'w.e.i.g.h.t', 'weight watchers', 'penis', 'PENIS', 'P E N I S', 'p-e-n-i-s', 'pen1s', 'enlarge', 'enlarging your cock', 'enlarge your cock', 'erection', 'manhood', 'supersize', 'add inches', 'add 2 inches', 'add 3 inches', 'add 4 inches', 'add 5 inches', 'add solid inches', '1/2 Price', 'ADV:', '[ADV]', '(ADV)', '{ADV}', 'Absolutely legal', 'Affordable', 'Aprroved', 'Auto Loan', 'Auto Loans', 'Bargain', 'Bingo', 'casino', 'consolidate', 'complimentary', 'credit check', 'credit repair', 'Credit', 'congratulations', 'clear your credit', 'Debt Consolidation', 'debt', 'Debt', 'D-E-B-T', 'Dollar', 'earn cash', 'earn money', 'Easily get a home loan', 'Eliminate Debt', 'extra income', 'fire your boss', 'f-r-e-e', 'F-R-E-E', 'F_R E_E', 'F_R_E_E', 'F.R.E.E', 'F*R*E*E', 'FREEApplication', 'FREEBestseller', 'FREEBlockbuster', 'FREE adult', 'FREE credit', 'Free shipping', 'FREE money', 'free money!', 'Financial freedom', 'free vacation', 'free membership', 'freegift', 'Gift', 'Givaway', 'Giveaway', 'Get a FREE', 'Government auctions', 'GOVT', 'Guaranteed Approval Free', 'how much you can save', 'Home Loans', 'Homeowner', 'Homeowners', 'HGH', 'h g h', 'Increase your salary', 'Investor Insights', 'It Really works!', 'LIFETIME MEMBERSHIP TO THE', 'loan payments', 'Loan Quote', 'LOAN', 'L0AN', 'LOWEST RATES', 'L0WEST RATES', 'LowRateSource', 'make money', 'make cash', 'MAKE MONEY FAST', 'MILLIONAIRE', 'No gimmicks', 'No obligation', 'NOW FREE TRIAL', 'no risk', 'Offer', 'offer', 'Partnership Required!', 'Pay Less', 'Payday', 'payroll', 'perfectly legal', 'Prize', 'risk free', 'Real Estate', 'Reduce Rates', 'REAL MONEY', 'Refinance', 'ReFi', 'savers', 'Salary', 'Save Money', 'SLASH YOUR EXPENSES', 'Student Loan', 'Student Loans', 'This really works', 'unclaimed', 'unsecured credit card', 'unlimited', 'unique gift', 'Virtual Deals', 'visa approval', 'win money', 'win cash', 'WHOLESALE', 'Won', 'Your free daily', '18 YR', 'ADLT:', 'anal', 'adult site', 'adult video', 'barely legal', 'cumshot', 'exploited teens', 'illegal', 'fisting', 'free xxx', 'GRANNY', 'GUARANTEE', 'HARDCORE', 'TEEN', 'TEENS', 'PRETEEN', 'PRETEENS', 'nude celeb', 'Want free porn in your mail?', 'whore', 'XXX Picture For You!', '1NK', 'Brand Ink', 'inkjet cartridges', 'ink cartridges', 'printer cartridges', 'printer ink', 'toner cartridges', 'Toner cartridge', 'inkjets', 'ink sale', 'inkjet', 'ink order', 'ink supplies', 'laser toner', 'printer supplies', 'printpa', 'printpal', 'InkjetCartridges', 'LaserToners', 'Wholesaleink', '$', 'GreatMailRewards', 'GreatAmericanDeals', 'michael.hughes11', 'Michael.hughes', '......', '!!!', '>>>>>>', '**NEW', 'bulk mail', 'bulkmail', 'Copy DVDs', 'COPY ANY DVD', 'Congratulations!You+', 'Descrambler', 'DVD', 'Direct Marketing Tools', 'Fed Up With Annoying', 'Get Promoted', 'HARRY POTTER', 'harry potter', 'I thought you might be interested in this!', 'joke-of-the-day', 'livecam', 'Partnership Required!!!', 'patch from Microsoft', 'Microsoft Security Update', 'Microsoft Update', 'Microsoft news', 'Napster', 'Norton Systemworks', 'Newgrounds', 'PPV', 'RealOne', 'screensaver', 'Security Update by', 'Smallest Digital Camera', 'TheDailySamples', 'Toon Doctor', 'This stuff works', 'Tune up your PC', 'Ultimate Breakthrough', 'update from Microsoft', 'Upgrade Your Career', 'Dating Tips', 'http://',); $quote = 'my motherfucker dog keeps barking'; function has_bad_words($quote) { global $blockwords; $split = preg_split("#\s+#", $post, -1, PREG_SPLIT_NO_EMPTY); if (is_array($split)) { foreach ($split as $quote_word) { if (in_array($quote_word, $blockwords)) { return true; } } } return false; } if (has_bad_words($quote)) { echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $quote_word <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned From Malent.Net</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; } else { echo "Your post is clean, good boy"; ?> if(strstr($_POST['quote'], $blockword) !== false) // So long as the quote is not null, it is stored in the quotes.txt file // NOTE: Permissions need to be set on this file as 777 so that it can be added to automaticaly if ($quote != "") { $date = date("d.m.Y / H:i:s"); $fp = fopen("quotes.txt", "a"); $domain = GetHostByName($REMOTE_ADDR); // If the name is not null, write directly to the quotes.txt, if not, set $name = 'Anon' fwrite($fp, "\n$quote <BR> - $name <BR> <font size='1'> $date</font>"); // close the 'quotes.txt' file fclose($fp); // Mail the quote to me (or if this code is on your site, to you) mail("service@malent.net", "New quote added", "A new quote has been added to 'quotes.txt'\nThe quote was added by: $name\nThe quote added was: $quote\nDate / Time Submitted: $date\nIP: $ip", "From: webmaster@malent.net\r\n"); print "<center><h1>Malent.Net - Feedback Form!<h1></center> <p><strong>New quote added:</strong> $quote</p><p><strong>Added by:</strong> $name</p><p><strong>Timestamp:</strong> <font size='1'> $date </p> <p><B>Your IP</B>: $ip</p></font>"; } print '<strong><p><a href="quote_add.php">Back</a> / <a href="<a href="quote_add. php" onClick="window.close()">Close</a><BR><BR>Your Feedback Comment Is Now Live.<BR>We Thank You For Your Submission.</p>'; } else { // close the php statement so it is possible to enter normal html, // just dont forget to end the if statement at the end ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="0"><img src="main/spacer.gif" width="1" height="1"></td> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="1" height="1"></td> </tr> </tr> <tr> <td style="background: #ffffff; padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"><center>Malent.Net - Feedback Form!</center></h1></td> </tr> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="0" height="0"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="480"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <p>To Submit A Quote, Enter It Along With Your Name.<br> No Name = <strong>'Anonymous'</strong>.</p> <p><strong>Note:</strong> The Quote Will Be Limited To 300 Characters,<br> No HTML, SPAM Allowed.<br>This Window Will Self Destruct In 60 Seconds.</p><br> <form action="quote_add.php?add" method="post" id="quoteform"> <div><label for="nameInput" class="rowA"><strong>Name:</strong></label><input type="text" class="textfield" name="name" size="20" id="nameInput" maxlength="100" /></div> <div><label for="quoteInput" class="rowA"><strong>Quote:</strong></label><textarea onkeypress="return taLimit()" onkeyup="return taCount(myCounter)" class="textfield" name="quote" rows=4 wrap=physical cols=40 maxLength="300"></textarea><font size='1'><left> Number Of Characters Left: <B><SPAN id="myCounter">300</SPAN></left></B></font> </div> <?include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } ?> <BR><BR><div><input id="submit" type="submit" onclick="check(quoteform,form.elements.length); return true;" onmouseout="this.style.background='#F6EED0';this.style.color='navy';" onmouseover="this.style.background='navy';this.style.color='#F6EED0';" align="absmiddle" tabindex="1" class="submit" value="Submit" /></div><BR><BR> <?php } // end else block ?> </form> </table> </body>
  9. what I have noticed when i try to add a new quote it goes for the first bad word photos of singles. whether its a good or bad word.
  10. this is the original i was having issues with where i am stuck. The form works but it blocks good postings not just bad postings. anyone have any ideas to make the if strings work right checking for a bad word. <? session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?php include("banip/ban.php"); ?> <html><head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var StayAlive = 60; // Number of seconds to keep window open function KillMe(){ setTimeout("self.close()",StayAlive * 1000); } </SCRIPT> <title>Feedback Form!</title> <script language = "Javascript"> function taLimit() { var taObj=event.srcElement; if (taObj.value.length==taObj.maxLength*1) return false; } function taCount(visCnt) { var taObj=event.srcElement; if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; } </script> <script language="Javascript1.2"> // (C) 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body onload="KillMe();self.focus()" onunload="top.opener.window.location.href='MaloriaN2.php'" background="background/tan-paisley3.jpg"> <center><form name="counter"><input type="text" size="1" name="d2" border="0"></form></center> <script> <!-- // var milisec=0 var seconds=62 document.counter.d2.value='62' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"></h1></td> </tr> <tr> <td valign="top" style="padding: 5em" class="maincontent" height="480"> <?php if (isset($_POST['quote'])) { // This strips the whitespace from either end of each attribute, removes all html and slashes. // (Slashes that were put in by php automaticly) $quote = trim(strip_tags(stripslashes($_POST['quote']))); $name = trim(strip_tags(stripslashes($_POST['name']))); $pass = trim(strip_tags(stripslashes($_POST['pass']))); $spammer_ip = $_SERVER['REMOTE_ADDR']; list($a, $b, $c, $d) = split('.', $spammer_ip); if( gethostbyname("$d.$c.$b.$a.list.dsbl.org") != "$d.$c.$b.$a.list.dsbl.org") { header( "Location: http://dsbl.org/listing?".$spammer_ip); return false; } // If the quote is longer than 300 characters it is striped and a '...' added to the end. // (A client side check is also performed in the form using the 'maxlength="300"' attribute in the form. if (strlen($quote) >= 300) { $quote = substr($quote, 0, 300); $quote = $quote."..."; } // Same thing for the name but with length of 100 characters. if (strlen($name) >= 100) { $name = substr($name, 0, 100); $name = $name."..."; } if (strlen($name) <= 0) { $name = "Anonymous"; } if (strlen($pass) <= 1) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name </strong>Left<strong> Security</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Correction.</center></p>"; exit; } if (strlen($quote) <= 0) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name, </strong>Left<strong> Quote</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Corrections.</center></p>"; exit; } $blockwords=array('photos of singles','meet single people', 'casino', 'find other singles', 'get a DATE', 'Someone Wants to MEET You', 'find other singles', 'Lonely?', 'Dating Tips', 'viagra', 'Viagr@', 'Vi@gra', 'Valium', 'Vinarol', 'Vali~um', 'viagra', 'via-gra', 'viagara', 'v1agara', 'v1agra', 'VIAGRA', 'V.I.A.G.R.A', 'Virility', 'Anti-depressants', 'antidepressant', 'Botox', 'Levitra', 'Lev1tra', 'Lev1tr@', 'Phentermine', 'phentermine', 'phendimetrazine', 'paxil', 'prescriiption', 'propecia', 'prozac', 'Prescription', 'Prescriptions', 'Phermone', 'Pheremone', 'Pheromone', 'pharmacy', 'G=e-n-e-r-i-c', 'Online Pharmacy', 'Medical breakthrough', 'Xanax', 'xanax', 'xenical', 'Better Health', 'DIET', 'D1ET', 'diet', 'Dental Coverage', 'Instant Dental', 'flush fat', 'fat burner', 'fat burning', 'fat-burning', 's.a.f.e', 's a f e', 'surgical', 'lose 10lbs', 'lose 20lbs', 'lose 30lbs', 'lose 40lbs', 'Lose weight', 'Lose the weight', 'lose fat', 'Miracleburn', 'weightloss', 'weight loss', 'we1ght l0ss', 'we1ght', 'w.e.i.g.h.t', 'weight watchers', 'penis', 'PENIS', 'P E N I S', 'p-e-n-i-s', 'pen1s', 'enlarge', 'enlarging your cock', 'enlarge your cock', 'erection', 'manhood', 'supersize', 'add inches', 'add 2 inches', 'add 3 inches', 'add 4 inches', 'add 5 inches', 'add solid inches', '1/2 Price', 'ADV:', '[ADV]', '(ADV)', '{ADV}', 'Absolutely legal', 'Affordable', 'Aprroved', 'Auto Loan', 'Auto Loans', 'Bargain', 'Bingo', 'casino', 'consolidate', 'complimentary', 'credit check', 'credit repair', 'Credit', 'congratulations', 'clear your credit', 'Debt Consolidation', 'debt', 'Debt', 'D-E-B-T', 'Dollar', 'earn cash', 'earn money', 'Easily get a home loan', 'Eliminate Debt', 'extra income', 'fire your boss', 'f-r-e-e', 'F-R-E-E', 'F_R E_E', 'F_R_E_E', 'F.R.E.E', 'F*R*E*E', 'FREEApplication', 'FREEBestseller', 'FREEBlockbuster', 'FREE adult', 'FREE credit', 'Free shipping', 'FREE money', 'free money!', 'Financial freedom', 'free vacation', 'free membership', 'freegift', 'Gift', 'Givaway', 'Giveaway', 'Get a FREE', 'Government auctions', 'GOVT', 'Guaranteed Approval Free', 'how much you can save', 'Home Loans', 'Homeowner', 'Homeowners', 'HGH', 'h g h', 'Increase your salary', 'Investor Insights', 'It Really works!', 'LIFETIME MEMBERSHIP TO THE', 'loan payments', 'Loan Quote', 'LOAN', 'L0AN', 'LOWEST RATES', 'L0WEST RATES', 'LowRateSource', 'make money', 'make cash', 'MAKE MONEY FAST', 'MILLIONAIRE', 'No gimmicks', 'No obligation', 'NOW FREE TRIAL', 'no risk', 'Offer', 'offer', 'Partnership Required!', 'Pay Less', 'Payday', 'payroll', 'perfectly legal', 'Prize', 'risk free', 'Real Estate', 'Reduce Rates', 'REAL MONEY', 'Refinance', 'ReFi', 'savers', 'Salary', 'Save Money', 'SLASH YOUR EXPENSES', 'Student Loan', 'Student Loans', 'This really works', 'unclaimed', 'unsecured credit card', 'unlimited', 'unique gift', 'Virtual Deals', 'visa approval', 'win money', 'win cash', 'WHOLESALE', 'Won', 'Your free daily', '18 YR', 'ADLT:', 'anal', 'adult site', 'adult video', 'barely legal', 'cumshot', 'exploited teens', 'illegal', 'fisting', 'free xxx', 'GRANNY', 'GUARANTEE', 'HARDCORE', 'TEEN', 'TEENS', 'PRETEEN', 'PRETEENS', 'nude celeb', 'Want free porn in your mail?', 'whore', 'XXX Picture For You!', '1NK', 'Brand Ink', 'inkjet cartridges', 'ink cartridges', 'printer cartridges', 'printer ink', 'toner cartridges', 'Toner cartridge', 'inkjets', 'ink sale', 'inkjet', 'ink order', 'ink supplies', 'laser toner', 'printer supplies', 'printpa', 'printpal', 'InkjetCartridges', 'LaserToners', 'Wholesaleink', '$', 'GreatMailRewards', 'GreatAmericanDeals', 'michael.hughes11', 'Michael.hughes', '......', '!!!', '>>>>>>', '**NEW', 'bulk mail', 'bulkmail', 'Copy DVDs', 'COPY ANY DVD', 'Congratulations!You+', 'Descrambler', 'DVD', 'Direct Marketing Tools', 'Fed Up With Annoying', 'Get Promoted', 'HARRY POTTER', 'harry potter', 'I thought you might be interested in this!', 'joke-of-the-day', 'livecam', 'Partnership Required!!!', 'patch from Microsoft', 'Microsoft Security Update', 'Microsoft Update', 'Microsoft news', 'Napster', 'Norton Systemworks', 'Newgrounds', 'PPV', 'RealOne', 'screensaver', 'Security Update by', 'Smallest Digital Camera', 'TheDailySamples', 'Toon Doctor', 'This stuff works', 'Tune up your PC', 'Ultimate Breakthrough', 'update from Microsoft', 'Upgrade Your Career', 'Dating Tips', 'http://',); $ip = $_SERVER['REMOTE_ADDR']; foreach($blockwords as $blockword) { { if(strstr($text, $blockword)) { $do_stuff = true; } }echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $blockword <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned From Malent.Net</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; } if(strstr($_POST['quote'], $blockword) !== false) // So long as the quote is not null, it is stored in the quotes.txt file // NOTE: Permissions need to be set on this file as 777 so that it can be added to automaticaly if ($quote != "") { $date = date("d.m.Y / H:i:s"); $fp = fopen("quotes.txt", "a"); $domain = GetHostByName($REMOTE_ADDR); // If the name is not null, write directly to the quotes.txt, if not, set $name = 'Anon' fwrite($fp, "\n$quote <BR> - $name <BR> <font size='1'> $date</font>"); // close the 'quotes.txt' file fclose($fp); // Mail the quote to me (or if this code is on your site, to you) mail("service@malent.net", "New quote added", "A new quote has been added to 'quotes.txt'\nThe quote was added by: $name\nThe quote added was: $quote\nDate / Time Submitted: $date\nIP: $ip", "From: webmaster@malent.net\r\n"); print "<center><h1>Malent.Net - Feedback Form!<h1></center> <p><strong>New quote added:</strong> $quote</p><p><strong>Added by:</strong> $name</p><p><strong>Timestamp:</strong> <font size='1'> $date </p> <p><B>Your IP</B>: $ip</p></font>"; } print '<strong><p><a href="quote_add.php">Back</a> / <a href="<a href="quote_add. php" onClick="window.close()">Close</a><BR><BR>Your Feedback Comment Is Now Live.<BR>We Thank You For Your Submission.</p>'; } else { // close the php statement so it is possible to enter normal html, // just dont forget to end the if statement at the end ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="0"><img src="main/spacer.gif" width="1" height="1"></td> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="1" height="1"></td> </tr> </tr> <tr> <td style="background: #ffffff; padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"><center>Malent.Net - Feedback Form!</center></h1></td> </tr> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="0" height="0"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="480"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <p>To Submit A Quote, Enter It Along With Your Name.<br> No Name = <strong>'Anonymous'</strong>.</p> <p><strong>Note:</strong> The Quote Will Be Limited To 300 Characters,<br> No HTML, SPAM Allowed.<br>This Window Will Self Destruct In 60 Seconds.</p><br> <form action="quote_add.php?add" method="post" id="quoteform"> <div><label for="nameInput" class="rowA"><strong>Name:</strong></label><input type="text" class="textfield" name="name" size="20" id="nameInput" maxlength="100" /></div> <div><label for="quoteInput" class="rowA"><strong>Quote:</strong></label><textarea onkeypress="return taLimit()" onkeyup="return taCount(myCounter)" class="textfield" name="quote" rows=4 wrap=physical cols=40 maxLength="300"></textarea><font size='1'><left> Number Of Characters Left: <B><SPAN id="myCounter">300</SPAN></left></B></font> </div> <?include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } ?> <BR><BR><div><input id="submit" type="submit" onclick="check(quoteform,form.elements.length); return true;" onmouseout="this.style.background='#F6EED0';this.style.color='navy';" onmouseover="this.style.background='navy';this.style.color='#F6EED0';" align="absmiddle" tabindex="1" class="submit" value="Submit" /></div><BR><BR> <?php } // end else block ?> </form> </table> </body>
  11. well before I was getting alot of spam so that definitely isn't a good way to go back to. I added the badwords spam filter. and I think the $do stuff true and false may be not correctly set is there anything you see wrong with those sections?
  12. well the counter is the only thing I get on my form. It all started when I tryed to change things for the $do_stuff that section I believe to be the problem. unfortunately most of it is what I've come up with so can't ask anyone else or I would.
  13. Something is wrong with this not sure what ... <? session_start(); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <?php include("banip/ban.php"); ?> <html><head> <SCRIPT LANGUAGE="JAVASCRIPT" TYPE="TEXT/JAVASCRIPT"> // *********************************************** // AUTHOR: WWW.CGISCRIPT.NET, LLC // URL: http://www.cgiscript.net // Use the script, just leave this message intact. // Download your FREE CGI/Perl Scripts today! // ( http://www.cgiscript.net/scripts.htm ) // *********************************************** var StayAlive = 60; // Number of seconds to keep window open function KillMe(){ setTimeout("self.close()",StayAlive * 1000); } </SCRIPT> <title>Feedback Form!</title> <script language = "Javascript"> function taLimit() { var taObj=event.srcElement; if (taObj.value.length==taObj.maxLength*1) return false; } function taCount(visCnt) { var taObj=event.srcElement; if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1); if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length; } </script> <script language="Javascript1.2"> // (C) 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script> <META HTTP-EQUIV="expires" CONTENT="0"> <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body onload="KillMe();self.focus()" onunload="top.opener.window.location.href='MaloriaN2.php'" background="background/tan-paisley3.jpg"> <center><form name="counter"><input type="text" size="1" name="d2" border="0"></form></center> <script> <!-- // var milisec=0 var seconds=62 document.counter.d2.value='62' function display(){ if (milisec<=0){ milisec=9 seconds-=1 } if (seconds<=-1){ milisec=0 seconds+=1 } else milisec-=1 document.counter.d2.value=seconds+"."+milisec setTimeout("display()",100) } display() --> </script> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td style="padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"></h1></td> </tr> <tr> <td valign="top" style="padding: 5em" class="maincontent" height="480"> <?php if (isset($_POST['quote'])) { // This strips the whitespace from either end of each attribute, removes all html and slashes. // (Slashes that were put in by php automaticly) $quote = trim(strip_tags(stripslashes($_POST['quote']))); $name = trim(strip_tags(stripslashes($_POST['name']))); $pass = trim(strip_tags(stripslashes($_POST['pass']))); $spammer_ip = $_SERVER['REMOTE_ADDR']; list($a, $b, $c, $d) = split('.', $spammer_ip); if( gethostbyname("$d.$c.$b.$a.list.dsbl.org") != "$d.$c.$b.$a.list.dsbl.org") { header( "Location: http://dsbl.org/listing?".$spammer_ip); return false; } // If the quote is longer than 300 characters it is striped and a '...' added to the end. // (A client side check is also performed in the form using the 'maxlength="300"' attribute in the form. if (strlen($quote) >= 300) { $quote = substr($quote, 0, 300); $quote = $quote."..."; } // Same thing for the name but with length of 100 characters. if (strlen($name) >= 100) { $name = substr($name, 0, 100); $name = $name."..."; } if (strlen($name) <= 0) { $name = "Anonymous"; } if (strlen($pass) <= 1) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name </strong>Left<strong> Security</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Correction.</center></p>"; exit; } if (strlen($quote) <= 0) { echo "<BR><BR><p><center>Your Submission Encountered The Following Problem:</center></p>"; echo "<li><center><strong>$name, </strong>Left<strong> Quote</strong> Field Blank.</center></li>"; echo "<p><center>Please <a href='javascript:history.back()'>Go Back</a> And Make Proper Corrections.</center></p>"; exit; } $blockwords=array(' photos of singles','meet single people', 'casino', 'find other singles', 'get a DATE', 'Someone Wants to MEET You', 'find other singles', 'Lonely?', 'Dating Tips', 'viagra', 'Viagr@', 'Vi@gra', 'Valium', 'Vinarol', 'Vali~um', 'viagra', 'via-gra', 'viagara', 'v1agara', 'v1agra', 'VIAGRA', 'V.I.A.G.R.A', 'Virility', 'Anti-depressants', 'antidepressant', 'Botox', 'Levitra', 'Lev1tra', 'Lev1tr@', 'Phentermine', 'phentermine', 'phendimetrazine', 'paxil', 'prescriiption', 'propecia', 'prozac', 'Prescription', 'Prescriptions', 'Phermone', 'Pheremone', 'Pheromone', 'pharmacy', 'G=e-n-e-r-i-c', 'Online Pharmacy', 'Medical breakthrough', 'Xanax', 'xanax', 'xenical', 'Better Health', 'DIET', 'D1ET', 'diet', 'Dental Coverage', 'Instant Dental', 'flush fat', 'fat burner', 'fat burning', 'fat-burning', 's.a.f.e', 's a f e', 'surgical', 'lose 10lbs', 'lose 20lbs', 'lose 30lbs', 'lose 40lbs', 'Lose weight', 'Lose the weight', 'lose fat', 'Miracleburn', 'weightloss', 'weight loss', 'we1ght l0ss', 'we1ght', 'w.e.i.g.h.t', 'weight watchers', 'penis', 'PENIS', 'P E N I S', 'p-e-n-i-s', 'pen1s', 'enlarge', 'enlarging your cock', 'enlarge your cock', 'erection', 'manhood', 'supersize', 'add inches', 'add 2 inches', 'add 3 inches', 'add 4 inches', 'add 5 inches', 'add solid inches', '1/2 Price', 'ADV:', '[ADV]', '(ADV)', '{ADV}', 'Absolutely legal', 'Affordable', 'Aprroved', 'Auto Loan', 'Auto Loans', 'Bargain', 'Bingo', 'casino', 'consolidate', 'complimentary', 'credit check', 'credit repair', 'Credit', 'congratulations', 'clear your credit', 'Debt Consolidation', 'debt', 'Debt', 'D-E-B-T', 'Dollar', 'earn cash', 'earn money', 'Easily get a home loan', 'Eliminate Debt', 'extra income', 'fire your boss', 'f-r-e-e', 'F-R-E-E', 'F_R E_E', 'F_R_E_E', 'F.R.E.E', 'F*R*E*E', 'FREEApplication', 'FREEBestseller', 'FREEBlockbuster', 'FREE adult', 'FREE credit', 'Free shipping', 'FREE money', 'free money!', 'Financial freedom', 'free vacation', 'free membership', 'freegift', 'Gift', 'Givaway', 'Giveaway', 'Get a FREE', 'Government auctions', 'GOVT', 'Guaranteed Approval Free', 'how much you can save', 'Home Loans', 'Homeowner', 'Homeowners', 'HGH', 'h g h', 'Increase your salary', 'Investor Insights', 'It Really works!', 'LIFETIME MEMBERSHIP TO THE', 'loan payments', 'Loan Quote', 'LOAN', 'L0AN', 'LOWEST RATES', 'L0WEST RATES', 'LowRateSource', 'make money', 'make cash', 'MAKE MONEY FAST', 'MILLIONAIRE', 'No gimmicks', 'No obligation', 'NOW FREE TRIAL', 'no risk', 'Offer', 'offer', 'Partnership Required!', 'Pay Less', 'Payday', 'payroll', 'perfectly legal', 'Prize', 'risk free', 'Real Estate', 'Reduce Rates', 'REAL MONEY', 'Refinance', 'ReFi', 'savers', 'Salary', 'Save Money', 'SLASH YOUR EXPENSES', 'Student Loan', 'Student Loans', 'This really works', 'unclaimed', 'unsecured credit card', 'unlimited', 'unique gift', 'Virtual Deals', 'visa approval', 'win money', 'win cash', 'WHOLESALE', 'Won', 'Your free daily', '18 YR', 'ADLT:', 'anal', 'adult site', 'adult video', 'barely legal', 'cumshot', 'exploited teens', 'illegal', 'fisting', 'free xxx', 'GRANNY', 'GUARANTEE', 'HARDCORE', 'TEEN', 'TEENS', 'PRETEEN', 'PRETEENS', 'nude celeb', 'Want free porn in your mail?', 'whore', 'XXX Picture For You!', '1NK', 'Brand Ink', 'inkjet cartridges', 'ink cartridges', 'printer cartridges', 'printer ink', 'toner cartridges', 'Toner cartridge', 'inkjets', 'ink sale', 'inkjet', 'ink order', 'ink supplies', 'laser toner', 'printer supplies', 'printpa', 'printpal', 'InkjetCartridges', 'LaserToners', 'Wholesaleink', '$', 'GreatMailRewards', 'GreatAmericanDeals', 'michael.hughes11', 'Michael.hughes', '......', '!!!', '>>>>>>', '**NEW', 'bulk mail', 'bulkmail', 'Copy DVDs', 'COPY ANY DVD', 'Congratulations!You+', 'Descrambler', 'DVD', 'Direct Marketing Tools', 'Fed Up With Annoying', 'Get Promoted', 'HARRY POTTER', 'harry potter', 'I thought you might be interested in this!', 'joke-of-the-day', 'livecam', 'Partnership Required!!!', 'patch from Microsoft', 'Microsoft Security Update', 'Microsoft Update', 'Microsoft news', 'Napster', 'Norton Systemworks', 'Newgrounds', 'PPV', 'RealOne', 'screensaver', 'Security Update by', 'Smallest Digital Camera', 'TheDailySamples', 'Toon Doctor', 'This stuff works', 'Tune up your PC', 'Ultimate Breakthrough', 'update from Microsoft', 'Upgrade Your Career', 'Dating Tips', 'http://',); $ip = $_SERVER['REMOTE_ADDR']; foreach($blockwords as $blockword) { if(strstr($_POST['quote'], $blockword) !== true) { { $do_stuff = true; break; } } echo "<BR><BR><p><center></center></p>"; echo "<li>Your Submission Encountered The Following Problem:<center><strong>$name, </strong>Left<strong> $blockword <br>..Spam Detected..</strong><br><font color=red>$ip</font> Banned From Malent.Net</center></li>"; echo "<p><center></center></p>"; $date = date("d.m.Y H:i:s"); $bp = fopen("banip/banip.txt", "a"); $domain = gethostbyaddr($_SERVER['REMOTE_ADDR']); $ip = $_SERVER['REMOTE_ADDR']; $browser = getenv("HTTP_USER_AGENT"); fwrite($bp, "\n$ip, $date, $browser, $domain"); fclose($bp); exit; } { if(strstr($_POST['quote'], $blockword) !== false) { $do_stuff = false; } // So long as the quote is not null, it is stored in the quotes.txt file // NOTE: Permissions need to be set on this file as 777 so that it can be added to automaticaly if ($quote != "") { $date = date("d.m.Y / H:i:s"); $fp = fopen("quotes.txt", "a"); $domain = GetHostByName($REMOTE_ADDR); // If the name is not null, write directly to the quotes.txt, if not, set $name = 'Anon' fwrite($fp, "\n$quote <BR> - $name <BR> <font size='1'> $date</font>"); // close the 'quotes.txt' file fclose($fp); // Mail the quote to me (or if this code is on your site, to you) mail("service@malent.net", "New quote added", "A new quote has been added to 'quotes.txt'\nThe quote was added by: $name\nThe quote added was: $quote\nDate / Time Submitted: $date\nIP: $ip", "From: webmaster@malent.net\r\n"); print "<center><h1>Malent.Net - Feedback Form!<h1></center> <p><strong>New quote added:</strong> $quote</p><p><strong>Added by:</strong> $name</p><p><strong>Timestamp:</strong> <font size='1'> $date </p> <p><B>Your IP</B>: $ip</p></font>"; } print '<strong><p><a href="quote_add.php">Back</a> / <a href="<a href="quote_add. php" onClick="window.close()">Close</a><BR><BR>Your Feedback Comment Is Now Live.<BR>We Thank You For Your Submission.</p>'; } // close the php statement so it is possible to enter normal html, // just dont forget to end the if statement at the end ?> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td class="poptop" height="0"><img src="main/spacer.gif" width="1" height="1"></td> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="1" height="1"></td> </tr> </tr> <tr> <td style="background: #ffffff; padding: 0px" valign="middle"><h1 style="margin-top: 0; margin-bottom: 0"><center>Malent.Net - Feedback Form!</center></h1></td> </tr> <tr> <td class="hrz_line"><img src="main/spacer.gif" width="0" height="0"></td> </tr> <tr> <td valign="top" style="padding: 1em" class="maincontent" height="480"> <table width="100%" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <p>To Submit A Quote, Enter It Along With Your Name.<br> No Name = <strong>'Anonymous'</strong>.</p> <p><strong>Note:</strong> The Quote Will Be Limited To 300 Characters,<br> No HTML, SPAM Allowed.<br>This Window Will Self Destruct In 60 Seconds.</p><br> <form action="quote_add.php?add" method="post" id="quoteform"> <div><label for="nameInput" class="rowA"><strong>Name:</strong></label><input type="text" class="textfield" name="name" size="20" id="nameInput" maxlength="100" /></div> <div><label for="quoteInput" class="rowA"><strong>Quote:</strong></label><textarea onkeypress="return taLimit()" onkeyup="return taCount(myCounter)" class="textfield" name="quote" rows=4 wrap=physical cols=40 maxLength="300"></textarea><font size='1'><left> Number Of Characters Left: <B><SPAN id="myCounter">300</SPAN></left></B></font> </div> <?include('class.passgen.php'); $passGen = new passGen(5); $validate = 0; if(isset($_POST['submit'])){ $hash = $_POST['hash']; $pass = $_POST['pass']; if($passGen->verify($pass, $hash)){ $validate = 1; echo 'Validation OK'; } else { echo 'Validation not OK'; } echo '<br>'; } if($validate == 0){ $hash = $passGen->password(0, 1); echo '<br>'; echo $passGen->images('font', 'gif', 'f_', '16', '20'); echo '<br><br>'; echo'<p><label for="securitycode">Anti-Spam Security: (Required)</label><span style="color:#FF0000;">*</span><br>'; echo '<small>Type The Combination Shown In The Picture.</small><br>'; echo '<input type="hidden" value="'. $hash .'" name="hash">'; echo '<input type="text" value="'. $pass .'" name="pass" size="9" maxlength="9">'; echo '<br><br>'; } ?> <BR><BR><div><input id="submit" type="submit" onclick="check(quoteform,form.elements.length); return true;" onmouseout="this.style.background='#F6EED0';this.style.color='navy';" onmouseover="this.style.background='navy';this.style.color='#F6EED0';" align="absmiddle" tabindex="1" class="submit" value="Submit" /></div><BR><BR> <?php } // end else block ?> </form> </table> </body> </html> EDITTED BY WILDTEEN88: Please use code tags ( ) when posting code with posts. Thank you.
  14. ok got ya one last thing do you see the fputs for the deleting of .txt that should be php related sorry about the javascript I thought the php end had the bug.
  15. have fixed those issues. There's just something else wrong with the check all checkboxes and of course the delete entry from banip.txt
  16. the check all check is not working also the fputs removing a line from banip.txt is not working <script> function CheckAll(){ if(document.frmls.chkAll.checked == true){ for(var j = 0; j < document.frmls.length; j++){ if(document.frmls.elements[j].name == "ids[]"){ document.frmls.elements[j].checked = true; } } } else if(document.frmls.chkAll.checked == false){ for(var j = 0; j < document.frmls.length; j++){ if(document.frmls.elements[j].name == "todelete[$key]"){ document.frmls.elements[j].checked = false; } } } } </script> <?php session_start(); if ($_SESSION[permission] == "1") { } include ("header.php"); $PageTitle = "Banned IP Log"; ?> <h1><?php echo "$PageTitle" ?></h1> <p class="breadcrumb"><a href="admin.php">Administrative Control</a> > <?php echo "$PageTitle" ?></p> <p>This page is designed to report all Banned IPs. From My Site</p> <table> <tr> <td> <?php $file_contents = file("../banip/banip.txt"); // the file $file_contents_deleted = file("../banip/issues_deleted.txt"); // the file // [ DELETE ROUTINE ] if($_POST['action'] == "delete"){ // delete triggered $arrToDelete = $_POST['todelete']; // assign checked items array to var if($arrToDelete != "") { // if the array isnt open proceed foreach($arrToDelete as $key => $value) { // assign a key and value to //each checked item #$file_contents_deleted[count($file_contents_deleted)] = $file_contents[$key]; $file_contents_deleted[] = $file_contents[$key]; array_splice($file_contents, $key, 1, "");// assign null value to each $file_contents = file("../banip/banip.txt"); // the file print("Deleted <b>$value</b><br>"); $file_contents = file("../banip/banip.txt"); // the file foreach($file_contents as $key=>$value){ // assign a key to each line in the file list($entry[0],$entry[1],$entry[2],$entry[3]) = split('[,|]',$value); $entries[]=array('key'=>$key, 'ip'=>$entry[0], 'date'=>$entry[1], 'hostname'=>$entry[2], 'browser'=>$entry[3]); $fp = fopen("../banip/issues_deleted.txt", "r+"); fwrite($fp, "\n$entry[0], $entry[1], $entry[2], $entry[3]"); // write fclose($fp); // close the file $fb = fopen("../banip/banip.txt", "r+"); // open the file for writing fputs($fb, $file_contents[$y]); // write the new file_contents fclose($fb); // close the file } } } } ?> <?php // [ READ & OUTPUT FILE CONTENTS ] ?> <!-- The Form & Table --> <form name="cbox" method="POST" action="<?php $PHP_SELF ?>" style="margin:0;"> <input type="hidden" name="action" value="delete"> <table width="780" height="0" border="0" cellpadding="1" cellspacing="1" class="tablehead"> <tr> <td class="rowA"><input name="chkAll" type="checkbox" id="chkAll" value="1" onClick="CheckAll();" title="Select All"></td> <td class="rowA"><center><strong>IP</strong></td></center> <td class="rowA"><center><strong>Time</strong></center></td> <td class="rowA"><center><strong>Browser</strong></td></center> <td class="rowA"><center><strong>Hostname</strong></center></td> </tr> <?php $file_contents = file("../banip/banip.txt"); // the file foreach($file_contents as $key=>$value){ // assign a key to each line in the file list($entry[0],$entry[1],$entry[2],$entry[3]) = split('[,|]',$value); $entries[]=array('key'=>$key, 'ip'=>$entry[0], 'date'=>$entry[1], 'hostname'=>$entry[2], 'browser'=>$entry[3]); print "<table width=\"780\" height=\"0\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" class=\"tablehead\"> <tr> <td class=\"rowB\"><center><input name=\"todelete[$key]\" type=\"checkbox\" id=\"ids[]\" onClick=\"this.form.chkAll.checked=false; \"></td> <td class=\"rowB\"><center><strong>".$entry[0]."</strong></center></td> <td class=\"rowB\"><center><strong>".$entry[1]."</strong></center></td> <td class=\"rowB\"><center><strong>".$entry[2]."</strong></center></td> <td class=\"rowB\"><center><strong>".$entry[3]."</strong></center></td> </tr>\n"; } ?> <tr> <td colspan="8" align="center" class="\rowB\"><input type="submit" onClick="CheckIfChecked();" value="Remove Resolved Issue"></td> </tr> </table> </form> </td> </table> <br><br><br> <?php include "footer.php" ?> <script language="Javascript1.2"> // © 2000 www.CodeLifter.com // http://www.codelifter.com // Free for all users, but leave in this header // Set the message for the alert box am = "© COPYRIGHT 2007 MaloriaN Entertainment, ALL RIGHTS RESERVED."; // do not edit below this line // =========================== bV = parseInt(navigator.appVersion) bNS = navigator.appName=="Netscape" bIE = navigator.appName=="Microsoft Internet Explorer" function nrc(e) { if (bNS && e.which > 1){ alert(am) return false } else if (bIE && (event.button >1)) { alert(am) return false; } } document.onmousedown = nrc; if (document.layers) window.captureEvents(Event.MOUSEDOWN); if (bNS && bV<5) window.onmousedown = nrc; </script>
  17. i think it is just a session timer.. like you sign in it starts counting down the time. i wish i could turn this into an inactivity one.. with a window pop up do you still wanna be signed in.. blah blah etc.
  18. I have a timer and it times out is there anyway that i can make that timer give the user a window to extend the timer to stay signed on. because everytime it times out the user is no longer signed in on the system so some of the features I am afraid stop working. timer in question is below. thanks <?php include("dbinfo.php"); // Set length of session to twenty minutes define("SESSION_LENGTH", 20); $sConn = @mysql_connect($dbServer, $dbUser, $dbPass) or die("Couldnt connect to database"); $dbConn = @mysql_select_db($dbName, $sConn) or die("Couldnt select database $dbName"); $timeMax = time() - (60* SESSION_LENGTH); $result = mysql_query("select count(*) from usersOnline where unix_timestamp(dateAdded) >= '$timeMax' and permission = '0'"); $usersOnline = mysql_result($result, 0, 0); $resulta = mysql_query("select count(*) from usersOnline where unix_timestamp(dateAdded) >= '$timeMax' and permission = '1'"); $usersOnline2 = mysql_result($resulta, 0, 0); $resultb = mysql_query("select count(*) from usersOnline where unix_timestamp(dateAdded) >= '$timeMax' and permission = '2'"); $usersOnline3 = mysql_result($resultb, 0, 0); $connect = mysql_connect("localhost", "user", "pass") or die("Could not connect to database: " . mysql_error()); mysql_select_db("db", $connect) or die("Could not select database"); $result3 = mysql_query("SELECT COUNT(*) AS count FROM users WHERE permission = '0'"); $row = mysql_fetch_array($result3); $result4 = mysql_query("SELECT COUNT(*) AS count FROM users WHERE permission = '1'"); $row2 = mysql_fetch_array($result4); echo "" . ($usersOnline2 != 1 ? "" : "") . " $usersOnline2 Admin" . ($usersOnline2 != 1 ? "s" : "") ." of $row2[count]. ". " </br> ". ($usersOnline3 != 1 ? "" : "") . " $usersOnline3 Guest" . ($usersOnline3 != 1 ? "s" : "") ."." . " </br> " . ($usersOnline != 1 ? "" : "") . " $usersOnline User" . ($usersOnline != 1 ? "s" : "") ." of $row[count]" . ". "; ?>
  19. ok here is what i am trying to do <? if (isset($_SESSION["logged"])) { &&(isset($_SESSION["permission"] <= "2") { ?> (<? echo $_SESSION["username"];?>: Enjoy The Tunes!)<br> <? } } else { ?> echo "<a href='register.php' onclick='NewWindow(this.href,'client_add','450','480','no');return false' class='field' onMouseOver='window.status='Register with the MaloriaN (PoP-UP)'; return true' onMouseOut='window.status='...:: M a l o r i a N -¤- E n t e r t a i n m e n t -¤- . N e t ::...'; return true' target='blank'>..Register..</a> For Future Benefits. </B></center>"; <? } ?> i know this isnt at all correct but everytime i break it down to fix it i run into more issues and can't even use the username display at all.
  20. if ($_SESSION["permission"] <= "2") { ($_SESSION["username"]; Enjoy The Tunes!) } else {
  21. $timeMax = time() - (60* SESSION_LENGTH); $result = mysql_query("select count(*) from usersOnline where unix_timestamp(dateAdded) >= '$timeMax' and permission ='0'"); $usersOnline = mysql_result($result, 0, 0); $resulta = mysql_query("select count(*) from usersOnline where unix_timestamp(dateAdded) >= '$timeMax' and permission = '1'"); $usersOnline2 = mysql_result($resulta, 0, 0); ok there has to be a way to set a limit .. the numbers just go through the roof. go beyond as many users there can possibly be online is there a way to put a limit in there somehow. the rest of my code is like this. where i get how many total users there are. $result3 = mysql_query("SELECT COUNT(*) AS count FROM users WHERE permission = '0'"); $row = mysql_fetch_array($result3); $result4 = mysql_query("SELECT COUNT(*) AS count FROM users WHERE permission = '1'"); $row2 = mysql_fetch_array($result4); echo "ATM:" . ($usersOnline2 != 1 ? "" : "") . " $usersOnline2 Admin" . ($usersOnline2 != 1 ? "s" : "") ." / $row2[count]" . ", " . ($usersOnline != 1 ? "" : "") . " $usersOnline User" . ($usersOnline != 1 ? "s" : "") ." / $row[count]" . ". "; the bottom code gives away the total admins and regulars on my system. now i am trying to limit the above code to those numbers so only up to 2 admins and users remain.
  22. CBaZ

    users online

    if (permission == 1) { echo "ATM:" . ($usersOnline != 1 ? "" : "") . " $usersOnline Admin" . ($usersOnline != 1 ? "s" : "") ." of $row2[count]" . ", "; } else { echo "ATM:" . ($usersOnline != 1 ? "" : "") . " $usersOnline User" . ($usersOnline != 1 ? "s" : "") ." of $row[count]" . ". "; } this produces no more admin = 0 when logged in as admin says 2 users of 26 online hmmmph
  23. CBaZ

    users online

    it has sum bugs. its not working for me as of now i am sure i gotta change the code the dots ahhh
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.