?
Path : /home/admin/domains/happytokorea.com/public_html/modules/gallery/ |
Current File : /home/admin/domains/happytokorea.com/public_html/modules/gallery/action.php |
<?php require_once('com_article.php'); require_once('mod_article.php'); require_once('mod_article_n.php'); require_once('com_topic.php'); $topic=new topic(); $article=new article(); $article_n=new article_n(); $Html=new Html(); echo $Html->menu(); if($_GET['msg']!=""){echo msg_feedback($_GET['msg']);} switch($_GET['ac']){ case edit;{ echo $Html->Edit(); break; } case new_data;{ require_once('com_new_photo1.php'); break; } case new_data_name_photo;{ require_once('com_new_photo_show.php'); break; } default: $header_name=Array( 'picture'=> "รูปภาพ", 'name_gallery'=> "ชื่อ Gallery", ); $header_td_width=Array('19%','57%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=gallery"; $topic->setLimit(20); $topic->setPage(); $topic->total_links(9); echo "<div style=\"text-align:left;\">"; if ($_SESSION["la"] == 1){ echo $topic->listData($table='gallery',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); }else{ echo $topic->listData($table='gallery_en',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); } echo "</div>"; break; case idx_list: $header_name=Array( 'gallery_phote.picture'=> "รูปภาพ", 'gallery.name_gallery'=> "ชื่อ Gallery", ); $header_td_width=Array('20%','80%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=gallery&ac=idx_list"; $topic->setLimit(20); $topic->setPage(); $topic->total_links(9); echo "<div style=\"text-align:left;\">"; if ($_SESSION["la"] == 1){ echo $topic->listData_idx_list($table=' gallery INNER JOIN gallery_recommend ON (gallery.id_g = gallery_recommend.id_g) INNER JOIN gallery_phote ON (gallery.id_g = gallery_phote.id_g) order by gallery_phote.id_p DESC ',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); }else{ echo $topic->listData_idx_list($table=' gallery_en INNER JOIN gallery_recommend_en ON (gallery_en.id_g = gallery_recommend_en.id_g) INNER JOIN gallery_phote_en ON (gallery_en.id_g = gallery_phote_en.id_g) order by gallery_phote_en.id_p DESC ',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); } echo "</div>"; break; case idx_list2: $header_name=Array( 'gallery_phote.picture'=> "รูปภาพ", 'gallery.name_gallery'=> "ชื่อ Gallery", ); $header_td_width=Array('20%','80%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=gallery&ac=idx_list2"; $topic->setLimit(20); $topic->setPage(); $topic->total_links(9); echo "<div style=\"text-align:left;\">"; if ($_SESSION["la"] == 1){ echo $topic->listData_idx_list2($table=' gallery INNER JOIN gallery_recommend_2 ON (gallery.id_g = gallery_recommend_2.id_g) INNER JOIN gallery_phote ON (gallery.id_g = gallery_phote.id_g) order by gallery_phote.id_p DESC ',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); }else{ echo $topic->listData_idx_list2($table=' gallery_en INNER JOIN gallery_recommend_2_en ON (gallery_en.id_g = gallery_recommend_2_en.id_g) INNER JOIN gallery_phote_en ON (gallery_en.id_g = gallery_phote_en.id_g) order by gallery_phote_en.id_p DESC ',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); } echo "</div>"; break; /* case new_data;{ require_once('com_new_topic.php'); break; }*/ case edit_data;{ require_once('com_edit_photo_show.php'); break; } /* case cadit_card;{ require_once('com_topic_card.php'); $topic_card=new topic_card(); $header_name=Array( 'name'=> "ชื่อ", 'picture'=> "รูปภาพ", ); $header_td_width=Array('57%','19%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=tour"; $topic_card->setLimit(20); $topic_card->setPage(); $topic_card->total_links(9); echo "<div style=\"text-align:left;\">"; echo $topic_card->listData($table='cadit_card',$condition='',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); echo "</div>"; break; } case add_data;{ $article->add_topic(); break; } //add view case edit_data_do;{ $topic_id=$_POST['topic_id']; $article->edit_topic($topic_id); break; }*/ case add_gallery;{ $article_n->add_gallery(); break; } case del_data;{ $article_n->del_topic(); break; } case delete_photo_gallery;{ $article_n->delete_photo_gallery(); break; } case edit_gallery;{ $article_n->edit_gallery(); break; } case setActive;{ $article->setActive(); break; } /*case add_data_credit;{ require_once('com_new_credit.php'); break; } case edit_data_credit;{ require_once('com_edit_credit.php'); break; } case view_cat;{ require_once('manage_group.php'); break; } case del_pdf: $article->del_pdf(); break; case del_rar: $article->del_rar(); break;*/ }//end switch ?>