include '../common.inc.php'; $config = array(); if ($_GET['edit'] == 'yes') { $config['webname'] = htmlspecialchars(addslashes(trim($_POST['webname']))); $config['seotitle'] = addslashes(trim($_POST['seotitle'])); $config['seokeyword'] = addslashes(trim($_POST['seokeyword'])); $config['seodescription'] = addslashes(trim($_POST['seodescription'])); $config['seomode'] = addslashes(trim($_POST['seomode'])); $config['close'] = addslashes(trim($_POST['close'])); $config['template'] = addslashes(trim($_POST['template'])); $config['weektop1'] = trim($weektop1); $config['weektop2'] = trim($weektop2); foreach ($config as $key => $value) { $db->query("REPLACE INTO `{$tablepre}config` (name,value) VALUES('{$key}','{$value}')"); } updatecachefile('config'); refer('更新完成'); } $result = $db->query("SELECT * FROM `{$tablepre}config`"); while ($row = $db->fetch_array($result)) { $config[$row['name']] = $row['value']; } $dir = searchdir(ROOT_PATH . 'templates/'); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="admin.css" type="text/css" media="all" /> </head> <body topmargin="10" leftmargin="10" >
//==================================================== // FileName: updatecache.php // Summary: 后台更新缓存 // Author: millken(迷路林肯) // LastModifed:2007-06-20 // copyright (c)2007 millken@gmail.com //==================================================== require_once '../common.php'; session_start(); if (!$_SESSION['webmaster']) { header("location:login.php"); } if ($_GET['action'] == 'update') { updatecachefile('config'); updatecachefile('psort'); updatecachefile('asort'); updateVoteCache(); updateLinkCache(); refer("缓存更新成功"); } ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <link rel="stylesheet" href="admin.css" type="text/css" media="all" /> </head> <body topmargin="10" leftmargin="10" > <form action="updatecache.php?action=update" method="post"> <table class="tableborder2" cellspacing="1" cellpadding="4" width="40%" align="center" > <tr class="head">