⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fra_admin_1.php

📁 采用模块化设计,自由组合文章,软件,论坛等模块,安装方便快捷 模板支持Dreamweaver可视化编辑,创建风格更为容易,专业
💻 PHP
字号:
<?php

if (!defined('ROOT'))
    exit('Access Denied');
$t_tpl = array();
$result = $db->query("select * from " . PF . "center_tpl");
while ($row = $db->fetch_array($result))
{
    $t_tpl[] = $row['name'];
}
$t_lang = $sys['lang'];
$cx = array(1, 4, 15, 17, 23, 24,28);
$result = $db->query("select * from " . PF . "center_config");
$v = array();
while ($row = $db->fetch_array($result))
{
    if (in_array($row['id'], $cx))
    {
        $v[$row['id']] = empty($row['value']) ? '' : 'checked="checked"';
    } else
        $v[$row['id']] = html($row['value']);
}
$tpl_s = '';
foreach ($t_tpl as $val)
{
    $tpl_s .= '<option value="' . $val . '" ' . ($val == $v[2] ?
        'selected="selected"' : '') . '>' . $val . '</option>';
}
$lang_s = '';
foreach ($t_lang as $val)
{
    $lang_s .= '<option value="' . $val . '" ' . ($val == $v[3] ?
        'selected="selected"' : '') . '>' . $val . '</option>';
}
$scha_s = '';
$schaa = array('-12', '-11', '-10', '-9', '-8', '-7', '-6', '-5', '-4',
    '-3', '-2', '-1', '0', '1', '2', '3', '3.5', '4', '4.5', '5', '5.5', '5.75', '6',
    '6.5', '7', '8', '9', '9.5', '10', '11', '12');
foreach ($schaa as $val)
{
    $scha_s .= '<option value="' . $val . '" ' . ($val == $v[10] ?
        'selected="selected"' : '') . '>' . $tpl['g/'.$val] . '</option>';
}

$mods = array();
$result = $db->query("select * from " . PF . "center_mods order by paixu desc");
while ($row = $db->fetch_array($result))
{
    $mods[$row['name']] = $row['paixu'];
}
if ($_GET['type'] == 'g')
{
    _int($_POST['v'], array(6, 7, 11, 19, 25,26,27));
    $result = $db->query("select * from " . PF . "center_config where id<>16");
    while ($row = $db->fetch_array($result))
    {
        $id = $row['id'];
        $value = $_POST['v'][$id];
        if (in_array($id, $cx))
        {
            $value = empty($value) ? '' : 1;
        } else
            if ($id == 2)
            {
                if (!in_array($value, $t_tpl))
                    e();
            } else
                if ($id == 3)
                {
                    if (!in_array($value, $t_lang))
                        e();
                }else if($id==26){
                	if(empty($value)) continue;
                	$value=SYSTIME-$value*3600*24;
                }
        $db->query("update " . PF . "center_config set value='$value' where id='$id'");
    }
    y('?mod=center&file=fra_admin_1&displayid=tab_0');
} else
    if ($_GET['type'] == 'tpl')
    {
        $name = $_POST['name'];
        if (isset($_GET['new']))
        {
            if ($name=='') e('璇疯緭鍏ユā鏉垮悕绉

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -