public static function display($business) { $str = ""; for ($i = 0; $i < count($business); $i++) { $loaidv = LoaiDichVuBUS::getById($business[$i]['loaidv']); $loainha = LoaiNhaBUS::getById($business[$i]['loainha']); $user = UsersBUS::GetUserByID($business[$i]['chusohuu']); $str .= '<tr>'; $str .= '<td align="center">' . ($i + 1) . '</td>'; $str .= '<td>' . $user['hoten'] . '</td>'; $str .= '<td>' . $business[$i]['tieude'] . '<img src="images/vip.gif"></td>'; $str .= '<td>' . $loainha['ten']; if ($business[$i]["rank"] == 1) { $str .= " <img src='images/hot.gif' />"; } $str .= '</td>'; $str .= '<td>' . $business[$i]['sonha'] . '/' . $business[$i]['duong'] . ', ' . $business[$i]['phuong'] . ', ' . $business[$i]['quan'] . ', ' . $business[$i]['tinh'] . '</td>'; $str .= '<td align="center">' . $business[$i]['ngaydang'] . '</td>'; $str .= '<td align="center">' . $business[$i]['thoihantin'] . '</td>'; $str .= '<td align="center" style="color:green;">'; switch ($business[$i]['status']) { case 0: $str .= "Tin chờ duyệt"; break; case 1: $str .= "Tin đã duyệt"; break; case 2: $str .= "Tin đăng VIP"; break; case 3: $str .= "Tin hết hạn"; break; default: $str .= "Tin bị xóa"; break; } $str .= '</td>'; $str .= '<td align="center">' . $loaidv['ten'] . '</td>'; $str .= '</tr>'; } return $str; }
function displayWithSumRow($business, $loai, $monthFrom, $monthTo, $year) { $str = null; $str .= '<table width="70%" border="0" align="center" cellspacing="0" cellpadding="0" id="tblist">'; $str .= '<tr class="title">'; $str .= '<td width="30px" align="center">#</td>'; $str .= '<td width="30px" align="center">'; $str .= '<input type="checkbox" name="cbAll" id="cbAll" onclick="checkALL()"/></td>'; $str .= '<td width="70px" align="center">Ngày thu</td>'; $str .= '<td align="center">Công việc</td>'; $str .= '<td width="20%">Nhân viên thu</td>'; $str .= '<td align="right" width="100px">Số tiền</td>'; $str .= '</tr>'; for ($i = 0; $i < count($business); $i++) { $user = UsersBUS::GetUserByID($business[$i]['nhanvien']); $dvTien = DonViTienBUS::selectId($business[$i]['donvi']); $str .= '<tr>'; $str .= '<td align="center">' . ($i + 1) . '</td>'; $str .= '<td align="center"><input type="checkbox" name="cbId[]" id="cbId[]" value="' . $business[$i]['id'] . '"></td>'; $str .= '<td align="center">' . $business[$i]["ngay"] . '</td>'; $str .= '<td>' . $business[$i]["congviec"] . '</td>'; $str .= '<td>' . $user['hoten'] . '</td>'; $str .= '<td align="right">' . number_format($business[$i]["sotien"]) . ' ' . $dvTien['ten'] . '</td>'; $str .= '</tr>'; } $str .= '<tr>'; $str .= '<td align="right" colspan="5"><b>Tổng thu:</b></td>'; $sumRow = null; if ($monthTo == null && $monthFrom == null && $year == null) { $sumRow = ThuChiBUS::SumTongTien($loai); } else { $sumRow = ThuChiBUS::SumTongTienByMonth($loai, $monthFrom, $monthTo, $year); } $str .= '<td align="right"><b>' . $sumRow[0] . ' vnd</b></td>'; $str .= '</tr>'; $str .= '</table>'; $str .= "<script>\$(\"table[id='tblist'] tr:even\").css('background-color', '#EFEFEF');</script>"; return $str; }
$flag = 1; } if ($_SESSION["curUser"][8] == 4) { $flag = 1; } if ($flag == 0) { // Khong duoc phep di tiep header("Location: index.php"); } $uid = (int) $_GET["uid"]; if (empty($uid)) { return; } $PATH = str_replace('//', '/', dirname(__FILE__) . '/'); include_once $PATH . "../../../BUS/UsersBUS.php"; $user = UsersBUS::GetUserByID($uid); ?> <script> function validate() { if (document.getElementById("txtHoten").value == "") { alert("Bạn chưa điền họ tên. Vui lòng kiểm tra lại."); document.getElementById("txtHoten").focus(); return false; } if (document.getElementById("txtSdt1").value == "") { alert("Số điện thoại 1 không được rỗng. Vui lòng kiểm tra lại."); document.getElementById("txtSdt1").focus(); return false;
public static function load($curPage, $level, $nam, $thangfrom, $thangto) { $totalItems = null; $business = null; $constMaxItem = 5; $maxItems = $constMaxItem; $maxPages = 25; $offset = ($curPage - 1) * $maxItems; $condition = EvaluateProcessor::getkhenthuongCondition($level, $nam, $thangfrom, $thangto); $strSQL = "select * from khenthuong,user where khenthuong.iduser=user.id " . $condition . " limit {$offset},{$maxItems}"; $evaluate = KhenThuongBUS::selectByIdSQL($strSQL); $strSQL = "select count(*) from khenthuong,user where khenthuong.iduser=user.id " . $condition; $totalEvaluate = KhenThuongBUS::countBySQL($strSQL); $display = ""; $display .= EvaluateProcessor::displayHeader($totalEvaluate[0]); for ($i = 0; $i < count($evaluate); $i++) { $user = UsersBUS::GetUserByID($evaluate[$i]['iduser']); $display .= EvaluateProcessor::display($i + 1, $evaluate[$i]['iduser'], $user['hoten'], $user['email'], $user['gioitinh'], $user['level'], $evaluate[$i]['loai'], $evaluate[$i]['thuong'], $evaluate[$i]['ngay']); } $display .= EvaluateProcessor::displayFooter("", -1, "", "", -1, "", "", "", ""); $strPaging = Utils::paging('', $totalEvaluate[0], $curPage, $maxPages, $constMaxItem); return $display . $strPaging; }
width="986" height="177"> </div> <table bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="986;"> <tr> <td style="border-right: 1px solid rgb(180, 215, 232); background-repeat: repeat-y;" background="1_files/menubg_all.jpg" valign="top" width="270"> <?php include "../include/box_left_thanhvien.php"; ?> </td> <!-- form start--> <?php include_once "../BUS/UsersBUS.php"; if (isset($curUserId)) { $user = UsersBUS::GetUserByID($curUserId); } if (!isset($curUserId)) { header("Location:dichvu.php"); } ?> <div style="padding:20px;" id="frmThayDoiThongTinKH" name="frmThayDoiThongTinKH"> <form action="user/xulydangky.php?id=<?php echo $curUserId; ?> " method="post" name="frmThayDoiThongTinKH" id="frmThayDoiThongTinKH" > <td style="padding: 10px;" valign="top"> <div style="width: 686px;"> <div style="margin-left: 10px; margin-top: 10px; font-family: tahoma; font-size: 18px; font-weight: bold; color:#890C29;"> CẬP NHẬT THÔNG TIN KHÁCH HÀNG</div>
$donviDV = DonviDichVuBUS::selectId($business['donvidv']); $donviTien = DonviTienBUS::selectId($business['donvitien']); if ($business['giaban'] != null) { $money = Utils::convert_Money($business['giaban']); } else { $money = "0,00"; } echo $money . " " . $donviTien['ten'] . "/" . $donviDV['ten']; ?> </div> <div class="contact"> <div class="registerBuy"> Thông tin liên hệ</div> <?php require_once "../BUS/UsersBUS.php"; $user = UsersBUS::GetUserByID($business['chusohuu']); ?> <div class="name"> Tên : <a href="" id="ctl00_MainContent_ctl00_hpUserName"><?php echo $user['hoten']; ?> </a> </div> <div class="phone"> Điện thoại : <?php echo $user['sdt1']; ?> </div> <div class="email nonedisplay"> Email : <?php echo $user['email'];
<?php if (!isset($_SESSION["curUser"])) { header("Location: index.php"); } $PATH = str_replace('//', '/', dirname(__FILE__) . '/'); include_once $PATH . "../../BUS/UsersBUS.php"; $user = UsersBUS::GetUserByID($_SESSION["curUser"]["id"]); ?> <script> function checkSDT1() { if (document.getElementById("sdt1").value != "") document.getElementById("sdt2").disabled = false; else { document.getElementById("sdt2").disabled = true; document.getElementById("sdt2").value = ""; } } function passwordStrength(password) { var desc = new Array(); desc[0] = "Very Weak"; desc[1] = "Weak"; desc[2] = "Better"; desc[3] = "Medium"; desc[4] = "Strong"; desc[5] = "Strongest";