fantu
2008-12-11 baac49e1be0d7189da7c28f02efc8be05806c364
fix some small xhtml error
6 files modified
60 ■■■■ changed files
interface/lib/app.inc.php 4 ●●●● patch | view | raw | blame | history
interface/lib/classes/listform.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tform.inc.php 38 ●●●● patch | view | raw | blame | history
interface/lib/classes/tform_actions.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/classes/tform_tpl_generator.inc.php 12 ●●●● patch | view | raw | blame | history
interface/lib/classes/tpl_error.inc.php 2 ●●● patch | view | raw | blame | history
interface/lib/app.inc.php
@@ -124,8 +124,8 @@
<br /><br /><br />
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="error"><b>Error:</b><br>'.$msg;
        if($next_link != '') $msg .= '<a href="'.$next_link.'">Next</a><br>';
<td class="error"><b>Error:</b><br />'.$msg;
        if($next_link != '') $msg .= '<a href="'.$next_link.'">Next</a><br />';
        $msg .= '</td>
</tr>
</table>
interface/lib/classes/listform.inc.php
@@ -118,7 +118,7 @@
                $record = array();
                $values = $app->$datasource_class->$datasource_function($field, $record);
            } else {
                $this->errorMessage .= "Custom datasource class or function is empty<br>\r\n";
                $this->errorMessage .= "Custom datasource class or function is empty<br />\r\n";
            }
        }
        return $values;
interface/lib/classes/tform.inc.php
@@ -247,7 +247,7 @@
                                $app->uses($datasource_class);
                                $values = $app->$datasource_class->$datasource_function($field, $record);
                        } else {
                                $this->errorMessage .= "Custom datasource class or function is empty<br>\r\n";
                                $this->errorMessage .= "Custom datasource class or function is empty<br />\r\n";
                        }
                }
@@ -527,7 +527,7 @@
                                        $field['regex'] .= 's';
                                        if(!preg_match($field['regex'], $record[$key])) {
                                                $errmsg = $field['errmsg'];
                                                $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                        }
                                }
@@ -561,9 +561,9 @@
                                        if(!preg_match($validator['regex'], $field_value)) {
                                                $errmsg = $validator['errmsg'];
                                                if(isset($this->wordbook[$errmsg])) {
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                } else {
                                                    $this->errorMessage .= $errmsg."<br>\r\n";
                                                    $this->errorMessage .= $errmsg."<br />\r\n";
                                                }
                                        }
                                break;
@@ -573,9 +573,9 @@
                                                if($num_rec["number"] > 0) {
                                                        $errmsg = $validator['errmsg'];
                                                        if(isset($this->wordbook[$errmsg])) {
                                                            $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                            $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                        } else {
                                                            $this->errorMessage .= $errmsg."<br>\r\n";
                                                            $this->errorMessage .= $errmsg."<br />\r\n";
                                                        }
                                                }
                                        } else {
@@ -583,9 +583,9 @@
                                                if($num_rec["number"] > 0) {
                                                        $errmsg = $validator['errmsg'];
                                                        if(isset($this->wordbook[$errmsg])) {
                                                            $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                            $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                        } else {
                                                            $this->errorMessage .= $errmsg."<br>\r\n";
                                                            $this->errorMessage .= $errmsg."<br />\r\n";
                                                        }
                                                }
                                        }
@@ -594,9 +594,9 @@
                                        if(empty($field_value)) {
                                                $errmsg = $validator['errmsg'];
                                                if(isset($this->wordbook[$errmsg])) {
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                } else {
                                                    $this->errorMessage .= $errmsg."<br>\r\n";
                                                    $this->errorMessage .= $errmsg."<br />\r\n";
                                                }
                                        }
                                break;
@@ -604,9 +604,9 @@
                                        if(!preg_match("/^\w+[\w.-]*\w+@\w+[\w.-]*\w+\.[a-z]{2,10}$/i", $field_value)) {
                                                $errmsg = $validator['errmsg'];
                                                if(isset($this->wordbook[$errmsg])) {
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                } else {
                                                    $this->errorMessage .= $errmsg."<br>\r\n";
                                                    $this->errorMessage .= $errmsg."<br />\r\n";
                                                }
                                        }
                                break;
@@ -615,9 +615,9 @@
                                        if($tmpval === 0 and !empty($field_value)) {
                                                $errmsg = $validator['errmsg'];
                                                if(isset($this->wordbook[$errmsg])) {
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                                    $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                                } else {
                                                    $this->errorMessage .= $errmsg."<br>\r\n";
                                                    $this->errorMessage .= $errmsg."<br />\r\n";
                                                }
                                        }
                                break;
@@ -625,9 +625,9 @@
                                        if(!is_numeric($field_value) || $field_value <= 0){
                                          $errmsg = $validator['errmsg'];
                                          if(isset($this->wordbook[$errmsg])) {
                                             $this->errorMessage .= $this->wordbook[$errmsg]."<br>\r\n";
                                             $this->errorMessage .= $this->wordbook[$errmsg]."<br />\r\n";
                                          } else {
                                             $this->errorMessage .= $errmsg."<br>\r\n";
                                             $this->errorMessage .= $errmsg."<br />\r\n";
                                          }
                                        }
                                break;
@@ -639,7 +639,7 @@
                                                $app->uses($validator_class);
                                                $this->errorMessage .= $app->$validator_class->$validator_function($field_name, $field_value, $validator);
                                        } else {
                                                $this->errorMessage .= "Custom validator class or function is empty<br>\r\n";
                                                $this->errorMessage .= "Custom validator class or function is empty<br />\r\n";
                                        }
                                break;
                                default:
@@ -671,9 +671,9 @@
                // checking permissions
                if($this->formDef['auth'] == 'yes' && $_SESSION["s"]["user"]["typ"] != 'admin') {
                        if($action == "INSERT") {
                                if(!$this->checkPerm($primary_id,'i')) $this->errorMessage .= "Insert denied.<br>\r\n";
                                if(!$this->checkPerm($primary_id,'i')) $this->errorMessage .= "Insert denied.<br />\r\n";
                        } else {
                                if(!$this->checkPerm($primary_id,'u')) $this->errorMessage .= "Update denied.<br>\r\n";
                                if(!$this->checkPerm($primary_id,'u')) $this->errorMessage .= "Update denied.<br />\r\n";
                        }
                }
interface/lib/classes/tform_actions.inc.php
@@ -263,7 +263,7 @@
        function onError() {
                global $app, $conf;
                $app->tpl->setVar("error","<b>".$app->lng('Error').":</b><br>".$app->tform->errorMessage);
                $app->tpl->setVar("error","<b>".$app->lng('Error').":</b><br />".$app->tform->errorMessage);
                $app->tpl->setVar($this->dataRecord);
                $this->onShow();
        }
interface/lib/classes/tform_tpl_generator.inc.php
@@ -51,7 +51,7 @@
        <label for=\"".$key."\" class=\"wf_preField\">{tmpl_var name='".$key."_txt'}</label>
        <input type=\"text\" id=\"".$key."\" name=\"".$key."\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"";
          if ($field['required'] == true ) {
                      $html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br>";
                      $html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br />";
          } else {
                       $html .= ">";
          }
@@ -68,7 +68,7 @@
          }
                    $html .= "{tmpl_var name='".$key."'}</textarea>";
          if ($field['required'] == true ) {
                      $html .= "<span class=\"wf_reqMark\">*</span><br>";
                      $html .= "<span class=\"wf_reqMark\">*</span><br />";
          }
                    $html .= "\r\n      </span>";
                break;
@@ -83,7 +83,7 @@
          }
                    $html .= "{tmpl_var name='".$key."'}</select>";
          if ($field['required'] == true ) {
                      $html .= "<span class=\"wf_reqMark\">*</span><br>";
                      $html .= "<span class=\"wf_reqMark\">*</span><br />";
          }
                    $html .= "\r\n      </span>";
                break;
@@ -98,7 +98,7 @@
          }
                    $html .= "{tmpl_var name='".$key."'}</select>";
          if ($field['required'] == true ) {
                      $html .= "<span class=\"wf_reqMark\">*</span><br>";
                      $html .= "<span class=\"wf_reqMark\">*</span><br />";
          }
                    $html .= "\r\n      </span>";
                break;
@@ -107,7 +107,7 @@
        <label for=\"".$key."\" class=\"wf_preField\">{tmpl_var name='".$key."_txt'}</label>
        <input type=\"password\" id=\"".$key."\" name=\"".$key."\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"";
          if ($field['required'] == true ) {
                      $html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br>";
                      $html .= " class=\"wf_required\"><span class=\"wf_reqMark\">*</span><br />";
          } else {
                       $html .= ">";
          }
@@ -120,7 +120,7 @@
                      $html .= "                    <span class=\"wf_required\">
                      {tmpl_var name='".$key."'}
                    </span>
                    <span class=\"wf_reqMark\">*</span><br>";
                    <span class=\"wf_reqMark\">*</span><br />";
          } else {
                      $html .= "                    <span class=\"\">
                      {tmpl_var name='".$key."'}
interface/lib/classes/tpl_error.inc.php
@@ -36,7 +36,7 @@
        $error_codes = array(
                        'VT_ERROR_NOFILE'               => 'vlibTemplate Error: Template ('.$extra.') file not found.',
                        'VT_ERROR_PARSE'                => 'vlibTemplate Error: Parse error!<br>To debug this file, use vlibTemplateDebug instead of vlibTemplate in the class instantiation(i.e. new vlibTemplateDebug).',
                        'VT_ERROR_PARSE'                => 'vlibTemplate Error: Parse error!<br />To debug this file, use vlibTemplateDebug instead of vlibTemplate in the class instantiation(i.e. new vlibTemplateDebug).',
                        'VT_NOTICE_INVALID_TAG'         => 'vlibTemplate Notice: Invalid tag ('.$extra.').',
                        'VT_ERROR_INVALID_TAG'          => 'vlibTemplate Error: Invalid tag ('.$extra.'). To disable this you must turn of the STRICT option.',
                        'VT_NOTICE_INVALID_ATT'         => 'vlibTemplate Notice: Invalid attribute ('.$extra.').',