📄 admin.content.html.php
字号:
<?php/*** @version $Id: admin.content.html.php,v 1.36 2005/02/16 16:27:09 saka Exp $* @package Mambo* @subpackage Content* @copyright (C) 2000 - 2005 Miro International Pty Ltd* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL* Mambo is Free Software*//** ensure this file is being included by a parent file */defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );/*** @package Mambo* @subpackage Content*/class HTML_content { /** * Writes a list of the content items * @param array An array of content objects */ function showContent( &$rows, $section, &$lists, $search, $pageNav, $all=NULL, $redirect ) { global $my, $acl, $adminLanguage; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="edit" rowspan="2" nowrap> <?php if ( $all ) { ?> <?php echo $adminLanguage->A_COMP_CONTENT_ITEMS_MNG;?> <small><small>[ <?php echo $adminLanguage->A_COMP_SECTION . ': ' . _A_ALL; ?> ]</small></small> <?php } else { ?> <?php echo $adminLanguage->A_COMP_CONTENT_ITEMS_MNG;?> <small><small>[ <?php echo $adminLanguage->A_COMP_SECTION . ': ' . $section->title; ?> ]</small></small> <?php } ?> </th> <?php if ( $all ) { ?> <td width="right" rowspan="2" valign="top"> <?php echo $lists['sectionid'];?> </td> <?php } ?> <td width="right" valign="top"> <?php echo $lists['catid'];?> </td> <td width="right" valign="top"> <?php echo $lists['authorid'];?> </td> </tr> <tr> <td align="right"> <?php echo $adminLanguage->A_COMP_FILTER;?>: </td> <td> <input type="text" name="search" value="<?php echo $search;?>" class="text_area" onChange="document.adminForm.submit();" /> </td> </tr> </table> <table class="adminlist"> <tr> <th width="5"> <?php echo $adminLanguage->A_COMP_NB;?> </th> <th width="5"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows ); ?>);" /> </th> <th class="title"> <?php echo $adminLanguage->A_COMP_TITLE;?> </th> <th width="5%"> <?php echo $adminLanguage->A_COMP_PUBLISHED;?> </th> <th nowrap="nowrap" width="5%"> <?php echo $adminLanguage->A_COMP_FRONT_PAGE;?> </th> <th colspan="2" align="center" width="5%"> <?php echo $adminLanguage->A_COMP_REORDER;?> </th> <th width="2%"> <?php echo $adminLanguage->A_COMP_ORDER;?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo $adminLanguage->A_COMP_SAVE_ORDER;?>" /></a> </th> <th > <?php echo $adminLanguage->A_COMP_ACCESS;?> </th> <th width="2%"> <?php echo $adminLanguage->A_COMP_ID;?> </th> <?php if ( $all ) { ?> <th align="left"> <?php echo $adminLanguage->A_COMP_SECTION;?> </th> <?php } ?> <th align="left"> <?php echo $adminLanguage->A_COMP_CATEG;?> </th> <th align="left"> <?php echo $adminLanguage->A_COMP_AUTHOR;?> </th> <th align="left"> <?php echo $adminLanguage->A_COMP_DATE;?> </th> </tr> <?php $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row = &$rows[$i]; $link = 'index2.php?option=com_content§ionid='. $redirect .'&task=edit&hidemainmenu=1&id='. $row->id; $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->sectionid; $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id='. $row->catid; $now = date( "Y-m-d h:i:s" ); if ( $now <= $row->publish_up && $row->state == "1" ) { $img = 'publish_y.png'; $alt = $adminLanguage->A_COMP_PUBLISHED; } else if ( ( $now <= $row->publish_down || $row->publish_down == "0000-00-00 00:00:00" ) && $row->state == "1" ) { $img = 'publish_g.png'; $alt = $adminLanguage->A_COMP_PUBLISHED; } else if ( $now > $row->publish_down && $row->state == "1" ) { $img = 'publish_r.png'; $alt = $adminLanguage->A_COMP_EXPIRED; } elseif ( $row->state == "0" ) { $img = "publish_x.png"; $alt = $adminLanguage->A_COMP_UNPUBLISHED; } $times = ''; if (isset($row->publish_up)) { if ($row->publish_up == '0000-00-00 00:00:00') { $times .= "<tr><td>$adminLanguage->A_COMP_CONTENT_START_ALWAYS</td></tr>"; } else { $times .= "<tr><td>$adminLanguage->A_COMP_CONTENT_START: $row->publish_up</td></tr>"; } } if (isset($row->publish_down)) { if ($row->publish_down == '0000-00-00 00:00:00') { $times .= "<tr><td>$adminLanguage->A_COMP_CONTENT_FIN_NOEXP</td></tr>"; } else { $times .= "<tr><td>$adminLanguage->A_COMP_CONTENT_FINISH: $row->publish_down</td></tr>"; } } if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->created_by; $author = '<a href="'. $linkA .'" title="' . $adminLanguage->A_COMP_CONTENT_EDIT_USER . '">'. $row->author .'</a>'; } } else { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $author = $row->author; } } $date = mosFormatDate( $row->created, '%x' ); $access = mosCommonHTML::AccessProcessing( $row, $i ); $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); ?> <tr class="<?php echo "row$k"; ?>"> <td> <?php echo $pageNav->rowNumber( $i ); ?> </td> <td align="center"> <?php echo $checked; ?> </td> <td> <?php if ( $row->checked_out && ( $row->checked_out != $my->id ) ) { echo $row->title; } else { ?> <a href="<?php echo $link; ?>" title="<?php echo $adminLanguage->A_COMP_CONTENT_EDIT_CONTENT;?>"> <?php echo htmlspecialchars($row->title, ENT_QUOTES); ?> </a> <?php } ?> </td> <?php if ( $times ) { ?> <td align="center"> <a href="javascript: void(0);" onMouseOver="return overlib('<table><?php echo $times; ?></table>', CAPTION, '<?php echo $adminLanguage->A_COMP_CONTENT_PUBLISH_INFO;?>', BELOW, RIGHT);" onMouseOut="return nd();" onClick="return listItemTask('cb<?php echo $i;?>','<?php echo $row->state ? "unpublish" : "publish";?>')"> <img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" /> </a> </td> <?php } ?> <td align="center"> <a href="javascript: void(0);" onClick="return listItemTask('cb<?php echo $i;?>','toggle_frontpage')"> <img src="images/<?php echo ( $row->frontpage ) ? 'tick.png' : 'publish_x.png';?>" width="12" height="12" border="0" alt="<?php echo ( $row->frontpage ) ? $adminLanguage->A_COMP_YES : $adminLanguage->A_COMP_NO;?>" /> </a> </td> <td align="right"> <?php echo $pageNav->orderUpIcon( $i, ($row->catid == @$rows[$i-1]->catid) ); ?> </td> <td align="left"> <?php echo $pageNav->orderDownIcon( $i, $n, ($row->catid == @$rows[$i+1]->catid) ); ?> </td> <td align="center" colspan="2"> <input type="text" name="order[]" size="5" value="<?php echo $row->ordering; ?>" class="text_area" style="text-align: center" /> </td> <td align="center"> <?php echo $access;?> </td> <td align="left"> <?php echo $row->id; ?> </td> <?php if ( $all ) { ?> <td align="left"> <a href="<?php echo $row->sect_link; ?>" title="<?php echo $adminLanguage->A_COMP_CONTENT_EDIT_SECTION;?>"> <?php echo $row->section_name; ?> </a> </td> <?php } ?> <td align="left"> <a href="<?php echo $row->cat_link; ?>" title="<?php echo $adminLanguage->A_COMP_CONTENT_EDIT_CATEGORY;?>"> <?php echo $row->name; ?> </a> </td> <td align="left"> <?php echo $author; ?> </td> <td align="left"> <?php echo $date; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <?php mosCommonHTML::ContentLegend(); ?> <input type="hidden" name="option" value="com_content" /> <input type="hidden" name="sectionid" value="<?php echo $section->id;?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> <input type="hidden" name="redirect" value="<?php echo $redirect;?>" /> </form> <?php } /** * Writes a list of the content items * @param array An array of content objects */ function showArchive( &$rows, $section, &$lists, $search, $pageNav, $option, $all=NULL, $redirect ) { global $my, $acl, $adminLanguage; ?> <script language="javascript" type="text/javascript"> function submitbutton(pressbutton) { if (pressbutton == 'remove') { if (document.adminForm.boxchecked.value == 0) { alert("<?php echo $adminLanguage->A_COMP_CONTENT_TRASH;?>"); } else if ( confirm("<?php echo $adminLanguage->A_COMP_CONTENT_TRASH_MESS;?>")) { submitform('remove'); } } else { submitform(pressbutton); } } </script> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="edit" rowspan="2"> <?php if ( $all ) { ?> <?php echo $adminLanguage->A_COMP_CONTENT_ARCHIVE_MNG;?> <small><small>[ <?php echo $adminLanguage->A_COMP_SECTION . ': ' . _A_ALL; ?> ]</small></small> <?php } else { ?> <?php echo $adminLanguage->A_COMP_CONTENT_ARCHIVE_MNG;?> <small><small>[ <?php echo $adminLanguage->A_COMP_SECTION . ': ' . $section->title; ?> ]</small></small> <?php } ?> </th> <?php if ( $all ) { ?> <td width="right" rowspan="2" valign="top"> <?php echo $lists['sectionid'];?> </td> <?php } ?> <td width="right"> <?php echo $lists['catid'];?> </td> <td width="right"> <?php echo $lists['authorid'];?> </td> </tr> <tr> <td align="right"> <?php echo $adminLanguage->A_COMP_FILTER;?>: </td> <td> <input type="text" name="search" value="<?php echo $search;?>" class="text_area" onChange="document.adminForm.submit();" /> </td> </tr> </table> <table class="adminlist"> <tr> <th width="5"> <?php echo $adminLanguage->A_COMP_NB;?> </th> <th width="20"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count( $rows ); ?>);" /> </th> <th class="title"> <?php echo $adminLanguage->A_COMP_TITLE;?> </th> <th width="2%"> <?php echo $adminLanguage->A_COMP_ORDER;?> </th> <th width="1%"> <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="<?php echo $adminLanguage->A_COMP_SAVE_ORDER;?>" /></a> </th> <th width="15%" align="left"> <?php echo $adminLanguage->A_COMP_CATEG;?> </th> <th width="15%" align="left"> <?php echo $adminLanguage->A_COMP_AUTHOR;?> </th> <th align="left"> <?php echo $adminLanguage->A_COMP_DATE;?> </th> </tr> <?php $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row = &$rows[$i]; $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id='. $row->catid; if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->created_by; $author = '<a href="'. $linkA .'" title="' . $adminLanguage->A_COMP_CONTENT_EDIT_USER . '">'. $row->author .'</a>'; } } else { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $author = $row->author; } } $date = mosFormatDate( $row->created, '%x' ); ?> <tr class="<?php echo "row$k"; ?>">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -