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'); - -?> -
-

Censoring

-
-
-
-
- Add word -
-

Enter a word that you want to censor and the replacement text for this word. Wildcards are accepted (i.e. *some* would match somewhere and lonesome). Censor words also affect usernames. New users will not be able to register with usernames containing any censored words. The search is case insensitive. Censor words must be enabled in Options for this to have any effect.

- - - - - - - - - - - - - - - -
Censored wordReplacement textAction
-
-
-
-
-
- Edit/remove words -
-query('SELECT id, search_for, replace_with FROM '.$pun_db->prefix.'censoring ORDER BY id') or error('Unable to fetch censor word list', __FILE__, __LINE__, $pun_db->error()); -if ($pun_db->num_rows($result)) -{ - -?> - - - - - - - - - -fetch_assoc($result)) - echo "\t\t\t\t\t\t\t\t".''."\n"; - -?> - -
Censored wordReplacement textActions
 
-No censor words in list.

'."\n"; - -?> -
-
-
-
-
-
-
- -