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


PHP Member::setId方法代码示例

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


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

示例1: getMessage

    {
        return $this->status_description;
    }
    //Get message
    public function getMessage()
    {
        return $this->message;
    }
}
//Join status
$sql = "SELECT * FROM users\n\t\t\tINNER JOIN status \n\t\t\tON user_id = fk_user_id \n\t\t\tINNER JOIN descriptions \n\t\t\tON fk_description_id = description_id\n\t\t\tINNER JOIN messages\n\t\t\tON message_id = fk_message_id";
$member_list = array();
if ($query = mysqli_query($dbc, $sql)) {
    while ($row = mysqli_fetch_assoc($query)) {
        $member = new Member();
        $member->setId($row["user_id"]);
        $member->setName($row["user_name"]);
        $member->setImage($row["user_img"]);
        $member->setStatusId($row["fk_description_id"]);
        $member->setStatusDescription($row["description_text"]);
        $member->setMessage($row["message_text"]);
        array_push($member_list, $member);
    }
}
?>
<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8">
    	<meta http-equiv="X-UA-Compatible" content="IE=edge">
    	<meta name="viewport" content="width=device-width, initial-scale=1">
开发者ID:T-RexZ,项目名称:pokedex,代码行数:31,代码来源:members.php

示例2: profil

 public function profil()
 {
     $msg = "";
     $member = new Member();
     // LA PAGE N'EST ACCESSIBLE QUE SI UN MEMBRE OU ADMIN EST CONNECTE
     if ($member->sessionExists()) {
         $memberID = $_SESSION['user']['id_membre'];
         $member->setId($memberID);
         $connectedMember = $member->retrieveMember($memberID);
         $orders = $member->access_modelOrder_findOrdersById();
         $msg .= '<div class="panel panel-primary">';
         $msg .= '<div class="panel-heading">';
         if ($connectedMember['statut'] == 1) {
             $msg .= '<span class="profilTitle">Administrateur : </span>';
         } else {
             $msg .= '<span class="profilTitle">Membre : </span>';
         }
         $msg .= '<span class="profilTitle">' . $connectedMember['pseudo'] . '</span>';
         $msg .= '</div>';
         $msg .= '<div class="panel-body ficheProfil">';
         $msg .= '<p><label class="profilDetail">Pseudo: </label>' . $connectedMember['pseudo'] . '</p>';
         $msg .= '<p><label class="profilDetail">Nom: </label>' . $connectedMember['nom'] . '</p>';
         $msg .= '<p><label class="profilDetail">Prénom: </label>' . $connectedMember['prenom'] . '</p>';
         $msg .= '<p><label class="profilDetail">Adresse mail: </label>' . $connectedMember['email'] . '</p>';
         $msg .= '<p><label class="profilDetail">Adresse: </label>' . $connectedMember['adresse'] . '</p>';
         $msg .= '<p><label class="profilDetail">Code postal: </label>' . $connectedMember['cp'] . '</p>';
         $msg .= '<p><label class="profilDetail">Ville: </label>' . $connectedMember['ville'] . '</p>';
         $msg .= '<a class="btn btn-default pull-right" href="index.php?controller=members&action=modifyProfile&id=' . $memberID . '" title="Modifier mon profil">Mettre à jour mes informations</a>';
         $msg .= '<div class="clearfix"></div><br/>';
         if ($connectedMember['statut'] == 1) {
             $msg .= '<div class="panel panel-default">';
             $msg .= '<div class="panel-body">';
             $msg .= 'Vous êtes administrateur';
             $msg .= '</div>';
             $msg .= '</div>';
         }
         $msg .= '</div>';
         $msg .= '</div>';
         $msg .= '<div class="panel panel-primary">';
         $msg .= '<div class="panel-heading">';
         $msg .= 'Vos dernières commandes';
         $msg .= '</div>';
         $msg .= '<div class="panel-body">';
         $msg .= '<table class="table table-hover">';
         $msg .= '<tr>';
         $msg .= '<th>Numéro de suivi</th>';
         $msg .= '<th>Montant</th>';
         $msg .= '<th>Date</th>';
         $msg .= '</tr>';
         foreach ($orders as $lastorder) {
             $date = new DateTime($lastorder['date']);
             $lastorder['date'] = $date->format('d-m-Y');
             $msg .= '<tr>';
             $msg .= '<td>' . $lastorder['id_commande'] . '</td>';
             $msg .= '<td>' . $lastorder['montant'] . '</td>';
             $msg .= '<td>' . $lastorder['date'] . '</td>';
             $msg .= '</tr>';
         }
         $msg .= '</table>';
         $msg .= '</div>';
         $msg .= '</div>';
     } else {
         $msg .= 'Vous n\'avez pas le droit d\'accéder à cette page.<br/>Vous devez être connecté en tant que membre.';
     }
     include "views/members/profile.php";
 }
开发者ID:GiGis971,项目名称:evoyage,代码行数:66,代码来源:members.php

示例3: executePublicHangoutReview

 public function executePublicHangoutReview(sfWebRequest $request)
 {
     if (!isset($_GET['id'])) {
         die('Sorry! page cannot be found.');
     }
     $profileId = $_GET['id'];
     $Member = new Member();
     $Member->setId($profileId);
     $memberId = $Member->getMemberInfo('id');
     $gender = $Member->getMemberInfo('gender');
     $profilePictureId = $Member->getMemberInfo('profile_picture_id');
     $Photo = new Photo();
     $this->path = $Photo->getPicturePath($profilePictureId);
     $this->photos = array();
     $this->photos = $Photo->getPhotos($memberId);
     if (empty($this->path)) {
         $pictureName = strtolower($gender) == 'f' ? 'female.jpg' : 'male.png';
         $this->path = "images/{$pictureName}";
     }
     $this->userId = $memberId;
 }
开发者ID:novesanchez,项目名称:project-hangout,代码行数:21,代码来源:actions.class.php

示例4: executeSaveChanges

 public function executeSaveChanges(sfWebRequest $request)
 {
     try {
         $q = Postings::getPostingInfo($_REQUEST['posting_id']);
         $q->gender_type = $_REQUEST['gender_type'];
         $q->date_to_hangout = date("Y-m-d", strtotime($_REQUEST['startdt_hangout']));
         $q->num_ppl = $_REQUEST['num_ppl'];
         $q->posting_enddt = $this->calculatePostingEndDate($_REQUEST['posting_enddt'], $_REQUEST['starttime'], $_REQUEST['startdt_hangout']);
         $q->age_range_1 = $_REQUEST['age_range_1'];
         $q->age_range_2 = $_REQUEST['age_range_2'];
         $q->starttime = $_REQUEST['starttime'];
         $q->endtime = $_REQUEST['endtime'];
         $q->posting_title = $_REQUEST['posting_title'];
         $q->posting_desc = $_REQUEST['posting_desc'];
         $q->enddate_hangout = date("Y-m-d", strtotime($_REQUEST['enddt_hangout']));
         $q->save();
         $hotlistMembers = HotList::getHotListMembers($_REQUEST['posting_id'], $_SESSION['userId']);
         $Member = new Member();
         $Member->setId($_SESSION['userId']);
         $nick_name = $Member->getMemberInfo('nick_name');
         foreach ($hotlistMembers as $v) {
             $body = '
                 <div style="font-family:tahoma;font-size:12px;">
                     Hi <b>' . $v->getMember()->getNickName() . '</b>,
                     <br/><br/>
                     <p>
                         <b> ' . $nick_name . ' </b> has made some changes on a post with title "<b>' . $v->getPostings()->getPostingTitle() . '</b>".
                     </p>
                     <br/>
                     Thank you
                     <br/>                    
                 </div>';
             CustomHangout::email($v->getMember()->getEmail(), $body, 'HangOutToday', 'HangOutToday Notification');
         }
         die(true);
     } catch (Exception $e) {
         die(false);
     }
 }
开发者ID:novesanchez,项目名称:project-hangout,代码行数:39,代码来源:actions.class.php

示例5: getMembersByObjectAndDimension

 static function getMembersByObjectAndDimension($object_id, $dimension_id, $extra_conditions = "")
 {
     $sql = "\r\n  \t\t\t\tSELECT m.* \r\n  \t\t\t\tFROM " . TABLE_PREFIX . "object_members om \r\n  \t\t\t\tINNER JOIN " . TABLE_PREFIX . "members m ON om.member_id = m.id \r\n  \t\t\t\tWHERE \r\n  \t\t\t\t\tdimension_id = '{$dimension_id}' AND \r\n  \t\t\t\t\tom.object_id = '{$object_id}' \r\n  \t\t\t\t\t{$extra_conditions}\r\n  \t\t\t\tORDER BY m.name";
     $result = array();
     $rows = DB::executeAll($sql);
     if (!is_array($rows)) {
         return $result;
     }
     foreach ($rows as $row) {
         $member = new Member();
         $member->setFromAttributes($row);
         $member->setId($row['id']);
         $result[] = $member;
     }
     return $result;
 }
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:16,代码来源:ObjectMembers.class.php

示例6: getMembersByObjectAndDimension

 		static function getMembersByObjectAndDimension($object_id, $dimension_id, $extra_conditions = "") {
 			$sql = "
 				SELECT m.* 
 				FROM ".TABLE_PREFIX."object_members om 
 				INNER JOIN ".TABLE_PREFIX."members m ON om.member_id = m.id 
 				WHERE 
 					dimension_id = '$dimension_id' AND 
 					om.object_id = '$object_id' 
 					$extra_conditions
 				ORDER BY m.name";
 			
 			$result = array();
 			$rows = DB::executeAll($sql);
 			if (!is_array($rows)) return $result;
 			
 			foreach ($rows as $row) {
 				$member = new Member();
 				$member->setFromAttributes($row);
 				$member->setId($row['id']);
 				$result[] = $member;
 			}
 			return $result;
 		}
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:23,代码来源:ObjectMembers.class.php

示例7: Member

<?php

require_once './resource/models/member.php';
if ($_POST['member_id']) {
    $member = new Member();
    if ($_POST["member_id"] != "") {
        $member->setId($_POST["member_id"]);
        $result = $member->delete();
        if ($result) {
            $message = "<p class=\"message success\"><i class=\"material-icons\">done</i>Member deleted!</p>";
        } else {
            $message = "<p class=\"message error\"><i class=\"material-icons\">error</i>Error: Member was not deleted</p>";
        }
    } else {
        $message = "<p class=\"message error\"><i class=\"material-icons\">error</i>Error: Blank member ID specified in POST request</p>";
    }
} else {
    $message = "<p class=\"message error\"><i class=\"material-icons\">error</i>Error: No member ID specified in POST request</p>";
}
开发者ID:7373Lacym,项目名称:OrgWeb,代码行数:19,代码来源:delete.php

示例8: Member

<?php

require_once './resource/config/connectDB.php';
require_once './resource/models/member.php';
$member = new Member();
if (isset($member_id)) {
    $member->setId($member_id);
    $member->read();
} else {
    $member = $member->allPublicRecords();
}
开发者ID:7373Lacym,项目名称:OrgWeb,代码行数:11,代码来源:get.php


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