| [ PHPXref.com ] | [ Generated: Sun Jul 20 20:18:29 2008 ] | [ Siteframe 5.0.2 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: advanced.php,v 1.1 2005/11/17 08:04:03 glen Exp $ 3 // Copyright (c)2005, Glen Campbell. All rights reserved. 4 5 require_once 'siteframe.inc'; 6 7 $PAGE->assign('page_title', lang('page_title_advanced')); 8 9 // handle submitted forms 10 if ($_POST['_submitted']) 11 { 12 $sstr = ''; // search string 13 if ($_POST['search_any'] != '') 14 $sstr .= $_POST['search_any']; 15 if ($_POST['search_all'] != '') 16 { 17 $words = split(' ', $_POST['search_all']); 18 foreach ($words as $word) 19 $sstr .= ' +'.$word; 20 } 21 if ($_POST['search_exact'] != '') 22 $sstr .= ' "' . $_POST['search_exact'] . '"'; 23 if ($_POST['search_exclude'] != '') 24 { 25 $words = split(' ', $_POST['search_exclude']); 26 foreach ($words as $word) 27 $sstr .= ' -'.$word; 28 } 29 $query = sprintf( 30 '%s/search.php?q=%s', 31 config('site_path'), 32 urlencode(trim($sstr)) 33 ); 34 header('Location: '.$query); 35 exit; 36 } 37 38 // build the input form 39 $inf = new InputForm( 40 'asearch', 41 $_SERVER['SCRIPT_NAME'], 42 'post', 43 lang('prompt_search') 44 ); 45 $inf->add_item('search_any', array( 46 'type' => 'text', 47 'size' => 30, 48 )); 49 $inf->add_item('search_all', array( 50 'type' => 'text', 51 'size' => 30, 52 )); 53 $inf->add_item('search_exact', array( 54 'type' => 'text', 55 'size' => 30, 56 )); 57 $inf->add_item('search_exclude', array( 58 'type' => 'text', 59 'size' => 30, 60 )); 61 62 $PAGE->assign('edit_form', $inf->get_form()); 63 $PAGE->display(); 64 ?>
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |