/*
// Config File
// Site configuration file
// Declan Keane 9 August 2010
*/
define("WEBSITE_ADD", "http://www.ebookireland.com");
define("WEBSITE_NAME", "ebookireland.com");
//define("ROOT_DIR", "/hsphere/local/home/ebook/ebookireland.com");
define("ROOT_DIR", "/var/www/vhosts/ebookireland.com/httpdocs");
define("HOTEL_IMAGE_FOLDER", "http://www.ebookireland.com");
/**************************** Email **************************************/
/*************************************************************************/
define("ADMIN_EMAIL", "acoyne@western-webs.com");
/**************************** MAP KEY **************************************/
/*************************************************************************/
define("MAP_KEY", "ABQIAAAAIHZaRwA3EQj2PVHP1jLxFhT9m6ggQOinbL985V__2vYst4iwHhQprYOevr5RTTCp9Jt3DQbbrwQZ6g");
?>
/*
// Config File
// DB configuration file
// Declan Keane 9 August 2010
*/
//Test database
/*define("DB_HOST", "tmysql1.tuam.org");
define("DB_USER", "ebookte_accom");
define("DB_PASS", "Mc8dc34b2Xp");
define("DB_NAME", "ebookte_ebook_accomm");*/
//Live database
ini_set('max_user_connections', 128);
ini_set('max_connections', 128);
/*
define("DB_HOST", "tmysql1.tuam.org");
define("DB_USER", "ebook_accomxHj6D");
define("DB_PASS", "Mc8dc34b2Xp");
define("DB_NAME", "ebook_accomm");*/
/* New User Added by Alan Aug 4th 2013*/
//define("DB_HOST", "tmysql1.tuam.org");
define("DB_HOST", "127.0.0.1");
define("DB_USER", "ebook_connfix");
define("DB_PASS", "Mc8dc34b2Xp");
define("DB_NAME", "ebook_accomm");
?>
function getThumb($url) {
$file_name = substr($url, 0, strlen($url)-4);
//assumes file extension is always three charcters eg. .jpg, .gif, .png etc.
$file_extension = substr($url, -3);
return $file_name."-sm.".$file_extension;
}
function formatParagraphs($text) {
$paragraph_array = explode("\r\n\r\n",$text); //split into paragraphs
$paragraphs = "";
for($i=0; $i < sizeof($paragraph_array); $i++) {
$paragraph = str_replace("\r\n","
\r\n",$paragraph_array[$i]); //handle single line breaks
's
$paragraphs .= "
".$paragraph."
\n";
}
return $paragraphs;
}
function formatHotParagraphs($text) {
$paragraph_array = explode("\r\n\r\n",$text); //split into paragraphs
$paragraphs = "";
for($i=0; $i < sizeof($paragraph_array); $i++) {
$paragraph = str_replace("\r\n","
\r\n",$paragraph_array[$i]); //handle single line breaks
's
$paragraphs .= $paragraph;
}
return $paragraphs;
}
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
function generate_mail($company_name,$company_web,$content){
$email="";
$email.="" . $company_name . " Enquiry";
$email.="";
$email.= $content;
$email.=" |
|
";
return $email;
}
function remote_file_exists($url)
{
$curl = curl_init($url);
//don't fetch the actual page, you only want to check the connection is ok
curl_setopt($curl, CURLOPT_NOBODY, true);
//do request
$result = curl_exec($curl);
$ret = false;
//if request did not fail
if($result !== false)
{
//if request was ok, check response code
$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($statusCode == 200)
{
$ret = true;
}
}
curl_close($curl);
return $ret;
}
?>