コード例 #1
0
function contentshow($content)
{
    global $lang_PagePre, $lang_PageNext, $navurl, $index, $lang;
    global $met_atitle, $met_alt;
    $str = met_cache('str_' . $lang . '.inc.php');
    if (!$str) {
        $str = cache_str();
    }
    foreach ($str as $key => $val) {
        $val[3] = html_entity_decode($val[0], ENT_QUOTES, 'UTF-8');
        $val[3] = str_replace(array('\\', '/', '.', '$', '^', '*', '(', ')', '-', '[' . ']' . '{', '}', '|', '?', '+'), array('\\\\', '\\/', '\\.', '\\$', '\\^', '\\*', '\\(', '\\)', '\\-', '\\[' . '\\]' . '\\{', '\\}', '\\|', '\\?', '\\+'), $val[3]);
        if ($val[2] != 0) {
            $tmp1 = explode("<", $content);
            $num = $val[2];
            foreach ($tmp1 as $key => $item) {
                $tmp2 = explode(">", $item);
                if (sizeof($tmp2) > 1 && strlen($tmp2[1]) > 0) {
                    if (substr($tmp2[0], 0, 1) != "a" && substr($tmp2[0], 0, 1) != "A" && substr($tmp2[0], 0, 6) != 'script' && substr($tmp2[0], 0, 6) != 'SCRIPT') {
                        $valnum = substr_count($tmp2[1], $val[0]);
                        if ($num - $valnum >= 0) {
                            $num = $num - $valnum;
                        } else {
                            $valnum = $num;
                            $num = 0;
                        }
                        $tmp2[1] = preg_replace("/" . $val[3] . "/", $val[1], $tmp2[1], $valnum);
                        $tmp1[$key] = implode(">", $tmp2);
                    }
                }
            }
            $content = implode("<", $tmp1);
        }
    }
    $tmp1 = explode("<", $content);
    foreach ($tmp1 as $key => $item) {
        $tmp2 = explode(">", $item);
        if (substr($tmp2[0], 0, 1) == "a" || substr($tmp2[0], 0, 1) == "A") {
            $tmp2[0] = str_replace(array("title=''", "title=\"\""), '', $tmp2[0]);
            if (!strpos($tmp2[0], 'title')) {
                $tmp2[0] .= " title=\"{$met_atitle}\"";
                $tmp1[$key] = implode(">", $tmp2);
            }
        }
        if (substr($tmp2[0], 0, 3) == "img" || substr($tmp2[0], 0, 3) == "IMG") {
            $tmp2[0] = str_replace(array("alt=''", "alt=\"\""), '', $tmp2[0]);
            if (!strpos($tmp2[0], 'alt')) {
                $tmp2[0] .= " alt=\"{$met_alt}\"";
                $tmp1[$key] = implode(">", $tmp2);
            }
        }
    }
    $content = implode("<", $tmp1);
    if (pageBreak($content, 1) > 1) {
        $content = pageBreak($content);
        $content .= "<link rel='stylesheet' type='text/css' href='{$navurl}public/css/contentpage.css' />\n";
        $content .= "\n<script type='text/javascript'>\n\$(document).ready(function(){\n\t\$('#page_break .num li:first').addClass('on');\n\t\$('#page_break .num li').click(function(){\n\t\t\$('#page_break').find(\"div[id^='page_']\").hide();\n\t\tif (\$(this).hasClass('on')) {\n\t\t\t\$('#page_break #page_' + \$(this).text()).show();\n\t\t} else {\n\t\t\t\$('#page_break').find('.num li').removeClass('on'); \n\t\t\t\$(this).addClass('on'); \n\t\t\t\$('#page_break').find('#page_' + \$(this).text()).show(); \n\t\t} \n\t});\n});\n</script>\n\t";
    }
    if ($content == '<div><div id="metinfo_additional"></div></div>') {
        $content = '';
    }
    return $content;
}
コード例 #2
0
ファイル: pseudo.php プロジェクト: nanfs/lt
    $met_logo = $met_pseudo ? $weburly . $met_logox[1] : ($index == 'index' ? $met_logox[1] : $met_logo);
}
$skinurl = 'templates/' . $met_skin_user;
$css_url = $weburly . $skinurl . '/css/';
$img_url = $weburly . $skinurl . '/images/';
$met_url = $weburly . 'public/';
$metweburl = ROOTPATH;
$weburly = $index == 'index' ? '' : '../';
$countlang = count($met_langok);
if ($met_index_type == $lang) {
    $countlang = 1;
}
$dataoptimize_html = '';
require_once file_exists($navurl . $skinurl . '/metinfo.inc.php') ? $navurl . $skinurl . '/metinfo.inc.php' : ROOTPATH . 'config/metinfo.inc.php';
$metadmin[pagename] = 1;
$cache_column = met_cache(ROOTPATH . 'cache/' . "column_" . $lang . ".inc.php");
if (!$cache_column) {
    $cache_column = cache_column();
}
reset($cache_column);
$about_isshow = array();
while ($columnid = current($cache_column)) {
    $langnums = $countlang;
    $listc =& $cache_column[$columnid['id']];
    /*url地址*/
    $listc['foldername'] = ereg_replace(" ", "", $listc['foldername']);
    $listc['filename'] = ereg_replace(" ", "", $listc['filename']);
    if ($listc['filename'] && $listc['filename'] != '') {
        $met_ahtmtype = $met_chtmtype;
    } else {
        $met_ahtmtype = $met_htmtype;
コード例 #3
0
ファイル: head.php プロジェクト: nanfs/lt
require_once ROOTPATH . 'include/global/pseudo.php';
$class1 = $index == 'index' ? 10001 : ($class1 == '' ? 0 : $class1);
$class2 = $index == 'index' ? 0 : ($class2 == '' ? 0 : $class2);
$class3 = $index == 'index' ? 0 : ($class3 == '' ? 0 : $class3);
$classnow = $classnow == '' ? $class3 ? $class3 : ($class2 ? $class2 : $class1) : $classnow;
$class_list[10001]['module'] = 10001;
$tempfie = ROOTPATH . "templates/" . $met_skin_user . "/database.inc.php";
$conffie = ROOTPATH . 'config/database.inc.php';
require_once file_exists($tempfie) ? $tempfie : $conffie;
$pagemark = $class_list[$classnow]['module'];
/*Standby field */
if (!isset($dataoptimize[$pagemark]['otherinfo'])) {
    $dataoptimize[$pagemark]['otherinfo'] = $dataoptimize[10000]['otherinfo'];
}
if ($dataoptimize[$pagemark]['otherinfo']) {
    $otherinfo = met_cache('otherinfo_' . $lang . '.inc.php');
    if (!$otherinfo) {
        $otherinfo = cache_otherinfo();
    }
    if ($index == "index") {
        $otherinfo['imgurl1'] = explode("../", $otherinfo['imgurl1']);
        $otherinfo['imgurl1'] = $otherinfo['imgurl1'][1];
        $otherinfo['imgurl2'] = explode("../", $otherinfo['imgurl2']);
        $otherinfo['imgurl2'] = $otherinfo['imgurl2'][1];
    }
}
/*Flash*/
$bannernid = $met_bannerpagetype ? 10001 : $classnow;
if ($met_bannerpagetype && $classnow != 10001) {
    $met_flasharray[$classnow] = $met_flasharray[10001];
}
コード例 #4
0
ファイル: online.php プロジェクト: Jesuslagliva12/OpenAPI
<?php

# MetInfo Enterprise Content Management System
# Copyright (C) MetInfo Co.,Ltd (http://www.metinfo.cn). All rights reserved.
$met_oline = 1;
require_once 'common.inc.php';
if ($met_online_type != 3) {
    $met_url = $navurl . 'public/';
    $cache_online = met_cache('online_' . $lang . '.inc.php');
    if (!$cache_online) {
        $cache_online = cache_online();
    }
    foreach ($cache_online as $key => $list) {
        $online_list[] = $list;
        if ($list['qq'] != "") {
            $qq_list[] = $list;
        }
        if ($list['msn'] != "") {
            $msn_list[] = $list;
        }
        if ($list['taobao'] != "") {
            $taobao_list[] = $list;
        }
        if ($list['alibaba'] != "") {
            $alibaba_list[] = $list;
        }
        if ($list['skype'] != "") {
            $skype_list[] = $list;
        }
    }
    $metinfo = '<div id="onlinebox" class="onlinebox onlinebox_' . $met_online_skin . ' onlinebox_' . $met_online_skin . '_' . $met_online_color . '" style="display:none;">';