.alert-box  span.close-tip:hover { text-shadow: 1px 1px 1px rgba(0, 0, 0, 1); color: white;	border-color: rgb(18, 52, 86);}
.error, .credito-estado-20 {   background:#ffecec url('./images/notification/error.png') no-repeat 10px 50%;   border:1px solid #f5aca6; }
.success, .credito-estado-10 {   background:#e9ffd9 url('./images/notification/success.png') no-repeat 10px 50%;   border:1px solid #a6ca8a; }
.warning, .credito-estado-30 {   background:#fff8c4 url('./images/notification/warning.png') no-repeat 10px 50%;    border:1px solid #f2c779; }
.notice {   background:#e3f7fc url('./images/notification/notice.png') no-repeat 10px 50%;   border:1px solid #8ed9f6; }
#banner { right: 0;	bottom: 0;	position:fixed !important; }
th {text-align: right;}
table {width:100%;}
</style>
</head>
<script type="text/javascript" src="./js/md5.js"></script>
<body onload='validar_nav();' >
<?php 
$version = "1.01.02";
$msg = isset($_GET[SYS_MSG]) ? $_GET[SYS_MSG] : "";
$sc = new cGeneral_sucursales();
$data = $sc->query()->select()->exec();
$adsense = SAFE_PAY_VERSION == "" ? "<script async src=\"https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js\"></script>\r\n<!-- SAFE-OSMS -->\r\n<ins class=\"adsbygoogle\" style=\"display:inline-block;width:234px;height:60px\" data-ad-client=\"ca-pub-1005748569860531\" data-ad-slot=\"9760371821\"></ins>\r\n\t\t<script> (adsbygoogle = window.adsbygoogle || []).push({}); </script>" : "";
$txt = "";
foreach ($data as $datos) {
    $sc->setData($datos);
    $valor = $sc->codigo_sucursal()->v();
    $nombre = $sc->nombre_sucursal()->v();
    $txt .= "<option value=\"{$valor}\">{$nombre}</option>";
}
$demohtml = "<div class='alert-box success'>\r\n\t\t\t\t<table>\r\n\t\t\t\t<caption>Demo Users</caption>\r\n\t\t\t\t<tr>\r\n\t\t\t\t<td>root</td><th>root</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>cumplimiento</td><th>cumplimiento</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>credito</td><th>credito</th>\r\n\t\t\t\t\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>cajero</td><th>cajero</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t<td>contabilidad</td><th>contabilidad</th>\r\n\t\t\t\t</tr><tr>\r\n\t\t\t\t</table>'";
//detect demo
$allowed_hosts = array('demo.sipakal.com', 'localhost');
if (!isset($_SERVER['HTTP_HOST']) || !in_array($_SERVER['HTTP_HOST'], $allowed_hosts)) {
    //header($_SERVER['SERVER_PROTOCOL'].' 400 Bad Request');
    //exit;
//=====================================================================================================
$xHP = new cHPage("", HP_FORM);
$xQL = new MQL();
$xLi = new cSQLListas();
$xF = new cFecha();
$xLoc = new cLocal();
$jscallback = parametro("callback");
$tiny = parametro("tiny");
$form = parametro("form");
$action = parametro("action", SYS_NINGUNO);
//$jxc = new TinyAjax();
//$jxc ->exportFunction('datos_del_pago', array('idsolicitud', 'idparcialidad'), "#iddatos_pago");
//$jxc ->process();
$xHP->init();
$clave = parametro("codigo_sucursal", null, MQL_RAW);
$xTabla = new cGeneral_sucursales();
if ($clave != null) {
    $xTabla->setData($xTabla->query()->initByID($clave));
}
$xTabla->setData($_REQUEST);
$clave = parametro("id", null, MQL_RAW);
$persona = parametro("idsocio", null, MQL_INT);
$gerente = parametro("idsocio2", null, MQL_INT);
$cumplimiento = parametro("idsocio3", null, MQL_INT);
//inicializar la persona
$xSoc = new cSocio($persona);
$ODom = null;
if ($xSoc->init() == true) {
    $ODom = $xSoc->getODomicilio();
}
$xSel = new cHSelect();
 function setActualizarPorPersona()
 {
     if ($this->mInit == false) {
         $this->init();
     }
     if ($this->mInitPersona == true) {
         $xSuc = new cGeneral_sucursales();
         $xSuc->setData($xSuc->query()->initByID($this->mClave));
         $xSuc->calle($this->mCalle);
         $xSuc->codigo_postal($this->mCodigoPostal);
         $xSuc->numero_exterior($this->mNumeroExt);
         $xSuc->numero_interior($this->mNumeroInt);
         $xSuc->colonia($this->mColonia);
         $xSuc->localidad($this->mNombreLocalidad);
         $xSuc->municipio($this->mMunicipio);
         $xSuc->estado($this->mEstado);
         $xSuc->telefono($this->mTelefono);
         $xSuc->query()->update()->save($this->mClave);
     }
 }