[ Index ] |
PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2010 Oliver Georgi (oliver@phpwcms.de) // All rights reserved. 6 7 This script is part of PHPWCMS. The PHPWCMS web content management system is 8 free software; you can redistribute it and/or modify it under the terms of 9 the GNU General Public License as published by the Free Software Foundation; 10 either version 2 of the License, or (at your option) any later version. 11 12 The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html 13 A copy is found in the textfile GPL.txt and important notices to the license 14 from the author is found in LICENSE.txt distributed with these scripts. 15 16 This script is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 18 PARTICULAR PURPOSE. See the GNU General Public License for more details. 19 20 This copyright notice MUST APPEAR in all copies of the script! 21 *************************************************************************************/ 22 23 // ---------------------------------------------------------------- 24 // obligate check for phpwcms constants 25 if (!defined('PHPWCMS_ROOT')) { 26 die("You Cannot Access This Script Directly, Have a Nice Day."); 27 } 28 // ---------------------------------------------------------------- 29 30 31 // set backend listing values 32 $_phpwcms_home['homeMaxArticles'] = empty($_COOKIE['homeMaxArticles']) ? 5 : intval($_COOKIE['homeMaxArticles']); 33 $_phpwcms_home['homeMaxCntParts'] = empty($_COOKIE['homeMaxCntParts']) ? 5 : intval($_COOKIE['homeMaxCntParts']); 34 35 if(isset($_POST['homeMaxArticles'])) { 36 if($_phpwcms_home['homeMaxArticles'] = intval($_POST['homeMaxArticles'])) { 37 @setcookie('homeMaxArticles', strval($_phpwcms_home['homeMaxArticles']) , time()+31536000); // store cookie for 1 year 38 } 39 } 40 if(isset($_POST['homeMaxCntParts'])) { 41 if($_phpwcms_home['homeMaxCntParts'] = intval($_POST['homeMaxCntParts'])) { 42 @setcookie('homeMaxCntParts', strval($_phpwcms_home['homeMaxCntParts']) , time()+31536000); // store cookie for 1 year 43 } 44 } 45 // set default if necessary 46 if(!$_phpwcms_home['homeMaxArticles']) $_phpwcms_home['homeMaxArticles'] = 5; 47 if(!$_phpwcms_home['homeMaxCntParts']) $_phpwcms_home['homeMaxCntParts'] = 5; 48 49 // set if user has admin rights 50 $_usql = $_SESSION["wcs_user_admin"] ? '' : 'AND article_uid='.intval($_SESSION["wcs_user_id"]).' '; 51 52 // first list last edited articles 53 $_asql_1 = "SELECT *, DATE_FORMAT(acontent_tstamp, '%d/%m/%Y %H:%i') AS acontent_changed FROM ".DB_PREPEND."phpwcms_articlecontent "; 54 $_asql_1 .= "LEFT JOIN ".DB_PREPEND."phpwcms_article ON "; 55 $_asql_1 .= DB_PREPEND."phpwcms_articlecontent.acontent_aid = ".DB_PREPEND."phpwcms_article.article_id "; 56 $_asql_1 .= 'WHERE acontent_trash=0 AND article_deleted=0 '; 57 $_asql_1 .= $_usql; 58 $_asql_1 .= 'ORDER BY acontent_tstamp DESC LIMIT '.$_phpwcms_home['homeMaxCntParts']; 59 $_last10_articlecontent = _dbQuery($_asql_1); 60 61 $_asql_1 = "SELECT article_id, article_cid, article_title, article_public, article_aktiv, article_uid, "; 62 $_asql_1 .= "date_format(article_tstamp, '%d/%m/%Y %H:%i') AS article_date "; 63 $_asql_1 .= "FROM ".DB_PREPEND."phpwcms_article "; 64 $_asql_1 .= 'WHERE article_deleted=0 '; 65 $_asql_1 .= $_usql; 66 $_asql_1 .= 'ORDER BY article_tstamp DESC LIMIT '.$_phpwcms_home['homeMaxArticles']; 67 $_last10_article = _dbQuery($_asql_1); 68 69 70 ?> 71 <div style="margin:0 0 10px 0;padding:0;"> 72 <form class="formRightInput" action="phpwcms.php" id="setHomeMaxArticles" name="setHomeMaxArticles" method="post"> 73 <input type="text" name="homeMaxArticles" id="homeMaxArticles" value="<?php echo $_phpwcms_home['homeMaxArticles'] ?>" class="smallInputField" onblur="this.form.submit();" /> 74 </form> 75 <h1 class="title" style="margin-top:5px;"><?php echo $BL['be_cnt_articles'] .' <span class="v10">('.$BL['be_last_edited'].')</span>' ?></h1> 76 </div> 77 <table width="100%" border="0" cellpadding="0" cellspacing="0" summary=""> 78 79 <tr class="tableHeadRow"> 80 <th> </th> 81 <th style="text-align:left"><?php echo $BL['be_article_atitle'] ?></th> 82 <th><?php echo $BL['be_cnt_last_edited'] ?></th> 83 <th> </th> 84 </tr> 85 86 <tr><td colspan="4" bgcolor="#92A1AF"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 87 88 <?php 89 $row_count = 0; 90 91 foreach($_last10_article as $value) { 92 93 if($row_count) { 94 echo '<tr><td colspan="4" bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr>'.LF; 95 } 96 97 echo '<tr'.( ($row_count % 2) ? ' bgcolor="#F3F5F8"' : '' ).' class="listrow" style="cursor:pointer" '; 98 echo 'onclick="document.location.href=\'phpwcms.php?do=articles&p=2&s=1&id='.$value['article_id'].'\'" title="'.$BL['be_func_struct_edit'].'">'.LF; 99 echo ' <td style="padding:1px 4px 1px 2px;"><img src="img/symbole/text_1.gif" alt="" /></td>'.LF; 100 echo ' <td width="80%"><strong>'.html_specialchars($value['article_title']).'</strong></td>'.LF; 101 echo ' <td align="center" nowrap="nowrap"> '.$value['article_date'].' </td>'.LF; 102 echo ' <td style="padding:3px;" nowrap="nowrap">'; 103 echo '<img src="img/button/visible_12x13_'.$value["article_aktiv"].'.gif" alt="" border="0" style="margin-right:2px;" />'; 104 echo '<a href="phpwcms.php?do=articles&p=2&s=1&id='.$value['article_id']; 105 echo '"><img src="img/button/edit_22x13.gif" alt="Edit" border="0" /></a>'; 106 echo '</td>'.LF; 107 echo '</tr>'.LF; 108 109 $row_count++; 110 111 } 112 113 if($row_count) { 114 echo '<tr><td colspan="4" bgcolor="#92A1AF"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>'.LF; 115 } 116 117 118 ?> 119 <tr> 120 <td colspan="4" style="padding: 6px 0 0 3px;"> 121 <input type="button" value="<?php echo $BL['be_subnav_article_center'] ?>" class="button10" onclick="document.location.href='phpwcms.php?do=articles'" /> 122 <input type="button" value="<?php echo $BL['be_subnav_article_new'] ?>" class="button10" onclick="document.location.href='phpwcms.php?do=articles&p=1&struct=0'" /> 123 </td> 124 </tr> 125 126 </table> 127 128 <div style="margin:25px 0 10px 0;padding:0;"> 129 <form class="formRightInput" action="phpwcms.php" id="setHomeMaxCntParts" name="setHomeMaxCntParts" method="post"> 130 <input type="text" name="homeMaxCntParts" id="homeMaxCntParts" value="<?php echo $_phpwcms_home['homeMaxCntParts'] ?>" class="smallInputField" onblur="this.form.submit();" /> 131 </form> 132 <h1 class="title" style="margin:0;"><?php echo $BL['be_ctype'] .' <span class="v10">('.$BL['be_last_edited'].')</span>' ?></h1> 133 </div> 134 <table width="100%" border="0" cellpadding="0" cellspacing="0" summary=""> 135 136 <tr class="tableHeadRow"> 137 <th width="20"> </th> 138 <th style="text-align:left"><?php echo $BL['be_cnt_type'] ?> </th> 139 <th style="text-align:left"><?php echo $BL['be_article_cnt_ctitle'] ?></th> 140 <th><?php echo $BL['be_cnt_last_edited'] ?> </th> 141 <th> </th> 142 </tr> 143 144 <tr><td colspan="5" bgcolor="#92A1AF"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 145 146 147 <?php 148 $row_count = 0; 149 150 foreach($_last10_articlecontent as $value) { 151 152 if(($value["acontent_type"] == 30 && !isset($phpwcms['modules'][$value["acontent_module"] ])) || !isset($wcs_content_type[$value["acontent_type"]])) { 153 continue; 154 } 155 156 if($row_count) { 157 echo '<tr><td colspan="5" bgcolor="#D9DEE3"><img src="img/leer.gif" alt="" width="1" height="1"></td></tr>'.LF; 158 } 159 160 echo '<tr'.( ($row_count % 2) ? ' bgcolor="#F3F5F8"' : '' ).' class="listrow" style="cursor:pointer" '; 161 echo 'onclick="document.location.href=\'phpwcms.php?do=articles&p=2&s=1&aktion=2&'; 162 echo 'id='.$value['acontent_aid'].'&acid='.$value['acontent_id'].'\'" title="'.$BL['be_func_content_edit'].'">'.LF; 163 164 echo ' <td style="padding:1px 4px 1px 2px;"><img src="img/symbole/add_content.gif" alt="" /></td>'.LF; 165 166 echo ' <td nowrap="nowrap">'.$wcs_content_type[$value["acontent_type"]]; 167 if($value["acontent_type"] == 30) { 168 echo ': '.$BL['modules'][$value["acontent_module"]]['listing_title']; 169 } 170 echo ' </td>'.LF; 171 172 $trenner = ($value['acontent_title'] && $value['acontent_subtitle']) ? '/' : ''; 173 174 echo ' <td width="80%"><strong>'.html_specialchars(getCleanSubString($value['acontent_title'].$trenner.$value['acontent_subtitle'], 27, '…')).' </strong></td>'.LF; 175 echo ' <td align="center" nowrap="nowrap"> '.$value['acontent_changed'].' </td>'.LF; 176 177 echo ' <td style="padding:3px;" nowrap="nowrap">'; 178 echo '<img src="img/button/visible_12x13_'.$value["acontent_visible"].'.gif" alt="" border="0" style="margin-right:2px;" />'; 179 echo '<a href="phpwcms.php?do=articles&p=2&s=1&aktion=2&'; 180 echo 'id='.$value['acontent_aid'].'&acid='.$value['acontent_id']; 181 echo '"><img src="img/button/edit_22x13.gif" alt="Edit" border="0" /></a>'; 182 echo '</td>'.LF; 183 echo '</tr>'.LF; 184 185 $row_count++; 186 187 } 188 189 if($row_count) { 190 echo '<tr><td colspan="5" bgcolor="#92A1AF"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>'.LF; 191 } 192 193 194 ?> 195 <tr><td colspan="5"><img src="img/leer.gif" alt="" width="1" height="25" /></td></tr> 196 </table> 197 <?php echo phpwcmsversionCheck(); ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Tue Nov 16 22:51:00 2010 | Cross-referenced by PHPXref 0.7 |