Exemplo n.º 1
0
function showmessage($msgkey, $url_forward = '', $second = 1, $values = array())
{
    global $_SGLOBAL, $_SC, $_SCONFIG, $_TPL, $space, $_SN;
    obclean();
    //去掉广告
    $_SGLOBAL['ad'] = array();
    //语言
    include_once S_ROOT . './language/lang_showmessage.php';
    if (isset($_SGLOBAL['msglang'][$msgkey])) {
        $message = lang_replace($_SGLOBAL['msglang'][$msgkey], $values);
    } else {
        $message = $msgkey;
    }
    //手机
    if ($_SGLOBAL['mobile']) {
        include template('showmessage');
        exit;
    }
    //显示
    if (empty($_SGLOBAL['inajax']) && $url_forward && empty($second)) {
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: {$url_forward}");
    } else {
        if ($_SGLOBAL['inajax']) {
            if ($url_forward) {
                $message = "<a href=\"{$url_forward}\">{$message}</a><ajaxok>";
            }
            //$message = "<h1>".$_SGLOBAL['msglang']['box_title']."</h1><a href=\"javascript:;\" onclick=\"hideMenu();\" class=\"float_del\">X</a><div class=\"popupmenu_inner\">$message</div>";
            echo $message;
            ob_out();
        } else {
            if ($url_forward) {
                $message = "<a href=\"{$url_forward}\">{$message}</a><script>setTimeout(\"window.location.href ='{$url_forward}';\", " . $second * 1000 . ");</script>";
            }
            include template('showmessage');
        }
    }
    exit;
}
Exemplo n.º 2
0
function atturl($imageurl)
{
    global $_SC;
    return '<img src="' . $_SC['uchurl'] . '/' . $imageurl . '">';
}
$title = $blogdetail['subject'] . ' - ' . $_SCONFIG['sitename'];
$keywords = $blogdetail['subject'] . ',' . $lang['uchblog'];
$description = $blogdetail['subject'] . ',' . $lang['uchblog'];
$guidearr = array();
$guidearr[] = array('url' => geturl('action/uchblog'), 'name' => $channels['menus']['uchblog']['name']);
$guidearr[] = array('url' => geturl('action/bloglist'), 'name' => $lang['bloglist']);
$tplname = 'blog_detail';
$title = strip_tags($title);
$keywords = strip_tags($keywords);
$description = strip_tags($description);
include template($tplname);
ob_out();
if (!empty($_SCONFIG['htmlindex'])) {
    ehtml('make');
} else {
    maketplblockvalue('cache');
}
function addurlhttp($m)
{
    global $_SC;
    if (preg_grep("/^http\\:/", array($m[2]))) {
        return 'src="' . $m[2] . '.' . $m[3] . '"';
    } else {
        return 'src="' . $_SC['uchurl'] . '/' . $m[2] . '.' . $m[3] . '"';
    }
}
Exemplo n.º 3
0
function showmessage($message, $url_forward = '', $second = 3, $vars = array())
{
    global $_SGLOBAL, $_SCONFIG, $_SC, $channels;
    if (empty($_SGLOBAL['inajax']) && $url_forward && empty($second)) {
        //Ö±½Ó301Ìøת
        obclean();
        header("HTTP/1.1 301 Moved Permanently");
        header("Location: {$url_forward}");
    } else {
        if (!defined('IN_SUPESITE_ADMINCP')) {
            $tpl_file = 'showmessage';
            $fullpath = 0;
            include_once S_ROOT . './language/message.lang.php';
            if (!empty($mlang[$message])) {
                $message = $mlang[$message];
            }
        } else {
            $tpl_file = 'admin/tpl/showmessage.htm';
            $fullpath = 1;
            include_once S_ROOT . './language/admincp_message.lang.php';
            if (!empty($amlang[$message])) {
                $message = $amlang[$message];
            }
        }
        if (isset($_SGLOBAL['mlang'][$message])) {
            $message = $_SGLOBAL['mlang'][$message];
        }
        foreach ($vars as $key => $val) {
            $message = str_replace('{' . $key . '}', $val, $message);
        }
        //ÏÔʾ
        obclean();
        if (!empty($url_forward)) {
            $second = $second * 1000;
            $message .= "<script>setTimeout(\"window.location.href ='{$url_forward}';\", {$second});</script><ajaxok>";
        }
        include template($tpl_file, $fullpath);
        ob_out();
    }
    exit;
}