0byt3m1n1
Path:
/
data
/
17
/
1
/
18
/
11
/
1670011
/
user
/
1801231
/
htdocs
/
marketting
/
system
/
application
/
controllers
/
[
Home
]
File: search.php
<?php if (!defined('BASEPATH')) exit('No direct script access allowed'); /* | ------------------------------------------------------------------------- | COPYRIGHT NOTICE | Copyright 2008 JROX Technologies, Inc. All Rights Reserved. | ------------------------------------------------------------------------- | This script may be only used and modified in accordance to the license | agreement attached (license.txt) except where expressly noted within | commented areas of the code body. This copyright notice and the | comments above and below must remain intact at all times. By using this | code you agree to indemnify JROX Technologies, Inc, its corporate agents | and affiliates from any liability that might arise from its use. | | Selling the code for this program without prior written consent is | expressly forbidden and in violation of Domestic and International | copyright laws. | | ------------------------------------------------------------------------- | FILENAME - search.php | ------------------------------------------------------------------------- | | This controller file is used to generate content for articles | */ class Search extends Public_Controller { function __construct() { parent::Public_Controller(); //load css body style $this->config->set_item('css_body', 'jroxSearch'); //load required models $this->load->model('init_model', 'init'); //load convert library $this->load->library('convert'); } // ------------------------------------------------------------------------ function index() { //set data array $data = $this->security_model->_load_config('public'); //initialize site with required db config $sdata = $this->init->_initialize(__CLASS__, __FUNCTION__); if ($_POST['search_term'] == 'enter search here') { if ($this->agent->referrer()) { redirect_301($this->agent->referrer(), true, false); } else { redirect(); } } elseif (empty($_POST['search_term'])) { if ($this->agent->referrer()) { redirect_301($this->agent->referrer(), true, false); } else { redirect(); } } else { switch ($this->input->post('table')) { case 'content': redirect(CONTENT_ROUTE . '/view/search/' . $this->convert->AsciiToHex(base64_encode($_POST['search_term']))); break; default: redirect(PRODUCTS_ROUTE . '/search/' . $this->convert->AsciiToHex(base64_encode($_POST['search_term']))); break; } } } } ?>