public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::ID, true));
             $password = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::PASSWORD, true));
             $rePassword = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::SECOND_PASSWORD, true));
             $idPregunta = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::RESTAURAR_ID, true));
             $respuesta = request::getInstance()->getPost(usuarioTableClass::getNameField(usuarioTableClass::RESPUESTA_SECRETA, true));
             $flag = true;
             if ($flag == true) {
                 request::getInstance()->setMethod('GET');
             }
             $ids = array(usuarioTableClass::ID => $id);
             $data = array(usuarioTableClass::PASSWORD => md5($password), usuarioTableClass::RESTAURAR_ID => $idPregunta, usuarioTableClass::RESPUESTA_SECRETA => $respuesta);
             usuarioTableClass::update($ids, $data);
             routing::getInstance()->getUrlObj('shfSecurity', 'index');
         } else {
             routing::getInstance()->forward('recuperar', 'consultar');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
 public static function validatCreate($nombre, $apellidos, $cedula, $direccion, $telefono)
 {
     $flag = FALSE;
     $patron = "^[a-zA-Z0-9]{3,20}\$";
     if (!ereg($patron, $nombre)) {
         session::getInstance()->setError('campo nombre no permite carateres especiales');
         $flag = true;
         session::getInstance()->setFirstCall(datosUsuarioTableClass::getNameField(datosUsuarioTableClass::NOMBRE, true), true);
     }
     if ($flag == true) {
         request::getInstance()->setMethod('GET');
         routing::getInstance()->forward('datos', 'insert');
     }
     if (!ereg($patron, $apellidos)) {
         session::getInstance()->setError('campo apellidos no permite carateres especiales');
         $flag = true;
         session::getInstance()->setFirstCall(datosUsuarioTableClass::getNameField(datosUsuarioTableClass::APELLIDOS, true), true);
     }
     if (!ereg($patron, $cedula)) {
         session::getInstance()->setError('campo cedula no permite carateres especiales');
         $flag = true;
         session::getInstance()->setFirstCall(datosUsuarioTableClass::getNameField(datosUsuarioTableClass::CEDULA, true), true);
     }
     if (!ereg($patron, $direccion)) {
         session::getInstance()->setError('campo direccion no permite carateres especiales');
         $flag = true;
         session::getInstance()->setFirstCall(datosUsuarioTableClass::getNameField(datosUsuarioTableClass::DIRECCION, true), true);
     }
     if (!ereg($patron, $telefono)) {
         session::getInstance()->setError('campo telefono no permite carateres especiales');
         $flag = true;
         session::getInstance()->setFirstCall(datosUsuarioTableClass::getNameField(datosUsuarioTableClass::TELEFONO, true), true);
     }
 }
Пример #3
0
	protected function prepare() {
		$htVars = http_vars::getInstance();
		$this->type = $htVars->post('type', $htVars->get('type'));
		$this->config = $htVars->post('config', $htVars->get('config', 'default'));
		
		$this->myCfg = $this->cfg->default;
		if ($this->config != 'default' && is_array($this->cfg->get($this->config)))
			factory::mergeCfg($this->myCfg, $this->cfg->get($this->config));
		
		$this->dir = $this->myCfg['dir'];
		if ($this->myCfg['subdir'])
			$this->dir.= DS.$this->myCfg['subdir'];
		
		$this->dir.= DS.$this->type;
		
		$resp = response::getInstance();
		/* @var $resp response_http_html */
		$resp->setLayout($this->myCfg['layout']);
		$resp->setTitle($this->myCfg['title']);
		$resp->initIncFiles(false);
		foreach($this->myCfg['incFiles'] as $ic)
			$resp->add($ic);
		
		$this->uri = request::uriDef(array('module')).'?'.session::getInstance()->getSessIdForce().'='.urlencode(session_id()).'&type='.$this->type.'&config='.$this->config.'&';
	}
Пример #4
0
	protected function afterInit() {
		parent::afterInit();
		$this->session = session::getInstance(array(
			'nameSpace'=>$this->cfg->sessionNameSpace
		));
		$this->table = db::get('table', $this->cfg->table);
		$this->autoLogin();
	}
Пример #5
0
 function __construct()
 {
     $this->session = session::getInstance();
     $this->post = post::getInstance();
     $this->get = get::getInstance();
     $this->http = http::getInstance();
     $this->file = new file();
     $this->cookie = new cookie(config('cookie'));
 }
Пример #6
0
 function __construct()
 {
     $this->session = session::getInstance();
     $this->post = post::getInstance();
     $this->get = get::getInstance();
     $this->http = http::getInstance();
     $this->file = file::getInstance();
     $this->cookie = cookie::getInstance();
 }
Пример #7
0
 public function initialize()
 {
     $this->template = template::getInstance();
     $this->session = session::getInstance();
     $this->album = album::getInstance();
     $this->template->add(array('album'));
     $this->id = $this->session->getData('album', 'id');
     $this->page = $this->session->getData('album', 'page');
 }
Пример #8
0
 public function __construct()
 {
     $this->registry = registry::getInstance();
     $this->path = $this->registry["path"];
     $this->html = html::getInstance();
     $this->ajax = new ajax();
     $this->session = session::getInstance();
     $this->cookie = session::getInstance();
     $this->l10n = l10n::getInstance();
 }
Пример #9
0
    public function toHtml()
    {
        if ($this->cfg->mode == 'view') {
            return $this->getValue();
        }
        $options = $this->tinyMce;
        if (is_array($this->cfg->tinyBrowser) && $this->cfg->getInArray('tinyBrowser', 'active')) {
            $tinyBrowser = $this->cfg->tinyBrowser;
            $options['file_browser_callback'] = 'function(field_name, url, type, win) {
				tinyMCE.activeEditor.windowManager.open({
					file : "' . $tinyBrowser['url'] . '?' . session::getInstance()->getSessIdForce() . '=' . urlencode(session_id()) . '&type=" + type' . ($tinyBrowser['subdir'] ? '+"&subdir=' . $tinyBrowser['subdir'] . '"' : '') . ',
					title : "' . $tinyBrowser['title'] . '",
					width : ' . $tinyBrowser['width'] . ',
					height : ' . $tinyBrowser['height'] . ',
					resizable : "yes",
					scrollbars : "yes",
					inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
					close_previous : "no"
				}, {
					window : win,
					input : field_name
				});
				return false;
			}';
        } else {
            if (is_array($this->cfg->nyroBrowser) && $this->cfg->getInArray('nyroBrowser', 'active')) {
                $nyroBrowser = $this->cfg->nyroBrowser;
                $options['file_browser_callback'] = 'function(field_name, url, type, win) {
				tinyMCE.activeEditor.windowManager.open({
					file : "' . $nyroBrowser['url'] . '?' . session::getInstance()->getSessIdForce() . '=' . urlencode(session_id()) . '&type="+type+"&config=' . $nyroBrowser['config'] . '&",
					title : "' . $nyroBrowser['title'] . '",
					width : ' . $nyroBrowser['width'] . ',
					height : ' . $nyroBrowser['height'] . ',
					resizable : "yes",
					scrollbars : "yes",
					inline : "yes",  // This parameter only has an effect if you use the inlinepopups plugin!
					close_previous : "no"
				}, {
					window : win,
					input : field_name
				});
				return false;
			}';
            }
        }
        if (array_key_exists('content_css', $options) && $options['content_css']) {
            $contentCss = $options['content_css'];
            $options['setup'] = 'function(ed) {ed.onInit.add(function(ed) {setTimeout(function() {ed.dom.add(ed.dom.select("head"), "link", {rel : "stylesheet", href : "' . $contentCss . '"});}, 5);});}';
        }
        unset($options['content_css']);
        $resp = response::getInstance()->getProxy();
        $resp->addJs('jquery.tinymce');
        $resp->blockjQuery('$("#' . $this->id . '").tinymce(' . utils::jsEncode($options) . ');');
        return utils::htmlTag($this->htmlTagName, array_merge($this->html, array('name' => $this->name, 'id' => $this->id)), utils::htmlOut($this->getValue()));
    }
Пример #10
0
 protected function afterInit()
 {
     $this->table = $this->cfg->table;
     if (!$this->cfg->sessionName) {
         $this->cfg->sessionName = $this->table->getName();
     }
     $this->session = session::getInstance(array('nameSpace' => 'filterTable_' . $this->cfg->sessionName));
     if (!$this->cfg->check('clearPrm')) {
         $this->cfg->clearPrm = 'clearFilter' . ucfirst($this->table->getName());
     }
     $this->cfg->setinArray('actionPrmClear', $this->cfg->clearPrm, true);
     $this->initForm();
 }
Пример #11
0
 public function __construct()
 {
     parent::__construct();
     $session = session::getInstance();
     $isSV = $session->get("user_is_sv");
     if ($isSV && $session->isValid()) {
         $session->setValid();
     } elseif ($isSV) {
         session::recreateInstance(true);
     }
     $this->checkHTTPAuth();
     $mainConfigs = mainConfiguration::getInstance();
     $this->sendEventEnable = (bool) $mainConfigs->get('kernel', 'buffer-send-event-enable');
 }
 public static function validateCreate($descripcion)
 {
     $flag = false;
     $patternC = "^[a-zA-Z0-9]{3,20}\$";
     if (ereg($patternC, $descripcion) == false) {
         session::getInstance()->setError('nop');
         $flag = true;
         session::getInstance()->setFlash(cargoTableClass::getNameField(cargoTableClass::DESCRIPCION, true), true);
     }
     if ($flag == true) {
         request::getInstance()->setMethod('GET');
         routing::getInstance()->forward('personal', 'insertCargo');
     }
 }
Пример #13
0
function getMenu()
{
    //global $page;
    $page = basename($_SERVER['SCRIPT_NAME']);
    $menu = array('index.php' => array('txt' => session::getInstance()->getLabel('lang.text.menu.index'), 'icon' => 'glyphicon glyphicon-dashboard', 'logged' => false), 'histo.php' => array('txt' => session::getInstance()->getLabel('lang.text.menu.historic'), 'icon' => 'glyphicon glyphicon-stats', 'logged' => false), 'rt.php' => array('txt' => session::getInstance()->getLabel('lang.text.menu.rt'), 'icon' => 'glyphicon glyphicon-signal', 'logged' => true));
    foreach ($menu as $url => $title) {
        if ($title['logged'] && !session::getInstance()->getVar('logged')) {
            continue;
        }
        $active = '';
        if ($page == $url) {
            $active = ' class="active"';
        }
        echo '<li' . $active . '> <a href=' . $url . '><span class="' . $title['icon'] . '" aria-hidden="true"></span>   ' . $title['txt'] . '</a></li>';
    }
}
 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(cargoTableClass::getNameField(cargoTableClass::ID, true));
             $descripcion = request::getInstance()->getPost(cargoTableClass::getNameField(cargoTableClass::DESCRIPCION, true));
             $ids = array(cargoTableClass::ID => $id);
             $data = array(cargoTableClass::DESCRIPCION => $descripcion);
             cargoTableClass::update($ids, $data);
         }
         routing::getInstance()->redirect('personal', 'indexCargo');
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
Пример #15
0
 function __construct($auto = true)
 {
     $this->session = session::getInstance();
     $this->path = LOCAL_PATH . LOCAL_DIR . 'data/';
     $this->cache_path = LOCAL_PATH . LOCAL_DIR . 'cache/';
     if ($auto) {
         if (isset($_GET['p'])) {
             $param = unserialize(base64_decode($_GET['p']));
             foreach ($param as $pname => $pvalue) {
                 $_GET[$pname] = $pvalue;
             }
         }
         if (isset($_GET['w'])) {
             $this->width = $_GET['w'];
         }
         if (isset($_GET['h'])) {
             $this->height = $_GET['h'];
         }
         if (isset($_GET['m'])) {
             $this->mask = $_GET['m'];
         }
         if (isset($_GET['t']) && $_GET['t']) {
             $this->trans = true;
         }
         if (isset($_GET['archive'])) {
             $this->archive = $_GET['archive'];
         }
         if (isset($_GET['video'])) {
             $this->video = $_GET['video'];
         }
         if (isset($_GET['id'])) {
             $this->id = $_GET['id'];
             $this->getCacheName();
         }
         if (isset($_GET['file']) && isset($_GET['album'])) {
             $this->file = $_GET['file'];
             $this->album = $_GET['album'];
         }
         if (!$this->cached && ($this->album && $this->file || $this->id) && !$this->archive) {
             $this->getInfo();
         } else {
             if (!$this->cached && !$this->archive && !$this->video) {
                 $this->error = true;
             }
         }
     }
 }
Пример #16
0
 public function finalize()
 {
     $this->content->finalize();
     $session = session::getInstance();
     $session->save();
     if (strstr($_SERVER['HTTP_USER_AGENT'], 'W3C_Validator') === false) {
         if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip')) {
             ob_start('ob_gzhandler');
         }
     }
     echo $this->getResult();
     unset($this->content);
     unset($this->template);
     unset($this->session);
     $this->template = null;
     $this->session = null;
     $this->content = null;
 }
 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $descripcion = request::getInstance()->getPost(cargoBaseTableClass::getNameField(cargoBaseTableClass::DESCRIPCION, true));
             cargoTableClass::validateCreate($descripcion);
             $data = array(cargoBaseTableClass::DESCRIPCION => $descripcion);
             cargoBaseTableClass::insert($data);
             session::getInstance()->setSuccess(i18n::__('succesCreate'));
             log::register(i18n::__('create'), cargoTableClass::getNameTable());
             routing::getInstance()->redirect('personal', 'indexCargo');
         } else {
             log::register(i18n::__('create'), cargoTableClass::getNameTable(), i18n::__('errorCreateBitacora'));
             session::getInstance()->setError(i18n::__('errorCreate'));
             routing::getInstance()->redirect('personal', 'indexCargo');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
Пример #18
0
 static function getInstance()
 {
     if (is_null(ajax::$instance)) {
         $session = session::getInstance();
         $zone = $session->getData('zone');
         if (!$zone) {
             $zone = ZONE_DEFAULT;
             $session->setData('zone', $zone);
         }
         if ($zone && file_exists(LOCAL_PATH . LOCAL_DIR . 'module/' . $zone . '/ajax.php')) {
             require_once LOCAL_PATH . LOCAL_DIR . 'module/' . $zone . '/ajax.php';
         }
         if (class_exists('module_' . $zone . '_ajax')) {
             $class = 'module_' . $zone . '_ajax';
             ajax::$instance = new $class();
         } else {
             ajax::$instance = new ajax();
         }
     }
     return ajax::$instance;
 }
 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $id = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::ID, true));
             $numero_documento = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::NUMERO_DOC, true));
             $nombre_completo = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::NOMBRE, true));
             $tipo_doc = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::TIPO_DOC, true));
             $direccion = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::DIRECCION, true));
             $ciudad = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::CIUDAD, true));
             $telefono = request::getInstance()->getPost(proveedorTableClass::getNameField(proveedorTableClass::TEL, true));
             $ids = array(proveedorTableClass::ID => $id);
             $data = array(proveedorTableClass::NUMERO_DOC => $numero_documento, proveedorTableClass::NOMBRE => $nombre_completo, proveedorTableClass::TIPO_DOC => $tipo_doc, proveedorTableClass::DIRECCION => $direccion, proveedorTableClass::TEL => $telefono, proveedorTableClass::CIUDAD => $ciudad);
             proveedorTableClass::update($ids, $data);
             log::register('update', proveedorTableClass::getNameTable());
         }
         routing::getInstance()->redirect('personal', 'indexProveedor');
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
 public static function validateCreate($animal, $valor)
 {
     $flag = false;
     if (empty($animal) or !isset($animal) or $animal == '') {
         session::getInstance()->setError(i18n::__(10093, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClassgetNameField(detalleProcesoVentaTableClass::ANIMAL, true), true);
     }
     if (!is_numeric($animal)) {
         session::getInstance()->setError(i18n::__(10057, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClass::getNameField(detalleProcesoVentaTableClass::ANIMAL, true), true);
     }
     if ($animal < 0) {
         session::getInstance()->setError(i18n::__(10095, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClass::getNameField(detalleProcesoVentaTableClass::ANIMAL, true), true);
     }
     if ($valor < 0) {
         session::getInstance()->setError(i18n::__(10116, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClass::getNameField(detalleProcesoVentaTableClass::VALOR, true), true);
     }
     if (empty($valor) or !isset($valor) or $valor == '') {
         session::getInstance()->setError(i18n::__(10117, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClass::getNameField(detalleProcesoVentaTableClass::VALOR, true), true);
     }
     if (!is_numeric($valor)) {
         session::getInstance()->setError(i18n::__(10118, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoVentaTableClass::getNameField(detalleProcesoVentaTableClass::VALOR, true), true);
     }
     if ($flag == true) {
         request::getInstance()->setMethod('GET');
         routing::getInstance()->forward('factura', 'indexFacturaVenta');
     }
 }
 public function execute()
 {
     try {
         if (request::getInstance()->isMethod('POST')) {
             $nombre_empleado = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::NOMBRE, FALSE));
             $id_empleado = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::ID_EMPLEADO, false));
             $fecha_ini = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::FECHA_INICIO, false));
             $fecha_fin = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::FECHA_FIN, false));
             $fecha_pago = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::FECHA_PAGO, false));
             $total = request::getInstance()->getPost(pagoEmpleadosTableClass::getNameField(pagoEmpleadosTableClass::PAGO, false));
             $data = array(pagoEmpleadosTableClass::NOMBRE => $nombre_empleado, pagoEmpleadosTableClass::ID_EMPLEADO => $id_empleado, PagoEmpleadosTableClass::FECHA_INICIO => $fecha_ini, PagoEmpleadosTableClass::FECHA_FIN => $fecha_fin, PagoEmpleadosTableClass::FECHA_PAGO => $fecha_pago, PagoEmpleadosTableClass::TOTAL => $total);
             PagoEmpleadosTableClass::insert($data);
             log::register(i18n::__('create'), PagoEmpleadosTableClass::getNameTable());
             routing::getInstance()->redirect('pago', 'indexPago');
         } else {
             log::register(i18n::__('create'), pagoEmpleadosTableClass::getNameTable(), i18n::__('errorCreateBitacora'));
             session::getInstance()->setError(i18n::__('errorCreate'));
             routing::getInstance()->redirect('pago', 'indexPago');
         }
     } catch (PDOException $exc) {
         session::getInstance()->setFlash('exc', $exc);
         routing::getInstance()->forward('shfSecurity', 'exception');
     }
 }
Пример #22
0
 /**
  * Получение списка последних просмотренных страниц
  *
  * @param string $template Шаблон для вывода
  *
  * @param string $scope Тэг(группировка страниц), без пробелов и запятых
  * @param bool $showCurrentElement Если false - текущая страница не будет включена в результат
  * @param int|null $limit Количество выводимых элементов
  *
  * @return mixed
  */
 public function getRecentPages($template = "default", $scope = "default", $showCurrentElement = false, $limit = null)
 {
     if (!$scope) {
         $scope = "default";
     }
     $hierarchy = umiHierarchy::getInstance();
     $currentElementId = cmsController::getInstance()->getCurrentElementId();
     list($itemsTemplate, $itemTemplate) = def_module::loadTemplates("content/" . $template, "items", "item");
     session::getInstance();
     $items = array();
     if (isset($_SESSION['content:recent_pages'][$scope])) {
         foreach ($_SESSION['content:recent_pages'][$scope] as $recentPage => $time) {
             $element = $hierarchy->getElement($recentPage, true);
             if (!$element instanceof umiHierarchyElement) {
                 continue;
             }
             if (!$showCurrentElement && $element->getId() == $currentElementId) {
                 continue;
             } elseif (!is_null($limit) && $limit <= 0) {
                 break;
             } elseif (!is_null($limit)) {
                 $limit--;
             }
             $items[] = self::parseTemplate($itemTemplate, array('@id' => $element->getId(), '@link' => $element->link, '@name' => $element->getName(), '@alt-name' => $element->getAltName(), '@xlink:href' => "upage://" . $element->getId(), '@last-view-time' => $time, 'node:text' => $element->getName()));
         }
     }
     return self::parseTemplate($itemsTemplate, array("subnodes:items" => $items));
 }
Пример #23
0
?>
</label>
                            <input type="text" class="form-control datepicker" id="dateEnd" placeholder="ex : 01/09/2014">
                        </div>
                        
                    </form>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </button>
                    <button type="button" id="confirmPeriode" class="btn btn-default btn-sm">
                        <span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
                    </button>
                </div>
            </div>
        </div>
    </div>  

<?php 
include '_templates/footer.php';
?>
<!--appel des scripts personnels de la page -->
    <script src="_langs/<?php 
echo session::getInstance()->getLang();
?>
.datepicker.js"></script>
	<script src="js/amSynthese.js"></script>
	
    </body>
</html>
Пример #24
0
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="deleteTitre"></h4>
					</div>
					<div class="hidden">
						<input type="text" id="deleteid">
						<input type="text" id="typeModal">
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal"><?php 
echo session::getInstance()->getLabel('lang.text.modal.cancel');
?>
</button>
						<button type="button" class="btn btn-danger btn-ok" id="deleteConfirm"><?php 
echo session::getInstance()->getLabel('lang.text.modal.confirm');
?>
</button>
					</div>
				</div>
			</div>
		</div>


	<?php 
include '_templates/footer.php';
?>
	<!--appel des scripts personnels de la page -->
	<script src="js/gstrapport.js"></script>
	</body>
Пример #25
0
if (!in_array($page, $pageNotLogged) && !session::getInstance()->getVar('logged')) {
    header('Location: /errors/401.php');
    exit;
}
?>
<!DOCTYPE html>
<html lang="fr">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>OkoVision</title>
    <script type="text/javascript">
            var sessionToken = "<?php 
echo session::getInstance()->getVar('sid');
?>
";		
   </script>
	<!-- Bootstrap core CSS -->
    <link href="css/bootstrap.min.css" rel="stylesheet">
    <!-- Bootstrap theme -->
    <link href="css/bootstrap-theme.min.css" rel="stylesheet">
    <link href="css/jquery-ui.min.css" rel="stylesheet">
    <link href="css/custom.css" rel="stylesheet">
    <link href="css/animate.css" rel="stylesheet">
    <link href="css/jquery-ui-timepicker-addon.css" rel="stylesheet">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>+
Пример #26
0
 public function getContent($id, $sort = null, $page = 1, $count = 0)
 {
     $session = session::getInstance();
     if ($session->getData('image', $id)) {
         $this->loadContent($id);
     }
     $image = $session->getData('image', $id);
     if ($count == 0) {
         return $image;
     }
     $array = array();
     for ($i = ($page - 1) * $count; $i < $page * $count - 1; $i++) {
         if (isset($image[$i])) {
             $array[] = $image[$i];
         }
     }
     return $array;
 }
Пример #27
0
 /**
  * Function changing password
  * 
  * @return json 
  */
 public function changePassword($pass)
 {
     $pass = sha1($this->realEscapeString($pass));
     $userId = session::getInstance()->getVar("userId");
     $q = "update oko_user set pass='******' where id={$userId}";
     $this->log->debug("Class " . __CLASS__ . " | " . __FUNCTION__ . " | " . $q);
     $r['response'] = $this->query($q);
     $this->sendResponse($r);
 }
 public static function validateCreate($insumo, $cantidad, $valor, $tipo)
 {
     $flag = false;
     if (empty($id_registro) or !isset($id_registro) or $id_registro == '') {
         session::getInstance()->setError(i18n::__(10107, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClassgetNameField(detalleProcesoCompraTableClass::PROCESO_COMPRA_ID, true), true);
     }
     if (!is_numeric($id_registro)) {
         session::getInstance()->setError(i18n::__(10108, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::PROCESO_COMPRA_ID, true), true);
     }
     if ($id_registro < 0) {
         session::getInstance()->setError(i18n::__(10109, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::PROCESO_COMPRA_ID, true), true);
     }
     if (empty($tipo) or !isset($tipo) or $tipo == '') {
         session::getInstance()->setError(i18n::__(10044, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::TIPO_INSUMO, true), true);
     }
     if (!is_numeric($tipo)) {
         session::getInstance()->setError(i18n::__(10085, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::TIPO_INSUMO, true), true);
     }
     if ($tipo < 0) {
         session::getInstance()->setError(i18n::__(10086, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::TIPO_INSUMO, true), true);
     }
     if (empty($insumo) or !isset($insumo) or $insumo == '') {
         session::getInstance()->setError(i18n::__(10047, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::INSUMO_ID, true), true);
     }
     if (!is_numeric($insumo)) {
         session::getInstance()->setError(i18n::__(10102, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::INSUMO_ID, true), true);
     }
     if ($insumo < 0) {
         session::getInstance()->setError(i18n::__(10103, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::INSUMO_ID, true), true);
     }
     if ($valor < 0) {
         session::getInstance()->setError(i18n::__(10080, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::VALOR_UNITARIO, true), true);
     }
     if (empty($valor) or !isset($valor) or $valor == '') {
         session::getInstance()->setError(i18n::__(10050, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::VALOR_UNITARIO, true), true);
     }
     if (!is_numeric($valor)) {
         session::getInstance()->setError(i18n::__(10051, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::VALOR_UNITARIO, true), true);
     }
     if (empty($cantidad) or !isset($cantidad) or $cantidad == '') {
         session::getInstance()->setError(i18n::__(10087, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::CANTIDAD, true), true);
     }
     if (!is_numeric($cantidad)) {
         session::getInstance()->setError(i18n::__(10083, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::CANTIDAD, true), true);
     }
     if ($cantidad < 0) {
         session::getInstance()->setError(i18n::__(10081, null, 'errors'));
         $flag = true;
         session::getInstance()->setFlash(detalleProcesoCompraTableClass::getNameField(detalleProcesoCompraTableClass::CANTIDAD, true), true);
     }
     if ($flag == true) {
         request::getInstance()->setMethod('GET');
         routing::getInstance()->forward('factura', 'indexFacturaCompra');
     }
 }
Пример #29
0
    $path = substr(Path, strlen(Path) - strlen("/")) == "/" ? Path : Path . "/";
    $registry->path = $path;
    if (!defined('requiresBD')) {
        $db = new dbFactory(strtolower(DB_Engine));
    } else {
        if (requiresBD) {
            $db = new dbFactory(strtolower(DB_Engine));
        } else {
            $db = null;
        }
    }
    $registry->db = $db;
    $views = new appviews();
    $registry->views = $views;
    $themes = new themes();
    $registry->themes = $themes;
    $session = session::getInstance();
    $registry->session = $session;
    $cookie = cookie::getInstance();
    $registry->cookie = $cookie;
    $router = new router();
    $registry->router = $router;
    $debug = debug::getInstance();
    $registry->debug = $debug;
    $registry->validateErrors = array();
    $router->dispatch();
    // Here starts the party
} catch (Exception $e) {
    echo $e->getMessage();
    exit;
}
Пример #30
0
echo ASHTRAY;
?>
">
    					  <span class="help-block"><?php 
echo session::getInstance()->getLabel('lang.text.page.admin.param.ashtray.desc');
?>
</span>  
    					  </div>
    					</div>
    				</fieldset>                    
                    
                    
    			</form>
                <div  align="center">
					    <button id="bt_save_infoge" name="bt_save_infoge" class="btn btn-primary" type="button"><?php 
echo session::getInstance()->getLabel('lang.text.page.admin.save');
?>
</button>
				</div>
            </div>
            
            
            


<?php 
include '_templates/footer.php';
?>
    <!--script src="js/jquery.fileupload.js"></script-->
	<script src="js/adminParam.js"></script>
    </body>