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


PHP Model_User::getUserByID方法代码示例

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


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

示例1: array

        $result = global_common::updateDeleteFlag($contentID, $IDName, $strTableName, $_pgR["status"], $objConnection);
    }
    $arrHeader = global_common::getMessageHeaderArr($banCode = 0, 0);
    $arrKey = array("rs", "id");
    $arrValue = array($result ? 1 : 0, $contentID);
    $arrIsMetaData = array(0, 1);
    echo global_common::convertToXML($arrHeader, $arrKey, $arrValue, $arrIsMetaData);
    return;
} elseif ($_pgR['act'] == Model_Comment::ACT_BAD_COMMENT) {
    if (global_common::isCLogin()) {
        $c_userInfo = $_SESSION[global_common::SES_C_USERINFO];
        $commentID = $_pgR["id"];
        $isBad = $_pgR["isbad"];
        $strTableName = Model_CommentBad::TBL_SL_COMMENT_BAD;
        $comment = $objComment->getCommentByID($commentID);
        $user = $objUser->getUserByID($comment[global_mapping::CreatedBy]);
        if ($user && $comment) {
            $isSent = true;
            $description = "Restore Comment";
            if ($isBad) {
                $description = "Bad Comment";
                $userEmail = $user[global_mapping::Email];
                $fullName = $user[global_mapping::FullName];
                $linkArticle = global_common::getHostName() . '/article_detail.php?aid=' . $comment[global_mapping::ArticleID];
                $commentDate = global_common::formatDateTimeVN($comment[global_mapping::CreatedDate]);
                $commentContent = $comment[global_mapping::Content];
                $linkPolicy = global_common::getHostName() . '/' . global_common::PAGE_TERM_KM;
                $arrMailContent = global_common::formatMailContent(global_common::TEAMPLATE_BAD_COMMENT, null, array(global_common::formatOutputText($fullName), $linkArticle, $commentDate, $commentContent, $linkPolicy));
                $emailSubject = $arrMailContent[0];
                $emailContent = $arrMailContent[1];
                $isSent = global_mail::send($userEmail, $fullName, $emailSubject, $emailContent, null, global_common::SUPPORT_MAIL_USERNAME, global_common::SUPPORT_MAIL_PASSWORD, global_common::SUPPORT_MAIL_DISPLAY_NAME);
开发者ID:vietlethanh,项目名称:timkm20130929,代码行数:31,代码来源:bg_comment.php

示例2: array

 $allowedExts = array("gif", "jpeg", "jpg", "png");
 $temp = explode(".", $_FILES["file"]["name"]);
 $extension = end($temp);
 if (($_FILES["file"]["type"] == "image/gif" || $_FILES["file"]["type"] == "image/jpeg" || $_FILES["file"]["type"] == "image/jpg" || $_FILES["file"]["type"] == "image/pjpeg" || $_FILES["file"]["type"] == "image/x-png" || $_FILES["file"]["type"] == "image/png") && in_array($extension, $allowedExts)) {
     if ($_FILES["file"]["error"] > 0) {
         global_common::writeLog($_FILES["file"]["error"]);
         //echo "Return Code: " . $_FILES["file"]["error"] . "<br>";
     } else {
         //if (file_exists("upload/" . $_FILES["file"]["name"]))
         //{
         $manipulator = new ImageManipulator($_FILES["file"]["tmp_name"]);
         // resizing to 200x200
         $manipulator->resample($_FILES["file"]["tmp_name"], $_FILES["file"]["type"], 200, 200);
         //echo "after";
         $fileName = global_common::FOLDER_AVATAR . $currentUser[global_mapping::UserID] . '_' . $_FILES["file"]["name"];
         $userUpdate = $objUser->getUserByID($currentUser[global_mapping::UserID]);
         $userUpdate[global_mapping::Avatar] = $fileName;
         //echo $fileName;
         //echo $userUpdate[global_mapping::IsActive];
         $result = $objUser->update($userUpdate[global_mapping::UserID], $userUpdate[global_mapping::UserName], $userUpdate[global_mapping::Password], $userUpdate[global_mapping::FullName], $userUpdate[global_mapping::BirthDate], $userUpdate[global_mapping::Address], $userUpdate[global_mapping::Phone], $userUpdate[global_mapping::Email], $userUpdate[global_mapping::Sex], $userUpdate[global_mapping::Identity], $userUpdate[global_mapping::RoleID], $userUpdate[global_mapping::UserRankID], $userUpdate[global_mapping::Avatar], $userUpdate[global_mapping::AccountID], $userUpdate[global_mapping::IsActive]);
         //echo $result;
         $_SESSION[global_common::SES_C_USERINFO] = $currentUser = $userUpdate;
         move_uploaded_file($_FILES["file"]["tmp_name"], $fileName);
         //}
         //else
         //{
         //	move_uploaded_file($_FILES["file"]["tmp_name"],
         //			global_common::FOLDER_AVATAR  . $currentUser[global_mapping::UserID].$_FILES["file"]["name"]);
         //}
     }
 } else {
开发者ID:vietlethanh,项目名称:KooKooBackEnd,代码行数:31,代码来源:profile.php

示例3: array

 $email = html_entity_decode($email, ENT_COMPAT, 'UTF-8');
 $sex = $_pgR['sex'];
 $sex = html_entity_decode($sex, ENT_COMPAT, 'UTF-8');
 $phone = $_pgR['phone'];
 $phone = html_entity_decode($phone, ENT_COMPAT, 'UTF-8');
 $address = $_pgR['address'];
 $city = $_pgR['city'];
 $address = html_entity_decode($address, ENT_COMPAT, 'UTF-8');
 $currentUser = $_SESSION[global_common::SES_C_USERINFO];
 if ($objUser->checkExistEmail($email, $currentUser[global_mapping::UserID])) {
     $arrHeader = global_common::getMessageHeaderArr($banCode);
     //$banCode
     echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(3, 'Email đã tồn tại'), array(0, 1));
     return;
 }
 $userUpdate = $objUser->getUserByID($currentUser[global_mapping::UserID]);
 $userUpdate[global_mapping::FullName] = $fullname;
 $userUpdate[global_mapping::BirthDate] = $birthDate;
 $userUpdate[global_mapping::Address] = $address;
 $userUpdate[global_mapping::Phone] = $phone;
 $userUpdate[global_mapping::Email] = $email;
 $userUpdate[global_mapping::Sex] = $sex;
 $userUpdate[global_mapping::CityID] = $city;
 $result = $objUser->update($userUpdate[global_mapping::UserID], $userUpdate[global_mapping::UserName], $userUpdate[global_mapping::Password], $userUpdate[global_mapping::FullName], $userUpdate[global_mapping::BirthDate], $userUpdate[global_mapping::Address], $userUpdate[global_mapping::Phone], $userUpdate[global_mapping::Email], $userUpdate[global_mapping::Sex], $userUpdate[global_mapping::Identity], $userUpdate[global_mapping::RoleID], $userUpdate[global_mapping::UserRankID], $userUpdate[global_mapping::Avatar], $userUpdate[global_mapping::AccountID], $userUpdate[global_mapping::IsActive], $userUpdate[global_mapping::CityID]);
 if ($result) {
     $_SESSION[global_common::SES_C_USERINFO] = $objUser->getUserByID($currentUser[global_mapping::UserID]);
     $arrHeader = global_common::getMessageHeaderArr($banCode);
     //$banCode
     echo global_common::convertToXML($arrHeader, array('rs', 'inf'), array(1, 'Cập nhật thành công'), array(0, 1));
     return;
 } else {
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:bg_user.php

示例4: array

            } else {
                echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, 'Update failed'), array(0, 1));
                return;
            }
        } else {
            echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, 'Update failed. Password not matched'), array(0, 1));
            return;
        }
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, 'Update failed. You have no permision to perform this'), array(0, 1));
        return;
    }
} else {
    if ($_pgR["act"] == Model_User::ACT_GET) {
        $userID = $_pgR[global_mapping::UserID];
        $userInfo = $objUser->getUserByID($userID);
        if ($userInfo) {
            echo global_common::convertToXML($strMessageHeader, array("rs", "content"), array(1, json_encode($userInfo)), array(0, 1));
        } else {
            echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(0, "Data is invalid. Pleae try again later"), array(0, 1));
        }
        return;
    }
}
//$catID = $_pgR["cid"];
$page = $_pgR["p"];
if (!$page) {
    $page = 1;
}
$keyword = $_pgR["keyword"];
if ($keyword) {
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:admin_user.php

示例5: array

        } else {
            echo global_common::convertToXML($arrHeader, array("rs"), array(0), array(0));
            return;
        }
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", 'info'), array(0, global_common::STRING_REQUIRE_LOGIN), array(0, 1));
    }
    return;
} elseif ($_pgR['act'] == model_User::ACT_CHANGE_PAGE) {
    $intPage = $_pgR['p'];
    $outPutHTML = $objUser->getListUser($intPage);
    echo global_common::convertToXML($strMessageHeader, array('rs', 'inf'), array(1, $outPutHTML), array(0, 1));
    return;
} elseif ($_pgR['act'] == model_User::ACT_SHOW_EDIT) {
    $strUserID = $_pgR['id'];
    $arrUser = $objUser->getUserByID($strUserID);
    echo global_common::convertToXML($strMessageHeader, array('rs', 'UserID', 'UserName', 'Password', 'Fullname', 'BirthDate', 'Address', 'Phone', 'Email', 'Sex', 'Identity', 'RoleID', 'UserRankID', 'Avatar', 'AccountID', 'IsActived'), array(1, 'UserID', 'UserName', 'Password', 'Fullname', 'BirthDate', 'Address', 'Phone', 'Email', 'Sex', 'Identity', 'RoleID', 'UserRankID', 'Avatar', 'AccountID', 'IsActived'), array(0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0));
    return;
} elseif ($_pgR["act"] == model_User::ACT_GET) {
    $sectionID = $_pgR["sect"];
    $arrSection = $objMenu->getAllMenuBySection($sectionID);
    if ($arrSection) {
        $strHTML = $objMenu->outputHTMLMenu($arrSection);
        echo global_common::convertToXML($arrHeader, array("rs", "inf"), array(1, $strHTML), array(0, 1));
        return;
    } else {
        echo global_common::convertToXML($arrHeader, array("rs", 'inf'), array(0, 'Kh?ng c? nh?m h?ng'), array(0, 0));
        return;
    }
} elseif ($_pgR['act'] == model_User::ACT_DELETE) {
    $IDName = "menu_id";
开发者ID:roni5,项目名称:sela,代码行数:31,代码来源:admin_user.php

示例6:

<?php

/* TODO: Add code here */
require 'config/globalconfig.php';
include_once 'include/_permission.inc';
include_once 'class/model_user.php';
include_once 'class/model_city.php';
require_once 'lib/ImageManipulator.php';
$objUser = new Model_User($objConnection);
$userID = Urlcrypt::decode($_pgR["uid"]);
$currentUser = $objUser->getUserByID($userID);
if (!$currentUser) {
    return;
}
?>

<?php 
include_once 'include/_header.inc';
include_once 'include/_menu.inc';
//print_r($_SESSION[global_common::SES_C_USERINFO]);
?>

<div id="profile-page" class="page-content">
	<div class="row-fluid">
		<div class="span12">
			<!-- BEGIN PAGE TITLE & BREADCRUMB-->
			<h3 class="page-title">
				Thông tin người đăng
			</h3>
		</div>
	</div>
开发者ID:vietlethanh,项目名称:oceo,代码行数:31,代码来源:member.php


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