Пример #1
0
JArrayHelper::toInteger($cid, array(0));
switch ($task) {
    case 'add':
        editStudent(false);
        break;
    case 'edit':
        editStudent(true);
        break;
    case 'apply':
    case 'save':
    case 'save2new':
    case 'save2copy':
        saveStudent($task);
        break;
    case 'remove':
        removeStudent($cid);
        break;
    case 'publish':
        changeStudent($cid, 1);
        break;
    case 'unpublish':
        changeStudent($cid, 0);
        break;
    case 'orderup':
        orderStudent($cid[0], -1);
        break;
    case 'orderdown':
        orderStudent($cid[0], 1);
        break;
    case 'accesspublic':
        changeAccess($cid[0], 0);
Пример #2
0
                        $isExecutedSuccessful = changestudentUsername($studentUsername, $studentId);
                    }
                    if (!empty($_POST['studentPassword'])) {
                        $studentPassword = $_POST['studentPassword'];
                        $isExecutedSuccessful = changestudentPassword($studentPassword, $studentId);
                    }
                }
            } else {
                if ($submit == 'transfer') {
                    if (!empty($_POST['selectedStudentId']) && !empty($_POST['selectedDepartmentIdTo'])) {
                        $studentId = $_POST['selectedStudentId'];
                        $departmentIdTo = $_POST['selectedDepartmentIdTo'];
                        $isExecutedSuccessful = transferStudent($studentId, $departmentIdTo);
                    }
                } else {
                    if ($submit == 'remove') {
                        if (!empty($_POST['selectedStudentId'])) {
                            $studentId = $_POST['selectedStudentId'];
                            $isExecutedSuccessful = removeStudent($studentId);
                        }
                    }
                }
            }
        }
    }
}
if (!empty($isExecutedSuccessful)) {
    echo queryStatusMessage($isExecutedSuccessful);
} else {
    echo emptyFormMessage();
}