本文整理汇总了PHP中getsiteurl函数的典型用法代码示例。如果您正苦于以下问题:PHP getsiteurl函数的具体用法?PHP getsiteurl怎么用?PHP getsiteurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getsiteurl函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: js_mkurl
function js_mkurl($tag, $url)
{
if (!preg_match("/^(http\\:\\/\\/|ftp\\:\\/\\/|https\\:\\/\\/|\\/)/i", $url)) {
$url = getsiteurl() . $url;
}
return " {$tag}=\"{$url}\"";
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:7,代码来源:js.php
示例2: usesubmit
function usesubmit()
{
global $_G;
$config = urlencode(getsiteurl() . 'home.php?mod=misc&ac=swfupload&op=config&doodle=1');
$src = IMGDIR . "/doodle.swf?fid={$_G[gp_handlekey]}&oid={$_G[gp_mtarget]}&from={$_G[gp_from]}&config={$config}";
include template('home/magic_doodle');
}
开发者ID:Kingson4Wu,项目名称:php_demo,代码行数:7,代码来源:magic_doodle.php
示例3: space_open
function space_open($uid, $username, $gid = 0, $email = '')
{
global $_SGLOBAL, $_SCONFIG;
if (empty($uid) || empty($username)) {
return array();
}
//验证空间是否被管理员删除
$query = $_SGLOBAL['db']->query("SELECT * FROM " . tname('spacelog') . " WHERE uid='{$uid}' AND flag='-1'");
if ($value = $_SGLOBAL['db']->fetch_array($query)) {
showmessage('the_space_has_been_closed');
}
$space = array('uid' => $uid, 'username' => $username, 'dateline' => $_SGLOBAL['timestamp'], 'groupid' => $gid);
inserttable('space', $space, 0, true);
inserttable('spacefield', array('uid' => $uid, 'email' => $email), 0, true);
//发送PM
if ($_SGLOBAL['supe_uid'] && $_SGLOBAL['supe_uid'] != $uid) {
include_once S_ROOT . './uc_client/client.php';
uc_pm_send($_SGLOBAL['supe_uid'], $uid, cplang('space_open_subject'), cplang('space_open_message', array(getsiteurl())), 1, 0, 0);
}
//产生feed
include_once S_ROOT . './source/function_cp.php';
$_uid = $_SGLOBAL['supe_uid'];
$_username = $_SGLOBAL['supe_username'];
$_SGLOBAL['supe_uid'] = $uid;
$_SGLOBAL['supe_username'] = addslashes($username);
feed_add('profile', cplang('feed_space_open'));
$_SGLOBAL['supe_uid'] = $_uid;
$_SGLOBAL['supe_username'] = $_username;
return $space;
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:30,代码来源:function_space.php
示例4: _my_get_app_url
function _my_get_app_url($appid, $suffix)
{
global $_G;
if (!isset($_G['prefix_url'])) {
$_G['prefix_url'] = getsiteurl();
}
return $_G['prefix_url'] . "userapp.php?mod=app&id={$appid}";
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:8,代码来源:function_userapp.php
示例5: __construct
function __construct()
{
global $_SGLOBAL, $_SC;
$this->callback = $this->xmlrpcApi();
$this->xmlmessage = new stdClass();
$this->siteUrl = getsiteurl();
$this->db = $_SGLOBAL['db'];
$this->charset = $_SC['charset'];
$this->timestamp = $_SGLOBAL['timestamp'];
}
开发者ID:NaturalWill,项目名称:UCQA,代码行数:10,代码来源:class_xmlrpc.php
示例6: index
public function index()
{
$uid = intval($_GET['uid']);
$size = trim($_GET['size']);
$size = in_array($size, array('middel', 'small')) ? $size : 'big';
$avatar = $uid . '/' . $uid . '_avatar_' . $size . '.jpg';
if (is_file(C('AVATARDIR') . $avatar)) {
$avatar = C('AVATARURL') . $avatar;
} else {
$avatar = getsiteurl() . '/static/images/common/avatar_default.png';
}
@header('location:' . $avatar);
exit;
}
开发者ID:xy113,项目名称:XiangBaLaoServer,代码行数:14,代码来源:class.AvatarController.php
示例7: explode
}
include_once S_ROOT . './source/function_common.php';
include_once S_ROOT . '../vendor/autoload.php';
//时间
$mtime = explode(' ', microtime());
$_SGLOBAL['timestamp'] = $mtime[1];
$_SGLOBAL['supe_starttime'] = $_SGLOBAL['timestamp'] + $mtime[0];
//GPC过滤
$magic_quote = get_magic_quotes_gpc();
if (empty($magic_quote)) {
$_GET = saddslashes($_GET);
$_POST = saddslashes($_POST);
}
//本站URL
if (empty($_SC['siteurl'])) {
$_SC['siteurl'] = getsiteurl();
}
//链接数据库
dbconnect();
//缓存文件
if (!@(include_once S_ROOT . './data/data_config.php')) {
include_once S_ROOT . './source/function_cache.php';
config_cache();
include_once S_ROOT . './data/data_config.php';
}
foreach (array('app', 'userapp', 'ad', 'magic') as $value) {
@(include_once S_ROOT . './data/data_' . $value . '.php');
}
//COOKIE
$prelength = strlen($_SC['cookiepre']);
foreach ($_COOKIE as $key => $val) {
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:common.php
示例8: getsiteurl
$siteurl = getsiteurl();
$list = array();
$count = C::t('home_comment')->count_by_id_idtype($pic['picid'], 'picid', $cid);
if ($count) {
$query = C::t('home_comment')->fetch_all_by_id_idtype($pic['picid'], 'picid', $start, $perpage, $cid);
foreach ($query as $value) {
$list[] = $value;
}
}
$multi = multi($count, $perpage, $page, $theurl);
if (empty($album['albumname'])) {
$album['albumname'] = lang('space', 'default_albumname');
}
$pic_url = $pic['pic'];
if (!preg_match("/^(http|https)\\:\\/\\/.+?/i", $pic['pic'])) {
$pic_url = getsiteurl() . $pic['pic'];
}
$pic_url2 = rawurlencode($pic['pic']);
$hash = md5($pic['uid'] . "\t" . $pic['dateline']);
$id = $pic['picid'];
$idtype = 'picid';
$maxclicknum = 0;
loadcache('click');
$clicks = empty($_G['cache']['click']['picid']) ? array() : $_G['cache']['click']['picid'];
foreach ($clicks as $key => $value) {
$value['clicknum'] = $pic["click{$key}"];
$value['classid'] = mt_rand(1, 4);
if ($value['clicknum'] > $maxclicknum) {
$maxclicknum = $value['clicknum'];
}
$clicks[$key] = $value;
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:space_album.php
示例9: exit
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: userapp_manage.php 34075 2013-10-08 03:59:47Z andyzheng $
*/
if (!defined('IN_DISCUZ')) {
exit('Access Denied');
}
if (!checkperm('allowmyop')) {
showmessage('no_privilege_myop', '', array(), array('return' => true));
}
$uchUrl = getsiteurl() . 'userapp.php?mod=manage';
if (submitcheck('ordersubmit')) {
if (empty($_POST['order'])) {
$_POST['order'] = array();
}
$displayorder = count($_POST['order']);
foreach ($_POST['order'] as $key => $appid) {
$appid = intval($appid);
if ($_G['my_userapp'][$appid]['menuorder'] != $displayorder) {
C::t('home_userapp')->update_by_uid_appid($_G['uid'], $appid, array('menuorder' => $displayorder));
}
$displayorder--;
}
$_POST['menunum'] = abs(intval($_POST['menunum']));
if ($_POST['menunum']) {
C::t('common_member_field_home')->update($_G['uid'], array('menunum' => $_POST['menunum']));
}
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:userapp_manage.php
示例10: usesubmit
function usesubmit()
{
global $_G;
$config = urlencode(getsiteurl() . 'home.php?mod=misc&ac=swfupload&op=config&doodle=1');
include template('home/magic_doodle');
}
开发者ID:pan289091315,项目名称:Discuz,代码行数:6,代码来源:magic_doodle.php
示例11: formatsize
continue;
}
if ($subvalue['isimage']) {
//图片
$value['message'] .= "<div><img src=\"{$_SC[attachurl]}{$subvalue['filepath']}\"></div>";
} else {
$value['message'] .= "<div><strong>文件</strong>: <a href=\"{$_SC[attachurl]}{$subvalue['filepath']}\">{$subvalue['filename']}</a></div>";
}
}
}
if ($value['videosize']) {
$value['videosize'] = formatsize($value['videosize']);
$value['message'] .= "<div><strong>影音大小</strong>: {$value['videosize']}</div>";
}
if ($value['file']) {
$flvurl = getsiteurl() . rawurlencode($value['file']);
$value['message'] .= '<div>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" id="photo" align="middle" height="315" width="420">
<param name="movie" value="image/flv.swf?flvurl=' . $flvurl . '">
<param name="quality" value="high">
<param name="allowFullScreen" value="true">
<embed src="image/flv.swf?flvurl=' . $flvurl . '" quality="high" name="photo" type="application/x-shockwave-flash" allowfullscreen="true" pluginspage="http://www.macromedia.com/go/getflashplayer" align="middle" height="315" width="420">
</object>
<br>' . $value['videoname'] . '</a></div>';
}
if ($value['remoteurl']) {
$remoteurl = unserialize($value['remoteurl']);
if ($value['subtype'] == 'media') {
foreach ($remoteurl as $rs) {
$value['message'] .= '<div>
<object id="PlayerEx2" classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" width="420" height="315">
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:convert.php
示例12: foreach
}
}
} else {
$graph[$type] .= "<value xid='{$count}'>" . $value[$type] . "</value>";
}
$count++;
}
$xml = '';
$xml .= '<' . "?xml version=\"1.0\" encoding=\"utf-8\"?>";
$xml .= '<chart><xaxis>';
$xml .= $xaxis;
$xml .= "</xaxis><graphs>";
$count = 0;
foreach ($graph as $key => $value) {
$xml .= "<graph gid='{$count}' title='" . siconv(cplang("do_stat_{$key}"), 'utf8') . "'>";
$xml .= $value;
$xml .= '</graph>';
$count++;
}
$xml .= '</graphs></chart>';
@header("Expires: -1");
@header("Cache-Control: no-store, private, post-check=0, pre-check=0, max-age=0", FALSE);
@header("Pragma: no-cache");
@header("Content-type: application/xml; charset=utf-8");
echo $xml;
exit;
}
$siteurl = getsiteurl();
$statuspara = "path=&settings_file=data/stat_setting.xml&data_file=" . urlencode("do.php?ac=stat&xml=1&type={$type}");
$actives = array($type => ' style="font-weight:bold;"');
include template('do_stat');
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_stat.php
示例13: space_domain
function space_domain($space)
{
global $_SCONFIG;
if ($space['domain'] && $_SCONFIG['allowdomain'] && $_SCONFIG['domainroot']) {
$space['domainurl'] = 'http://' . $space['domain'] . '.' . $_SCONFIG['domainroot'];
} else {
if ($_SCONFIG['allowrewrite']) {
$space['domainurl'] = getsiteurl() . $space[uid];
} else {
$space['domainurl'] = getsiteurl() . "?{$space['uid']}";
}
}
return $space['domainurl'];
}
开发者ID:NaturalWill,项目名称:UCQA,代码行数:14,代码来源:function_common.php
示例14: modelpost
//.........这里部分代码省略.........
@unlink(A_DIR . '/' . $defaultmessage[$value['fieldname']]);
}
}
}
}
}
//内容
$setsqlarr = $uploadfilearr = $ids = array();
$setsqlarr = getsetsqlarr($resultmessage);
$uploadfilearr = $feedcolum = uploadfile($resultmessage, $_POST['mid'], $itemid, 0);
$setsqlarr['message'] = trim($_POST['message']);
$setsqlarr['postip'] = $_SGLOBAL['onlineip'];
if (!empty($uploadfilearr)) {
foreach ($uploadfilearr as $tmpkey => $tmpvalue) {
if (empty($tmpvalue['error'])) {
$setsqlarr[$tmpkey] = $tmpvalue['filepath'];
}
if (!empty($tmpvalue['aid'])) {
$ids[] = $tmpvalue['aid'];
}
}
}
//添加内容
if (!empty($modelsinfoarr['allowfilter'])) {
$setsqlarr = scensor($setsqlarr, 1);
}
if (!checkperm('allowdirectpost') || checkperm('managemodpost') || checkperm('allowdirectpost') && $op == 'update') {
//不需要审核时入message表
if ($op == 'add') {
$setsqlarr['itemid'] = $itemid;
//添加内容
inserttable($modelsinfoarr['modelname'] . 'message', $setsqlarr);
if (allowfeed() && !empty($_POST['addfeed']) && !empty($_SGLOBAL['supe_uid'])) {
$feed['icon'] = 'comment';
$feed['title_template'] = 'feed_model_title';
$murl = geturl('action/model/name/' . $modelsinfoarr['modelname'] . '/itemid/' . $itemid);
$aurl = A_URL;
if (empty($_SCONFIG['siteurl'])) {
$siteurl = getsiteurl();
$murl = $siteurl . $murl;
$aurl = $siteurl . $aurl;
} else {
$siteurl = S_URL_ALL;
}
$feed['title_data'] = array('modelname' => '<a href="' . $siteurl . '/m.php?name=' . $modelsinfoarr['modelname'] . '">' . $modelsinfoarr['modelalias'] . '</a>');
$feed['body_template'] = 'feed_model_message';
$feed['body_data'] = array('subject' => '<a href="' . $murl . '">' . $_POST['subject'] . '</a>', 'message' => cutstr(strip_tags(preg_replace("/\\[.+?\\]/is", '', $_POST['message'])), 150));
if (!empty($feedsubjectimg)) {
$feed['images'][] = array('url' => $aurl . '/' . $feedsubjectimg['subjectimage']['filepath'], 'link' => $murl);
} else {
foreach ($feedcolum as $feedimgvalue) {
if ($feedimgvalue['filepath']) {
$feed['images'][] = array('url' => $aurl . '/' . $feedimgvalue['filepath'], 'link' => $murl);
break;
}
}
if (empty($feed['images'])) {
$picurl = getmessagepic(stripslashes($_POST['message']));
if ($picurl && strpos($picurl, '://') === false) {
$picurl = $siteurl . '/' . $picurl;
}
if (!empty($picurl)) {
$feed['images'][] = array('url' => $picurl, 'link' => $murl);
}
}
}
postfeed($feed);
}
} else {
//更新内容
updatetable($modelsinfoarr['modelname'] . 'message', $setsqlarr, array('nid' => $_POST['nid'], 'itemid' => $itemid));
}
updatetable('attachments', array('isavailable' => '1', 'type' => 'model'), array('hash' => $hash));
if (checkperm('allowdirectpost') && $op == 'update') {
deletemodelitems($modelsinfoarr['modelname'], array($itemid), $_POST['mid'], 1, 1);
}
if (checkperm('allowdirectpost') && $op == 'update') {
$jpurl = $cp ? empty($setsqlarr['uid']) ? S_URL . "/admincp.php?action=modelmanages&op=add&mid={$modelsinfoarr['mid']}" : S_URL . '/' . $theurl . '&mid=' . $modelsinfoarr['mid'] : S_URL . "/cp.php?ac=models&op=list&do={$do}&nameid={$modelsinfoarr['modelname']}";
showmessage('writing_success_online_please_wait_for_audit', $jpurl);
} else {
$jpurl = $cp ? S_URL . '/' . $theurl . '&mid=' . $modelsinfoarr['mid'] : S_URL . "/cp.php?ac=models&op=list&do={$do}&nameid={$modelsinfoarr['modelname']}";
showmessage('online_contributions_success', $jpurl);
}
} else {
$setsqlarr = array_merge($setitemsqlarr, $setsqlarr);
$setsqlarr['addfeed'] = $_POST['addfeed'];
$setsqlarr = array('subject' => $setitemsqlarr['subject'], 'mid' => $modelsinfoarr['mid'], 'uid' => $setsqlarr['uid'], 'message' => saddslashes(serialize($setsqlarr)), 'dateline' => $_SGLOBAL['timestamp'], 'folder' => 1);
$itemid = inserttable('modelfolders', $setsqlarr, 1);
if (!empty($subjectimageid)) {
$ids[] = $subjectimageid;
}
if (!empty($ids)) {
$ids = simplode($ids);
$hash = 'm' . str_pad($_POST['mid'], 6, 0, STR_PAD_LEFT) . 'f' . str_pad($itemid, 8, 0, STR_PAD_LEFT);
$_SGLOBAL['db']->query('UPDATE ' . tname('attachments') . ' SET isavailable=\'1\', type=\'model\', hash=\'' . $hash . '\' WHERE aid IN (' . $ids . ')');
}
$jpurl = $cp ? empty($setsqlarr['uid']) ? S_URL . "/admincp.php?action=modelmanages&op=add&mid={$modelsinfoarr['mid']}" : S_URL . "/admincp.php?action=modelfolders&mid={$modelsinfoarr['mid']}" : S_URL . "/cp.php?ac=models&op=list&do={$do}&nameid={$modelsinfoarr['modelname']}";
showmessage('writing_success_online_please_wait_for_audit', $jpurl);
}
}
开发者ID:jonycookie,项目名称:projectm2,代码行数:101,代码来源:model.func.php
示例15: showmessage
if (empty($defaultemail) || !isemail($defaultemail)) {
showmessage('have_no_email', '', 10);
}
if ($isactive > 0) {
showmessage('collegeid_is_active', '', 3);
} elseif (empty($isactive)) {
$nowtime = explode(' ', microtime());
$tmptime = $nowtime[1];
//记录邮件发送时间,存入数据库
$tmptime = $tmptime + $nowtime[0];
if ($tmptime - intval($row['emaildateline']) <= 1800) {
showmessage('sendtime_limit');
}
//激活成功
$hash = authcode("{$collegeid}\t{$defaultemail}", 'ENCODE');
$url = getsiteurl() . 'do.php?ac=' . $_SCONFIG['buaaregister_action'] . '&hash=' . urlencode($hash);
$mailsubject = cplang('active_email_subject');
$mailmessage = cplang('active_email_msg', array($url));
$cid = inserttable('mailcron', array('email' => $defaultemail), 1);
//存储学号信息
$_SGLOBAL['collegeid'] = $collegeid;
$setarr = array('cid' => $cid, 'subject' => addslashes(stripslashes($mailsubject)), 'message' => addslashes(stripslashes($mailmessage)), 'dateline' => $_GLOBAL['timestamp']);
//放入邮件队列
inserttable('mailqueue', $setarr);
$sendtime = array('emaildateline' => $tmptime);
updatetable('baseprofile', $sendtime, array('collegeid' => $collegeid));
showmessage('collegeid_not_active');
} else {
showmessage('system_error', 'index.php', 3);
}
}
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:do_activate.php
示例16: _my_get_app_url
function _my_get_app_url($appid, $suffix)
{
global $_SGLOBAL, $space, $_SCONFIG;
if (!isset($_SGLOBAL['prefix_url'])) {
$_SGLOBAL['prefix_url'] = getsiteurl();
}
return $_SGLOBAL['prefix_url'] . "userapp.php?appid={$appid}";
}
开发者ID:xiaoxiaoleo,项目名称:ngintek,代码行数:8,代码来源:function_userapp.php
示例17: array
$comment_status = 1;
} else {
$comment_status = 0;
}
DB::update('home_comment', array('message' => $message, 'status' => $comment_status), array('cid' => $comment['cid']));
showmessage('do_success', dreferer(), array('cid' => $comment['cid']), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
}
$comment['message'] = $bbcode->html2bbcode($comment['message']);
} elseif ($_GET['op'] == 'delete') {
if (submitcheck('deletesubmit')) {
require_once libfile('function/delete');
if (deletecomments(array($cid))) {
showmessage('do_success', dreferer(), array('cid' => $cid), array('showdialog' => 1, 'showmsg' => true, 'closetime' => true));
} else {
showmessage('no_privilege');
}
}
} elseif ($_GET['op'] == 'reply') {
$query = DB::query("SELECT * FROM " . DB::table('home_comment') . " WHERE cid='{$cid}'");
if (!($comment = DB::fetch($query))) {
showmessage('comments_do_not_exist');
}
if ($comment['idtype'] == 'uid' && ($seccodecheck || $secqaacheck)) {
$seccodecheck = 0;
$secqaacheck = 0;
}
$config = urlencode(getsiteurl() . 'home.php?mod=misc&ac=swfupload&op=config&doodle=1');
} else {
showmessage('no_privilege');
}
include template('home/spacecp_comment');
开发者ID:v998,项目名称:discuzx-en,代码行数:31,代码来源:spacecp_comment.php
示例18: showmessage
//打招呼
if (submitcheck('pokesubmit')) {
if (empty($tospace)) {
showmessage('space_does_not_exist');
}
$oldpoke = getcount('poke', array('uid' => $uid, 'fromuid' => $_SGLOBAL['supe_uid']));
$setarr = array('uid' => $uid, 'fromuid' => $_SGLOBAL['supe_uid'], 'fromusername' => $_SGLOBAL['supe_username'], 'note' => getstr($_POST['note'], 50, 1, 1), 'dateline' => $_SGLOBAL['timestamp'], 'iconid' => intval($_POST['iconid']));
inserttable('poke', $setarr, 0, true);
//更新统计
if (!$oldpoke) {
$_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET pokenum=pokenum+1 WHERE uid='{$uid}'");
}
//更新我的好友关系热度
addfriendnum($tospace['uid'], $tospace['username']);
//发送邮件通知
smail($uid, '', cplang('poke_subject', array($_SN[$space['uid']], getsiteurl() . 'cp.php?ac=poke')), '', 'poke');
if ($op == 'reply') {
//删除招呼
$_SGLOBAL['db']->query("DELETE FROM " . tname('poke') . " WHERE uid='{$_SGLOBAL['supe_uid']}' AND fromuid='{$uid}'");
$_SGLOBAL['db']->query("UPDATE " . tname('space') . " SET pokenum=pokenum-1 WHERE uid='{$_SGLOBAL['supe_uid']}' AND pokenum>0");
}
//奖励
getreward('poke', 1, 0, $uid);
//统计
updatestat('poke');
showmessage('poke_success', $_POST['refer'], 1, array($_SN[$tospace['uid']]));
}
} elseif ($op == 'ignore') {
$where = empty($uid) ? '' : "AND fromuid='{$uid}'";
$_SGLOBAL['db']->query("DELETE FROM " . tname('poke') . " WHERE uid='{$_SGLOBAL['supe_uid']}' {$where}");
//统计更新
开发者ID:NaturalWill,项目名称:UCQA,代码行数:31,代码来源:cp_poke.php
示例19: urlencode
}
if (preg_match('/^\\//', $my_suffix)) {
$url = 'http://apps.manyou.com/' . $my_appId . $my_suffix;
} else {
if ($my_suffix) {
$url = 'http://apps.manyou.com/' . $my_appId . '/' . $my_suffix;
} else {
$url = 'http://apps.manyou.com/' . $my_appId;
}
}
if (strpos($my_suffix, '?')) {
$url = $url . '&my_uchId=' . $_SGLOBAL['supe_uid'] . '&my_sId=' . $_SCONFIG['my_siteid'];
} else {
$url = $url . '?my_uchId=' . $_SGLOBAL['supe_uid'] . '&my_sId=' . $_SCONFIG['my_siteid'];
}
$url .= '&my_prefix=' . urlencode($my_prefix) . '&my_suffix=' . urlencode($my_suffix);
$current_url = getsiteurl() . 'userapp.php';
if ($_SERVER['QUERY_STRING']) {
$current_url = $current_url . '?' . $_SERVER['QUERY_STRING'];
}
$extra = $_GET['my_extra'];
$timestamp = $_SGLOBAL['timestamp'];
$url .= '&my_current=' . urlencode($current_url);
$url .= '&my_extra=' . urlencode($extra);
$url .= '&my_ts=' . $timestamp;
$url .= '&my_appVersion=' . $app['version'];
$hash = $_SCONFIG['my_siteid'] . '|' . $_SGLOBAL['supe_uid'] . '|' . $appid . '|' . $current_url . '|' . $extra . '|' . $timestamp . '|' . $_SCONFIG['my_sitekey'];
$hash = md5($hash);
$url .= '&my_sig=' . $hash;
$my_suffix = urlencode($my_suffix);
include_once template("userapp");
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:userapp.php
示例20: realname_set
}
//实名
realname_set($post['uid'], $post['username']);
realname_get();
$post['message'] = preg_replace("/\\<div class=\"quote\"\\>\\<span class=\"q\"\\>.*?\\<\\/span\\>\\<\\/div\\>/is", '', $post['message']);
//移除编辑记录
$post['message'] = preg_replace("/<ins class=\"modify\".+?<\\/ins>/is", '', $post['message']);
$post['message'] = html2bbcode($post['message']);
//显示用
$message = addslashes("<div class=\"quote\"><span class=\"q\"><b>" . $_SN[$post['uid']] . "</b>: " . getstr($post['message'], 150, 0, 0, 0, 2, 1) . '</span></div>') . $message;
}
$anonymous = empty($_POST['anonymous']) ? 0 : intval($_POST['anonymous']);
$setarr = array('tagid' => intval($thread['tagid']), 'anonymous' => $anonymous, 'tid' => $tid, 'uid' => $_SGLOBAL['supe_uid'], 'username' => $_SGLOBAL['supe_username'], 'ip' => getonlineip(), 'dateline' => $_SGLOBAL['timestamp'], 'message' => $message);
$pid = inserttable('post', $setarr, 1);
//邮件通知
smail($thread['uid'], '', cplang('mtag_reply', array($_SN[$space['uid']], shtmlspecialchars(getsiteurl() . "space.php?uid={$thread['uid']}&do=thread&id={$thread['tid']}"))), '', 'mtag_reply');
//更新统计数据
$last_author_name = $anonymous ? 'null' : $_SGLOBAL[supe_username];
$_SGLOBAL['db']->query("UPDATE " . tname('thread') . "\r\n\t\tSET replynum=replynum+1, lastpost='{$_SGLOBAL['timestamp']}', lastauthor='{$last_author_name}', lastauthorid='{$_SGLOBAL['supe_uid']}'\r\n\t\tWHERE tid='{$tid}'");
//更新群组统计
$_SGLOBAL['db']->query("UPDATE " . tname("mtag") . " SET postnum=postnum+1 WHERE tagid='{$thread['tagid']}'");
//普通回复
if (empty($post) && $thread['uid'] != $_SGLOBAL['supe_uid']) {
//积分
getreward('replythread', 1, 0, $thread['tid']);
realname_set($thread['uid'], $thread['username']);
realname_get();
if (empty($mtag['viewperm'])) {
$fs = array();
$fs['icon'] = 'post';
$fs['body_template'] = '';
开发者ID:shiyake,项目名称:php-ihome,代码行数:31,代码来源:cp_thread.php
注:本文中的getsiteurl函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论