$smarty_obj->assign("PRIMARYMODULES", $ITS4YouReports->getPrimaryModules()); $smarty_obj->assign("FOLDERID", vtlib_purify($_REQUEST['folder'])); $smarty_obj->assign("REP_FOLDERS", $ITS4YouReports->getReportFolders()); if (!isset($_REQUEST["mode"])) { // ReportsStep2 $smarty_obj = $ITS4YouReports->getSelectedValuesToSmarty($smarty_obj, "all"); // ReportGrouping // ReportColumns $RC_BLOCK2 = $ITS4YouReports->getSelectedColumnsList($ITS4YouReports->selected_columns_list_arr); $smarty_obj->assign("RC_BLOCK2", $RC_BLOCK2); } $tool_buttons = Button_Check($currentModule); $tool_buttons["Import"] = "no"; $tool_buttons["Export"] = "no"; $smarty_obj->assign('CHECK', $tool_buttons); if ($ITS4YouReports->CheckPermissions("EDIT")) { $smarty_obj->assign("EXPORT", "yes"); } if ($ITS4YouReports->CheckPermissions("EDIT") && $ITS4YouReports->GetVersionType() != "deactivate") { $smarty_obj->assign("EDIT", "permitted"); $smarty_obj->assign("IMPORT", "yes"); } if ($ITS4YouReports->CheckPermissions("DELETE") && $ITS4YouReports->GetVersionType() != "deactivate") { $smarty_obj->assign("DELETE", "permitted"); } $theme_path = "themes/" . $theme . "/"; $image_path = $theme_path . "images/"; $smarty_obj->assign("IMAGE_PATH", $image_path); $smarty_obj->assign("THEME_PATH", $theme_path); $smarty_obj->assign("ERROR_MSG", getTranslatedString('LBL_NO_PERMISSION', $currentModule)); $smarty_obj->display(vtlib_getModuleTemplate($currentModule, "EditReports4You.tpl"));
<?php /*+******************************************************************************** * The content of this file is subject to the Reports 4 You license. * ("License"); You may not use this file except in compliance with the License * The Initial Developer of the Original Code is IT-Solutions4You s.r.o. * Portions created by IT-Solutions4You s.r.o. are Copyright(C) IT-Solutions4You s.r.o. * All Rights Reserved. ********************************************************************************/ require_once 'modules/ITS4YouReports/ITS4YouReports.php'; $ITS4YouReports = new ITS4YouReports(); if (isset($_REQUEST['idlist']) && $_REQUEST['idlist'] != "") { if ($ITS4YouReports->CheckPermissions("DELETE") == false) { $ITS4YouReports->DieDuePermission(); } $id_array = array(); $idlist = trim($_REQUEST['idlist'], ";"); $id_array = explode(";", $idlist); for ($i = 0; $i < count($id_array); $i++) { $ITS4YouReports->deleteReports4You($id_array[$i]); } } elseif (isset($_REQUEST['record']) && $_REQUEST['record'] != "") { $recordid = vtlib_purify($_REQUEST['record']); $r_permitted = $ITS4YouReports->CheckReportPermissions($ITS4YouReports->primarymodule, $ITS4YouReports->record); $ITS4YouReports->deleteSingleReports4You(); } header("Location:index.php?module=ITS4YouReports&action=index&parenttab=Tools"); exit;