diff options
author | Malf Furious <m@lfurio.us> | 2018-09-16 22:25:22 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-09-16 22:25:22 -0400 |
commit | 9830d73b6819c4930bd96cc657b42aa3a10d8d66 (patch) | |
tree | 7dbca07c6b4efa21fe5f1955e475c4d4d0c21f1b /examples/common.mod.php | |
parent | 964560d85d4b98dd503184542f71c5f6880e72ac (diff) | |
download | scrott-9830d73b6819c4930bd96cc657b42aa3a10d8d66.tar.gz scrott-9830d73b6819c4930bd96cc657b42aa3a10d8d66.zip |
Remove old content
Diffstat (limited to '')
-rw-r--r-- | examples/common.mod.php | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/examples/common.mod.php b/examples/common.mod.php index 6cba871..0d740ef 100644 --- a/examples/common.mod.php +++ b/examples/common.mod.php @@ -1,54 +1,5 @@ <?php -/* - * SCROTT Copyright (C) 2016 Malf Furious - * - * Scrott is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published - * by the Free Software Foundation, either version 3 of the License, - * or (at your option) any later version. - * - * Scrott is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public - * License for more details. - */ - -require_once "model/master.mod.php"; -require_once "class/form.class.php"; -require_once "class/setting.class.php"; -require_once "class/object.class.php"; -require_once "class/user.class.php"; -require_once "class/group.class.php"; - -class CommonModel extends MasterModel -{ - var $HEAD_IMG_MAX_SIZE = 1048576; // 1MB - var $HEAD_IMG_MIME = array( - "image/jpg", - "image/jpeg" - ); - - /* - * Constructor - */ - function __construct($guid = null) - { - parent::__construct(); - $this->first_setting_tab_active = 0; - $this->first_setting_tab_disp = 0; - $this->common_handleFormSubmissions($_REQUEST['input'], $_FILES['attachment']); - - if (!is_null($guid)) - { - $this->obj = new DBObject($guid); - $this->owner = $this->obj->getOwner(); - $this->members = $this->obj->getMembers(); - } - - $this->common_deflt(); - } - /* * Default action */ @@ -84,41 +35,6 @@ class CommonModel extends MasterModel } /* - * Handle form submissions from common views - */ - function common_handleFormSubmissions($input, $attachment) - { - switch ($input['action']) - { - case "common-group-add": $this->addNewGroup($input); break; - case "common-setting-group": $this->saveSettingGroup($input, $attachment); break; - case "common-setting-user": $this->saveSettingUser($input, $attachment); break; - case "common-setting-admin": $this->saveSettingAdmin($input); break; - case "common-setting-allusers-adduser": $this->saveSettingAllusersAdduser($input); break; - case "common-setting-allusers-edituser": $this->saveSettingAllusersEdituser($input, $attachment); break; - case "common-setting-allusers-deluser": $this->saveSettingAllusersDeluser($input); break; - } - } - - /* - * Create a new user group - */ - function addNewGroup($input) - { - $form = new Form(); - $form->field_text("name"); - - if (!$form->populate($input)) - { - $this->logFormErrors($form); - return; - } - - $group = new Group(); - $group->createNewGroup($form->name, $this->getCurrentUser()); - } - - /* * Save changes to user group settings */ function saveSettingGroup($input, $attachment) @@ -465,33 +381,4 @@ class CommonModel extends MasterModel } } - /* - * Set CSS class for the first tab title in the setting modal only - */ - function getSettingModalTabActiveClass() - { - if (!$this->first_setting_tab_active) - { - $this->first_setting_tab_active = 1; - return "active"; - } - - return ""; - } - - /* - * Set CSS classes for the first tab in the setting modal only - */ - function getSettingModalTabDispClasses() - { - if (!$this->first_setting_tab_disp) - { - $this->first_setting_tab_disp = 1; - return "in active"; - } - - return ""; - } -} - ?> |