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


PHP Section::GetTotalSections方法代码示例

本文整理汇总了PHP中Section::GetTotalSections方法的典型用法代码示例。如果您正苦于以下问题:PHP Section::GetTotalSections方法的具体用法?PHP Section::GetTotalSections怎么用?PHP Section::GetTotalSections使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Section的用法示例。


在下文中一共展示了Section::GetTotalSections方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

$numArticlesDeleted = 0;
$f_delete_all_section_translations = $f_delete_all_section_translations == 'Y' ? true : false;
$f_delete_all_articles_translations = $f_delete_all_articles_translations == 'Y' ? true : false;
if ($f_delete_all_section_translations == false) {
    $numArticlesDeleted = $sectionObj->delete(true, $f_delete_all_articles_translations);
    $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
    $cacheService->clearNamespace('section');
} else {
    $sectionTranslations = Section::GetSections($f_publication_id, $f_issue_number, null, null, $sectionObj->getName(), null);
    foreach ($sectionTranslations as $key => $sectionTranslation) {
        $numArticlesDeleted += $sectionTranslation->delete(true, $f_delete_all_articles_translations);
    }
}
$offsetVarName = 'SectOffs_' . $f_publication_id . '_' . $f_issue_number . '_' . $f_language_id;
$SectOffs = camp_session_get($offsetVarName, 0);
$totalSections = Section::GetTotalSections($f_publication_id, $f_issue_number, $f_language_id);
if ($SectOffs >= $totalSections) {
    camp_session_set($offsetVarName, 0);
}
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
camp_html_content_top($translator->trans('Delete section', array(), 'sections'), $topArray);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
echo $translator->trans("Deleting section", array(), 'sections');
?>
 </B>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del.php

示例2: camp_session_get

$Pub = Input::Get('Pub', 'int', 0);
$Issue = Input::Get('Issue', 'int', 0);
$Language = Input::Get('Language', 'int', 0);
$SectOffs = camp_session_get("SectOffs_" . $Pub . "_" . $Issue . "_" . $Language, 0);
if ($SectOffs < 0) {
    $SectOffs = 0;
}
$ItemsPerPage = 15;
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), $_SERVER['REQUEST_URI']);
    exit;
}
$publicationObj = new Publication($Pub);
$issueObj = new Issue($Pub, $Language, $Issue);
$allSections = Section::GetSections($Pub, $Issue, $Language, null, null, array('ORDER BY' => 'Number', 'LIMIT' => array('START' => $SectOffs, 'MAX_ROWS' => $ItemsPerPage)), true);
$totalSections = Section::GetTotalSections($Pub, $Issue, $Language);
$pager = new SimplePager($totalSections, $ItemsPerPage, "SectOffs_" . $Pub . "_" . $Issue . "_" . $Language, "index.php?Pub={$Pub}&Issue={$Issue}&Language={$Language}&");
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj);
camp_html_content_top($translator->trans('Section List'), $topArray);
$controller->view->headTitle($translator->trans('Section List') . ' - Newscoop Admin', 'SET');
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
	<TD><A HREF="/<?php 
echo $ADMIN;
?>
/issues/?Pub=<?php 
p($Pub);
?>
"><IMG SRC="<?php 
echo $Campsite["ADMIN_IMAGE_BASE_URL"];
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:index.php

示例3: getSections

 public function getSections()
 {
     return \Section::GetTotalSections();
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:4,代码来源:StatService.php


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