本文整理匯總了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