Ejemplo n.º 1
0
include_once $eqdkp_root_path . 'plugins/bosssuite/include/libloader.inc.php';
$entity = $_GET['entity'];
$mode = $_GET['mode'];
if ($mode != 'boss' && $mode != 'zone') {
    message_die("Invalid mode: {$mode}");
}
$bs_conf = $mybssql->get_config('bossbase');
// Save the settings
if ($_POST['bpsavebu']) {
    $strings = strip_tags(htmlspecialchars($_POST['strings']));
    $co_offs = intval($_POST['co_offs']);
    $fd_offs = bs_text2date($_POST['fd_offs'], true);
    $ld_offs = bs_text2date($_POST['ld_offs'], false);
    if ($mode == 'zone') {
        $pzrow = $mybssql->get_parse_zone();
        $zone_offsets = $mybssql->get_zone_offsets();
        $show_bp = $_POST['show_bp'] == '1' ? 1 : 0;
        $show_bc = $_POST['show_bc'] == '1' ? 1 : 0;
        $mybssql->update_zone_visibility('bosscounter', $entity, $show_bc);
        $mybssql->update_zone_visibility('bossprogress', $entity, $show_bp);
        $mybssql->update_parse_zone($pzrow, $entity, $strings);
        $mybssql->update_zone_offsets($zone_offsets, $entity, $fd_offs, $ld_offs, $co_offs);
    } else {
        $pbrow = $mybssql->get_parse_boss();
        $boss_offsets = $mybssql->get_boss_offsets();
        $mybssql->update_parse_boss($pbrow, $entity, $strings);
        $mybssql->update_boss_offsets($boss_offsets, $entity, $fd_offs, $ld_offs, $co_offs);
    }
    //Update cache if necessary
    $pm->do_hooks('/plugins/bosssuite/admin/entity_conf.php');
    if ($bs_conf['enable_autoclose'] == 1) {