insertRow("badwords",array('word' => ''.$word.'','replacement' => ''.$replacement.'')); //----------------------------------------------------------------- // Write Log //----------------------------------------------------------------- $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc3'].' badwords the badword -> \''.$word.'\'','date' => ''.time().'')); //----------------------------------------------------------------- // Add the badword //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/badwords&i=72"); break; //----------------------------------------------------------------- // Delete badword //----------------------------------------------------------------- case 2: //----------------------------------------------------------------- // Write Log //----------------------------------------------------------------- $checker = $db->getLine("SELECT * FROM badwords WHERE id = '$d'"); $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc'].' badwords the badword -> \''.$checker['word'].'\'','date' => ''.time().'')); //----------------------------------------------------------------- // Delete the badword //----------------------------------------------------------------- $db->deleteRow("badwords","id = '$d'"); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/badwords&i=73"); break; //----------------------------------------------------------------- // Update badwords //----------------------------------------------------------------- case 3: //----------------------------------------------------------------- // Begin Check //----------------------------------------------------------------- foreach($word as $idx=>$val) if(!$word[$idx]){ header("location: $PHP_SELF?n=modules/badwords&i=75"); exit; } foreach($replacement as $idx=>$val) if(!$replacement[$idx]){ header("location: $PHP_SELF?n=modules/badwords&i=76"); exit; } //----------------------------------------------------------------- // Save the badwords //----------------------------------------------------------------- foreach($word as $idx=>$val) $db->query("Update `badwords` set `word` = '$val' WHERE `id` = '$idx'"); foreach($replacement as $idx=>$val) $db->query("Update `badwords` set `replacement` = '$val' WHERE `id` = '$idx'"); //----------------------------------------------------------------- // Write Log //----------------------------------------------------------------- $db->insertRow("log",array('user_id' => ''.$_SESSION['id'].'','user_user' => ''.$_SESSION['username'].'','log' => ''.$language['Logs desc2'].' badwords','date' => ''.time().'')); //----------------------------------------------------------------- // Redirect when finished //----------------------------------------------------------------- header("location: $PHP_SELF?n=modules/badwords&i=74"); break; //----------------------------------------------------------------- // View Badwords Form //----------------------------------------------------------------- default: //----------------------------------------------------------------- // Load Badwords table //----------------------------------------------------------------- $badwords_db = $db->getTable("SELECT * FROM badwords"); if($badwords_db != FALSE) { foreach($badwords_db as $idx=>$badword) { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $layout .= " {$language[ "; } } else { //----------------------------------------------------------------- // Make Layout //----------------------------------------------------------------- $layout .= " {$language['Bad words form desc6']} \n"; } //----------------------------------------------------------------- // Echo the back link //----------------------------------------------------------------- echo "
{$language['Admin name']}
» {$language['Admin back']}

"; ?>
'>


' tabindex='3'>