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


PHP Issue::GetIssues方法代码示例

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


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

示例1: camp_is_issue_conflicting

/**
 * Check if the given parameters match an existing issue.  All parameters
 * should be for the issue you are adding/editing.  If you are adding,
 * set $p_isExistingIssue to FALSE, and if you are editing, set it to TRUE.
 *
 * @param int $p_publicationId
 * @param int $p_issueNumber
 * @param int $p_languageId
 * @param string $p_urlName
 * @param boolean $p_isExistingIssue
 * 		Set this to true if the issue already exists.
 * @return string
 * 		Return empty string on success, error message on failure.
 */
function camp_is_issue_conflicting($p_publicationId, $p_issueNumber, $p_languageId, $p_urlName, $p_isExistingIssue)
{
	global $ADMIN;
	// The tricky part - language ID and URL name must be unique.
	$conflictingIssues = Issue::GetIssues($p_publicationId, $p_languageId, null, $p_urlName, null, false, null, true);
	$conflictingIssue = array_pop($conflictingIssues);

	// Check if the issue conflicts with another issue.

	// If the issue exists, we have to make sure the conflicting issue is not
	// itself.
	$isSelf = ($p_isExistingIssue && is_object($conflictingIssue)
			   && ($conflictingIssue->getIssueNumber() == $p_issueNumber));
	if (is_object($conflictingIssue) && !$isSelf) {
		$conflictingIssueLink = "/$ADMIN/issues/edit.php?"
			."Pub=$p_publicationId"
			."&Issue=".$conflictingIssue->getIssueNumber()
			."&Language=".$conflictingIssue->getLanguageId();

		$errMsg = getGS('The language and URL name must be unique for each issue in this publication.')."<br>".getGS('The values you are trying to set conflict with issue "$1$2. $3 ($4)$5".',
			"<a href='$conflictingIssueLink'>",
			$conflictingIssue->getIssueNumber(),
			$conflictingIssue->getName(),
			$conflictingIssue->getLanguageName(),
			'</a>');
		return $errMsg;
	}
	return "";
}
开发者ID:nistormihai,项目名称:Newscoop,代码行数:43,代码来源:issue_common.php

示例2: camp_html_display_error

if (!Input::IsValid()) {
    camp_html_display_error($translator->trans('Invalid input: $1', array('$1' => Input::GetErrorString())), $_SERVER['REQUEST_URI']);
    exit;
}
if ($f_article_language <= 0) {
    $f_destination_publication_id = 0;
    $f_destination_issue_number = 0;
    $f_destination_section_number = 0;
}
if (count($publications) == 1) {
    $singlePublication = camp_array_peek($publications);
    $f_destination_publication_id = $singlePublication->getPublicationId();
}
$allIssues = array();
if ($f_destination_publication_id > 0) {
    $allIssues = Issue::GetIssues($f_destination_publication_id, $f_article_language, null, null, null, false, array("ORDER BY" => array("Number" => "DESC")), true);
    if (count($allIssues) == 1) {
        $singleIssue = camp_array_peek($allIssues);
        $f_destination_issue_number = $singleIssue->getIssueNumber();
        $f_article_language = $singleIssue->getLanguageId();
    }
}
$allSections = array();
if ($f_destination_issue_number > 0) {
    $selectedIssue = new Issue($f_destination_publication_id, $f_article_language, $f_destination_issue_number);
    $allSections = Section::GetSections($f_destination_publication_id, $f_destination_issue_number, $f_article_language, null, null, array("ORDER BY" => array("Name" => "ASC")), true);
    if (count($allSections) == 1) {
        $singleSection = camp_array_peek($allSections);
        $f_destination_section_number = $singleSection->getSectionNumber();
    }
}
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:add_move.php

示例3: Publication

$publicationObj = new Publication($f_publication_id);
if (!$publicationObj->exists()) {
    camp_html_display_error($translator->trans("Publication does not exist."));
    exit;
}
$created = false;
$errorMsgs = array();
if (empty($f_issue_number) || !is_numeric($f_issue_number) || $f_issue_number <= 0) {
    camp_html_add_msg($translator->trans('You must fill in the $1 field.', array('$1' => '<B>' . $translator->trans('Number') . '</B>')));
}
if (camp_html_has_msgs()) {
    camp_html_goto_page($backLink);
}
// check if the issue number already exists
$lastIssue = Issue::GetLastCreatedIssue($f_publication_id);
$existingIssues = Issue::GetIssues($f_publication_id, null, $f_issue_number, null, null, false, null, true);
if (count($existingIssues) > 0) {
    $conflictingIssue = array_pop($existingIssues);
    $conflictingIssueLink = "/{$ADMIN}/issues/edit.php?" . "Pub={$f_publication_id}" . "&Issue=" . $conflictingIssue->getIssueNumber() . "&Language=" . $conflictingIssue->getLanguageId();
    $errMsg = $translator->trans('The number must be unique for each issue in this publication of the same language.', array(), 'issues') . "<br>" . $translator->trans('The values you are trying to set conflict with issue $1$2. $3 ($4)$5.', array('$1' => "<a href='{$conflictingIssueLink}' class='error_message' style='color:#E30000;'>", '$2' => $conflictingIssue->getIssueNumber(), '$3' => $conflictingIssue->getName(), '$4' => $conflictingIssue->getLanguageName(), '$5' => '</a>'), 'issues');
    camp_html_add_msg($errMsg);
    camp_html_goto_page($backLink);
}
$issueCopies = $lastIssue->copy(null, $f_issue_number);
if (!is_null($issueCopies)) {
    $issueCopy = $issueCopies[0];
    camp_html_add_msg($translator->trans("Issue created.", array(), 'issues'), "ok");
    camp_html_goto_page("/{$ADMIN}/issues/edit.php?Pub={$f_publication_id}&Issue=" . $issueCopy->getIssueNumber() . "&Language=" . $issueCopy->getLanguageId());
} else {
    camp_html_add_msg($translator->trans("The issue could not be added.", array(), 'issues'));
    camp_html_goto_page($backLink);
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_add_prev.php

示例4: array

    $outSetIssue->setSectionPage(null);
}
if ($f_article_template_id != null && $f_article_template_id != '0') {
    $outSetIssue->setArticlePage($syncRsc->getResource('articlePage', $f_article_template_id));
} else {
    $outSetIssue->setArticlePage(null);
}
//@New theme management
if ($changed) {
} else {
    $errMsg = $translator->trans("Could not save the changes to the issue.", array(), 'issues');
    camp_html_add_msg($errMsg);
    exit;
}
// The tricky part - language ID and URL name must be unique.
$conflictingIssues = Issue::GetIssues($f_publication_id, $f_new_language_id, null, $f_url_name, null, false, null, true);
$conflictingIssue = array_pop($conflictingIssues);
// If it conflicts with another issue
if ($errorMsg = camp_is_issue_conflicting($f_publication_id, $f_issue_number, $f_new_language_id, $f_url_name, true)) {
    camp_html_add_msg($errorMsg);
    camp_html_goto_page($backLink);
} else {
    $issueObj->setProperty('ShortName', $f_url_name, false);
    $issueObj->setProperty('IdLanguage', $f_new_language_id, false);
    $issueObj->commit();
    //@New theme management
    if (SaaS::singleton()->hasPermission('ManageIssueTemplates')) {
        if ($newOutputSetting) {
            $outputSettingIssueService->insert($outSetIssue);
        } else {
            $outputSettingIssueService->update($outSetIssue);
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php

示例5: _getIssue

 /**
  * Get issue
  *
  * @param  string $name
  *
  * @return MetaIssue
  */
 private function _getIssue($name, MetaLanguage $language, MetaPublication $publication)
 {
     $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
     $issueKey = $cacheService->getCacheKey(array('metaIssue', $name, $publication->identifier, $language->number), 'issue');
     if ($cacheService->contains($issueKey)) {
         return $cacheService->fetch($issueKey);
     }
     $issueObj = Issue::GetCurrentIssue($publication->identifier, $language->number);
     if (!empty($name)) {
         $issueArray = Issue::GetIssues($publication->identifier, $language->number, null, $name, null, !$this->m_preview);
         if (is_array($issueArray) && sizeof($issueArray) == 1) {
             $issue = new MetaIssue($publication->identifier, $language->number, $issueArray[0]->getIssueNumber());
         } else {
             throw new InvalidArgumentException("Invalid issue identifier in URL.", self::INVALID_ISSUE);
         }
     } else {
         $issue = new MetaIssue($publication->identifier, $language->number, $issueObj->getIssueNumber());
         if (!$issue->defined()) {
             throw new InvalidArgumentException("No published issue was found.", self::INVALID_ISSUE);
         }
     }
     $cacheService->save($issueKey, $issue);
     return $issue;
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:CampURIShortNames.php

示例6: getFilterIssues

 public function getFilterIssues()
 {
     global $ADMIN_DIR, $g_user;
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Publication.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Issue.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Section.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Topic.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Author.php';
     foreach ($_REQUEST['args'] as $arg) {
         $_REQUEST[$arg['name']] = $arg['value'];
     }
     if ($_REQUEST['publication'] > 0) {
         $publication = $_REQUEST['publication'];
     } else {
         $publication = NULL;
     }
     if ($_REQUEST['language'] > 0) {
         $language = $_REQUEST['language'];
     } else {
         $language = NULL;
     }
     $newIssues = array();
     $issues = Issue::GetIssues($publication, $language);
     $issuesNo = is_array($issues) ? sizeof($issues) : 0;
     $menuIssueTitle = $issuesNo > 0 ? getGS('All Issues') : getGS('No issues found');
     foreach ($issues as $issue) {
         $newIssues[] = array('val' => $issue->getPublicationId() . '_' . $issue->getIssueNumber() . '_' . $issue->getLanguageId(), 'name' => $issue->getName());
     }
     $returns = array();
     $returns['items'] = $newIssues;
     $returns['itemsNo'] = $issuesNo;
     $returns['menuItemTitle'] = $menuIssueTitle;
     return json_encode($returns);
 }
开发者ID:nidzix,项目名称:Newscoop,代码行数:34,代码来源:ContextList.php

示例7: camp_session_get

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

示例8: require_once

<?PHP
require_once($GLOBALS['g_campsiteDir']."/classes/Publication.php");
require_once($GLOBALS['g_campsiteDir']."/classes/Issue.php");
require_once($GLOBALS['g_campsiteDir']."/classes/Section.php");

global $Campsite;

/**
 * $Campsite["issues"] in indexed by publication ID.
 * $Campsite["sections"] is indexed by publication ID, issue number, and issue language.
 */
$Campsite["publications"] = Publication::GetPublications();
$Campsite["issues"] = array();
$Campsite["sections"] = array();
foreach ($Campsite["publications"] as $publication) {
	$Campsite["issues"][$publication->getPublicationId()] =
		Issue::GetIssues($publication->getPublicationId(), null, null, null, $publication->getLanguageId(),
			false, array('ORDER BY'=>array('Number'=>'DESC'), 'LIMIT' => '5'), true);
	foreach ($Campsite["issues"][$publication->getPublicationId()] as $issue) {
		$Campsite["sections"][$issue->getPublicationId()][$issue->getIssueNumber()][$issue->getLanguageId()] =
			Section::GetSections($issue->getPublicationId(),
				$issue->getIssueNumber(), $issue->getLanguageId(),
				null, null, array('ORDER BY'=>array('Number'=>'ASC'), 'LIMIT' => '10'), true);
	}
}

?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:27,代码来源:init_content.php

示例9: foreach

        if (isset($article->keywords) && !empty($article->keywords)) {
            $articleObj->setKeywords((string) $article->keywords);
        }
        $articleFields['keywords'] = true;
        foreach ($xmlArticle as $articleFieldName => $articleFieldValue) {
            if (!array_key_exists($articleFieldName, $articleFields)) {
                $errorMessages[$articleCount][] = '"' . $articleFieldName . '" field in XML file ' . 'was not loaded into database as there is not any ' . 'article type field matching it.<br />';
            }
        }
    }
    camp_html_add_msg($translator->trans("\$1 articles successfully imported.", array('$1' => $articleCount), 'articles'), "ok");
}
// Gets all issues
$allIssues = array();
if ($f_publication_id > 0) {
    $allIssues = Issue::GetIssues($f_publication_id, $f_article_language_id, null, null, null, false, array("LIMIT" => 300, "ORDER BY" => array("Number" => "DESC")), true);
    // Automatically selects the issue if there is only one
    if (count($allIssues) == 1) {
        $tmpIssue = camp_array_peek($allIssues);
        $f_issue_number = $tmpIssue->getIssueNumber();
    }
}
// Gets all the sections
$allSections = array();
if ($f_issue_number > 0) {
    $destIssue = new Issue($f_publication_id);
    $allSections = Section::GetSections($f_publication_id, $f_issue_number, $f_article_language_id, null, null, array("ORDER BY" => array("Number" => "DESC")), true);
    // Automatically selects the section if there is only one
    if (count($allSections) == 1) {
        $tmpSection = camp_array_peek($allSections);
        $f_section_number = $tmpSection->getSectionNumber();
开发者ID:kartoffelkage,项目名称:Newscoop,代码行数:31,代码来源:la_import.php

示例10: putGS

       <li>
         <label>&nbsp;</label>
         <input type="reset" name="reset" id="reset" value="<?php putGS('Reset'); ?>" class="button" onclick="" />
       </li>
     </ul>
   </fieldset>
 </div>
 <div id="biographyContainer">
   <div class="space-box"></div>
   <fieldset class="frame">
     <ul>
       <li>
         <label class="smaller"><?php putGS('Languages'); ?>:</label>
         <select name="lang" class="input_select" style="width:160px;" id="lang" onchange="changeBio(<?php echo $id ?>)">
         <?php
         $publications = Issue::GetIssues();
         $languages = array();
         foreach ($publications as $publication) {
             $languages[] = $publication->getLanguageId();
         }
         $languages = array_unique($languages);
         $defaultLanguage = 0;
         $combo = "";
         foreach ($languages as $language) {
             $lang = new Language($language);
             if ($defaultLanguage == 0) {
                 $defaultLanguage = $language;
             }
             $combo .= '<option value="' . $language . '">' . $lang->getName() . "</option>";
         }
         $biography = "";
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:detail.php

示例11: camp_html_display_error

    camp_html_display_error(getGS('Invalid Input: $1', Input::GetErrorString()));
    exit;
}
$publicationObj = new Publication($Pub);
if (!$publicationObj->exists()) {
    camp_html_display_error(getGS('Publication does not exist.'));
    exit;
}
$issueObj = new Issue($Pub, $Language, $Issue);
if (!$issueObj->exists()) {
    camp_html_display_error(getGS('Issue does not exist.'));
    exit;
}
$allLanguages = Language::GetLanguages(null, null, null, array(), array(), true);
// Get translations of this issue
$issueTranslations = Issue::GetIssues($Pub, null, $Issue, null, null, false, null, true);
$excludeLanguageIds = DbObjectArray::GetColumn($issueTranslations, 'IdLanguage');
$allEvents = IssuePublish::GetIssueEvents($Pub, $Issue, $Language);
$publish_date = date("Y-m-d");
$publish_hour = date("H") + 1;
$publish_min = "00";
camp_html_content_top(getGS('Change issue details'), array('Pub' => $publicationObj, 'Issue' => $issueObj), true, true);
$url_args1 = "Pub={$Pub}";
$url_args2 = $url_args1 . "&Issue={$Issue}&Language={$Language}";
$url_args3 = "f_publication_id={$Pub}&f_issue_number={$Issue}&f_language_id={$Language}";
if (Issue::GetNumIssues($Pub) <= 0) {
    $url_add = "add_new.php";
} else {
    $url_add = "qadd.php";
}
//@New theme management
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:edit.php

示例12: getFilterIssues

 public function getFilterIssues()
 {
     global $ADMIN_DIR, $g_user;
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Publication.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Issue.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Section.php';
     require_once $GLOBALS['g_campsiteDir'] . '/classes/Author.php';
     $translator = \Zend_Registry::get('container')->getService('translator');
     foreach ($_REQUEST['args'] as $arg) {
         $_REQUEST[$arg['name']] = $arg['value'];
     }
     if ($_REQUEST['publication'] > 0) {
         $publication = $_REQUEST['publication'];
     } else {
         $publication = null;
     }
     if ($_REQUEST['language'] > 0) {
         $language = $_REQUEST['language'];
     } else {
         $language = null;
     }
     $newIssues = array();
     $issues = Issue::GetIssues($publication, $language);
     $issuesNo = is_array($issues) ? sizeof($issues) : 0;
     $menuIssueTitle = $issuesNo > 0 ? $translator->trans('All Issues', array(), 'library') : $translator->trans('No issues found', array(), 'library');
     foreach ($issues as $issue) {
         $newIssues[] = array('val' => $issue->getPublicationId() . '_' . $issue->getIssueNumber() . '_' . $issue->getLanguageId(), 'name' => $issue->getName());
     }
     $returns = array();
     $returns['items'] = $newIssues;
     $returns['itemsNo'] = $issuesNo;
     $returns['menuItemTitle'] = $menuIssueTitle;
     return json_encode($returns);
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:34,代码来源:ArticleList.php

示例13: setURL

    /**
     * Sets the URL values.
     *
     * Algorithm:
	 * - identify object (e.g.: publication, language, issue, section, article)
	 *     - object defined
	 *         - valid object?
	 *             - yes: set
	 *             - no: return error
	 *     - object undefined
	 *         - has default value?
	 *             - yes: set
	 *             - no:
	 *                 - object mandatory?
	 *                     - yes: return error
	 *                     - no: continue
     *
     * @return PEAR_Error
     *
     */
    private function setURL()
    {
        $this->setQueryVar('acid', null);

        $this->m_publication = null;
        $this->m_language = null;
        $this->m_issue = null;
        $this->m_section = null;
        $this->m_article = null;

        // gets the publication object based on site name (URI host)
        $alias = preg_replace('/^'.$this->getScheme().':\/\//', '', $this->getBase());
        $aliasObj = new Alias($alias);
        if ($aliasObj->exists()) {
            $this->m_publication = new MetaPublication($aliasObj->getPublicationId());
        }
        if (is_null($this->m_publication) || !$this->m_publication->defined()) {
            return new PEAR_Error("Invalid site name '$alias' in URL.", self::INVALID_SITE_NAME);
        }

        // reads parameters values if any
        $params = str_replace($this->m_config->getSetting('SUBDIR'), '', $this->getPath());
        $cParams = explode('/', trim($params, '/'));
        $cParamsSize = sizeof($cParams);
        if ($cParamsSize >= 1) {
            $cLangCode = $cParams[0];
        }
        if ($cParamsSize >= 2) {
            $cIssueSName = $cParams[1];
        }
        if ($cParamsSize >= 3) {
            $cSectionSName = $cParams[2];
        }
        if ($cParamsSize >= 4) {
            $cArticleSName = $cParams[3];
        }

        // gets the language identifier and sets the language code
        if (!empty($cLangCode)) {
            $langArray = Language::GetLanguages(null, $cLangCode);
            if (is_array($langArray) && sizeof($langArray) == 1) {
                $this->m_language = new MetaLanguage($langArray[0]->getLanguageId());
            }
        } else {
            $this->m_language = new MetaLanguage($this->m_publication->default_language->number);
        }
        if (is_null($this->m_language) || !$this->m_language->defined()) {
            return new PEAR_Error("Invalid language identifier in URL.", self::INVALID_LANGUAGE);
        }

        // gets the issue number and sets the issue short name
        if (!empty($cIssueSName)) {
        	$publishedOnly = !$this->m_preview;
            $issueArray = Issue::GetIssues($this->m_publication->identifier,
            $this->m_language->number, null, $cIssueSName, null, $publishedOnly);
            if (is_array($issueArray) && sizeof($issueArray) == 1) {
                $this->m_issue = new MetaIssue($this->m_publication->identifier,
                $this->m_language->number,
                $issueArray[0]->getIssueNumber());
            } else {
                return new PEAR_Error("Invalid issue identifier in URL.", self::INVALID_ISSUE);
	        }
        } else {
            $issueObj = Issue::GetCurrentIssue($this->m_publication->identifier,
            $this->m_language->number);
            $this->m_issue = new MetaIssue($this->m_publication->identifier,
            $this->m_language->number, $issueObj->getIssueNumber());
            if (!$this->m_issue->defined()) {
                return new PEAR_Error("No published issue was found.", self::INVALID_ISSUE);
            }
        }

        // gets the section number and sets the section short name
        if (!empty($cSectionSName)) {
            $sectionArray = Section::GetSections($this->m_publication->identifier,
            $this->m_issue->number,
            $this->m_language->number,
            $cSectionSName);
            if (is_array($sectionArray) && sizeof($sectionArray) == 1) {
                $this->m_section = new MetaSection($this->m_publication->identifier,
//.........这里部分代码省略.........
开发者ID:nistormihai,项目名称:Newscoop,代码行数:101,代码来源:CampURIShortNames.php

示例14: Section

}
$sectionObj = new Section($f_src_publication_id, $f_src_issue_number, $f_language_id, $f_src_section_number);
if (!$sectionObj->exists()) {
    camp_html_display_error(getGS('Section does not exist.'));
    exit;
}
$allPublications = Publication::GetPublications();
if (count($allPublications) == 1) {
    $f_dest_publication_id = $f_src_publication_id;
    $destPublicationObj = camp_array_peek($allPublications);
}
$allIssues = array();
if ($f_dest_publication_id > 0) {
    // Get the most recent 50 Issues...if they want something farther back, we are in trouble.
    $sqlOptions = array("LIMIT" => 50, "ORDER BY" => array("Number" => "DESC"));
    $allIssues = Issue::GetIssues($f_dest_publication_id, $f_language_id, null, null, null, false, $sqlOptions, true);
    if (count($allIssues) == 1) {
        $f_dest_issue_number = $f_src_issue_number;
    }
}
$allSections = array();
$destIssueObj = null;
if ($f_dest_issue_number > 0) {
    $destIssueObj = new Issue($f_dest_publication_id, $sectionObj->getLanguageId(), $f_dest_issue_number);
    $allSections = Section::GetSections($f_dest_publication_id, $f_dest_issue_number, $sectionObj->getLanguageId(), null, null, null, true);
}
$topArray = array('Pub' => $publicationObj, 'Issue' => $issueObj, 'Section' => $sectionObj);
camp_html_content_top(getGS('Duplicate section'), $topArray, true, true);
?>
<script>
function CustomValidator_DuplicateSection(form) {
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:duplicate.php

示例15: array

require_once $GLOBALS['g_campsiteDir'] . '/classes/Publication.php';
require_once $GLOBALS['g_campsiteDir'] . '/classes/Issue.php';
require_once $GLOBALS['g_campsiteDir'] . '/classes/Section.php';
require_once $GLOBALS['g_campsiteDir'] . '/classes/Article.php';
require_once $GLOBALS['g_campsiteDir'] . '/classes/Input.php';
$maxSelectLength = 60;
$languageId = Input::get('IdLanguage', 'int', 0, true);
$publicationId = Input::get('IdPublication', 'int', 0, true);
$sectionId = Input::get('NrSection', 'int', 0, true);
$issueId = Input::get('NrIssue', 'int', 0, true);
$articleId = Input::get('NrArticle', 'int', 0, true);
$target = Input::get('targetlist', 'string', '', true);
$languages = Language::GetLanguages(null, null, null, array(), array(), true);
$publications = Publication::GetPublications();
if ($languageId != 0 && $publicationId != 0) {
    $issues = Issue::GetIssues($publicationId, $languageId, null, null, null, false, null, true);
}
if ($languageId != 0 && $publicationId != 0 && $issueId != 0) {
    $sections = Section::GetSections($publicationId, $issueId, $languageId, null, null, null, true);
}
if ($languageId != 0 && $publicationId != 0 && $issueId != 0 && $sectionId != 0) {
    $articles = Article::GetArticles($publicationId, $issueId, $sectionId, $languageId);
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>{#campsiteinternallink_dlg.title}</title>

  <script type="text/javascript" src="../../tiny_mce_popup.js"></script>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:link.php


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