Exemplo n.º 1
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     $ttH->temp_act = new XTemplate($ttH->path_html . $this->modules . DS . $this->action . ".tpl");
     $ttH->temp_act->assign('LANG', $ttH->lang);
     $ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);
     include $this->modules . "_func.php";
     load_setting();
     $this->dir = create_folder(date("Y_m"));
     $data["link_manage"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage");
     $data["link_manage_trash"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage_trash");
     $data["link_add"] = $ttH->admin->get_link_admin($this->modules, $this->action, "add");
     $this->sub = isset($ttH->input["sub"]) ? $ttH->input["sub"] : "manage";
     switch ($this->sub) {
         default:
             $this->sub = "manage";
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_manage"];
             $data["main"] = $this->do_manage();
             break;
     }
     $data["class"] = array();
     $data["class"][$this->sub] = ' class="active"';
     $data["page_title"] = $ttH->conf["page_title"];
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("main");
     $ttH->output .= $ttH->temp_act->text("main");
 }
Exemplo n.º 2
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     $ttH->temp_act = new XTemplate($ttH->path_html . $this->modules . DS . $this->action . ".tpl");
     $ttH->temp_act->assign('LANG', $ttH->lang);
     $ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);
     $ttH->func->include_css($ttH->dir_css_global . 'excolor-master/css/excolor.css');
     $ttH->func->include_js($ttH->dir_js . 'excolor-master/prettify.js');
     $ttH->func->include_js($ttH->dir_js . 'excolor-master/jquery.excolor.js');
     $ttH->func->include_js_content("\r\r\n\t\t\tjQuery(document).ready( function(\$) {\r\r\n\t\t\t\t\$('input.color_picker').excolor({\r\r\n\t\t\t\t\troot_path: '" . $ttH->dir_css_global . "excolor-master/img/'\r\r\n\t\t\t\t});\r\r\n\t\t\t});\r\r\n\t\t");
     include $this->modules . "_func.php";
     load_setting();
     /*if(!isset($ttH->data['menu_group']['menu_header_top'])){
     			$ttH->data['menu_group']['menu_header_top'] = 'Menu đầu trang';
     		}*/
     $this->dir = create_folder(date("Y_m"));
     $this->cur_group = isset($ttH->input["group_id"]) && array_key_exists($ttH->input["group_id"], $ttH->data["menu_group"]) ? $ttH->input["group_id"] : $this->cur_group;
     $data["link_manage"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage");
     $data["link_manage_trash"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage_trash");
     $data["link_add"] = $ttH->admin->get_link_admin($this->modules, $this->action, "add", array('group_id' => $this->cur_group));
     $this->sub = isset($ttH->input["sub"]) ? $ttH->input["sub"] : "manage";
     switch ($this->sub) {
         case "add":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->action . "_" . $this->sub];
             $data["main"] = $this->do_add();
             break;
         case "edit":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->action . "_" . $this->sub];
             $data["main"] = $this->do_edit();
             break;
         case "manage_trash":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->action . "_" . $this->sub];
             $data["main"] = $this->do_manage("trash");
             break;
         default:
             $this->sub = "manage";
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->action . "_manage"];
             $data["main"] = $this->do_manage();
             break;
     }
     $data["class"] = array();
     $data["class"][$this->sub] = ' class="active"';
     $data["page_title"] = $ttH->conf["page_title"];
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("main");
     $ttH->output .= $ttH->temp_act->text("main");
 }
Exemplo n.º 3
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     $ttH->temp_act = new XTemplate($ttH->path_html . $this->modules . DS . $this->action . ".tpl");
     $ttH->temp_act->assign('LANG', $ttH->lang);
     $ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);
     include $this->modules . "_func.php";
     load_setting();
     $fun = isset($ttH->get['f']) ? $ttH->get['f'] : '';
     switch ($fun) {
         case "add_menu":
             $ttH->output = $this->do_add_menu();
             break;
         default:
             die('Access denied');
             break;
     }
 }
Exemplo n.º 4
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     $ttH->temp_act = new XTemplate($ttH->path_html . $this->modules . DS . $this->action . ".tpl");
     $ttH->temp_act->assign('LANG', $ttH->lang);
     $ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);
     $ttH->func->include_js($ttH->dir_temp . 'js/' . $this->modules . '/' . $this->action . ".js");
     include $this->modules . "_func.php";
     load_setting();
     $this->dir = create_folder(date("Y_m"));
     $this->cur_group = isset($ttH->input["group_id"]) && array_key_exists($ttH->input["group_id"], $ttH->data["banner_group"]) ? $ttH->input["group_id"] : $this->cur_group;
     $data["link_manage"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage", array('group_id' => $this->cur_group));
     $data["link_manage_trash"] = $ttH->admin->get_link_admin($this->modules, $this->action, "manage_trash", array('group_id' => $this->cur_group));
     $data["link_add"] = $ttH->admin->get_link_admin($this->modules, $this->action, "add", array('group_id' => $this->cur_group));
     $this->sub = isset($ttH->input["sub"]) ? $ttH->input["sub"] : "manage";
     switch ($this->sub) {
         case "add":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_" . $this->sub];
             $data["main"] = $this->do_add();
             break;
         case "edit":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_" . $this->sub];
             $data["main"] = $this->do_edit();
             break;
         case "manage_trash":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_" . $this->sub];
             $data["main"] = $this->do_manage("trash");
             break;
         default:
             $this->sub = "manage";
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_manage"];
             $data["main"] = $this->do_manage();
             break;
     }
     $data["class"] = array();
     $data["class"][$this->sub] = ' class="active"';
     $data["page_title"] = $ttH->conf["page_title"];
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("main");
     $ttH->output .= $ttH->temp_act->text("main");
 }
Exemplo n.º 5
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     include $this->modules . "_func.php";
     load_setting();
     $fun = isset($ttH->post['f']) ? $ttH->post['f'] : '';
     flush();
     switch ($fun) {
         case "add_to_menu":
             echo $this->do_add_to_menu();
             exit;
             break;
         default:
             echo '';
             exit;
             break;
     }
     exit;
 }
Exemplo n.º 6
0
 /**
  * function sMain ()
  * Khoi tao 
  **/
 function sMain_sub()
 {
     global $ttH;
     $ttH->func->load_language_admin($this->modules);
     $ttH->temp_act = new XTemplate($ttH->path_html . $this->modules . DS . $this->action . ".tpl");
     $ttH->temp_act->assign('LANG', $ttH->lang);
     $ttH->temp_act->assign('DIR_IMAGE', $ttH->dir_images);
     require_once "modules/" . $this->modules . "/" . $this->modules . "_func.php";
     load_setting();
     require_once "modules/" . $this->modules . "/" . $this->action . "_func.php";
     load_setting_ordering();
     $data["link_manage"] = $ttH->admin->get_link_admin($this->modules_call, $this->action, "manage");
     $data["link_manage_trash"] = $ttH->admin->get_link_admin($this->modules_call, $this->action, "manage_trash");
     $data["link_add"] = $ttH->admin->get_link_admin($this->modules_call, $this->action, "add");
     $this->sub = isset($ttH->input["sub"]) ? $ttH->input["sub"] : "manage";
     switch ($this->sub) {
         case "edit":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_" . $this->sub];
             $data["main"] = $this->do_edit();
             break;
         case "manage_trash":
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_" . $this->sub];
             $data["main"] = $this->do_manage("trash");
             break;
         default:
             $this->sub = "manage";
             $ttH->conf["page_title"] = $ttH->lang[$this->modules][$this->modules . "_manage"];
             $data["main"] = $this->do_manage();
             break;
     }
     $data["class"] = array();
     $data["class"][$this->sub] = ' class="active"';
     $data["page_title"] = $ttH->conf["page_title"];
     $ttH->temp_act->assign('data', $data);
     $ttH->temp_act->parse("main");
     $ttH->output .= $ttH->temp_act->text("main");
 }
Exemplo n.º 7
0
{
    global $ttH;
    $ttH->setting = isset($ttH->setting) ? $ttH->setting : array();
    if (!isset($ttH->setting['user'])) {
        $ttH->setting['user'] = array();
        $result = $ttH->db->query("select * from user_setting ");
        if ($row = $ttH->db->fetch_row($result)) {
            $ttH->setting['user_' . $row['lang']] = $row;
            if ($ttH->conf['lang_cur'] == $row['lang']) {
                $ttH->setting['user'] = $row;
            }
        }
    }
    return true;
}
load_setting();
$nts = new sMain();
class sMain
{
    var $modules = "user";
    var $action = "ajax";
    /**
     * function sMain ()
     * Khoi tao 
     **/
    function sMain()
    {
        global $ttH;
        $ttH->func->load_language($this->modules);
        $fun = isset($ttH->post['f']) ? $ttH->post['f'] : '';
        flush();