function check_admin($email, $password) { $check = get_a_record('account', 'email', $email); if ($check != null) { if ($password == $check['password']) { return true; } } return false; }
/** * Xóa bản ghi có khóa chính là $id */ function products_delete($id) { $id = intval($id); $product = get_a_record('products', $id); $image = 'public/upload/product/' . $product['image']; if (is_file($image)) { unlink($image); } $sql = "DELETE FROM products WHERE id={$id}"; mysql_query($sql) or die(mysql_error()); }
<?php $active = "abroad"; $lang = get_lang(); if (isset($_POST['submit'])) { $abroad_name = $_POST['abroad_name']; $title = $_POST['title']; $content = $_POST['content']; $abroad_id = get_a_record('abroads', 'abroad_name', $abroad_name); $abroad = array('abroad_id' => $abroad_id['abroad_id'], 'title' => $title, 'content' => $content); save('abroad_offers', $abroad); $success = "Thêm thành công ! "; } $abroad_name = get_all('abroads'); require 'view/abroad/add_abroad.php';
$active = 'tour'; $lang = get_lang(); $title = "Thêm tour du lịch"; $current_possition = array(array('name' => 'Danh sách các tour', 'link' => 'index.php?lang=' . $lang . '&controller=tour')); $tour_region = get_all('tour_region'); if (isset($_POST['submit'])) { $title = $_POST['title']; $description = $_POST['description']; $tour_region_code = $_POST['tour_region_name']; $time = $_POST['time']; $total_cost = $_POST['total_cost']; $content = $_POST['content']; $content_cost = $_POST['content_cost']; $possition = $_POST['possition']; $image_relate = $_POST['image_relate']; $tour_country_code = get_a_record('tour_region', 'tour_region_code', $tour_region_code); $tour_country_code = $tour_country_code['tour_country_code']; if ($tour_country_code == 1) { $tour_country_name = 'incountry'; } else { if ($tour_country_code == 2) { $tour_country_name = 'outcountry'; } } $success = null; $errors = 0; //Processing upload image $image = $_FILES['upload_image']['name']; if ($image) { $extension = getExtension($image); $extension = strtolower($extension);
<?php //load model require_once 'backend/models/categories.php'; //if form submit if (!empty($_POST)) { $category = array('id' => intval($_POST['id']), 'name' => escape($_POST['name']), 'position' => intval($_POST['position'])); save('categories', $category); header('location:admin.php?controller=category'); } else { } if (isset($_GET['cid'])) { $cid = intval($_GET['cid']); } else { $cid = 0; } //data $title = $cid == 0 ? 'Thêm danh mục' : 'Sửa danh mục'; $user = $_SESSION['user']; $category = get_a_record('categories', $cid); //load view require 'backend/views/category/edit.php';
<?php $active = "labor"; $lang = get_lang(); if (isset($_POST['submit'])) { $labor_name = $_POST['labor_name']; $title = $_POST['title']; $content = $_POST['content']; $labor_id = get_a_record('labor', 'labor_name', $labor_name); $labor = array('labor_id' => $labor_id['labor_id'], 'title' => $title, 'content' => $content); save('labor_content', $labor); $success = "Thêm thành công ! "; } $labor_name = get_all('labor'); require 'view/labor/add_labor.php';
// Check if $uploadOk is set to 0 by an error if ($uploadOk == 0) { $error = $error . "! Sorry, your file was not uploaded."; // if everything is ok, try to upload file } else { if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { //echo "The file ". basename( $_FILES["fileToUpload"]["name"]). " has been uploaded."; $success1 = 'Thành công'; } else { $error = "Sorry, there was an error uploading your file."; } } $image = basename($_FILES['fileToUpload']['name']); $image = 'asset/image/visa/' . $lang . '/' . $image; $passport_visa_name = $_POST['passport_visa_name']; $passport_visa_code = get_a_record('passport_visa', 'passport_visa_name', $passport_visa_name); $title = $_POST['title']; $description = $_POST['description']; $content = $_POST['noidung']; $create_at = get_time(); $passport_visa_offers = array('passport_visa_code' => $passport_visa_code['passport_visa_code'], 'title' => $title, 'description' => $description, 'content' => $content, 'image' => $image, 'create_at' => $create_at); save('passport_visa_offers', $passport_visa_offers); $success = "Thêm thành công !"; //var_dump($passport_visa_offers); } else { $success = "Chưa chọn ảnh !"; } //$type = substr(strrchr($tmp, "."), 1); //$masp = substr($tmp, 0 ,strlen($tmp)-strlen($type)-1); } require 'view/visa/add_visapost.php';
<?php // Load model ================================================================== // Title website =============================================================== $title = CONTACT_TITLE_RESPONE; // get data =================================================================== if (isset($_GET['cid'])) { $cid = intval($_GET['cid']); $contact = get_a_record('contact', $cid); if (count($contact) == 0) { header("location:admin.php?controller=contact"); } } else { header("location:admin.php?controller=contact"); } //load View =================================================================== require 'backend/views/contact/respone.php';
<?php $lang = get_lang(); if (isset($_GET['delete'])) { $image = get_a_record('passport_visa_offers', 'passport_visa_offer_code', $_GET['delete']); $image = '../' . $image['image']; unlink($image); $a = delete('passport_visa_offers', 'passport_visa_offer_code', $_GET['delete']); } $active = 'visa'; $passport_visa = get_all('passport_visa'); if (isset($_POST['passport_visa_code'])) { $passport_visa_code = $_POST['passport_visa_code']; if ($passport_visa_code == 0) { $products = get_all('passport_visa_offers'); } else { $selected = $passport_visa_code; $products = get_all_record('passport_visa_offers', 'passport_visa_code', $passport_visa_code); } } else { $products = get_all('passport_visa_offers'); } require 'view/visa/index.php';
<?php //load model require_once 'backend/models/orders.php'; if (isset($_GET['oid'])) { $oid = intval($_GET['oid']); } else { $oid = 0; } $order = get_a_record('orders', $oid); if (!$order) { show_404(); } //data $title = 'Chi tiết đơn hàng'; $user = $_SESSION['user']; $order_detail = order_detail($oid); //load view require 'backend/views/order/view.php';
<th>Title</th> <th>Content</th> <th>Sửa</th> <th>Xóa</th> </tr> </thead> <tbody> <?php if ($products != null) { ?> <?php foreach ($products as $key => $value) { ?> <tr> <?php $labor_name = get_a_record('labor', 'labor_id', $value['labor_id']); ?> <td><?php echo $value['labor_content_id']; ?> </td> <td><?php echo $labor_name['labor_name']; ?> </td> <td><?php echo $value['title']; ?> </td> <td><?php echo $value['content'];
<?php $active = 'Tin tức'; $title = 'Danh sách tin tức'; $lang = get_lang(); if (isset($_GET['code'])) { $current_possition = array(array('name' => 'Tin tức - Sự kiện', 'link' => 'index.php?controller=news')); $code = $_GET['code']; $image = get_a_record('news_event_content', 'news_event_code', $code); $image = $image['image']; $check = delete('news_event_content', 'news_event_code', $code); if ($check) { $success = 'Xóa thành công'; if ($image != "") { unlink(ROOTPATH . $image); } } else { $success = 'Xóa thành công'; } } header('location: index.php?controller=news');
<?php //load model require_once 'backend/models/unit.php'; //if form submit if (!empty($_POST)) { $unit = array('id' => intval($_POST['id']), 'unit_name' => escape($_POST['name'])); save('unit', $unit); header('location:admin.php?controller=unit&statusupdate=true'); } if (isset($_GET['cid'])) { $cid = intval($_GET['cid']); } else { $cid = 0; } //data $title = $cid == 0 ? UNIT_TITLE_ADD : UNIT_TITLE_EDIT; $unit = get_a_record('unit', $cid); //load view require 'backend/views/unit/edit.php';
<?php $title = "AD Tourist - Visa hộ chiếu "; $visa1 = get_all_record('passport_visa_offers', 'passport_visa_code', '1'); $visa2 = get_all_record('passport_visa_offers', 'passport_visa_code', '2'); $visa5 = get_all_record('passport_visa_offers', 'passport_visa_code', '5'); $visa6 = get_all_record('passport_visa_offers', 'passport_visa_code', '6'); $visa7 = get_all_record('passport_visa_offers', 'passport_visa_code', '7'); $visa8 = get_all_record('passport_visa_offers', 'passport_visa_code', '8'); $visa9 = get_all_record('passport_visa_offers', 'passport_visa_code', '9'); $lang = get_lang(); $area = get_all('car_area'); $news = get_all('news_event'); $tour_region = get_all('tour_region'); $passport_visa_name = get_all('passport_visa'); if (isset($_GET['passport_visa_code']) && isset($_GET['pass_offer'])) { $passport_visa_code = $_GET['passport_visa_code']; $pass_offer = $_GET['pass_offer']; $visa_offer = get_a_record('passport_visa_offers', 'passport_visa_offer_code', $pass_offer); } elseif (isset($_GET['passport_visa_code'])) { $passport_visa_code = $_GET['passport_visa_code']; } else { $passport_visa_code = 1; } $id = get_a_record('passport_visa', 'passport_visa_code', $passport_visa_code); $content = get_all_record('passport_visa_offers', 'passport_visa_code', $id['passport_visa_code']); require_once BASEPATH . 'view/visa/servicevisa.php';
<?php //Title website =============================================================== if (isset($_GET['bid'])) { $bid = intval($_GET['bid']); } else { $bid = 0; } $title = $bid == 0 ? BRANCH_ADD_TITLE_INDEX : BRANCH_UPDATE_TITLE_INDEX; // get data =================================================================== $branch = get_a_record('branches', $bid); //load View =================================================================== require 'backend/views/wheretobuy/edit.php';
<?php if (isset($_SESSION['email']) && isset($_SESSION['password'])) { $email = $_SESSION['email']; $password = $_SESSION['password']; $check = check_admin($email, $password); if ($check) { $active = 'news'; $title = "Tin tức sự kiện"; if (isset($_GET['news_code'])) { $news_code = $_GET['news_code']; $news = get_a_record('news_event_content', 'content', $news_code); require_once 'view/news/news_detail.php'; } else { header('location: index.php'); } } else { header('location: index.php?controller=sign'); } } else { header('location: index.php?controller=sign'); }
<th>Title</th> <th>Content</th> <th>Sửa</th> <th>Xóa</th> </tr> </thead> <tbody> <?php if ($products != null) { ?> <?php foreach ($products as $key => $value) { ?> <tr> <?php $ticket_plane_name = get_a_record('ticket_plane', 'ticket_plane_id', $value['ticket_plane_id']); ?> <td><?php echo $ticket_plane_name['ticket_plane_name']; ?> </td> <td><?php echo $value['ticket_plane_title']; ?> </td> <td><?php echo $value['ticket_plane_content']; ?> </td> <td> <a href="index.php?controller=ticket_plane&action=change&ticket_plane_content_id=<?php
<?php $active = 'car'; $lang = get_lang(); $title = "Sửa nội dung"; if (isset($_GET['code']) && !isset($_POST['submit'])) { $code = $_GET['code']; $service = get_a_record('car_service', 'mshx', $code); $current_possition = array(array('name' => 'Danh sách hãng xe', 'link' => 'index.php?lang=' . $lang . '&controller=service_car'), array('name' => $service['tenhangxe'], 'link' => 'index.php?lang=' . $lang . '&controller=service_car&action=detail_service&code=' . $service['mshx'])); require_once 'view/service_car/edit.php'; } else { if (isset($_POST['submit']) && isset($_GET['code'])) { $code = $_GET['code']; $service = get_a_record('car_service', 'mshx', $code); $current_possition = array(array('name' => 'Danh sách hãng xe', 'link' => 'index.php?lang=' . $lang . '&controller=service_car'), array('name' => $service['tenhangxe'], 'link' => 'index.php?lang=' . $lang . '&controller=service_car&action=detail_service&code=' . $service['mshx'])); $success = null; $errors = 0; $mshx = $_POST['mshx']; $msdd = $_POST['msdd']; $tenhangxe = $_POST['tenhangxe']; $diemden = $_POST['diemden']; $diemdi = $_POST['diemdi']; $soghe = $_POST['soghe']; $gia = $_POST['gia']; $lienhe = $_POST['lienhe']; $data = array('msdd' => $msdd, 'mshx' => $mshx, 'tenhangxe' => $tenhangxe, 'diemden' => $diemden, 'diemdi' => $diemdi, 'soghe' => $soghe, 'gia' => $gia, 'lienhe' => $lienhe); $check = update_record('car_service', 'mshx', $code, $data); if ($check) { $success = "Bạn đã cập nhật thành công"; } else { $success = "Cập nhật thất bại"; }
<?php $title = "AD Tourist - Dịch vụ Vé máy bay"; $visa1 = get_all_record('passport_visa_offers', 'passport_visa_code', '1'); $visa2 = get_all_record('passport_visa_offers', 'passport_visa_code', '2'); $visa5 = get_all_record('passport_visa_offers', 'passport_visa_code', '5'); $visa6 = get_all_record('passport_visa_offers', 'passport_visa_code', '6'); $visa7 = get_all_record('passport_visa_offers', 'passport_visa_code', '7'); $visa8 = get_all_record('passport_visa_offers', 'passport_visa_code', '8'); $visa9 = get_all_record('passport_visa_offers', 'passport_visa_code', '9'); $area = get_all('car_area'); $lang = get_lang(); $news = get_all('news_event'); $tour_region = get_all('tour_region'); $ticket_plane_name = get_all('ticket_plane'); if (isset($_GET['ticket_plane_id']) && isset($_GET['ticket_plane_content_id'])) { $ticket_plane_id = $_GET['ticket_plane_id']; $ticket_plane_content_id = $_GET['ticket_plane_content_id']; $ticket_plane_content = get_a_record('ticket_plane_content', 'ticket_plane_content_id', $ticket_plane_content_id); } elseif (isset($_GET['ticket_plane_id'])) { $ticket_plane_id = $_GET['ticket_plane_id']; } else { $ticket_plane_id = $ticket_plane_name[0]['ticket_plane_id']; } $id = get_a_record('ticket_plane', 'ticket_plane_id', $ticket_plane_id); $content = get_all_record('ticket_plane_content', 'ticket_plane_id', $id['ticket_plane_id']); require_once BASEPATH . 'view/ticket_plane/index.php';
<th>Tên hãng xe</th> <th>Điểm đi</th> <th>Điểm đến</th> <th>Số ghế</th> <th>Giá</th> <th>Liên hệ</th> <th>Sửa</th> <th>Xóa</th> </tr> </thead> <tbody> <?php foreach ($service as $key => $value) { ?> <?php $tendiadiem = get_a_record('car_area', 'msdd', $value['msdd']); ?> <tr> <td><?php echo $tendiadiem['tendiadiem']; ?> </td> <td><?php echo $value['tenhangxe']; ?> </td> <td><?php echo $value['diemdi']; ?> </td> <td><?php
<th>Create_at</th> <th>Update_at</th> <th>Sửa</th> <th>Xóa</th> </tr> </thead> <tbody> <?php if ($products != null) { ?> <?php foreach ($products as $key => $value) { ?> <tr> <?php $visa_name = get_a_record('passport_visa', 'passport_visa_code', $value['passport_visa_code']); ?> <td><?php echo $value['passport_visa_offer_code']; ?> </td> <td><?php echo $visa_name['passport_visa_name']; ?> </td> <td><?php echo $value['title']; ?> </td> <td><?php echo $value['description'];
<?php $active = "labor"; $lang = get_lang(); if (isset($_GET['labor_content_id']) && !isset($_POST['submit'])) { $labor_content_id = $_GET['labor_content_id']; $labor = get_a_record('labor_content', 'labor_content_id', $labor_content_id); $labor_name1 = get_a_record('labor', 'labor_id', $labor['labor_id']); $labor_name = get_all('labor'); require 'view/labor/change.php'; } elseif (isset($_GET['labor_content_id']) && isset($_POST['submit'])) { $labor_content_id = $_GET['labor_content_id']; $labor_name = $_POST['labor_name']; $title = $_POST['title']; $content = $_POST['content']; $labor_id = get_a_record('labor', 'labor_name', $labor_name); $data = array('labor_id' => $labor_id['labor_id'], 'title' => $title, 'content' => $content); update_record('labor_content', 'labor_content_id', $labor_content_id, $data); $labor = get_a_record('labor_content', 'labor_content_id', $labor_content_id); $labor_name1 = get_a_record('labor', 'labor_id', $labor['labor_id']); $labor_name = get_all('labor'); $success = "Thay đổi thành công !"; require 'view/labor/change.php'; }
<?php $active = "ticket_plane"; $lang = get_lang(); if (isset($_GET['ticket_plane_content_id']) && !isset($_POST['submit'])) { $ticket_plane_content_id = $_GET['ticket_plane_content_id']; $ticket_plane = get_a_record('ticket_plane_content', 'ticket_plane_content_id', $ticket_plane_content_id); $ticket_plane_name1 = get_a_record('ticket_plane', 'ticket_plane_id', $ticket_plane['ticket_plane_id']); $ticket_plane_name = get_all('ticket_plane'); require 'view/ticket_plane/change.php'; } elseif (isset($_GET['ticket_plane_content_id']) && isset($_POST['submit'])) { $ticket_plane_content_id = $_GET['ticket_plane_content_id']; $ticket_plane_name = $_POST['ticket_plane_name']; $title = $_POST['title']; $content = $_POST['content']; $ticket_plane_id = get_a_record('ticket_plane', 'ticket_plane_name', $ticket_plane_name); $data = array('ticket_plane_id' => $ticket_plane_id['ticket_plane_id'], 'ticket_plane_title' => $title, 'ticket_plane_content' => $content); update_record('ticket_plane_content', 'ticket_plane_content_id', $ticket_plane_content_id, $data); $ticket_plane = get_a_record('ticket_plane_content', 'ticket_plane_content_id', $ticket_plane_content_id); $ticket_plane_name1 = get_a_record('ticket_plane', 'ticket_plane_id', $ticket_plane['ticket_plane_id']); $ticket_plane_name = get_all('ticket_plane'); $success = "Thay đổi thành công !"; require 'view/ticket_plane/change.php'; }
<?php $active = "ticket_plane"; $lang = get_lang(); if (isset($_POST['submit'])) { $ticket_plane_name = $_POST['ticket_plane_name']; $title = $_POST['title']; $content = $_POST['content']; $ticket_plane_id = get_a_record('ticket_plane', 'ticket_plane_name', $ticket_plane_name); $ticket_plane = array('ticket_plane_id' => $ticket_plane_id['ticket_plane_id'], 'ticket_plane_title' => $title, 'ticket_plane_content' => $content); save('ticket_plane_content', $ticket_plane); $success = "Thêm thành công ! "; } $ticket_plane_name = get_all('ticket_plane'); require 'view/ticket_plane/add_ticket_plane.php';
//load model require_once 'backend/models/products.php'; //if form submit if (!empty($_POST)) { $name = escape($_POST['name']); $product = array('id' => intval($_POST['id']), 'category_id' => intval($_POST['category_id']), 'name' => $name, 'summary' => escape($_POST['summary']), 'price' => intval(str_replace('.', '', $_POST['price']))); $pid = save('products', $product); //upload ảnh $image_name = $pid . '-' . alias($name); $config = array('name' => $image_name, 'upload_path' => 'public/upload/product/', 'allowed_exts' => 'jpg|jpeg|png|gif'); $image = upload('image', $config); //cập nhật ảnh mới if ($image) { $product = array('id' => $pid, 'image' => $image); save('products', $product); } //chuyển hướng header('location:admin.php?controller=product'); } if (isset($_GET['pid'])) { $pid = intval($_GET['pid']); } else { $pid = 0; } //data $title = $pid == 0 ? 'Thêm sản phẩm' : 'Sửa sản phẩm'; $user = $_SESSION['user']; $product = get_a_record('products', $pid); $categories = get_all('categories', array('select' => 'id,name', 'order_by' => 'position ASC')); //load view require 'backend/views/product/edit.php';
<?php $title = "AD Tourist - Dịch vụ xuất khẩu lao động "; $visa1 = get_all_record('passport_visa_offers', 'passport_visa_code', '1'); $visa2 = get_all_record('passport_visa_offers', 'passport_visa_code', '2'); $visa5 = get_all_record('passport_visa_offers', 'passport_visa_code', '5'); $visa6 = get_all_record('passport_visa_offers', 'passport_visa_code', '6'); $visa7 = get_all_record('passport_visa_offers', 'passport_visa_code', '7'); $visa8 = get_all_record('passport_visa_offers', 'passport_visa_code', '8'); $visa9 = get_all_record('passport_visa_offers', 'passport_visa_code', '9'); $area = get_all('car_area'); $lang = get_lang(); $news = get_all('news_event'); $tour_region = get_all('tour_region'); $labor_name = get_all('labor'); if (isset($_GET['labor_id']) && isset($_GET['labor_content_id'])) { $labor_id = $_GET['labor_id']; $labor_content_id = $_GET['labor_content_id']; $labor_content = get_a_record('labor_content', 'labor_content_id', $labor_content_id); } elseif (isset($_GET['labor_id'])) { $labor_id = $_GET['labor_id']; } else { $labor_id = $labor_name[0]['labor_id']; } $id = get_a_record('labor', 'labor_id', $labor_id); $content = get_all_record('labor_content', 'labor_id', $id['labor_id']); require_once BASEPATH . 'view/labor/index.php';
<?php $active = 'tour'; $lang = get_lang(); $title = "Sửa Nội Dung"; if (isset($_GET['tour_content_code']) && !isset($_POST['submit'])) { $tour_content_code = $_GET['tour_content_code']; $tour = get_a_record('tour_content', 'tour_content_code', $tour_content_code); $current_possition = array(array('name' => 'Danh sách các tour', 'link' => 'index.php?lang=' . $lang . '&controller=tour'), array('name' => $tour['title'], 'link' => 'index.php?lang=' . $lang . '&controller=tour&action=tour_detail&tour_content_code=' . $tour['tour_content_code'])); require_once 'view/tour/tour_edit.php'; } else { if (isset($_POST['submit']) && isset($_GET['tour_content_code'])) { $tour_content_code = $_GET['tour_content_code']; $tour = get_a_record('tour_content', 'tour_content_code', $tour_content_code); $current_possition = array(array('name' => 'Danh sách các tour', 'link' => 'index.php?lang=' . $lang . '&controller=tour'), array('name' => $tour['title'], 'link' => 'index.php?lang=' . $lang . '&controller=tour&action=tour_detail&tour_content_code=' . $tour['tour_content_code'])); if ($tour['tour_country_code'] == 1) { $tour_country_name = 'incountry'; } else { if ($tour['tour_country_code'] == 2) { $tour_country_name = 'outcountry'; } } $success = null; $errors = 0; //Processing upload image $image = $_FILES['upload_image']['name']; if ($image) { $extension = getExtension($image); $extension = strtolower($extension); if ($extension != 'jpg' && $extension != 'jpeg' && $extension != 'png') { $image_error = "Chỉ cho phép upload ảnh định dạng jpg, jpeg, png";
<?php $active = "abroad"; $lang = get_lang(); if (isset($_GET['abroad_offer_id']) && !isset($_POST['submit'])) { $abroad_offer_id = $_GET['abroad_offer_id']; $abroad = get_a_record('abroad_offers', 'abroad_offer_id', $abroad_offer_id); $abroad_name1 = get_a_record('abroads', 'abroad_id', $abroad['abroad_id']); $abroad_name = get_all('abroads'); require 'view/abroad/change.php'; } elseif (isset($_GET['abroad_offer_id']) && isset($_POST['submit'])) { $abroad_offer_id = $_GET['abroad_offer_id']; $abroad_name = $_POST['abroad_name']; $title = $_POST['title']; $content = $_POST['content']; $abroad_id = get_a_record('abroads', 'abroad_name', $abroad_name); $data = array('title' => $title, 'content' => $content, 'abroad_id' => $abroad_id['abroad_id']); update_record('abroad_offers', 'abroad_offer_id', $abroad_offer_id, $data); $abroad = get_a_record('abroad_offers', 'abroad_offer_id', $abroad_offer_id); $abroad_name1 = get_a_record('abroads', 'abroad_id', $abroad['abroad_id']); $abroad_name = get_all('abroads'); $success = "Thay đổi thành công !"; require 'view/abroad/change.php'; }
<?php $title = "AD Tourist, Go Go Go"; $visa1 = get_all_record('passport_visa_offers', 'passport_visa_code', '1'); $visa2 = get_all_record('passport_visa_offers', 'passport_visa_code', '2'); $visa5 = get_all_record('passport_visa_offers', 'passport_visa_code', '5'); $visa6 = get_all_record('passport_visa_offers', 'passport_visa_code', '6'); $visa7 = get_all_record('passport_visa_offers', 'passport_visa_code', '7'); $visa8 = get_all_record('passport_visa_offers', 'passport_visa_code', '8'); $visa9 = get_all_record('passport_visa_offers', 'passport_visa_code', '9'); $tour_region = get_all('tour_region'); $news = get_all('news_event'); $area = get_all('car_area'); $lang = get_lang(); if (isset($_GET['tour_country_code'])) { $tour_country_code = $_GET['tour_country_code']; $tour_country_name = get_a_record('tour_country', 'tour_country_code', $tour_country_code); $tour_country_name = $tour_country_name['tour_country_name']; $tour = get_all_record('tour_content', 'tour_country_code', $tour_country_code); $link = 'index.php?controller=tour&action=country&tour_country_code=' . $tour_country_code . 'lang=' . $lang; $current_possition = array(array('name' => $tour_country_name, 'link' => $link)); require_once BASEPATH . 'view/tour/show_tour.php'; } else { header('location: index.php?lang=' . $lang); }
<th>Title</th> <th>Content</th> <th>Sửa</th> <th>Xóa</th> </tr> </thead> <tbody> <?php if ($products != null) { ?> <?php foreach ($products as $key => $value) { ?> <tr> <?php $abroad_name = get_a_record('abroads', 'abroad_id', $value['abroad_id']); ?> <td><?php echo $abroad_name['abroad_name']; ?> </td> <td><?php echo $value['title']; ?> </td> <td><?php echo $value['content']; ?> </td> <td> <a href="index.php?controller=abroad&action=change&abroad_offer_id=<?php echo $value['abroad_offer_id'];