cvs: phpweb / style.css /include layout.inc
| From: | jim winstead | Date: | Sun, 03 Mar 2002 20:47:07 +0000 |
| Subject: | cvs: phpweb / style.css /include layout.inc | ||
| Groups: | php.mirrors | ||
| Request: | Send a blank email to php-mirrors+get-8931@lists.php.net to get a copy of this message | ||
jimw Sun Mar 3 15:47:07 2002 EDT
Modified files:
/phpweb style.css
/phpweb/include layout.inc
Log:
function to display list of errors, and style for same
Index: phpweb/style.css
diff -u phpweb/style.css:1.25 phpweb/style.css:1.26
--- phpweb/style.css:1.25 Sun Feb 3 12:37:06 2002
+++ phpweb/style.css Sun Mar 3 15:47:07 2002
@@ -115,6 +115,14 @@
padding: 2px 4px;
}
+div.errors {
+ border: 1px dashed #660;
+ color: #600;
+ background: #fee;
+ margin: 4px;
+ padding: 6px;
+}
+
div.tip {
border: 1px solid #00c;
color: #006;
Index: phpweb/include/layout.inc
diff -u phpweb/include/layout.inc:1.74 phpweb/include/layout.inc:1.75
--- phpweb/include/layout.inc:1.74 Thu Feb 7 06:36:14 2002
+++ phpweb/include/layout.inc Sun Mar 3 15:47:07 2002
@@ -1,5 +1,5 @@
<?php
-/* $Id: layout.inc,v 1.74 2002/02/07 11:36:14 goba Exp $ */
+/* $Id: layout.inc,v 1.75 2002/03/03 20:47:07 jimw Exp $ */
# spacer()
# print a IMG tag for a sized spacer GIF
@@ -376,6 +376,22 @@
$text = "<pre class=\"note\">".$text."</pre>";
return $text;
+}
+
+function display_errors($errors)
+{
+ echo '<div class="errors">';
+ if (count($errors) > 1) {
+ echo "You need to do the following before your submission will be accepted:<ul>";
+ foreach ($errors as $error) {
+ echo "<li>$error</li>\n";
+ }
+ echo "</ul>";
+ }
+ else {
+ echo $errors[0];
+ }
+ echo '</div>';
}
?>