'.$bin);?>$sql".mysql_error()); while($rs = mysql_fetch_assoc($result)){ $options[$rs[option_name]] = $rs[option_value]; } // plugin object $sql = "SELECT * \n"; $sql .= "FROM module_plugin \n"; $sql .= "WHERE plugin_active = 'yes' "; $result = mysql_query($sql)or die("
$sql
".mysql_error()); while($rs = mysql_fetch_assoc($result)){ $plugin[$rs[plugin_name]] = $rs[plugin_code]; } // share module languages $sql = "SELECT * \n"; $sql .= "FROM module_language \n"; $sql .= "WHERE lang_active = 'yes' "; $result = mysql_query($sql)or die("
$sql
".mysql_error()); while($rs = mysql_fetch_assoc($result)){ $language[$rs[lang_code]] = $rs[lang_name_2]; } if($lang != "en"){ $lang = "th"; $module = $_req[0]; }else{ $lang = $_req[0]; $module = $_req[1]; } /*$lang = $_req[0];*/ /*$module = $_req[1];*/ $urllang = '/'.$lang.'/'; if($options["sitename-$lang"]){ $options[sitename] = $options["sitename-$lang"]; } if($options["siteaddress-$lang"]){ $options[siteaddress] = $options["siteaddress-$lang"]; } if($options["sitecity-$lang"]){ $options[sitecity] = $options["sitecity-$lang"]; } if($options["sitestateprovince-$lang"]){ $options[sitestateprovince] = $options["sitestateprovince-$lang"]; } if($options["sitedescription-$lang"]){ $options[sitedescription] = $options["sitedescription-$lang"]; } if($options["sitekeywords-$lang"]){ $options[sitekeywords] = $options["sitekeywords-$lang"]; } // allow url request $sql = "SELECT * \n"; $sql .= "FROM module_menus \n"; $sql .= "WHERE menu_active = 'yes' \n"; $result = mysql_query($sql)or die("
$sql
".mysql_error()); while($rs = mysql_fetch_assoc($result)){ if($rs[menu_customlink]){ $rs[menu_slug] = $rs[menu_customlink]; } $allow_request[] = $rs[menu_slug]; } $sql = "SELECT * \n"; $sql .= "FROM module_pages_slide \n"; $result = mysql_query($sql)or die("
$sql
".mysql_error()); while($rs = mysql_fetch_assoc($result)){ if($rs[slide_name]){ $allow_request[] = $rs[slide_name]; } } $menus = main_menu(); $menus_footer = footer_menu(); // extract child menu into array $sql = "SELECT * FROM module_menus WHERE menu_parent != 0 "; $result = mysql_query($sql)or die("
$sql
".mysql_error()); while($rs = mysql_fetch_assoc($result)){ $_menus[$rs[menu_parent]][] = $rs[menu_slug]; } // variable language include("var.inc.php"); // editable mode if($_SESSION[editable] || $_COOKIE[editable]){ $editable = true; } if(in_array($module,$allow_request) == true){ $sql = "SELECT module_pages.page_id \n"; $sql .= "FROM module_menus, module_pages \n"; $sql .= "WHERE module_menus.menu_id = module_pages.menu_id \n"; $sql .= "AND (\n"; $sql .= "module_menus.menu_slug = '$module' OR module_menus.menu_customlink = '$module' \n"; $sql .= ")"; $result = mysql_query($sql)or die("
$sql
".mysql_error()); $rs = mysql_fetch_assoc($result); $content = content($rs[page_id]); $sidebar = load_sidebar(); $slide = slide($content[page_id]); /*if(($detect->isMobile() == true || $_SESSION[mobile] == true ) && $detect->isTablet() == false){ chdir("mobile"); }else{ chdir($options[theme]); }*/ chdir($options[theme]); $options[theme] = "/".str_replace($config[root],"",$options[theme]); switch($content[page_style]){ case"app"; if($content[app_load] == "module-custom"){ include($content[module_custom]); }else{ include("app-$content[app_load].php"); } break; case"clinic"; include("page_clinic.php"); break; case"promotion"; include("page_promotion.php"); break; case"contact"; include("page_contact.php"); break; case"gallery"; include("page_gallery.php"); break; case"showtoppic"; include("page_showtoppic.php"); break; case"showdoctor"; include("page_showdoctor.php"); break; case"content_menu"; include("page_content_menu.php"); break; default: include("page_content.php"); } }else{ /*if(($detect->isMobile() == true || $_SESSION[mobile] == true ) && $detect->isTablet() == false){ chdir("mobile"); }else{ chdir($options[theme]); }*/ chdir($options[theme]); $options[theme] = "/".str_replace($config[root],"",$options[theme]); $content = homepage(); $lightbox = lightbox($content[page_id]); $photos = lightbox_photo($lightbox[lightbox_id]); $slide = slide($content[page_id]); $homepage_under = homepage_under(); $sidebar = load_sidebar(); include("home.php"); } ?>