| 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 : |
<?php
include('_init.php');
if ($_SESSION["is_tutor"] != 1) {
header("Location: index.php");
exit;
}
$page_settings['domain'] = "tutor_postjob";
$sql = "select profile_id,(select id from `tutor_main` where cmsloginid = tb.user_id LIMIT 1) as id
from `profile_user` as tb where user_id = ? and deleted = ? LIMIT 1";
$parameters = array($_SESSION['cmsloginid'], 0);
$row_profile = bind_pdo($sql, $parameters, "selectone");
if ($row_profile['profile_id'] == 3) {
$sql = "select *,(select count(*) from `order` where job_id = tb.id and (status = 'paid') and deleted = 0) as count
from tutor_postjob as tb where tutormain_id = ? and deleted = ? order by createdate DESC";
$parameters = array($row_profile['id'], 0);
$rows = bind_pdo($sql, $parameters, "selectall");
}else{
$rows = get_teacherpostjob();
}
$sql = "select * from `order` where tutormain_id = ? and deleted = ? and (order_type = ?) order by createdate desc";
$parameters = array($_SESSION["member_login"], 0, "course");
$all_order_info = bind_pdo($sql, $parameters, "selectall");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('_head.php'); ?>
<link href="css/style_k.css?v=<?= time(); ?>" type="text/css" rel="stylesheet">
</head>
<body>
<?php include('_header.php') ?>
<?php include('_dialog.php') ?>
<div class="ProfileContent">
<div class="Profilecontainer">
<div class="row">
<div class="col-md-12">
<p id="post_jobs_desc">
同學可查看已發帖子及課堂記錄,得知帖子及課堂最新動態!
</p>
<div class="post_job_tab">
<a href="student_postjob_form.php">
<div class="post_job_tab_1 tc">
<?= _lang("Post") ?>
</div>
</a>
<a href="student_postjob_index.php">
<div class="post_job_tab_2 tc active">
<?= _lang("Posted")." / "._lang("Lesson Record") ?>
</div>
</a>
</div>
<!--<div class="scroll_left_right_container">
<div class="scroll_left_right"><img src="../img/scroll_left_right.png"></div>
</div>-->
<div class="tab_container">
<?php
if (!empty($_GET["update"])) {
echo '<div class="tc msg_text">' . _lang("Updated") . '</div>';
}
?>
<p style="color: #CC1342; font-weight: bold;"><?=_lang("Posted")?></p>
<div class="table-responsive" style="margin-bottom: 50px;">
<table id="example2" class="table table-bordered table-hover datatable-with-filter">
<thead>
<tr>
<!--<th class="no-filter" style="width:80px;"><?= _lang('Sort') ?></th>-->
<th style=""><?= lang("Post No.") ?></th>
<th style="" class="no-filter nowarp"><?= lang("樂器") ?></th>
<th class="no-filter nowarp"><?= lang("級別") ?></th>
<th class="no-filter" style="">
<? /* if ($row_profile['profile_id'] != 4) { ?>
<a href="<?= $page_settings['domain'] ?>_form.php" class="btn btn-sm btn-primary pull-right">
<?= _lang('Create') ?>
</a>
<? } else { ?>
<? if ($count_product['count'] < 2) { ?>
<a href="<?= $page_settings['domain'] ?>_form.php" class="btn btn-sm btn-primary pull-right">
<?= _lang('Create') ?>
</a>
<? } ?>
<? }*/ ?>
</th>
</tr>
</thead>
<tbody>
<?php foreach ($rows as $row) {
//Status
if (isset($_GET["show"]) && !empty($_GET["show"])) {
$show = "&show=all";
} else {
$show = "";
}
?>
<tr>
<td>
<?="C".str_pad($row["id"], 5, "0", STR_PAD_LEFT); ?>
</td>
<td>
<?
$sql = "select name_" . get_langcode() . " as name
from master_type_code where id = ? and typeid = ? and deleted = ? LIMIT 1";
$parameters = array($row["mas_instrument"], 'INSTRUMENT', 0);
$row_instrument = bind_pdo($sql, $parameters, "selectone");
?>
<?= $row_instrument["name"] ?>
</td>
<td>
<?= $row["level"] ?>
</td>
<td class="tr">
<div class="btn-group">
<? //if ($row['count'] == 0) { ?>
<a href="<?= $page_settings['domain'] ?>_form.php?id=<?= $row['id'] ?>" class="btn btn-sm btn-primary">
<i class="fa fa-pencil" aria-hidden="true"></i> </a>
<? //} ?>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
<p style="color: #CC1342; font-weight: bold;"><?=_lang("Lesson Record")?></p>
<div class="table-responsive" style="margin-bottom: 50px;">
<table id="example2" class="table table-bordered table-hover datatable-with-filter">
<thead>
<tr>
<th style=""><?= lang("課堂編號") ?></th>
<th style="" class="no-filter nowarp"><?= lang("樂器") ?></th>
<th class="no-filter nowarp"><?= lang("級別") ?></th>
<th class="no-filter" style=""></th>
</tr>
</thead>
<tbody>
<?php
foreach ($all_order_info as $row) {
//Status
/*if (isset($_GET["show"]) && !empty($_GET["show"])) {
$show = "&show=all";
} else {
$show = "";
}
$row_tutor = get_tutor($row['tutormain_id']);
$row_student = get_student($row['studentmain_id']);*/
if(!empty($row['job_id'])){
if ($row['order_type'] == 'course') {
$row_job = get_teacherpostjob($row['job_id']);
//$row_residence["name_cn"] = $row_job['address_cn'];
} else {
$row_job = get_studentpostjob($row['job_id']);
/*$sql = "select name_cn,name_en from master_type_code where id = ? and typeid = 'TEACH_POSITIONCODE' LIMIT 1";
$parameters = array($row['mas_residencecode']);
$row_residence = bind_pdo($sql, $parameters, "selectone");*/
}
$mas_instrument = $row_job['mas_instrument'];
}else{
$mas_instrument = $row['mas_instrument'];
}
$sql = "select name_cn,name_en from master_type_code where id = ? and typeid = 'INSTRUMENT' LIMIT 1";
$parameters = array($mas_instrument);
$row_instrument = bind_pdo($sql, $parameters, "selectone");
?>
<tr>
<td class='listtxt' style='padding-left:5'><?= short_code($row["order_no"], 2, -5) ?></td>
<td class='listtxt' style='padding-left:5'><?= $row_instrument["name_cn"] ?></td>
<td class='listtxt' style='padding-left:5'>
<?php
if ($row['order_type'] == 'try') {
if ($row['level'] == 1) {
echo '1 - 2';
} elseif ($row['level'] == 2) {
echo '3 - 5';
} elseif ($row['level'] == 3) {
echo _lang("6 or above 6");
}
} else if ($row['order_type'] == 'formal') {
if ($row['level'] < 8) {
echo $row['level'];
} else if ($row['level'] == 9) {
echo '8級以上';
}
} else if ($row['order_type'] == 'course') {
if ($row['level'] == 1) {
echo "初級";
} else if ($row['level'] == 3) {
echo "中級";
}
}
?>
</td>
<td class="tr">
<div class="btn-group">
<a href="order_form.php?id=<?= $row['id'] ?>" class="btn btn-sm btn-primary">
<i class="fa fa-pencil" aria-hidden="true"></i> </a>
</div>
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
<? include('_footer.php') ?>
<script>
$(function () {
});
</script>
</body>
</html>