61 {
64 "SELECT page_id, active, activation_start, activation_end, show_activation_info FROM page_object WHERE " .
65 $db->in(
"page_id", $ids,
false,
"integer") .
66 " AND parent_type = %s AND lang = %s",
67 ["text", "text"],
69 );
70 $active = [];
72 while ($rec =
$db->fetchAssoc($set)) {
73 if (!$rec["active"] && $check_scheduled_activation) {
74 if ($now >= $rec["activation_start"] &&
75 $now <= $rec["activation_end"]) {
76 $active[$rec["page_id"]] = [
77 "active" => true,
78 "start" => $rec["activation_start"],
79 "end" => $rec["activation_end"],
80 "show_info" => (bool) $rec["show_activation_info"]
81 ];
82 } else {
83 $active[$rec["page_id"]] = [
84 "active" => false,
85 "start" => $rec["activation_start"],
86 "end" => $rec["activation_end"],
87 "show_info" => (bool) $rec["show_activation_info"]
88 ];
89 }
90 } else {
91 $active[$rec["page_id"]] = [
92 "active" => (bool) $rec["active"],
93 "start" => null,
94 "end" => null,
95 "show_info" => false
96 ];
97 }
98 }
99 return $active;
100 }
static now()
Return current timestamp in Y-m-d H:i:s format.