<?php

/* @p1cm/progress/list.twig */
class __TwigTemplate_4cd9e83af4bd14f0e4260ff9c166f7c4c0e0a60e300238e115e8d8c982abf4b7 extends Twig_Template
{
    public function __construct(Twig_Environment $env)
    {
        parent::__construct($env);

        $this->parent = false;

        $this->blocks = array(
        );
    }

    protected function doDisplay(array $context, array $blocks = array())
    {
        // line 1
        echo "<h2>Progress Tracker</h2>
";
        // line 2
        if (((isset($context["proxiesActive"]) ? $context["proxiesActive"] : null) == false)) {
            // line 3
            echo "<div class=\"error below-h2\">
    <p><strong>Warning: </strong>Post tracking is disabled - there are no active proxies configured. 
        Go to <a href=\"";
            // line 5
            echo $this->env->getExtension('route_extension')->routeFunction("p1cm-proxies");
            echo "\">Proxies manager</a> to configure proxy servers.</p>
</div>
";
        }
        // line 8
        echo "<div class=\"frame-wrap\">
\t<div class=\"frame-sidebar\">
\t\t";
        // line 10
        $this->env->loadTemplate("@p1cm/help.twig")->display($context);
        // line 11
        echo "\t</div>

\t<div class=\"frame-content\">
        <div class=\"frame-box\">
            <h4>How to set up progress tracking</h4>
            <p>In order to set up the progress tracking of your posts, you need to either:</p>
            <p>- add the following line to the <i>crontab</i> on your server:
                <code>*/15 * * * * wget -o- -O- \"";
        // line 18
        echo twig_escape_filter($this->env, (isset($context["siteUrl"]) ? $context["siteUrl"] : null), "html", null, true);
        echo "/index.php?p1cm=tracker\"</code><br/>
                <small>Your hosting company should provide you with instructions on how to perform that on your server.</small></p>
            <p>or: </p>
            <p>- use one of the many available online cron services (e.g.: <i>http://setcronjob.com</i>, <i>http://easycron.com</i>) to execute the following URL:
                <code>";
        // line 22
        echo twig_escape_filter($this->env, (isset($context["siteUrl"]) ? $context["siteUrl"] : null), "html", null, true);
        echo "/index.php?p1cm=tracker</code></p>
        </div>

        <div class=\"frame-box\">
            <div class=\"container p1cm-container\">
                <div class=\"row p1cm-posts\">
                    ";
        // line 28
        $context['_parent'] = (array) $context;
        $context['_seq'] = twig_ensure_traversable((isset($context["posts"]) ? $context["posts"] : null));
        $context['loop'] = array(
          'parent' => $context['_parent'],
          'index0' => 0,
          'index'  => 1,
          'first'  => true,
        );
        if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
            $length = count($context['_seq']);
            $context['loop']['revindex0'] = $length - 1;
            $context['loop']['revindex'] = $length;
            $context['loop']['length'] = $length;
            $context['loop']['last'] = 1 === $length;
        }
        foreach ($context['_seq'] as $context["_key"] => $context["post"]) {
            // line 29
            echo "                        ";
            $this->env->loadTemplate("@p1cm/progress/post.twig")->display($context);
            // line 30
            echo "                    ";
            ++$context['loop']['index0'];
            ++$context['loop']['index'];
            $context['loop']['first'] = false;
            if (isset($context['loop']['length'])) {
                --$context['loop']['revindex0'];
                --$context['loop']['revindex'];
                $context['loop']['last'] = 0 === $context['loop']['revindex0'];
            }
        }
        $_parent = $context['_parent'];
        unset($context['_seq'], $context['_iterated'], $context['_key'], $context['post'], $context['_parent'], $context['loop']);
        $context = array_intersect_key($context, $_parent) + $_parent;
        // line 31
        echo "                </div>
            </div>
        </div>
        
        ";
        // line 35
        if ((isset($context["log"]) ? $context["log"] : null)) {
            // line 36
            echo "        <div class=\"frame-box p1cm-log\">
            <h4>Progress Tracking Log</h4>
            <table class=\"table\">
                <thead>
                    <tr>
                        <th>Post</th>
                        <th>Tracked Keyword</th>
                        <th>Date</th>
                        <th>Proxy Used</th>
                        <th>Result</th>
                    </tr>
                </thead>
                <tbody>
                    ";
            // line 49
            $context['_parent'] = (array) $context;
            $context['_seq'] = twig_ensure_traversable((isset($context["log"]) ? $context["log"] : null));
            foreach ($context['_seq'] as $context["_key"] => $context["entry"]) {
                // line 50
                echo "                    <tr class=\"";
                echo ((($this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "result") == 1)) ? ("success") : ("warning"));
                echo "\">
                        <td><a href=\"";
                // line 51
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "postEditLink"), "html", null, true);
                echo "\">";
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "postTitle"), "html", null, true);
                echo "</a></td>
                        <td>";
                // line 52
                echo twig_escape_filter($this->env, $this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "keyword"), "html", null, true);
                echo "</td>
                        <td>";
                // line 53
                echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "time"), "Y-m-d H:i:s"), "html", null, true);
                echo "</td>
                        <td>";
                // line 54
                echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "proxy"), "GetIp", array(), "method"), "html", null, true);
                echo "</td>
                        <td>";
                // line 55
                echo ((($this->getAttribute((isset($context["entry"]) ? $context["entry"] : null), "result") == 1)) ? ("Success") : ("Failure"));
                echo "</td>
                    </tr>
                    ";
            }
            $_parent = $context['_parent'];
            unset($context['_seq'], $context['_iterated'], $context['_key'], $context['entry'], $context['_parent'], $context['loop']);
            $context = array_intersect_key($context, $_parent) + $_parent;
            // line 58
            echo "                </tbody>
            </table>
        </div>
        ";
        }
        // line 62
        echo "\t</div>
</div>
";
    }

    public function getTemplateName()
    {
        return "@p1cm/progress/list.twig";
    }

    public function isTraitable()
    {
        return false;
    }

    public function getDebugInfo()
    {
        return array (  164 => 62,  158 => 58,  149 => 55,  145 => 54,  141 => 53,  137 => 52,  131 => 51,  126 => 50,  122 => 49,  107 => 36,  105 => 35,  99 => 31,  85 => 30,  82 => 29,  65 => 28,  56 => 22,  49 => 18,  40 => 11,  38 => 10,  34 => 8,  28 => 5,  24 => 3,  22 => 2,  19 => 1,);
    }
}
