예제 #1
0
파일: Main.php 프로젝트: Mike0712/dom8
 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $welcome = $connect->query('SELECT * FROM welcome', []);
     $this->welcome = $welcome;
 }
예제 #2
0
파일: Users.php 프로젝트: Jurasikt/bso
 public static function oath($email, $password)
 {
     $p = DB::query()->select('password', 'id')->from('user')->where('email', '=', $email)->and_where('`check-e`', '=', 1)->execute()->current();
     if ($p === false) {
         return false;
     }
     $data = unserialize($p['password']);
     $user = new Users();
     if ($user->hash_check($password, $data['hash'], $data['salt'])) {
         STD::set_cookie('rememberme', $p['id']);
         return true;
     }
     return false;
 }
예제 #3
0
//include dirname(__DIR__)."/vendor/autoload.php";
//NAMESPACE APP
$app = new app();
$constante = new constante();
$date_format = new date_format();
$fonction = new fonction();
$DB = new DB();
$ssh2 = new ssh2();
//NAMESPACE API
$push_cls = new push();
//NAMESPACE ASC
$salarie_cls = new salarie();
$presta_cls = new prestation();
//NAMESPACE CONFIG
$mod_cls = new modules();
if (isset($_SESSION['account']['connect']) && $_SESSION['account']['connect'] == 1) {
    $user = $DB->query("SELECT * FROM users WHERE pseudo = :pseudo", array("pseudo" => $_SESSION['account']['pseudo']));
}
//Import des Informations de configuration
$mod_salarie = $mod_cls->active_salarie();
$mod_prestation = $mod_cls->active_prestation();
$mod_billetterie = $mod_cls->active_billetterie();
$mod_remboursement = $mod_cls->active_remboursement();
$mod_residente = $mod_cls->active_non_residente();
$conf_salarie = $mod_cls->salarie();
$conf_presta = $mod_cls->prestation();
$conf_billetterie = $mod_cls->billetterie();
$conf_remboursement = $mod_cls->remboursement();
//COMPOSER
require dirname(__DIR__) . "/vendor/autoload.php";
use Ifsnop\Mysqldump as IMysqldump;
예제 #4
0
파일: Shedule.php 프로젝트: Mike0712/dom8
 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $train = $connect->query('SELECT * FROM train', []);
     $this->train = $train;
 }
예제 #5
0
파일: DB.php 프로젝트: Jurasikt/bso
 /**
  * возращает значение сохраненной переменой 
  * @param  $name    string название переменной
  * @return mixed    false если не существует поля $name
  */
 public static function get_var($name)
 {
     $val = DB::query()->select('value')->from(DB::$var)->where('var_name', '=', $name)->execute()->current('value');
     if ($val) {
         return unserialize($val);
     } else {
         return false;
     }
 }
예제 #6
0
파일: install.php 프로젝트: Jurasikt/bso
<?php

use App\DB;
define('EXT', '.php');
define('DOCROOT', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR);
define('APPPATH', realpath(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'Application' . DIRECTORY_SEPARATOR);
require_once APPPATH . 'autoload' . EXT;
$file = DOCROOT . 'install/sql.sql';
$all = file_get_contents($file);
$sql = preg_split('/;/', $all);
foreach ($sql as $item) {
    if ($item != '') {
        $res = DB::query($item)->execute()->_error;
        if ($res == '') {
            echo "<pre>Таблица создана успешна</pre>";
        } else {
            echo "<pre>{$res}</pre>";
        }
    }
}
예제 #7
0
파일: Gallery.php 프로젝트: Mike0712/dom8
 public function __construct()
 {
     $connect = new DB('connect_param.php');
     $gallery = $connect->query('SELECT * FROM gallery', []);
     $this->gallery = $gallery;
 }