Файл: Update 2.1.2/admin/requests/loadCurrencies.php
Строк: 37
<?php
ob_start();
session_start();
error_reporting(0);
include("../../includes/config.php");
$db = new mysqli($CONF['host'], $CONF['user'], $CONF['pass'], $CONF['name']);
if ($db->connect_errno) {
echo "Failed to connect to MySQL: (" . $db->connect_errno . ") " . $db->connect_error;
}
$db->set_charset("utf8");
$settingsQuery = $db->query("SELECT * FROM settings ORDER BY id DESC LIMIT 1");
$settings = $settingsQuery->fetch_assoc();
include("../../includes/functions.php");
$value = protect($_GET['value']);
$query = $db->query("SELECT * FROM currencies WHERE currency_from='$value'");
if($query->num_rows>0) {
while($row = $query->fetch_assoc()) {
if (strpos($list,$row['currency_to']) !== false) { } else {
echo '<option value="'.$row[currency_to].'">'.$row[currency_to].'</option>';
}
$list .= $row['currency_to'].",";
}
} else {
echo '<option value="">NaN</option>';
}
?>