$name = 'address';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '200');
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$data = $cF->inputText($name, $value, 'input_medium', $properties);
echo $cF->displayTable('Địa chỉ', $data);
$name = 'message';
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$others = $cF->ckeditorCustom($name);
$data = $cF->textArea($name, $value, 'textarea', NULL, $others);
echo $cF->displayTable('Nội dung', $data);
$name = 'lang';
$data = $cF->inputHidden($name, $lang);
echo $data;
$name = 'id';
$data = $cF->inputHidden($name, $rowDetail[$name]);
echo $data;
$name = 'btnCancel';
$btnCancel = $cF->btnCancel($name);
$name = 'btnSubmit';
$btnSubmit = $cF->inputSubmit($name, $arrAction['lable'], 'submit');
echo $cF->displayTable('', $btnSubmit . $btnCancel);
echo '</table></form>';
Ejemplo n.º 2
0
    $change = '';
} else {
    $change = 'changeUser';
}
$others = $c->messageChange('', $change);
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$data = $cF->inputText($name, $value, 'input_medium', $properties, $others);
echo $cF->displayTable('Username', $data);
if ($id == 0) {
    $name = 'password';
    $value = md5(CONS_ADMIN_PASSWORD_DEFAULT);
    $data = $cF->inputHidden($name, $value);
    echo $data;
} else {
    $name = 'password';
    $properties = array();
    $properties[] = array('propertie' => 'readonly', 'value' => 'readonly');
    $properties[] = $arrAction['disabled'];
    $value = md5(CONS_ADMIN_PASSWORD_DEFAULT);
    $data = $cF->inputText($name, $value, 'input_medium', $properties);
    echo $cF->displayTable('Reset pass', $data . '<a href="javascript:;" id="resetPass" class="change">Reset</a>');
}
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '100');
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
<div class="clear30"></div>
<?php 
$type = array('0' => array('id' => 0, 'name' => 'No'), '1' => array('id' => 1, 'name' => 'Selected'), '2' => array('id' => 2, 'name' => 'Associate'), '3' => array('id' => 3, 'name' => 'Certified'), '4' => array('id' => 4, 'name' => 'Senior'), '5' => array('id' => 5, 'name' => 'Expert'));
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'Enable', 'id' => '1');
$values[] = array('name' => 'Disable', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Status', $data);
$name = 'type';
$values = $type;
if ($rowDetail[$name] != '') {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = 0;
}
$properties = array();
if ($_SESSION['adminGroup'] != 5) {
    $properties[] = array('propertie' => 'disabled', 'value' => 'disabled');
    $properties[] = array('propertie' => 'style', 'value' => 'background-color:#EEE');
}
$data = $cF->select($name, $values, $valueCheck, 'ad_field adInput adTxtMedium', $properties);
<div class="clear30"></div>
<form id="imageForm" method="post" enctype="multipart/form-data" action="<?php 
echo CONS_BASE_URL;
?>
/ajax/" >
	<input type="hidden" name="uploadWebPicture" value="1" />
    <?php 
$cF = new controlAdminForm();
$name = 'id';
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden($name, $id, 'ad_field');
echo $data;
$name = '_table';
$value = 'web_header';
$data = $cF->inputHidden($name, $value, 'ad_field');
echo $data;
$name = 'datetime';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '16');
if ($rowDetail[$name] == 0) {
    $value = date('Y-m-d H:i', time());
} else {
    $value = date('Y-m-d H:i', $rowDetail[$name]);
}
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtSmall datetimepick', $properties);
echo $cF->displayDiv('Ngày', $data);
$name = 'table_id';
$properties = array();
$properties[] = array('propertie' => 'check', 'value' => '1');
$properties[] = array('propertie' => 'message', 'value' => 'Chọn danh mục');
$other = '<span class="error adError"></span>';
Ejemplo n.º 5
0
<div class="clear30"></div>
<?php 
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'Hiện', 'id' => '1');
$values[] = array('name' => 'Ẩn', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Trạng thái', $data);
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '50');
$properties[] = array('propertie' => 'check', 'value' => '2');
$properties[] = array('propertie' => 'message', 'value' => 'Nhập name');
$value = $rowDetail[$name];
$other = '<span class="error adError"></span>';
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties, $other);
echo $cF->displayDiv('Mô tả', $data);
$name = 'title';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '60');
$value = $rowDetail[$name];
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtMedium', $properties);
<div class="clear30"></div>
<?php 
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'Enable', 'id' => '1');
$values[] = array('name' => 'Disable', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Status', $data);
$name = 'type';
$values = array();
$values[] = array('name' => 'Form dùng cho quản lý', 'id' => '2');
$values[] = array('name' => 'Form dùng cho Website', 'id' => '1');
if ($rowDetail[$name] == '') {
    $valueCheck = 2;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio form_type');
echo $cF->displayDiv('Loại', $data);
$name = 'type_id';
$values = array();
$values[] = array('id' => '', 'name' => '-- chọn form mẫu --');
Ejemplo n.º 7
0
echo $cF->displayTable('Trạng thái', $data);
$name = 'menu_id';
$where = "(type_id=1 OR type_id=5)";
$values = $c->selectFromMenu($lang, $table, $where);
if (!isset($_POST[$name])) {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = $_POST[$name];
}
$data = $cF->inputCheckbox($name, $values, $valueCheck, 'checkboxItem', 1);
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$data .= $cF->inputHidden($name, $value, 'input_medium valueChecksBox');
echo $cF->displayTable('Danh mục', '<div class="listCheckboxMedium">' . $data . '</div>');
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '200');
if (!isset($_POST[$name])) {
    $value = $rowDetail[$name];
} else {
    $value = $_POST[$name];
}
$data = $cF->inputText($name, $value, 'input_medium', $properties);
echo $cF->displayTable('Tiêu đề', $data);
$name = 'img';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '150');
if (!isset($_POST[$name])) {
    $valueCheck = 35;
}
$data = $cF->select($name, $values, $valueCheck, 'input_medium', 1);
echo $cF->displayTable('Tỉnh thành', $data);
$name = 'district_id';
$values = $c->_model->_listTable('web_listdistrict', '`name`');
array_unshift($values, array('name' => '-- chọn quận huyện --', 'id' => '0'));
if ($rowDetail[$name] != '') {
    $valueCheck = $rowDetail[$name];
} else {
    $valueCheck = 0;
}
$data = $cF->select($name, $values, $valueCheck, 'input_medium', 1);
echo $cF->displayTable('Quận huyện', $data);
$name = 'lang';
$data = $cF->inputHidden($name, $lang);
echo $data;
if (isset($_GET['id']) && $_GET['id'] == 0) {
    $name = 'datetime';
    $data = $cF->inputHidden($name, date('Y-m-d H:i:s'));
    echo $data;
}
$name = 'id';
$data = $cF->inputHidden($name, $rowDetail[$name]);
echo $data;
$name = 'btnCancel';
$btnCancel = $cF->btnCancel($name);
$name = 'btnSubmit';
$btnSubmit = $cF->inputSubmit($name, $arrAction['lable'], 'submitAdmin');
echo $cF->displayTable('', $btnSubmit . $btnCancel);
echo '</table></form>';
<div class="clear30"></div>
<?php 
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'Hiện', 'id' => '1');
$values[] = array('name' => 'Ẩn', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Trạng thái', $data);
$name = 'page';
$values = array();
$values[] = array('name' => 'Web', 'id' => '1');
$values[] = array('name' => 'Admin', 'id' => '2');
$values[] = array('name' => 'Manager', 'id' => '3');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Trang mặc định', $data);
/*if($rowDetail['group_id']!=3 && $id!=0){
	echo $cF->displayDiv('Ngày đăng ký', '<b class="label2 adMessage">'.$c->viewDateTime($rowDetail['datetime']).'</b>');
echo $cF->displayTable('Title', $data);
$name = 'description';
$value = $rowHeader[$name];
$data = $cF->textArea($name, $value, 'textareaAdmin');
echo $cF->displayTable('Description', $data);
$name = 'tags';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '200');
$others = $c->messageChange(CONS_ADMIN_AUTO_TAGS);
$value = $rowHeader[$name];
$data = $cF->inputText($name, $value, 'input_medium', $properties, $others);
echo $cF->displayTable('Tags (keyword)', $data);
//img
$name = 'img';
$value = $rowHeader[$name];
echo $cF->inputHidden($name, $value, 'imgAdmin');
$data = ob_start();
include_once 'admin_upload.php';
$data = ob_get_clean();
echo $cF->displayTableColspan($data);
$name = 'parent';
$where = "`id`<>'{$id}'";
$values = $c->menuList($lang, $where);
array_unshift($values, array('name' => '-- chọn danh mục gốc --', 'id' => '0'));
if ($rowHeader[$name] != '') {
    $valueCheck = $rowHeader[$name];
} else {
    $valueCheck = 0;
}
$data = $cF->select($name, $values, $valueCheck, 'input_medium', 1);
echo $cF->displayTable('Danh mục gốc', $data);
Ejemplo n.º 11
0
<div class="clear30"></div>
<?php 
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'enable', 'id' => '1');
$values[] = array('name' => 'disable', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Status', $data);
$name = 'date_start';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '16');
if ($rowDetail[$name] == 0) {
    $value = date('Y-m-d H:i', time());
} else {
    $value = date('Y-m-d H:i', $rowDetail[$name]);
}
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtSmall datetimepick', $properties);
echo $cF->displayDiv('Opening date', $data);
$name = 'date_end';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '16');
if ($rowDetail[$name] == 0) {
Ejemplo n.º 12
0
    }
    $table = 'web_content';
    $fields = array_keys($_POST);
    array_shift($fields);
    array_push($fields, 'btn');
    $values = array_values($_POST);
    array_shift($values);
    array_push($values, 'btn');
    $id = $ad->_getSql($type, $table, $fields, $values, $id);
    echo $id;
    return true;
}
/*end content insert data*/
if (isset($_POST['viewFrmContent'])) {
    $id = $c->_model->_changeDauNhay($_POST['viewFrmContent']);
    if (!is_numeric($id)) {
        return false;
    }
    $cF = new controlAdminForm();
    $dataContent = $c->_model->_webContentID($id);
    $name = 'content';
    $value = $dataContent[$name];
    $others = $cF->ckeditorFull($name);
    $data = $cF->textArea($name, $value, 'textarea', NULL, $others);
    echo $data;
    $name = 'idContent';
    $value = $dataContent['id'];
    $data = $cF->inputHidden($name, $value);
    echo $data;
    return true;
}
} else {
    $value = date('Y-m-d H:i', $rowHeader[$name]);
}
$data = $cF->inputText($name, $value, 'input_large datetimepick', $properties);
echo $cF->displayTable('Ngày', $data);
$name = 'menu_id';
$where = "(type_id=1 OR type_id=2 OR type_id=3)";
$values = $c->menuList($lang, $where);
$valueCheck = $rowHeader[$name];
$data = $cF->inputCheckbox($name, $values, $valueCheck, 'checkBoxMenuID', 1);
if (!isset($_POST[$name])) {
    $value = $rowHeader[$name];
} else {
    $value = $_POST[$name];
}
$data .= $cF->inputHidden($name, $value, 'input_medium valueCheckBoxMenuID');
echo $cF->displayTable('Danh mục hiển thị', '<div class="listCheckboxMedium" style="height:250px">' . $data . '</div>');
$name = 'position_id';
if ($rowHeader[$name] != '') {
    $valueCheck = $rowHeader[$name];
} else {
    $valueCheck = '';
}
$values = $c->_model->_webPositionList(0);
$data = $cF->inputCheckbox($name, $values, $valueCheck, 'checkbox checkBoxPosition', 1);
$value = $rowHeader[$name];
$data .= $cF->inputHidden($name, $value, 'input_medium valueCheckBoxPosition');
echo $cF->displayTable('Vị trí hiển thị', $data);
$name = 'name';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '200');
Ejemplo n.º 14
0
<div class="clear30"></div>
<?php 
$cF = new controlAdminForm();
$id = $c->createEditData($table, $arrAction, $rowDetail);
$data = $cF->inputHidden('id', $id, 'ad_field');
echo $data;
$name = 'status';
$values = array();
$values[] = array('name' => 'Hiện', 'id' => '1');
$values[] = array('name' => 'Ẩn', 'id' => '0');
if ($rowDetail[$name] == '') {
    $valueCheck = 1;
} else {
    $valueCheck = $rowDetail[$name];
}
$data = $cF->inputRadio($name, $values, $valueCheck, 'ad_field adRadio');
echo $cF->displayDiv('Trạng thái', $data);
$name = 'date_start';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '16');
if ($rowDetail[$name] == 0) {
    $value = date('Y-m-d H:i', time());
} else {
    $value = date('Y-m-d H:i', $rowDetail[$name]);
}
$data = $cF->inputText($name, $value, 'ad_field adInput adTxtSmall datetimepick', $properties);
echo $cF->displayDiv('Ngày khai giảng', $data);
$name = 'date_end';
$properties = array();
$properties[] = array('propertie' => 'maxlength', 'value' => '16');
if ($rowDetail[$name] == 0) {