/home/suroeste/public_html/gorbus.transportessuroeste.com/suroeste/_lib/lib/php
NameSizeModeActions
fix.php5950644editdlrm
nm_api.php711030644editdlrm
nm_check_mobile.php833520644editdlrm
nm_conv_dados.php177890644editdlrm
nm_ctrl_app_name.php23640644editdlrm
nm_data.class.php479220644editdlrm
nm_edit.php177790644editdlrm
nm_font_tcpdf.php35850644editdlrm
nm_functions.php418300644editdlrm
nm_gp_config_btn.php166820644editdlrm
nm_gp_limpa.php20640644editdlrm
nm_trata_img.php123620644editdlrm
nm_utf8.php213200644editdlrm
nm_valida.php422510644editdlrm
PolynomialRegression.php205240644editdlrm
sc_progress_bar.php81550644editdlrm
upload.class.php228050644editdlrm
Edit: /home/suroeste/public_html/gorbus.transportessuroeste.com/suroeste/_lib/lib/php/sc_progress_bar.php (8155B)
operation = 'initialize'; $this->step_count = 0; $this->step_total = 0; $this->pb_message = ''; $this->pb_title = ''; $this->download_link = ''; $this->download_md5 = ''; $this->return_url = ''; $this->return_option = ''; $this->complete = false; $this->buttons = array(); $this->saveState(); } // initialize public function setDebug($debug) { $this->debug = $debug; } // setDebug public function createProgressbarMd5() { $this->pb_md5 = md5(rand(1, 99999) . microtime()); } // createProgressbarMd5 public function setRoot($dir) { $this->file_root = $dir; } // setRoot public function setDir($dir) { $this->file_path = $dir; } // setDir public function setProgressbarMd5($md5) { $this->pb_md5 = $md5; } // setProgressbarMd5 public function setProgressbarMessage($message) { $this->pb_message = $message; } // setProgressbarMessage public function setProgressbarTitle($title) { $this->pb_title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); } // setProgressbarTitle public function setButtons($buttons) { $this->buttons = $buttons; } // setButtons public function setDownloadLink($link) { $this->download_link = $link; } // setDownloadLink public function setDownloadMd5($md5) { $this->download_md5 = $md5; } // setDownloadMd5 public function setReturnUrl($url) { $this->return_url = $url; } // setReturnUrl public function setReturnOption($option) { $this->return_option = $option; } // setReturnOption public function setTotalSteps($total) { $this->step_total = $total; } // setTotalSteps public function addSteps($count) { $this->operation = 'addSteps'; $this->step_count += $count; $this->saveState(); } // addSteps public function getProgressbarMd5() { return $this->pb_md5; } // getProgressbarMd5 public function completed() { $this->operation = 'completed'; $this->complete = true; $this->saveState(); } // completed public function getJavascript() { $jsCode = <<debug) { $jsCode .= <<file_path}sc_pb_{$this->pb_md5}.txt", method: "GET", dataType: "json", cache:false }).done(function(data, textStatus, jqXHR) { JS; if ($this->debug) { $jsCode .= <<= data.steps) { progress = 99; } else { progress = Math.round((data.count / data.steps) * 100); if (100 <= progress) { progress = 99; } } \$("#pb_bar-{$this->pb_md5}").progressbar("value", progress); \$("#pb_perc-{$this->pb_md5}").html(progress + "%"); \$("#pb_msg-{$this->pb_md5}").html(data.message); setTimeout(scPB_update, 100); } else { \$("#pb_bar-{$this->pb_md5}").progressbar("value", 100); \$("#pb_perc-{$this->pb_md5}").html("100%"); \$("#pb_msg-{$this->pb_md5}").html(data.message); document.Fview.action = data.link; document.Fdown.nm_name_doc.value = data.md5; scPB_enableButton("{$this->buttons['view']['id']}"); scPB_enableButton("{$this->buttons['download']['id']}"); } }).fail(function(jqXHR, textStatus, errorThrown) { JS; if ($this->debug) { $jsCode .= <<pb_md5}").progressbar({ classes: { "ui-progressbar": "scExportBar scExportBarRest", "ui-progressbar-value": "scExportBarDone", "ui-progressbar-complete": "scExportBarDone" } }); scPB_disableButton("{$this->buttons['view']['id']}"); scPB_disableButton("{$this->buttons['download']['id']}"); scPB_update(); }); JS; return $jsCode; } // getJavascript public function getHtml() { $htmlCode = <<
{$this->pb_title}
{$this->buttons['view']['code']} {$this->buttons['download']['code']} {$this->buttons['back']['code']}
HTML; return $htmlCode; } // getHtml public function getIframeParams() { $postParams = array(); $ignore = array('nm_proc_barr'); foreach ($_POST as $name => $value) { if (!in_array($name, $ignore)) { $postParams[] = "$name=".htmlspecialchars($value , ENT_QUOTES, 'UTF-8'); } } $postParams[] = "pbmd5={$this->pb_md5}"; return implode('&', $postParams); } // getIframeParams private function saveState() { $json = array( 'steps' => $this->step_total, 'count' => $this->step_count, 'message' => $this->pb_message, 'link' => $this->download_link, 'md5' => $this->download_md5, 'returnUrl' => $this->return_url, 'returnOption' => $this->return_option, 'complete' => $this->complete, ); @file_put_contents("{$this->file_root}{$this->file_path}sc_pb_{$this->pb_md5}.txt", json_encode($json)); $this->saveDebugInfo(); } // saveState private function saveDebugInfo() { if (!$this->debug) { return; } $debug = <<file_root} file_path={$this->file_path} pb_md5={$this->pb_md5} pb_message={$this->pb_message} pb_title={$this->pb_title} download_link={$this->download_link} download_md5={$this->download_md5} return_url={$this->return_url} return_option={$this->return_option} step_count={$this->step_count} step_total={$this->step_total} complete={$this->complete} operation={$this->operation} ------------------------- EOT; @file_put_contents("{$this->file_root}{$this->file_path}sc_pb_{$this->pb_md5}_debug.txt", $debug, FILE_APPEND); } // saveDebugInfo } // scProgressBar ?>