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


PHP users::getProfilePicture方法代码示例

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


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

示例1: run

 public function run()
 {
     $login = new login(session::getSID());
     if ($login->logged_in() === true) {
         $user = new users();
         $profilePicture = $user->getProfilePicture($_SESSION['userdata']['id']);
         $tpl = new template();
         $tpl->assign("profilePicture", $profilePicture);
         $tpl->assign("userName", $_SESSION['userdata']['name']);
         $tpl->assign("userEmail", $_SESSION['userdata']['mail']);
         $tpl->display("general.loginInfo");
     }
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:13,代码来源:class.loginInfo.php

示例2: date

        ?>
      			 	<?php 
        $first = true;
        ?>
      			 	class='selected'
			 	<?php 
    }
    ?>
			 	onclick='changeEmail(<?php 
    echo $msgList['id'];
    ?>
, "inbox")'>
			 	
      			<div class='thumb'>
      				<img src='<?php 
    echo $user->getProfilePicture($msgList['user_id']);
    ?>
' />
      			</div>
      			<div class='summary'>
      				<span class='date pull-right'>
      					<small>
      						<?php 
    echo date('M d, Y', strtotime($msgList['date_sent']));
    ?>
      					</small>
      				</span>
      				<h4 class="name"><?php 
    echo $msgList['firstname'] . ' ' . $msgList['lastname'];
    ?>
</h4>
开发者ID:kellan04,项目名称:leantime,代码行数:31,代码来源:showAll.tpl.php

示例3: run

    /**
     * run - display template and edit data
     *
     * @access public
     *
     */
    public function run()
    {
        $login = new login(session::getSID());
        //Check if user is logged in
        if ($login->logged_in() !== true) {
            exit;
        }
        $helper = new helper();
        $projects = new projects();
        $tickets = new tickets();
        $module = $_GET['module'];
        //Organize ajax handlers by module and action
        if ($module == "tickets.showAll") {
            // AJAX status change
            if (isset($_POST['ticketId'])) {
                $ticketId = $_POST['ticketId'];
                $newStatus = $_POST['newStatus'];
                if ($tickets->getAccessRights($ticketId)) {
                    if ($tickets->changeStatus($ticketId, $newStatus) === true) {
                        echo "Status was changed";
                    } else {
                        echo "Error with change";
                    }
                } else {
                    echo "You have no rights to do that.";
                }
            }
        } else {
            if ($module == "tickets.showTicket") {
                $users = new users();
                $id = $_GET['id'];
                $results = $tickets->getTimelineHistory($id);
                $ticket = $tickets->getTicket($id);
                $jsonArr = array();
                $description = strip_tags($ticket['description']);
                $description = str_replace("\n", "", $description);
                $description = str_replace("\r", "", $description);
                $json = '{"timeline":
			    {   "headline":"Ticket History for ' . $ticket['headline'] . '",
			        "type":"default",
					"text":"' . $description . '",
					"startDate":"' . $ticket['timelineDate'] . '",
			        "date": [ ';
                //Creation Date
                $items[] = '{
					"startDate":"' . $ticket['timelineDate'] . '",
	                "headline":"Ticket Created",
	                "text":"<p>Ticket created by ' . $ticket['userFirstname'] . ', ' . $ticket['userLastname'] . '</p>",
	                "asset":
	                {  "media":"",
	                    "credit":"",
	                    "caption":""
	                }
				}';
                foreach ($results as $row) {
                    $items[] = '{
					"startDate":"' . $row['date'] . '",
	                "headline":"Ticket Update",
	                "text":"<p>' . $row['firstname'] . ', ' . $row['lastname'] . ' changed ' . $row['changeType'] . ' to ' . $row['changeValue'] . '</p>",
	                "asset":
	                {  "media":"' . $users->getProfilePicture($row['userId']) . '",
	                    "credit":"' . $row['firstname'] . ', ' . $row['lastname'] . '",
	                    "caption":""
	                }
				}';
                }
                $comments = new comments();
                $allcomments = $comments->getComments('ticket', $id);
                foreach ($allcomments as $comment) {
                    $items[] = '{
					"startDate":"' . $comment['timelineDate'] . '",
	                "headline":"New Comment",
	                "text":' . json_encode('<p>' . $comment['firstname'] . ', ' . $comment['lastname'] . ' said:<br /> </p>' . $comment['text']) . ',
	                "asset":
	                {	"media":"' . $users->getProfilePicture($comment['userId']) . '",
	                    "credit":"' . $comment['firstname'] . ', ' . $comment['lastname'] . '",
	                    "caption":""
	                }
				}';
                }
                $file = new files();
                $files = $file->getFilesByModule('ticket', $id);
                $tempStr = '';
                $tempStr3 = '';
                $imgExtensions = array('jpg', 'jpeg', 'png', 'gif', 'psd', 'bmp', 'tif', 'thm', 'yuv');
                foreach ($files as $fileRow) {
                    if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/userdata/' . $fileRow['module'] . '/' . $fileRow['encName'] . '.' . $fileRow['extension'])) {
                        $tempStr3 .= "<img style='max-height: 50px; max-width: 70px;' src='userdata/" . $fileRow["module"] . "/" . $fileRow['encName'] . "." . $fileRow["extension"] . "' />";
                        $filepath = "userdata/" . $fileRow["module"] . "/" . $fileRow['encName'] . "." . $fileRow["extension"] . "";
                    } else {
                        $tempStr3 .= "<img style='max-height: 50px; max-width: 70px;' src='userdata/file.png' />";
                        $filepath = "userdata/file.png";
                    }
                    $tempStr = '{
//.........这里部分代码省略.........
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:101,代码来源:class.ajaxRequest.php

示例4: run

 /**
  * run - display template and edit data
  *
  * @access public
  *
  */
 public function run()
 {
     $tpl = new template();
     $hasher = new PasswordHash(8, TRUE);
     $userId = $_SESSION['userdata']['id'];
     $row = $this->getUser($userId);
     // $projects = $this->getUserProjectRelation($userId);
     $infoKey = '';
     //Build values array
     $values = array('firstname' => $row['firstname'], 'lastname' => $row['lastname'], 'user' => $row['username'], 'phone' => $row['phone'], 'role' => $row['role']);
     //Save form
     if (isset($_POST['save'])) {
         $values = array('firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname'], 'user' => $_POST['user'], 'phone' => $_POST['phone'], 'password' => $hasher->HashPassword($_POST['newPassword']));
         $changedEmail = 0;
         if ($row['username'] != $values['user']) {
             $changedEmail = 1;
         }
         //Validation
         if ($values['user'] !== '') {
             $helper = new helper();
             if ($helper->validateEmail($values['user']) == 1) {
                 if ($_POST['newPassword'] == $_POST['confirmPassword']) {
                     if ($_POST['newPassword'] == '') {
                         $values['password'] = '';
                     } else {
                         $this->editOwn($values, $userId);
                     }
                     if ($changedEmail == 1) {
                         if ($this->usernameExist($values['user'], $userId) === false) {
                             $this->editOwn($values, $userId);
                             $tpl->setNotification('EDIT_SUCCESS', 'success');
                         } else {
                             $tpl->setNotification('USERNAME_EXISTS', 'error');
                         }
                     } else {
                         $this->editOwn($values, $userId);
                         $tpl->setNotification('EDIT_SUCCESS', 'success');
                     }
                 } else {
                     $tpl->setNotification('PASSWORDS_DONT_MATCH', 'ERROR');
                 }
             } else {
                 $tpl->setNotification('NO_VALID_EMAIL', 'error');
             }
         } else {
             $tpl->setNotification('NO_USERNAME', 'error');
         }
     }
     $file = new files();
     if (isset($_POST['savePic'])) {
         if (isset($_FILES)) {
             $this->setPicture($_FILES, $_SESSION['userdata']['id']);
         }
     }
     //Assign vars
     $users = new users();
     //		$tpl->assign('profilePic', $file->getFilesByModule('user',$_SESSION['userdata']['id']));
     $tpl->assign('profilePic', $users->getProfilePicture($_SESSION['userdata']['id']));
     $tpl->assign('info', $infoKey);
     $tpl->assign('values', $values);
     //$tpl->assign('roles', $this->roles);
     $tpl->assign('user', $row);
     $tpl->display('users.editOwn');
 }
开发者ID:DevelopIdeas,项目名称:leantime,代码行数:70,代码来源:class.editOwn.php


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