Minor fixes

This commit is contained in:
Sergei Solovev 2023-12-08 00:08:49 +03:00
parent f33a541084
commit dde462b43e
14 changed files with 32 additions and 32 deletions

View file

@ -58,7 +58,7 @@ if ($go) {
foreach ($aPacks as $packs)
$spacks .= trim($packs) . ':';
$spacks = isset($spacks{0}) ? substr($spacks, 0, -1) : '';
$spacks = isset($spacks[0]) ? substr($spacks, 0, -1) : '';
$aData['packs'] = $spacks == '' ? 'all' : $spacks;
@ -75,7 +75,7 @@ if ($go) {
$incoms .= intval($incom) . ':';
}
$incoms = isset($incoms{0}) ? substr($incoms, 0, -1) : '';
$incoms = isset($incoms[0]) ? substr($incoms, 0, -1) : '';
$aData['incompatible'] = $incoms;
@ -98,7 +98,7 @@ if ($go) {
$choice .= ' ';
}
$choice = isset($choice{0}) ? substr(trim($choice), 0, -1) : '';
$choice = isset($choice[0]) ? substr(trim($choice), 0, -1) : '';
$aData['choice'] = $choice;
@ -115,7 +115,7 @@ if ($go) {
$requis .= intval($requi) . ':';
}
$requis = isset($requis{0}) ? substr($requis, 0, -1) : '';
$requis = isset($requis[0]) ? substr($requis, 0, -1) : '';
$aData['required'] = $requis;

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -27,7 +27,7 @@ if (substr($text, 0, 5) == 'game=') {
if (in_array($game, array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc')))
$plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `game`="' . $game . '" ORDER BY `id` ASC');
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$plugins = $sql->query('SELECT `id`, `cat`, `game`, `name`, `status` FROM `plugins` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -61,7 +61,7 @@ if ($go) {
$spacks .= intval($packs) . ':';
}
$spacks = isset($spacks{0}) ? substr($spacks, 0, -1) : '';
$spacks = isset($spacks[0]) ? substr($spacks, 0, -1) : '';
$aData['packs'] = $spacks == '' ? $spacks : 'all';
@ -78,7 +78,7 @@ if ($go) {
$incoms .= intval($incom) . ':';
}
$incoms = isset($incoms{0}) ? substr($incoms, 0, -1) : '';
$incoms = isset($incoms[0]) ? substr($incoms, 0, -1) : '';
$aData['incompatible'] = $incoms;
@ -101,7 +101,7 @@ if ($go) {
$choice .= ' ';
}
$choice = isset($choice{0}) ? substr(trim($choice), 0, -1) : '';
$choice = isset($choice[0]) ? substr(trim($choice), 0, -1) : '';
$aData['choice'] = $choice;
@ -118,7 +118,7 @@ if ($go) {
$requis .= intval($requi) . ':';
}
$requis = isset($requis{0}) ? substr($requis, 0, -1) : '';
$requis = isset($requis[0]) ? substr($requis, 0, -1) : '';
$aData['required'] = $requis;

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -35,7 +35,7 @@ if (in_array($check[0], array('server', 'user'))) {
case 'user':
$sql->query('SELECT * FROM `boost` WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
}
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$sql->query('SELECT * FROM `boost` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -46,7 +46,7 @@ if (in_array($check[0], array('limit', 'price', 'user', 'status'))) {
if (in_array($val, array('working', 'error', 'reboot', 'overdue', 'blocked', 'install')))
$ctrls = $sql->query('SELECT ' . $select . ' `status`="' . $val . '" ORDER BY `id` ASC');
}
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$ctrls = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -37,7 +37,7 @@ if (in_array($check[0], array('server', 'user'))) {
case 'user':
$sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
}
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$sql->query('SELECT `id`, `user`, `text`, `date`, `type`, `money` FROM `logs` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -37,7 +37,7 @@ if (in_array($check[0], array('server', 'user'))) {
case 'user':
$sql->query('SELECT ' . $select . ' WHERE `user`="' . sys::int($val) . '" ORDER BY `id` DESC');
}
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$sql->query('SELECT ' . $select . ' WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,14 +15,14 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
sys::outjs(array('e' => ''));
}
if ($text{0} == 'i' and $text{1} == 'd')
if ($text[0] == 'i' and $text[1] == 'd')
$sql->query('SELECT `id`, `name`, `tags`, `views`, `date` FROM `news` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,14 +15,14 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
sys::outjs(array('e' => ''));
}
if ($text{0} == 'i' and $text{1} == 'd')
if ($text[0] == 'i' and $text[1] == 'd')
$notices = $sql->query('SELECT `id`, `unit`, `server`, `text`, `time` FROM `notice` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,14 +15,14 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
sys::outjs(array('e' => ''));
}
if ($text{0} == 'i' and $text{1} == 'd')
if ($text[0] == 'i' and $text[1] == 'd')
$promos = $sql->query('SELECT `id`, `cod`, `value`, `discount`, `use`, `extend`, `tarif`, `time` FROM `promo` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -63,7 +63,7 @@ if (in_array($check[0], array('game', 'unit', 'core', 'tarif', 'user', 'status',
$servers = $sql->query('SELECT ' . $select . ' `slots`="' . sys::int($val) . '" ORDER BY `id` ASC');
break;
}
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$servers = $sql->query('SELECT ' . $select . ' `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,14 +15,14 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
sys::outjs(array('e' => ''));
}
if ($text{0} == 'i' and $text{1} == 'd')
if ($text[0] == 'i' and $text[1] == 'd')
$sql->query('SELECT `id`, `login`, `mail`, `balance`, `group` FROM `users` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,7 +15,7 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
@ -27,7 +27,7 @@ if (substr($text, 0, 5) == 'game=') {
if (in_array($game, array('cs', 'cssold', 'css', 'csgo', 'samp', 'crmp', 'mta', 'mc')))
$webs = $sql->query('SELECT `id`, `type`, `server`, `user`, `unit`, `domain`, `passwd`, `login`, `date` FROM `web` WHERE `game`="' . $game . '" ORDER BY `id` ASC');
} elseif ($text{0} == 'i' and $text{1} == 'd')
} elseif ($text[0] == 'i' and $text[1] == 'd')
$webs = $sql->query('SELECT `id`, `type`, `server`, `user`, `unit`, `domain`, `passwd`, `login`, `date` FROM `web` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'

View file

@ -15,14 +15,14 @@ if (is_array($cache)) {
sys::outjs($cache);
}
if (!isset($text{2})) {
if (!isset($text[2])) {
if ($go)
sys::outjs(array('e' => 'Для выполнения поиска, необходимо больше данных'), $nmch);
sys::outjs(array('e' => ''));
}
if ($text{0} == 'i' and $text{1} == 'd')
if ($text[0] == 'i' and $text[1] == 'd')
$wikis = $sql->query('SELECT `id`, `name`, `cat`, `date` FROM `wiki` WHERE `id`="' . sys::int($text) . '" LIMIT 1');
else {
$like = '`id` LIKE FROM_BASE64(\'' . base64_encode('%' . str_replace('_', '\_', $text) . '%') . '\') OR'