cvs: php-master-web / style.css /include functions.inc /manage mirrors.php user-notes.php

From: Date: Thu, 18 Oct 2001 00:59:41 +0000
Subject: cvs: php-master-web / style.css /include functions.inc /manage mirrors.php user-notes.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-7059@lists.php.net to get a copy of this message
jimw Wed Oct 17 20:59:41 2001 EDT Added files: /php-master-web/include functions.inc /php-master-web style.css Modified files: /php-master-web/manage mirrors.php user-notes.php Log: more refactoring Index: php-master-web/manage/mirrors.php diff -u php-master-web/manage/mirrors.php:1.2 php-master-web/manage/mirrors.php:1.3 --- php-master-web/manage/mirrors.php:1.2 Wed Oct 17 20:22:48 2001 +++ php-master-web/manage/mirrors.php Wed Oct 17 20:59:40 2001 @@ -1,5 +1,6 @@ <?php -require 'login.inc'; +require_once 'login.inc'; +require_once 'functions.inc'; # these are just here temporarily. they'll be in a database table eventually. $COUNTRIES = array( @@ -88,7 +89,7 @@ 'uk' => 'Ukranian', ); -echo '<html><head><title>mirror administration</title></head><body>'; +head("mirror administration"); mysql_connect("localhost","nobody","") or die("unable to connect to database"); @@ -168,7 +169,7 @@ </tr> </table> <? - echo '</body></html>'; + foot(); exit; } @@ -202,7 +203,7 @@ </table> <p><a href="<?php echo $PHP_SELF;?>?id=0">add a new mirror</a></p> <?php -echo '</body></html>'; +foot(); function show_country_options($cc = "") { global $COUNTRIES; Index: php-master-web/manage/user-notes.php diff -u php-master-web/manage/user-notes.php:1.9 php-master-web/manage/user-notes.php:1.10 --- php-master-web/manage/user-notes.php:1.9 Mon Oct 15 22:22:37 2001 +++ php-master-web/manage/user-notes.php Wed Oct 17 20:59:40 2001 @@ -1,5 +1,6 @@ <?php +require_once 'functions.inc'; require_once 'cvs-auth.inc'; require_once 'email-validation.inc'; // ** alerts ** remove comment when alerts are on-line @@ -168,26 +169,6 @@ head(); echo "<p>'$action' is not a recognized action, or no id was specified.</p>"; foot(); -} - -function head($title="") {?> -<html> -<head> - <title><?php echo $title;?></title> - <link rel="stylesheet" type="text/css" href="http://www.php.net/style.css" /> -</head> -<body class="popup"> -<?php -} - -function foot() {?> -</body> -</html> -<?php -} - -function clean($var) { - return htmlspecialchars(get_magic_quotes_gpc() ? stripslashes($var) : $var); } function clean_note($text) { Index: php-master-web/include/functions.inc +++ php-master-web/include/functions.inc <?php function clean($var) { return htmlspecialchars(get_magic_quotes_gpc() ? stripslashes($var) : $var); } function warn($message) { echo "<p class=\"warning\">$message</p>"; } function query($query) { $res = @mysql_query($query); if (!$res) { die("<p class=\"warning\">query failed: " . mysql_error() . "<tt>\n$query</tt></p>"); } return $res; } function head($title="") {?> <html> <head> <title><?php echo $title;?></title> <link rel="stylesheet" type="text/css" href="/style.css" /> </head> <?php } function foot() { echo "</body></html>"; } #TODO: generalize passing in extra parameters (take an array?) function show_prev_next($begin,$rows,$skip,$total) { global $order, $PHP_SELF;?> <table border="0" cellspacing="1" width="100%"> <tr bgcolor="#eeeeee"> <td align="left" width="33%"> <?php if ($begin > 0) { printf("<a href=\"%s\">&laquo; Previous %d", "$PHP_SELF?order=$order&amp;begin=".max(0,$begin-$skip), min($skip,$begin)); } ?> &nbsp; </td> <td align="center" width="33%"> <?php echo "Displaying ",$begin+1,"-",$begin+$rows," of $total";?> </td> <td align="right" width="33%"> &nbsp; <?php if ($begin+$rows < $total) { printf("<a href=\"%s\">Next %d &raquo;", "$PHP_SELF?order=$order&amp;begin=".($begin+$skip), min($skip,$total-($begin+$skip))); } ?> </td> </tr> </table> <?php } Index: php-master-web/style.css +++ php-master-web/style.css p.warning { background: #ffeeee; border: 1px solid #ff0000; }

« previous php.mirrors (#7059) next »