Esempio n. 1
0
<?php

namespace Atento\Quantum\app;

$a = new Quantum();
$a->get_settings();
class Quantum
{
    var $propertiesApp;
    public $configDefault = array('pathPrimary' => '/Quantum', 'pathConfig' => '/config', 'pathTheme' => '/vendor/themes', 'pathjQuery' => '/vendor/jquery', 'pathJsFramework' => '/app/framework', 'pathAppClient' => '/app/client', 'pathAlerts' => '/app/alerts', 'API' => array('url' => 'http://localhost:6969'));
    public $errorMessage = array('get_settings' => 'No se encontro el archivo de configuraciones', 'token' => 'El token no es valido');
    public function get_settings()
    {
        $pathFileConfig = $this->get_path_app() . $this->configDefault['pathConfig'] . '/conf.ini';
        $fileConfig = file_exists($pathFileConfig);
        if ($fileConfig) {
            return parse_ini_file($pathFileConfig, true);
        } else {
            $this->error_app(__FUNCTION__, __LINE__);
            exit;
        }
    }
    public function get_theme($theme = 'iPach')
    {
        include $this->get_path_app() . $this->configDefault['pathTheme'] . '/' . $theme . '/index.php';
    }
    public function get_queues($queues, $class = false, $properties)
    {
        $listQueues = '<ul ' . ($class ? 'class="' . $class . '"' : '') . '>';
        foreach ($queues as $key => $value) {
            $listQueues .= '<li><a href="#" id="q_' . $value['_id'] . '" data-role="q_queue" class="ip-primary-text-color">' . ($properties['icon'] ? '<i class="' . $value['icon'] . '"></i>' : '') . $value['name'] . '</a>' . ($properties['caption'] ? '<label>' . $value['caption'] . '</label>' : '') . '</li>';
Esempio n. 2
0
<?php

require_once "../quantum/quantum.php";
$quantum = new Quantum();
$quantum->autoConfig();
$quantum->boot();