• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fctErrorMSG函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中fctErrorMSG函数的典型用法代码示例。如果您正苦于以下问题:PHP fctErrorMSG函数的具体用法?PHP fctErrorMSG怎么用?PHP fctErrorMSG使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: save

 private static function save()
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     //Valider si une banque existe déjà dans ce lieu
     $query = 'SELECT casino_id' . ' FROM ' . DB_PREFIX . 'casino' . ' WHERE casino_lieu=:casinoLieu' . ' AND casino_id!=:casinoId' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':casinoLieu', $_POST['casino_lieu'], PDO::PARAM_STR);
     $prep->bindValue(':casinoId', $_POST['id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr !== false) {
         return fctErrorMSG('Un casino existe déjà dans ce lieu.', '?mj=Lieu_CasinoMod', array('id' => $_POST['id']), false);
     }
     $query = 'UPDATE ' . DB_PREFIX . 'casino' . ' SET' . ' casino_lieu	= :lieu,' . ' casino_nom	= :nom,' . ' casino_cash	= :cash' . ' WHERE casino_id=:casinoId;';
     $prep = $db->prepare($query);
     $prep->bindValue(':lieu', $_POST['casino_lieu'], PDO::PARAM_STR);
     $prep->bindValue(':nom', $_POST['casino_nom'], PDO::PARAM_STR);
     $prep->bindValue(':cash', $_POST['casino_cash'], PDO::PARAM_INT);
     $prep->bindValue(':casinoId', $_POST['id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $prep->closeCursor();
     $prep = NULL;
     return true;
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:29,代码来源:CasinoMod.php


示例2: sessionStart

 /**
  * Initialise la session.
  */
 private function sessionStart()
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     $db->beginTransaction();
     $this->sessId = $this->getCookieNo();
     if (empty($this->sessId)) {
         $this->sessId = $this->generateSessId();
         setcookie('sessId', $this->sessId, time() + 60 * 60 * 24 * 30);
         //Créer le cookie (expire après 30 jours)
     } elseif (!isset($_COOKIE['sessId'])) {
         fctErrorMSG("Votre navigateur ne supporte pas les cookies, vous devez les accepter pour ce site.");
         die;
     }
     $this->createOrExtendSession();
     $db->commit();
     //Effacer les sessions expirées
     $query = 'DELETE FROM ' . DB_PREFIX . 'session' . ' WHERE expiration < :expiration;';
     $prep = $db->prepare($query);
     $prep->bindValue(':expiration', CURRENT_TIME, PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $prep->closeCursor();
     $prep = NULL;
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:29,代码来源:Session.php


示例3: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$mj)
 {
     if (!isset($_POST['db_id'])) {
         return fctErrorMSG("Aucun item sélectionné.");
     }
     if ($_POST['db_id'] < 10) {
         return fctErrorMSG("Item système, suppression interdite.");
     }
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     $query = 'DELETE FROM `' . DB_PREFIX . 'item_db`' . ' WHERE `db_id` = :db_id' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':db_id', $_POST['db_id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $prep->closeCursor();
     $prep = NULL;
     //Suppression de l'item en inventaire
     $query = 'DELETE FROM `' . DB_PREFIX . 'item_inv`' . ' WHERE `inv_dbid` = :db_id';
     $prep = $db->prepare($query);
     $prep->bindValue(':db_id', $_POST['db_id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $prep->closeCursor();
     $prep = NULL;
     //Suppression des actions actuelles
     $query = 'DELETE FROM `' . DB_PREFIX . 'item_menu`' . ' WHERE `item_dbid` = :db_id';
     $prep = $db->prepare($query);
     $prep->bindValue(':db_id', $_POST['db_id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $prep->closeCursor();
     $prep = NULL;
     die("<script>location.href='?mj=Item_Sac';</script>");
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:34,代码来源:SacDel.php


示例4: generatePage

 public static function generatePage(&$tpl, &$session, &$account)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['id'])) {
         return fctErrorMSG('Données requises manquantes. (cheat)');
     }
     //Trouver les informations sur le perso
     $query = 'SELECT id, nom' . ' FROM ' . DB_PREFIX . 'perso' . ' WHERE	id=:persoId ' . ' AND userid=:userId' . ' AND inscription_valide="mod"' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':persoId', $_GET['id'], PDO::PARAM_INT);
     $prep->bindValue(':userId', $account->getId(), PDO::PARAM_INT);
     $prep->execute($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr === false) {
         return fctErrorMSG('Ce personnage n\'existe pas, ne vous appartiend pas, ou n\'est pas en phase de refus. (cheat)');
     }
     $tpl->set('PERSO', $arr);
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/delPerso.htm', __FILE__, __LINE__);
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:25,代码来源:DelPerso.php


示例5: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$mj)
 {
     if (!$mj->accessDev()) {
         return fctErrorMSG('Vous n\'avez pas accès à cette page.');
     }
     if (!isset($_GET['id'])) {
         return fctErrorMSG('Id manquant.');
     }
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     //Récupérer l'erreur dans la base de donnée
     $query = 'SELECT * FROM `' . DB_PREFIX . 'buglog`' . ' WHERE `id` = :id' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':id', $_GET['id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $result = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if (count($result) == 0) {
         return fctErrorMSG('L\'erreur n\'existe pas.');
     }
     $tpl->set("ERROR", $result);
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . '/html/Mj/Dev/ErrLogDetails.htm');
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:26,代码来源:ErrLogDetails.php


示例6: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$mj)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['id']) || empty($_GET['id'])) {
         return fctErrorMSG('Vous devez sélectionner un personnage.');
     }
     //suppression du perso si le MJ est sûr
     if (isset($_GET['action']) && $_GET['action'] == 'suppr') {
         self::delete($_GET['id'], $mj->getNom());
         die("<script type=\"text/javascript\">location.href='?mj=index';</script>");
     }
     //Trouver les infos sur le persos :
     $query = 'SELECT *' . ' FROM ' . DB_PREFIX . 'perso' . ' WHERE id=:id' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':id', $_GET['id'], PDO::PARAM_INT);
     $prep->execute($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     //envoie des infos à l'autre page (tpl)
     $tpl->set('perso', $arr);
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . '/html/Mj/Perso/Del.htm');
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:26,代码来源:Del.php


示例7: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     //Valider l'état du perso
     if (!$perso->isConscient()) {
         return fctErrorMSG('Vous n\'êtes pas en état d\'effectuer cette action.');
     }
     //Afficher la liste des livres disponibles dans ce lieu
     $query = 'SELECT l.* ' . ' FROM ' . DB_PREFIX . 'lieu_livre as b' . ' LEFT JOIN ' . DB_PREFIX . 'item_db as l ON (l.db_id = b.itemDbId)' . ' WHERE lieuId=:lieuId' . ' ORDER BY l.db_nom ASC;';
     $prep = $db->prepare($query);
     $prep->bindValue(':lieuId', $perso->getLieu()->getId(), PDO::PARAM_INT);
     $prep->execute($db, __FILE__, __LINE__);
     $arrLivre = $prep->fetchAll();
     $prep->closeCursor();
     $prep = NULL;
     $LIVRES = array();
     if (count($arrLivre) != 0) {
         foreach ($arrLivre as &$arr) {
             $LIVRES[] = new Member_ItemLivre($arr);
         }
         $tpl->set('LIVRES', $LIVRES);
     }
     //Retourner le template bâti.
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/BiblioListe.htm', __FILE__, __LINE__);
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:28,代码来源:Biblio.php


示例8: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     if (!$perso->isConscient()) {
         return fctErrorMSG('Vous n\'êtes pas en état d\'effectuer cette action.');
     }
     //Lister tout les accès média du lieu
     $i = 0;
     $mediaAccesEmetteur = array();
     $mediaAccesRecepteur = array();
     while ($media = $perso->getLieu()->getMediaAcces($i++)) {
         if ($media->isRecepteur()) {
             $mediaAccesRecepteur[] = $media;
         } else {
             $mediaAccesEmetteur[] = $media;
         }
     }
     //Définir si le perso est gérant
     $gerant = false;
     if ($perso->getLieu()->isgerant($perso)) {
         $gerant = true;
     }
     $tpl->set('LIST_MEDIA_ACCES_RECEPTEUR', $mediaAccesRecepteur);
     $tpl->set('LIST_MEDIA_ACCES_EMETTEUR', $mediaAccesEmetteur);
     $tpl->set('GERANT', $gerant);
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/MediaListe.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:27,代码来源:MediaListe.php


示例9: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     //Vérifier que le lieu dans lequel est le perso permet bien de recycler les items
     $query = 'SELECT *' . ' FROM `' . DB_PREFIX . 'lieu_menu`' . ' WHERE `lieutech`=:lieuTech' . ' AND `url`="Recycler"' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':lieuTech', $perso->getLieu()->getNomTech(), PDO::PARAM_STR);
     $prep->execute($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr === false) {
         return fctErrorMSG('Vous n\'êtes pas dans un lieu permettant ce type d\'action.');
     }
     $i = 0;
     $e = 0;
     $objets = array();
     while ($item = $perso->getInventaire($i++)) {
         $objets[$e++] = $item;
     }
     $tpl->set('OBJETS', $objets);
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/Recycler.htm', __FILE__, __LINE__);
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:27,代码来源:Recycler.php


示例10: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante	//BUT: Démarrer un template propre à cette page
     $errorUrl = '?popup=1&amp;m=Action_Lieu_Boutique';
     //Définir les accès d'administration
     if (!$perso->getLieu()->isGerant($perso)) {
         return fctErrorMSG('Vous devez être propriétaire du lieu pour pouvoir l\'administrer.', $errorUrl, array('perso' => $perso, 'lieu' => $lieu));
     }
     //Valider si le lieu actuel est une boutique
     if (!$perso->getLieu()->isBoutique()) {
         return fctErrorMSG('Ce lieu n\'est pas une boutique.');
     }
     //LISTER TOUT LES ITEMS EN VENTE DANS LA BOUTIQUE
     $i = 0;
     $query = 'UPDATE `' . DB_PREFIX . 'item_inv`' . ' SET `inv_boutiquePrixVente`=:prixVente,' . ' `inv_boutiquePrixAchat`=:prixAchat' . ' WHERE `inv_id`=:invId' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     while ($item = $perso->getLieu()->getBoutiqueInventaire($i++)) {
         $btvnt = str_replace(",", ".", $_POST['btvnt_' . $item->getInvId()]);
         $btach = str_replace(",", ".", $_POST['btach_' . $item->getInvId()]);
         $btvnt = is_numeric($btvnt) ? $btvnt : -1;
         $btach = is_numeric($btach) ? $btach : -1;
         $prep->bindValue(':prixVente', $btvnt, PDO::PARAM_INT);
         $prep->bindValue(':prixAchat', $btach, PDO::PARAM_INT);
         $prep->bindValue(':invId', $item->getInvId(), PDO::PARAM_INT);
         $prep->execute($db, __FILE__, __LINE__);
     }
     $prep->closeCursor();
     $prep = NULL;
     $tpl->set('PAGE', 'Action_Lieu_BoutiqueAdmin');
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/action_redirect.htm', __FILE__, __LINE__);
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:34,代码来源:BoutiqueAdminChangerPrix.php


示例11: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     //Valider si le # du compte à été recu
     if (!isset($_GET['id'])) {
         return fctErrorMSG('Id du compte manquant.');
     }
     //Valider si le # de la banque a été reçu
     if (!isset($_GET['bid'])) {
         return fctErrorMSG('Id de la banque manquant.');
     }
     //Passer l'id de la banque au template (pour le retour)
     $tpl->set('BANKID', $_GET['bid']);
     try {
         $compte = Member_BanqueCompte::getCompteFromId($_GET['id']);
     } catch (Exception $e) {
         return fctErrorMSG($e->getMessage());
     }
     //Passer le compte au template
     $tpl->set('COMPTE', $compte);
     //Charger les transactions du compte
     $transactions = $compte->getTransactionsAuto();
     if (!empty($transactions)) {
         $tpl->set('TRANSACTIONS', $transactions);
     }
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Mj/Lieu/BanqueTransactionAuto.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:26,代码来源:BanqueTransactionAuto.php


示例12: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$mj)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['id'])) {
         return fctErrorMSG('Données requises manquantes.');
     }
     //Instancier le lieu
     try {
         $lieu = Member_LieuFactory::createFromId((int) $_GET['id']);
     } catch (Exception $e) {
         die($e->getMessage());
     }
     $tpl->set('LIEU_TECH', $lieu->getNomTech());
     //Lister tout les items que le lieu possède (section de gauche)
     $i = 0;
     $e = 0;
     $f = 0;
     $arrItem = array();
     //Listing d'un lieu
     while ($item = $lieu->getBoutiqueInventaire($i++)) {
         $arrItem[$e++] = $item;
     }
     usort($arrItem, "compare");
     $tpl->set('ITEMS', $arrItem);
     $tpl->set('CASIER', isset($_GET['cid']) ? $_GET['cid'] : false);
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Mj/Lieu/Boutique.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:31,代码来源:Boutique.php


示例13: generatePage

 public static function generatePage(&$tpl, &$session, &$account)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['id']) || !isset($_POST['yes'])) {
         return fctErrorMSG('Données requises manquantes. (cheat)');
     }
     if ($session->getVar('persoId') == $_GET['id']) {
         $session->setVar('persoId', NULL);
     }
     //Trouver les informations sur le perso / Valider s'il est authorisé à être modifié
     $query = 'SELECT id' . ' FROM ' . DB_PREFIX . 'perso' . ' WHERE id=:persoId' . ' AND userid=:userId' . ' AND inscription_valide="mod"' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':persoId', $_GET['id'], PDO::PARAM_INT);
     $prep->bindValue(':userId', $account->getId(), PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr === false) {
         return fctErrorMSG('Ce personnage n\'existe pas, ne vous appartiend pas, ou n\'est pas en phase de refus. (cheat)');
     }
     //Apeller la fonction qui gère la suppression de perso.
     Mj_Perso_Del::delete($_GET['id'], $account->getUser());
     //Augmenter le nombre de création de perso de 1
     $query = 'UPDATE ' . DB_PREFIX . 'account' . ' SET auth_creation_perso=auth_creation_perso+1' . ' WHERE id=:userId' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':userId', $account->getId(), PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     //Retourner le template complété/rempli
     $tpl->set('PAGE', 'News');
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/redirect.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:35,代码来源:DelPerso2.php


示例14: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     //Valider si le # du compte à été recu
     if (!isset($_POST['compte'])) {
         return fctErrorMSG('Ce compte est invalide (aucun compte).');
     }
     //Passer le # de compte au template
     $tpl->set('COMPTE', $_POST['compte']);
     try {
         $compte = Member_BanqueCompte::getCompteFromNoCompte($_POST['compte']);
     } catch (Exception $e) {
         return fctErrorMSG($e->getMessage());
     }
     //Vérifier si le compte appartiend bien au perso
     if ($compte->getIdPerso() != $perso->getId()) {
         return fctErrorMSG('Ce compte ne vous appartiend pas.');
     }
     //Vérifier si le compte est autorisé à avoir des transactions automatiques
     if (!$compte->authAutoTransactions()) {
         return fctErrorMSG('Ce compte n\'est pas autorisé à faire des transactions automatiques.');
     }
     //Charger les transactions du compte
     $transactions = $compte->getTransactionsAuto();
     if (!empty($transactions)) {
         $tpl->set('TRANSACTIONS', $transactions);
     }
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/BanqueTransactionAuto.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:28,代码来源:BanqueTransactionAuto.php


示例15: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$mj)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['id'])) {
         return fctErrorMSG('Vous devez sélectionner un item.');
     }
     if (!is_numeric($_GET['id'])) {
         return fctErrorMSG('ID non numérique');
     }
     //Trouver des informations sur l'item
     $query = 'SELECT *' . ' FROM `' . DB_PREFIX . 'item_inv`' . ' WHERE `id` = :id;';
     $prep = $db->prepare($query);
     $prep->bindValue(':id', $_GET['id'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $result = $prep->fetchAll();
     $prep->closeCursor();
     $prep = NULL;
     if (count($result) == 0) {
         return fctErrorMSG('Cet item n\'existe pas.');
     }
     //Effectuer le rendu tableau de l'inventaire
     $query = 'SELECT *' . ' FROM `' . DB_PREFIX . 'item_inv`' . ' INNER JOIN `' . DB_PREFIX . 'item_db` ON (`db_id` = `inv_dbid`)' . ' WHERE `inv_itemid` = ' . mysql_real_escape_string($_GET['id']) . ';';
     $tableHTML = generateInventaireTable($tpl, $query, 'Item_Inventaire', $_GET['id'], '800px');
     if (!empty($tableHTML)) {
         $tpl->set('ITEMS_TABLE', $tableHTML);
     }
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Mj/Item/Inventaire.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:32,代码来源:Inventaire.php


示例16: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante	//BUT: Démarrer un template propre à cette page
     $coutPa = 50;
     //Vérifier l'état du perso
     if (!$perso->isAutonome()) {
         return fctErrorMSG('Votre n\'êtes pas en état d\'effectuer cette action.');
     }
     //Valider si le lieu actuel est un labo
     if (!$perso->getLieu()->isLaboDrogue()) {
         return fctErrorMSG('Ce lieu n\'est pas un laboratoire de drogue.');
     }
     //LISTER TOUTES LES DROGUES_SUBSTANCS QUE LE PERSO POSSÈDE SUR LUI
     $i = 0;
     $items = array();
     while ($item = $perso->getInventaire($i++)) {
         if ($item instanceof Member_ItemDrogueSubstance) {
             $items[] = $item;
         }
     }
     $tpl->set('INV_PERSO', $items);
     $tpl->set('COUT_PA', $coutPa);
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/LaboDrogue.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:27,代码来源:LaboDrogue.php


示例17: save

 private static function save()
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!is_numeric($_POST['carte_nip'])) {
         return fctErrorMSG('Le NIP doit être un entier.', '?mj=Lieu_BanqueCompteMod', null, false);
     }
     //Valider si le # de banque+compte existe
     $query = 'SELECT compte_id' . ' FROM ' . DB_PREFIX . 'banque_comptes' . ' WHERE	compte_banque=:banqueNo' . ' AND compte_compte=:compte' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':banqueNo', $_POST['carte_banque'], PDO::PARAM_INT);
     $prep->bindValue(':compte', $_POST['carte_compte'], PDO::PARAM_STR);
     $prep->execute($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr === false) {
         return fctErrorMSG('Le # de compte (' . $_POST['carte_banque'] . '-' . $_POST['carte_compte'] . ') est innexistant.', '?mj=Lieu_BanqueCompteCarteAdd&id=' . $_GET['id'], null, false);
     }
     $query = 'INSERT INTO ' . DB_PREFIX . 'banque_cartes' . ' (carte_banque, carte_compte, carte_nom, carte_nip, carte_valid)' . ' VALUES' . ' (:banqueNo, :compte, :nom, :nip, :valid);';
     $prep = $db->prepare($query);
     $prep->bindValue(':banqueNo', $_POST['carte_banque'], PDO::PARAM_INT);
     $prep->bindValue(':compte', $_POST['carte_compte'], PDO::PARAM_STR);
     $prep->bindValue(':nom', $_POST['carte_nom'], PDO::PARAM_STR);
     $prep->bindValue(':nip', $_POST['carte_nip'], PDO::PARAM_STR);
     $prep->bindValue(':valid', $_POST['carte_valid'], PDO::PARAM_STR);
     $prep->execute($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:33,代码来源:BanqueCompteCarteAdd.php


示例18: generatePage

 public static function generatePage(&$tpl, &$session, &$account, &$perso)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     $errorUrl = '?popup=1&amp;m=Action_Lieu_Guichet';
     //Vérifier l'état du perso
     if (!$perso->isAutonome()) {
         return fctErrorMSG('Votre n\'êtes pas en état d\'effectuer cette action.', $errorUrl);
     }
     //Vérifier si une carte à été sélectionnée
     if (!isset($_POST['carteid']) || !is_numeric($_POST['carteid'])) {
         return fctErrorMSG('Aucune carte sélectionnée.', $errorUrl);
     }
     $tpl->set('CARD_ID', $_POST['carteid']);
     //ToDo: Vérifier si le # de carte est valide
     $query = 'SELECT *' . ' FROM ' . DB_PREFIX . 'banque_cartes' . ' WHERE carte_id = :carteId' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':carteId', $_POST['carteid'], PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $arr = $prep->fetch();
     $prep->closeCursor();
     $prep = NULL;
     if ($arr === false) {
         return fctErrorMSG('Cette carte à été désactivée.', $errorUrl);
     }
     //Afficher le clavier numérique pour composer le NIP
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Member/Action/Lieu/Guichet2.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:30,代码来源:Guichet2.php


示例19: generatePage

 public static function generatePage(&$tpl, &$session, &$account)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     //Afficher un message critique sur la page principale.
     if (defined('WARNING_MESSAGE') && WARNING_MESSAGE !== NULL) {
         $tpl->set('WARNING_MESSAGE', WARNING_MESSAGE);
     }
     //Générer le contenu de la page
     $query = 'SELECT db_param' . ' FROM ' . DB_PREFIX . 'item_db' . ' WHERE db_id=:livreId' . ' LIMIT 1;';
     //4 = Texte page d'intro
     $prep = $db->prepare($query);
     $prep->bindValue(':livreId', 4, PDO::PARAM_INT);
     $prep->executePlus($db, __FILE__, __LINE__);
     $content = $prep->fetch();
     if ($content === false) {
         return fctErrorMSG('Texte non-trouvé :(');
     }
     //Placer le contenu de la page dans le template
     $tpl->set('PAGE_CONTENU', BBCodes(stripslashes($content[0])));
     //Retourner le template complété/rempli
     return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Visitor/main.htm', __FILE__, __LINE__);
 }
开发者ID:FMaz008,项目名称:ccv4,代码行数:25,代码来源:Main.php


示例20: generatePage

 public static function generatePage(&$tpl, &$session, &$account)
 {
     $dbMgr = DbManager::getInstance();
     //Instancier le gestionnaire
     $db = $dbMgr->getConn('game');
     //Demander la connexion existante
     if (!isset($_GET['u']) || !isset($_GET['c'])) {
         return fctErrorMSG('Adresse invalide.');
     }
     $query = 'SELECT code_validation' . ' FROM ' . DB_PREFIX . 'account' . ' WHERE user=:user' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':user', $_GET['u'], PDO::PARAM_STR);
     $prep->execute($db);
     $content = $prep->fetch();
     if ($content === false) {
         return fctErrorMSG('Aucune correspondance pour ce nom d\'utilisateur.');
     }
     if ($content[0] != $_GET['c']) {
         return fctErrorMSG('Le code de validation est invalide.');
     }
     $query = 'UPDATE ' . DB_PREFIX . 'account' . ' SET code_validation = NULL' . ' WHERE user = :user' . ' LIMIT 1;';
     $prep = $db->prepare($query);
     $prep->bindValue(':user', $_GET['u'], PDO::PARAM_STR);
     $prep->execute($db);
     //Retourner le template complété/rempli
     if (isset($_GET['change'])) {
         return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Visitor/validerEmailChange.htm', __FILE__, __LINE__);
     } else {
         return $tpl->fetch($account->getSkinRemotePhysicalPath() . 'html/Visitor/validerEmail.htm', __FILE__, __LINE__);
     }
 }
开发者ID:BalamWeb,项目名称:ccv4,代码行数:31,代码来源:ValiderEmail.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP feather_escape函数代码示例发布时间:2022-05-15
下一篇:
PHP fclose函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap