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

PHP getViewByName函数代码示例

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

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



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

示例1: run

	public function run() {
	
	$book = $_POST; 

	$checkCodeBarre = $this->database->checkCodeBarre($book['code']);
   $checkShelfMark = $this->database->checkShelfMark($book['titre'],$book['cote']);
	
	if(!$checkCodeBarre){

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Ce code barre existe déjà", "error");
			return false;
		}

	if(!$checkShelfMark){

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("La cote saisie ne correspond pas au titre de ce livre", "error");
			return false;
	 }

		$sql  = $this->database->addBook($book);
		
		if(!$sql){

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Erreur lors de l'enregistrement du livre", "error");
			return false;
	 }
		

		$this->setView(getViewByName("Message"));
		$this->getView()->setMessage("Enregistrement du Livre réussi", "success");
 
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:35,代码来源:AddBookAction.inc.php


示例2: run

	public function run() {
	
		$members = $this->database->loadMembers();
		$this->setView(getViewByName("ManageMember"));
		$this->getView()->setMembers($members);
			
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:7,代码来源:ManageMemberAction.inc.php


示例3: run

	public function run() {
	
	
		$this->setView(getViewByName("RegisterMemberForm"));
	
			
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:7,代码来源:RegisterMemberAction.inc.php


示例4: run

	public function run() {
	
		$books = $this->database->loadBooks();
		$this->setView(getViewByName("MyBooksSearch"));
		$this->getView()->setBooks($books);
			
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:7,代码来源:LookBooksAction.inc.php


示例5: run

	public function run() {
	
		 $book = NULL;

		 $option = $_POST['search_book'];
		 $arg		= $_POST['argument'];


		if($option=="titre"){
			$books = $this->database->loadBooksByTitle($arg);
		}

		if($option=="auteur"){
			$books = $this->database->loadBooksByAuthor($arg);
		}

		if($option=="mot-cle"){
			$books = $this->database->loadBookByKeyword($arg);
		}

		$this->setView(getViewByName("ManageBook"));
		$this->getView()->setBooks($books);
			
			
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:25,代码来源:SearchBookOptionAction.inc.php


示例6: run

public function run() {
		/* TODO START */
    	
		$tableau = $_POST["tableau"]; // contient tous les mots insérer par le joueur.
		$proposal= $_POST["word"];
	   $time = $_POST["chrono"]; // temps entre le début de la partie et la l'envoie d'un mot.
		
	    
		if(!isset($proposal) || trim($proposal)===''){
			$this->setMessageView("Vous devez entrer un mot de 8 lettres", "alert-error");
			return false;
		}

        if(strlen($proposal) != 8){
           $this->setMessageView("Vous devez entrer un mot de huit lettres", "alert-error");
			return false;
        }
      
        
		 $secretword = $this->database->getSecretWord(); 
		
		 $motus = $this->loadMotus($secretword, $tableau);
		 $this->setView(getViewByName("JSON"));
       $this->getView()->setObject($motus->getColors());
       
       $owner = $this->getSessionLogin();
		
      if($motus->getResult()){
		 	$this->database->addPointWon($owner, $time);
		}
	

		/* TODO END */
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:34,代码来源:ProposalAction.inc.php


示例7: run

	public function run() {
	
	 	$member = $_POST;
		$checkMember 		= $this->database->checkMemberPassword($member['id_adherent']);
	 	$saveUpdateMember = $this->database->updateMember($member);


		if(!$checkMember ){
			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Cet adhérent n'existe pas", "error");
			return false;
		}
		
	 
		if(!$saveUpdateMember){
		
			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Echec de la mise à jour", "error");
			return false;
		}
		
		$this->setView(getViewByName("Message"));
		$this->getView()->setMessage("	Mise à jour réussi", "success");
		
			
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:26,代码来源:SaveUpdateMemberAction.inc.php


示例8: run

	public function run() {
	

	
		$this->setView(getViewByName("GiveBackBook"));

		
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:8,代码来源:GiveBackBookAction.inc.php


示例9: run

	public function run() {
		
	
		
		   $this->setView(getViewByName("LoginForm"));
	
	
  }
开发者ID:amirdine,项目名称:academic-projects,代码行数:8,代码来源:LoginFormAction.inc.php


示例10: run

	public function run() {
	
		$selectMember 		= $_POST['pageid'];
		$members 	  		= $this->database->loadMembers();
		$borrowingBooks	= $this->database->borrowingBooks($selectMember);
		$this->setView(getViewByName("ManageMember"));
		$this->getView()->selectMember($members,$selectMember,$borrowingBooks);		
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:8,代码来源:ManageSelectMemberAction.inc.php


示例11: run

	/**
	 * Dirige l'utilisateur vers le formulaire de modification de mot de passe.
	 *
	 * @see Action::run()
	 */
	public function run() {

		if ($this->getSessionLogin()===null) {
			$this->setMessageView("Vous devez être authentifié.");
			return;
		}

		$this->setView(getViewByName("UpdateUserForm"));
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:14,代码来源:UpdateUserFormAction.inc.php


示例12: run

	public function run() {
	

			$id_member  = $_POST['adherent'];
			$id_book    = $_POST['livre'];

			
			$getBookCode 		      = $this->database->getBookCode($id_book);
         $checkMemberCode  		= $this->database->checkMemberCode($id_member);
			$checkAvailabilityBook  = $this->database->checkAvailabilityBook($id_book);
			$checkMemberLate		   = $this->database->loadMemberLate($id_member);
			$borrowingBooks	      = $this->database->borrowingBooks($id_member);
			$bookNumber             = count($borrowingBooks);

			if(!$getBookCode){

				$this->setView(getViewByName("Message"));
				$this->getView()->setMessage("Ce numéro ne correspond à aucun livre", "error");
				return false;
		 	}

	
		
			if($checkMemberLate){

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Emprunt annulé: cet adhérent n'a pas rendu tous ces livres", "error");
			return false;
		  }

			if($checkMemberLate){

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Emprunt annulé: cet adhérent n'a pas rendu tous ces livres", "error");
			return false;
		  }


			if($bookNumber > 2){

				$this->setView(getViewByName("Message"));
				$this->getView()->setMessage("Cet Adhérent a emprunté plus de 3 livres", "error");
				return false;
		   }
			

		  $saveBorrowingBook = $this->database-> saveBorrowingBook($getBookCode,$id_member);
			

			$this->setView(getViewByName("Message"));
			$this->getView()->setMessage("Enregistrement du prêt terminé", "success");
			
	

		
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:56,代码来源:SaveBorrowingBookAction.inc.php


示例13: run

	public function run() {
	
	   
	    
		$scores = $this->database->loadScores();
		
		
		$this->setView(getViewByName("JSON"));
        $this->getView()->setObject($scores);
		
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:11,代码来源:GetScoresAction.inc.php


示例14: run

	/**
	 * Traite les données envoyées par le formulaire d'ajout de sondage.
	 *
	 * Si l'utilisateur n'est pas connecté, un message lui demandant de se connecter est affiché.
	 *
	 * Sinon, la fonction ajoute le sondage à la base de données. Elle transforme
	 * les réponses et la question à l'aide de la fonction PHP 'htmlentities' pour éviter
	 * que du code exécutable ne soit inséré dans la base de données et affiché par la suite.
	 *
	 * Un des messages suivants doivent être affichés à l'utilisateur :
	 * - "La question est obligatoire.";
	 * - "Il faut saisir au moins 2 réponses.";
	 * - "Merci, nous avons ajouté votre sondage.".
	 *
	 * Le visiteur est finalement envoyé vers le formulaire d'ajout de sondage pour lui
	 * permettre d'ajouter un nouveau sondage s'il le désire.
	 *
	 * @see Action::run()
	 */
	public function run() {
		
		if ($this->getSessionLogin()===null) {
			$this->setMessageView("Vous devez être authentifié.", "alert-error");
			return;
		}
		
		$this->setView(getViewByName("AddSurveyForm"));
	
	
  }
开发者ID:amirdine,项目名称:academic-projects,代码行数:30,代码来源:AddSurveyFormAction.inc.php


示例15: run

	public function run() {
	
		$selectBook			  = $_POST['pageid'];
		$books	  			  = $this->database->loadBooks();
		$borrowingByBook	  = $this->database->borrowingByBook($selectBook);	
		$historyByBook      = $this->database->historyByBook($selectBook);	

	
		$this->setView(getViewByName("MyBooksSearch"));

		$this->getView()->selectBook($books,$selectBook,$borrowingByBook, $historyByBook);
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:12,代码来源:MySelectBookAction.inc.php


示例16: run

	public function run() {
		
	  /**
		* Permet d'afficher le formulaire d'ajout d'un sondage.
      */

		if ($this->getSessionLogin()===null) {
			$this->setMessageView("Vous devez être authentifié.", "alert-error");
			return;
		}
		
		$this->setView(getViewByName("AddSurveyForm"));
	
	
  }
开发者ID:amirdine,项目名称:academic-projects,代码行数:15,代码来源:AddSurveyFormAction.inc.php


示例17: run

	/**
	 * Traite les données envoyées par le visiteur via le formulaire de connexion
	 * (variables $_POST['login'] et $_POST['password']).
	 * Le mot de passe est vérifié en utilisant les méthodes de la classe Database.
	 * Si le mot de passe n'est pas correct, on affiche le message "Pseudo ou mot de passe incorrect."
	 * Si la vérification est réussie, le pseudo est affecté à la variable de session.
	 *
	 * @see Action::run()
	 */
	public function run() {

		$login     =  htmlentities($_POST['login']);
		$password  =  htmlentities($_POST['password']);

		if( !$this->database->checkPassword($login, $password)){
			$this->setMessageView("Login ou mot de passe incorrect.", "alert-error");
			return false;
		}

		$login = $login;
		$this->setSessionLogin($login);
		$this->setView(getViewByName("Message"));
		$this->getView()->setMessage("connexion réussie", "alert-success");

	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:25,代码来源:LoginAction.inc.php


示例18: run

	/**
	 * Traite les données envoyées par le visiteur via le formulaire de connexion
	 * (variables $_POST['nickname'] et $_POST['password']).
	 * Le mot de passe est vérifié en utilisant les méthodes de la classe Database.
	 * Si le mot de passe n'est pas correct, on affiche le message "Pseudo ou mot de passe incorrect."
	 * Si la vérification est réussie, le pseudo est affecté à la variable de session.
	 *
	 * @see Action::run()
	 */
	public function run() {

		$nickname  =  $_POST['nickname'];
		$password  =  $_POST['password'];

		if( !$this->database->checkPassword($nickname, $password)){
			$this->setMessageView("Pseudo ou mot de passe incorrect.", "alert-error");
			return false;
		}

		$login = $nickname;
		$this->setSessionLogin($login);
		$this->setView(getViewByName("Message"));
		$this->getView()->setMessage("connexion réussie", "alert-success");

	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:25,代码来源:LoginAction.inc.php


示例19: run

public function run() {
		/* TODO START */
     
        $owner = $this->getSessionLogin();
        if($owner == NULL){
        echo "vous devez être connecté";
        return false;
        }

		$motus = $this->database->loadMotus($owner);
		$this->setView(getViewByName("Motus"));
		$this->getView()->setMotus($motus);


		/* TODO END */
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:16,代码来源:CurrentGameSessionAction.inc.php


示例20: run

	public function run() {
		
	  /** 
      * Permet d'afficher tous les sondages d'un utilisateur
      */ 
		
		if ($this->getSessionLogin()===null) {
			$this->setMessageView("Vous devez être authentifié.", "alert-error");
			return;
		}
      
		$author   = $this->getSessionLogin();	   
		$surveys  = $this->database->getSurveysIDByAuthor($author);
   
	   $this->setView(getViewByName("Surveys"));
	   $this->getView()->setSurveys($surveys);
	}
开发者ID:amirdine,项目名称:academic-projects,代码行数:17,代码来源:GetMySurveysAction.inc.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP getViewName函数代码示例发布时间:2022-05-15
下一篇:
PHP getView函数代码示例发布时间: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