当前位置: 首页>>代码示例>>PHP>>正文


PHP getsiteurl函数代码示例

本文整理汇总了PHP中getsiteurl函数的典型用法代码示例。如果您正苦于以下问题:PHP getsiteurl函数的具体用法?PHP getsiteurl怎么用?PHP getsiteurl使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getsiteurl函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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'] . '&amp;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


注:本文中的getsiteurl函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。