| 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/imusiccircle/ |
Upload File : |
<?php
include('_init.php');
//var_dump($_SESSION["category_page"]);
if(PRODUCTION==1){
header("Location: index.php");
exit;
}
//if (isset($_GET["reset"]) && (int)$_GET["reset"] == 1) {
unset($_SESSION["category_page"]);
//}
if (isset($_GET["id"])) {
unset($_SESSION["category_page"]);
$category_id = (int)$_GET["id"]; // = mas_instrument id
$_SESSION["category_page"]["category_id"] = $category_id;
$path = 'category.php';
@header("Location: {$path}");
echo "<script language='JavaScript'>window.location='{$path}'</script>";
exit();
} else {
$category_id = 0;
}
if (isset($_GET["search"]) && !empty($_GET["search"])) {
$sql = "select * from master_type_code where typeid = ? and (name_en LIKE ? or name_cn LIKE ?)";
$parameters = array("INSTRUMENT", "%" . _h($_GET["search"]) . "%", "%" . _h($_GET["search"]) . "%");
$result = bind_pdo($sql, $parameters, "selectone");
if (!empty($result)) {
$category_id = $result["id"];
$_SESSION["category_page"]["category_id"] = $result["id"];
}
}
if (!empty($_GET["recommend"]) && (int)$_GET["recommend"] == 1) {
$_SESSION["category_page"]["recommend"] = 1;
} else {
unset($_SESSION["category_page"]["recommend"]);
}
$level_of_grades = get_master_type_code("LEVEL_OF_GRADE");
$locations = get_master_type_code("RESIDENCE_POSITIONCODE");
$instrument_categories = get_master_type_code("INSTRUMENT_TYPE");
$instrument = get_master_type_code_by_id($category_id);
$teach_venues = get_master_type_code("TEACH_VENUS");
$last_login_date_range = get_master_type_code("LAST_LOGIN_DATE_RANGE");
$min_fee = 0;
$max_fee = 5000;
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('_head.php'); ?>
<link href="css/style_k.css?v=<?= time(); ?>" type="text/css" rel="stylesheet">
<style>
#accumulate_tutorial_hours_table {
width: 100%;
border-collapse: collapse;
}
#accumulate_tutorial_hours_table td, #accumulate_tutorial_hours_table th {
padding: 5px;
}
</style>
</head>
<body>
<?php include('_header.php') ?>
<?php include('_dialog.php') ?>
<div class="Categoryheader">
<div class="container">
<div class="intro-text">
<p class="BannerBigFont"><?= _lang('Music Class') ?></p>
<!--<p class="weFound">The best place to find your perfect tutor</p>-->
</div>
</div>
</div>
<div class="course_payment_box">
<form action="course_calladmin.php" class="LiAdminMsg" method="post" style="margin-bottom:0px;">
<input type="hidden" name="course_id" value="">
<div class="header panel-heading">請先登入為學生。按
<div class="inline pointer" style="color: blue; text-decoration: underline;font-weight: bold" onclick="_login()">
此
</div>
登入。<br>或<br>請提供電郵地址及手提電話號碼,我們將盡快為你提供協助。
</div>
<div class="panel-body">
<div>電郵地址</div>
<div><input type="text" name="email" value="">
<div style="color:#F00; display:none;" class="error" id="emailError">
請輸入你的電郵
</div>
<div style="color:#F00; display:none;" class="error" id="emailError2">
請檢查電郵格式。
</div>
<div style="color:#F00; display:none;" class="error" id="emailError3">
你的電郵已有人使用。
</div>
</div>
<div>電話號碼</div>
<div><input type="text" name="tel" value="" maxlength="8">
<div style="color:#F00; display:none;" class="error" id="mobnoError">
請輸入手提電話號碼。
</div>
<div style="color:#F00; display:none;" class="error" id="mobnoError2">
手提電話應是數字。
</div>
</div>
<button class="PayTutorBTN2 btn btn-primary" type="submit" style="margin-top:5px; margin-bottom:5px;">
聯絡管理員
</button>
<div>
<div class="PayTutorBTN4 btn btn-danger">取消</div>
</div>
</div>
</form>
</div>
<div class="GreyBackground" id="main_content">
<div class="container">
<div class="row">
<div class="col-sm-3" style="margin-bottom: 20px;">
<div id="Sorting2">
<div style="border: 2px dashed #214f9d; padding: 5px;">
不知道如何選擇合適的音樂班?<br> 找不到合心意的音樂班? <br> <span style="font-weight: bold; color: #214f9d;">由學生自訂上課時間及地點</span>
<div class="line" style="margin-top: 10px; margin-bottom: 10px;"></div>
<form action="_process.php" class="LiAdminMsg3" method="post" style="margin-bottom:0px;">
<input type="hidden" name="action" value="course_category_adminmsg"/>
<div>電話號碼</div>
<div>
<input type="text" name="tel" value="" maxlength="8" class="width100p">
<div style="color:#F00; display:none;" class="error" id="mobnoError">請輸入手提電話號碼。
</div>
<div style="color:#F00; display:none;" class="error" id="mobnoError2">手提電話應是數字。
</div>
</div>
<div>電郵地址</div>
<div>
<input type="text" name="email" value="" class="width100p">
<div style="color:#F00; display:none;" class="error" id="emailError">請輸入你的電郵</div>
<div style="color:#F00; display:none;" class="error" id="emailError2">請檢查電郵格式。</div>
<div style="color:#F00; display:none;" class="error" id="emailError3">你的電郵已有人使用。
</div>
</div>
<div>學習樂器</div>
<div>
<select name="instrument" style="width: 100%; margin-bottom: 5px; height: 30px;" class="width100p">
<option value="">-請選擇-</option>
<?php
foreach ($instrument_categories as $row) {
echo '<optgroup label="' . $row["name_" . $langcode] . '">';
$sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ? order by sort asc";
$parameters = array('INSTRUMENT', $row['code'], 0);
$rows_instrument = bind_pdo($sql, $parameters, "selectall");
foreach ($rows_instrument as $row2) {
echo '<option value="' . $row2["name_" . $langcode] . '" >' . $row2["name_" . $langcode] . '</option>';
}
echo '</optgroup>';
}
?>
</select>
<div style="color:#F00; display:none;" class="error" id="instrumentError">請選擇你的樂器
</div>
</div>
<div>上課地區</div>
<div>
<select name="district" style="width: 100%;margin-bottom: 5px; height: 30px;" class="width100p">
<option value="">-請選擇-</option>
<?php
foreach ($locations as $row) {
echo '<option value="' . $row["name_" . $langcode] . '" >' . $row["name_" . $langcode] . '</option>';
}
?>
</select>
<div style="color:#F00; display:none;" class="error" id="districtError">請選擇上課地區
</div>
</div>
<button class="PayTutorBTN2 btn btn-primary" type="submit" style="margin-top:5px; margin-bottom:5px;">
發出訊息
</button>
</form>
</div>
</div>
<div id="Sorting">
<div class="SortInstrument">
<h12><?= _lang("Musical Instrument") ?></h12>
<br> <select class="SelectBox" name="category_id" id="category_id">
<option value="ANY"><?= _lang("Any") ?></option>
<?php
foreach ($instrument_categories as $row) {
echo '<optgroup label="' . $row["name_" . $langcode] . '">';
$sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ? order by sort asc";
$parameters = array('INSTRUMENT', $row['code'], 0);
$rows_instrument = bind_pdo($sql, $parameters, "selectall");
foreach ($rows_instrument as $row2) {
echo '<option value="' . $row2["id"] . '" ' . ($_SESSION["category_page"]["category_id"] == $row2["id"] ? "selected" : "") . '>' . $row2["name_" . $langcode] . '</option>';
}
echo '</optgroup>';
}
?>
</select>
<hr>
</div>
<div class="SortLevel">
<h12><?= _lang("Musical Instrument Level") ?></h12>
<br> <select class="SelectBox" name="level_of_grade" id="level_of_grade">
<option value="ANY"><?= _lang("Any") ?></option>
<?php
echo '<option value="1" ' . ($_SESSION["category_page"]["level_of_grade"] == 1 ? "selected" : "") . '>初級</option>';
echo '<option value="3" ' . ($_SESSION["category_page"]["level_of_grade"] == 3 ? "selected" : "") . '>中級</option>';
?>
</select>
<hr>
</div>
<div class="SortLocation">
<h12><?= _lang("地區") ?></h12>
<br> <select class="SelectBox" name="location[]" id="location" multiple>
<option value="ANY"><?= _lang("Any") ?></option>
<?php
foreach ($locations as $row) {
$selected = "";
foreach ($_SESSION["category_page"]["location"] as $location_id) {
if ($location_id == $row["id"]) {
$selected = "selected";
break;
}
}
echo '<option value="' . $row["id"] . '" ' . $selected . '>' . $row["name_" . $langcode] . '</option>';
}
?>
</select>
<hr>
</div>
<div class="SortRate">
<h12><?= _lang("學費預算") ?><br>
<div class="rangeBar">
<strong>$<?= (float)$min_fee ?></strong>
<input id="ex2" type="text" class="span2" value="" data-slider-min="<?= (float)$min_fee ?>" data-slider-max="<?= (float)$max_fee ?>" data-slider-step="5" data-slider-value="[<?= $_SESSION["category_page"]["min_hourly_rate"] ? $_SESSION["category_page"]["min_hourly_rate"] : (float)$min_fee ?>,<?= $_SESSION["category_page"]["max_hourly_rate"] ? $_SESSION["category_page"]["max_hourly_rate"] : (float)$max_fee ?>]"/>
<b>$<?= (float)$max_fee ?></b>
</div>
<hr>
</div>
<div class="SortBy">
<h12><?= _lang("Sort By") ?></h12>
<br>
<div class="searchable-container">
<?php
$sort_by_array = array("LOW_HIGH" => _lang("Fee (low to high)"), "HIGH_LOW" => _lang("Fee (high to low)"));
foreach ($sort_by_array as $key => $sort) {
$checked = "";
$active = "";
if ($_SESSION["category_page"]["sort_by"] == $key || (!isset($_SESSION["category_page"]["sort_by"]) && $key == "MOST_POPULAR")) {
$checked = "checked";
$active = "active";
}
?>
<div data-toggle="buttons" class="btn-group bizmoduleselect sort_by <?= $key ?>">
<label class="btn btn-default <?= $active ?>">
<input type="checkbox" name="sort_by" autocomplete="off" value="<?= $key ?>" style="float:left;" <?= $checked ?>>
<span class="glyphicon glyphicon-ok glyphicon-lg" id="TickIcon"></span>
<h5><?= htmlspecialchars_decode($sort) ?></h5>
</label>
</div>
<?php
}
?>
</div>
<hr>
</div>
<div class="SortBy">
<h12><?= _lang("上課星期") ?></h12>
<br>
<div class="searchable-container">
<?php
$week_array = array("日", "一", "二", "三", "四", "五", "六");
foreach ($week_array as $key => $week) {
$checked = "";
$active = "";
if (count($_SESSION["category_page"]["week"])) {
foreach ($_SESSION["category_page"]["week"] as $value) {
if ($value == $key) {
$checked = "checked";
$active = "active";
}
}
}
?>
<div data-toggle="buttons" class="btn-group bizmoduleselect week <?= $key ?>" style="width:13%;">
<label class="btn btn-default <?= $active ?>" style="width:33px; height:25px; padding:2px;">
<input type="checkbox" name="week[]" value="<?= $key ?>" <?= $checked ?>>
<?= $week ?>
</label>
</div>
<?php
}
?>
</div>
<hr>
</div>
<div class="SortBy">
<h12><?= _lang("上課時間") ?></h12>
<br>
<div class="searchable-container">
<?php
$time_array = array(1 => "上午", "下午", "晚上");
foreach ($time_array as $key => $time) {
if (count($_SESSION["category_page"]["time"])) {
$checked = "";
$active = "";
foreach ($_SESSION["category_page"]["time"] as $value) {
if ($value == $key) {
$checked = "checked";
$active = "active";
}
}
}
?>
<div data-toggle="buttons" class="btn-group bizmoduleselect time <?= $key ?>" style="width:32%;">
<label class="btn btn-default <?= $active ?>" style="width:105px; height:25px; padding:2px;">
<input type="checkbox" name="time[]" value="<?= $key ?>" style="float:left;" <?= $checked ?>>
<?= $time ?>
</label>
</div>
<?php
}
?>
</div>
<hr>
</div>
<div class="SortBy">
<h12><?= _lang("名額") ?></h12>
<br>
<div class="searchable-container">
<?php
$checked = "";
$active = "";
if ($_SESSION["category_page"]["places"] == 1) {
$checked = "checked";
$active = "active";
}
?>
<div data-toggle="buttons" class="btn-group bizmoduleselect places <?= $key ?>">
<label class="btn btn-default <?= $active ?>">
<input type="checkbox" name="places" value="1" <?= $checked ?>>
<span class="glyphicon glyphicon-ok glyphicon-lg" id="TickIcon"></span>
<h5>未滿</h5>
</label>
</div>
</div>
<hr>
</div>
<div class="ResetFilter">
<button type="button" onclick="location.href='course_category.php?reset=1';"><?= _lang("Reset Filter") ?></button>
</div>
</div>
</div>
<div class="col-sm-9">
<div style="margin-bottom: 10px;">
<div class="fl page_breadcrumbs"><a href="index.php" class="default_a"><?= _lang("Home") ?></a>
> <?= _lang("Music Class") ?></div>
<div id="displaying_text" class="fr"></div>
<div class="clearboth"></div>
</div>
<div class="row" id="tutor_list">
</div>
</div>
</div>
</div>
</div>
<div id="loading"><img src="img/loading_icon.gif" style="width: 100px;"></div>
<div id="accumulate_tutorial_hours" style="display:none;">
<h4><b>累積上課時數</b></h4>
<p>
導師跟學生於MusicCircle進行配對後,會開始學習階段。當中每次透過MusicCircle 付款的時數,都會記錄於MusicCircle的系統內,導師累積時數愈多,導師排名愈高。
</p>
<h4><b>累積時數的星級分配</b></h4>
<p>
MusicCircle會每天總結導師的累積時數,並按比例地分配各導師所得的星級,比例如下:
</p>
<table id="accumulate_tutorial_hours_table">
<tr>
<th>星級</th>
<th class="nowrap">導師比例</th>
<th>例子(以100位導師計算)</th>
</tr>
<tr>
<td><span class="stars">5</span></td>
<td>20% (最高)</td>
<td>累積時數排名第1-20位</td>
</tr>
<tr>
<td><span class="stars">4</span></td>
<td>30%</td>
<td>累積時數排名第21-50位</td>
</tr>
<tr>
<td><span class="stars">3</span></td>
<td>30%</td>
<td>累積時數排名第51-80位</td>
</tr>
<tr>
<td><span class="stars">2</span></td>
<td>10%</td>
<td>累積時數排名第81-90位</td>
</tr>
<tr>
<td><span class="stars">1</span></td>
<td>10%</td>
<td>累積時數排名第91-100位</td>
</tr>
</table>
</div>
<div id="popup" style="display: none;">
<!--<img src="img/popup.png" alt="" style="width: 100%;"/>-->
<div id="popup_slider">
<ul class="slides">
<li><img src="img/popup/IMc_instruction1.jpg" style="width: 100%;"></li>
<li><img src="img/popup/IMc_instruction2.jpg" style="width: 100%;"></li>
<li><img src="img/popup/IMc_instruction3.jpg" style="width: 100%;"></li>
<li><img src="img/popup/IMc_instruction4.jpg" style="width: 100%;"></li>
</ul>
</div>
</div>
<? include('_footer.php') ?>
<link href="css/agency.css" rel="stylesheet">
<link href="css/bootstrap-slider.css" rel="stylesheet">
<script src="js/bootstrap-slider.js"></script>
<script src="js/jquery.dotdotdot.min.js"></script>
<script src="js/select2/select2.min.js"></script>
<link href="js/select2/select2.min.css" rel="stylesheet">
<link rel="stylesheet" href="js/fancybox/jquery.fancybox.css?v=2.1.5" type="text/css" media="screen"/>
<script type="text/javascript" src="js/fancybox/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript">
//使用音樂班配對顧問服務
function contact_admin() {
$('#LiFullbg').show();
$('.course_payment_box3,.course_payment_box3 .error').hide();
$('.course_payment_box3').show();
}
//使用音樂班配對顧問服務
$('.PayTutorBTN3').click(
function () {
$(this).parent().parent().parent().hide();
$('#LiFullbg').hide();
}
);
$(function () {
//使用音樂班配對顧問服務
$('.LiAdminMsg3').submit(
function () {
var error = false;
$('.error', this).hide();
/*if (!$('input[name="name"]', this).val()) {
$("#nameError", this).show();
error = true;
}*/
if (!$('input[name="tel"]', this).val()) {
$("#mobnoError", this).show();
error = true;
} else {
var num = $('input[name="tel"]', this).val();
if ($.isNumeric(num) == false) {
$("#mobnoError2", this).show();
error = true;
}
}
if (!$('input[name="email"]', this).val()) {
$("#emailError", this).show();
error = true;
} else if (!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/.test($('input[name="email"]', this).val())) {
$("#emailError2", this).show();
error = true;
}
if (!$('select[name="instrument"]', this).val()) {
$("#instrumentError", this).show();
error = true;
}
if (!$('select[name="district"]', this).val()) {
$("#districtError", this).show();
error = true;
}
if (error == false) {
return true;
} else {
return false;
}
}
);
$(".fancybox1").fancybox({
maxWidth: 800,
maxHeight: 350,
fitToView: false,
width: '100%',
height: '100%',
autoSize: false,
closeClick: false,
openEffect: 'none',
closeEffect: 'none'
});
});
function resizeImage() {
//console.log($(window).width());
if ($(window).width() <= 974) {
$(".tutor_img").hide();
$(".tutor_img2").show();
} else {
$(".tutor_img").show();
$(".tutor_img2").hide();
}
//$(".tutor_img2").show();
}
function filter_course(start) {
$('#loading').slideDown(100);
console.log("filter tutor");
var category_id = $("#category_id").val(); //instrument
var level_of_grade = $("#level_of_grade").val();
var location = JSON.stringify($("#location").val());
var min_hourly_rate = $(".min-slider-handle").attr("aria-valuenow");
var max_hourly_rate = $(".max-slider-handle").attr("aria-valuenow");
var accumulate_tutorial_hours = $("#accumulate_tutorial_hours").val();
//var gender = $("input[name='gender[]']:checked").val();
var sort_by = $("input[name='sort_by']:checked").val();
var week_array = new Array;
$("input[name='week[]']:checked").each(
function (index) {
week_array[index] = $(this).val();
}
);
var week = JSON.stringify(week_array);
var time_array = new Array;
$("input[name='time[]']:checked").each(
function (index) {
time_array[index] = $(this).val();
}
);
var time = JSON.stringify(time_array);
var places = $("input[name='places']:checked").val();
//console.log($("input[name='week[]']:checked").val());
//console.log(min_hourly_rate);
jQuery.ajax({
url: '_ajax.php',
type: 'POST',
data: {
ajax: "filter_course",
category_id: category_id,
level_of_grade: level_of_grade,
location: location,
min_hourly_rate: min_hourly_rate,
max_hourly_rate: max_hourly_rate,
week: week,
time: time,
sort_by: sort_by,
places: places
},
dataType: 'html', //dataType (default: Intelligent Guess (xml, json, script, or html))
timeout: 10000,
error: function (result) {
//alert('Error Occur. Please try again.');
//console.log(result.responseText);
if (window.self === window.top) {
$("html, body").animate({scrollTop: 200}, 500);
}
},
success: function (result) {
if (window.self === window.top) {
$("html, body").animate({scrollTop: 200}, 500);
}
$('#loading').slideUp(100);
//console.log(result);
$("#tutor_list").empty().html(result);
var displaying_text = $("#displaying_text_temp").text();
//console.log(displaying_text);
$("#displaying_text").html(displaying_text);
resizeImage();
//set course_info_right_height
course_category_right();
$(window).resize(function () {
course_category_right();
});
}
});
}
function course_category_right() {
if ($(window).width() < 1200) {
$(".course_info_right").each(function () {
$(this).css("height", "130px");
$(this).find(".course_category_price").addClass("course_category_price_mobile").removeClass("course_category_price");
$(this).find(".ContactTutorBTN").css("width", "100%");
});
} else {
$(".course_info_right").each(function () {
var height_ref = $(this).closest(".Tutor").find(".course_info_right_height_ref").height();
$(this).css("height", height_ref + "px");
$(this).find(".course_category_price_mobile").addClass("course_category_price").removeClass("course_category_price_mobile");
$(this).find(".ContactTutorBTN").css("width", "auto");
});
}
}
function open_payment_tutor(course_id) {
$('#LiFullbg').show();
$('.course_payment_box .error').hide();
$('.course_payment_box').show();
$('.course_payment_box input[name="course_id"]').val(course_id);
}
function _login() {
$(".course_payment_box,.course_payment_box2").hide();
$("#LiLoginMenu").click();
$("#LiFullbg").hide();
}
$(function () {
$('.PayTutorBTN4').click(
function () {
$(this).parent().parent().parent().parent().hide();
$('#LiFullbg').hide();
}
);
$('.LiAdminMsg').submit(
function () {
var error = false;
$('.error', this).hide();
if (!$('input[name="email"]', this).val()) {
$("#emailError", this).show();
error = true;
} else if (!/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/.test($('input[name="email"]', this).val())) {
$("#emailError2", this).show();
error = true;
}
if (!$('input[name="tel"]', this).val()) {
$("#mobnoError", this).show();
error = true;
} else {
var num = $('input[name="tel"]', this).val();
if ($.isNumeric(num) == false) {
$("#mobnoError2", this).show();
error = true;
}
}
if (error == false) {
return true;
} else {
return false;
}
}
);
$("#ex2").slider({});
//set category id
<?php if (!empty($_GET["id"]) && (int)$_GET["id"] > 0) {
echo '$("#category_id ").val(' . (int)$_GET["id"] . ');';
} ?>
//filter quick search
$("#quick_search_submit").on("click", function () {
filter_course();
});
$("#category_id, #level_of_grade, #location, #teach_venue, #last_login").on("change", function () {
filter_course();
});
//filter fee
$("#ex2").slider().on("slideStop", function (slide) {
filter_course();
});
//filter gender
$(".gender").on("click", function () {
if ($(this).find("input:checkbox").prop("checked")) {
$(this).find("input:checkbox").prop("checked", false);
} else {
$(this).find("input:checkbox").prop("checked", true);
}
filter_course();
});
//filter recommend
$(".recommend").on("click", function () {
if ($(this).find("input:checkbox").prop("checked")) {
$(this).find("input:checkbox").prop("checked", false);
} else {
$(this).find("input:checkbox").prop("checked", true);
}
filter_course();
});
<?php
/*$checked = "";
foreach($_SESSION["category_page"]["gender"] as $gender){
if($gender == "m"){
echo '$(".gender_m").trigger("click");';
}else if($gender == "f"){
echo '$(".gender_f").trigger("click");';
}
}*/
?>
//filter sort by
$(".sort_by").on("click", function () {
$(".sort_by").each(function () {
$(this).find("input:checkbox").prop("checked", false);
});
if ($(this).find("input:checkbox").prop("checked")) {
$(this).find("input:checkbox").prop("checked", false);
} else {
$(this).find("input:checkbox").prop("checked", true);
}
$(".sort_by label").removeClass("active");
filter_course();
});
$(".week").on("click", function () {
/*
$(".week").each(function () {
$(this).find("input:checkbox").prop("checked", false);
});*/
if ($(this).find("input:checkbox").prop("checked")) {
$("input[name='week[]']", this).removeAttr('checked');
//$(this).find("input:checkbox").prop("checked", false);
} else {
//$(this).find("input").prop("checked", true);
$("input[name='week[]']", this).attr('checked', 'checked');
}
//$(".week label").removeClass("active");
filter_course();
});
$(".time").on("click", function () {
/*
$(".week").each(function () {
$(this).find("input:checkbox").prop("checked", false);
});*/
if ($(this).find("input:checkbox").prop("checked")) {
$("input[name='time[]']", this).removeAttr('checked');
//$(this).find("input:checkbox").prop("checked", false);
} else {
//$(this).find("input").prop("checked", true);
$("input[name='time[]']", this).attr('checked', 'checked');
}
//$(".week label").removeClass("active");
filter_course();
});
$(".places").on("click", function () {
if ($(this).find("input:checkbox").prop("checked")) {
$("input[name='places']", this).get(0).checked = false;
} else {
$("input[name='places']", this).get(0).checked = true;
}
filter_course();
});
<?php if (isset($_SESSION["category_page"]["sort_by"])) {
//echo '$(".'.$_SESSION["category_page"]["sort_by"].'").trigger("click");';
}?>
//filter page
//$(".start").on("click", function () {
$(".start").on("click", function () {
var start = $(this).attr("data-value");
filter_course(start);
});
//center image
resizeImage();
$(window).resize(function () {
resizeImage();
});
//text overflow
$(".self_describemyself").dotdotdot();
//change select
$("#category_id").select2({
width: "100%"
});
$("#level_of_grade").select2({
width: "100%"
});
$("#location").select2({
width: "100%",
placeholder: "<?=_lang("Select Some Options")?>"
});
$("#teach_venue").select2({
width: "100%",
placeholder: "<?=_lang("Select Some Options")?>"
});
filter_course(); //auto run the first time filter tutor
<? if($_SESSION['course_msg'] == true){?>
alert('你的聯絡資料已被記錄,我們將盡快與你聯絡。');
<? unset($_SESSION['course_msg']); }?>
});
</script>
</body>
</html>