} // Check end of list $echo = array(); // Delete unused params from GET-request for active news cn_rm_GET('no_prev,no_next,source,number,start_from,reverse,static,sortby,dir,per_page,category,nocategory,page_alias,only_active,user_by'); // show news (include arhives, too) foreach ($entries as $entry) { cn_translate_active_news($entry, $translate); $echo[] = entry_make($entry, 'active', $template); } // No Entries if (($_show_rows = count($echo)) == 0) { echo i18n('No entries to show'); } // Re-Request this parameters for news listing cn_set_GET('source,number,start_from,reverse,static,sortby,dir,per_page,archive,category,nocategory,ucat,template=Default,page_alias,only_active,user_by'); // Show news list echo join('', $echo); // Get config $_enable_pagination = getoption('disable_pagination') ? FALSE : TRUE; // Enable ignore rewrite for pagination $_ignore_rewrite = isset($ignore_rewrite) && $ignore_rewrite ? true : false; $ignore_rewrite = false; // No pagination, if showed rows less than number if ($_cn <= $number || !$number) { $_enable_pagination = FALSE; } // in case of pagination if ($_enable_pagination) { $PSTF = array('category' => ''); $out = cn_get_template('prev_next', $template);
<?php list($files, $dirs, $path, $pathes, $popup_form, $root_dir) = _GL('files, dirs, path, pathes, popup_form, root_dir'); $ckeditor = REQ('CKEditorFuncNum'); $inline = REQ('opt', 'GETPOST') == 'inline' ? TRUE : FALSE; $opts = REQ('imgopts', 'GETPOST') == 'yes' ? TRUE : FALSE; $path_dir = ''; // Keep this parameters $KeepString = 'mod, opt, folder, CKEditorFuncNum, callback, style, faddm, imgopts'; // Set GET for dir links after file operations cn_set_GET($KeepString); cn_snippet_messages(); // BC only for stand-alone form if (!$inline) { cn_snippet_bc(); } ?> <script type="text/javascript"> function add_file_node() { var fnode = document.getElementById('file_node'); var ndiv=document.createElement('div'); ndiv.innerHTML = '<input type="file" name="upload_file[]" /> <a href="#" onclick="return(remove_it_node(this));">– remove</a>'; fnode.appendChild(ndiv); return false; } function remove_it_node(obj) {