0 ) { // if ( isset($txtGross) && $txtGross != '' ) { if ( !is_numeric($txtGross)) { $txtGross = ''; } elseif ( $txtGross <= 0 ) { $txtGross = ''; } } // if ( isset($txtNetArea) && $txtNetArea != '' ) { if ( !is_numeric($txtNetArea)) { $txtNetArea = ''; } elseif ( $txtNetArea <= 0 ) { $txtNetArea = ''; } } // if ( isset($txtBedroom) && $txtBedroom != '' ) { if ( !is_numeric($txtBedroom)) { $txtBedroom = ''; } elseif ( $txtBedroom <= 0 ) { $txtBedroom = ''; } } // if ( isset($txtEnSuite) && $txtEnSuite != '' ) { if ( !is_numeric($txtEnSuite)) { $txtEnSuite = ''; } elseif ( $txtEnSuite <= 0 ) { $txtEnSuite = ''; } } // if ( isset($txtMonthRent) && $txtMonthRent != '' ) { if ( !is_numeric($txtMonthRent)) { $txtMonthRent = ''; } elseif ( $txtMonthRent <= 0 ) { $txtMonthRent = ''; } } // if ( isset($txtRate) && $txtRate != '' ) { if ( !is_numeric($txtRate)) { $txtRate = ''; } elseif ( $txtRate <= 0 ) { $txtRate = ''; } } // if ( isset($txtManagementFee) && $txtManagementFee != '' ) { if ( !is_numeric($txtManagementFee)) { $txtManagementFee = ''; } elseif ( $txtManagementFee <= 0 ) { $txtManagementFee = ''; } } // if ( isset($txtSell) && $txtSell != '' ) { if ( !is_numeric($txtSell)) { $txtSell = ''; } elseif ( $txtSell <= 0 ) { $txtSell = ''; } } // if ( isset($txtRent) && $txtRent != '' ) { if ( !is_numeric($txtRent)) { $txtRent = ''; } elseif ( $txtRent <= 0 ) { $txtRent = ''; } } // $property_properties = ''; if ( isset($_POST['chkNature']) && is_array($_POST['chkNature']) && sizeof($_POST['chkNature']) > 0 ) { foreach( $_POST['chkNature'] as $item ) { switch($item) { case 1: $property_properties.= ( $property_properties != '' ) ? '及' : ''; $property_properties .= '出售'; $chkNature_1 = '1'; break; // case 2: $property_properties.= ( $property_properties != '' ) ? '及' : ''; $property_properties .= '出租'; $chkNature_2 = '2'; break; } } } $property_type = ''; if ($_POST['optUsage'] == 1) { $property_type = '住宅'; } elseif ($_POST['optUsage'] == 2) { $property_type = '商舖'; } elseif ($_POST['optUsage'] == 3) { $property_type = '村屋'; } elseif ($_POST['optUsage'] == 4) { $property_type = '工業'; } elseif ($_POST['optUsage'] == 5) { $property_type = '地皮'; } elseif ($_POST['optUsage'] == 6) { $property_type = '寫字樓/商業'; } $property_situation = ''; if ($_POST['optPropertyCondition'] == 1) { $property_situation = '交吉'; } elseif ($_POST['optPropertyCondition'] == 2) { $property_situation = '連租約'; } $property_view = ''; if ($_POST['optView'] == 1) { $property_view = '海'; } elseif ($_POST['optView'] == 2) { $property_view = '山'; } elseif ($_POST['optView'] == 3) { $property_view = '街'; } elseif ($_POST['optView'] == 4) { $property_view = '花園'; } elseif ($_POST['optView'] == 5) { $property_view = '其他'; } $property_direction = ''; if ($_POST['optAspect'] == 1) { $property_direction = '北'; } elseif ($_POST['optAspect'] == 2) { $property_direction = '東'; } elseif ($_POST['optAspect'] == 3) { $property_direction = '南'; } elseif ($_POST['optAspect'] == 4) { $property_direction = '西'; } elseif ($_POST['optAspect'] == 5) { $property_direction = '東北'; } elseif ($_POST['optAspect'] == 6) { $property_direction = '東南'; } elseif ($_POST['optAspect'] == 7) { $property_direction = '西南'; } elseif ($_POST['optAspect'] == 8) { $property_direction = '西北'; } if ($_POST['chkGetNL'] == 'Y') { $get_lateste_news = '願意'; } else { $get_lateste_news = '不願意'; } if ($_POST['chkNoWish'] == 'Y') { $agreement = '不同意'; } else { $agreement = '同意'; } $subject = "Sell a Property From #".date('YmdHis'); $content = ''; $content.= '

Details of Sell a Property From

'; $content.= '
'; $content.= '
'; $content.= '物業地址:'; $content.= ''.$txtAddress.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '性質:'; $content.= ''.$property_properties.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業面積:'; $content.= ''.$txtGross.'平方呎(建築) / '.$txtNetArea.'平方呎(實用)'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業類別:'; $content.= ''.$property_type.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '房間數量:'; $content.= ''.$txtBedroom.'間 / '.$txtEnSuite.'間套房'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業狀況:'; $content.= ''.$property_situation.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業狀況 - 每月租金:'; $content.= '$'.$txtMonthRent.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業狀況 - 差餉每季:'; $content.= '$'.$txtRate.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '物業狀況 - 管理費每月:'; $content.= '$'.$txtManagementFee.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '景觀:'; $content.= ''.$property_view.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '單位方向:'; $content.= ''.$property_direction.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '叫價:'; $content.= '售價: '.$txtSell.'萬元 / 租金: '.$txtRent.'元'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '單位描述:'; $content.= ''.nl2br($txtPropertyDesc).'
'; $content.= '
'; $content.= '
'; $content.= '姓名:'; $content.= ''.$txtName.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '聯絡電話:'; $content.= ''.$txtContact.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '電郵:'; $content.= ''.$txtEmail.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '收到忠誠集團的最新消息:'; $content.= ''.$get_lateste_news.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '使用個人資料作直接促銷:'; $content.= ''.$agreement.''; $content.= '
'; $content.= '
'; $content.= '
'; $content.= '
'; $content.= 'This is an auto-generated email. Hence, please note that we are unable to respond even if you reply to this email.'; $content.= '
'; // $mailOn9Shp = 'forward1@cssurveyors.com'; $mailOn9Shp = 'easttech.dev@gmail.com'; $mailTo = $txtEmail; $msg = wordwrap( $content , 80 ); // $mail = new PHPMailer; $mailFrom = "no-reply@websiteappp.com"; $mailFromName = $shopName; $mail->Host = 'vps8594-ms1.youdomain.hk'; $mail->Hostname = $_SERVER['SERVER_NAME']; $mail->Port = 25; $mail->Username = 'vps8594-ms1'; $mail->Password = 'cKwM2NX('; $mail->setFrom($mailFrom, $mailFromName); $mail->From = $mailFrom; $mail->FromName = $mailFromName; $mail->addAddress($mailTo, $mailTo); $mail->addBCC($mailOn9Shp, $mailOn9Shp); $mail->Subject = $subject; $mail->Body = $content; $mail->AltBody = $msg; $mail->IsHTML(true); $mail->CharSet = 'UTF-8'; $mail->SMTPSecure = ''; $mail->SMTPAuth = false; $mail->Mailer = "smtp"; $mail->send(); // $rtnUrl = 'sell_a_property.php?msg=ok'; $rtnUrl.= ( isset($wid) && is_numeric($wid) ) ? '&wid='.$wid : ''; // header('location: '.$rtnUrl); exit(); } ?>