Ejemplo n.º 1
0
 function status()
 {
     $sql = e107::getDb();
     $aa = new content();
     if ($maincat = $sql->retrieve("pcontent", "content_id, content_heading", " WHERE  content_parent  = '0' ORDER BY content_heading", true)) {
         $i = 0;
         foreach ($maincat as $row) {
             $count = 0;
             $array = $aa->getCategoryTree("", $row['content_id'], TRUE);
             $validparent = implode(",", array_keys($array));
             $qrycat = " content_parent REGEXP '" . $aa->CONTENTREGEXP($validparent) . "' ";
             $count = $sql->count("pcontent", "(*)", "WHERE " . $qrycat . "  AND content_refer != 'sa' ");
             $var[$i]['icon'] = "<img src='" . e_PLUGIN_ABS . "content/images/content_16.png' style='width: 16px; height: 16px; vertical-align: bottom' alt='' /> ";
             $var[$i]['title'] = $row['content_heading'];
             $var[$i]['url'] = e_PLUGIN . "content/admin_content_config.php?content." . $row['content_id'];
             $var[$i]['total'] = $count;
             $i = $i + 1;
         }
     }
     return $var;
 }
Ejemplo n.º 2
0
 $HEADING = "";
 $AUTHOR = "";
 $CATEGORY = "";
 $DATE = "";
 $INFO = "";
 $LIST_CAPTION = $rowm['content_heading'];
 //global var for this main parent
 $mainparent = $rowm['content_id'];
 //get path variables
 $content_recent_pref = $aa->getContentPref($mainparent);
 $content_recent_pref["content_icon_path"] = $content_recent_pref["content_icon_path"] ? $content_recent_pref["content_icon_path"] : "{e_PLUGIN_ABS}content/images/icon/";
 $content_icon_path = $tp->replaceConstants($content_recent_pref["content_icon_path"]);
 //prepare query string
 $array = $aa->getCategoryTree("", $mainparent, TRUE);
 $validparent = implode(",", array_keys($array));
 $qry = " content_refer !='sa' AND content_parent REGEXP '" . $aa->CONTENTREGEXP($validparent) . "' AND content_class REGEXP '" . e_CLASS_REGEXP . "' ";
 //check so only the preferences from the correct content_type (article, content, review etc) are used and rendered
 if (substr($contentmode, 8) == $rowm['content_id']) {
     if ($mode == "new_page" || $mode == "new_menu") {
         $lvisit = $this->getlvisit();
         $qry = $qry . " AND content_datestamp>" . $lvisit;
     } else {
         $qry = $qry . " " . $datequery;
     }
     $qry .= " ORDER BY content_datestamp DESC LIMIT 0," . intval($arr[7]);
     //get recent content for each main parent
     $sqli = new db();
     if (!($resultitem = $sqli->db_Select("pcontent", "*", $qry))) {
         $LIST_DATA = CONTENT_MENU_LAN_5 . " " . $rowm['content_heading'];
     } else {
         $LIST_DISPLAYSTYLE = $arr[2] ? "" : "none";
Ejemplo n.º 3
0
            $content_pref = e107::unserialize($row['content_pref']);
            //$content_pref					= $eArrayStorage->ReadxxxArray($row['content_pref']);
            $content_pref["content_cat_icon_path_large"] = $content_pref["content_cat_icon_path_large"] ? $content_pref["content_cat_icon_path_large"] : "{e_PLUGIN}content/images/cat/48/";
            $content_pref["content_cat_icon_path_small"] = $content_pref["content_cat_icon_path_small"] ? $content_pref["content_cat_icon_path_small"] : "{e_PLUGIN}content/images/cat/16/";
            $content_cat_icon_path_large = $tp->replaceConstants($content_pref["content_cat_icon_path_large"]);
            $content_cat_icon_path_small = $tp->replaceConstants($content_pref["content_cat_icon_path_small"]);
            $content_icon_path = $tp->replaceConstants($content_pref["content_icon_path"]);
            if ($content_pref["content_submit"] && check_class($content_pref["content_submit_class"])) {
                $content_submit_type_table_string .= $tp->parseTemplate($CONTENT_SUBMIT_TYPE_TABLE, FALSE, $newcontent_shortcodes);
                $count = $count + 1;
            }
        }
        if ($count == "0") {
            $text .= "<div style='text-align:center;'>" . CONTENT_ADMIN_SUBMIT_LAN_0 . "</div>";
        } else {
            $text = $CONTENT_SUBMIT_TYPE_TABLE_START . $content_submit_type_table_string . $CONTENT_SUBMIT_TYPE_TABLE_END;
        }
    }
    $caption = CONTENT_ADMIN_SUBMIT_LAN_1;
    $ns->tablerender($caption, $text);
}
if (isset($qs[0]) && $qs[0] == "content" && $qs[1] == "submit" && is_numeric($qs[2]) && !isset($qs[3])) {
    //check if valid categories exist for this main parent
    $array = $aa->getCategoryTree("", intval($qs[2]), TRUE);
    $validparent = implode(",", array_keys($array));
    $qry = " content_parent REGEXP '" . $aa->CONTENTREGEXP($validparent) . "' ";
    $sql2 = new db();
    //$contenttotal	= $sql2 -> db_Count($plugintable, "(*)", "WHERE ".$qry." ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' " );
    $aform->show_create_content("submit");
}
require_once FOOTERF;