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


PHP Modules::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->users = $this->user->getAll();
     if (!$_SESSION["login"]) {
         $_SESSION["page_message"] = "ERROR_NOTAUTH";
         header('Location: ' . $this->config->address . '?view=message');
     }
     if (!$_GET["answer_to"]) {
         unset($_SESSION["title"]);
         unset($_SESSION["id_message"]);
     }
     //$answer_from_login = $this->mail->getField("id")
     if ($_GET["answer_to"]) {
         $from = $this->mail->getField("from", "id", $_GET["answer_to"]);
         if ($_SESSION["login"] != $from) {
             $this->to = $this->user->getField("FIO", "login", $from);
         } else {
             $this->to = $this->user->getField("FIO", "login", $this->mail->getField("to", "id", $_GET["answer_to"]));
         }
         //echo "$from";
         $this->messages = $this->user->getField("FIO", "id", $_GET["answer_to"]);
     } elseif ($_GET["to"]) {
         $from = $this->user->getField("login", "id", $_GET["to"]);
         $this->to = $this->user->getField("FIO", "login", $from);
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:27,代码来源:mailcontent_class.php

示例2: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     //$this->pictures = $this->picture->getAllSortDate();
     $where = "`status` = 'on_order' AND `admin_check` != 'need'";
     $this->pictures = $this->picture->getSortingPictures($where, $order = date, $up = false);
     $this->users = $this->user->getAll();
     //print_r($this->users);
     if (!isset($this->data["page"])) {
         $this->data["page"] = 1;
     }
     if ($_GET["show"]) {
         $this->count_blog = $_GET["count_on_pg"];
         $sort = $_GET;
         if ($_GET["author"]) {
             $sort["author"] = $this->user->getField("login", "id", $_GET["author"]);
         } else {
             $sort["author"] = "";
         }
         //echo "$author";
         $this->pictures = $this->sorting($sort, $author, $status = "on_order");
     }
     if ($_GET["count_on_pg"]) {
         $this->count_blog = $_GET["count_on_pg"];
     } else {
         $this->count_blog = $this->config->count_blog;
     }
     if ($_GET["reset"]) {
         unset($_GET);
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:31,代码来源:OnOrderContent_class.php

示例3: __construct

 public function __construct($siteID)
 {
     $this->_siteID = $siteID;
     $this->_db = DatabaseConnection::getInstance();
     $this->extraFields = new ExtraFields($siteID, DATA_ITEM_JOBORDER);
     parent::__construct();
 }
开发者ID:Hassanj343,项目名称:candidats,代码行数:7,代码来源:JobOrders.php

示例4: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->id = $_GET["id"];
     $this->image = $this->picture->getAllOnField("id", $this->id);
     $this->comment_info = $this->comment->getAllOnSectionId($_GET["id"]);
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:7,代码来源:buycontent_class.php

示例5: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->pictures = $this->picture->getAllSortDate();
     $this->users = $this->user->getAll();
     if (!isset($this->data["page"])) {
         $this->data["page"] = 1;
     }
     if ($_GET["show"]) {
         $this->count_blog = $_GET["count_on_pg"];
         $sort = $_GET;
         if ($_GET["author"]) {
             $sort["author"] = $this->user->getField("login", "id", $_GET["author"]);
         } else {
             $sort["author"] = "";
         }
         //echo "$author";
         $this->pictures = $this->sorting($sort, $author);
     }
     if ($_GET["count_on_pg"]) {
         $this->count_blog = $_GET["count_on_pg"];
     } else {
         $this->count_blog = $this->config->count_blog;
     }
     if ($_GET["reset"]) {
         unset($_GET);
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:28,代码来源:maincontent_class.php

示例6: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->pictures = $this->picture->getAllUserPictures($_SESSION["login"]);
     if (!isset($this->data["page"])) {
         $this->data["page"] = 1;
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:8,代码来源:editimagescontent_class.php

示例7: __construct

 public function __construct($db)
 {
     session_start();
     $config = new Config();
     $data = $this->secureData($_GET);
     $user = new User($db);
     parent::__construct($db);
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:8,代码来源:checkcontent_class.php

示例8: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->pictures = $this->picture->getAllSortDate();
     if (!isset($this->data["page"])) {
         $this->data["page"] = 1;
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:8,代码来源:old_frontpagecontent_class.php

示例9: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->id = $_GET["id"];
     //$this->basket = new Basket($db);
     $this->image = $this->basket->getAllOnField("image_id", $this->id);
     //	print_r($this->image);
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:8,代码来源:imagedetailbasketcontent_class.php

示例10: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->article_info = $this->article->get($this->data["id"]);
     if (!$this->article_info) {
         return $this->redirect();
     }
     //$this->comment_info = $this->comment->getAll();
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:9,代码来源:commentcontent_class.php

示例11: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->poll_votes_info = $this->poll_votes->get($_GET["id"]);
     $this->poll_info = $this->poll->get($this->poll_votes_info["poll_id"]);
     print_r($this->poll_votes_info);
     if (!$this->poll_info) {
         return $this->redirect();
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:10,代码来源:pollresultscontent_class.php

示例12: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->article_info = $this->article->get($this->data["id"]);
     if (!$this->article_info) {
         return $this->redirect();
     }
     $this->comment_info = $this->comment->getAllOnSectionId($this->article_info["id"]);
     $_SESSION["article_id"] = $this->data["id"];
     //print_r($_SESSION);
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:11,代码来源:articlecontent_class.php

示例13: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     if (!$_SESSION["login"]) {
         $_SESSION["page_message"] = "ERROR_NOTAUTH";
         header('Location: ' . $this->config->address . '?view=message');
     } else {
         $this->messages = $this->mail->getAllOutbox($_SESSION["login"]);
         $this->NewMessages = $this->mail->getNewMessages($_SESSION["login"]);
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:11,代码来源:outboxcontent2_class.php

示例14: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->id = $_GET["id"];
     $this->image = $this->picture->getAllOnField("id", $this->id);
     //if (!isset($this->data["page"])) $this->data["page"] = 1;
     //		$this->article_info = $this->article->get($this->data["id"]);
     //		if (!$this->article_info) return $this->redirect();
     //		$this->comment_info = $this->comment->getAllOnSectionId($_GET["id"]);
     //		$_SESSION["article_id"] = $this->data["id"];
     //print_r($_SESSION);
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:12,代码来源:imagedetailcontent_class.php

示例15: __construct

 public function __construct($db)
 {
     parent::__construct($db);
     $this->articles = $this->article->getAllOnSectionId($this->data["id"]);
     $this->section_info = $this->section->get($this->data["id"]);
     if (!$this->section_info) {
         return $this->redirect();
     }
     if (!isset($this->data["page"])) {
         $this->data["page"] = 1;
     }
 }
开发者ID:Ziblickiy,项目名称:dreamarts,代码行数:12,代码来源:sectioncontent_class.php


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