📄 option.php
字号:
<?php/*======================================================================*\|| #################################################################### |||| # VirtuaNews - 1.0.4 Pro License ID - [WDYL-WTN]|| # ---------------------------------------------------------------- # |||| # All code in this file is ?2002 VirtuaSystems . # |||| # This file may not be redistributed in whole or significant part. # |||| # --------------- VIRTUANEWS IS NOT FREE SOFTWARE ---------------- # |||| # http://www.virtuanews.co.uk # |||| # http://www.virtuanews.co.uk/license.php # |||| #################################################################### ||\*======================================================================*/if (preg_match("/(admin\/option.php)/i",$PHP_SELF)) { header("location:../admin.php"); exit;}$option_arr[general] = "普通设置";$option_arr[output] = "HTTP和Output设置";$option_arr[user] = "会员注册设置";$option_arr[pm] = "私人短信设置";$option_arr[format] = "消息格式设置";$option_arr[stats] = "Stats Options";$option_arr[ipbanning] = "禁止IP";$option_arr[datetime] = "日期和时间设置";$option_arr[recentpost] = "新帖子设置";$option_arr[news] = "新闻帖子设置";$option_arr[article] = "文章设置";$option_arr[comment] = "评论设置";$option_arr[commentpost] = "评论发表设置";$option_arr[commentedit] = "评论编辑设置";$option_arr[polls] = "投票设置";$option_arr[search] = "搜索设置";$option_arr[sitejump] = "站点跳转设置";updateadminlog("set = $set");switch ($action) {case "option": if (!$option_arr[$set]) { $set = "general"; } echohtmlheader(); echoformheader("option_update","Update $option_arr[$set]"); updatehiddenvar("set",$set); echotabledescription("你能使用这个页面编辑你站点的设置. 请使用左边的导航去设置每个设置选项."); $getoptions = query("SELECT title,varname,value,description,code FROM news_option WHERE optiongroup = '$set' ORDER BY title"); while ($options = fetch_array($getoptions)) { if ($options[varname] == "startpage") { $code = "<input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "news","checked","")." value=\"news\"> 新闻主题<br /><input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "cat","checked","")." value=\"cat\"> News Category Listing<br />\n<input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "custom","checked","")." value=\"custom\"> Custom Start Page<br /><input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "articles","checked","")." value=\"articles\"> Articles<br />\n<input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "search","checked","")." value=\"search\"> Search Page<br />\n<input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "archive","checked","")." value=\"archive\"> News Archive<br />\n"; $moddata = getmoddata(); while ($mod_arr = fetch_array($moddata)) { $code .= "<input type=\"radio\" name=\"option_$options[varname]\" ".iif($options[value] == "mod_$mod_arr[name]","checked","")." value=\"mod_$mod_arr[name]\"> $mod_arr[text]<br />\n"; } echotablerow("<b>$options[title]:</b><br />$options[description]",$code,"",65); } elseif (substr($options[varname],0,10) == "defaultcat") { echonewscatselect("<b>$options[title]:</b><br />$options[description]","option_$options[varname]",$options[value],1); } elseif ($options[code] == "") { echoinputcode("<b>$options[title]:</b><br />$options[description]","option_$options[varname]",$options[value],40,0,65); } elseif ($options[code] == "yesno") { echoyesnocode("<b>$options[title]:</b><br />$options[description]","option_$options[varname]",$options[value],"Yes","No",65); } elseif ($options[code] == "textarea") { echotextareacode("<b>$options[title]:</b><br />$options[description]","option_$options[varname]",$options[value],5,40,0,65); } else { eval ("\$code = \"$options[code]\";"); echotablerow("<b>$options[title]:</b><br />$options[description]",$code,"",65); } } echoformfooter(); echohtmlfooter();break;case "option_update": if (!$option_arr[$set]) { adminerror("无效设置选项","你指定了一个无效的设置选项."); } if ($set == "general") { if (!$cat_arr[$option_defaultcat_loggedout] | !$cat_arr[$option_defaultcat_loggedin] | !$cat_arr[$option_defaultcat_staff]) { adminerror("无效的默认分类","你指定了一个无效的默认分类."); } } $getoptions = query("SELECT id,varname FROM news_option WHERE (optiongroup = '$set')".iif($set == "vbb"," OR (varname = 'use_vbb')","")); while ($option_arr = fetch_array($getoptions)) { $varname = "option_$option_arr[varname]"; query("UPDATE news_option SET value = '".$$varname."' WHERE id = $option_arr[id]"); } saveoptions(); writeallpages(); echoadminredirect("admin.php?action=option&set=$set");break;default: adminerror("无效连接","你跳转到一个无效的连接");}/*======================================================================*\|| ####################################################################|| # VirtuaNews is not free software|| # Downloaded: [WDYL-WTN]|| # File: admin/option.php|| ####################################################################\*======================================================================*/?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -