| Server IP : 210.245.233.93 / Your IP : 216.73.216.226 Web Server : Apache/2.2.15 (CentOS) System : Linux webserver2.onesolution.com.hk 2.6.32-754.35.1.el6.x86_64 #1 SMP Sat Nov 7 12:42:14 UTC 2020 x86_64 User : apache ( 48) PHP Version : 5.3.3 Disable Function : exec, shell_exec, system, passthru, popen, proc_open, pcntl_exec MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/hkosl.com/alliancealliance/ |
Upload File : |
<?php
require_once('webadmin/basic_info.php');
if (empty($_GET["id"])) {
echo "<script>alert('Cannot find the relevant data.'); location.href='index.php';</script>";
exit;
}
$this_menu_info = get_menu_info((int)$_GET["id"]);
//check if this menu has sub menu
$sql = "select * from menu where parent_id = ? and deleted = ?";
$parameters = array($this_menu_info["id"], 0);
$sub_menu_info = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from course_category where menu_id = ? and status = ? and deleted = ? order by sort ASC";
$parameters = array((int)$_GET["id"], 1, 0);
$course_category_info = bind_pdo($sql, $parameters, "selectall");
?>
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<?php require_once("html_head.php") ?>
<!-- pop up --> <!-- Add fancyBox main JS and CSS files -->
<script type="text/javascript" src="js/fancybox2/source/jquery.fancybox.js?v=2.1.5"></script>
<link rel="stylesheet" type="text/css" href="js/fancybox2/source/jquery.fancybox.css?v=2.1.5" media="screen"/>
<script type="text/javascript">
function get_training_center_info(training_center_id) {
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
}
else {// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function () {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
//document.getElementById("txtHint").innerHTML=xmlhttp.responseText;
//console.log(xmlhttp.responseText);
var result = $.trim(xmlhttp.responseText);
if (result != "0") {
var obj = JSON.parse(result);
$(".tc_code").text(obj.code);
$(".tc_name").text(obj.name_<?=$langcode?>);
$(".tc_address").text(obj.address_<?=$langcode?>);
$(".tc_tel").text(obj.tel);
$(".tc_fax").text(obj.fax);
$(".tc_email").text(obj.email);
$(".tc_desc").text(obj.desc_<?=$langcode?>);
console.log(result);
}
}
}
xmlhttp.open("POST", "_ajax.php?for=get_training_center_info", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("training_center_id=" + training_center_id);
}
$(document).ready(function () {
$(".fancybox").fancybox({
maxWidth: 400,
maxHeight: 400,
fitToView: false,
width: '70%',
height: '40%',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none'
});
$(".fancybox").on("click", function () {
get_training_center_info(this.id);
});
});
</script>
</head>
<body>
<?php require_once("google_analysis.php"); ?>
<?php require_once("html_header.php") ?>
<section id="content" class="training_services_detail">
<div id="training_center" style="display:none; margin:0 auto; font-size: 16px;">
<h2 style="text-align: center">Training Center</h2>
<hr>
<table>
<tr>
<td>Code:</td>
<td class="tc_code"></td>
</tr>
<tr>
<td>Name:</td>
<td class="tc_name"></td>
</tr>
<tr>
<td>Address:</td>
<td class="tc_address"></td>
</tr>
<tr>
<td>Telephone:</td>
<td class="tc_tel"></td>
</tr>
<tr>
<td>Fax:</td>
<td class="tc_fax"></td>
</tr>
<tr>
<td>Email:</td>
<td class="tc_email"></td>
</tr>
<tr>
<td>Description:</td>
<td class="tc_desc"></td>
</tr>
</table>
</div>
<?php require_once("banner.php") ?>
<div class="container">
<div style="padding-top: 20px;">
<div style="padding-bottom: 20px; border-bottom: 1px solid #d4d4d4;">
<div class="head_title">
<?= $this_menu_info["title_" . $langcode] ?>
</div>
<div style="padding-top: 30px; text-align: justify;">
<?= $this_menu_info["desc_" . $langcode] ?>
</div>
</div>
<?php if (!empty($course_category_info) && ($this_menu_info["level_num"] == 3 || empty($sub_menu_info))){ ?>
<div style="margin-top: 40px;">
<div class="head_title">
COURSE
</div>
<!-- course -->
<?php
foreach ($course_category_info as $course_category) {
if(!empty($course_category["icon_".$langcode])){
echo '<div style="display: inline-block;"><img src="images/course_category/'.$course_category["icon_".$langcode].'" style="width:50px;"></div><div class="page_subtitle1" style="padding-left: 5px;padding-bottom: 0; display: inline-block;">
' . $course_category["name_" . $langcode] . '
<p class="txt" style="padding: 5px 0;">' . $course_category["desc1_" . $langcode] . '</p>
</div>';
}else{
echo '<div class="page_subtitle1" style="padding-bottom: 0">
' . $course_category["name_" . $langcode] . '
<p class="txt" style="padding: 5px 0;">' . $course_category["desc1_" . $langcode] . '</p>
</div>';
}
echo '<div>
<table id="index_course_table">
<tr class="head_title">
<th style="border-top-left-radius: 10px; width: 23%">Course Code</th>
<th style="width: 19%;">Date</th>
<th style="width: 10%;">Fee(HKD)</th>
<th style="width: 15%;">Venue</th>
<th style="width: 10%;">Time</th>
<th style="width: 15%;">Medium of Instruction</th>
<th style="border-top-right-radius: 10px; width: 8%;">Enroll</th>
</tr>';
$sql = "select * from course where course_category_id = ? and status = ? and deleted = ? order by code ASC";
$parameters = array($course_category["id"], 1, 0);
$course_info = bind_pdo($sql, $parameters, "selectall");
if (!empty($course_info)) {
foreach ($course_info as $course) {
$start_date = new DateTime($course["start_date"]);
$end_date = new DateTime($course["end_date"]);
$venue_list = "";
$selected_training_center = explode(",", $course["training_center_id"]);
foreach ($selected_training_center as $selected_center) {
$sql = "select * from training_center where id = ? and deleted = ?";
$parameters = array($selected_center, 0);
$training_center_info = bind_pdo($sql, $parameters, "selectone");
$venue_list .= '<a id="' . $training_center_info["id"] . '" class="fancybox" href="#training_center">' . $training_center_info["name_" . $langcode] . "</a> / ";
}
$venue_list = substr_replace($venue_list, "", -3);
if($course["start_date"] == $course["end_date"]){
$date_info = $start_date->format("d M Y");
}else{
$date_info = $start_date->format("d M Y") . ' to ' . $end_date->format("d M Y");
}
echo '<tr class="_tr">
<td>' . $course["code"] . '</td>
<td>' . $date_info.'</td>
<td>$' . floatval($course["fee"]) . '-</td>
<td><a href="#">' . $venue_list . '</a> </td>
<td>' . $course["time"] . '</td>
<td>' . $course["medium_of_instruction_" . $langcode] . '</td>
';
if ($course["valid_apply"] == 1) {
//check if end date before 7 days
if(check_course_valid_apply($course["id"])){
echo '<td>
<a href="enrollment.php?cid=' . $course["course_category_id"] . '&id=' . $course["id"] . '">
<img src="images/icon_apply.png" />
</a>
</td>';
}else{
echo '<td>Closed</td>';
}
} else {
echo '<td>'.$course["stop_applying_text_".$langcode].'</td>';
}
echo '</tr>';
}
}
echo '</table><div style="padding: 5px 0;">' . $course_category["desc2_" . $langcode] . '</div>';
}
?>
</div>
<?php } ?>
</div>
<div style="padding-top: 50px;">
For more information, please contact us by filling the
<a href="contact_us.php" style="text-decoration: underline; color: #10218B">Enquiry Form</a>
</div>
</div>
</section>
<?php require_once("html_footer.php"); ?>
</body>
</html>