Esempio n. 1
0
function set_venue_data_from_POST()
{
    F3::set('name', F3::scrub($_POST['name']));
    F3::set('address', F3::scrub($_POST['address']));
    F3::set('postcode', F3::scrub($_POST['postcode']));
    F3::set('info', F3::scrub($_POST['info']));
}
Esempio n. 2
0
 public function get()
 {
     if ($this->flag['search']) {
         if (isset($_GET['q']) && $_GET['q'] != '') {
             // Fetch Search Query
             $query = F3::scrub($_GET['q']);
             $search = new SearchModel();
             // Fetch Search Results
             if ($this->results = $search->items($query)) {
                 // Reroute if one match
                 if (count($this->results) == 1 && $this->redirect) {
                     F3::reroute('/loot/' . $this->results[0]['urlname']);
                 }
                 $this->title = "Search: \"" . $query . "\" - Diablo 2 Database";
                 $this->heading = "Search: \"" . $query . "\"";
                 F3::set('NOTIFY.success', "Rejoice! " . count($this->results) . " matches found!");
                 $this->render('search.php');
             } else {
                 $this->heading = "Search: \"" . $query . "\"";
                 F3::set('NOTIFY.warning', "Nothing found in the database. Try the <a href=/loot/>Loot Directory</a>.");
                 $this->render('blank.php');
             }
         } else {
             F3::reroute('/');
         }
     } else {
         F3::set('NOTIFY.warning', "Search is temporarily disabled. Please try again later.");
         $this->render('blank.php');
     }
 }