本文整理汇总了PHP中Note::display_form方法的典型用法代码示例。如果您正苦于以下问题:PHP Note::display_form方法的具体用法?PHP Note::display_form怎么用?PHP Note::display_form使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Note
的用法示例。
在下文中一共展示了Note::display_form方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Confirm
$Errorh->handler('e_unexist_link_web', E_USER_REDIRECT);
}
if ($User->check_level(ADMIN_LEVEL)) {
$java = "<script language='JavaScript' type='text/javascript'>\n\t\t<!--\n\t\tfunction Confirm() {\n\t\treturn confirm('" . $LANG['delete_link'] . "');\n\t\t}\n\t\t-->\n\t\t</script>";
$edit = ' <a href="../web/admin_web' . url('.php?id=' . $web['id']) . '" title="' . $LANG['edit'] . '"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/edit.png" class="valign_middle" /></a>';
$del = ' <a href="../web/admin_web.php?delete=1&id=' . $web['id'] . '&token=' . $Session->get_token() . '" title="' . $LANG['delete'] . '" onclick="javascript:return Confirm();"><img src="../templates/' . get_utheme() . '/images/' . get_ulang() . '/delete.png" class="valign_middle" /></a>';
} else {
$edit = '';
$del = '';
$java = '';
}
$Template->assign_vars(array('JAVA' => $java, 'EDIT' => $edit, 'DEL' => $del));
import('content/note');
$Note = new Note('web', $idweb, url('web.php?cat=' . $idcat . '&id=' . $idweb, 'web-' . $idcat . '-' . $idweb . '.php'), $CONFIG_WEB['note_max'], '', NOTE_DISPLAY_NOTE);
import('content/comments');
$Template->assign_vars(array('C_DISPLAY_WEB' => true, 'MODULE_DATA_PATH' => $Template->get_module_data_path('web'), 'IDWEB' => $web['id'], 'NAME' => $web['title'], 'CONTENTS' => second_parse($web['contents']), 'URL' => $web['url'], 'CAT' => $CAT_WEB[$idcat]['name'], 'DATE' => gmdate_format('date_format_short', $web['timestamp']), 'COMPT' => $web['compt'], 'THEME' => get_utheme(), 'LANG' => get_ulang(), 'COM' => Comments::com_display_link($web['nbr_com'], '../web/web' . url('.php?cat=' . $idcat . '&id=' . $idweb . '&com=0', '-' . $idcat . '-' . $idweb . '.php?com=0'), $idweb, 'web'), 'KERNEL_NOTATION' => $Note->display_form(), 'U_WEB_CAT' => url('.php?cat=' . $idcat, '-' . $idcat . '.php'), 'L_DESC' => $LANG['description'], 'L_CAT' => $LANG['category'], 'L_DATE' => $LANG['date'], 'L_TIMES' => $LANG['n_time'], 'L_VIEWS' => $LANG['views']));
if (isset($_GET['com'])) {
$Template->assign_vars(array('COMMENTS' => display_comments('web', $idweb, url('web.php?cat=' . $idcat . '&id=' . $idweb . '&com=%s', 'web-' . $idcat . '-' . $idweb . '.php?com=%s'))));
}
$Template->pparse('web');
} elseif (!empty($idcat) && empty($idweb)) {
$Template->set_filenames(array('web' => 'web/web.tpl'));
if (!$User->check_level($CAT_WEB[$idcat]['secure'])) {
$Errorh->handler('e_auth', E_USER_REDIRECT);
}
$nbr_web = $Sql->query("SELECT COUNT(*) as compt \n\tFROM " . PREFIX . "web \n\tWHERE aprob = 1 AND idcat = '" . $idcat . "'", __LINE__, __FILE__);
$Template->assign_vars(array('C_WEB_LINK' => true, 'C_IS_ADMIN' => $User->check_level(ADMIN_LEVEL), 'CAT_NAME' => $CAT_WEB[$idcat]['name'], 'NO_CAT' => $nbr_web == 0 ? $LANG['none_link'] : '', 'MAX_NOTE' => $CONFIG_WEB['note_max'], 'L_LINK' => $LANG['link'], 'L_DATE' => $LANG['date'], 'L_VIEW' => $LANG['views'], 'L_NOTE' => $LANG['note'], 'L_COM' => $LANG['com'], 'U_WEB_ALPHA_TOP' => url('.php?sort=alpha&mode=desc&cat=' . $idcat, '-' . $idcat . '.php?sort=alpha&mode=desc'), 'U_WEB_ALPHA_BOTTOM' => url('.php?sort=alpha&mode=asc&cat=' . $idcat, '-' . $idcat . '.php?sort=alpha&mode=asc'), 'U_WEB_DATE_TOP' => url('.php?sort=date&mode=desc&cat=' . $idcat, '-' . $idcat . '.php?sort=date&mode=desc'), 'U_WEB_DATE_BOTTOM' => url('.php?sort=date&mode=asc&cat=' . $idcat, '-' . $idcat . '.php?sort=date&mode=asc'), 'U_WEB_VIEW_TOP' => url('.php?sort=view&mode=desc&cat=' . $idcat, '-' . $idcat . '.php?sort=view&mode=desc'), 'U_WEB_VIEW_BOTTOM' => url('.php?sort=view&mode=asc&cat=' . $idcat, '-' . $idcat . '.php?sort=view&mode=asc'), 'U_WEB_NOTE_TOP' => url('.php?sort=note&mode=desc&cat=' . $idcat, '-' . $idcat . '.php?sort=note&mode=desc'), 'U_WEB_NOTE_BOTTOM' => url('.php?sort=note&mode=asc&cat=' . $idcat, '-' . $idcat . '.php?sort=note&mode=asc'), 'U_WEB_COM_TOP' => url('.php?sort=com&mode=desc&cat=' . $idcat, '-' . $idcat . '.php?sort=com&mode=desc'), 'U_WEB_COM_BOTTOM' => url('.php?sort=com&mode=asc&cat=' . $idcat, '-' . $idcat . '.php?sort=com&mode=asc')));
$get_sort = retrieve(GET, 'sort', '');
switch ($get_sort) {
case 'alpha':
$sort = 'title';
示例2: url
}
if ($CONFIG_GALLERY['display_pics'] == 3) {
$display_link = HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&cat=' . $row['idcat']) . '" rel="lightbox[1]" onmousedown="increment_view(' . $row['id'] . ');" title="' . str_replace('"', '', stripslashes($row['name']));
$display_name = HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&cat=' . $row['idcat']) . '" rel="lightbox[2]" onmousedown="increment_view(' . $row['id'] . ');" title="' . str_replace('"', '', stripslashes($row['name']));
} elseif ($CONFIG_GALLERY['display_pics'] == 2) {
$display_name = $display_link = 'javascript:increment_view(' . $row['id'] . ');display_pics_popup(\'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&cat=' . $row['idcat']) . '\', \'' . $row['width'] . '\', \'' . $row['height'] . '\')';
} elseif ($CONFIG_GALLERY['display_pics'] == 1) {
$display_name = $display_link = 'javascript:increment_view(' . $row['id'] . ');display_pics(' . $row['id'] . ', \'' . HOST . DIR . '/gallery/show_pics' . url('.php?id=' . $row['id'] . '&cat=' . $row['idcat']) . '\')';
} else {
$display_name = $display_link = url('gallery.php?cat=' . $row['idcat'] . '&id=' . $row['id'], 'gallery-' . $row['idcat'] . '-' . $row['id'] . '.php') . '#pics_max';
}
$cat_list = '';
foreach ($array_cat_list as $key_cat => $option_value) {
$cat_list .= $key_cat == $row['idcat'] ? sprintf($option_value, 'selected="selected"') : sprintf($option_value, '');
}
$activ_note = $CONFIG_GALLERY['activ_note'] == 1 && $is_connected;
if ($activ_note) {
$Note = new Note('gallery', $row['id'], url('.php?cat=' . $row['idcat'] . '&id=' . $row['id'], '-' . $row['idcat'] . '-' . $row['id'] . '.php'), $CONFIG_GALLERY['note_max'], '', NOTE_NODISPLAY_NBRNOTES | NOTE_DISPLAY_BLOCK);
}
$html_protected_name = strprotect($row['name'], HTML_PROTECT, ADDSLASHES_FORCE);
$Template->assign_block_vars('pics_list', array('ID' => $row['id'], 'APROB' => $row['aprob'], 'IMG' => '<img src="pics/thumbnails/' . $row['path'] . '" alt="' . str_replace('"', '', stripslashes($row['name'])) . '" class="gallery_image" />', 'PATH' => $row['path'], 'NAME' => $CONFIG_GALLERY['activ_title'] == 1 ? '<a class="small_link" href="' . $display_name . '"><span id="fi_' . $row['id'] . '">' . wordwrap_html(stripslashes($row['name']), 22, ' ') . '</span></a> <span id="fi' . $row['id'] . '"></span>' : '<span id="fi_' . $row['id'] . '"></span></a> <span id="fi' . $row['id'] . '"></span>', 'POSTOR' => $CONFIG_GALLERY['activ_user'] == 1 ? '<br />' . $LANG['by'] . (!empty($row['login']) ? ' <a class="small_link" href="../member/member' . url('.php?id=' . $row['user_id'], '-' . $row['user_id'] . '.php') . '">' . $row['login'] . '</a>' : ' ' . $LANG['guest']) : '', 'VIEWS' => $CONFIG_GALLERY['activ_view'] == 1 ? '<br /><span id="gv' . $row['id'] . '">' . $row['views'] . '</span> <span id="gvl' . $row['id'] . '">' . ($row['views'] > 1 ? $LANG['views'] : $LANG['view']) . '</span>' : '', 'COM' => $CONFIG_GALLERY['activ_com'] == 1 ? '<br />' . Comments::com_display_link($row['nbr_com'], '../gallery/gallery' . url('.php?cat=' . $row['idcat'] . '&id=' . $row['id'] . '&com=0', '-' . $row['idcat'] . '-' . $row['id'] . '.php?com=0'), $row['id'], 'gallery') : '', 'KERNEL_NOTATION' => $activ_note ? $Note->display_form() : '', 'CAT' => $cat_list, 'RENAME' => $html_protected_name, 'RENAME_CUT' => $html_protected_name, 'IMG_APROB' => get_ulang() . '/' . ($row['aprob'] == 1 ? 'unvisible.png' : 'visible.png'), 'OPEN_TR' => is_int($j++ / $nbr_column_pics) ? '<tr>' : '', 'CLOSE_TR' => is_int($j / $nbr_column_pics) ? '</tr>' : '', 'L_APROB_IMG' => $row['aprob'] == 1 ? $LANG['unaprob'] : $LANG['aprob'], 'U_DEL' => url('.php?del=' . $row['id'] . '&token=' . $Session->get_token() . '&cat=' . $g_idcat, '-' . $g_idcat . '.php?token=' . $Session->get_token() . '&del=' . $row['id']), 'U_MOVE' => url('.php?id=' . $row['id'] . '&token=' . $Session->get_token() . '&move=\' + this.options[this.selectedIndex].value', '-0-' . $row['id'] . '.php?token=' . $Session->get_token() . '&move=\' + this.options[this.selectedIndex].value'), 'U_DISPLAY' => $display_link));
}
$Sql->query_close($result);
while (!is_int($j / $nbr_column_pics)) {
$Template->assign_block_vars('end_table', array('TD_END' => '<td style="margin:15px 0px;width:' . $column_width_pics . '%"> </td>', 'TR_END' => is_int(++$j / $nbr_column_pics) ? '</tr>' : ''));
}
}
}
$Template->pparse('gallery');
}
require_once '../kernel/footer.php';
示例3: foreach
}
$array_contents = preg_split('`\\[page\\].+\\[/page\\](.*)`Us', $articles['contents'], -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);
preg_match_all('`\\[page\\]([^[]+)\\[/page\\]`U', $articles['contents'], $array_page);
$page_list = '<option value="1">' . $LANG['select_page'] . '</option>';
$page_list .= '<option value="1"></option>';
$i = 1;
foreach ($array_page[1] as $page_name) {
$selected = $i == $page ? 'selected="selected"' : '';
$page_list .= '<option value="' . $i++ . '"' . $selected . '>' . $page_name . '</option>';
}
$nbr_page = count($array_page[1]);
$nbr_page = !empty($nbr_page) ? $nbr_page : 1;
import('content/note');
$Note = new Note('articles', $idart, url('articles.php?cat=' . $idartcat . '&id=' . $idart, 'articles-' . $idartcat . '-' . $idart . '.php'), $CONFIG_ARTICLES['note_max'], '', NOTE_DISPLAY_NOTE);
import('content/comments');
$Template->assign_vars(array('C_IS_ADMIN' => $User->check_level(ADMIN_LEVEL), 'C_DISPLAY_ARTICLE' => true, 'IDART' => $articles['id'], 'IDCAT' => $idartcat, 'NAME' => $articles['title'], 'PSEUDO' => $Sql->query("SELECT login FROM " . DB_TABLE_MEMBER . " WHERE user_id = '" . $articles['user_id'] . "'", __LINE__, __FILE__), 'CONTENTS' => isset($array_contents[$page]) ? second_parse($array_contents[$page]) : '', 'CAT' => $CAT_ARTICLES[$idartcat]['name'], 'DATE' => gmdate_format('date_format_short', $articles['timestamp']), 'PAGES_LIST' => $page_list, 'PAGINATION_ARTICLES' => $Pagination->display('articles' . url('.php?cat=' . $idartcat . '&id=' . $idart . '&p=%d', '-' . $idartcat . '-' . $idart . '-%d+' . url_encode_rewrite($articles['title']) . '.php'), $nbr_page, 'p', 1, 3, 11, NO_PREVIOUS_NEXT_LINKS), 'PAGE_NAME' => isset($array_page[1][$page - 1]) && $array_page[1][$page - 1] != ' ' ? $array_page[1][$page - 1] : '', 'PAGE_PREVIOUS_ARTICLES' => $page > 1 && $page <= $nbr_page && $nbr_page > 1 ? '<a href="' . url('articles.php?cat=' . $idartcat . '&id=' . $idart . '&p=' . ($page - 1), 'articles-' . $idartcat . '-' . $idart . '-' . ($page - 1) . '+' . url_encode_rewrite($articles['title']) . '.php') . '">« ' . $LANG['previous_page'] . '</a><br />' . $array_page[1][$page - 2] : '', 'PAGE_NEXT_ARTICLES' => $page > 0 && $page < $nbr_page && $nbr_page > 1 ? '<a href="' . url('articles.php?cat=' . $idartcat . '&id=' . $idart . '&p=' . ($page + 1), 'articles-' . $idartcat . '-' . $idart . '-' . ($page + 1) . '+' . url_encode_rewrite($articles['title']) . '.php') . '">' . $LANG['next_page'] . ' »</a><br />' . $array_page[1][$page] : '', 'COM' => Comments::com_display_link($articles['nbr_com'], '../articles/articles' . url('.php?cat=' . $idartcat . '&id=' . $idart . '&com=0', '-' . $idartcat . '-' . $idart . '+' . url_encode_rewrite($articles['title']) . '.php?com=0'), $articles['id'], 'articles'), 'KERNEL_NOTATION' => $Note->display_form(), 'U_USER_ID' => url('.php?id=' . $articles['user_id'], '-' . $articles['user_id'] . '.php'), 'U_ONCHANGE_ARTICLE' => "'" . url('articles.php?cat=' . $idartcat . '&id=' . $idart . '&p=\' + this.options[this.selectedIndex].value', 'articles-' . $idartcat . '-' . $idart . '-\'+ this.options[this.selectedIndex].value + \'+' . url_encode_rewrite($articles['title']) . '.php' . "'"), 'U_PRINT_ARTICLE' => url('print.php?id=' . $idart), 'L_ALERT_DELETE_ARTICLE' => $LANG['alert_delete_article'], 'L_SUMMARY' => $LANG['summary'], 'L_DELETE' => $LANG['delete'], 'L_EDIT' => $LANG['edit'], 'L_SUBMIT' => $LANG['submit'], 'L_WRITTEN' => $LANG['written_by'], 'L_ON' => $LANG['on'], 'L_PRINTABLE_VERSION' => $LANG['printable_version']));
if (isset($_GET['com'])) {
$Template->assign_vars(array('COMMENTS' => display_comments('articles', $idart, url('articles.php?cat=' . $idartcat . '&id=' . $idart . '&com=%s', 'articles-' . $idartcat . '-' . $idart . '.php?com=%s'))));
}
$Template->pparse('articles');
} else {
import('modules/modules_discovery_service');
$modulesLoader = new ModulesDiscoveryService();
$module_name = 'articles';
$module = $modulesLoader->get_module($module_name);
if ($module->has_functionality('get_home_page')) {
echo $module->functionality('get_home_page');
} elseif (!$no_alert_on_error) {
global $Errorh;
$Errorh->handler('Le module <strong>' . $module_name . '</strong> n\'a pas de fonction get_home_page!', E_USER_ERROR, __LINE__, __FILE__);
exit;
示例4: elseif
if ($file_id > 0) {
$Template->set_filenames(array('download' => 'download/download.tpl'));
if ($download_info['size'] > 1) {
$size_tpl = $download_info['size'] . ' ' . $LANG['unit_megabytes'];
} elseif ($download_info['size'] > 0) {
$size_tpl = $download_info['size'] * 1024 . ' ' . $LANG['unit_kilobytes'];
} else {
$size_tpl = $DOWNLOAD_LANG['unknown_size'];
}
import('util/date');
$creation_date = new Date(DATE_TIMESTAMP, TIMEZONE_SYSTEM, $download_info['timestamp']);
$release_date = new Date(DATE_TIMESTAMP, TIMEZONE_SYSTEM, $download_info['release_timestamp']);
import('content/note');
$Note = new Note('download', $file_id, url('download.php?id=' . $file_id, 'category-' . $category_id . '-' . $file_id . '.php'), $CONFIG_DOWNLOAD['note_max'], '', NOTE_NODISPLAY_NBRNOTES);
import('content/comments');
$Template->assign_vars(array('C_DISPLAY_DOWNLOAD' => true, 'C_IMG' => !empty($download_info['image']), 'C_EDIT_AUTH' => $auth_write, 'MODULE_DATA_PATH' => $Template->get_module_data_path('download'), 'ID_FILE' => $file_id, 'NAME' => $download_info['title'], 'CONTENTS' => second_parse($download_info['contents']), 'CREATION_DATE' => $creation_date->format(DATE_FORMAT_SHORT), 'RELEASE_DATE' => $release_date->get_timestamp() > 0 ? $release_date->format(DATE_FORMAT_SHORT) : $DOWNLOAD_LANG['unknown_date'], 'SIZE' => $size_tpl, 'COUNT' => $download_info['count'], 'THEME' => get_utheme(), 'KERNEL_NOTATION' => $Note->display_form(), 'HITS' => sprintf($DOWNLOAD_LANG['n_times'], (int) $download_info['count']), 'NUM_NOTES' => sprintf($DOWNLOAD_LANG['num_notes'], (int) $download_info['nbrnote']), 'U_IMG' => $download_info['image'], 'IMAGE_ALT' => str_replace('"', '\\"', $download_info['title']), 'LANG' => get_ulang(), 'U_COM' => Comments::com_display_link($download_info['nbr_com'], '../download/download' . url('.php?id=' . $file_id . '&com=0', '-' . $file_id . '+' . url_encode_rewrite($download_info['title']) . '.php?com=0'), $file_id, 'download'), 'L_DATE' => $LANG['date'], 'L_SIZE' => $LANG['size'], 'L_DOWNLOAD' => $DOWNLOAD_LANG['download'], 'L_DOWNLOAD_FILE' => $DOWNLOAD_LANG['download_file'], 'L_FILE_INFOS' => $DOWNLOAD_LANG['file_infos'], 'L_INSERTION_DATE' => $DOWNLOAD_LANG['insertion_date'], 'L_RELEASE_DATE' => $DOWNLOAD_LANG['last_update_date'], 'L_DOWNLOADED' => $DOWNLOAD_LANG['downloaded'], 'L_EDIT_FILE' => str_replace('"', '\\"', $DOWNLOAD_LANG['edit_file']), 'L_CONFIRM_DELETE_FILE' => str_replace('\'', '\\\'', $DOWNLOAD_LANG['confirm_delete_file']), 'L_DELETE_FILE' => str_replace('"', '\\"', $DOWNLOAD_LANG['delete_file']), 'U_EDIT_FILE' => url('management.php?edit=' . $file_id), 'U_DELETE_FILE' => url('management.php?del=' . $file_id . '&token=' . $Session->get_token()), 'U_DOWNLOAD_FILE' => url('count.php?id=' . $file_id, 'file-' . $file_id . '+' . url_encode_rewrite($download_info['title']) . '.php')));
if (isset($_GET['com'])) {
$Template->assign_vars(array('COMMENTS' => display_comments('download', $file_id, url('download.php?id=' . $file_id . '&com=%s', 'download-' . $file_id . '.php?com=%s'))));
}
$Template->pparse('download');
} else {
$Template->set_filenames(array('download' => 'download/download.tpl'));
$Template->assign_vars(array('C_ADMIN' => $auth_write, 'C_DOWNLOAD_CAT' => true, 'C_ADD_FILE' => $auth_write || $auth_contribution, 'C_DESCRIPTION' => !empty($DOWNLOAD_CATS[$category_id]['contents']) || $category_id == 0 && !empty($CONFIG_DOWNLOAD['root_contents']), 'IDCAT' => $category_id, 'TITLE' => sprintf($DOWNLOAD_LANG['title_download'] . ($category_id > 0 ? ' - ' . $DOWNLOAD_CATS[$category_id]['name'] : '')), 'DESCRIPTION' => $category_id > 0 ? second_parse($DOWNLOAD_CATS[$category_id]['contents']) : second_parse($CONFIG_DOWNLOAD['root_contents']), 'L_ADD_FILE' => $DOWNLOAD_LANG['add_file'], 'U_ADMIN_CAT' => $category_id > 0 ? url('admin_download_cat.php?edit=' . $category_id) : url('admin_download_cat.php'), 'U_ADD_FILE' => url('management.php?new=1&idcat=' . $category_id)));
$num_subcats = 0;
foreach ($DOWNLOAD_CATS as $id => $value) {
if ($id != 0 && $value['id_parent'] == $category_id) {
$num_subcats++;
}
}
if ($num_subcats > 0) {
$Template->assign_vars(array('C_SUB_CATS' => true));
示例5: elseif
$Sql->query_close($result);
} else {
$Template->assign_vars(array('L_NO_FILE_THIS_CATEGORY' => $MEDIA_LANG['none_media'], 'C_NO_FILE' => true));
}
} elseif ($id_media > 0) {
$result = $Sql->query_while("SELECT v.*, mb.login, mb.level\tFROM " . PREFIX . "media AS v LEFT JOIN " . DB_TABLE_MEMBER . " AS mb ON v.iduser = mb.user_id\tWHERE id = '" . $id_media . "'", __LINE__, __FILE__);
$media = $Sql->fetch_assoc($result);
$Sql->query_close($result);
if (empty($media) || ($media['infos'] & MEDIA_STATUS_UNVISIBLE) !== 0) {
$Errorh->handler('e_unexist_media', E_USER_REDIRECT);
exit;
} elseif (!$User->check_auth($MEDIA_CATS[$media['idcat']]['auth'], MEDIA_AUTH_READ)) {
$Errorh->handler('e_auth', E_USER_REDIRECT);
exit;
}
bread_crumb($media['idcat']);
$Bread_crumb->add($media['name'], url('media.php?id=' . $id_media, 'media-' . $id_media . '-' . $media['idcat'] . '+' . url_encode_rewrite($media['name']) . '.php'));
define('TITLE', $media['name']);
require_once '../kernel/header.php';
$Sql->query_inject("UPDATE " . LOW_PRIORITY . " " . PREFIX . "media SET counter = counter + 1 WHERE id = " . $id_media, __LINE__, __FILE__);
import('content/note');
$Note = new Note('media', $id_media, url('media.php?id=' . $id_media, 'media-' . $id_media . '-' . $media['idcat'] . '+' . url_encode_rewrite($media['name']) . '.php'), $MEDIA_CONFIG['note_max'], '', NOTE_NODISPLAY_NBRNOTES);
import('content/comments');
$Template->assign_vars(array('C_DISPLAY_MEDIA' => true, 'C_MODO' => $User->check_level(MODO_LEVEL), 'MODULE_DATA_PATH' => $Template->get_module_data_path('media'), 'ID_MEDIA' => $id_media, 'NAME' => $media['name'], 'CONTENTS' => second_parse($media['contents']), 'COUNT' => $media['counter'], 'THEME' => $CONFIG['theme'], 'KERNEL_NOTATION' => $Note->display_form(), 'HITS' => (int) $media['counter'] + 1 > 1 ? sprintf($MEDIA_LANG['n_times'], (int) $media['counter'] + 1) : sprintf($MEDIA_LANG['n_time'], (int) $media['counter'] + 1), 'NUM_NOTES' => (int) $media['nbrnote'] > 1 ? sprintf($MEDIA_LANG['num_notes'], (int) $media['nbrnote']) : sprintf($MEDIA_LANG['num_note'], (int) $media['nbrnote']), 'LANG' => $CONFIG['lang'], 'U_COM' => Comments::com_display_link($media['nbr_com'], '../media/media' . url('.php?id=' . $id_media . '&com=0', '-' . $id_media . '-' . $media['idcat'] . '+' . url_encode_rewrite($media['name']) . '.php?com=0'), $id_media, 'media'), 'L_DATE' => $LANG['date'], 'L_SIZE' => $LANG['size'], 'L_MEDIA_INFOS' => $MEDIA_LANG['media_infos'], 'DATE' => gmdate_format('date_format', $media['timestamp']), 'URL' => $media['url'], 'MIME' => $media['mime_type'], 'WIDTH' => $media['width'], 'HEIGHT' => $media['height'], 'HEIGHT_P' => $media['height'] + 50, 'L_VIEWED' => $LANG['view'], 'L_BY' => $LANG['by'], 'BY' => !empty($media['login']) ? sprintf($MEDIA_LANG['media_added'], $media['login'], '../member/member' . url('.php?id=' . $media['iduser'], '-' . $media['iduser'] . '.php'), $level[$media['level']]) : $LANG['guest'], 'L_CONFIRM_DELETE_MEDIA' => str_replace('\'', '\\\'', $MEDIA_LANG['confirm_delete_media']), 'U_UNVISIBLE_MEDIA' => url('media_action.php?unvisible=' . $id_media . '&token=' . $Session->get_token()), 'U_EDIT_MEDIA' => url('media_action.php?edit=' . $id_media), 'U_DELETE_MEDIA' => url('media_action.php?del=' . $id_media . '&token=' . $Session->get_token()), 'U_POPUP_MEDIA' => url('media_popup.php?id=' . $id_media), 'C_DISPLAY' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_DATE) !== 0 || ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_USER) !== 0 || ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_COUNT) !== 0 || ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_NOTE) !== 0, 'A_COM' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_COM) !== 0, 'A_NOTE' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_NOTE) !== 0, 'A_USER' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_USER) !== 0, 'A_COUNTER' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_COUNT) !== 0, 'A_DATE' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_DATE) !== 0, 'A_DESC' => ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_DESC) !== 0, 'L_CONFIRM_DELETE_FILE' => str_replace('\'', '\\\'', $MEDIA_LANG['confirm_delete_media'])));
$Template->set_filenames(array('media_format' => empty($mime_type_tpl[$media['mime_type']]) ? 'media/format/media_other.tpl' : 'media/' . $mime_type_tpl[$media['mime_type']]));
if (isset($_GET['com']) && ($MEDIA_CATS[$media['idcat']]['active'] & MEDIA_DV_COM + MEDIA_DL_COM) !== 0) {
$Template->assign_vars(array('COMMENTS' => display_comments('media', $id_media, url('media.php?id=' . $id_media . '&com=%s', 'media-' . $id_media . '-' . $media['idcat'] . '+' . url_encode_rewrite($media['name']) . '.php?com=%s'))));
}
}
$Template->pparse('media');
require_once '../kernel/footer.php';