//
// //
// "; // exit(); // } // // // function myok($message,$link){ // echo "onclick=\"if (confirm('$message')) location.href='$link' \""; // } // // function check_page(){ // global $page; // echo "$page"; // } // // function foldersize( $path ) // { // $size = 0; // if( $dir = @opendir( $path )) { // while(($file = readdir($dir)) !== false ) { // if( is_dir( "$path/$file" ) && $file != '.' && $file != '..' ) { // $size += foldersize( "$path/$file" ); // } // if( is_file( "$path/$file" )) { // $size += filesize( "$path/$file" ); // } // } // closedir($dir); // } // return $size; // } // // function for_active_member ($member_status,$content_id){ // // echo "$member_status - $content_id"; // if(($member_status == "")or($member_status == "0")){ // $page_content = db_quick("SELECT page_title,page_detail FROM page WHERE page_id = '$content_id' "); // alertbox($page_content['page_detail'],"30","module.php?module=welcome"); // // } // } // // เอาไว้สำหรั บบวก ลบ เวลา // function dateEStime($theDay,$theMonth,$theYear) { // return mktime(0,0,0,$theMonth,$theDay,$theYear); // } // // function trans_date($dd, $mm, $yy){ // //$d1=dateEStime($dd[2], $dd[1], $dd[0]); //1 มกราคม คศ.2000 (ต้องเป็น คศ เท่านั้น) // $dexp=dateEStime($dd, $mm, $yy); //2 มกราคม คศ.2000 // // $dnow = date("d-m-Y"); // $d_now = explode("-",$dnow); // $dnow=dateEStime($d_now[0], $d_now[1], $d_now[2]); //2 มกราคม คศ.2000 // // $offset=$dexp-$dnow; // return $days=floor($offset/60/60/24); //แปลงเป็นจำนวนวัน // // } // // function add_date($givendate,$day=0,$mth=0,$yr=0) { // สุดยอดฟังก์ชั่น บวกเวลา // $cd = strtotime($givendate); // $newdate = date('Y-m-d', mktime(date('h',$cd), // date('i',$cd), date('s',$cd), date('m',$cd)+$mth, // date('d',$cd)+$day, date('Y',$cd)+$yr)); // return $newdate; // } // // //สำหรับ + เดือนหมดอายุ // /* // $n=1; // จำนวนเดือน // $y=2011; // $m=03; // $d=30; // $t="+"; // + คือบวกเดือน - คือลบเดือน แต่พบว่าลบเดือน มีนา ลงมา กพ. จำนวนวันจะผิด แต่ + ใช้งานได้ดี // echo $rr=NewMonthDate($n,$y,$m,$d,$t); // */ // // function NewMonthDate($n,$y,$m,$d,$t) // { // // for($i=1; $i <= $n; $i++) // { // if($t=="+") // { // $pmonth=$m+$i; // } // if($t=="-") // { // $pmonth=$m-$i; // } // // $pyear=$y; // $aa=1; // // // /////////////////this will show lastmonth////////////// // $lastmonth = mktime(0, 0, 0, $pmonth, $aa, $pyear); // // $smonth=date("m",$lastmonth); // $syear=date("Y",$lastmonth); // $ndays=date("t",$lastmonth); // $valarray=array($smonth,$syear,$ndays); // // $mm=$mm+$ndays; // // } // // $basedate="$pyear-$m-$d"; // $date2 = strtotime("$basedate $t$mm days"); // // $date1=date("Y-m-d",$date2); // return $date1; // // } // // if (preg_match("/function_component.php/i", $_SERVER['PHP_SELF'])) { Header("Location: ../index.php"); die(); } // // // function permission($menu_id,$opt,$var_user_id){ // // if($var_user_id == 1){ $per_num =1; }else{ // $per_num = db_num("SELECT * FROM `user_permission` WHERE `user_id` = '$var_user_id' AND `permission` LIKE '%#$menu_id#%'"); // } // //echo $menu_id; // if($per_num){ // switch($opt){ // case "select": echo "checked=\"checked\""; break; // case "": return 1; break; // } // }else{ // switch($opt){ // case "select": echo ""; break; // case "": return 0; break; // } // // } // } // // function page_navigator($before_p,$plus_p,$total,$total_p,$chk_page,$morelink){ // global $urlquery_str,$module,$pg; // $pPrev=$chk_page-1; // $pPrev=($pPrev>=0)?$pPrev:0; // $pNext=$chk_page+1; // $pNext=($pNext>=$total_p)?$total_p-1:$pNext; // $lt_page=$total_p-4; // // echo "
"; // เติมเพิ่มเพื่อให้เป็น ul li // } // // function page_navi($before_p,$plus_p,$total,$total_p,$chk_page,$morelink){ // global $module,$pg,$id,$cur,$ope; // $link = "index.php?cur=$cur&ope=$ope&module=$module&pg=$pg&p="; // $pPrev=$chk_page-1; // $pPrev=($pPrev>=0)?$pPrev:0; // $pNext=$chk_page+1; // $pNext=($pNext>=$total_p)?$total_p-1:$pNext; // $lt_page=$total_p-4; // if($chk_page>0){ // // echo "«"; // } // if($total_p>=11){ // if($chk_page>=4){ // echo "1. . ."; // } // if($chk_page<4){ // for($i=0;$i<$total_p;$i++){ // $nClass=($chk_page==$i)?"class='selectPage'":""; // if($i<=4){ // echo "".intval($i+1)." "; // } // if($i==$total_p-1 ){ // echo ". . .".intval($i+1)." "; // } // } // } // if($chk_page>=4 && $chk_page<$lt_page){ // $st_page=$chk_page-3; // for($i=1;$i<=5;$i++){ // $nClass=($chk_page==($st_page+$i))?"class='selectPage'":""; // echo "".intval($st_page+$i+1)." "; // } // for($i=0;$i<$total_p;$i++){ // if($i==$total_p-1 ){ // $nClass=($chk_page==$i)?"class='selectPage'":""; // echo ". . .".intval($i+1)." "; // } // } // } // if($chk_page>=$lt_page){ // for($i=0;$i<=4;$i++){ // $nClass=($chk_page==($lt_page+$i-1))?"class='selectPage'":""; // echo "".intval($lt_page+$i)." "; // } // } // }else{ // for($i=0;$i<$total_p;$i++){ // $nClass=($chk_page==$i)?"class='selectPage'":""; // echo "".intval($i+1)." "; // } // } // if($chk_page<$total_p-1){ // echo "»"; // } // } // // // function convert($number){ // $txtnum1 = array('ศูนย์','หนึ่ง','สอง','สาม','สี่','ห้า','หก','เจ็ด','แปด','เก้า','สิบ'); // $txtnum2 = array('','สิบ','ร้อย','พัน','หมื่น','แสน','ล้าน'); // $number = str_replace(",","",$number); // $number = str_replace(" ","",$number); // $number = str_replace("บาท","",$number); // $number = explode(".",$number); // if(sizeof($number)>2){ // return 'ทศนิยมหลายตัวนะจ๊ะ'; // exit; // } // $strlen = strlen($number[0]); // $convert = ''; // for($i=0;$i<$strlen;$i++){ // $n = substr($number[0], $i,1); // if($n!=0){ // if($i==($strlen-1) AND $n==1){ $convert .= 'เอ็ด'; } // elseif($i==($strlen-2) AND $n==2){ $convert .= 'ยี่'; } // elseif($i==($strlen-2) AND $n==1){ $convert .= ''; } // else{ $convert .= $txtnum1[$n]; } // $convert .= $txtnum2[$strlen-$i-1]; // } // } // $convert .= 'บาท'; // if($number[1]=='0' OR $number[1]=='00' OR $number[1]==''){ // $convert .= 'ถ้วน'; // }else{ // $strlen = strlen($number[1]); // for($i=0;$i<$strlen;$i++){ // $n = substr($number[1], $i,1); // if($n!=0){ // if($i==($strlen-1) AND $n==1){$convert .= 'เอ็ด';} // elseif($i==($strlen-2) AND $n==2){$convert .= 'ยี่';} // elseif($i==($strlen-2) AND $n==1){$convert .= '';} // else{ $convert .= $txtnum1[$n];} // $convert .= $txtnum2[$strlen-$i-1]; // } // } // $convert .= 'สตางค์'; // } // return $convert; // } // // function fb_link_product($caption,$link,$redirect_uri){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://www".$myweb['domain_name']; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // $link = "$myweb/product-$description-$link.html"; // // $myurl = "https://www.facebook.com/dialog/feed?app_id=420165251443019&display=popup&caption=$caption&link=$link&redirect_uri=http://$sub_domain.$domain_name/aff/index.php?module=share"; // // // return $myurl; // } // // function line_msg_product($caption,$link){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://$myweb[sub_domain].$myweb[domain_name]"; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace(" ","_",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // // $link = "$myweb/product-$description-$link.html"; // $link = "$myweb/product-product$link-$link.html"; // // $myurl = "$caption $link"; // // // return $myurl; // } // // function line_msg_article($caption,$link){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://$myweb[sub_domain].$myweb[domain_name]"; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace(" ","_",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // // $link = "$myweb/article_detail-$description-$link.html"; // $link = "$myweb/article_detail-article_detail$link-$link.html"; // // $myurl = "$caption $link"; // // // return $myurl; // } // // // function fb_link($caption,$link,$redirect_uri){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://$myweb[sub_domain].$myweb[domain_name]"; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // //$link = "$myweb/product-$description-$link.html"; // // $myurl = "https://www.facebook.com/dialog/feed?app_id=420165251443019&display=popup&caption=$caption&link=$link&redirect_uri=http://$sub_domain.$domain_name/aff/index.php?module=share"; // // // return $myurl; // } // // function line_msg($caption,$link){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://".$myweb['sub_domain'].$myweb['domain_name']; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace(" ","_",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // //$link = "$myweb/product-$description-$link.html"; // // $myurl = $caption." ".$link; // // // return $myurl; // } // // // function fb_link_special($caption,$link,$redirect_uri){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://".$myweb['sub_domain'].$myweb['domain_name']; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // //$link = "$myweb/product-$description-$link.html"; // // $myurl = "https://www.facebook.com/dialog/feed?app_id=420165251443019&display=popup&caption=".$caption."&link=".$link."&redirect_uri=http://".$sub_domain.$domain_name."/aff/index.php?module=share&pg=special"; // // // return $myurl; // } // // function line_msg_special($caption,$link){ // global $web_status, $web_fb, $myweb, $member_name, $redirect_to,$my_subdomain,$bis_id,$sub_domain,$domain_name; // // $myweb = db_quick("SELECT sub_domain,domain_name FROM `af_web` WHERE `member_id` LIKE '$bis_id' ORDER BY `af_web`.`id` ASC LIMIT 1"); // $myweb = "http://".$myweb['sub_domain'].$myweb['domain_name']; // // //$myweb .= $domain_name_s; // $description = $caption; // $description = str_replace("{url}",$myweb,$description); // $description = str_replace("#","%23",$description); // $description = str_replace(".","%2E",$description); // $description = str_replace("-","%2D",$description); // $description = str_replace(" ","_",$description); // $description = str_replace('"',"",$description); // $description = str_replace("{name}",$member_name,$description); // // $picture = str_replace("#","%23",$picture); // $picture = str_replace(".","%2E",$picture); // $picture = str_replace("-","%2D",$picture); // // $myurl = $myweb; // // //$link = "$myweb/product-$description-$link.html"; // // $myurl = $caption." ".$link; // // // return $myurl; // } // // class Spintax // { // public function process($text) // { // return preg_replace_callback( // '/\{(((?>[^\{\}]+)|(?R))*)\}/x', // array($this, 'replace'), // $text // ); // } // // public function replace($text) // { // $text = $this->process($text[1]); // $parts = explode('|', $text); // return $parts[array_rand($parts)]; // } // } // // function isBot() // { // $bot_regex = '/BotLink|bingbot|AhrefsBot|ahoy|AlkalineBOT|anthill|appie|arale|araneo|AraybOt|ariadne|arks|ATN_Worldwide|Atomz|bbot|Bjaaland|Ukonline|borg\-bot\/0\.9|boxseabot|bspider|calif|christcrawler|CMC\/0\.01|combine|confuzzledbot|CoolBot|cosmos|Internet Cruiser Robot|cusco|cyberspyder|cydralspider|desertrealm, desert realm|digger|DIIbot|grabber|downloadexpress|DragonBot|dwcp|ecollector|ebiness|elfinbot|esculapio|esther|fastcrawler|FDSE|FELIX IDE|ESI|fido|H�m�h�kki|KIT\-Fireball|fouineur|Freecrawl|gammaSpider|gazz|gcreep|golem|googlebot|griffon|Gromit|gulliver|gulper|hambot|havIndex|hotwired|htdig|iajabot|INGRID\/0\.1|Informant|InfoSpiders|inspectorwww|irobot|Iron33|JBot|jcrawler|Teoma|Jeeves|jobo|image\.kapsi\.net|KDD\-Explorer|ko_yappo_robot|label\-grabber|larbin|legs|Linkidator|linkwalker|Lockon|logo_gif_crawler|marvin|mattie|mediafox|MerzScope|NEC\-MeshExplorer|MindCrawler|udmsearch|moget|Motor|msnbot|muncher|muninn|MuscatFerret|MwdSearch|sharp\-info\-agent|WebMechanic|NetScoop|newscan\-online|ObjectsSearch|Occam|Orbsearch\/1\.0|packrat|pageboy|ParaSite|patric|pegasus|perlcrawler|phpdig|piltdownman|Pimptrain|pjspider|PlumtreeWebAccessor|PortalBSpider|psbot|Getterrobo\-Plus|Raven|RHCS|RixBot|roadrunner|Robbie|robi|RoboCrawl|robofox|Scooter|Search\-AU|searchprocess|Senrigan|Shagseeker|sift|SimBot|Site Valet|skymob|SLCrawler\/2\.0|slurp|ESI|snooper|solbot|speedy|spider_monkey|SpiderBot\/1\.0|spiderline|nil|suke|http:\/\/www\.sygol\.com|tach_bw|TechBOT|templeton|titin|topiclink|UdmSearch|urlck|Valkyrie libwww\-perl|verticrawl|Victoria|void\-bot|Voyager|VWbot_K|crawlpaper|wapspider|WebBandit\/1\.0|webcatcher|T\-H\-U\-N\-D\-E\-R\-S\-T\-O\-N\-E|WebMoose|webquest|webreaper|webs|webspider|WebWalker|wget|winona|whowhere|wlm|WOLP|WWWC|none|XGET|Nederland\.zoek|AISearchBot|woriobot|NetSeer|Nutch|YandexBot|YandexMobileBot|SemrushBot|FatBot|MJ12bot|DotBot|AddThis|baiduspider|SeznamBot|mod_pagespeed|CCBot|openstat.ru\/Bot|m2e/i'; // $userAgent = empty($_SERVER['HTTP_USER_AGENT']) ? FALSE : $_SERVER['HTTP_USER_AGENT']; // $isBot = !$userAgent || preg_match($bot_regex, $userAgent); // // return $isBot; // } // function big_pic($pic_name){ // $big_pic_name = str_replace("-pic","",$pic_name); // $filename = "seller/files/1/$big_pic_name"; // if (file_exists($filename)) { }else{ $big_pic_name = $pic_name; } // return $big_pic_name; // } // function DateDiff($strDate1,$strDate2){ // // return (strtotime($strDate2) - strtotime($strDate1))/ ( 60 * 60 * 24 ); // 1 day = 60*60*24 // // } // // function TimeDiff($strTime1,$strTime2){ // // return (strtotime($strTime2) - strtotime($strTime1))/ ( 60 * 60 ); // 1 Hour = 60*60 // // } // // function DateTimeDiff($strDateTime1,$strDateTime2){ // // return (strtotime($strDateTime2) - strtotime($strDateTime1))/ ( 60 * 60 ); // 1 Hour = 60*60 // // } // // function DateThai($strDate) // { // $strYear = date("Y",strtotime($strDate))+543; // $strMonth= date("n",strtotime($strDate)); // $strDay= date("j",strtotime($strDate)); // $strHour= date("H",strtotime($strDate)); // $strMinute= date("i",strtotime($strDate)); // $strSeconds= date("s",strtotime($strDate)); // $strMonthCut = Array("","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); // $strMonthThai=$strMonthCut[$strMonth]; // //return "$strDay $strMonthThai $strYear, $strHour:$strMinute"; // return $strDay." ".$strMonthThai." ".$strYear; // } // function DateThai2($strDate) // { // $strYear = date("Y",strtotime($strDate))+543; // $strMonth= date("n",strtotime($strDate)); // $strDay= date("j",strtotime($strDate)); // $strHour= date("H",strtotime($strDate)); // $strMinute= date("i",strtotime($strDate)); // $strSeconds= date("s",strtotime($strDate)); // $strMonthCut = Array("","ม.ค.","ก.พ.","มี.ค.","เม.ย.","พ.ค.","มิ.ย.","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); // $strMonthThai=$strMonthCut[$strMonth]; // //return "$strDay $strMonthThai $strYear, $strHour:$strMinute"; // $dt[d] = "$strDay"; // $dt[m] = "$strMonthThai"; // $dt[Y] = "$strYear"; // return $dt; // } // function DateThaiEN($strDate) // { // $strYear = date("Y",strtotime($strDate)); // $strMonth= date("n",strtotime($strDate)); // $strDay= date("j",strtotime($strDate)); // $strHour= date("H",strtotime($strDate)); // $strMinute= date("i",strtotime($strDate)); // $strSeconds= date("s",strtotime($strDate)); // $strMonthCut = Array("","JAN","FEB","MAR","APR","MAY","JUN","JUL","AUG","SEP","OCT","NOV","DEC"); // $strMonthThai=$strMonthCut[$strMonth]; // //return "$strDay $strMonthThai $strYear, $strHour:$strMinute"; // $dt[d] = "$strDay"; // $dt[m] = "$strMonthThai"; // $dt[Y] = "$strYear"; // return $dt; // } // function menu_download_name($id) // { // $qb = db_quick("SELECT menu_download_id, menu_download_name FROM menu_download WHERE menu_download_id = '$id' "); // // return $qb['menu_download_name']; // } // // nook // function menu_download_name_en($id) // { // $qb = db_quick("SELECT menu_download_name_en FROM menu_download WHERE menu_download_id = '$id' "); // // return $qb['menu_download_name_en']; // } // function page_navi_morelink($before_p,$plus_p,$total,$total_p,$chk_page){ // global $module,$pg,$id,$m1,$m2,$link,$morelink; // $pPrev=$chk_page-1; // $pPrev=($pPrev>=0)?$pPrev:0; // $pNext=$chk_page+1; // $pNext=($pNext>=$total_p)?$total_p-1:$pNext; // $lt_page=$total_p-4; // if($chk_page>0){ // echo "
  • "; // } // if($total_p>=11){ // if($chk_page>=4){ // echo "
  • 1. . .
  • "; // } // if($chk_page<4){ // for($i=0;$i<$total_p;$i++){ // $nClass=($chk_page==$i)?"class='btn btn-default active'":""; // if($i<=4){ // echo "
  • ".intval($i+1)."
  • "; // } // if($i==$total_p-1 ){ // echo "
  • . . .
  • ".intval($i+1)."
  • "; // } // } // // return $chk_page; // } // if($chk_page>=4 && $chk_page<$lt_page){ // $st_page=$chk_page-3; // for($i=1;$i<=5;$i++){ // $nClass=($chk_page==($st_page+$i))?"class='btn btn-default active'":""; // echo "
  • ".intval($st_page+$i+1)."
  • "; // } // for($i=0;$i<$total_p;$i++){ // if($i==$total_p-1 ){ // $nClass=($chk_page==$i)?"class='btn btn-default active'":""; // echo "
  • . . .
  • ".intval($i+1)."
  • "; // } // } // } // if($chk_page>=$lt_page){ // for($i=0;$i<=4;$i++){ // $nClass=($chk_page==($lt_page+$i-1))?"class='btn btn-default active'":""; // echo "
  • ".intval($lt_page+$i)."
  • "; // } // } // }else{ // for($i=0;$i<$total_p;$i++){ // $nClass=($chk_page==$i)?"class='btn btn-default active'":""; // echo "
  • ".intval($i+1)."
  • "; // } // } // if($chk_page<$total_p-1){ // echo "
  • "; // } // // return $chk_page; // } // function set_lang ($slang){ // global $lang; // if($lang == '' || $slang != $lang){ // $_SESSION["lang"] = $slang; // // return $slang; // // } // } // function func_conv_month($input){ // $arr_month = array("","ม.ค.","ก.พ.","มี.ค","เม.ษ.","พ.ค.","มิ.ย","ก.ค.","ส.ค.","ก.ย.","ต.ค.","พ.ย.","ธ.ค."); // return $arr_month[$input]; // } // // function func_conv_month_en($input){ // $arr_month = array("","Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"); // return $arr_month[$input]; // } ?> ศูนย์วิชาการเพื่อความปลอดภัยทางถนน : นำความรู้...สู่ถนนปลอดภัย