Exemplo n.º 1
0
$tid = getset("sitetemplets")->value;
$sql = "select * from yiqi_templets where status = 'ok' order by tid";
$templetslist = $yiqi_db->get_results(CheckSql($sql));
$count = count($templetslist);
$action = $_POST['action'];
if ($action == "update") {
    $tempid = $_POST["tid"];
    $tempid = isset($tempid) && is_numeric($tempid) ? $tempid : 0;
    if ($tempid == 0 || !is_numeric($tempid)) {
        exit;
    }
    require_once '../include/templets.class.php';
    $tempinfo = new Templets();
    $tempinfo->compile_dir = YIQIROOT . '/cache/compile/';
    $tempinfo->clear_compiled_tpl();
    upset("sitetemplets", $tempid);
    ShowMsg("网站模板设置成功");
} else {
    if ($action == "delete") {
        $tempid = $_POST["tid"];
        $tempid = isset($tempid) && is_numeric($tempid) ? $tempid : 0;
        if ($tempid == 0 || !is_numeric($tempid)) {
            exit;
        }
        $sql = "delete from yiqi_templets where tid = '{$tid}' limit 1";
        if ($yiqi_db->query(CheckSql($sql)) == 1) {
            ShowMsg("指定模板删除成功");
        }
    }
}
function get_dirs($dir)
Exemplo n.º 2
0
if ($action == "save") {
    $titlekeywords = $_POST["titlekeywords"];
    $metakeywords = $_POST["metakeywords"];
    $metadescription = $_POST["metadescription"];
    if (empty($titlekeywords)) {
        $titlekeywords = "-";
    }
    if (empty($metakeywords)) {
        $metakeywords = "-";
    }
    if (empty($metadescription)) {
        $metadescription = "-";
    }
    upset("titlekeywords", $titlekeywords);
    upset("metakeywords", $metakeywords);
    upset("metadescription", $metadescription);
    exit("SEO设置修改成功");
}
$adminpagetitle = "SEO设置";
include "admin.header.php";
?>
<div class="main_body">
<form id="sform" action="option-seo.php" method="post">
<table class="inputform" cellpadding="1" cellspacing="1">
<tr><td class="label">标题关键词</td><td class="input"><input name="titlekeywords" class="txt" type="text" value="<?php 
echo getset("titlekeywords")->value;
?>
"  /></td></tr>
<tr><td class="label">META关键词</td><td class="input"><input name="metakeywords" class="txt" type="text" value="<?php 
echo getset("metakeywords")->value;
?>
Exemplo n.º 3
0
require_once 'admin.inc.php';
require_once '../include/file.class.php';
$action = $_POST["action"];
if ($action == "save") {
    $filedata = new File();
    $urlrewrite = $_POST['url'];
    @chmod(YIQIROOT, 0755);
    if ($urlrewrite == "true" || $urlrewrite == "html") {
        $htacc = "<IfModule mod_rewrite.c>\n" . "RewriteEngine On\n" . "RewriteBase " . YIQIPATH . "\n" . "RewriteCond %{REQUEST_FILENAME} !-f\n" . "RewriteCond %{REQUEST_FILENAME} !-d\n" . "RewriteRule ^article\\/(.+)\\.html\$ article.php?name=\$1 [L]\n" . "RewriteRule ^product\\/(.+)\\.html\$ product.php?name=\$1 [L]\n" . "RewriteRule ^category\\/([^/_]+)[/]?\$ category.php?name=\$1 [L]\n" . "RewriteRule ^category\\/([^/]+)_([0-9]+)[/]?\$ category.php?name=\$1&p=\$2 [L]\n" . "RewriteRule ^comment.html\$ comment.php [L]\n" . "RewriteRule ^sitemap.xml\$ sitemap.php [L]\n" . "</IfModule>";
        $filedata->writefile("../.htaccess", $htacc);
    } else {
        $urlrewrite = "false";
        @unlink("../.htaccess");
    }
    upset("urlrewrite", $urlrewrite);
    exit("URL设置修改成功");
}
$adminpagetitle = "URL设置";
include "admin.header.php";
?>
<div class="main_body">
<form id="sform" action="option-url.php" method="post">
<table class="inputform" cellpadding="1" cellspacing="1">
<tr><td class="label"><input name="url" type="radio" value="false"/>关闭URL重写</td><td class="input">链接样式: /article.php?name=abc</td></tr>
<tr><td class="label"><input name="url" type="radio" value="true" />开启URL重写</td><td class="input">链接样式: /article/abc.html</td></tr>
<tr><td class="label"><input name="url" type="radio" value="html"/>生成HTML</td><td class="input">链接样式: /article/abc.html,发布文章或产品时将会自动生成HTML文件。</td></tr>
<tr><td class="label">URL重写提示:</a><td class="input" style="color:#ff0000;">如果您开启URL重写之后,无法正常打开网页,请参考 <a href="http://www.yiqicms.com/article/url-rewrite-guide.html" target="_blank">URL重写(伪静态)指南</a></td></tr>
</table>
<div class="clear">&nbsp;</div>
<div class="inputsubmit"><input type="hidden" name="action" value="save" /><input id="submitbtn" type="submit" class="subtn" value="提交" /></div>
Exemplo n.º 4
0
<?php

require_once 'admin.inc.php';
$action = $_POST["action"];
if ($action == "save") {
    $companyname = $_POST["companyname"];
    $companysummary = $_POST["companysummary"];
    if (empty($companyname)) {
        $companyphone = getset("companyname")->value;
    }
    if (empty($companysummary)) {
        $companysummary = getset("companysummary")->value;
    }
    upset("companyname", $companyname);
    upset("companysummary", $companysummary);
    showMsg("公司资料修改成功");
}
$adminpagetitle = "公司资料设置";
include "admin.header.php";
?>
<div class="main_body">
<form id="sform" action="company-option.php" method="post">
<table class="inputform" cellpadding="1" cellspacing="1">
<tr><td class="label">公司名称</td><td class="input"><input type="text" class="txt" name="companyname" value="<?php 
echo getset("companyname")->value;
?>
" /></td></tr>
<tr><td class="label">公司简介<span style="color:#ff0000;">(该简介是网站首页的公司简介,如果你想修改详细的公司简介资料,请到文章管理-文章列表里面修改。)</span></td><td class="input">
<textarea id="contentform" rows="1" cols="1" style="width:580px;height:360px;" name="companysummary"><?php 
echo getset("companysummary")->value;
?>
Exemplo n.º 5
0
        $siteurl = "http://" . $_SERVER["SERVER_NAME"] . "/" . str_replace("admin/option.php", "", $_SERVER["PHP_SELF"]);
    }
    if (empty($siteicp)) {
        $siteicp = "-";
    }
    if (empty($sitestat)) {
        $sitestat = "-";
    }
    if (empty($sitecopy)) {
        $sitecopy = "-";
    }
    upset("sitename", $sitename);
    upset("siteurl", $siteurl);
    upset("siteicp", $siteicp);
    upset("sitestat", $sitestat);
    upset("sitecopy", $sitecopy);
    exit("网站设置修改成功");
}
$adminpagetitle = "网站设置";
include "admin.header.php";
?>
<div class="main_body">
<form id="sform" action="option.php" method="post">
<table class="inputform" cellpadding="1" cellspacing="1">
<tr><td class="label">网站名称</td><td class="input"><input type="text" class="txt" name="sitename" value="<?php 
echo getset("sitename")->value;
?>
" /></td></tr>
<tr><td class="label">网站地址</td><td class="input"><input type="text" class="txt" name="siteurl" value="<?php 
echo getset("siteurl")->value;
?>
Exemplo n.º 6
0
        $companyurl = getset("companyurl")->value;
    }
    if (empty($companyqq)) {
        $companyqq = getset("companyqq")->value;
    }
    if (empty($companymsn)) {
        $companymsn = getset("companymsn")->value;
    }
    upset("companycontact", $companycontact);
    upset("companyphone", $companyphone);
    upset("companymobile", $companymobile);
    upset("companyfax", $companyfax);
    upset("companyaddr", $companyaddr);
    upset("companyemail", $companyemail);
    upset("companyqq", $companyqq);
    upset("companymsn", $companymsn);
    exit("联系方式修改成功");
}
$adminpagetitle = "联系方式设置";
include "admin.header.php";
?>
<div class="main_body">
<form id="sform" action="company-contact.php" method="post">
<table class="inputform" cellpadding="1" cellspacing="1">
<tr><td class="label">联系人</td><td class="input"><input type="text" class="txt" name="companycontact" value="<?php 
echo getset("companycontact")->value;
?>
" /></td></tr>
<tr><td class="label">联系电话</td><td class="input"><input type="text" class="txt" name="companyphone" value="<?php 
echo getset("companyphone")->value;
?>