Changeset 345 for trunk/search.php


Ignore:
Timestamp:
Feb 2, 2004, 1:55:18 AM (20 years ago)
Author:
gweltas
Message:

Merge of the 1.3.1 release
Creation of an unique include file (common.php)
Creation of an unique define file (include/constants.php)
Modification of the installation procedure

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/search.php

    r57 r345  
    1818 ***************************************************************************/
    1919
    20 //----------------------------------------------------------- personnal include
    21 include_once( './include/init.inc.php' );
     20//----------------------------------------------------------- include
     21$phpwg_root_path = './';
     22include_once( $phpwg_root_path.'common.php' );
    2223//-------------------------------------------------- access authorization check
    2324check_login_authorization();
     
    5455}
    5556//----------------------------------------------------- template initialization
    56 $vtp = new VTemplate;
     57//
     58// Start output of page
     59//
     60$title= $lang['search_title'];
     61include('include/page_header.php');
     62
    5763$handle = $vtp->Open( './template/'.$user['template'].'/search.vtp' );
    5864initialize_template();
    59 
    6065$tpl = array( 'search_title','search_return_main_page','submit',
    6166              'search_comments' );
     
    8287$vtp->setVar( $handle, 'text.size', '40' );
    8388$vtp->setVar( $handle, 'text.name', 'search' );
     89if (isset($_POST['search']))
    8490$vtp->setVar( $handle, 'text.value', $_POST['search'] );
    8591$vtp->closeSession( $handle, 'text' );
     
    9399$vtp->setVar( $handle, 'radio.value', 'OR' );
    94100$vtp->setVar( $handle, 'radio.option', $lang['search_mode_or'] );
    95 if ( $_POST['mode'] == 'OR' or $_POST['mode'] == '' )
     101if (!isset($_POST['mode']) || $_POST['mode'] == 'OR' )
    96102{
    97103  $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' );
     
    103109$vtp->setVar( $handle, 'radio.value', 'AND' );
    104110$vtp->setVar( $handle, 'radio.option', $lang['search_mode_and'] );
    105 if ( $_POST['mode'] == 'AND' )
     111if ( isset($_POST['mode']) && $_POST['mode'] == 'AND' )
    106112{
    107113  $vtp->setVar( $handle, 'radio.checked', ' checked="checked"' );
     
    117123echo $code;
    118124//------------------------------------------------------------ log informations
    119 pwg_log( 'search', $page['title'] );
     125pwg_log( 'search', $title );
    120126mysql_close();
     127include('include/page_tail.php');
    121128?>
Note: See TracChangeset for help on using the changeset viewer.