| | |
| | | EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| | | */ |
| | | |
| | | require_once('../../lib/config.inc.php'); |
| | | require_once('../../lib/app.inc.php'); |
| | | require_once '../../lib/config.inc.php'; |
| | | require_once '../../lib/app.inc.php'; |
| | | |
| | | //* Check permissions for module |
| | | $app->auth->check_module_permissions('designer'); |
| | |
| | | $app->uses('tpl'); |
| | | |
| | | $app->tpl->newTemplate("form.tpl.htm"); |
| | | $app->tpl->setInclude('content_tpl','templates/form_show.htm'); |
| | | $app->tpl->setInclude('content_tpl', 'templates/form_show.htm'); |
| | | |
| | | |
| | | // TODO: Check ID for malicius chars |
| | | $module_name = $_REQUEST["module_name"]; |
| | | $form_name = $_REQUEST["form_name"]; |
| | | |
| | | if(!preg_match('/^[A-Za-z0-9_]{1,50}$/',$module_name)) die("module_name contains invalid chars."); |
| | | if(!preg_match('/^[A-Za-z0-9_]{1,50}$/',$form_name)) die("form_name contains invalid chars."); |
| | | if(!preg_match('/^[A-Za-z0-9_]{1,50}$/', $module_name)) die("module_name contains invalid chars."); |
| | | if(!preg_match('/^[A-Za-z0-9_]{1,50}$/', $form_name)) die("form_name contains invalid chars."); |
| | | |
| | | include_once("../".$module_name."/form/".$form_name.".tform.php"); |
| | | include_once "../".$module_name."/form/".$form_name.".tform.php"; |
| | | $tabs = $form["tabs"]; |
| | | unset($form["tabs"]); |
| | | $record = $form; |
| | | $record["form_name"] = $form_name; |
| | | $record["module_name"] = $module_name; |
| | | |
| | | // loading language file |
| | | // loading language file |
| | | $lng_file = "lib/lang/".$_SESSION["s"]["language"]."_form_show.lng"; |
| | | include($lng_file); |
| | | include $lng_file; |
| | | $app->tpl->setVar($wb); |
| | | |
| | | // baue Tabs navi |
| | |
| | | $n1 = 0; |
| | | $n2 = 0; |
| | | if(is_array($tabs)) { |
| | | foreach($tabs as $tab_id => $tab) { |
| | | $content .= "<tr> |
| | | foreach($tabs as $tab_id => $tab) { |
| | | $content .= "<tr> |
| | | <td colspan='2' class='frmText11'> |
| | | <table width='100%'> |
| | | <tr> |
| | |
| | | <input type=\"button\" name=\"bt5$n2\" value=\"$wb[down_txt]\" onclick=\"location.href='form_tab_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&dir=down'\" class=\"button\" /> |
| | | </td> |
| | | </tr>"; |
| | | //$content .= "<tr><td bgcolor='#EEEEEE' class='frmText11'>Bereich:</td><td class='frmText11' bgcolor='#EEEEEE'><input name=\"module[nav][$n1][title]\" type=\"text\" class=\"text\" value=\"$section[title]\" size=\"30\" maxlength=\"255\"><input name=\"module[nav][$n1][open]\" type=\"hidden\" value=\"$section[open]\"></td></tr>\r\n"; |
| | | foreach($tab["fields"] as $field_id => $field) { |
| | | //$content .= "<tr><td class='frmText11'>Titel:</td><td class='frmText11'><input name=\"module[nav][$n1][items][$n2][title]\" type=\"text\" class=\"text\" value=\"$item[title]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n"; |
| | | //$content .= "<tr><td class='frmText11'>Ziel:</td><td class='frmText11'> <input name=\"module[nav][$n1][items][$n2][target]\" type=\"text\" class=\"text\" value=\"$item[target]\" size=\"10\" maxlength=\"255\"></td></tr>\r\n"; |
| | | //$content .= "<tr><td class='frmText11'>Link:</td><td class='frmText11'> <input name=\"module[nav][$n1][items][$n2][link]\" type=\"text\" class=\"text\" value=\"$item[link]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n"; |
| | | $content .= "<tr> |
| | | //$content .= "<tr><td bgcolor='#EEEEEE' class='frmText11'>Bereich:</td><td class='frmText11' bgcolor='#EEEEEE'><input name=\"module[nav][$n1][title]\" type=\"text\" class=\"text\" value=\"$section[title]\" size=\"30\" maxlength=\"255\"><input name=\"module[nav][$n1][open]\" type=\"hidden\" value=\"$section[open]\"></td></tr>\r\n"; |
| | | foreach($tab["fields"] as $field_id => $field) { |
| | | //$content .= "<tr><td class='frmText11'>Titel:</td><td class='frmText11'><input name=\"module[nav][$n1][items][$n2][title]\" type=\"text\" class=\"text\" value=\"$item[title]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n"; |
| | | //$content .= "<tr><td class='frmText11'>Ziel:</td><td class='frmText11'> <input name=\"module[nav][$n1][items][$n2][target]\" type=\"text\" class=\"text\" value=\"$item[target]\" size=\"10\" maxlength=\"255\"></td></tr>\r\n"; |
| | | //$content .= "<tr><td class='frmText11'>Link:</td><td class='frmText11'> <input name=\"module[nav][$n1][items][$n2][link]\" type=\"text\" class=\"text\" value=\"$item[link]\" size=\"30\" maxlength=\"255\"></td></tr>\r\n"; |
| | | $content .= "<tr> |
| | | <td class='frmText11'>$field_id</td> |
| | | <td class='frmText11' width='220' align='right'> |
| | | <input type=\"button\" name=\"bt6$n2\" value=\"$wb[edit_txt]\" onclick=\"location.href='form_field_edit.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id'\" class=\"button\" /> |
| | |
| | | <input type=\"button\" name=\"bt9$n2\" value=\"$wb[down_txt]\" onclick=\"location.href='form_field_flip.php?module_name=$module_name&form_name=$form_name&tab_id=$tab_id&field_id=$field_id&dir=down'\" class=\"button\" /> |
| | | </td> |
| | | </tr>"; |
| | | $n2++; |
| | | } |
| | | $content .= "<tr><td colspan='2' class='tblFooter'> </td></tr> |
| | | $n2++; |
| | | } |
| | | $content .= "<tr><td colspan='2' class='tblFooter'> </td></tr> |
| | | </table> |
| | | </td> |
| | | </tr>"; |
| | | $n1++; |
| | | } |
| | | $n1++; |
| | | } |
| | | } |
| | | |
| | | $record["nav"] = $content; |
| | |
| | | $app->tpl->setVar($record); |
| | | |
| | | |
| | | $app->tpl->setLoop('records',$modules_list); |
| | | $app->tpl->setLoop('records', $modules_list); |
| | | |
| | | $app->tpl_defaults(); |
| | | $app->tpl->pparse(); |
| | | |
| | | |
| | | |
| | | ?> |
| | | ?> |