예제 #1
0
 public function __construct()
 {
     settype($this->catId, 'integer');
     settype($this->subcatId, 'integer');
     settype($this->showAll, 'bool');
     $this->config = Initialize::obtain()->config;
     $this->mainBlocks = new MainBlocks();
 }
예제 #2
0
 public function __construct()
 {
     $this->config = Initialize::obtain()->config;
     if ($_SERVER['SERVER_ADDR'] == '127.0.0.1') {
         $this->path = $this->config['localCorePath'];
     } else {
         $this->path = ROOT . 'admin/';
     }
 }
예제 #3
0
function lang($keyword, $esDinamico = false, $divisor = '[div]')
{
    global $lang;
    if (!trim($keyword)) {
        return;
    }
    $keyword = utf8_strtolower($keyword);
    $config = Initialize::obtain()->config;
    // TEXTOS ESTATICOS ////////////////////////////////////////////////////////////
    if ($esDinamico === false) {
        $exist = false;
        // SI NO EXISTE EN EL ARRAY LANG, AGREGA A LA DB
        if (!isset($lang[$keyword])) {
            // VERIFY IF EXIST KEYWORD IN DB
            if ($config['siteUseDb']) {
                $exist = c("select keyword from static_lang_keys where keyword = '" . $keyword . "' and lang = '" . $_SESSION['lang'] . "' ");
            }
            // IF NOT EXIST, ADD TO DB
            if (!$exist) {
                if ($config['siteUseDb']) {
                    sq("insert into static_lang_keys set dateLastUpdate = NOW(), dateInsert=NOW(), keyword = '" . $keyword . "', lang = '" . $_SESSION['lang'] . "', keyvalue = '" . $keyword . "' ");
                }
            }
            return utf8_ucfirst($keyword);
        } else {
            return utf8_ucfirst($lang[$keyword]);
        }
    }
    // TEXTOS DINAMICOS ////////////////////////////////////////////////////////////////
    if ($esDinamico === true) {
        $keyOfSelectedLang = array_search($_SESSION['lang'], $config['lang']);
        $keyword = explode($divisor, $keyword);
        // SI EXISTE, DEVUELVE VALOR
        if (isset($keyword[$keyOfSelectedLang])) {
            return $keyword[$keyOfSelectedLang];
        } else {
            return $keyword[0];
        }
    }
}
예제 #4
0
 public function __construct()
 {
     $this->config = Initialize::obtain()->config;
 }
 public function __construct($container_options, $mail_options)
 {
     $this->config = Initialize::obtain()->config;
     $this->container_options = $container_options;
     $this->mail_options = $mail_options;
     $this->Mail_Queue = new Mail_Queue($container_options, $mail_options);
     $this->ErrorManager = new ErrorManager();
 }
예제 #6
0
<?php

require_once '_init.php';
define('ID', sprintf('%d', $_POST['id']));
$media = a("SELECT item_id, nombre, tipo, tabla FROM files WHERE id=" . ID);
// SI SE ENCONTRO LA ENTRADA EN LA TABLA FILES CON EL ID DATO
if ($media) {
    define('TABLA', $_POST['tabla']);
    define('DELETEPATH', $_SERVER['DOCUMENT_ROOT'] . ROOT . 'admin/uploads/' . TABLA . '/');
    // GET FILES OF SAME ITEM ID FOR ENABLE / DISABLE FILE FIELD
    $cantOfFilesInSameItemId = c("SELECT id from files WHERE item_id = " . $media['item_id'] . " AND tipo = '" . $media['tipo'] . "' AND tabla = '" . $media['tabla'] . "'");
    $config = Initialize::obtain()->config;
    // AUDIOS
    if ($media['tipo'] == 'audios') {
        if ($config['convertAudio']) {
            $file = substr(trim($media['nombre']), 0, strlen(trim($media['nombre'])) - 4) . '-converted.mp3';
            $file = DELETEPATH . $file;
        } else {
            $file = DELETEPATH . $media['nombre'];
        }
    } elseif ($media['tipo'] == 'videos') {
        if ($config['convertVideo']) {
            $file = substr(trim($media['nombre']), 0, strlen(trim($media['nombre'])) - 4) . '-converted.flv';
            $file = DELETEPATH . $file;
            $preview = substr(trim($media['nombre']), 0, strlen(trim($media['nombre'])) - 4) . '-converted.flv1.jpg';
            $preview = DELETEPATH . $preview;
        } else {
            $file = DELETEPATH . $media['nombre'];
            $preview = DELETEPATH . $media['fuente'];
        }
    } else {
예제 #7
0
        $path = $_SERVER['HOME'] . '/public_html' . $config['root'] . $config['subdomainForCron'] . 'admin/';
        define('CRON', true);
    }
}
define('PATH', $path);
if ($config['siteUseDb']) {
    // INCLUDE DB CLASS
    require_once PATH . 'classes/class.Database.php';
    // CONECT TO DB
    $db = Database::obtain($config['db_server'], $config['db_user'], $config['db_pass'], $config['db_name']);
    $db->connect();
}
// INCLUE INIT CLASS
require_once PATH . 'classes/class.Initialize.php';
// INIT ADMIN
$init = Initialize::obtain($config, PATH);
$lang = $init->getLangArray();
// INCLUDES
if ($config['siteUseDb']) {
    require_once 'include.DbFunctions.php';
}
require_once 'include.Format.php';
require_once 'include.Files.php';
// CLASSES
require_once PATH . 'classes/class.ForeachContenidosListados.php';
require_once PATH . 'classes/class.FormInputs.php';
require_once PATH . 'classes/class.ImageResize.php';
require_once PATH . 'classes/class.ShowMedia.php';
require_once PATH . 'classes/class.EmailSender.php';
require_once PATH . 'classes/class.Upload.php';
require_once PATH . 'classes/class.Loop.php';