Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: mycode.php 4151 2008-08-26 04:39:31Z Tikitiki $
| * $Id: mycode.php 4399 2009-07-18 15:29:20Z RyanGordon $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 21 | Zeile 21 |
---|
if($mybb->input['action'] == "toggle_status") {
|
if($mybb->input['action'] == "toggle_status") {
|
| if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=config/mycode"); }
|
$plugins->run_hooks("admin_config_mycode_toggle_status"); $query = $db->simple_select("mycode", "*", "cid='".intval($mybb->input['cid'])."'");
| $plugins->run_hooks("admin_config_mycode_toggle_status"); $query = $db->simple_select("mycode", "*", "cid='".intval($mybb->input['cid'])."'");
|
Zeile 110 | Zeile 116 |
---|
$new_mycode = array( 'title' => $db->escape_string($mybb->input['title']), 'description' => $db->escape_string($mybb->input['description']),
|
$new_mycode = array( 'title' => $db->escape_string($mybb->input['title']), 'description' => $db->escape_string($mybb->input['description']),
|
'regex' => $db->escape_string($mybb->input['regex']),
| 'regex' => $db->escape_string(str_replace("\x0", "", $mybb->input['regex'])),
|
'replacement' => $db->escape_string($mybb->input['replacement']), 'active' => $db->escape_string($mybb->input['active']), 'parseorder' => intval($mybb->input['parseorder'])
| 'replacement' => $db->escape_string($mybb->input['replacement']), 'active' => $db->escape_string($mybb->input['active']), 'parseorder' => intval($mybb->input['parseorder'])
|
Zeile 236 | Zeile 242 |
---|
$mycode = array( 'title' => $db->escape_string($mybb->input['title']), 'description' => $db->escape_string($mybb->input['description']),
|
$mycode = array( 'title' => $db->escape_string($mybb->input['title']), 'description' => $db->escape_string($mybb->input['description']),
|
'regex' => $db->escape_string($mybb->input['regex']),
| 'regex' => $db->escape_string(str_replace("\x0", "", $mybb->input['regex'])),
|
'replacement' => $db->escape_string($mybb->input['replacement']), 'active' => $db->escape_string($mybb->input['active']), 'parseorder' => intval($mybb->input['parseorder'])
| 'replacement' => $db->escape_string($mybb->input['replacement']), 'active' => $db->escape_string($mybb->input['active']), 'parseorder' => intval($mybb->input['parseorder'])
|
Zeile 404 | Zeile 410 |
---|
$popup = new PopupMenu("mycode_{$mycode['cid']}", $lang->options); $popup->add_item($lang->edit_mycode, "index.php?module=config/mycode&action=edit&cid={$mycode['cid']}");
|
$popup = new PopupMenu("mycode_{$mycode['cid']}", $lang->options); $popup->add_item($lang->edit_mycode, "index.php?module=config/mycode&action=edit&cid={$mycode['cid']}");
|
$popup->add_item($phrase, "index.php?module=config/mycode&action=toggle_status&cid={$mycode['cid']}");
| $popup->add_item($phrase, "index.php?module=config/mycode&action=toggle_status&cid={$mycode['cid']}&my_post_key={$mybb->post_code}");
|
$popup->add_item($lang->delete_mycode, "index.php?module=config/mycode&action=delete&cid={$mycode['cid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_mycode_deletion}')"); $table->construct_cell($popup->fetch(), array('class' => 'align_center')); $table->construct_row();
| $popup->add_item($lang->delete_mycode, "index.php?module=config/mycode&action=delete&cid={$mycode['cid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->confirm_mycode_deletion}')"); $table->construct_cell($popup->fetch(), array('class' => 'align_center')); $table->construct_row();
|
Zeile 424 | Zeile 430 |
---|
function test_regex($regex, $replacement, $test) { $array = array();
|
function test_regex($regex, $replacement, $test) { $array = array();
|
$array['actual'] = @preg_replace("#".$regex."#si", $replacement, $test);
| $array['actual'] = @preg_replace("#".str_replace("\x0", "", $regex)."#si", $replacement, $test);
|
$array['html'] = htmlspecialchars($array['actual']); return $array; }
| $array['html'] = htmlspecialchars($array['actual']); return $array; }
|