[ 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 //search form 31 32 // necessary JavaScript libraries 33 initMootools(); 34 initMootoolsAutocompleter(); 35 36 37 if(empty($content['search']["text_html"])) { 38 $content['search']["text_html"] = 0; 39 } 40 41 $content['search']["search_news"] = empty($content['search']["search_news"]) ? 0 : 1; 42 43 if(!isset($content['search']["news_lang"])) { 44 $content['search']["news_lang"] = array(); 45 } 46 if(!isset($content['search']["news_category"])) { 47 $content['search']["news_category"] = array(); 48 } 49 if(!isset($content['search']["news_andor"])) { 50 $content['search']["news_andor"] = 'OR'; 51 } 52 if(empty($content['search']["news_url"])) { 53 $content['search']["news_url"] = ''; 54 } 55 if(empty($content["search"]["hide_summary"])) { 56 $content["search"]["hide_summary"] = 0; 57 } 58 if(empty($content["search"]["highlight_result"])) { 59 $content["search"]["highlight_result"] = 0; 60 } 61 if(empty($content["search"]["newwin"])) { 62 $content["search"]["newwin"] = 0; 63 } 64 if(empty($content["search"]["no_filenames"])) { 65 $content["search"]["no_filenames"] = 0; 66 } 67 68 ?> 69 <tr><td colspan="2" class="rowspacer0x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 70 71 <tr> 72 <td align="right" class="chatlist" valign="top"><?php echo $BL['be_cnt_results'] ?>: </td> 73 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 74 <tr> 75 <td><input name="csearch_result_per_page" type="text" id="csearch_result_per_page" class="f11b" style="width: 30px" value="<?php echo isset($content["search"]["result_per_page"]) ? $content["search"]["result_per_page"] : '' ?>" size="3" maxlength="5" /></td> 76 <td class="v10"> <?php echo $BL['be_cnt_results_per_page'] ?> </td> 77 <td><input name="csearch_newwin" type="checkbox" id="csearch_newwin" value="1" <?php is_checked(1, $content["search"]["newwin"]) ?> /></td> 78 <td class="v10"><label for="csearch_newwin"><?php echo $BL['be_cnt_opennewwin'] ?></label></td> 79 </tr> 80 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2" /></td> 81 </tr> 82 <tr> 83 <td><input name="csearch_wordlimit" type="text" id="csearch_wordlimit" class="f11b" style="width: 30px" value="<?php echo isset($content["search"]["wordlimit"]) ? $content["search"]["wordlimit"] : '' ?>" size="3" maxlength="5" /></td> 84 <td class="v10"> <?php echo $BL['be_cnt_results_wordlimit'] ?> </td> 85 <td><input name="csearch_highlight" type="checkbox" id="csearch_highlight" value="1" <?php is_checked(1, $content["search"]["highlight_result"]) ?> /></td> 86 <td class="v10"><label for="csearch_highlight"><?php echo $BL['be_cnt_search_highlight'] ?></label></td> 87 </tr> 88 <tr><td colspan="4"><img src="img/leer.gif" alt="" width="1" height="2" /></td> 89 </tr> 90 <tr> 91 <td><input name="csearch_minchar" type="text" id="csearch_minchar" class="f11b" style="width: 30px" value="<?php echo isset($content["search"]["minchar"]) ? $content["search"]["minchar"] : '3' ?>" size="3" maxlength="5" /></td> 92 <td class="v10"> <?php echo $BL['be_cnt_results_minchar'] ?> </td> 93 <td><input name="csearch_hidesummary" type="checkbox" id="csearch_hidesummary" value="1" <?php is_checked(1, $content["search"]["hide_summary"]) ?> /></td> 94 <td class="v10"><label for="csearch_hidesummary"><?php echo $BL['be_cnt_search_hidesummary'] ?></label></td> 95 </tr> 96 </table></td> 97 </tr> 98 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td></tr> 99 100 <tr> 101 <td align="right" class="chatlist" valign="top"><?php echo $BL['be_cnt_search_startlevel'] ?>: </td> 102 <td><select name="csearch_start_at[]" size="10" multiple="multiple" class="f11" id="csearch_start_at" style="width: 440px"> 103 <?php 104 if(!isset($content["search"]["start_at"]) || !is_array($content["search"]["start_at"])) $content["search"]["start_at"] = array(); 105 106 echo '<option value="0"'; 107 if(in_array(0, $content["search"]["start_at"])) echo ' selected'; 108 echo '>'.$BL['be_admin_struct_index'].'</option>'.LF; 109 struct_select_list(0, 0, $content["search"]["start_at"]); 110 ?> 111 </select></td> 112 </tr> 113 114 <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 115 116 <tr> 117 <td align="right" class="chatlist tdtop3" valign="top"><?php echo $BL['be_cnt_search_searchnot'] ?>: </td> 118 <td><table border="0" cellpadding="1" cellspacing="0" summary=""> 119 <tr> 120 <td><input name="csearch_nofilenames" type="checkbox" id="csearch_nofilenames" value="1" <?php is_checked(1, $content["search"]["no_filenames"]) ?> /></td> 121 <td class="v10"><label for="csearch_nofilenames"><?php echo $BL['be_fprivedit_filename'] ?></label></td> 122 </tr> 123 </table></td> 124 </tr> 125 126 <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 127 128 <tr> 129 <td align="right" class="chatlist tdtop4"><?php echo $BL['be_module_search'] ?>: </td> 130 <td valign="top"> 131 <table border="0" cellpadding="1" cellspacing="0" summary=""> 132 <tr> 133 <td><input name="csearch_news" type="checkbox" id="csearch_news" value="1"<?php is_checked(1, $content['search']["search_news"]) ?> /></td> 134 <td class="v10"><label for="csearch_news"><strong><?php echo $BL['be_news'] ?></strong></label> </td> 135 <td align="right" class="chatlist"><?php echo $BL['be_profile_label_lang'] ?>: </td> 136 <td colspan="2"><input type="text" name="csearch_news_lang" id="news_lang" value="<?php echo html_specialchars(implode(', ', $content['search']["news_lang"])) ?>" class="width200" /></td> 137 </tr> 138 <tr> 139 <td colspan="2"> </td> 140 <td align="right" class="chatlist"><?php echo $BL['be_tags'] ?>: </td> 141 <td><input type="text" name="csearch_news_category" id="news_category" value="<?php echo html_specialchars(implode(', ', $content['search']["news_category"])) ?>" class="width200" /></td> 142 <td><select name="csearch_news_andor" id="news_andor"> 143 144 <option value="OR"<?php is_selected('OR', $content['search']['news_andor']) ?>><?php echo $BL['be_fsearch_or'] ?></option> 145 <option value="AND"<?php is_selected('AND', $content['search']['news_andor']) ?>><?php echo $BL['be_fsearch_and'] ?></option> 146 <option value="NOT"<?php is_selected('NOT', $content['search']['news_andor']) ?>><?php echo $BL['be_fsearch_not'] ?></option> 147 148 </select></td> 149 </tr> 150 <tr> 151 <td colspan="2"> </td> 152 <td align="right" class="chatlist"><?php echo $BL['be_cnt_target'].'/'.$BL['be_profile_label_website'] ?>: </td> 153 <td><input type="text" name="csearch_news_url" id="news_url" value="<?php echo html_entities($content['search']["news_url"]) ?>" class="width200" /></td> 154 <td> </td> 155 </tr> 156 </table> 157 <script type="text/javascript"> 158 <!-- 159 160 window.addEvent('domready', function(){ 161 162 /* Autocompleter for categories/tags */ 163 var searchCategory = $('news_category'); 164 var indicator2 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(searchCategory); 165 var completer2 = new Autocompleter.Ajax.Json(searchCategory, 'include/inc_act/ajax_connector.php', { 166 multi: true, 167 maxChoices: 30, 168 autotrim: true, 169 minLength: 0, 170 allowDupes: false, 171 postData: {action: 'newstags', method: 'json'}, 172 onRequest: function(el) { 173 indicator2.setStyle('display', ''); 174 }, 175 onComplete: function(el) { 176 indicator2.setStyle('display', 'none'); 177 } 178 }); 179 180 var selectLang = $('news_lang'); 181 var indicator1 = new Element('span', {'class': 'autocompleter-loading', 'styles': {'display': 'none'}}).setHTML('').injectAfter(selectLang); 182 var completer1 = new Autocompleter.Ajax.Json(selectLang, 'include/inc_act/ajax_connector.php', { 183 multi: true, 184 allowDupes: false, 185 autotrim: true, 186 minLength: 0, 187 maxChoices: 20, 188 postData: {action: 'lang', method: 'json'}, 189 onRequest: function(el) { 190 indicator1.setStyle('display', ''); 191 }, 192 onComplete: function(el) { 193 indicator1.setStyle('display', 'none'); 194 } 195 }); 196 197 selectLang.addEvent('keyup', function(){ 198 this.value = this.value.replace(/[^a-z\-\, ]/g, ''); 199 }); 200 201 }); 202 203 //--> 204 </script> 205 </td> 206 </tr> 207 208 <?php 209 210 $content['search']['module_search'] = array(); 211 212 // check modules for frontend search 213 foreach($phpwcms['modules'] as $value) { 214 215 // check if module is fe searchable 216 if($value['search'] === true && is_file($value['path'].'frontend.search.php')) { 217 218 $value['tr'] = '<tr>'; 219 $value['tr'] .= '<td><input name="csearch_module['.$value['name'].']" type="checkbox" '; 220 $value['tr'] .= 'id="csearch_module_'.$value['name'].'" value="1"'; 221 if( !empty( $content['search']['module'][ $value['name'] ] ) ) { 222 $value['tr'] .= ' checked="checked"'; 223 } 224 $value['tr'] .= ' /></td>'; 225 $value['tr'] .= '<td class="v10"><label for="csearch_module_'.$value['name'].'">'; 226 $value['tr'] .= $BL['be_ctype_module'].': '.$BL['modules'][ $value['name'] ]['backend_menu'] . '</label></td>'; 227 $value['tr'] .= '</tr>'; 228 229 $content['search']['module_search'][] = $value['tr']; 230 231 } 232 233 } 234 235 if(count($content['search']['module_search'])) { 236 237 echo '<tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="5" /></td></tr>'; 238 echo '<tr><td> </td>'; 239 echo '<td valign="top">'; 240 echo '<table border="0" cellpadding="1" cellspacing="0" summary="">'; 241 echo implode(LF, $content['search']['module_search']) ; 242 echo '</table></td></tr>'; 243 } 244 ?> 245 246 <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 247 248 <tr> 249 <td align="right" class="chatlist"> </td> 250 <td valign="top" class="chatlist"><?php echo $BL['be_cnt_searchlabeltext'] ?></td> 251 </tr> 252 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td></tr> 253 254 255 <tr> 256 <td align="right" class="chatlist"><?php echo $BL['be_cnt_input'] ?>: </td> 257 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 258 <tr> 259 <td><input name="csearch_label_input" type="text" class="f11b" id="csearch_label_input" style="width: 150px" value="<?php echo isset($content["search"]["label_input"]) ? $content["search"]["label_input"] : '' ?>" size="10" maxlength="250" /></td> 260 <td class="chatlist"> <?php echo $BL['be_cnt_css_class'] ?>: </td> 261 <td><input name="csearch_style_input" type="text" id="csearch_style_input" class="f11b" style="width: 200px" value="<?php echo isset($content["search"]["style_input"]) ? $content["search"]["style_input"] : '' ?>" size="20" /></td> 262 </tr> 263 </table></td> 264 </tr> 265 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td></tr> 266 <tr> 267 <td align="right" class="chatlist"><?php echo $BL['be_cnt_buttontext'] ?>: </td> 268 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 269 <tr> 270 <td><input name="csearch_label_button" type="text" id="csearch_label_button" class="f11b" style="width: 150px" value="<?php echo isset($content["search"]["label_button"]) ? $content["search"]["label_button"] : '' ?>" size="10" maxlength="75" /></td> 271 <td class="chatlist"> <?php echo $BL['be_cnt_css_class'] ?>: </td> 272 <td><input name="csearch_style_button" type="text" id="csearch_style_button" class="f11b" style="width: 200px" value="<?php echo isset($content["search"]["style_button"]) ? $content["search"]["style_button"] : '' ?>" size="20" /></td> 273 </tr> 274 </table></td> 275 </tr> 276 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="2" /></td> 277 </tr> 278 <tr> 279 <td align="right" class="chatlist"><?php echo $BL['be_cnt_result'] ?>: </td> 280 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 281 <tr> 282 <td><input name="csearch_label_result" type="text" id="csearch_label_result" class="f11b" style="width: 150px" value="<?php echo isset($content["search"]["label_result"]) ? html_specialchars($content["search"]["label_result"]) : '' ?>" size="10" maxlength="250" /></td> 283 <td class="chatlist"> <?php echo $BL['be_cnt_css_class'] ?>: </td> 284 <td><input name="csearch_style_result" type="text" id="csearch_style_result" class="f11b" style="width: 200px" value="<?php echo isset($content["search"]["style_result"]) ? $content["search"]["style_result"] : '' ?>" size="20" /></td> 285 </tr> 286 </table> 287 </td> 288 </tr> 289 290 <tr><td colspan="2" class="rowspacer7x7"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr> 291 292 <tr> 293 <td align="right" class="chatlist" valign="top"><?php echo $BL['be_cnt_page_of_pages'] ?>: </td> 294 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 295 296 <tr> 297 <td class="chatlist"><?php echo $BL['be_cnt_page_of_pages_descr'] ?></td> 298 </tr> 299 </table> 300 301 <table border="0" cellpadding="1" cellspacing="0" style="margin-top:3px;margin-bottom:1px;" summary=""> 302 <tr bgcolor="#E7E8EB"> 303 <?php 304 305 if(!isset($content["search"]["show_always"])) $content["search"]["show_always"] = 1; 306 if(!isset($content["search"]["show_top"])) $content["search"]["show_top"] = 1; 307 if(!isset($content["search"]["show_bottom"])) $content["search"]["show_bottom"] = 1; 308 if(!isset($content["search"]["show_next"])) $content["search"]["show_next"] = 1; 309 if(!isset($content["search"]["show_prev"])) $content["search"]["show_prev"] = 1; 310 311 ?> 312 <td><input name="csearch_show_always" id="csearch_show_always" type="checkbox" value="1" <?php is_checked(1, $content["search"]["show_always"]) ?> /></td> 313 <td class="v10"><label for="csearch_show_always"><?php echo $BL['be_cnt_search_show_forall'] ?></label> </td> 314 315 <td><input name="csearch_show_top" id="csearch_show_top" type="checkbox" value="1" <?php is_checked(1, $content["search"]["show_top"]) ?> /></td> 316 <td class="v10"><label for="csearch_show_top"><?php echo $BL['be_cnt_search_show_top'] ?></label> </td> 317 318 <td><input name="csearch_show_bottom" id="csearch_show_bottom" type="checkbox" value="1" <?php is_checked(1, $content["search"]["show_bottom"]) ?> /></td> 319 <td class="v10"><label for="csearch_show_bottom"><?php echo $BL['be_cnt_search_show_bottom'] ?></label> </td> 320 </tr> 321 </table> 322 <table border="0" cellpadding="1" cellspacing="0" summary=""> 323 <tr bgcolor="#E7E8EB"> 324 <td><input name="csearch_show_prev" id="csearch_show_prev" type="checkbox" value="1" <?php is_checked(1, $content["search"]["show_prev"]) ?> /></td> 325 <td class="v10"><label for="csearch_show_prev"><?php echo $BL['be_cnt_search_show_prev'] ?></label> </td> 326 327 <td><input name="csearch_show_next" id="csearch_show_next" type="checkbox" value="1" <?php is_checked(1, $content["search"]["show_next"]) ?> /></td> 328 <td class="v10"><label for="csearch_show_next"><?php echo $BL['be_cnt_search_show_next'] ?></label> </td> 329 330 </tr> 331 </table></td> 332 </tr> 333 334 <tr> 335 <td align="right" class="chatlist" valign="top" > </td> 336 <td><textarea name="csearch_label_pages" rows="4" class="f11" id="csearch_label_pages" style="width: 440px"><?php echo isset($content["search"]["label_pages"]) ? html_specialchars($content["search"]["label_pages"]) : '' ?></textarea></td> 337 </tr> 338 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td> 339 </tr> 340 <tr> 341 <td align="right" class="chatlist"><?php echo $BL['be_cnt_align'] ?>: </td> 342 <td valign="top"><table border="0" cellpadding="0" cellspacing="0" summary=""> 343 <tr> 344 <?php 345 346 if(!isset($content["search"]["align"])) { 347 $content["search"]["align"] = 0; 348 } 349 350 ?> 351 <td><input name="csearch_align" id="csearch_align0" type="radio" value="0" <?php is_checked(0, $content["search"]["align"]) ?> /></td> 352 <td class="v10"> <label for="csearch_align0"><?php echo $BL['be_cnt_mediapos0'] ?></label> </td> 353 <td><input name="csearch_align" id="csearch_align1" type="radio" value="1" <?php is_checked(1, $content["search"]["align"]) ?> /></td> 354 <td class="v10"> <label for="csearch_align1"><?php echo $BL['be_cnt_right'] ?></label> </td> 355 <td><input name="csearch_align" id="csearch_align2" type="radio" value="2" <?php is_checked(2, $content["search"]["align"]) ?> /></td> 356 <td class="v10"> <label for="csearch_align2"><?php echo $BL['be_cnt_center'] ?></label></td> 357 </tr> 358 </table></td> 359 </tr> 360 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="8" /></td> 361 </tr> 362 <tr> 363 <td align="right" class="chatlist"> </td> 364 <td valign="top" class="chatlist"><?php echo $BL['be_cnt_searchformtext'] ?></td> 365 </tr> 366 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="4" /></td> 367 </tr> 368 <tr> 369 <td> </td> 370 <td><table border="0" cellpadding="1" cellspacing="0" summary=""> 371 <tr bgcolor="#E7E8EB"> 372 <td><input type="radio" name="csearch_text_html" id="csearch_text_html0" value="0"<?php echo is_checked('0', $content['search']["text_html"], 0, 0) ?> title="redirect on success" /></td> 373 <td class="v10"><label for="csearch_text_html0">Text </label> </td> 374 <td><input type="radio" name="csearch_text_html" id="csearch_text_html1" value="1"<?php echo is_checked('1', $content['search']["text_html"], 0, 0) ?> title="redirect on success" /></td> 375 <td class="v10"><label for="csearch_text_html1">HTML </label> </td> 376 </tr> 377 </table> 378 </td> 379 </tr> 380 <tr> 381 <td align="right" class="chatlist tdtop3"><?php echo $BL['be_cnt_intro'] ?>: </td> 382 <td valign="top"><textarea name="csearch_text_intro" rows="6" class="f10" id="csearch_text_intro" style="width: 440px"><?php echo isset($content["search"]["text_intro"]) ? $content["search"]["text_intro"] : '' ?></textarea></td> 383 </tr> 384 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td> 385 </tr> 386 <tr> 387 <td align="right" class="chatlist tdtop3"><?php echo $BL['be_cnt_result'] ?>: </td> 388 <td valign="top"><textarea name="csearch_text_result" rows="6" class="f10" id="csearch_text_result" style="width: 440px"><?php echo isset($content["search"]["text_result"]) ? $content["search"]["text_result"] : '' ?></textarea></td> 389 </tr> 390 <tr><td colspan="2"><img src="img/leer.gif" alt="" width="1" height="3" /></td> 391 </tr> 392 <tr> 393 <td align="right" class="chatlist tdtop3" nowrap="nowrap"><?php echo $BL['be_cnt_noresult'] ?>: </td> 394 <td valign="top"><textarea name="csearch_text_noresult" rows="6" class="f10" id="csearch_text_noresult" style="width: 440px"><?php echo isset($content["search"]["text_noresult"]) ? $content["search"]["text_noresult"] : '' ?></textarea></td> 395 </tr> 396 397 <tr><td colspan="2" class="rowspacer7x0"><img src="img/leer.gif" alt="" width="1" height="1" /></td></tr>
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 |