diff options
author | Arun Persaud <arun@nubati.net> | 2010-02-07 18:57:46 -0800 |
---|---|---|
committer | Arun Persaud <arun@nubati.net> | 2010-02-07 18:57:46 -0800 |
commit | c81c7401e5db346fb07aa54183c1e6456d044a9b (patch) | |
tree | cfdc0f2aaf43cde6a72362fec29899ae36164a5f /include | |
parent | 6e7ed2d202da016b9a74256371369cc41201df2e (diff) | |
download | e-DoKo-c81c7401e5db346fb07aa54183c1e6456d044a9b.tar.gz e-DoKo-c81c7401e5db346fb07aa54183c1e6456d044a9b.tar.bz2 e-DoKo-c81c7401e5db346fb07aa54183c1e6456d044a9b.zip |
CLEANUP: removed ereg-functions (deprecated in newer php versions)
used strpos and preg_replace instead
Diffstat (limited to 'include')
-rw-r--r-- | include/functions.php | 20 |
1 files changed, 10 insertions, 10 deletions
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","<br />\n",$message); - $message = ereg_replace("[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]", - "<a href=\"\\0\">\\0</a>", $message); + $message = preg_replace("#(\w+://[^<>\s]+[\w/]*)#", + "<a href=\"$1\">$1</a>", $message); echo "<br />To: $To<br />"; if($header != "") @@ -980,21 +980,21 @@ function display_table () else echo " <img src=\"pics/button/wedding_partner_button.png\" class=\"button\" alt=\"wedding partner\" title=\"wedding partner\" />"; - if(ereg("solo",$GT) && $party=="re") + if( (strpos($GT,"solo")!==false) && $party=="re") { - if(ereg("queen",$GT)) + if(strpos($GT,"queen")!==false) echo " <img src=\"pics/button/queensolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Queen solo\" />"; - else if(ereg("jack",$GT)) + else if(strpos($GT,"jack")!==false) echo " <img src=\"pics/button/jacksolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Jack solo\" />"; - else if(ereg("club",$GT)) + else if(strpos($GT,"club")!==false) echo " <img src=\"pics/button/clubsolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Club solo\" />"; - else if(ereg("spade",$GT)) + else if(strpos($GT,"spade")!==false) echo " <img src=\"pics/button/spadesolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Spade solo\" />"; - else if(ereg("heart",$GT)) + else if(strpos($GT,"heart")!==false) echo " <img src=\"pics/button/heartsolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Heart solo\" />"; - else if(ereg("trumpless",$GT)) + else if(strpos($GT,"trumpless")!==false) echo " <img src=\"pics/button/notrumpsolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Trumpless solo\" />"; - else if(ereg("trump",$GT)) + else if(strpos($GT,"trump")!==false) echo " <img src=\"pics/button/trumpsolo_button.png\" class=\"button\" alt=\"$GT\" title=\"Trump solo\" />"; } |