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