I'm working with the Gen3 script.
Parse error: syntax error, unexpected T_STRING in path/to/index.php on line 14
Not sure why?
Thanks a lot for any help offered!
Header:
<?php
if(!defined("START_PROCESS")) { die(""); }
$title = $ref_title . " - ". $set['title'];
$kw = $set['keywords'];
$desc = $set['desc']; //desc
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><?php print $title ?></title>
<meta http-equiv="content-type" content="en-gb">
<meta http-equiv="keywords" content="<?php print $kw; ?>">
<meta http-equiv="description" content="<?php print $desc; ?>">
<link href="<?php print $do->get_loc(); ?>themes/GeN3/style.css" type="text/css" rel="stylesheet">
<script type="text/javascript" src="<?php print $do->get_loc(); ?>themes/GeN3/js/ads_pb.php"></script>
<script type="text/javascript" src="<?php print $do->get_loc(); ?>themes/GeN3/js/principal2.js"></script>
<script type="text/javascript" src="<?php print $do->get_loc(); ?>themes/GeN3/js/cb.js"></script>
</head>
<body>
<div id="container">
<div id="header">
<div class="header_contain">
<div id="top-container">
<?php
$location = $do->get_loc();
$currentFile = $_SERVER["SCRIPT_NAME"];
$parts = Explode('/', $currentFile);
$currentFile = $parts[count($parts) - 1];
if($loggedin) {
print "<div id="top"> <img src="images/logo.png" class="master-sprite" id="logo">
<div id="top-main">
<div id="top-search">
<form action=\"#\" method="post" class="search-form"
<table border=\"0\" cellpadding="3" cellspacing="0" align="center">
<tr>
<td> <font color=\"#000000\">Welcome, <strong>{$r['username']}</strong></font></td>
<td> <INPUT TYPE="button" onClick="parent.location='page.html'" value="Manage Your Account"></td>
</td>
</tr>
</table>
</form>
</div>
<div id="top-nav-main"> <a href="$location}index.php" >Home</a> <a href="$location}ads.php" >Watch Videos</a>
<a href=\"#\" >FAQ</a> </div>
</div>
<div id="top-user">
<div id="top-utility"> <a href="{$location}logout.php" >Log Out</a> </div>
<div id="top-nav-user"> <a href="$location}adver.php" >Advertise</a> <a href="$location}forum" >Forum</a>
<a href="$location}contact.php">Contact</a> </div>
</div>
<div id="top-end"></div>
</div>";
} else {
print "<div id="top"> <img src="images/logo.png" class="master-sprite" id="logo"/>
<div id="top-main">
<div id="top-search">
<form action="login.php" method="post" class="search-form">
<table border="0" cellpadding="3" cellspacing="0" align="center">
<tr>
<td> <input type="text" size="15" maxlength=\"80\"name="username" autocomplete="off"></td>
<td> <input type="password" size="15" maxlength=\"80\" name="password" autocomplete="off"> </td>
<td> <img src="image.php" onclick="this.src='image.php?newtime=' + (new Date()).getTime();">(Click to reload)</td>
<td><input type="text" name="code" size="3" maxlength=\"3\" autocomplete="off"> </td>
<td> <input type="submit" value="Login" name="loginsubmit"> </td>
</tr>
</table>
</form>
</div>
<div id="top-nav-main"> <a href="$location}index.php" >Home</a> <a href="$location}ads.php" >Watch Videos</a>
<a href=\"#\" >FAQ</a> </div>
</div>
<div id="top-user">
<div id="top-utility"> <a href="$location}register.php" >Register Now!</a> </div>
<div id="top-nav-user"> <a href="$location}adver.php" >Advertise</a> <a href="$location}forum" >Forum</a>
<a href="$location}contact.php">Contact</a> </div>
</div>
<div id="top-end"></div>
</div>";
}
?>
</div>
</div>
</div>
<div id="main">
<div class="main2">
<center>
Main:
<?php
if(!defined('GEN2_PROCESS')) { exit(); }
$ref_title = "Homepage";
$contents = "<img src="images/main_image.png" width="706" height="216" style="padding-left: 50px;" /><br />
<br />
<img src="images/2boxes.png" />
<br />
<br />
<br />
<b style=\"font-size: 30px; color: #000000;\">Test</b> <br>
<b style=\"font-size: 15px; color: #000000;\">Test</b><br>
</center>
</div>
</div>";
?>
Footer:
<?php
//This prevents SQL Code injection / XSS Attacks.
function replace_meta_chars($string){
return @eregi_replace("([*])|([|])|([;]|([`])","",$string);
}
while(list($keyx,$valuex) = each($_REQUEST)){
if(eregi("([*])|([|])|([;])",$valuex)){
mail($set['contact_email'],"Hack Alert","There's been a SQL Injection hacking attempt. $HTTP_REFERRER $REMOTE_ADDR","FROM:".$ir['email']);
}
}
reset ($_REQUEST);
while(list($keyx,$valuex) = each($_REQUEST)){
${$keyx} = replace_meta_chars($valuex);
print(${$keyx});
}
//end anti SQL XSS script.
if(!defined("START_PROCESS")) { die(""); }
$copyright_f = "Powered by <a href='http://www.ptcpay.com/shop' target='_blank'><font color=white size='2'>GeN3 Version 1.3</font></a><br />";
?>
<div id="footer">
<div class="copyright"> <i>© 2009 <a href="#">TubeRev.com</a>
TubeRev is not affiliated with <a href="http://www.youtube.com/">YouTube</a>.</i>
<b><a href="#">Home</a>
/ <a href="#">Terms</a> / <a href="#">Privacy</a> /
<a href="#">Banner Advertising</a> / <a href="#">Contact</a>
<!--/ <a href="#">Forum</a>-->
</b> <br>
Youtube Advertising and Youtube Marketing Platform </div>
</div>
</div>
</div>
</body>
</html>
<?php
$do->finish_script_executions();
?>