|
|
'0', 'text' => TEXT_SORT_CHAPTER_TOC_TITLE),
array('id' => '1', 'text' => TEXT_SORT_HEADER_TITLE),
array('id' => '2', 'text' => TEXT_SORT_SIDEBOX_TITLE),
array('id' => '3', 'text' => TEXT_SORT_FOOTER_TITLE),
array('id' => '4', 'text' => TEXT_SORT_PAGE_TITLE),
array('id' => '5', 'text' => TEXT_SORT_PAGE_ID_TITLE)
);
echo TEXT_SORT_CHAPTER_TOC_TITLE_INFO . zen_draw_form('set_ez_sort_order_form', FILENAME_EZPAGES_ADMIN, '', 'get') . ' ' . zen_draw_pull_down_menu('reset_ez_sort_order', $ez_sort_order_array, $reset_ez_sort_order, 'onChange="this.form.submit();"') . zen_hide_session_id() .
($_GET['page'] != '' ? zen_draw_hidden_field('page', $_GET['page']) : '') .
zen_draw_hidden_field('action', 'set_ez_sort_order') .
'';
?>
|
';
}
?>
|
|
'',
'page_open_new_window' => '',
'page_is_ssl' => '',
'pages_html_text' => '',
'alt_url' => '',
'alt_url_external' => '',
'header_sort_order' => '',
'sidebox_sort_order' => '',
'footer_sort_order' => '',
'toc_sort_order' => '',
'toc_chapter' => '',
'status_header' => '',
'status_sidebox' => '',
'status_footer' => '',
'status_toc' => '',
'page_open_new_window' => '',
'page_is_ssl' => ''
);
$ezInfo = new objectInfo($parameters);
if (isset($_GET['ezID'])) {
$form_action = 'update';
$ezID = zen_db_prepare_input($_GET['ezID']);
$page_query = "select * from " . TABLE_EZPAGES . " where pages_id = '" . $_GET['ezID'] . "'";
$page = $db->Execute($page_query);
$ezInfo->objectInfo($page->fields);
} elseif (zen_not_null($_POST)) {
$ezInfo->objectInfo($_POST);
}
// set all status settings and switches
if (!isset($ezInfo->status_header)) $ezInfo->status_header = '1';
switch ($ezInfo->status_header) {
case '0': $is_status_header = false; $not_status_header = true; break;
case '1': $is_status_header = true; $not_status_header = false; break;
default: $is_status_header = true; $not_status_header = false; break;
}
if (!isset($ezInfo->status_sidebox)) $ezInfo->status_sidebox = '1';
switch ($ezInfo->status_sidebox) {
case '0': $is_status_sidebox = false; $not_status_sidebox = true; break;
case '1': $is_status_sidebox = true; $not_status_sidebox = false; break;
default: $is_status_sidebox = true; $not_status_sidebox = false; break;
}
if (!isset($ezInfo->status_footer)) $ezInfo->status_footer = '1';
switch ($ezInfo->status_footer) {
case '0': $is_status_footer = false; $not_status_footer = true; break;
case '1': $is_status_footer = true; $not_status_footer = false; break;
default: $is_status_footer = true; $not_status_footer = false; break;
}
if (!isset($ezInfo->status_toc)) $ezInfo->status_toc = '1';
switch ($ezInfo->status_toc) {
case '0': $is_status_toc = false; $not_status_toc = true; break;
case '1': $is_status_toc = true; $not_status_toc = false; break;
default: $is_status_toc = true; $not_status_toc = false; break;
}
if (!isset($ezInfo->page_open_new_window)) $ezInfo->not_page_open_new_window = '1';
switch ($ezInfo->page_open_new_window) {
case '0': $is_page_open_new_window = false; $not_page_open_new_window = true; break;
case '1': $is_page_open_new_window = true; $not_page_open_new_window = false; break;
default: $is_page_open_new_window = false; $not_page_open_new_window = true; break;
}
if (!isset($ezInfo->page_is_ssl)) $ezInfo->page_is_ssl = '1';
switch ($ezInfo->page_is_ssl) {
case '0': $is_page_is_ssl = false; $not_page_is_ssl = true; break;
case '1': $is_page_is_ssl = true; $not_page_is_ssl = false; break;
default: $is_page_is_ssl = false; $not_page_is_ssl = true; break;
}
?>
|
' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
|
pages_title, zen_set_field_length(TABLE_EZPAGES, 'pages_title'), true); ?> |
|
' . zen_draw_radio_field('page_open_new_window', '0', $not_page_open_new_window) . ' ' . TEXT_NO; ?>
|
' . zen_draw_radio_field('page_is_ssl', '0', $not_page_is_ssl) . ' ' . TEXT_NO; ?>
|
|
' . zen_draw_radio_field('status_header', '0', $not_status_header) . ' ' . TEXT_NO; ?>
|
header_sort_order, zen_set_field_length(TABLE_EZPAGES, 'header_sort_order'), false); ?>
|
|
' . zen_draw_radio_field('status_sidebox', '0', $not_status_sidebox) . ' ' . TEXT_NO; ?>
|
sidebox_sort_order, zen_set_field_length(TABLE_EZPAGES, 'sidebox_sort_order'), false); ?>
|
|
' . zen_draw_radio_field('status_footer', '0', $not_status_footer) . ' ' . TEXT_NO; ?>
|
footer_sort_order, zen_set_field_length(TABLE_EZPAGES, 'footer_sort_order'), false); ?>
|
|
toc_chapter, zen_set_field_length(TABLE_EZPAGES, 'toc_chapter', '6'), false); ?>
|
' . zen_draw_radio_field('status_toc', '0', $not_status_toc) . ' ' . TEXT_NO; ?>
|
toc_sort_order, zen_set_field_length(TABLE_EZPAGES, 'toc_sort_order'), false); ?>
|
|
'; ?>
'; ?>
'; ?>
'; ?>
|
|
|
Value = $ezInfo->pages_html_text ;
$oFCKeditor->Width = '80%' ;
$oFCKeditor->Height = '500' ;
// $oFCKeditor->Create() ;
$output = $oFCKeditor->CreateHtml() ; echo $output;
} else { // using HTMLAREA or just raw "source"
echo zen_draw_textarea_field('pages_html_text', 'soft', '100%', '40', $ezInfo->pages_html_text);
} ?>
|
|
|
alt_url, 'size="100"');
echo ' ' . TEXT_ALT_URL_EXPLAIN;
?> |
|
|
alt_url_external, 'size="100"');
echo ' ' . TEXT_ALT_URL_EXTERNAL_EXPLAIN;
?> |
|
|
|
' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . ''; ?> |
|
|
|
|
|
|
|
|
|
|
|
Execute($pages_query_raw);
$check_count=1;
if ($check_page->RecordCount() > MAX_DISPLAY_SEARCH_RESULTS_EZPAGE) {
while (!$check_page->EOF) {
if ($check_page->fields['customers_id'] == $_GET['cID']) {
break;
}
$check_count++;
$check_page->MoveNext();
}
$_GET['page'] = round((($check_count/MAX_DISPLAY_SEARCH_RESULTS_EZPAGE)+(fmod_round($check_count,MAX_DISPLAY_SEARCH_RESULTS_EZPAGE) !=0 ? .5 : 0)),0);
} else {
$_GET['page'] = 1;
}
}
$pages_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS_EZPAGE, $pages_query_raw, $pages_query_numrows);
$pages = $db->Execute($pages_query_raw);
while (!$pages->EOF) {
if ((!isset($_GET['ezID']) || (isset($_GET['ezID']) && ($_GET['ezID'] == $pages->fields['pages_id']))) && !isset($ezInfo) && (substr($action, 0, 3) != 'new')) {
$ezInfo_array = $pages->fields;
$ezInfo = new objectInfo($ezInfo_array);
}
$zv_link_method_cnt = 0;
if ($pages->fields['alt_url'] !='') {
$zv_link_method_cnt++;
}
if ($pages->fields['alt_url_external'] !='') {
$zv_link_method_cnt++;
}
if ($pages->fields['pages_html_text'] !='' and strlen(trim($pages->fields['pages_html_text'])) > 6) {
$zv_link_method_cnt++;
}
if (isset($ezInfo) && is_object($ezInfo) && ($pages->fields['pages_id'] == $ezInfo->pages_id)) {
echo ' ' . "\n";
} else {
echo ' ' . "\n";
}
?>
1 ? zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED_EZPAGES, 10, 10) : '') . ' ' . $pages->fields['pages_id']; ?> |
fields['pages_title']; ?> |
fields['page_open_new_window'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['page_is_ssl'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['header_sort_order'] . ' ' . ($pages->fields['status_header'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['sidebox_sort_order'] . ' ' . ($pages->fields['status_sidebox'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['footer_sort_order'] . ' ' . ($pages->fields['status_footer'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['toc_chapter']; ?> |
fields['toc_sort_order'] . ' ' . ($pages->fields['status_toc'] == 1 ? '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '' : '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ''); ?> |
fields['pages_id'] == $ezInfo->pages_id)) ? 'ezID=' . $pages->fields['pages_id'] . '&action=new' : '') . '">' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . ''; ?>fields['pages_id'] == $ezInfo->pages_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($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_EZPAGE, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_PAGES); ?> |
display_links($pages_query_numrows, MAX_DISPLAY_SEARCH_RESULTS_EZPAGE, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], zen_get_all_get_params(array('page', 'info', 'x', 'y', 'ezID'))); ?> |
' . zen_image_button('button_new_file.gif', IMAGE_NEW_PAGE) . ''; ?> |
|
|
'' . $ezInfo->pages_title . '');
$contents = array('form' => zen_draw_form('pages', FILENAME_EZPAGES_ADMIN, 'page=' . $_GET['page'] . '&ezID=' . $ezInfo->pages_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => ' ' . $ezInfo->pages_title . '');
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_delete.gif', IMAGE_DELETE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
default:
if (is_object($ezInfo)) {
$heading[] = array('text' => '' . TEXT_PAGE_TITLE . ' ' . $ezInfo->pages_title . ' | ' . TEXT_CHAPTER . ' ' . $ezInfo->toc_chapter . '');
$zv_link_method_cnt = 0;
if ($ezInfo->alt_url !='') {
$zv_link_method_cnt++;
}
if ($ezInfo->alt_url_external !='') {
$zv_link_method_cnt++;
}
if ($ezInfo->pages_html_text !='' and strlen(trim($ezInfo->pages_html_text)) > 6) {
$zv_link_method_cnt++;
}
if ($zv_link_method_cnt > 1) {
$contents[] = array('align' => 'left', 'text' => zen_image(DIR_WS_IMAGES . 'icon_status_red.gif', IMAGE_ICON_STATUS_RED_EZPAGES, 10, 10) . ' ' . TEXT_WARNING_MULTIPLE_SETTINGS);
}
$contents[] = array('align' => 'left', 'text' => TEXT_ALT_URL . (empty($ezInfo->alt_url) ? ' ' . TEXT_NONE : ' ' . $ezInfo->alt_url));
$contents[] = array('align' => 'left', 'text' => ' ' . TEXT_ALT_URL_EXTERNAL . (empty($ezInfo->alt_url_external) ? ' ' . TEXT_NONE : ' ' . $ezInfo->alt_url_external));
$contents[] = array('align' => 'left', 'text' => ' ' . TEXT_PAGES_HTML_TEXT . ' ' . substr(strip_tags($ezInfo->pages_html_text),0,100));
$contents[] = array('align' => 'left', 'text' => ' ' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '
');
if ($ezInfo->date_scheduled) $contents[] = array('text' => ' ' . sprintf(TEXT_PAGES_SCHEDULED_AT_DATE, zen_date_short($ezInfo->date_scheduled)));
if ($ezInfo->expires_date) {
$contents[] = array('text' => ' ' . sprintf(TEXT_PAGES_EXPIRES_AT_DATE, zen_date_short($ezInfo->expires_date)));
} elseif ($ezInfo->expires_impressions) {
$contents[] = array('text' => ' ' . sprintf(TEXT_PAGES_EXPIRES_AT_IMPRESSIONS, $ezInfo->expires_impressions));
}
if ($ezInfo->date_status_change) $contents[] = array('text' => ' ' . sprintf(TEXT_PAGES_STATUS_CHANGE, zen_date_short($ezInfo->date_status_change)));
}
break;
}
if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
echo ' ' . "\n";
$box = new box;
echo $box->infoBox($heading, $contents);
echo ' | ' . "\n";
}
?>
|
|