403Webshell
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/m.musiccircle/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/hkosl.com/m.musiccircle/category.php
<?php
	include('_init.php');

	unset($_SESSION["popup2"]);

	/*if (isset($_GET["reset"]) && (int)$_GET["reset"] == 1) {
		unset($_GET);
	}*/

	if (isset($_GET["id"])) {
		//unset($_GET);
		$category_id                              = (int)$_GET["id"]; // = mas_instrument id
		/*$_GET["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["quick_search"]) && !empty($_GET["quick_search"])) {
		$sql        = "select * from master_type_code where typeid = ? and (name_en LIKE ? or name_cn LIKE ?)";
		$parameters = array("INSTRUMENT", "%" . _h($_GET["quick_search"]) . "%", "%" . _h($_GET["quick_search"]) . "%");
		$result     = bind_pdo($sql, $parameters, "selectone");

		if (!empty($result)) {
			$category_id                              = $result["id"];
			//$_GET["category_id"] = $result["id"];
		}

	}

	/*if (!empty($_GET["recommend"]) && (int)$_GET["recommend"] == 1) {
		unset($_GET);
		$_GET["recommend"] = 1;
	} else {
		unset($_GET["recommend"]);
	}*/


	$level_of_grades       = get_master_type_code("LEVEL_OF_GRADE");
	$locations             = get_master_type_code("TEACH_POSITIONCODE");
	$instrument_categories = get_master_type_code("INSTRUMENT_TYPE");
	//$all_instruments = get_master_type_code("INSTRUMENT");
	$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");
?>

	<!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="GreyBackground">
		<div class="container" style="margin-top: 20px;">
			<div class="row">
				<div class="col-sm-12" style="margin-bottom: 15px;">
					<div id="Sorting">
						<div class="row">
							<div class="col-xs-7">
								<div class="QuickSearch" style="margin-bottom: 10px;">
									<div class="input-group">
										<input type="text" class="form-control" placeholder="導師名稱、導師編號" name="quick_search" id="quick_search" value="<?= $_GET["quick_search"] ?>">
										<span class="input-group-addon pointer" id="quick_search_submit">
											<span class="glyphicon glyphicon-search" aria-hidden="true"> </span> </span></div>
								</div>
							</div>
							<div class="col-xs-5 tr">
								<div id="my_wish" style="position: initial;">
									<a href="my_wish.php" style="color: #CC1342;">
										<span class="glyphicon glyphicon-heart" aria-hidden="true"></span>
									</a>
								</div>
							</div>
						</div>

						<div class="SortInstrument" style="width: 25%; float: left;">
							<select class="SelectBox" name="category_id" id="category_id">
								<option value="ANY">
									<?= _lang("Musical Instrument") ?>
								</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"] . '" ' . ($_GET["category_id"] == $row2["id"] ? "selected" : "") . '>' . $row2["name_" . $langcode] . '</option>';
										}
										echo '</optgroup>';
									}
								?>
							</select>
						</div>
						<div class="SortLevel" style="width: 25%; float: left;">
							<select class="SelectBox" name="level_of_grade" id="level_of_grade">
								<option value="ANY">
									<?= _lang("Level") ?>
								</option>
								<?php
									foreach ($level_of_grades as $row) {
										echo '<option value="' . $row["code"] . '" ' . ($_GET["level_of_grade"] == $row["code"] ? "selected" : "") . '>' . $row["name_" . $langcode] . '</option>';
									}
								?>
							</select>
						</div>
						<div class="SortLocation" style="width: 25%; float: left;">
							<select class="SelectBox" name="location[]" id="location">
								<option value="ANY">
									<?= _lang("District") ?>
								</option>
								<?php
									foreach ($locations as $row) {
										$selected = "";
										foreach ($_GET["location"] as $location_id) {
											if ($location_id == $row["id"]) {
												$selected = "selected";
												break;
											}
										}
										echo '<option value="' . $row["id"] . '" ' . $selected . '>' . $row["name_" . $langcode] . '</option>';
									}
								?>
							</select>
						</div>

						<div class="SortLocation" style="width: 25%; float: left;">
							<select name="sort_by" class="SelectBox" id="sort_by">
								<option value=""><?= _lang("Fee") ?></option>
								<option value="LOW_HIGH"><?= _lang("Low to High") ?></option>
								<option value="HIGH_LOW"><?= _lang("High to Low") ?></option>
							</select>
						</div>

						<div class="clearboth"></div>
					</div>
				</div>

				<div class="col-sm-9">
					<div class="tr">
						<div id="displaying_text"></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> 導師跟學生於iMusicCircle進行配對後,會開始學習階段。當中每次透過iMusicCircle 付款的時數,都會記錄於iMusicCircle的系統內,導師累積時數愈多,導師排名愈高。 </p>
		<h4><b>累積時數的星級分配</b></h4>
		<p> iMusicCircle會每天總結導師的累積時數,並按比例地分配各導師所得的星級,比例如下: </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>

	<?php if ($_SESSION["is_tutor"] == 1 && empty($_SESSION["popup2"])) {
		$tutor = get_tutor($_SESSION["member_login"]);

		echo '<div id="popup" style="display: none; text-align: center; color: #00ADEF; font-weight: bold;padding-top: 30px;"><div id="popup_content" style="cursor: pointer;">';

		if ($tutor["status"] < 4) {
			echo '請快快入去「我的履歷」完成導師註冊程序,<br>
你的個人檔案就可以在「導師搜尋」中出現。';
		}

		if ($tutor["status"] == 4 && $tutor["approved"] != 1) {
			echo '管理員正在審查你「我的履歷」中,<br>
完成審查後你的個人檔案就可以在
「導師搜尋」中出現。';
		}

		echo '</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" src="js/jquery.sticky.js"></script>
	<script type="text/javascript">
		function contact_tutor() {
			$('#LiFullbg').show();
			$('.course_payment_box,.course_payment_box .error').hide();
			$('.course_payment_box').show();
		}

		$('.PayTutorBTN3').click(
			function () {
				$(this).parent().parent().parent().hide();
				$('#LiFullbg').hide();
			}
		);
		$(function () {
			$("#popup_content").on("click", function () {
				window.location.href='tutor_profile.php';
			});

			<?php if($_SESSION["is_tutor"] == 1 && empty($_SESSION["popup2"]) && ($tutor["status"] < 4 || ($tutor["status"] == 4 && $tutor["approved"] != 1) )){ ?>
			$.fancybox({
				//settings
				'type': 'inline',
				'fitToView': false,
				'maxWidth': 800,
				'maxHeight': 80,
				'width': '100%',
				'height': '80%',
				'autoSize': false,
				'closeClick': false,
				'openEffect': 'none',
				'closeEffect': 'none',
				'href': '#popup',
			});
			<?php $_SESSION["popup2"] = 1; } ?>

			//filter onchange
			$("input, select").on("change", function () {
				var quick_search = $("#quick_search").val();
				var category_id = $("#category_id").val();
				var level_of_grade = $("#level_of_grade").val();
				var location = $("#location").val();
				var sort_by = $("#sort_by").val();

				location.href='category.php?quick_search='+quick_search+'&category_id='+category_id+'&level_of_grade='+level_of_grade+'&location='+location+'&sort_by='+sort_by;
			});

			$("#Sorting").sticky({topSpacing:80});

			$('.LiAdminMsg').submit(
				function () {
					var error = false;
					$('.error', this).hide();
					if (!$('select[name="instrument_id"]', this).val()) {
						$("#instrumentError", 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 (!$('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;
					}
				}
			);
			$(".fancybox1").fancybox({
				maxWidth: 800,
				maxHeight: 350,
				fitToView: false,
				width: '100%',
				height: '100%',
				autoSize: false,
				closeClick: false,
				openEffect: 'none',
				closeEffect: 'none'
			});
		});

		function resizeImage() {
			$(".tutor_img").show();

			//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_tutor(start) {
			$('#loading').slideDown(100);
			console.log("filter tutor");

			var quick_search = $("#quick_search").val();
			var category_id = $("#category_id").val(); //instrument
			var level_of_grade = $("#level_of_grade").val();
			var location = JSON.stringify($("#location").val());
			/*var teach_venue = JSON.stringify($("#teach_venue").val());
			var recommend = $("input[name='recommend']:checked").val();
			if (recommend != "1") {
				recommend = 0;
			}*/

			//var gender = $("input[name='gender[]']:checked").val();
			var sort_by = $("#sort_by").val();

			jQuery.ajax({
				url: '_ajax.php',
				type: 'POST',
				data: {
					ajax: "filter_tutor",
					quick_search: quick_search,
					category_id: category_id,
					level_of_grade: level_of_grade,
					location: location,
					//teach_venue: teach_venue,
					sort_by: sort_by,
					//recommend: recommend,
					start: start
				},
				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);

					//$("html, body").animate({scrollTop: 200}, 500);
				},
				success: function (result) {
					//$("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);

					$(".start").on("click", function () {
						var start = $(this).attr("data-value");
						filter_tutor(start);
					});

					$(".self_describemyself").dotdotdot();

					resizeImage();

					$.fn.stars = function () {
						return $(this).each(function () {
							$(this).html($('<span />').width(Math.max(0, (Math.min(5, parseFloat($(this).html())))) * 16));
						});
					};

					$('span.stars').stars();
					var _width = $(".tutor_img_container").width();
					$(".tutor_img_container").css("height", _width+"px");
				}
			});

		}

		$(function () {
			//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_tutor();

			});


			$("#category_id, #level_of_grade, #location, #teach_venue, #last_login").on("change", function () {
				filter_tutor();
			});

			//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_tutor();
			});

			//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_tutor();
			});


			//filter sort by
			$("#sort_by").on("change", function () {
				if($(this).val()){
					filter_tutor();
				}
			});

			<?php if (isset($_GET["sort_by"])) {
			//echo '$(".'.$_GET["sort_by"].'").trigger("click");';
		}?>
			//filter page
			//$(".start").on("click", function () {
			$(".start").on("click", function () {
				var start = $(this).attr("data-value");
				filter_tutor(start);
			});

			//center image
			resizeImage();

			$(window).resize(function () {
				resizeImage();
			});

			//text overflow
			$(".self_describemyself").dotdotdot();

			//change select
			/*$("#category_id").select2({
				width: "100%",
				minimumResultsForSearch: Infinity
			});

			$("#level_of_grade").select2({
				width: "100%",
				minimumResultsForSearch: Infinity
			});

			$("#location").select2({
				width: "100%",
				minimumResultsForSearch: Infinity
			});

			$("#sort_by").select2({
				width: "100%",
				minimumResultsForSearch: Infinity
			});*/

			//filter_tutor(); //auto run the first time filter tutor
			filter_tutor(<?=!empty($_GET["start"])?(int)$_GET["start"]:""?>);
		});

	</script>
	<?php $_SESSION["category_popup"] = 1;
		if (!isset($_SESSION["category_popup"])) { ?>
			<link rel="stylesheet" href="js/flexslider2/flexslider.css" type="text/css" media="screen"/>
			<script type="text/javascript" src="js/flexslider2/jquery.flexslider-min.js"></script>
			<script type="text/javascript">
				$(function () {
					$.fancybox({
						//settings
						'type': 'inline',
						'fitToView': false,
						'maxWidth': 800,
						'width': '100%',
						'height': '100%',
						'autoSize': false,
						'closeClick': false,
						'openEffect': 'none',
						'closeEffect': 'none',
						'href': '#popup',
					});

					$('#popup_slider').flexslider({
						animation: "slide"
					});

					<? if($_SESSION['course_msg'] == true){?>
					alert('你的聯絡資料已被記錄,我們將盡快與你聯絡。');
					<? unset($_SESSION['course_msg']); }?>
				});
			</script>
		<?php } ?>
	</body>
	</html>
<?php
	$_SESSION["category_popup"] = 1;


Youez - 2016 - github.com/yon3zu
LinuXploit