' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'ΝΌΚΎ | ' .
' ' .
'' .
'' . TEXT_NEWS_LEGEND_STATUS_OFF . ' | ' .
'' . TEXT_NEWS_LEGEND_STATUS_ON . ' | ' .
'' . TEXT_NEWS_LEGEND_EDIT . ' | ' .
'' . TEXT_NEWS_LEGEND_DELETE . ' | ' .
'' . TEXT_NEWS_LEGEND_INFO . ' | ' .
' ' .
'' .
'' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . ' | ' .
'' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . ' | ' .
'' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . ' | ' .
'' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . ' | ' .
'' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' | ' .
' ' .
' ' .
' | ' .
' ' .
'' .
'' . zen_draw_separator('pixel_trans.gif', '1', '10') . ' | ' .
' ' .
'' .
'' .
'' .
'' .
'' . sprintf(HEADING_TITLE, news_get_news_article_name($_GET['aID'])) . ' | ' .
'' . zen_draw_separator('pixel_trans.gif', HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT) . ' | ' .
' ' .
' ' .
' | ' .
' ' .
'' .
'' .
'' .
'' .
'' .
'' .
'' .
'' . TABLE_HEADING_COMMENTS_BY . ' | ' .
'' . TABLE_HEADING_SUBJECT . ' | ' .
'' . TABLE_HEADING_DATE_ADDED . ' | ' .
'' . TABLE_HEADING_STATUS . ' | ' .
'' . TABLE_HEADING_ACTION . ' | ' .
' ';
$comments_query_raw = "select nc.comments_id, nc.article_id, nc.customers_id, nc.customers_name, nc.date_added, nc.last_modified, nc.approved, ncd.comments_subject, ncd.comments_text from " . TABLE_NEWS_COMMENTS . " nc left join " . TABLE_NEWS_COMMENTS_DESCRIPTION . " ncd on (nc.comments_id = ncd.comments_id and ncd.language_id = '" . (int)$_SESSION['languages_id'] . "') where nc.article_id = '" . (int)$_GET['aID'] . "' order by nc.date_added DESC";
$comments_split = new splitPageResults($_GET['page'], MAX_DISPLAY_SEARCH_RESULTS, $comments_query_raw, $comments_query_numrows);
$comments = $db->Execute($comments_query_raw);
while (!$comments->EOF) {
if (((!$_GET['cID']) || (@$_GET['cID'] == $comments->fields['comments_id'])) && (!$cInfo) && (substr($_GET['action'], 0, 3) != 'new')) {
$cInfo = new objectInfo($comments->fields);
}
if ( (is_object($cInfo)) && ($comments->fields['comments_id'] == $cInfo->comments_id) ) {
echo '';
} else {
echo ' ';
}
echo
'' . $comments->fields['customers_name'] . ' | ' .
'' . $comments->fields['comments_subject'] . ' | ' .
'' . zen_datetime_short($comments->fields['date_added']) . ' | ' .
'';
if ($comments->fields['approved'] == '1') {
echo '' . zen_image(DIR_WS_IMAGES . 'icon_green_on.gif', IMAGE_ICON_STATUS_ON) . '';
} else {
echo '' . zen_image(DIR_WS_IMAGES . 'icon_red_on.gif', IMAGE_ICON_STATUS_OFF) . '';
}
echo
' | ' .
'' .
'' . zen_image(DIR_WS_IMAGES . 'icon_edit.gif', ICON_EDIT) . ' ' .
'' . zen_image(DIR_WS_IMAGES . 'icon_delete.gif', ICON_DELETE) . ' ';
if ( (is_object($cInfo)) && ($comments->fields['comments_id'] == $cInfo->comments_id) ) {
echo zen_image(DIR_WS_IMAGES . 'icon_arrow_right.gif') . ' ';
} else {
echo '' . zen_image(DIR_WS_IMAGES . 'icon_info.gif', IMAGE_ICON_INFO) . ' ';
}
echo
' | ' .
' ';
$comments->MoveNext();
}
echo
'' .
'' .
'' .
'' .
'' . $comments_split->display_count($comments_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_COMMENTS) . ' | ' .
'' . $comments_split->display_links($comments_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']) . ' | ' .
' ' .
' ' .
' | ' .
' ';
if ($_GET['action'] != 'new') {
echo
'' .
'' . zen_image_button('button_insert.gif', IMAGE_INSERT) . ' | ' .
' ';
}
echo
' ' .
' | ';
$heading = array();
$contents = array();
switch ($_GET['action']) {
case 'new':
$heading[] = array('text' => '' . TEXT_HEADING_NEW_COMMENT . '');
$contents = array('form' => zen_draw_form('new_comment', FILENAME_NEWS_COMMENTS, 'page=' . $_GET['page'] . '&aID=' . $_GET['aID'] . '&query=add_comment&action=new', 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => TEXT_NEW_INTRO);
$contents[] = array('text' => ' ' . TEXT_COMMENTS_BY . ' ' . zen_draw_input_field('customers_name', (($customers_name) ? $customers_name : '')));
$contents[] = array('text' => ' ' . TEXT_SUBJECT . ' ' . zen_draw_input_field('comments_subject', (($comments_subject) ? $comments_subject : '')));
$contents[] = array('text' => ' ' . TEXT_COMMENTS . ' ' . zen_draw_textarea_field('comments_text', 'soft', '30', '20', (($comments_text) ? $comments_text : ''), 'style="width: 100%;"'));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'edit':
$heading[] = array('text' => '' . TEXT_HEADING_EDIT_COMMENT . '');
$contents = array('form' => zen_draw_form('update_comment', FILENAME_NEWS_COMMENTS, 'page=' . $_GET['page'] . '&aID=' . $_GET['aID'] . '&cID=' . $cInfo->comments_id . '&query=update_comment&action=edit', 'post', 'enctype="multipart/form-data"'));
$contents[] = array('text' => TEXT_EDIT_INTRO);
$contents[] = array('text' => ' ' . TEXT_COMMENTS_BY . ' ' . zen_draw_input_field('customers_name', (($customers_name) ? $customers_name : $cInfo->customers_name)));
$contents[] = array('text' => ' ' . TEXT_SUBJECT . ' ' . zen_draw_input_field('comments_subject', (($comments_subject) ? $comments_subject : $cInfo->comments_subject)));
$contents[] = array('text' => ' ' . TEXT_COMMENTS . ' ' . zen_draw_textarea_field('comments_text', 'soft', '30', '20', (($comments_text) ? $comments_text : $cInfo->comments_text), 'style="width: 100%;"'));
$contents[] = array('align' => 'center', 'text' => ' ' . zen_image_submit('button_save.gif', IMAGE_SAVE) . ' ' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '');
break;
case 'delete':
$heading[] = array('text' => '' . TEXT_HEADING_DELETE_COMMENT . '');
$contents = array('form' => zen_draw_form('delete_author', FILENAME_NEWS_COMMENTS, 'page=' . $_GET['page'] . '&aID=' . $_GET['aID'] . '&cID=' . $cInfo->comments_id . '&query=delete_comment&action=delete'));
$contents[] = array('text' => TEXT_DELETE_INTRO);
$contents[] = array('text' => ' ' . $cInfo->comments_subject . ' ' . $cInfo->customers_name);
$contents[] = array('text' => ' ' . $cInfo->comments_text);
$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($cInfo)) {
$heading[] = array('text' => '' . TEXT_HEADING_COMMENT . '');
$contents[] = array('align' => 'center', 'text' => '' . zen_image_button('button_edit.gif', IMAGE_EDIT) . ' ' . zen_image_button('button_delete.gif', IMAGE_DELETE) . '');
$contents[] = array('text' => ' ' . $cInfo->comments_subject . ' ' . $cInfo->customers_name);
$contents[] = array('text' => ' ' . $cInfo->comments_text);
}
break;
}
if ( (zen_not_null($heading)) && (zen_not_null($contents)) ) {
$box = new box;
echo '' . $box->infoBox($heading, $contents) . ' | ';
}
echo
' ' .
' ' .
' | ' .
' ' .
' ' .
' | ' .
'' .
'
' .
'