?
Solved

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

Posted on 2008-10-23
2
Medium Priority
?
1,260 Views
Last Modified: 2012-05-05
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
Comment
Question by:MayoorPatel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 17

Accepted Solution

by:
psimation earned 2000 total points
ID: 22785888
you need : in your case

case "GB":   etc.
0
 
LVL 1

Author Comment

by:MayoorPatel
ID: 22786059
Fantastic, thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question