7,7 → 7,7 |
$category = array(); |
|
if($id) { |
$db->query_params("select category_id, category_name, category_comment, category_export_key" |
$db->query_params("select category_id, category_name, category_comment" |
. " from telbook_categories" |
. " where category_id=$1", array($id)); |
|
15,7 → 15,6 |
$category['CATEGORY_ID'] = $line['category_id']; |
$category['CATEGORY_NAME'] = $line['category_name']; |
$category['CATEGORY_COMMENT'] = $line['category_comment']; |
$category['CATEGORY_EXPORT_KEY'] = $line['category_export_key']; |
} |
} |
else { |
22,12 → 21,28 |
$category['CATEGORY_ID'] = ''; |
$category['CATEGORY_NAME'] = ''; |
$category['CATEGORY_COMMENT'] = ''; |
$category['CATEGORY_EXPORT_KEY'] = ''; |
} |
$g_display->add_variables($category); |
|
$g_display->add_template('telbook_category_details'); |
# export targets |
$table = new Table(array('Export Target', 'Export Title')); |
$db->query_params("select ex.export_id, export_name, export_comment," |
. " ce.category_id, ce.category_export_title" |
. " from telbook_export ex" |
. " left join telbook_categories_export ce on ce.export_id=ex.export_id and ce.category_id=$1" |
. " order by upper(export_name), export_name, category_id", array($id)); |
while($line = $db->fetch_row()) { |
$table->newrow(); |
$table->addcell($line['export_name']); |
$table->addcell(array('html' => display_input( |
'text', 'export_title-' . $line['export_id'], $line['category_export_title']))); |
} |
|
# show |
$g_display->add_template('telbook_category_details_begin'); |
$g_display->add_html_text($table->build()); |
$g_display->add_template('telbook_category_details_end'); |
|
Epilog(); |
|
?> |