smart test
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
All checks were successful
Build and push / Pulling repo on server (push) Successful in 3s
This commit is contained in:
33
web/pages/smart/controller.php
Normal file
33
web/pages/smart/controller.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
|
||||
class Smart extends Page {
|
||||
function setMenu()
|
||||
{
|
||||
$this->menu_text = 'Smart';
|
||||
$this->menu_image = 'fas fa-robot';
|
||||
$this->menu_priority = 1;
|
||||
}
|
||||
|
||||
function index()
|
||||
{
|
||||
$this->set('template', "smart.html.php");
|
||||
}
|
||||
|
||||
function search()
|
||||
{
|
||||
$db = new SQLite3(ROOT.DS.'../crawler/data.db');
|
||||
$q = $_REQUEST['q'];
|
||||
$res = $db->query("SELECT * FROM results WHERE teilnehmer LIKE '$q'");
|
||||
$results = [];
|
||||
while($row = $res->fetchArray())
|
||||
{
|
||||
$results[] = $row;
|
||||
}
|
||||
|
||||
$this->set('results', $results);
|
||||
$this->set('template', 'search.html.php');
|
||||
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user