From ecb6b3a8035679f652ed0d80ca624d8a0c6c57f1 Mon Sep 17 00:00:00 2001
From: mcramer <m.cramer@pixcept.de>
Date: Wed, 22 Aug 2012 14:13:12 -0400
Subject: [PATCH] - Added database, database_user and vhost subdomain functions to the remoting - Added interface plugins for db and db users - changed remoting (splitted up insert, update and deletequery)

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

diff --git a/interface/lib/classes/remoting_lib.inc.php b/interface/lib/classes/remoting_lib.inc.php
index 784b9c4..fcde405 100644
--- a/interface/lib/classes/remoting_lib.inc.php
+++ b/interface/lib/classes/remoting_lib.inc.php
@@ -552,6 +552,27 @@
 									}
 								}
                                 break;
+								case 'RANGE':
+                                        //* Checks if the value is within the given range or above / below a value
+										//* Range examples: < 10 = ":10", between 2 and 10 = "2:10", above 5 = "5:".
+										$range_parts = explode(':',trim($validator['range']));
+										$ok = true;
+                                        if($range_parts[0] != '' && $field_value < $range_parts[0]) {
+											$ok = false;
+										}
+										if($range_parts[1] != '' && $field_value > $range_parts[1]) {
+											$ok = false;
+										}
+										if($ok != true) {
+											$errmsg = $validator['errmsg'];
+											if(isset($this->wordbook[$errmsg])) {
+												$this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
+											} else {
+												$this->errorMessage .= $errmsg."<br />\r\n";
+											}
+                                        }
+										unset($range_parts);
+                                break;
                                 case 'CUSTOM':
                                         // Calls a custom class to validate this record
                                         if($validator['class'] != '' and $validator['function'] != '') {

--
Gitblit v1.9.1