Viewing file: 94b80cc89d6f951b561a6d4e0fc0a9ca8c607164f1eaf22cd4068f2adfb3b836.php (12.81 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
use Twig\Environment; use Twig\Error\LoaderError; use Twig\Error\RuntimeError; use Twig\Extension\SandboxExtension; use Twig\Markup; use Twig\Sandbox\SecurityError; use Twig\Sandbox\SecurityNotAllowedTagError; use Twig\Sandbox\SecurityNotAllowedFilterError; use Twig\Sandbox\SecurityNotAllowedFunctionError; use Twig\Source; use Twig\Template;
/* display/import/javascript.twig */ class __TwigTemplate_e6c0557d825c96481b2c6c0ef7570d96cc1c776e23771f46fd18aa0d8e2c5f17 extends \Twig\Template { private $source; private $macros = [];
public function __construct(Environment $env) { parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [ ]; }
protected function doDisplay(array $context, array $blocks = []) { $macros = $this->macros; // line 1 echo "\$( function() { "; // line 3 echo " \$(\"#buttonGo\").bind(\"click\", function() { "; // line 5 echo " \$(\"#upload_form_form\").css(\"display\", \"none\");
"; // line 7 if ((($context["handler"] ?? null) != "PhpMyAdmin\\Plugins\\Import\\Upload\\UploadNoplugin")) { // line 8 echo " "; // line 9 echo " "; $context["ajax_url"] = (("import_status.php?id=" . ($context["upload_id"] ?? null)) . PhpMyAdmin\Url::getCommonRaw(["import_status" => 1], "&")); // line 12 echo " "; $context["promot_str"] = PhpMyAdmin\Sanitize::jsFormat(_gettext("The file being uploaded is probably larger than the maximum allowed size or this is a known bug in webkit based (Safari, Google Chrome, Arora etc.) browsers."), false); // line 16 echo " "; $context["statustext_str"] = PhpMyAdmin\Sanitize::escapeJsString(_gettext("%s of %s")); // line 17 echo " "; $context["second_str"] = PhpMyAdmin\Sanitize::jsFormat(_gettext("%s/sec."), false); // line 18 echo " "; $context["remaining_min"] = PhpMyAdmin\Sanitize::jsFormat(_gettext("About %MIN min. %SEC sec. remaining."), false); // line 19 echo " "; $context["remaining_second"] = PhpMyAdmin\Sanitize::jsFormat(_gettext("About %SEC sec. remaining."), false); // line 20 echo " "; $context["processed_str"] = PhpMyAdmin\Sanitize::jsFormat(_gettext("The file is being processed, please be patient."), false); // line 24 echo " "; $context["import_url"] = PhpMyAdmin\Url::getCommonRaw(["import_status" => 1], "&"); // line 25 echo " "; // line 26 ob_start(function () { return ''; }); // line 27 echo " "; ob_start(function () { return ''; }); // line 28 echo " <div class=\"upload_progress\"> <div class=\"upload_progress_bar_outer\"> <div class=\"percentage\"></div> <div id=\"status\" class=\"upload_progress_bar_inner\"> <div class=\"percentage\"></div> </div> </div> <div> <img src=\""; // line 36 echo twig_escape_filter($this->env, ($context["pma_theme_image"] ?? null), "html", null, true); echo "ajax_clock_small.gif\" width=\"16\" height=\"16\" alt=\"ajax clock\" /> "; echo PhpMyAdmin\Sanitize::jsFormat(_gettext("Uploading your import fileā¦"), false); // line 37 echo "</div> <div id=\"statustext\"></div> </div> "; $___internal_91113cdbde9beb93431482451714f4142bd2a9567edfd728960c8415376d575f_ = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 27 echo twig_spaceless($___internal_91113cdbde9beb93431482451714f4142bd2a9567edfd728960c8415376d575f_); // line 41 echo " "; $context["upload_html"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 42 echo " "; // line 44 echo " var finished = false; var percent = 0.0; var total = 0; var complete = 0; var original_title = parent && parent.document ? parent.document.title : false; var import_start;
var perform_upload = function () { new \$.getJSON( \""; // line 53 echo ($context["ajax_url"] ?? null); echo "\", {}, function(response) { finished = response.finished; percent = response.percent; total = response.total; complete = response.complete;
if (total==0 && complete==0 && percent==0) { \$(\"#upload_form_status_info\").html('<img src=\""; // line 62 echo twig_escape_filter($this->env, ($context["pma_theme_image"] ?? null), "html", null, true); echo "ajax_clock_small.gif\" width=\"16\" height=\"16\" alt=\"ajax clock\" /> "; echo ($context["promot_str"] ?? null); echo "'); \$(\"#upload_form_status\").css(\"display\", \"none\"); } else { var now = new Date(); now = Date.UTC( now.getFullYear(), now.getMonth(), now.getDate(), now.getHours(), now.getMinutes(), now.getSeconds()) + now.getMilliseconds() - 1000; var statustext = PMA_sprintf( \""; // line 75 echo ($context["statustext_str"] ?? null); echo "\", formatBytes( complete, 1, PMA_messages.strDecimalSeparator ), formatBytes( total, 1, PMA_messages.strDecimalSeparator ) );
if (\$(\"#importmain\").is(\":visible\")) { "; // line 86 echo " \$(\"#importmain\").hide(); \$(\"#import_form_status\") .html('"; // line 88 echo ($context["upload_html"] ?? null); echo "') .show(); import_start = now; } else if (percent > 9 || complete > 2000000) { "; // line 94 echo " var used_time = now - import_start; var seconds = parseInt(((total - complete) / complete) * used_time / 1000); var speed = PMA_sprintf( \""; // line 97 echo ($context["second_str"] ?? null); echo "\", formatBytes(complete / used_time * 1000, 1, PMA_messages.strDecimalSeparator) );
var minutes = parseInt(seconds / 60); seconds %= 60; var estimated_time; if (minutes > 0) { estimated_time = \""; // line 105 echo ($context["remaining_min"] ?? null); echo "\" .replace(\"%MIN\", minutes) .replace(\"%SEC\", seconds); } else { estimated_time = \""; // line 110 echo ($context["remaining_second"] ?? null); echo "\" .replace(\"%SEC\", seconds); }
statustext += \"<br />\" + speed + \"<br /><br />\" + estimated_time; }
var percent_str = Math.round(percent) + \"%\"; \$(\"#status\").animate({width: percent_str}, 150); \$(\".percentage\").text(percent_str);
"; // line 122 echo " if (original_title !== false) { parent.document.title = percent_str + \" - \" + original_title; } else { document.title = percent_str + \" - \" + original_title; } \$(\"#statustext\").html(statustext); }
if (finished == true) { if (original_title !== false) { parent.document.title = original_title; } else { document.title = original_title; } \$(\"#importmain\").hide(); "; // line 142 echo " \$(\"#import_form_status\") .html('<img src=\""; // line 143 echo twig_escape_filter($this->env, ($context["pma_theme_image"] ?? null), "html", null, true); echo "ajax_clock_small.gif\" width=\"16\" height=\"16\" alt=\"ajax clock\" /> "; echo ($context["processed_str"] ?? null); echo "') .show(); \$(\"#import_form_status\").load(\"import_status.php?message=true&"; // line 145 echo ($context["import_url"] ?? null); echo "\"); PMA_reloadNavigation();
"; // line 149 echo " } else { setTimeout(perform_upload, 1000); } }); }; setTimeout(perform_upload, 1000); "; } else { // line 157 echo " "; // line 158 echo " "; ob_start(function () { return ''; }); // line 159 echo "<img src=\""; echo twig_escape_filter($this->env, ($context["pma_theme_image"] ?? null), "html", null, true); // line 160 echo "ajax_clock_small.gif\" width=\"16\" height=\"16\" alt=\"ajax clock\" />"; // line 161 echo PhpMyAdmin\Sanitize::jsFormat(_gettext("Please be patient, the file is being uploaded. Details about the upload are not available."), false); // line 165 echo PhpMyAdmin\Util::showDocu("faq", "faq2-9"); $context["image_tag"] = ('' === $tmp = ob_get_clean()) ? '' : new Markup($tmp, $this->env->getCharset()); // line 167 echo " \$('#upload_form_status_info').html('"; echo ($context["image_tag"] ?? null); echo "'); \$(\"#upload_form_status\").css(\"display\", \"none\"); "; } // line 170 echo " }); }); "; }
public function getTemplateName() { return "display/import/javascript.twig"; }
public function isTraitable() { return false; }
public function getDebugInfo() { return array ( 284 => 170, 277 => 167, 274 => 165, 272 => 161, 270 => 160, 267 => 159, 264 => 158, 262 => 157, 252 => 149, 246 => 145, 239 => 143, 236 => 142, 215 => 122, 201 => 110, 193 => 105, 182 => 97, 177 => 94, 169 => 88, 165 => 86, 152 => 75, 134 => 62, 122 => 53, 111 => 44, 108 => 42, 105 => 41, 103 => 27, 97 => 37, 93 => 36, 83 => 28, 80 => 27, 78 => 26, 75 => 25, 72 => 24, 69 => 20, 66 => 19, 63 => 18, 60 => 17, 57 => 16, 54 => 12, 51 => 9, 49 => 8, 47 => 7, 43 => 5, 40 => 3, 37 => 1,); }
public function getSourceContext() { return new Source("", "display/import/javascript.twig", "/usr/share/phpmyadmin/templates/display/import/javascript.twig"); } }
|