| | |
| | | * Tabellendefinition |
| | | * |
| | | * Datentypen: |
| | | * - INTEGER (Wandelt Ausdrücke in Int um) |
| | | * - INTEGER (Wandelt Ausdr�cke in Int um) |
| | | * - DOUBLE |
| | | * - CURRENCY (Formatiert Zahlen nach Währungsnotation) |
| | | * - CURRENCY (Formatiert Zahlen nach W�hrungsnotation) |
| | | * - VARCHAR (kein weiterer Format Check) |
| | | * - DATE (Datumsformat, Timestamp Umwandlung) |
| | | * |
| | |
| | | * - Wert oder Array |
| | | * |
| | | * SEPARATOR |
| | | * - Trennzeichen für multiple Felder |
| | | * - Trennzeichen f�r multiple Felder |
| | | * |
| | | * Hinweis: |
| | | * Das ID-Feld ist nicht bei den Table Values einzufügen. |
| | | * Das ID-Feld ist nicht bei den Table Values einzuf�gen. |
| | | */ |
| | | |
| | | class remoting_lib { |
| | |
| | | function loadFormDef($file) { |
| | | global $app,$conf; |
| | | |
| | | include_once($file); |
| | | include($file); |
| | | |
| | | $this->formDef = $form; |
| | | unset($this->formDef['tabs']); |
| | |
| | | break; |
| | | case 'ISINT': |
| | | if(function_exists('filter_var')) { |
| | | if(!filter_var($field_value, FILTER_VALIDATE_INT)) { |
| | | if($vield_value != '' && filter_var($field_value, FILTER_VALIDATE_INT) === false) { |
| | | $errmsg = $validator['errmsg']; |
| | | if(isset($this->wordbook[$errmsg])) { |
| | | $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n"; |
| | |
| | | $sql_insert_val .= "'".$record[$key]."', "; |
| | | } |
| | | } else { |
| | | |
| | | if($field['formtype'] == 'PASSWORD') { |
| | | if($field['encryption'] == 'CRYPT') { |
| | | if(isset($field['encryption']) && $field['encryption'] == 'CRYPT') { |
| | | $record[$key] = $app->auth->crypt_password(stripslashes($record[$key])); |
| | | } elseif ($field['encryption'] == 'MYSQL') { |
| | | $sql_insert_val .= "PASSWORD('".$app->db->quote($record[$key])."'), "; |
| | | } elseif ($field['encryption'] == 'CLEARTEXT') { |
| | | $sql_insert_val .= "'".$app->db->quote($record[$key])."', "; |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'MYSQL') { |
| | | $sql_update .= "`$key` = PASSWORD('".$app->db->quote($record[$key])."'), "; |
| | | } elseif (isset($field['encryption']) && $field['encryption'] == 'CLEARTEXT') { |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } else { |
| | | $record[$key] = md5($record[$key]); |
| | | $record[$key] = md5(stripslashes($record[$key])); |
| | | $sql_update .= "`$key` = '".$app->db->quote($record[$key])."', "; |
| | | } |
| | | $sql_update .= "`$key` = '".$record[$key]."', "; |
| | | } elseif ($field['formtype'] == 'CHECKBOX') { |
| | | if($record[$key] == '') { |
| | | // if a checkbox is not set, we set it to the unchecked value |