本文整理汇总了PHP中SC::get方法的典型用法代码示例。如果您正苦于以下问题:PHP SC::get方法的具体用法?PHP SC::get怎么用?PHP SC::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SC
的用法示例。
在下文中一共展示了SC::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Execute
*/
function execute(&$observer)
{
// MOD RJH
// Modification Date: 11-18-2004
// Add Tracking for all actions into a single consolidated Admin Log Table
// using Sushi to store data
// TRACKING
// ID (pk), USER ID(ind), IP(ind), datetime, request page, POST/GET
if( preg_match("/^10./",$_SERVER['REMOTE_ADDR']) ) return TRUE;
$GAIALOG = serialize(array($_GET,$_POST));
$dao_logging =& DaoFactory::create('admincpanellog.insert');
$dao_logging->setUserId(SC::get('userdata.user_id'));
$dao_logging->setUsername(SC::get('userdata.username'));
$dao_logging->setUserIp($_SERVER['REMOTE_ADDR']);
$dao_logging->setDatetime(SC::get('board_config.time_now'));
$dao_logging->setRequestFilename($_SERVER['SCRIPT_NAME']);
$dao_logging->setRequestData($GAIALOG);
$rs =& $dao_logging->execute();
if(!$rs->isSuccess())
{
$observer->set('error.message', "Unable to connect to the database, please try again later.");
$observer->set('error.title', 'Database Error');
$observer->set('error.code', GENERAL_ERROR);
$observer->set('error.line', __LINE__);
$observer->set('error.file', __FILE__);
return FALSE;
}
return TRUE;
}
示例2: checkPrivileges
public function checkPrivileges($o)
{
$username=SC::get('userdata.username');
if(in_array($username,array('dev1','dev2'))){
return true;
}
$uid=SC::get('userdata.user_id');
$dao=DaoFactory::create('user/admin');
$dao->select('count(user_id) as count');
$dao->byUserId($uid);
$rs=$dao->execute();
if(!$rs->isSuccess())
{
throw new CircuitDatabaseException('query admin users failed', $rs);
}
$count=$rs->fetchrow(DB_ASSOC);
if($count['count']==0)
{
$message = "This page is not available under the current configuration, or ";
$message .= "you are not authorized to view this page.";
$o->set('error.message', $message);
$o->set('error.code', GENERAL_MESSAGE);
$o->set('error.title', 'Not Authorized');
$o->set('error.line', __LINE__);
$o->set('error.file', __FILE__);
return false;
}
return true;
}
示例3: execute
/** execute
* check the password the user provided against their userdata and set an error if it is not correct
* @param $password
* @return true/false on correct password
**/
function execute($password){
if ($this->encryptPassword($password) != SC::get('userdata.user_password')) {
if( $this->messenger) {
$this->messenger->addMessage("The password you entered does not match our records. Please try again.");
}
$this->set('nopassword', true);
return false;
}
return true;
}
示例4: execute
public function execute( $gold, $messenger = false){
$gold = intval($gold);
if( SC::get("userdata.user_gold") < $gold)
{
if( $messenger)
$messenger->addMessage('You do not have enough gold. <a href="/info/gold">Click here to find out more about getting gold</a>.');
return FALSE;
}
return TRUE;
}
示例5: execute
public function execute(CircuitController $c)
{
//session_pagestart(PAGE_4O4);
switch (SC::get('metered_release.output_style')) {
case 'popup':
$this->set('title', 'Nothing to See Here');
$this->render('Default.MeteredReleaseMin');
break;
default:
LM::setPageTitle('Nothing to See Here');
LM::disableGapi();
LM::renderHeader();
$this->setLayout('Paul McCartney');
$this->addZoneContent('1A', 'Default.MeteredRelease');
$this->renderLayout();
LM::renderFooter();
break;
}
}
示例6: execute
/**
* Execute
*/
function execute( & $observer )
{
if( !SC::get('userdata.session_logged_in') || ! require_level(USERLEVEL_DEVELOPER))
{
$message = "This page is not available under the current configuration, or ";
$message .= "you are not authorized to view this page.";
$observer->set('error.message', $message);
$observer->set('error.code', GENERAL_MESSAGE);
if ( !SC::get('userdata.session_logged_in') )
{
$observer->set('error.title', 'Not Logged In');
}
else
{
$observer->set('error.title', 'Not Authorized');
}
$observer->set('error.line', __LINE__);
$observer->set('error.file', __FILE__);
return FALSE;
}
return TRUE;
}
示例7: execute
function execute(&$observer)
{
$username = $observer->get('default.validation.username');
// length check
if (strlen(trim($username)) > 25) {
$observer->set('error.title', 'Username Error');
$observer->set('error.message', 'Your username must be no more than 25 characters long.');
$observer->set('default.validation.status', 'LONG');
$observer->set('login.request.status', 'LONG');
return FALSE;
}
//get the entire list of disallowed words. In the future we might have
//more specific queries eg. get only swear words, get only NPC, etc.
$filterList = UsernameFilter::filterList(1);
if (count($filterList) <= 0) {
return TRUE;
}
//nothing to filter against lol
// are they logged in -- Jakob
// if so, we don't bother doing the NPC check
// rxes defines the array of regular expressions
$rxes = array();
// MATCH 1. Variants of [NPC] using nonword characters
$delim = "[\\W\\s_]";
// Nonword, whitespace, underscore
$rx = "^(.*?)" . "{$delim} *?" . "[N]" . "{$delim} *?" . "[P]" . "{$delim} *?" . "[C]" . "{$delim} +" . "(.*)";
// match as much as possible to end of string
$rx = "/" . $rx . "/xi";
$rxes[] = $rx;
// MATCH 2, inpci, lnpcl, l_n-p_c and word variants. Much stricter so as not
// to break actual words
$delim = "[il\\|]";
// i, l, pipe
$rx = "^(.*?)" . "{$delim}" . "[\\s\\-_]*" . "n[\\s\\-_]*" . "p[\\s\\-_]*" . "c[\\s\\-_]*" . "{$delim} ?" . "(.*)";
// grab the rest by being greedy
$rx = "/" . $rx . "/xi";
$rxes[] = $rx;
$matched = false;
foreach ($rxes as $rx) {
if (preg_match($rx, $username)) {
$matched = true;
}
}
if ($matched) {
/// name found, logged in?
if (SC::get("userdata.user_level") <= 0) {
$observer->set('error.title', 'Username Error');
$observer->set('error.message', 'Your username is in conflict because it is the name of a NPC (Non-Playable Character). For storyline purposes, we kindly ask you to choose another username. Thank you!');
$observer->set('default.validation.status', 'NPC');
$observer->set('login.request.status', 'NPC');
return FALSE;
}
}
//-------------------------------------------------------------------------------------
//this is pretty ghetto but we don't have a consesus for handling all the names in the database
//so there is some hack-ish stuff going on eg. with checking ElfTech names it is extra
//strict that previous NPC names
//do a case insensitive check against each of the NPC names.
foreach ($filterList['NPC'] as $f) {
//in the future if we want to do other checks like against l33t names we can modify this.
$pattern = "/\\b{$f}\\b/i";
//this is more lenient than below
if ($f == 'ElfTech') {
$pattern = "/.*Elf.*Tech.*/i";
//nothing allowed!!! omg:O
}
$result = preg_match($pattern, $username);
if (!empty($result)) {
$observer->set('error.title', 'Username Error');
$observer->set('error.message', 'Your username is in conflict because it is the name of a NPC (Non-Playable Character). For storyline purposes, we kindly ask you to choose another username. Thank you!');
$observer->set('default.validation.status', 'NPC');
$observer->set('login.request.status', 'NPC');
return FALSE;
}
}
//----------------------------------------------------------------------------------------
//do a case insensitive check against each of the Admin names.
foreach ($filterList['Admin'] as $f) {
//in the future if we want to do other checks like against l33t names we can modify this.
$pattern = "/{$f}/i";
$result = preg_match($pattern, $username);
if (!empty($result)) {
$observer->set('error.title', 'Username Error');
$observer->set('error.message', 'Your username is in conflict with administration names. We kindly ask you to choose another username that will not confuse other user.');
$observer->set('default.validation.status', 'Admin');
$observer->set('login.request.status', 'Admin');
return FALSE;
}
}
//----------------------------------------------------------------------------------------
//do a case insensitive check against each of the Swear names.
foreach ($filterList['Swear'] as $f) {
//in the future if we want to do other checks like against l33t names we can modify this.
$pattern = "/{$f}/i";
$result = preg_match($pattern, $username);
if (!empty($result)) {
$observer->set('error.title', 'Username Error');
$observer->set('error.message', 'Your username is in conflict with PG-13 guidelines! We kindly ask you to choose another username that is more appropriate.');
$observer->set('default.validation.status', 'Swear');
$observer->set('login.request.status', 'Swear');
//.........这里部分代码省略.........
示例8: Locator
$this->set('ad_network', 'doubleclick');
}
try {
// this observer is brought to you by the letter "O"...
$o = $this->controller->getObserver();
// if we even have a request and an id...
$l = new Locator($o);
if ($o->exists('request') && $o->get('request')->exists('id')) {
$forum_id = intval($this->controller->getObserver()->get('request')->get('id'));
unset($o);
} else {
$forum_id = 0;
}
// see if we need to show something here...
if (SC::exists('board_config.ad_display_forums') && strlen(SC::get('board_config.ad_display_forums')) > 0) {
$params = explode(";", SC::get('board_config.ad_display_forums'));
foreach ($params as $id => $param) {
if (empty($param)) {
continue;
}
// throw away empty rows...
$section = substr($param, 0, strpos($param, "("));
// get the main section name...
if ($l->location == $section) {
// if we matched sections, get the sub-section directives, otherwise skip it...
$sub = array();
$matches = ereg('\\([^\\(\\)]*\\)', $param, $sub);
$ad_params = explode(",", str_replace(array('(', ')'), NULL, $sub[0]));
}
}
// process section directives...
示例9: selectView
public function selectView()
{
// load a memcache object
$memcache = MemcacheFactory::construct('query_memcache');
// reduce path to just a dir structure. Remove funny stuff...
// .. //
$invalid_path_items = array('//', '..');
$path = str_replace($invalid_path_items, '', $this->get('path'));
$full_path = DIR_PUBLIC_HTML . $this->base_path . $path;
$extension_stub_pos = strripos($full_path, '.');
$extn = substr($full_path, -1 * (strlen($full_path) - $extension_stub_pos));
$this->outputHeaders($extn, $full_path);
// if we have a key, use it
if (!SC::get('board_config.disable_query_memcache')) {
$output = $memcache->get($this->getKeyFromPath($full_path));
}
if ($output) {
echo '/' . '* cache=true *' . '/' . "\n";
echo $output;
exit;
}
$comments = array('cache=false');
// check for rollup packages
if (strpos($path, 'pkg-') !== false) {
$comments[] = 'pkg=true';
$output = $this->getRollupPackage($path);
}
// only minify in production
// if (!SC::get('board_config.local_domain_enable') && $extn == '.js') {
// $comments[] = 'mini=true';
// $output = JSMin::minify($output);
// }
// store to memcache
if (!SC::get('board_config.disable_query_memcache') && $memcache->add('key' . $this->getKeyFromPath($full_path), 1)) {
$comments[] = 'cachewrite=true';
$memcache->set($this->getKeyFromPath($full_path), $output, MEMCACHE_COMPRESSED, 86400);
}
echo '/' . '* ' . implode(';', $comments) . ' *' . '/' . "\n";
echo $output;
exit;
}
示例10: initializeGapiJS
private function initializeGapiJS()
{
// CONSTANTS
//toolbar board config enable check
//0 = Toolbar completely disabled
//1 = Toolbar enabled for mods/donators only
//2 = Toolbar enabled for everyone
//Freecause Toolbar Frob Generation
//Only generate frob if user is not logged in AND fc_toolbar_level > 0
if (SC::get('board_config.fc_toolbar_level') > 0) {
if (!SC::get('userdata.session_logged_in')) {
require_once DIR_CLASSES . '/gapi/authentication.php';
$auth = new GapiAuthentication();
$frob = session_get('frob');
if (!$frob or session_get('frob_time') + 240 < SC::get('board_config.time_now')) {
$frob = $auth->getFrob(FREECAUSE_API_KEY);
session_set('frob', $frob);
session_set('frob_time', SC::get('board_config.time_now'));
}
self::data()->set('LYT_FROB', $frob);
if (isset($_REQUEST['toolbar_id']) && ctype_digit($_REQUEST['toolbar_id'])) {
self::data()->set('LYT_TOOLBAR_ID', $_REQUEST['toolbar_id']);
}
}
}
}
示例11: array
<?php
include_once DIR_CLASSES . 'user.class.php';
// add in any parameters that are missing...
$default_ad_params = array('ad_network' => 'doubleclick', 'size' => 'leaderboard', 'campaign' => NULL, 'ad_type' => 'rich', 'ad_site' => 'gaia.home', 'ad_zone' => 'home', 'ad_age' => 39, 'ad_gender' => 'm', 'ad_bc_time' => SC::get('board_config.time_now'));
foreach ($default_ad_params as $p_name => $p_value) {
if (!$this->get($p_name)) {
$this->set($p_name, $p_value);
}
}
?>
<!-- START Leaderboard Ad Block -->
<? if (User::isDonator()) : ?>
<div class="leaderboard">
<span style="font-size: 10px" class="accessAid">ADVERTISEMENT</span>
<script type="text/javascript">
var ad_inject = '<?php
echo $this->generateURL('Advertise.Main', array('size' => 'leaderboard'));
?>
';
</script>
<iframe id="ad_inject" src="" scrolling="no" frameborder="0"></iframe>
</div>
<? elseif (SC::get('ads.blue_lithium.show')): ?>
<div class="leaderboard undersized">
<span style="font-size: 10px" class="accessAid">ADVERTISEMENT</span>
<script type="text/javascript">
var ad_inject = 'http://media.adrevolver.com/adrevolver/banner?place=12709&cpy=<?php
echo mt_rand(1, 9999);
示例12: array_key_exists
$products .= "store purchase;{$store_item};{$store_quantity};;event3={$credit_amount}";
}
/**
* this is so that we can get a unique count (by user id) of how many users visit a certain page
* for example: how many user bid in the marketplace (not how many bids)
**/
$pageCount = $omniture && array_key_exists('pageCount', $omniture) ? $omniture['pageCount'] : null;
if ($pageCount && $pageCount == 'user_id') {
if (!empty($events)) {
$events .= ',';
}
$events .= sprintf("event6:{$orig_user_id}%4d%02d%02d", $now['year'], $now['mon'], $now['mday']);
$evar7 = "s.eVar7=\"{$pageName}\";";
}
if ($pageCount && $pageCount == 'pageView') {
$pv_events = SC::get('omniture.pv_events');
foreach (array_keys($pv_events) as $event_id) {
if (!empty($events)) {
$events .= ',';
}
$events .= $event_id;
}
$evar7 = 's.eVar7="' . $pageName . '";';
if (array_key_exists('pageCount_name', $omniture)) {
$evar1_value = $omniture['pageCount_name'];
$evar1 = 's.eVar1="' . $evar1_value . '";';
}
}
if (!empty($events)) {
$events = 's.events="' . $events . '";';
$evars = 's.eVar3="' . $user_id . '";s.eVar4="' . $age . '";s.eVar5="' . $gender . '";s.eVar6="' . $params['reg_date'] . '";';
示例13: if
<? endif; ?>
</div>
<? endif; ?>
<!-- END Penthouse Ad Block -->
<!-- START Wide Skyscraper Ad Block -->
<div class="wskyscraper">
<span style="font-size: 10px" class="accessAid">ADVERTISEMENT</span>
<script type="text/javascript">
/* <![CDATA[ */
<? if (User::isDonator() || $this->get('ad_force_donator')) : ?>
var ad_inject = '<?php
echo $this->generateURL('Advertise.Main', array('size' => 'wskyscraper'));
?>
';
<? elseif (SC::get('ads.blue_lithium.show')) : ?>
var ad_inject = 'http://media.adrevolver.com/adrevolver/banner?place=12706&cpy=<?php
echo mt_rand(1, 9999);
?>
';
<? else : ?>
<? if ($this->get('ad_network') == 'doubleclick') : ?>
var ad_inject = 'http://<?php
echo MAIN_SERVER;
?>
/advertise/doubleclick.php?size=wskyscraper&campaign=<?php
echo $this->get('ad_campaign');
?>
&t=<?php
echo $this->get('ad_type');
?>
示例14: FUNCLIB_metered_release
/**
* Metered Release Function
* Looks at the global site config, and determines if a user is
* eligible to access a particular URL. This is used for metered
* rollouts and page access.
* @return bool
**/
function FUNCLIB_metered_release($key, $incoming_key = NULL)
{
// $val = <<<HEREDOC
// 1 exactuser /community 0
// HEREDOC;
// SC::set('board_config.metered_release', $val);
if ($key == 'http://' . MAIN_SERVER . '/comingsoon' || $key == '/comingsoon' || $key == '/comingsoon/' || $key == 'comingsoon') {
return true;
}
// check for any metered value
$meter = SC::get('board_config.metered_release');
if (!$meter) {
return true;
}
$meters = explode('#', $meter);
foreach ($meters as $meter) {
$meter = trim($meter);
$m_pieces = explode(' ', $meter);
if (!$m_pieces[3]) {
$m_pieces[3] = 0;
}
list($threshold, $method, $regex, $offset) = $m_pieces;
if (!$offset) {
$offset = 0;
}
$regex = str_replace(array('*', '?'), array('.*', '\\?'), $regex);
if (!preg_match('#' . $regex . '#i', $key)) {
continue;
}
switch ($method) {
case 'session':
if ($incoming_key) {
$value = $incoming_key + $offset;
} else {
$data = session_cookie();
$value = hexdec(substr($data[1], 0, 4)) + $offset;
}
return $value % METERED_RELEASE_MIGRATION_SIZE < $threshold ? true : false;
case 'userid':
if ($incoming_key) {
$value = $incoming_key + $offset;
} else {
$data = session_cookie();
$user_id = $data[0];
// anon blocked
if ($user_id <= 0) {
return false;
}
$value = $user_id + $offset;
}
return $value % METERED_RELEASE_MIGRATION_SIZE < $threshold ? true : false;
case 'exactuser':
if ($incoming_key) {
$user_id = $incoming_key;
} else {
$data = session_cookie();
$user_id = $data[0];
}
// anon blocked
if ($user_id <= 0) {
return false;
}
return $user_id == $threshold ? true : false;
}
// unknown method
return false;
}
// didn't get denied
return true;
}
示例15: singleBar
function singleBar( $sb_userdata )
{
$is_mod = require_level(USERLEVEL_SITEASSISTANCE1);
$images =& SC::get('images');
$userdata =& SC::get('userdata');
$board_config =& SC::get('board_config');
# Default indicators
if (empty($use_rows)) {
$use_rows = array("status","profile","housing","journal","pm","store","trade","www","aim","yim","msn","icq");
}
# ON/OFFLINE INDICATOR
# -----------------------------------
# Make the default cutoff for on/off status 10 minutes
if (!isset($online_offline_cutoff)) { $online_offline_cutoff = SC::get('board_config.time_now') - 600; }
# If : user does not allow others to view status and viewer is not a mod and viewer is not in the user's friends list - hidden
$fu = new FriendUtility();
if (isset($user_data['user_allow_viewonline']) && $user_data['user_allow_viewonline']==0 && $is_mod==false && !$fu->isFriend($userdata['user_id']) ) {
$status_bar['status_img'] = '<img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_hidden.gif" height="22" width="72" border="0">';
$status_bar['status'] = 'Hidden';
}
# Elseif : user's last recorded session time is greater than the cutoff time - online
elseif (isset($user_data['user_session_time']) && $user_data['user_session_time'] > $online_offline_cutoff) {
$status_bar['status_img'] = '<img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_online.gif" height="22" width="72" border="0" />';
$status_bar['status'] = 'Online';
}
# Else : fails above conditions - offline
else {
$status_bar['status_img'] = '<img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_offline.gif" height="22" width="72" border="0" />';
$status_bar['status'] = 'Offline';
}
# -----------------------------------
# PROFILE
# -----------------------------------
if (isset($user_data['user_id'])) { $user_id = $user_data['user_id']; } else { $user_id = ''; }
if (isset($user_data['username'])) { $user_name = $user_data['username']; } else { $user_name = ''; }
$temp_url = append_sid("/profile/index.php?view=profile.ShowProfile&item=" . $user_id);
$status_bar['profile_img'] = '<a href="' . $temp_url . '"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_profile_2.gif" alt="View '.addslashes($user_name).'\'s Profile" title="View '.addslashes($user_name).'\'s Profile" border="0" /></a>';
$status_bar['profile'] = '<a href="' . $temp_url . '">' . "Profile" . '</a>';
# -----------------------------------
# HOUSING
# -----------------------------------
//$daoGH =& DaoFactory::create('gaiahousing.detailById');
//$userHouseDetails =& $daoGH->fetch($user_data['user_id']);
if (isset($user_data['user_home'])) { $user_home = $user_data['user_home']; } else { $user_home = 0; }
if ($user_home==1) {
$temp_url = append_sid("/games/housing/index.php?mode=viewer&" . POST_USERS_URL . "=".$user_id);
$status_bar['housing_img'] = '<a href="' . $temp_url . '"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_housing_2.gif" alt="View '.addslashes($user_name).'\'s Home" title="View '.$user_name.'\'s Home" border="0" /></a>';
$status_bar['housing'] = '<a href="' . $temp_url . '">' . "My Home" . '</a>';
}
# -----------------------------------
# JOURNAL
# -----------------------------------
if (isset($user_data['user_journal_id'])) { $user_journal_id = $user_data['user_journal_id']; } else { $user_journal_id = 0; }
$temp_url = append_sid("/journal/?u=" . $user_id);
$status_bar['journal_img'] = ($user_journal_id!=0) ? '<a href="' . $temp_url . '"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_journal_2.gif" alt="Read '.addslashes($user_name).'\'s Journal" title="Read '.addslashes($user_name).'\'s Journal" border="0" /></a>' : '';
$status_bar['journal'] = ($user_journal_id!=0) ? '<a href="$temp_url">Journal</a>' : '';
# -----------------------------------
# PM
# -----------------------------------
if (isset($user_data['user_receive_pm'])) { $user_receive_pm = $user_data['user_receive_pm']; } else { $user_receive_pm = 0; }
$temp_url = append_sid("/profile/privmsg.php?mode=post&" . POST_USERS_URL . "=".$user_id);
$status_bar['pm_img']
= ($user_receive_pm != 0)
? '<a href="'.$temp_url.'"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_pm_2.gif" alt="Send '.addslashes($user_name).' a PM" title="Send '.addslashes($user_name). ' a PM" border="0" /></a>' : '';
$status_bar['pm'] = ($user_receive_pm!=0) ? '<a href="$temp_url">PrivateMsg</a>' : '';
# -----------------------------------
# EMAIL
# -----------------------------------
if (isset($user_data['user_viewemail'])) { $user_viewmail = $user_data['user_viewemail']; } else { $user_viewmail = 0; }
if (isset($user_data['user_email'])) { $user_email = $user_data['user_email']; } else { $user_email = NULL; }
if (! isset($poster_id)) { $poster_id = NULL; }
if ( !empty($user_viewmail) || $is_mod==true ) {
$temp_url = ( $board_config['board_email_form'] ) ? append_sid("/profile/profile.php?mode=email&" . POST_USERS_URL .'=' . $poster_id) : 'mailto:' . htmlspecialchars($user_email);
$status_bar['email_img'] = '<a href="' . $temp_url . '"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_email_2.gif" alt="Send '.addslashes($user_name).'\ an Email" title="Send '.addslashes($user_name).'\ an Email" border="0" /></a>';
$status_bar['email'] = '<a href="$temp_url">Email</a>';
}
else {
$status_bar['email_img'] = '';
$status_bar['email'] = '';
}
# -----------------------------------
# STORE (VEND)
# -----------------------------------
if (isset($user_data['user_vend'])) { $user_vend = $user_data['user_vend']; } else { $user_vend = 0; }
$temp_url = append_sid('http://'.VEND_SERVER."/gaia/vend.php?mystore=" . $user_id);
$status_bar['store_img'] = ( $user_vend ) ? '<a href="' . $temp_url . '"><img src="http://' . GRAPHICS_SERVER . '/images/template/icons/icon_mystore_2.gif" alt="'.addslashes($user_name).'\'s store has '.$user_vend.' item(s)" title="'.addslashes($user_name).'\'s store has '.$user_vend.' item(s)" border="0" /></a>' : '';
$status_bar['store'] = ( $user_vend ) ? '<a href="' . $temp_url . '">'."Store".'</a>' : '';
//.........这里部分代码省略.........