本文整理汇总了PHP中user_name函数的典型用法代码示例。如果您正苦于以下问题:PHP user_name函数的具体用法?PHP user_name怎么用?PHP user_name使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了user_name函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: set_defaults
function set_defaults($record = NULL)
{
$data['mode'] = '';
$data['message'] = '';
$data = data_table($this->table_name, $record);
if ($record == NULL) {
$data['app_id'] = $this->nomor_bukti();
}
$data['score'] = '';
$data['cust_name'] = '';
$data['counter_name'] = '';
$data['loan_id'] = '';
if ($record == NULL) {
$data['app_date'] = date("Y-m-d");
$data['create_date'] = date("Y-m-d");
$data['create_by'] = user_id();
}
$data['username'] = user_name();
if (!$record == NULL) {
if ($query = $this->db->select('cust_name')->where('cust_id', $data['cust_id'])->get('ls_cust_master')) {
if ($query->row()) {
$data['cust_name'] = $query->row()->cust_name;
}
}
if ($query = $this->db->select('counter_name')->where('counter_id', $data['counter_id'])->get('ls_counter')) {
if ($query->row()) {
$data['counter_name'] = $query->row()->counter_name;
}
}
} else {
$data['cust_name'] = '';
$data['counter_name'] = '';
}
return $data;
}
开发者ID:AlvaCorp,项目名称:maxon,代码行数:35,代码来源:app_master.php
示例2: get
static function get($params)
{
$params2 = array();
if (is_string($params)) {
$params = parse_str($params, $params2);
$params = $params2;
}
if (isset($params['content_id'])) {
$params['rel_type'] = 'content';
$params['rel_id'] = mw()->database_manager->escape_string($params['content_id']);
}
$table = MODULE_DB_COMMENTS;
$params['table'] = $table;
$comments = db_get($params);
if (is_array($comments)) {
$i = 0;
foreach ($comments as $item) {
if (isset($item['created_by']) and intval($item['created_by']) > 0 and ($item['comment_name'] == false or $item['comment_name'] == '')) {
$comments[$i]['comment_name'] = user_name($item['created_by']);
}
$i++;
}
}
return $comments;
}
开发者ID:hyrmedia,项目名称:microweber,代码行数:25,代码来源:Api.php
示例3: fetchLatestDeaths_03
function fetchLatestDeaths_03($rowz = 30, $killers = false)
{
$countz = 0;
if ($rowz === false || $killers === true) {
$getdeaths = mysql_select_multi("SELECT * FROM player_deaths ORDER BY date DESC;");
} else {
$getdeaths = mysql_select_multi("SELECT * FROM `player_deaths` ORDER BY `date` DESC LIMIT 0, {$rowz};");
}
$data = false;
//while ($showdeaths = mysql_fetch_assoc($getdeaths)) {
if ($getdeaths !== false) {
for ($i = 0; $i < count($getdeaths); $i++) {
$pid = $getdeaths[$i]['player_id'];
$level = $getdeaths[$i]['level'];
$kid = user_get_kid($getdeaths[$i]['id']);
$killedby = user_name(user_get_killer_id($kid));
if ($killedby == false) {
$killedby = user_get_killer_m_name($kid);
$player = 0;
} else {
$player = 1;
}
if ($killedby === false) {
$player = 2;
$killedby = "Deleted player.";
}
$getname = mysql_select_single("SELECT `name` FROM `players` WHERE `id` = '{$pid}' LIMIT 1;");
$name = $getname['name'];
$row = array();
$row['level'] = $level;
$row['victim'] = $name;
$row['time'] = $getdeaths[$i]['date'];
$row['is_player'] = $player;
$row['killed_by'] = $killedby;
if ($killers) {
if ($player == 1) {
if ($rowz !== false) {
if ($countz < $rowz) {
$data[] = $row;
$countz++;
}
} else {
$data[] = $row;
}
}
} else {
$data[] = $row;
}
}
}
return $data;
}
开发者ID:niemoralny,项目名称:ZnoteAAC,代码行数:52,代码来源:users.php
示例4: set_defaults
function set_defaults($record = NULL)
{
$data = data_table($this->table_name, $record);
$data['mode'] = '';
$data['message'] = '';
$data['gender'] = '';
$data['birth_place'] = '';
$data['birth_date'] = '';
$data['marital_status'] = '';
$data['no_of_dependents'] = '';
$data['house_status'] = '';
// $data['lama_thn']='';
$data['salary'] = '0';
$data['spouse_salary'] = '0';
$data['other_income'] = '0';
$data['salary_source'] = '';
$data['spouse_salary_source'] = '';
$data['other_income_source'] = '';
$data['comp_name'] = '';
$data['comp_desc'] = '';
$data['job_status'] = '';
$data['com_kec'] = '';
$data['job_status_etc'] = '';
$data['emp_status'] = '';
$data['bussiness_type'] = '';
$data['emp_status_etc'] = '';
$data['since_year'] = '';
$data['com_city'] = '';
$data['job_level'] = '';
$data['com_zip_pos'] = '';
$data['job_type'] = '';
$data['total_employee'] = '';
$data['job_type_etc'] = '';
$data['com_contact_phone'] = '';
$data['com_street'] = '';
$data['office_status'] = '';
$data['com_rtrw'] = '';
$data['office_status_etc'] = '';
$data['com_kel'] = '';
$data['phone_ext'] = '';
$data['spv_name'] = '';
$data['hrd_name'] = '';
if ($record == NULL) {
$data['create_date'] = date("Y-m-d");
$data['create_by'] = user_id();
}
$data['username'] = user_name();
return $data;
}
开发者ID:AlvaCorp,项目名称:maxon,代码行数:49,代码来源:cust_master.php
示例5: User
/**
*
*/
function User($var)
{
global $CFG;
$this->exists = false;
// Both username or userid may be passed
if (is_numeric($var)) {
// Numeric, we probably received a userid
$info = get_record('users', 'ident', $var);
} elseif (is_string($var)) {
// String, we probably recieved a username
$info = get_record('users', 'username', $var);
}
if (!empty($info)) {
$this->exists = true;
$this->ident = $info->ident;
$this->username = $info->username;
$this->email = $info->email;
$this->name = user_name($info->ident);
$this->alias = $info->alias;
$this->code = $info->code;
$this->icon_quota = $info->icon_quota;
$this->file_quota = $info->file_quota;
$this->user_type = $info->user_type;
$this->owner = $info->owner;
ereg('^([a-zA-Z]*) (.*)', $this->name, $groups);
$this->firstname = trim($groups[1]);
$this->lastname = trim($groups[2]);
// Load the weblog id's, starting with communities
// Need to select two fields to collect instead of just u.ident else
// this very handy datalib function will return false...
$communities = get_records_sql('SELECT DISTINCT u.ident,u.name
FROM ' . $CFG->prefix . 'friends f
JOIN ' . $CFG->prefix . 'users u
ON u.ident = f.friend
WHERE f.owner = ?
AND u.user_type = ?', array($this->ident, 'community'));
$this->blogs = array();
// Add the own weblog id (is same as user id)
$this->blogs[] = $this->ident;
// Add the communities
if ($communities) {
foreach ($communities as $community) {
$this->blogs[] = $community->ident;
}
}
$this->icon = user_icon_html($info->ident, 100, true);
}
}
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:51,代码来源:class_user.php
示例6: _e
?>
" alt="Logo"> <span class="mw-sign-version">v. <?php
print MW_VERSION;
?>
</span> </a>
<div class="mw-ui-box">
<div class="mw-ui-box-content" id="admin_login">
<?php
if ($user != false) {
?>
<div>
<?php
_e("Welcome");
?>
<?php
print user_name();
?>
</div>
<a href="<?php
print site_url();
?>
">
<?php
_e("Go to");
?>
<?php
print site_url();
?>
</a> <a href="<?php
print api_link('logout');
?>
开发者ID:microweber,项目名称:microweber,代码行数:31,代码来源:admin.php
示例7: username
function username()
{
return user_name();
}
开发者ID:yukisky,项目名称:clipbucket,代码行数:4,代码来源:functions_users.php
示例8: view_spk
function view_spk($app_id)
{
$data['app_id'] = $app_id;
if ($q = $this->db->where("app_id", $app_id)->get("ls_app_master")) {
$app = $q->row();
}
$this->load->model("leasing/cust_master_model");
$model = $this->cust_master_model->get_by_id($app->cust_id)->row();
$data = $this->set_defaults($model, "ls_cust_master");
// field cust_master yg sama dengan company
$field_sama['street'] = $data['street'];
$field_sama['city'] = $data['city'];
$field_sama['kel'] = $data['kel'];
$field_sama['kec'] = $data['kec'];
$field_sama['rtrw'] = $data['rtrw'];
$field_sama['zip_pos'] = $data['zip_pos'];
$data = array_merge($data, $this->cust_master_model->personal(), $this->cust_master_model->company());
// benerin field_sama
$data['com_street'] = $data['street'];
$data['com_city'] = $data['city'];
$data['com_kel'] = $data['kel'];
$data['com_kec'] = $data['kec'];
$data['com_rtrw'] = $data['rtrw'];
$data['com_zip_pos'] = $data['zip_pos'];
$data['com_contact_phone'] = $data['contact_phone'];
// kembalikan
$data['street'] = $field_sama['street'];
$data['city'] = $field_sama['city'];
$data['kel'] = $field_sama['kel'];
$data['kec'] = $field_sama['kec'];
$data['rtrw'] = $field_sama['rtrw'];
$data['zip_pos'] = $field_sama['zip_pos'];
$data['mode'] = 'view';
$data['app'] = $app;
$data['app_id'] = $app_id;
$data['username'] = user_name();
$this->template->display("leasing/approve_form", $data);
}
开发者ID:AlvaCorp,项目名称:maxon,代码行数:38,代码来源:approve.php
示例9: user_id_from_url
<?php
require ACTIVE_TEMPLATE_DIR . 'dashboard/dashboard_top_nav.php';
?>
<div id="wall">
<? $dashboard_user = user_id_from_url();
?>
<? if($dashboard_user != $user_id) : ?>
<? $is_friend = CI::model('users')->realtionsCheckIfUserIsConfirmedFriendWithUser($user_id, $dashboard_user, $is_special = false); ?>
<? if($is_friend == true): ?>
<microweber module="users/profile_view" user_id="<? print $dashboard_user ?>"></microweber>
<? else: ?>
<h3>You must be friend with <? print user_name($dashboard_user) ?> in order to view the contact info.</h3>
<? endif; ?>
<? else: ?>
<microweber module="users/profile"></microweber>
<? endif; ?>
</div>
开发者ID:Gninety,项目名称:Microweber,代码行数:27,代码来源:profile-view.php
示例10: dirname
// Run includes
require_once dirname(dirname(__FILE__)) . "/../includes.php";
run("profile:init");
run("friends:init");
run("files:init");
global $profile_id;
global $individual;
global $page_owner;
$individual = 1;
$sitename = htmlspecialchars(sitename, ENT_COMPAT, 'utf-8');
$tag = trim(optional_param('tag'));
$output = "";
if (isset($profile_id)) {
$rssfiles = sprintf(__gettext("Files tagged with %s"), $tag);
if ($info = get_record('users', 'ident', $page_owner)) {
$name = stripslashes(user_name($info->ident));
$mainurl = $CFG->wwwroot . $info->username . "/files/";
$rssurl = $mainurl . "rss/" . urlencode($tag);
$rssdescription = sprintf(__gettext("Files for %s, hosted on %s."), $name, $sitename);
$output .= <<<END
<?xml-stylesheet type="text/xsl" href="{$rssurl}/rssstyles.xsl"?>
<rss version='2.0' xmlns:dc='http://purl.org/dc/elements/1.1/'>
<channel xml:base='{$mainurl}'>
<title><![CDATA[{$name} : {$rssfiles}]]></title>
<description><![CDATA[{$rssdescription}]]></description>
<link>{$mainurl}</link>
END;
$output .= run("files:rss:getitems", array($page_owner, 10, $tag));
$output .= <<<END
</channel>
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:31,代码来源:rss2.php
示例11: profile_link
function profile_link($user_id)
{
global $CI;
if ($user_id == false) {
$user_id = user_id();
}
return site_url('userbase/action:profile/username:' . user_name($user_id, 'username'));
}
开发者ID:Gninety,项目名称:Microweber,代码行数:8,代码来源:users.php
示例12: if
<? if($user_id == false){
$user_id = user_id();
}
?>
<? $form_values = get_user($user_id); ?>
<div class="c" style="padding-bottom: 4px"> </div>
<a href="<? print profile_link($user_id) ?>" class="user_photo left" style="background-image:url(<? print user_thumbnail($user_id, 90); ?>);margin-right: 10px"></a>
<p style="padding-bottom: 5px"> Name :
<a class="" href="<? print profile_link($user_id) ?>"><? print user_name($user_id) ?></a></p>
<? ($res['custom_fields']['country'])? print $res['custom_fields']['country'].', ':false; ?> <? ($res['custom_fields']['city'])? print $res['custom_fields']['city'].'':false; ?>
<a href="javascript:mw.users.UserMessage.compose(<?php
echo $user_id;
?>
);" class="btn" title="Send new message"><span>Send a message</span></a>
开发者ID:Gninety,项目名称:Microweber,代码行数:30,代码来源:profile_box.php
示例13: site_url
<? endif; ?>
</div>
<? endif ?>
<<?php print $wrap_element_items; ?> class="<?php print $wrap_element_items_class; ?>" >
<a href="<?php print site_url('userbase/action:profile/username:'.$user['username']) ?>" class="img" style="background-image: url(<? print user_thumbnail($user['id'], 70) ?>)" > </a>
<p><a href="<?php print site_url('userbase/action:profile/username:'.$user['username']) ?>"><strong><? print user_name($item['id']); ?></strong></a> <a href="javascript:mw.users.UserMessage.compose(<?php echo $user['id']; ?>);" class="send_msg" style="margin:0" title="Send new message to <?php echo $user['first_name']; ?>"></a><br />
</p>
<div class="c"></div><br />
</<?php print $wrap_element_items; ?>>
<? endforeach; ?>
</<?php print $wrap_element; ?>>
开发者ID:Gninety,项目名称:Microweber,代码行数:27,代码来源:list.php
示例14: if
?>
<h2>Payment history</h2>
<br />
<? if(!empty($ord)): ?>
<? foreach($ord as $item): ?>
<div class="bluebox">
<div class="blueboxcontent">
<div class="richtext">
<p>You paid <strong>$<? print floatval($item['amount']); ?></strong> on <? print ($item['created_on']); ?></p>
<?php
switch ($item['to_table']) {
case 'table_users':
?>
<? $user_paid_for = get_user($item['to_table_id']); ?>
<p>for the account of <? print user_name($item['to_table_id']); ?></p>
<?php
break;
?>
<?php
default:
?>
<? print $item['to_table'] ?>, <? print $item['to_table_id'] ?>
<?php
break;
?>
<?php
}
?>
<!-- <p>Your account will expire on 12.12.2012.</p>-->
开发者ID:Gninety,项目名称:Microweber,代码行数:31,代码来源:user_order_history.php
示例15: print
if($expires < $expires2) :?>
<h3 class="user_sidebar_title">Account status</h3>
<div class="richtext"> <br />
<span class="red">Your account will expire on <? print ($usr_data['expires_on']) ?></span><br />
<br />
<a href="<? print site_url('dashboard/action:extend-account/ns:true') ?>" class="mw_btn_x_orange left"><span>Extend Account</span></a> <br />
<br />
</div>
<? endif; ?>
<? endif; ?>
<? endif; ?>
<h3 class="user_sidebar_title">Information about Me</h3>
<div class="richtext">
<p> Name<br />
<strong><? print user_name($dashboard_user); ?></strong> </p>
<? if($user_info['bday'] and $user_info['bmonth'] and $user_info['byear']): ?>
<p> Date of birthday<br />
<strong><? print $user_info['bday'] ?>/<? print $user_info['bmonth'] ?>/<? print $user_info['byear'] ?></strong> </p>
<? endif; ?>
<? if($user_info['country']): ?>
<p> Country<br />
<strong><? print $user_info['country'] ?></strong> </p>
<? endif; ?>
<? if($user_info['city']): ?>
<p> City<br />
<strong><? print $user_info['city'] ?></strong> </p>
<? endif; ?>
</div>
<? if($user_info['about']): ?>
<h3 class="user_sidebar_title">About me</h3>
开发者ID:Gninety,项目名称:Microweber,代码行数:30,代码来源:dashboard_sidebar.php
示例16: get_user
<? $author = get_user($the_post['created_by']); ?>
<div class="post_list">
<a href="<? print site_url('skide/userbase/action:profile/username:').user_name($the_post['created_by'], 'username'); ?>" class="user_photo left" style="margin-right: 7px;background-image: url('<? print user_thumbnail( $the_post['created_by'], 50) ?>')"></a>
<div class="post_list_content"> <span class=""><? print user_name($the_post['created_by']); ?></span><br />
<span class="question_text"><? print $the_post['content_title']; ?></span> <a href="javascript:add_edit_question('<? print $the_post['id'] ?>');" class="mw_btn_x reply_btn"><span><strong>Edit</strong></span></a> <a class="user_activity_comments right" href="<? print post_link($the_post['id']); ?>"><strong id="post-likes-<? print ($the_post['id']); ?>"><? print comments_count($the_post['id']); ?></strong><span></span></a> </div>
<div class="c"> </div>
</div>
开发者ID:Gninety,项目名称:Microweber,代码行数:11,代码来源:questions_and_answers_admin.php
示例17: def_return
<?php
// def_return создаёт функцию, которая просто возвращает определённое
// значение.
def_return('user_name', 'waserd');
echo user_name();
?>
---
waserd
开发者ID:najomi,项目名称:najomi.org,代码行数:9,代码来源:def_return.php
示例18: dirname
// ELGG community details
// Run includes
require_once dirname(dirname(__FILE__)) . '/includes.php';
require_once $CFG->dirroot . 'profile/profile.class.php';
$profile_name = optional_param('profile_name', '', PARAM_ALPHANUM);
if (!empty($profile_name)) {
$profile_id = user_info_username('ident', $profile_name);
}
if (empty($profile_id)) {
$profile_id = optional_param('profile_id', -1, PARAM_INT);
}
$page_owner = $profile_id;
//Show the details
$community = get_record('users', 'ident', $page_owner);
$community_name = htmlspecialchars(stripslashes(user_name($community->ident)), ENT_COMPAT, 'utf-8');
$community_owner = get_record('users', 'ident', $community->owner);
$community_nameowner = htmlspecialchars(stripslashes($community_owner->name . " " . $community_owner->lastname), ENT_COMPAT, 'utf-8');
$community_details = get_record('community_details', 'owner', $page_owner);
$community_description = htmlspecialchars(stripslashes($community_details->description), ENT_COMPAT, 'utf-8');
$community_email = htmlspecialchars(stripslashes($community_details->email), ENT_COMPAT, 'utf-8');
$community_city = htmlspecialchars(stripslashes($community_details->city), ENT_COMPAT, 'utf-8');
$community_name_title = __gettext("Community Name");
$community_owner_title = __gettext("Owner");
$community_description_title = __gettext("Description");
$community_email_title = __gettext("Email");
$community_city_title = __gettext("City");
$run_result = <<<END
<h2>{$community_name_title}</h2>
<p>
开发者ID:BackupTheBerlios,项目名称:tulipan-svn,代码行数:30,代码来源:community_showdetails.php
示例19: if
<div id="wall">
<? if($dashboard_user == user_id()) : ?>
<a href="#" class="mw_btn_s right" onclick="add_edit_toy(0)"><span>Add new toy</span></a>
<h2>My toys</h2>
<? else: ?>
<h2><? print user_name($dashboard_user); ?>'s toys for sale</h2>
<? endif; ?>
<br />
<div id="post_dash" style="display: none">
</div>
<div class="c"> </div>
<br />
<microweber module="posts/list" category="6" limit="500" display="posts_list_toys" created_by="<? print $dashboard_user; ?>" no_results_text="<? print user_name($dashboard_user); ?> doesn't have any toys for sale"></microweber>
</div>
开发者ID:Gninety,项目名称:Microweber,代码行数:25,代码来源:toys.php
示例20: get_log_item
$log_check = get_log_item($data['id']);
if(!empty($log_check )): ?>
<li <? print $addtinal_style ?> id="log_item_<? print $log_check['id'] ?>"> <a href="<?php
print site_url('userbase/action:profile/username:' . $author['username']);
?>
" class="user_photo" style="background-image: url('<?php
print $thumb;
?>
')"></a> <a href="<?php
print site_url('userbase/action:profile/username:' . $author['username']);
?>
" class="mw_blue_link"><? print user_name($author['id']); ?></a>
<? get_dashboard_action($data['id']); ?>
<div class="user_activity_bar">
<date><?php
print ago($log_check['created_on']);
?>
<? if($log_check['created_by'] == user_id()): ?>
<a class="comment_delete" href="javascript:mw.users.log_delete(<? print $log_check['id'] ?>, '#log_item_<? print $log_check['id'] ?>');">delete</a>
<? endif; ?>
</date>
开发者ID:Gninety,项目名称:Microweber,代码行数:30,代码来源:index_item.php
注:本文中的user_name函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论