File: /var/www/vhosts/creativefellows.nl/mygeomil.creativefellows.nl/v0.1/config/settings.php
<?php
// Error reporting for production
//setlocale(LC_ALL, 'nl_NL');
function d($str)
{
echo "<pre>";
print_r($str);
echo "</pre>";
}
// Timezone
date_default_timezone_set('Europe/Amsterdam');
// Settings
$settings = [];
$settings['root'] = dirname(__DIR__);
$settings['temp'] = $settings['root'] . '/tmp';
$settings['public'] = $settings['root'] . '/public';
$settings['upload_dir'] = $settings['root'] . '/public/content/';
$settings['template_path'] = $settings['root'] . '/views/';
$settings['resources'] = $settings['root'] . '/resources/';
$settings['domain_name'] = '/';
$settings['domain_path'] = 'http://portal.test:8888/';
$settings["pagination"] = 15;
$settings['email_from'] = [
"email"=> "order@geomil.com",
"name" => "Geomil Equipment"
];
$settings["fields"] = [
"cart" =>[
"action" => "order.post",
"fields" => [
"shipping" => ["id" => "shipping", "label" => "Shipping", "type" => "radio", "options" => [0 => ["value" => "Ex-works"], 1 => ["value" => "Regular"],2 => ["value" => "Urgent"]], "size" => "small-12"],
"shipping_type" => ["id" => "shipping_type", "label" => "When applicable", "type" => "checkbox", "options" => [0 => ["value" => "Airfreight"], 1 => ["value" => "Seafreight"],], "size" => "small-12"],
//"delivery" => ["id" => "delivery", "label" => "Delivery Address", "type" => "address","value" => 0, "size" => "small-12", "required" => false, "custom" => null],
"delivery" => ["id" => "delivery", "label" => "Delivery Address", "type" => "text", "value" => 0, "size" => "small-12", "required" => false, "custom" => null],
"reference" => ["id" => "reference", "label" => "Your order reference", "type" => "input", "size" => "small-12", "required" => false],
"additional" => ["id" => "additional", "label" => "Additional Requests","type" => "text", "size" => "small-12", "required" => false],
"complete" => ["id" => "complete", "label" => "Complete request", "type" => "button", "class" => "expanded", "size" => "small-12", "required" => false],
],
],
"service" =>[
"action" => "order.post",
"fields" => [
"header_form" => ["id" => "header", "label" => "New Service Request", "type" => "group", "size" => "small-12", "required" => false],
"subject" => ["id" => "subject", "label" => "Subject", "type" => "input", "size" => "small-12", "required" => false],
"priority" => ["id" => "priority", "label" => "Priority", "type" => "select", "options" => [0 => "Low", 1 => "Medium", 2 => "High"], "size" => "small-12 medium-6"],
"date" => ["id" => "date", "label" => "Date of Service", "type" => "date", "size" => "small-12", "required" => false],
"additional" => ["id" => "additional", "label" => "Additional information","type" => "text", "size" => "small-12", "required" => false],
"header_location" => ["id" => "header_location", "label" => "Contact at location", "type" => "group", "size" => "small-12", "required" => false],
"location_contact" => ["id" => "location_contact", "label" => "Name", "type" => "input", "size" => "small-12", "required" => false],
"location_phone" => ["id" => "location_phone", "label" => "Phone number", "type" => "input", "size" => "small-12", "required" => false],
"location_email" => ["id" => "location_email", "label" => "E-mail", "type" => "input", "size" => "small-12", "required" => false],
"complete" => ["id" => "complete", "label" => "Submit", "type" => "post", "class" => "expanded", "size" => "small-12", "required" => false],
],
]
];
// Error Handling Middleware settings
$settings['error'] = [
'display_error_details' => true,
'log_errors' => true,
'log_error_details' => true,
];
// default labels
$settings["labels"] = [
"logo" => '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 121.75 37.75"><defs><style>.b{fill:#006fba}.c{fill:#231f20}</style></defs><path fill="#ffcc00" d="M0 23.79h26.91v13.83H0z"/><path class="b" d="M68.69 21.24h-12.2C53 21.24 52 19.78 52 16.53v-6.17c0-3.25 1-4.71 4.52-4.71h12.2c3.52 0 4.51 1.46 4.51 4.71v6.17c-.03 3.25-1.02 4.71-4.54 4.71zm1-11.28c0-.89-.27-1.26-1.2-1.26H56.62c-.86 0-1.13.37-1.13 1.26v7c0 .89.27 1.26 1.13 1.26h11.87c.93 0 1.2-.37 1.2-1.26zM101.74 21.24V9.83c0-.93-.29-1.13-1-1.13h-8.45v12.54h-3.52V8.7h-9.85v12.54h-3.51V5.65h26c2.45 0 3.84 1.19 3.84 4.11v11.48zM108 21.24V5.65h3.51v15.59zm0-17.78V0h3.38v3.46zM118.72 21.26c-2.48 0-4.64-1-4.64-4.88V0h3.52v16.94c0 1 .16 1.27 1.56 1.27h2.26v3.05zM50 15.14v-4.78c0-3.42-.8-4.71-4.51-4.71H33.61c-3.71 0-4.51 1.46-4.51 4.71v6.17c0 3.28 1 4.71 4.51 4.71h12c2.85 0 4-1 4.39-3H34.41c-1.26 0-1.79-.47-1.79-1.59v-1.51zM32.62 10c0-.89.26-1.26 1.12-1.26h11.85c.86 0 1.12.37 1.12 1.26v2.12H32.62zM5 3.06h22C26.61 1 25.42 0 22.57 0h-18C1.25 0 .06 2.1.06 4.72v11.81c0 2.88 1.49 4.71 4.51 4.71h18c2.85 0 4.39-.95 4.39-3V8.53H15.17v3.38h8.45v6.27H5.33c-1.26 0-1.79-.47-1.79-1.59v-12A1.51 1.51 0 0 1 5 3.06z"/><path class="c" d="M31.43 34.08c-1.53 0-2-.63-2-2v-2.73c0-1.42.34-2.05 2-2.05h5.18c1.61 0 2 .56 2 2.05v2.07H31v.64c0 .49.23.69.78.69h6.79c-.15.92-.67 1.33-1.91 1.33zm5.7-4.91c0-.39-.12-.55-.49-.55h-5.15c-.38 0-.49.16-.49.55v.93h6.13zM48.27 36.64v-2.56h-5.45A1.89 1.89 0 0 1 40.68 32v-2.6a1.88 1.88 0 0 1 2.14-2.1h7v9.34zm0-8h-5.58c-.33 0-.48.15-.48.52v3.09c0 .37.15.52.48.52h5.58zM54.36 34.08c-1.6 0-2.26-1-2.26-2.47V27.3h1.53v4.89c0 .41.14.56.56.56h5.55V27.3h1.53v6.78zM63.66 34.08V27.3h1.53v6.78zm0-7.73v-1.5h1.47v1.5zM74.56 34.08h-5.45v2.56h-1.53V27.3h7a1.88 1.88 0 0 1 2.14 2.1V32a1.89 1.89 0 0 1-2.16 2.08zm.61-4.94c0-.37-.15-.52-.48-.52h-5.58v4.13h5.58c.33 0 .48-.15.48-.52zM90.45 34.08v-5c0-.4-.13-.49-.42-.49h-3.69v5.46h-1.53v-5.43h-4.28v5.46H79V27.3h11.32c1.06 0 1.67.52 1.67 1.79v5zM113.23 34.08v-5c0-.34-.06-.49-.42-.49h-5.68v5.46h-1.53V27.3h7.4c1.17 0 1.72.5 1.72 1.81v5zM119.17 34.08c-1.08 0-2-.44-2-2.12v-6.13h1.53v1.47h2.56v1.32h-2.56v3.58c0 .43.07.55.68.55h2.07v1.33zM96.25 34.08c-1.53 0-2-.63-2-2v-2.73c0-1.42.35-2.05 2-2.05h5.18c1.61 0 2 .56 2 2.05v2.07h-7.61v.64c0 .49.23.69.78.69h6.79c-.15.92-.67 1.33-1.91 1.33zm5.7-4.91c0-.39-.12-.55-.49-.55h-5.15c-.38 0-.49.16-.49.55v.93H102z"/></svg>',
"404" => [
"title" => "Helaas, de pagina kan niet worden gevonden",
"description" => "Mogelijk bestaat de pagina niet meer of is de URL onjuist"
]
];
$settings['logger'] = [
'name' => 'app',
'path' => $settings['root'] . '/logs',
'filename' => 'app.log',
'level' => \Monolog\Logger::DEBUG,
'file_permission' => 0775,
];
$settings['db'] = [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'Fellows_my_geomil',
'username' => 'Fellows_mygeo_usr',
'password' => 'kP8fv1@9',
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'flags' => [
// Turn off persistent connections
PDO::ATTR_PERSISTENT => false,
// Enable exceptions
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
// Emulate prepared statements
PDO::ATTR_EMULATE_PREPARES => true,
// Set default fetch mode to array
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
// Set character set
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci'
],
];
return $settings;