Esempio n. 1
0
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate(ew_GetUrl("login.php"));
     }
     $Security->TablePermission_Loading();
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     $Security->TablePermission_Loaded();
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate(ew_GetUrl("messageslist.php"));
     }
     // Create form object
     $objForm = new cFormObj();
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
 }
Esempio n. 2
0
 function Page_Init()
 {
     global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate("cciaglogin.php");
     }
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate("cciagsocioslist.php");
     }
     // Create form object
     $objForm = new cFormObj();
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up curent action
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
 }
Esempio n. 3
0
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // User profile
     $UserProfile = new cUserProfile();
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loading();
     }
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loaded();
     }
     if (!$Security->CanDelete()) {
         $Security->SaveLastUrl();
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         if ($Security->CanList()) {
             $this->Page_Terminate(ew_GetUrl("cardlist.php"));
         } else {
             $this->Page_Terminate(ew_GetUrl("login.php"));
         }
     }
     if ($Security->IsLoggedIn()) {
         $Security->UserID_Loading();
         $Security->LoadUserID();
         $Security->UserID_Loaded();
         if (strval($Security->CurrentUserID()) == "") {
             $this->setFailureMessage($Language->Phrase("NoPermission"));
             // Set no permission
             $this->Page_Terminate(ew_GetUrl("cardlist.php"));
         }
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Create Token
     $this->CreateToken();
 }
Esempio n. 4
0
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate(ew_GetUrl("cciag_login.php"));
     }
     $Security->TablePermission_Loading();
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     $Security->TablePermission_Loaded();
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate(ew_GetUrl("cciag_deudaslist.php"));
     }
     // Get export parameters
     $custom = "";
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
         $custom = @$_GET["custom"];
     } elseif (@$_POST["export"] != "") {
         $this->Export = $_POST["export"];
         $custom = @$_POST["custom"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
         $custom = @$_POST["custom"];
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     if (@$_GET["id"] != "") {
         if ($gsExportFile != "") {
             $gsExportFile .= "_";
         }
         $gsExportFile .= ew_StripSlashes($_GET["id"]);
     }
     // Get custom export parameters
     if ($this->Export != "" && $custom != "") {
         $this->CustomExport = $this->Export;
         $this->Export = "print";
     }
     $gsCustomExport = $this->CustomExport;
     $gsExport = $this->Export;
     // Get export parameter, used in header
     // Update Export URLs
     if (defined("EW_USE_PHPEXCEL")) {
         $this->ExportExcelCustom = FALSE;
     }
     if ($this->ExportExcelCustom) {
         $this->ExportExcelUrl .= "&custom=1";
     }
     if (defined("EW_USE_PHPWORD")) {
         $this->ExportWordCustom = FALSE;
     }
     if ($this->ExportWordCustom) {
         $this->ExportWordUrl .= "&custom=1";
     }
     if ($this->ExportPdfCustom) {
         $this->ExportPdfUrl .= "&custom=1";
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Setup export options
     $this->SetupExportOptions();
     $this->id->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         // Process auto fill for detail table 'detalle_deudas'
         if (@$_POST["grid"] == "fdetalle_deudasgrid") {
             if (!isset($GLOBALS["detalle_deudas_grid"])) {
                 $GLOBALS["detalle_deudas_grid"] = new cdetalle_deudas_grid();
             }
             $GLOBALS["detalle_deudas_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         // Process auto fill for detail table 'pagos'
         if (@$_POST["grid"] == "fpagosgrid") {
             if (!isset($GLOBALS["pagos_grid"])) {
                 $GLOBALS["pagos_grid"] = new cpagos_grid();
             }
             $GLOBALS["pagos_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
 }
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate(ew_GetUrl("login.php"));
     }
     $Security->TablePermission_Loading();
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     $Security->TablePermission_Loaded();
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate(ew_GetUrl("gastos_mantenimientoslist.php"));
     }
     // Get grid add count
     $gridaddcnt = @$_GET[EW_TABLE_GRID_ADD_ROW_COUNT];
     if (is_numeric($gridaddcnt) && $gridaddcnt > 0) {
         $this->GridAddRowCount = $gridaddcnt;
     }
     // Set up list options
     $this->SetupListOptions();
     $this->codigo->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
     // Setup other options
     $this->SetupOtherOptions();
 }
Esempio n. 6
0
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // User profile
     $UserProfile = new cUserProfile();
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loading();
     }
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loaded();
     }
     if (!$Security->CanList()) {
         $Security->SaveLastUrl();
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate(ew_GetUrl("index.php"));
     }
     if ($Security->IsLoggedIn()) {
         $Security->UserID_Loading();
         $Security->LoadUserID();
         $Security->UserID_Loaded();
         if (strval($Security->CurrentUserID()) == "") {
             $this->setFailureMessage($Language->Phrase("NoPermission"));
             // Set no permission
             $this->Page_Terminate();
         }
     }
     // Get export parameters
     $custom = "";
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
         $custom = @$_GET["custom"];
     } elseif (@$_POST["export"] != "") {
         $this->Export = $_POST["export"];
         $custom = @$_POST["custom"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
         $custom = @$_POST["custom"];
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     // Get custom export parameters
     if ($this->Export != "" && $custom != "") {
         $this->CustomExport = $this->Export;
         $this->Export = "print";
     }
     $gsCustomExport = $this->CustomExport;
     $gsExport = $this->Export;
     // Get export parameter, used in header
     // Update Export URLs
     if (defined("EW_USE_PHPEXCEL")) {
         $this->ExportExcelCustom = FALSE;
     }
     if ($this->ExportExcelCustom) {
         $this->ExportExcelUrl .= "&custom=1";
     }
     if (defined("EW_USE_PHPWORD")) {
         $this->ExportWordCustom = FALSE;
     }
     if ($this->ExportWordCustom) {
         $this->ExportWordUrl .= "&custom=1";
     }
     if ($this->ExportPdfCustom) {
         $this->ExportPdfUrl .= "&custom=1";
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Get grid add count
     $gridaddcnt = @$_GET[EW_TABLE_GRID_ADD_ROW_COUNT];
     if (is_numeric($gridaddcnt) && $gridaddcnt > 0) {
         $this->GridAddRowCount = $gridaddcnt;
     }
     // Set up list options
     $this->SetupListOptions();
     // Setup export options
     $this->SetupExportOptions();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
     // Setup other options
     $this->SetupOtherOptions();
     // Set up custom action (compatible with old version)
     foreach ($this->CustomActions as $name => $action) {
         $this->ListActions->Add($name, $action);
     }
     // Show checkbox column if multiple action
     foreach ($this->ListActions->Items as $listaction) {
         if ($listaction->Select == EW_ACTION_MULTIPLE && $listaction->Allow) {
             $this->ListOptions->Items["checkbox"]->Visible = TRUE;
             break;
         }
     }
 }
Esempio n. 7
0
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate(ew_GetUrl("cciag_login.php"));
     }
     $Security->TablePermission_Loading();
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     $Security->TablePermission_Loaded();
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate(ew_GetUrl("cciag_socioslist.php"));
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     $this->socio_nro->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         // Process auto fill for detail table 'socios_detalles'
         if (@$_POST["grid"] == "fsocios_detallesgrid") {
             if (!isset($GLOBALS["socios_detalles_grid"])) {
                 $GLOBALS["socios_detalles_grid"] = new csocios_detalles_grid();
             }
             $GLOBALS["socios_detalles_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         // Process auto fill for detail table 'socios_cuotas'
         if (@$_POST["grid"] == "fsocios_cuotasgrid") {
             if (!isset($GLOBALS["socios_cuotas_grid"])) {
                 $GLOBALS["socios_cuotas_grid"] = new csocios_cuotas_grid();
             }
             $GLOBALS["socios_cuotas_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         // Process auto fill for detail table 'deudas'
         if (@$_POST["grid"] == "fdeudasgrid") {
             if (!isset($GLOBALS["deudas_grid"])) {
                 $GLOBALS["deudas_grid"] = new cdeudas_grid();
             }
             $GLOBALS["deudas_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
 }
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate(ew_GetUrl("login.php"));
     }
     $Security->TablePermission_Loading();
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     $Security->TablePermission_Loaded();
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate();
     }
     // Get export parameters
     $custom = "";
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
         $custom = @$_GET["custom"];
     } elseif (@$_POST["export"] != "") {
         $this->Export = $_POST["export"];
         $custom = @$_POST["custom"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
         $custom = @$_POST["custom"];
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     // Get custom export parameters
     if ($this->Export != "" && $custom != "") {
         $this->CustomExport = $this->Export;
         $this->Export = "print";
     }
     $gsCustomExport = $this->CustomExport;
     $gsExport = $this->Export;
     // Get export parameter, used in header
     // Update Export URLs
     if (defined("EW_USE_PHPEXCEL")) {
         $this->ExportExcelCustom = FALSE;
     }
     if ($this->ExportExcelCustom) {
         $this->ExportExcelUrl .= "&custom=1";
     }
     if (defined("EW_USE_PHPWORD")) {
         $this->ExportWordCustom = FALSE;
     }
     if ($this->ExportWordCustom) {
         $this->ExportWordUrl .= "&custom=1";
     }
     if ($this->ExportPdfCustom) {
         $this->ExportPdfUrl .= "&custom=1";
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Get grid add count
     $gridaddcnt = @$_GET[EW_TABLE_GRID_ADD_ROW_COUNT];
     if (is_numeric($gridaddcnt) && $gridaddcnt > 0) {
         $this->GridAddRowCount = $gridaddcnt;
     }
     // Set up list options
     $this->SetupListOptions();
     // Setup export options
     $this->SetupExportOptions();
     $this->codigo->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Process auto fill
     if (@$_POST["ajax"] == "autofill") {
         // Process auto fill for detail table 'gastos_mantenimientos'
         if (@$_POST["grid"] == "fgastos_mantenimientosgrid") {
             if (!isset($GLOBALS["gastos_mantenimientos_grid"])) {
                 $GLOBALS["gastos_mantenimientos_grid"] = new cgastos_mantenimientos_grid();
             }
             $GLOBALS["gastos_mantenimientos_grid"]->Page_Init();
             $this->Page_Terminate();
             exit;
         }
         $results = $this->GetAutoFill(@$_POST["name"], @$_POST["q"]);
         if ($results) {
             // Clean output buffer
             if (!EW_DEBUG_ENABLED && ob_get_length()) {
                 ob_end_clean();
             }
             echo $results;
             $this->Page_Terminate();
             exit;
         }
     }
     // Create Token
     $this->CreateToken();
     // Setup other options
     $this->SetupOtherOptions();
     // Set "checkbox" visible
     if (count($this->CustomActions) > 0) {
         $this->ListOptions->Items["checkbox"]->Visible = TRUE;
     }
 }
 function Page_Init()
 {
     global $gsExport, $gsCustomExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // User profile
     $UserProfile = new cUserProfile();
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loading();
     }
     $Security->LoadCurrentUserLevel($this->ProjectID . $this->TableName);
     if ($Security->IsLoggedIn()) {
         $Security->TablePermission_Loaded();
     }
     if (!$Security->CanView()) {
         $Security->SaveLastUrl();
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         if ($Security->CanList()) {
             $this->Page_Terminate(ew_GetUrl("reservationlist.php"));
         } else {
             $this->Page_Terminate(ew_GetUrl("login.php"));
         }
     }
     if ($Security->IsLoggedIn()) {
         $Security->UserID_Loading();
         $Security->LoadUserID();
         $Security->UserID_Loaded();
         if (strval($Security->CurrentUserID()) == "") {
             $this->setFailureMessage($Language->Phrase("NoPermission"));
             // Set no permission
             $this->Page_Terminate(ew_GetUrl("reservationlist.php"));
         }
     }
     // Get export parameters
     $custom = "";
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
         $custom = @$_GET["custom"];
     } elseif (@$_POST["export"] != "") {
         $this->Export = $_POST["export"];
         $custom = @$_POST["custom"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
         $custom = @$_POST["custom"];
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     if (@$_GET["RESERVATION_ID"] != "") {
         if ($gsExportFile != "") {
             $gsExportFile .= "_";
         }
         $gsExportFile .= ew_StripSlashes($_GET["RESERVATION_ID"]);
     }
     // Get custom export parameters
     if ($this->Export != "" && $custom != "") {
         $this->CustomExport = $this->Export;
         $this->Export = "print";
     }
     $gsCustomExport = $this->CustomExport;
     $gsExport = $this->Export;
     // Get export parameter, used in header
     // Update Export URLs
     if (defined("EW_USE_PHPEXCEL")) {
         $this->ExportExcelCustom = FALSE;
     }
     if ($this->ExportExcelCustom) {
         $this->ExportExcelUrl .= "&custom=1";
     }
     if (defined("EW_USE_PHPWORD")) {
         $this->ExportWordCustom = FALSE;
     }
     if ($this->ExportWordCustom) {
         $this->ExportWordUrl .= "&custom=1";
     }
     if ($this->ExportPdfCustom) {
         $this->ExportPdfUrl .= "&custom=1";
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up current action
     // Setup export options
     $this->SetupExportOptions();
     $this->RESERVATION_ID->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Check token
     if (!$this->ValidPost()) {
         echo $Language->Phrase("InvalidPostRequest");
         $this->Page_Terminate();
         exit;
     }
     // Create Token
     $this->CreateToken();
 }
Esempio n. 10
0
 function Page_Init()
 {
     global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate("cciaglogin.php");
     }
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate();
     }
     // Get export parameters
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExport = $this->Export;
     // Get export parameter, used in header
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up curent action
     // Get grid add count
     $gridaddcnt = @$_GET[EW_TABLE_GRID_ADD_ROW_COUNT];
     if (is_numeric($gridaddcnt) && $gridaddcnt > 0) {
         $this->GridAddRowCount = $gridaddcnt;
     }
     // Set up list options
     $this->SetupListOptions();
     // Setup export options
     $this->SetupExportOptions();
     $this->socio_nro->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     $this->id_usuario->Visible = !$this->IsAddOrEdit();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Setup other options
     $this->SetupOtherOptions();
     // Set "checkbox" visible
     if (count($this->CustomActions) > 0) {
         $this->ListOptions->Items["checkbox"]->Visible = TRUE;
     }
     // Update url if printer friendly for Pdf
     if ($this->PrinterFriendlyForPdf) {
         $this->ExportOptions->Items["pdf"]->Body = str_replace($this->ExportPdfUrl, $this->ExportPrintUrl . "&pdf=1", $this->ExportOptions->Items["pdf"]->Body);
     }
 }
Esempio n. 11
0
 function Page_Init()
 {
     global $gsExport, $gsExportFile, $UserProfile, $Language, $Security, $objForm;
     // Security
     $Security = new cAdvancedSecurity();
     if (!$Security->IsLoggedIn()) {
         $Security->AutoLogin();
     }
     if (!$Security->IsLoggedIn()) {
         $Security->SaveLastUrl();
         $this->Page_Terminate("cciaglogin.php");
     }
     $Security->UserID_Loading();
     if ($Security->IsLoggedIn()) {
         $Security->LoadUserID();
     }
     $Security->UserID_Loaded();
     if ($Security->IsLoggedIn() && strval($Security->CurrentUserID()) == "") {
         $this->setFailureMessage($Language->Phrase("NoPermission"));
         // Set no permission
         $this->Page_Terminate("cciagusuariolist.php");
     }
     // Get export parameters
     if (@$_GET["export"] != "") {
         $this->Export = $_GET["export"];
     } elseif (ew_IsHttpPost()) {
         if (@$_POST["exporttype"] != "") {
             $this->Export = $_POST["exporttype"];
         }
     } else {
         $this->setExportReturnUrl(ew_CurrentUrl());
     }
     $gsExport = $this->Export;
     // Get export parameter, used in header
     $gsExportFile = $this->TableVar;
     // Get export file, used in header
     if (@$_GET["id"] != "") {
         if ($gsExportFile != "") {
             $gsExportFile .= "_";
         }
         $gsExportFile .= ew_StripSlashes($_GET["id"]);
     }
     $this->CurrentAction = @$_GET["a"] != "" ? $_GET["a"] : @$_POST["a_list"];
     // Set up curent action
     // Setup export options
     $this->SetupExportOptions();
     $this->id->Visible = !$this->IsAdd() && !$this->IsCopy() && !$this->IsGridAdd();
     // Global Page Loading event (in userfn*.php)
     Page_Loading();
     // Page Load event
     $this->Page_Load();
     // Update url if printer friendly for Pdf
     if ($this->PrinterFriendlyForPdf) {
         $this->ExportOptions->Items["pdf"]->Body = str_replace($this->ExportPdfUrl, $this->ExportPrintUrl . "&pdf=1", $this->ExportOptions->Items["pdf"]->Body);
     }
 }