本文整理汇总了PHP中content::CONTENTREGEXP方法的典型用法代码示例。如果您正苦于以下问题:PHP content::CONTENTREGEXP方法的具体用法?PHP content::CONTENTREGEXP怎么用?PHP content::CONTENTREGEXP使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类content
的用法示例。
在下文中一共展示了content::CONTENTREGEXP方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: status
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;
}
示例2: implode
$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";
示例3: intval
$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;