cvs: phpweb(NEW_LOOK_2001) / bugs.php mirrors.php search.php source.php /error index.php /gifs php_logo.gif small_submit.gif /include
shared-manual.inc shared.inc site.inc
| From: | Jim Winstead | Date: | Tue, 06 Feb 2001 01:05:32 +0000 |
| Subject: | cvs: phpweb(NEW_LOOK_2001) / bugs.php mirrors.php search.php source.php /error index.php /gifs php_logo.gif small_submit.gif /include shared-manual.inc shared.inc site.inc |
||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-3775@lists.php.net to get a copy of this message | ||
jimw Mon Feb 5 17:05:32 2001 EDT
Added files: (Branch: NEW_LOOK_2001)
/phpweb/gifs php_logo.gif small_submit.gif
Modified files:
/phpweb bugs.php mirrors.php search.php source.php
/phpweb/error index.php
/phpweb/include shared-manual.inc shared.inc site.inc
Log:
new look, on a branch for right now
Index: phpweb/bugs.php diff -u phpweb/bugs.php:1.79 phpweb/bugs.php:1.79.2.1 --- phpweb/bugs.php:1.79 Thu Feb 1 09:14:16 2001 +++ phpweb/bugs.php Mon Feb 5 17:05:31 2001 @@ -21,6 +21,10 @@ $dbhost="localhost"; $dbuser="nobody"; $dbpwd=""; +} else if (strstr($MYSITE,"news.php.net")) { + $dbhost="localhost"; + $dbuser="nobody"; + $dbpwd=""; } else { Header("Location: http://bugs.php.net/" . ($QUERY_STRING ? "?$QUERY_STRING" : "")); exit; @@ -30,7 +34,6 @@ $edit = $MAGIC_COOKIE ? 1 : 2; */ -$DISABLE_KICKOUTS=1; commonHeader("Bug Reporting"); echo "<!-- Bug photo by Dexter Sear, IO Vision. http://www.insects.org -->\n"; echo "<font size=-1>\n"; Index: phpweb/mirrors.php diff -u phpweb/mirrors.php:1.2 phpweb/mirrors.php:1.2.2.1 --- phpweb/mirrors.php:1.2 Fri Jan 19 17:42:28 2001 +++ phpweb/mirrors.php Mon Feb 5 17:05:31 2001 @@ -1,4 +1,7 @@ <? +if (isset($country) { + header("Location: http://$country.php.net/"); +} require("shared.inc"); commonHeader("Mirrors Page"); ?> Index: phpweb/search.php diff -u phpweb/search.php:1.4 phpweb/search.php:1.4.2.1 --- phpweb/search.php:1.4 Tue Jan 23 14:56:22 2001 +++ phpweb/search.php Mon Feb 5 17:05:31 2001 @@ -124,7 +124,7 @@ $form="http://uk.php.net/search.php"; } if (!isset($base)) { - if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,&$reg)) { + if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,$reg)) { $base=$reg[1]; } if ($base==$MYSITE) { @@ -162,7 +162,7 @@ } if (isset($page)) {$off="&page=$page";} else {$off="";} $query="words=$words&config=$config&exclude=$exclude&restrict=$restrict$off"; - exec("$htsearch_prog \"$query\"",&$result); + exec("$htsearch_prog \"$query\"",$result); $rc=count($result); if ($rc<2) { echo "<B>There was an error executing this query.</B><BR><BR>Please try later<BR><BR>"; Index: phpweb/source.php diff -u phpweb/source.php:1.1 phpweb/source.php:1.1.2.1 --- phpweb/source.php:1.1 Mon May 22 11:30:01 2000 +++ phpweb/source.php Mon Feb 5 17:05:31 2001 @@ -2,16 +2,13 @@ require("shared.inc"); commonHeader("Show Source"); -if (!isset($page_url)) { +if (!isset($url)) { echo "No page URL specified."; commonFooter(); exit; } ?> -Source of: <? echo $page_url; ?><BR> -<FONT SIZE=-1> -<B>IMPORTANT:</B> There are some restrictions on your use of the code and graphics on this site.<BR> -You should read the <A HREF="/COPYRIGHT.txt">copyright</A>.<BR> +Source of: <? echo $url; ?><BR> <hr noshade> <? @@ -20,11 +17,11 @@ "/include" => 1, "/stats" => 1); -$dir = dirname($page_url); +$dir = dirname($url); if ($dir && $legal_dirs[$dir]) { - $page_name = $DOCUMENT_ROOT . $page_url; + $page_name = $DOCUMENT_ROOT . $url; } else { - $page_name = basename($page_url); + $page_name = basename($url); } echo("<!-- $page_name -->\n"); @@ -41,9 +38,9 @@ <P> The syntax highlighted source is automatically generated by PHP from the plaintext script.<br> If you're interested in what's behind the <B>commonHeader()</B> and <B>commonFooter</B> functions, -you can always take a look at the <A HREF="/source.php?page_url=/include/shared.inc"> +you can always take a look at the <A HREF="/source.php?url=/include/shared.inc"> source of the shared.inc</A> file. And, of course, if you want to see the source of this page, have -a look <A HREF="/source.php?page_url=/source.php">here</A>. +a look <A HREF="/source.php?url=/source.php">here</A>. </P> <? } Index: phpweb/error/index.php diff -u phpweb/error/index.php:1.20 phpweb/error/index.php:1.20.2.1 --- phpweb/error/index.php:1.20 Tue Jan 23 14:06:38 2001 +++ phpweb/error/index.php Mon Feb 5 17:05:31 2001 @@ -97,7 +97,7 @@ $form=$PHP_SELF; if (!isset($base)) { - if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,&$reg)) { + if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,$reg)) { $base=$reg[1]; } if ($base==$MYSITE) { @@ -134,7 +134,7 @@ } if (isset($page)) {$off="&page=$page";} else {$off="";} $query="words=$words&config=$config&exclude=$exclude&restrict=$restrict$off"; - exec("$htsearch_prog \"$query\"",&$result); + exec("$htsearch_prog \"$query\"",$result); $rc=count($result); if ($rc<2) { echo "<B>There was an error executing this query.</B><BR><BR>Please try later<BR><BR>"; Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.88 phpweb/include/shared-manual.inc:1.88.2.1 --- phpweb/include/shared-manual.inc:1.88 Sat Jan 27 02:48:42 2001 +++ phpweb/include/shared-manual.inc Mon Feb 5 17:05:32 2001 @@ -1,10 +1,20 @@ <?php // -*- C++ -*- require("shared.inc"); -$FRAMEMODE="manual"; +$LANGUAGES = array( + 'en' => 'English', + 'pt_BR' => 'Brazilian Portuguese', + 'nl' => 'Dutch', + 'fr' => 'French', + 'de' => 'German', + 'hu' => 'Hungarian', + 'it' => 'Italian', + 'ja' => 'Japanese', + 'kr' => 'Korean', + 'ru' => 'Russian', + 'es' => 'Spanish', +); -$navBarNo = ""; - $NEXT = $PREV = $UP = $HOME = array(false, false); $TOC = array(); @@ -19,255 +29,172 @@ $tstamp = gmdate("D, d M Y",getlastmod()); } -function makeBullet($url,$number,$offtype,$offnum) { - echo "<A HREF=\"$url\" onMouseover=\"hide();changebullet('bullet$number',1)\" \n"; - echo "onMouseout=\"changebullet('bullet$number',$offnum)\">"; - echo "<IMG SRC=\"/gifs/b-bullet-$offtype.gif\" \n WIDTH=10 HEIGHT=10 HSPACE=2 VSPACE=2 BORDER=0 \n ALT=\"*\" NAME=\"bullet$number\">"; - echo "</A>"; -} - function makeBorderTOC($this) { - global $NEXT, $PREV, $UP, $HOME, $TOC, $FONTFACEATTR, $PHP_SELF, $DOCUMENT_ROOT; - global $HAVE_STYLE, $HAVE_TD_BG; + global $NEXT, $PREV, $UP, $HOME, $TOC, $PHP_SELF, $DOCUMENT_ROOT; - $tocfontsize = "-1"; // replace with CSS? + echo "Top: <b><a href=\"./\">$HOME[1]</a></b><br>\n"; + echo '<form method="GET" action="../../manual-lookup.php">'; +?> + <b><a href="../../quickref.php">quickref:</a></b><br> - $FONTCOL = " COLOR=\"#FFFFFF\""; + <input type="hidden" name="lang" value="$LANG"> + <input type="text" class="small" name="function" size="10"> + <?php echo make_submit('small_submit.gif', 'lookup', 'bottom');?> + </form> +<?php - echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 WIDTH=\"100%\">\n"; - $this = eregi_replace("^Manual: *", "", $this); - - $cur = substr(dirname($PHP_SELF),-3); - $file = basename($PHP_SELF); - echo "<TR VALIGN=top>\n"; - echo "<TD COLSPAN=3>"; - if(substr($file,-5)=='.php3') $file = substr($file,0,-1); - - // manual languages array [directory, flag code, language] - $manual_languages = Array ( - Array("en", "uk", "English"), - Array("de", "de", "German"), - Array("ja", "jp", "Japanese"), - - Array("it", "it", "Italian"), - Array("fr", "fr", "French"), - Array("hu", "hu", "Hungarian"), - - Array("es", "es", "Spanish"), - Array("nl", "nl", "Dutch"), - Array("pt_BR", "br", "Brazilian Portuguese"), - - Array("kr", "kr", "Korean"), - Array("cs", "cz", "Czech") - ); - - while (list($lang_num, $lang_data) = each ($manual_languages)) { - if (@is_file("$DOCUMENT_ROOT/manual/$lang_data[0]/$file")) echo "<a href=\"/manual/$lang_data[0]/$file\"><img src=\"/gifs/flag-$lang_data[1].gif\" valign=bottom height=24 width=45 alt=\"$lang_data[2] version of this page\"></a>"; - else echo "<img src=\"/gifs/blank.gif\" valign=bottom height=24 width=45 alt=\"$lang_data[2] version of this page is not available\">"; - if ($lang_num % 3 == 2) { echo '<br>'; } + if ($HOME[1] != $UP[1] && $UP[1]) { + echo "Up: <b><a href=\"$UP[0]\">$UP[1]</a></b>\n"; } - - echo "</TD></TR>\n"; - - echo "<TR VALIGN=top>\n"; - echo "<TD WIDTH=10>"; - spc(10, 10); - echo "</TD>\n"; - echo "<TD COLSPAN=2><A HREF=\"$UP[0]\" onMouseover=\"hide();\" CLASS=sidebartoc>"; - echo "<FONT SIZE=\"$tocfontsize\"".$FONTCOL.$FONTFACEATTR.">"; - echo "<B>$UP[1]</B></FONT></A></TD></TR>\n"; for ($i = 0; $i < count($TOC); $i++) { - list($url, $title) = $TOC[$i]; - if (!$url || !$title) { - continue; - } - if ($title == $this) { - $type = "w"; - $out = 2; - } else { - $type = "p"; - $out = 0; - } - if ($UP[0] == 'funcref.php') { - $title = eregi_replace(" functions\$", "", $title); - } - echo "<TR VALIGN=top><TD WIDTH=10>"; - spc(10,10); - echo "</TD>\n<TD WIDTH=15><A HREF=\"$url\" "; - echo "onMouseover=\"hide();changebullet('bullet$i',1)\" \n"; - echo "onMouseout=\"changebullet('bullet$i',$out)\">"; - echo "<IMG SRC=\"/gifs/b-bullet-$type.gif\" WIDTH=10 HEIGHT=10 ALT=\"*\" BORDER=0 NAME=\"bullet$i\"></A>\n"; - echo "</TD>\n<TD WIDTH=100%>"; - echo "<A HREF=\"$url\" onMouseover=\"hide();"; - echo "changebullet('bullet$i',1)\" \n "; - echo "onMouseout=\"changebullet('bullet$i',$out)\" \n"; - echo "CLASS=sidebartoc>"; - echo "<FONT SIZE=\"$tocfontsize\"".$FONTCOL.$FONTFACEATTR.">"; - echo "$title</FONT></A></TD></TR>\n"; + list($url, $title) = $TOC[$i]; + if (!$url || !$title) { + continue; + } + if ($title == $this) { + $type = "w"; + $out = 2; + } else { + $type = "p"; + $out = 0; + } + if ($UP[0] == 'funcref.php') { + $title = eregi_replace(" functions\$", "", $title); + } + echo "<li><a href=\"$url\">$title</a></li>"; } - echo "</TABLE>\n"; }; -function navigationBar($title) { - global $NEXT, $PREV, $UP, $HOME, $TOC, $FONTFACE, $tstamp; - global $navBarNo; - $no = $navBarNo; - if ($title!="Show Source") { - echo("<!-- start next/prev -->\n"); - echo "<TABLE BORDER=0 WIDTH=100% BGCOLOR='#D0D0D0' CELLPADDING=0 CELLSPACING=0>\n"; - echo "<TR VALIGN=middle>\n"; - echo "<TD ALIGN=left WIDTH=18><IMG SRC='/gifs/gcap-left.gif' ALT=' ' WIDTH=18 HEIGHT=36 BORDER=0><BR></TD>\n"; - if ($PREV[0] && $PREV[1]) { - echo "<TD ALIGN=left WIDTH=75><A HREF=\"$PREV[0]\" onMouseover=\"change('prev$no',1);\" onMouseout=\"hide();\"><IMG SRC='/gifs/b-prev-p.gif' ALT='Previous page' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='prev$no' align=absmiddle></A><BR></TD>\n"; +function navigationBar($title,$id,$loc) { + global $NEXT, $PREV, $tstamp, $SERVER_NAME,$SERVER_PORT,$PHP_SELF; + echo '<table border="0" width="800" bgcolor="#d0d0d0" cellpadding="4" cellspacing="1"><tr>'; + if ($loc == "bottom") { + echo "<td align=\"middle\" colspan=\"3\">"; + $back_url = "http://$SERVER_NAME".(($SERVER_PORT==80)?"":":".$SERVER_PORT).$PHP_SELF; + echo "<a href=\"../add-note.php?sect=$id&redirect=$back_url\">add note</a> | "; + echo "<a href=\"../about-notes.php\">about notes</a>"; + echo "</td></tr><tr>"; + } + echo "<td align=\"left\" width=\"44%\">"; + if ($PREV[1]) { + echo "Previous: <a href=\"$PREV[0]\">$PREV[1]</a>"; + } + echo " </td>\n"; + echo "<td align=\"center\" width=\"12%\">Updated<br>$tstamp</td>\n"; + echo "<td align=\"right\" width=\"44%\"> "; + if ($NEXT[1]) { + echo "Next: <a href=\"$NEXT[0]\">$NEXT[1]</a>"; + } + echo "</td>\n"; + if ($loc == "top") { + echo "</tr><tr>"; + echo "<td colspan=\"3\" align=\"center\">"; + $file = substr($id,0,-4); + echo "View this page in: "; + global $LANGUAGES; + while (list($code,$name) = each($LANGUAGES)) { + if (file_exists("../$code/$id")) { + echo "<a href=\"../$code/$id\">$name</a> | "; + } + } + if (file_exists("html/$file.html")) { + echo "<a href=\"html/$file.html\">Plain HTML </a>"; + } } - echo "<TD ALIGN=left WIDTH=44%><FONT FACE='$FONTFACE' SIZE=-1> $PREV[1]<BR></FONT></TD>\n"; - echo "<TD ALIGN=center WIDTH=12% nobr><FONT FACE='$FONTFACE' SIZE=-2> Updated<br>$tstamp<BR></FONT></TD>\n"; - echo "<TD ALIGN=right WIDTH=44%><FONT FACE='$FONTFACE' SIZE=-1>$NEXT[1] <BR></FONT></TD>\n"; - if ($NEXT[0] && $NEXT[1]) { - echo "<TD ALIGN=left WIDTH=75><A HREF=\"$NEXT[0]\" onMouseover=\"change('next$no',1);\" onMouseout=\"hide();\"><IMG SRC='/gifs/b-next-p.gif' ALT='Next page' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='next$no' align=absmiddle></A><BR></TD>\n"; - } - echo "<TD ALIGN=right WIDTH=18><IMG SRC='/gifs/gcap-right.gif' alt=' ' WIDTH=18 HEIGHT=36 BORDER=0><BR></TD>\n"; - echo "</TR></TABLE>\n"; - echo "<BR>\n"; - $navBarNo = (string)((int)$navBarNo + 2); - } + echo "</tr></table>\n"; } -function makeTitle($title) { - global $FONTFACE; -?> -<TR bgcolor='#D0D0D0' valign=middle> -<TD ALIGN=left WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-left.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -<TD ALIGN=left><? - echo "<FONT FACE=\"$FONTFACE\">\n"; - echo "<B>$title</B><BR></FONT>\n"; -?></TD> -<TD ALIGN=right WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-right.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -</TR> -<? -}; - function makeEntry($date,$name,$blurb,$id=0) { - global $FONTFACE, $MAGIC_COOKIE; + global $MAGIC_COOKIE; ?> -<TR VALIGN=top> -<TD ALIGN=left><? spc(18,18);?><BR></TD> - -<TD ALIGN=left BGCOLOR="#E0E0E0"> -<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=3 WIDTH=100%> -<TR><TD> +<tr valign="top"> +<td align="left" bgcolor="#e0e0e0"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> +<tr><td> <? - echo "<FONT FACE=\"$FONTFACE\" SIZE=-1>\n"; - $name = htmlspecialchars($name); + $name = htmlspecialchars($name); if (ereg("(.+)@(.+)\.(.+)",$name)) { - echo "<A HREF=\"mailto:".$name."\">".$name."</A><BR>\n"; + echo "<a href=\"mailto:".$name."\">".$name."</a><br>\n"; } else { - echo "<B>".$name."</B><BR>\n"; + echo "<b>".$name."</b><br>\n"; } - echo date("d-M-Y h:i",$date)."<BR>\n"; + echo date("d-M-Y h:i",$date); ?> -</TD></TR> -<TR BGCOLOR="#F0F0F0"><TD> +</td></tr> +<tr bgcolor="#f0f0f0"><td> <? echo clean_note($blurb); ?><BR> <?if (isset($MAGIC_COOKIE)):?> <hr noshade size=1> -<A href="/manual/admin-notes.php?action=delete+<?echo $id?>&brief=1&popup=1" target="admin">delete</A> | -<A href="/manual/admin-notes.php?action=reject+<?echo $id?>&brief=1&popup=1" target="admin">reject</A> | -<A href="/manual/admin-notes.php?action=edit+<?echo $id?>&brief=1" target="admin">edit</A> -<BR> +<a href="/manual/admin-notes.php?action=delete+<?echo $id?>&brief=1&popup=1" target="admin">delete</a> | +<a href="/manual/admin-notes.php?action=reject+<?echo $id?>&brief=1&popup=1" target="admin">reject</a> | +<a href="/manual/admin-notes.php?action=edit+<?echo $id?>&brief=1" target="admin">edit</a> <?endif;?> -</TD></TR> -</TABLE> - -</TD> -<TD ALIGN=left bgcolor='#ffffff'><? spc(18,18);?><BR></TD> -</TR> +</td></tr> +</table> +</td> +</tr> <? }; -function makeAddNote() { - global $FONTFACE; -?> -<TR bgcolor='#D0D0D0' valign=middle> -<TD ALIGN=left WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-left.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -<TD ALIGN=right WIDTH=100% -><INPUT TYPE=image name="addnote" VALUE="Add Note" SRC="/gifs/b-addnote-p.gif" ALT="Add a Note" -onMouseover="change('addnote',1);" onMouseout="hide();" -WIDTH=100 HEIGHT=21 VSPACE=7 BORDER=0 align=absmiddle -></A -> <A HREF="/manual/about-notes.php" onMouseover="change('abnote',1);" onMouseout="hide();" -><IMG SRC='/gifs/b-about-p.gif' ALT='About Notes' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='abnote' align=absmiddle -></A><BR> -</TD> -<TD ALIGN=right WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-right.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -</TR> -<? -}; - function manualGetUserNotes($title, $id) { - // if we're www.php.net, get it from the local DB - // otherwise look in "/manual/usernotes/$title.txt" (if present) - global $MYSITE; - $notes = array(); - if(strstr($MYSITE,"www.php.net")) { -# if(strstr($MYSITE,"www.php.net") || strstr($MYSITE,"localhost")) { - $host = 'localhost'; -# $host = '127.0.0.1'; - $user = 'nobody'; - $pass = ''; - $db_id = mysql_connect($host, $user, $pass); - $query = "SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE sect = '$title' OR sect = '$id' ORDER BY id"; - $result_id = mysql_db_query("php3", $query, $db_id); - if ($result_id && mysql_num_rows($result_id) > 0) { - while ($row = mysql_fetch_array($result_id)) { - $notes[] = $row; - } - } - } else { - $notes_file = "usernotes/" . urlencode( $title ) . ".txt"; - if ( @file_exists( $notes_file ) ) - { - $fp = @fopen($notes_file,"r"); - if ($fp) { - $body = fread($fp,filesize($notes_file)); - if (strlen($body)) { - $notes = @unserialize($body); - } - fclose($fp); - } - } - } - return $notes; + // if we're www.php.net, get it from the local DB + // otherwise look in "/manual/usernotes/$title.txt" (if present) + global $MYSITE; + $notes = array(); + if(strstr($MYSITE,"www.php.net")) { +# if(strstr($MYSITE,"www.php.net") || strstr($MYSITE,"localhost")) { + $host = 'localhost'; +# $host = '127.0.0.1'; + $user = 'nobody'; + $pass = ''; + $db_id = mysql_connect($host, $user, $pass); + $query = "SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE sect = '$title' OR sect = '$id' ORDER BY id"; + $result_id = mysql_db_query("php3", $query, $db_id); + if ($result_id && mysql_num_rows($result_id) > 0) { + while ($row = mysql_fetch_array($result_id)) { + $notes[] = $row; + } + } + } else { + $notes_file = "../usernotes/" . urlencode( $title ) . ".txt"; + if ( @file_exists( $notes_file ) ) + { + $fp = @fopen($notes_file,"r"); + if ($fp) { + $body = fread($fp,filesize($notes_file)); + if (strlen($body)) { + $notes = @unserialize($body); + } + fclose($fp); + } + } + } + return $notes; } function manualUserNotes($title, $id) { - global $PHP_SELF, $SERVER_NAME, $SERVER_PORT; - $cur = substr(dirname($PHP_SELF),-2); - if($cur=='al') $cur='en'; - echo '<FORM method="POST" action="http://www.php.net/manual/add-note.php?lang='.$cur.'">'; - $back_url = "http://$SERVER_NAME".(($SERVER_PORT==80)?"":":".$SERVER_PORT).$PHP_SELF; - echo '<INPUT type=hidden name="redirect" value="'.$back_url.'">'; - echo '<INPUT type=hidden name="sect" value="'.$title.'">'; - - echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width=100%>\n"; - - $notes = manualGetUserNotes($title, $id); - $num_notes = count($notes); - if ( $num_notes > 0 ) { - makeTitle("User Contributed Notes: ".$title); - for ($i=0; $i<$num_notes; $i++) { - $note = $notes[$i]; // should use foreach? - makeEntry($note['xwhen'],$note['user'],$note['note'],$note['id']); - } - } - makeAddNote(); - echo "</TABLE></FORM>\n"; + global $PHP_SELF, $SERVER_NAME, $SERVER_PORT; + $cur = substr(dirname($PHP_SELF),-2); + if($cur=='al') $cur='en'; + + echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"100%\">\n"; + + $notes = manualGetUserNotes($title, $id); + $num_notes = count($notes); + if ( $num_notes > 0 ) { + echo "<tr bgcolor=\"#d0d0d0\"><td><b>User Contributed Notes: $title</b></td></tr>"; + for ($i=0; $i<$num_notes; $i++) { + $note = $notes[$i]; // should use foreach? + makeEntry($note['xwhen'],$note['user'],$note['note'],$note['id']); + } + } + echo "</table>\n"; } function manualLastModified($title, $id) { @@ -292,25 +219,38 @@ } function sendManualHeaders($charset,$lang) { - Header("Content-type: text/html;charset=$charset"); - Header("Content-language: $lang"); + global $LANG; + $LANG = $lang; + Header("Content-type: text/html;charset=$charset"); + Header("Content-language: $lang"); } function manualHeader($title,$id="") { - global $FRAMEMODE, $HTDIG; - manualLastModified($title,$id); - commonHeader("Manual: $title"); - if (!$HTDIG): - navigationBar($title); - endif; + global $HTDIG, $LANGUAGES, $LANG; + manualLastModified($title,$id); + commonHeader("Manual: $title", 1); + # create links to plain html and other languages + if (!$HTDIG): + navigationBar($title, $id, "top"); + endif; + echo '<table width="800" border="0" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + echo '<td valign="top">'; } function manualFooter($title,$id="") { - global $HTDIG; - if (!$HTDIG): - manualUserNotes($title,$id); - navigationBar($title); - endif; - commonFooter($title); + if (!$HTDIG): + manualUserNotes($title,$id); + endif; + echo '</td>'; + echo '<td valign="top" bgcolor="#e0e0e0">'; + makeBorderTOC($title); + echo '</td>'; + echo '</tr></table><!--HITHERE-->'; + global $HTDIG; + if (!$HTDIG): + navigationBar($title, $id, "bottom"); + endif; + commonFooter($title); } ?> Index: phpweb/include/shared.inc diff -u phpweb/include/shared.inc:1.124 phpweb/include/shared.inc:1.124.2.1 --- phpweb/include/shared.inc:1.124 Mon Jan 22 12:12:16 2001 +++ phpweb/include/shared.inc Mon Feb 5 17:05:32 2001 @@ -3,12 +3,13 @@ /* Check that browser! */ -$IE4 = false; $IE3 = false; -$NS4 = false; $NS3 = false; -$X11 = false; $HAVE_STYLE = false; $HTDIG = false; -$DISABLE_KICKOUTS = false; +# figure out the directory root +if (!$BASE_DIR) { + $BASE_DIR = ereg_replace("/[^/]+/[^/]+$", "", $INCLUDE_DIR); +} + if($SCRIPT_NAME=="/bugs.php" || $SCRIPT_NAME=="/bugstats.php") { # $my_logo="/jpgs/logo-bug.jpg"; $my_logo="/gifs/logo-bug.gif"; @@ -18,251 +19,8 @@ $my_size="WIDTH=130 HEIGHT=67"; } -# prevent errors if the user is being paranoid -# they should get the plain version of the site - -if (!isset($HTTP_USER_AGENT)) { - $HTTP_USER_AGENT = "none"; -} - - -if (ereg("MSIE ([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $IE4=true; - $HAVE_STYLE = true; - elseif($ver==3): - $IE3=true; - endif; -elseif (ereg("Mozilla/([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $NS4=true; - $HAVE_STYLE=true; - elseif($ver==3): - $NS3=true; - endif; -endif; - -if (strstr($HTTP_USER_AGENT,"Opera")): -# $DISABLE_KICKOUTS = true; - $HAVE_STYLE=true; - $NS4=true; -endif; - -if (strstr($HTTP_USER_AGENT,"X11")): - $X11 = true; -endif; -if (strstr($HTTP_USER_AGENT,"htdig")): - $HTDIG = true; -endif; - -/* Base variables */ - -$FONTFACE = "tahoma, verdana, arial, helvetica, sans-serif"; -$FRAMEMODE = "standard"; -$FONTFACEATTR = " FACE=\"$FONTFACE\""; - -/* Base functions */ - -function preloadImages() { - global $FRAMEMODE; -?> - b_close0 = new Image(); - b_close0.src = "/gifs/b-close-p.gif"; - b_close1 = new Image(); - b_close1.src = "/gifs/b-close-c.gif"; - - b_cred0 = new Image(); - b_cred0.src = "/gifs/b-credits-p.gif"; - b_cred1 = new Image(); - b_cred1.src = "/gifs/b-credits-c.gif"; - - b_top0 = new Image(); - b_top0.src = "/gifs/b-top-p.gif"; - b_top1 = new Image(); - b_top1.src = "/gifs/b-top-c.gif"; - - b_sear0 = new Image(); - b_sear0.src = "/gifs/b-search-p.gif"; - b_sear1 = new Image(); - b_sear1.src = "/gifs/b-search-c.gif"; - - b_sour0 = new Image(); - b_sour0.src = "/gifs/b-source-p.gif"; - b_sour1 = new Image(); - b_sour1.src = "/gifs/b-source-c.gif"; - - b_proj0 = new Image(); - b_proj0.src = "/gifs/b-projects-p.gif"; - b_proj1 = new Image(); - b_proj1.src = "/gifs/b-projects-c.gif"; - - b_mirr0 = new Image(); - b_mirr0.src = "/gifs/b-mirror-p.gif"; - b_mirr1 = new Image(); - b_mirr1.src = "/gifs/b-mirror-c.gif"; - - b_next0 = new Image(); - b_next0.src = "/gifs/b-next-p.gif"; - b_next1 = new Image(); - b_next1.src = "/gifs/b-next-c.gif"; - - b_prev0 = new Image(); - b_prev0.src = "/gifs/b-prev-p.gif"; - b_prev1 = new Image(); - b_prev1.src = "/gifs/b-prev-c.gif"; - - b_next20 = new Image(); - b_next20.src = "/gifs/b-next-p.gif"; - b_next21 = new Image(); - b_next21.src = "/gifs/b-next-c.gif"; - - b_prev20 = new Image(); - b_prev20.src = "/gifs/b-prev-p.gif"; - b_prev21 = new Image(); - b_prev21.src = "/gifs/b-prev-c.gif"; - - b_qref0 = new Image(); - b_qref0.src = "/gifs/b-quickref-p.gif"; - b_qref1 = new Image(); - b_qref1.src = "/gifs/b-quickref-c.gif"; - - b_stat0 = new Image(); - b_stat0.src = "/gifs/b-stats-p.gif"; - b_stat1 = new Image(); - b_stat1.src = "/gifs/b-stats-c.gif"; - -<? if ($FRAMEMODE == "manual"): ?> - b_cont0 = new Image(); - b_cont0.src = "/gifs/b-contents-p.gif"; - b_cont1 = new Image(); - b_cont1.src = "/gifs/b-contents-c.gif"; - - b_up0 = new Image(); - b_up0.src = "/gifs/b-up-p.gif"; - b_up1 = new Image(); - b_up1.src = "/gifs/b-up-c.gif"; - - b_addnote0 = new Image(); - b_addnote0.src = "/gifs/b-addnote-p.gif"; - b_addnote1 = new Image(); - b_addnote1.src = "/gifs/b-addnote-c.gif"; - - b_abnote0 = new Image(); - b_abnote0.src = "/gifs/b-about-p.gif"; - b_abnote1 = new Image(); - b_abnote1.src = "/gifs/b-about-c.gif"; - - b_bullet0 = new Image(); - b_bullet0.src = "/gifs/b-bullet-p.gif"; - b_bullet1 = new Image(); - b_bullet1.src = "/gifs/b-bullet-c.gif"; - b_bullet2 = new Image(); - b_bullet2.src = "/gifs/b-bullet-w.gif"; -<? else: ?> - b_down0 = new Image(); - b_down0.src = "/gifs/b-downloads-p.gif"; - b_down1 = new Image(); - b_down1.src = "/gifs/b-downloads-c.gif"; - - b_docs0 = new Image(); - b_docs0.src = "/gifs/b-docs-p.gif"; - b_docs1 = new Image(); - b_docs1.src = "/gifs/b-docs-c.gif"; - - b_mail0 = new Image(); - b_mail0.src = "/gifs/b-mailing-p.gif"; - b_mail1 = new Image(); - b_mail1.src = "/gifs/b-mailing-c.gif"; - - b_dev0 = new Image(); - b_dev0.src = "/gifs/b-development-p.gif"; - b_dev1 = new Image(); - b_dev1.src = "/gifs/b-development-c.gif"; - - b_news0 = new Image(); - b_news0.src = "/gifs/b-news-p.gif"; - b_news1 = new Image(); - b_news1.src = "/gifs/b-news-c.gif"; - - b_link0 = new Image(); - b_link0.src = "/gifs/b-links-p.gif"; - b_link1 = new Image(); - b_link1.src = "/gifs/b-links-c.gif"; -<? endif; -} - - function spc($width, $height) { - echo "<IMG SRC=\"/gifs/spacer.gif\" WIDTH=$width HEIGHT=$height BORDER=0>"; -} - -function kickHeader($offset,$side,$width) { - global $FONTFACEATTR; - $off=abs($offset); - $innerwidth=$width-40; - $innerwidth2=$innerwidth+21; - $tablewidth=$width; - if ($side=="left"): - $tablewidth=$tablewidth+50; - endif; - if ($side=="none"): - $tablewidth=$tablewidth+1; - endif; - echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n"; - if ($side=="left" || $side=="none"): - echo "<TR>\n"; - if ($offset>=0): - if ($side=="left"): - echo "<TD valign=top rowspan=3 width=30>"; - spc(1,$off); - echo "<BR><IMG SRC=\"/gifs/bubbles-up.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR></TD>\n"; - else: - echo "<TD valign=top rowspan=3 width=1>"; - spc(1,1); - echo "<BR></TD>\n"; - endif; - else: - echo "<TD valign=bottom rowspan=3 width=30><IMG SRC=\"/gifs/bubbles-up.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR>"; - spc(1,$off); - echo "<BR></TD>\n"; - endif; - else: - if ($offset>=0): - echo "<TR>\n<TD colspan=4 align=left>"; - spc($off,1); - echo "<IMG SRC=\"/gifs/bubbles-down.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR></TD></TR>\n"; - else: - echo "<TR><TD colspan=4 align=right width=$width><IMG SRC=\"/gifs/bubbles-down.gif\" WIDTH=50 HEIGHT=50 BORDER=0>"; - spc($off,1); - echo "<BR></TD>\n</TR>\n"; - endif; - echo "<TR VALIGN=top>\n"; - endif; - echo "<TD width=9><IMG SRC=\"/gifs/kick-ctl.gif\" WIDTH=9 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "<TD colspan=2 BACKGROUND=\"/gifs/kick-bt.gif\">"; - spc(1,10); - echo "<BR></TD>\n<TD width=10><IMG SRC=\"/gifs/kick-ctr.gif\" WIDTH=10 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "</TR>\n"; - echo "<TR VALIGN=top><TD BACKGROUND=\"/gifs/kick-bl.gif\" width=9>"; - spc(9,1); - echo "<BR></TD>\n<TD BGCOLOR=\"#EFEF52\" width=$innerwidth><FONT $FONTFACEATTR SIZE=2>\n"; -} - -function kickFooter($kickname,$buttname,$width) { - $innerwidth=$width-40; - $innerwidth2=$innerwidth+21; - echo "</FONT></TD>\n<TD BACKGROUND=\"/gifs/kick-bg.gif\" width=21 VALIGN=top>"; - echo "<A HREF=\"javascript:popUp('$kickname',false);change('$buttname',0);\"><IMG SRC=\"/gifs/kick-close.gif\" ALT=\"Close this window\" WIDTH=21 HEIGHT=21 BORDER=0></A><BR>"; - echo "</TD>\n<TD BACKGROUND=\"/gifs/kick-br.gif\" width=10>"; - spc(10,1); - echo "<BR></TD>\n</TR>\n<TR VALIGN=top>\n"; - echo "<TD width=9><IMG SRC=\"/gifs/kick-cbl.gif\" WIDTH=9 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "<TD colspan=2 BACKGROUND=\"/gifs/kick-bb.gif\">"; - spc(1,10); - echo "<BR></TD>\n<TD width=10><IMG SRC=\"/gifs/kick-cbr.gif\" WIDTH=10 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "</TR>\n</TABLE>\n"; + echo "<img src=\"/gifs/spacer.gif\" width=\"$width\" height=\"$height\" border=\"0\" alt=\"\">"; } function download_link($file, $title) { @@ -282,341 +40,163 @@ echo " (".$filesizes[$local_file].")"; } } - -function gifurl($img) { - global $root_url; - return $root_url . "/gifs/" . $img; -} - -function jpgurl($img) { - global $root_url; - return $root_url . "/jpgs/" . $img; -} - -function makeSideButton($url,$button,$kick,$gif,$width,$height,$vspace,$hspace,$alt,$br) { - if ($url): - echo "<A HREF=\"$url\" onMouseover=\"change('$button',1);"; - if ($kick): - echo " popUp('$kick',true);\" \n >"; - else: - echo "\" \n onMouseout=\"hide();\">"; - endif; - endif; - echo "<IMG SRC=\"/gifs/b-$gif-p.gif\" \n ALT=\"$alt\" \n WIDTH=$width HEIGHT=$height BORDER=0 \n NAME=\"$button\" \n HSPACE=$hspace VSPACE=$vspace>"; - if ($url): - echo "</A>"; - endif; - echo $br; -} - -function commonHeader($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FRAMEMODE, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE, $COUNTRIES, $MIRRORS, $MYSITE; - global $HAVE_STYLE,$HAVE_SEARCH; - global $NEXT, $PREV, $UP, $HOME, $TOC; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - $HAVE_SEARCH=$MIRRORS[$MYSITE][5]; - - Header("Vary: User-Agent"); - $lang = strtolower(substr(dirname($PHP_SELF),-2)); - switch($lang) { - case 'kr': - case 'ja': - Header("Content-Type: text/html; charset=utf-8"); - Header("Content-language: $lang"); - break; - case 'hu': - Header("Content-Type: text/html; charset=iso-8859-2"); - Header("Content-language: hu"); - break; - default: - Header("Content-Type: text/html; charset=iso-8859-1"); - Header("Content-language: $lang"); - break; - } +# make_image() +# - return a <img> tag for a given file (relative to the images dir) +function make_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if ($size = @getimagesize("$GLOBALS[BASE_DIR]/gifs/$file")) { + $image = sprintf('<img src="%s/%s" border="%d" %s %s%s%s>', + "/gifs/", + $file, + $border, + $size[3], + ($alt ? ' alt="'.$alt.'"' : ''), + ($align ? ' align="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } else { + $image = sprintf('<img src="%s/%s" border="%d"%s%s%s>', + "/gifs/", + $file, + $border, + ($alt ? ' ALT="'.$alt.'"' : ''), + ($align ? ' ALIGN="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } + return $image; +} + +# print_image() +# - print an <img> tag for a given file in the images dir +function print_image($file, $alt=false, $align=false, $extras=false, $dir="gifs") { + print make_image($file, $alt, $align, $extras, $dir); +} + +# make_submit() +# - make a submit button image +function make_submit($file,$alt=false,$align=false,$extras=false) { + $return = make_image($file,$alt,$align,$extras); + if ($return != "<img>") { + $return = '<input type="image"'.substr($return,4); + } else { + $return = '<input type="submit">'; + } + return $return; +} + +# spacer() +# - print a blank space GIF +function spacer($width=1, $height=1, $align=false) { + print make_sized_image($width, $height, $align, 'spacer.gif'); +} + +function make_sized_image($width=1, $height=1, $align=false, $image='spacer.gif') { + return sprintf('<img src="%s/%s" border="0" width="%s" height="%s"%s>', + "/gifs/", + $image, + $width, + $height, + ($align ? ' align="'.$align.'"' : '') + ); +} + +function delim($color=false) { + if (!$color) { + return ' | '; + } + return sprintf('<font color="%s"> | </font>', + $color); +} + +# make_link() +# - return a hyperlink to something, within the site + +function make_link ($url, $linktext=false, $target=false, $extras=false) { + $return = sprintf("<a href=\"%s\"%s%s>%s</a>", + $url, + ($target ? ' target="'.$target.'"' : ''), + ($extras ? ' '.$extras : ''), + ($linktext ? $linktext : $url) + ); + return $return; +} + +# print_link() +# - echo a hyperlink to something, within the site + +function print_link($url, $linktext=false, $target=false, $extras=false) { + print make_link($url, $linktext, $target, $extras); +} + +$enclosed = 0; + +function commonHeader($title="",$dont_enclose=0) { + global $MYSITE, $MIRRORS, $COUNTRIES, $enclosed;?> +<html> +<head> + <title>PHP<?php if ($title) echo ": $title";?></title> + <link rel="stylesheet" href="/style.css"> +</head> + +<body + topmargin="0" leftmargin="0" + marginheight="0" marginwidth="0" + bgcolor="#ffffff" + text="#000000" + link="#000099" + alink="#0000ff" + vlink="#000099" +><a name="TOP"></a> +<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> + <tr bgcolor="#9999cc"> + <td align="middle" rowspan="2" width="120"> +<?php if ($GLOBALS["REQUEST_URI"] != "/") echo '<a href="/">'; + print_image('php_logo.gif', 'PHP'); + if ($GLOBALS["REQUEST_URI"] != "/") echo '</a>'; ?> -<HTML> -<HEAD> -<TITLE>PHP: <? echo $title;?></TITLE> - -<? if ($HAVE_STYLE): ?> -<LINK REL="stylesheet" HREF="/php-style.css" TYPE="text/css"> -<? endif; ?> - -<SCRIPT LANGUAGE="JavaScript"> -<!-- - -if (window != top) top.location.href = location.href; - -NS4 = (document.layers) ? 1 : 0; -IE4 = (document.all) ? 1 : 0; -DOM = (document.getElementById) ? 1 : 0; -ver4 = (NS4 || IE4) ? 1 : 0; - -/* -<? readfile($DOCUMENT_ROOT."/COPYRIGHT.txt"); ?> -*/ - -/* -Debugging: - $IE4 = <? echo $IE4; ?> - $IE3 = <? echo $IE3; ?> - $NS4 = <? echo $NS4; ?> - $NS3 = <? echo $NS3; ?> - $X11 = <? echo $X11; ?> - $HAVE_STYLE = <? echo $HAVE_STYLE; ?> -*/ - -var loaded = 0; -var gotlayers = 0; -var lastbutton='top'; - -// --> -</SCRIPT> - -<? if (($NS4 || $IE4) && (!$DISABLE_KICKOUTS)): /* Kick Outs */ ?> -<SCRIPT LANGUAGE="JavaScript1.2"> -<!-- - -function moveLayers() { - if (gotlayers) { - if (NS4) { - screenWidth = window.innerWidth; -<? if ($FRAMEMODE!="manual"): ?> - document.layers['mirrorsKick'].left = 140; - document.layers['mirrorsKick'].top = 215; -<? endif; ?> - document.layers['qrefKick'].left = 140; - document.layers['qrefKick'].top = 80; - document.layers['searchKick'].left = screenWidth-350; - document.layers['searchKick'].top = 36; - } else if (DOM) { - screenWidth = (document.body.clientWidth ? document.body.clientWidth : window.innerWidth) + 18; -<? if ($FRAMEMODE!="manual"): ?> - document.getElementById('mirrorsKick').style.left = 140; - document.getElementById('mirrorsKick').style.top = 215; -<? endif; ?> - document.getElementById('qrefKick').style.left = 140; - document.getElementById('qrefKick').style.top = 80; - document.getElementById('searchKick').style.left = screenWidth-350; - document.getElementById('searchKick').style.top = 36; - } else { - screenWidth = document.body.clientWidth + 18; -<? if ($FRAMEMODE!="manual"): ?> - document.all['mirrorsKick'].style.pixelLeft = 140; - document.all['mirrorsKick'].style.pixelTop = 215; -<? endif; ?> - document.all['qrefKick'].style.pixelLeft = 140; - document.all['qrefKick'].style.pixelTop = 80; - document.all['searchKick'].style.pixelLeft = screenWidth-350; - document.all['searchKick'].style.pixelTop = 36; - } - } -} - -function popUp(menuName,on) { - if (gotlayers) { - if (on) { - moveLayers(); - if (NS4) { - document.layers[menuName].visibility = "show"; - } else if (DOM) { - document.getElementById(menuName).style.visibility = "visible"; - } else { - document.all[menuName].style.visibility = "visible"; - } - } else { - if (NS4) { - document.layers[menuName].visibility = "hide"; - } else if (DOM) { - document.getElementById(menuName).style.visibility = "hidden"; - } else { - document.all[menuName].style.visibility = "hidden"; - } - } - } + </td> + <td align="right" valign="top"> + <small><font color="#ffffff"><b> + Mirror last updated: + <?php echo strftime("%c")?> + </b> <br> + </font> + </td> + </tr> + + <tr bgcolor="#9999cc"> + <td align="right" valign="bottom"> + <form method="POST" action="/search.php"> + <?php + print_link('/downloads.php','downloads',false,'class="small"'); + echo delim(); + print_link('/docs.php', 'documentation', false, 'class="small"'); + echo delim(); + print_link('/support.php','support',false,'class="small"'); + echo delim(); + print_link('/bugs.php','reporting bugs',false,'class="small"'); + echo delim(); + print_link('/links.php','links',false,'class="small"'); + echo delim(); + print_link('/search.php','search:',false,'class="small"'); + echo ' <input class="small" type="text" name="what" size=10> '; + echo make_submit('small_submit.gif', 'search', 'bottom'); + ?> <br> + </form> + </td> + </tr> + + <tr bgcolor="#333366"><td colspan="2"><?php spacer(1,1);?><br></td></tr> +</table> +<?php + if (!$dont_enclose): + $enclosed = 1;?> +<table width="700" cellpadding="4" cellspacing="0"><tr><td valign="top"> +<?php + endif; } -<? else: ?> -<SCRIPT LANGUAGE="JavaScript1.1"> -<!-- -function popUp(menuName,on) { -} -function moveLayers() { -} -<? endif; /* Kick outs */ ?> -// --> -</SCRIPT> - -<SCRIPT LANGUAGE="JavaScript1.1"> -<!-- -<? if ($NS4 || $NS3 || $IE4): /* OnOvers */ ?> -function LoadImgs () { - if (document.images) { -<? preloadImages(); ?> - loaded = 1; - } -} - -function change(Name,No) { - if (document.images && (loaded == 1) && (document[Name])) { - document[Name].src = eval("b_" + Name + No + ".src"); - } - if (No == 1) { - if (gotlayers) { -<? if ($FRAMEMODE!="manual"): ?> - popUp('mirrorsKick',false); -<? endif; ?> - popUp('qrefKick',false); - popUp('searchKick',false); - } -<? if ($FRAMEMODE!="manual"): ?> - if (Name != 'mirr') { - change('mirr',0); - } -<? endif; ?> - if (Name != 'qref') { - change('qref',0); - } - if (Name != 'sear') { - change('sear',0); - } - lastbutton = Name; - } -} - -function changebullet(Name,No) { - if (document.images && (loaded == 1)) { - document[Name].src = eval("b_bullet" + No + ".src"); - } -} - -function hide() { - if (document.images && (loaded == 1)) { - change(lastbutton,0); - } -} -<? else: /* OnOvers */ ?> - -function change(Name,No) { -} -function changebullet(Name,No) { -} -function hide() { -} - -<? endif; /* OnOvers */ - -if ($IE4): - echo "LoadImgs();\n"; -endif; -?> - -// --> -</SCRIPT> - -</HEAD> - -<BODY MARGINHEIGHT=3 MARGINWIDTH=3 TOPMARGIN=3 LEFTMARGIN=3 BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#5B69A6" VLINK="#5B69A6" ALINK="#00FF00" -<? if ($NS4 || $NS3): - echo " OnLoad=\"LoadImgs();\""; -endif; ?> -><A NAME="tOpOfpAgE"> -<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> - <TR valign=top> - <TD ALIGN=left width=150 BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=top> - <TD ALIGN=left> - <IMG SRC="/gifs/cap-ul.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - <?spc(15,67);?><A HREF="/index.php"><IMG SRC="<?echo $GLOBALS["my_logo"]?>" ALT="PHP Home Page" <?echo $GLOBALS["my_size"]?> BORDER=0></A><BR> - <?spc(1,10);?><BR> - </TD> - </TR> - <TR VALIGN=top> - <TD ALIGN=left> - <? if ($FRAMEMODE == "manual"): - makeSideButton("$HOME[0]","cont","","contents",129,30,0,10,"Manual Table of Contents","<BR>\n"); - if ($UP[0] && $UP[1]): - makeSideButton($UP[0],"up","","up",129,30,0,10,"Up to $UP[1]","<BR>\n"); - endif; - makeSideButton("/quickref.php","qref","qrefKick","quickref",129,30,0,10,"Quick Reference","<BR>\n"); - if (!$HTDIG): - makeBorderTOC($title); - endif; - else: - $lastnews=filemtime($DOCUMENT_ROOT."/news.php"); - if ($lastnews): - $lastnews="PHP News last updated: ".date("M d, Y",$lastnews); - else: - $lastnews="PHP in the News"; - endif; - makeSideButton("/downloads.php","down","","downloads",129,30,0,10,"Downloads","<BR>\n"); - makeSideButton("/docs.php","docs","","docs",129,30,0,10,"Documentation","<BR>\n"); - makeSideButton("/quickref.php","qref","qrefKick","quickref",129,30,0,10,"Quick Reference","<BR>\n"); - makeSideButton("/support.php","dev","","development",129,30,0,10,"Getting Help","<BR>\n"); - makeSideButton("/news.php","news","","news",129,30,0,10,$lastnews,"<BR>\n"); - makeSideButton("/projects.php","proj","","projects",129,30,0,10,"Projects using PHP","<BR>\n"); - makeSideButton("/links.php","link","","links",129,30,0,10,"PHP Links","<BR>\n"); - makeSideButton("/mirrors.php","mirr","mirrorsKick","mirror",129,30,0,10,"Mirror sites","<BR>\n"); - endif; ?> - </TD> - </TR> - - <TR><TH align=left><br> <a href="/thanks.php" class=blacklink>Thanks to:</a></TH></TR> - <TR><TD> <a href="http://chek.com" class=whitelink>Chek.com</a></TD></TR> - <TR><TD> <a href="http://www.easydns.com/?V=698570efeb62a6e2" class=whitelink>easyDNS</a></TD></TR> - <TR><TD> <a href="http://valinux.com" class=whitelink>VA Linux Systems</a></TD></TR> - - <TR><TH align=left><br> Related sites:</TH></TR> - <TR><TD><a href="http://www.apache.org" class=whitelink>Apache</a></TD></TR> - <TR><TD><a href="http://www.mysql.com" class=whitelink>MySQL</a></TD></TR> - <TR><TD><a href="http://www.postgresql.org" class=whitelink>PostgreSQL</a></TD></TR> - <TR><TD><a href="http://www.zend.com" class=whitelink>Zend Tech.</a></TD></TR> - - <TR><TH align=left><br> Community:</TH></TR> - <TR><TD><a href="http://www.linuxfund.org" class=whitelink>LinuxFund.org</a></TD></TR> - <TR><TD><a href="http://www.osdn.org" class=whitelink>OSDN</a></TD></TR> - - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle BGCOLOR="#5B69A6"> - <TD ALIGN=left> - <? - spc(5,1); - echo "<FONT${FONTFACEATTR} SIZE=4><B>$title</B></FONT><BR>\n"; - ?> - </TD> - <TD ALIGN=right> - <? - if($title=="Show Source"): - makeSideButton("","sour","","source",1,1,0,0,"",""); - makeSideButton("javascript:history.go(-1);","close","","close",75,30,9,5,"Close this source page",""); - else: - makeSideButton("","close","","close",1,1,0,0,"",""); - makeSideButton("/source.php?page_url=$PHP_SELF","sour","","source",75,30,9,5,"View the source code for this page",""); - endif; - makeSideButton("/search.php","sear","searchKick","search",75,30,9,5,"Search the site",""); - ?><IMG SRC="/gifs/cap-right.gif" WIDTH=24 HEIGHT=48 BORDER=0><BR></TD> - </TR> - </TABLE> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=top BGCOLOR="#FFFFFF"> - <TD ALIGN=left WIDTH="12"> - <IMG SRC="/gifs/corner-ul.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - <TD ALIGN=left WIDTH="100%"> - <? if ($FONTFACEATTR): ?> - <FONT<? echo $FONTFACEATTR;?>> - <? endif; ?> - <BR CLEAR=ALL> - <!-- start body --> -<? -} - function sect_to_file($string) { $string = strtolower($string); $string = str_replace(' ','-',$string); @@ -645,202 +225,69 @@ } function commonFooter() { - global $NS4, $NS3, $IE3, $IE4, $X11, $HAVE_STYLE, $FRAMEMODE, $FONTFACEATTR, $HTTP_USER_AGENT, $HTDIG; - global $MIRRORS, $MYSITE, $COUNTRIES; - global $NEXT, $PREV, $UP, $HOME, $TOC; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - $country=$MIRRORS[$MYSITE][0]; - $HAVE_SEARCH=$MIRRORS[$MYSITE][5]; -?> - <!-- end body --> - </TD> - </TR> - </TABLE> - </TD> - </TR> - <TR valign=bottom BGCOLOR="#5B69A6"> - <TD ALIGN=left width="150"> -<? - spc(150,1); - echo "<BR>\n"; - if (file_exists($DOCUMENT_ROOT."/stats/index.php")): - makeSideButton("/stats/index.php","stat","","stats",129,30,0,10,"Site Statistics","<BR>\n"); - endif; -?></TD> - <TD ALIGN=left width="100%" BGCOLOR="#FFFFFF"> - <IMG SRC="/gifs/corner-bl.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - </TR> - <TR valign=top> - <TD ALIGN=left width="150" BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=bottom> - <TD ALIGN=left> - <? - spc(1,3); - echo "<BR>\n"; - makeSideButton("/credits.php","cred","","credits",129,30,0,10,"Who's responsible for this?","<BR>\n"); - makeSideButton("#tOpOfpAgE","top","","top",129,30,0,10,"Top of this page","<BR>\n"); - ?> - <IMG SRC="/gifs/cap-bl.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle> - <TD ALIGN=center BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> - <FONT<? echo $FONTFACEATTR ?> SIZE=1> - <I>Site<BR>Hosting:</I><BR> - </FONT> - </TD> - <TD> - <? spc(5,1);?><BR> - </TD> - <TD> - <A HREF="<? echo $MIRRORS[$MYSITE][3]; ?>"><IMG SRC="/gifs/logo-<? echo $MIRRORS[$MYSITE][2]; ?>.gif" WIDTH=190 HEIGHT=48 BORDER=0 vspace=12></A><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD ALIGN=right BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=center> -<? if (!$HTDIG): - echo "<FONT $FONTFACEATTR SIZE=2>\n"; - echo "<FONT SIZE=1><I>Located in</I></FONT><BR>".$COUNTRIES[$country]; - endif; ?> - </TD> - <TD><? spc(5,1);?></TD> - <TD> - <IMG SRC="/gifs/flag-<? echo $country; ?>.gif" BORDER=0></TD> - <TD> - <IMG SRC="/gifs/cap-right2.gif" WIDTH=24 HEIGHT=72 BORDER=0></TD> - </TR> - </TABLE> - </TD> - </TR> - </TABLE> - </TD> - </TR> - -<TR> -<TD ALIGN="right" COLSPAN=3> -<FONT SIZE=-2> -Elements of this website are subject to <A HREF="/COPYRIGHT.txt">copyright</A>.<BR> -Questions about installing or using PHP should be directed to one of the <A HREF="/support.php">mailing lists</A>.<BR> -Only questions about the website should be directed to <A HREF="mailto:webmaster@php.net">webmaster@php.net</A>.<BR> -</FONT> -</TD> -</TR> - -</TABLE> - - -<? if (($NS4 || $IE4) && !$DISABLE_KICKOUTS): /* Kick outs */ ?> - -<DIV ID="mirrorsKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(-20,'left',400);?> -<FORM ACTION="/redirect.php" METHOD="POST"> -<B>Pick a mirror site close to you:</B><BR> -<SELECT NAME="URL"> -<? -$mirror_sites=$MIRRORS; -reset($mirror_sites); -while ($site = key($mirror_sites)): - next($mirror_sites); - $country=$mirror_sites[$site][0]; - $place=$mirror_sites[$site][1]; - $type=$mirror_sites[$site][4]; - if ($type==1 && substr($site,0,7)=="http://"): - echo "<OPTION VALUE=\"$site\">$COUNTRIES[$country] ($place)\n"; - endif; -endwhile; + global $SCRIPT_NAME,$PHP_SELF,$MIRRORS,$MYSITE,$COUNTRIES,$enclosed; + if ($enclosed):?> +</td></tr></table> +<?php + endif; ?> -</SELECT> -<INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 hspace=5 HEIGHT=21 BORDER=0> -</FORM> -<? kickFooter("mirrorsKick","mirr",400);?> -</DIV> - -<DIV ID="qrefKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(30,'left',400);?> -<FORM ACTION="/manual-lookup.php" METHOD="POST"> -<FONT SIZE=+1><B>Quick Function Reference</B></FONT><BR> -Type in a PHP function name or feature to<BR> -jump to that page of the online manual:<BR> -<FONT SIZE=3><INPUT NAME="function" TYPE="text" SIZE=25></FONT> -<INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 hspace=5 HEIGHT=21 BORDER=0> -</FORM> -or click on this button to get an alphabetical listing of all<BR> -PHP functions. -<? if ($FRAMEMODE != "manual"): ?> -(You can still click on the <B>documentation</B><BR> -button on the left for other documentation resources.) -<? endif;?><BR> -<? kickFooter("qrefKick","qref",400);?> -</DIV> - -<? -if ($HAVE_SEARCH): - $form="/search.php"; -else: - $form="http://uk.php.net/search.php"; -endif; -?> - -<DIV ID="searchKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(-35,'top',300); -if (!isset($prevsearch)): - $prevsearch[0]=""; -endif; -?> -<FORM ACTION="/search.php" METHOD="POST"> -<B>What are you searching for:</B><BR> -<input type="text" name="pattern" size=20 VALUE="<? echo $prevsearch[0];?>"><BR> -<B>Where do you want to look:</B><BR> -<SELECT NAME="show"> -<OPTION VALUE="nosource" SELECTED>Whole site -<OPTION VALUE="manual">Documentation only -<OPTION VALUE="maillist">PHP General Mailing List -<OPTION VALUE="devlist">PHP Developers' List -<OPTION VALUE="phplib">PHPLIB Mailing List -<OPTION VALUE="phplib-dev">PHPLIB Developers' List -<OPTION VALUE="php-kb">PHP Knowledge Base -<OPTION VALUE="source">Source code only -</SELECT><INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 HSPACE=5 HEIGHT=21 BORDER=0><BR> -</FORM> -<? kickFooter("searchKick","sear",300);?> -</DIV> - -<SCRIPT LANGUAGE="JavaScript1.2"> -<!-- -if (NS4) { - gotlayers = (document.layers.length == 3) ? 1 : 0; -} -if (IE4) { - gotlayers = 1; -} - -// --> -</SCRIPT> - -<SCRIPT LANGUAGE="JavaScript1.3"> -<!-- - gotlayers = 1; -// --> -</SCRIPT> - -<? -endif; /* Kick outs */ -?> -</BODY> -</HTML> -<? +<table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr bgcolor="#333366"><td><?php spacer(1,1);?><br></td></tr> + <tr bgcolor="#9999cc"> + <td align="right" valign="bottom"> + <form method="GET" action="/mirrors.php" onsubmit="return gotomirror(this)"> + <script language="javascript"> + <!-- + function gotomirror(form) { + url = form.country.options[form.country.selectedIndex].value; + window.location.href = url; + return false; + } + //--> + </script> + <input type="hidden" name="REDIRECT" value=1> + <?php + # TODO: should send current url above, so we can redirect to + # the same page on the mirror, and do the same in our javascript. + print_link('/source.php?url='.$SCRIPT_NAME, 'show source', false, 'class="small"'); + echo delim(); + print_link('/credits.php', 'credits', false, 'class="small"'); + echo delim(); + print_link('/mirrors.php', 'mirror sites:', false, 'class="small"'); + echo " <select class=\"small\" name=\"country\" onchange=\"gotomirror(this.form)\">\n"; + echo "<option value=-1>--\n"; + while (list($url,$mirror) = each($MIRRORS)) { + if ($mirror[4] == 1) { /* only list full mirrors here */ + echo "<option value=\"$url\">".$COUNTRIES[$mirror[0]]." ($mirror[1])\n"; + } + } + echo "</select> "; + echo make_submit('small_submit.gif', 'search', 'bottom' ); + ?> <br> + </form> + </td> + </tr> + <tr bgcolor="#333366"><td><?php spacer(1,1); ?><br></td></tr> +</table> + +<table border="0" cellspacing="0" cellpadding="6" width="100%"> + <tr valign="bottom" bgcolor="#cccccc"> + <td><small> + Copyright © 1998,1999,2000,2001 someone. + All rights reserved. + </td> + <td align="right"> + This mirror generously provided by: + <a href="<?php echo $MIRRORS[$MYSITE][3];?>"><?php echo $MIRRORS[$MYSITE][1];?></a> + <BR> + </td> + </tr> +</table> + +<br> + +</body> +</html> +<?php } ?> Index: phpweb/include/site.inc diff -u phpweb/include/site.inc:1.135 phpweb/include/site.inc:1.135.2.1 --- phpweb/include/site.inc:1.135 Sun Feb 4 09:57:06 2001 +++ phpweb/include/site.inc Mon Feb 5 17:05:32 2001 @@ -57,6 +57,7 @@ "http://bugs.php.net/" => array("us", "chek.com", "chek", "http://www.chek.com/", 2, 1, "en"), "http://php.he.net/" => array("us", "Hurricane Electric", "hurricane", "http://he.net/", 1, 0, "en"), "http://za.php.net/" => array("za", "CSIR Mikomtek", "mikomtek", "http://www.mikom.csir.co.za/", 1, 0, "en"), + "http://news.php.net/" => array("us", "VA Linux", "va", "http://www.valinux.com/", 2, 1, "en"), "" => array("xx", "Unknown", "none", "/", 1, 0, "en") );
Index: phpweb/bugs.php diff -u phpweb/bugs.php:1.79 phpweb/bugs.php:1.79.2.1 --- phpweb/bugs.php:1.79 Thu Feb 1 09:14:16 2001 +++ phpweb/bugs.php Mon Feb 5 17:05:31 2001 @@ -21,6 +21,10 @@ $dbhost="localhost"; $dbuser="nobody"; $dbpwd=""; +} else if (strstr($MYSITE,"news.php.net")) { + $dbhost="localhost"; + $dbuser="nobody"; + $dbpwd=""; } else { Header("Location: http://bugs.php.net/" . ($QUERY_STRING ? "?$QUERY_STRING" : "")); exit; @@ -30,7 +34,6 @@ $edit = $MAGIC_COOKIE ? 1 : 2; */ -$DISABLE_KICKOUTS=1; commonHeader("Bug Reporting"); echo "<!-- Bug photo by Dexter Sear, IO Vision. http://www.insects.org -->\n"; echo "<font size=-1>\n"; Index: phpweb/mirrors.php diff -u phpweb/mirrors.php:1.2 phpweb/mirrors.php:1.2.2.1 --- phpweb/mirrors.php:1.2 Fri Jan 19 17:42:28 2001 +++ phpweb/mirrors.php Mon Feb 5 17:05:31 2001 @@ -1,4 +1,7 @@ <? +if (isset($country) { + header("Location: http://$country.php.net/"); +} require("shared.inc"); commonHeader("Mirrors Page"); ?> Index: phpweb/search.php diff -u phpweb/search.php:1.4 phpweb/search.php:1.4.2.1 --- phpweb/search.php:1.4 Tue Jan 23 14:56:22 2001 +++ phpweb/search.php Mon Feb 5 17:05:31 2001 @@ -124,7 +124,7 @@ $form="http://uk.php.net/search.php"; } if (!isset($base)) { - if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,&$reg)) { + if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,$reg)) { $base=$reg[1]; } if ($base==$MYSITE) { @@ -162,7 +162,7 @@ } if (isset($page)) {$off="&page=$page";} else {$off="";} $query="words=$words&config=$config&exclude=$exclude&restrict=$restrict$off"; - exec("$htsearch_prog \"$query\"",&$result); + exec("$htsearch_prog \"$query\"",$result); $rc=count($result); if ($rc<2) { echo "<B>There was an error executing this query.</B><BR><BR>Please try later<BR><BR>"; Index: phpweb/source.php diff -u phpweb/source.php:1.1 phpweb/source.php:1.1.2.1 --- phpweb/source.php:1.1 Mon May 22 11:30:01 2000 +++ phpweb/source.php Mon Feb 5 17:05:31 2001 @@ -2,16 +2,13 @@ require("shared.inc"); commonHeader("Show Source"); -if (!isset($page_url)) { +if (!isset($url)) { echo "No page URL specified."; commonFooter(); exit; } ?> -Source of: <? echo $page_url; ?><BR> -<FONT SIZE=-1> -<B>IMPORTANT:</B> There are some restrictions on your use of the code and graphics on this site.<BR> -You should read the <A HREF="/COPYRIGHT.txt">copyright</A>.<BR> +Source of: <? echo $url; ?><BR> <hr noshade> <? @@ -20,11 +17,11 @@ "/include" => 1, "/stats" => 1); -$dir = dirname($page_url); +$dir = dirname($url); if ($dir && $legal_dirs[$dir]) { - $page_name = $DOCUMENT_ROOT . $page_url; + $page_name = $DOCUMENT_ROOT . $url; } else { - $page_name = basename($page_url); + $page_name = basename($url); } echo("<!-- $page_name -->\n"); @@ -41,9 +38,9 @@ <P> The syntax highlighted source is automatically generated by PHP from the plaintext script.<br> If you're interested in what's behind the <B>commonHeader()</B> and <B>commonFooter</B> functions, -you can always take a look at the <A HREF="/source.php?page_url=/include/shared.inc"> +you can always take a look at the <A HREF="/source.php?url=/include/shared.inc"> source of the shared.inc</A> file. And, of course, if you want to see the source of this page, have -a look <A HREF="/source.php?page_url=/source.php">here</A>. +a look <A HREF="/source.php?url=/source.php">here</A>. </P> <? } Index: phpweb/error/index.php diff -u phpweb/error/index.php:1.20 phpweb/error/index.php:1.20.2.1 --- phpweb/error/index.php:1.20 Tue Jan 23 14:06:38 2001 +++ phpweb/error/index.php Mon Feb 5 17:05:31 2001 @@ -97,7 +97,7 @@ $form=$PHP_SELF; if (!isset($base)) { - if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,&$reg)) { + if (ereg("^(.+//[^/]+)/",$HTTP_REFERER,$reg)) { $base=$reg[1]; } if ($base==$MYSITE) { @@ -134,7 +134,7 @@ } if (isset($page)) {$off="&page=$page";} else {$off="";} $query="words=$words&config=$config&exclude=$exclude&restrict=$restrict$off"; - exec("$htsearch_prog \"$query\"",&$result); + exec("$htsearch_prog \"$query\"",$result); $rc=count($result); if ($rc<2) { echo "<B>There was an error executing this query.</B><BR><BR>Please try later<BR><BR>"; Index: phpweb/include/shared-manual.inc diff -u phpweb/include/shared-manual.inc:1.88 phpweb/include/shared-manual.inc:1.88.2.1 --- phpweb/include/shared-manual.inc:1.88 Sat Jan 27 02:48:42 2001 +++ phpweb/include/shared-manual.inc Mon Feb 5 17:05:32 2001 @@ -1,10 +1,20 @@ <?php // -*- C++ -*- require("shared.inc"); -$FRAMEMODE="manual"; +$LANGUAGES = array( + 'en' => 'English', + 'pt_BR' => 'Brazilian Portuguese', + 'nl' => 'Dutch', + 'fr' => 'French', + 'de' => 'German', + 'hu' => 'Hungarian', + 'it' => 'Italian', + 'ja' => 'Japanese', + 'kr' => 'Korean', + 'ru' => 'Russian', + 'es' => 'Spanish', +); -$navBarNo = ""; - $NEXT = $PREV = $UP = $HOME = array(false, false); $TOC = array(); @@ -19,255 +29,172 @@ $tstamp = gmdate("D, d M Y",getlastmod()); } -function makeBullet($url,$number,$offtype,$offnum) { - echo "<A HREF=\"$url\" onMouseover=\"hide();changebullet('bullet$number',1)\" \n"; - echo "onMouseout=\"changebullet('bullet$number',$offnum)\">"; - echo "<IMG SRC=\"/gifs/b-bullet-$offtype.gif\" \n WIDTH=10 HEIGHT=10 HSPACE=2 VSPACE=2 BORDER=0 \n ALT=\"*\" NAME=\"bullet$number\">"; - echo "</A>"; -} - function makeBorderTOC($this) { - global $NEXT, $PREV, $UP, $HOME, $TOC, $FONTFACEATTR, $PHP_SELF, $DOCUMENT_ROOT; - global $HAVE_STYLE, $HAVE_TD_BG; + global $NEXT, $PREV, $UP, $HOME, $TOC, $PHP_SELF, $DOCUMENT_ROOT; - $tocfontsize = "-1"; // replace with CSS? + echo "Top: <b><a href=\"./\">$HOME[1]</a></b><br>\n"; + echo '<form method="GET" action="../../manual-lookup.php">'; +?> + <b><a href="../../quickref.php">quickref:</a></b><br> - $FONTCOL = " COLOR=\"#FFFFFF\""; + <input type="hidden" name="lang" value="$LANG"> + <input type="text" class="small" name="function" size="10"> + <?php echo make_submit('small_submit.gif', 'lookup', 'bottom');?> + </form> +<?php - echo "<TABLE BORDER=0 CELLPADDING=1 CELLSPACING=0 WIDTH=\"100%\">\n"; - $this = eregi_replace("^Manual: *", "", $this); - - $cur = substr(dirname($PHP_SELF),-3); - $file = basename($PHP_SELF); - echo "<TR VALIGN=top>\n"; - echo "<TD COLSPAN=3>"; - if(substr($file,-5)=='.php3') $file = substr($file,0,-1); - - // manual languages array [directory, flag code, language] - $manual_languages = Array ( - Array("en", "uk", "English"), - Array("de", "de", "German"), - Array("ja", "jp", "Japanese"), - - Array("it", "it", "Italian"), - Array("fr", "fr", "French"), - Array("hu", "hu", "Hungarian"), - - Array("es", "es", "Spanish"), - Array("nl", "nl", "Dutch"), - Array("pt_BR", "br", "Brazilian Portuguese"), - - Array("kr", "kr", "Korean"), - Array("cs", "cz", "Czech") - ); - - while (list($lang_num, $lang_data) = each ($manual_languages)) { - if (@is_file("$DOCUMENT_ROOT/manual/$lang_data[0]/$file")) echo "<a href=\"/manual/$lang_data[0]/$file\"><img src=\"/gifs/flag-$lang_data[1].gif\" valign=bottom height=24 width=45 alt=\"$lang_data[2] version of this page\"></a>"; - else echo "<img src=\"/gifs/blank.gif\" valign=bottom height=24 width=45 alt=\"$lang_data[2] version of this page is not available\">"; - if ($lang_num % 3 == 2) { echo '<br>'; } + if ($HOME[1] != $UP[1] && $UP[1]) { + echo "Up: <b><a href=\"$UP[0]\">$UP[1]</a></b>\n"; } - - echo "</TD></TR>\n"; - - echo "<TR VALIGN=top>\n"; - echo "<TD WIDTH=10>"; - spc(10, 10); - echo "</TD>\n"; - echo "<TD COLSPAN=2><A HREF=\"$UP[0]\" onMouseover=\"hide();\" CLASS=sidebartoc>"; - echo "<FONT SIZE=\"$tocfontsize\"".$FONTCOL.$FONTFACEATTR.">"; - echo "<B>$UP[1]</B></FONT></A></TD></TR>\n"; for ($i = 0; $i < count($TOC); $i++) { - list($url, $title) = $TOC[$i]; - if (!$url || !$title) { - continue; - } - if ($title == $this) { - $type = "w"; - $out = 2; - } else { - $type = "p"; - $out = 0; - } - if ($UP[0] == 'funcref.php') { - $title = eregi_replace(" functions\$", "", $title); - } - echo "<TR VALIGN=top><TD WIDTH=10>"; - spc(10,10); - echo "</TD>\n<TD WIDTH=15><A HREF=\"$url\" "; - echo "onMouseover=\"hide();changebullet('bullet$i',1)\" \n"; - echo "onMouseout=\"changebullet('bullet$i',$out)\">"; - echo "<IMG SRC=\"/gifs/b-bullet-$type.gif\" WIDTH=10 HEIGHT=10 ALT=\"*\" BORDER=0 NAME=\"bullet$i\"></A>\n"; - echo "</TD>\n<TD WIDTH=100%>"; - echo "<A HREF=\"$url\" onMouseover=\"hide();"; - echo "changebullet('bullet$i',1)\" \n "; - echo "onMouseout=\"changebullet('bullet$i',$out)\" \n"; - echo "CLASS=sidebartoc>"; - echo "<FONT SIZE=\"$tocfontsize\"".$FONTCOL.$FONTFACEATTR.">"; - echo "$title</FONT></A></TD></TR>\n"; + list($url, $title) = $TOC[$i]; + if (!$url || !$title) { + continue; + } + if ($title == $this) { + $type = "w"; + $out = 2; + } else { + $type = "p"; + $out = 0; + } + if ($UP[0] == 'funcref.php') { + $title = eregi_replace(" functions\$", "", $title); + } + echo "<li><a href=\"$url\">$title</a></li>"; } - echo "</TABLE>\n"; }; -function navigationBar($title) { - global $NEXT, $PREV, $UP, $HOME, $TOC, $FONTFACE, $tstamp; - global $navBarNo; - $no = $navBarNo; - if ($title!="Show Source") { - echo("<!-- start next/prev -->\n"); - echo "<TABLE BORDER=0 WIDTH=100% BGCOLOR='#D0D0D0' CELLPADDING=0 CELLSPACING=0>\n"; - echo "<TR VALIGN=middle>\n"; - echo "<TD ALIGN=left WIDTH=18><IMG SRC='/gifs/gcap-left.gif' ALT=' ' WIDTH=18 HEIGHT=36 BORDER=0><BR></TD>\n"; - if ($PREV[0] && $PREV[1]) { - echo "<TD ALIGN=left WIDTH=75><A HREF=\"$PREV[0]\" onMouseover=\"change('prev$no',1);\" onMouseout=\"hide();\"><IMG SRC='/gifs/b-prev-p.gif' ALT='Previous page' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='prev$no' align=absmiddle></A><BR></TD>\n"; +function navigationBar($title,$id,$loc) { + global $NEXT, $PREV, $tstamp, $SERVER_NAME,$SERVER_PORT,$PHP_SELF; + echo '<table border="0" width="800" bgcolor="#d0d0d0" cellpadding="4" cellspacing="1"><tr>'; + if ($loc == "bottom") { + echo "<td align=\"middle\" colspan=\"3\">"; + $back_url = "http://$SERVER_NAME".(($SERVER_PORT==80)?"":":".$SERVER_PORT).$PHP_SELF; + echo "<a href=\"../add-note.php?sect=$id&redirect=$back_url\">add note</a> | "; + echo "<a href=\"../about-notes.php\">about notes</a>"; + echo "</td></tr><tr>"; + } + echo "<td align=\"left\" width=\"44%\">"; + if ($PREV[1]) { + echo "Previous: <a href=\"$PREV[0]\">$PREV[1]</a>"; + } + echo " </td>\n"; + echo "<td align=\"center\" width=\"12%\">Updated<br>$tstamp</td>\n"; + echo "<td align=\"right\" width=\"44%\"> "; + if ($NEXT[1]) { + echo "Next: <a href=\"$NEXT[0]\">$NEXT[1]</a>"; + } + echo "</td>\n"; + if ($loc == "top") { + echo "</tr><tr>"; + echo "<td colspan=\"3\" align=\"center\">"; + $file = substr($id,0,-4); + echo "View this page in: "; + global $LANGUAGES; + while (list($code,$name) = each($LANGUAGES)) { + if (file_exists("../$code/$id")) { + echo "<a href=\"../$code/$id\">$name</a> | "; + } + } + if (file_exists("html/$file.html")) { + echo "<a href=\"html/$file.html\">Plain HTML </a>"; + } } - echo "<TD ALIGN=left WIDTH=44%><FONT FACE='$FONTFACE' SIZE=-1> $PREV[1]<BR></FONT></TD>\n"; - echo "<TD ALIGN=center WIDTH=12% nobr><FONT FACE='$FONTFACE' SIZE=-2> Updated<br>$tstamp<BR></FONT></TD>\n"; - echo "<TD ALIGN=right WIDTH=44%><FONT FACE='$FONTFACE' SIZE=-1>$NEXT[1] <BR></FONT></TD>\n"; - if ($NEXT[0] && $NEXT[1]) { - echo "<TD ALIGN=left WIDTH=75><A HREF=\"$NEXT[0]\" onMouseover=\"change('next$no',1);\" onMouseout=\"hide();\"><IMG SRC='/gifs/b-next-p.gif' ALT='Next page' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='next$no' align=absmiddle></A><BR></TD>\n"; - } - echo "<TD ALIGN=right WIDTH=18><IMG SRC='/gifs/gcap-right.gif' alt=' ' WIDTH=18 HEIGHT=36 BORDER=0><BR></TD>\n"; - echo "</TR></TABLE>\n"; - echo "<BR>\n"; - $navBarNo = (string)((int)$navBarNo + 2); - } + echo "</tr></table>\n"; } -function makeTitle($title) { - global $FONTFACE; -?> -<TR bgcolor='#D0D0D0' valign=middle> -<TD ALIGN=left WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-left.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -<TD ALIGN=left><? - echo "<FONT FACE=\"$FONTFACE\">\n"; - echo "<B>$title</B><BR></FONT>\n"; -?></TD> -<TD ALIGN=right WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-right.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -</TR> -<? -}; - function makeEntry($date,$name,$blurb,$id=0) { - global $FONTFACE, $MAGIC_COOKIE; + global $MAGIC_COOKIE; ?> -<TR VALIGN=top> -<TD ALIGN=left><? spc(18,18);?><BR></TD> - -<TD ALIGN=left BGCOLOR="#E0E0E0"> -<TABLE BORDER=0 CELLPADDING=3 CELLSPACING=3 WIDTH=100%> -<TR><TD> +<tr valign="top"> +<td align="left" bgcolor="#e0e0e0"> +<table border="0" cellpadding="2" cellspacing="0" width="100%"> +<tr><td> <? - echo "<FONT FACE=\"$FONTFACE\" SIZE=-1>\n"; - $name = htmlspecialchars($name); + $name = htmlspecialchars($name); if (ereg("(.+)@(.+)\.(.+)",$name)) { - echo "<A HREF=\"mailto:".$name."\">".$name."</A><BR>\n"; + echo "<a href=\"mailto:".$name."\">".$name."</a><br>\n"; } else { - echo "<B>".$name."</B><BR>\n"; + echo "<b>".$name."</b><br>\n"; } - echo date("d-M-Y h:i",$date)."<BR>\n"; + echo date("d-M-Y h:i",$date); ?> -</TD></TR> -<TR BGCOLOR="#F0F0F0"><TD> +</td></tr> +<tr bgcolor="#f0f0f0"><td> <? echo clean_note($blurb); ?><BR> <?if (isset($MAGIC_COOKIE)):?> <hr noshade size=1> -<A href="/manual/admin-notes.php?action=delete+<?echo $id?>&brief=1&popup=1" target="admin">delete</A> | -<A href="/manual/admin-notes.php?action=reject+<?echo $id?>&brief=1&popup=1" target="admin">reject</A> | -<A href="/manual/admin-notes.php?action=edit+<?echo $id?>&brief=1" target="admin">edit</A> -<BR> +<a href="/manual/admin-notes.php?action=delete+<?echo $id?>&brief=1&popup=1" target="admin">delete</a> | +<a href="/manual/admin-notes.php?action=reject+<?echo $id?>&brief=1&popup=1" target="admin">reject</a> | +<a href="/manual/admin-notes.php?action=edit+<?echo $id?>&brief=1" target="admin">edit</a> <?endif;?> -</TD></TR> -</TABLE> - -</TD> -<TD ALIGN=left bgcolor='#ffffff'><? spc(18,18);?><BR></TD> -</TR> +</td></tr> +</table> +</td> +</tr> <? }; -function makeAddNote() { - global $FONTFACE; -?> -<TR bgcolor='#D0D0D0' valign=middle> -<TD ALIGN=left WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-left.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -<TD ALIGN=right WIDTH=100% -><INPUT TYPE=image name="addnote" VALUE="Add Note" SRC="/gifs/b-addnote-p.gif" ALT="Add a Note" -onMouseover="change('addnote',1);" onMouseout="hide();" -WIDTH=100 HEIGHT=21 VSPACE=7 BORDER=0 align=absmiddle -></A -> <A HREF="/manual/about-notes.php" onMouseover="change('abnote',1);" onMouseout="hide();" -><IMG SRC='/gifs/b-about-p.gif' ALT='About Notes' WIDTH=75 HEIGHT=21 VSPACE=7 BORDER=0 NAME='abnote' align=absmiddle -></A><BR> -</TD> -<TD ALIGN=right WIDTH=18><IMG ALT=" " SRC="/gifs/gcap-right.gif" WIDTH=18 HEIGHT=36 BORDER=0><BR></TD> -</TR> -<? -}; - function manualGetUserNotes($title, $id) { - // if we're www.php.net, get it from the local DB - // otherwise look in "/manual/usernotes/$title.txt" (if present) - global $MYSITE; - $notes = array(); - if(strstr($MYSITE,"www.php.net")) { -# if(strstr($MYSITE,"www.php.net") || strstr($MYSITE,"localhost")) { - $host = 'localhost'; -# $host = '127.0.0.1'; - $user = 'nobody'; - $pass = ''; - $db_id = mysql_connect($host, $user, $pass); - $query = "SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE sect = '$title' OR sect = '$id' ORDER BY id"; - $result_id = mysql_db_query("php3", $query, $db_id); - if ($result_id && mysql_num_rows($result_id) > 0) { - while ($row = mysql_fetch_array($result_id)) { - $notes[] = $row; - } - } - } else { - $notes_file = "usernotes/" . urlencode( $title ) . ".txt"; - if ( @file_exists( $notes_file ) ) - { - $fp = @fopen($notes_file,"r"); - if ($fp) { - $body = fread($fp,filesize($notes_file)); - if (strlen($body)) { - $notes = @unserialize($body); - } - fclose($fp); - } - } - } - return $notes; + // if we're www.php.net, get it from the local DB + // otherwise look in "/manual/usernotes/$title.txt" (if present) + global $MYSITE; + $notes = array(); + if(strstr($MYSITE,"www.php.net")) { +# if(strstr($MYSITE,"www.php.net") || strstr($MYSITE,"localhost")) { + $host = 'localhost'; +# $host = '127.0.0.1'; + $user = 'nobody'; + $pass = ''; + $db_id = mysql_connect($host, $user, $pass); + $query = "SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE sect = '$title' OR sect = '$id' ORDER BY id"; + $result_id = mysql_db_query("php3", $query, $db_id); + if ($result_id && mysql_num_rows($result_id) > 0) { + while ($row = mysql_fetch_array($result_id)) { + $notes[] = $row; + } + } + } else { + $notes_file = "../usernotes/" . urlencode( $title ) . ".txt"; + if ( @file_exists( $notes_file ) ) + { + $fp = @fopen($notes_file,"r"); + if ($fp) { + $body = fread($fp,filesize($notes_file)); + if (strlen($body)) { + $notes = @unserialize($body); + } + fclose($fp); + } + } + } + return $notes; } function manualUserNotes($title, $id) { - global $PHP_SELF, $SERVER_NAME, $SERVER_PORT; - $cur = substr(dirname($PHP_SELF),-2); - if($cur=='al') $cur='en'; - echo '<FORM method="POST" action="http://www.php.net/manual/add-note.php?lang='.$cur.'">'; - $back_url = "http://$SERVER_NAME".(($SERVER_PORT==80)?"":":".$SERVER_PORT).$PHP_SELF; - echo '<INPUT type=hidden name="redirect" value="'.$back_url.'">'; - echo '<INPUT type=hidden name="sect" value="'.$title.'">'; - - echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width=100%>\n"; - - $notes = manualGetUserNotes($title, $id); - $num_notes = count($notes); - if ( $num_notes > 0 ) { - makeTitle("User Contributed Notes: ".$title); - for ($i=0; $i<$num_notes; $i++) { - $note = $notes[$i]; // should use foreach? - makeEntry($note['xwhen'],$note['user'],$note['note'],$note['id']); - } - } - makeAddNote(); - echo "</TABLE></FORM>\n"; + global $PHP_SELF, $SERVER_NAME, $SERVER_PORT; + $cur = substr(dirname($PHP_SELF),-2); + if($cur=='al') $cur='en'; + + echo "<table border=\"0\" cellpadding=\"4\" cellspacing=\"1\" width=\"100%\">\n"; + + $notes = manualGetUserNotes($title, $id); + $num_notes = count($notes); + if ( $num_notes > 0 ) { + echo "<tr bgcolor=\"#d0d0d0\"><td><b>User Contributed Notes: $title</b></td></tr>"; + for ($i=0; $i<$num_notes; $i++) { + $note = $notes[$i]; // should use foreach? + makeEntry($note['xwhen'],$note['user'],$note['note'],$note['id']); + } + } + echo "</table>\n"; } function manualLastModified($title, $id) { @@ -292,25 +219,38 @@ } function sendManualHeaders($charset,$lang) { - Header("Content-type: text/html;charset=$charset"); - Header("Content-language: $lang"); + global $LANG; + $LANG = $lang; + Header("Content-type: text/html;charset=$charset"); + Header("Content-language: $lang"); } function manualHeader($title,$id="") { - global $FRAMEMODE, $HTDIG; - manualLastModified($title,$id); - commonHeader("Manual: $title"); - if (!$HTDIG): - navigationBar($title); - endif; + global $HTDIG, $LANGUAGES, $LANG; + manualLastModified($title,$id); + commonHeader("Manual: $title", 1); + # create links to plain html and other languages + if (!$HTDIG): + navigationBar($title, $id, "top"); + endif; + echo '<table width="800" border="0" cellpadding="4" cellspacing="1">'; + echo '<tr>'; + echo '<td valign="top">'; } function manualFooter($title,$id="") { - global $HTDIG; - if (!$HTDIG): - manualUserNotes($title,$id); - navigationBar($title); - endif; - commonFooter($title); + if (!$HTDIG): + manualUserNotes($title,$id); + endif; + echo '</td>'; + echo '<td valign="top" bgcolor="#e0e0e0">'; + makeBorderTOC($title); + echo '</td>'; + echo '</tr></table><!--HITHERE-->'; + global $HTDIG; + if (!$HTDIG): + navigationBar($title, $id, "bottom"); + endif; + commonFooter($title); } ?> Index: phpweb/include/shared.inc diff -u phpweb/include/shared.inc:1.124 phpweb/include/shared.inc:1.124.2.1 --- phpweb/include/shared.inc:1.124 Mon Jan 22 12:12:16 2001 +++ phpweb/include/shared.inc Mon Feb 5 17:05:32 2001 @@ -3,12 +3,13 @@ /* Check that browser! */ -$IE4 = false; $IE3 = false; -$NS4 = false; $NS3 = false; -$X11 = false; $HAVE_STYLE = false; $HTDIG = false; -$DISABLE_KICKOUTS = false; +# figure out the directory root +if (!$BASE_DIR) { + $BASE_DIR = ereg_replace("/[^/]+/[^/]+$", "", $INCLUDE_DIR); +} + if($SCRIPT_NAME=="/bugs.php" || $SCRIPT_NAME=="/bugstats.php") { # $my_logo="/jpgs/logo-bug.jpg"; $my_logo="/gifs/logo-bug.gif"; @@ -18,251 +19,8 @@ $my_size="WIDTH=130 HEIGHT=67"; } -# prevent errors if the user is being paranoid -# they should get the plain version of the site - -if (!isset($HTTP_USER_AGENT)) { - $HTTP_USER_AGENT = "none"; -} - - -if (ereg("MSIE ([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $IE4=true; - $HAVE_STYLE = true; - elseif($ver==3): - $IE3=true; - endif; -elseif (ereg("Mozilla/([0-9]+)",$HTTP_USER_AGENT,$version)): - $ver=(int)$version[1]; - if ($ver>=4): - $NS4=true; - $HAVE_STYLE=true; - elseif($ver==3): - $NS3=true; - endif; -endif; - -if (strstr($HTTP_USER_AGENT,"Opera")): -# $DISABLE_KICKOUTS = true; - $HAVE_STYLE=true; - $NS4=true; -endif; - -if (strstr($HTTP_USER_AGENT,"X11")): - $X11 = true; -endif; -if (strstr($HTTP_USER_AGENT,"htdig")): - $HTDIG = true; -endif; - -/* Base variables */ - -$FONTFACE = "tahoma, verdana, arial, helvetica, sans-serif"; -$FRAMEMODE = "standard"; -$FONTFACEATTR = " FACE=\"$FONTFACE\""; - -/* Base functions */ - -function preloadImages() { - global $FRAMEMODE; -?> - b_close0 = new Image(); - b_close0.src = "/gifs/b-close-p.gif"; - b_close1 = new Image(); - b_close1.src = "/gifs/b-close-c.gif"; - - b_cred0 = new Image(); - b_cred0.src = "/gifs/b-credits-p.gif"; - b_cred1 = new Image(); - b_cred1.src = "/gifs/b-credits-c.gif"; - - b_top0 = new Image(); - b_top0.src = "/gifs/b-top-p.gif"; - b_top1 = new Image(); - b_top1.src = "/gifs/b-top-c.gif"; - - b_sear0 = new Image(); - b_sear0.src = "/gifs/b-search-p.gif"; - b_sear1 = new Image(); - b_sear1.src = "/gifs/b-search-c.gif"; - - b_sour0 = new Image(); - b_sour0.src = "/gifs/b-source-p.gif"; - b_sour1 = new Image(); - b_sour1.src = "/gifs/b-source-c.gif"; - - b_proj0 = new Image(); - b_proj0.src = "/gifs/b-projects-p.gif"; - b_proj1 = new Image(); - b_proj1.src = "/gifs/b-projects-c.gif"; - - b_mirr0 = new Image(); - b_mirr0.src = "/gifs/b-mirror-p.gif"; - b_mirr1 = new Image(); - b_mirr1.src = "/gifs/b-mirror-c.gif"; - - b_next0 = new Image(); - b_next0.src = "/gifs/b-next-p.gif"; - b_next1 = new Image(); - b_next1.src = "/gifs/b-next-c.gif"; - - b_prev0 = new Image(); - b_prev0.src = "/gifs/b-prev-p.gif"; - b_prev1 = new Image(); - b_prev1.src = "/gifs/b-prev-c.gif"; - - b_next20 = new Image(); - b_next20.src = "/gifs/b-next-p.gif"; - b_next21 = new Image(); - b_next21.src = "/gifs/b-next-c.gif"; - - b_prev20 = new Image(); - b_prev20.src = "/gifs/b-prev-p.gif"; - b_prev21 = new Image(); - b_prev21.src = "/gifs/b-prev-c.gif"; - - b_qref0 = new Image(); - b_qref0.src = "/gifs/b-quickref-p.gif"; - b_qref1 = new Image(); - b_qref1.src = "/gifs/b-quickref-c.gif"; - - b_stat0 = new Image(); - b_stat0.src = "/gifs/b-stats-p.gif"; - b_stat1 = new Image(); - b_stat1.src = "/gifs/b-stats-c.gif"; - -<? if ($FRAMEMODE == "manual"): ?> - b_cont0 = new Image(); - b_cont0.src = "/gifs/b-contents-p.gif"; - b_cont1 = new Image(); - b_cont1.src = "/gifs/b-contents-c.gif"; - - b_up0 = new Image(); - b_up0.src = "/gifs/b-up-p.gif"; - b_up1 = new Image(); - b_up1.src = "/gifs/b-up-c.gif"; - - b_addnote0 = new Image(); - b_addnote0.src = "/gifs/b-addnote-p.gif"; - b_addnote1 = new Image(); - b_addnote1.src = "/gifs/b-addnote-c.gif"; - - b_abnote0 = new Image(); - b_abnote0.src = "/gifs/b-about-p.gif"; - b_abnote1 = new Image(); - b_abnote1.src = "/gifs/b-about-c.gif"; - - b_bullet0 = new Image(); - b_bullet0.src = "/gifs/b-bullet-p.gif"; - b_bullet1 = new Image(); - b_bullet1.src = "/gifs/b-bullet-c.gif"; - b_bullet2 = new Image(); - b_bullet2.src = "/gifs/b-bullet-w.gif"; -<? else: ?> - b_down0 = new Image(); - b_down0.src = "/gifs/b-downloads-p.gif"; - b_down1 = new Image(); - b_down1.src = "/gifs/b-downloads-c.gif"; - - b_docs0 = new Image(); - b_docs0.src = "/gifs/b-docs-p.gif"; - b_docs1 = new Image(); - b_docs1.src = "/gifs/b-docs-c.gif"; - - b_mail0 = new Image(); - b_mail0.src = "/gifs/b-mailing-p.gif"; - b_mail1 = new Image(); - b_mail1.src = "/gifs/b-mailing-c.gif"; - - b_dev0 = new Image(); - b_dev0.src = "/gifs/b-development-p.gif"; - b_dev1 = new Image(); - b_dev1.src = "/gifs/b-development-c.gif"; - - b_news0 = new Image(); - b_news0.src = "/gifs/b-news-p.gif"; - b_news1 = new Image(); - b_news1.src = "/gifs/b-news-c.gif"; - - b_link0 = new Image(); - b_link0.src = "/gifs/b-links-p.gif"; - b_link1 = new Image(); - b_link1.src = "/gifs/b-links-c.gif"; -<? endif; -} - - function spc($width, $height) { - echo "<IMG SRC=\"/gifs/spacer.gif\" WIDTH=$width HEIGHT=$height BORDER=0>"; -} - -function kickHeader($offset,$side,$width) { - global $FONTFACEATTR; - $off=abs($offset); - $innerwidth=$width-40; - $innerwidth2=$innerwidth+21; - $tablewidth=$width; - if ($side=="left"): - $tablewidth=$tablewidth+50; - endif; - if ($side=="none"): - $tablewidth=$tablewidth+1; - endif; - echo "<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>\n"; - if ($side=="left" || $side=="none"): - echo "<TR>\n"; - if ($offset>=0): - if ($side=="left"): - echo "<TD valign=top rowspan=3 width=30>"; - spc(1,$off); - echo "<BR><IMG SRC=\"/gifs/bubbles-up.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR></TD>\n"; - else: - echo "<TD valign=top rowspan=3 width=1>"; - spc(1,1); - echo "<BR></TD>\n"; - endif; - else: - echo "<TD valign=bottom rowspan=3 width=30><IMG SRC=\"/gifs/bubbles-up.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR>"; - spc(1,$off); - echo "<BR></TD>\n"; - endif; - else: - if ($offset>=0): - echo "<TR>\n<TD colspan=4 align=left>"; - spc($off,1); - echo "<IMG SRC=\"/gifs/bubbles-down.gif\" WIDTH=50 HEIGHT=50 BORDER=0><BR></TD></TR>\n"; - else: - echo "<TR><TD colspan=4 align=right width=$width><IMG SRC=\"/gifs/bubbles-down.gif\" WIDTH=50 HEIGHT=50 BORDER=0>"; - spc($off,1); - echo "<BR></TD>\n</TR>\n"; - endif; - echo "<TR VALIGN=top>\n"; - endif; - echo "<TD width=9><IMG SRC=\"/gifs/kick-ctl.gif\" WIDTH=9 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "<TD colspan=2 BACKGROUND=\"/gifs/kick-bt.gif\">"; - spc(1,10); - echo "<BR></TD>\n<TD width=10><IMG SRC=\"/gifs/kick-ctr.gif\" WIDTH=10 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "</TR>\n"; - echo "<TR VALIGN=top><TD BACKGROUND=\"/gifs/kick-bl.gif\" width=9>"; - spc(9,1); - echo "<BR></TD>\n<TD BGCOLOR=\"#EFEF52\" width=$innerwidth><FONT $FONTFACEATTR SIZE=2>\n"; -} - -function kickFooter($kickname,$buttname,$width) { - $innerwidth=$width-40; - $innerwidth2=$innerwidth+21; - echo "</FONT></TD>\n<TD BACKGROUND=\"/gifs/kick-bg.gif\" width=21 VALIGN=top>"; - echo "<A HREF=\"javascript:popUp('$kickname',false);change('$buttname',0);\"><IMG SRC=\"/gifs/kick-close.gif\" ALT=\"Close this window\" WIDTH=21 HEIGHT=21 BORDER=0></A><BR>"; - echo "</TD>\n<TD BACKGROUND=\"/gifs/kick-br.gif\" width=10>"; - spc(10,1); - echo "<BR></TD>\n</TR>\n<TR VALIGN=top>\n"; - echo "<TD width=9><IMG SRC=\"/gifs/kick-cbl.gif\" WIDTH=9 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "<TD colspan=2 BACKGROUND=\"/gifs/kick-bb.gif\">"; - spc(1,10); - echo "<BR></TD>\n<TD width=10><IMG SRC=\"/gifs/kick-cbr.gif\" WIDTH=10 HEIGHT=10 BORDER=0><BR></TD>\n"; - echo "</TR>\n</TABLE>\n"; + echo "<img src=\"/gifs/spacer.gif\" width=\"$width\" height=\"$height\" border=\"0\" alt=\"\">"; } function download_link($file, $title) { @@ -282,341 +40,163 @@ echo " (".$filesizes[$local_file].")"; } } - -function gifurl($img) { - global $root_url; - return $root_url . "/gifs/" . $img; -} - -function jpgurl($img) { - global $root_url; - return $root_url . "/jpgs/" . $img; -} - -function makeSideButton($url,$button,$kick,$gif,$width,$height,$vspace,$hspace,$alt,$br) { - if ($url): - echo "<A HREF=\"$url\" onMouseover=\"change('$button',1);"; - if ($kick): - echo " popUp('$kick',true);\" \n >"; - else: - echo "\" \n onMouseout=\"hide();\">"; - endif; - endif; - echo "<IMG SRC=\"/gifs/b-$gif-p.gif\" \n ALT=\"$alt\" \n WIDTH=$width HEIGHT=$height BORDER=0 \n NAME=\"$button\" \n HSPACE=$hspace VSPACE=$vspace>"; - if ($url): - echo "</A>"; - endif; - echo $br; -} - -function commonHeader($title) { - global $NS4, $NS3, $IE3, $IE4, $X11, $FRAMEMODE, $FONTFACEATTR, $HTDIG; - global $PHP_SELF, $HTTP_REFERER, $FONTFACE, $COUNTRIES, $MIRRORS, $MYSITE; - global $HAVE_STYLE,$HAVE_SEARCH; - global $NEXT, $PREV, $UP, $HOME, $TOC; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - $HAVE_SEARCH=$MIRRORS[$MYSITE][5]; - - Header("Vary: User-Agent"); - $lang = strtolower(substr(dirname($PHP_SELF),-2)); - switch($lang) { - case 'kr': - case 'ja': - Header("Content-Type: text/html; charset=utf-8"); - Header("Content-language: $lang"); - break; - case 'hu': - Header("Content-Type: text/html; charset=iso-8859-2"); - Header("Content-language: hu"); - break; - default: - Header("Content-Type: text/html; charset=iso-8859-1"); - Header("Content-language: $lang"); - break; - } +# make_image() +# - return a <img> tag for a given file (relative to the images dir) +function make_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) { + if ($size = @getimagesize("$GLOBALS[BASE_DIR]/gifs/$file")) { + $image = sprintf('<img src="%s/%s" border="%d" %s %s%s%s>', + "/gifs/", + $file, + $border, + $size[3], + ($alt ? ' alt="'.$alt.'"' : ''), + ($align ? ' align="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } else { + $image = sprintf('<img src="%s/%s" border="%d"%s%s%s>', + "/gifs/", + $file, + $border, + ($alt ? ' ALT="'.$alt.'"' : ''), + ($align ? ' ALIGN="'.$align.'"' : ''), + ($extras ? ' '.$extras : '') + ); + } + return $image; +} + +# print_image() +# - print an <img> tag for a given file in the images dir +function print_image($file, $alt=false, $align=false, $extras=false, $dir="gifs") { + print make_image($file, $alt, $align, $extras, $dir); +} + +# make_submit() +# - make a submit button image +function make_submit($file,$alt=false,$align=false,$extras=false) { + $return = make_image($file,$alt,$align,$extras); + if ($return != "<img>") { + $return = '<input type="image"'.substr($return,4); + } else { + $return = '<input type="submit">'; + } + return $return; +} + +# spacer() +# - print a blank space GIF +function spacer($width=1, $height=1, $align=false) { + print make_sized_image($width, $height, $align, 'spacer.gif'); +} + +function make_sized_image($width=1, $height=1, $align=false, $image='spacer.gif') { + return sprintf('<img src="%s/%s" border="0" width="%s" height="%s"%s>', + "/gifs/", + $image, + $width, + $height, + ($align ? ' align="'.$align.'"' : '') + ); +} + +function delim($color=false) { + if (!$color) { + return ' | '; + } + return sprintf('<font color="%s"> | </font>', + $color); +} + +# make_link() +# - return a hyperlink to something, within the site + +function make_link ($url, $linktext=false, $target=false, $extras=false) { + $return = sprintf("<a href=\"%s\"%s%s>%s</a>", + $url, + ($target ? ' target="'.$target.'"' : ''), + ($extras ? ' '.$extras : ''), + ($linktext ? $linktext : $url) + ); + return $return; +} + +# print_link() +# - echo a hyperlink to something, within the site + +function print_link($url, $linktext=false, $target=false, $extras=false) { + print make_link($url, $linktext, $target, $extras); +} + +$enclosed = 0; + +function commonHeader($title="",$dont_enclose=0) { + global $MYSITE, $MIRRORS, $COUNTRIES, $enclosed;?> +<html> +<head> + <title>PHP<?php if ($title) echo ": $title";?></title> + <link rel="stylesheet" href="/style.css"> +</head> + +<body + topmargin="0" leftmargin="0" + marginheight="0" marginwidth="0" + bgcolor="#ffffff" + text="#000000" + link="#000099" + alink="#0000ff" + vlink="#000099" +><a name="TOP"></a> +<table border="0" cellspacing="0" cellpadding="0" height="48" width="100%"> + <tr bgcolor="#9999cc"> + <td align="middle" rowspan="2" width="120"> +<?php if ($GLOBALS["REQUEST_URI"] != "/") echo '<a href="/">'; + print_image('php_logo.gif', 'PHP'); + if ($GLOBALS["REQUEST_URI"] != "/") echo '</a>'; ?> -<HTML> -<HEAD> -<TITLE>PHP: <? echo $title;?></TITLE> - -<? if ($HAVE_STYLE): ?> -<LINK REL="stylesheet" HREF="/php-style.css" TYPE="text/css"> -<? endif; ?> - -<SCRIPT LANGUAGE="JavaScript"> -<!-- - -if (window != top) top.location.href = location.href; - -NS4 = (document.layers) ? 1 : 0; -IE4 = (document.all) ? 1 : 0; -DOM = (document.getElementById) ? 1 : 0; -ver4 = (NS4 || IE4) ? 1 : 0; - -/* -<? readfile($DOCUMENT_ROOT."/COPYRIGHT.txt"); ?> -*/ - -/* -Debugging: - $IE4 = <? echo $IE4; ?> - $IE3 = <? echo $IE3; ?> - $NS4 = <? echo $NS4; ?> - $NS3 = <? echo $NS3; ?> - $X11 = <? echo $X11; ?> - $HAVE_STYLE = <? echo $HAVE_STYLE; ?> -*/ - -var loaded = 0; -var gotlayers = 0; -var lastbutton='top'; - -// --> -</SCRIPT> - -<? if (($NS4 || $IE4) && (!$DISABLE_KICKOUTS)): /* Kick Outs */ ?> -<SCRIPT LANGUAGE="JavaScript1.2"> -<!-- - -function moveLayers() { - if (gotlayers) { - if (NS4) { - screenWidth = window.innerWidth; -<? if ($FRAMEMODE!="manual"): ?> - document.layers['mirrorsKick'].left = 140; - document.layers['mirrorsKick'].top = 215; -<? endif; ?> - document.layers['qrefKick'].left = 140; - document.layers['qrefKick'].top = 80; - document.layers['searchKick'].left = screenWidth-350; - document.layers['searchKick'].top = 36; - } else if (DOM) { - screenWidth = (document.body.clientWidth ? document.body.clientWidth : window.innerWidth) + 18; -<? if ($FRAMEMODE!="manual"): ?> - document.getElementById('mirrorsKick').style.left = 140; - document.getElementById('mirrorsKick').style.top = 215; -<? endif; ?> - document.getElementById('qrefKick').style.left = 140; - document.getElementById('qrefKick').style.top = 80; - document.getElementById('searchKick').style.left = screenWidth-350; - document.getElementById('searchKick').style.top = 36; - } else { - screenWidth = document.body.clientWidth + 18; -<? if ($FRAMEMODE!="manual"): ?> - document.all['mirrorsKick'].style.pixelLeft = 140; - document.all['mirrorsKick'].style.pixelTop = 215; -<? endif; ?> - document.all['qrefKick'].style.pixelLeft = 140; - document.all['qrefKick'].style.pixelTop = 80; - document.all['searchKick'].style.pixelLeft = screenWidth-350; - document.all['searchKick'].style.pixelTop = 36; - } - } -} - -function popUp(menuName,on) { - if (gotlayers) { - if (on) { - moveLayers(); - if (NS4) { - document.layers[menuName].visibility = "show"; - } else if (DOM) { - document.getElementById(menuName).style.visibility = "visible"; - } else { - document.all[menuName].style.visibility = "visible"; - } - } else { - if (NS4) { - document.layers[menuName].visibility = "hide"; - } else if (DOM) { - document.getElementById(menuName).style.visibility = "hidden"; - } else { - document.all[menuName].style.visibility = "hidden"; - } - } - } + </td> + <td align="right" valign="top"> + <small><font color="#ffffff"><b> + Mirror last updated: + <?php echo strftime("%c")?> + </b> <br> + </font> + </td> + </tr> + + <tr bgcolor="#9999cc"> + <td align="right" valign="bottom"> + <form method="POST" action="/search.php"> + <?php + print_link('/downloads.php','downloads',false,'class="small"'); + echo delim(); + print_link('/docs.php', 'documentation', false, 'class="small"'); + echo delim(); + print_link('/support.php','support',false,'class="small"'); + echo delim(); + print_link('/bugs.php','reporting bugs',false,'class="small"'); + echo delim(); + print_link('/links.php','links',false,'class="small"'); + echo delim(); + print_link('/search.php','search:',false,'class="small"'); + echo ' <input class="small" type="text" name="what" size=10> '; + echo make_submit('small_submit.gif', 'search', 'bottom'); + ?> <br> + </form> + </td> + </tr> + + <tr bgcolor="#333366"><td colspan="2"><?php spacer(1,1);?><br></td></tr> +</table> +<?php + if (!$dont_enclose): + $enclosed = 1;?> +<table width="700" cellpadding="4" cellspacing="0"><tr><td valign="top"> +<?php + endif; } -<? else: ?> -<SCRIPT LANGUAGE="JavaScript1.1"> -<!-- -function popUp(menuName,on) { -} -function moveLayers() { -} -<? endif; /* Kick outs */ ?> -// --> -</SCRIPT> - -<SCRIPT LANGUAGE="JavaScript1.1"> -<!-- -<? if ($NS4 || $NS3 || $IE4): /* OnOvers */ ?> -function LoadImgs () { - if (document.images) { -<? preloadImages(); ?> - loaded = 1; - } -} - -function change(Name,No) { - if (document.images && (loaded == 1) && (document[Name])) { - document[Name].src = eval("b_" + Name + No + ".src"); - } - if (No == 1) { - if (gotlayers) { -<? if ($FRAMEMODE!="manual"): ?> - popUp('mirrorsKick',false); -<? endif; ?> - popUp('qrefKick',false); - popUp('searchKick',false); - } -<? if ($FRAMEMODE!="manual"): ?> - if (Name != 'mirr') { - change('mirr',0); - } -<? endif; ?> - if (Name != 'qref') { - change('qref',0); - } - if (Name != 'sear') { - change('sear',0); - } - lastbutton = Name; - } -} - -function changebullet(Name,No) { - if (document.images && (loaded == 1)) { - document[Name].src = eval("b_bullet" + No + ".src"); - } -} - -function hide() { - if (document.images && (loaded == 1)) { - change(lastbutton,0); - } -} -<? else: /* OnOvers */ ?> - -function change(Name,No) { -} -function changebullet(Name,No) { -} -function hide() { -} - -<? endif; /* OnOvers */ - -if ($IE4): - echo "LoadImgs();\n"; -endif; -?> - -// --> -</SCRIPT> - -</HEAD> - -<BODY MARGINHEIGHT=3 MARGINWIDTH=3 TOPMARGIN=3 LEFTMARGIN=3 BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#5B69A6" VLINK="#5B69A6" ALINK="#00FF00" -<? if ($NS4 || $NS3): - echo " OnLoad=\"LoadImgs();\""; -endif; ?> -><A NAME="tOpOfpAgE"> -<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="100%"> - <TR valign=top> - <TD ALIGN=left width=150 BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=top> - <TD ALIGN=left> - <IMG SRC="/gifs/cap-ul.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - <?spc(15,67);?><A HREF="/index.php"><IMG SRC="<?echo $GLOBALS["my_logo"]?>" ALT="PHP Home Page" <?echo $GLOBALS["my_size"]?> BORDER=0></A><BR> - <?spc(1,10);?><BR> - </TD> - </TR> - <TR VALIGN=top> - <TD ALIGN=left> - <? if ($FRAMEMODE == "manual"): - makeSideButton("$HOME[0]","cont","","contents",129,30,0,10,"Manual Table of Contents","<BR>\n"); - if ($UP[0] && $UP[1]): - makeSideButton($UP[0],"up","","up",129,30,0,10,"Up to $UP[1]","<BR>\n"); - endif; - makeSideButton("/quickref.php","qref","qrefKick","quickref",129,30,0,10,"Quick Reference","<BR>\n"); - if (!$HTDIG): - makeBorderTOC($title); - endif; - else: - $lastnews=filemtime($DOCUMENT_ROOT."/news.php"); - if ($lastnews): - $lastnews="PHP News last updated: ".date("M d, Y",$lastnews); - else: - $lastnews="PHP in the News"; - endif; - makeSideButton("/downloads.php","down","","downloads",129,30,0,10,"Downloads","<BR>\n"); - makeSideButton("/docs.php","docs","","docs",129,30,0,10,"Documentation","<BR>\n"); - makeSideButton("/quickref.php","qref","qrefKick","quickref",129,30,0,10,"Quick Reference","<BR>\n"); - makeSideButton("/support.php","dev","","development",129,30,0,10,"Getting Help","<BR>\n"); - makeSideButton("/news.php","news","","news",129,30,0,10,$lastnews,"<BR>\n"); - makeSideButton("/projects.php","proj","","projects",129,30,0,10,"Projects using PHP","<BR>\n"); - makeSideButton("/links.php","link","","links",129,30,0,10,"PHP Links","<BR>\n"); - makeSideButton("/mirrors.php","mirr","mirrorsKick","mirror",129,30,0,10,"Mirror sites","<BR>\n"); - endif; ?> - </TD> - </TR> - - <TR><TH align=left><br> <a href="/thanks.php" class=blacklink>Thanks to:</a></TH></TR> - <TR><TD> <a href="http://chek.com" class=whitelink>Chek.com</a></TD></TR> - <TR><TD> <a href="http://www.easydns.com/?V=698570efeb62a6e2" class=whitelink>easyDNS</a></TD></TR> - <TR><TD> <a href="http://valinux.com" class=whitelink>VA Linux Systems</a></TD></TR> - - <TR><TH align=left><br> Related sites:</TH></TR> - <TR><TD><a href="http://www.apache.org" class=whitelink>Apache</a></TD></TR> - <TR><TD><a href="http://www.mysql.com" class=whitelink>MySQL</a></TD></TR> - <TR><TD><a href="http://www.postgresql.org" class=whitelink>PostgreSQL</a></TD></TR> - <TR><TD><a href="http://www.zend.com" class=whitelink>Zend Tech.</a></TD></TR> - - <TR><TH align=left><br> Community:</TH></TR> - <TR><TD><a href="http://www.linuxfund.org" class=whitelink>LinuxFund.org</a></TD></TR> - <TR><TD><a href="http://www.osdn.org" class=whitelink>OSDN</a></TD></TR> - - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle BGCOLOR="#5B69A6"> - <TD ALIGN=left> - <? - spc(5,1); - echo "<FONT${FONTFACEATTR} SIZE=4><B>$title</B></FONT><BR>\n"; - ?> - </TD> - <TD ALIGN=right> - <? - if($title=="Show Source"): - makeSideButton("","sour","","source",1,1,0,0,"",""); - makeSideButton("javascript:history.go(-1);","close","","close",75,30,9,5,"Close this source page",""); - else: - makeSideButton("","close","","close",1,1,0,0,"",""); - makeSideButton("/source.php?page_url=$PHP_SELF","sour","","source",75,30,9,5,"View the source code for this page",""); - endif; - makeSideButton("/search.php","sear","searchKick","search",75,30,9,5,"Search the site",""); - ?><IMG SRC="/gifs/cap-right.gif" WIDTH=24 HEIGHT=48 BORDER=0><BR></TD> - </TR> - </TABLE> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=top BGCOLOR="#FFFFFF"> - <TD ALIGN=left WIDTH="12"> - <IMG SRC="/gifs/corner-ul.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - <TD ALIGN=left WIDTH="100%"> - <? if ($FONTFACEATTR): ?> - <FONT<? echo $FONTFACEATTR;?>> - <? endif; ?> - <BR CLEAR=ALL> - <!-- start body --> -<? -} - function sect_to_file($string) { $string = strtolower($string); $string = str_replace(' ','-',$string); @@ -645,202 +225,69 @@ } function commonFooter() { - global $NS4, $NS3, $IE3, $IE4, $X11, $HAVE_STYLE, $FRAMEMODE, $FONTFACEATTR, $HTTP_USER_AGENT, $HTDIG; - global $MIRRORS, $MYSITE, $COUNTRIES; - global $NEXT, $PREV, $UP, $HOME, $TOC; - global $DISABLE_KICKOUTS, $DOCUMENT_ROOT; - $country=$MIRRORS[$MYSITE][0]; - $HAVE_SEARCH=$MIRRORS[$MYSITE][5]; -?> - <!-- end body --> - </TD> - </TR> - </TABLE> - </TD> - </TR> - <TR valign=bottom BGCOLOR="#5B69A6"> - <TD ALIGN=left width="150"> -<? - spc(150,1); - echo "<BR>\n"; - if (file_exists($DOCUMENT_ROOT."/stats/index.php")): - makeSideButton("/stats/index.php","stat","","stats",129,30,0,10,"Site Statistics","<BR>\n"); - endif; -?></TD> - <TD ALIGN=left width="100%" BGCOLOR="#FFFFFF"> - <IMG SRC="/gifs/corner-bl.gif" WIDTH=12 HEIGHT=12 BORDER=0><BR> - </TD> - </TR> - <TR valign=top> - <TD ALIGN=left width="150" BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH="150"> - <TR VALIGN=bottom> - <TD ALIGN=left> - <? - spc(1,3); - echo "<BR>\n"; - makeSideButton("/credits.php","cred","","credits",129,30,0,10,"Who's responsible for this?","<BR>\n"); - makeSideButton("#tOpOfpAgE","top","","top",129,30,0,10,"Top of this page","<BR>\n"); - ?> - <IMG SRC="/gifs/cap-bl.gif" WIDTH=9 HEIGHT=9 BORDER=0><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD align=left width="100%"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 width="100%"> - <TR VALIGN=middle> - <TD ALIGN=center BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=right> - <FONT<? echo $FONTFACEATTR ?> SIZE=1> - <I>Site<BR>Hosting:</I><BR> - </FONT> - </TD> - <TD> - <? spc(5,1);?><BR> - </TD> - <TD> - <A HREF="<? echo $MIRRORS[$MYSITE][3]; ?>"><IMG SRC="/gifs/logo-<? echo $MIRRORS[$MYSITE][2]; ?>.gif" WIDTH=190 HEIGHT=48 BORDER=0 vspace=12></A><BR> - </TD> - </TR> - </TABLE> - </TD> - <TD ALIGN=right BGCOLOR="#5B69A6"> - <TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0> - <TR VALIGN=middle> - <TD align=center> -<? if (!$HTDIG): - echo "<FONT $FONTFACEATTR SIZE=2>\n"; - echo "<FONT SIZE=1><I>Located in</I></FONT><BR>".$COUNTRIES[$country]; - endif; ?> - </TD> - <TD><? spc(5,1);?></TD> - <TD> - <IMG SRC="/gifs/flag-<? echo $country; ?>.gif" BORDER=0></TD> - <TD> - <IMG SRC="/gifs/cap-right2.gif" WIDTH=24 HEIGHT=72 BORDER=0></TD> - </TR> - </TABLE> - </TD> - </TR> - </TABLE> - </TD> - </TR> - -<TR> -<TD ALIGN="right" COLSPAN=3> -<FONT SIZE=-2> -Elements of this website are subject to <A HREF="/COPYRIGHT.txt">copyright</A>.<BR> -Questions about installing or using PHP should be directed to one of the <A HREF="/support.php">mailing lists</A>.<BR> -Only questions about the website should be directed to <A HREF="mailto:webmaster@php.net">webmaster@php.net</A>.<BR> -</FONT> -</TD> -</TR> - -</TABLE> - - -<? if (($NS4 || $IE4) && !$DISABLE_KICKOUTS): /* Kick outs */ ?> - -<DIV ID="mirrorsKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(-20,'left',400);?> -<FORM ACTION="/redirect.php" METHOD="POST"> -<B>Pick a mirror site close to you:</B><BR> -<SELECT NAME="URL"> -<? -$mirror_sites=$MIRRORS; -reset($mirror_sites); -while ($site = key($mirror_sites)): - next($mirror_sites); - $country=$mirror_sites[$site][0]; - $place=$mirror_sites[$site][1]; - $type=$mirror_sites[$site][4]; - if ($type==1 && substr($site,0,7)=="http://"): - echo "<OPTION VALUE=\"$site\">$COUNTRIES[$country] ($place)\n"; - endif; -endwhile; + global $SCRIPT_NAME,$PHP_SELF,$MIRRORS,$MYSITE,$COUNTRIES,$enclosed; + if ($enclosed):?> +</td></tr></table> +<?php + endif; ?> -</SELECT> -<INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 hspace=5 HEIGHT=21 BORDER=0> -</FORM> -<? kickFooter("mirrorsKick","mirr",400);?> -</DIV> - -<DIV ID="qrefKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(30,'left',400);?> -<FORM ACTION="/manual-lookup.php" METHOD="POST"> -<FONT SIZE=+1><B>Quick Function Reference</B></FONT><BR> -Type in a PHP function name or feature to<BR> -jump to that page of the online manual:<BR> -<FONT SIZE=3><INPUT NAME="function" TYPE="text" SIZE=25></FONT> -<INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 hspace=5 HEIGHT=21 BORDER=0> -</FORM> -or click on this button to get an alphabetical listing of all<BR> -PHP functions. -<? if ($FRAMEMODE != "manual"): ?> -(You can still click on the <B>documentation</B><BR> -button on the left for other documentation resources.) -<? endif;?><BR> -<? kickFooter("qrefKick","qref",400);?> -</DIV> - -<? -if ($HAVE_SEARCH): - $form="/search.php"; -else: - $form="http://uk.php.net/search.php"; -endif; -?> - -<DIV ID="searchKick" STYLE="POSITION: absolute; Z-INDEX: 20; VISIBILITY: hidden; TOP: 0px; LEFT: 0px;"> -<? kickHeader(-35,'top',300); -if (!isset($prevsearch)): - $prevsearch[0]=""; -endif; -?> -<FORM ACTION="/search.php" METHOD="POST"> -<B>What are you searching for:</B><BR> -<input type="text" name="pattern" size=20 VALUE="<? echo $prevsearch[0];?>"><BR> -<B>Where do you want to look:</B><BR> -<SELECT NAME="show"> -<OPTION VALUE="nosource" SELECTED>Whole site -<OPTION VALUE="manual">Documentation only -<OPTION VALUE="maillist">PHP General Mailing List -<OPTION VALUE="devlist">PHP Developers' List -<OPTION VALUE="phplib">PHPLIB Mailing List -<OPTION VALUE="phplib-dev">PHPLIB Developers' List -<OPTION VALUE="php-kb">PHP Knowledge Base -<OPTION VALUE="source">Source code only -</SELECT><INPUT TYPE="image" SRC="/gifs/b-go.gif" ALIGN=absmiddle WIDTH=36 HSPACE=5 HEIGHT=21 BORDER=0><BR> -</FORM> -<? kickFooter("searchKick","sear",300);?> -</DIV> - -<SCRIPT LANGUAGE="JavaScript1.2"> -<!-- -if (NS4) { - gotlayers = (document.layers.length == 3) ? 1 : 0; -} -if (IE4) { - gotlayers = 1; -} - -// --> -</SCRIPT> - -<SCRIPT LANGUAGE="JavaScript1.3"> -<!-- - gotlayers = 1; -// --> -</SCRIPT> - -<? -endif; /* Kick outs */ -?> -</BODY> -</HTML> -<? +<table border="0" cellspacing="0" cellpadding="0" width="100%"> + <tr bgcolor="#333366"><td><?php spacer(1,1);?><br></td></tr> + <tr bgcolor="#9999cc"> + <td align="right" valign="bottom"> + <form method="GET" action="/mirrors.php" onsubmit="return gotomirror(this)"> + <script language="javascript"> + <!-- + function gotomirror(form) { + url = form.country.options[form.country.selectedIndex].value; + window.location.href = url; + return false; + } + //--> + </script> + <input type="hidden" name="REDIRECT" value=1> + <?php + # TODO: should send current url above, so we can redirect to + # the same page on the mirror, and do the same in our javascript. + print_link('/source.php?url='.$SCRIPT_NAME, 'show source', false, 'class="small"'); + echo delim(); + print_link('/credits.php', 'credits', false, 'class="small"'); + echo delim(); + print_link('/mirrors.php', 'mirror sites:', false, 'class="small"'); + echo " <select class=\"small\" name=\"country\" onchange=\"gotomirror(this.form)\">\n"; + echo "<option value=-1>--\n"; + while (list($url,$mirror) = each($MIRRORS)) { + if ($mirror[4] == 1) { /* only list full mirrors here */ + echo "<option value=\"$url\">".$COUNTRIES[$mirror[0]]." ($mirror[1])\n"; + } + } + echo "</select> "; + echo make_submit('small_submit.gif', 'search', 'bottom' ); + ?> <br> + </form> + </td> + </tr> + <tr bgcolor="#333366"><td><?php spacer(1,1); ?><br></td></tr> +</table> + +<table border="0" cellspacing="0" cellpadding="6" width="100%"> + <tr valign="bottom" bgcolor="#cccccc"> + <td><small> + Copyright © 1998,1999,2000,2001 someone. + All rights reserved. + </td> + <td align="right"> + This mirror generously provided by: + <a href="<?php echo $MIRRORS[$MYSITE][3];?>"><?php echo $MIRRORS[$MYSITE][1];?></a> + <BR> + </td> + </tr> +</table> + +<br> + +</body> +</html> +<?php } ?> Index: phpweb/include/site.inc diff -u phpweb/include/site.inc:1.135 phpweb/include/site.inc:1.135.2.1 --- phpweb/include/site.inc:1.135 Sun Feb 4 09:57:06 2001 +++ phpweb/include/site.inc Mon Feb 5 17:05:32 2001 @@ -57,6 +57,7 @@ "http://bugs.php.net/" => array("us", "chek.com", "chek", "http://www.chek.com/", 2, 1, "en"), "http://php.he.net/" => array("us", "Hurricane Electric", "hurricane", "http://he.net/", 1, 0, "en"), "http://za.php.net/" => array("za", "CSIR Mikomtek", "mikomtek", "http://www.mikom.csir.co.za/", 1, 0, "en"), + "http://news.php.net/" => array("us", "VA Linux", "va", "http://www.valinux.com/", 2, 1, "en"), "" => array("xx", "Unknown", "none", "/", 1, 0, "en") );