Example #1
0
 public function execute(Request $old_request, Request $new_request)
 {
     $old_url = parse_url($old_request->getUrl());
     $new_url = parse_url($new_request->getUrl());
     $old_robots = Xbb_RobotsTxt::getInstance($old_url["scheme"] . '://' . $old_url["host"]);
     $new_robots = Xbb_RobotsTxt::getInstance($new_url["scheme"] . '://' . $new_url["host"]);
     $this->_columns[$this->_filter->getName() . '_old'] = (int) $old_robots->allow($old_request->getUrl());
     $this->_columns[$this->_filter->getName() . '_new'] = (int) $new_robots->allow($new_request->getUrl());
     return $this->_columns;
 }
Example #2
0
                        $old = parse_url($data[0]['old_url']);
                        $old_host = 'http://'.$old['host'];
                        $old_robots = \Parser\Xbb_RobotsTxt::getInstance($old_host);
                    ?>
                        <div>
                            <p><?php 
echo $old_host;
?>
 - <?echo ($old_robots->allow('/')) ? '<span class="text-success">Allow</span>' : '<span class="text-danger">Disallow</span>';?></p>
                        </div>
                    <?}?>
                    <?
                    if ($data[0]['new_url']) {
                        $new = parse_url($data[0]['new_url']);
                        $new_host = 'http://'.$new['host'];
                        $new_robots = \Parser\Xbb_RobotsTxt::getInstance($new_host);
                        ?>
                        <div>
                            <p><?php 
echo $new_host;
?>
 - <?echo ($new_robots->allow('/')) ? '<span class="text-success">Allow</span>' : '<span class="text-danger">Disallow</span>';?></p>
                        </div>
                    <?}?>
                <h2>Результат</h2>
                    <table class="table table-bordered">
                        <thead>
                            <tr>
                                <?foreach ($header as $column):?>
                                    <th class="success"><?php 
echo $column["name"];