| | |
| | | case 'TEXT':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\"><input name=\"".$key."\" type=\"text\" class=\"text\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"></td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\"><input name=\"".$key."\" type=\"text\" class=\"text\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"></td>
|
| | | </tr>";
|
| | | break;
|
| | | case 'TEXTAREA':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\"><textarea name='$key' cols='".$field['cols']."' rows='".$field['rows']."'>{tmpl_var name='".$key."'}</textarea></td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\"><textarea name='$key' cols='".$field['cols']."' rows='".$field['rows']."'>{tmpl_var name='".$key."'}</textarea></td>
|
| | | </tr>";
|
| | | break;
|
| | | case 'SELECT':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\">
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\">
|
| | | <select name=\"".$key."\" class=\"text\">
|
| | | {tmpl_var name='".$key."'}
|
| | | </select>
|
| | |
| | | case 'MULTIPLE':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\">
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\">
|
| | | <select name=\"".$key."\" class=\"text\" size=\"".$field['rows']."\" multiple>
|
| | | {tmpl_var name='".$key."'}
|
| | | </select>
|
| | |
| | | case 'PASSWORD':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\"><input name=\"".$key."\" type=\"password\" class=\"text\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"></td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\"><input name=\"".$key."\" type=\"password\" class=\"text\" value=\"{tmpl_var name='".$key."'}\" size=\"".$field['width']."\" maxlength=\"".$field['maxlength']."\"></td>
|
| | | </tr>";
|
| | | break;
|
| | | case 'CHECKBOX':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | </tr>";
|
| | | break;
|
| | | case 'CHECKBOXARRAY':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | </tr>";
|
| | | break;
|
| | | case 'RADIO':
|
| | | $html .= "
|
| | | <tr>
|
| | | <td width=\"126\" class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td width=\"366\" class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."_txt'}:</td>
|
| | | <td class=\"frmText11\">{tmpl_var name='".$key."'}</td>
|
| | | </tr>";
|
| | | break;
|
| | | }
|
| | |
| | | 'name' => $formDef["db_table_idx"],
|
| | | 'type' => 'int64',
|
| | | 'typeValue' => '',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => false,
|
| | | 'notNull' => true,
|
| | | 'autoInc' => true,
|
| | | 'option' => 'primary'
|
| | |
| | | 'name' => 'sys_userid',
|
| | | 'type' => 'int32',
|
| | | 'typeValue' => '',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => '0',
|
| | | 'notNull' => true
|
| | | );
|
| | | $columns[] = $col;
|
| | |
| | | 'name' => 'sys_groupid',
|
| | | 'type' => 'int32',
|
| | | 'typeValue' => '',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => '0',
|
| | | 'notNull' => true
|
| | | );
|
| | | $columns[] = $col;
|
| | |
| | | 'name' => 'sys_perm_user',
|
| | | 'type' => 'varchar',
|
| | | 'typeValue' => '5',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => 'NULL',
|
| | | 'notNull' => true
|
| | | );
|
| | | $columns[] = $col;
|
| | |
| | | 'name' => 'sys_perm_group',
|
| | | 'type' => 'varchar',
|
| | | 'typeValue' => '5',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => 'NULL',
|
| | | 'notNull' => true
|
| | | );
|
| | | $columns[] = $col;
|
| | |
| | | 'name' => 'sys_perm_other',
|
| | | 'type' => 'varchar',
|
| | | 'typeValue' => '5',
|
| | | 'defaultValue' => '',
|
| | | 'defaultValue' => 'NULL',
|
| | | 'notNull' => true
|
| | | );
|
| | | $columns[] = $col;
|
| | |
| | | case 'INTEGER':
|
| | | $type = 'int32';
|
| | | $typevalue = '';
|
| | | $defaultValue = ($field["default"] != '')?$field["default"]:'0';
|
| | | break;
|
| | | case 'DOUBLE':
|
| | | $type = 'double';
|
| | | $typevalue = '';
|
| | | $defaultValue = ($field["default"] != '')?$field["default"]:'0';
|
| | | break;
|
| | | case 'CURRENCY':
|
| | | $type = 'double';
|
| | | $typevalue = '';
|
| | | $defaultValue = ($field["default"] != '')?$field["default"]:'0';
|
| | | break;
|
| | | case 'VARCHAR':
|
| | | $type = 'varchar';
|
| | | $typeValue = ($field["maxlength"] > 0 and $field["maxlength"] <= 256)?$field["maxlength"]:255;
|
| | | // $defaultValue = ($field["default"] != '')?$field["default"]:'NOT NULL';
|
| | | $defaultValue = ($field["default"] != '')?$field["default"]:'NULL';
|
| | | break;
|
| | | case 'TEXT':
|
| | | $type = 'text';
|
| | | $typevalue = '';
|
| | | $defaultValue = 'NULL';
|
| | | break;
|
| | | case 'DATE':
|
| | | $type = 'int64';
|
| | | $typevalue = '';
|
| | | $defaultValue = ($field["default"] != '')?$field["default"]:'0';
|
| | | break;
|
| | | }
|
| | |
|
| | |
| | | 'name' => $name,
|
| | | 'type' => $type,
|
| | | 'typeValue' => $typeValue,
|
| | | 'defaultValue' => $field["default"],
|
| | | 'defaultValue' => $defaultValue,
|
| | | 'notNull' => true
|
| | | );
|
| | |
|
| | |
| | | }
|
| | |
|
| | | function lng_add($lang,$formDef) {
|
| | | global $go_api, $go_info;
|
| | | global $go_api, $go_info,$conf;
|
| | |
|
| | | $lng_file = "lib/lang/en_".$formDef['name'].".lng";
|
| | | $lng_file = "lib/lang/".$conf["language"]."_".$formDef['name'].".lng";
|
| | | if(is_file($lng_file)) {
|
| | | include($lng_file);
|
| | | } else {
|