Changeset 345 for trunk/search.php
- Timestamp:
- Feb 2, 2004, 1:55:18 AM (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/search.php
r57 r345 18 18 ***************************************************************************/ 19 19 20 //----------------------------------------------------------- personnal include 21 include_once( './include/init.inc.php' ); 20 //----------------------------------------------------------- include 21 $phpwg_root_path = './'; 22 include_once( $phpwg_root_path.'common.php' ); 22 23 //-------------------------------------------------- access authorization check 23 24 check_login_authorization(); … … 54 55 } 55 56 //----------------------------------------------------- template initialization 56 $vtp = new VTemplate; 57 // 58 // Start output of page 59 // 60 $title= $lang['search_title']; 61 include('include/page_header.php'); 62 57 63 $handle = $vtp->Open( './template/'.$user['template'].'/search.vtp' ); 58 64 initialize_template(); 59 60 65 $tpl = array( 'search_title','search_return_main_page','submit', 61 66 'search_comments' ); … … 82 87 $vtp->setVar( $handle, 'text.size', '40' ); 83 88 $vtp->setVar( $handle, 'text.name', 'search' ); 89 if (isset($_POST['search'])) 84 90 $vtp->setVar( $handle, 'text.value', $_POST['search'] ); 85 91 $vtp->closeSession( $handle, 'text' ); … … 93 99 $vtp->setVar( $handle, 'radio.value', 'OR' ); 94 100 $vtp->setVar( $handle, 'radio.option', $lang['search_mode_or'] ); 95 if ( $_POST['mode'] == 'OR' or $_POST['mode'] == '' )101 if (!isset($_POST['mode']) || $_POST['mode'] == 'OR' ) 96 102 { 97 103 $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); … … 103 109 $vtp->setVar( $handle, 'radio.value', 'AND' ); 104 110 $vtp->setVar( $handle, 'radio.option', $lang['search_mode_and'] ); 105 if ( $_POST['mode'] == 'AND' )111 if ( isset($_POST['mode']) && $_POST['mode'] == 'AND' ) 106 112 { 107 113 $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' ); … … 117 123 echo $code; 118 124 //------------------------------------------------------------ log informations 119 pwg_log( 'search', $ page['title']);125 pwg_log( 'search', $title ); 120 126 mysql_close(); 127 include('include/page_tail.php'); 121 128 ?>
Note: See TracChangeset
for help on using the changeset viewer.