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


PHP Publication::getLanguageId方法代码示例

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


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

示例1: putGS

		<HR NOSHADE SIZE="1" COLOR="BLACK">
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" ><?php  putGS("Name"); ?>:</TD>
	<TD>
	<INPUT TYPE="TEXT" class="input_text" NAME="f_issue_name" SIZE="32" alt="blank" emsg="<?php putGS('You must fill in the $1 field.',"'".getGS('Name')."'"); ?>">
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" ><?php  putGS("Language"); ?>:</TD>
	<TD>
	<SELECT NAME="f_language_id" class="input_select">
	   <?php
            foreach ($allLanguages as $language) {
            	camp_html_select_option($language->getLanguageId(), $publicationObj->getLanguageId(), $language->getNativeName());
            }
        ?>
	</SELECT>
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" ><?php  putGS("Number"); ?>:</TD>
	<TD>
	<INPUT TYPE="TEXT" class="input_text" NAME="f_issue_number" VALUE="<?php p($newIssueId); ?>" SIZE="5" MAXLENGTH="10" alt="number|0|1|1000000000" emsg="<?php putGS("You must input a number greater than 0 into the $1 field.", "'".getGS("Number")."'"); ?>">
	</TD>
</TR>
<TR>
	<TD ALIGN="RIGHT" ><?php  putGS("URL Name"); ?>:</TD>
	<TD>
	<INPUT TYPE="TEXT" class="input_text" NAME="f_url_name" VALUE="<?php p($newIssueId); ?>" SIZE="32"  alt="alnum|1|A|true|false|_" emsg="<?php putGS('The $1 field may only contain letters, digits and underscore (_) character.', "'" . getGS('URL Name') . "'"); ?>">
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:add_new.php

示例2: Publication

// Check permissions
if (!$g_user->hasPermission('ManagePub')) {
	camp_html_display_error(getGS("You do not have the right to manage publications."));
	exit;
}

$Pub = Input::Get('Pub', 'int');
$Language = Input::Get('Language', 'int', 1, true);

if (!Input::IsValid()) {
	camp_html_display_error(getGS('Invalid input: $1', Input::GetErrorString()), $_SERVER['REQUEST_URI']);
	exit;
}

$publicationObj = new Publication($Pub);
$pubTimeUnit = new TimeUnit($publicationObj->getTimeUnit(), $publicationObj->getLanguageId());
if (!$pubTimeUnit->exists()) {
	$pubTimeUnit = new TimeUnit($publicationObj->getTimeUnit(), 1);
}

$countries = Country::GetCountries($Language);

include_once($GLOBALS['g_campsiteDir']."/$ADMIN_DIR/javascript_common.php");

$crumbs = array(getGS("Subscriptions") => "deftime.php?Pub=$Pub&Language=$Language");
camp_html_content_top(getGS("Set subscription settings for a country"), array("Pub" => $publicationObj), true, false, $crumbs);
?>

<P>
<FORM METHOD="POST" ACTION="do_countryadd.php" onsubmit="return <?php camp_html_fvalidate(); ?>;">
<?php echo SecurityToken::FormParameter(); ?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:countryadd.php

示例3: array

require_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/issues/issue_common.php";
require_once $GLOBALS['g_campsiteDir'] . "/classes/SimplePager.php";
require_once $GLOBALS['g_campsiteDir'] . "/classes/IssuePublish.php";
$translator = \Zend_Registry::get('container')->getService('translator');
$Pub = Input::Get('Pub', 'int', 0);
$IssOffs = camp_session_get("IssOffs_{$Pub}", 0);
if ($IssOffs < 0) {
    $IssOffs = 0;
}
$ItemsPerPage = 15;
if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString()), 'issues'), $_SERVER['REQUEST_URI']);
    exit;
}
$publicationObj = new Publication($Pub);
$allIssues = Issue::GetIssues($Pub, null, null, null, $publicationObj->getLanguageId(), false, array('LIMIT' => array('START' => $IssOffs, 'MAX_ROWS' => $ItemsPerPage)), true);
$totalIssues = Issue::GetNumIssues($Pub);
$pager = new SimplePager($totalIssues, $ItemsPerPage, "IssOffs_{$Pub}", "index.php?Pub={$Pub}&");
include_once $GLOBALS['g_campsiteDir'] . "/{$ADMIN_DIR}/javascript_common.php";
camp_html_content_top($translator->trans('Issue List'), array('Pub' => $publicationObj));
$controller->view->headTitle($translator->trans('Issue List') . ' - Newscoop Admin', 'SET');
?>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="1" class="action_buttons" style="padding-top: 5px;">
<TR>
    <TD><A HREF="<?php 
echo \Zend_Registry::get('container')->get('router')->generate('newscoop_newscoop_publications_index');
?>
"><IMG SRC="<?php 
echo $Campsite["ADMIN_IMAGE_BASE_URL"];
?>
/left_arrow.png" BORDER="0"></A></TD>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:index.php

示例4: GetInvalidURLTemplate

 public static function GetInvalidURLTemplate($p_pubId, $p_issNr = NULL, $p_lngId = NULL, $p_isPublished = true)
 {
     global $g_ado_db;
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     if (CampCache::IsEnabled()) {
         $paramString = $p_lngId . '_' . $p_pubId . '_' . $p_issNr;
         $cacheKey = __CLASS__ . '_IssueTemplate_' . $paramString;
         $issueTemplate = CampCache::singleton()->fetch($cacheKey);
         if ($issueTemplate !== false && !empty($issueTemplate)) {
             return $issueTemplate;
         }
     }
     $publication = null;
     if (is_null($p_lngId)) {
         $publication = new Publication($p_pubId);
         if (!$publication->exists()) {
             $template = null;
         }
         $p_lngId = $publication->getLanguageId();
     }
     if (is_null($p_issNr) && (!is_null($publication) || !is_null($p_pubId))) {
         if (is_null($publication)) {
             $publication = new Publication($p_pubId);
         }
         $lastIssue = self::GetLastIssue($publication, $p_lngId, $p_isPublished);
         if (is_null($lastIssue)) {
             $template = null;
         }
         $p_issNr = $lastIssue[0];
     }
     if (!is_null($p_issNr)) {
         $resourceId = new ResourceId('template_engine/classes/CampSystem');
         $outputService = $resourceId->getService(IOutputService::NAME);
         if (!\Zend_Registry::isRegistered('webOutput')) {
             $cacheKeyWebOutput = $cacheService->getCacheKey(array('OutputService', 'Web'), 'outputservice');
             if ($cacheService->contains($cacheKeyWebOutput)) {
                 \Zend_Registry::set('webOutput', $cacheService->fetch($cacheKeyWebOutput));
             } else {
                 $webOutput = $outputService->findByName('Web');
                 $cacheService->save($cacheKeyWebOutput, $webOutput);
                 \Zend_Registry::set('webOutput', $webOutput);
             }
         }
         $templateSearchService = $resourceId->getService(ITemplateSearchService::NAME);
         $issueObj = new Issue($p_pubId, $p_lngId, $p_issNr);
         $template = $templateSearchService->getErrorPage($issueObj->getIssueId(), Zend_Registry::get('webOutput'));
     }
     if (empty($template)) {
         $template = null;
     }
     if (CampCache::IsEnabled()) {
         CampCache::singleton()->store($cacheKey, $template);
     }
     return $template;
 }
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:55,代码来源:CampSystem.php

示例5: GetTemplate

 /**
  *
  */
 public static function GetTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr, $p_artNr, $p_isPublished = true)
 {
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     $templateCacheKey = $cacheService->getCacheKey(array('template', $p_pubId, $p_issNr, $p_sctNr, $p_artNr, $p_isPublished), 'templates');
     if ($cacheService->contains($templateCacheKey)) {
         return $cacheService->fetch($templateCacheKey);
     }
     global $g_ado_db;
     if ($p_lngId <= 0) {
         $cacheKey = $cacheService->getCacheKey('legacy_publication_language_id' . $p_pubId, 'publication');
         if ($cacheService->contains($cacheKey)) {
             $p_lngId = $cacheService->fetch($cacheKey);
         } else {
             $publication = new Publication($p_pubId);
             if (!$publication->exists()) {
                 return null;
             }
             $p_lngId = $publication->getLanguageId();
             $cacheService->save($cacheKey, $p_lngId);
         }
     }
     if ($p_artNr > 0) {
         if ($p_issNr <= 0 || $p_sctNr <= 0) {
             $article = new Article($p_lngId, $p_artNr);
             if (!$article->exists() || $p_isPublished && !$article->isPublished()) {
                 return self::GetInvalidURLTemplate($p_pubId, $p_issNr, $p_lngId, $p_isPublished);
             }
             $p_issNr = $article->getIssueNumber();
             $p_sctNr = $article->getSectionNumber();
         }
         return self::GetArticleTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr);
     }
     if ($p_sctNr > 0) {
         if ($p_issNr <= 0) {
             $sql = 'SELECT MAX(i.Number) AS Number ' . 'FROM Sections as s, Issues as i ' . 'WHERE s.IdPublication = i.IdPublication' . ' AND s.IdLanguage = i.IdLanguage' . ' AND s.IdPublication = ' . (int) $p_pubId . ' AND s.IdLanguage = ' . (int) $p_lngId;
             if ($p_isPublished == true) {
                 $sql .= " AND i.Published = 'Y'";
             }
             $data = $g_ado_db->GetOne($sql);
             if (empty($data)) {
                 return null;
             }
             $p_issNr = $data;
         }
         return self::GetSectionTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr);
     }
     if ($p_issNr <= 0) {
         $sql = 'SELECT MAX(Number) AS Number FROM Issues ' . 'WHERE IdPublication = ' . $p_pubId . ' AND IdLanguage = ' . $p_lngId;
         if ($p_isPublished == true) {
             $sql .= " AND Published = 'Y'";
         }
         $data = $g_ado_db->GetOne($sql);
         if (empty($data)) {
             return null;
         }
         $p_issNr = $data;
     }
     $template = self::GetIssueTemplate($p_lngId, $p_pubId, $p_issNr);
     $cacheService->save($templateCacheKey, $template);
     return $template;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:64,代码来源:CampSystem.php

示例6: GetTemplate

 /**
  *
  */
 public static function GetTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr, $p_artNr, $p_isPublished = true)
 {
     global $g_ado_db;
     if ($p_lngId <= 0) {
         $publication = new Publication($p_pubId);
         if (!$publication->exists()) {
             return null;
         }
         $p_lngId = $publication->getLanguageId();
     }
     if ($p_artNr > 0) {
         if ($p_issNr <= 0 || $p_sctNr <= 0) {
             $article = new Article($p_lngId, $p_artNr);
             if (!$article->exists() || $p_isPublished && !$article->isPublished()) {
                 return self::GetInvalidURLTemplate($p_pubId, $p_issNr, $p_lngId, $p_isPublished);
             }
             $p_issNr = $article->getIssueNumber();
             $p_sctNr = $article->getSectionNumber();
         }
         return self::GetArticleTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr);
     }
     if ($p_sctNr > 0) {
         if ($p_issNr <= 0) {
             $sql = 'SELECT MAX(i.Number) AS Number ' . 'FROM Sections as s, Issues as i ' . 'WHERE s.IdPublication = i.IdPublication' . ' AND s.IdLanguage = i.IdLanguage' . ' AND s.IdPublication = ' . (int) $p_pubId . ' AND s.IdLanguage = ' . (int) $p_lngId;
             if ($p_isPublished == true) {
                 $sql .= " AND i.Published = 'Y'";
             }
             $data = $g_ado_db->GetOne($sql);
             if (empty($data)) {
                 return null;
             }
             $p_issNr = $data;
         }
         return self::GetSectionTemplate($p_lngId, $p_pubId, $p_issNr, $p_sctNr);
     }
     if ($p_issNr <= 0) {
         $sql = 'SELECT MAX(Number) AS Number FROM Issues ' . 'WHERE IdPublication = ' . $p_pubId . ' AND IdLanguage = ' . $p_lngId;
         if ($p_isPublished == true) {
             $sql .= " AND Published = 'Y'";
         }
         $data = $g_ado_db->GetOne($sql);
         if (empty($data)) {
             return null;
         }
         $p_issNr = $data;
     }
     return self::GetIssueTemplate($p_lngId, $p_pubId, $p_issNr);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:51,代码来源:CampSystem.php


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