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