$member = new Members(); $referer = ""; capt_check("capt_logging"); if (empty($_GET['forward'])) { $_GET['forward'] = $_SERVER['HTTP_REFERER']; } if (isset($_POST['action']) && $_POST['action'] == "logging") { if (!empty($_POST['data']['login_name']) && !empty($_POST['data']['login_pass'])) { unset($_SESSION['authnum_session']); $tmpUserName = $_POST['data']['login_name']; $tmpUserPass = $_POST['data']['login_pass']; $checked = $member->checkUserLogin($tmpUserName, $tmpUserPass); $tmp_memberinfo = array(); if ($checked > 0) { $tmp_memberinfo = $member->info; $point->update("logging", $member->info['id']); if (!empty($_REQUEST['forward'])) { pheader("location:" . $_REQUEST['forward']); } switch ($tmp_memberinfo['office_redirect']) { case 1: $goto_page = URL; break; case 2: $goto_page = "office-room/"; break; case 3: $goto_page = "office-room/offer.php"; break; case 4: $goto_page = "office-room/pms.php";
$tomorrow_end = $today_start + 172800; if ($memberinfo['points'] < $_PB_CACHE['setting']['offer_moderate_point']) { flash("not_enough_point"); } $point->actions['moderate'] = array("rule" => "every", "do" => "dec", "point" => $_PB_CACHE['setting']['offer_moderate_point']); if (!empty($id)) { $item = $pdb->GetRow("SELECT * FROM {$tb_prefix}trades WHERE id=" . $id . " AND status=1 AND expire_time>" . $time_stamp . " AND member_id=" . $the_memberid); if (empty($item)) { flash("failed"); } if ($item['display_expiration'] > $tomorrow_start && $item['display_expiration'] < $tomorrow_end) { flash("one_time_within_24_h"); } $sql = "UPDATE {$tb_prefix}trades SET display_order='1',display_expiration='" . ($time_stamp + 86400) . "' WHERE id=" . $item['id']; $result = $pdb->Execute($sql); $point->update("moderate", $the_memberid); flash("success"); } break; case "edit": if (!empty($company_id)) { $company->primaryKey = "member_id"; $company->newCheckStatus($companyinfo['status']); $company_info = $company->getInfoById($company_id); setvar("CompanyInfo", $company_info); } setvar("Forms", $form->getAttributes()); if (!empty($id)) { $trade_info = $trade->getInfoByCondition($id, " AND t.member_id=" . $the_memberid); if (empty($trade_info) || !$trade_info) { flash('data_not_exists');
$tomorrow_end = $today_start + 172800; if ($memberinfo['points'] < $_PB_CACHE['setting1']['offer_moderate_point']) { flash("not_enough_point"); } $point->actions['moderate'] = array("rule" => "every", "do" => "dec", "point" => $_PB_CACHE['setting1']['offer_moderate_point']); if (!empty($id)) { $item = $pdb->GetRow("SELECT * FROM {$tb_prefix}trades WHERE id=" . $id . " AND status=1 AND expire_time>" . $time_stamp . " AND member_id=" . $_SESSION['MemberID']); if (empty($item)) { flash("failed"); } if ($item['display_expiration'] > $tomorrow_start && $item['display_expiration'] < $tomorrow_end) { flash("one_time_within_24_h"); } $sql = "UPDATE {$tb_prefix}trades SET display_order='1',display_expiration='" . ($time_stamp + 86400) . "' WHERE id=" . $item['id']; $result = $pdb->Execute($sql); $point->update("moderate", $_SESSION['MemberID']); flash("success"); } break; case "edit": if (!empty($company_id)) { $company->primaryKey = "member_id"; $company->newCheckStatus($companyinfo['status']); $company_info = $company->getInfoById($company_id); setvar("CompanyInfo", $company_info); } setvar("Forms", $form->getAttributes()); if (!empty($id)) { $trade_info = $trade->read("*", $id, null, " member_id=" . $_SESSION['MemberID']); if (empty($trade_info) || !$trade_info) { flash('data_not_exists');