本文整理汇总了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>
示例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>";
示例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);