Jump to content

[SOLVED] Parse error: syntax error, unexpected T_IF


Cathering_

Recommended Posts

I keep getting the following error:

Parse error: syntax error, unexpected T_IF in /mnt/web5/43/99/51551199/htdocs/process/complain.php on line 145

But I cant find anything to cause it heres code which was really a draft:

<?php include("http://www.freemoviesonline.eu/php/topdoc.php"); ?>
<!-- nothing in that include right now...-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html>
<head>

<?php include("http://www.freemoviesonline.eu/php/head.php"); ?>
<!--Heres the code in the PHP include-->
<meta http-equiv="content-type" content="text/html;charset=iso-8859-1" />
<meta name="Author" content="Jordan W" />
<meta name="Subject" content="Movies" />
<meta http-equiv="content-LANGUAGE" content="EN-GB" />
<meta name="Robots" content="all,index,follow" />
<meta name="Designer" content="Arcsin" />
<meta name="Revisit-After" content="3 Days" />
<meta name="Rating" content="general" />
<meta name="Distribution" content="IU" />
<meta http-equiv="VW96.OBJECT TYPE" content="entertainment - site" />
<script type="text/javascript" src="http://www.freemoviesonline.eu/js/bookmark.js"></script>
<script type="text/javascript" src="http://www.freemoviesonline.eu/js/cookiehandler.js"></script>
<script type="text/javascript" src="http://www.freemoviesonline.eu/js/alertopera.js"></script>
<script type="text/javascript" src="http://www.freemoviesonline.eu/js/menucrush.js"></script>
<script type="text/javascript">
function validsearch(){if(document.search.q.value==""){
alert("You have nothing to search!");
document.search.q.focus();
return false;}}
  if(navigator.appName=="Opera"){AlertOpera();}
  addthis_url = 'http://www.freemoviesonline.eu/';   
  addthis_title = 'Free Movies Online - Your source for free online movies!';  
  addthis_pub = 'FRHYO3HYBIPHJ2TY';
</script>
<link rel="stylesheet" type="text/css" href="http://www.freemoviesonline.eu/default.css" />
<!-- End of PHP Include-->


<title>...</title>
</head>
<body onload="initValidation();">
<?php include("http://www.freemoviesonline.eu/php/topbody.php"); ?>
<!--Heres the code in the PHP include-->

<div id="main">

<div id="main_left">

	<div id="header">
		<p><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><a href="http://www.freemoviesonline.eu/"><img src="http://www.freemoviesonline.eu/img/logotext.gif" title="Free Movies Online - Your source for free online movies!" alt="Free Movies Online"/></a></p>
	</div>
	<div id="navigation">
		<ul>
			<li><a href="http://www.freemoviesonline.eu/index.php" onmouseover="window.status='Home - '+this.title;return true;" onmouseout="window.status='';return true;" title="View are homepage.">Home</a></li>
			<li><a href="http://www.freemoviesonline.eu/about.php" onmouseover="window.status='About Us - '+this.title;return true;" onmouseout="window.status='';return true;" title="This will help you get to know us little better!">About Us</a></li>
			<li><a href="http://movies.freemoviesonline.eu/index.php" onmouseover="window.status='Watch A Movie - '+this.title;return true;" onmouseout="window.status='';return true;" title="Bored? Then watch a movie!">Watch A Movie</a></li>
			<li><a href="http://www.freemoviesonline.eu/contact.php" onmouseover="window.status='Contact Us - '+this.title;return true;" onmouseout="window.status='';return true;" title="Contact us for almost any reason.">Contact Us</a></li>
			<li class="displayfalse" id="lijs"><a href="javascript:bookmarksite('Free Movies Online - Your source for free online movies!', 'http://www.freemoviesonline.eu/')" onmouseover="window.status='Add Us To Favorites - '+this.title;return true;" onmouseout="window.status='';return true;" title="Add us so you can come back and get more movies! Best of all you won't forget!">Add Us To Favorites</a></li>
</ul>
	</div>
<script type="text/javascript">
<!--
if(navigator.appName!="Opera")
{document.getElementById("lijs").className="displaytrue";}
-->
</script>
<!-- End of PHP Include-->

<!-- MAIN CONTENT - START -->
<div id="content">

		<h1>Contact Us - Complaint</h1>
		<div class="descr"></div>

		<div class="post_body">

<?php

$firstname= strip_tags($_POST["First_Name"]);
$lastname= strip_tags($_POST["Last_Name"]);
$email= strip_tags($_POST["Email"]);
$confirmemail= strip_tags($_POST["Confirm_Email"]);
$complainabout= strip_tags($_POST["Complaining_About"]);
$complainreason= strip_tags($_POST["Why_Complain"]);

function nosymbols($field)
{
  if(!preg_match("/[^a-zA-Z\Ä\ä\Ö\ö\Ü\ü]+$/s",$field))
    return TRUE;
  else
    return FALSE;
}

function checkEmail($emailaddy) 
{
   if(eregi("^[a-zA-Z0-9_]+@[a-zA-Z0-9\-]+\.[a-zA-Z0-9\-\.]+$]", $emailaddy)) 
   {
      return FALSE;
   }

   list($Username, $Domain) = split("@",$emailaddy);

   if(getmxrr($Domain, $MXHost)) 
   {
      return TRUE;
   }
   else 
   {
      if(fsockopen($Domain, 25, $errno, $errstr, 30)) 
      {
         return TRUE; 
      }
      else 
      {
         return FALSE; 
      }
   }
}

function spamcheck($spamfield)
  {
  if(eregi("to:",$spamfield) || eregi("cc:",$spamfield)) 
    {
    return TRUE;
    }
  else
    {
    return FALSE;
    }
  }

$submitingornot =$_POST["valid"];
$emailedyet="false"
if($submiting=="gen"){ //The error line, it was ment to check if we where actuly submiting the page & not some person paying a random visit
$errortext="";

require_once('recaptchalib.php');
$privatekey = "***************************************"; //Covered, checks if security code is corect
$resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
$errortext = '<span style="color:#FF6600;">The security code you entered is invalid please retype it.</span>';
}
else
{

if(!nosymbols($firstname))
{$errortext = '<span style="color:#FF6600;">Please enter your first name. (It also must not contain any symbols.)</span>';}
elseif(!nosymbols($lastname))
{$errortext = '<span style="color:#FF6600;">Please enter your last name. (It also must not contain any symbols.)</span>';}
elseif(checkEmail($email) == FALSE) 
{$errortext = '<span style="color:#FF6600;">Please enter a valid email in the valid email field!</span>';}
elseif($confirmemail!=$email)
{$errortext = '<span style="color:#FF6600;">The Email and Confirm Email fields are not the same.</span>';}
elseif(empty($complainabout))
{$errortext = '<span style="color:#FF6600;">Please tell us what you are complaining about or we can not help!</span>';}
elseif(strlen($complainreason)>3000||strlen($complainreason)<1)
{$errortext = '<span style="color:#FF6600;">The Why are you complaining field must contain at least 1 letter and at most 3000.</span>';}

else {
if(spamcheck($email)==TRUE){
$errortext = '<span style="color:#FF6600;">You have tried to do a Email injection. Processing halted!</span>';
mail("abuse@freemoviesonline.eu", "Subject: PHP Form Processor: Email Injection", "The IP $_SERVER["REMOTE_ADDR"] tried to inject email headers into the form processor please add this IP to the blacklist makeing this IP enable to submit contact forms.", "From: null@null.com" );
}
else{

mail("contactus@freemoviesonline.eu", "Subject: Contact Us: Complaint", "
IP: $_SERVER["REMOTE_ADDR"]<br />
Full Name: $firstname $lastname<br />
Email: $email<br />
<br />
What are you complaining about? $complainabout<br />
<br />
Why are you complaining about it? $complainreason", "From: $email");

mail($email, "Subject: Free Movies Online: Complaint", "We are sorry to hear that you are complaining about are service are staff<br />
will be reviewing your complaint and then will make a reply to tell you if<br />
anything will be done about it and if not why, thank you for takeing the <br />
time for contacting us we usally reply within 1 hour - 48 hours, Thank you.<br />
<b><u>This is Automated Please do not reply back.</u></b>", "From: freemoviesonline@freemoviesonline.eu");
$emailture="ture";
$errortext="";
}}}}
else{echo '';}

?>
<?php if($emailture=="ture"){
echo '<span style="color:#00FF00;">Thank you, the form has been send, we will try to reply to you within 1 hour - 48 hours.</span><span style="display:none;">';
} ?>
<p>Please Tell Us why you are makeing a complaint</p>
<br />
<p align="left">
<?php echo $errortext; ?><br /><br />
<map id="null">
<form name="contactus" method="post" action="http://www.freemoviesonline.eu/process/complain.php" onsubmit="return validateStandard(this, 'error');">
<input type="hidden" name="valid" value="gen" />
<label for="a1">First Name:</label><br />
<input size="50" name="First_Name" class="input" value="<?php echo $firstname; ?>" onkeypress="return handleEnter(this, event)" type="text"  id="a1" />

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'We like to address people by there full name.\', this, event, \'150px\')" />');
-->
</script>

<br /><br />
<label for="a2">Last Name:</label><br />
<input size="50" name="Last_Name" class="input" value="<?php echo $lastname; ?>" onkeypress="return handleEnter(this, event)" type="text" id="a2" />

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'We like to address people by there full name.\', this, event, \'150px\')" />');
-->
</script>

<br /><br />
<label for="a3">Valid Email:</label><br />
<input size="50" name="Email" class="input" style="text-transform:lowercase;" value="<?php echo $email; ?>" onkeypress="return handleEnter(this, event)" type="text"  id="a3" />

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'A valid email please!<br />We want your email so that we can reply to your message. (We try to reply within 1 hour - 48 hours.) We do not give out information nor do we spam.\', this, event, \'150px\')" />');
-->
</script>

<br /><br />
<label for="a4">Confirm Email:</label><br />
<input size="50" name="Confirm_Email" class="input" style="text-transform:lowercase;" value="<?php echo $confirmemail; ?>" onkeypress="return handleEnter(this, event)" type="text"  id="a4" />

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'This helps you check if your email is correct. If the two fields are not the same you will be alerted about it.\', this, event, \'150px\')" />');
-->
</script>

<br /><br />
<label for="a5">What are you complaining about:</label><br />
<input size="50" name="Complaining_About" class="input" onkeypress="return handleEnter(this, event)" type="text" value="<?php echo $complainabout; ?>" id="a5" maxlength="100" />

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'So you want to complain, what do you want to complain about?\', this, event, \'150px\')" />');
-->
</script>

<br /><br />
<label for="a6">Why are you complaining about it:</label>

<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'Why are you complaining about this certain thing?\', this, event, \'150px\')" />');
-->
</script>
<br />
<textarea cols="40" rows="7" class="input" name="Why_Complain" id="a6"><?php echo $complainreason; ?></textarea>
<br />
<script type="text/javascript">
<!--
displaylimit("","a6",3000)
-->
</script>
<noscript>No more than 3000 letters</noscript>
<br />
<br />
<br />
<b>Security code</b>: Please type the words you see below.
<script type="text/javascript">
<!--
document.write('   <img src="http://www.freemoviesonline.eu/img/info.gif" alt="Hint" onmouseover="showhint(\'This helps confirm you are human.\', this, event, \'150px\')" />');
-->
</script>
<script type="text/javascript">
<!--
var RecaptchaOptions = {
   theme : 'white'
};
-->
</script>
<br />
<script type="text/javascript" src="http://api.recaptcha.net/challenge?k=6Le2IwAAAAAAAIYVC0nvAQ7tuYE0Jx0j5rO1w80L"></script>
<br />
<script type="text/javascript">
<!--
document.write('<i>There is a giant space between the two words that counts as one space! (The words do not contain any symbols.)</i>');
-->
</script>

<noscript>
   <iframe src="http://api.recaptcha.net/noscript?k=6Le2IwAAAAAAAIYVC0nvAQ7tuYE0Jx0j5rO1w80L" style="height:300px;width:500px;" frameborder="0"></iframe><br />
   <textarea name="recaptcha_challenge_field" rows="3" cols="40">
   </textarea>
   <input type="hidden" name="recaptcha_response_field" value="manual_challenge" />
<br /><i>If you do not have javascript enabled and cannot display javascript please post in the surpport forum so we can help you</i><br />
<i>There is a giant space between the two words that counts as one space! (The words do not contain any symbols.)</i>
</noscript>

<br /><br /><br />
<input type="submit" name="Sub" value="Submit" /> <input type="reset" name="Res" value="Cancel" />
</form>
</map>
</p>
<?php if($emailture=="true"){echo '</span>';} ?>
</div>

	</div>

</div>
<!-- MAIN CONTENT END -->
<?php include("http://www.freemoviesonline.eu/php/bodyend.php"); ?>
<!--no need to view this.-->

Any ideas? im confused  ??? ??? ??? ???

Link to comment
Share on other sites

$emailedyet="false"
if($submiting=="gen"){ //The error line, it was ment to check if we where actuly submiting the page & not some person paying a random visit

 

You missed the semi-colon after "false"

Link to comment
Share on other sites

change lines 132, 165 and 170 to

...
$emailedyet="false";
...
mail("abuse@freemoviesonline.eu", "Subject: PHP Form Processor: Email Injection", "The IP ".$_SERVER["REMOTE_ADDR"]." tried to inject email headers into the form processor please add this IP to the blacklist makeing this IP enable to submit contact forms.", "From: null@null.com" );
...
IP: ".$_SERVER["REMOTE_ADDR"]."<br />

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.