当前位置: 首页>>代码示例>>PHP>>正文


PHP Model_Users::getActivateUser方法代码示例

本文整理汇总了PHP中Model_Users::getActivateUser方法的典型用法代码示例。如果您正苦于以下问题:PHP Model_Users::getActivateUser方法的具体用法?PHP Model_Users::getActivateUser怎么用?PHP Model_Users::getActivateUser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Model_Users的用法示例。


在下文中一共展示了Model_Users::getActivateUser方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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');
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:amatteur,代码行数:101,代码来源:User.php

示例2: indexAction


//.........这里部分代码省略.........
     $this->view->cat_title3 = '';
     $this->view->sport_category_3 = '';
     if ($request->issetPost('sport_category_3')) {
         $this->view->sport_category_3 = $request->getPost('sport_category_3');
         if ($request->getPost('sport_category_3') != "") {
             if ($request->getPost('sport_category_3') == 1) {
                 $this->view->cat_title3 = "Todo";
             } else {
                 $this->view->cat_title3 = Model_Boards::getCategoryTitle($request->getPost('sport_category_3'));
             }
         }
     } elseif ($user_data['sport_category_3'] != "") {
         $this->view->sport_category_3 = $user_data['sport_category_3'];
         if ($user_data['sport_category_3'] == 1) {
             $this->view->cat_title3 = "Todo";
         } else {
             $this->view->cat_title3 = Model_Boards::getCategoryTitle($user_data['sport_category_3']);
         }
     }
     $this->view->usertype_title = '';
     $this->view->type_user = '';
     if ($request->issetPost('type_user')) {
         $this->view->type_user = $request->getPost('type_user');
         if ($request->getPost('type_user') != "") {
             $this->view->usertype_title = Model_Users::getUserTypeTitle($request->getPost('type_user'));
         }
     } elseif ($user_data['type_user'] != "") {
         $this->view->type_user = $user_data['type_user'];
         $this->view->usertype_title = Model_Users::getUserTypeTitle($user_data['type_user']);
     }
     if ($request->issetPost('activate')) {
         $this->view->activate = $request->getPost('activate');
     } else {
         $activate = Model_Users::getActivateUser(JO_Session::get('user[user_id]'));
         if ($activate) {
             $this->view->activate = $activate["activate"];
         } else {
             $this->view->activate = "";
         }
     }
     $this->view->instagram_enable = JO_Registry::get('oauth_in_key');
     $this->view->twitteroauth_enable = JO_Registry::get('oauth_tw_key');
     $this->view->facebook_enable = JO_Registry::get('oauth_fb_key');
     $this->view->user_data = $user_data;
     $this->view->form_action = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=upload_avatar');
     $this->view->invites_fb = WM_Router::create($request->getBaseUrl() . '?controller=invites&action=facebook');
     $this->view->facebook_connect = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=facebook_connect');
     $this->view->twitter_connect = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=twitter_connect');
     $this->view->instagram_connect = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=instagram_connect');
     $this->view->instagram_fetch = WM_Router::create($request->getBaseUrl() . '?controller=instagram&action=media');
     $this->view->instagram_fetch_cron = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=instagram_cron');
     $this->view->facebook_connect_avatar = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=facebook_connect_avatar');
     $this->view->check_username = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=check_username');
     $this->view->delete_username = WM_Router::create($request->getBaseUrl() . '?controller=users&action=delete&user_id=' . $user_data['user_id']);
     $this->view->facebook_connect2 = WM_Router::create($request->getBaseUrl() . '?controller=settings&action=facebook_connect2');
     $this->view->prefs_action = WM_Router::create($request->getBaseUrl() . '?controller=prefs');
     $this->view->new_password = WM_Router::create($request->getBaseUrl() . '?controller=password&action=change');
     $this->view->site_name = JO_Registry::get('site_name');
     $this->view->base_href = $request->getBaseUrl();
     $this->view->delete_account = '';
     if (JO_Registry::get('delete_account')) {
         $page_description = Model_Pages::getPage(JO_Registry::get('delete_account'));
         if ($page_description) {
             $this->view->delete_account = html_entity_decode($page_description['description'], ENT_QUOTES, 'utf-8');
         }
     }
开发者ID:noikiy,项目名称:amatteur,代码行数:67,代码来源:SettingsController.php

示例3: createActivate

 public static function createActivate($user_id, $data)
 {
     $db = JO_Db::getDefaultAdapter();
     $rows = self::describeTable('users_activate');
     //$user_info_get = self::getUser($user_id);
     //$created = WM_Date::format($user_info_get['created'], 'yy-mm-dd H:i:s');
     $update = array();
     foreach ($rows as $row) {
         if (array_key_exists($row, $data)) {
             $update[$row] = $data[$row];
         }
     }
     if (!$update) {
         return false;
     }
     $user_data = Model_Users::getActivateUser(JO_Session::get('user[user_id]'));
     if (!$user_data) {
         $db->insert('users_activate', $update);
         $user_id = $db->lastInsertId();
         if (!$user_id) {
             return false;
         }
     } else {
         $result = $db->update('users_activate', $update, array('user_id = ?' => (string) $user_id));
         if (!$result) {
             return false;
         }
     }
     return true;
 }
开发者ID:noikiy,项目名称:amatteur,代码行数:30,代码来源:Users.php

示例4: pinsAction


//.........这里部分代码省略.........
                 $model_images = new Helper_Images();
                 $avatar = Helper_Uploadimages::avatar($event, '_B');
                 $event['avatar'] = $avatar['image'];
                 $event['original'] = $avatar['original'];
                 $event['width'] = $avatar['width'];
                 $event['height'] = $avatar['height'];
                 $event["sport_category"] = Model_Boards::getCategoryTitle($event["sport_category"]);
                 $event['href'] = WM_Router::create($request->getBaseUrl() . '?controller=events&action=indexeventBoxDetail&event_id=' . $event['event_id']);
                 $href = WM_Router::create($request->getBaseUrl() . '?controller=events&action=indexeventBoxDetail&event_id=' . $event['event_id']);
                 $data = array('start' => JO_Registry::get('config_front_limit') * $page - JO_Registry::get('config_front_limit'), 'limit' => JO_Registry::get('config_front_limit'), 'filter_user_id' => $event["user_id"]);
                 $users = Model_Users::getUsers($data);
                 if ($users) {
                     $event['fullname'] = $users[0]["fullname"];
                     $event['hrefuser'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=profile&user_id=' . $event['user_id']);
                     //$href = WM_Router::create($request->getBaseUrl() . '?controller=users&action=profile&user_id=' . $event['user_id']);
                 }
                 //$view->boxeventdetail = WM_Router::create($request->getBaseUrl() . '?controller=events&action=boxeventdetail&event_id=' . $event['event_id']);
                 $view->boxeventdetail = WM_Router::create($request->getBaseUrl() . '?controller=events&action=indexeventBoxDetail&event_id=' . $event['event_id']);
                 $this->view->from_url = WM_Router::create($request->getBaseUrl() . '?controller=addpin&action=fromurl');
                 $this->view->successfu_edite = false;
                 $view->event = $event;
                 $this->view->boards .= $view->render('boxEventPin', 'events');
                 $events[$i]["href"] = $href;
                 $eventsTot[] = $events[$i];
                 $i++;
             }
             // 			JO_Registry::set('marker', Model_Pins::getMaxPin($data));
         }
     }
     $agendas = Model_Users::getUserAgenda(array('filter_user_id' => $user_data['user_id']));
     $this->view->has_agendas = false;
     $this->view->agendas_users = "";
     if ($agendas) {
         $this->view->has_agendas = true;
         foreach ($agendas as $agenda) {
             $agenda['hrefDelete'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=agendaPopupDelete&agenda_id=' . $agenda['agenda_id'] . '&user_id=' . $user_data['user_id']);
             $this->view->agenda = $agenda;
             $this->view->agendas_users .= $this->view->render('agenda', 'users');
         }
     }
     $session_user = JO_Session::get('user[user_id]');
     $this->view->popup_agenda = WM_Router::create($request->getBaseUrl() . '?controller=users&action=agendaPopup&user_id=' . $user_data['user_id']);
     //no mover de esta ubicación
     $messages = Model_Users::getUserMessages(array('start' => 0, 'limit' => 100, 'filter_user_id' => $user_data['user_id'], 'idPadre' => 0));
     $this->view->has_messages = false;
     $this->view->messages_users = "";
     if ($messages) {
         $this->view->has_messages = true;
         foreach ($messages as $message) {
             $avatar = Helper_Uploadimages::avatar($message, '_A');
             $message['avatar'] = $avatar['image'];
             $message['href'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=profile&user_id=' . $message['user_id']);
             $message['hrefDelete'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=messagePopupDelete&message_id=' . $message['message_id'] . '&user_id=' . $user_data['user_id']);
             $message['hrefResponder'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=messagePopup&user_from=' . $session_user . '&user_to=' . $user_data['user_id'] . '&board_user=' . $user_data['user_id'] . '&message_from_id=' . $message['message_id']);
             $this->view->message = $message;
             $this->view->messages_users .= $this->view->render('message', 'users');
             //ahora vamos a consultar las respuestas a este:
             $messagesHijos = Model_Users::getUserMessages(array('start' => 0, 'limit' => 100, 'filter_user_id' => $user_data['user_id'], 'idPadre' => $message['message_id']));
             if ($messagesHijos) {
                 foreach ($messagesHijos as $messageHijo) {
                     $avatar = Helper_Uploadimages::avatar($messageHijo, '_A');
                     $messageHijo['avatar'] = $avatar['image'];
                     $messageHijo['href'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=profile&user_id=' . $messageHijo['user_id']);
                     $messageHijo['hrefDelete'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=messagePopupDelete&message_id=' . $messageHijo['message_id'] . '&user_id=' . $user_data['user_id']);
                     $messageHijo['hrefResponder'] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=messagePopup&user_from=' . $session_user . '&user_to=' . $user_data['user_id'] . '&board_user=' . $user_data['user_id'] . '&message_from_id=' . $messageHijo['message_id']);
                     $this->view->message = $messageHijo;
                     $this->view->messages_users .= $this->view->render('message', 'users');
                 }
             }
         }
     }
     $session_user = JO_Session::get('user[user_id]');
     $this->view->popup_messages = WM_Router::create($request->getBaseUrl() . '?controller=users&action=messagePopup&user_from=' . $session_user . '&user_to=' . $user_data['user_id'] . '&board_user=' . $user_data['user_id'] . '&message_from_id=0');
     //$this->view->popup_activate = WM_Router::create( $request->getBaseUrl() . '?controller=users&action=activatePopup'); //&user_from=' . $session_user . '&user_to=' . $user_data['user_id'].'&board_user=' . $user_data['user_id'] .'&message_from_id=0'  );
     //$this->view->popup_activate = WM_Router::create( $request->getBaseUrl() . '?controller=users&action=activateDetail'); //&user_from=' . $session_user . '&user_to=' . $user_data['user_id'].'&board_user=' . $user_data['user_id'] .'&message_from_id=0'  );
     $_SESSION["activate_url"] = WM_Router::create($request->getBaseUrl() . '?controller=users&action=profile&user_id=' . JO_Session::get('user[user_id]'));
     $this->view->popup_activate = WM_Router::create($request->getBaseUrl() . '?controller=users&action=activate');
     $this->view->search_url = WM_Router::create($request->getBaseUrl() . '?controller=search&action=advanced?id=activate');
     //$this->view->deportes = WM_Router::create( $request->getBaseUrl() . '?controller=users&action=deportes');
     $this->view->addMail = WM_Router::create($request->getBaseUrl() . '?controller=mails&action=create');
     $this->view->stateMail = WM_Router::create($request->getBaseUrl() . '?controller=mails&action=state');
     $this->view->viewMail = WM_Router::create($request->getBaseUrl() . '?controller=mails&action=view');
     $activate = Model_Users::getActivateUser(JO_Session::get('user[user_id]'));
     if ($activate) {
         $this->view->userIsActivate = $activate["activate"];
     }
     if ($user_data['type_user']) {
         $this->view->userCanActivate = Model_Users::getUserTypeNotOthers($user_data['type_user']);
     }
     if (JO_Registry::get('isMobile')) {
         $this->view->urlagenda = WM_Router::create($request->getBaseUrl() . '?controller=users&action=agenda&user_id=' . $user_data['user_id']);
         $this->view->urlmensajes = WM_Router::create($request->getBaseUrl() . '?controller=users&action=mensajes&user_id=' . $user_data['user_id']);
     }
     if ($request->isXmlHttpRequest()) {
         echo $this->view->boards;
         $this->noViewRenderer(true);
     } else {
         $this->view->children = array('header_part' => 'layout/header_part', 'footer_part' => 'layout/footer_part');
     }
 }
开发者ID:noikiy,项目名称:amatteur,代码行数:101,代码来源:UsersController.php


注:本文中的Model_Users::getActivateUser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。