當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。