// standard hack prevent define('IN_PHP', true); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables error_reporting(E_ALL); $document_root = $_SERVER['DOCUMENT_ROOT']; $PHP_SELF = $_SERVER['PHP_SELF']; // Findout where this script is installed // so we can access relativ to this script $intLastSlash = strrpos($_SERVER['SCRIPT_FILENAME'], "/"); // check if last backslash is more far away in filename // if so, use the backslash position instead if (strrpos($_SERVER['SCRIPT_FILENAME'], "\\")>$intLastSlash) $intLastSlash = strrpos($_SERVER['SCRIPT_FILENAME'], "\\"); // cut out from begining to the last slash $php_root_path = substr($_SERVER['SCRIPT_FILENAME'],0,$intLastSlash+1); include($php_root_path . 'includes/functions.php'); include($php_root_path . 'includes/template.php'); include_once($php_root_path . 'includes/db.inc.php'); include_once($php_root_path . 'includes/captchalib.php'); if (isset($_REQUEST['email']) ) save_booking(); else show_booking(); function save_booking() { if (!checkcaptcha()) { $answer='
Your verification code is wrong! ';
$answer.='
Please try again or ';
$answer.='inform the ';
$answer.='webmaster of this website
Error performing query: '. mysql_error() . '
'); while ($row = mysql_fetch_array($result)) {$b_countryname = $row['cname'];} $sqlstmt = "SELECT cname FROM book_artist WHERE artist_id = '$b_artist_id'"; $result = @mysql_query($sqlstmt); if (!$result) exit('Error performing query: '. mysql_error() . '
'); while ($row = mysql_fetch_array($result)) {$b_artistname = $row['cname'];} $b_fulldate = (checkdate(intval($b_month),intval($b_day),intval($b_year))) ? $b_year.$b_month.$b_day : $b_fulldate="00000000"; $sql = "INSERT INTO book_request SET artist_id = '$b_artist_id', name = '$b_name', phone = '$b_phone', email = '$b_mail', country_code = '$b_country_code', eventdate = '$b_fulldate', details = '$b_details', flags = '0', insertiondate = NOW()"; // Perform the insertion. $ok = @mysql_query($sql); if ($ok) { // Here the request is registered ... Send out mail to the agency // for this country and the default agencies (like Ana and ArtistExclusive) $sql = "SELECT distinct C.cname, C.email FROM book_mail_route R , book_contact C WHERE R.contact_id = C.contact_id AND (R.country_code = '$b_country' OR R.country_code = 'ALL') AND (R.artist_id = $b_artist_id)"; //AND (R.artist_id = $b_artist_id OR R.artist_id = 0)"; $contacts = @mysql_query($sql); if ($contacts) { while ($mail = mysql_fetch_array($contacts)) { $bookingagency=$mail['cname']; $bookingagencymail=$mail['email']; $body="\nDear ".$bookingagency.",\n\n"; $body.="We would like to inform you that:\n\n"; if ($b_phone=="") $body.=$b_name."\nPhone: -"; else $body.=$b_name."\nPhone: ".$b_phone; $body.="\nE-Mail: ".$b_mail."\n\nhas posted a booking request "; $body.="for $b_artistname \n"; $body.="using the official website at www.9100723_artistex.com.\n\n"; if ($b_fulldate != "00000000") { $body.="The proposed date is: ".$b_day."-".$b_month."-".$b_year." (DD-MM-YYYY).\n"; $pdate=" proposed date: ".$b_day."-".$b_month."-".$b_year." (DD-MM-YYYY)"; } else $pdate = ''; $body.=$b_name." entered the following additional remarks:\n"; if ($b_details=="") $body.='- nothing -'; else $body.=$b_details; $body.="\n\nPlease note that this is an automatically generated message."; $body.="\n\nBest Regards,\n Artistexclusive"; // our testserver does not need to send mail // $answer.='Mail will be sent to: ';
// $answer.=$bookingagency.' ('.$bookingagencymail.')';
//$answer.=' Due to technical problems we are not able ';
$answer.='to register your request at the moment. Error performing query: '. mysql_error() . ' Error performing query: '. mysql_error() . ''.$body.'
';
$rtn= MAIL_NVLP("ArtisteXclusive Online",
"noreply@9100723_artistex.com",
$bookingagency,
$bookingagencymail,
"Booking request for $b_artistname ".$pdate,
$body);
} // end while
$body="Thank you for your interest in booking $b_artistname ";
$body.="\r\nWe will get back to you as soon as possible.";
$body.="\r\n\r\nPlease note that this is an automatically generated message.";
$body.="\r\nBest Regards,\n Artistexclusive";
$rtn= MAIL_NVLP("ArtisteXclusive Online",
"noreply@9100723_artistex.com",
$b_name,
$b_mail,
"Booking request for $b_artistname ".$pdate,
$body);
} // end contact
} // end ok
if ($ok) {
$answer=' Thank you for your interest!
';
$answer.='
We will get back to you as soon as possible.Sorry for the inconvenience
';
$answer.='
Please try again later or ';
$answer.='inform the ';
$answer.='webmaster of this website