diff -r e3d7322305bf -r 5e1f1e916419 punbb/admin_censoring.php --- a/punbb/admin_censoring.php Sun Sep 02 11:00:57 2007 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -query('INSERT INTO '.$pun_db->prefix.'censoring (search_for, replace_with) VALUES (\''.$pun_db->escape($search_for).'\', \''.$pun_db->escape($replace_with).'\')') or error('Unable to add censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word added. Redirecting …'); -} - - -// Update a censor word -else if (isset($_POST['update'])) -{ - confirm_referrer('admin_censoring.php'); - - $id = intval(key($_POST['update'])); - - $search_for = trim($_POST['search_for'][$id]); - $replace_with = trim($_POST['replace_with'][$id]); - - if ($search_for == '' || $replace_with == '') - message('You must enter both text to search for and text to replace with.'); - - $pun_db->query('UPDATE '.$pun_db->prefix.'censoring SET search_for=\''.$pun_db->escape($search_for).'\', replace_with=\''.$pun_db->escape($replace_with).'\' WHERE id='.$id) or error('Unable to update censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word updated. Redirecting …'); -} - - -// Remove a censor word -else if (isset($_POST['remove'])) -{ - confirm_referrer('admin_censoring.php'); - - $id = intval(key($_POST['remove'])); - - $pun_db->query('DELETE FROM '.$pun_db->prefix.'censoring WHERE id='.$id) or error('Unable to delete censor word', __FILE__, __LINE__, $pun_db->error()); - - pun_redirect('admin_censoring.php', 'Censor word removed. Redirecting …'); -} - - -$page_title = pun_htmlspecialchars($pun_config['o_board_title']).' / Admin / Censoring'; -$focus_element = array('censoring', 'new_search_for'); -require PUN_ROOT.'header.php'; - -generate_admin_menu('censoring'); - -?> -