?
Path : /home/admin/domains/happytokorea.com/private_html/modules-bak/blog/ |
Current File : /home/admin/domains/happytokorea.com/private_html/modules-bak/blog/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; } default: $header_name=Array( 'ContentName'=> "ชื่อ", 'ContentBlog'=> "ผู้เขียน", 'ContentPublic'=> "อนุญาต", ); $header_td_width=Array('57%','19%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=content"; $topic->setLimit(20); $topic->setPage(); $topic->total_links(9); echo "<div style=\"text-align:left;\">"; if ($_SESSION["la"] == 1){ echo $topic->listData($table='contents',$condition='CatID = 135',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); }else{ echo $topic->listData($table='contents_en',$condition='CatID = 135',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); } echo "</div>"; break; case idx_list: $header_name=Array( 'contents_photo.picture'=> "รูปภาพ", 'contents.ContentName'=> "ชื่อ บทความ", ); $header_td_width=Array('20%','80%'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=content&ac=idx_list"; $topic->setLimit(20); $topic->setPage(); $topic->total_links(9); echo "<div style=\"text-align:left;\">"; echo $topic->listData_idx_list($table=' contents INNER JOIN contents_recommend ON (contents.ContentID = contents_recommend.ContentID) INNER JOIN contents_photo ON (contents.ContentID = contents_photo.ContentID) order by contents_photo.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_topic.php'); break; } case add_data;{ $article_n->add_topic(); break; } case add_data_con;{ $article_n->add_data_con(); break; } case delete_photo_gallery;{ $article_n->delete_photo_gallery(); break; } case edit_data_con;{ $article_n->edit_data_con(); break; } case edit_data_do;{ $topic_id=$_POST['topic_id']; $article_n->edit_topic($topic_id); break; } case edit_data_public;{ $topic_id=$_GET['topic_id']; $article_n->edit_public($topic_id); break; } case del_data;{ $article_n->del_topic(); break; } case de_photo;{ $article_n->de_photo(); break; } case de_pdf;{ $article_n->de_pdf(); break; } case view_user;{ require_once('com_user.php'); require_once('com_menu.php'); require_once('com_category_user.php'); require_once('function_user.php'); $listgroup=new category(); $member=new members(); echo msg_feedback(); $header_name=Array( 'user_login'=> "User Login", 'user_email'=> "Email", 'user_name'=>'Name', 'user_type'=> "Group", 'nickname'=>"ชื่อแสดงหน้าเขียนรีวิว", 'user_last_visit_time'=>"Last visit date", ); $header_td_width=Array('100','150','150','80','80','150','150'); $orderby=$_GET['orderby']; $sort=$_GET['sort']; if($sort==""){$sort="Max2Min";} $chksort=$_GET['chksort']; $link="admin.php?mod=blog"; $member->setLimit(20); $member->setPage(); $member->total_links(9); echo $member->listData($table='users',$condition='where user_type=3',$orderby,$sort,$chksort,$header_name,$header_td_width,$link); break; } case edit_user;{ require_once('com_user.php'); require_once('com_category_user.php'); require_once('function_user.php'); require_once('com_edit_user.php'); break; } case edit_user_do;{ $user->edit_user(); break; } case del_user;{ $user->del_user(); break; } }//end switch ?>