Exemple #1
0
 function getSectorEmpresas(Request $request, Response $response)
 {
     $response = $response->withHeader('Content-type', 'application/json');
     $data = Parametros::select("*")->first();
     $km = $data["diametro_busqueda"];
     $idSector = $request->getAttribute("id");
     $lat = $request->getAttribute("latitud");
     $lng = $request->getAttribute("longitud");
     $query = "SELECT " . "(6371 * ACOS( SIN(RADIANS(su.latitud)) * SIN(RADIANS({$lat})) + COS(RADIANS(su.longitud - {$lng})) * " . "COS(RADIANS(su.latitud)) * COS(RADIANS({$lat})))) AS distancia, " . "em.id, " . "em.nit, " . "em.razonSocial, " . "em.logo, " . "'' as servicios " . "FROM sucursal su " . "INNER JOIN " . "empresa em ON (em.id = su.idEmpresa) " . "INNER JOIN " . "sectorempresa secemp ON (secemp.idEmpresa = em.id && secemp.idSector =  {$idSector}) " . "WHERE su.Estado = 'ACTIVO' AND em.estado = 'ACTIVO' " . "HAVING distancia < {$km} ORDER BY distancia ASC";
     $data = DB::select(DB::raw($query));
     for ($i = 0; $i < count($data); $i++) {
         $val = "";
         $ser = Servicio::select("nombre")->where("idEmpresa", "=", $data[$i]->id)->get();
         $tam = count($ser);
         for ($j = 0; $j < $tam; $j++) {
             $val .= $ser[$j]->nombre;
             if ($j + 1 < $tam) {
                 $val .= ",";
             }
         }
         $data[$i]->servicios = $val;
     }
     $response->getBody()->write(json_encode($data));
     return $response;
 }
 public function indexAction()
 {
     $this->assets->addCss('/jqwidgets/styles/jqx.base.css')->addCss('/jqwidgets/styles/jqx.custom.css');
     $this->assets->addJs('/jqwidgets/jqxcore.js')->addJs('/jqwidgets/jqxmenu.js')->addJs('/jqwidgets/jqxdropdownlist.js')->addJs('/jqwidgets/jqxlistbox.js')->addJs('/jqwidgets/jqxcheckbox.js')->addJs('/jqwidgets/jqxscrollbar.js')->addJs('/jqwidgets/jqxgrid.js')->addJs('/jqwidgets/jqxdata.js')->addJs('/jqwidgets/jqxgrid.sort.js')->addJs('/jqwidgets/jqxgrid.pager.js')->addJs('/jqwidgets/jqxgrid.filter.js')->addJs('/jqwidgets/jqxgrid.selection.js')->addJs('/jqwidgets/jqxgrid.grouping.js')->addJs('/jqwidgets/jqxgrid.columnsreorder.js')->addJs('/jqwidgets/jqxgrid.columnsresize.js')->addJs('/jqwidgets/jqxdatetimeinput.js')->addJs('/jqwidgets/jqxcalendar.js')->addJs('/jqwidgets/jqxbuttons.js')->addJs('/jqwidgets/jqxdata.export.js')->addJs('/jqwidgets/jqxgrid.export.js')->addJs('/jqwidgets/globalization/globalize.js')->addJs('/jqwidgets/jqxgrid.aggregates.js')->addJs('/media/plugins/bootbox/bootbox.min.js')->addJs('/scripts/parametroschecklists/index.js');
     $tipo_empresa = $this->tag->select(array('tipo_empresa', Parametros::find(array('baja_logica=1 and parametro="checklist_tipoempresas" ', 'order' => 'nivel ASC')), 'using' => array('nivel', 'valor_1'), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'required' => 'required', 'class' => 'form-control'));
     $this->view->setVar('tipo_empresa', $tipo_empresa);
     $si_no_array = array("1" => "SI", "0" => "NO");
     $obligatorio = $this->tag->selectStatic(array("obligatorio", $si_no_array, 'useEmpty' => false, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control'));
     $this->view->setVar('obligatorio', $obligatorio);
     $escaner = $this->tag->selectStatic(array("escaner", $si_no_array, 'useEmpty' => false, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control'));
     $this->view->setVar('escaner', $escaner);
 }
Exemple #3
0
 /**
 * Método para crear/modificar un objeto de base de datos
    // return $this->find("columns: $columns", "join: $join", "conditions: $conditions", "group: $group", "order: $order");
 * 
 * @param string $medthod: create, update
 * @param array $data: Data para autocargar el modelo
 * @param array $optData: Data adicional para autocargar
 * 
 * return object ActiveRecord
 */
 public static function setParametros($method, $data, $optData = null)
 {
     $obj = new Parametros($data);
     //Se carga los datos con los de las tablas
     if ($optData) {
         //Se carga información adicional al objeto
         $obj->dump_result_self($optData);
     }
     //Verifico que no exista otro parametros, y si se encuentra inactivo lo active
     // $conditions = empty($obj->id) ? "parametros = '$obj->parametros'" : "parametros = '$obj->parametros' AND id != '$obj->id'";
     // $old = new parametros();
     // if($old->find_first($conditions)) {
     //Si existe y se intenta crear pero si no se encuentra activo lo activa
     // if($method=='create' && $old->estado != parametros::ACTIVO) {
     // $obj->id        = $old->id;
     // $obj->estado    = parametros::ACTIVO;
     // $method         = 'update';
     // } else {
     // Flash::info('Ya existe un parametros registrado bajo ese nombre.');
     // return FALSE;
     // }
     return $obj->{$method}() ? $obj : FALSE;
 }
 public function indexAction()
 {
     $this->assets->addCss('/jqwidgets/styles/jqx.base.css')->addCss('/jqwidgets/styles/jqx.custom.css')->addCss('/assets/css/plugins.css');
     $this->assets->addJs('/jqwidgets/jqxcore.js')->addJs('/jqwidgets/jqxmenu.js')->addJs('/jqwidgets/jqxdropdownlist.js')->addJs('/jqwidgets/jqxlistbox.js')->addJs('/jqwidgets/jqxcheckbox.js')->addJs('/jqwidgets/jqxscrollbar.js')->addJs('/jqwidgets/jqxgrid.js')->addJs('/jqwidgets/jqxdata.js')->addJs('/jqwidgets/jqxgrid.sort.js')->addJs('/jqwidgets/jqxgrid.pager.js')->addJs('/jqwidgets/jqxgrid.filter.js')->addJs('/jqwidgets/jqxgrid.selection.js')->addJs('/jqwidgets/jqxgrid.grouping.js')->addJs('/jqwidgets/jqxgrid.columnsreorder.js')->addJs('/jqwidgets/jqxgrid.columnsresize.js')->addJs('/jqwidgets/jqxdatetimeinput.js')->addJs('/jqwidgets/jqxcalendar.js')->addJs('/jqwidgets/jqxbuttons.js')->addJs('/jqwidgets/jqxdata.export.js')->addJs('/jqwidgets/jqxgrid.export.js')->addJs('/jqwidgets/globalization/globalize.js')->addJs('/jqwidgets/jqxgrid.aggregates.js')->addJs('/media/plugins/bootbox/bootbox.min.js')->addJs('/jqwidgets/jqxtooltip.js')->addJs('/assets/js/app.js')->addJs('/assets/js/plugins.js')->addJs('/scripts/solicitudes/index.js');
     $model = new Usuarios();
     $resul = $model->responsablecomercial();
     $responsable = $this->tag->select(array('responsable_id', $resul, 'using' => array('id', 'nombres'), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required'));
     $this->view->setVar('responsable', $responsable);
     $resul = Clientes::find(array('baja_logica=1', 'order' => 'razon_social ASC'));
     $clientes = $this->tag->select(array('cliente_id', $resul, 'using' => array('id', 'razon_social'), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control select-chosen', 'required' => 'required'));
     $this->view->setVar('clientes', $clientes);
     $resul = Parametros::find(array('parametro="solicitudes_estados" AND baja_logica=1 AND nivel>1', 'order' => 'nivel ASC'));
     $estado = $this->tag->select(array('estado', $resul, 'using' => array('nivel', 'valor_1'), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required'));
     $this->view->setVar('estado', $estado);
 }
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Parametros the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Parametros::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Exemple #6
0
<?php

session_start();
require_once "../clases/parametros_data.php";
$parametro = new Parametros();
if (!isset($_SESSION['usu_id'])) {
    die("Usted no tiene acceso a esta area");
}
if (!isset($_REQUEST['id'])) {
    $_REQUEST['codigo'] = $_REQUEST['cod'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>PM Express v1.0 - SISTEMA DE REGISTRO DE CARGOS POR COURIER</title>

<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" />
</head>
<?php 
if ($_REQUEST['id'] == '2') {
    $parametro->parametros_editar($_REQUEST['codigo'], $_REQUEST['serie_factura'], $_REQUEST['numero_factura'], '', '');
}
$parametro->parametros_ver($_REQUEST['codigo']);
?>
<body>
 <table width="100%" border="0">
  <tr>
Exemple #7
0
<?php

/**
 * Archivo del controlador para modulo Parametros
 * @package cParametros.php
 * @author Brenda Batista B. - <*****@*****.**>
 * @copyright Grupo de empresas Voila
 * @license BSD License
 * @version v 1.0 Marzo - 2013
 */
// Vista asignada
$obj_xtpl->assign_file('contenido', $obj_config->GetVar('ruta_vista') . 'parametros' . $obj_config->GetVar('ext_vista'));
// Modelo asignado
require $obj_config->GetVar('ruta_modelo') . 'Parametros.php';
$obj_modelo = new Parametros($obj_conexion);
switch (ACCION) {
    case 'mod':
        // Ruta actual
        $_SESSION['Ruta_Form'] = $obj_generico->RutaRegreso();
        // Ruta regreso
        $obj_xtpl->assign('ruta_regreso', $_SESSION['Ruta_Lista']);
        // Accion a realizar
        $obj_xtpl->assign('tipo_accion', 'upd');
        $obj_xtpl->assign('tag_boton', 'Modificar');
        //Obteniendo Datos de Parametros
        if (is_numeric($_GET['id'])) {
            // Asignaciones
            $row_datos = $obj_modelo->GetDatosParametros($_GET['id']);
            $obj_xtpl->assign($obj_generico->CleanTextDb($row_datos));
            $obj_xtpl->assign('id_parametros', $obj_generico->CleanTextDb($row_datos["id_parametros"]));
            $obj_xtpl->assign('id_agencia', $obj_generico->CleanTextDb($row_datos["id_agencia"]));
 /**
  * Sube un archivo al servidor
  *
  * El archivo destino será el indicado en el constructor y tendrá
  * la misma extensión que el archivo origen en minúsculas.
  *
  * Previa a la carga, se hacen validaciones de tipo y tamaño permitido
  * en base a los parámetros ULTYP y ULSIZ respectivamente.
  *
  * Si hubiera errores de validación o de carga, se pueden recoger con
  * el método getErrores()
  *
  * @param string $origen El archivo origen
  * @return boolean
  */
 public function upLoad($origen)
 {
     $this->errores = array();
     $subido = false;
     $prohibido = false;
     $pathDestino = $this->getDirName();
     if (!is_dir($pathDestino)) {
         $creado = mkdir($pathDestino);
     }
     if (is_dir($pathDestino)) {
         $pathOrigen = pathinfo($origen['name']);
         $extension = "";
         $extension = strtolower($pathOrigen['extension']);
         if ($extension) {
             $extension = "." . $extension;
         }
         $destino = $pathDestino . "/" . $this->getFileName() . $extension;
         $origen = $origen['tmp_name'];
         $tipoArchivo = $origen['type'];
         //Paso el tamaño a KBytes
         $tamanoArchivo = round($origen['size'] / 1024);
         //Comprobaciones de tamaño y tipo de archivo
         $param = new Parametros();
         $tamanoMaximo = trim($param->find("Codigo", "ULSIZ")->getValor());
         if (!$tamanoMaximo) {
             $tamanoMaximo = 500;
         }
         $tiposProhibidos = trim($param->find("Codigo", "ULTYP")->getValor());
         if ($tiposProhibidos) {
             $tiposProhibidos = explode(",", $tiposProhibidos);
         } else {
             $tiposProhibidos[0] = "application/octet-stream";
         }
         unset($param);
         $prohibidoTipo = in_array($tipoArchivo, $tiposProhibidos);
         $prohibidoTamano = $tamanoArchivo > $tamanoMaximo;
         if ($prohibidoTipo) {
             $this->errores[] = "Ese tipo de archivo (" . $tipoArchivo . ") no esta permitido. Consulte el parametro ULTYP.";
         }
         if ($prohibidoTamano) {
             $this->errores[] = "El tamaño del archivo (" . $tamanoArchivo . " Kb) supera el limite autorizado (" . $tamanoMaximo . " Kb). Revise el parámetro ULSIZ";
         }
         if (!$prohibidoTipo and !$prohibidoTamano) {
             //Sube el archivo al servidor local
             if (is_uploaded_file($origen)) {
                 if (copy($origen, $destino)) {
                     $this->upLoadedFileName = $destino;
                 } else {
                     $this->errores[] = "Falló la carga del archivo";
                 }
             }
         }
     } else {
         $this->errores[] = "No se ha podido crear la carpeta para almacenar los documentos";
     }
     return count($this->errores) == 0;
 }
<?php

session_start();
require_once '../clases/ventas_data.php';
require_once "../clases/PHPPaging.lib.php";
$paging = new PHPPaging();
$venta = new Venta();
$pedido = new Pedido();
$producto = new Producto();
$linea = new Linea();
$marca = new Marca();
$cliente = new Cliente();
$comprobante = new Comprobante();
$parametro = new Parametros();
if (!isset($_SESSION['sesion_id_usuario']) and !isset($_SESSION['sesion_id_area'])) {
    die("Usted no tiene acceso a esta area");
}
$pedido->pedido_ver($_REQUEST['ped_codigo']);
?>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Sistema de Ventas</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css">
</head>

<body>
<?php 
 /**
  * Método para ver
  */
 public function ver($key, $order = 'order.codigo.asc', $page = 'page.1')
 {
     $page = Filter::get($page, 'page') > 0 ? Filter::get($page, 'page') : 1;
     if (!($id = Security::getKey($key, 'show_parametros', 'int'))) {
         return Redirect::toAction('listar');
     }
     $parametros = new Parametros();
     if (!$parametros->find_first($id)) {
         Flash::error('Lo sentimos, no se pudo establecer la información del parámetro');
         return Redirect::toAction('listar');
     }
     $this->parametros = $parametros;
     $this->order = $order;
     $this->page_title = 'Información del Parámetro';
     $this->key = $key;
 }
<?php

session_start();
require_once "../clases/ventas_data.php";
require_once "../clases/parametros_data.php";
require_once "../clases/PHPPaging.lib.php";
$paging = new PHPPaging();
$ventas = new Ventas();
$comprobante = new Comprobante();
$parametro = new Parametros();
$cliente = new Cliente();
if (!isset($_SESSION['usu_id'])) {
    die("Usted no tiene acceso a esta area");
}
if (!isset($_REQUEST['npaginas'])) {
    $_REQUEST['npaginas'] = 10;
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>PM Express v1.0 - SISTEMA DE REGISTRO DE CARGOS POR COURIER</title>

<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
<script src="../javascript/valida.js"></script>
<script language="Javascript" src="../javascript/PopCalendar.js"></script>
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" />
</head>
<?php 
if ($_REQUEST['id'] == '1') {
Exemple #12
0
<?php

session_start();
require_once "../clases/parametros_data.php";
$parametro = new Parametros();
//$empresa = new Empresa;
if (!isset($_SESSION['usu_id'])) {
    die("Usted no tiene acceso a esta area");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../javascript/eventos.js"></script>
<title>PM Express v1.0 - SISTEMA DE REGISTRO DE CARGOS POR COURIER</title>

<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" />
</head>

<body>
<table width="100%" border="0">
  <tr>
    <td><?php 
include 'menu.php';
?>
</td>
  </tr>
</table>
 <h5 align="center">CONFIGURAR PARAMETROS</h5>
 public function finalizarAction($contrato_id)
 {
     $model = new Contratos();
     $resul = $model->listContrato($contrato_id);
     $this->view->setVar('contrato', $resul[0]);
     $resul = $model->listcp($contrato_id);
     $this->view->setVar('productos', $resul);
     $resul = Contratosproductos::find(array("baja_logica=1 AND estado=1 AND contrato_id='{$contrato_id}'"));
     $this->view->setVar('nroproductosactivos', count($resul));
     $estado = $this->tag->select(array('estado', Parametros::find(array("baja_logica=1 and parametro ='contratos_estados' and nivel>1", "order" => "nivel")), 'using' => array('nivel', 'valor_1'), 'useEmpty' => true, 'emptyText' => '(Selecionar)', 'emptyValue' => '', 'class' => 'form-control', 'required' => 'required'));
     $this->view->setVar('estado', $estado);
     $this->assets->addCss('/jqwidgets/styles/jqx.base.css')->addCss('/jqwidgets/styles/jqx.custom.css');
     $this->assets->addJs('/jqwidgets/jqxcore.js')->addJs('/jqwidgets/jqxmenu.js')->addJs('/jqwidgets/jqxdropdownlist.js')->addJs('/jqwidgets/jqxlistbox.js')->addJs('/jqwidgets/jqxcheckbox.js')->addJs('/jqwidgets/jqxscrollbar.js')->addJs('/jqwidgets/jqxgrid.js')->addJs('/jqwidgets/jqxdata.js')->addJs('/jqwidgets/jqxgrid.sort.js')->addJs('/jqwidgets/jqxgrid.pager.js')->addJs('/jqwidgets/jqxgrid.filter.js')->addJs('/jqwidgets/jqxgrid.selection.js')->addJs('/jqwidgets/jqxgrid.grouping.js')->addJs('/jqwidgets/jqxgrid.columnsreorder.js')->addJs('/jqwidgets/jqxgrid.columnsresize.js')->addJs('/jqwidgets/jqxdatetimeinput.js')->addJs('/jqwidgets/jqxcalendar.js')->addJs('/jqwidgets/jqxbuttons.js')->addJs('/jqwidgets/jqxdata.export.js')->addJs('/jqwidgets/jqxgrid.export.js')->addJs('/jqwidgets/globalization/globalize.js')->addJs('/jqwidgets/jqxgrid.aggregates.js')->addJs('/media/plugins/bootbox/bootbox.min.js')->addJs('/jqwidgets/jqxtooltip.js')->addJs('/scripts/contratos/finalizar.js');
 }
<?php

session_start();
require_once "../clases/parametros_data.php";
$parametro = new Parametros();
if (!isset($_SESSION['sesion_id_usuario']) and !isset($_SESSION['sesion_id_empresa'])) {
    die("Usted no tiene acceso a esta area");
}
//$empresa->empresa_ver($_SESSION['sesion_id_empresa']);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../javascript/eventos.js"></script>
<title>Sistema de Ventas</title>
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css">
<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
</head>

<body>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
      <?php 
include "menu.php";
?>
</td>
  </tr>
</table>
 public function __construct($slave = false, $domain = false, $server = false)
 {
     $parametro = new Parametros();
     if ($domain == false) {
         if (defined('URL_BASE_FULL')) {
             $urlBase = explode('/', URL_BASE_FULL);
             $urlBase = $urlBase[0];
         } else {
             $urlBase = 'none';
         }
     } else {
         $urlBase = $domain;
     }
     $lang = false;
     if (file_exists(ETC . 'company.inc.php')) {
         require ETC . 'company.inc.php';
         if (isset($company[$urlBase])) {
             if (is_array($company[$urlBase])) {
                 if (isset($company[$urlBase]['LANGUAGE'])) {
                     $lang = $company[$urlBase]['LANGUAGE'];
                 }
                 if (isset($company[$urlBase]['CONFIGFILE'])) {
                     if (file_exists(ETC . $company[$urlBase]['CONFIGFILE'])) {
                         require ETC . $company[$urlBase]['CONFIGFILE'];
                     } else {
                         header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
                         //header('HTTP/1.0 500 Error company file');
                         echo "Error company file";
                         exit;
                     }
                 } else {
                     header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
                     //header('HTTP/1.0 500 Error company param');
                     echo "Error company param";
                     exit;
                 }
                 if (isset($company[$urlBase]['TIMEZONE'])) {
                     date_default_timezone_set($company[$urlBase]['TIMEZONE']);
                     ini_set('date.timezone', $company[$urlBase]['TIMEZONE']);
                 }
                 if (isset($company[$urlBase]['DEC_POINT'])) {
                     $DEC_POINT = $company[$urlBase]['DEC_POINT'];
                 }
                 if (isset($company[$urlBase]['THOUSANDS_SEP'])) {
                     $THOUSANDS_SEP = $company[$urlBase]['THOUSANDS_SEP'];
                 }
             } else {
                 if (file_exists(ETC . $company[$urlBase])) {
                     require ETC . $company[$urlBase];
                 } else {
                     header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
                     //header('HTTP/1.0 500 Error company param');
                     echo "Error company file";
                     exit;
                 }
             }
         } else {
             header($_SERVER['SERVER_PROTOCOL'] . ' 500 Internal Server Error', true, 500);
             //header('HTTP/1.0 500 Error company param');
             echo "Error company not found";
             exit;
         }
     } else {
         require ETC . 'config.inc.php';
     }
     if (!defined('DEC_POINT')) {
         if (isset($DEC_POINT)) {
             define('DEC_POINT', $DEC_POINT);
         } else {
             define('DEC_POINT', ',');
         }
     }
     if (!defined('THOUSANDS_SEP')) {
         if (isset($THOUSANDS_SEP)) {
             define('THOUSANDS_SEP', $THOUSANDS_SEP);
         } else {
             define('THOUSANDS_SEP', '.');
         }
     }
     $conn = $parametro->get("ConnectBD", true);
     $this->logs = new Logs($parametro);
     if ($conn) {
         $conexion = new Connect($parametro, $this->logs, $slave);
         $parametro = new Parametrosdb($parametro, $conexion);
         $this->conexion = $conexion;
     }
     if ($server == true) {
         $this->parametro = $parametro;
         $this->basic = new Basic($parametro, $conexion, $this->logs, false);
         $this->curl = new curl($parametro, $this->logs);
         $this->language = Language::getInstance();
     } else {
         $this->parametro = $parametro;
         $this->plantilla = new plantilla($lang);
         $this->protect = new Protect($parametro, $conexion, $this->logs, $lang);
         $this->language = Language::getInstance();
         $this->basic = new Basic($parametro, $conexion, $this->logs, $this->language);
         $this->bmonitor = new bmonitor($parametro, $conexion, $this->logs, $this->language, $this->protect, $this->basic, $this->plantilla);
         $this->generate = new generate($parametro, $conexion, $this->logs, $this->language, $this->protect, $this->basic, $this->plantilla);
         $this->graph = new Graph($parametro, $conexion, $this->logs);
         $this->charts = new Charts($parametro, $conexion, $this->logs);
         $this->curl = new curl($parametro, $this->logs);
     }
 }
<?php

session_start();
require_once "../clases/parametros_data.php";
$parametro = new Parametros();
if (!isset($_SESSION['sesion_id_usuario']) and !isset($_SESSION['sesion_id_empresa'])) {
    die("Usted no tiene acceso a esta area");
}
if (!isset($_REQUEST['id'])) {
    $_REQUEST['codigo'] = $_REQUEST['cod'];
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script src="../javascript/eventos.js"></script>
<title>SISTEMA DE ALMACEN</title>
<link href="../estilos/css_sistema.css" rel="stylesheet" type="text/css" />
<link href="../imagenes/logo.ico" type="image/x-icon" rel="shortcut icon">
</head>
<?php 
if ($_REQUEST['id'] == '2') {
    $parametro->parametros_editar($_REQUEST['codigo'], $_REQUEST['guia_interna'], $_REQUEST['recibo_interno'], $_REQUEST['serie_notacredito'], $_REQUEST['numero_notacredito'], $_REQUEST['serie_factura'], $_REQUEST['numero_factura'], $_REQUEST['serie_boleta'], $_REQUEST['numero_boleta']);
}
$parametro->parametros_ver($_REQUEST['codigo']);
?>
<body>

<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>