示例#1
0
文件: index.php 项目: zeshan321/AYC
if (!isset($_SESSION['login_user'])) {
    header("location: login");
}
if (isset($_POST['selectedYear']) && isset($_POST['sectionInput'])) {
    createSection($_POST['sectionInput'], $_POST['selectedYear']);
    header("location: index?year=" . $_POST['selectedYear']);
}
if (isset($_POST['yearInput'])) {
    createYear($_POST['yearInput']);
    header("location: index?year=" . $_POST['yearInput']);
}
if (isset($_POST['deletevideoid'])) {
    deleteVideo($_POST['deletevideoid']);
}
if (isset($_POST['deleteyearid'])) {
    deleteYear($_POST['deleteyearid']);
}
if (isset($_POST['updatesectionInput']) && isset($_POST['updatesectionold']) && isset($_POST['sectionsid']) && isset($_POST['updatesectionyear'])) {
    if ($_POST['updatesectionInput'] != "") {
        updateSection($_POST['updatesectionold'], $_POST['updatesectionInput'], $_POST['sectionsid'], $_POST['updatesectionyear']);
        header("location: index?year=" . $_POST['updatesectionyear'] . "&section=" . $_POST['updatesectionInput']);
    } else {
        deleteSection($_POST['updatesectionold'], $_POST['updatesectionyear']);
        header("location: index?year=" . $_POST['updatesectionyear'] . "&section=" . $_POST['updatesectionold']);
    }
}
?>
 
<!DOCTYPE html>
<html>
<head>
     saveYear($_REQUEST);
     break;
 case "showyeareditor":
     showYearEditor($_REQUEST['year']);
     break;
 case "showusereditor":
     showUserEditor($_REQUEST['userid'], $_REQUEST['add']);
     break;
 case "deleteuser":
     deleteUser($_REQUEST['user']);
     break;
 case "addyear":
     addYear($_REQUEST['year']);
     break;
 case "deleteyear":
     deleteYear($_REQUEST['year']);
     break;
 case "addgroup":
     addGroup($_REQUEST['group']);
     break;
 case "deletegroup":
     print deleteGroup($_REQUEST['group']);
     break;
 case "deleteblockeduser":
     deleteBlockedUser($_REQUEST['user']);
     break;
 case "addblockeduser":
     addBlockedUser($_REQUEST['user']);
     break;
 case "removependingpayment":
     removePendingPayment($_REQUEST);