Example #1
0
 function do_list_group($info = array(), $info_lang = array())
 {
     global $ttH;
     $data = array('title' => $info_lang['title']);
     $arr_in = array('link_action' => $ttH->site->get_link('service', $info_lang['friendly_link']), 'where' => " and find_in_set('" . $info['group_id'] . "',group_nav)>0", 'temp' => 'list_item');
     switch ($info['type_show']) {
         case "list_item":
             $arr_in['temp'] = "list_item";
             $data['content'] = html_list_item($arr_in);
             break;
         case "grid_item":
             $arr_in['temp'] = "grid_item";
             $arr_in['pic_w'] = 200;
             $arr_in['pic_h'] = 200;
             $arr_in['num_row'] = 4;
             if ($info['num_show'] > 0) {
                 $arr_in['num_show'] = $info['num_show'];
             }
             $arr_in['short_len'] = 200;
             $data['content'] = html_list_item($arr_in);
             break;
         case "go_item":
             //Go to detail
             $result = $ttH->db->query("select friendly_link \n\t\t\t\t\t\t\t\t\t\t\tfrom service \n\t\t\t\t\t\t\t\t\t\t\twhere is_show=1 \n\t\t\t\t\t\t\t\t\t\t\tand lang='" . $ttH->conf['lang_cur'] . "' \n\t\t\t\t\t\t\t\t\t\t\tand find_in_set('" . $ttH->conf['cur_group'] . "',group_nav) \n\t\t\t\t\t\t\t\t\t\t\torder by show_order desc, date_create desc\n\t\t\t\t\t\t\t\t\t\t\tlimit 0,1");
             if ($row = $ttH->db->fetch_row($result)) {
                 $ttH->html->redirect_rel($ttH->site->get_link($this->modules, '', $row['friendly_link']));
             }
             //End
             break;
         case "content_only":
             $data['content'] = $info_lang['content'];
             break;
         default:
             $arr_in['where'] .= " and a.group_id!='" . $info['group_id'] . "'";
             $data['content'] = html_list_group($arr_in);
             if ($data['content']) {
             } else {
                 $arr_in['where'] = " and find_in_set('" . $info['group_id'] . "',group_nav)>0";
                 $arr_in['temp'] = "list_item";
                 $data['content'] = html_list_item($arr_in);
             }
             break;
     }
     $ttH->temp_box->assign('data', $data);
     $ttH->temp_box->parse("box_main");
     return $ttH->temp_box->text("box_main");
 }
Example #2
0
 function do_list_group($info = array(), $info_lang = array())
 {
     global $ttH;
     $arr_in = array('link_action' => $ttH->site->get_link('news', $info_lang['friendly_link']), 'where' => " and find_in_set('" . $info['group_id'] . "',group_nav)>0", 'temp' => 'list_item');
     $data = array('content' => html_list_item($arr_in), 'title' => $info_lang['title']);
     $ttH->temp_box->assign('data', $data);
     $ttH->temp_box->parse("box_main");
     return $ttH->temp_box->text("box_main");
 }
Example #3
0
 function do_list_group($info = array(), $info_lang = array())
 {
     global $ttH;
     $arr_in = array('link_action' => $ttH->site->get_link('product', $info_lang['friendly_link']), 'where' => " and ( \n\t\t\t\t\t\t\t\t\t\tfind_in_set('" . $info['group_id'] . "',group_nav)>0 \n\t\t\t\t\t\t\t\t\t\tor find_in_set('" . $info['group_id'] . "',group_related)>0 \n\t\t\t\t\t\t\t\t\t)", 'temp' => 'list_item', 'num_row' => 3, 'pic_w' => 300, 'pic_h' => 300);
     if ($info['group_id'] == 15) {
         $arr_in['where'] = " and price>price_buy and price_buy>0 ";
     }
     //return html_list_item($arr_in);
     $data = array('content' => html_list_item($arr_in), 'title' => $info_lang['title']);
     $ttH->temp_box->assign('data', $data);
     $ttH->temp_box->parse("box_main");
     return $ttH->temp_box->text("box_main");
 }
Example #4
0
 function do_list_group($info = array(), $info_lang = array())
 {
     global $ttH;
     $data = array('title' => $info_lang['title']);
     $arr_in = array('link_action' => $ttH->site->get_link('page', $info_lang['friendly_link']), 'where' => " and find_in_set('" . $info['group_id'] . "',group_nav)>0", 'temp' => 'list_item');
     switch ($info['type_show']) {
         case "list_item":
             $arr_in['temp'] = "list_item";
             $data['content'] = html_list_item($arr_in);
             break;
         case "grid_item":
             $arr_in['temp'] = "grid_item";
             $arr_in['pic_w'] = 200;
             $arr_in['pic_h'] = 200;
             $arr_in['num_row'] = 4;
             if ($info['num_show'] > 0) {
                 $arr_in['num_show'] = $info['num_show'];
             }
             $arr_in['short_len'] = 200;
             $data['content'] = html_list_item($arr_in);
             break;
         case "content_only":
             $data['content'] = $info_lang['content'];
             break;
         default:
             $arr_in['where'] .= " and group_id!='" . $info['group_id'] . "'";
             $data['content'] = html_list_group($arr_in);
             if ($data['content']) {
             } else {
                 $arr_in['where'] = " and find_in_set('" . $info['group_id'] . "',group_nav)>0";
                 $arr_in['temp'] = "list_item";
                 $data['content'] = html_list_item($arr_in);
             }
             break;
     }
     $ttH->temp_box->assign('data', $data);
     $ttH->temp_box->parse("box_main");
     return $ttH->temp_box->text("box_main");
 }
Example #5
0
 function do_list($type = 'new')
 {
     global $ttH;
     $arr_in = array('link_action' => $ttH->site->get_link('product'), 'where' => '', 'temp' => 'list_item', 'num_row' => 3, 'pic_w' => 300, 'pic_h' => 300, 'paginate' => 0);
     //return html_list_item($arr_in);
     $data = array('title' => $ttH->lang['home']['product_' . $type]);
     if ($type == 'focus') {
         $arr_in['where'] = " and is_focus=1";
     }
     $data['content'] = html_list_item($arr_in);
     return $ttH->html->temp_box('box_main', $data);
 }
Example #6
0
 function do_other($info)
 {
     global $ttH;
     $arr_in = array('link_action' => $ttH->site->get_link('product'), 'where' => " and a.item_id!='" . $info['item_id'] . "' ", 'temp' => 'list_item', 'num_list' => $ttH->setting['product']["num_order_detail"], 'paginate' => 0);
     if ($info['group_id'] > 0) {
         $arr_in['where'] .= "and ( \n\n\t\t\t\t\t\t\t\t\t\tfind_in_set('" . $info['group_id'] . "',group_nav)>0 \n\n\t\t\t\t\t\t\t\t\t\tor find_in_set('" . $info['group_id'] . "',group_related)>0 \n\n\t\t\t\t\t\t\t\t\t)";
     }
     return html_list_item($arr_in);
 }