function struct_articlelist($struct_id, $counter, $copy_article_content, $cut_article_content, $copy_article, $cut_article, $article_order = 0) { global $BL; $article = array(); // empty article array $sort_array = array(); // empty array to store all sort values for the category $article_order = intval($article_order); $max_article_count = 0; $show_sort = !$article_order || $article_order == 1 ? 1 : 0; $ao = get_order_sort($article_order); $count_article = 0; $sbutton_string = array(); $sql = "SELECT *, "; $sql .= "DATE_FORMAT(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date "; //, article_deleted $sql .= "FROM " . DB_PREPEND . "phpwcms_article "; $sql .= "WHERE article_cid='" . $struct_id . "' AND article_deleted=0 ORDER BY " . $ao[2]; if ($result = mysql_query($sql, $GLOBALS['db']) or die("error while browsing related articles")) { // 1st get max count to know the last index ($max_article_count - 1) $max_article_count = mysql_num_rows($result); // take all entryies and build new array with it while ($row = mysql_fetch_assoc($result)) { $article[$count_article] = $row; if ($row['article_sort'] > 0) { $sort_array[$count_article] = $row['article_sort']; } // count up for article array index $count_article++; } mysql_free_result($result); } // now check if all sort values are unique // if not do a re-sort for all articles if ($max_article_count > count(array_unique($sort_array))) { $article = getArticleReSorted($struct_id, $article_order); } // reset article counter $count_article = 0; /* * now we know ALL articles and can run array index +/- * to set correct sorting UP and DOWN based on article * listing -> so the correct sort value is used */ foreach ($article as $akey => $avalue) { // set up correct article sorting // can be sorted UP if ($count_article == 0) { // this is the first in list -> so no sorting up possible // the sort up icon will be invisible $sort_up = false; } else { // this article has a pre entry // so use these by setting (current index - 1) $article[$akey]['sort_up'] = $article[$akey - 1]['article_sort']; $sort_up = $show_sort ? true : false; } // count up for article array index $count_article++; // can be sorted DOWN if ($count_article == $max_article_count) { // this is the last in list -> so no sorting down possible // the sort up icon will be invisible $sort_down = false; } else { // this article has a follower // so use these by setting (current index + 1) $article[$akey]['sort_down'] = $article[$akey + 1]['article_sort']; $sort_down = $show_sort ? true : false; } // now do some checks to be sure that all sort values // are different to have it sorting in the correct way // sort up if ($sort_up) { $sort_up = '<a href="include/inc_act/act_structure.php?do=4%7C'; $sort_up .= $article[$akey]["article_id"] . '%7C' . $article[$akey]['sort_up'] . '%7C'; $sort_up .= $article[$akey - 1]["article_id"] . '%7C' . $article[$akey]['article_sort']; $sort_up .= '" title="' . $BL['be_func_struct_sort_up'] . '">'; $sort_up .= '<img src="img/button/sort_1_1.gif" width="11" height="11" border="0" alt="" /></a>'; } else { $sort_up = '<img src="img/button/sort_1_0.gif" width="11" height="11" border="0" alt="" />'; } // sort down if ($sort_down) { $sort_down = '<a href="include/inc_act/act_structure.php?do=4%7C'; $sort_down .= $article[$akey]["article_id"] . '%7C' . $article[$akey]['sort_down'] . '%7C'; $sort_down .= $article[$akey + 1]["article_id"] . '%7C' . $article[$akey]['article_sort']; $sort_down .= '" title="' . $BL['be_func_struct_sort_down'] . '">'; $sort_down .= '<img src="img/button/sort_2_1.gif" width="11" height="11" border="0" alt="" /></a>'; } else { $sort_down = '<img src="img/button/sort_2_0.gif" width="11" height="11" border="0" alt="" />'; } $at = html($article[$akey]["article_title"]); if ($cut_article == $article[$akey]["article_id"]) { $a = "<tr bgColor='#B4E101'>\n"; } elseif ($copy_article == $article[$akey]["article_id"]) { $a = "<tr bgColor='#B4E101'>\n"; } else { $a = "<tr onMouseOver=\"this.bgColor='#CCFF00';\" onMouseOut=\"this.bgColor='#FFFFFF';\">\n"; } $a .= '<td width="461">'; $a .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\">\n<tr>\n"; $acontent_count = get_article_content_count($article[$akey]["article_id"], $GLOBALS['db']); if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) { $a .= "<td nowrap=\"nowrap\"><img src=\"img/leer.gif\" width=\"" . (14 + 14 + 14 * ($counter - 1)) . "\" height=\"1\" alt=\"\" />"; $a .= $acontent_count ? "<a href=\"phpwcms.php?do=articles&opena=" . rawurlencode($article[$akey]["article_id"] . ":" . (!empty($_SESSION["structure"]["article"][$article[$akey]["article_id"]]) ? 0 : 1)) . "\">" : ""; $a .= "<img src=\"img/symbole/plus_" . ($acontent_count ? !empty($_SESSION["structure"]["article"][$article[$akey]["article_id"]]) ? "close" : "open" : "empty"); $a .= ".gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"\" />" . ($acontent_count ? "</a>" : ""); } else { $a .= "<td nowrap=\"nowrap\"><img src=\"img/leer.gif\" width=\"" . (14 + 29 + 14 * ($counter - 1)) . "\" height=\"1\" alt=\"\" />"; } $a .= "<img src=\"img/symbole/text_1.gif\" width=\"11\" height=\"15\" "; $info = '<table cellspacing=0 cellpadding=1 border=0>'; $info .= '<tr><td>' . $BL['be_func_struct_articleID'] . ':</td><td><b>' . $article[$akey]["article_id"] . '</b></td></tr>'; if (!empty($article[$akey]["article_alias"])) { $info .= '<tr><td>ALIAS:</td><td><b>' . $article[$akey]["article_alias"] . '</b></td></tr>'; } if (!empty($article[$akey]["article_begin"])) { $info .= '<tr><td>' . $BL['be_article_cnt_start'] . ':</td><td><b>' . phpwcms_strtotime($article[$akey]["article_begin"], $BL['be_longdatetime'], ' ') . '</b></td></tr>'; } if (!empty($article[$akey]["article_end"])) { $info .= '<tr><td>' . $BL['be_article_cnt_end'] . ':</td><td><b>' . phpwcms_strtotime($article[$akey]["article_end"], $BL['be_longdatetime'], ' ') . '</b></td></tr>'; } $info .= '<tr><td>' . $BL['be_cnt_sortvalue'] . ':</td><td>' . $article[$akey]["article_sort"] . '</td></tr>'; if (isset($article[$akey]["article_end"])) { $info .= '<tr><td>' . $BL['be_priorize'] . ':</td><td>' . $article[$akey]["article_priorize"] . '</td></tr>'; } $info .= '</table>'; $a .= 'onmouseover="Tip(\'' . $info . '\');" onmouseout="UnTip()" alt=""'; //$a .= getAltTitle($info); $a .= " /></td>\n"; $a .= "<td><img src=\"img/leer.gif\" width=\"2\" height=\"15\" alt=\"\" /></td>\n"; $a .= '<td class="dir" width="95%"><a href="'; $a .= rel_url(array('phpwcms-preview' => 1), array(), empty($article[$akey]["article_alias"]) ? 'aid=' . $article[$akey]["article_id"] : $article[$akey]["article_alias"]); $a .= '" target="_blank" title="' . $BL['be_func_struct_preview'] . ': ' . $at . '">'; $a .= $at . "</a></td>\n</tr>\n</table></td>\n<td width=\"77\" nowrap=\"nowrap\">"; if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) { $a .= "<a href=\"phpwcms.php?do=articles&p=2&s=1&id=" . $article[$akey]["article_id"]; $a .= "\" title=\"" . $BL['be_func_struct_edit'] . " \n[" . $at . "]\">"; $a .= "<img src=\"img/button/edit_11x11.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\"></a>"; } else { $a .= "<img src=\"img/button/edit_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" />"; } if ($cut_article != $article[$akey]["article_id"] && !$cut_article_content) { $a .= "<a href=\"phpwcms.php?do=articles&acut=" . $article[$akey]["article_id"]; $a .= "\" title=\"" . $BL['be_func_struct_cut'] . " \n[" . $at . "]\">"; $a .= "<img src=\"img/button/cut_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } elseif ($cut_article_content) { $a .= '<a href="include/inc_act/act_structure.php?do=' . rawurlencode('7|' . $cut_article_content . '|' . $article[$akey]["article_id"] . '|-10'); $a .= '" title="' . $BL['be_func_content_paste0']; $a .= " [" . $at . "]\"><img src=\"img/button/cut_11x11_1.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } else { $a .= "<a href=\"phpwcms.php?do=articles\" title=\"" . $BL['be_func_struct_nocut'] . '">'; $a .= "<img src=\"img/button/cut_11x11_3.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } if ($copy_article != $article[$akey]["article_id"] && !$copy_article_content) { $a .= "<a href=\"phpwcms.php?do=articles&acopy=" . $article[$akey]["article_id"]; $a .= "\" title=\"" . $BL['be_func_struct_copy'] . " \n[" . $at . "]\">"; $a .= "<img src=\"img/button/copy_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } elseif ($copy_article_content) { $a .= '<a href="include/inc_act/act_structure.php?do=' . rawurlencode('8|' . $copy_article_content . '|' . $article[$akey]["article_id"] . '|-10'); $a .= "\" title=\"" . $BL['be_func_content_paste0']; $a .= " [" . $at . "]\"><img src=\"img/button/copy_11x11_1.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } else { $a .= "<a href=\"phpwcms.php?do=articles\" title=\"" . $BL['be_func_struct_nocopy'] . '">'; $a .= "<img src=\"img/button/copy_11x11_3.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } //Sortierungslink //davor sortieren $a .= $sort_up; //dahinter sortieren $a .= $sort_down; //switch active status $a .= "<a href=\"include/inc_act/act_articlecontent.php?do=3," . $article[$akey]["article_id"] . ",," . ($article[$akey]["article_aktiv"] ? 0 : 1); $a .= '" title="' . $BL['be_func_struct_svisible'] . '">'; $a .= "<img src=\"img/button/visible_11x11_" . $article[$akey]["article_aktiv"] . ".gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; //delete article if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) { $a .= "<a href=\"include/inc_act/act_articlecontent.php?do=1," . $article[$akey]["article_id"]; $a .= "\" title=\"" . $BL['be_func_struct_del_article'] . " \n[" . $at . "]\" "; $a .= "onclick=\"return confirm('" . $BL['be_func_struct_del_jsmsg'] . " \\n[" . js_singlequote($at) . "] ');\">"; $a .= "<img src=\"img/button/del_11x11.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" /></a>"; } else { $a .= "<img src=\"img/button/del_11x11_0.gif\" width=\"11\" height=\"11\" border=\"0\" alt=\"\" />"; } $a .= "</td>\n</tr>\n"; echo $a; $sql = "SELECT acontent_id, acontent_sorting, acontent_trash, acontent_block FROM " . DB_PREPEND . "phpwcms_articlecontent "; $sql .= "WHERE acontent_aid=" . $article[$akey]["article_id"] . " ORDER BY acontent_block, acontent_sorting, acontent_id"; if ($result = mysql_query($sql, $GLOBALS['db']) or die("error while listing contents for this article")) { $sc = 0; $scc = 0; //Sort-Zwischenz�hler while ($row = mysql_fetch_row($result)) { $scc++; if ($row[2] == 0) { $sc++; $sbutton[$sc]["id"] = $row[0]; $sbutton[$sc]["sort"] = $row[1]; $sbutton[$sc]["block"] = $row[3]; } } } if ($sc) { //Jetzt aufbauen der Sortieranweisung foreach ($sbutton as $key => $value) { if ($key == 1) { // if 1st content part in list $sbutton[$key]["top"] = "<img src=\"img/button/sort_1_0.gif\" border=\"0\" alt=\"\" />"; } elseif (isset($sbutton[$key - 1]["block"]) && $sbutton[$key - 1]["block"] != $sbutton[$key]["block"]) { // if this content part is selected for different block than previous $sbutton[$key]["top"] = "<img src=\"img/button/sort_1_0.gif\" border=\"0\" alt=\"\" />"; } else { $sbutton[$key]["top"] = "<a href=\"include/inc_act/act_articlecontent.php?sort=" . rawurlencode($sbutton[$key]["id"] . ":" . $sbutton[$key - 1]["sort"] . "|" . $sbutton[$key - 1]["id"] . ":" . $sbutton[$key]["sort"]) . "\" title=\"" . $BL['be_article_cnt_up'] . "\"><img src=\"img/button/sort_1_1.gif\" border=\"0\" alt=\"\" /></a>"; } if ($key == $sc) { // if this is the last content part in list $sbutton[$key]["bottom"] = "<img src=\"img/button/sort_2_0.gif\" border=\"0\" alt=\"\" />"; } elseif (isset($sbutton[$key + 1]["block"]) && $sbutton[$key + 1]["block"] != $sbutton[$key]["block"]) { // if this is the last content part in current block and next is different $sbutton[$key]["bottom"] = "<img src=\"img/button/sort_2_0.gif\" border=\"0\" alt=\"\" />"; } else { $sbutton[$key]["bottom"] = "<a href=\"include/inc_act/act_articlecontent.php?sort=" . rawurlencode($sbutton[$key]["id"] . ":" . $sbutton[$key + 1]["sort"] . "|" . $sbutton[$key + 1]["id"] . ":" . $sbutton[$key]["sort"]) . "\" title=\"" . $BL['be_article_cnt_down'] . "\"><img src=\"img/button/sort_2_1.gif\" border=\"0\" alt=\"\" /></a>"; } $sbutton_string[$sbutton[$key]["id"]] = $sbutton[$key]["top"] . $sbutton[$key]["bottom"]; } unset($sbutton); } if ($article[$akey]["article_uid"] == $_SESSION["wcs_user_id"] || $_SESSION["wcs_user_admin"]) { if (isset($_SESSION["structure"]["article"][$article[$akey]["article_id"]]) && $_SESSION["structure"]["article"][$article[$akey]["article_id"]]) { struct_articlecontentlist($article, $akey, $copy_article_content, $cut_article_content, $counter, $sbutton_string, $GLOBALS['db']); } } } }
function build_sitemap_articlelist($cat, $counter = 0, &$sitemap) { // create list of articles for given category $ao = get_order_sort($GLOBALS['content']['struct'][$cat]['acat_order']); $sql = "SELECT article_id, article_title, article_alias FROM " . DB_PREPEND . "phpwcms_article "; $sql .= "WHERE article_cid=" . intval($cat) . " AND article_nositemap=1 AND "; // VISIBLE_MODE: 0 = frontend (all) mode, 1 = article user mode, 2 = admin user mode switch (VISIBLE_MODE) { case 0: $sql .= "article_aktiv=1 AND "; break; case 1: $sql .= "(article_aktiv=1 OR article_uid=" . $_SESSION["wcs_user_id"] . ") AND "; break; //case 2: admin mode no additional neccessary } $sql .= 'article_deleted=0 '; if (!PREVIEW_MODE) { $sql .= 'AND article_begin<NOW() '; $sql .= 'AND article_end>NOW() '; } $sql .= "ORDER BY " . $ao[2]; $s = ''; if ($result = mysql_query($sql, $GLOBALS['db'])) { if (mysql_num_rows($result) > 1) { $c = ''; if ($sitemap['articleclass']) { $c .= ' class="' . $sitemap['articleclass']; if ($sitemap['classcount']) { $c .= $counter; } $c .= '"'; } while ($row = mysql_fetch_row($result)) { $s .= '<li' . $sitemap['article_style'] . '>'; $s .= '<a href="' . rel_url(array(), array(), empty($row[2]) ? 'aid=' . $row[0] : $row[2]) . '">'; $s .= html_specialchars($row[1]); $s .= "</a></li>\n"; } $s = "\n<ul" . $c . ">\n" . $s . '</ul>'; } mysql_free_result($result); } return $s; }
function getArticleReSorted(&$cat_id, &$ordered_by) { // get all articles including deleted and update sorting // in correct sort order by adding sort + 10 $sort = 10; $sort_multiply_by = 1; $count_article = 0; $ao = get_order_sort($ordered_by); $sql = "SELECT article_id, article_cid, article_title, article_aktiv, article_uid, "; $sql .= "date_format(article_tstamp, '%Y-%m-%d %H:%i:%s') AS article_date, article_sort, article_deleted, article_tstamp "; $sql .= "FROM " . DB_PREPEND . "phpwcms_article "; $sql .= "WHERE article_cid='" . $cat_id . "' ORDER BY " . $ao[2]; if ($result = mysql_query($sql, $GLOBALS['db'])) { // now check if it's sorted manually and DESC // then sort has to be lowerd by -10 if ($ao[0] == 0 && $ao[1] == 1) { $max_article_count = mysql_num_rows($result); $sort = ($max_article_count + 1) * 10; $sort_multiply_by = -1; } // take all entries and build new array with it while ($row = mysql_fetch_assoc($result)) { // SQL update query with new sort value $update_sql = "UPDATE " . DB_PREPEND . "phpwcms_article SET "; $update_sql .= "article_sort=" . $sort . ", "; $update_sql .= "article_tstamp='" . $row['article_tstamp'] . "' "; $update_sql .= "WHERE article_id=" . $row['article_id'] . " LIMIT 1"; @mysql_query($update_sql, $GLOBALS['db']); // add entry to the returning array only for article_deleted=0 // drops all deleted articles or articles having another status if ($row['article_deleted'] == 0) { $article[$count_article] = $row; $article[$count_article]['article_sort'] = $sort; // count up for article array index $count_article++; } // count sort up by 10 $sort = $sort + 10 * $sort_multiply_by; } mysql_free_result($result); } return $article; }
$acat_nositemap = $row_acat["acat_nositemap"]; $acat_permit = empty($row_acat["acat_permit"]) ? array() : explode(',', $row_acat["acat_permit"]); $acat_cntpart = isset($row_acat["acat_cntpart"]) && $row_acat["acat_cntpart"] != '' ? explode(',', $row_acat["acat_cntpart"]) : array(); $acat_pagetitle = $row_acat["acat_pagetitle"]; $acat_paginate = $row_acat["acat_paginate"]; $acat_overwrite = $row_acat["acat_overwrite"]; $acat_archive = $row_acat["acat_archive"]; $acat_class = $row_acat["acat_class"]; $acat_keywords = $row_acat["acat_keywords"]; $acat_cpdefault = $row_acat["acat_cpdefault"]; $acat_lang = $row_acat["acat_lang"]; $acat_lang_type = $row_acat["acat_lang_type"]; $acat_lang_id = $row_acat["acat_lang_id"]; $acat_disable301 = $row_acat['acat_disable301']; $acat_opengraph = $row_acat['acat_opengraph']; $acat_canonical = $row_acat['acat_canonical']; $acat_breadcrumb = intval($row_acat['acat_breadcrumb']); } mysql_free_result($result_acat); } } else { $acat_topcount = $indexpage['acat_topcount']; $acat_order = $indexpage['acat_order']; $acat_cntpart = isset($indexpage['acat_cntpart']) ? explode(',', $indexpage['acat_cntpart']) : array(); $acat_cpdefault = 0; } if (isset($_GET["sort"])) { $acat_sort = intval($_GET["sort"]); } $acat_order = get_order_sort($acat_order);
// ---------------------------------------------------------------- // obligate check for phpwcms constants if (!defined('PHPWCMS_ROOT')) { die("You Cannot Access This Script Directly, Have a Nice Day."); } // ---------------------------------------------------------------- //article menu $CNT_TMP .= headline($crow["acontent_title"], $crow["acontent_subtitle"], $template_default["article"]); $alinkmenu = unserialize($crow["acontent_form"]); $alinkmenu["catid"] = $alinkmenu["cat"] ? $alinkmenu["catid"] : $content["cat_id"]; $alinkmenu['headertext'] = empty($alinkmenu["headertext"]) ? 0 : 1; $alinkmenu['ul'] = empty($alinkmenu["ul"]) ? 0 : $alinkmenu["ul"]; $alinkmenu['ul_tag'] = array(1 => array('ul', 'li', 'li'), 2 => array('div', 'div', 'div'), 3 => array('dl', 'dd', 'dt'), 4 => array('div', 'span', 'b')); $alinkmenu['titlewrap'] = empty($alinkmenu["titlewrap"]) ? array('', '') : array('<' . $alinkmenu["titlewrap"] . '>', '</' . $alinkmenu["titlewrap"] . '>'); $alinkmenu['link'] = ''; $ao = get_order_sort($content['struct'][$alinkmenu["catid"]]['acat_order']); $alink_sql = "SELECT article_id, article_title, article_cid, article_summary, article_alias, article_menutitle FROM "; $alink_sql .= DB_PREPEND . "phpwcms_article WHERE article_aktiv=1 AND article_deleted=0 AND article_cid="; $alink_sql .= intval($alinkmenu["catid"]); if (!PREVIEW_MODE) { $alink_sql .= ' AND article_begin<NOW()'; $alink_sql .= ' AND article_end>NOW()'; } if (!empty($alinkmenu['hideactive'])) { $alink_sql .= ' AND article_id != ' . $aktion[1]; } $alink_sql .= ' ORDER BY ' . $ao[2]; if ($result = mysql_query($alink_sql, $db) or die("error while getting link article list: " . $alink_sql)) { $alinkmenu['count'] = 0; while ($row = mysql_fetch_row($result)) { $tempRowSpan = '';
$acat_id = 'index'; $acat_new = 0; $acat_aktiv = $indexpage['acat_aktiv']; $acat_sort = isset($acat_sort) ? $acat_sort : ''; $acat_alias = $indexpage['acat_alias']; $acat_hidden = $indexpage['acat_hidden']; $acat_template = $indexpage['acat_template']; $acat_ssl = $indexpage['acat_ssl']; $acat_regonly = $indexpage['acat_regonly']; $acat_topcount = $indexpage['acat_topcount']; $acat_maxlist = $indexpage['acat_maxlist']; $acat_redirect = $indexpage['acat_redirect']; $acat_timeout = strval($indexpage['acat_timeout']); $acat_nosearch = strval($indexpage['acat_nosearch']); $acat_nositemap = strval($indexpage['acat_nositemap']); $acat_order = get_order_sort($indexpage['acat_order']); $acat_permit = empty($indexpage['acat_permit']) ? array() : explode(',', $indexpage['acat_permit']); $acat_cntpart = isset($indexpage['acat_cntpart']) && $indexpage['acat_cntpart'] != '' ? explode(',', $indexpage['acat_cntpart']) : array(); $acat_pagetitle = empty($indexpage['acat_pagetitle']) ? '' : $indexpage['acat_pagetitle']; $acat_paginate = empty($indexpage['acat_paginate']) ? 0 : 1; $acat_overwrite = empty($indexpage['acat_overwrite']) ? '' : $indexpage['acat_overwrite']; $acat_archive = empty($indexpage['acat_archive']) ? 0 : $indexpage['acat_archive']; $acat_class = empty($indexpage['acat_class']) ? '' : $indexpage['acat_class']; $acat_keywords = empty($indexpage['acat_keywords']) ? '' : $indexpage['acat_keywords']; $acat_cpdefault = empty($indexpage['acat_cpdefault']) ? empty($phpwcms['cp_default']) ? 0 : intval($phpwcms['cp_default']) : intval($indexpage['acat_cpdefault']); $acat_lang = ''; $acat_lang_type = ''; $acat_lang_id = 0; $acat_disable301 = empty($indexpage['acat_disable301']) ? 0 : 1; $acat_opengraph = isset($indexpage['acat_opengraph']) ? $indexpage['acat_opengraph'] : 1; $acat_canonical = empty($indexpage['acat_canonical']) ? '' : $indexpage['acat_canonical'];