/******************************Online Database Configuration*********************/
/***Live server uncomment*********/
/*****
$dbHost is the mysql host ...(mostely use localhost)
$dbUser is the mysql user name;
$dbPass is the mysql password;
$dbDb is the mysql database name;
*****/
$dbHost = "localhost";
$dbUser = "root";
$dbPass = "4n1l4r0r4";
$dbDb = "dbfoodservice";
/*************Global Constant*************/
/**** Veblogy Note :- Please change "somedomain.com" with your domain name. ****/
define('DOC_ROOT',$_SERVER['DOCUMENT_ROOT']);
define('HTTP_DOC',"http://www.foodservice.in/");
define('ADMIN_PATH',"http://www.foodservice.in/admin/");
define('DOC_ROOT_ADMIN',DOC_ROOT."admin/");
/*******Data base class*******************/
include("DBClass.php");
/***********Data base class object********/
$db = new DB($dbHost,$dbUser,$dbPass,$dbDb);
/********variable file********************/
include("var.php");
include("class_resize.php");
/******class upload********/
include("class.upload.php");
/********global function file********************/
include("function.php");
/*********page for pagination **************/
include("PageNavigator.php");
include("convert.php");
/*********Extract post and get arrays*************/
@session_start();
extract($_POST);
extract($_GET);
if(strstr($_SERVER['PHP_SELF'],'/admin/'))
{
if(!isset($_SESSION['sess_uidadmin']) and (strstr($_SERVER['PHP_SELF'],'index.php')!='index.php'))
{
header("location:".ADMIN_PATH."index.php?done=14");
}
}
function call_head($other = '')
{
echo '
'.$other;
}
function clean_url($text)
{
$text=strtolower($text);
$code_entities_match = array(' ','--','"','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','"','<','>','?','[',']','\\',';',"'",',','.','/','*','+','~','`','=');
$code_entities_replace = array('-','-','','','','','','','','','','','','','','','','','','','','','','','','');
$text = str_replace($code_entities_match, $code_entities_replace, $text);
return $text;
}
function clean_text($text)
{
$text=strtolower($text);
$code_entities_match = array(' ','--','"','!','@','#','$','%','^','&','*','(',')','_','+','{','}','|',':','"','<','>','?','[',']','\\',';',"'",',','.','/','*','+','~','`','=');
$code_entities_replace = array(' ',' ','','','','','','','','','','','','','','','','','','','','','','','','');
$text = str_replace($code_entities_match, $code_entities_replace, $text);
return $text;
}
function extractCommonWords($string){
$stopWords = array('i','a','about','an','and','are','as','at','be','by','com','de','en','for','from','how','in','is','it','la','of','on','or','that','the','this','to','was','what','when','where','who','will','with','und','the','www');
$string = preg_replace('/ss+/i', '', $string);
$string = trim($string); // trim the string
$string = preg_replace('/[^a-zA-Z0-9 -]/', '', $string); // only take alphanumerical characters, but keep the spaces and dashes too
$string = strtolower($string); // make it lowercase
preg_match_all('/\b.*?\b/i', $string, $matchWords);
$matchWords = $matchWords[0];
foreach ( $matchWords as $key=>$item ) {
if ( $item == '' || in_array(strtolower($item), $stopWords) || strlen($item) <= 3 ) {
unset($matchWords[$key]);
}
}
$wordCountArr = array();
if ( is_array($matchWords) ) {
foreach ( $matchWords as $key => $val ) {
$val = strtolower($val);
if ( isset($wordCountArr[$val]) ) {
$wordCountArr[$val]++;
} else {
$wordCountArr[$val] = 1;
}
}
}
arsort($wordCountArr);
$wordCountArr = array_slice($wordCountArr, 0, 10);
return $wordCountArr;
}
/********** code for black automatic scripts which are executed form another host****
if(count($_POST) > 0)
{
if(!strstr($_SERVER['HTTP_REFERER'],HTTP_DOC))
{
header("location:".HTTP_DOC);
exit;
}
}*******/
//error_reporting(E_ALL);
error_reporting(0);
header("Content-Type: text/html;charset=ISO-8859-1");
?>
FoodService- Visitor Pre Registration Form