mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 21:34:11 -07:00
disable old php api
This commit is contained in:
parent
08513755b2
commit
93e9fe9f99
137 changed files with 137 additions and 9738 deletions
|
@ -1,33 +1 @@
|
|||
<?php
|
||||
// Init
|
||||
error_reporting(NULL);
|
||||
$TAB = 'SEARCH';
|
||||
|
||||
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
|
||||
|
||||
// Main include
|
||||
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
|
||||
|
||||
// Check query
|
||||
$q = $_GET['q'];
|
||||
if (empty($q)) {
|
||||
$back=getenv("HTTP_REFERER");
|
||||
if (!empty($back)) {
|
||||
header("Location: ".$back);
|
||||
exit;
|
||||
}
|
||||
header("Location: /");
|
||||
exit;
|
||||
}
|
||||
|
||||
// Data
|
||||
$q = escapeshellarg($q);
|
||||
$command = $_SESSION['user'] == 'admin'
|
||||
? "v-search-object $q json"
|
||||
: "v-search-user-object $user $q json";
|
||||
|
||||
exec (VESTA_CMD . $command, $output, $return_var);
|
||||
$data = json_decode(implode('', $output), true);
|
||||
|
||||
// Render page
|
||||
render_page($user, $TAB, 'list_search');
|
||||
<?php include($_SERVER['DOCUMENT_ROOT'].'/static/index.html'); ?>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue