<?php
	include(__DIR__.'/../includes/sysinit.php');
	$html	= "";
	if ($_POST['input_id'])
	{					
		$sql		= '	select reward_level.reward_level_id as VAL, reward_level_name as DESCR 
						from reward_level';
                        $sql		.=' where (reward_level_name like "%'.$_POST['input_id'].'%") or (reward_level_name like "%'.$_POST['input_id'].'%")
						order by reward_level_name';			
		$rows = $sableDB->getRows($sql);
		foreach($rows as $row) 
		{
			$html .= '<option value="'.$row['VAL'].'">'.$row['DESCR'].'</option>';
		}
	}
	$data['output_list'] = $html;
	SableSystem::ajaxFillField($html, $_POST['field_id']);