Get activation data for a set of page ids.
36 {
38
39
42 }
44 "SELECT page_id, active, activation_start, activation_end, show_activation_info FROM page_object WHERE " .
45 $db->in(
"page_id", $ids,
false,
"integer") .
46 " AND parent_type = %s AND lang = %s",
47 ["text", "text"],
49 );
50 $active = [];
52 while ($rec =
$db->fetchAssoc($set)) {
53 if (!$rec["active"] && $check_scheduled_activation) {
54 if ($now >= $rec["activation_start"] &&
55 $now <= $rec["activation_end"]) {
56 $active[$rec["page_id"]] = [
57 "active" => true,
58 "start" => $rec["activation_start"],
59 "end" => $rec["activation_end"],
60 "show_info" => (bool) $rec["show_activation_info"]
61 ];
62 } else {
63 $active[$rec["page_id"]] = [
64 "active" => false,
65 "start" => $rec["activation_start"],
66 "end" => $rec["activation_end"],
67 "show_info" => (bool) $rec["show_activation_info"]
68 ];
69 }
70 } else {
71 $active[$rec["page_id"]] = [
72 "active" => (bool) $rec["active"],
73 "start" => null,
74 "end" => null,
75 "show_info" => false
76 ];
77 }
78 }
79 return $active;
80 }
static now()
Return current timestamp in Y-m-d H:i:s format.
for($i=1; $i<=count($kw_cases_sel); $i+=1) $lang