| 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 : |
<? include('_init.php'); ?>
<?
$id = intval($_SESSION['member_login']);
if(!$id){
$path = 'index.php';
@header("Location: {$path}");
echo "<script language='JavaScript'>window.location='{$path}'</script>";
exit();
}else{
$sql = "select *,(select cmsloginname from sys_cms_login where tb.cmsloginid = cmsloginid and deleted = 0 LIMIT 1) as username
from tutor_main as tb where id = ? and deleted = ? and status = ?";
$parameters = array($id,0,2);
$row = bind_pdo($sql, $parameters, "selectone");
if(!$row['id']){
$path = 'index.php';
@header("Location: {$path}");
echo "<script language='JavaScript'>window.location='{$path}'</script>";
exit();
}
}
$lang = $_SESSION['langcode'];
//
$sql = "select * from tutor_main where id = ? and deleted = ?";
$parameters = array($id, 0);
$row = bind_pdo($sql, $parameters, "selectone");
//
$sql = "select * from master_type_code where typeid = ? and deleted = ? order by sort ASC";
$parameters = array('EXPSTUDENTAGE', 0);
$rows_expstudentage = bind_pdo($sql, $parameters, "selectall");
$sql = "select * from master_type_code where typeid = ? and deleted = ? order by sort asc";
$parameters = array('INSTRUMENT_TYPE', 0);
$rows_instrument_type = bind_pdo($sql, $parameters, "selectall");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<? include('_head.php'); ?>
<link href="css/_sign.css" type="text/css" rel="stylesheet">
<style>
a{
color:#F60;
}
</style>
<script>
$(function () {
$('.testcharge').change(
function(){
if ($(this).val() && $(this).val() < 75) {
$(this).val(75);
}
}
);
$('.expectcharge').change(
function(){
if ($(this).val() && $(this).val() < 20) {
$(this).val(20);
}
}
);
$('.inputPrice,.inputCharge').change(
function () {
if (isNaN($(this).val())) {
$(this).val('');
}
}
);
$('#LiForm').submit(
function () {
var focus_array = new Array();
var error = false;
$('.error').hide();
if ($('input[name="expstudentage_id[]"]:checked', this).size() == 0) {
$("#expstudentageError").show();
focus_array[focus_array.length] = $('input[name="expstudentage_id[]"]').eq(0);
error = true;
}
var check = 0;
for(var i=1;i<=6;i++){
var count = 0;
var count2 = 0;
if($('select[name="tutor_expectcharge[mas_instrument'+i+']"]').val()){
check++;
$('#instrument'+i+' .expectcharge').each(
function(){
if($(this).val()){
count++;
}
}
);
if(count == 0){
$("#expectchargeError"+i).show();
focus_array[focus_array.length] = $('#instrument'+i+' .expectcharge').eq(0);
error = true;
}
//
$('#instrument'+i+' .testcharge').each(
function(){
if($(this).val()){
count2++;
}
}
);
if(count2 == 0){
$("#testchargeError"+i).show();
focus_array[focus_array.length] = $('#instrument'+i+' .testcharge').eq(0);
error = true;
}
}
}
if(check == 0){
$("#expectchargeError").show();
focus_array[focus_array.length] = $('.tab-pane.active .form-control').eq(0);
error = true;
}
if (error == false) {
return true;
} else {
//focus_array[0].focus();
$('html, body').animate({
scrollTop: $(focus_array[0]).offset().top - 200
}, 500);
return false;
}
}
);
});
</script>
</head>
<body>
<!-- Navigation -->
<? include('_header.php'); ?>
<div class="formSection">
<? $signupMenu = 'subject' ?>
<? include('_signupTutorMenu.php') ?>
<div class="TutorForm">
<form action="_process.php" method="post" enctype="multipart/form-data" id="LiForm">
<input type="hidden" name="action" value="signup_subject"/>
<input type="hidden" name="lang" value="<?= $lang ?>"/>
<div class="FormHeading"><?=_lang("Let us know more about you!")?></div>
<div class="InputDataIII">
<div class="BoxTitle"><font style="color:red;">*</font><?=_lang("Expected Students Age")?></div>
<? foreach ($rows_expstudentage as $row_expstudentage) { ?>
<?
$sql = "select * from `tutor_expstudentage` where tutormain_id = ? and mas_expstudentage = ? and deleted = ?";
$parameters = array($row['id'], $row_expstudentage['id'], 0);
$count_expstudentage = bind_pdo($sql, $parameters, "selectone");
?>
<input name="expstudentage_id[]" type="checkbox" value="<?= $row_expstudentage['id'] ?>" <? if ($count_expstudentage['id']){ ?>checked<? } ?>>
<?= $row_expstudentage['name_' . get_langcode()] ?>
<? } ?>
<div style="color:#F00; display:none;" class="error" id="expstudentageError"><?=_lang("Please select Expected Students Age.")?></div>
</div>
<div class="TabSection">
<div class="BoxTitle"><font style="color:red;">*</font><?=_lang("Select teaching musical instruments")?> <font color="#0012ff" style="font-size:12px; font-weight:100;">(<?=_lang("If you teach more than 1 musical instrument, please click musical instrument 2 / musical instrument 3")?>) (<?=html_entity_decode(_lang("Please click <a href=teaching_list.php target=_blank>here</a> to view teaching list of qualified musical instruments."))?>)</font></div>
<div style="color:#F00; display:none;" class="error" id="expectchargeError"><?=_lang("Please select a teaching musical instruments")?></div>
<ul class="nav nav-tabs" id="myTab">
<? for ($i = 1; $i <= 10; $i++) { ?>
<li <? if ($i == 1){ ?>class="active"<? } ?>>
<a data-target="#instrument<?= $i ?>" data-toggle="tab" style="cursor:pointer;"><?=_lang("Musical Instrument")?>
<?= $i ?>
</a></li>
<? } ?>
</ul>
<div class="tab-content" style="border:1px solid #ddd; border-top:0px; padding:15px;">
<? for ($i = 1; $i <= 10; $i++) { ?>
<?
$sql = "select * from tutor_charge where tutormain_id = ? and instrument_no = ? and deleted = ?";
$parameters = array($row['id'], $i, 0);
$count_charge = bind_pdo($sql, $parameters, "selectone");
//print_r($count_charge);
?>
<!-- Tab <?= $i ?> -->
<div class="tab-pane <? if ($i == 1) { ?>active<? } ?>" id="instrument<?= $i ?>">
<div class="Expection">
<div class="HalfLeft">
<div class="BoxTitle"><?=_lang("Musical Instrument")?></div>
<select name="tutor_expectcharge[mas_instrument<?= $i ?>]" class="form-control">
<option value="">-<?=_lang("Musical Instrument")?>-</option>
<? foreach ($rows_instrument_type as $row_instrument_type) { ?>
<?
$sql = "select * from master_type_code where typeid = ? and extra1 = ? and deleted = ? order by sort asc";
$parameters = array('INSTRUMENT', $row_instrument_type['code'], 0);
$rows_instrument = bind_pdo($sql, $parameters, "selectall");
?>
<optgroup label="<?= $row_instrument_type['name_' . $lang] ?>">
<? foreach ($rows_instrument as $row_instrument) { ?>
<option value="<?= $row_instrument['id'] ?>" <? if ($count_charge['mas_instrument'] == $row_instrument['id']){ ?>selected<? } ?>>
<?= $row_instrument['name_' . $lang] ?>
</option>
<? } ?>
</optgroup>
<? } ?>
</select>
</div>
</div>
<div class="ChargeTable">
<div class="BoxTitle"><font style="color:red;">*</font><?=_lang("Expected Fee")?> ($)</div>
<div style="color:#F00; display:none;" class="error" id="expectchargeError<?=$i?>"><?=_lang("Please enter at least one expected charge.")?></div>
<table class="table">
<thead>
<tr>
<th><?=_lang('Grade')?></th>
<th>30 <?=_lang('mins')?></th>
<th>45 <?=_lang('mins')?></th>
<th>60 <?=_lang('mins')?></th>
</tr>
</thead>
<tbody>
<? for ($a = 1; $a <= 9; $a++) {
if ($count_charge['id']) {
$sql = "select * from tutor_expectcharge where charge_id = ? and type = ? and grade = ? and deleted = ?";
$parameters = array($count_charge['id'], 'fee', $a, 0);
$count_expectcharge = bind_pdo($sql, $parameters, "selectone");
}
?>
<tr>
<th scope="row">
<? if($a==9){?>
<?=_lang("Over level 8")?>
<? }else{?>
<?=$a?>
<? }?></th>
<td>
<input name="tutor_expectcharge[charge_30min<?= $i ?>_<?= $a ?>]" type="text" class="inputPrice expectcharge" value="<?= $count_expectcharge['charge_30min'] ?>">
</td>
<td>
<input name="tutor_expectcharge[charge_45min<?= $i ?>_<?= $a ?>]" type="text" class="inputPrice expectcharge" value="<?= $count_expectcharge['charge_45min'] ?>">
</td>
<td>
<input name="tutor_expectcharge[charge_60min<?= $i ?>_<?= $a ?>]" type="text" class="inputPrice expectcharge" value="<?= $count_expectcharge['charge_60min'] ?>">
</td>
</tr>
<? } ?>
</tbody>
</table>
<hr>
<div class="BoxTitle"><font style="color:red;">*</font><?=_lang("Trial Fee")?> ($) <font color="#0012ff" style="font-size:12px; font-weight:100;">(預設試堂為2堂,音樂圈會收取當中1堂試堂費或HKD150(以較高者為準)作行政費)</font></div>
<div style="color:#F00; display:none;" class="error" id="testchargeError<?=$i?>"><?=_lang("Please enter at least one trial fee.")?></div>
<table class="table" style="margin-bottom:0px;">
<thead>
<tr>
<th><?=_lang('Grade')?></th>
<th>30 <?=_lang('mins')?></th>
<th>45 <?=_lang('mins')?></th>
<th>60 <?=_lang('mins')?></th>
</tr>
</thead>
<tbody>
<? for ($a = 1; $a <= 3; $a++) { ?>
<?
if ($count_charge['id']) {
$sql = "select * from tutor_expectcharge where charge_id = ? and type = ? and grade = ? and deleted = ?";
$parameters = array($count_charge['id'], 'tfee', $a, 0);
$count_expectcharge = bind_pdo($sql, $parameters, "selectone");
}
?>
<tr>
<th scope="row"><? if ($a == 1) { ?>
1 - 2
<? } else if ($a == 2) { ?>
3 - 5
<? } else if ($a == 3) { ?>
<?=_lang("6 or above 6")?>
<? } ?></th>
<td>
<input type="text" name="tutor_expectcharge[t_charge_30min<?= $i ?>_<?= $a ?>]" value="<?= $count_expectcharge['charge_30min'] ?>" class="inputPrice testcharge">
</td>
<td>
<input type="text" name="tutor_expectcharge[t_charge_45min<?= $i ?>_<?= $a ?>]" value="<?= $count_expectcharge['charge_45min'] ?>" class="inputPrice testcharge">
</td>
<td>
<input type="text" name="tutor_expectcharge[t_charge_60min<?= $i ?>_<?= $a ?>]" value="<?= $count_expectcharge['charge_60min'] ?>" class="inputPrice testcharge">
</td>
</tr>
<? } ?>
<tr>
</tbody>
</table>
</div>
</div>
<? } ?>
<div style="clear:both;"></div>
</div>
<div class="HalfLeft">
<div class="BoxTitle"><?=_lang("Provide Accompaniment")?></div>
<input type="checkbox" name="canaccompany" value="1" <? if ($row['canaccompany'] == 1){ ?>checked<? } ?>>
<?=_lang("Possible")?>
</div>
<div class="AdditionalCharge">
<div class="BoxTitle"><?=_lang("Additional Charge for Visit Home in Each Lesson")?><font color="#0012ff" style="font-size:12px; font-weight:100;">(<?=_lang("Can leave blank")?>)</font></div>
<?
$sql = "select * from tutor_teachareacode where tutormain_id = ? and deleted = ?";
$parameters = array($row['id'], 0);
$count_area = bind_pdo($sql, $parameters, "selectall");
foreach ($count_area as $res_area) {
$sql = "select * from master_type_code where typeid = ? and id = ? and deleted = ?";
$parameters = array('TEACH_POSITIONCODE', $res_area['mas_teachareacode'], 0);
$row_position = bind_pdo($sql, $parameters, "selectone");
?>
<div class="ChargeArea">
<?= $row_position['name_'.$lang] ?>
<input name="area[id][]" type="hidden" value="<?= $res_area['id'] ?>">
<input class="inputCharge" name="area[studenhome_addcharge][]" placeholder="$0.00" value="<?= $res_area['studenhome_addcharge'] ?>">
</div>
<? } ?>
</div>
</div>
<input type="submit" value="<?=_lang("Next Step")?>" class="submitBTN">
</form>
</div>
</div>
<? include('_footer.php') ?>
</body>
</html>