本文整理汇总了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);
}
}
示例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);
}
}
示例3: __construct
public function __construct($siteID)
{
$this->_siteID = $siteID;
$this->_db = DatabaseConnection::getInstance();
$this->extraFields = new ExtraFields($siteID, DATA_ITEM_JOBORDER);
parent::__construct();
}
示例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"]);
}
示例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);
}
}
示例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;
}
}
示例7: __construct
public function __construct($db)
{
session_start();
$config = new Config();
$data = $this->secureData($_GET);
$user = new User($db);
parent::__construct($db);
}
示例8: __construct
public function __construct($db)
{
parent::__construct($db);
$this->pictures = $this->picture->getAllSortDate();
if (!isset($this->data["page"])) {
$this->data["page"] = 1;
}
}
示例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);
}
示例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();
}
示例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();
}
}
示例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);
}
示例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"]);
}
}
示例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);
}
示例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;
}
}