<?php
require "inc.php";
$job_category =DB_PRE."hr_job_category";
if(!isset($get_msgval)) $get_msgval="";
(isset($get_pid))? $get_pid=intval($get_pid):$get_pid=0;
$str_where=" where category_pid='".$get_pid."'";
$str_sql="SELECT * FROM ".$job_category .$str_where." order by category_sort,category_id desc";
$obj_result = $obj_db->query($str_sql);
$arr_items=array();
while($obj_rs = $obj_db->fetch_array($obj_result))
{
	$arr_items[] = $obj_rs;
}
$arr_selitems=array();
if($get_msgval!=""){
	$arr_val=explode("|",$get_msgval);
	$str_val=implode("','",$arr_val);
	$str_where=" where category_name in('".$str_val."')";
	$str_sql="SELECT * FROM ".$job_category .$str_where." order by category_sort,category_id desc";
	$obj_result = $obj_db->query($str_sql);
	while($obj_rs = $obj_db->fetch_array($obj_result))
	{
		$arr_selitems[] = $obj_rs;
	}
}
?>
<style>
.me_list{float:left;width:100%}
.me_list li{float:left;padding:5px 10px 3px 5px;text-align:left;white-space:nowrap;width:170px}
.me_sellist{float:left;width:100%;padding:5px 0px 10px 0px;text-align:left;height:20px;color:#ff8800}
</style>
<div class="me_sellist" id="id_sellist">&nbsp;&nbsp;<b>ÒÑÑ¡</b>£º
<?php
foreach($arr_selitems as $item){
	echo " <span id='id_next_".$item["category_id"]."'><input type='checkbox' name='sel_category[]' value='".$item["category_name"]."' checked onclick=\"me_get_show_category(".$item["category_id"].",'".$item["category_name"]."');\">".$item["category_name"]."</span>";
}
?>
</div>
<div class="me_list a_4">
	<?php
	foreach($arr_items as $item){ 
		echo "<li><a href='#' onclick=\"javascript:me_get_next_category(event,".$item["category_id"].");\">".$item["category_name"]."</a></li>";
	}?>
</div>

