?
Path : /home/admin/domains/happytokorea.com/public_html/backend/ |
Current File : /home/admin/domains/happytokorea.com/public_html/backend/admin.php |
<? session_start(); require_once('../config.php'); require_once('../libs/global.php'); require_once('../libs/MySql.php'); require_once('../libs/function.php'); require_once('../libs/backoff_ajax.php'); require_once('../libs/backoff.php'); require_once('../libs/menuTree.php'); require_once('modules/users/mod_user.php'); require_once('../libs/xajax/xajax.inc.php'); require_once('../libs/xajax/xajaxExtend.php'); if($user_login['ID']==''){ header("Location: index.php"); } if(!isset($backoff)){ $_SESSION["backoff"]; } if((!isset($_GET['la'])) && (!isset($_SESSION['la']))){ $_SESSION["la"] = 1; } if($_GET['la'] == 1){ $_SESSION["la"] = 1; }elseif($_GET['la'] == 2){ $_SESSION["la"] = 2; } $user=new user(); $db=new MySql; //$xajax = new xajax(); $xajax = new xajaxExtend; //$user->Initial(); /* Ajax Operator */ // Ajax switch($_GET['mod']){ case content: require_once('modules/content/Content.server.php'); break; case banner: require_once('modules/banner/Content.server.php'); break; case tour: require_once('modules/tour/content.server.php'); break; case advertise: require_once('modules/advertise/Content.server.php'); break; case goods: require_once('modules/goods/Content.server.php'); break; case gallery: require_once('modules/gallery/content.server.php'); break; } $xajax->processRequests(); //user function ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <TITLE><? echo $cfg['site_name'];?></TITLE> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"> <link href="css/main.css" rel="stylesheet" type="text/css" /> <link href="css/test.css" rel="stylesheet" type="text/css" /> <link href="https://fonts.googleapis.com/css?family=Cuprum" rel="stylesheet" type="text/css" /> <script src="js/jquery-1.4.4.js" type="text/javascript"></script> <script type="text/javascript" src="js/spinner/jquery.mousewheel.js"></script> <script type="text/javascript" src="js/spinner/ui.spinner.js"></script> <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js"></script> <script type="text/javascript" src="js/fileManager/elfinder.min.js"></script> <script type="text/javascript" src="js/wysiwyg/jquery.wysiwyg.js"></script> <script type="text/javascript" src="js/wysiwyg/wysiwyg.image.js"></script> <script type="text/javascript" src="js/wysiwyg/wysiwyg.link.js"></script> <script type="text/javascript" src="js/wysiwyg/wysiwyg.table.js"></script> <script type="text/javascript" src="js/dataTables/jquery.dataTables.js"></script> <script type="text/javascript" src="js/dataTables/colResizable.min.js"></script> <script type="text/javascript" src="js/forms/forms.js"></script> <script type="text/javascript" src="js/forms/autogrowtextarea.js"></script> <script type="text/javascript" src="js/forms/autotab.js"></script> <script type="text/javascript" src="js/forms/jquery.validationEngine-en.js"></script> <script type="text/javascript" src="js/forms/jquery.validationEngine.js"></script> <script type="text/javascript" src="js/colorPicker/colorpicker.js"></script> <script type="text/javascript" src="js/uploader/plupload.js"></script> <script type="text/javascript" src="js/uploader/plupload.html5.js"></script> <script type="text/javascript" src="js/uploader/plupload.html4.js"></script> <script type="text/javascript" src="js/uploader/jquery.plupload.queue.js"></script> <script type="text/javascript" src="js/ui/progress.js"></script> <script type="text/javascript" src="js/ui/jquery.jgrowl.js"></script> <script type="text/javascript" src="js/ui/jquery.tipsy.js"></script> <script type="text/javascript" src="js/ui/jquery.alerts.js"></script> <script type="text/javascript" src="js/jBreadCrumb.1.1.js"></script> <script type="text/javascript" src="js/cal.min.js"></script> <script type="text/javascript" src="js/jquery.collapsible.min.js"></script> <script type="text/javascript" src="js/jquery.ToTop.js"></script> <script type="text/javascript" src="js/jquery.listnav.js"></script> <script type="text/javascript" src="js/jquery.sourcerer.js"></script> <script type="text/javascript" src="js/custom.js"></script> <SCRIPT language="JavaScript" src="js/function.js"></SCRIPT> <SCRIPT language="JavaScript" src="js/CalendarPopup.js"></SCRIPT> <SCRIPT language="JavaScript" src="js/backend_function.js"></SCRIPT> <SCRIPT language="JavaScript" src="js/global.js"></SCRIPT> <SCRIPT language="JavaScript" src="js/checkdate.js"></SCRIPT> <SCRIPT language="JavaScript" src="js/cookies.js"></SCRIPT> <?php $xajax->printJavascript('../libs/xajax'); ?> </HEAD> <body> <!-- Top navigation bar --> <div id="topNav"> <div class="fixed"> <? ?> <div class="wrapper"> <div class="welcome"><a href="<? echo "$PHPSELF?mod=profile";?>"> <? $photo_user=$db->getDataOneRow('user_profile',$user_login['ID'],'user_id'); if($photo_user[photo]==''){ ?> <img src="images/userPic.png" alt="" width="22" height="20" border="0" /> <? }else{ ?> <img src="images/<?=$photo_user[photo];?>" width="22" height="20" alt="" border="0" /> <? } ?> </a><span><a href="<? echo "$PHPSELF?mod=profile";?>" style="color:#FFFFFF"><?=$user_login['Name']?></a></span></div> <div class="userNav"> <ul> <? if($user_login['ID']==1 ||$user_login['Type']=='1'){ ?> <li><a href="<? echo "$PHPSELF?mod=user";?>" title=""><span>เพิ่มผู้ใช้</span></a></li> <li><a href="<? echo "$PHPSELF?mod=blog";?>" title=""><span>จัดการรีวิว</span></a></li> <li><a href="admin.php" title=""><span>แก้ไขข้อมูลส่วนตัว</span></a></li> <li><a href="<? echo "$PHPSELF?mod=banner";?>" title=""><span>จัดการสไลด์แบนเนอร์</span></a></li> <li><a href="<? echo "$PHPSELF?mod=tour";?>" title=""><span>จัดการโปรแกรมทัวร์</span></a></li> <li><a href="<? echo "$PHPSELF?mod=content";?>" title=""><span>จัดการบทความ</span></a></li> <li><a href="<? echo "$PHPSELF?mod=gallery";?>" title=""><span>จัดการ Gallery</span></a></li> <li><a href="<? echo "$PHPSELF?mod=advertise";?>" title=""><span>จัดการ E-mail</span></a></li> <?php /*?> <li><span>ภาษาที่เลือก <? if ($_SESSION["la"] == 1){ echo "TH"; }else{ echo "EN"; } ?></span> <ul> <li><a href="<? echo "$PHPSELF?la=1";?>" title="">ภาษาไทย (TH)</a></li> <li><a href="<? echo "$PHPSELF?la=2";?>" title="">ภาษาอังกฤษ (EN)</a></li> </ul> </li><?php */?> <? }elseif($user_login['ID']==3 ||$user_login['Type']=='3'){ ?> <li><a href="admin.php" title=""><span>แก้ไขข้อมูลส่วนตัว</span></a></li> <li><a href="<? echo "$PHPSELF?mod=content";?>" title=""><span>จัดการบทความ</span></a></li> <? }else{ ?> <li><a href="admin.php" title=""><span>แก้ไขข้อมูลส่วนตัว</span></a></li> <li><a href="<? echo "$PHPSELF?mod=banner";?>" title=""><span>จัดการสไลด์แบนเนอร์</span></a></li> <li><a href="<? echo "$PHPSELF?mod=tour";?>" title=""><span>จัดการโปรแกรมทัวร์</span></a></li> <li><a href="<? echo "$PHPSELF?mod=content";?>" title=""><span>จัดการบทความ</span></a></li> <li><a href="<? echo "$PHPSELF?mod=gallery";?>" title=""><span>จัดการ Gallery</span></a></li> <li><a href="<? echo "$PHPSELF?mod=advertise";?>" title=""><span>จัดการ E-mail</span></a></li> <?php /*?> <li><span>ภาษาที่เลือก <? if ($_SESSION["la"] == 1){ echo "TH"; }else{ echo "EN"; } ?></span> <ul> <li><a href="<? echo "$PHPSELF?la=1";?>" title="">ภาษาไทย (TH)</a></li> <li><a href="<? echo "$PHPSELF?la=2";?>" title="">ภาษาอังกฤษ (EN)</a></li> </ul> </li><?php */?> <? } ?> <li><a href="<? echo "$PHPSELF?mod=logout";?>"><img src="images/icons/topnav/logout.png" alt="" /><span>Logout</span></a></li> </ul> </div> <? ?> <div class="fix"></div> </div> </div> </div> <!-- Header -- <!-- Main wrapper --> <div class="wrapper"> <p> <!-- Left navigation --> <!-- Content --> <?php //php $mod=$_GET['mod']; switch($mod){ case member: require_once('modules/member/function.php'); require_once('modules/member/action.php'); break; case blog: //require_once('modules/blog/function.php'); require_once('modules/blog/action.php'); break; case gallery: require_once('modules/gallery/function.php'); require_once('modules/gallery/action.php'); break; case user: require_once('modules/users/action.php'); break; case profile: require_once('modules/profile/action.php'); break; case content: require_once('modules/content/function.php'); require_once('modules/content/action.php'); break; case banner: require_once('modules/banner/function.php'); require_once('modules/banner/action.php'); break; case advertise: require_once('modules/advertise/function.php'); require_once('modules/advertise/action.php'); break; case tour: require_once('modules/tour/function.php'); require_once('modules/tour/action.php'); break; case goods: require_once('modules/goods/function.php'); require_once('modules/goods/action.php'); break; case logout: $user->logout(); break; default: require_once('modules/profile/action.php'); break; } ?> </p> <div class="fix"></div> </div> <!-- Footer --> <div id="footer"> <div class="wrapper"> <span>© Copyright 2016. All rights reserved. happytokorea admin</span> </div> </div> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript"> $(function(){ // เมื่อเปลี่ยนค่าของ select id เท่ากับ list1 $("select#parent").change(function(){ // ส่งค่า ตัวแปร list1 มีค่าเท่ากับค่าที่เลือก ส่งแบบ get ไปที่ไฟล์ data_for_list2.php $.get("data_for_list2.php",{ parent:$(this).val() },function(data){ // คืนค่ากลับมา $("select#parent_2").html(data); // นำค่าที่ได้ไปใส่ใน select id เท่ากับ list2 $("select#parent_2").trigger("change"); // อัพเดท list2 เพื่อให้ list2 ทำงานสำหรับรีเซ็ตค่า }); }); // เมื่อเปลี่ยนค่าของ select id เท่ากับ list2 $("select#parent_2").change(function(){ // ส่งค่า ตัวแปร list2 มีค่าเท่ากับค่าที่เลือก ส่งแบบ get ไปที่ไฟล์ data_for_list3.php $.get("data_for_list3.php",{ parent_2:$(this).val() },function(data){ // คืนค่ากลับมา $("select#parent_3").html(data); // นำค่าที่ได้ไปใส่ใน select id เท่ากับ list3 $("select#parent_3").trigger("change"); // อัพเดท list3 เพื่อให้ list3 ทำงานสำหรับรีเซ็ตค่า }); }); }); </script> </body> </html>