? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/
File Upload :
Current File : /home/admin/domains/happytokorea.com/public_html/backend/modules/goods/function.php

<?
function select_cat($db_resource,$table,$name,$key_field,$value_field,$chk){
	$m=$_GET['m'];
$html="<select name=$name class=\"backend_inputbox\">";
$result=$db_resource->Query("SELECT * FROM $table WHERE cat_main='$m' order by $value_field DESC");
while($data=mysql_fetch_array($result)){
	$v=$data[$value_field];
	$k=$data[$key_field];
	if($chk==$v && $chk!=''){
$html.="<option value=$v selected>$k</option>";
	}else{
$html.="<option value=\"$v\">$k</option>";
	}
}
$html.="</select>";
return $html;
}
function chang_field($db_resource,$table,$field,$field_change,$key){
$result=$db_resource->Query("SELECT $field_change FROM $table where $field='$key'");
$data=mysql_fetch_array($result);
$return=$data[$field_change];
return $return;
}
function CountData($db_resource,$table,$condition){
$arr=$db_resource->Query("SELECT COUNT(*) FROM $table $condition");
 $data=mysql_fetch_array($arr);
return $data[0];
}

function get_sub_cat($parent,$selected,$option){
			global $user_login,$db;
$rs=$db->Query("SELECT * FROM content_cat where  CatParentID='$parent' AND CatID!='{$_GET['group_id']}' ");
			if($parent!=''){
			$option.="&nbsp;&nbsp;&nbsp;";
			}
//$rs=$this->Query("SELECT * FROM package_cat where parent='$parent' and user_id='$u'");
while($arr=mysql_fetch_array($rs)){
	$id=$arr['CatID'];
	$name=$arr['CatName'];
	if($arr['CatID']==$selected){$s="selected";}else{$s="";}
	if($parent!=''){	
		$html.="<OPTION VALUE=\"$id\" $s>$option $name</OPTION>";
	}else{	$html.="<OPTION VALUE=\"$id\" $s>-$name</OPTION>";	}

$html.=get_sub_cat($arr['CatID'],$selected,$option);
}//end while
return $html;
}
function genURLCat($url){
global $db;
$url=trim($url);
$searach=array(' ', '#', '+', '?', '%','/','\"');
$replace=array('-', '-', '-', '-', '-','-','-');
$url=str_replace($searach,'-',trim($url));
$url = str_replace("\'","",$url); 
			return $url;
}//end function load 


function WebCat($selected,$option){
global $user_login,$db;
$rs=$db->Query("SELECT * FROM content_cat where  CatParentID='0' ");
/*	if($parent!='')
	{
		$option.="&nbsp;&nbsp;&nbsp;";
	}
	*/
	while($arr=mysql_fetch_array($rs))
	{
			$id=$arr['CatID'];
			$name=$arr['CatName'];
			if($arr['CatID']==$selected)
			{
				$s="selected";
			}
			else
			{
				$s="";
			}
			
		/*	if($parent!='')
			{	
				$html.="<OPTION VALUE=\"$id\" $s>$option $name</OPTION>";
			}
			else
			{	*/
				$html.="<OPTION VALUE=\"$id\" $s>$name</OPTION>";	
		//	}
	
		//$html.=WebCat($selected,$option);
	}//end while
return $html;
}

?>

T1KUS90T
  root-grov@210.1.60.28:~$