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


PHP Model_Users::createActivate方法代码示例

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


在下文中一共展示了Model_Users::createActivate方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: indexAction


//.........这里部分代码省略.........
             
                 $posLen = strpos($len, ".");
                 $longLen = strlen(substr((string)$len, $posLen));
                 $cantLen = 0;
                 for ($i = 0; $i < ($longLen - 4); $i++)
                 {
                     if ($i == 0)
                     {
                         $cantLen .= ".0";
                     }
                     else
                     {
                         $cantLen .= "0";
                     }
                 }
                 $cantLen .= "1";
                 $len = $len + $cantLen;
             }
             
             $data['lat'] = $lat;
             $data['len'] = $len;
             */
             if (Model_Users::edit(JO_Session::get('user[user_id]'), $data)) {
                 JO_Session::set('successfu_edite', true);
                 $upload->getFileInfo(true);
                 if (JO_Session::get('user[email]') != $request->getPost('email')) {
                     $this->view->verify_email_href = WM_Router::create($request->getBaseUrl() . '?controller=users&action=login&user_id=' . JO_Session::get('user[user_id]') . '&verify=' . $new_email_key);
                     $this->view->user_info = $user_data;
                     Model_Email::send($request->getPost('email'), JO_Registry::get('noreply_mail'), $this->translate('Please verify your email'), $this->view->render('verify_email', 'mail'));
                 }
                 if (!Model_Users::getUserTypeNotOthers($user_data['type_user'])) {
                     $data['activate'] = 0;
                     //borrar activate
                     if (Model_Users::createActivate(JO_Session::get('user[user_id]'), $data)) {
                     }
                 }
                 if (Model_Users::deleteUsersLocation(JO_Session::get('user[user_id]'))) {
                     for ($i = 0; $i <= $request->getPost('locationcounter'); $i++) {
                         $location = 'location' . $i;
                         $lat = 'lat' . $i;
                         $len = 'len' . $i;
                         if ($request->issetPost($location)) {
                             if ($request->getPost($location) != "") {
                                 $lat = $request->getPost($lat);
                                 $len = $request->getPost($len);
                                 while (Model_Users::getLocationUsersLatLen($lat, $len)) {
                                     $posLat = strpos($lat, ".");
                                     $longLat = strlen(substr((string) $lat, $posLat));
                                     $cantLat = 0;
                                     for ($i = 0; $i < $longLat - 4; $i++) {
                                         if ($i == 0) {
                                             $cantLat .= ".0";
                                         } else {
                                             $cantLat .= "0";
                                         }
                                     }
                                     $cantLat .= "1";
                                     $lat = $lat + $cantLat;
                                     $posLen = strpos($len, ".");
                                     $longLen = strlen(substr((string) $len, $posLen));
                                     $cantLen = 0;
                                     for ($i = 0; $i < $longLen - 4; $i++) {
                                         if ($i == 0) {
                                             $cantLen .= ".0";
                                         } else {
                                             $cantLen .= "0";
开发者ID:noikiy,项目名称:amatteur,代码行数:67,代码来源:SettingsController.php

示例2: activatePopupAction


//.........这里部分代码省略.........
     //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()) {
             $result = Model_Users::createActivate(JO_Session::get('user[user_id]'), array('user_id' => JO_Session::get('user[user_id]'), 'gender' => $request->getPost('gender'), 'age' => $request->getPost('age'), 'location' => $request->getPost('location') != "Introduce una ubicación" ? $request->getPost('location') : "", 'sport_category' => $request->getPost('sport_category'), 'level' => $request->getPost('level'), 'activate' => $request->getPost('activate'), 'option1' => $request->getPost('option1'), 'option2' => $request->getPost('option2'), 'option3' => $request->getPost('option3'), 'option4' => $request->getPost('option4'), 'option5' => $request->getPost('option5'), 'option6' => $request->getPost('option6'), 'option7' => $request->getPost('option7'), 'option8' => $request->getPost('option8'), 'comment' => $request->getPost('comment')));
             $this->view->successfu_edite = true;
             /*
              if($result) {
              //Model_History::addHistory($user["user_id"], Model_History::COMMENTUSER, $request->getPost('agenda'));
              Model_History::addHistory($request->getPost('user_to'), Model_History::MESSAGEUSER, $result, $request->getPost('board_user'), $request->getPost('text_message'));
              }
             */
         } else {
             $this->view->error = $validate->_get_error_messages();
         }
     }
     $this->view->popup = true;
     echo Helper_Externallinks::fixExternallinks(Helper_User::returnHtmlDetail());
     $this->noViewRenderer(true);
     /*
      if ($this->view->successfu_edite || $this->view->error)
      {
      error_log("error o ok");
      $this->noViewRenderer(true);
      echo $this->view->popup_main_box;
      $this->view->is_popup = true;
     
      }
      /*
      if($request->isXmlHttpRequest()) {
      $this->noViewRenderer(true);
      echo $this->view->popup_main_box;
      $this->view->is_popup = true;
      } else {
      $this->view->is_popup = false;
      $this->view->children = array(
      'header_part' 	=> 'layout/header_part',
      'footer_part' 	=> 'layout/footer_part',
      'left_part' 	=> 'layout/left_part'
      );
      }
     *
     */
 }
开发者ID:noikiy,项目名称:amatteur,代码行数:101,代码来源:UsersController.php


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