Пример #1
0
Resources is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with Resources. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
$checklistconfig = new PluginResourcesChecklistconfig();
if (isset($_POST["add"])) {
    $checklistconfig->check(-1, 'w', $_POST);
    $newID = $checklistconfig->add($_POST);
    Html::back();
} else {
    if (isset($_POST["delete"])) {
        $checklistconfig->check($_POST['id'], 'w');
        $checklistconfig->delete($_POST);
        $checklistconfig->redirectToList();
    } else {
        if (isset($_POST["restore"])) {
            $checklistconfig->check($_POST['id'], 'w');
            $checklistconfig->restore($_POST);
            $checklistconfig->redirectToList();
        } else {
            if (isset($_POST["purge"])) {
                $checklistconfig->check($_POST['id'], 'w');