本文整理汇总了PHP中content::get方法的典型用法代码示例。如果您正苦于以下问题:PHP content::get方法的具体用法?PHP content::get怎么用?PHP content::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类content
的用法示例。
在下文中一共展示了content::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: content
$content = new content();
$content_data = $content->get($dbs, $path);
if ($content_data) {
$page_title = $content_data['Title'];
echo $content_data['Content'];
unset($content_data);
} else {
header("location:index.php");
}
}
} else {
$metadata = '<meta name="robots" content="index, follow">';
// homepage header info
if (!isset($_GET['p'])) {
if (!isset($_GET['keywords']) and !isset($_GET['page']) and !isset($_GET['title']) and !isset($_GET['author']) and !isset($_GET['subject']) and !isset($_GET['location'])) {
// get content data from database
include LIB_DIR . 'content.inc.php';
$content = new content();
$content_data = $content->get($dbs, 'headerinfo');
if ($content_data) {
//$header_info .= '<div id="headerInfo">'.$content_data['Content'].'</div>';
unset($content_data);
}
}
}
include LIB_DIR . 'contents/default.inc.php';
}
// main content grab
$main_content = ob_get_clean();
// template output
require $sysconf['template']['dir'] . '/' . $sysconf['template']['theme'] . '/index_template.inc.php';
示例2: foreach
}
echo '<div class="message">';
echo '<ul>';
// if there any warnings
if ($warnings) {
foreach ($warnings as $warning_msg) {
echo '<li>' . $warning_msg . '</li>';
}
}
echo '</ul>';
echo '</div>';
// admin page content
if ($sysconf['admin_home']['mode'] == 'default') {
require LIB . 'content.inc.php';
$content = new content();
$content_data = $content->get($dbs, 'adminhome');
if ($content_data) {
echo '<div class="contentDesc">' . $content_data['Content'] . '</div>';
unset($content_data);
}
} else {
// generate dashboard content
$get_date = '';
$get_loan = '';
$get_return = '';
$get_extends = '';
$start_date = date('Y-m-d');
// set date from TODAY
// get date transaction
$sql_date = "SELECT \r\n DATE_FORMAT(loan_date,'%d/%m') AS loandate,\r\n loan_date\r\n FROM \r\n loan\r\n WHERE \r\n loan_date BETWEEN DATE_SUB('" . $start_date . "', INTERVAL 8 DAY) AND '" . $start_date . "' \r\n GROUP BY \r\n loan_date\r\n ORDER BY \r\n loan_date";
// echo $sql_loan; //for debug purpose only