예제 #1
0
$bg_color = "#000008";
if (array_key_exists('bg', $_GET)) {
    $bg_color = $_GET['bg'];
}
$background = new color();
$background->set_name($bg_color);
if (!$background->get_hex()) {
    $background->set_hex($bg_color);
}
$fg_color = "#FFFFFF";
if (array_key_exists('fg', $_GET)) {
    $fg_color = $_GET['fg'];
}
$foreground = new color();
$foreground->set_name($fg_color);
if (!$foreground->get_hex()) {
    $foreground->set_hex($fg_color);
}
$img_w = 0;
$img_h = 0;
$error_flag = False;
$ini_array = parse_ini_file("../config.ini");
$dbhost = $ini_array['host'];
$dbuser = $ini_array['user'];
$dbpass = $ini_array['pass'];
$dbname = $ini_array['dbname'];
$mysqli = new mysqli($dbhost, $dbuser, $dbpass, $dbname);
unset($ini_array, $dbhost, $dbuser, $dbpass, $dbname);
if (!$mysqli) {
    $logger->error("MAIL - Cannot connect to DB");
    $error_flag = True;