示例#1
0
(at your option) any later version.

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';
Session::checkRight("config", "w");
$plugin = new Plugin();
if ($plugin->isActivated("resources")) {
    $cat = new PluginResourcesTicketCategory();
    if (isset($_POST["add_ticket"])) {
        $cat->addTicketCategory($_POST['ticketcategories_id']);
        Html::back();
    } else {
        if (isset($_POST["delete_ticket"])) {
            foreach ($_POST["item"] as $key => $val) {
                if ($val == 1) {
                    $cat->delete(array('id' => $key));
                }
            }
            Html::back();
        } else {
            Html::header(PluginResourcesResource::getTypeName(2), '', "plugins", "resources");
            $cat->showForm($_SERVER['PHP_SELF']);
        }
示例#2
0
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = "";
}
if (!isset($_GET["withtemplate"])) {
    $_GET["withtemplate"] = "";
}
$resource = new PluginResourcesResource();
$checklist = new PluginResourcesChecklist();
$checklistconfig = new PluginResourcesChecklistconfig();
$employee = new PluginResourcesEmployee();
$choice = new PluginResourcesChoice();
$resource_item = new PluginResourcesResource_Item();
$cat = new PluginResourcesTicketCategory();
$task = new PluginResourcesTask();
/////////////////////////////////resource from helpdesk///////////////////////////////
if (isset($_POST["resend"])) {
    $resource->reSendResourceCreation($_POST);
    $resource->redirectToList();
    //from helpdesk
    //add items needs of a resource
} else {
    if (isset($_POST["addhelpdeskitem"])) {
        if ($_POST['plugin_resources_choiceitems_id'] > 0 && $_POST['plugin_resources_resources_id'] > 0) {
            if ($resource->canCreate()) {
                $choice->addHelpdeskItem($_POST);
            }
        }
        Html::back();