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