From cdda6b98d785f103d9be6643a99a882c0d65b64c Mon Sep 17 00:00:00 2001
From: fantu <fantu@ispconfig3>
Date: Sun, 21 Dec 2008 04:51:07 -0500
Subject: [PATCH] fix parse error

---
 interface/lib/classes/tform.inc.php |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/interface/lib/classes/tform.inc.php b/interface/lib/classes/tform.inc.php
index 308c6c0..1f80db2 100644
--- a/interface/lib/classes/tform.inc.php
+++ b/interface/lib/classes/tform.inc.php
@@ -631,6 +631,24 @@
 										  }
                                         }
                                 break;
+								case 'ISIPV4':
+								$vip=1;
+								if(preg_match("/^[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}(\.)[0-9]{1,3}$/", $field_value)){
+								$groups=explode(".",$field_value);
+								foreach($groups as $group){
+									if($group<0 OR $group>255)
+									$vip=0;
+								}
+								}else{$vip=0;}
+                                        if($vip==0) {
+                                                $errmsg = $validator['errmsg'];
+                                                if(isset($this->wordbook[$errmsg])) {
+                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
+												} else {
+													$this->errorMessage .= $errmsg."<br />\r\n";
+												}
+                                        }
+                                break;
                                 case 'CUSTOM':
                                         // Calls a custom class to validate this record
                                         if($validator['class'] != '' and $validator['function'] != '') {

--
Gitblit v1.9.1