function prepare_hoidap_record(&$row_news, $type_image = 'mobile')
{
    if (isset($row_news['que_title']) && $row_news['que_title']) {
        $row_news['que_title'] = htmlspecialbo($row_news['que_title']);
    }
    if (isset($row_news['que_image']) && $row_news['que_image']) {
        $row_news['que_image_low'] = get_picture_path($row_news['que_image'], $type_image . '_low');
        $row_news['que_image'] = get_picture_path($row_news['que_image'], $type_image);
    }
    if (isset($row_news['que_question_content']) && $row_news['que_question_content']) {
        $row_news['full_question_content'] = $row_news['que_question_content'];
        $row_news['que_question_content'] = removeHTML($row_news['que_question_content']);
        $row_news['que_question_content'] = cut_string($row_news['que_question_content'], 50);
    }
    if (isset($row_news['que_date']) && $row_news['que_date']) {
        $row_news['post_time'] = date('d/m/Y | H:i', $row_news['que_date']);
    }
    $row_news['link_detail'] = generate_hoidap_detail($row_news);
    return $row_news;
}
Esempio n. 2
0
if ($action == 'execute') {
    $bg_errorMsg = $myform->checkdata();
    if (!$bg_errorMsg) {
        $db_insert = new db_execute_return();
        $last_id = $db_insert->db_execute($myform->generate_insert_SQL());
        //insert quận huyện nếu có
        $array_district = getValue('array_district', 'arr', 'POST', '');
        if ($array_district) {
            $sql_district = 'INSERT INTO ' . $bg_table_district . '(dis_city_id,dis_name) VALUES';
            foreach ($array_district as $district) {
                if (!$district) {
                    continue;
                }
                $district = remove_magic_quote($district);
                $district = removeScript($district);
                $district = removeHTML($district);
                $sql_district .= '(' . $last_id . ',"' . $district . '"),';
            }
            $sql_district = rtrim($sql_district, ',');
            //insert
            $db_insert = new db_execute($sql_district);
            unset($db_insert);
        }
    }
}
#Phần hiển thị
$rainTpl = new RainTPL();
$rainTpl->assign('load_header', $load_header);
$rainTpl->assign('module_name', $module_name);
$rainTpl->assign('error_msg', print_error_msg($bg_errorMsg));
$html_page = '';
Esempio n. 3
0
function set_keyword_search($llllllll)
{
    $llllllll = removeHTML($llllllll);
    $llllllll = replaceMQ($llllllll);
    $llllllll = htmlspecialchars($llllllll);
    $llllllll = mb_strtolower($llllllll);
    $rrrrrrrr = new user();
    if ($rrrrrrrr->logged()) {
        $ssssssss = $rrrrrrrr->id;
    } else {
        $ssssssss = 0;
    }
    $tttttttt = new db_execute('INSERT INTO keyword_temp(key_text,key_user_id) VALUES("' . $llllllll . '",' . $ssssssss . ')');
    unset($tttttttt);
}
Esempio n. 4
0
function generate_voucher($boo_id, $type = "hotel", $signal = 1)
{
    global $array_pay_method;
    global $con_email_support;
    global $con_hotline;
    global $arr_currency;
    global $con_end_email_string;
    global $array_attribute;
    global $table_hotel_description;
    //Nếu là đặt phòng khuyến mại thì lấy thêm thông tin khuyến mại
    $sql = "";
    if ($type == "deal") {
        $sql = "STRAIGHT_JOIN promotionals ON (boo_promotion_id = pro_id)";
    }
    $str_return = '';
    $style_none_border = ' style="height: 5px; line-height: 5px;"';
    $style_have_border = ' style="height: 7px; line-height: 7px;"';
    $style_oneline = ' style="height: 1px; line-height: 1px;"';
    $db_select = new db_query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM    booking_hotel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTRAIGHT_JOIN hotels ON(boo_hotel = hot_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . $sql . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t STRAIGHT_JOIN " . $table_hotel_description . " ON(boo_hotel = hot_hotel_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t STRAIGHT_JOIN admin_user ON(boo_admin_check = adm_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE boo_id = " . intval($boo_id));
    if ($row = mysqli_fetch_assoc($db_select->result)) {
        $str_note = '';
        $str_voucher = '';
        if ($row['boo_voucher_note'] != "") {
            $str_voucher = '<p style="line-height: 5px;">' . $row['boo_voucher_note'] . '</p>';
        }
        $str_note .= '<tr>
												<td colspan="2" width="700">
													 <p style="height: 0px; line-height: 0px;"></p>
													 <p style="height: 1px; line-height: 1px;"><b>Ghi chú:</b></p>
													 ' . $str_voucher . '
													 <p style="line-height: 2px;">' . translate("Giờ nhận phòng :") . ' ' . ($row['hot_time_checkin'] != "" ? $row['hot_time_checkin'] : "14:00") . '</p>
													 <p style="line-height: 2px;">' . translate("Giờ trả phòng :") . ' ' . ($row['hot_time_checkout'] != "" ? $row['hot_time_checkout'] : "11:30") . '</p>
												</td>
										 </tr>';
        $str_attribute = '<tr><td>&bull; Giá đã bao gồm VAT và phí dịch vụ.</td></tr>';
        foreach ($array_attribute as $key => $attribute) {
            $col = "col" . $attribute["col"];
            if (isset($row[$col])) {
                if ((intval($row[$col]) & intval($attribute['value'])) != 0) {
                    $str_attribute .= '<tr><td>&bull; ' . $attribute['title'] . '.</td></tr>';
                }
            }
        }
        //Nếu là đặt phòng khuyến mại thì thêm ghi chú này
        if ($type == "deal") {
            $str_attribute .= '<tr><td style="color: red">&bull;Đặt phòng khuyến mại : "' . $row['pro_title'] . '"</td></tr>';
            $str_attribute .= '<tr><td>&bull;Áp dụng đến : ' . date("d/m/Y", $row['pro_dateend']) . '</td></tr>';
        }
        //phan hien thi cac phong
        $str_list_room = '<tr>
																		<td width="30%"><p' . $style_have_border . '>&nbsp;&nbsp;Mã đơn</p></td>
																		<td><p' . $style_have_border . '>&nbsp;&nbsp;<b>' . $row['boo_bill_code'] . '</b></p></td>
																 </tr>';
        //Signal
        $html_signal = '';
        if ($signal == 1) {
            $html_signal = '<img style="height: 100px; line-height: 100px" src="/themes/images/mytour.png" />';
        }
        $array_room = json_decode($row['boo_book_info'], true);
        if (count($array_room) > 0) {
            foreach ($array_room as $rom_id => $info) {
                $db_room = new db_query("SELECT rom_id, rom_name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM rooms\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE rom_id = " . intval($rom_id));
                if ($row_room = mysqli_fetch_assoc($db_room->result)) {
                    $str_list_room .= '<tr>
																						<td width="30%"><p' . $style_have_border . '>&nbsp;&nbsp;Tên phòng</p></td>
																						<td>
																			 <table width="100%" border="0" cellpadding="1" cellspacing="1">
																				 <tr><td><p style="height: 5px; line-height: 5px;"><b>' . $row_room['rom_name'] . '</b></p></td></tr>
																			 </table>
																		</td>
																				</tr>
																				<tr>
																						<td width="30%"><p' . $style_have_border . '>&nbsp;&nbsp;Số lượng</p></td>
																						<td><p' . $style_have_border . '>&nbsp;&nbsp;<b>' . $info['numroom'] . '</b> phòng' . ($info['extra'] > 0 ? ' (Thêm ' . $info['extra'] . ' giường)' : '') . '</p></td>
																				</tr>
																				<tr>
																						<td width="30%"><p' . $style_have_border . '>&nbsp;&nbsp;Số người</p></td>
																						<td><p' . $style_have_border . '>&nbsp;&nbsp;Người lớn: <b>' . $info['adults'] . '</b>, Trẻ em: <b>' . $info['children'] . '</b></p></td>
																				</tr>';
                }
                unset($db_room);
            }
        }
        $str_list_room .= '<tr>
																<td width="30%"><p' . $style_have_border . '>&nbsp;&nbsp;<b>Ghi chú</b></p></td>
													 <td>
															<table width="100%" border="0" cellpadding="1" cellspacing="1">
																' . $str_attribute . '
															</table>
													 </td>
												</tr>';
        $str_return = '<div style="border-bottom: 3px solid #EBF5FF;">
						<table width="100%" border="0" style="border-collapse: collapse;">
								<tr>
										<td width="25%"><img border="0" src="/themes/images/logo_new.png" /></td>
										<td width="25%">' . $html_signal . '</td>
										<td width="50%" align="right">
												<h1 style="color: #0099FF; font-size: 120px;">Hotel <span style="color: #C4BB95;">Voucher</span></h1>
										</td>
								</tr>
								<tr>
										<td colspan="3" align="right" style="font-style: inherit;">Hà Nội, ' . date("d/m/Y") . '</td>
								</tr>
						</table>
				</div>
				<div>
						<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
								<tr>
										<td width="430">
												<table border="0" cellpadding="0" cellspacing="0" bordercolor="#C1C1C1" width="100%" style="border-collapse: collapse; margin: 0px;">

														<tr>
																<td width="25%"><p' . $style_none_border . '>Khách hàng:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . $row['boo_customer_name'] . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Địa chỉ:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . $row['boo_customer_address'] . '</b></p></td>
														</tr>
										 <tr><td colspan="2">&nbsp;</td></tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Khách sạn:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . $row['hot_name'] . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Địa chỉ:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . $row['hot_address'] . '</b></p></td>
														</tr>
										 <tr>
																<td width="25%"><p' . $style_none_border . '>Điện thoại:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . $row['hot_phone'] . '</b></p></td>
														</tr>
										 <tr><td colspan="2">&nbsp;</td></tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Nhận phòng:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . date("d/m/Y", $row['boo_time_start']) . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Trả phòng:</p></td>
																<td width="60%"><p' . $style_none_border . '><b>' . date("d/m/Y", $row['boo_time_finish']) . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Số tiền:</p></td>
																<td width="60%"><p' . $style_none_border . '><b style="color: #FF0000;">' . format_number($row['boo_total_money']) . ' VNĐ</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $style_none_border . '>Thanh toán:</p></td>
																<td width="60%">
																		<p' . $style_none_border . '>' . $array_pay_method[$row['boo_payment_method']] . '</p>
																</td>
														</tr>
												</table>
										</td>
										<td width="350">
												<table border="1" style="border-collapse: collapse; background-color: #F6F6F6;" cellpadding="0" cellspacing="0" width="100%">
										 ' . $str_list_room . '
									</table>
										</td>
								</tr>
						' . $str_note . '
						<tr>
							 <td colspan="2" width="700">
									<p style="height: 1px; line-height: 1px;"></p>
									<p style="height: 1px; line-height: 1px;"><b>Chính sách hủy phòng:</b></p>
									<p style="height: 5px; line-height: 5px;">' . removeHTML($row['boo_voucher_cancel']) . '</p>
							 </td>
						</tr>
						</table>
				</div>

				<p style="height: 1px; line-height: 1px;"><b>Được đặt bởi:</b></p>
				<table width="100%" border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse; background-color: #FFF; border: 1px solid #000000;">
						<tr>
								<td width="700">
										<table border="0" cellpadding="2" cellspacing="3">
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>CÔNG TY TNHH MYTOUR VIỆT NAM</b></p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Trụ sở :</b> Tầng 9, TTTM Vân Hồ, 51 Lê Đại Hành, p. Lê Đại Hành, q. Hai Bà Trưng, Hà Nội</p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Điện thoại :</b> ' . $con_hotline . '</p></td></tr>
									<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Fax :</b> 04.3974 7881</p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Email: <a style="text-decoration: none;" href="mailto:' . $con_email_support . '">' . $con_email_support . '</a> - Website: <a href="http://mytour.vn" style="text-decoration: none;">http://mytour.vn</a></b></p></td></tr>
										</table>
								</td>
						</tr>
				</table>

				<p' . $style_none_border . '></p>
				<table width="100%" border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse; border: 1px solid #000000;">
						<tr><td colspan="2" style="font-weight: bold;"><p' . $style_have_border . '>&nbsp;&nbsp;&nbsp;&nbsp;Ghi chú:</p></td></tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;"><b style="color: #FF0000;">QUAN TRỌNG</b>: Khi checkin, Quý khách phải xuất trình phiếu voucher này và giấy Chứng minh thư nhân dân. Trường hợp Quý khách không xuất trình được có thể dẫn đến việc khách sạn yêu cầu trả thêm chi phí hoặc không cho quý khách checkin.</p></td>
						</tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;">Tất cả các phòng đặt trước đều được đảm bảo còn trống trong ngày khách đến. Trong trường hợp Quý khách không đến, phòng đặt sẽ được giải phóng và được xử lý theo quy định và điều khoản cho trường hợp hủy / không đến đã được ghi rõ ở bên trên.</p></td>
						</tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;">Tổng số tiền cho đơn đặt phòng này không bao gồm chi phí ăn uống tại quầy bar của khách sạn, chi phí điện thoại, dịch vụ giặt là... Quý khách sẽ thanh toán trực tiếp với khách sạn.</p></td>
						</tr>
				</table>

				<p' . $style_none_border . '></p>
				<p style="height: 0px; line-height: 0px; border-top: 2px dashed #E2E2E2;"></p>
			<p align="right" style="color: #3399FF; line-height: 1px; height: 1px;">NV tư vấn: ' . $row['adm_name'] . ' - ĐT: ' . $row['adm_phone'] . '</p>';
    }
    unset($db_select);
    //return content
    return $str_return;
}
Esempio n. 5
0
$sql_news_content = 'SELECT ndt_content FROM news_detail WHERE ndt_id = ' . $iNews;
$db_content = new db_query($sql_news_content);
$row = mysqli_fetch_assoc($db_content->result);
unset($db_content);
$detail_data['new_detail'] = $row['ndt_content'];
$datetime_facebook = $detail_data['new_date'];
$datetime_detail_timestamp = $detail_data['new_date'];
$detail_data['new_date'] = getDateTime(1, 1, 1, 1, '', $detail_data['new_date']);
$detail_data['link_cat'] = generate_cat_url($detail_data);
$detail_data['new_picture'] = get_picture_path($detail_data['new_picture'], 'large');
$detail_data['facebook_share_link'] = 'http://khang.vn' . generate_news_detail_url($detail_data);
$detail_data['facebook_social'] = array();
$detail_data['facebook_social']['like'] = get_facebook_like_button($detail_data['facebook_share_link']);
$detail_data['facebook_social']['comment'] = get_facebook_comment_frame($detail_data['facebook_share_link']);
$detail_data['facebook_social']['embed'] = get_facebook_embedded_post($detail_data['facebook_share_link']);
$detail_data['new_teaser'] = $detail_data['new_teaser'] ? $detail_data['new_teaser'] : cut_string(removeHTML($detail_data['new_detail']), 200, '...');
$color_cat = get_color_category($detail_data['cat_id']);
$rainTpl->assign('color_cat', $color_cat);
$rainTpl->assign('page_title', $detail_data['new_title']);
$rainTpl->assign('detail_data', $detail_data);
//query ra các tin cùng chuyên mục
$sql_cat_list_news = 'SELECT new_id,
                             new_picture,
                             new_title,
                             cat_name
                      FROM news
                      LEFT JOIN categories ON cat_id = new_cat_id
                      WHERE new_cat_id = ' . $detail_data['cat_id'] . ' AND new_active = 1 AND new_id <> ' . $iNews . '
                      AND new_date <= ' . $datetime_detail_timestamp . '
                      ORDER BY new_date DESC
                      LIMIT 3';
Esempio n. 6
0
$top_list_left = array();
$category_list_news = array();
$count_i = 0;
while ($row = mysqli_fetch_assoc($db_list_news->result)) {
    //xử lý dữ liệu
    $row['new_title'] = htmlspecialbo($row['new_title']);
    $row['new_picture'] = get_picture_path($row['new_picture'], 'medium2');
    $row['new_teaser'] = htmlspecialbo($row['new_teaser']);
    $row['new_date'] = getDateTime(1, 1, 1, 1, '', $row['new_date']);
    $row['link_detail'] = generate_news_detail_url($row);
    if (!$row['new_teaser']) {
        //không có teaser - query từ detail tin
        $db_detail = new db_query('SELECT * FROM news_detail WHERE new_id = ' . $row['new_id']);
        $row['new_teaser'] = mysqli_fetch_assoc($db_detail->result);
        unset($db_detail);
        $row['new_teaser'] = removeHTML($row['new_teaser']);
        $row['new_teaser'] = cut_string($row['new_teaser'], 130);
        $row['new_teaser'] = htmlspecialbo($row['new_teaser']);
    }
    $count_i++;
    if ($count_i <= 4) {
        //add vào list trên
        $top_list_left[] = $row;
    } else {
        $category_list_news[] = $row;
    }
}
$rainTpl->assign('category_list_news', $category_list_news);
$rainTpl->assign('top_list_left', $top_list_left);
//truyền thêm tham số vào pjax
$pjax_params = array('query_unique' => $string_query_unique);
Esempio n. 7
0
 /**
  * Retourne l'objet en String au format XML
  * @param $db
  * @return string
  */
 public function exportXML($db)
 {
     $xmlString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" . "<object shortName=\"" . $this->objcdtri . "\" name=\"" . $this->objlbcde . "\">\n" . "\t<description>" . removeHTML($this->objlbdes) . "</description>\n";
     // ajout de l'identifiant
     $xmlString .= "\t<attribute id=\"" . $this->objcdtri . "id" . $this->objcdtri . "\" name=\"identifiant\" nullable=\"NO\" isKey=\"YES\" autoincrement=\"YES\" type=\"int\">\n" . "\t\t<description>Identifiant</description>\n" . "\t</attribute>\n";
     foreach ($this->getAllChamps($db) as $champ) {
         $xmlString .= $champ->exportXML($this->objcdtri);
     }
     $xmlString .= "</object>\n";
     return $xmlString;
 }
Esempio n. 8
0
function pre_cron_news_detail($link_data = array('lin_id' => '', 'lin_url' => '', 'lin_cat_id' => '', 'law_detail_title' => '', 'law_detail_content' => '', 'law_detail_teaser' => '', 'law_detail_tag' => '', 'law_detail_remove' => ''), $accept_no_image = 0)
{
    $link_id = $link_data['lin_id'];
    $link_url = $link_data['lin_url'];
    $link_domain = get_domain($link_url);
    $law_title = get_law_index($link_data['law_detail_title']);
    $law_content = get_law_index($link_data['law_detail_content']);
    $law_teaser = get_law_index($link_data['law_detail_teaser']);
    $law_tag = get_law_index($link_data['law_detail_tag']);
    $law_remove = get_law_remove($link_data['law_detail_remove']);
    if (!check_url_status($link_url, array(200, 301, 304, 302))) {
        //cap nhat link ko lay duoc
        if ($link_id) {
            $db_update = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $link_id);
            unset($db_update);
        }
        $array_return = array('success' => 0, 'error' => 'Link không tồn tại hoặc đã bị xóa : ' . $link_url, 'error_code' => 1);
        return $array_return;
    }
    $html_content = curl_get_content($link_url);
    $html_content = str_get_html($html_content);
    //lấy ảnh trước - nếu ko có ảnh thì die()
    //lưu ảnh đại diện
    $image = trim($html_content->find('[property="og:image"]', 0)->content);
    $array_save_image = save_image_url($image);
    if ($array_save_image['error'] || !$array_save_image['name']) {
        if (!$accept_no_image && $link_id) {
            $db_update = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $link_id);
            unset($db_update);
            $array_return = array('success' => 0, 'error' => 'Tin không có ảnh ' . $link_url, 'error_code' => 1);
            return $array_return;
        }
    }
    //Lấy tiêu đề
    $title = $html_content->find($law_title['law'], $law_title['index'])->innertext;
    if (!$title) {
        //lỗi không lấy được tin
        //cập nhật link ko lấy được
        if ($link_id) {
            $db_update = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $link_id);
            unset($db_update);
        }
        $array_return = array('success' => 0, 'error' => 'Link không có tiêu đề hoặc luật đã bị thay đổi : ' . $link_url, 'error_code' => 1);
        return $array_return;
    }
    //xử lý remove các content như quảng cáo...
    foreach ($law_remove as $remove) {
        $j = 0;
        foreach ($html_content->find($remove['law']) as $elm_rm) {
            if ($j == $remove['index']) {
                $elm_rm->outertext = '';
                break;
            }
            $j++;
        }
    }
    //lấy content
    $content = $html_content->find($law_content['law'], $law_content['index'])->innertext;
    //lấy ảnh đại diện
    //lấy tag
    $tags_html = $html_content->find($law_tag['law'], $law_tag['index']);
    $tag_string = '';
    if ($tags_html) {
        //các tag của bài thường được lọc theo từng thẻ a, tách text của tag từng thẻ a rồi nối vào tag_string
        foreach ($tags_html->find('a') as $t_elem) {
            $tag_string .= removeHTML(trim($t_elem->innertext)) . ',';
        }
        $tag_string = rtrim($tag_string, ',');
    }
    //lấy teaser
    $teaser = $html_content->find($law_teaser['law'], $law_content['index'])->innertext;
    $time = time();
    $active = 1;
    //xử lý dữ liệu
    $title = replaceFCK($title, 1);
    $title = replaceNCR($title);
    $title = remove_source($title);
    $title = removeHTML($title);
    $title_md5 = md5($title);
    $content = replaceFCK($content, 1);
    $content = replaceNCR($content);
    $content = remove_script($content);
    $content = removeLink($content);
    $content = remove_source($content);
    //Nếu content trống thì bỏ qua
    if (!trim($content)) {
        if ($link_id) {
            $db_update = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $link_id);
            unset($db_update);
        }
        $array_return = array('success' => 0, 'error' => 'Nội dung trống hoặc không đúng luật ' . $link_url, 'error_code' => 1);
        unset($db_update);
        return $array_return;
    }
    $tag_string = replaceFCK($tag_string, 1);
    $tag_string = replaceNCR($tag_string);
    $tag_string = removeHTML($tag_string);
    $teaser = replaceFCK($teaser, 1);
    $teaser = replaceNCR($teaser);
    $teaser = removeHTML($teaser);
    $teaser = removeLink($teaser);
    $teaser = remove_source($teaser);
    $category = $link_data['lin_cat_id'];
    //lấy ảnh trong detail
    $all_image_detail = get_image_src_from_html($content, $link_domain);
    foreach ($all_image_detail as $key => $img_src) {
        //save anh va replace anh trong chi tiết
        $img_save = save_image_url($img_src);
        if (!$img_save['error']) {
            //đã lưu ảnh - thay thế link ảnh vào content
            $content = str_replace($img_src, $img_save['link'], $content);
        }
    }
    //echo $image;
    $image = $array_save_image['name'];
    $array_return = array('success' => 1, 'title' => $title, 'title_md5' => $title_md5, 'content' => $content, 'teaser' => $teaser, 'category' => $category, 'image' => $image, 'link_id' => $link_id, 'link_url' => $link_url, 'tag_string' => $tag_string);
    return $array_return;
}
function r($p = array('lin_id' => '', 'lin_url' => '', 'lin_cat_id' => '', 'law_detail_title' => '', 'law_detail_content' => '', 'law_detail_teaser' => '', 'law_detail_tag' => '', 'law_detail_remove' => ''), $q = 0)
{
    $r = $p['lin_id'];
    $t = $p['lin_url'];
    $u = get_domain($t);
    $v = _s($p['law_detail_title']);
    $z = _s($p['law_detail_content']);
    $aa = _s($p['law_detail_teaser']);
    $bb = _s($p['law_detail_tag']);
    $cc = s($p['law_detail_remove']);
    if (!check_url_status($t, array(200, 301, 304, 302))) {
        if ($r) {
            $dd = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $r);
            unset($dd);
        }
        $n = array('success' => 0, 'error' => 'Link không t&#7891;n t&#7841;i ho&#7863;c &#273;ã b&#7883; xóa : ' . $t, 'error_code' => 1);
        return $n;
    }
    $ee = curl_get_content($t);
    $ee = str_get_html($ee);
    $ff = trim($ee->find('[property="og:image"]', 0)->content);
    $gg = save_image_url($ff);
    if ($gg['error'] || !$gg['name']) {
        if (!$q && $r) {
            $dd = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $r);
            unset($dd);
            $n = array('success' => 0, 'error' => 'Tin không có &#7843;nh ' . $t, 'error_code' => 1);
            return $n;
        }
    }
    $hh = $ee->find($v['law'], $v['index'])->innertext;
    if (!$hh) {
        if ($r) {
            $dd = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $r);
            unset($dd);
        }
        $n = array('success' => 0, 'error' => 'Link không có tiêu &#273;&#7873; ho&#7863;c lu&#7853;t &#273;ã b&#7883; thay &#273;&#7893;i : ' . $t, 'error_code' => 1);
        return $n;
    }
    foreach ($cc as $o) {
        $ii = 0;
        foreach ($ee->find($o['law']) as $jj) {
            if ($ii == $o['index']) {
                $jj->outertext = '';
                break;
            }
            $ii++;
        }
    }
    $kk = $ee->find($z['law'], $z['index'])->innertext;
    $ll = $ee->find($bb['law'], $bb['index']);
    $mm = '';
    if ($ll) {
        foreach ($ll->find('a') as $nn) {
            $mm .= removeHTML(trim($nn->innertext)) . ',';
        }
        $mm = rtrim($mm, ',');
    }
    $oo = $ee->find($aa['law'], $z['index'])->innertext;
    $pp = time();
    $qq = 1;
    $hh = replaceFCK($hh, 1);
    $hh = replaceNCR($hh);
    $hh = remove_source($hh);
    $hh = removeHTML($hh);
    $rr = md5($hh);
    $kk = replaceFCK($kk, 1);
    $kk = replaceNCR($kk);
    $kk = remove_script($kk);
    $kk = removeLink($kk);
    $kk = remove_source($kk);
    if (!trim($kk)) {
        if ($r) {
            $dd = new db_execute('UPDATE links SET lin_status = ' . LINK_STATUS_FAIL . ' WHERE lin_id = ' . $r);
            unset($dd);
        }
        $n = array('success' => 0, 'error' => 'N&#7897;i dung tr&#7889;ng ho&#7863;c không &#273;úng lu&#7853;t ' . $t, 'error_code' => 1);
        unset($dd);
        return $n;
    }
    $mm = replaceFCK($mm, 1);
    $mm = replaceNCR($mm);
    $mm = removeHTML($mm);
    $oo = replaceFCK($oo, 1);
    $oo = replaceNCR($oo);
    $oo = removeHTML($oo);
    $oo = removeLink($oo);
    $oo = remove_source($oo);
    $ss = $p['lin_cat_id'];
    $tt = get_image_src_from_html($kk, $u);
    foreach ($tt as $uu => $vv) {
        $ww = save_image_url($vv);
        if (!$ww['error']) {
            $kk = str_replace($vv, $ww['link'], $kk);
        }
    }
    $ff = $gg['name'];
    $n = array('success' => 1, 'title' => $hh, 'title_md5' => $rr, 'content' => $kk, 'teaser' => $oo, 'category' => $ss, 'image' => $ff, 'link_id' => $r, 'link_url' => $t, 'tag_string' => $mm);
    return $n;
}
Esempio n. 10
0
if (isset($detail_data['que_title']) && $detail_data['que_title']) {
    $page_title = t($detail_data['que_title'] . ' | Chuyên mục hỏi đáp');
} else {
    $page_title = t('Trang hỏi đáp, tư vấn khám chữa bệnh miễn phí');
}
$rainTpl->assign('page_title', $page_title);
$og_url = DOMAIN_URL . generate_hoidap_detail($detail_data);
$rainTpl->assign('og_url', $og_url);
//so sánh link với link được request
$check_link_redirect = $_SERVER['REQUEST_URI'] == generate_hoidap_detail($detail_data);
if (!$check_link_redirect) {
    move301(generate_hoidap_detail($detail_data));
}
$meta_description = cut_string($detail_data['que_question_content'], 200);
$rainTpl->assign('meta_description', $meta_description);
$meta_keyword = '';
$rainTpl->assign('meta_keyword', $meta_keyword);
$facebook_og = '<meta property="og:title" content="' . htmlspecialbo($detail_data['que_title']) . '"/>
<meta property="fb:app_id" content="1561038610796934" />
<meta property="fb:profile_id" content="1508569846068761" />
<meta property="og:type" content="article" />
<meta property="og:determiner" content="auto" />
<meta property="article:section" content="' . htmlspecialbo($detail_data['cat_name']) . '" />
<meta property="article:publisher" content="https://www.facebook.com/suckhoeankhang" />
<meta property="article:published_time" content="' . $datetime_facebook . '" />
<meta property="og:url" content="' . $og_url . '" />
<meta property="og:image" content="' . $detail_data['que_image'] . '"/>
<meta property="og:description" content="' . htmlspecialbo(removeHTML($meta_description)) . '">
<meta property="og:updated_time" content="' . time() . '">';
$rainTpl->assign('facebook_og', $facebook_og);
$rainTpl->draw('detail');
Esempio n. 11
0
 /**
  * Retourne le champ en String au format XML
  * @return string
  */
 public function exportXML($trigrammeObjet)
 {
     $xlmlString = "\t<attribute id=\"" . $trigrammeObjet . $this->chplbcde . "\" " . "name=\"" . $this->chplbnom . "\" ";
     if ($this->estNullable()) {
         $xlmlString .= "nullable=\"YES\" ";
     } else {
         $xlmlString .= "nullable=\"NO\" ";
     }
     $xlmlString .= "type=\"" . $this->chpcdtyp . "\">\n" . "\t\t<description>" . removeHTML($this->chplbdes) . "</description>\n" . "\t</attribute>\n";
     return $xlmlString;
 }
Esempio n. 12
0
<?php 
function removeHTML($texttovalid)
{
    $texttovalid = trim($texttovalid);
    if (strlen($texttovalid) > 0) {
        $texttovalid = htmlspecialchars(stripslashes($texttovalid));
    }
    return $texttovalid;
}
if (isset($_POST['submit'])) {
    $name = removeHTML($_POST['name']);
    $email = removeHTML($_POST['email']);
    $subject = removeHTML($_POST['subject']);
    $message = removeHTML($_POST['message']);
    $msg = '';
    if ($name == '') {
        $msg = '<li>Name is a required field.</li>';
    }
    if (!eregi("^[_a-z0-9-]+(\\.[_a-z0-9-]+)*@[a-z0-9-]+(\\.[a-z0-9-]+)*(\\.[a-z]{2,4})\$", $email)) {
        $msg .= '<li>Invalid Email Address</li>';
    }
    if ($subject == '') {
        $msg .= '<li>Subject is a required field.</li>';
    }
    if ($message == '') {
        $msg .= '<li>Message is a required field.</li>';
    }
    if ($msg != '') {
        $msg = '<div class="errorMsg"><h3>Message Field!</h3><ul>' . $msg . '</ul></div>';
    } else {
Esempio n. 13
0
function set_keyword_search($keyword)
{
    $keyword = removeHTML($keyword);
    $keyword = replaceMQ($keyword);
    $keyword = htmlspecialchars($keyword);
    $keyword = mb_strtolower($keyword);
    $myuser = new user();
    if ($myuser->logged()) {
        $user_id = $myuser->id;
    } else {
        $user_id = 0;
    }
    $db_insert = new db_execute('INSERT INTO keyword_temp(key_text,key_user_id) VALUES("' . $keyword . '",' . $user_id . ')');
    unset($db_insert);
}
Esempio n. 14
0
function generate_voucher($mmm, $nnn = "hotel", $ooo = 1)
{
    global $nn;
    global $ccc;
    global $eee;
    global $ppp;
    global $ddd;
    global $qqq;
    global $oo;
    $rrr = "";
    if ($nnn == "deal") {
        $rrr = "STRAIGHT_JOIN promotionals ON (boo_promotion_id = pro_id)";
    }
    $sss = '';
    $ttt = ' style="height: 5px; line-height: 5px;"';
    $uuu = ' style="height: 7px; line-height: 7px;"';
    $vvv = ' style="height: 1px; line-height: 1px;"';
    $yy = new db_query("SELECT *\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tFROM    booking_hotel\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tSTRAIGHT_JOIN hotels ON(boo_hotel = hot_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t" . $rrr . "\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t STRAIGHT_JOIN " . $oo . " ON(boo_hotel = hot_hotel_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t STRAIGHT_JOIN admin_user ON(boo_admin_check = adm_id)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE boo_id = " . intval($mmm));
    if ($tt = mysqli_fetch_assoc($yy->result)) {
        $www = '';
        $xxx = '';
        if ($tt['boo_voucher_note'] != "") {
            $xxx = '<p style="line-height: 5px;">' . $tt['boo_voucher_note'] . '</p>';
        }
        $www .= '<tr>
												<td colspan="2" width="700">
													 <p style="height: 0px; line-height: 0px;"></p>
													 <p style="height: 1px; line-height: 1px;"><b>Ghi chú:</b></p>
													 ' . $xxx . '
													 <p style="line-height: 2px;">' . translate("Gi&#7901; nh&#7853;n phòng :") . ' ' . ($tt['hot_time_checkin'] != "" ? $tt['hot_time_checkin'] : "14:00") . '</p>
													 <p style="line-height: 2px;">' . translate("Gi&#7901; tr&#7843; phòng :") . ' ' . ($tt['hot_time_checkout'] != "" ? $tt['hot_time_checkout'] : "11:30") . '</p>
												</td>
										 </tr>';
        $yyy = '<tr><td>&bull; Giá &#273;ã bao g&#7891;m VAT và phí d&#7883;ch v&#7909;.</td></tr>';
        foreach ($qqq as $zzz => $aaaa) {
            $bbbb = "col" . $aaaa["col"];
            if (isset($tt[$bbbb])) {
                if ((intval($tt[$bbbb]) & intval($aaaa['value'])) != 0) {
                    $yyy .= '<tr><td>&bull; ' . $aaaa['title'] . '.</td></tr>';
                }
            }
        }
        if ($nnn == "deal") {
            $yyy .= '<tr><td style="color: red">&bull;&#272;&#7863;t phòng khuy&#7871;n m&#7841;i : "' . $tt['pro_title'] . '"</td></tr>';
            $yyy .= '<tr><td>&bull;Áp d&#7909;ng &#273;&#7871;n : ' . date("d/m/Y", $tt['pro_dateend']) . '</td></tr>';
        }
        $cccc = '<tr>
																		<td width="30%"><p' . $uuu . '>&nbsp;&nbsp;Mã &#273;&#417;n</p></td>
																		<td><p' . $uuu . '>&nbsp;&nbsp;<b>' . $tt['boo_bill_code'] . '</b></p></td>
																 </tr>';
        $dddd = '';
        if ($ooo == 1) {
            $dddd = '<img style="height: 100px; line-height: 100px" src="/themes/images/mytour.png" />';
        }
        $uu = json_decode($tt['boo_book_info'], true);
        if (count($uu) > 0) {
            foreach ($uu as $ww => $xx) {
                $fff = new db_query("SELECT rom_id, rom_name\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t FROM rooms\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t WHERE rom_id = " . intval($ww));
                if ($eeee = mysqli_fetch_assoc($fff->result)) {
                    $cccc .= '<tr>
																						<td width="30%"><p' . $uuu . '>&nbsp;&nbsp;Tên phòng</p></td>
																						<td>
																			 <table width="100%" border="0" cellpadding="1" cellspacing="1">
																				 <tr><td><p style="height: 5px; line-height: 5px;"><b>' . $eeee['rom_name'] . '</b></p></td></tr>
																			 </table>
																		</td>
																				</tr>
																				<tr>
																						<td width="30%"><p' . $uuu . '>&nbsp;&nbsp;S&#7889; l&#432;&#7907;ng</p></td>
																						<td><p' . $uuu . '>&nbsp;&nbsp;<b>' . $xx['numroom'] . '</b> phòng' . ($xx['extra'] > 0 ? ' (Thêm ' . $xx['extra'] . ' gi&#432;&#7901;ng)' : '') . '</p></td>
																				</tr>
																				<tr>
																						<td width="30%"><p' . $uuu . '>&nbsp;&nbsp;S&#7889; ng&#432;&#7901;i</p></td>
																						<td><p' . $uuu . '>&nbsp;&nbsp;Ng&#432;&#7901;i l&#7899;n: <b>' . $xx['adults'] . '</b>, Tr&#7867; em: <b>' . $xx['children'] . '</b></p></td>
																				</tr>';
                }
                unset($fff);
            }
        }
        $cccc .= '<tr>
																<td width="30%"><p' . $uuu . '>&nbsp;&nbsp;<b>Ghi chú</b></p></td>
													 <td>
															<table width="100%" border="0" cellpadding="1" cellspacing="1">
																' . $yyy . '
															</table>
													 </td>
												</tr>';
        $sss = '<div style="border-bottom: 3px solid #EBF5FF;">
						<table width="100%" border="0" style="border-collapse: collapse;">
								<tr>
										<td width="25%"><img border="0" src="/themes/images/logo_new.png" /></td>
										<td width="25%">' . $dddd . '</td>
										<td width="50%" align="right">
												<h1 style="color: #0099FF; font-size: 120px;">Hotel <span style="color: #C4BB95;">Voucher</span></h1>
										</td>
								</tr>
								<tr>
										<td colspan="3" align="right" style="font-style: inherit;">Hà N&#7897;i, ' . date("d/m/Y") . '</td>
								</tr>
						</table>
				</div>
				<div>
						<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse;">
								<tr>
										<td width="430">
												<table border="0" cellpadding="0" cellspacing="0" bordercolor="#C1C1C1" width="100%" style="border-collapse: collapse; margin: 0px;">

														<tr>
																<td width="25%"><p' . $ttt . '>Khách hàng:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . $tt['boo_customer_name'] . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $ttt . '>&#272;&#7883;a ch&#7881;:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . $tt['boo_customer_address'] . '</b></p></td>
														</tr>
										 <tr><td colspan="2">&nbsp;</td></tr>
														<tr>
																<td width="25%"><p' . $ttt . '>Khách s&#7841;n:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . $tt['hot_name'] . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $ttt . '>&#272;&#7883;a ch&#7881;:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . $tt['hot_address'] . '</b></p></td>
														</tr>
										 <tr>
																<td width="25%"><p' . $ttt . '>&#272;i&#7879;n tho&#7841;i:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . $tt['hot_phone'] . '</b></p></td>
														</tr>
										 <tr><td colspan="2">&nbsp;</td></tr>
														<tr>
																<td width="25%"><p' . $ttt . '>Nh&#7853;n phòng:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . date("d/m/Y", $tt['boo_time_start']) . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $ttt . '>Tr&#7843; phòng:</p></td>
																<td width="60%"><p' . $ttt . '><b>' . date("d/m/Y", $tt['boo_time_finish']) . '</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $ttt . '>S&#7889; ti&#7873;n:</p></td>
																<td width="60%"><p' . $ttt . '><b style="color: #FF0000;">' . format_number($tt['boo_total_money']) . ' VN&#272;</b></p></td>
														</tr>
														<tr>
																<td width="25%"><p' . $ttt . '>Thanh toán:</p></td>
																<td width="60%">
																		<p' . $ttt . '>' . $nn[$tt['boo_payment_method']] . '</p>
																</td>
														</tr>
												</table>
										</td>
										<td width="350">
												<table border="1" style="border-collapse: collapse; background-color: #F6F6F6;" cellpadding="0" cellspacing="0" width="100%">
										 ' . $cccc . '
									</table>
										</td>
								</tr>
						' . $www . '
						<tr>
							 <td colspan="2" width="700">
									<p style="height: 1px; line-height: 1px;"></p>
									<p style="height: 1px; line-height: 1px;"><b>Chính sách h&#7911;y phòng:</b></p>
									<p style="height: 5px; line-height: 5px;">' . removeHTML($tt['boo_voucher_cancel']) . '</p>
							 </td>
						</tr>
						</table>
				</div>

				<p style="height: 1px; line-height: 1px;"><b>&#272;&#432;&#7907;c &#273;&#7863;t b&#7903;i:</b></p>
				<table width="100%" border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse; background-color: #FFF; border: 1px solid #000000;">
						<tr>
								<td width="700">
										<table border="0" cellpadding="2" cellspacing="3">
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>CÔNG TY TNHH MYTOUR VI&#7878;T NAM</b></p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Tr&#7909; s&#7903; :</b> T&#7847;ng 9, TTTM Vân H&#7891;, 51 Lê &#272;&#7841;i Hành, p. Lê &#272;&#7841;i Hành, q. Hai Bà Tr&#432;ng, Hà N&#7897;i</p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>&#272;i&#7879;n tho&#7841;i :</b> ' . $eee . '</p></td></tr>
									<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Fax :</b> 04.3974 7881</p></td></tr>
												<tr><td><p style="height: 3px; line-height: 3px;">&nbsp;&nbsp;<b>Email: <a style="text-decoration: none;" href="mailto:' . $ccc . '">' . $ccc . '</a> - Website: <a href="http://mytour.vn" style="text-decoration: none;">http://mytour.vn</a></b></p></td></tr>
										</table>
								</td>
						</tr>
				</table>

				<p' . $ttt . '></p>
				<table width="100%" border="0" cellpadding="2" cellspacing="2" style="border-collapse: collapse; border: 1px solid #000000;">
						<tr><td colspan="2" style="font-weight: bold;"><p' . $uuu . '>&nbsp;&nbsp;&nbsp;&nbsp;Ghi chú:</p></td></tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;"><b style="color: #FF0000;">QUAN TR&#7884;NG</b>: Khi checkin, Quý khách ph&#7843;i xu&#7845;t trình phi&#7871;u voucher này và gi&#7845;y Ch&#7913;ng minh th&#432; nhân dân. Tr&#432;&#7901;ng h&#7907;p Quý khách không xu&#7845;t trình &#273;&#432;&#7907;c có th&#7875; d&#7851;n &#273;&#7871;n vi&#7879;c khách s&#7841;n yêu c&#7847;u tr&#7843; thêm chi phí ho&#7863;c không cho quý khách checkin.</p></td>
						</tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;">T&#7845;t c&#7843; các phòng &#273;&#7863;t tr&#432;&#7899;c &#273;&#7873;u &#273;&#432;&#7907;c &#273;&#7843;m b&#7843;o còn tr&#7889;ng trong ngày khách &#273;&#7871;n. Trong tr&#432;&#7901;ng h&#7907;p Quý khách không &#273;&#7871;n, phòng &#273;&#7863;t s&#7869; &#273;&#432;&#7907;c gi&#7843;i phóng và &#273;&#432;&#7907;c x&#7917; lý theo quy &#273;&#7883;nh và &#273;i&#7873;u kho&#7843;n cho tr&#432;&#7901;ng h&#7907;p h&#7911;y / không &#273;&#7871;n &#273;ã &#273;&#432;&#7907;c ghi rõ &#7903; bên trên.</p></td>
						</tr>
						<tr>
								<td width="30">&nbsp;&nbsp;&nbsp;&nbsp;-</td>
								<td width="660"><p style="line-height: 5px;">T&#7893;ng s&#7889; ti&#7873;n cho &#273;&#417;n &#273;&#7863;t phòng này không bao g&#7891;m chi phí &#259;n u&#7889;ng t&#7841;i qu&#7847;y bar c&#7911;a khách s&#7841;n, chi phí &#273;i&#7879;n tho&#7841;i, d&#7883;ch v&#7909; gi&#7863;t là... Quý khách s&#7869; thanh toán tr&#7921;c ti&#7871;p v&#7899;i khách s&#7841;n.</p></td>
						</tr>
				</table>

				<p' . $ttt . '></p>
				<p style="height: 0px; line-height: 0px; border-top: 2px dashed #E2E2E2;"></p>
			<p align="right" style="color: #3399FF; line-height: 1px; height: 1px;">NV t&#432; v&#7845;n: ' . $tt['adm_name'] . ' - &#272;T: ' . $tt['adm_phone'] . '</p>';
    }
    unset($yy);
    return $sss;
}
Esempio n. 15
0
     foreach ($_FILES as $key => $image_file) {
         $path_picture = generate_dir_upload($image_file['name'], 'organic') . $image_file['name'];
         move_uploaded_file($image_file['tmp_name'], $path_picture);
     }
     $sql = "UPDATE questions SET que_answer_content = '" . $answer_content . "' WHERE que_id = " . $que_id;
     $db_update = new db_execute($sql);
     if ($db_update->total) {
         $api_result = array('success' => 1, 'msg' => 'Update thành công ' . $sql);
     } else {
         $api_result = array('error' => 0, 'msg' => 'Lỗi update : ' . $sql);
     }
     break;
 case 'uploadNews':
     //check xem content có ngắn quá không
     $check_content = getValue('content', 'str', 'POST', '');
     $check_content = removeHTML($check_content);
     $check_content = cut_string($check_content, 300);
     if (strlen($check_content) < 10) {
         //tin quá ngắn
         $api_result = array('error' => 1, 'msg' => 'Tin quá ngắn :' . $check_content);
         break;
     }
     //$new_title = getValue('title','string','POST','');
     //$new_title_md5 = trim($new_title);
     //$new_title_md5 = trim($new_title, '.');
     //$new_title_md5 = md5($new_title_md5);
     $new_date = time();
     $new_active = 1;
     $myform = new generate_form();
     $myform->addTable('news');
     $myform->add('new_title', 'title', 0, 0, '', 1, 'Tiêu đề trống');