本文整理汇总了PHP中user_data函数的典型用法代码示例。如果您正苦于以下问题:PHP user_data函数的具体用法?PHP user_data怎么用?PHP user_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_data函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: is_admin
function is_admin()
{
if (is_in() && user_data('email') == '[email protected]') {
return true;
}
return false;
}
开发者ID:Ahmed-Badawy,项目名称:ahmed-badawy.com-Website,代码行数:7,代码来源:lara_helper.php
示例2: logged_in_redirect
function logged_in_redirect()
{
if (logged_in() === true) {
$session_user_id = $_SESSION['user_id'];
$user_data = user_data($session_user_id, 'user_id', 'username', 'password');
if (admin_access($user_data['username']) === false) {
header('Location: index.php');
exit;
}
}
}
开发者ID:zander009,项目名称:My-first-project-in-Github,代码行数:11,代码来源:users.php
示例3: news_comment_form
function news_comment_form($News)
{
$form = '<form method="POST" action="' . get_link('Comments', 'Public') . '">';
$form .= call_bbcode_editor("Comment_Message");
//$form .= '<textarea name="Comment_Message" ID="message" rows="10" cols="50"></textarea><br/><br/>';
$form .= '<input type="hidden" name="Comment_News_ID" value="' . stripslashes_r($News['News_ID']) . '"/>';
$form .= '<input type="hidden" name="News_ID" value="' . stripslashes_r($News['News_ID']) . '"/>';
$form .= '<input type="hidden" name="Comment_Date" value="' . date('Y-m-d H:i:s') . '"/>';
$form .= '<input type="hidden" name="Comment_Account_Pseudo" value="' . user_data('Account_Pseudo') . '"/>';
$form .= '<input type="hidden" name="token" value="' . generer_token('Comment-' . $News['News_ID']) . '" />';
$form .= '<input type="submit" name="End_Add" value="Terminer">';
$form .= '</form>';
return $form;
}
开发者ID:galadie,项目名称:Caranille-RPG,代码行数:14,代码来源:Comments.php
示例4: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode === 'username') {
email($email, 'Your username', "Hello " . $userdata['firstname'] . "\n\nYour username is " . $userdata['firstname'] . "\n\n-our company");
} elseif ($mode === 'password') {
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
//change_password($user_data['user_id'], $generated_password);
//update_user($user_data['user_id'], array('password_recover' => '1'));
email($email, 'Your password recovery', "Hello " . $userdata['firstname'] . "\n\nYour new password is: " . $generated_password . "\n\n-our company");
}
}
开发者ID:aaron770,项目名称:securelogin-repo,代码行数:14,代码来源:users.php
示例5: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'first_name', 'username');
if ($mode == 'username') {
email($email, 'Your username recvory', "Hello" . $user_data['first_name'] . ",\n\nYour username is:" . $user_data['username'] . "\n\n-stumbleupon");
} else {
if ($mode == 'password') {
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_data'], array('password_recover' => '1'));
email($email, 'Your password recvory', "Hello" . $user_data['first_name'] . ",\n\nYour New Password is:" . $generated_password . "\n\n-StumbleUpon");
}
}
}
开发者ID:vimoxshah,项目名称:StumbleUpon,代码行数:16,代码来源:users.php
示例6: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode == 'username') {
email($email, 'Your username', "Hello " . $user_data['first_name'] . ", \n \n Your username is: " . $user_data['username'] . ",\n\n -dwcl");
} else {
if ($mode == 'password') {
//password
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
change_password($user_data['user_id'], $generated_password);
email($email, 'Your Password', "Hello " . $user_data['first_name'] . ", \n \n Your new is: " . $generated_password . ",\n\n -dwcl");
}
}
}
开发者ID:ericpauldeveloper,项目名称:login-register,代码行数:16,代码来源:users.php
示例7: recover
function recover($mode, $email)
{
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode == 'username') {
// recover username
email($email, 'Your username', "Hello " . $user_data['first_name'] . ",\n\nYour username is: " . $user_data['username'] . "\n\n-sparklet");
} else {
if ($mode == 'password') {
// recover password
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
// die($generated_password);
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_id'], array('password_recover' => '1'));
email($email, 'Your password recovery', "Hello " . $user_data['first_name'] . ",\n\nYour new password is: " . $generated_password . "\n\n-sparklet");
}
}
}
开发者ID:stevensmetellus,项目名称:medium-clone,代码行数:17,代码来源:users.php
示例8: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(user_id_from_email($email), 'user_id', 'first_name');
if ($mode == 'username') {
email($email, 'Your username', " Hello " . $userdata['first_name'] . ",\n\nYour username is : " . $user_data['username'] . "\n\n-Utkal Placement");
} else {
if ($mode == 'password') {
$temp_password = substr(md5(rand(9999, 999999)), 0, 8);
change_password($user_data['user_id'], $temp_password);
update_user($user_data['user_id'], array('password_recover' => '1'));
email($email, 'Your password Recovery', " Hello " . $userdata['first_name'] . ",\n\nYour new password is : " . $temp_password . "\n\nPlease log in to change this.\n\n-Utkal Placement");
}
}
//$temp_pass= md5($temp_pass);
//mysql_query("UPDATE `users` SET `pass_temp` = '$temp_pass' WHERE `email` = '$email'");
}
开发者ID:prabhat2233,项目名称:UtkalPortal,代码行数:18,代码来源:users.php
示例9: recover
function recover($mode, $email)
{
// recupereaza numele de utilizator sau parola - $mode poate lua valoarea de 'username' sau 'password'
include 'core/db/db_connection.php';
$mode = sanitize($mode);
$email = sanitize($email);
$user_data = user_data(get_user_id_from_email($email), 'user_id', 'first_name', 'username');
if ($mode == 'username') {
email($email, 'Your username', "\n\t\t\t\tHello " . $user_data['first_name'] . ", <br><br>\n\t\t\t\tYour username is " . $user_data['username'] . " <br><br>\n\t\t\t\t-worldtour team\n\t\t\t");
} else {
if ($mode == 'password') {
$generated_password = substr(md5(rand(777, 7777)), 0, 7);
// generam o parola random de 7 caractere pe care o criptam cu md5
change_password($user_data['user_id'], $generated_password);
update_user($user_data['user_id'], array('pwd_recovery' => '1'));
// folosim un 'flag' asupra contului pentru a forta utilizatorul sa-si schimbe parola generata de noi prima oara cand se logheaza
email($email, 'Password recovery', "\n\t\t\t\tHello " . $user_data['first_name'] . ", <br><br>\n\t\t\t\tYour new password is " . $generated_password . "<br><br>\n\t\t\t\tKindly note that this is a temporary password and you are required to change it on your first log in. <br><br>\n\t\t\t\t-worldtour team\n\t\t\t");
}
}
}
开发者ID:vpandichi,项目名称:worldtour_proiect,代码行数:20,代码来源:users.php
示例10: recover
function recover($mode, $email)
{
$mode = sanitize($mode);
$email = sanitize($email);
$user_id = user_id_from_email($email);
$user_data = user_data($user_id, 'user_id', 'first_name', 'username');
if ($mode === 'username') {
//recover username
sendMail("{$email}", "MCA-website username recovery mail", "Hello " . $user_data['first_name'] . ", \n\n Your username for mca page is " . $user_data['username'] . "\n\n~MCA, IIT Bombay");
} else {
if ($mode === 'password') {
//recover password
$generated_password = substr(md5(rand(999, 999999)), 0, 8);
change_password($user_data['user_id'], $generated_password);
//changing password with new genrated password
//this is to force user to change password after resetting password
mysql_query("UPDATE `users` SET `password_recover` = 1 WHERE `user_id` = {$user_id}");
sendMail("{$email}", "MCA-website password reset mail", "Hello " . $user_data['first_name'] . ", \n\n Your password for mca page is reset and the new password is " . $generated_password . ". Please change your password after logging in.\n\n~MCA, IIT Bombay");
}
}
}
开发者ID:nithinmurali,项目名称:mca_website,代码行数:21,代码来源:users.php
示例11: ajout_forum_form
function ajout_forum_form($map_cat)
{
$list_rank = list_db('guild_list_rank', array('Guild_ID' => user_data('Account_Guild_ID')));
foreach ($list_rank as $l) {
$values[$l['Rank_ID']] = $l['Rank_Name'];
}
set_values_db("Caranille_Forums", "Auth_View", $values);
set_values_db("Caranille_Forums", "Auth_Post", $values);
set_values_db("Caranille_Forums", "Auth_Topic", $values);
set_values_db("Caranille_Forums", "Auth_Annonce", $values);
set_values_db("Caranille_Forums", "Auth_Modo", $values);
if (has_guild_acces('forum')) {
$form = '<form method="POST" action="' . get_link("Main", "Guild") . '">';
$form .= '<h2>Ajout de Forum</h2>';
$form .= '<input type="hidden" name="Forum_Guild_ID" value="' . user_data('Account_Guild_ID') . '"/>';
$form .= '<table style="width:100%">';
$form .= '<tr>';
$form .= '<td style="width:50%">';
$form .= line_db("Caranille_Forums", "Forum_Name");
$form .= 'Catégorie : <select name="Forum_Cat_ID">';
foreach ($map_cat as $ID => $nom) {
$form .= '<option value="' . $ID . '">' . $nom . '</option>';
}
$form .= '</select>';
$form .= line_db("Caranille_Forums", "Auth_View");
$form .= line_db("Caranille_Forums", "Auth_Post");
$form .= line_db("Caranille_Forums", "Auth_Topic");
$form .= line_db("Caranille_Forums", "Auth_Annonce");
$form .= line_db("Caranille_Forums", "Auth_Modo");
$form .= '</td>';
$form .= '<td style="width:50%">' . call_bbcode_editor("Forum_Desc", "", "guild-forum") . '</td>';
$form .= '</tr>';
$form .= '<tr>';
$form .= '<td><input type="submit" name="End_Add_Forum" value="Terminer"/></td>';
$form .= '</tr>';
$form .= '</table>';
$form .= '</form>';
return $form;
}
}
开发者ID:galadie,项目名称:Caranille-RPG,代码行数:40,代码来源:Main.php
示例12: array
?>
<!--<textarea cols="70" rows="7" id="message" name="message"></textarea></fieldset>-->
</fieldset>
<p>
<input type="submit" name="submit" value="Editer !" />
<input type="reset" name = "Effacer" value = "Effacer"/></p>
</form>
<?php
}
break;
//Fin de ce cas :o
?>
<?php
case "delete":
//Si on veut supprimer le post
//Ensuite on vérifie que le membre a le droit d'être ici (soit le créateur soit un modo/admin)
if (verif_Access($Auth_Modo, true) || $Post_Createur === user_data('Account_ID')) {
echo '<h1>Suppression</h1>';
echo '<p>Êtes vous certains de vouloir supprimer ce post ?</p>';
echo '<p><a href="' . get_link('Post', 'Forum', array('action' => 'delete', 'p' => $post)) . '">Oui</a> ou <a href="' . get_link('Main', 'Forum') . '">Non</a></p>';
}
break;
?>
<?php
default:
//Si jamais c'est aucun de ceux là c'est qu'il y a eu un problème :o
echo '<p>Cette action est impossible</p>';
}
//Fin du switch
开发者ID:galadie,项目名称:Caranille-RPG,代码行数:31,代码来源:Poster.php
示例13: getSession
}
}
require_once 'database/connect.php';
require_once 'function/general.php';
require_once 'function/users.php';
require_once 'function/cache.php';
require_once 'function/mail.php';
require_once 'function/token.php';
require_once 'function/itemparser/itemlistparser.php';
if (isset($_SESSION['token'])) {
$_SESSION['old_token'] = $_SESSION['token'];
}
Token::generate();
if (user_logged_in() === true) {
$session_user_id = getSession('user_id');
$user_data = user_data($session_user_id, 'id', 'name', 'password', 'email', 'premdays');
$user_znote_data = user_znote_account_data($session_user_id, 'ip', 'created', 'points', 'cooldown');
}
$errors = array();
// Log IP
if ($config['log_ip']) {
$visitor_config = $config['ip_security'];
$flush = $config['flush_ip_logs'];
if ($flush != false) {
$timef = $time - $flush;
if (getCache() < $timef) {
$timef = $time - $visitor_config['time_period'];
mysql_delete("DELETE FROM znote_visitors_details WHERE time <= '{$timef}'");
setCache($time);
}
}
开发者ID:peonso,项目名称:ZnoteAAC,代码行数:31,代码来源:init.php
示例14: intval
// How many replies?
$replies = intval(get_replies($row['reply']));
// Lets update it
$replies = $replies + 1;
// Woooo~ Last id for redirecting~
$page_numbers = $replies / 20 - 1;
$n = ceil($page_numbers);
if ($n == -1) {
$n = 0;
} else {
$n = abs($n);
}
// Build topic url
$post_url = "{$config['url_path']}/read.php?id={$row['reply']}&page={$n}";
// Topic starter data
$post_author = user_data($row['starter_id']);
?>
<tr>
<td nowrap="nowrap" width="40%" class="item">
<a href="<?php
echo $post_url;
?>
">
<?php
echo $content;
?>
</a>
</td>
<td nowrap="nowrap" align="center" class="item">
<?php
echo $post_author['styled_name'];
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:posts.php
示例15: topic
if ($_GET['reply'] != 0) {
/**
* Validate reply with alpha
*/
if (alpha($_GET['reply'], 'numeric')) {
$reply = $_GET['reply'];
// Get topic data
$topic = topic($reply, 'subject');
if ($topic) {
// Title
$title = lang('replying_to') . ": {$topic['subject']}";
// Our Subject
$_POST['subject'] = "Re: {$topic['subject']}";
if ($_GET['q'] && alpha($_GET['q'], 'numeric')) {
$quote_data = topic($_GET['q'], 'message,starter_id');
$quote_user_data = user_data($quote_data['starter_id']);
$quote_data['message'] = br2nl(stripslashes(parse($quote_data['message'], false)));
$content = '[quote=' . $quote_user_data['username'] . ']' . $quote_data['message'] . '[/quote]';
}
} else {
$reply = 0;
// New topic
$title = lang('posting_new_topic');
}
} else {
$reply = 0;
// New topic
$title = lang('posting_new_topic');
}
} else {
$reply = 0;
开发者ID:nijikokun,项目名称:NinkoBB,代码行数:31,代码来源:message.php
示例16: lang
echo lang('category');
?>
</td>
</tr>
<?php
if (is_array($topics)) {
foreach ($topics as $row) {
// reset
$status = "";
$list = "";
// Trim subject
$subject = substru(trim(htmlspecialchars($row['subject'], ENT_QUOTES, 'UTF-8')), 0, $config['max_length']) . "…";
// Build topic url
$topic_url = "{$config['url_path']}/read.php?id={$row['id']}";
// Topic starter data
$topic_author = user_data($row['starter_id']);
// Topic status
if ($row['closed']) {
$status = 'closed, ';
}
if ($row['sticky']) {
$status .= 'sticky';
}
$categories = category();
// Create the delete list
foreach ($categories as $acat) {
if ($acat['id'] == $row['category']) {
continue;
}
if ($page) {
$apage = "&page={$page}";
开发者ID:amenski,项目名称:BookSharing,代码行数:31,代码来源:topics.php
示例17: die
}
//далаем разметку по oy
for ($i=0; $i<=10; $i++)
{
imageline($im, $dx, $ysize - $dy - $i*$ystep, $xsize-$dx, $ysize - $dy - $i*$ystep, $silver);
imageString($im, 1, 0, $ysize - $dy - $i*$ystep, $i*$max/10, $black);
}
//сами оси
imageline($im, $dx, $dy, $dx, $ysize-$dy, $black);
imageline($im, $dx, $ysize-$dy, $xsize-$dx, $ysize-$dy, $black);
$i=1;
foreach ($users as $user){
user_data($user, $i,$shopcoins_class);
$i++;
}
ImagePNG($im);
ImageDestroy($im);
}
die();
function user_data($user, $num,$shopcoins_class){
global $timenow, $max, $ysize, $dx, $dy, $im;
$color[1] = ImageColorAllocate($im, 0, 0, 204);
$color[2] = ImageColorAllocate($im, 255, 0, 0);
$color[3] = ImageColorAllocate($im, 0, 204, 102);
$color[4] = ImageColorAllocate($im, 204, 204, 0);
开发者ID:nellka,项目名称:numiz-new,代码行数:31,代码来源:dinamicsgraph.ctl.php
示例18: session_start
<?php
session_start();
ob_start();
// Turn off when live
error_reporting(0);
require 'database/dbConnect.php';
require 'functions/general.php';
require 'functions/users.php';
require 'functions/post.php';
if (logged_in() === true) {
$session_user_id = $_SESSION['user_id'];
// This function call will literally allow you to ge any of the above from the db
$user_data = user_data($session_user_id, 'user_id', 'username', 'password', 'first_name', 'last_name', 'email');
// This will output whatever you pass in :D
}
$errors = array();
开发者ID:RobinsonKameron,项目名称:Shoplift.ninja,代码行数:17,代码来源:init.php
示例19: session_start
<?php
session_start();
//error_reporting(0);
require 'database/connect.php';
require 'functions/general.php';
require 'functions/users.php';
if (logged_in()) {
$session_serial = $_SESSION['serial'];
$user_data = user_data($session_serial, 'serial', 'name', 'email', 'user_name', 'password', 'school', 'level');
if (!user_active($user_data['user_name'])) {
session_destroy();
header("Location: index.php");
}
}
$errors = array();
开发者ID:arealdeadone,项目名称:Treasurehunt,代码行数:16,代码来源:init.php
示例20: perso_data
echo perso_data('Strength_Total');
?>
<br />
<span class="important">Magie</span> : <?php
echo $_SESSION['Magic_Total'];
?>
<br />
<span class="important">Agilité</span> : <?php
echo $_SESSION['Agility_Total'];
?>
<br />
<span class="important">Défense</span> : <?php
echo $_SESSION['Defense_Total'];
?>
<br />
<br />
<span class="important">PO</span> : <div class="gain gold"><?php
echo user_data('Account_Golds');
?>
</div><br />
<span class="important">Notoriété</span> : <div class="gain notoriety"><?php
echo user_data('Account_Notoriety');
?>
</div><br /><br />
<?php
}
}
}
开发者ID:galadie,项目名称:Caranille-RPG,代码行数:31,代码来源:perso.php
注:本文中的user_data函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论