Check path on this require
require_once(/www/DW/prod.lib.php);
something is wrong with this
- Original Message -
From: NIPP, SCOTT V (SBCSI) [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 06, 2003 10:17 PM
Subject: RE: [PHP-DB] Weird PHP behavior...
Here is the working code...
?php
require_once(/www/DW/prod.lib.php);
$hr = date(G);
if ($hr 7) {
$sql = mysql(Calendar2,SELECT B.Title, UNIX_TIMESTAMP(A.StartDate),
UNIX_TIMESTAMP(A.StopDate) FROM `phpCalendar_Details` AS B,
`phpCalendar_Daily` AS A WHERE A.CalendarDetailsID = B.CalendarDetailsID
AND CURDATE() BETWEEN A.StartDate AND A.StopDate) or die(mysql_error());
$mid = mktime (0,0,0,date(m) ,date(d)+1,date(Y));
} else {
$sql = mysql(Calendar2,SELECT B.Title, UNIX_TIMESTAMP(A.StartDate),
UNIX_TIMESTAMP(A.StopDate) FROM `phpCalendar_Details` AS B,
`phpCalendar_Daily` AS A WHERE A.CalendarDetailsID = B.CalendarDetailsID
AND CURDATE()-2 BETWEEN A.StartDate AND A.StopDate) or
die(mysql_error());
$sql2 = mysql(Calendar2,SELECT B.Title FROM `phpCalendar_Details`
AS
B, `phpCalendar_Daily` AS A WHERE A.CalendarDetailsID =
B.CalendarDetailsID AND CURDATE() BETWEEN A.StartDate AND A.StopDate) or
die(mysql_error());
$res2 = mysql_fetch_row($sql2);
$new = $res2[0];
$mid = mktime (0,0,0,date(m) ,date(d)-2,date(Y));
}
$res = mysql_fetch_row($sql);
$sa = $res[0];
$start = $res[1];
$stop = $res[2];
$day1 = date(l, $start);
$date1 = date(jS, $start);
$month1 = date(F, $start);
$day3 = date(l, $stop);
$date3 = date(jS, $stop);
$month3 = date(F, $stop);
if ($day1 == Friday) {
$day2 = date(l, $mid);
$date2 = date(jS, $mid);
$month2 = date(F, $mid);
if ($month1 != $month2) {
$line2 = $month1 $date1, $month2 $date2 and $date3;
} elseif ($month2 != $month3) {
$line2 = $month1 $date1 and $date2, and $month3 $date3;
} else {
$line2 = $month1 $date1, $date2, and $date3;
}
$line1 = ONCALL SA for Friday, Saturday, and Sunday;
} else {
if ($month1 != $month3) {
$line2 = $month1 $date1 and $date3;
} else {
$line2 = $month1 $date1 and $month3 $date3;
}
$line1 = ONCALL SA for $day1 and $day3;
}
mysql_select_db($database, $Prod);
$query = SELECT name, pager FROM contacts_sa WHERE sbcuid='$sa';
$said = mysql_query($query, $Prod) or die(mysql_error());
$row = mysql_fetch_row($said);
$name = $row[0];
$pager = $row[1];
if ($date3 == date(jS, $stop) $hr 8) {
$query2 = SELECT name FROM contacts_sa WHERE sbcuid='$new';
$said2 = mysql_query($query2, $Prod) or die(mysql_error());
$row2 = mysql_fetch_row($said2);
$name2 = $row2[0];
$line4 = Please be aware the On-Call turnover occurs at 8AM. brThe
oncoming SA after 8AM will be $name2.;
} else {
$line4 = $name begins On-Call at 8AM on $day1.;
}
?
html
head
titleUntitled Document/title
meta http-equiv=Content-Type content=text/html; charset=iso-8859-1
/head
body
h2 align=centerspan lang=en-usCALL 214-741-6961 br
FOR CURRENT ONCALL STATUS./span/h2
hr color=#6363C9 size=3 width=50%
p align=center?php echo $line1; ?br
/span(span lang=en-us?php echo $line2; ?/span) br
span lang=en-us?php echo $name; ? /span(pager span
lang=en-us
?php echo $pager; ?)br
?php echo $line4; ?/span/p
hr color=#6363C9 size=3 width=50%
/body
/html
The portion of PHP code prior to the HTML is inserted at the top of
the
file in the broken page. Here is how the HTML portion of the PHP is
inserted...
snip...
td background=images/bg_leftside.gif width=20nbsp;/td
td width=20 background=images/bg_main.gifnbsp;/td
td width=550 background=images/bg_main.gif valign=top
p align=left dynamicanimation=fpAnimOutflyBottomRightFP1
id=fpAnimOu
tflyBottomRightFP1 style=position: relative !important
onclick=dynAnimOut(th
is) language=Javascript1.2nbsp;/p
h2 align=centerspan lang=en-usCALL 214-741-6961 br
FOR CURRENT ONCALL STATUS./span/h2
hr color=#6363C9 size=3 width=50%
p align=center?php echo $line1; ?br
/span(span lang=en-us?php echo $line2; ?/span) br
span lang=en-us?php echo $name; ? /span(pager span
lang=en-us
?php echo $pager; ?)br
?php echo $line4; ?/span/p
hr color=#6363C9 size=3 width=50%
h4 align=centerspan lang=en-usFor escalation procedures,
a href=on-call/escalation.htmclick here./a/span/h4
h4 align=centerspan lang=en-usFor restore requests call the
Help
Desk/span/h4
...snip
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 06, 2003 11:09 AM
To: NIPP, SCOTT V (SBCSI)
Subject: RE: [PHP-DB] Weird PHP behavior...
well show the working code and then show just a portion of the code that
is
broken specifically where you are trying to inslucde the working