Ejemplo n.º 1
0
     if (!defined($v['alias'])) {
         define($v['alias'], $v['name']);
         //dbg($v['alias']);
     }
 }
 // Стартуем сессии - до вывода чего-либо в броузер
 session_start();
 // Stat - мало ли какие ошибки произойдут дальше, а статитистику мы сохраним
 require_once FLGR_COMMON . '/stat.php';
 //if (!defined(LOCALHOST)) {
 //	cStat::bSaveStat();
 //}
 // Cache - незачем крутить код дальше, если есть закешированные данные по этому запросу
 if (defined('CACHE_ON')) {
     include_once FLGR_COMMON . '/cache.php';
     $Cashe = new cCache($sRequest);
     $bFlagCache = false;
 }
 // Processing
 $aProcess = array();
 $bFlag404 = false;
 $nParent = 0;
 foreach ($aRequest as $nLevel => $sKey) {
     $sql = $Db->sqlGetSelect(DB_PREFIX . DB_TBL_PAGES) . $Db->sqlGetWhere(array('parent' => $nParent, 'key' => $aRequest[$nLevel], 'subversion' => 0));
     $result = $Db->queryRow($sql);
     if (empty($result)) {
         $bFlag404 = true;
         $nLevel--;
         break;
     } else {
         $nParent = $result['id'];
 /**
  * Funcion que Actualiza los Datos del Socio segun un array tipo Campo=>valor
  * @param	array	$aParam
  */
 function setUpdate($aParam)
 {
     $idpersona = $this->getCodigo();
     $sqlBody = "";
     $BodyUpdate = "";
     if (is_array($aParam) and count($aParam) >= 1) {
         foreach ($aParam as $key => $value) {
             //Buscar en el Valor el Nombre del Field
             //$pos	= stripos($value, $key);
             //Si el Valor es una Cadena y no existe el Nombre del field
             if (is_string($value)) {
                 $value = "\"" . $value . "\"";
             }
             if ($BodyUpdate == "") {
                 $BodyUpdate .= "{$key} = {$value} ";
             } else {
                 $BodyUpdate .= ", {$key} = {$value} ";
             }
         }
         //END FOREACH
         $sqlBody = "UPDATE socios_general\n\t\t\t\t\t\t\t    SET {$BodyUpdate}\n\t\t\t\t\t\t\t    WHERE\n\t\t\t\t\t\t(codigo =" . $this->mCodigo . ")";
         $x = my_query($sqlBody);
         //eliminar ID en cache
         $xCache = new cCache();
         $xCache->clean(EACP_CLAVE . ".ficha.{$idpersona}");
         $xCache->clean(EACP_CLAVE . ".ficha.{$idpersona}.ext");
         $this->init();
         $this->setCuandoSeActualiza();
         return $x["stat"];
     } else {
         return false;
     }
 }
$xLog->setWrite($messages);
$xLog->setClose();
if (ENVIAR_MAIL_LOGS == true) {
    $xLog->setSendToMail("TR.Eventos del Cierre del Sistema");
}
//Stored procedures
$ql->setRawQuery("CALL `proc_listado_de_ingresos` ");
//$ql->setRawQuery("CALL `proc_historial_de_pagos` ");
$ql->setRawQuery("CALL `sp_clonar_actividades` ");
$ql->setRawQuery("CALL `proc_perfil_egresos_por_persona` ");
$ql->setRawQuery("CALL `proc_creditos_letras_pendientes` ");
//
//Limpiar el Cache
//$xSys->setPowerOff();
//apagar el sistema
$xCache = new cCache();
$xCache->clean();
if ($parser != false) {
    $log = $aliasFil;
    $xPage = new cHPage("TR.Cierre del Dia", HP_FORM);
    $xBtn = new cHButton("iact");
    $oFRM = new cHForm("frmSubmit", "");
    $oFRM->setElementByLine(2);
    $oFRM->setTitle($xPage->getTitle() . " " . $xF->getFechaCorta());
    echo $xPage->getHeader();
    echo $xPage->setBodyinit();
    $oFRM->addHTML("<a href=\"../utils/download.php?type=txt&download={$log}&file={$log}\" target=\"_blank\" class='button'>Descargar Archivo de EVENTOS DEL SISTEMA</a><br /><br />");
    $log = getSucursal() . "-eventos-al-cierre-de-colocacion-del-dia-{$fechaop}";
    $oFRM->addHTML("<a href=\"../utils/download.php?type=txt&download={$log}&file={$log}\" target=\"_blank\" class='button'>Descargar Archivo de EVENTOS de CIERRE DE COLOCACION</a><br /><br />");
    if (MODULO_SEGUIMIENTO_ACTIVADO == true) {
        $log = getSucursal() . "-eventos-al-cierre-de-seguimiento-del-dia-{$fechaop}";
 function getAll($liTags = "")
 {
     $xL = new cLang();
     $xQl = new MQL();
     $xBtn = new cHButton();
     $ConHijos = $this->mIsMobile == false ? true : false;
     $pUSRNivel = $_SESSION["SN_d567c9b2d95fbc0a51e94d665abe9da3"];
     $menu = "";
     $this->mFilter = " AND (FIND_IN_SET('{$pUSRNivel}@rw', menu_rules)>0\tOR FIND_IN_SET('{$pUSRNivel}@ro', menu_rules)>0) ";
     $filter = $this->mFilter;
     $sql_TN1 = "SELECT * FROM general_menu WHERE menu_parent=0 {$filter} AND menu_parent = 0 ORDER BY menu_order ";
     $mmenu = null;
     $xCache = new cCache();
     $idcache = $ConHijos == true ? "menu.childs.{$pUSRNivel}" : "menu.normal.{$pUSRNivel}";
     if ($xCache->isReady() == true) {
         $mmenu = $xCache->get($idcache);
     }
     if ($mmenu == null) {
         $rs = $xQl->getDataRecord($sql_TN1);
         foreach ($rs as $rw) {
             $Clave = $rw["idgeneral_menu"];
             $xItem = new cHMenuItem($Clave, $rw);
             $mxItem = "";
             $run = true;
             if ($Clave == 4000 and MODULO_SEGUIMIENTO_ACTIVADO == false) {
                 $run = false;
             }
             if ($Clave == 5000 and MODULO_CONTABILIDAD_ACTIVADO == false) {
                 $run = false;
             }
             if ($Clave == 7000 and MODULO_AML_ACTIVADO == false) {
                 $run = false;
             }
             if ($Clave == 8000 and MODULO_CAPTACION_ACTIVADO == false) {
                 $run = false;
             }
             if ($run == true) {
                 if ($ConHijos == true) {
                     $mxItem = $this->getItems($Clave);
                     $mxItem = trim($mxItem) == "" ? "" : "<ul>" . $mxItem . "</ul>";
                 }
                 $menu .= $xItem->getLi($this->mIncImages, $mxItem, $liTags);
             }
         }
         $mmenu = "<ul id=\"" . $this->mID . "\">" . $menu . "</ul>";
     }
     return $mmenu;
 }
function jsaActualizarIdioma($fecha)
{
    $xSys = new cSystemPatch();
    $msgs = $xSys->patch(true, false, true);
    $xCache = new cCache();
    $xCache->clean();
    return $msgs;
}
 function OCache($key, $value = null)
 {
     $res = null;
     $key = trim($key);
     if ($key != "") {
         $key = $this->mCurrLang . ".{$key}";
         $xCache = new cCache();
         if ($xCache->isReady() == true) {
             if ($value == null) {
                 $res = $xCache->get($key);
             } else {
                 $xCache->set($key, $value);
             }
         }
     }
     return $res;
 }