--- On Mon, 16/6/08, Hayden's Harness Attachment wrote:

> From: Hayden's Harness Attachment <[EMAIL PROTECTED]>
> Subject: Re: [php-list] PHP script for changing CSS files
> To: [email protected]
> Date: Monday, 16 June, 2008, 7:43 AM
> Phill
>
> Can you see why I get the error:
>
> Parse error: syntax error, unexpected T_VARIABLE in
> /usr/home/choroid/public_html/new/crf_header.php on line 38
>
> For the code:
>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0
> Strict//EN"
>
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
> <html xmlns="http://www.w3.org/1999/xhtml";>
> <head>
>
> <meta name="generator"
> content="HTML Tidy for Linux/x86 (vers 1st November
> 2002), see www.w3.org" />
> <meta http-equiv="content-type"
> content="text/html; charset=utf-8" />
> <title><?php echo $pagetitle; ?></title>
>
> <link rel="stylesheet"
> type="text/css" media="screen"
> title="Default font size"
> href="http://www.choroideremia.org/new/<?php echo
> (!$sitestyle) ?>'layout_medium':$sitestyle
> ?>'.css' />
>
> </head>
> <body>
> <div id="header">
> <h1>
> <img alt="Choroideremia Research Foundation
> logo"
> src="http://www.choroideremia.org/images/crf_logo.jpg";
> height="100" width="142" />
> Choroideremia Research Foundation Inc.
> </h1>
> <?PHP echo $_SESSIONn; ?>
> <?PHP echo $hour; ?>
> </div>
>
> <?PHP
> switch ($sitestyle) {
> case 'layout_medium':
> case 'layout_large':
> case 'layout_small':
>
> break;
> }
> ?>
>
> <?PHP
> $sitestyle = $_get['set'];
>
> $sitestyle = empty($_session['$sitestyle']) ?
> 'layout_medium' :
> $_session['sitestyle'];
>   case 'layout_medium':
> case 'layout_medium':
> case 'layout_large':
> case 'layout_small':
> echo '<link rel="stylesheet"
> type="text/css" media="screen"
> href="'. $sitestyle .'.css" />';
>         $_SESSION['sitestyle'] = $sitestyle;
>     break;
> }
> ?>
>
> <?php
> // Get Greenwich time (only the hour)
> $hour=gmdate("H");
> // time between 00:00 and 11:59
> if($hour>=0&&$hour<=11)echo "Good
> morning!";
> // time between 12:00 and 15:59
> if($hour>=12&&$hour<=15)echo "Good
> afternoon!";
> // time between 16:00 and 23:59
> if($hour>=16&&$hour<=23)echo "Good
> evening!";
> ?>
>
>
> <br />
>
> Angus MacKinnon
> Infoforce Services
> http://www.infoforce-services.com
>
> "Faith is the strength by which a shattered world
> shall emerge into
> the light." - Helen Keller
>
>
> ------------------------------------
>
> Please remember to write your response BELOW the previous
> ------------------------------------
Hi,

First backup your page. And then use the following code. And let me know the 
result.


///////////////////////////////////

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0> Strict//EN"

 "http://www.w3. org/TR/xhtml1/ DTD/xhtml1- strict.dtd">
 <html xmlns="http://www.w3. org/1999/ xhtml">
 <head>

 <meta name="generator" content="HTML Tidy for Linux/x86 (vers 1st November
 2002), see www.w3.org" />
 <meta http-equiv=" content-type"
 content="text/ html; charset=utf- 8" />
 <title><?php echo $pagetitle; ?></title>

 <link rel="stylesheet" type="text/css" media="screen" title="Default font 
size" href="http://www.choroide remia.org/ new/<?php echo
 (!$sitestyle) ?>'layout_medium' :$sitestyle ?>'.css' />

 </head>
 <body>
 <div id="header">
 <h1>
 <img alt="Choroideremia Research Foundation
 logo"
 src="http://www.choroide remia.org/ images/crf_ logo.jpg"
 height="100" width="142" />
 Choroideremia Research Foundation Inc.
 </h1>
 <?PHP echo $_SESSIONn; ?>
 <?PHP echo $hour; ?>
 </div>

 <?PHP
 switch ($sitestyle) {
 case 'layout_medium' :
 case 'layout_large' :
 case 'layout_small' :

 break;
 }
 ?>

 <?PHP
 $sitestyle = $_get['set'] ;

 $sitestyle = empty($_session[ '$sitestyle' ]) ?
 'layout_medium' :
 $_session['sitestyl e'];
 switch ($sitestyle) {
 case 'layout_medium' :
 case 'layout_medium' :
 case 'layout_large' :
 case 'layout_small' :
 echo '<link rel="stylesheet"
 type="text/css" media="screen"
 href="'. $sitestyle .'.css" />';
 $_SESSION['sitestyl e'] = $sitestyle;
 break;
 }
 ?>

 <?php
 // Get Greenwich time (only the hour)
 $hour=gmdate( "H");
 // time between 00:00 and 11:59
 if($hour>=0 && $hour<=11) echo "Good
 morning!";
 // time between 12:00 and 15:59
 if($hour>=12 && $hour<=15) echo "Good
 afternoon!";
 // time between 16:00 and 23:59
 if($hour>=16 && $hour<=23) echo "Good
 evening!";
 ?>

//////////////////////////////////

Regards,
Roshith Kaniyamchalil

Reply via email to