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


PHP UserInfo::module_user_id方法代码示例

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


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

示例1: array

<?php

$response = array();
$response["success"] = -1;
session_start();
if (!isset($_SESSION["session_name"])) {
    header("Location:../index.php");
    exit;
} else {
    // reaching from current directory to _user_info
    require_once __DIR__ . '/../../php/user_info.php';
    $user = new UserInfo();
    $json = $user->module_user_id("delta", "./school_management", $_SESSION["session_name"]);
    //echo $json;
    //var_dump(json_decode($json,true));
    //echo "<script>console.log(".$json.")</script>";
    $userInfo = json_decode($json, true);
    $myUserName = $userInfo['result'][0]['username'];
    $myUserType = $userInfo['result'][0]['user_role'];
    //$userInfo['result'][6]['user_info'];
    //echo $json['result'][6]['user_role'];
}
//echo json_encode($response);
?>


<style>
<?php 
include 'css/master-ui.css';
?>
</style>
开发者ID:safieurrahman,项目名称:School-Management-System,代码行数:31,代码来源:index.php

示例2: array

<?php

$response = array();
$response["success"] = -1;
session_start();
if (!isset($_SESSION["session_name"]) || $_SESSION["session_name"] == "") {
    header("Location:../index.php");
    exit;
} else {
    // reaching from current directory to _user_info
    require_once __DIR__ . '/../../php/user_info.php';
    $user = new UserInfo();
    $user_data_values = $user->module_user_id("delta", "./donations", $_SESSION["session_name"]);
    //echo $user_data_values;
    $zzzz = json_decode($user_data_values);
    //echo "\n" .
    $user_donor = $zzzz->result[0]->is_donor;
    $_SESSION["user_first_name_"] = $zzzz->result[0]->firstname;
    $_SESSION["user_last_name_"] = $zzzz->result[0]->lastname;
    $_SESSION["user_email_"] = $zzzz->result[0]->email;
    if ($user_donor == 1) {
        $_SESSION["user_type"] = "donor";
        echo "<script>window.location = 'donation_method.php'; </script>";
    } else {
        if ($user_donor == 0) {
            $_SESSION["user_type"] = "acceptor";
            echo "<script>window.location = 'method.php'; </script>";
        } else {
            if ($user_donor == 2) {
                $_SESSION["user_type"] = "admin";
                echo "<script>window.location = 'insert_monetary_help.php'; </script>";
开发者ID:mariahameed,项目名称:mh_donation_project,代码行数:31,代码来源:index.php

示例3: array

<body>
<?php 
$response = array();
$response["success"] = -1;
session_start();
if (!isset($_SESSION["session_name"])) {
    header("Location:../index.php");
    exit;
} else {
    // reaching from current directory to _user_info
    require_once __DIR__ . '/../../php/user_info.php';
    $id = $_SESSION["session_name"];
    $pk = "delta";
    $project = "./drixel";
    $user = new UserInfo();
    $result = $user->module_user_id($pk, $project, $id);
    $array = json_decode($result, true);
    $user_info = $array["result"][0];
}
require_once 'db_functions.php';
$db = new db_functions();
if (isset($_POST["sub"])) {
    $user_profile = $db->storeUserProfile($id, $_POST["dateOfBirth"], $_POST["gender"], $_POST["contactNum"], $_POST["address"]);
} else {
    if (isset($_FILES["dp"])) {
        $imagename = $_FILES["dp"]["name"];
        file_put_contents('dps/' . $imagename, file_get_contents($_FILES['dp']['tmp_name']));
        $db->storeUserDP($id, 'dps/' . $imagename);
    }
}
$user_profile = $db->FindUser($id);
开发者ID:umarhussain15,项目名称:web_semester_project_integration_repo_Jan16,代码行数:31,代码来源:profile.php


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