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


PHP Publication::getTimeUnit方法代码示例

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


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

示例1: 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

示例2: trim

$TOL_Language = camp_session_get('TOL_Language', 'en');
$f_name = trim(Input::Get('f_name'));
$f_default_alias = Input::Get('f_default_alias', 'int');
$f_language = Input::Get('f_language', 'int');
$f_url_type = Input::Get('f_url_type', 'int');
$publicationObj = new Publication($f_publication_id);
if (Saas::singleton()->hasPermission("ManagePublicationSubscriptions")) {
    $f_time_unit = Input::Get('f_time_unit');
    $f_unit_cost = trim(Input::Get('f_unit_cost', 'float', '0.0'));
    $f_unit_cost_all_lang = trim(Input::Get('f_unit_cost_all_lang', 'float', '0.0'));
    $f_currency = trim(Input::Get('f_currency'));
    $f_paid = Input::Get('f_paid', 'int');
    $f_trial = Input::get('f_trial', 'int');
} else {
    if (isset($publicationObj)) {
        $f_time_unit = $publicationObj->getTimeUnit();
        $f_unit_cost = p($publicationObj->getUnitCost());
        $f_unit_cost_all_lang = p($publicationObj->getUnitCostAllLang());
        $f_currency = p(htmlspecialchars($publicationObj->getCurrency()));
        $f_paid = p($publicationObj->getPaidTime());
        $f_trial = p($publicationObj->getTrialTime());
    } else {
        $f_time_unit = 'D';
        $f_unit_cost = '';
        $f_unit_cost_all_lang = '';
        $f_currency = '';
        $f_paid = '';
        $f_trial = '';
    }
}
$f_comments_enabled = Input::Get('f_comments_enabled', 'checkbox', 'numeric');
开发者ID:nidzix,项目名称:Newscoop,代码行数:31,代码来源:do_edit.php


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