[ Index ] |
PHP Cross Reference of phpwcms V1.5.0 _r431 (28.01.12) |
[Summary view] [Print] [Text view]
1 <?php 2 /************************************************************************************* 3 Copyright notice 4 5 (c) 2002-2012 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 //link article 31 32 if(!isset($content['alink']['alink_id']) && isset($row["acontent_alink"])) { 33 $content['alink']['alink_id'] = explode(':', $row["acontent_alink"]); 34 } elseif(!isset($row["acontent_alink"])) { 35 $content['alink']['alink_id'] = array(); 36 } 37 if(empty($content['alink']['alink_template'])) { 38 $content['alink']['alink_template'] = ''; 39 } 40 if(empty($content['alink']['alink_type'])) { 41 $content['alink']['alink_type'] = 0; 42 } 43 if(empty($content['alink']['alink_level']) || !is_array($content['alink']['alink_level'])) { 44 $content['alink']['alink_level'] = array(); 45 } 46 if(empty($content['alink']['alink_unique'])) { 47 $content['alink']['alink_unique'] = 0; 48 } 49 if(!isset($content['alink']['alink_allowedtags'])) { 50 $content['alink']['alink_allowedtags'] = '<b><i><u><s><strong>'; 51 } 52 if(empty($content['alink']['alink_crop'])) { 53 $content['alink']['alink_crop'] = 0; 54 } 55 if(empty($content['alink']['alink_prio'])) { 56 $content['alink']['alink_prio'] = 0; 57 } 58 if(empty($content['alink']['alink_category']) || !is_array($content['alink']['alink_category'])) { 59 $content['alink']['alink_category'] = array(); 60 } 61 if(empty($content['alink']['alink_category'])) { 62 $content['alink']['alink_andor'] = 'OR'; 63 } 64 if(empty($content['alink']['alink_columns'])) { 65 $content['alink']['alink_columns'] = ''; 66 } 67 if(empty($content['alink']['alink_categoryalias'])) { 68 $content['alink']['alink_categoryalias'] = 0; 69 } 70 71 $BE['HEADER']['contentpart.js'] = getJavaScriptSourceLink('include/inc_js/contentpart.js'); 72 73 // necessary JavaScript libraries 74 initMootools(); 75 initMootoolsAutocompleter(); 76 77 ?> 78 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 79 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 80 81 <tr> 82 <td align="right" class="chatlist"><?php echo $BL['be_admin_struct_template'] ?>: </td> 83 <td><select name="calink_template" id="calink_template" class="f11b"> 84 <?php 85 86 echo '<option value="">'.$BL['be_admin_tmpl_default'].' <ul><li></option>'.LF; 87 88 // templates for forum 89 $tmpllist = get_tmpl_files(PHPWCMS_TEMPLATE.'inc_cntpart/teaser'); 90 if(is_array($tmpllist) && count($tmpllist)) { 91 foreach($tmpllist as $val) { 92 $vals = ''; 93 if($val == $content['alink']['alink_template']) $vals= ' selected="selected"'; 94 $val = html_specialchars($val); 95 echo '<option value="'.$val.'"'.$vals.'>'.$val."</option>\n"; 96 } 97 } 98 99 ?> 100 </select></td> 101 </tr> 102 103 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 104 105 <tr> 106 <td align="right" class="chatlist"><?php echo $BL['be_article_rendering'] ?>: </td> 107 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 108 <tr> 109 <td bgcolor="#E7E8EB"><input type="checkbox" name="calink_unique" id="calink_unique" value="1"<?php is_checked(1, $content['alink']['alink_unique']) ?> /></td> 110 <td bgcolor="#E7E8EB" class="chatlist"><label for="calink_unique"> <?php echo $BL['be_unique_teaser_entry'] ?> </label></td> 111 112 <td> </td> 113 <td class="chatlist"><?php echo $BL['be_cnt_column'] ?>: </td> 114 <td><input name="calink_columns" type="text" id="calink_columns" class="f11b" style="width: 35px" value="<?php echo $content['alink']['alink_columns']; ?>" size="3" maxlength="3" /></td> 115 116 </tr> 117 </table> 118 </td> 119 </tr> 120 121 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 122 123 <tr> 124 <td align="right" class="chatlist"><?php echo $BL['be_article_morelink'] ?>: </td> 125 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 126 <tr> 127 <td bgcolor="#E7E8EB"><input type="checkbox" name="calink_categoryalias" id="calink_categoryalias" value="1"<?php is_checked(1, $content['alink']['alink_categoryalias']) ?> /></td> 128 <td bgcolor="#E7E8EB" class="chatlist"><label for="calink_categoryalias"> <?php echo $BL['be_check_against_category_alias'] ?> </label></td> 129 </tr> 130 </table> 131 </td> 132 </tr> 133 134 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 135 136 <tr> 137 <td align="right" class="chatlist"><?php echo $BL['be_article_asummary'] ?>: </td> 138 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 139 <tr> 140 <td><input name="calink_wordlimit" type="text" id="calink_wordlimit" class="f11b" style="width: 35px" value="<?php 141 echo empty($content['alink']['alink_wordlimit']) ? '' : $content['alink']['alink_wordlimit']; 142 ?>" size="3" maxlength="5" /></td> 143 <td class="chatlist"> <?php echo $BL['be_cnt_results_wordlimit'] ?></td> 144 </tr> 145 </table> 146 </td> 147 </tr> 148 149 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr> 150 151 <tr> 152 <td align="right" class="chatlist"><?php echo $BL['be_allowed_tags'] ?>: </td> 153 <td><input name="calink_allowedtags" type="text" id="calink_allowedtags" class="f11b" style="width: 420px" value="<?php echo html_specialchars($content['alink']['alink_allowedtags']); ?>" size="20" /></td> 154 </tr> 155 156 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 157 158 <tr> 159 <td align="right" class="chatlist"><?php echo $BL['be_cnt_image'] ?>: </td> 160 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 161 <tr> 162 <td align="right" class="chatlist"><?php echo $BL['be_cnt_maxw'] ?>: </td> 163 <td><input name="calink_width" type="text" class="f11b" id="calink_width" style="width: 35px;" size="4" maxlength="4" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content['alink']['alink_width']) ? '' : $content['alink']['alink_width']; ?>" /></td> 164 <td class="chatlist"> <?php echo $BL['be_cnt_maxh'] ?>: </td> 165 <td><input name="calink_height" type="text" class="f11b" id="calink_height" style="width: 35px;" size="4" maxlength="4" onkeyup="if(!parseInt(this.value)) this.value='';" value="<?php echo empty($content['alink']['alink_height']) ? '' : $content['alink']['alink_height']; ?>" /></td> 166 <td class="chatlist"> px </td> 167 168 <td><input type="checkbox" name="calink_crop" id="calink_crop" value="1" <?php is_checked(1, $content['alink']['alink_crop']); ?> /></td> 169 <td class="v10 chatlist"><label for="calink_crop" class="checkbox"><?php echo $BL['be_image_crop'] ?></label></td> 170 171 </tr> 172 </table></td> 173 </tr> 174 175 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 176 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 177 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 178 179 <tr> 180 <td align="right" class="chatlist"><?php echo $BL['be_cnt_ecardform_selector'] ?>: </td> 181 <td valign="top"><table cellpadding="0" cellspacing="0" border="0" summary=""> 182 <tr> 183 <td><select name="calink_type" class="f11b" id="calink_type" onchange="showHide_TeaserArticleSelection(this.options[this.selectedIndex].value)"> 184 185 <optgroup label="<?php echo $BL['be_sorted']; ?>"> 186 187 <option value="0"<?php is_selected(0, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_ordermanual'] ?></option> 188 <option value="1"<?php is_selected(1, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 189 <option value="2"<?php is_selected(2, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderasc'] ?></option> 190 <option value="3"<?php is_selected(3, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 191 <option value="4"<?php is_selected(4, $content['alink']['alink_type']) ?>><?php echo $BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderasc'] ?></option> 192 <option value="5"<?php is_selected(5, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 193 <option value="6"<?php is_selected(6, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderasc'] ?></option> 194 <option value="7"<?php is_selected(7, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 195 <option value="8"<?php is_selected(8, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderasc'] ?></option> 196 197 <option value="18"<?php is_selected(18, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_atitle'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 198 <option value="19"<?php is_selected(19, $content['alink']['alink_type']) ?>><?php echo $BL['be_article_atitle'].', '.$BL['be_admin_struct_orderasc'] ?></option> 199 200 </optgroup> 201 202 <optgroup label="<?php echo $BL['be_random']; ?>"> 203 204 <option value="9"<?php is_selected(9, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'] ?></option> 205 206 </optgroup> 207 208 <optgroup label="<?php echo $BL['be_random'].', '.$BL['be_sorted']; ?>"> 209 210 <option value="10"<?php is_selected(10, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 211 <option value="11"<?php is_selected(11, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderdate'].', '.$BL['be_admin_struct_orderasc'] ?></option> 212 <option value="12"<?php is_selected(12, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 213 <option value="13"<?php is_selected(13, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_admin_struct_orderchangedate'].', '.$BL['be_admin_struct_orderasc'] ?></option> 214 <option value="14"<?php is_selected(14, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 215 <option value="15"<?php is_selected(15, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_start'].', '.$BL['be_admin_struct_orderasc'] ?></option> 216 <option value="16"<?php is_selected(16, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 217 <option value="17"<?php is_selected(17, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_cnt_end'].', '.$BL['be_admin_struct_orderasc'] ?></option> 218 219 <option value="20"<?php is_selected(20, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_atitle'].', '.$BL['be_admin_struct_orderdesc'] ?></option> 220 <option value="21"<?php is_selected(21, $content['alink']['alink_type']) ?>><?php echo $BL['be_random'].', '.$BL['be_article_atitle'].', '.$BL['be_admin_struct_orderasc'] ?></option> 221 222 223 </optgroup> 224 225 </select></td> 226 <td> </td> 227 <td bgcolor="#e7e8eb" id="prio0"><input type="checkbox" name="calink_prio" id="calink_prio" value="1"<?php is_checked(1, $content['alink']['alink_prio']) ?> /></td> 228 <td bgcolor="#e7e8eb" id="prio1"><label for="calink_prio"> <?php echo $BL['be_use_prio'] ?> </label></td> 229 </tr> 230 </table></td> 231 </tr> 232 233 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 234 235 <tr id="calink_manual_0"<?php if($content['alink']['alink_type']) echo ' style="display:none"'; ?>> 236 <td align="right" valign="top" class="chatlist tdtop3"><?php echo $BL['be_selection'] ?>: </td> 237 <td style="padding-bottom:3px;"><table border="0" cellpadding="0" cellspacing="0" summary=""> 238 239 <tr> 240 <td rowspan="2"><select name="calink[]" size="8" multiple="multiple" class="f11 listrow" id="calink" style="width: 420px" ondblclick="moveSelectedOptions(teaser_items,source_items,true);"> 241 <?php 242 //Auslesen der kompletten Public Artikel 243 $sql = "SELECT article_id, article_title, acat_name, acat_alias, article_cid "; 244 $sql .= "FROM ".DB_PREPEND."phpwcms_article ar "; 245 $sql .= "LEFT JOIN ".DB_PREPEND."phpwcms_articlecat ac ON ar.article_cid = ac.acat_id "; 246 $sql .= "WHERE ar.article_public = 1 AND ar.article_deleted = 0 "; 247 $sql .= "GROUP BY ar.article_id, ar.article_title, ac.acat_name "; 248 $sql .= "ORDER BY ar.article_title;"; 249 250 $carticle_list = ''; 251 $carticle_link = $content['alink']['alink_id']; 252 if($result = mysql_query($sql, $db) or die("error while reading complete article/articlecategory list")) { 253 while($row = mysql_fetch_row($result)) { 254 $k = 0; 255 $k1 = $BL['be_cnt_sitelevel'].': '.html_specialchars($row[2]); //$BL['be_admin_page_articlename'] 256 if(empty($row[4])) { 257 $row[2] = $indexpage['acat_name']; 258 $row[3] = $indexpage['acat_alias']; 259 } 260 $alias_add = ' ('.html_specialchars($row[2]); 261 if(!empty($row[3])) { 262 $alias_add .= '/'.html_specialchars($row[3]); 263 } 264 $alias_add .= ')'; 265 foreach($content['alink']['alink_id'] as $key => $value) { 266 267 if($row[0] == $value) { 268 $carticle_link[$key] = ' <option value="'.$row[0].'" title="'.$k1; 269 $carticle_link[$key] .= '">'.html_specialchars($row[1]).$alias_add.'</option>'.LF; 270 unset($content['alink']['alink_id'][$key]); 271 $k = 1; 272 } 273 274 } 275 276 if(!$k) { 277 $carticle_list .= ' <option value="'.$row[0].'" title="'.$k1; 278 $carticle_list .= '">'.html_specialchars($row[1]).$alias_add.'</option>'.LF; 279 } 280 } 281 } 282 283 echo implode(LF, $carticle_link); 284 285 ?> 286 </select></td> 287 288 <td rowspan="2"> </td> 289 <td valign="top"> 290 <a href="#" title="<?php echo $BL['be_cnt_sortup'] ?>" onclick="moveOptionUp(teaser_items);return false;"><img src="img/button/list_pos_up.gif" alt="" width="15" height="15" border="0" /></a> 291 <br /> 292 <a href="#" title="<?php echo $BL['be_cnt_sortdown'] ?>" onclick="moveOptionDown(teaser_items);return false;"><img src="img/button/list_pos_down.gif" alt="" width="15" height="15" border="0" /></a></td> 293 </tr> 294 <tr> 295 <td valign="bottom"><a href="#" title="<?php echo $BL['be_cnt_removearticleto'] ?>" onclick="moveSelectedOptions(teaser_items,source_items,false);return false;"><img src="img/button/del_image_button.gif" alt="" width="15" height="15" border="0" /></a></td> 296 </tr> 297 </table></td> 298 </tr> 299 <tr id="calink_manual_1"<?php if($content['alink']['alink_type']) echo ' style="display:none"'; ?>> 300 <td align="right" valign="top" class="chatlist" style="padding-top:3px;"><?php echo $BL['be_cnt_articles'] ?>: </td> 301 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 302 303 <tr> 304 <td><select name="calinklist" size="16" multiple="multiple" class="f11 listrow" id="calinklist" style="width:420px;" ondblclick="moveSelectedOptions(source_items,teaser_items,false);"> 305 <?php echo $carticle_list; ?> 306 </select></td> 307 308 <td> </td> 309 <td valign="top"><a href="#" title="<?php echo $BL['be_cnt_movearticleto'] ?>" onclick="moveSelectedOptions(source_items,teaser_items,false);return false"><img src="img/button/list_copy.gif" alt="" width="15" height="15" border="0" /></a></td> 310 </tr> 311 </table></td> 312 </tr> 313 314 315 <tr id="calink_auto_0"<?php if(!$content['alink']['alink_type']) echo ' style="display:none"'; ?>> 316 <td align="right" valign="top" class="chatlist" style="padding-top:3px;"><?php echo $BL['be_cnt_rssfeed_max'] ?>: </td> 317 <td><table border="0" cellpadding="0" cellspacing="0" summary=""> 318 319 <tr> 320 <td><input name="calink_max" type="text" id="calink_max" class="f11b" style="width: 35px" value="<?php 321 echo empty($content['alink']['alink_max']) ? '' : $content['alink']['alink_max']; 322 ?>" size="5" maxlength="5" /></td> 323 <td class="chatlist"> <?php echo $BL['be_cnt_articles'] ?></td> 324 </tr> 325 326 </table></td> 327 </tr> 328 <tr id="calink_auto_1"<?php if(!$content['alink']['alink_type']) echo ' style="display:none"'; ?>> 329 <td align="right" valign="top" class="chatlist" style="padding-top:6px;"><?php echo $BL['be_cnt_sitelevel'] ?>: </td> 330 <td style="padding-top:3px;"><select name="calink_level[]" size="15" multiple="multiple" class="f11 optionhover" id="calink_level" style="width: 440px"> 331 <?php 332 333 echo '<option value="0"'; 334 if(in_array(0, $content['alink']['alink_level'])) echo ' selected="selected"'; 335 echo '>'.html_specialchars($indexpage['acat_name']).'</option>'.LF; 336 struct_select_list(0, 0, $content['alink']['alink_level']); 337 ?> 338 </select></td> 339 </tr> 340 341 342 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="6" /></td></tr> 343 344 <tr> 345 <td align="right" class="chatlist"><?php echo $BL['be_tags'] ?>: </td> 346 <td><table cellpadding="0" cellspacing="0" border="0" summary=""> 347 <tr> 348 <td><input type="text" name="calink_category" id="calink_category" value="<?php echo html_specialchars(implode(', ', $content['alink']['alink_category'])) ?>" class="width350 bold" /></td> 349 <td> </td> 350 <td><select name="calink_andor" id="calink_andor"> 351 352 <option value="OR"<?php is_selected('OR', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_or'] ?></option> 353 <option value="AND"<?php is_selected('AND', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_and'] ?></option> 354 <option value="NOT"<?php is_selected('NOT', $content['alink']['alink_andor']) ?>><?php echo $BL['be_fsearch_not'] ?></option> 355 356 </select></td> 357 </tr> 358 </table></td> 359 </tr> 360 361 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /><script type="text/javascript"> 362 <!-- 363 364 window.addEvent('domready', function(){ 365 366 /* Autocompleter for categories/tags */ 367 var searchCategory = $('calink_category'); 368 var indicator2 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter($('calink_andor')); 369 var completer2 = new Autocompleter.Ajax.Json(searchCategory, 'include/inc_act/ajax_connector.php', { 370 multi: true, 371 maxChoices: 30, 372 autotrim: true, 373 minLength: 0, 374 allowDupes: false, 375 postData: {action: 'category', method: 'json'}, 376 onRequest: function(el) { 377 indicator2.setStyle('display', ''); 378 }, 379 onComplete: function(el) { 380 indicator2.setStyle('display', 'none'); 381 } 382 }); 383 384 }); 385 386 var teaser_items = $('calink'); 387 var source_items = $('calinklist'); 388 389 //--> 390 </script></td></tr> 391 <tr><td colspan="2"><img src="img/lines/l538_70.gif" alt="" width="538" height="1" /></td></tr> 392
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Sun Jan 29 16:31:14 2012 | Cross-referenced by PHPXref 0.7.1 |