</tr> </table> </div> <?php $grid = new datagrid(); $grid->set_data_source($table_name); $grid->add_select_field('ID'); $grid->add_select_field('redirect_from'); $grid->add_select_field('redirect_from_type'); $grid->add_select_field('redirect_to'); $grid->add_select_field('redirect_to_type'); $grid->add_select_field('enabled'); $grid->set_table_attr('width', '100%'); $grid->set_col_attr(5, 'width', '50px'); $grid->set_col_attr(3, 'width', '50%'); $grid->set_col_attr(4, 'width', '50%'); $grid->set_col_attr(5, 'width', '50px', 'header'); $grid->set_col_attr(1, 'width', '20px', 'header'); $grid->set_col_attr(2, 'width', '20px', 'header'); $grid->set_order(" ID desc "); $grid->set_filter("url_type=1"); if ($util->get('search') != '') { $search = $util->get('search'); $grid->set_filter("url_type=1 and (redirect_from like '%%{$search}%%' or redirect_to like '%%{$search}%%' or redirect_type like '%%{$search}%%' )"); } $grid->add_template_col('del', $util->get_current_parameters('del') . '&del={db_ID}', 'Del'); $grid->add_template_col('edit', $util->get_current_parameters('edit') . '&edit={db_ID}', 'Edit'); $grid->add_php_col(' echo "<div class=\'{$db_redirect_from_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . SEOR_make_absolute_url($db_redirect_from) ."\'>{$db_redirect_from}</a></div>" ;', 'Redirect from '); $grid->add_php_col(' echo "<div class=\'{$db_redirect_to_type}_background_{$db_enabled}\'><a target=\'_blank\' href=\'" . SEOR_make_absolute_url($db_redirect_to) ."\'>{$db_redirect_to}</a></div>"; ', 'Redirect to '); $grid->add_data_col('redirect_type', 'Type'); $grid->run();
$grid->set_col_attr(1, 'width', '140px'); $grid->set_col_attr(1, 'align', 'center'); $grid->set_col_attr(3, 'width', '20px'); $grid->set_col_attr(3, 'align', 'center'); $grid->set_col_attr(4, 'align', 'center'); $grid->set_col_attr(5, 'align', 'center'); $grid->set_col_attr(5, 'width', '130px'); $grid->set_col_attr(6, 'width', '75px'); $grid->set_col_attr(6, 'align', 'center'); $grid->set_col_attr(7, 'align', 'center'); $grid->set_col_attr(8, 'align', 'center'); $grid->set_col_attr(8, 'width', '20px'); $grid->set_col_attr(2, 'style', 'padding-left: 5px'); $grid->add_data_col('ctime', 'Discovered'); //$grid->add_html_col("<a target='_blank' title='{db_link}' href='{db_link}'><span class='link'></span></a>{db_link}",'Link'); $grid->add_php_col(' echo " <a target=\'_blank\' href=\'" . SEOR_make_absolute_url($db_link) ."\'> {$db_link}</a>" ;', 'Link'); $grid->add_php_col('if($db_referrer !="") echo "<a target=\'_blank\' title=\'$db_referrer\' href=\'$db_referrer\'><span class=\'link\'></span></a>" ;', 'Ref'); $grid->add_data_col('ip', 'IP'); $grid->add_data_col('country', 'Country'); $grid->add_data_col('os', 'OS'); $grid->add_data_col('browser', 'Browser'); $grid->add_template_col('redirect_link', '?page=' . $_GET['page'] . '&tab=cutom&add=1&page404={db_ID}', 'Redirect'); $grid->run(); ?> <div>* Too many 404 errors? <a target="_blank" href="http://www.clogica.com/kb/too-many-404-errors.htm">click here to see why?</a></div> <br/><br/> <form method="POST"> <h3>Unknown 404 Links Redirection<hr></h3> <table class="cform" width="100%"> <tr>
$grid->add_select_field('referrer'); $grid->add_select_field('country'); $grid->add_select_field('ip'); $grid->add_select_field('os'); $grid->add_select_field('browser'); $grid->add_select_field('rsrc'); $grid->add_select_field('rfrom'); $grid->add_select_field('rto'); $grid->add_select_field('ctime'); $grid->set_table_attr('width', '100%'); $grid->set_col_attr(1, 'width', '60px'); $grid->set_col_attr(3, 'width', '20px'); $grid->set_col_attr(3, 'align', 'center'); $grid->set_col_attr(4, 'width', '20px'); $grid->set_col_attr(4, 'align', 'center'); $grid->set_col_attr(7, 'width', '30px'); $grid->set_col_attr(7, 'align', 'center'); $grid->set_col_attr(6, 'width', '75px'); $grid->set_col_attr(5, 'width', '130px'); $grid->add_php_col('echo date(\'Y-n-j\',strtotime($db_ctime)) . \'<br/>\' . date(\'H:i:s\',strtotime($db_ctime)); ', 'Time'); $grid->add_php_col(' echo "<div class=\'arrow_from\'><a target=\'_blank\' href=\'" . SEOR_make_absolute_url($db_rfrom) ."\'>{$db_rfrom}</a></div><div class=\'arrow_to\'><a target=\'_blank\' href=\'" . SEOR_make_absolute_url($db_rto) ."\'>{$db_rto}</a></div>" ;', 'Redirection'); $grid->add_data_col('rtype', 'Type'); $grid->add_php_col('if($db_referrer !="") echo "<a target=\'_blank\' title=\'$db_referrer\' href=\'$db_referrer\'><span class=\'link\'></span></a>" ;', 'Ref'); $grid->add_html_col('{db_country}<br/>{db_ip}', 'Address'); $grid->add_html_col('{db_os}<br/>{db_browser}', 'Agent'); $grid->add_php_col(' if($db_rsrc==\'404\') echo $db_rsrc; if($db_rsrc==\'Custom\') echo "<a target=\'blank\' href=\'?page=wp-seo-redirection.php&edit=$db_rID\'>{$db_rsrc}</a>"; if($db_rsrc==\'Post\') echo "<a target=\'blank\' href=\'post.php?action=edit&post=$db_postID\'>{$db_rsrc}</a>"; ', 'Class'); $grid->run();