Initial commit
This commit is contained in:
25
playarea/plugins/bive-admin-panel/scripts/links.php
Normal file
25
playarea/plugins/bive-admin-panel/scripts/links.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
defined( 'ROOT_DIR' ) || exit;
|
||||
|
||||
$b->admin_page_set("system", "links", "Ссылки", array(), "bive_links_page", false, "link");
|
||||
|
||||
function bive_links_page()
|
||||
{
|
||||
global $b;
|
||||
$b->template_load("bive-admin-panel/template/links/links.php");
|
||||
}
|
||||
|
||||
$b->event_add("bive_edit_links", "bive_edit_links");
|
||||
|
||||
function bive_edit_links($args)
|
||||
{
|
||||
global $b;
|
||||
$bive_fragment_replacement = $args["bive_fragment_replacement"];
|
||||
$bive_fragment_filling = $args["bive_fragment_filling"];
|
||||
$b->db_query("UPDATE bive_settings SET value = REPLACE(value, ?, ?) WHERE INSTR(value, ?) > 0;", array($bive_fragment_replacement, $bive_fragment_filling, $bive_fragment_replacement));
|
||||
$b->db_query("UPDATE bive_items_props SET prop_value = REPLACE(prop_value, ?, ?) WHERE INSTR(prop_value, ?) > 0;", array($bive_fragment_replacement, $bive_fragment_filling, $bive_fragment_replacement));
|
||||
$b->alerts_add("Ссылки на сайте обновлены!", "notice", "b_link_update");
|
||||
$b->router_refresh();
|
||||
exit();
|
||||
}
|
||||
Reference in New Issue
Block a user