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


PHP userDetails函数代码示例

本文整理汇总了PHP中userDetails函数的典型用法代码示例。如果您正苦于以下问题:PHP userDetails函数的具体用法?PHP userDetails怎么用?PHP userDetails使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: latestFeeds

 function latestFeeds($userId)
 {
     $data['title'] = "Latest feeds";
     $data['id'] = $userId ? $userId : $this->session->userdata('login_user_id');
     $data['userDetails'] = $userDetails = userDetails($data['id']);
     $this->load->view('followingsActivity_view', $data);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:7,代码来源:activity.php

示例2: submit

 /**
  * Function send invite email to the all invited friends
  * @param
  * @author : Amit
  * @return
  */
 function submit()
 {
     $this->load->library('email');
     $config['mailtype'] = 'html';
     $config['wordwrap'] = true;
     $this->email->initialize($config);
     $this->email->from('info@pinterestclone', 'Pinterest');
     unset($_POST['submit']);
     $message = $_POST['message'];
     unset($_POST['message']);
     $userdetails = userDetails();
     foreach ($_POST as $value) {
         $text = 'Hi,';
         $text .= '<br/>';
         $text .= 'You have been invited to join TagIt By ' . $userdetails['name'];
         $text .= '<br/>';
         $text .= 'Please click the following link to join ' . site_url('/invite/entry/' . base64_encode($value));
         $text .= '<br/>';
         $text .= 'Thanks';
         $text .= '<br/>';
         $text .= 'TagIt';
         $this->email->to($value);
         $this->email->subject('You are invitted');
         $this->email->message($text);
         $this->email->send();
     }
     echo json_encode(true);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:34,代码来源:invite.php

示例3: index

 /**
  * Function handle home and welcome page of a logged user
  * @param   :
  * @author  : Amit
  * @return
  */
 function index()
 {
     $userID = false;
     $order = false;
     $limit = $this->config->item('pin_load_limit');
     $page = $this->uri->segment(3, 1);
     $nextOffset = ($page - 1) * $limit;
     $nextPage = $page + 1;
     $sql = "SELECT *\n                    FROM\n                        pins";
     if ($userID) {
         $sql .= " WHERE\n                        user_id= {$userID} ";
     }
     if ($order) {
         $sql .= " ORDER BY\n                        ' {$order}'";
     } else {
         //$sql .= " ORDER BY
         // RAND()";
         $sql .= " ORDER BY time DESC";
     }
     $sql .= " LIMIT {$nextOffset},{$limit}";
     $query = $this->db->query($sql);
     if ($query->num_rows() > 0) {
         $row = $query->result();
     }
     if (!empty($row)) {
         $data['row'] = $row;
     } else {
         $data['row'] = false;
     }
     $data['title'] = 'Welcome';
     //if a valid login
     if ($this->session->userdata('login_user_id')) {
         $fb_data = $this->session->userdata('fb_data');
         $this->load->model('Facebook_model');
         $data = array('fb_data' => $fb_data);
         //facebook data
         $data['id'] = $this->session->userdata('login_user_id');
         //logged user id
         $data['userDetails'] = $userDetails = userDetails($data['id']);
         //logged user details from user id
         if (!empty($row)) {
             $data['row'] = $row;
         } else {
             $data['row'] = false;
         }
         $data['offset'] = $nextOffset;
         $data['page'] = $nextPage;
         $this->load->view('welcome', $data);
     } else {
         if ($this->session->userdata('noentry_message')) {
             $data['invalid'] = $this->session->userdata('noentry_message');
             $this->session->unset_userdata('noentry_message');
         }
         $data['offset'] = $nextOffset;
         $data['page'] = $nextPage;
         $this->load->view('welcome', $data);
     }
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:64,代码来源:welcome.php

示例4: index

 /**
  * Function display all likes of a user
  * @param  : <Int> $id
  * @author : Amit
  * @return
  */
 public function index($id = false)
 {
     $data['title'] = "Like";
     $data['id'] = $id ? $id : $this->session->userdata('login_user_id');
     //logged user id
     $data['userDetails'] = $userDetails = userDetails($data['id']);
     //logged user details from user id
     if (empty($userDetails)) {
         redirect();
     }
     $this->load->view('like_view', $data);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:18,代码来源:like.php

示例5: embed

 /**
  * Function display embed pin popup page
  * @param  : <Int> $boardId,$pinId
  * @author : Anup
  * @return
  */
 public function embed($boardId, $pinId)
 {
     $data['title'] = "Action";
     $data['pinId'] = $pinId;
     $data['boardId'] = $boardId;
     $pinDetails = getPinDetails($pinId);
     $data['pin_url'] = $pinDetails->pin_url;
     $data['source_url'] = $pinDetails->source_url;
     $data['pin_link'] = site_url('board/pins/' . $boardId . '/' . $pinId);
     $data['site_link'] = site_url();
     $userDetails = userDetails($pinDetails->user_id);
     $data['user'] = $userDetails['name'];
     $data['user_link'] = site_url('user/index/' . $pinDetails->user_id);
     $data['source_name'] = GetDomain($pinDetails->source_url);
     $this->load->view('embedPin_view', $data);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:22,代码来源:verification.php

示例6: index

 /**
  * Function load the the user page from the user id
  * @param   : $id
  * @author  : Pawan
  * @return
  */
 public function index($id)
 {
     if ($id) {
         $data['id'] = $id;
     } else {
         redirect();
     }
     // no user for given id load the home page
     $data['userDetails'] = $userDetails = userDetails($data['id']);
     //logged user details from user id
     $data['title'] = $userDetails['name'];
     if (empty($userDetails)) {
         redirect();
     }
     $this->load->view('home', $data);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:22,代码来源:user.php

示例7: ajaxEmbed

 public function ajaxEmbed()
 {
     $data['title'] = "Action";
     $data['pinId'] = $pinId = $this->input->post('pin_id');
     $data['boardId'] = $boardId = $this->input->post('board_id');
     $pinDetails = getPinDetails($pinId);
     $data['pin_url'] = $pinDetails->pin_url;
     $data['source_url'] = $pinDetails->source_url;
     $data['pin_link'] = site_url('board/pins/' . $boardId . '/' . $pinId);
     $data['site_link'] = site_url();
     $userDetails = userDetails($pinDetails->user_id);
     $data['user'] = $userDetails['name'];
     $data['user_link'] = site_url('user/index/' . $pinDetails->user_id);
     $data['source_name'] = GetDomain($pinDetails->source_url);
     $value = $this->load->view('embedPin_view', $data, true);
     echo json_encode($value);
 }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:17,代码来源:action.php

示例8: foreach

?>
</label></div>
                </div>
            </div>
        </div>
    </div>
    <div id="Container" style="margin-left: 250px;">
        <div id="alpha" class="container Mcenter clearfix transitions-enabled">
            <?php 
if (is_array($userFollows)) {
    ?>
                <?php 
    foreach ($userFollows as $userFollowsKey => $userFollowsValue) {
        ?>
                    <?php 
        $userDetails = userDetails($userFollowsValue->user_id);
        ?>
                    <?php 
        $pinCount = getAllPins($userFollowsValue->user_id);
        ?>

                    <div class="pin_item">

                        <!--Follow/un follow button -->
                        <?php 
        $id_ref = $userFollowsValue->user_id;
        ?>
                        <div id="follow_unfollow_<?php 
        echo $id_ref;
        ?>
" class="follow_unfollow">
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:31,代码来源:board_followers.php

示例9: getUserFollowing

    <?php 
$userFollows = getUserFollowing($id);
?>


    <div id="Container" style="margin-left: 250px;">
        <div id="alpha" class="container Mcenter clearfix transitions-enabled">
            <?php 
if (is_array($userFollows)) {
    ?>
                <?php 
    foreach ($userFollows as $userFollowsKey => $userFollowsValue) {
        ?>
                    <?php 
        $userDetails = userDetails($userFollowsValue->is_following);
        ?>
                    <?php 
        $pinCount = getAllPins($userFollowsValue->is_following);
        ?>

                    <div class="pin_item">

                        <!--Follow/un follow button -->
                        <?php 
        $id_ref = $userFollowsValue->is_following;
        ?>
                        <div id="follow_unfollow_<?php 
        echo $id_ref;
        ?>
" class="follow_unfollow">
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:30,代码来源:following_view.php

示例10: foreach

                </div>
            </div>
        </div>
    </div>
</div>
   
    <div id="Container">
        <div id="alpha" class="container Mcenter clearfix transitions-enabled" style="position: relative; height: 390px; width: 1150px;">
            <?php 
if (is_array($searchUsers)) {
    ?>
                <?php 
    foreach ($searchUsers as $searchUsersKey => $searchUsersValue) {
        ?>
                    <?php 
        $userDetails = userDetails($searchUsersValue->id);
        ?>
                    <?php 
        $pinCount = getAllPins($searchUsersValue->id);
        ?>

                    <div class="pin_item">

                        <?php 
        $id_ref = $searchUsersValue->id;
        ?>
                        <div id="follow_unfollow_<?php 
        echo $id_ref;
        ?>
" class="follow_unfollow">
                        <?php 
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:31,代码来源:search_user_view.php

示例11: userDetails

        } else {
            ?>
                                                          <div class="cover_none"></div>
                                                          <ul class="cover-thumbs">
                                                            <li><span class="cover-thumbs-pic_none"></span></li>
                                                            <li><span class="cover-thumbs-pic_none"></span></li>
                                                            <li><span class="cover-thumbs-pic_none"></span></li>
                                                        </ul>
                                                     <?php 
        }
        ?>
                                                </a>
                                            <div class="clear"></div>
                                            <div class="edit_button">
                                                <?php 
        $userDetails = userDetails($value->user_id);
        ?>
                                                <span class="board_user">
                                                    <a  href="<?php 
        echo site_url('user/index/' . $value->user_id);
        ?>
"><img src="<?php 
        echo $userDetails['image'];
        ?>
" width="35px" height="35px"/></a>
                                               </span>
                                                <?php 
        if ($this->session->userdata('login_user_id') == $value->user_id) {
            ?>
                                                    <a href="<?php 
            echo site_url('board/edit/' . $value->id);
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:31,代码来源:home.php

示例12: videos

 /**
  * Function list all pins that comes under same type irrespective of user and board
  * @param  : $source
  * @author : Vishal
  * @since  : 26-04-2012
  * @return
  */
 function videos($id = false)
 {
     $data['title'] = 'Videos';
     $data['id'] = $id = $id ? $id : $this->session->userdata('loged_in_user');
     $data['userDetails'] = $userDetails = userDetails($data['id']);
     //logged user details from user id
     $this->load->view('videopins_view', $data);
 }
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:15,代码来源:pins.php

示例13: getLikeUsers

                    <?php 
$likeUsers = getLikeUsers($pinDetails->id, $limit = 10);
?>
                    <h3 id="likecount"><?php 
echo $likeUsers ? count($likeUsers) : '0';
?>
 Likes </h3>
                    <ul class="inside_like_style">
                        <?php 
if ($likeUsers) {
    ?>
                            <?php 
    foreach ($likeUsers as $key => $value) {
        ?>
                                <?php 
        $userDetails = userDetails($value->like_user_id);
        ?>
                                <li id='addlike_<?php 
        echo $value->like_user_id;
        ?>
'>
                                    <div class="inside_like_thumbs"><a href="<?php 
        echo site_url('user/index/' . $userDetails['userId']);
        ?>
"><img src="<?php 
        echo $userDetails['image'];
        ?>
" width="49px" height="49px" /></a></div>
                                </li>
                            <?php 
    }
开发者ID:alokthakur142,项目名称:CMPE-203-Pinterest-Like-WebApplication,代码行数:31,代码来源:pinpage_view.php

示例14: Name

    			Full Name  (Editable by Admin)
    				Displayed as header(i.e.<h1>) and page title in html header
    			//Contact Info (Editable by Admin)
    			//User Type (Editable by Admin)
    			DOES NOT EXISTUser Notes (Editable by Admin)
    		DONE Next/Previous navigation
    			DONE Next/previous links to present the detail view of the next/prev record. 
    		Done Link to return to list, rather than back button nav.
    		Add new user note functionality
    		<ADMIN> Edit user type
    			Add/remove faculty
    				Confirmation required
    			Grant/revoke admin rights to faculty
    				Confirmation required
    */
    userDetails($row, $result);
} else {
    echo "0 results";
}
?>
<br>
<br>
<a href=testdb2.php> Back to list</a>

<!--  -->




</html>
开发者ID:JoeMcLaughlin,项目名称:NorthSeattle,代码行数:30,代码来源:testview.php

示例15: index

 /**
  * Function handle home and welcome page of a logged user
  * @param   :
  * @author  : Vishal
  * @since   : 01-03-2012
  * @return
  */
 function index()
 {
     /*
           $data['title']  = 'Welcome';
           $count = $this->board_model->getAllPins();
           $count =  count($count);
           $this->load->library('pagination');
           $userID =false;
           $order =false;
           $config['base_url'] = site_url().'test/getAllpins';
           $config['uri_segment']          = $this->uri->segment(3,2);
           $offset                         = $this->uri->segment(3,0);
           $data['offset'] = $offset;
     
           $config['total_rows'] = $count;
           $config['per_page'] = $limit = 30;
           $this->pagination->initialize($config);
           $row = $this->board_model->getAllPinsAjax($offset,$limit);
           $data['row'] = $row;
           //if a valid login
           if(($this->session->userdata('login_user_id')))
           {
           $fb_data                = $this->session->userdata('fb_data');
           $this->load->model('Facebook_model');
           $data                   = array('fb_data' => $fb_data);//facebook data
           $data['id']            = $this->session->userdata('login_user_id');//logged user id
           $data['userDetails']    = $userDetails = userDetails($data['id']);//logged user details from user id
           $data['row'] = $row;
           $this->load->view('welcome', $data);
           }
           //if invalid entry in db , call logout function by passing a paramter to set the invalid login message
           else{
           if($this->session->userdata('noentry_message'))
           {
           $data['invalid']     = $this->session->userdata('noentry_message');
           $this->session->unset_userdata('noentry_message');
           }
           $this->load->view('welcome', $data);
           } */
     //$count = $this->board_model->getAllPins();
     //$count =  count($count);
     //$this->load->library('pagination');
     $userID = false;
     $order = false;
     //$config['base_url'] = site_url().'test/getAllpins';
     //$config['uri_segment']          = $this->uri->segment(3,2);
     //$offset = $this->uri->segment(3, 0);
     $limit = $this->config->item('pin_load_limit');
     $page = $this->uri->segment(3, 1);
     $nextOffset = ($page - 1) * $limit;
     $nextPage = $page + 1;
     /* Script works only if limit is 20 */
     //        if ($this->uri->segment(3, 0)) {
     //            $nextOffset = (($offset - $limit) + $offset);
     //        } else {
     //            $nextOffset = 0;
     //        }
     //$config['total_rows'] = $count;
     //$config['per_page'] = $limit = 20;
     //$this->pagination->initialize($config);
     $sql = "SELECT *\n                    FROM\n                        pins";
     if ($userID) {
         $sql .= " WHERE\n                        user_id= {$userID} ";
     }
     if ($order) {
         $sql .= " ORDER BY\n                        ' {$order}'";
     } else {
         //$sql .= " ORDER BY
         // RAND()";
         $sql .= " ORDER BY time DESC";
     }
     $sql .= " LIMIT {$nextOffset},{$limit}";
     $query = $this->db->query($sql);
     if ($query->num_rows() > 0) {
         $row = $query->result();
     }
     if (!empty($row)) {
         $data['row'] = $row;
     } else {
         $data['row'] = false;
     }
     $data['title'] = 'Welcome';
     //if a valid login
     if ($this->session->userdata('login_user_id')) {
         $fb_data = $this->session->userdata('fb_data');
         $this->load->model('Facebook_model');
         $data = array('fb_data' => $fb_data);
         //facebook data
         $data['id'] = $this->session->userdata('login_user_id');
         //logged user id
         $data['userDetails'] = $userDetails = userDetails($data['id']);
         //logged user details from user id
         if (!empty($row)) {
//.........这里部分代码省略.........
开发者ID:selbachgra,项目名称:http-localhost-42675,代码行数:101,代码来源:welcome.php


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