source: trunk/qsearch.php @ 1816

Last change on this file since 1816 was 1816, checked in by rvelices, 17 years ago
  • fill #searches.last_seen column
  • small correction on my previous commit (functions_tag.inc.php)
  • web service tags.getImages correction
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.1 KB
Line 
1<?php
2// +-----------------------------------------------------------------------+
3// | PhpWebGallery - a PHP based picture gallery                           |
4// | Copyright (C) 2003-2006 PhpWebGallery Team - http://phpwebgallery.net |
5// +-----------------------------------------------------------------------+
6// | branch        : BSF (Best So Far)
7// | file          : $Id: qsearch.php 1816 2007-02-14 05:45:20Z rvelices $
8// | last update   : $Date: 2007-02-14 05:45:20 +0000 (Wed, 14 Feb 2007) $
9// | last modifier : $Author: rvelices $
10// | revision      : $Revision: 1816 $
11// +-----------------------------------------------------------------------+
12// | This program is free software; you can redistribute it and/or modify  |
13// | it under the terms of the GNU General Public License as published by  |
14// | the Free Software Foundation                                          |
15// |                                                                       |
16// | This program is distributed in the hope that it will be useful, but   |
17// | WITHOUT ANY WARRANTY; without even the implied warranty of            |
18// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU      |
19// | General Public License for more details.                              |
20// |                                                                       |
21// | You should have received a copy of the GNU General Public License     |
22// | along with this program; if not, write to the Free Software           |
23// | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, |
24// | USA.                                                                  |
25// +-----------------------------------------------------------------------+
26
27define('PHPWG_ROOT_PATH','./');
28include_once( PHPWG_ROOT_PATH.'include/common.inc.php' );
29
30if (empty($_GET['q']))
31{
32  redirect( make_index_url() );
33}
34
35$search = array();
36$search['q']=$_GET['q'];
37
38$query ='
39INSERT INTO '.SEARCH_TABLE.'
40  (rules, last_seen)
41  VALUES
42  (\''.serialize($search).'\', NOW() )
43;';
44pwg_query($query);
45
46$search_id = mysql_insert_id();
47
48redirect(
49  make_index_url(
50    array(
51      'section' => 'search',
52      'search'  => $search_id,
53      )
54    )
55  );
56?>
Note: See TracBrowser for help on using the repository browser.