From c81c7401e5db346fb07aa54183c1e6456d044a9b Mon Sep 17 00:00:00 2001 From: Arun Persaud Date: Sun, 7 Feb 2010 18:57:46 -0800 Subject: CLEANUP: removed ereg-functions (deprecated in newer php versions) used strpos and preg_replace instead --- include/functions.php | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/functions.php b/include/functions.php index 998ca02..16d094c 100644 --- a/include/functions.php +++ b/include/functions.php @@ -146,8 +146,8 @@ function sendmail($To,$Subject,$message) * change txt -> html */ $message = str_replace("\n","
\n",$message); - $message = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", - "\\0", $message); + $message = preg_replace("#(\w+://[^<>\s]+[\w/]*)#", + "$1", $message); echo "
To: $To
"; if($header != "") @@ -980,21 +980,21 @@ function display_table () else echo " \"wedding"; - if(ereg("solo",$GT) && $party=="re") + if( (strpos($GT,"solo")!==false) && $party=="re") { - if(ereg("queen",$GT)) + if(strpos($GT,"queen")!==false) echo " \"$GT\""; - else if(ereg("jack",$GT)) + else if(strpos($GT,"jack")!==false) echo " \"$GT\""; - else if(ereg("club",$GT)) + else if(strpos($GT,"club")!==false) echo " \"$GT\""; - else if(ereg("spade",$GT)) + else if(strpos($GT,"spade")!==false) echo " \"$GT\""; - else if(ereg("heart",$GT)) + else if(strpos($GT,"heart")!==false) echo " \"$GT\""; - else if(ereg("trumpless",$GT)) + else if(strpos($GT,"trumpless")!==false) echo " \"$GT\""; - else if(ereg("trump",$GT)) + else if(strpos($GT,"trump")!==false) echo " \"$GT\""; } -- cgit v1.2.3-18-g5258