cvs: php-gtk-web /manual add-note.php

[email protected] ("Steph Fox") Wed, 12 Jul 2006 20:44:58 -0000
Newsgroups php.gtk.webmaster
Message-ID <cvssfox1152737098@cvsserver>
sfox		Wed Jul 12 20:44:58 2006 UTC

  Modified files:              
    /php-gtk-web/manual	add-note.php 
  Log:
  Sort out die() messages and hopefully find out what's happening with the id generator...
  
http://cvs.php.net/viewvc.cgi/php-gtk-web/manual/add-note.php?r1=1.24&r2=1.25&diff_format=u
Index: php-gtk-web/manual/add-note.php
diff -u php-gtk-web/manual/add-note.php:1.24 php-gtk-web/manual/add-note.php:1.25
--- php-gtk-web/manual/add-note.php:1.24	Tue Jul 11 07:56:28 2006
+++ php-gtk-web/manual/add-note.php	Wed Jul 12 20:44:58 2006
@@ -158,6 +158,7 @@
 
 if (isset($_POST['preview'])) {
 	print "<br />\n<p>\nThis is what your entry will look like, roughly:\n</p>\n";
+	print "<br />\n<p>\nId: ".file_get_contents($last_id)."\n</p>\n";
 	print "<table border='0' cellpadding='0' cellspacing='0' width='100%' align = 'center'>\n";
 	$temp = array('display' => $display, 'comment' => htmlentities($content), 'date' => time());
 	makeEntry($temp, false);
@@ -282,7 +283,7 @@
 
 	/* Pick up id, insert note data into queue and mail out admin notification */
 	if (!$lastid = file_get_contents($last_id)) {
-		die("Could not obtain note ID");
+		die("Could not obtain note ID\n\n".commonFooter());
 	}
 
 	$id = $lastid + 1;
@@ -297,7 +298,7 @@
 	$result = sqlite_exec($queuedb, "INSERT INTO notes VALUES $db_string");
 	sqlite_close($queuedb);
 	if (!file_put_contents($last_id, $id)) {
-		die("New note ID not saved");
+		die("New note ID not saved\n\n".commonFooter());
 	}
 
 	$printmsg = "<p>Thank you for contributing! Your note has been queued for processing";