<?php
	include(__DIR__.'/../includes/sysinit.php');

	$typeId = $_POST['input_id'] == 2 ? 2 : 1; //Client & Proxy should be treated with the same types.

	$sql = "select id_type_id, id_type_name
			from id_type 
			where (id_type_id >= 0) or (id_type_id = ".$typeId.") 
			order by id_type_id";
	
	//SableDebug::debug($sql);
	
	$rows = $sableDB->getRows($sql);
	$html = "<option value=0>Select ID Type</option>";
	$cnt = 0;
	foreach($rows as $row)
	{
		$html .= '<option value="'.SableSystem::sableEncode($row['id_type_id']).'">'.$row['id_type_name'].'</option>';
		$cnt++;
	}
	$data['output_list'] = $html;
	SableSystem::ajaxFillField($html, $_POST['field_id']);