当前位置: 首页>>代码示例>>PHP>>正文


PHP content::CONTENTREGEXP方法代码示例

本文整理汇总了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;
 }
开发者ID:Jimmi08,项目名称:content,代码行数:21,代码来源:e_dashboard.php

示例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";
开发者ID:Jimmi08,项目名称:content,代码行数:31,代码来源:e_list.php

示例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;
开发者ID:Jimmi08,项目名称:content,代码行数:31,代码来源:content_submit.php


注:本文中的content::CONTENTREGEXP方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。