cvs: php-gtk-web /manual1 about-notes.php add-note.php admin-notes.php browse-notes.php browse.php set-magic-cookie.php unset-magic-cookie.php

[email protected] ("Steph Fox") Sat, 15 Jul 2006 04:09:11 -0000
Newsgroups php.gtk.webmaster
Message-ID <cvssfox1152936551@cvsserver>
sfox		Sat Jul 15 04:09:11 2006 UTC

  Removed files:               
    /php-gtk-web/manual1	set-magic-cookie.php unset-magic-cookie.php 

  Modified files:              
    /php-gtk-web/manual1	about-notes.php add-note.php admin-notes.php 
                        	browse-notes.php browse.php 
  Log:
  some cleaning
sfox-20060715040911.txt (text/plain, 22.1 KB)
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual1/about-notes.php?r1=1.1&r2=1.2&diff_format=u
Index: php-gtk-web/manual1/about-notes.php
diff -u php-gtk-web/manual1/about-notes.php:1.1 php-gtk-web/manual1/about-notes.php:1.2
--- php-gtk-web/manual1/about-notes.php:1.1	Tue Mar 14 21:37:13 2006
+++ php-gtk-web/manual1/about-notes.php	Sat Jul 15 04:09:10 2006
@@ -2,24 +2,24 @@
 commonHeader("PHP-GTK 1 Manual Notes");
 ?>
 
-<P>
+<p>
 The manual notes interface allows you to add notes to the online
 version of the PHP-GTK 1 manual. These notes are then shared with other
 PHP-GTK users when they browse the manual online.
-</P>
-<P>
+</p>
+<p>
 Periodically, the developers may go through the notes and incorporate
 the information in them into the documentation proper.
-</P>
-<P>
-These notes are only visible at <A href="http://gtk.php.net/manual1/">gtk.php.net</A>
+</p>
+<p>
+These notes are only visible at <a href="http://gtk.php.net/manual1/">gtk.php.net</a>
 because that's where the database that stores them is located.  If (when) the
 PHP-GTK website is mirrored in several locations, we'll work out a way of 
 having the notes available across all the mirror sites.
-</P>
+</p>
 <!--
 <P>
-These notes are <B>not</B> the place to report <A href="http://gtk.php.net/bugs">bugs</A>!
+These notes are <B>not</B> the place to report <a href="http://bugs.php.net/">bugs</a>!
 </P>
 -->
 
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual1/add-note.php?r1=1.1&r2=1.2&diff_format=u
Index: php-gtk-web/manual1/add-note.php
diff -u php-gtk-web/manual1/add-note.php:1.1 php-gtk-web/manual1/add-note.php:1.2
--- php-gtk-web/manual1/add-note.php:1.1	Tue Mar 14 21:37:13 2006
+++ php-gtk-web/manual1/add-note.php	Sat Jul 15 04:09:10 2006
@@ -2,17 +2,15 @@
 
 require_once 'shared-manual1.inc';
 
-
 /*
 # Notes only available at main mirror site for now
-if ($HTTP_SERVER_VARS["HTTP_HOST"]!='gtk.php.net') {
-	Header('Location: http://gtk.php.net' . $HTTP_SERVER_VARS['REQUEST_URI'] );
+if ($_SERVER["HTTP_HOST"]!='gtk.php.net') {
+	header('Location: http://gtk.php.net' . $_SERVER['REQUEST_URI'] );
 	exit;
 }
 */
 
-
-$mailto = '[email protected]';
+$mailto = '[email protected]';
 
 commonHeader('PHP-GTK 1 Manual Notes');
 
@@ -22,118 +20,123 @@
 
 /* don't pass through example username */
 if ($user_email == '[email protected]') {
-    $user_email = '';
+	$user_email = '';
 }
 
 if ($note == '') {
-    unset ($note);
+	unset ($note);
 }
 
 
 # turn the POST data into GET data so we can do the redirect
 /*
-if(!strstr($MYSITE,"gtk.php.net")) {
-    Header("Location: http://gtk.php.net/manual1/add-note.php?sect=".urlencode($sect)."&lang=".urlencode($lang)."&redirect=".urlencode($redirect));
-    exit;
+if (!strstr($MYSITE,"gtk.php.net")) {
+	header("Location: http://gtk.php.net/manual1/add-note.php?sect=".urlencode($sect)."&lang=".urlencode($lang)."&redirect=".urlencode($redirect));
+	exit;
 }
 */
 
-if (isset($note) && isset($action) && strtolower($action) != "preview") {
-	$now = date("Y-m-d H:i:s");
-	$query = "INSERT INTO note (user, note, sect, ts, lang) VALUES ";
-        # no need to call htmlspecialchars() -- we handle it on output
-        $query .= "('$user_email','$note','$sect','$now','$lang')";
+if (isset($note) && isset($action) && strtolower($action) != "preview" && file_exists($notesdb)) {
+
+		$now = time();
+		$note = htmlentities($note, ENT_COMPAT, 'UTF-8');
+		$db_string = '(null, "'.$sect.'", "'.$now.'", "'.$user_email.'", "'.$note.'")';
+
+		$db = sqlite_open($notesdb);
+		$query = @sqlite_query($db, "INSERT INTO php_gtk_manual VALUES $db_string");
+		sqlite_close($db);
+
 	if (mysql_query($query)) {
-		echo "<P>Your submission was successful -- thanks for contributing!</P>";
-		$new_id = mysql_insert_id();	
+		echo "<p>Your submission was successful -- thanks for contributing!</p>";
+		$new_id = sqlite_last_insert_rowid($db);
 		$msg = stripslashes($note);
 		$msg .= "\n\n $redirect \n";
-                # make sure we have a return address.
-                if (!$user_email) {
+		# make sure we have a return address.
+		if (!$user_email) {
 			$user_email = "[email protected]";
 		}
 		mail($mailto, "note $new_id added to $sect", $msg, "From: $user_email");
 	} else {
 		# mail it.
 		mail($mailto, "failed manual v1 note query", $query);
-		echo "<P>There was an error processing your submission. " .
-			"It has been automatically e-mailed to the developers.</P>";
+		echo "<p>There was an error processing your submission. " .
+			"It has been automatically e-mailed to the developers.</p>";
 	}
 
-	echo '<P>You can <A href="' . $redirect. '">go back</A> from whence you came,' .
-		'or you can <A href="http://gtk.php.net/manual1/">go to the front of the manual</A>.</P>';
+	echo '<p>You can <a href="' . $redirect. '">go back</a> from whence you came,' .
+		'or you can <a href="http://gtk.php.net/manual1/">go to the manual home page</a>.</p>';
 
 } else {
 
-        if (isset($note) && strtolower($action) == "preview") {
+		if (isset($note) && strtolower($action) == "preview") {
 
-		echo '<P>This is what your entry will look like, roughly:</P>';
-                echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
+		echo '<p>This is what your entry will look like, roughly:</p>';
+				echo '<table border="0" cellpadding="0" cellspacing="0" width="100%">';
 		$temp = array(
 			'user' => stripslashes($user_email),
 			'note' => stripslashes($note),
 			'xwhen' => time()
 		);
-                makeEntry($temp, false, false);
-                echo "</table>";
+				makeEntry($temp, false, false);
+				echo "</table>";
 
-        } else {
+		} else {
 
 ?>
 
-<P>
+<p>
 You can contribute to the PHP-GTK 1 manual from the comfort of your browser!
 Just add your comment in the big field below, and, optionally, your email
 address in the little one (usual anti-spam practices are OK, e.g. 
 [email protected]_SPAM.com).
-</P>
+</p>
 
-<P>
+<p>
 Note that most HTML tags are not allowed in the posts. We tried 
 allowing them in the past, but people invariably made a mess of
 things making the manual hard to read for everybody. You can include
 &lt;p&gt;, &lt;/p&gt;, and &lt;br&gt; tags.
-</P>
+</p>
 
-<P>
+<p>
 Carefully read the following note. If your post falls into one of the
 categories mentioned there, it will be rejected by one of the editors.
-</P>
+</p>
 
-<P>
-<B>Note:</B> If you are trying to <A href="http://gtk.php.net/bugs">report a
-bug</A>, or <a href="http://gtk.php.net/bugs">request a new feature or language
+<p>
+<b>Note:</b> If you are trying to <a href="http://bugs.php.net/">report a
+bug</a>, or <a href="http://bugs.php.net/">request a new feature or language
 change</a>, you're in the wrong place.  If you are just commenting on the fact
-that something is not documented, save your breath. This is where <B>you</B>
-add to the documentation, not where you ask <B>us</B> to add the
-documentation. This is also not the correct place to <A
-href="http://www.php.net/support.php">ask questions</A> (even if you see others have done that
+that something is not documented, save your breath. This is where <b>you</b>
+add to the documentation, not where you ask <b>us</b> to add the
+documentation. This is also not the correct place to <a
+href="http://gtk.php.net/resources.php">ask questions</a> (even if you see others have done that
 before, we are editing the notes slowly but surely).  If you post a note in
 any of the categories above, it will edited and/or removed.
-</P>
+</p>
 
-<P>
+<p>
 Just to make the point once more. The notes are being edited and support
 questions/bug reports/feature request/comments on lack of documentation, are
 being <b>deleted</b> from them (and you may get a <b>rejection</b> email), so
-if you post a question/bug/feature/complain, it will be removed (but once you
+if you post a question/bug/feature/complaint, it will be removed (but once you
 get an answer/bug solution/function documentation, feel free to come back
 and add it here!).
-</P>
+</p>
 
-<P>
-That said, you can change your mind and <a href="http://www.php.net/support.php">click here to 
-go to the support pages</a> or <a href="http://gtk.php.net/bugs">click here 
+<p>
+That said, you can change your mind and <a href="http://gtk.php.net/resources.php">click here to 
+go to the support pages</a> or <a href="http://bugs.php.net/">click here 
 to submit a bug report or request a feature</a>.
-</P>
+</p>
 <?php
 	}
 	if (!$user_email) {
 		$user_email = "[email protected]";
 	}
 	if (!isset($sect)) {
-		echo "<P><b>To add a note, you must click on the 'Add Note' button " .
-			"on the bottom of a manual page so we know where to add the note!</b></P>";
+		echo "<p><b>To add a note, you must click on the 'Add Note' button " .
+			"on the bottom of a manual page so we know where to add the note!</b></p>";
 	} else {
 ?>
 
@@ -142,23 +145,23 @@
 <input type="hidden" name="redirect" value="<?echo $redirect;?>">
 <input type="hidden" name="lang" value="<?echo $lang;?>">
 <table border="0" cellpadding="5" cellspacing="0" bgcolor="#e0e0e0">
-<TR VALIGN="top">
-<TD ALIGN="right">Your email address:<BR></TD>
+<tr valign="top">
+<td align="right">Your email address:<br /></td>
 <td><input type="text" name="user_email" size="40" maxlength="40" value="<?echo htmlspecialchars(stripslashes($user_email))?>"></td>
-</TR>
-<TR VALIGN="top">
-<TD ALIGN="right">Your note:<BR></TD>
+</tr>
+<tr valign="top">
+<td align="right">Your note:<br /></td>
 <td><textarea name="note" rows="6" cols="40" wrap="virtual"><?echo htmlspecialchars(stripslashes($note))?></textarea><br>
-</TD>
-</TR>
-<TR>
+</td>
+</tr>
+<tr>
  <td colspan="2" align="right">
   <input type="submit" name="action" value="Preview">
   <input type="submit" name="action" value="Add Note">
  </td>
 </tr>
-</TABLE>
-</FORM>
+</table>
+</form>
 <?php
 	}
 }
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual1/admin-notes.php?r1=1.1&r2=1.2&diff_format=u
Index: php-gtk-web/manual1/admin-notes.php
diff -u php-gtk-web/manual1/admin-notes.php:1.1 php-gtk-web/manual1/admin-notes.php:1.2
--- php-gtk-web/manual1/admin-notes.php:1.1	Tue Mar 14 21:37:13 2006
+++ php-gtk-web/manual1/admin-notes.php	Sat Jul 15 04:09:10 2006
@@ -4,34 +4,30 @@
 require_once 'email-validation.inc';
 require_once 'shared-manual1.inc';
 
-$mailto = '[email protected]';
+$mailto = '[email protected]';
 $num_entries_per_page = 50;
 
 if (isset($MAGIC_COOKIE)) {
 	list($user, $pass) = explode(":", base64_decode($MAGIC_COOKIE));
 }
 
-/*
-if(!strstr($MYSITE,"www.php.net")) {
-	Header("Location: http://gtk.php.net/manual1/admin-notes.php");
+if (!strstr($MYSITE, "gtk.php.net")) {
+	header("Location: http://gtk.php.net/manual1/admin-notes.php");
 	exit;
 }
-*/
-
-updateNotesVoting();
 
 commonHeader("PHP-GTK 1 Manual Notes Administration");
 echo "<h1>PHP-GTK 1 Manual Notes Administration</h1>\n\n";
 
-echo "<P>If you just want to browse the manual notes, you're better off " .
-	"<A href=\"http://gtk.php.net/manual1/browse-notes.php\">here</A>.</P>\n";
+echo "<p>If you just want to browse the manual notes, you're better off " .
+	"<a href=\"http://gtk.php.net/manual1/browse-notes.php\">here</a>.</p>\n";
 
 if ($action != '') {
 
 	list ($action, $id) = explode(' ', $action);
 
 	if ($action!='edit'&& !isset($MAGIC_COOKIE)) {
-		echo "<P><B>Authorization failed.</B></P>";
+		echo "<p><b>Authorization failed.</b></p>";
 		commonFooter();
 		exit;
 	}
@@ -41,10 +37,10 @@
 		$query = 'SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE id='.$id;
 		if ($result = mysql_query($query)) {
 			$row = mysql_fetch_array($result);
-			mail($mailto, "note ".$row['id']." deleted from ".$row['sect']." by $user",stripslashes($row['note']),"From: ".$user."@php.net");
+			mail($mailto, "note ".$row['id']." deleted from ".$row['sect']." by $user", stripslashes($row['note']), "From: ".$user."@php.net");
 			$query = 'DELETE FROM note WHERE id=' . $id;
 			if (mysql_query($query)) {
-				echo '<P><B>Note deleted.</B></P>';
+				echo '<p><b>Note deleted.</b></p>';
 				if ($popup) {
 					echo '<script language="javascript">window.close();</script>';
 				}
@@ -62,14 +58,14 @@
 		$reject_text .= "those issues.\n\n";
 		$reject_text .= "The user contributed notes are not an appropriate place to\n";
 		$reject_text .= "ask questions, report bugs or suggest new features; please\n";
-		$reject_text .= "use the resources listed in <http://www.php.net/support.php>\n";
+		$reject_text .= "use the resources listed in <http://gtk.php.net/resources.php>\n";
 		$reject_text .= "for those purposes. This was clearly stated in the page\n";
 		$reject_text .= "you used to submit your note, please carefully re-read\n";
 		$reject_text .= "those instructions before submitting future contributions.\n\n";
-		$reject_text .= "Bug Submissions should be entered at <http://gtk.php.net/bugs/>\n";
-		$reject_text .= "Feature Requests should also be entered at <http://gtk.php.net/bugs/>\n";
+		$reject_text .= "Bug Submissions should be entered at <http://bugs.php.net/>\n";
+		$reject_text .= "Feature Requests should also be entered at <http://bugs.php.net/>\n";
 		$reject_text .= "Support and ways to find answers to your guestions can be found\n";
-		$reject_text .= "at <http://www.php.net/support.php>\n\n";
+		$reject_text .= "at <http://gtk.php.net/resources.php>\n\n";
 		$reject_text .= "Your note has been removed from the on-line manual.\n\n";
 		$query = 'SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE id='.$id;
 		if ($result = mysql_query($query)) {
@@ -77,15 +73,15 @@
 			// email the submitter if the address looks reasonable
 			// uses functions in include/email-validation.inc
 			$submitter = clean_AntiSPAM($row['user']);
-			echo "<P>Note ".$row['id']." by: ".$row['user']." ($submitter) ";
+			echo "<p>Note ".$row['id']." by: ".$row['user']." ($submitter) ";
 			if (is_emailable_address($submitter)) {
 				mail($submitter,"note ".$row['id']." rejected and deleted from ".$row['sect']." by notes editor $user",$reject_text."----- Copy of your note below -----\n\n".stripslashes($row['note']),"From: ".$user."@php.net");
 			}
 			// email to the list
-			mail($mailto, "note ".$row['id']." rejected and deleted from ".$row['sect']." by $user",stripslashes($row['note']),"From: ".$user."@php.net");
+			mail($mailto, "note ".$row['id']." rejected and deleted from ".$row['sect']." by $user", stripslashes($row['note']), "From: ".$user."@php.net");
 			$query = 'DELETE FROM note WHERE id=' . $id;
 			if (mysql_query($query)) {
-				echo '<B>rejected and deleted.</B></P>';
+				echo '<b>rejected and deleted.</b></p>';
 			}
 			if ($popup) {
 				echo '<script language="javascript">window.close();</script>';
@@ -94,41 +90,41 @@
 		break;
 
 	case 'edit':
-		echo "<P>Only people with " . make_link('http://www.php.net/cvs-php.php', 'CVS accounts') . 
-			" are able to edit the manual notes, so please don't email us asking when this doesn't work for you.</P>";
+		echo "<p>Only people with " . make_link('http://www.php.net/cvs-php.php', 'CVS accounts') . 
+			" are able to edit the manual notes, so please don't email us asking why this doesn't work for you.</p>";
 		$query = 'SELECT *,UNIX_TIMESTAMP(ts) AS xwhen FROM note WHERE id='.$id;
 		if ($result = mysql_query($query)) {
 			$row = mysql_fetch_array($result);
-			echo '<FORM method="POST" action="/manual1/admin-notes.php">';
-			echo '<TABLE BORDER="0" CELLPADDING="5" CELLSPACING="0" BGCOLOR="#e0e0e0">';
-			echo '<TR valign="top"><TD align="right"><small>E-mail:<br></small></TD>' .
-				'<TD><INPUT type="text" size="40" name="nuser" value="',$row['user'], '"><BR></TD></TR>';
-			echo '<TR valign="top"><TD align="right"><small>Note:<br></small></TD>' .
-				'<TD><TEXTAREA name="note" rows="8" cols="50">' . $row['note'] . '</TEXTAREA><BR></TD></TR>';
-			echo '<TR valign="top"><TD align="right"><small>Reset rating:<br></small></TD>' .
-				'<TD><SELECT name="rating">';
-			echo '<OPTION VALUE="0">leave unchanged';
-			echo '<OPTION VALUE="-1">clear all votes';
-			for ($i=1; $i<=5; $i++) {
-				echo '<OPTION VALUE="' . $i . '">set to '.$i. "\n";
+			echo '<form method="POST" action="/manual1/admin-notes.php">';
+			echo '<table border="0" cellpadding="5" cellspacing="0" bgcolor="#e0e0e0">';
+			echo '<tr valign="top"><TD align="right"><small>E-mail:<br></small></td>' .
+				'<td><input type="text" size="40" name="nuser" value="',$row['user'], '"><br /></td></tr>';
+			echo '<tr valign="top"><TD align="right"><small>Note:<br></small></td>' .
+				'<td><textarea name="note" rows="8" cols="50">' . $row['note'] . '</textarea><br /></td></tr>';
+			echo '<tr valign="top"><TD align="right"><small>Reset rating:<br></small></td>' .
+				'<td><select name="rating">';
+			echo '<option value="0">leave unchanged';
+			echo '<option value="-1">clear all votes';
+			for ($i = 1; $i <= 5; $i++) {
+				echo '<option value="' . $i . '">set to '.$i. "\n";
 			}
-			echo '</SELECT><BR></TD></TR>';
+			echo '</select><br /></td></tr>';
 
 			echo '<tr bgcolor="#cccccc"><td colspan="2"></td></tr>';
 
-			echo '<TR valign="top"><TD align="right"><small>Your CVS username:<br></small></TD>' .
-				'<TD><INPUT type="text" size="8" name="user" value="' . $user . '"><BR></TD></TR>';
-			echo '<TR valign="top"><TD align="right"><small>Your CVS password:<br></small></TD>' .
-				'<TD><INPUT type="password" size="8" name="pass" value="' . $pass . '"><BR></TD></TR>';
-			echo '<TR valign="top"><TD align="right"><small>Remember me:<br></small></TD>' .
-				'<TD><INPUT type="checkbox" name="saveme" checked value="1"><BR></TD></TR>';
+			echo '<tr valign="top"><td align="right"><small>Your CVS username:<br></small></td>' .
+				'<td><input type="text" size="8" name="user" value="' . $user . '"><br /></td></tr>';
+			echo '<tr valign="top"><td align="right"><small>Your CVS password:<br></small></td>' .
+				'<td><input type="password" size="8" name="pass" value="' . $pass . '"><br /></td></tr>';
+			echo '<tr valign="top"><td align="right"><small>Remember me:<br></small></td>' .
+				'<td><input type="checkbox" name="saveme" checked value="1"><br /></td></tr>';
 
-			echo '<TR><TD colspan="2"><INPUT type="submit" name="action" value="modify ' .  $id . '"></TD></TR>';
-			echo "</TABLE></FORM>\n";
+			echo '<tr><td colspan="2"><input type="submit" name="action" value="modify ' .  $id . '"></td></tr>';
+			echo "</table></form>\n";
 			commonFooter();
 			exit;
 		} else {
-			echo "<P><B>Unable to find note for editing.</B></P>\n";
+			echo "<p><b>Unable to find note for editing.</b></p>\n";
 		}
 		break;
 
@@ -138,25 +134,25 @@
 			$row = mysql_fetch_array($result);
 		}
 		$add_url = "\n\nhttp://gtk.php.net/manual1/en/".$row['sect']."\n";
-		$query = "UPDATE note SET user='$nuser',note='$note'";
+		$query = "UPDATE note SET user='$nuser', note='$note'";
 		$rating = (int)$rating;
 		if ($rating==-1) {
-			$query .= ",votes=0,rating=0";
+			$query .= ", votes=0, rating=0";
 		} else if ($rating > 0) {
-			$query .= ",votes=10,rating=(10*".$rating.")";
+			$query .= ",votes=10, rating=(10*".$rating.")";
 		}
 		$query .= " WHERE id=$id";
 		if (mysql_query($query)) {
-			echo "<P><B>Record modified.</B></P>";
+			echo "<p><b>Record modified.</b></p>";
 			mail($mailto, "note ".$row['id']." modified in ".$row['sect']." by $user",stripslashes($note).$add_url,"From: ".$user."@php.net");
 		} else {
-			echo "<P><B>Record not modified (query failed).</B></P>";
+			echo "<p><b>Record not modified (query failed).</b></p>";
 		}
 		break;
 
 	default:
 		if (!empty($action)) {
-			echo "<P><B>Didn't understand action '$action'.</B></P>";
+			echo "<p><b>Didn't understand action '$action'.</b></p>";
 		}
 	} // end of switch
 
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual1/browse-notes.php?r1=1.1&r2=1.2&diff_format=u
Index: php-gtk-web/manual1/browse-notes.php
diff -u php-gtk-web/manual1/browse-notes.php:1.1 php-gtk-web/manual1/browse-notes.php:1.2
--- php-gtk-web/manual1/browse-notes.php:1.1	Tue Mar 14 21:37:13 2006
+++ php-gtk-web/manual1/browse-notes.php	Sat Jul 15 04:09:10 2006
@@ -3,8 +3,8 @@
 require_once 'shared-manual1.inc';
 
 /*
-if(!strstr($MYSITE,"www.php.net")) {
-	Header("Location: http://www.php.net/manual/browse-notes.php");
+if (!strstr($MYSITE,"gtk.php.net")) {
+	header("Location: http://gtk.php.net/manual1/browse-notes.php");
 	exit;
 }
 */
@@ -12,10 +12,6 @@
 commonHeader("Browse PHP-GTK 1 Manual Notes");
 echo '<h1>Browse PHP-GTK 1 Manual Notes</h1>';
 
-updateNotesVoting();
-
 include 'browse.php';
 
 commonFooter();
-
-
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual1/browse.php?r1=1.1&r2=1.2&diff_format=u
Index: php-gtk-web/manual1/browse.php
diff -u php-gtk-web/manual1/browse.php:1.1 php-gtk-web/manual1/browse.php:1.2
--- php-gtk-web/manual1/browse.php:1.1	Tue Mar 14 21:37:13 2006
+++ php-gtk-web/manual1/browse.php	Sat Jul 15 04:09:10 2006
@@ -1,10 +1,10 @@
 <?php
 
-$query = "SELECT DISTINCT(LEFT(sect,1)) AS first FROM note ORDER BY first";
+$query = "SELECT DISTINCT(LEFT(sect, 1)) AS first FROM note ORDER BY first";
 $result = mysql_query($query) or die(mysql_error());
 $used = array();
 $fl = '';
-if ( mysql_num_rows($result) > 0) {
+if (mysql_num_rows($result) > 0) {
 	while ($row = mysql_fetch_array($result)) {
 		if (!$fl) {
 			$fl = $row['first'];
@@ -27,13 +27,13 @@
 	'<tr bgcolor="#d0d0d0" valign="top">' .
 	'<td align="right" colspan="2"><small>Jump to: ' . 
 	join (' <font color="#999999">|</font> ', $links ) . 
-	'<br></small></td>' .
+	'<br /></small></td>' .
 	"</tr>\n" .
-	"</table><BR>\n\n";
+	"</table><br />\n\n";
 
 echo $jumpbar;
 
-if(!$let) {
+if (!$let) {
 	$let = $fl;
 }
 
@@ -45,11 +45,11 @@
 
 $result = mysql_query($query) or die(mysql_error());
 $numrows = mysql_num_rows($result);
-if ( $numrows > 0) {
+if ($numrows > 0) {
 	$last = '';
 	while ($row = mysql_fetch_array($result)) {
-		if ($row['sect'] != $last)  {
-			makeTitle( $row['sect'] );
+		if ($row['sect'] != $last) {
+			makeTitle($row['sect']);
 			$last = $row['sect'];
 		}
 		makeEntry($row);
@@ -57,17 +57,17 @@
 
 } else if (!$fl) {
 
-	echo '<TR><TD COLSPAN="2">No entries for any section</B>.<BR></TD></TR>';
+	echo '<tr><td colspan="2">No entries for any section</b>.<br /></td></tr>';
 
 } else {
 
-	echo '<TR><TD COLSPAN="2">No entries for <B>'.$let.'</B>.<BR></TD></TR>';
+	echo '<tr><td colspan="2">No entries for <b>'.$let.'</b>.<br /></td></tr>';
 
 }
 
 echo '</table>';
 
-if ($numrows > 10 ) {
+if ($numrows > 10) {
 	echo $jumpbar;
 }