</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(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>
		<td class="labelxx">Unknown 404 Redirection Status:</td>
		<td>
		<?php 
$drop = new dropdown('p404_status');
$drop->add('Enabled', '1');
$drop->add('Disabled', '2');
</div>
<?php 
$grid = new datagrid();
$grid->set_data_source($table_name);
$grid->add_select_field('ID');
$grid->add_select_field('postID');
$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->set_table_attr('width', '100%');
$grid->set_col_attr(5, 'width', '50px');
$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=2");
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('go_link', 'post.php?post={db_postID}&action=edit', 'Post');
//$grid->add_data_col('redirect_from','Redirect from');
//$grid->add_data_col('redirect_to','Redirect to');
$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();
?>
<b>Note</b>: To add a redirection for any post or page , use custom redirection or go to the edit page, you will find the redirection box, use it to set your redirection.<br/>