1,6 → 1,7 |
<?php |
|
include_once('includes/common.php'); |
include_once('includes/export_types.php'); |
Prolog(); |
|
$id = $_GET['id']; |
7,23 → 8,36 |
$export = array(); |
|
if($id) { |
$db->query_params("select export_id, export_name, export_comment" |
$db->query_params("select export_id, export_name, export_type, export_comment" |
. " from telbook_export" |
. " where export_id=$1", array($id)); |
|
if($line = $db->fetch_row()) { |
$export['EXPORT_ID'] = $line['export_id']; |
$export['EXPORT_NAME'] = $line['export_name']; |
$export['EXPORT_COMMENT'] = $line['export_comment']; |
$export['EXPORT_ID'] = $line['export_id']; |
$export['EXPORT_NAME'] = $line['export_name']; |
$export['EXPORT_TYPE'] = $line['export_type']; |
$export['EXPORT_COMMENT'] = $line['export_comment']; |
} |
} |
else { |
$export['EXPORT_ID'] = ''; |
$export['EXPORT_NAME'] = ''; |
$export['EXPORT_COMMENT'] = ''; |
$export['EXPORT_ID'] = ''; |
$export['EXPORT_NAME'] = ''; |
$export['EXPORT_TYPE'] = ''; |
$export['EXPORT_COMMENT'] = ''; |
} |
$g_display->add_variables($export); |
|
# types select box |
$types_list = "\n\t\t\t\t<option value=''>(none)</option>"; |
asort($export_types); |
foreach($export_types as $key => $value) { |
$types_list .= "\n\t\t\t\t<option value='" |
. htmlspecialchars($key) . "'" |
. ($key == $export['EXPORT_TYPE'] ? " selected" : "") |
. ">" . htmlspecialchars($value) . "</option>"; |
} |
$g_display->add_html_variables(array('TYPES' => $types_list)); |
|
$g_display->add_template('telbook_export_details'); |
|
Epilog(); |