本文整理匯總了PHP中Model_Users::getLevelTitle方法的典型用法代碼示例。如果您正苦於以下問題:PHP Model_Users::getLevelTitle方法的具體用法?PHP Model_Users::getLevelTitle怎麽用?PHP Model_Users::getLevelTitle使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Model_Users
的用法示例。
在下文中一共展示了Model_Users::getLevelTitle方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: returnHtmlDetail
public static function returnHtmlDetail()
{
//XPER: función que carga PIN
static $view = null, $model_images = null, $request = null;
if ($view === null) {
$view = JO_View::getInstance();
}
if ($model_images === null) {
$model_images = new Helper_Images();
}
if ($request === null) {
$request = JO_Request::getInstance();
}
//$request = $this->getRequest();
//////////// Categories ////////////
$view->categories = array();
$categories = Model_Categories::getCategories(array('filter_status' => 1));
foreach ($categories as $category) {
$category['subcategories'] = Model_Categories::getSubcategories($category['category_id']);
$view->categories[] = $category;
}
//////////// Age ////////////
$view->ages = array();
$ages = Model_Users::getAge();
$view->ages = $ages;
//////////// Level ////////////
$view->levels = array();
$levels = Model_Users::getLevel();
$view->levels = $levels;
$user_data = Model_Users::getActivateUser(JO_Session::get('user[user_id]'));
$view->user_data = $user_data;
if (JO_Registry::get('isMobile')) {
$view->urlmensajes = WM_Router::create($request->getBaseUrl() . '?controller=users&action=mensajes&user_id=' . $request->getRequest('board_user'));
}
//gender
if ($request->issetPost('gender')) {
$view->gender = $request->getRequest('gender');
} elseif (isset($user_data['gender'])) {
$view->gender = $user_data['gender'];
} else {
$view->gender = "";
}
//location
if ($request->issetPost('location')) {
$view->location = $request->getPost('location');
} elseif (isset($user_data['location'])) {
$view->location = $user_data['location'];
} else {
$view->location = '';
}
//sport category
if ($request->issetPost('sport_category')) {
$view->sport_category = $request->getPost('sport_category');
if ($request->getPost('sport_category') != "") {
$view->cat_title = Model_Boards::getCategoryTitle($request->getPost('sport_category'));
}
} elseif (isset($user_data['sport_category'])) {
$view->sport_category = $user_data['sport_category'];
$view->cat_title = Model_Boards::getCategoryTitle($user_data['sport_category']);
} else {
$view->cat_title = '';
$view->sport_category = '';
}
//age
if ($request->issetPost('age')) {
$view->age = $request->getPost('age');
if ($request->getPost('age') != "") {
$view->age_title = Model_Users::getAgeTitle($request->getPost('age'));
}
} elseif (isset($user_data['age'])) {
$view->age = $user_data['age'];
$view->age_title = Model_Users::getAgeTitle($user_data['age']);
} else {
$view->age_title = '';
$view->age = '';
}
//level
if ($request->issetPost('level')) {
$view->level = $request->getPost('level');
if ($request->getPost('level') != "") {
$view->level_title = Model_Users::getLevelTitle($request->getPost('level'));
}
} elseif (isset($user_data['level'])) {
$view->level = $user_data['level'];
$view->level_title = Model_Users::getLevelTitle($user_data['level']);
} else {
$view->level_title = '';
$view->level = '';
}
//comment
if ($request->issetPost('comment')) {
$view->comment = $request->getPost('comment');
} elseif (isset($user_data['comment'])) {
$view->comment = $user_data['comment'];
} else {
$view->comment = '';
}
//$view->form_action = WM_Router::create( $request->getBaseUrl() . '?controller=addpin&action=get_images' );
//$view->from_url = WM_Router::create( $request->getBaseUrl() . '?controller=users&action=activatePopup' );
$view->from_url = WM_Router::create($request->getBaseUrl() . '?controller=users&action=activateDetail');
//.........這裏部分代碼省略.........
示例2: MAXactivatedAction
//.........這裏部分代碼省略.........
} else {
$this->view->location = '';
}
//sport category
if ($request->issetPost('sport_category')) {
$this->view->sport_category = $request->getPost('sport_category');
if ($request->getPost('sport_category') != "") {
$this->view->cat_title = Model_Boards::getCategoryTitle($request->getPost('sport_category'));
}
} elseif (isset($user_data['sport_category'])) {
$this->view->sport_category = $user_data['sport_category'];
$this->view->cat_title = Model_Boards::getCategoryTitle($user_data['sport_category']);
} else {
$this->view->cat_title = '';
$this->view->sport_category = '';
}
//age
if ($request->issetPost('age')) {
$this->view->age = $request->getPost('age');
if ($request->getPost('age') != "") {
$this->view->age_title = Model_Users::getAgeTitle($request->getPost('age'));
}
} elseif (isset($user_data['age'])) {
$this->view->age = $user_data['age'];
$this->view->age_title = Model_Users::getAgeTitle($user_data['age']);
} else {
$this->view->age_title = '';
$this->view->age = '';
}
//level
if ($request->issetPost('level')) {
$this->view->level = $request->getPost('level');
if ($request->getPost('level') != "") {
$this->view->level_title = Model_Users::getLevelTitle($request->getPost('level'));
}
} elseif (isset($user_data['level'])) {
$this->view->level = $user_data['level'];
$this->view->level_title = Model_Users::getLevelTitle($user_data['level']);
} else {
$this->view->level_title = '';
$this->view->level = '';
}
//option1
if ($request->issetPost('option1')) {
$this->view->option1 = $request->getPost('option1');
} elseif (isset($user_data['option1'])) {
$this->view->option1 = $user_data['option1'];
} else {
$this->view->option1 = '';
}
//option2
if ($request->issetPost('option2')) {
$this->view->option2 = $request->getPost('option2');
} elseif (isset($user_data['option2'])) {
$this->view->option2 = $user_data['option2'];
} else {
$this->view->option2 = '';
}
//option3
if ($request->issetPost('option3')) {
$this->view->option3 = $request->getPost('option3');
} elseif (isset($user_data['option3'])) {
$this->view->option3 = $user_data['option3'];
} else {
$this->view->option3 = '';
}
示例3: activatePopupAction
public function activatePopupAction()
{
//public function activateDetailAction() {
$request = $this->getRequest();
//////////// Categories ////////////
$this->view->categories = array();
$categories = Model_Categories::getCategories(array('filter_status' => 1));
foreach ($categories as $category) {
$category['subcategories'] = Model_Categories::getSubcategories($category['category_id']);
$this->view->categories[] = $category;
}
//////////// Age ////////////
$this->view->ages = array();
$ages = Model_Users::getAge();
$this->view->ages = $ages;
//////////// Level ////////////
$this->view->levels = array();
$levels = Model_Users::getLevel();
$this->view->levels = $levels;
$user_data = Model_Users::getActivateUser(JO_Session::get('user[user_id]'));
$this->view->user_data = $user_data;
if (JO_Registry::get('isMobile')) {
$this->view->urlmensajes = WM_Router::create($request->getBaseUrl() . '?controller=users&action=mensajes&user_id=' . $request->getRequest('board_user'));
}
//gender
if ($request->issetPost('gender')) {
$this->view->gender = $request->getRequest('gender');
} elseif (isset($user_data['gender'])) {
$this->view->gender = $user_data['gender'];
} else {
$this->view->gender = "";
}
//location
if ($request->issetPost('location')) {
$this->view->location = $request->getPost('location');
} elseif (isset($user_data['location'])) {
$this->view->location = $user_data['location'];
} else {
$this->view->location = '';
}
//sport category
if ($request->issetPost('sport_category')) {
$this->view->sport_category = $request->getPost('sport_category');
if ($request->getPost('sport_category') != "") {
$this->view->cat_title = Model_Boards::getCategoryTitle($request->getPost('sport_category'));
}
} elseif (isset($user_data['sport_category'])) {
$this->view->sport_category = $user_data['sport_category'];
$this->view->cat_title = Model_Boards::getCategoryTitle($user_data['sport_category']);
} else {
$this->view->cat_title = '';
$this->view->sport_category = '';
}
//age
if ($request->issetPost('age')) {
$this->view->age = $request->getPost('age');
if ($request->getPost('age') != "") {
$this->view->age_title = Model_Users::getAgeTitle($request->getPost('age'));
}
} elseif (isset($user_data['age'])) {
$this->view->age = $user_data['age'];
$this->view->age_title = Model_Users::getAgeTitle($user_data['age']);
} else {
$this->view->age_title = '';
$this->view->age = '';
}
//level
if ($request->issetPost('level')) {
$this->view->level = $request->getPost('level');
if ($request->getPost('level') != "") {
$this->view->level_title = Model_Users::getLevelTitle($request->getPost('level'));
}
} elseif (isset($user_data['level'])) {
$this->view->level = $user_data['level'];
$this->view->level_title = Model_Users::getLevelTitle($user_data['level']);
} else {
$this->view->level_title = '';
$this->view->level = '';
}
//comment
if ($request->issetPost('comment')) {
$this->view->comment = $request->getPost('comment');
} elseif (isset($user_data['comment'])) {
$this->view->comment = $user_data['comment'];
} else {
$this->view->comment = '';
}
//$this->view->form_action = WM_Router::create( $request->getBaseUrl() . '?controller=addpin&action=get_images' );
$this->view->from_url = WM_Router::create($request->getBaseUrl() . '?controller=users&action=activatePopup');
//$this->view->from_url = WM_Router::create( $request->getBaseUrl() . '?controller=users&action=activateDetail' );
$this->view->popup_main_box = $this->view->render('activatePopup', 'users');
//$this->view->popup_main_box = $this->view->render('activateDetail','users');
if ($request->isPost()) {
$validate = new Helper_Validate();
$validate->_set_rules($request->getPost('location'), $this->translate('Location'), 'not_empty;min_length[3];max_length[100]');
$validate->_set_rules($request->getPost('sport_category'), $this->translate('Category_id1'), 'not_empty;min_length[3];max_length[100]');
$validate->_set_rules($request->getPost('gender'), $this->translate('Gender'), 'not_empty;min_length[3];max_length[100]');
$validate->_set_rules($request->getPost('level'), $this->translate('Level'), 'not_empty;min_length[1];max_length[100]');
//$validate->_set_rules($request->getPost('type_user'), $this->translate('User_type_id'), 'not_empty;min_length[1];max_length[100]');
if ($validate->_valid_form()) {
//.........這裏部分代碼省略.........