Exemplo n.º 1
0
<?php

include 'config.php';
include '../../common/header.php';
?>




<?

$textjs = new textext_js();
echo $textjs->get_header();
if (isset($_REQUEST) && $_REQUEST['action'] == 'Edit') {
    $save_ob = new saveform($db_table, $_REQUEST, $colsUpdate, 'id');
	$temp_id = $_REQUEST['id'];
	$t_field = $temp_maker->insertTmplateFields($_REQUEST['main_html'],$_REQUEST['item_html'],$temp_id);
	$t_settings = $temp_maker->insertTemplateSettings($_REQUEST['main_html'],$_REQUEST['item_html'],$temp_id);
	$temp_maker->insertTemplateLabels($_REQUEST['main_html'],$_REQUEST['item_html']);
	$utils->redirect($pageList);
}

$form = new GenerateFormField();
$values = $fpdo->from($db_table)->where('id', $_REQUEST['id'])->fetch();
$form->setColumns($colsUpdate);
$form->setTypes($types);
$form->setValues($values);
$form->setRequireds();
$form->setExtendTables($source);
$form->setClasses();
$form->setCountCell(1);
<?php

if ($_REQUEST['module'] != "") {
    include "../../common/top.php";
    $modulePost = $_REQUEST['module'];
    $module = $fpdo->from('cms_modules')->where('id', $modulePost)->fetch();
    $table = $module['table_name'];
    $langType = $module['lang_type'];
    $fileds = $fpdo->from('cms_module_fields')->where("table_id='" . $modulePost . "' and is_main='1'")->fetch();
    $fileds['title'];
    $field = "";
    if ($langType == 'Field' && $fileds['is_lang_eff'] == '1') {
        $field = $fileds['title'] . "_{$cmsMlang}";
    } else {
        $field = $fileds['title'];
    }
    if ($_REQUEST['type'] == "Draw") {
        echo "<div class='textextjsModule' data-module='{$modulePost}'>";
        $textjs = new textext_js();
        echo "<style>.text-wrap,.text-wrap textarea{width:100%;}</style>";
        echo $textjs->get_header();
        echo "<textarea id='textJs{$modulePost}' style='width:100%'></textarea>";
        $v1 = $textjs->getForma($table, $field, 'id', $_REQUEST["values"], true);
        echo $textjs->get_script('#textJs' . $modulePost, '../ajax/AsTags.php', $table, 'id', $field, $v1);
        echo "</div>";
    } elseif ($_REQUEST['type'] == 'getData') {
        $textjs = new textext_js();
        echo $textjs->getForma($table, 'id', $field, $_REQUEST['val']);
    }
}