/    Sign up×
Community /Pin to ProfileBookmark

Read terms before advance

Hi, I am trying to make a page with terms of my site. If you click yes you agree you have been granted access, if you click No it will do nothing. You will stay right on that page and nothing will happen.

How would I code this?

to post a comment
PHP

43 Comments(s)

Copy linkTweet thisAlerts:
@bokehAug 12.2005 — Well to make it work you would need to protect all your pages. Put the following at the top of all pages on the site.
[code=php]<?php
if(!isset($_COOKIE['terms'])){
header('Location: http://'.$_SERVER['HTTP_HOST'].'/terms.php');
}
?>[/code]


And the following code save in a file called terms.php, save this file at document/http root.

[code=php]<?php
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{

echo <<<END

<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form

END;

}

?>[/code]

Now just beautify that last script and make the html validate.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — Thank you ? Just 1 problem, goto:

http://djshawnmichaels.com/downloads.php and you will see the problem.

Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /home/djshawnm/public_html/terms.php on line 92

Thank you very much ?

Shawn
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — It worked when I posted it so the problem is in what you have added. Post the whole terms script.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — [code=html]
<HTML>
<HEAD>
<TITLE>Terms of Use</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/terms.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<div align="center"><font face="arial" style="font-size:10px;color:#333333;line-height:16px"> <span class="style1">By agreeing to these terms, you understand Spektron Entertainment Group will not be held liable for problems related to the downloads. All songs and photos are rated for use of all ages. All files are tested and virus scaned before they are loaded to the servers.</span><br>
<br>
<strong><span class="style2">USE AT YOUR OWN RISK<br>
<br><?php
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{

echo <<<END

<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;
}

?>

</span></strong> <br>
</font>
</div></td>
</tr>
</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>
</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>[/code]
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — This line here: echo '<<<END' somehow you have managed to add a whitespace after the 'D'. Remove the trailing whitespace and it will work.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — Do you mean to take the whitespage out meaning: If I move my curser to the right instead of going spaces, it would go direcly down to the next line? I tried that and this is what happened, http://djshawnmichaels.com/download.php

Please let me know if you have any other ideas or if I did something wrong (which is probably the case)

Thanks,

Shawn

[code=html]
<HTML>
<HEAD>
<TITLE>Terms of Use</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/terms.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<div align="center"><font face="arial" style="font-size:10px;color:#333333;line-height:16px"> <span class="style1">By agreeing to these terms, you understand Spektron Entertainment Group will not be held liable for problems related to the downloads. All songs and photos are rated for use of all ages. All files are tested and virus scaned before they are loaded to the servers.</span><br>
<br>
<strong><span class="style2">USE AT YOUR OWN RISK<br>
<br>
<?php
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{

echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;
}

?>

</span></strong> <br>
</font>
</div></td>
</tr>
</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>
</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>[/code]
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — Right that is perfect now but you have a path problem. Post the full URL for download.php

[B]Edit[/B]: Put <?php ob_start(); ?> Right at the top of your terms script without any whitespace before it otherwise you might run into trouble with headers already sent if you moved on to a server with output buffering turned off.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — http://djshawnmicaels.com/download.php

The error I get now is:

Parse error: parse error, unexpected $ in /home/djshawnm/public_html/terms.php on line 145

line 145 contains "</HTML>"

It is the last line
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — Post the lot
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — code for download.php

[code=html]
<?php
if(!isset($_COOKIE['terms'])){
header('Location: http://'.$_SERVER['HTTP_HOST'].'/terms.php');
}
?>
<HTML>
<HEAD>
<TITLE>DJSM Downloads</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/4-but-6.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<font face="arial" style="font-size:10px;color:#333333;line-height:16px"> On this page you will be able to download some of Shawn's mixes. <br>
</font>
</td>
</tr>
</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>
</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>[/code]
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — Well that code you posted works for me but your error said line 145 and the code only has 124 lines so it can't be the same code.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — the terms page is 145 lines
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — The following code works for me.[code=php]<?php ob_start(); ?>
<HTML>
<HEAD>
<TITLE>Terms of Use</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/terms.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<div align="center"><font face="arial" style="font-size:10px;color:#333333;line-height:16px"> <span class="style1">By agreeing to these terms, you understand Spektron Entertainment Group will not be held liable for problems related to the downloads. All songs and photos are rated for use of all ages. All files are tested and virus scaned before they are loaded to the servers.</span><br>
<br>
<strong><span class="style2">USE AT YOUR OWN RISK<br>
<br>
<?php
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{

echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;
}

?>

</span></strong> <br>
</font>
</div></td>
</tr>
</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>
</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>[/code]
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — what does <?php ob_start(); ?> do? I added that to my code.

I still get the parse error on page 145. I am not sure to what could be causing this.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — I have been doing some research in google on this, they are all suggesting that something isnt closed. I did copy and paste that working code in that you had and said that works
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — Use the exact and complete code I posted. Don't change anything.
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — Thats what I did and I still get the error, do you want access to the server? I can give you the FTP info, I could PM it to you
Copy linkTweet thisAlerts:
@bokehAug 12.2005 — I will have a go if you like
Copy linkTweet thisAlerts:
@comptech520authorAug 12.2005 — I have sent you a PM with the login info.

Thank you, Let me know on here once you are done on the server.

Thanks again,

Shawn
Copy linkTweet thisAlerts:
@BeachSideAug 12.2005 — The code that Bokeh posted works for me as well. You must have something in your footer.php file that is throwing the error is all I can think of that could be the issue
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — this is what I have in my footer.php file, but I don't think that it gets as far as opening the footer.php file. Line 145 is </html>, thats it
[code=html]
<font face="tahoma" style="font-size:10px;color:#000000">&nbsp;
<a href="index.php" style="color:#000000;text-decoration:none">Home</a> :

<a href="biography.php" style="color:#000000;text-decoration:none">Biography</a> :

<a href="downloads.php" style="color:#000000;text-decoration:none">Downloads</a> :

<a href="gallary.php" style="color:#000000;text-decoration:none">Gallary</a> :

<a href="resume.php" style="color:#000000;text-decoration:none">Resume</a> :

<a href="booking.php" style="color:#000000;text-decoration:none">Booking Info</a> :

<a href="/forum" target="_blank" style="color:#000000;text-decoration:none">DJSM Forum</a> :

<a href="contact.php" style="color:#000000;text-decoration:none">Contact</a>
<div style=" color:#FFFFFF;padding-top:15px">&copy; 2005 Spektron Entertainment Group</div> </font>[/code]
Copy linkTweet thisAlerts:
@BeachSideAug 13.2005 — Ya but you include the footer.php file on line 130something and if there is an error in that sometimes it won't throw the error until the end of the document which is line 145 or </html>

::Edit:: Ok now it is giving me the error I think I know what it is let me test it one minute
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — I took the footer.php include statment out and I stil had the same error
Copy linkTweet thisAlerts:
@BeachSideAug 13.2005 — Ok got it...

If you use that code posted by Bokeh it will throw the error.

If you look at the END;} in the heredoc statement, well that is illegal you can only have the ending statement by itself so you need to have (on seperate lines)

END;

}

here's the code that worked for me...
[code=php]
<?php

if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: http://'.$_SERVER['HTTP_HOST'].'/');
}else{

echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;

}

?>

[/code]


::Edit:: To Bokeh's credit it's not his fault it is the way that the forum thing shows the code because I would have had the same problem posting that snippet if I hadn't preread it.
Copy linkTweet thisAlerts:
@bathurst_guyAug 13.2005 — yep otherwise the if else statement doesnt get closed
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — Bingo! That worked!

My next question would be:

you can try this too:

GO to gttp://djshawnmichaels.com/download.php

agree to the terms

when you agree it brings you back to the index.php page, whats a way to make it go to download.php after I agree, or gallary.php if I agree there?

Thanks ?
Copy linkTweet thisAlerts:
@BeachSideAug 13.2005 — Ya man I get a [B]404[/B]
Copy linkTweet thisAlerts:
@bathurst_guyAug 13.2005 — ok i get you now.

you meant download[B]s[/B].php

make it this instead of the last code LOL after all that...
[code=php]<?php ob_start();
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: downloads.php');
}
?>
<HTML>
<HEAD>
<TITLE>Terms of Use</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">

<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/terms.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<div align="center"><font face="arial" style="font-size:10px;color:#333333;line-height:16px"> <span class="style1">By agreeing to these terms, you understand Spektron Entertainment Group will not be held liable for problems related to the downloads. All songs and photos are rated for use of all ages. All files are tested and virus scaned before they are loaded to the servers.</span><br>
<br>
<strong><span class="style2">USE AT YOUR OWN RISK<br>
<br>

<?

echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;

?>

</span></strong> <br>

</font>
</div></td>
</tr>

</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>

</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>[/code]
Copy linkTweet thisAlerts:
@bokehAug 13.2005 — 

::Edit:: To Bokeh's credit it's not his fault it is the way that the forum thing shows the code because I would have had the same problem posting that snippet if I hadn't preread it.[/QUOTE]


I don't know why that happens. The forum messes it up. Anyway good! At least he's got the code working now.
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — I have used the code you mentioned:

IN THE HEADER
[code=php]
<?php ob_start();
if(isset($_POST['submit']) or isset($_COOKIE['terms'])){
setcookie('terms', 'agree', time()+10000000, '/', '', 0);
header('Location: downloads.php');
}
?>[/code]


IN THE BODY
[code=php]
<?

echo <<<END
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="submit" value="I accept them">
</form>

END;
?> [/code]


I get Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /home/djshawnm/public_html/terms.php on line 97

Line 97 contains: echo <<<END

Thanks guys
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — Lets just say that I copied and pasted the code that bahurst told me to use on the last page.
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — Also, what I was referring to in a way is:

If I go to the downloads.php page after I agree, I will be forwarded to the downloads.php page, the same thing for the gallary, if I go there I have to agree then I will beforwarded back the the gallary.php page, both gallary and download will use the same terms page. I gatta take some classes on PHP, there was one this summer at school, but not enough people showed up. You get more people at a HTML class, I don't get that
Copy linkTweet thisAlerts:
@bokehAug 13.2005 — Also, what I was referring to in a way is:

If I go to the downloads.php page after I agree, I will be forwarded to the downloads.php page, ...[/QUOTE]
At the beginning you said you wanted to protect your 'site' and that is what my script did. Then someone told you to modify the script so it forwarded people to downloads. I think what you really wanted was to protect individual pages.

I get Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /home/djshawnm/public_html/terms.php on line 97

Line 97 contains: echo <<<END

Thanks guys[/QUOTE]
Again you have white space after the 'D'. With the heredoc syntax it is important this should not be the case.

What I am going to do is completely rewrite the code and re-post it.
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — thanks you ?
Copy linkTweet thisAlerts:
@bokehAug 13.2005 — Scrap all the previous code. Put the following right at the start of all the pages you want to protect(before any white space):[code=php]<?php

ob_start();

$self = $_SERVER['PHP_SELF'];

if(!isset($_COOKIE[$self])){
require($_SERVER['DOCUMENT_ROOT'].'/terms.php');
terms();
}

?>[/code]


And put the following in a file called 'terms.php' and located in the root directory:[code=php]<?php

function terms()
{

$self = $_SERVER['PHP_SELF'];
if(isset($_POST['agree_terms']) or isset($_COOKIE[$self])){
setcookie($self, 'I agree to the terms.', time()+10000000, '/', '', 0);
}else{


echo <<<_HTML_


<HTML>
<HEAD>
<TITLE>Terms of Use</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1251">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<style type="text/css">
<!--
.style1 {font-family: Geneva, Arial, Helvetica, sans-serif}
.style2 {font-size: 14px}
-->
</style>
</HEAD>
<BODY BGCOLOR=#454C54 LEFTMARGIN=0 TOPMARGIN=0 rightmargin="0" bottommargin="0" MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/m1r.jpg','images/m2r.jpg','images/m3r.jpg','images/m4r.jpg','images/m5r.jpg','images/m6r.jpg')" style="overflow-x:hidden">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" height="27" background="images/back-up.jpg"><img src="images/spacer.gif" width="1" height="27"></td>

</tr>
<tr>
<td width="100%" height="100%" valign="top" align="center" background="images/back-right-up.jpg" style="background-repeat:repeat-x;background-position:top">
<table width="800" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="47" height="100%" valign="top" background="images/back-left.jpg"><img src="images/left-up.jpg" width="47" height="8"></td>


<td WIDTH=706 height="100%" valign="top">
<table width="706" height="100%" bgcolor="#AEB5BF" border="0" cellspacing="0" cellpadding="0">
<tr>
<td WIDTH=706 height="194">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="706" height="194">
<param name="movie" value="flash/flashmenu.swf">
<param name="quality" value="high">
<embed src="flash/flashmenu.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="706" height="194"></embed>
</object>
</td>
</tr>
<tr><td width="706" height="12"><img src="images/line-2.jpg" width="706" height="12"></td></tr>
<tr>
<td width="706" height="100" valign="top" align="center">
<table width="693" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="100%" valign="top">
<table width="257" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="257" height="10" valign="top" background="images/back-but-6.jpg" style="background-position:center;background-repeat:repeat-y">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-1.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-2.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-10.jpg" width="12" height="12"></td></tr></table></td></tr>
<tr>
<td width="100%" height="100%" valign="top">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="100%" background="images/k-3.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
<td width="100%" height="100%" valign="top" style="background-repeat:no-repeat;background-position:bottom">
<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0">
<tr><td><img src="images/terms.jpg" width="679" height="25"></td>
</tr>
<tr>
<td height="100%" style="padding:6px;padding-left:11px;padding-right:11px;padding-bottom:15px" valign="top">
<div align="center"><font face="arial" style="font-size:10px;color:#333333;line-height:16px"> <span class="style1">By agreeing to these terms, you understand Spektron Entertainment Group will not be held liable for problems related to the downloads. All songs and photos are rated for use of all ages. All files are tested and virus scaned before they are loaded to the servers.</span><br>
<br>
<strong><span class="style2">USE AT YOUR OWN RISK<br>
<br>
<form action="http://{$_SERVER['HTTP_HOST']}{$_SERVER['PHP_SELF']}" method="post">
Click to accept terms:
<input type="submit" name="agree_terms" value="I accept them">
</form>
</span></strong> <br>
</font>
</div></td>
</tr>
</table>
</td>
<td width="12" height="100%" background="images/k-5.jpg"><img src="images/spacer.gif" width="12" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr><td width="100%" height="12"><table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0"><tr><td width="12" height="12"><img src="images/k-11.jpg" width="12" height="12"></td><td width="100%" height="12" background="images/k-6.jpg"><img src="images/spacer.gif" width="1" height="1"></td><td width="12" height="12"><img src="images/k-4.jpg" width="12" height="12"></td></tr></table></td></tr>
</table>
</td>
</tr>
</table>
</td>



<td width="1" height="100%"><img src="images/spacer.gif" width="1" height="1"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td width="706" height="100%" align="center" bgcolor="#454C54" background="images/end.jpg" style="padding-top:23px;background-repeat:no-repeat;background-position:top" valign="top">
<?php include('footer.php'); ?></td>
</tr>

</table>
</td>


<td width="47" height="100%" valign="top" background="images/back-right.jpg"><img src="images/right-up.jpg" width="47" height="8"></td>
</tr>
</table>
</td>
</tr>
</table>

</BODY>
</HTML>



_HTML_;




exit();


}


}

?>[/code]
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — Thank you ? We are getting close. I am getting another parse error.

Parse error: parse error, unexpected T_SL, expecting ',' or ';' in /home/djshawnm/public_html/terms.php on line 12

Let me know how you make out ? Might be whightspace too
Copy linkTweet thisAlerts:
@bokehAug 13.2005 — I think it must be the forum messing up the code again. Just download the zip and use the script from that.

[upl-file uuid=46d28324-1d9e-4652-b4a0-92842ac4e332 size=2kB]terms.zip[/upl-file]
Copy linkTweet thisAlerts:
@comptech520authorAug 13.2005 — BINGO ? Thank you so much!
Copy linkTweet thisAlerts:
@BeachSideAug 13.2005 — Yeah Bokeh I don't know why it does that. From my experience it only does that with heredoc's, or at least maybe it's because heredoc's are whitespace sensitive lol

Very strange ?
Copy linkTweet thisAlerts:
@bokehAug 13.2005 — It's very frustrating, especially when you post code that works and then afterwards it doesn't. Heredoc is double problematic because 1) you can't see the error because it is just whitespace and 2) for some reason many people are not familiar with it. Anyway I'm glad it's all working even if it did take 40 posts.
Copy linkTweet thisAlerts:
@comptech520authorAug 14.2005 — What is heredoc?
Copy linkTweet thisAlerts:
@GenixdeaeAug 14.2005 — heredoc is basiclly a way to output code asif you had done one echo, but you dont need to worry bout backslashes before quotes while in heredoc.Example:[code=php]$var = <<<EOD
text in here is normal i can do <a href="balh">balch</a> w/o backslasing
EOD;

//where as outside heredoc i'd have to do this
$var = "text in here is differant i have to backslash before a quote <a href="balh">balch</a>";[/code]
You can view more info [URL=http://us2.php.net/manual/en/language.types.string.php#language.types.string.syntax.heredoc]here[/URL]
×

Success!

Help @comptech520 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...