当前位置: 首页>>代码示例>>PHP>>正文


PHP CRUD::dbQS方法代码示例

本文整理汇总了PHP中CRUD::dbQS方法的典型用法代码示例。如果您正苦于以下问题:PHP CRUD::dbQS方法的具体用法?PHP CRUD::dbQS怎么用?PHP CRUD::dbQS使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CRUD的用法示例。


在下文中一共展示了CRUD::dbQS方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($id_Website, $controllerName = "index", $langue = 'fr', $zoneArea = 'bigadmin', $user = array())
 {
     $this->timeExecution = microtime(true);
     $this->langueZone = $langue;
     $this->zoneArea = $zoneArea;
     $this->controllerNameNow = $controllerName;
     $this->user = $user;
     if (empty($langue)) {
         $db = new CRUD();
         $isWebsite = $db->dbQS($id_Website, '_website');
         if (!empty($isWebsite)) {
             $langue = $isWebsite['langue_front'];
             $isWebsite['langue_groupe'] = unserialize($isWebsite['langue_groupe']);
             $isWebsite['langue_groupe'][$langue] = $langue;
             $urlToRedirect = URL_USER . $langue . '/';
             $cLangues = count($isWebsite['langue_groupe']);
             if ($cLangues === 1) {
                 $urlToRedirect = URL;
             }
             if ($cLangues > 1) {
                 header('HTTP/1.1 301 Moved Permanently', false, 301);
                 header('Location: ' . $urlToRedirect);
                 exit;
             }
         }
     }
     if (!empty($this->user) && $zoneArea === 'user' && $_SESSION['doorgets_user']['langue'] !== $langue && $controllerName !== 'changelangue') {
         header('Location: ' . URL_USER . $_SESSION['doorgets_user']['langue'] . '/');
         exit;
     }
     parent::__construct($langue);
     if (!empty($this->user) && !empty($this->user['timezone'])) {
         date_default_timezone_set($this->user['timezone']);
     }
     $this->getParams();
     $this->getController();
     $this->reloadController();
     $this->isRtlLanguage = in_array($this->myLanguage, Constant::$rtlLanguage) ? true : false;
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:39,代码来源:doorGetsUser.php

示例2: AuthUser

require_once BASE . 'config/config.php';
define('BASE_URL', URL);
// Authentification User
$Auth = new AuthUser();
$User = $Auth->isConnected();
if (empty($User)) {
    header('HTTP/1.0 404 Not Found');
    exit;
}
if (array_key_exists('backurl', $_GET)) {
    $backurl = filter_var($_GET['backurl'], FILTER_SANITIZE_URL);
    $_SESSION['backurl'] = $backurl;
}
$crud = new CRUD();
$urlTraduction = '';
$website = $crud->dbQS(1, '_website');
if (!empty($website)) {
    $langueGroupe = @unserialize($website['langue_groupe']);
    $cLangue = count($langueGroupe);
    if ($cLangue) {
        $urlTraduction = $website['langue_front'] . '/';
    }
    if ($website['oauth_facebook_active'] === '1' && !empty($website['oauth_facebook_id']) && !empty($website['oauth_facebook_secret'])) {
        $app_id = $website['oauth_facebook_id'];
        $app_secret = $website['oauth_facebook_secret'];
        $my_url = BASE_URL . 'oauth2/facebook/connexion/';
        \Facebook\FacebookSession::setDefaultApplication($app_id, $app_secret);
        $helper = new \Facebook\FacebookRedirectLoginHelper($my_url);
        $loginUrl = $helper->getLoginUrl();
        if (isset($_GET['code'])) {
            $code = $_GET['code'];
开发者ID:neoartdoo,项目名称:CMS,代码行数:31,代码来源:index.php

示例3: __construct

 public function __construct($lg = '')
 {
     $this->User = new AuthUser();
     $isUser = $this->User->isConnected();
     if (!empty($isUser)) {
         $this->_User = $isUser;
         $this->isUser = true;
     }
     $lgTemp = $lg;
     if (empty($lg)) {
         $db = new CRUD();
         $isWebsite = $db->dbQS(1, '_website');
         if (!empty($isWebsite)) {
             $lgTemp = $isWebsite['langue_front'];
             $isWebsite['langue_groupe'] = unserialize($isWebsite['langue_groupe']);
             $isWebsite['langue_groupe'][$lgTemp] = $lgTemp;
             $urlToRedirect = URL . 't/' . $lgTemp;
             $cLangues = count($isWebsite['langue_groupe']);
             if ($cLangues === 1) {
                 $urlToRedirect = URL;
             }
             if ($cLangues > 1) {
                 header('HTTP/1.1 301 Moved Permanently', false, 301);
                 header('Location: ' . $urlToRedirect);
                 exit;
             }
         }
     }
     if (!empty($isUser)) {
         $this->_lgUrl = $isUser['langue'] . '/';
     }
     parent::__construct($lgTemp);
     if (!empty($lg) && array_key_exists($lgTemp, $this->allLanguages)) {
         $this->configWeb['langue_front'] = $lgTemp;
     }
     if (!empty($lg) && count($this->allLanguagesWebsite) === 1) {
         header('HTTP/1.1 301 Moved Permanently', false, 301);
         header('Location: ' . URL);
         exit;
     }
     if (!array_key_exists($this->configWeb['langue_front'], $this->configWeb['langue_groupe']) && empty($this->allLanguagesWebsite)) {
         header('Location:' . URL . '#');
         exit;
     }
     @date_default_timezone_set($this->configWeb['horaire']);
     $this->myLanguage = $this->configWeb['langue_front'];
     $this->module = $this->configWeb['module_homepage'];
     $this->theme = $this->configWeb['theme'];
     $this->rubriques = $this->getRubriques('_rubrique');
     $this->activeModules = $this->getAllActiveModules();
     // Widget Newsletter init
     $this->initNewsletterWidget();
     $themeExists = $this->checkTheme();
     if (empty($themeExists)) {
         die('The dir <b>' . THEME . '/' . $this->theme . '</b> not found.');
     }
     $this->htmlContent = $this->getHtmlWaitingPage();
     $isIpUserStatut = $this->isIpUserStatut();
     if ($this->configWeb['statut'] === '1' || $isIpUserStatut) {
         $this->loadParams();
         $this->loadPosition();
         if ($this->position == 'error') {
             $this->redirectToErrorHeader();
         }
         $this->loadMeta();
         $this->isRtlLanguage = in_array($this->myLanguage, Constant::$rtlLanguage) ? true : false;
         // Widget Comment init
         $this->initCommentWidget();
         $this->genController();
         $this->htmlContent = $this->getHtmlWrapper();
     }
 }
开发者ID:neoartdoo,项目名称:CMS,代码行数:72,代码来源:doorgetsWebsite.php

示例4: AuthUser

// Google API
include BASE . 'doorgets/lib/google/src/Google/autoload.php';
// Authentification User
$Auth = new AuthUser();
$User = $Auth->isConnected();
if (empty($User)) {
    header('HTTP/1.0 404 Not Found');
    exit;
}
if (array_key_exists('backurl', $_GET)) {
    $backurl = filter_var($_GET['backurl'], FILTER_SANITIZE_URL);
    $_SESSION['backurl'] = $backurl;
}
$crud = new CRUD();
$urlTraduction = '';
$website = $crud->dbQS(Constant::$websiteId, '_website');
if (!empty($website)) {
    $langueGroupe = @unserialize($website['langue_groupe']);
    $cLangue = count($langueGroupe);
    if ($cLangue) {
        $urlTraduction = $website['langue_front'] . '/';
    }
    if ($website['oauth_google_active'] === '1' && !empty($website['oauth_google_id']) && !empty($website['oauth_google_secret'])) {
        $client = new Google_Client();
        $client->setApplicationName("Mon appliation");
        $client->setAccessType('offline');
        $client->setClientId($website['oauth_google_id']);
        $client->setClientSecret($website['oauth_google_secret']);
        $client->setRedirectUri(BASE_URL . 'oauth2/google/connexion');
        $client->addScope("https://www.googleapis.com/auth/plus.login");
        $client->addScope("https://www.googleapis.com/auth/userinfo.email");
开发者ID:doorgets,项目名称:cms,代码行数:31,代码来源:index.php

示例5: CRUD

    include BASE . 'doorgets/lib/facebook/src/Facebook/FacebookCanvasLoginHelper.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/Entities/AccessToken.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/HttpClients/FacebookHttpable.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/HttpClients/FacebookCurl.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/HttpClients/FacebookCurlHttpClient.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/FacebookSDKException.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/FacebookRequestException.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/FacebookAuthorizationException.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/GraphLocation.php';
    include BASE . 'doorgets/lib/facebook/src/Facebook/GraphUser.php';
} else {
    exit;
}
$crud = new CRUD();
$urlTraduction = '';
$website = $crud->dbQS(Constant::$websiteId, '_website');
if (!empty($website)) {
    $langueGroupe = @unserialize($website['langue_groupe']);
    $cLangue = count($langueGroupe);
    if ($cLangue) {
        $urlTraduction = $website['langue_front'] . '/';
    }
    if ($website['oauth_facebook_active'] === '1' && !empty($website['oauth_facebook_id']) && !empty($website['oauth_facebook_secret'])) {
        $app_id = $website['oauth_facebook_id'];
        $app_secret = $website['oauth_facebook_secret'];
        $my_url = BASE_URL . 'oauth2/facebook/login/';
        $permissions = array('email');
        // optional
        \Facebook\FacebookSession::setDefaultApplication($app_id, $app_secret);
        $helper = new \Facebook\FacebookRedirectLoginHelper($my_url);
        $loginUrl = $helper->getLoginUrl($permissions);
开发者ID:doorgets,项目名称:cms,代码行数:31,代码来源:index.php


注:本文中的CRUD::dbQS方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。