<?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
// +----------------------------------------------------------------------+
// | PHP version 4/5                                                      |
// +----------------------------------------------------------------------+
// | This source file is a part of iScripts Multicart                     |
// +----------------------------------------------------------------------+
// | Authors: Programmer<programmer@armia.com>        		              |
// +----------------------------------------------------------------------+
// | Copyrights Armia Systems, Inc and iScripts.com � 2005                |
// | All rights reserved                                                  |
// +----------------------------------------------------------------------+
// | This script may not be distributed, sold, given away for free to     |
// | third party, or used as a part of any internet services such as      |
// | webdesign etc.                                                       |
// +----------------------------------------------------------------------+
?>
<?php
include "../includes/config.php";
include "../includes/session.php";
include_once("../includes/functions.php");


if(isset( $_SESSION["sess_adminname"]) and $_SESSION["sess_adminname"]!= ""){
	$adminname = $_SESSION["sess_adminname"];
}else{
	header("Location:login.php");
	exit;
}

include "../includes/htmltop.php";
$type = 'seller_registrar';
if($_POST['type'] !="") {
$type = $_POST['type'];
}
$category ="";
if($_POST['category'] !="") {
$category = $_POST['category'];
}
$select_content = "SELECT h.hid,h.htitle
						FROM ".$tableprefix."help h
						INNER JOIN  ".$tableprefix."helpcategory hc ON hc.hcid = h.hcid
						WHERE 1=1 AND hc.active = '1' ";
if($category!="") {
$select_content .= " AND h.hcid = '".$category."'";
}
if($type!="") {
$select_content .= " AND hc.htype = '".$type."'";
}
$select_content .= " ORDER BY h.hposition ASC";

$result_content = mysql_query($select_content) or die(mysql_error());

$help_category = "SELECT hcid,hctitle FROM ".$tableprefix."helpcategory WHERE htype = '".$type."' ORDER BY hcposition ASC";
$result_category = mysql_query($help_category) or die(mysql_error());

if(isset($_GET['msg']))
$message = $_GET['msg'];
?>
<script language="javascript">
function changeDetails() {
 frm = document.helpFrm;
 frm.submit();
}
</script>
		<body>
		<center>
		<div align="left" id="layout">
				<!--header area start -->
<?php
	include_once("../includes/topheader_admin.php")
?>
				<!--header area end -->
				<div align="left" class="main_body">
				<!--main body start -->
<?php
	include_once("../includes/admintopmenu.php")
?>
					<div align="left" class="content_area">
					<!--content area start -->
					<div align="left" class="page_title"><?php echo HELP_MGT;?></div>
					<div align="center" class="text_information_success grey_tr"><?php echo $message?></div>
            		<br>
					<div align="left">
					<form name="helpFrm" method="post" action="">
						<table width="100%" border="0" cellpadding="0" cellspacing="0" class="manage_table">
						<tr><td colspan="3"></tr>
						
						<tr>
							<td colspan="3">
										<table width="100%" cellspacing="2" cellpadding="2">
				<?php
						if(mysql_num_rows($result_content) > 0)
						{
							while($content_row = mysql_fetch_array($result_content))
							{
				?>
											<tr>
												<td align="left"><?php echo ucwords(str_replace('_',' ',$content_row['htitle']))?>&nbsp;</td>
                                                                                                <td align="left" colspan="2"><a href="help_management.php?q=seller&edit_id=<?php echo $content_row['hid']?>" style="cursor:pointer"><?php echo TITLE_EDIT; ?></a></td>
											</tr>
				<?php
						}
					}
				?>
										</table>
									</td>
									</tr>
									</table>
									</form>
				</div>
				<!--content area end-->
				</div>
					<div align="left" class="clear_float"><img src="<?php echo $imagefolder;?>/clear.gif" alt="" width="1" height="1" /></div>
				<!--main body end -->
				</div>
<?php
	include "../includes/footer.php";
?>