本文整理汇总了PHP中ckrealname函数的典型用法代码示例。如果您正苦于以下问题:PHP ckrealname函数的具体用法?PHP ckrealname怎么用?PHP ckrealname使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ckrealname函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: empty
$op = empty($_GET['op']) ? '' : $_GET['op'];
$poll = array();
$_SCONFIG['maxreward'] = $_SCONFIG['maxreward'] < 2 ? 10 : $_SCONFIG['maxreward'];
if ($pid) {
$query = $_SGLOBAL['db']->query("SELECT pf.*, p.* FROM " . tname('poll') . " p \n\t\tLEFT JOIN " . tname('pollfield') . " pf ON pf.pid=p.pid \n\t\tWHERE p.pid='{$pid}'");
$poll = $_SGLOBAL['db']->fetch_array($query);
realname_set($poll['uid'], $poll['username']);
}
//Check permission
if (empty($poll)) {
if (!checkperm('allowpoll')) {
ckspacelog();
showmessage('no_authority_to_add_poll');
}
// Real-name authentication
ckrealname('poll');
// Video Authentication
ckvideophoto('poll');
//New User
cknewuser();
//Determine whether published too fast
$waittime = interval_check('post');
if ($waittime > 0) {
showmessage('operating_too_fast', '', 1, array($waittime));
}
} else {
if (!in_array($op, array('vote', 'get', 'invite')) && $_SGLOBAL['supe_uid'] != $poll['uid'] && !checkperm('managepoll')) {
showmessage('no_authority_operation_of_the_poll');
}
}
include_once S_ROOT . './source/function_bbcode.php';
示例2: ckspacelog
ckspacelog();
showmessage('you_do_not_have_permission_to_visit');
}
if (empty($_SCONFIG['my_status'])) {
showmessage('no_privilege_my_status');
}
if ($appid == '1036584') {
//视频认证
} else {
//验证是否有权限玩应用
if (!checkperm('allowmyop')) {
showmessage('no_privilege');
}
//实名认证
include_once S_ROOT . './source/function_cp.php';
ckrealname('userapp');
//视频认证
ckvideophoto('userapp');
//更新状态
updatetable('session', array('lastactivity' => $_SGLOBAL['timestamp']), array('uid' => $_SGLOBAL['supe_uid']));
}
$app = array();
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('myapp') . " WHERE appid='{$appid}' LIMIT 1");
if ($app = $_SGLOBAL['db']->fetch_array($query)) {
if ($app['flag'] < 0) {
showmessage('no_privilege_myapp');
}
}
//漫游
$my_appId = $appid;
$my_suffix = base64_decode(urldecode($_GET['my_suffix']));
示例3: video_save
function video_save($FILE, $title, $desc, $tovideoid = 0, $albumid)
{
global $_SGLOBAL, $_SCONFIG, $space, $_SC;
//允许上传类型
$allowpictype = array('flv');
//检查
$FILE['size'] = intval($FILE['size']);
if (empty($FILE['size']) || empty($FILE['tmp_name']) || !empty($FILE['error'])) {
return cplang('lack_of_access_to_upload_file_size');
}
//判断后缀
$fileext = fileext($FILE['name']);
if (!in_array($fileext, $allowpictype)) {
return cplang('only_allows_upload_file_types');
}
//获取目录
if (!($filepath = getfilepath($fileext, true))) {
return cplang('unable_to_create_upload_directory_server');
}
//检查空间大小
if (empty($space)) {
$space = getspace($_SGLOBAL['supe_uid']);
}
//用户组
if (!checkperm('allowupload')) {
ckspacelog();
return cplang('inadequate_capacity_space');
}
//实名认证
if (!ckrealname('album', 1)) {
return cplang('inadequate_capacity_space');
}
//视频认证
if (!ckvideophoto('album', array(), 1)) {
return cplang('inadequate_capacity_space');
}
//新用户见习
if (!cknewuser(1)) {
return cplang('inadequate_capacity_space');
}
$maxattachsize = checkperm('maxattachsize');
//单位MB
if ($maxattachsize) {
//0为不限制
if ($space['attachsize'] + $FILE['size'] > $maxattachsize + $space['addsize']) {
return cplang('inadequate_capacity_space');
}
}
if ($albumid < 0) {
$albumid = 0;
}
$showtip = true;
$albumfriend = 0;
if ($albumid) {
preg_match("/^new\\:(.+)\$/i", $albumid, $matchs);
if (!empty($matchs[1])) {
$albumname = shtmlspecialchars(trim($matchs[1]));
if (empty($albumname)) {
$albumname = sgmdate('Ymd');
}
$albumid = album_creat(array('albumname' => $albumname));
} else {
$albumid = intval($albumid);
if ($albumid) {
$query = $_SGLOBAL['db']->query("SELECT albumname,friend FROM " . tname('album') . " WHERE albumid='{$albumid}' AND uid='{$_SGLOBAL['supe_uid']}'");
if ($value = $_SGLOBAL['db']->fetch_array($query)) {
$albumname = addslashes($value['albumname']);
$albumfriend = $value['friend'];
} else {
$albumname = sgmdate('Ymd');
$albumid = album_creat(array('albumname' => $albumname));
}
}
}
} else {
$albumid = 0;
$showtip = false;
}
//本地上传
$new_name = $_SC['attachdir'] . './' . $filepath;
$tmp_name = $FILE['tmp_name'];
if (@copy($tmp_name, $new_name)) {
@unlink($tmp_name);
} elseif (function_exists('move_uploaded_file') && @move_uploaded_file($tmp_name, $new_name)) {
} elseif (@rename($tmp_name, $new_name)) {
} else {
return cplang('mobile_picture_temporary_failure');
}
//入库
$setarr = array('albumid' => $albumid, 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'dateline' => $_SGLOBAL['timestamp'], 'postip' => getonlineip(), 'filename' => addslashes($FILE['name']), 'title' => $title, 'desc' => $desc, 'size' => $FILE['size'], 'filepath' => $filepath);
$setarr['id'] = inserttable('video', $setarr, 1);
$setsql = '';
if ($showtip) {
$reward = getreward('uploadimage', 0);
if ($reward['credit']) {
$setsql = ",credit=credit+{$reward['credit']}";
}
if ($reward['experience']) {
$setsql .= ",experience=experience+{$reward['experience']}";
}
//.........这里部分代码省略.........
示例4: tname
$query = $_SGLOBAL['db']->query("SELECT uid FROM " . tname('space') . " WHERE groupid IN (" . simplode($groups) . ") LIMIT 0 , 5");
while ($value = $_SGLOBAL['db']->fetch_array($query)) {
$notearr[] = array('uid' => $value['uid'], 'type' => 'mtag', 'new' => 1, 'authorid' => $_SGLOBAL['supe_uid'], 'author' => $_SGLOBAL['supe_username'], 'note' => addslashes(sstripslashes($message)), 'dateline' => $_SGLOBAL['timestamp']);
}
}
}
note_apply($notearr);
showmessage('do_success');
}
} else {
//创建新群组
if (!checkperm('allowmtag')) {
showmessage('no_privilege');
}
//实名认证
ckrealname('share');
//新用户见习
cknewuser();
if (submitcheck('mtagsubmit')) {
$fieldid = intval($_POST['fieldid']);
$profield = $_SGLOBAL['profield'][$fieldid];
if (empty($fieldid) || empty($profield)) {
showmessage('mtag_fieldid_does_not_exist');
}
$_POST['tagname'] = $_POST['tagname'][$fieldid];
if ($profield['formtype'] == 'multi') {
$mtags = array();
foreach ($_POST['tagname'] as $value) {
$s = stripslashes($value);
if (in_array($s, $profield['choice'])) {
if ($mtag = mtag_join('tagname', $s, $fieldid)) {
示例5: exit
******************************/
if (!defined('iBUAA')) {
exit('Access Denied');
}
$query = $_SGLOBAL['db']->query('SELECT groupid,pptype from ' . tname('space') . ' WHERE uid=' . $_SGLOBAL['supe_uid']);
if ($res = $_SGLOBAL['db']->fetch_array($query)) {
$_SGLOBAL['mygroupid'] = $res['groupid'];
$_SGLOBAL['pptype'] = $res['pptype'];
}
$pptype_res = array("1" => "学院", "2" => "部处", "3" => "名人", "4" => "学生组织", "5" => "兴趣社团", "6" => "学生党组织", "7" => "活动主页", "8" => "品牌主页", "20" => "班级主页", "100" => "航路研语", "200" => "名师工作坊");
//ᅧ새ᅬᅱᄂ
if ($space['namestatus']) {
include_once S_ROOT . './source/function_cp.php';
if (!ckrealname('viewspace', 1)) {
$_SGLOBAL['realname_privacy'] = 1;
include template('space_privacy');
exit;
}
}
//ᄋᄌ
$_SGLOBAL['space_theme'] = $space['theme'];
$_SGLOBAL['space_css'] = $space['css'];
$_SGLOBAL['index_bg'] = $space['index_bg'];
//ᅧᅦᄋ채ᅮ
$space['isfriend'] = $space['self'];
if ($space['friends'] && in_array($_SGLOBAL['supe_uid'], $space['friends'])) {
$space['isfriend'] = 1;
//ᅧᅦ채ᅮ
}
示例6: empty
//检查信息
$blogid = empty($_GET['blogid']) ? 0 : intval($_GET['blogid']);
$op = empty($_GET['op']) ? '' : $_GET['op'];
$blog = array();
if ($blogid) {
$query = $_SGLOBAL['db']->query("SELECT bf.*, b.* FROM " . tname('blog') . " b \n\t\tLEFT JOIN " . tname('blogfield') . " bf ON bf.blogid=b.blogid \n\t\tWHERE b.blogid='{$blogid}'");
$blog = $_SGLOBAL['db']->fetch_array($query);
}
//权限检查
if (empty($blog)) {
if (!checkperm('allowblog')) {
ckspacelog();
showmessage('no_authority_to_add_log');
}
//实名认证
ckrealname('blog');
//视频认证
ckvideophoto('blog');
//新用户见习
cknewuser();
//判断是否发布太快
$waittime = interval_check('post');
if ($waittime > 0) {
showmessage('operating_too_fast', '', 1, array($waittime));
}
//接收外部标题
$blog['subject'] = empty($_GET['subject']) ? '' : getstr($_GET['subject'], 80, 1, 0);
$blog['message'] = empty($_GET['message']) ? '' : getstr($_GET['message'], 5000, 1, 0);
} else {
if ($_SGLOBAL['supe_uid'] != $blog['uid'] && !checkperm('manageblog')) {
showmessage('no_authority_operation_of_the_log');
示例7: getblockhtml
function getblockhtml($blockname, $parameters = array())
{
global $_G, $space;
$parameters = empty($parameters) ? array() : $parameters;
$list = array();
$sql = $title = $html = $wheresql = $ordersql = $titlemore = $do = $contentclassname = '';
$view = $from = false;
$contenttagname = 'div';
$shownum = 6;
$uid = intval($space['uid']);
$shownum = empty($parameters['shownum']) ? $shownum : intval($parameters['shownum']);
switch ($blockname) {
case 'personalinfo':
$do = 'profile';
space_merge($space, 'profile');
require_once libfile('function/friend');
$isfriend = friend_check($space['uid']);
require_once libfile('function/spacecp');
loadcache('profilesetting');
include_once libfile('function/profile');
$profiles = array();
$privacy = $space['privacy']['profile'] ? $space['privacy']['profile'] : array();
foreach ($_G['cache']['profilesetting'] as $fieldid => $field) {
if (!$field['available'] || in_array($fieldid, array('birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) {
continue;
}
if ($field['available'] && $field['invisible'] != '1' && strlen($space[$fieldid]) > 0 && ($field['showinthread'] || $field['showincard'] || ($space['self'] || empty($privacy[$fieldid]) || $isfriend && $privacy[$fieldid] == 1))) {
$val = profile_show($fieldid, $space);
if ($val !== false) {
if ($fieldid == 'realname' && $_G['uid'] != $space['uid'] && !ckrealname(1)) {
continue;
}
if ($field['formtype'] == 'file' && $val) {
$imgurl = getglobal('setting/attachurl') . './profile/' . $val;
$val = '<span><a href="' . $imgurl . '" target="_blank"><img src="' . $imgurl . '" style="max-width: 300px;" /></a></span>';
}
if ($val == '') {
$val = '';
}
$html .= '<li><em>' . $field['title'] . '</em>' . $val . '</li>';
}
}
}
$html = $html ? $html : '<li>' . lang('space', 'block_view_profileinfo_noperm') . '</li>';
$html = '<ul id="pprl" class="mbm pbm bbda cl">' . $html . $more . '</ul>';
$more = lang('space', 'block_profile_all', array('uid' => $uid));
$html = $html . $more;
$titlemore = $space['self'] ? lang('space', 'block_profile_edit') : '';
break;
case 'profile':
$do = $blockname;
$managehtml = '';
$avatar = empty($parameters['banavatar']) ? 'middle' : $parameters['banavatar'];
$html .= "<div class=\"hm\"><p><a href=\"home.php?mod=space&uid={$uid}\" target=\"_blank\">" . avatar($uid, $avatar) . '</a></p>';
$space['medals'] = DB::result_first("SELECT medals FROM " . DB::table('common_member_field_forum') . " WHERE uid='{$space['uid']}'");
$usermedals = $medal_detial = '';
if ($space['medals']) {
loadcache('medals');
foreach ($space['medals'] = explode("\t", $space['medals']) as $key => $medalid) {
list($medalid, $medalexpiration) = explode("|", $medalid);
if (isset($_G['cache']['medals'][$medalid]) && (!$medalexpiration || $medalexpiration > TIMESTAMP)) {
$usermedals .= '<img src="' . STATICURL . 'image/common/' . $_G['cache']['medals'][$medalid]['image'] . '" id="md_' . $medalid . '" alt="' . $_G['cache']['medals'][$medalid]['name'] . '\'" onmouseover="showTip(this)" tip="<h4>' . $_G['cache']['medals'][$medalid]['name'] . '</h4><p>' . $_G['cache']['medals'][$medalid]['description'] . '</p>" /> ';
}
}
if ($usermedals) {
$usermedals = '<p class="md_ctrl"><a href="home.php?mod=medal">' . $usermedals . '</a></p>';
}
}
$html .= "<h2 class=\"mbn\"><a href=\"home.php?mod=space&uid={$uid}\" target=\"_blank\">" . $space['username'] . "</a></h2>{$usermedals}";
$html .= '</div><ul class="xl xl2 cl ul_list">';
$magicinfo = $showmagicgift = false;
if ($_G['setting']['magicstatus'] && $_G['setting']['magics']['gift']) {
$showmagicgift = true;
$magicinfo = !empty($space['magicgift']) ? unserialize($space['magicgift']) : array();
}
if ($space['self']) {
$html .= '<li class="ul_diy"><a href="home.php?mod=space&diy=yes">' . lang('space', 'block_profile_diy') . '</a></li>';
$html .= '<li class="ul_msg"><a href="home.php?mod=space&uid=' . $uid . '&do=wall">' . lang('space', 'block_profile_wall') . '</a></li>';
$html .= '<li class="ul_avt"><a href="home.php?mod=spacecp&ac=avatar">' . lang('space', 'block_profile_avatar') . '</a></li>';
$html .= '<li class="ul_profile"><a href="home.php?mod=spacecp&ac=profile">' . lang('space', 'block_profile_update') . '</a></li>';
if ($showmagicgift) {
$html .= '<li class="ul_magicgift"><div style="' . 'background: url(' . STATICURL . 'image/magic/gift.small.gif) no-repeat 0 50%;' . '">';
if ($magicinfo) {
$html .= '<a onclick="showWindow(\'magicgift\', this.href, \'get\', 0)" href="home.php?mod=spacecp&ac=magic&op=retiregift">' . lang('magic/gift', 'gift_gc') . '</a>';
} else {
$html .= '<a onclick="showWindow(\'magicgift\', this.href, \'get\', 0)" href="home.php?mod=magic&mid=gift">' . lang('magic/gift', 'gift_use') . '</a>';
}
$html .= '</div></li>';
}
} else {
require_once libfile('function/friend');
$isfriend = friend_check($uid);
if (!$isfriend) {
$html .= "<li class='ul_add'><a href=\"home.php?mod=spacecp&ac=friend&op=add&uid={$space['uid']}&handlekey=addfriendhk_{$space[uid]}\" id=\"a_friend_li_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_friend_add') . "</a></li>";
} else {
$html .= "<li class='ul_ignore'><a href=\"home.php?mod=spacecp&ac=friend&op=ignore&uid={$space['uid']}&handlekey=ignorefriendhk_{$space[uid]}\" id=\"a_ignore_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_friend_ignore') . "</a></li>";
}
$html .= "<li class='ul_msg'><a href=\"home.php?mod=space&uid={$space['uid']}&do=wall\">" . lang('space', 'block_profile_wall_to_me') . "</a></li>";
$html .= "<li class='ul_poke'><a href=\"home.php?mod=spacecp&ac=poke&op=send&uid={$space['uid']}&handlekey=propokehk_{$space[uid]}\" id=\"a_poke_{$space[uid]}\" onclick=\"showWindow(this.id, this.href, 'get', 0);\">" . lang('space', 'block_profile_poke') . "</a></li>";
$html .= "<li class='ul_pm'><a href=\"home.php?mod=spacecp&ac=pm&op=showmsg&handlekey=showmsg_{$space['uid']}&touid={$space['uid']}&pmid=0&daterange=2\" id=\"a_sendpm_{$space['uid']}\" onclick=\"showWindow('showMsgBox', this.href, 'get', 0)\">" . lang('space', 'block_profile_sendmessage') . "</a></li>";
//.........这里部分代码省略.........
示例8: space_key
$space['key'] = space_key($space);
$actives = array($op => ' class="active"');
if ($op == 'add') {
if (!checkperm('allowfriend')) {
ckspacelog();
showmessage('no_privilege');
}
//检测用户
if ($uid == $_SGLOBAL['supe_uid']) {
showmessage('friend_self_error');
}
if ($space['friends'] && in_array($uid, $space['friends'])) {
showmessage('you_have_friends');
}
//实名认证
ckrealname('friend');
$tospace = getspace($uid);
if (empty($tospace)) {
showmessage('space_does_not_exist');
}
//黑名单
if (isblacklist($tospace['uid'])) {
showmessage('is_blacklist');
}
//用户组
$groups = getfriendgroup();
//检测现在状态
$status = getfriendstatus($_SGLOBAL['supe_uid'], $uid);
if ($status == 1) {
showmessage('you_have_friends');
} else {
示例9: showmessage
$seccodecheck = $_G['group']['seccode'] ? $_G['setting']['seccodestatus'] & 4 : 0;
$secqaacheck = $_G['group']['seccode'] ? $_G['setting']['secqaa']['status'] & 2 : 0;
if (submitcheck('commentsubmit', 0, $seccodecheck, $secqaacheck)) {
if (!checkperm('allowcommentarticle')) {
showmessage('group_nopermission', NULL, array('grouptitle' => $_G['group']['grouptitle']), array('login' => 1));
}
$aid = intval($_POST['aid']);
$article = DB::fetch_first("SELECT * FROM " . DB::table('portal_article_title') . " WHERE aid='{$aid}'");
if (empty($article)) {
showmessage("comment_comment_noexist");
}
if ($article['allowcomment'] != 1) {
showmessage("comment_comment_notallowed");
}
require_once libfile('function/spacecp');
ckrealname('comment');
cknewuser();
$waittime = interval_check('post');
if ($waittime > 0) {
showmessage('operating_too_fast', '', array('waittime' => $waittime), array('return' => true));
}
$message = getstr($_POST['message'], $_G['group']['allowcommentarticle'], 1, 1, 1, 0);
if (strlen($message) < 2) {
showmessage('content_is_too_short');
}
$message = censor($message);
if (censormod($message)) {
$comment_status = 1;
} else {
$comment_status = 0;
}
示例10: _getPersonalDataInfo
private function _getPersonalDataInfo($puid, $space)
{
global $_G;
$res['body']['PersonalData'] = array();
require_once libfile('function/spacecp');
space_merge($space, 'count');
space_merge($space, 'field_home');
space_merge($space, 'field_forum');
space_merge($space, 'profile');
space_merge($space, 'status');
$space['buyerrank'] = 0;
if ($space['buyercredit']) {
foreach ($_G['setting']['ec_credit']['rank'] as $level => $credit) {
if ($space['buyercredit'] <= $credit) {
$space['buyerrank'] = $level;
break;
}
}
}
$space['sellerrank'] = 0;
if ($space['sellercredit']) {
foreach ($_G['setting']['ec_credit']['rank'] as $level => $credit) {
if ($space['sellercredit'] <= $credit) {
$space['sellerrank'] = $level;
break;
}
}
}
require_once libfile('function/friend');
$isfriend = friend_check($space['uid'], 1);
loadcache('profilesetting');
include_once libfile('function/profile');
$profiles = array();
$privacy = $space['privacy']['profile'] ? $space['privacy']['profile'] : array();
if ($_G['setting']['verify']['enabled']) {
space_merge($space, 'verify');
}
if ($_G['uid'] == $space['uid'] || $_G['group']['allowviewip']) {
foreach ($_G['cache']['profilesetting'] as $fieldid => $field) {
if (!$field['available'] || $field['invisible'] || in_array($fieldid, array('birthmonth', 'birthyear'))) {
continue;
}
$val = profile_show($fieldid, $space);
$profiles[] = array('type' => $fieldid, 'title' => $field['title'], 'data' => WebUtils::emptyHtml($val));
}
} else {
foreach ($_G['cache']['profilesetting'] as $fieldid => $field) {
if (!$field['available'] || in_array($fieldid, array('birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) {
continue;
}
if ($field['available'] && (strlen($space[$fieldid]) > 0 || ($fieldid == 'birthcity' && strlen($space['birthprovince']) || $fieldid == 'residecity' && strlen($space['resideprovince']))) && ($space['self'] || empty($privacy[$fieldid]) || $isfriend && $privacy[$fieldid] == 1) && (!$_G['inajax'] && !$field['invisible'] || $_G['inajax'] && $field['showincard'])) {
$val = profile_show($fieldid, $space);
if ($val !== false) {
if ($fieldid == 'realname' && $_G['uid'] != $space['uid'] && !ckrealname(1)) {
continue;
}
if ($field['formtype'] == 'file' && $val) {
$imgurl = getglobal('setting/attachurl') . './profile/' . $val;
$val = '<span><a href="' . $imgurl . '" target="_blank"><img src="' . $imgurl . '" style="max-width: 500px;" /></a></span>';
}
$profiles[] = array('type' => $fieldid, 'title' => $field['title'], 'data' => WebUtils::emptyHtml($val));
}
}
}
}
return $profiles;
}
示例11: exit
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if ($_GET['op'] == 'delete') {
$favid = intval($_GET['favid']);
$thevalue = DB::fetch_first('SELECT * FROM ' . DB::table('home_favorite') . " WHERE favid='{$favid}'");
if (empty($thevalue) || $thevalue['uid'] != $_G['uid']) {
showmessage('favorite_does_not_exist');
}
if (submitcheck('deletesubmit')) {
DB::query('DELETE FROM ' . DB::table('home_favorite') . " WHERE favid='{$favid}'");
showmessage('do_success', 'home.php?mod=space&do=favorite&view=me&type=' . $_GET['type'] . '&quickforward=1', array('favid' => $favid), array('showdialog' => 1, 'showmsg' => true, 'closetime' => 1));
}
} else {
ckrealname('favorite');
ckvideophoto('favorite');
cknewuser();
$type = empty($_GET['type']) ? '' : $_GET['type'];
$id = empty($_GET['id']) ? 0 : intval($_GET['id']);
$spaceuid = empty($_GET['spaceuid']) ? 0 : intval($_GET['spaceuid']);
$idtype = $title = $icon = '';
switch ($type) {
case 'thread':
$idtype = 'tid';
$title = DB::result_first('SELECT subject FROM ' . DB::table('forum_thread') . " WHERE tid='{$id}'");
$icon = '<img src="static/image/feed/thread.gif" alt="thread" class="vm" /> ';
break;
case 'forum':
$idtype = 'fid';
$title = DB::result_first('SELECT `name` FROM ' . DB::table('forum_forum') . " WHERE fid='{$id}' AND status !='3'");
示例12: getstr
$comment['message'] = getstr($comment['message'], 150, 0, 0, 2, -1);
}
$seccodecheck = $_G['group']['seccode'] ? $_G['setting']['seccodestatus'] & 4 : 0;
$secqaacheck = $_G['group']['seccode'] ? $_G['setting']['secqaa']['status'] & 2 : 0;
if (submitcheck("commentsubmit", 0, $seccodecheck, $secqaacheck)) {
if ($_G['group']['pdnovelcomment'] != 1) {
showmessage("group_nopermission", NULL, array("grouptitle" => $_G['group']['grouptitle']), array("login" => 1));
}
checkperm("allownewcomment");
$novelid = intval($_POST['novelid']);
$novel = DB::fetch_first("SELECT * FROM " . DB::table("pdnovel_view") . (" WHERE novelid='" . $novelid . "'"));
if (empty($novel)) {
showmessage("comment_comment_noexist");
}
require_once libfile("function/spacecp");
ckrealname("comment");
cknewuser();
$waittime = interval_check("post");
if (0 < $waittime) {
showmessage("operating_too_fast", "", array("waittime" => $waittime), array("return" => TRUE));
}
$message = getstr($_POST['message'], 0, 1, 1, 1, 0);
if (strlen($message) < 2) {
showmessage("content_is_too_short");
}
pdupdatecredit('pdnovelcomment', $lang['common_no_credit']);
$message = censor($message);
if (censormod($message)) {
$comment_status = 1;
} else {
$comment_status = 0;
示例13: tname
echo 'incorrect_code';
exit;
}
$query = $_SGLOBAL['db']->query("SELECT timeline FROM " . tname('wallfield') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND wallid='{$wallid}' order by timeline desc limit 1 ");
$lasttime = $_SGLOBAL['db']->result($query);
$waittime = 15 - ($_SGLOBAL['timestamp'] - $lasttime);
if ($waittime > 0) {
echo 'operating_too_fast';
exit;
}
} else {
if (!checkperm('allowdoing')) {
$add_tracking = 0;
}
//实名
if (!ckrealname('doing', 1)) {
$add_tracking = 0;
}
//视频
if (!ckvideophoto('doing', array(), 1)) {
$add_tracking = 0;
}
//新用户
if (!cknewuser(1)) {
$add_tracking = 0;
}
$waittime = interval_check('post');
if ($waittime > 0) {
$add_tracking = 0;
}
}
示例14: friend_check
$isfriend = friend_check($space['uid'], 1);
loadcache('profilesetting');
include_once libfile('function/profile');
$profiles = array();
$privacy = $space['privacy']['profile'] ? $space['privacy']['profile'] : array();
if ($_G['setting']['verify']['enabled']) {
space_merge($space, 'verify');
}
foreach ($_G['cache']['profilesetting'] as $fieldid => $field) {
if (!$field['available'] || in_array($fieldid, array('birthprovince', 'birthdist', 'birthcommunity', 'resideprovince', 'residedist', 'residecommunity'))) {
continue;
}
if ($field['available'] && strlen($space[$fieldid]) > 0 && ($field['showinthread'] || $field['showincard'] || ($space['self'] || empty($privacy[$fieldid]) || $isfriend && $privacy[$fieldid] == 1)) && (!$_G['inajax'] && $field['invisible'] != '1' || $_G['inajax'] && $field['showincard'])) {
$val = profile_show($fieldid, $space);
if ($val !== false) {
if ($fieldid == 'realname' && $_G['uid'] != $space['uid'] && !ckrealname(1)) {
continue;
}
if ($field['formtype'] == 'file' && $val) {
$imgurl = getglobal('setting/attachurl') . './profile/' . $val;
$val = '<span><a href="' . $imgurl . '" target="_blank"><img src="' . $imgurl . '" style="max-width: 500px;" /></a></span>';
}
if ($val == '') {
$val = '-';
}
$profiles[$fieldid] = array('title' => $field['title'], 'value' => $val);
}
}
}
$count = DB::result(DB::query("SELECT COUNT(*) FROM " . DB::table('forum_moderator') . " WHERE uid = '{$space['uid']}'"), 0);
if ($count) {
示例15: topic_join
//单个图片feed
if ($_POST['topicid']) {
topic_join($_POST['topicid'], $_SGLOBAL['supe_uid'], $_SGLOBAL['supe_username']);
$url = "space.php?do=topic&topicid={$_POST['topicid']}&view=pic";
} else {
$url = "space.php?uid={$_SGLOBAL['supe_uid']}&do=album&id=" . (empty($_POST['opalbumid']) ? -1 : $_POST['opalbumid']);
}
capi_showmessage_by_data('upload_images_completed', $url, 0);
}
} else {
if (!checkperm('allowupload')) {
ckspacelog();
capi_showmessage_by_data('no_privilege');
}
//实名认证
ckrealname('album');
//视频认证
ckvideophoto('album');
//新用户见习
cknewuser();
$siteurl = getsiteurl();
//获取相册
$albums = getalbums($_SGLOBAL['supe_uid']);
//激活
$actives = $_GET['op'] == 'flash' || $_GET['op'] == 'cam' ? array($_GET['op'] => ' class="active"') : array('js' => ' class="active"');
//空间大小
$maxattachsize = checkperm('maxattachsize');
if (!empty($maxattachsize)) {
$maxattachsize = $maxattachsize + $space['addsize'];
//额外空间
$haveattachsize = formatsize($maxattachsize - $space['attachsize']);