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


PHP CRUD::dbQU方法代码示例

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


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

示例1: updateDatabase

 public function updateDatabase()
 {
     $fileTempAdmin = BASE . 'temp/admin.php';
     if (is_file($fileTempAdmin)) {
         $cFile = file_get_contents($fileTempAdmin);
         $cOutFile = unserialize($cFile);
         $adm_email = $cOutFile['email'];
     }
     $fileTempDatabase = BASE . 'temp/database.php';
     if (is_file($fileTempDatabase)) {
         $cFileDatabase = file_get_contents($fileTempDatabase);
         if ($cOutFileDatabase = unserialize($cFileDatabase)) {
             $sql_host = $cOutFileDatabase['hote'];
             $sql_db = $cOutFileDatabase['name'];
             $sql_login = $cOutFileDatabase['login'];
             $sql_pwd = $cOutFileDatabase['password'];
         }
         $db = new CRUD($sql_host, $sql_db, $sql_login, $sql_pwd);
         $fileTempWebsite = BASE . 'temp/website.php';
         if (is_file($fileTempWebsite)) {
             $cFileWebiste = file_get_contents($fileTempWebsite);
             if ($cOutFileWebsite = unserialize($cFileWebiste)) {
                 $dataTrad['title'] = $cOutFileWebsite['title'];
                 $dataTrad['slogan'] = $cOutFileWebsite['slogan'];
                 $dataTrad['description'] = $cOutFileWebsite['description'];
                 $dataTrad['copyright'] = $cOutFileWebsite['copyright'];
                 $dataTrad['year'] = $cOutFileWebsite['year'];
                 $dataTrad['keywords'] = $cOutFileWebsite['keywords'];
                 $dataTrad['date_modification'] = time();
                 if (!empty($cOutFile)) {
                     $fileTempUser = BASE . 'temp/_fromUser.php';
                     if (is_file($fileTempUser)) {
                         $dataFileUser = file_get_contents($fileTempUser);
                         if ($dataUser = unserialize($dataFileUser)) {
                             $dataUserId = $dataUser['user_id'];
                             $login = $cOutFile['email'];
                             $crypto = $this->_cryptMe($cOutFile['password']);
                             $queryUser['login'] = $login;
                             $queryUser['password'] = $crypto['password'];
                             $queryUser['salt'] = $crypto['salt'];
                             $db->dbQU($dataUserId, $queryUser, '_users');
                             $queryUserInfo['email'] = $login;
                             $queryUserInfo['langue'] = $_SESSION['doorgetsLanguage'];
                             $db->dbQU($dataUserId, $queryUserInfo, '_users_info');
                             $arrGroupeLangue = array();
                             foreach ($this->doorgets->allLanguages as $key_language => $label) {
                                 $dataTrad['langue'] = $key_language;
                                 $db->dbQD($key_language, '_website_traduction', 'langue', '=', '');
                                 $arrGroupeLangue[$key_language] = $db->dbQI($dataTrad, '_website_traduction');
                             }
                             $lgActuel = $this->doorgets->getLanguage();
                             $dataWebsite['version_doorgets'] = '7.0';
                             $dataWebsite['langue'] = $lgActuel;
                             $dataWebsite['langue_front'] = $lgActuel;
                             $dataWebsite['langue_groupe'] = serialize(array($lgActuel => $lgActuel));
                             $dataWebsite['horaire'] = $this->doorgets->getTimeZone();
                             $dataWebsite['email'] = $adm_email;
                             $db->dbQU(1, $dataWebsite, '_website');
                         }
                     }
                 }
             }
         }
     }
 }
开发者ID:doorgets,项目名称:cms,代码行数:65,代码来源:polymorphicRequest.php

示例2: updateDatabase

 public function updateDatabase($data = array())
 {
     $adm_email = $data['user_email'];
     $sql_host = $data['database_host'];
     $sql_db = $data['database_name'];
     $sql_login = $data['database_login'];
     $sql_pwd = $data['database_password'];
     $db = new CRUD($sql_host, $sql_db, $sql_login, $sql_pwd);
     $dataTrad['title'] = $data['website_title'];
     $dataTrad['slogan'] = $data['website_slogan'];
     $dataTrad['description'] = $data['website_meta_description'];
     $dataTrad['copyright'] = $data['website_copyright'];
     $dataTrad['year'] = $data['website_year_creation'];
     $dataTrad['keywords'] = $data['website_meta_keywords'];
     $dataTrad['date_modification'] = time();
     $fileTempUser = BASE . 'temp/_fromUser.php';
     if (is_file($fileTempUser)) {
         $dataFileUser = file_get_contents($fileTempUser);
         if ($dataUser = unserialize($dataFileUser)) {
             $dataUserId = $dataUser['user_id'];
             $login = $data['user_email'];
             $crypto = $this->_cryptMe($data['user_password']);
             $queryUser['login'] = $login;
             $queryUser['password'] = $crypto['password'];
             $queryUser['salt'] = $crypto['salt'];
             $db->dbQU($dataUserId, $queryUser, '_users');
             $queryUserInfo['email'] = $login;
             $queryUserInfo['langue'] = $data['langue'];
             $db->dbQU($dataUserId, $queryUserInfo, '_users_info');
             $arrGroupeLangue = array();
             foreach ($this->allLanguages as $key_language => $label) {
                 $dataTrad['langue'] = $key_language;
                 $db->dbQD($key_language, '_website_traduction', 'langue', '=', '');
                 $arrGroupeLangue[$data['langue']] = $db->dbQI($dataTrad, '_website_traduction');
             }
             $dataWebsite['version_doorgets'] = '7.0';
             $dataWebsite['langue'] = $data['langue'];
             $dataWebsite['langue_front'] = $data['langue'];
             $dataWebsite['langue_groupe'] = serialize(array($data['langue'] => $data['langue']));
             $dataWebsite['horaire'] = $data['timezone'];
             $dataWebsite['email'] = $adm_email;
             $db->dbQU(1, $dataWebsite, '_website');
         }
     }
 }
开发者ID:vinothtimes,项目名称:doorgets,代码行数:45,代码来源:doorgetsFunctions.php

示例3: array

         if ($userId == 0) {
             $userExists = $crud->dbQS($email, '_users', 'login');
             if (!empty($userExists)) {
                 $UserFacebookEntity->setIdUser($userExists['id']);
                 $UserFacebookEntity->save();
                 $userInfoExists = $crud->dbQS($userExists['id'], '_users_info', 'id_user');
                 if (!empty($userInfoExists)) {
                     // Connect user
                     $_token = md5(uniqid(mt_rand(), true));
                     $_SESSION['doorgets_user']['id'] = $userInfoExists['id_user'];
                     $_SESSION['doorgets_user']['groupe'] = $userInfoExists['network'];
                     $_SESSION['doorgets_user']['login'] = $userExists['login'];
                     $_SESSION['doorgets_user']['password'] = $userExists['password'];
                     $_SESSION['doorgets_user']['langue'] = $userInfoExists['langue'];
                     $_SESSION['doorgets_user']['token'] = $_token;
                     $crud->dbQU($userExists['id'], array('token' => $_token), '_users');
                     FlashInfo::set(':)');
                 }
             } else {
                 header('Location: ' . BASE_URL . 'dg-user/' . $urlTraduction . '?controller=authentification&action=register');
                 exit;
             }
         }
     } else {
         $_SESSION = array();
         header('Location: ' . BASE_URL . 'dg-user/' . $urlTraduction . '?controller=authentification&action=register&ss');
         exit;
     }
     header('Location: ' . $url);
     exit;
 } else {
开发者ID:doorgets,项目名称:cms,代码行数:31,代码来源:index.php


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