|
|
|
|
|
Execute($template_query_raw);
while (!$templates->EOF) {
if ((!isset($_GET['tID']) || (isset($_GET['tID']) && ($_GET['tID'] == $templates->fields['template_id']))) && !isset($tInfo) && (substr($action, 0, 3) != 'new')) {
$tInfo = new objectInfo($templates->fields);
}
if (isset($tInfo) && is_object($tInfo) && ($templates->fields['template_id'] == $tInfo->template_id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
if ($templates->fields['template_language'] == 0) {
$template_language = "Default(All)";
} else {
$ln = $db->Execute("select name
from " . TABLE_LANGUAGES . "
where languages_id = '" . $templates->fields['template_language'] . "'");
$template_language = $ln->fields['name'];
}
?>
|
fields['template_dir']]['name']; ?> |
fields['template_dir']; ?> |
fields['template_id'] == $tInfo->template_id) ) { echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif', ''); } else { echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ''; } ?>
|
MoveNext();
}
?>
display_count($template_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_TEMPLATES); ?> |
display_links($template_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']); ?> |
' . zen_image_button('button_new_language.gif', IMAGE_NEW_TEMPLATE) . ''; ?> |
|
|
'' . TEXT_INFO_HEADING_NEW_TEMPLATE . '');
$contents = array('form' => zen_draw_form('zones', FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&action=insert'));
$contents[] = array('text' => TEXT_INFO_INSERT_INTRO);
while (list ($key, $value) = each($template_info) ) {
$template_array[] = array('id' => $key, 'text' => $value['name']);
}
$lns = $db->Execute("select name, languages_id from " . TABLE_LANGUAGES);
while (!$lns->EOF) {
$language_array[] = array('text' => $lns->fields['name'], 'id' => $lns->fields['languages_id']);
$lns->MoveNext();
}
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_NAME . ' ' . zen_draw_pull_down_menu('ln', $template_array));
$contents[] = array('text' => ' ' . TEXT_INFO_LANGUAGE_NAME . ' ' . zen_draw_pull_down_menu('lang', $language_array, $_POST['lang']));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_insert.gif', IMAGE_INSERT) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'edit':
$heading[] = array('text' => '' . TEXT_INFO_HEADING_EDIT_TEMPLATE . '');
$contents = array('form' => zen_draw_form('templateselect', FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id . '&action=save'));
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
reset($template_info);
while (list ($key, $value) = each($template_info) ) {
$template_array[] = array('id' => $key, 'text' => $value['name']);
}
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_NAME . ' ' . zen_draw_pull_down_menu('ln', $template_array, $templates->fields['template_dir']));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_update.gif', IMAGE_UPDATE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'delete':
$heading[] = array('text' => '' . TEXT_INFO_HEADING_DELETE_TEMPLATE . '');
$contents = array('form' => zen_draw_form('zones', FILENAME_TEMPLATE_SELECT, 'page=' . $_GET['page'] . '&tID=' . $tInfo->template_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => ' ' . $template_info[$tInfo->template_dir]['name'] . '');
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (isset($tInfo) && is_object($tInfo)) {
$heading[] = array('text' => '' . $template_info[$tInfo->template_dir]['name'] . '');
if ($tInfo->template_language == 0) {
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '');
} else {
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '');
}
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_AUTHOR . $template_info[$tInfo->template_dir]['author']);
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_VERSION . $template_info[$tInfo->template_dir]['version']);
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_DESCRIPTION . ' ' . $template_info[$tInfo->template_dir]['description']);
$contents[] = array('text' => ' ' . TEXT_INFO_TEMPLATE_INSTALLED . ' ');
while (list ($key, $value) = each($template_info) ) {
$contents[] = array('text' => '' . zen_image_button('button_preview.gif', IMAGE_PREVIEW) . ' ' . $value['name']);
}
}
break;
}
if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|