<?php
$type = '<select name="type_id" id="type_id" class="pj-form-field w200 required">';
$type .= sprintf('<option value="">-- %s --</option>', __('lblChoose', true));
foreach ($tpl['type_arr'] as $v)
{
	$type .= sprintf('<option value="%u">%s</option>', $v['id'], stripslashes($v['name']));
}
$type .= '</select>';
// ----------------------
$category = '<select name="category_id" id="category_id" class="pj-form-field w400 required">';
$category .= sprintf('<option value="">-- %s --</option>', __('lblChoose', true));
foreach ($tpl['category_arr'] as $v)
{
	$category .= sprintf('<option value="%u">%s</option>', $v['id'], stripslashes($v['name']));
}
$category .= '</select>';

pjAppController::jsonResponse(compact('type', 'category'));
?>