Annotation of /mambo/branches/4.6/administrator/components/com_frontpage/admin.frontpage.html.php
Parent Directory
|
Revision Log
Revision 1 -
(view)
(download)
Original Path: mambo/trunk/administrator/components/com_frontpage/admin.frontpage.html.php
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: admin.frontpage.html.php,v 1.3 2005/10/21 17:33:55 lang3 Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Content | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | /** | ||
| 15 : | * @package Mambo | ||
| 16 : | * @subpackage Content | ||
| 17 : | */ | ||
| 18 : | class HTML_content { | ||
| 19 : | /** | ||
| 20 : | * Writes a list of the content items | ||
| 21 : | * @param array An array of content objects | ||
| 22 : | */ | ||
| 23 : | function showList( &$rows, $search, $pageNav, $option, $lists ) { | ||
| 24 : | global $my, $acl; | ||
| 25 : | |||
| 26 : | mosCommonHTML::loadOverlib(); | ||
| 27 : | ?> | ||
| 28 : | <form action="index2.php" method="post" name="adminForm"> | ||
| 29 : | <table class="adminheading"> | ||
| 30 : | <tr> | ||
| 31 : | <th class="frontpage" rowspan="2"> | ||
| 32 : | Frontpage Manager | ||
| 33 : | </th> | ||
| 34 : | <td width="right"> | ||
| 35 : | <?php echo $lists['sectionid'];?> | ||
| 36 : | </td> | ||
| 37 : | <td width="right"> | ||
| 38 : | <?php echo $lists['catid'];?> | ||
| 39 : | </td> | ||
| 40 : | <td width="right"> | ||
| 41 : | <?php echo $lists['authorid'];?> | ||
| 42 : | </td> | ||
| 43 : | </tr> | ||
| 44 : | <tr> | ||
| 45 : | <td align="right" colspan="2"> | ||
| 46 : | Filter: | ||
| 47 : | </td> | ||
| 48 : | <td> | ||
| 49 : | <input type="text" name="search" value="<?php echo $search;?>" class="text_area" onChange="document.adminForm.submit();" /> | ||
| 50 : | </td> | ||
| 51 : | </tr> | ||
| 52 : | </table> | ||
| 53 : | |||
| 54 : | <table class="adminlist"> | ||
| 55 : | <tr> | ||
| 56 : | <th width="5"> | ||
| 57 : | # | ||
| 58 : | </th> | ||
| 59 : | <th width="20"> | ||
| 60 : | <input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count( $rows ); ?>);" /> | ||
| 61 : | </th> | ||
| 62 : | <th class="title"> | ||
| 63 : | Title | ||
| 64 : | </th> | ||
| 65 : | <th width="10%" nowrap="nowrap"> | ||
| 66 : | Published | ||
| 67 : | </th> | ||
| 68 : | <th colspan="2" nowrap="nowrap" width="5%"> | ||
| 69 : | Reorder | ||
| 70 : | </th> | ||
| 71 : | <th width="2%"> | ||
| 72 : | Order | ||
| 73 : | </th> | ||
| 74 : | <th width="1%"> | ||
| 75 : | <a href="javascript: saveorder( <?php echo count( $rows )-1; ?> )"><img src="images/filesave.png" border="0" width="16" height="16" alt="Save Order" /></a> | ||
| 76 : | </th> | ||
| 77 : | <th width="8%" nowrap="nowrap"> | ||
| 78 : | Access | ||
| 79 : | </th> | ||
| 80 : | <th width="10%" align="left"> | ||
| 81 : | Section | ||
| 82 : | </th> | ||
| 83 : | <th width="10%" align="left"> | ||
| 84 : | Category | ||
| 85 : | </th> | ||
| 86 : | <th width="10%" align="left"> | ||
| 87 : | Author | ||
| 88 : | </th> | ||
| 89 : | </tr> | ||
| 90 : | <?php | ||
| 91 : | $k = 0; | ||
| 92 : | for ($i=0, $n=count( $rows ); $i < $n; $i++) { | ||
| 93 : | $row = &$rows[$i]; | ||
| 94 : | |||
| 95 : | $link = 'index2.php?option=com_content§ionid=0&task=edit&hidemainmenu=1&id='. $row->id; | ||
| 96 : | |||
| 97 : | $row->sect_link = 'index2.php?option=com_sections&task=editA&hidemainmenu=1&id='. $row->sectionid; | ||
| 98 : | $row->cat_link = 'index2.php?option=com_categories&task=editA&hidemainmenu=1&id='. $row->catid; | ||
| 99 : | |||
| 100 : | $now = date( "Y-m-d H:i:s" ); | ||
| 101 : | if ( $now <= $row->publish_up && $row->state == "1" ) { | ||
| 102 : | $img = 'publish_y.png'; | ||
| 103 : | $alt = 'Published'; | ||
| 104 : | } else if ( ( $now <= $row->publish_down || $row->publish_down == "0000-00-00 00:00:00" ) && $row->state == "1" ) { | ||
| 105 : | $img = 'publish_g.png'; | ||
| 106 : | $alt = 'Published'; | ||
| 107 : | } else if ( $now > $row->publish_down && $row->state == "1" ) { | ||
| 108 : | $img = 'publish_r.png'; | ||
| 109 : | $alt = 'Expired'; | ||
| 110 : | } elseif ( $row->state == "0" ) { | ||
| 111 : | $img = "publish_x.png"; | ||
| 112 : | $alt = 'Unpublished'; | ||
| 113 : | } | ||
| 114 : | |||
| 115 : | $times = ''; | ||
| 116 : | if ( isset( $row->publish_up ) ) { | ||
| 117 : | if ( $row->publish_up == '0000-00-00 00:00:00' ) { | ||
| 118 : | $times .= '<tr><td>Start: Always</td></tr>'; | ||
| 119 : | } else { | ||
| 120 : | $times .= '<tr><td>Start: '. $row->publish_up .'</td></tr>'; | ||
| 121 : | } | ||
| 122 : | } | ||
| 123 : | if ( isset( $row->publish_down ) ) { | ||
| 124 : | if ( $row->publish_down == '0000-00-00 00:00:00' ) { | ||
| 125 : | $times .= '<tr><td>Finish: No Expiry</td></tr>'; | ||
| 126 : | } else { | ||
| 127 : | $times .= '<tr><td>Finish: '. $row->publish_down .'</td></tr>'; | ||
| 128 : | } | ||
| 129 : | } | ||
| 130 : | |||
| 131 : | $access = mosCommonHTML::AccessProcessing( $row, $i ); | ||
| 132 : | $checked = mosCommonHTML::CheckedOutProcessing( $row, $i ); | ||
| 133 : | |||
| 134 : | if ( $acl->acl_check( 'administration', 'manage', 'users', $my->usertype, 'components', 'com_users' ) ) { | ||
| 135 : | if ( $row->created_by_alias ) { | ||
| 136 : | $author = $row->created_by_alias; | ||
| 137 : | } else { | ||
| 138 : | $linkA = 'index2.php?option=com_users&task=editA&hidemainmenu=1&id='. $row->created_by; | ||
| 139 : | $author = '<a href="'. $linkA .'" title="Edit User">'. $row->author .'</a>'; | ||
| 140 : | } | ||
| 141 : | } else { | ||
| 142 : | if ( $row->created_by_alias ) { | ||
| 143 : | $author = $row->created_by_alias; | ||
| 144 : | } else { | ||
| 145 : | $author = $row->author; | ||
| 146 : | } | ||
| 147 : | } | ||
| 148 : | ?> | ||
| 149 : | <tr class="<?php echo "row$k"; ?>"> | ||
| 150 : | <td> | ||
| 151 : | <?php echo $pageNav->rowNumber( $i ); ?> | ||
| 152 : | </td> | ||
| 153 : | <td> | ||
| 154 : | <?php echo $checked; ?> | ||
| 155 : | </td> | ||
| 156 : | <td> | ||
| 157 : | <?php | ||
| 158 : | if ( $row->checked_out && ( $row->checked_out != $my->id ) ) { | ||
| 159 : | echo $row->title; | ||
| 160 : | } else { | ||
| 161 : | ?> | ||
| 162 : | <a href="<?php echo $link; ?>" title="Edit Content"> | ||
| 163 : | <?php echo $row->title; ?> | ||
| 164 : | </a> | ||
| 165 : | <?php | ||
| 166 : | } | ||
| 167 : | ?> | ||
| 168 : | </td> | ||
| 169 : | <?php | ||
| 170 : | if ( $times ) { | ||
| 171 : | ?> | ||
| 172 : | <td align="center"> | ||
| 173 : | <a href="javascript: void(0);" onmouseover="return overlib('<table><?php echo $times; ?></table>', CAPTION, 'Publish Information', BELOW, RIGHT);" onMouseOut="return nd();" onclick="return listItemTask('cb<?php echo $i;?>','<?php echo $row->state ? "unpublish" : "publish";?>')"> | ||
| 174 : | <img src="images/<?php echo $img;?>" width="12" height="12" border="0" alt="<?php echo $alt;?>" /> | ||
| 175 : | </a> | ||
| 176 : | </td> | ||
| 177 : | <?php | ||
| 178 : | } | ||
| 179 : | ?> | ||
| 180 : | <td> | ||
| 181 : | <?php echo $pageNav->orderUpIcon( $i ); ?> | ||
| 182 : | </td> | ||
| 183 : | <td> | ||
| 184 : | <?php echo $pageNav->orderDownIcon( $i, $n ); ?> | ||
| 185 : | </td> | ||
| 186 : | <td align="center" colspan="2"> | ||
| 187 : | <input type="text" name="order[]" size="5" value="<?php echo $row->fpordering;?>" class="text_area" style="text-align: center" /> | ||
| 188 : | </td> | ||
| 189 : | <td align="center"> | ||
| 190 : | <?php echo $access;?> | ||
| 191 : | </td> | ||
| 192 : | <td> | ||
| 193 : | <a href="<?php echo $row->sect_link; ?>" title="Edit Section"> | ||
| 194 : | <?php echo $row->sect_name; ?> | ||
| 195 : | </a> | ||
| 196 : | </td> | ||
| 197 : | <td> | ||
| 198 : | <a href="<?php echo $row->cat_link; ?>" title="Edit Category"> | ||
| 199 : | <?php echo $row->name; ?> | ||
| 200 : | </a> | ||
| 201 : | </td> | ||
| 202 : | <td> | ||
| 203 : | <?php echo $author; ?> | ||
| 204 : | </td> | ||
| 205 : | </tr> | ||
| 206 : | <?php | ||
| 207 : | $k = 1 - $k; | ||
| 208 : | } | ||
| 209 : | ?> | ||
| 210 : | </table> | ||
| 211 : | |||
| 212 : | <?php | ||
| 213 : | echo $pageNav->getListFooter(); | ||
| 214 : | mosCommonHTML::ContentLegend(); | ||
| 215 : | ?> | ||
| 216 : | |||
| 217 : | <input type="hidden" name="option" value="<?php echo $option;?>" /> | ||
| 218 : | <input type="hidden" name="task" value="" /> | ||
| 219 : | <input type="hidden" name="boxchecked" value="0" /> | ||
| 220 : | </form> | ||
| 221 : | <?php | ||
| 222 : | } | ||
| 223 : | } | ||
| 224 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

