function Page_Terminate($url = "") { global $conn; // Global page unloaded event (in userfn*.php) Page_Unloaded(); // Close Connection $conn->Close(); // Go to url if specified if ($url != "") { ob_end_clean(); header("Location: {$url}"); } exit; }
function Page_Terminate($url = "") { global $conn; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); $this->Page_Redirecting($url); // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn, $gsExportFile, $gTmpImages; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export global $EW_EXPORT, $v_hoja_manteniminto; if ($this->CustomExport != "" && $this->CustomExport == $this->Export && array_key_exists($this->CustomExport, $EW_EXPORT)) { $sContent = ob_get_contents(); if ($gsExportFile == "") { $gsExportFile = $this->TableVar; } $class = $EW_EXPORT[$this->CustomExport]; if (class_exists($class)) { $doc = new $class($v_hoja_manteniminto); $doc->Text = $sContent; if ($this->Export == "email") { echo $this->ExportEmail($doc->Text); } else { $doc->Export(); } ew_DeleteTmpImages(); // Delete temp images exit; } } $this->Page_Redirecting($url); // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn; // Page Unload event $this->Page_Unload(); if ($this->Export == "print" && @$_GET["pdf"] == "1") { // Printer friendly version and with pdf=1 in URL parameters $pdf = new cExportPdf($GLOBALS["Table"]); $pdf->Text = ob_get_contents(); // Set the content as the HTML of current page (printer friendly version) ob_end_clean(); $pdf->Export(); } // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); $this->Page_Redirecting($url); // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn, $ReportLanguage, $EWR_EXPORT, $gsExportFile; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export if ($this->Export != "" && array_key_exists($this->Export, $EWR_EXPORT)) { $sContent = ob_get_contents(); // Remove all <div data-tagid="..." id="orig..." class="hide">...</div> (for customviewtag export, except "googlemaps") if (preg_match_all('/<div\\s+data-tagid=[\'"]([\\s\\S]*?)[\'"]\\s+id=[\'"]orig([\\s\\S]*?)[\'"]\\s+class\\s*=\\s*[\'"]hide[\'"]>([\\s\\S]*?)<\\/div\\s*>/i', $sContent, $divmatches, PREG_SET_ORDER)) { foreach ($divmatches as $divmatch) { if ($divmatch[1] != "googlemaps") { $sContent = str_replace($divmatch[0], '', $sContent); } } } $fn = $EWR_EXPORT[$this->Export]; if ($this->Export == "email") { // Email ob_end_clean(); echo $this->{$fn}($sContent); $conn->Close(); // Close connection exit; } else { $this->{$fn}($sContent); } } // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EWR_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn, $gsExportFile, $gTmpImages; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export global $EW_EXPORT_REPORT; if ($this->Export != "" && array_key_exists($this->Export, $EW_EXPORT_REPORT)) { $sContent = ob_get_contents(); $fn = $EW_EXPORT_REPORT[$this->Export]; $this->{$fn}($sContent); } $this->Page_Redirecting($url); // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn; global $ReportLanguage; global $CustomView2; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export to Email (use ob_file_contents for PHP) if ($CustomView2->Export == "email") { $sContent = ob_get_contents(); $this->ExportEmail($sContent); ob_end_clean(); // Close connection $conn->Close(); header("Location: " . ewrpt_CurrentPage()); exit; } // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EWRPT_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $conn, $gsExportFile, $gTmpImages; // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Terminate($url = "") { global $gsExportFile, $gTmpImages; global $gbOldSkipHeaderFooter, $gbSkipHeaderFooter; $gbSkipHeaderFooter = $gbOldSkipHeaderFooter; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Export $this->Page_Redirecting($url); // Close connection ew_CloseConn(); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } }
function Page_Terminate($url = "") { global $conn; // $GLOBALS["Table"] = &$GLOBALS["MasterTable"]; unset($GLOBALS["Grid"]); if ($url == "") { return; } // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); $this->Page_Redirecting($url); // Go to URL if specified if ($url != "") { if (!EW_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }
function Page_Main() { global $conn; $GLOBALS["Page"] =& $this; $post = ew_StripSlashes($_POST); if (count($post) == 0) { die("Missing post data."); } //$sql = $qs->getValue("s"); $sql = @$post["s"]; $sql = ew_Decrypt($sql); if ($sql == "") { die("Missing SQL."); } $dbid = @$post["d"]; $conn = ew_Connect($dbid); // Global Page Loading event (in userfn*.php) Page_Loading(); if (ob_get_length()) { // Clear output ob_clean(); } if (strpos($sql, "{filter}") > 0) { $filters = ""; $ar = preg_grep('/^f\\d+$/', array_keys($post)); foreach ($ar as $key) { // Get the filter values (for "IN") $filter = ew_Decrypt(@$post[$key]); if ($filter != "") { $i = preg_replace('/^f/', '', $key); $value = @$post["v" . $i]; if ($value == "") { if ($i > 0) { // Empty parent field //continue; // Allow ew_AddFilter($filters, "1=0"); } // Disallow continue; } $arValue = explode(",", $value); $fldtype = intval(@$post["t" . $i]); $flddatatype = ew_FieldDataType($fldtype); $bValidData = TRUE; for ($j = 0, $cnt = count($arValue); $j < $cnt; $j++) { if ($flddatatype == EW_DATATYPE_NUMBER && !is_numeric($arValue[$j])) { $bValidData = FALSE; break; } else { $arValue[$j] = ew_QuotedValue($arValue[$j], $flddatatype, $dbid); } } if ($bValidData) { $filter = str_replace("{filter_value}", implode(",", $arValue), $filter); } else { $filter = "1=0"; } $fn = @$post["fn" . $i]; if ($fn == "" || !function_exists($fn)) { $fn = "ew_AddFilter"; } $fn($filters, $filter); } } $sql = str_replace("{filter}", $filters != "" ? $filters : "1=1", $sql); } // Get the query value (for "LIKE" or "=") $value = ew_AdjustSql(@$_GET["q"], $dbid); // Get the query value from querystring if ($value == "") { $value = ew_AdjustSql(@$post["q"], $dbid); } // Get the value from post if ($value != "") { $sql = preg_replace('/LIKE \'(%)?\\{query_value\\}%\'/', ew_Like('\'$1{query_value}%\'', $dbid), $sql); $sql = str_replace("{query_value}", $value, $sql); } // Replace {query_value_n} preg_match_all('/\\{query_value_(\\d+)\\}/', $sql, $out); $cnt = count($out[0]); for ($i = 0; $i < $cnt; $i++) { $j = $out[1][$i]; $v = ew_AdjustSql(@$post["q" . $j], $dbid); $sql = str_replace("{query_value_" . $j . "}", $v, $sql); } $this->GetLookupValues($sql, $dbid); $result = ob_get_contents(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); if (ob_get_length()) { // Clear output ob_clean(); } // Close connection ew_CloseConn(); // Output echo $result; }
function Page_Terminate($url = "") { global $conn, $ReportLanguage, $EWR_EXPORT, $gsExportFile; // Page Unload event $this->Page_Unload(); // Global Page Unloaded event (in userfn*.php) Page_Unloaded(); // Close connection $conn->Close(); // Go to URL if specified if ($url != "") { if (!EWR_DEBUG_ENABLED && ob_get_length()) { ob_end_clean(); } header("Location: " . $url); } exit; }