public function doConfigPageInit($page)
 {
     $request = $_REQUEST;
     $action = isset($request['action']) ? $request['action'] : '';
     $password = isset($request['password']) ? $request['password'] : '';
     $fc_description = isset($request['fc_description']) ? $request['fc_description'] : '';
     $day_recording_id = isset($request['day_recording_id']) ? $request['day_recording_id'] : '';
     $night_recording_id = isset($request['night_recording_id']) ? $request['night_recording_id'] : '';
     isset($request['itemid']) ? $itemid = $request['itemid'] : ($itemid = '');
     $extdisplay = isset($request['extdisplay']) ? $request['extdisplay'] : '';
     switch ($action) {
         case "add":
         case "edit":
         case "edited":
             \daynight_edit($request, $itemid);
             \needreload();
             $_REQUEST['view'] = null;
             break;
         case "delete":
             \daynight_del($itemid);
             \needreload();
             $_REQUEST['view'] = null;
             break;
     }
 }
Beispiel #2
0
        $color = $dnobj['state'] == 'DAY' ? "style='color:green'" : "style='color:red'";
        echo "<li><a {$color} id=\"" . ($itemid == $code['ext'] ? 'current' : '') . "\" href=\"config.php?display=" . urlencode($dispnum) . "&itemid=" . urlencode($code['ext']) . "&action=edit\">({$fc}) {$code['dest']}</a></li>";
    }
}
?>
</ul></div>
<?php 
switch ($action) {
    case "add":
        daynight_show_edit($_POST, 'add');
        break;
    case "edit":
        daynight_show_edit($_POST);
        break;
    case "edited":
        daynight_edit($_POST, $itemid);
        redirect_standard('itemid');
        break;
    case "delete":
        daynight_del($itemid);
        redirect_standard();
        break;
    default:
        daynight_show_edit($_POST, 'add');
        break;
}
function daynight_show_edit($post, $add = "")
{
    global $db;
    global $itemid;
    $fcc = new featurecode('daynight', 'toggle-mode-' . $itemid);