Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1265
  • Last Modified:

Parse error: syntax error, unexpected T_VARIABLE in /home/tvepisod/public_html/redirecttest.php on line 48

HI there Im getting an error on line 48 of the attatched code regarding the case statement. Can anyone help?
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>TvShow</title>
 
    <link rel="stylesheet" type="text/css" href="resources/css/ext-all.css" />
    <!-- GC -->
        <!-- LIBS -->
        <script type="text/javascript" src="adapter/ext/ext-base.js"></script>
        <!-- ENDLIBS -->
 
    <script type="text/javascript" src="ext-all.js"></script>
    <script type="text/javascript" src="msg-box.js"></script>
 
    <!-- Common Styles for the examples -->
    <link rel="stylesheet" type="text/css" href="shared/examples.css" />
 
    <style type="text/css">
        .x-window-dlg .ext-mb-download {
            background:transparent url(images/download.gif) no-repeat top left;
            height:46px;
        }
    </style>
</head>
 
<body>
 
<?
//---------------------------------------------------------------------------------//
// you don't need to edit past this point :)
//---------------------------------------------------------------------------------//
 
// look through the ip-to-country DB to get geo location
$intUserIPNum = sprintf("%u", ip2long($_SERVER['REMOTE_ADDR']));
$fh = @fopen("ip-to-country.csv", "r");
if ($fh){
	while (($data = fgetcsv($fh, 1000, ",", "\"")) !== FALSE) {
		if (($intUserIPNum >= $data[0]) and ($intUserIPNum <= $data[1])){
			$strCountryCode = $data[2];
			break;
		}
	}
	fclose($fh);
}
 
switch ($strCountryCode) {
case "GB"
$redirectURL = 'http%3A%2F%2F1%2Eofsnetwork%2Ecom%2Fz%2F31581%2FCD7399%2F%26dp%3D0%26l%3D0%26subid1%3D%26subid2%3D%26subid3%3D%26subid4%3D%26subid5%3D';
break;
case "US"
$redirectURL = 'http%3A%2F%2Fwww%2Elynxtrack%2Ecom%2Fafclick%2Ephp%3Fo%3D7846%26b%3Dxgfg6fz9%26p%3D27636%26l%3D1';
break;
case "AU"
$redirectURL = 'http%3A%2F%2F1%2Eofsnetwork%2Ecom%2Fz%2F26680%2FCD7399%2F%26dp%3D0%26l%3D0%26subid1%3D%26subid2%3D%26subid3%3D%26subid4%3D%26subid5%3D';
break;
default:
$redirectURL = 'http%3A%2F%2Fwww%2Elynxtrack%2Ecom%2Fafclick%2Ephp%3Fo%3D7846%26b%3Dxgfg6fz9%26p%3D27636%26l%3D1';
}
 
?>
 
 
<!-- Start of StatCounter Code -->
<script type="text/javascript">
sc_project=3739435; 
sc_invisible=1; 
sc_partition=45; 
sc_security="b0782d8d"; 
</script>
 
<script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script><noscript><div class="statcounter"><a title="web stats" class="statcounter" href="http://www.statcounter.com/"><img class="statcounter" src="http://c46.statcounter.com/3739435/0/b0782d8d/1/" alt="web stats" /></a></div></noscript>
<!-- End of StatCounter Code -->
 
<script type="text/javascript">
 function showResult(btn){
document.location.href="<?=$redirectURL?>"
    };
 
 
        Ext.MessageBox.show({
           title: 'Please wait',
           msg: 'Checking your settings...',
           progressText: 'In Progress...',
           width:300,
           progress:true,
           closable:false,
           animEl: 'mb6'
       });
 
       // this hideous block creates the bogus progress
       var f = function(v){
            return function(){
                if(v == 12){
                    Ext.MessageBox.hide();
                    Ext.example.msg('Configuration', 'Missing Plugin!');
 
 
                }else{
                    var i = v/11;
                    Ext.MessageBox.updateProgress(i, Math.round(100*i)+'% completed');
                }
           };
       };
 
       // this hideous block creates the bogus progress
       var g = function(v){
            return function(){
                if(v == 12){
                    Ext.MessageBox.hide();
                    Ext.MessageBox.alert('Status', '<div align="center">You are missing DivX files enter your email in the next screen to install DivX<br>  Click Ok to proceed</div>', showResult);
 
 
                }else{
                    var i = v/11;
                  
                }
           };
       };
 
 
       for(var i = 1; i < 13; i++){
           setTimeout(f(i), i*500);
       }
       for(var i = 1; i < 13; i++){
           setTimeout(g(i), i*500);
       }
 
</script>
 
 
 
 
<script type="text/javascript" src="shared/examples.js"></script><!-- EXAMPLES -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
 
<html>
 
 
<head>
 
<script type="text/javascript">
 
function preload() { 
  var args = preload.arguments; 
  imgs = new Array();
  for(x=0; x < args.length; x++) {
    imgs[x] = new Image();
    imgs[x].src = args[x];
  }
}
 
</script>
 
<title>Watch your show</title>
<style type="text/css">
 
#informationbar{
position: fixed;
left: 0;
width: 100%;
text-indent: 5px;
padding: 5px 0;
background-color: lightyellow;
border-bottom: 1px solid black;
font: bold 12px Verdana;
}
 
* html #informationbar{ /*IE6 hack*/
position: absolute;
width: expression(document.compatMode=="CSS1Compat"? document.documentElement.clientWidth+"px" : body.clientWidth+"px");
}
 
body {
	background-image: url(page.jpg);
}
</style>
 
<script type="text/javascript">
 
/***********************************************
 
* Animated Information Bar- by JavaScript Kit (www.javascriptkit.com)
* This notice must stay intact for usage
* Visit JavaScript Kit at http://www.javascriptkit.com/ for this script and 100s more
 
***********************************************/
 
function informationbar(){
	this.displayfreq="always"
	this.content='<a href="javascript:informationbar.close()"><img src="close.gif" style="width: 14px; height: 14px; float: right; border: 0; margin-right: 5px" /></a>'
}
 
informationbar.prototype.setContent=function(data){
	this.content=this.content+data
	document.write('<div id="informationbar" style="top: -500px">'+this.content+'</div>')
}
 
informationbar.prototype.animatetoview=function(){
	var barinstance=this
	if (parseInt(this.barref.style.top)<0){
		this.barref.style.top=parseInt(this.barref.style.top)+5+"px"
		setTimeout(function(){barinstance.animatetoview()}, 50)
	}
	else{
		if (document.all && !window.XMLHttpRequest)
		this.barref.style.setExpression("top", 'document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px" : body.scrollTop+"px"')
	else
		this.barref.style.top=0
	}
}
 
informationbar.close=function(){
	document.getElementById("informationbar").style.display="none"
	if (this.displayfreq=="session")
		document.cookie="infobarshown=1;path=/index.html"
}
 
informationbar.prototype.setfrequency=function(type){
	this.displayfreq=type
}
 
informationbar.prototype.initialize=function(){
	if (this.displayfreq=="session" && document.cookie.indexOf("infobarshown")==-1 || this.displayfreq=="always"){
		this.barref=document.getElementById("informationbar")
		this.barheight=parseInt(this.barref.offsetHeight)
		this.barref.style.top=this.barheight*(-1)+"px"
		this.animatetoview()
	}
}
 
window.onunload=function(){
	this.barref=null
}
 
</script>
 
 
<script type="text/javascript">
<!--Invocation code-->
 
var infobar=new informationbar()
 
</script>
 
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body onload="preload('page.jpg')">
 
 
 
</body>
 
<!-- Mirrored from www.thelocalforum.co.uk/download236152/download.php by HTTrack Website Copier/3.x [XR&CO'2007], Sat, 06 Sep 2008 15:56:05 GMT -->
</html>
 
 
 
 
</body>
</html>

Open in new window

0
MayoorPatel
Asked:
MayoorPatel
1 Solution
 
psimationCommented:
you need : in your case

case "GB":   etc.
0
 
MayoorPatelAuthor Commented:
Fantastic, thanks!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now