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; }
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; }
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; }
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; }
/** * */ 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); } }
?> " 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'); ?>
function username() { return user_name(); }
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); }
<?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>
// 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>
function profile_link($user_id) { global $CI; if ($user_id == false) { $user_id = user_id(); } return site_url('userbase/action:profile/username:'******'username')); }
<? 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>
<? 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:'******'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:'******'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; ?>>
?> <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>-->
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>
<? $author = get_user($the_post['created_by']); ?> <div class="post_list"> <a href="<? print site_url('skide/userbase/action:profile/username:'******'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>
<?php // def_return создаёт функцию, которая просто возвращает определённое // значение. def_return('user_name', 'waserd'); echo user_name(); ?> --- waserd
// 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>
<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>
$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:'******'username']); ?> " class="user_photo" style="background-image: url('<?php print $thumb; ?> ')"></a> <a href="<?php print site_url('userbase/action:profile/username:'******'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>
<? if(!empty($comments)) : ?> <div id="post_comments_list"> <? foreach($comments as $item): ?> <div class="post_comment" id="comment-list-id-<? print $item['id'];?>"> <? $author = CI::model('users')->getUserById( $item['created_by']); ?> <? $thumb = CI::model('users')->getUserThumbnail( $author['id'], 70); ?> <a class="img" href="<? print profile_link($author['id']);?>"> <span style="background-image: url('<? print $thumb; ?>');"></span> </a> <div class="post_comment_text"> <? if(!empty($author)): ?> <div class="post_comment_author"><strong><a href="<? print profile_link( $item['created_by']);?>"><? print user_name( $item['created_by']);?> </a></strong> said:</div> <? else: ?> <div class="post_comment_author"><strong>Anonymous</strong> said:</div> <? endif; ?> <p class=""><? print ($item['comment_body']); ?> </p> <? if($item['created_by'] == user_id()): ?> <a href="javascript:mw.comments.del(<? print $item['id'];?>, '#comment-list-id-<? print $item['id'];?>')" class="comment_delete">delete</a> <? endif; ?> </div> <div class="c"> </div> <div class="user_activity_bar"> <div><a class="user_activity_likes" href="<? print voting_link($item['id'], '#post-comments-'.$item['id'], 'comments'); ?>"><strong id="post-comments-<? print ($item['id']); ?>"><? print votes_count($item['id'], false, 'comments'); ?></strong><span></span><strong >Like</strong></a></div> </div> </div>
<?php require_once 'engine/init.php'; include 'layout/overall/header.php'; if ($config['log_ip']) { znote_visitor_insert_detailed_data(3); } $house = getValue($_GET['id']); if ($house !== false && $config['TFSVersion'] === 'TFS_10') { $house = mysql_select_single("SELECT `id`, `owner`, `paid`, `name`, `rent`, `town_id`, `size`, `beds`, `bid`, `bid_end`, `last_bid`, `highest_bidder` FROM `houses` WHERE `id`='{$house}';"); $minbid = $config['houseConfig']['minimumBidSQM'] * $house['size']; if ($house['owner'] > 0) { $house['ownername'] = user_name($house['owner']); } //data_dump($house, false, "Data"); ////////////////////// // Bid on house logic $bid_char =& $_POST['char']; $bid_amount =& $_POST['amount']; if ($bid_amount && $bid_char) { $bid_char = (int) $bid_char; $bid_amount = (int) $bid_amount; $player = mysql_select_single("SELECT `id`, `account_id`, `name`, `level`, `balance` FROM `players` WHERE `id`='{$bid_char}' LIMIT 1;"); // Does player have or need premium? $premstatus = $config['houseConfig']['requirePremium']; if ($premstatus) { $premstatus = mysql_select_single("SELECT `premdays` FROM `accounts` WHERE `id`='" . $player['account_id'] . "' LIMIT 1;"); $premstatus = $premstatus['premdays'] > 0 ? true : false; } else { $premstatus = true; }
<?php global $CFG; // Given a user ID as a parameter, will display a list of communities if (isset($parameter[0])) { $community_id = (int) $parameter[0]; $community_name = user_info('username', $community_id); $community_owner = user_info('owner', $community_id); $result = run('community:members:data', array($community_id)); $i = 1; if (!empty($result)) { foreach ($result as $key => $info) { $link = $CFG->wwwroot . $info->username . "/"; $friends_name = user_name($info->ident); $info->icon = run("icons:get", $info->ident); $friends_icon = user_icon_html($info->ident, COMMUNITY_ICON_SIZE); // $friends_menu = run("users:infobox:menu",array($info->ident)); $functions = array(); if ($community_owner != $info->ident && $community_owner == $_SESSION['userid']) { $msg = "onclick=\"return confirm('" . __gettext("Are you sure you want to separate this user from the community?") . "')\""; $functions[] = "<a href=\"" . $CFG->wwwroot . $community_name . "/community/separate/" . $info->ident . "\" {$msg}>" . __gettext("Separate") . "</a>"; } else { if ($community_owner == $info->ident) { $functions[] = "<b>(" . __gettext("Owner") . ")</b>"; } } $functions = implode("\n", array_map(create_function('$entry', "return \"<li>\$entry</li>\";"), $functions)); $members .= templates_draw(array('context' => 'community_member', 'name' => $friends_name, 'icon' => $friends_icon, 'link' => $link, 'functions' => $functions)); if ($i % COMMUNITY_MEMBERS_PER_ROW == 0) { $members .= "</tr><tr>"; }
<?php // TODO: remove all references to this that aren't a direct reference to the function if (empty($parameter)) { global $profile_id; $profile_id = (int) $profile_id; $user_id = $profile_id; } else { $user_id = (int) $parameter; } $run_result = user_name($user_id);
?> </a> <a href="javascript:mw.delete_single_post('<?php print $item['id']; ?> ');"> <?php _e("Delete"); ?> </a></div> </div> <div class="mw-ui-col manage-post-item-col-4"><span class="manage-post-item-author" title="<?php print user_name($item['created_by']); ?> "><?php print user_name($item['created_by'], 'username'); ?> </span> </div> <div class="mw-ui-col manage-post-item-col-5"> <?php mw()->event_manager->trigger('module.content.manager.item', $item); ?> <?php print $append; ?> </div> </div> <?php }
<?php global $page_owner, $CFG; if (user_type($page_owner) == 'person' && run("permissions:check", array("userdetails:change", $page_owner))) { $info = get_record('users', 'ident', $page_owner); $name = htmlspecialchars(stripslashes(user_name($info->ident)), ENT_COMPAT, 'utf-8'); $lastname = htmlspecialchars(stripslashes($info->lastname), ENT_COMPAT, 'utf-8'); $email = htmlspecialchars(stripslashes($info->email), ENT_COMPAT, 'utf-8'); //$changeName = __gettext("Change your full name:"); // gettext variable //$displayed = __gettext("This name will be displayed throughout the system."); // gettext variable $body = <<<END <form action="index.php" method="post"> <h2> {$changeName} </h2> <p> {$displayed} </p> END; /*$body .= templates_draw(array( 'context' => 'databox', 'name' => __gettext("Your first name "), 'column1' => "<input type=\"text\" name=\"name\" value=\"$name\" />" ) ); $body .= templates_draw(array( 'context' => 'databox',
global $CFG; global $db; // Search criteria are passed in $parameter from run("search:display") $handle = 0; foreach ($data['profile:details'] as $profiletype) { if ($profiletype->internal_name == $parameter[0] && $profiletype->field_type == "keywords") { $handle = 1; } } if ($handle) { $sub_result = ""; $searchline = "tagtype = " . $db->qstr($parameter[0]) . " AND tag = " . $db->qstr($parameter[1]) . ""; $searchline = "(" . run("users:access_level_sql_where", $_SESSION['userid']) . ") and " . $searchline; $searchline = str_replace("owner", "t.owner", $searchline); //$parameter[1] = stripslashes($parameter[1]); if ($result = get_record_sql('SELECT DISTINCT u.* FROM ' . $CFG->prefix . 'tags t JOIN ' . $CFG->prefix . 'users u ON u.ident = t.owner WHERE ' . $searchline)) { foreach ($result as $key => $info) { $icon = user_icon_html($info->ident, 100, true); $sub_result .= "\t\t\t<item>\n"; $sub_result .= "\t\t\t\t<name><![CDATA[" . htmlspecialchars(stripslashes(user_name($info->ident)), ENT_COMPAT, 'utf-8') . "]]></name>\n"; $sub_result .= "\t\t\t\t<link>" . url . htmlspecialchars($info->username, ENT_COMPAT, 'utf-8') . "</link>\n"; $sub_result .= "\t\t\t\t<link>{$icon}</link>\n"; $sub_result .= "\t\t\t</item>\n"; } } if ($sub_result != "") { $run_result .= "\t\t<profiles tagtype=\"" . addslashes(htmlspecialchars($parameter[0], ENT_COMPAT, 'utf-8')) . "\">\n" . $sub_result . "\t\t</profiles>\n"; } }
/** * return the "this is restricted" text for a given access value * functionised to reduce code duplication * * @param string $access access control value * @return string description for output */ function get_access_description($accessvalue) { if ($accessvalue != "PUBLIC") { if ($accessvalue == "LOGGED_IN") { $title = "[" . __gettext("Logged in users") . "] "; } else { if (substr_count($accessvalue, "user") > 0) { $title = "[" . __gettext("Private") . "] "; } else { $title = "[" . __gettext("Restricted") . "] "; if (substr_count($accessvalue, "community") > 0) { $name = user_name(str_replace("community", '', $accessvalue)); $title = '<span title="' . __gettext('Restricted to Community: ') . $name . '">' . $title . '</span>'; } else { if (substr_count($accessvalue, "group") > 0) { $title = '<span title="' . __gettext('Restricted to Group') . '">' . $title . '</span>'; } } } } } else { $title = ""; } return $title; }
<? $author = CI::model('users')->getUserById( $data); ?> <? $thumb = CI::model('users')->getUserThumbnail( $author['id'], 70); ?> <li> <a href="<? print user_link($author['id']); ?>"> <span style="background-image: url('<? print $thumb; ?>');"></span> <strong><? print user_name($author['id']) ; ?></strong> </a> </li>
<?php _e("You are commenting as"); ?> : <?php if (isset($cur_user_data['thumbnail']) and trim($cur_user_data['thumbnail']) != '') { ?> <span class="mw-user-thumb mw-user-thumb-small"> <img style="vertical-align:middle" src="<?php print $cur_user_data['thumbnail']; ?> " height="24" width="24" /> </span> <?php } ?> <span class="comments-user-profile-username"> <?php print user_name($cur_user_data['id']); ?> </span> <small><a href="<?php print api_link('logout'); ?> ">( <?php _e("Logout"); ?> )</a></small> </span> <?php } ?> <div class="row comment-textarea"> <div class="col-sm-12 comment-field"> <textarea required placeholder="<?php