$host = "localhost"; $user = "aka"; $pass ="Ylem355$"; $dbname = "akayakiniku"; mysql_connect($host,$user,$pass) or die ("Error connect DB Try Again"); mysql_select_db($dbname); mysql_query("SET NAMES UTF8"); ?> function checkInput($value){ $value = trim($value); // Stripslashes if (get_magic_quotes_gpc()){ $value = stripslashes($value); } // Quote if not a number if (!is_numeric($value)){ $value = mysql_real_escape_string($value); } return $value; } function getData($id,$table){ $sql = "SELECT * FROM `".$table."` WHERE `".$table."_id`='".$id."'"; $query = mysql_query($sql); $result = mysql_fetch_array($query); return $result; } function getAllDetail($table,$where,$order){ $where = ($where!='')? 'and '.$where : ''; $sql = "SELECT * FROM `".$table."` WHERE is_status=0 ".$where." ORDER BY ".$order; $query = mysql_query($sql); return $query; } function objSqlRequest($StringVar){ if(isset($_REQUEST[$StringVar])){ $StringVar = $_REQUEST[$StringVar]; } return mysql_real_escape_string(trim($StringVar)); } function urlReviseName($value){ $arr = array("#", "?", ".", "*", "%", "!"); $value = str_replace($arr,'',$value); $arr2 = array("/", " ", "&", "+", "(", ")"); $text = str_replace($arr2,'-',$value); while (strpos($text,"--")) { $text = str_replace('--','-',$text); } return urlencode($text); } ?>
อากะ ร้านอาหารปิ้งย่างสไตล์ญี่ปุ่น
NEWS & ACTIVITY