Jump to content

Line 108 error...


Warptweet

Recommended Posts

Hi there, I have this code.
It gives me a parse error on LINE 108

[code]<html>
<style>
body {
scrollbar-face-color:#656565;
scrollbar-track-color:#454545;
scrollbar-darkshadow-color:#454545;
scrollbar-3dlight-color:#202020;
scrollbar-shadow-color:#ffdf12;
scrollbar-highlight-color:#ffdf12;
scrollbar-arrow-color:#ffdf12;
}
</style>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Warptweet.com</title>
</head>

<body background="http://www.warptweet.com/images/warpback.PNG" text="#FFDF12" link="#FFDF12" vlink="#FFFF12" alink="#FFFF00">

<div align="center" style="width: 960; height: 696">
  <center>
  <p>
  <img border="0" src="http://www.warptweet.com/images/warpbanner.PNG" width="425" height="75"><a href="http://www.warptweet.com"></p>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="762" height="1">
    <tr>
      <td width="760" height="27" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2">
      <?php
include("http://www.warptweet.com/phpchange/menu.php");
?></td>
    </tr>
    <tr>
      <td width="760" height="1" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2">
      <font size="2">Welcome, Guest!</font></td>
    </tr>
    <tr>
      <td width="156" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" background="http://www.warptweet.com/images/warpnavi.PNG" bordercolor="#FFFFFF">
      <font size="2">
      <img border="0" src="http://www.warptweet.com/images/warpnavitop.PNG" width="158" height="4"><br>
      Side Navigation</font><p><font size="2"><?php
include("http://www.warptweet.com/phpchange/sidebar.php");
?></font></td>
      <td width="603" height="640" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="left">
      <?php

function generate_rand($l){
$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
for($i=0; $i<$l; $i++)
{
$rand.= $c[rand()%strlen($c)];
}
return $rand;
}

$uploaddir = "./211612151419/";
$maxfilesize = 20971520; //1 megabyte
$filename = $_FILES['file']['name'];
$filesize = $_FILES['file']['size'];
$min_deslenngth = 20;
$min_nalenngth = 5;
$min_aulenngth = 2;
$flashage = 0;
$flashcommentary = $_POST['flashcommentary'];
$filetmpname = $_FILES['file']['tmp_name'];
$valid = array (".swf");
if ($filename) {
$error = "";
if ($filesize == 0) {
$error .= "The submitted file was invalid.<br />";
}
$type = strtolower(strstr($filename, '.'));
if (!in_array($type, $valid)) {
$error .= "The file you uploaded must be of a Flash(.swf) file extension!<br />";
}
if (!$_POST['flashname']){
$error .= "You did not enter the Flash Name!<br />";
}
if (!$_POST['flashauthor']){
$error .= "You did not enter the Flash Author!<br />";
}
if (!$_POST['flashdescription']){
$error .= "You did not enter a Description!<br />";
}
if (!$_POST['flashcommentary']){
$error .= "You did not enter a Commentary!<br />";
}
if ($filesize>$maxfilesize) {
$error .= "The submitted file was larger than a Megabyte.<br />";
}
$randnum = generate_rand(10);
$randnum .= $type;
$file_exists = true;
while ($file_exists) {
if (file_exists("$uploaddir$randnum")) {
$randnum = generate_rand(10);
$randnum .= $type;
}else{  //50
$file_exists = false;
}
}
if ($error == "") {
if (move_uploaded_file($filetmpname, "$uploaddir$randnum")) {
chmod("$uploaddir$randnum", 0644);
echo "Your file was successfully uploaded!<br /></br>You can temporarily view this page by clicking <a href=\"http://www.warptweet.com/211612151419/$_POST['flashname'].php\">here</a></br>";
if($_POST['flashviolence']=="1"){
$flashviolence = "";
}  //60
if($_POST['flashviolence']=="2"){
$flashviolence = "Mild Violence</br>";
$flashage += 3;
}
if($_POST['flashviolence']=="3"){
$flashviolence = "<b>Excessive Violence</b></br>";
$flashage += 8;
}
if($_POST['flashviolence']=="4"){
$flashviolence = "<b><i>Extreme Violence</b></i></br>";
$flashage += 13;
}
if($_POST['flashaudio']=="1"){
$flashaudio = "";
}
if($_POST['flashaudio']=="2"){
$flashaudio = "Mild Explicit Audio</br>";
$flashage += 8;
}
if($_POST['flashaudio']=="3"){
$flashaudio = "<b>Excessive Explicit Audio</b></br>";
$flashage += 13;
}
if($_POST['flashaudio']=="4"){
$flashaudio = "<b><i>Extremely Explicit Audio</b></i></br>";
$flashage += 18;
}
if($_POST['flashtext']=="1"){
$flashtext = "";
}
if($_POST['flashtext']=="2"){
$flashtext = "Mild Explicit Text</br>";
$flashage += 8;
}
if($_POST['flashtext']=="3"){
$flashtext = "<b>Excessive Explicit Text</b></br>";
$flashage += 13;
}
if($_POST['flashtext']=="4"){
$flashtext = "<b><i>Extremely Explicit Text</b></i></br>";
$flashage += 18;
}
if($_POST['flashadult']=="1"){
$flashadult = "";
}
if($_POST['flashadult']=="2"){
$flashadult = "Mild Adult Themes</br>";
$flashage += 8;
}
if($_POST['flashadult']=="3"){  //100
$flashadult = "<b>Excessive Adult Themes</b></br>";
$flashage += 13;
}
if($_POST['flashadult']=="4"){
$flashadult = "<b><i>Extreme Adult Themes</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="1"){[/code]

Anyone know whats wrong?
By the way, I'm not sure if I counted the lines correctly, so I suggest you try finding line 108 yourself :(
Link to comment
Share on other sites

I suggest you download a text editor with line numbering, such as Textpad. (Plus, indent your php code, not just the html)
108 is
echo "Your file was successfully uploaded!<br /></br>You can temporarily view this page by clicking <a href=\"http://www.warptweet.com/211612151419/$_POST['flashname'].php\">here</a></br>";
which looks okay to me...

Can you post the actual error?
Link to comment
Share on other sites

Here is my new code...

[code]<html>
<style>
body {
scrollbar-face-color:#656565;
scrollbar-track-color:#454545;
scrollbar-darkshadow-color:#454545;
scrollbar-3dlight-color:#202020;
scrollbar-shadow-color:#ffdf12;
scrollbar-highlight-color:#ffdf12;
scrollbar-arrow-color:#ffdf12;
}
</style>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Warptweet.com</title>
</head>

<body background="http://www.warptweet.com/images/warpback.PNG" text="#FFDF12" link="#FFDF12" vlink="#FFFF12" alink="#FFFF00">

<div align="center" style="width: 960; height: 696">
  <center>
  <p>
  <img border="0" src="http://www.warptweet.com/images/warpbanner.PNG" width="425" height="75"><a href="http://www.warptweet.com"></p>
  <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="762" height="1">
    <tr>
      <td width="760" height="27" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2">
      <?php
include("http://www.warptweet.com/phpchange/menu.php");
?></td>
    </tr>
    <tr>
      <td width="760" height="1" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" colspan="2">
      <font size="2">Welcome, Guest!</font></td>
    </tr>
    <tr>
      <td width="156" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="center" background="http://www.warptweet.com/images/warpnavi.PNG" bordercolor="#FFFFFF">
      <font size="2">
      <img border="0" src="http://www.warptweet.com/images/warpnavitop.PNG" width="158" height="4"><br>  // 50
      Side Navigation</font><p><font size="2"><?php
include("http://www.warptweet.com/phpchange/sidebar.php");
?></font></td>
      <td width="603" height="640" bordercolorlight="#454545" bordercolordark="#454545" bgcolor="#454545" valign="top" align="left">
      <?php

function generate_rand($l){
$c= "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
srand((double)microtime()*1000000);
for($i=0; $i<$l; $i++)
{
$rand.= $c[rand()%strlen($c)];
}
return $rand;
}

$uploaddir = "./211612151419/";
$maxfilesize = 20971520; //1 megabyte
$filename = $_FILES['file']['name'];
$filesize = $_FILES['file']['size'];
$min_deslenngth = 20;
$min_nalenngth = 5;
$min_aulenngth = 2;
$flashage = 0;
$flashcommentary = $_POST['flashcommentary'];
$filetmpname = $_FILES['file']['tmp_name'];
$valid = array (".swf");
if ($filename) {
$error = "";
if ($filesize == 0) {
$error .= "The submitted file was invalid.<br />";
}
$type = strtolower(strstr($filename, '.'));
if (!in_array($type, $valid)) {
$error .= "The file you uploaded must be of a Flash(.swf) file extension!<br />";
}
if (!$_POST['flashname']){
$error .= "You did not enter the Flash Name!<br />";
}
if (!$_POST['flashauthor']){
$error .= "You did not enter the Flash Author!<br />";
}
if (!$_POST['flashdescription']){
$error .= "You did not enter a Description!<br />";
}
if (!$_POST['flashcommentary']){
$error .= "You did not enter a Commentary!<br />";
}  // 100
if ($filesize>$maxfilesize) {
$error .= "The submitted file was larger than a Megabyte.<br />";
}
$randnum = generate_rand(10);
$randnum .= $type;
$file_exists = true;
while ($file_exists) {
if (file_exists("$uploaddir$randnum")) {
$randnum = generate_rand(10);
$randnum .= $type;
}else{  //50
$file_exists = false;
}
}
if ($error == "") {
if (move_uploaded_file($filetmpname, "$uploaddir$randnum")) {
chmod("$uploaddir$randnum", 0644);
echo "Your file was successfully uploaded!<br />";
if($_POST['flashviolence']=="1"){
$flashviolence = "";
}  //60
if($_POST['flashviolence']=="2"){
$flashviolence = "Mild Violence</br>";
$flashage += 3;
}
if($_POST['flashviolence']=="3"){
$flashviolence = "<b>Excessive Violence</b></br>";
$flashage += 8;
}
if($_POST['flashviolence']=="4"){
$flashviolence = "<b><i>Extreme Violence</b></i></br>";
$flashage += 13;
}
if($_POST['flashaudio']=="1"){
$flashaudio = "";
}
if($_POST['flashaudio']=="2"){
$flashaudio = "Mild Explicit Audio</br>";
$flashage += 8;
}
if($_POST['flashaudio']=="3"){
$flashaudio = "<b>Excessive Explicit Audio</b></br>";
$flashage += 13;
}
if($_POST['flashaudio']=="4"){
$flashaudio = "<b><i>Extremely Explicit Audio</b></i></br>";
$flashage += 18;
} // 150
if($_POST['flashtext']=="1"){
$flashtext = "";
}
if($_POST['flashtext']=="2"){
$flashtext = "Mild Explicit Text</br>";
$flashage += 8;
}
if($_POST['flashtext']=="3"){
$flashtext = "<b>Excessive Explicit Text</b></br>";
$flashage += 13;
}
if($_POST['flashtext']=="4"){
$flashtext = "<b><i>Extremely Explicit Text</b></i></br>";
$flashage += 18;
}
if($_POST['flashadult']=="1"){
$flashadult = "";
}
if($_POST['flashadult']=="2"){
$flashadult = "Mild Adult Themes</br>";
$flashage += 8;
}
if($_POST['flashadult']=="3"){  //100
$flashadult = "<b>Excessive Adult Themes</b></br>";
$flashage += 13;
}
if($_POST['flashadult']=="4"){
$flashadult = "<b><i>Extreme Adult Themes</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="1"){
$flashnudity = "";
}
if($_POST['flashnudity']=="2"){
$flashnudity = "Mild Nudity</br>";
$flashage += 8;
}
if($_POST['flashnudity']=="3"){
$flashnudity = "<b>Excessive Nudity</b></br>";
$flashage += 13;
}
if($_POST['flashnudity']=="4"){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="4"){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="4"){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;
}
if($_POST['flashnudity']=="4"){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;
}
if ($flashage > 2){
$flashrecommended = "ages 3 and above.";
}
if ($flashage > 7){
$flashrecommended = "ages 8 and above.";
}
if ($flashage > 12){
$flashrecommended = "ages 13 and above.";
}
if ($flashage > 17){
$flashrecommended = "ages 18 and above.";
}
$o = fopen("211612151419/".$_POST['flashname'].".php", "w");
$stringData = "<html>
<style>
body {
scrollbar-face-color:#656565;
scrollbar-track-color:#454545;
scrollbar-darkshadow-color:#454545;
scrollbar-3dlight-color:#202020;
scrollbar-shadow-color:#ffdf12;
scrollbar-highlight-color:#ffdf12;
scrollbar-arrow-color:#ffdf12;
}
</style>

<head>
<meta http-equiv=\"Content-Language\" content=\"en-us\">
<meta name=\"GENERATOR\" content=\"Microsoft FrontPage 5.0\">
<meta name=\"ProgId\" content=\"FrontPage.Editor.Document\">
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">
<title>Warptweet.com</title>
</head>

<body background=\"http://www.warptweet.com/images/warpback.PNG\" text=\"#FFDF12\" link=\"#FFDF12\" vlink=\"#FFFF12\" alink=\"#FFFF00\">

<div align=\"center\" style=\"width: 960; height: 696\">
  <center>
  <p>
  <a href=\"http://www.warptweet.com\">
  <img border=\"0\" src=\"http://www.warptweet.com/images/warpbanner.PNG\" width=\"425\" height=\"75\" alt=\"Copyright 2007 Warptweet.com\"></p>
  <table border=\"1\" cellpadding=\"0\" cellspacing=\"0\" style=\"border-collapse: collapse\" bordercolor=\"#111111\" width=\"762\" height=\"1\">
    <tr>
      <td width=\"760\" height=\"27\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" colspan=\"2\">
      <?php
include(\"http://www.warptweet.com/phpchange/menu.php\");
?></td>
    </tr>
    <tr>
      <td width=\"760\" height=\"1\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" colspan=\"2\">
      <font size=\"2\">Welcome, Guest!</font></td>
    </tr>
    <tr>
      <td width=\"156\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"center\" background=\"http://www.warptweet.com/images/warpnavi.PNG\" bordercolor=\"#FFFFFF\" rowspan=\"4\">
      <font size=\"2\">
      <img border=\"0\" src=\"http://www.warptweet.com/images/warpnavitop.PNG\" width=\"158\" height=\"4\"><br>
      Side Navigation</font><p><font size=\"2\"><?php
include(\"http://www.warptweet.com/phpchange/sidebar.php\");
?></font></td>
      </a><body>
    </tr>
      <tr>
      <td width=\"603\" height=\"15\" bordercolorlight=\"#454545\" bordercolordark=\"#454545\" bgcolor=\"#454545\" valign=\"top\" align=\"left\">
";
fwrite($o, $stringData);
$stringData = $_POST['flashname'];
fwrite($o, $stringData);
$stringData = "</br></br>";
fwrite($o, $stringData);
$stringData = $_POST['flashauthor'];
fwrite($o, $stringData);
$stringData = "</br></br>";
fwrite($o, $stringData);
$stringData = $_POST['flashdescription'];
fwrite($o, $stringData);
$stringData = "</br></br>";
fwrite($o, $stringData);
$stringData = "Commentary:<br> $flashcommentary"; //131
fwrite($o, $stringData);
$stringData = "</br></br>";
fwrite($o, $stringData);
$stringData = "$flashviolence$flashaudio$flashtext$flashadult$flashnudity<br></br>";
fwrite($o, $stringData);
$stringData = "Recommended for $flashrecommended</br></br>";
fwrite($o, $stringData);
if($_POST['flashtypes']=="1"){
$stringData = "<b><FONT SIZE=+3><A HREF=\"javascript:void(0)\"
ONCLICK=\"window.open('http://www.warptweet.com/211612151419/$randnum','miniwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=$flashwidth,height=$flashheight')\">Watch this Movie!</a></font>";
fwrite($o, $stringData);
}
if($_POST['flashtypes']=="2"){
$stringData = "<b><FONT SIZE=+3><A HREF=\"javascript:void(0)\"
ONCLICK=\"window.open('http://www.warptweet.com/211612151419/$randnum','miniwin','toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=$flashwidth,height=$flashheight')\">Play this Game!</a></font>";
fwrite($o, $stringData);
}

$stringData = "<body></td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>";
fwrite($o, $stringData);
fclose($o);
} else {
echo "Your file could not be uploaded.";
}
}else{
echo $error;
}
}else{
echo "No file was uploaded";
}
?><body></td>
    </tr>
  </table>
  </center>
</div>

</body>

</html>[/code]

Here is my error:
Parse error: parse error, unexpected '>' in /home/warp/public_html/uploadprocess.php on line 185
Link to comment
Share on other sites

You can see the error. See where the colors start looking funky?

if($_POST['flashnudity']=="){
$flashnudity = "<b><i>Extreme Nudity</b></i></br>";
$flashage += 18;

You open a string and never close it. Download Textpad, turn on Syntax Highlighting, and this will help avoid these little errors.
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.