public function car() { $user = Sentry::getUser(); if ($user->is_common_user()) { return View::make('404'); } $account = BusinessController::accountInfo($user->user_id); $account['unit'] = $account['carUnit']; return View::make('pages.serve-center.data.cars', ['account' => $account]); }
public function overview() { if (Sentry::getUser()->is_common_user()) { return View::make('pages.finance-center.cost-manage.overview'); } else { if (Sentry::getUser()->is_business_user()) { return View::make('pages.finance-center.cost-manage.overview', ['account_info' => BusinessController::accountInfo()]); } } return 'Error'; }
public function search_violation() { $user = Sentry::getUser(); // 普通用户每天只能查询两次 if ($user->is_common_user()) { $account_to_render = ['remain_search' => SearchController::get_search_count_remain($user->user_id, 'violation')]; } else { if ($user->is_business_user()) { $account = BusinessController::accountInfo($user->user_id); $account_to_render = ['unit' => $account['violationUnit'], 'balance' => $account['balance']]; } else { return View::make('Unkown error'); } } return View::make('pages.serve-center.business.vio', ['account' => $account_to_render]); }
public function changeQueryUnivalence() { $userId = Input::get("user_id"); $user = BusinessUser::where("user_id", "=", $userId)->get(); try { $accountInfo = BusinessController::accountInfo($userId); $result = BusinessController::get_default_univalence(); } catch (Exception $e) { return View::make('errors.page-error'); } return View::make('pages.admin.business-center.change-query-univalence', ["userId" => $userId, "username" => $user[0]->business_name, "violationUnivalence" => $accountInfo["violationUnit"], "defaultViolationUnivalence" => $result["violation"], "licenseUnivalence" => $accountInfo["licenseUnit"], "defaultLicenseUnivalence" => $result["license"], "carUnivalence" => $accountInfo["carUnit"], "defaultCarUnivalence" => $result["car"]]); }
public function index() { return View::make('pages.finance-center.recharge.index', ['account_info' => BusinessController::accountInfo()]); }