Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.php > #3823
| From | "Daniel Rafflenbeul" <daniel-r@gmx.net> |
|---|---|
| Newsgroups | de.comp.lang.php |
| Subject | Dringende Hilfe zu mehreren Problemem gesucht.. |
| Date | 2016-03-27 21:03 +0200 |
| Message-ID | <dlqp37Fgqr6U1@mid.individual.net> (permalink) |
Ich habe hier eine php Seite...
4 Fehler habe ich und möchte wissen WER mir helfen kann...
1. Fehler : Wenn ich die Seite aufrufe, gibt es bei LAND ein Drop-Down
Menue. es wird direkt angezeigt. warum nicht beim Bundesland ?
Wenn ich das Captcha falsch eingebe und mir danach ein Fehler angezeigt
wird, DANN bekomme ich auch beim Bundesland das Drop-Down Menü angezeigt.
2. Fehler : Wenn ich z.B. Lünen als Ort eingebe, wird aus Lünen -> LÃŒnen
(auch wenn unten die Email gesendet wird.)
Wie kann ich bei Ort und vielleicht bei den anderen Eingaben die korrekt
umsetzen ? Dass alle Umlaute in den Feldern vernünftig umgesetzt und
gespeichert werden.
3. Fehler : WIE kann ich bei der Eingabe der Postleitzahl und Telefon /
Faxnummer darauf bestehen dass NUR Zahlen eingegeben werden können in die
Felder.
4. Fehler : Weiter unten wo die Emails geschrieben werden , gibt es
start_voucher bis end_voucher. und start und end-coupon.
Komischerweise, auch wenn dies ausgeschaltet sein sollte, wird es in der
Email gezeigt und nicht ausgeblendet..
Ich hoffe irgendwer kann mir helfen ..
Lg Daniel
<?php
require('load_this/load_this_poolware_10.php');
require(FOLDER_RELATIV_LANGUAGES . $language . '/' .
$GLOBALS[CONFIG_NAME_FILE][main_poolware_10]);
// BOF undefinierte Variable gefixt Gulliver72 19.11.2015
global $guest_member;
if (!isset($guest_member)) $guest_member = 'false';
if (isset($_GET['guest_member']) && ($_GET['guest_member'] == 'true')) {
$guest_member = 'true';
}
$process = false;
//Captcha by Ede & Tigerstyle
$sql=go_db_query('SELECT * FROM captcha_settings');
$row=go_db_fetch_array($sql);
$captcha_enable_10 = $row['captcha_enable_10'];
if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
$process = true;
if (isset($_POST['guest_member']) && ($_POST['guest_member'] == 'true'))
{
go_session_register('guest_member');
$guest_member = 'true';
}
// EOF undefinierte Variable gefixt Gulliver72 19.11.2015
if (MEMBER_GENDER == 'true') {
if (isset($_POST['gender'])) {
$gender = go_db_producing_input($_POST['gender']);
} else {
$gender = false;
}
}
$firstname = go_db_producing_input($_POST['firstname']);
$lastname = go_db_producing_input($_POST['lastname']);
if (MEMBER_DOB == 'true') $dob = go_db_producing_input($_POST['dob']);
$email_address = go_db_producing_input($_POST['email_address']);
if (MEMBER_EMAIL_VALIDATION == 'true'){
$email_address2 =
go_db_producing_input($_POST['email_address2']);
}
if (MEMBER_COMPANY == 'true') $company =
go_db_producing_input($_POST['company']);
$street_address = go_db_producing_input($_POST['street_address']);
if (MEMBER_ADRESS2 == 'true'){
$street_address2 =
go_db_producing_input($_POST['street_address2']);
}
if (MEMBER_SUBURB == 'true') $suburb =
go_db_producing_input($_POST['suburb']);
$postcode = go_db_producing_input($_POST['postcode']);
$city = go_db_producing_input($_POST['city']);
if (MEMBER_STATE == 'true') {
$state = go_db_producing_input($_POST['state']);
if (isset($_POST['zone_id'])) {
$zone_id = go_db_producing_input($_POST['zone_id']);
} else {
$zone_id = false;
}
}
$land = go_db_producing_input($_POST['land']);
if (MEMBER_TELE_FAX == 'true') {
if (MEMBER_TEL == 'true') {
$telephone = go_db_producing_input($_POST['telephone']);
} else {
$telephone = false;// undefinierte Variable gefixt Gulliver72
19.11.2015
}
if (MEMBER_FAX == 'true') {
$fax = go_db_producing_input($_POST['fax']);
} else {
$fax = false;// undefinierte Variable gefixt Gulliver72 19.11.2015
}
} else {
$telephone = false;// undefinierte Variable gefixt Gulliver72
19.11.2015
$fax = false;// undefinierte Variable gefixt Gulliver72 19.11.2015
}
if (isset($_POST['newsletter'])) {
$newsletter = go_db_producing_input($_POST['newsletter']);
} else {
$newsletter = false;
}
if (isset($_POST['password'])) { // undefinierte Variable gefixt
Gulliver72 19.11.2015
$password = go_db_producing_input($_POST['password']);
} else {
$password = false; // undefinierte Variable gefixt Gulliver72
19.11.2015
}
if (isset($_POST['confirmation'])) { // undefinierte Variable gefixt
Gulliver72 19.11.2015
$confirmation = go_db_producing_input($_POST['confirmation']);
} else {
$confirmation = false; // undefinierte Variable gefixt Gulliver72
19.11.2015
}
if (isset($guest_member) && $guest_member == 'true') { // undefinierte
Variable gefixt Gulliver72 19.11.2015
$guest_pass = go_create_random_value(TYPE_IN_PASSWORD_MIN_LENGTH,
'mixed');
$password = go_db_producing_input($guest_pass);
}
$source = go_db_producing_input($_POST['source']);
if (isset($_POST['source_other'])) $source_other =
go_db_producing_input($_POST['source_other']);
$error = false;
if ((MEMBER_GENDER == 'true')&&(MEMBER_GENDER_REQ == 'true')) {
if ( ($gender != 'm') && ($gender != 'f') ) {
$error = true;
$messageStack->add('create_member', TYPE_IN_GENDER_ERROR);
}
}
if (strlen($firstname) < TYPE_IN_FIRST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_FIRST_NAME_ERROR);
}
if (strlen($lastname) < TYPE_IN_LAST_NAME_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_LAST_NAME_ERROR);
}
if ((MEMBER_DOB == 'true')&&((MEMBER_DOB_REQ == 'true'))) {
if (checkdate(substr(go_date_raw($dob), 4, 2),
substr(go_date_raw($dob), 6, 2), substr(go_date_raw($dob), 0, 4)) == false)
{
$error = true;
$messageStack->add('create_member', TYPE_IN_DATE_OF_BIRTH_ERROR);
}
}
if (strlen($email_address) < TYPE_IN_EMAIL_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_EMAIL_ADDRESS_ERROR);
} elseif (go_validate_email($email_address) == false) {
$error = true;
$messageStack->add('create_member',
TYPE_IN_EMAIL_ADDRESS_CHECK_ERROR);
} elseif ( (MEMBER_EMAIL_VALIDATION == 'true') &&
($email_address!=$email_address2) ){
$error = true;
$messageStack->add('create_member',
TYPE_EMAIL_ADDRESS_CONFIRM_ERROR);
} else {
$check_email_query = go_db_query("select count(*) as total from " .
DB_TBL_ATTENDEES . " where attendees_email_address = '" .
go_db_input($email_address) . "' and guest_flag != '1'");
$check_email = go_db_fetch_array($check_email_query);
if ($check_email['total'] > 0) {
$error = true;
$messageStack->add('create_member',
TYPE_IN_EMAIL_ADDRESS_ERROR_EXISTS);
}
}
if (strlen($street_address) < TYPE_IN_STREET_ADDRESS_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_STREET_ADDRESS_ERROR);
}
if (strlen($postcode) < TYPE_IN_POSTCODE_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_POST_CODE_ERROR);
}
if (strlen($city) < TYPE_IN_CITY_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_CITY_ERROR);
}
if (is_numeric($land) == false) {
$error = true;
$messageStack->add('create_member', TYPE_IN_LAND_ERROR);
}
if ((MEMBER_STATE == 'true')&&((MEMBER_STATE_REQ == 'true'))) {
$zone_id = 0;
$check_query = go_db_query("select count(*) as total from " .
DB_TBL_ZONES . " where zone_land_id = '" . (int)$land . "'");
$check = go_db_fetch_array($check_query);
$entry_state_has_zones = ($check['total'] > 0);
if ($entry_state_has_zones == true) {
$zone_query = go_db_query("select distinct zone_id from " .
DB_TBL_ZONES . " where zone_land_id = '" . (int)$land . "' and (zone_name
like '" . go_db_input($state) . "%' or zone_code like '%" .
go_db_input($state) . "%')");
if (go_db_num_rows($zone_query) == 1) {
$zone = go_db_fetch_array($zone_query);
$zone_id = $zone['zone_id'];
} else {
$error = true;
$messageStack->add('create_member', TYPE_IN_STATE_ERROR_SELECT);
}
} else {
if (strlen($state) < TYPE_IN_STATE_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_STATE_ERROR);
}
}
}
if (MEMBER_TELE_FAX == 'true') {
if (MEMBER_TEL_REQ == 'true' && strlen($telephone) <
TYPE_IN_TELEPHONE_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member',
TYPE_IN_TELEPHONE_NUMBER_ERROR);
}
}
if (MEMBER == 'false'){
if (isset($guest_member) && $guest_member != 'true') {
if (strlen($password) < TYPE_IN_PASSWORD_MIN_LENGTH) {
$error = true;
$messageStack->add('create_member', TYPE_IN_PASSWORD_ERROR);
} elseif ($password != $confirmation) {
$error = true;
$messageStack->add('create_member',
TYPE_IN_PASSWORD_ERROR_NOT_MATCHING);
}
}
}
if ((REFERRAL_REQUIRED == 'true' && REFERRAL_REQUIRED_REQ == 'true') &&
(is_numeric($source) == false)) {
$error = true;
$messageStack->add('create_member', TYPE_IN_SOURCE_ERROR);
}
if ((REFERRAL_REQUIRED == 'true' && REFERRAL_REQUIRED_REQ == 'true') &&
(SHOW_REFERRAL_OTHER == 'true') && ($source == '9999') &&
(!go_not_null($source_other)) ) {
$error = true;
$messageStack->add('create_member', TYPE_IN_SOURCE_OTHER_ERROR);
}
//captcha test, sets error message and error flag
if ($captcha_enable_10 == "ja") {
if( empty($captcha_code) || empty($_POST['captcha_code']) ||
go_urlsafe_b64encode(go_CAP_RC4($_POST['captcha_code'])) != $captcha_code )
{
$error = true;
$messageStack->add('create_member', CAPTCHA_INVALID_TEXT );
}
}
//END
//Captcha by Ede & Tigerstyle
if ($captcha_enable_10 == "ja") {
// captcha unregister here not needed anymore
if ( go_session_is_registered('captcha_code') ) {
go_session_unregister('captcha_code');
}
}
//END
if ($error == false) {
//Tigerstyle Grossbuchstaben
function ucfirstPerWord($string) {
$uc_char = array(' ', '-', ',', '(');
$arr_ch = str_split($string);
$upper = true;
$result = '';
foreach($arr_ch as $ch) {
if(preg_match("/^[a-zA-Z]$/", $ch)) {
if($upper) {
$ch = strtoupper($ch);
$upper = false;
} else {
$ch = strtolower($ch);
}
} else {
if(in_array($ch, $uc_char)) {
$upper = true;
} else {
$upper = false;
}
}
$result .= $ch;
}
return $result;
}
$firstname = ucfirstPerWord($firstname);
$lastname = ucfirstPerWord($lastname);
$street_address = ucfirstPerWord($street_address);
// BOF undefinierte Variable gefixt Gulliver72 19.11.2015
if (MEMBER_ADRESS2 == 'true'){
$street_address2 = ucfirstPerWord($street_address2);
} else {
$street_address2 = '';
}
// EOF undefinierte Variable gefixt Gulliver72 19.11.2015
$city = ucfirstPerWord($city);
// BOF undefinierte Variable gefixt Gulliver72 19.11.2015
if (MEMBER_ADRESS2 == 'true'){
$suburb = ucfirstPerWord($suburb);
} else {
$suburb = '';
}
// EOF undefinierte Variable gefixt Gulliver72 19.11.2015
//END Tigerstyle Grossbuchstaben
// unverschlüsseltes Passwort entfernt Gulliver72 26.10.2015
$sql_data_array = array('attendees_firstname' => $firstname,
'attendees_lastname' => $lastname,
'attendees_email_address' => $email_address,
'attendees_telephone' => $telephone,
'attendees_fax' => $fax,
'attendees_newsletter' => $newsletter,
// 'attendees_password_uncript' => $password,
'attendees_password' =>
go_encrypt_password($password));
if (MEMBER_GENDER == 'true') $sql_data_array['attendees_gender'] =
$gender;
if (MEMBER_DOB == 'true') $sql_data_array['attendees_dob'] =
go_date_raw($dob);
if ($guest_member == 'true') $sql_data_array['guest_flag'] = '1'; //
Variablenprüfung gefixt Gulliver72
// go_db_query("update " . DB_TBL_ATTENDEES . " set
attendees_email_address = '@_" . $email_address . "' where
attendees_email_address = '" . $email_address . "' and guest_flag = '1'");
// go_db_query("update " . DB_TBL_ATTENDEES . " set attendees_lastname =
'@_" . $lastname . "' where attendees_email_address = '@_" . $email_address
. "'");
go_db_carry(DB_TBL_ATTENDEES, $sql_data_array);
$attendee_id = go_db_insert_id();
if ($guest_member == 'true') go_db_query("update " . DB_TBL_ATTENDEES .
" set attendees_email_address = '@_" . $email_address . "' where
attendees_email_address = '" . $email_address . "' and attendees_id = '" .
$attendee_id . "' and guest_flag = '1'");
if ($guest_member == 'true') go_db_query("update " . DB_TBL_ATTENDEES .
" set attendees_lastname = '@_" . $lastname . "' where
attendees_email_address = '@_" . $email_address . "' and attendees_id = '" .
$attendee_id . "'");
$sql_data_array = array('attendees_id' => $attendee_id,
'entry_firstname' => $firstname,
'entry_lastname' => $lastname,
'entry_street_address' => $street_address,
'entry_street_address2' => $street_address2,
'entry_postcode' => $postcode,
'entry_city' => $city,
'entry_land_id' => $land);
if (MEMBER_GENDER == 'true') $sql_data_array['entry_gender'] =
$gender;
if (MEMBER_COMPANY == 'true') $sql_data_array['entry_company'] =
$company;
if (MEMBER_SUBURB == 'true') $sql_data_array['entry_suburb'] =
$suburb;
if (MEMBER_STATE == 'true') {
if ($zone_id > 0) {
$sql_data_array['entry_zone_id'] = $zone_id;
$sql_data_array['entry_state'] = '';
} else {
$sql_data_array['entry_zone_id'] = '0';
$sql_data_array['entry_state'] = $state;
}
}
go_db_carry(DB_TBL_DIRECTORY_TO_ADDRESS, $sql_data_array);
$address_id = go_db_insert_id();
go_db_query("update " . DB_TBL_ATTENDEES . " set
attendees_default_address_id = '" . (int)$address_id . "' where attendees_id
= '" . (int)$attendee_id . "'");
if ($guest_member == 'false') {
go_db_query("insert into " . DB_TBL_ATTENDEES_INFO . "
(attendees_info_id, attendees_info_number_of_logons,
attendees_info_date_member_created, attendees_info_source_id) values ('" .
go_db_input($attendee_id) . "', '0', now(), '". (int)$source . "')");
} else {
go_db_query("insert into " . DB_TBL_ATTENDEES_INFO . "
(attendees_info_id, attendees_info_number_of_logons,
attendees_info_date_member_created, attendees_info_source_id) values ('" .
go_db_input($attendee_id) . "', '-1', now(), '". (int)$source . "')");
}
if ($source == '9999') {
go_db_carry(DB_TBL_SOURCES_OTHER, array('attendees_id' =>
(int)$attendee_id, 'sources_other_name' => go_db_input($source_other)));
}
if (MEMBER=='false'){
if (SESSION_RECREATE == 'True') {
go_session_recreate();
}
$attendee_first_name = $firstname;
$attendee_default_address_id = $address_id;
$attendee_land_id = $land;
$attendee_zone_id = $zone_id;
go_session_register('attendee_id');
go_session_register('attendee_first_name');
go_session_register('attendee_default_address_id');
go_session_register('attendee_land_id');
go_session_register('attendee_zone_id');
go_session_unregister('referral_id');
if (BASKET_DEL_IF_NEW_LOGIN == 'true'){
go_db_query("delete from " . DB_TBL_ATTENDEES_BASKET .
" where attendees_id = '" . (int)$attendee_id . "'");
go_db_query("delete from " .
DB_TBL_ATTENDEES_BASKET_CHARACTERISTICS . " where attendees_id = '" .
(int)$attendee_id . "'");
go_db_query("delete from " .
DB_TBL_ATTENDEES_BASKET_CHARACTERISTICS_CONF . " where attendees_id = '" .
(int)$attendee_id . "'");
}
$cart->restore_contents();
}
$name = $firstname . ' ' . $lastname;
if (MEMBER_GENDER == 'true') {
if ($gender == 'm') {
$email_text = sprintf(EMAIL_GREET_MR, $lastname);
} else {
$email_text = sprintf(EMAIL_GREET_MS, $lastname);
}
} else {
$email_text = sprintf(EMAIL_GREET_NONE, $firstname);
}
if (isset($guest_member) && $guest_member == 'true') {
go_forward(go_href_link($GLOBALS[CONFIG_NAME_FILE][main_poolware_66],
'', 'SSL'));
} else {
if (EMAIL_USE_HTML == 'true'){
$text_query = go_db_query("SELECT * FROM email_template_text
where txt_html = 2 and language_id = '" . $languages_id . "' AND site_name =
'new_user'");
}
else{
$text_query = go_db_query("SELECT * FROM
email_template_text where txt_html = 1 and language_id = '" . $languages_id
. "' AND site_name = 'new_user'");
}
$werte = go_db_fetch_array($text_query);
$text = $werte["email_text_one"];
//$email_text .= EMAIL_WELCOME . EMAIL_TEXT . EMAIL_CONTACT .
EMAIL_WARNING;
$text =
preg_replace('/<-FIRST_NAME_CUSTOMER->|<-FIRST_NAME_CUSTOMER->/',
$firstname, $text);
$text =
preg_replace('/<-LAST_NAME_CUSTOMER->|<-LAST_NAME_CUSTOMER->/',
$lastname, $text);
if (EMAIL_USE_HTML == 'true'){
$text =
preg_replace('/<-STREET_CUSTOMER->|<-STREET_CUSTOMER->/',
$street_address . "\n" . $street_address2, $text);
}else{
$text =
preg_replace('/<-STREET_CUSTOMER->|<-STREET_CUSTOMER->/',
$street_address . "\n" . '<br>' . $street_address2, $text);
}
$text =
preg_replace('/<-POSTCODE_CUSTOMER->|<-POSTCODE_CUSTOMER->/',
$postcode, $text);
$text =
preg_replace('/<-CITY_CUSTOMER->|<-CITY_CUSTOMER->/', $city, $text);
if (EMAIL_USE_HTML == 'true'){
$text = preg_replace('/<-MY_LOGO->|<-MY_LOGO->/',
'<img src="' . HTTP_SERVER . FOLDER_RELATIV_HTTP_CATALOG .
FOLDER_RELATIV_PICTURES . CHANGE_INVOICE_LOGO . '" alt="">', $text);
}else{
$text = preg_replace('/<-MY_LOGO->|<-MY_LOGO->/',
'', $text);
}
$text = preg_replace('/<-SHOP_NAME->|<-SHOP_NAME->/',
SHOP_NAME, $text);
$text =
preg_replace('/<-FIRMENANSCHRIFT->|<-FIRMENANSCHRIFT->/',
SHOP_NAME_ADDRESS, $text);
$text = preg_replace('/<-FINANZAMT->|<-->/',
OWNER_BANK_FA, $text);
$text =
preg_replace('/<-STEUERNUMMER->|<-FINANZAMT->/',
OWNER_BANK_TAX_NUMBER, $text);
$text = preg_replace('/<-USTID->|<-USTID->/',
OWNER_BANK_UST_NUMBER, $text);
$text = preg_replace('/<-BANKNAME->|<-BANKNAME->/',
OWNER_BANK_NAME, $text);
$text =
preg_replace('/<-KONTOINHABER->|<-KONTOINHABER->/', OWNER_BANK_MEMBER,
$text);
$text = preg_replace('/<-BLZ->|<-BLZ->/',
SHOP_OWNER_BLZ, $text);
$text =
preg_replace('/<-KONTONUMMER->|<-KONTONUMMER->/', OWNER_BANK, $text);
$text = preg_replace('/<-SWIFT->|<-SWIFT->/',
OWNER_BANK_SWIFT, $text);
$text = preg_replace('/<-IBAN->|<-IBAN->/',
OWNER_BANK_IBAN, $text);
$text =
preg_replace('/<-FAXVONKUNDE->|<-FAXVONKUNDE->/', $fax, $text);
$text =
preg_replace('/<-TELEVONKUNDE->|<-TELEVONKUNDE->/', $telephone,
$text);
$text =
preg_replace('/<-KUNDENEMAIL->|<-KUNDENEMAIL->/', $email_address,
$text);
$sql_give_back = go_db_query("SELECT Text FROM " .
DB_TBL_INFO_GIVE_BACK . " where language_id='" . $languages_id . "'");
$give_back = go_db_fetch_array($sql_give_back);
if (!isset($give_back['Text'])) $give_back['Text'] = ''; //
undefinierter Index gefixt Gulliver72
$text =
preg_replace('/<-WIDERUFSBELEHRUNG->|<-WIDERUFSBELEHRUNG->/i',
$give_back['Text'], $text);
$sql_agb = go_db_query("SELECT Text FROM " .
DB_TBL_INFO_CONDITIONS . " where language_id='" . $languages_id . "'");
$agb = go_db_fetch_array($sql_agb);
if (!isset($agb['Text'])) $agb['Text'] = ''; // undefinierter Index
gefixt Gulliver72
$text = preg_replace('/<-AGB->|<-AGB->/i',
$agb['Text'], $text);
/////////////// Coupon und Gutschein //////////////////////
if (NEW_SIGNUP_GIFT_VOUCHER_AMOUNT > 0) {
$coupon_code = create_coupon_code();
$insert_query = go_db_query("insert into " . DB_TBL_COUPONS
. " (coupon_code, coupon_type, coupon_amount, date_created) values ('" .
$coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT . "', now())");
$insert_id = go_db_insert_id($insert_query);
$insert_query = go_db_query("insert into " .
DB_TBL_COUPON_EMAIL_TRACK . " (coupon_id, attendee_id_sent, sent_firstname,
emailed_to, date_sent) values ('" . $insert_id ."', '0', 'Admin', '" .
$email_address . "', now() )");
$text = preg_replace('/<-IF_START
VOUCHER->|<-IF_START VOUCHER->/', '', $text);
$text = preg_replace('/<-IF VOUCHER->|<-IF
VOUCHER->/', '', $text);
$text = preg_replace('/<-IF_END VOUCHER->|<-IF_END
VOUCHER->/', '', $text);
$text =
preg_replace('/<-VOUCHER_COUNT->|<-VOUCHER_COUNT->/',
$currencies->format(NEW_SIGNUP_GIFT_VOUCHER_AMOUNT), $text);
$text =
preg_replace('/<-VOUCHER_CODE->|<-VOUCHER_CODE->/', $coupon_code,
$text);
$text =
preg_replace('/<-VOUCHER_INFO_SITE->|<-VOUCHER_INFO_SITE->/',
go_href_link($GLOBALS[CONFIG_NAME_FILE][main_poolware_27], 'gv_no=' .
$coupon_code), $text);
}else{
if (substr_count($text, '<-IF VOUCHER->') > '0'){
for ($i = 0; $i <= substr_count($text, '<-IF
VOUCHER->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF VOUCHER->', '', '', '<-IF_END VOUCHER->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
elseif (substr_count($text, '<-IF VOUCHER->') >
'0'){
for ($i = 0; $i <= substr_count($text, '<-IF
VOUCHER->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF VOUCHER->', '', '', '<-IF_END VOUCHER->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
if (substr_count($text, '<-IF_START VOUCHER->') > '0'){
for ($i = 0; $i <= substr_count($text, '<-IF_START
VOUCHER->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF_START VOUCHER->', '', '', '<-IF_END VOUCHER->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
elseif (substr_count($text, '<-IF_START
VOUCHER->') > '0'){
for ($i = 0; $i <= substr_count($text,
'<-IF_START VOUCHER->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF_START VOUCHER->', '', '', '<-IF_END VOUCHER->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
}
if (NEW_SIGNUP_DISCOUNT_COUPON != '') {
$coupon_code = NEW_SIGNUP_DISCOUNT_COUPON;
$create_new_signup_date = date("Y-m-d H:i:s");
$insert_query = go_db_query("insert into " .
DB_TBL_COUPONS . " (coupon_code, coupon_type, coupon_amount, date_created)
values ('" . $coupon_code . "', 'G', '" . NEW_SIGNUP_GIFT_VOUCHER_AMOUNT .
"', '". $create_new_signup_date ."')");
$insert_id = go_db_insert_id($insert_query);
$coupon_query = go_db_query("select * from " .
DB_TBL_COUPONS . " where coupon_code = '" . $coupon_code . "' and
date_created = '". $create_new_signup_date ."'");
$coupon = go_db_fetch_array($coupon_query);
$coupon_id = $coupon['coupon_id'];
$coupon_desc_query = go_db_query("select * from " .
DB_TBL_COUPONS_DESCRIPTION . " where coupon_id = '" . $coupon_id . "' and
language_id = '" . (int)$languages_id . "'");
$coupon_desc = go_db_fetch_array($coupon_desc_query);
$insert_query = go_db_query("insert into " .
DB_TBL_COUPON_EMAIL_TRACK . " (coupon_id, attendee_id_sent, sent_firstname,
emailed_to, date_sent) values ('" . $coupon_id ."', '0', 'Admin', '" .
$email_address . "', now() )"); $text = preg_replace('/<-IF
COUPON->|<-IF COUPON->/', '', $text);
$text = preg_replace('/<-IF_START COUPON->|<-IF_START
COUPON->/', '', $text);
$text = preg_replace('/<-IF_END COUPON->|<-IF_END
COUPON->/', '', $text);
$text =
preg_replace('/<-COUPON_CODE->|<-COUPON_CODE->/',
$coupon['coupon_code'], $text);
$text =
preg_replace('/<-COUPON_INFO->|<-COUPON_INFO->/',
$coupon_desc['coupon_description'], $text);
}else{
if (substr_count($text, '<-IF COUPON->') > '0'){
for ($i = 0; $i <= substr_count($text, '<-IF
COUPON->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF COUPON->', '', '', '<-IF_END COUPON->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
elseif (substr_count($text, '<-IF COUPON->') >
'0'){
for ($i = 0; $i <= substr_count($text, '<-IF
COUPON->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF COUPON->', '', '', '<-IF_END COUPON->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
if (substr_count($text, '<-IF_START COUPON->') > '0'){
for ($i = 0; $i <= substr_count($text, '<-IF_START
COUPON->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF_START COUPON->', '', '', '<-IF_END COUPON->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
elseif (substr_count($text, '<-IF_START COUPON->')
> '0'){
for ($i = 0; $i <= substr_count($text,
'<-IF_START COUPON->'); $i++) {
$array_search = search_from_phrase_to_phrase('',
'<-IF_START COUPON->', '', '', '<-IF_END COUPON->', $text);
$text = easy_preg_replace($array_search[0][0],
'', $text);
}
}
}
/////////////// Coupon und Gutschein ENDE //////////////////////
if (go_mail($name, $email_address, EMAIL_SUBJECT, $text, SHOP_OWNER,
SHOP_OWNER_EMAIL_ADDRESS) == true) {
$mail_error = false;
} else {
$mail_error = true;
}
$former_email_text = FORMER_EMAIL_WELCOME . '<br><br>' .
FORMER_EMAIL_TEXT . '<br><br>' . $firstname . '<br>' . $lastname . '<br>' .
$street_address. '<br>' . $postcode . ' ' . $city . '<br>' . $email_address
. '<br><br>'. FORMER_EMAIL_TELEPHONE . $telephone . '<br>' .
FORMER_EMAIL_FAX . $fax . '<br><br>'.'<br><br>'. EMAIL_WARNING .
'<br>-------------------------<br>'; //Fred
$mailtext .= "\n\nAnfrager E-Mail :\n" . $email_address;
$mailtext .= "\n\nAnfrager Name :\n" . $name;
$mailtext .= "\n\nNachricht :\n" . nl2br($former_email_text);
go_mail(SHOP_OWNER, SHOP_OWNER_EMAIL_ADDRESS, FORMER_EMAIL_SUBJECT,
nl2br($former_email_text) . $text, SHOP_OWNER, SHOP_OWNER_EMAIL_ADDRESS,
'');
go_mail(SHOP_OWNER, SHOP_OWNER_EMAIL_ADDRESS, EMAIL_SUBJECT,
$mailtext, SHOP_OWNER, SHOP_OWNER_EMAIL_ADDRESS);
go_forward(go_href_link($GLOBALS[CONFIG_NAME_FILE][main_poolware_12],
'', 'SSL'));
}
}
}
//Captcha by Ede & Tigerstyle
else {
$_POST['email'] = "";
$_POST['name'] = "";
$_POST['captcha_code'] = "";
}
//END
//Captcha by Ede & Tigerstyle
if ($captcha_enable_10 == "ja") {
// captcha generate a new captcha image and code, encoded and encrypt,
register the code with session for testing $_POST
$captcha_code = go_captcha_image();
go_session_register('captcha_code');
}
//END
$breadcrumb->add(NAVBAR_TITLE,
go_href_link($GLOBALS[CONFIG_NAME_FILE][main_poolware_10], '', 'SSL'));
$content = $GLOBALS[CONFIG_SHOW_FILE][main_poolware_10];
$javascript = $GLOBALS[CONFIG_NAME_FILE][form_check_js];
require(FOLDER_RELATIV_TEMPLATES . TEMPLATENAME_MAIN_PAGE);
require(FOLDER_RELATIV_INCLUDES . 'load_this_poolware_3.php');
?>
Back to de.comp.lang.php | Previous | Next — Next in thread | Find similar
Dringende Hilfe zu mehreren Problemem gesucht.. "Daniel Rafflenbeul" <daniel-r@gmx.net> - 2016-03-27 21:03 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-28 01:56 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Arno Welzel <usenet@arnowelzel.de> - 2016-03-28 06:27 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Claus Reibenstein <4spamersonly@kabelmail.de> - 2016-03-28 12:54 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Gregor Kofler <usenet@gregorkofler.com> - 2016-03-28 10:06 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Markus Grob <snoopy@ilnet.ch> - 2016-03-28 20:36 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2016-03-29 02:26 +0200
Re: Dringende Hilfe zu mehreren Problemem gesucht.. Markus Grob <snoopy@ilnet.ch> - 2016-03-29 08:52 +0200
csiph-web