Jump to content

Error 500 windows 2008 server online hosting


Highland3r

Recommended Posts

i keep getting Error 500 on windows 2008 server online hosting package

 

 

this is the code for the error in question i cant seem to pin point the exact location of the error as its my first time working with windows server 2008

 

<?
$prm=$_REQUEST['prm'];
$chm=$_REQUEST['chm'];
$roomtypeid=$_REQUEST['roomtype_id'];
$capacity1=$_REQUEST['capacity'];
//666666666666666666666666666666666666666666666
$current_date=date('m/d/Y');
//echo $current_date.'<br>';
function GetDays($sStartDate, $sEndDate){
  // Firstly, format the provided dates.
  // This function works best with YYYY-MM-DD
  // but other date formats will work thanks
  // to strtotime().
  $sStartDate = gmdate("Y-m-d", strtotime($sStartDate));
  $sEndDate = gmdate("Y-m-d", strtotime($sEndDate));

  // Start the variable off with the start date
  $aDays = $sStartDate;

  // Set a 'temp' variable, sCurrentDate, with
  // the start date - before beginning the loop
  $sCurrentDate = $sStartDate;

  // While the current date is less than the end date
  while($sCurrentDate < $sEndDate){
    // Add a day to the current date
    $sCurrentDate = gmdate("Y-m-d", strtotime("+1 day", strtotime($sCurrentDate)));

    // Add this new day to the aDays array
    $aDays = $aDays.",".$sCurrentDate;
  }

  // Once the loop has finished, return the
  // array of days.
  return $aDays;
}

function full_booking($array)
{
   $ret_array=array();
$count_n=count($array);
$array_1=explode(',',$array[0]);
for($i=0;$i<count($array_1);$i++)
{
 for($k=1;$k<$count_n;$k++)
 {
   if(in_array($array_1[$i],explode(',',$array[$k])))
   {
    $f1=1;
   }
   else
   {
    $f1=0;
	break;
   }
 }
 if($f1)
 $ret_array[]=$array_1[$i];
}

return $ret_array;
}

$conn1 = new COM("ADODB.Connection") or die("Cannot start ADO"); 
$conn1->open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("./db/bsihbs.mdb").";");
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$rs50=$conn1->execute("select * from h_bookinfo where checkout_date >#".$current_date."# and roomtype_id=$roomtypeid");
$rs51=$conn1->execute("select * from h_room where roomtype_id=$roomtypeid and capacity=$capacity1"); 
$m50 =  $rs50->Fields(13); 
$m51 =  $rs51->Fields(0); 
$booked_array=array();
$available_array=array();
while(!$rs50->EOF){
$booked_array[]=$m50->value;
$rs50->MoveNext();
}
while(!$rs51->EOF){
$available_array[]=$m51->value;
$rs51->MoveNext();
}
$intersect_array = array_intersect(array_unique($booked_array),$available_array);
$different_array=array_diff($available_array,$intersect_array);
if(count($different_array)==0) $flag_a=1;
else $flag_a=0;

//vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

if($flag_a){
$rs1=$conn1->execute("select * from h_bookinfo where checkout_date >#".$current_date."# and roomtype_id=$roomtypeid order by room_id"); 

$f11 =  $rs1->Fields(18); 
$f21 =  $rs1->Fields(19); 
$f31 =  $rs1->Fields(20); 
$f41 =  $rs1->Fields(23); 
$f51 =  $rs1->Fields(13); 
$f61 =  $rs1->Fields(14);

$allbooking=array();
$startFlag = true;
$strBuff1 = "";
$strBuff2 = "";
$lastid = "";

while (!$rs1->EOF) {   
	if($f31->value==true or $f41->value==true or ($f31->value==true and $f41->value==true)){
		$rs2=$conn1->execute("select * from h_room where roomtype_id=$roomtypeid and capacity=$capacity1"); 
		$k11 =  $rs2->Fields(0); 
		$falg1=0;
		while (!$rs2->EOF) { 
			if($f51->value==$k11->value){
				//$strBuff1 = $onearray[1].",".$onearray[2];
				$strBuff1 = getDays($f11->value,$f21->value);
				if($lastid == $f51->value || $startFlag == true){
					$strBuff2 = strlen($strBuff2) == 0 ? $strBuff1 : $strBuff2.",".$strBuff1;
					$startFlag = false;
				}
				else{
					$allbooking[$lastid] = $strBuff2;
					$strBuff2 = $strBuff1;
					//echo "Buff2: ".$strBuff2."<br>";
				}
				$lastid = $f51->value;

				//echo print_r($getdates);
				//echo '<br>';
				/*$n99=count($getdates);
				for($kkk=0; $kkk<$n99; $kkk++){
					$allbooking[]=array($f51->value,$getdates[$kkk]);
				}*/
				//echo $f11->value.'-'.$f21->value.'->'.$f31->value.'->'.$f41->value.'->'.$f51->value.'->'.$f61->value.'<br>';
			}
			$rs2->MoveNext(); 
			$falg1++;
		}

		$rs2->Close(); 
		//$rs2=$conn1->execute("select * from h_room where roomtype_id=".$f61->value); 
	}
	$rs1->MoveNext(); 
} 
$allbooking[$lastid] = $strBuff2;
$rs1->Close(); 
$conn1->Close();
if($falg1==1){
$booked_date=array();
	$booked_date1=array_merge(array(),$allbooking);
	$booked_date=(explode(',',$booked_date1[0]));
	//print_r($booked_date);
}else{
	$allbooking=array_merge(array(),$allbooking);
	$booked_date=full_booking($allbooking);
}
}
//echo '<br><br>';
//print_r($allbooking);
//$allbooking=array_merge(array(),$allbooking);

//echo '<br><br>';
//print_r(full_booking($allbooking));
/*echo '<br><br>';
print_r(array_repeated($allbooking));
echo '<br><br>';
print_r(array_repeated(array_repeated($allbooking)));
echo '<br><br>';
print_r($booked_date);
*/
//hjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

if(isset($prm) and $prm > 0){
$m=$prm+$chm;
}else{
$m= date("m");
}
$d= date("d");     // Finds today's date
$y= date("Y");     // Finds today's year
$m2= date("m");
$no_of_days = date('t',mktime(0,0,0,$m,1,$y)); // This is to calculate number of days in a month

$mn=date('M',mktime(0,0,0,$m,1,$y)); // Month is calculated to display at the top of the calendar
$mn1=date('m',mktime(0,0,0,$m,1,$y));
//echo '<br>'.(int)$mn1.'<br>';
$yn=date('Y',mktime(0,0,0,$m,1,$y)); // Year is calculated to display at the top of the calendar

$j= date('w',mktime(0,0,0,$m,1,$y)); // This will calculate the week day of the first day of the month
//echo $no_of_days.'-'.$mn1.'-'.$yn;
for($k=1; $k<=$j; $k++){ // Adjustment of date starting
$adj .="<td > </td>";
}

/// Starting of top line showing name of the days of the week

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" background="img/main_bg2.jpg">
<?php

echo "<table cellspacing='0' cellpadding='4' align=left  style='border:1px solid #CC6600;'><tr><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=-1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_14.gif' border=0></a> </td><td colspan=5 align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'>$mn $yn </td><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_10.gif' border=0></a> </td></tr><tr>";

echo "<td style='border:1px solid #CC6600; background-image:url(iimages/corner_booked_right.jpg); background-repeat:no-repeat  ' width='25' ><font size='2' face='Tahoma'><b>Sun</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Mon</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Tue</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Wed</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Thu</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Fri</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Sat</b></font></td></tr><tr>";

////// End of the top line showing name of the days of the week//////////

//////// Starting of the days//////////
$waiting=0;
$approved=0;
for($i=1;$i<=$no_of_days;$i++){
if($y <= $yn and $m2<=$mn1)
{   //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
	if($y >= $yn and $m2==$mn1 and $d>$i)
	{  
	echo $adj."<td valign=top bgcolor=#cccccc style='border:1px solid #CC6600;'><font size='2' color='#999999' face='Tahoma'>$i<br>"; // This will display the date inside the 		calendar cell
	echo " </font></td>";

	}
	else
	{   //#####booked date mark start#########################
	    $n76=count($booked_date);
		for($pp=0;$pp<$n76;$pp++)
		{

            $b_date= $booked_date[$pp];
		$exp_date=explode('-',$b_date);
		$b_year=$exp_date[0];
		$b_month=$exp_date[1];
		$b_day=$exp_date[2];
		//echo $pp;
		if($yn==$b_year and $mn1==$b_month and $i==(int)$b_day)
		{
		$flag=1;
		}
		}
	    //#####booked date mark start#########################
		if($flag)
		{
		echo $adj."<td valign=top bgcolor=#f7b961  style='border:1px solid #CC6600;'><font size='2' face='Tahoma'>$i<br>"; // This will display the date inside the 			calendar cell
		//echo $aaaaa;$aaaaa
		echo " </font></td>";
		$flag=0;
		}
		else
		{
		echo $adj."<td valign=top bgcolor=#ffffff style='border:1px solid #CC6600;'><font size='2' face='Tahoma'>$i<br>"; 
		//echo $aaaaa;// This will display the date inside the calendar cell
		echo " </font></td>";
		}
           
	}
}
else
{
echo $adj."<td valign=top bgcolor=#cccccc style='border:1px solid #CC6600;'><font size='2' color='#999999' face='Tahoma'>$i<br>"; // This will display the date inside the calendar cell
echo " </font></td>";

}
$adj='';
$j ++;
if($j==7){echo "</tr><tr>";
$j=0;}

}
echo "</tr></table>";
?>
</body>
</html>

 

Link to comment
Share on other sites

The HTTP 500 response code just means that a complete response was not sent by the web server.

 

On the outside chance that you are experinecing a fatal runtime error, add the following two lines of code immediately after the first opening <?php tag (you should only use full opening php tags as well) -

 

ini_set("display_errors", "1");
error_reporting(E_ALL);

Link to comment
Share on other sites

error report response suggest the following errors

 

HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Fri, 16 Apr 2010 15:39:43 GMT Connection: close Content-Length: 1044 PHP Notice: Undefined variable: m in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: roomtypeid in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: capacity1 in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: mn in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: yn in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: m in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: roomtypeid in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: capacity1 in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 201 PHP Notice: Undefined variable: no_of_days in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 210 

 

the code in question is

Line 201       echo "<table cellspacing='0' cellpadding='4' align=left  style='border:1px solid #CC6600;'><tr><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=-1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_14.gif' border=0></a> </td><td colspan=5 align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'>$mn $yn </td><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_10.gif' border=0></a> </td></tr><tr>";

 

Line 210 for($i=1;$i<=$no_of_days;$i++){

Link to comment
Share on other sites

i beleve the error could lie within this part of code

 

$no_of_days=date('t',mktime(0,0,0,$m,1,$y));

 

 

is there any obvious error here? or am i going the wrong direction??

 

this is starting to drive me crazy :( lol been working on this problem for over a month any help apreciated

Link to comment
Share on other sites

That's something I can't really understand. You should either get a server error, or some output from the script (like these PHP Notices). You're getting both... It's the first time I see anything like that...

Link to comment
Share on other sites

when i change line 210 to

for($i=1;$i<=$no_of_days i++){

from

for($i=1;$i<=$no_of_days; i++){

then i only get error

HTTP/1.1 500 Internal Server Error Server: Microsoft-IIS/7.0 X-Powered-By: ASP.NET Date: Fri, 16 Apr 2010 19:39:14 GMT Connection: close Content-Length: 140 PHP Parse error: syntax error, unexpected T_INC, expecting ';' in \\10.0.3.22\home\thunderhosts.co.uk\public_html\calendar.php on line 210 

any ideas i beleve if i can get this error then the script will run ?

 

the calendar.php code is

<?
$prm=$_REQUEST['prm'];
$chm=$_REQUEST['chm'];
$roomtypeid=$_REQUEST['roomtype_id'];
$capacity1=$_REQUEST['capacity'];
//666666666666666666666666666666666666666666666
$current_date=date('m/d/Y');
//echo $current_date.'<br>';
function GetDays($sStartDate, $sEndDate){
  // Firstly, format the provided dates.
  // This function works best with YYYY-MM-DD
  // but other date formats will work thanks
  // to strtotime().
  $sStartDate = gmdate("Y-m-d", strtotime($sStartDate));
  $sEndDate = gmdate("Y-m-d", strtotime($sEndDate));

  // Start the variable off with the start date
  $aDays = $sStartDate;

  // Set a 'temp' variable, sCurrentDate, with
  // the start date - before beginning the loop
  $sCurrentDate = $sStartDate;

  // While the current date is less than the end date
  while($sCurrentDate < $sEndDate){
    // Add a day to the current date
    $sCurrentDate = gmdate("Y-m-d", strtotime("+1 day", strtotime($sCurrentDate)));

    // Add this new day to the aDays array
    $aDays = $aDays.",".$sCurrentDate;
  }

  // Once the loop has finished, return the
  // array of days.
  return $aDays;
}

function full_booking($array)
{
   $ret_array=array();
$count_n=count($array);
$array_1=explode(',',$array[0]);
for($i=0;$i<count($array_1);$i++)
{
 for($k=1;$k<$count_n;$k++)
 {
   if(in_array($array_1[$i],explode(',',$array[$k])))
   {
    $f1=1;
   }
   else
   {
    $f1=0;
	break;
   }
 }
 if($f1)
 $ret_array[]=$array_1[$i];
}

return $ret_array;
}

$conn1 = new COM("ADODB.Connection") or die("Cannot start ADO"); 
$conn1->open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=". realpath("http://www.thunderhosts.co.uk/db/bsihbs.mdb").";");
//^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$rs50=$conn1->execute("select * from h_bookinfo where checkout_date >#".$current_date."# and roomtype_id=$roomtypeid");
$rs51=$conn1->execute("select * from h_room where roomtype_id=$roomtypeid and capacity=$capacity1"); 
$m50 =  $rs50->Fields(13); 
$m51 =  $rs51->Fields(0); 
$booked_array=array();
$available_array=array();
while(!$rs50->EOF){
$booked_array[]=$m50->value;
$rs50->MoveNext();
}
while(!$rs51->EOF){
$available_array[]=$m51->value;
$rs51->MoveNext();
}
$intersect_array = array_intersect(array_unique($booked_array),$available_array);
$different_array=array_diff($available_array,$intersect_array);
if(count($different_array)==0) $flag_a=1;
else $flag_a=0;

//vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv

if($flag_a){
$rs1=$conn1->execute("select * from h_bookinfo where checkout_date >#".$current_date."# and roomtype_id=$roomtypeid order by room_id"); 

$f11 =  $rs1->Fields(18); 
$f21 =  $rs1->Fields(19); 
$f31 =  $rs1->Fields(20); 
$f41 =  $rs1->Fields(23); 
$f51 =  $rs1->Fields(13); 
$f61 =  $rs1->Fields(14);

$allbooking=array();
$startFlag = true;
$strBuff1 = "";
$strBuff2 = "";
$lastid = "";

while (!$rs1->EOF) {   
	if($f31->value==true or $f41->value==true or ($f31->value==true and $f41->value==true)){
		$rs2=$conn1->execute("select * from h_room where roomtype_id=$roomtypeid and capacity=$capacity1"); 
		$k11 =  $rs2->Fields(0); 
		$falg1=0;
		while (!$rs2->EOF) { 
			if($f51->value==$k11->value){
				//$strBuff1 = $onearray[1].",".$onearray[2];
				$strBuff1 = getDays($f11->value,$f21->value);
				if($lastid == $f51->value || $startFlag == true){
					$strBuff2 = strlen($strBuff2) == 0 ? $strBuff1 : $strBuff2.",".$strBuff1;
					$startFlag = false;
				}
				else{
					$allbooking[$lastid] = $strBuff2;
					$strBuff2 = $strBuff1;
					//echo "Buff2: ".$strBuff2."<br>";
				}
				$lastid = $f51->value;

				//echo print_r($getdates);
				//echo '<br>';
				/*$n99=count($getdates);
				for($kkk=0; $kkk<$n99; $kkk++){
					$allbooking[]=array($f51->value,$getdates[$kkk]);
				}*/
				//echo $f11->value.'-'.$f21->value.'->'.$f31->value.'->'.$f41->value.'->'.$f51->value.'->'.$f61->value.'<br>';
			}
			$rs2->MoveNext(); 
			$falg1++;
		}

		$rs2->Close(); 
		//$rs2=$conn1->execute("select * from h_room where roomtype_id=".$f61->value); 
	}
	$rs1->MoveNext(); 
} 
$allbooking[$lastid] = $strBuff2;
$rs1->Close(); 
$conn1->Close();
if($falg1==1){
$booked_date=array();
	$booked_date1=array_merge(array(),$allbooking);
	$booked_date=(explode(',',$booked_date1[0]));
	//print_r($booked_date);
}else{
	$allbooking=array_merge(array(),$allbooking);
	$booked_date=full_booking($allbooking);
}
}
//echo '<br><br>';
//print_r($allbooking);
//$allbooking=array_merge(array(),$allbooking);

//echo '<br><br>';
//print_r(full_booking($allbooking));
/*echo '<br><br>';
print_r(array_repeated($allbooking));
echo '<br><br>';
print_r(array_repeated(array_repeated($allbooking)));
echo '<br><br>';
print_r($booked_date);
*/
//hjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

if(isset($prm) and $prm > 0){
$m=$prm+$chm;
}else{
$m=date("m");
}
$d=date("d");     // Finds today's date
$y=date("Y");     // Finds today's year
$m2=date("m");
$no_of_days=date('j',mktime(0,0,0,$m,1,$y)); // This is to calculate number of days in a month

$mn=date('M',mktime(0,0,0,$m,1,$y)); // Month is calculated to display at the top of the calendar
$mn1=date('m',mktime(0,0,0,$m,1,$y));
//echo '<br>'.(int)$mn1.'<br>';
$yn=date('Y',mktime(0,0,0,$m,1,$y)); // Year is calculated to display at the top of the calendar

$j=date('w',mktime(0,0,0,$m,1,$y)); // This will calculate the week day of the first day of the month
//echo $no_of_days.'-'.$mn1.'-'.$yn;
for($k=1; $k<=$j; $k++){ // Adjustment of date starting
$adj .="<td > </td>";
}

/// Starting of top line showing name of the days of the week

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" background="img/main_bg2.jpg">
<?php

echo "<table cellspacing='0' cellpadding='4' align=left  style='border:1px solid #CC6600;'><tr><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=-1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_14.gif' border=0></a> </td><td colspan=5 align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'>$mn $yn </td><td align=center bgcolor='#FF9966' style='border:1px solid #CC6600;'><font size='3' face='Tahoma'> <a href='calendar.php?prm=$m&chm=1&roomtype_id=$roomtypeid&capacity=$capacity1'><img src='img/Navigation_icons_10.gif' border=0></a> </td></tr><tr>";

echo "<td style='border:1px solid #CC6600; background-image:url(images/corner_booked_right.jpg); background-repeat:no-repeat  ' width='25' ><font size='2' face='Tahoma'><b>Sun</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Mon</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Tue</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Wed</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Thu</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Fri</b></font></td><td style='border:1px solid #CC6600;' width='25'><font size='2' face='Tahoma'><b>Sat</b></font></td></tr><tr>";

////// End of the top line showing name of the days of the week//////////

//////// Starting of the days//////////
$waiting=0;
$approved=0;
for($i=1;$i<=$no_of_days i++){
if($y <= $yn and $m2<=$mn1)
{   //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&

    //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
	if($y >= $yn and $m2==$mn1 and $d>$i)
	{  
	echo $adj."<td valign=top bgcolor=#cccccc style='border:1px solid #CC6600;'><font size='2' color='#999999' face='Tahoma'>$i<br>"; // This will display the date inside the 		calendar cell
	echo " </font></td>";

	}
	else
	{   //#####booked date mark start#########################
	    $n76=count($booked_date);
		for($pp=0;$pp<$n76;$pp++)
		{

            $b_date= $booked_date[$pp];
		$exp_date=explode('-',$b_date);
		$b_year=$exp_date[0];
		$b_month=$exp_date[1];
		$b_day=$exp_date[2];
		//echo $pp;
		if($yn==$b_year and $mn1==$b_month and $i==(int)$b_day)
		{
		$flag=1;
		}
		}
	    //#####booked date mark start#########################
		if($flag)
		{
		echo $adj."<td valign=top bgcolor=#f7b961  style='border:1px solid #CC6600;'><font size='2' face='Tahoma'>$i<br>"; // This will display the date inside the 			calendar cell
		//echo $aaaaa;$aaaaa
		echo " </font></td>";
		$flag=0;
		}
		else
		{
		echo $adj."<td valign=top bgcolor=#ffffff style='border:1px solid #CC6600;'><font size='2' face='Tahoma'>$i<br>"; 
		//echo $aaaaa;// This will display the date inside the calendar cell
		echo " </font></td>";
		}
           
	}
}
else
{
echo $adj."<td valign=top bgcolor=#cccccc style='border:1px solid #CC6600;'><font size='2' color='#999999' face='Tahoma'>$i<br>"; // This will display the date inside the calendar cell
echo " </font></td>";

}
$adj='';
$j ++;
if($j==7){echo "</tr><tr>";
$j=0;}

}
echo "</tr></table>";
?>
</body>
</html>
[code]

Link to comment
Share on other sites

Syntax errors are 'discovered' before any runtime errors (such as notices you were getting before). That's why you're getting a shorter error message now, but it doesn't mean you fixed these errors. On contrary, you introduced a new one, that doesn't even allow the script to run.

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.