cvs: pearweb /include layout.php pear-prepend.php /public_html index.php
| From: | Stig Bakken | Date: | Tue, 14 Aug 2001 09:22:36 +0000 |
| Subject: | cvs: pearweb /include layout.php pear-prepend.php /public_html index.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-504@lists.php.net to get a copy of this message | ||
ssb Tue Aug 14 05:22:36 2001 EDT
Modified files:
/pearweb/include layout.php pear-prepend.php
/pearweb/public_html index.php
Log:
* added "pear_dev" cookie for testing
Index: pearweb/include/layout.php
diff -u pearweb/include/layout.php:1.12 pearweb/include/layout.php:1.13
--- pearweb/include/layout.php:1.12 Tue Aug 7 17:18:37 2001
+++ pearweb/include/layout.php Tue Aug 14 05:22:35 2001
@@ -1,14 +1,14 @@
<?php
-/* $Id: layout.php,v 1.12 2001/08/07 21:18:37 ssb Exp $ */
+/* $Id: layout.php,v 1.13 2001/08/14 09:22:35 ssb Exp $ */
require_once 'site.php';
if (empty($prevsearch)) $prevsearch = '';
-# spacer()
-# print a IMG tag for a sized spacer GIF
-#
+// spacer()
+// print a IMG tag for a sized spacer GIF
+//
function spacer($width=1, $height=1, $align=false, $extras=false) {
printf('<img src="/gifs/spacer.gif" width="%d" height="%d"
border="0" alt="" %s%s>',
@@ -21,9 +21,9 @@
-# resize_image()
-# tag the output of make_image() and resize it manually
-#
+// resize_image()
+// tag the output of make_image() and resize it manually
+//
function resize_image($img, $width=1, $height=1) {
$str = preg_replace('/width=\"([0-9]+?)\"/i', '', $img );
@@ -34,9 +34,9 @@
-# make_image()
-# return an IMG tag for a given file (relative to the images dir)
-#
+// make_image()
+// return an 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) {
global $HTTP_SERVER_VARS;
@@ -68,9 +68,9 @@
-# print_image()
-# print an IMG tag for a given file
-#
+// print_image()
+// print an IMG tag for a given file
+//
function print_image($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) {
print make_image($file, $alt, $align, $extras, $dir);
@@ -78,9 +78,9 @@
-# make_submit()
-# - make a submit button image
-#
+// make_submit()
+// - make a submit button image
+//
function make_submit($file, $alt=false, $align=false, $extras=false, $dir=false, $border=0) {
if (!$dir) {
$dir = '/gifs';
@@ -96,9 +96,9 @@
-# delim()
-# print a pipe delimiter
-#
+// delim()
+// print a pipe delimiter
+//
function delim($color=false) {
if (!$color) {
@@ -109,9 +109,9 @@
-# hdelim()
-# print a horizontal delimiter (just a wide line);
-#
+// hdelim()
+// print a horizontal delimiter (just a wide line);
+//
function hdelim($color="#000000") {
if (!$color) {
@@ -122,9 +122,9 @@
-# make_link()
-# return a hyperlink to something, within the site
-#
+// 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>",
@@ -137,9 +137,9 @@
-# print_link()
-# echo a hyperlink to something, within the site
-#
+// print_link()
+// echo a hyperlink to something, within the site
+//
function print_link($url, $linktext=false, $target=false, $extras=false) {
echo make_link($url, $linktext, $target, $extras);
@@ -147,9 +147,9 @@
-# commonheader()
-#
-#
+// commonheader()
+//
+//
function commonHeader($title) {
global $SIDEBAR_DATA, $HTTP_SERVER_VARS;
@@ -179,7 +179,11 @@
<font color="#ffffff"><b>
<?php echo strftime("%A, %B %d, %Y"); ?>
</b> <br>
- </font>
+<?php
+ if (isset($GLOBALS['HTTP_COOKIE_VARS']['pear_dev'])) {
+ print "pear_dev cookie set <br>";
+ }
+?> </font>
</td>
</tr>
@@ -256,9 +260,9 @@
-# commonfooter()
-#
-#
+// commonfooter()
+//
+//
function commonFooter() {
global $LAST_UPDATED, $MIRRORS, $MYSITE, $COUNTRIES,$SCRIPT_NAME;
Index: pearweb/include/pear-prepend.php
diff -u pearweb/include/pear-prepend.php:1.12 pearweb/include/pear-prepend.php:1.13
--- pearweb/include/pear-prepend.php:1.12 Sat Jul 28 20:44:29 2001
+++ pearweb/include/pear-prepend.php Tue Aug 14 05:22:35 2001
@@ -8,6 +8,12 @@
error_reporting(E_ALL);
+if ($HTTP_SERVER_VARS['SERVER_NAME'] != 'pear.php.net' ||
isset($HTTP_COOKIE_VARS['pear_dev'])) {
+ define('DEVBOX', true);
+} else {
+ define('DEVBOX', false);
+}
+
if (empty($format)) {
if (basename($PHP_SELF) == "xmlrpc.php") {
$format = "xmlrpc";
Index: pearweb/public_html/index.php
diff -u pearweb/public_html/index.php:1.17 pearweb/public_html/index.php:1.18
--- pearweb/public_html/index.php:1.17 Tue Aug 7 17:18:37 2001
+++ pearweb/public_html/index.php Tue Aug 14 05:22:36 2001
@@ -1,5 +1,13 @@
<?php
+if ($HTTP_SERVER_VARS['QUERY_STRING'] == 'devme') {
+ $duration = 86400 * 360;
+ ini_set("y2k_compliance", "on");
+ setcookie("pear_dev", "on", time() + $duration, "/");
+ $HTTP_COOKIE_VARS['pear_dev'] = "on";
+}
+
+
$SIDEBAR_DATA='
<h3>What is PEAR?</h3>
<p>
@@ -14,11 +22,9 @@
response_header();
-print "<!-- $REMOTE_ADDR -->\n";
-
menu_link("Documentation", "http://php.net/manual/en/pear.php");
-if ($SERVER_NAME != "pear.php.net") {
+if (DEVBOX) {
menu_link("Request PEAR Account", "account-request.php");
menu_link("New Package", "package-new.php");
menu_link("Administrators", "admin.php");