📄 admin.typedcontent.html.php
字号:
<?php/*** @version $Id: admin.typedcontent.html.php,v 1.24 2005/02/16 16:27:11 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_typedcontent { /** * Writes a list of the content items * @param array An array of content objects */ function showContent( &$rows, &$pageNav, $option, $search, &$lists ) { global $my, $acl, $adminLanguage; mosCommonHTML::loadOverlib(); ?> <form action="index2.php" method="post" name="adminForm"> <table class="adminheading"> <tr> <th class="edit"> <?php echo $adminLanguage->A_COMP_TYPED_STATIC;?> </th> <td> <?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> <td> <?php echo $adminLanguage->A_COMP_FRONT_ORDER;?>: </td> <td> <?php echo $lists['order']; ?> </td> <td width="right"> <?php echo $lists['authorid'];?> </td> </tr> </table> <table class="adminlist"> <tr> <th width="5"> <?php echo $adminLanguage->A_COMP_NB;?> </th> <th width="5px"> <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 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="10%"> <?php echo $adminLanguage->A_COMP_ACCESS;?> </th> <th width="5%"> <?php echo $adminLanguage->A_COMP_ID;?> </th> <th width="1%" align="left"> <?php echo $adminLanguage->A_COMP_TYPED_LINKS;?> </th> <th width="20%" align="left"> <?php echo $adminLanguage->A_COMP_AUTHOR;?> </th> <th align="left" width="10%"> <?php echo $adminLanguage->A_COMP_DATE;?> </th> </tr> <?php $k = 0; for ($i=0, $n=count( $rows ); $i < $n; $i++) { $row = &$rows[$i]; $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 ( !$row->access ) { $color_access = 'style="color: green;"'; $task_access = 'accessregistered'; } else if ( $row->access == 1 ) { $color_access = 'style="color: red;"'; $task_access = 'accessspecial'; } else { $color_access = 'style="color: black;"'; $task_access = 'accesspublic'; } $link = 'index2.php?option=com_typedcontent&task=edit&hidemainmenu=1&id='. $row->id; if ( $row->checked_out ) { $checked = mosCommonHTML::checkedOut( $row ); } else { $checked = mosHTML::idBox( $i, $row->id, ($row->checked_out && $row->checked_out != $my->id ) ); } 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->creator .'</a>'; } } else { if ( $row->created_by_alias ) { $author = $row->created_by_alias; } else { $author = $row->creator; } } $date = mosFormatDate( $row->created, '%x' ); ?> <tr class="<?php echo "row$k"; ?>"> <td> <?php echo $pageNav->rowNumber( $i ); ?> </td> <td> <?php echo $checked; ?> </td> <td> <?php if ( $row->checked_out && ( $row->checked_out != $my->id ) ) { echo $row->title; if ( $row->title_alias ) { echo ' (<i>'. $row->title_alias .'</i>)'; } } else { ?> <a href="<?php echo $link; ?>" title="<?php echo $adminLanguage->A_COMP_CONTENT_EDIT_STATIC;?>"> <?php echo $row->title; if ( $row->title_alias ) { echo ' (<i>'. $row->title_alias .'</i>)'; } ?> </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 ? $adminLanguage->A_COMP_UNPUBLISHED : $adminLanguage->A_COMP_PUBLISHED;?>')"> <img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt; ?>" /> </a> </td> <?php } ?> <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"> <a href="javascript: void(0);" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $task_access;?>')" <?php echo $color_access; ?>> <?php echo $row->groupname;?> </a> </td> <td align="center"> <?php echo $row->id;?> </td> <td align="center"> <?php echo $row->links;?> </td> <td align="left"> <?php echo $author;?> </td> <td> <?php echo $date; ?> </td> </tr> <?php $k = 1 - $k; } ?> </table> <?php echo $pageNav->getListFooter(); ?> <?php mosCommonHTML::ContentLegend(); ?> <input type="hidden" name="option" value="<?php echo $option;?>" /> <input type="hidden" name="task" value="" /> <input type="hidden" name="boxchecked" value="0" /> <input type="hidden" name="hidemainmenu" value="0" /> </form> <?php } function edit( &$row, &$images, &$lists, &$params, $option, &$menus ) { global $mosConfig_live_site, $adminLanguage; //mosMakeHtmlSafe( $row ); $tabs = new mosTabs( 1 ); // used to hide "Reset Hits" when hits = 0 if ( !$row->hits ) { $visibility = "style='display: none; visbility: hidden;'"; } else { $visibility = ""; } mosCommonHTML::loadOverlib(); mosCommonHTML::loadCalendar(); ?> <script language="javascript" type="text/javascript"> var folderimages = new Array; <?php $i = 0; foreach ($images as $k=>$items) { foreach ($items as $v) { echo "\n folderimages[".$i++."] = new Array( '$k','".addslashes( $v->value )."','".addslashes( $v->text )."' );"; } } ?> function submitbutton(pressbutton) { var form = document.adminForm; if (pressbutton == 'cancel') { submitform( pressbutton ); return; } if ( pressbutton ==' resethits' ) { if (confirm('<?php echo $adminLanguage->A_COMP_CONTENT_ZERO;?>')){ submitform( pressbutton ); return; } else { return; } } if ( pressbutton == 'menulink' ) { if ( form.menuselect.value == "" ) { alert( "<?php echo $adminLanguage->A_COMP_SECT_SEL_MENU;?>" ); return; } else if ( form.link_name.value == "" ) { alert( "<?php echo $adminLanguage->A_COMP_ENTER_MENU_NAME;?>" ); return; } } var temp = new Array; for (var i=0, n=form.imagelist.options.length; i < n; i++) { temp[i] = form.imagelist.options[i].value; } form.images.value = temp.join( '\n' ); try { document.adminForm.onsubmit(); } catch(e){} if (trim(form.title.value) == ""){ alert( "<?php echo $adminLanguage->A_COMP_CONTENT_MUST_TITLE;?>" ); } else if (trim(form.name.value) == ""){ alert( "<?php echo $adminLanguage->A_COMP_CONTENT_MUST_NAME;?>" ); } else { if ( form.reset_hits.checked ) { form.hits.value = 0; } else { } <?php getEditorContents( 'editor1', 'introtext' ) ; ?> submitform( pressbutton ); } } </script> <table class="adminheading"> <tr> <th class="edit"> <?php echo $adminLanguage->A_COMP_TYPED_ITEM;?>: <small> <?php echo $row->id ? $adminLanguage->A_COMP_EDIT : $adminLanguage->A_COMP_NEW;?> </small> </th> </tr> </table> <form action="index2.php" method="post" name="adminForm"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td width="60%" valign="top"> <table class="adminform"> <tr> <th colspan="3"> <?php echo $adminLanguage->A_COMP_CONTENT_ITEM_DETAILS;?> </th> <tr> <tr> <td align="left"> <?php echo $adminLanguage->A_COMP_TITLE;?>: </td> <td> <input class="inputbox" type="text" name="title" size="30" maxlength="100" value="<?php echo $row->title; ?>" /> </td> </tr> <tr> <td align="left"> <?php echo $adminLanguage->A_COMP_CONTENT_TITLE_ALIAS;?>: </td> <td> <input class="inputbox" type="text" name="title_alias" size="30" maxlength="100" value="<?php echo $row->title_alias; ?>" /> </td> </tr> <tr> <td valign="top" align="left" colspan="2"> <?php echo $adminLanguage->A_COMP_TYPED_TEXT;?><br /> <?php // parameters : areaname, content, hidden field, width, height, rows, cols editorArea( 'editor1', $row->introtext, 'introtext', '100%;', '400', '65', '50' ); ?> </td> </tr> </table> </td> <td width="40%" valign="top"> <?php $tabs->startPane("content-pane"); $tabs->startTab($adminLanguage->A_COMP_CONT_PUB_TAB, "publish-page" ); ?> <table class="adminform"> <tr> <th colspan="2"> <?php echo $adminLanguage->A_COMP_CONT_PUBLISHING;?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -