? 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/public_html/old/backoffice/php/
File Upload :
Current File : /home/admin/public_html/old/backoffice/php/list_fields.php

<?php
$root_path = "../";
include($root_path."header.php");
$db_tm	 = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, false);
$template = new Template($tpl_path);
/*
echo $TB,"<br>";  //ชื่อตารางภาษาอังกฤษ
echo $TBTH,"<br>";	//ชื่อตารางภาษาไทย
echo $selitem,"<P>";	//ชื่อ Group
echo "<script>alert('$TB $TBTH $selitem');</script>";
echo $CURRENT_PATH,"--<P>";	//path ปัจจุบัน
*/
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
$sql_01		="SELECT * FROM $selitem where TB_NAME='$TB' ";
$result_01	=	$db_tm->sql_query("SET NAMES utf8");
$result_01	=	$db_tm->sql_query($sql_01);
$rows_01		=	$db_tm->sql_fetchrow($result_01);
$w				=	$rows_01[W];
$h				=	$rows_01[H];
$fileto			=	$rows_01[FILETO];
$path_to		=	$rows_01[PATH];
$notshow		=	$rows_01[NOTSHOW];

$chk_notshow=split(",",$notshow);

$result_02	=	$db_tm->sql_query($rows_01[SQL]." where 0");
$numfields	= $db_tm->sql_numfields($result_02);

for($i=0; $i<$numfields;$i++){
	$all_fields.=$i.",";
	$fieldsname	=$db_tm->sql_fieldname($offset=$i,$result_02);

	if($notshow==""){		$chk_field="yes_show";
	}else{
		$chk_field="no_show";
		for ($r=0;$r<sizeof($chk_notshow);$r++){					
			if ($chk_notshow[$r]==$i){	$chk_field='no_show';		$r=sizeof($chk_notshow);
			}else{	$chk_field='yes_show';	}
		}
	}

	if ($chk_field=='yes_show'){
					$fields_sel.="<OPTION value=\"".$i."\">".$fieldsname."</OPTION> ";
	}
	else{
					$fields_not_sel.="<OPTION value=\"".$i."\">".$fieldsname."</OPTION> ";;
					$fields_sel_no.=$i.",";
	}//if chk_field
}

$template->set_filenames(array('body' =>'list_fields.tpl'));
$template->assign_vars(array("IMAGES_PATH"				=>$images_path,
												"INCLUDES_PATH"		=>$includes_path,
												"STYLE"							=>STYLE,
												"SF"									=>$fields_sel,
												"NSF"								=>$fields_not_sel,
												"TBTH"							=>$TBTH,
												"SELITEM"						=>$selitem,
												 "TB"								=>$TB,
												"FIELDS_SEL_NO"			=>$fields_sel_no,
												"ALL_FIELDS"				=>$all_fields,
												"CURRENT_PATH"		=>$CURRENT_PATH,
												));
$template->pparse('body');
?>

T1KUS90T
  root-grov@210.1.60.28:~$