// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // // GNU General Public License for more details. // // // // You should have received a copy of the GNU General Public License // // along with this program; if not, write to the Free Software // // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // // ------------------------------------------------------------------------ // // // // File: /admin/edit.php // // Language: PHP 4.3 // // // // Description: Edit, update and remove words from user's dictionary // // // // Author: Francisco Garcia Rodriguez <*****@*****.**> // // // // $Id$ // ------------------------------------------------------------------------ // include 'inc/edit.inc'; if (isset($_GET['editingword'])) { EditWord($_GET['editingword']); } else { if ($_POST['action'] == "Update") { UpdateWord($_POST); } else { if ($_POST['action'] == "Remove") { RemoveWord($_POST['new_word']); } else { Error("Requested link not available"); } } }
} } $enews = $_POST['enews']; if (empty($enews)) { $enews = $_GET['enews']; } //增加过滤字符 if ($enews == "AddWord") { $oldword = $_POST['oldword']; $newword = $_POST['newword']; AddWord($oldword, $newword, $logininid, $loginin); } elseif ($enews == "EditWord") { $wordid = $_POST['wordid']; $oldword = $_POST['oldword']; $newword = $_POST['newword']; EditWord($wordid, $oldword, $newword, $logininid, $loginin); } elseif ($enews == "DelWord") { $wordid = $_GET['wordid']; DelWord($wordid, $logininid, $loginin); } else { } $page = (int) $_GET['page']; $start = 0; $line = 30; //每页显示条数 $page_line = 12; //每页显示链接数 $offset = $page * $line; //总偏移量 $search = ''; $totalquery = "select count(*) as total from {$dbtbpre}enewswords";
IsAdminLogin(); SiteMenu(); $GLOBALS['page_title'] = "Admin - " . $GLOBALS['page_title']; if (!$GLOBALS['admin']) { if ($_POST['submit'] == '') { ShowForm(); } elseif ($_POST['submit'] == 1) { if (CheckForm()) { Redirect('admin.php'); } else { ShowForm(); } } } else { if ($_GET['action'] == 'edit') { EditWord($_GET['id'] + 0); } elseif ($_GET['action'] == 'delete') { DeleteWord($_GET['id'] + 0); } elseif ($_GET['action'] == 'logout') { Logout(); } elseif ($_GET['action'] == 'rewrite') { ModRewrite(); } elseif ($_GET['action'] == 'change') { if ($_POST['submit'] == 2) { if (ModPass()) { Redirect('admin.php'); } else { ChangePass(); } } else { ChangePass();