[1537] | 1 | <?php |
---|
| 2 | // +-----------------------------------------------------------------------+ |
---|
| 3 | // | PhpWebGallery - a PHP based picture gallery | |
---|
[1850] | 4 | // | Copyright (C) 2003-2007 PhpWebGallery Team - http://phpwebgallery.net | |
---|
[1537] | 5 | // +-----------------------------------------------------------------------+ |
---|
| 6 | // | file : $Id: qsearch.php 1900 2007-03-12 22:33:53Z rub $ |
---|
| 7 | // | last update : $Date: 2007-03-12 22:33:53 +0000 (Mon, 12 Mar 2007) $ |
---|
| 8 | // | last modifier : $Author: rub $ |
---|
| 9 | // | revision : $Revision: 1900 $ |
---|
| 10 | // +-----------------------------------------------------------------------+ |
---|
| 11 | // | This program is free software; you can redistribute it and/or modify | |
---|
| 12 | // | it under the terms of the GNU General Public License as published by | |
---|
| 13 | // | the Free Software Foundation | |
---|
| 14 | // | | |
---|
| 15 | // | This program is distributed in the hope that it will be useful, but | |
---|
| 16 | // | WITHOUT ANY WARRANTY; without even the implied warranty of | |
---|
| 17 | // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
---|
| 18 | // | General Public License for more details. | |
---|
| 19 | // | | |
---|
| 20 | // | You should have received a copy of the GNU General Public License | |
---|
| 21 | // | along with this program; if not, write to the Free Software | |
---|
| 22 | // | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
---|
| 23 | // | USA. | |
---|
| 24 | // +-----------------------------------------------------------------------+ |
---|
| 25 | |
---|
| 26 | define('PHPWG_ROOT_PATH','./'); |
---|
| 27 | include_once( PHPWG_ROOT_PATH.'include/common.inc.php' ); |
---|
| 28 | |
---|
[1850] | 29 | // +-----------------------------------------------------------------------+ |
---|
| 30 | // | Check Access and exit when user status is not ok | |
---|
| 31 | // +-----------------------------------------------------------------------+ |
---|
| 32 | check_status(ACCESS_GUEST); |
---|
| 33 | |
---|
[1537] | 34 | if (empty($_GET['q'])) |
---|
| 35 | { |
---|
| 36 | redirect( make_index_url() ); |
---|
| 37 | } |
---|
| 38 | |
---|
| 39 | $search = array(); |
---|
| 40 | $search['q']=$_GET['q']; |
---|
| 41 | |
---|
| 42 | $query =' |
---|
| 43 | INSERT INTO '.SEARCH_TABLE.' |
---|
[1816] | 44 | (rules, last_seen) |
---|
[1537] | 45 | VALUES |
---|
[1816] | 46 | (\''.serialize($search).'\', NOW() ) |
---|
[1537] | 47 | ;'; |
---|
| 48 | pwg_query($query); |
---|
| 49 | |
---|
| 50 | $search_id = mysql_insert_id(); |
---|
| 51 | |
---|
| 52 | redirect( |
---|
| 53 | make_index_url( |
---|
| 54 | array( |
---|
| 55 | 'section' => 'search', |
---|
| 56 | 'search' => $search_id, |
---|
| 57 | ) |
---|
| 58 | ) |
---|
| 59 | ); |
---|
| 60 | ?> |
---|