summaryrefslogtreecommitdiffstats
path: root/functions.php
diff options
context:
space:
mode:
authorArun Persaud <arun@nubati.net>2007-06-23 19:14:58 +0200
committerArun Persaud <arun@nubati.net>2007-06-24 18:42:04 +0200
commit0bf8233e0ef1db60e09269db5a2372fdd67f290d (patch)
tree2d7591b9c59588dab99929394b81989a24ddb5a8 /functions.php
parent9bceb4f3447a82affb63b4994bf3509f2e6758d4 (diff)
downloade-DoKo-0bf8233e0ef1db60e09269db5a2372fdd67f290d.tar.gz
e-DoKo-0bf8233e0ef1db60e09269db5a2372fdd67f290d.tar.bz2
e-DoKo-0bf8233e0ef1db60e09269db5a2372fdd67f290d.zip
NEW FEATURE: added admin name and email address to be configurable
email and name can be defined in config.php. Errors are send to that email address.
Diffstat (limited to 'functions.php')
-rw-r--r--functions.php14
1 files changed, 11 insertions, 3 deletions
diff --git a/functions.php b/functions.php
index be88974..7ee180e 100644
--- a/functions.php
+++ b/functions.php
@@ -28,7 +28,7 @@ function myisset()
/* returns 1 if all names passed as args are defined by a GET or POST statement,
* else return 0
*/
-
+
$ok = 1;
$args = func_get_args();
@@ -41,10 +41,17 @@ function myisset()
return $ok;
}
+function myerror($message)
+{
+ echo "<span class=\"error\">".htmlspecialchars($message)."</span>\n";
+ mymail($ADMIN_EMAIL,$EmailName." Error in Code",$message);
+ return;
+}
+
function pos_array($c,$arr)
{
$ret = 0;
-
+
$i = 0;
foreach($arr as $a)
{
@@ -335,7 +342,8 @@ function card_value($card)
case 48:
return 0;
default:
- echo "something went wrong, please contact the admin. ErrorCode: 2 - $card<br>";
+ myerror("something went wrong, please contact $ADMIN_NAME at $ADMIN_EMAIL. ErrorCode: 2 - $card<br>");
+ echo "something went wrong, please contact $ADMIN_NAME at $ADMIN_EMAIL. ErrorCode: 2 - $card<br>";
return 0;
}
}