本文整理汇总了PHP中get_user_key函数的典型用法代码示例。如果您正苦于以下问题:PHP get_user_key函数的具体用法?PHP get_user_key怎么用?PHP get_user_key使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_user_key函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: inform
public static function inform($course, $id)
{
global $DB, $OUTPUT, $USER;
$entry = self::get_one($id);
// No restriction
// Valid forever
$value = get_user_key('blocks/quickmail', $USER->id, $course->id);
$url = self::base_url($course->id);
$approval_url = self::base_url($course->id, array('id' => $id, 'action' => self::VERIFY, 'activator' => $USER->id, 'key' => $value));
$a = new stdClass();
$a->address = $entry->address;
$a->url = html_writer::link($approval_url, $approval_url->out());
$a->course = $course->fullname;
$a->fullname = fullname($USER);
$from = quickmail::_s('alternate_from');
$subject = quickmail::_s('alternate_subject');
$html_body = quickmail::_s('alternate_body', $a);
$body = strip_tags($html_body);
// Send email
$user = clone $USER;
$user->email = $entry->address;
$user->firstname = quickmail::_s('pluginname');
$user->lastname = quickmail::_s('alternate');
$result = email_to_user($user, $from, $subject, $body, $html_body);
// Create the event, trigger it.
$event = \block_quickmail\event\alternate_email_added::create(array('courseid' => $course->id, 'context' => context_course::instance($course->id), 'other' => array('address' => $entry->address)));
$event->trigger();
$html = $OUTPUT->box_start();
if ($result) {
$html .= $OUTPUT->notification(quickmail::_s('entry_saved', $entry), 'notifysuccess');
$html .= html_writer::tag('p', quickmail::_s('entry_success', $entry));
} else {
$html .= $OUTPUT->notification(quickmail::_s('entry_failure', $entry));
}
$html .= $OUTPUT->continue_button($url);
$html .= $OUTPUT->box_end();
return $html;
}
示例2: get_user_name
echo WEB_PATH;
?>
/uname/<?php
echo $sd['sd_userid'];
?>
" target="_blank" title="<?php
echo get_user_name($sd['sd_userid']);
?>
"><img alt="<?php
echo $sd['sd_title'];
?>
" src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($sd['sd_userid'], 'img', '8080');
?>
" width="40" height="40"><i></i></a></p>
<p class="u-info"><span><a href="<?php
echo WEB_PATH;
?>
/uname/<?php
echo $sd['sd_userid'];
?>
" target="_blank" title="<?php
echo get_user_name($sd['sd_userid']);
?>
"><?php
echo get_user_name($sd['sd_userid']);
?>
</a><em><?php
示例3: getLotteryList
public function getLotteryList()
{
$FIdx = $this->segment(4);
$EIdx = 10;
//$this->segment(5);
$isCount = $this->segment(6);
$shopsum = $this->db->GetList("select * from `@#_shoplist` where `q_end_time` !='' ");
//最新揭晓
$shoplist['listItems'] = $this->db->GetList("select * from `@#_shoplist` where `q_end_time` !='' ORDER BY `q_end_time` DESC limit {$FIdx},{$EIdx}");
if (empty($shoplist['listItems'])) {
$shoplist['code'] = 1;
} else {
foreach ($shoplist['listItems'] as $key => $val) {
//查询出购买次数
$recodeinfo = $this->db->GetOne("select `gonumber` from `@#_member_go_record` where `uid` ='{$val['q_uid']}' and `shopid`='{$val['id']}' ");
//echo "select `gonumber` from `@#_member_go_record` where `uid` !='$val[q_uid]' and `shopid`='$val[id]' ";
$shoplist['listItems'][$key]['q_user'] = get_user_name($val['q_uid']);
$shoplist['listItems'][$key]['userphoto'] = get_user_key($val['q_uid'], 'img');
$shoplist['listItems'][$key]['q_end_time'] = microt($val['q_end_time']);
$shoplist['listItems'][$key]['gonumber'] = $recodeinfo['gonumber'];
}
$shoplist['code'] = 0;
$shoplist['count'] = count($shopsum);
}
echo json_encode($shoplist);
}
示例4: idjia
</div>
</div>
<div class="clearfix gray9 limit-user">
<a class="fl z-Limg" href="location.href='<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($shop['q_uid']);
?>
">
<s></s>
<img border="0" src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($shop['q_uid'], 'img');
?>
">
</a>
<p>
恭喜<span class="z-user blue" onclick="location.href='<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($shop['q_uid']);
?>
'"><?php
echo get_user_name($shop['q_uid']);
?>
</span>获得
</p>
示例5: idjia
?>
</span></div>
</div>
<div class="share_goods">
<div class="share-get">
<a class="fl-img" href="<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($shaidan['sd_userid']);
?>
" target="_blank"><img src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($shaidan['sd_userid'], 'img', '8080');
?>
"></a>
<div class="share-getinfo">
<p class="getinfo-name">幸运获得者:<a class="blue Fb" href="<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($shaidan['sd_userid']);
?>
" target="_blank"><?php
echo userid($shaidan['sd_userid'], 'username');
?>
</a></p>
<p>总共<?php
echo _cfg('web_name_two');
示例6: get_user_key
<section class="clearfix g-member">
<div class="clearfix m-round m-name">
<div class="fl f-Himg">
<a href="<?php
echo WEB_PATH;
?>
/mobile/mobile/userindex/<?php
echo $member['uid'];
?>
" class="z-Himg">
<img src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($member['uid'], 'img');
?>
" border=0/></a>
<p class="u-name"><b class="z-name gray01"><?php
echo get_user_name($member['uid']);
?>
</b><em>(<?php
echo $member['mobile'];
?>
)</em></p>
<span class="z-class-icon01 gray02"><s></s><?php
echo $member['yungoudj'];
?>
</span>
<li style="margin-top: -38px;margin-left: 70px;color:#666;">经验值: <?php
echo $member['jingyan'];
示例7: inform
public static function inform($course, $id)
{
global $DB, $OUTPUT, $USER;
$entry = self::get_one($id);
// No restriction.
// Valid forever.
$value = get_user_key('blocks/clampmail', $USER->id, $course->id);
$url = self::base_url($course->id);
$approval_url = self::base_url($course->id, array('id' => $id, 'action' => self::VERIFY, 'activator' => $USER->id, 'key' => $value));
$a = new stdClass();
$a->address = $entry->address;
$a->url = html_writer::link($approval_url, $approval_url->out());
$a->course = $course->fullname;
$a->fullname = fullname($USER);
$from = clampmail::_s('alternate_from');
$subject = clampmail::_s('alternate_subject');
$html_body = clampmail::_s('alternate_body', $a);
$body = strip_tags($html_body);
// Send email.
$user = clone $USER;
$user->email = $entry->address;
$user->firstname = clampmail::_s('pluginname');
$user->lastname = clampmail::_s('alternate');
$result = email_to_user($user, $from, $subject, $body, $html_body);
// Add to log.
add_to_log($course->id, 'clampmail', 'add', $url->out(), clampmail::_s('alternate') . ' ' . $entry->address);
$html = $OUTPUT->box_start();
if ($result) {
$html .= $OUTPUT->notification(clampmail::_s('entry_saved', $entry), 'notifysuccess');
$html .= html_writer::tag('p', clampmail::_s('entry_success', $entry));
} else {
$html .= $OUTPUT->notification(clampmail::_s('entry_failure', $entry));
}
$html .= $OUTPUT->continue_button($url);
$html .= $OUTPUT->box_end();
return $html;
}
示例8: validate
/**
* Ensure that the parsed data is valid, and if the handler requires address validation, validate the sender against
* the user record of identified user record.
*
* @param string $address The fully formed e-mail address to process.
* @return int The validation status.
*/
protected function validate($address)
{
if (!$this->record) {
// The record does not exist, so there is nothing to validate against.
return self::VALIDATION_INVALID_ADDRESS_FORMAT;
}
// Build the list of validation errors.
$returnvalue = 0;
if (!$this->handler) {
$returnvalue += self::VALIDATION_UNKNOWN_HANDLER;
} else {
if (!$this->handler->enabled) {
$returnvalue += self::VALIDATION_DISABLED_HANDLER;
}
}
if (!isset($this->record->data) || !$this->record->data) {
$returnvalue += self::VALIDATION_UNKNOWN_DATAKEY;
} else {
if ($this->record->data->expires != 0 && $this->record->data->expires < time()) {
$returnvalue += self::VALIDATION_EXPIRED_DATAKEY;
} else {
if (!$this->record->user) {
$returnvalue += self::VALIDATION_UNKNOWN_USER;
} else {
if ($this->record->user->deleted || !$this->record->user->confirmed) {
$returnvalue += self::VALIDATION_DISABLED_USER;
}
$userkey = get_user_key('messageinbound_handler', $this->record->user->id);
$hashvalidation = substr(md5($this->record->data->datakey . $userkey), 0, self::HASHSIZE) == $this->record->datakey;
if (!$hashvalidation) {
// The address data did not check out, so the originator is deemed invalid.
$returnvalue += self::VALIDATION_INVALID_HASH;
}
if ($this->handler->validateaddress) {
// Validation of the sender's e-mail address is also required.
if ($address !== $this->record->user->email) {
// The e-mail address of the originator did not match the
// address held on record for this user.
$returnvalue += self::VALIDATION_ADDRESS_MISMATCH;
}
}
}
}
}
return $returnvalue;
}
示例9: idjia
echo $sd['sd_thumbs'];
?>
"></a></dt>
<dd class="share-name gray02">
<a href="<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($sd['sd_userid']);
?>
" class="name-img">
<img id="imgUserPhoto" src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($sd['sd_userid'], 'img', '3030');
?>
" width="50" height="50" border="0"/>
</a>
<div class="share-name-r">
<span class="gray03"> <a href="<?php
echo WEB_PATH;
?>
/uname/<?php
echo idjia($sd['sd_userid']);
?>
" class="blue"><?php
echo get_user_name($sd['sd_userid'], 'username');
?>
</a><?php
示例10: list
$s3ql['from'] = 'authority';
list($valid, $authorities) = apiQuery($s3ql);
$json_auth = 'authorities=' . json_encode($authorities) . '';
#And the protocols because authroties don't have a protocol value, only an id
$s3ql = array('user_id' => '1', 'db' => $db);
$s3ql['from'] = 'protocol';
list($valid, $protocols) = apiQuery($s3ql);
$json_prot = 'protocols=' . json_encode($protocols) . '';
$newProt = array();
if (is_array($protocols)) {
foreach ($protocols as $prot) {
$newProt[$prot['item_id']] = $prot['label'];
}
}
if (!$key) {
$key = get_user_key($user_id, $db);
}
#now encode the authorities for the javascript that is coming
//
//if(is_array($authorities)){
//foreach ($authorities as $authority) {
// $json_auth_label[] = $authority['DisplayLabel'];
// $json_auth_url[] = $authority['URI'];
// $json_auth_protocol[] = $authority['Protocols'];
// $json_auth_template[] = $authority['Template'];
//}
//$json_auth='authorities='.json_encode($json_auth).'';
//
//}
?>
<body>
示例11: foreach
$ln = 1;
if (is_array($shaidan)) {
foreach ($shaidan as $sd) {
?>
<div class="cSingleInfo">
<dl class="fl"><a href="<?php
echo WEB_PATH;
?>
/mobile/mobile/userindex/<?php
echo $sd['sd_userid'];
?>
"><img src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($sd['sd_userid'], 'img');
?>
"><b></b></a></dl>
<div class="cSingleR m-round" id="<?php
echo $sd['sd_id'];
?>
">
<ul>
<li><em class="blue" uweb="<?php
echo $sd['sd_userid'];
?>
"><?php
echo userid($sd['sd_userid'], 'username');
?>
</em><strong>:</strong><span><?php
echo $sd['sd_title'];
示例12: ini_set
*/
ini_set('display_errors', 0);
if ($_REQUEST['su3d']) {
ini_set('display_errors', 1);
}
if (file_exists('config.inc.php')) {
include 'config.inc.php';
} else {
echo '<meta http-equiv="refresh" content= "0; target="_parent" url="login.php?error=2">';
exit;
}
#Get the key, send it to check validity
$key = $_GET['key'];
include_once 'core.header.php';
if (!$key) {
$key = get_user_key($_SESSION['user']['account_id'], $_SESSION['db']);
}
#$args ='?key='.$_request['key'].'&url='.$_request['url'].'&project_id='.$_request['project_id'].'&resource_id='.$_request['resource_id'];
#include_once 'webActions.php';
echo '<frameset rows="20%,80%" border="2">';
echo '<frame src="' . $action['header'] . '§ion_num=5" name="header">';
#echo '<frame src="'.$action['sparqlform'].'" name="sparqlframes" border="1">';
echo '<frame src="' . $action['sparqlform'] . '&key=' . $key . '" name="sparqlframes" border="1">';
?>
</frameset>
</head>
<body>
</body>
示例13: get_user_key
?>
<ul id="prevPeriod" class="m-round" codeid="<?php
echo $gorecode['shopid'];
?>
" uweb="<?php
echo $gorecode['uid'];
?>
">
<li class="fl"><s></s><img src="<?php
echo G_TEMPLATES_IMAGE;
?>
/mobile/loading.gif" src2="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($itemlist[0]['q_uid'], 'img');
?>
"/></li>
<li class="fr"><b class="z-arrow"></b></li>
<li class="getInfo">
<dd>
<em class="blue"><?php
echo get_user_name($itemlist[0]['q_uid']);
?>
</em>(<?php
echo get_ip($gorecode['id'], 'ipcity');
?>
)
</dd>
<dd>总共云购:<em class="orange arial"><?php
echo $gorecode['gonumber'];
示例14: URIinfo
function URIinfo($uid, $user_id, $key, $db, $timer = array())
{
$uid_info = uid($uid);
$element = $GLOBALS['s3codes'][substr($uid, 0, 1)];
$local_info = s3info($element, ereg_replace('^' . letter($uid), '', $uid), $db);
#echo $uid.'<pre>';print_r($local_info);exit;
if (is_array($local_info) && !empty($local_info)) {
$uid_info['Did'] = $GLOBALS['Did'];
$uid_info['uid'] = $uid;
$element_info = $local_info;
$letter = strtoupper(substr($element, 0, 1));
$info = include_all(compact('elements', 'letter', 'element_info', 'user_id', 'db', 'key', 'timer'));
$info['remote_uri'] = 0;
#echo '<pre>';print_r($info);exit;
}
if ($uid_info['Did'] == $GLOBALS['Did'] || $uid_info['Did'] == S3DB_URI_BASE) {
if (is_array($local_info) && !empty($local_info)) {
$uid = str_replace(S3DB_URI_BASE . '/', '', $uid_info['uid']);
$uid_info['Did'] = $GLOBALS['Did'];
$uid_info['uid'] = $uid;
$element_info = s3info($element, ereg_replace('^' . letter($uid), '', $uid), $db);
$letter = strtoupper(substr($element, 0, 1));
$info = include_all(compact('elements', 'letter', 'element_info', 'user_id', 'db', 'key'));
$info['remote_uri'] = 0;
} else {
$info = false;
}
#echo 'loca'.$uid;exit;
#$info = URI($uid_info['uid'], $user_id, $db);
#$info['remote_uri']=0;
} else {
#echo 'ola'.$uid;exit;
$key = $key != '' ? $key : get_user_key($user_id, $db);
#echo $user_id;exit;
$info = remoteURI($letter . $uid_info['uid'], $key, $user_id, $db);
#echo '<pre>';print_r($info);exit;
$info['remote_uri'] = 1;
if (!is_array($info) || empty($info)) {
$info = URI($uid, $user_id, $db);
}
if (!is_array($info)) {
$info = false;
}
}
#echo '<pre>';print_r($info);exit;
return $info;
}
示例15: foreach
foreach ($cords as $c) {
?>
<ul>
<li class="rBg"><a href="<?php
echo WEB_PATH;
?>
/mobile/mobile/userindex/<?php
echo $c['uid'];
?>
">
<img id="imgUserPhoto" src="<?php
echo G_UPLOAD_PATH;
?>
/<?php
echo get_user_key($c['uid'], 'img');
?>
" border="0"/>
<s></s></a>
</li>
<!-- <li class="rInfo"><a href="<?php
echo WEB_PATH;
?>
/mobile/mobile/userindex/<?php
echo $c['uid'];
?>
"><?php
echo userid($c['uid'], 'username');
?>
</a>
<strong><?php