<?php 
	include("../includes/procs.php");

	if (isset($_SESSION['selectParams'])) unset($_SESSION['selectParams']);
	$_SESSION['selectParams']['codeField'] = 'user_code';
	$_SESSION['selectParams']['descField'] = 'concat(user_name," ",user_surname)';
	$_SESSION['selectParams']['tableName'] = 'user';	
	if (isset($_SERVER["argv"]))
	{	
		$field  = $_SERVER["argv"][1];
		$hidden = $_SERVER["argv"][2];
		$search = $_SERVER["argv"][3];
		$page	= $_SERVER["argv"][4];
		if (isset($_SERVER["argv"][5])) $_SESSION['selectParams']['condition'] = $_SERVER["argv"][5];
		$module	= "devices";
		header("Location: ../list/select.php?".$_SERVER["argv"][0]."+".$field."+".$hidden."+".$search."+".$page."+".$module);
	}
	else
		header("Location: ../list/select.php".$_SERVER["argv"][0]."+");
?>