本文整理汇总了PHP中Subscription::GetNumSubscriptions方法的典型用法代码示例。如果您正苦于以下问题:PHP Subscription::GetNumSubscriptions方法的具体用法?PHP Subscription::GetNumSubscriptions怎么用?PHP Subscription::GetNumSubscriptions使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Subscription
的用法示例。
在下文中一共展示了Subscription::GetNumSubscriptions方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: putGS
<?php
if (!$g_user->hasPermission("ManageSubscriptions") || !isset($editUser) || gettype($editUser) != 'object' || $editUser->getUserName() == '') {
camp_html_display_error(getGS('No such user account.'),$_SERVER['REQUEST_URI']);
exit;
}
$publications = Publication::GetPublications();
$numSubscriptions = Subscription::GetNumSubscriptions(null, $editUser->getUserId());
?>
<table border="0" cellspacing="1" cellpadding="3" width="100%" >
<tr class="table_list_header">
<td colspan="5" align="left">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr class="table_list_header">
<td align="left"><?php putGS("Subscriptions"); ?></td>
<?php
if (sizeof($publications) > $numSubscriptions) {
?>
<td align="right" valign="center" nowrap>
<?php $addURI = "/$ADMIN/users/subscriptions/add.php?f_user_id=".$editUser->getUserId(); ?>
<a href="<?php echo $addURI; ?>"><IMG SRC="<?php echo $Campsite["ADMIN_IMAGE_BASE_URL"]; ?>/add.png" BORDER="0"></A>
<a href="<?php echo $addURI; ?>"><B><?php putGS("Add new"); ?></B></A>
</td>
<?php
} // if (sizeof($publications) > $numSubscriptions)
?>
</tr>
</table>
</td>
示例2: array
$errorMsgs = array();
if ($issuesRemaining > 0) {
$errorMsgs[] = getGS('There are $1 issue(s) left.', $issuesRemaining);
$doDelete = false;
}
$sectionsRemaining = Section::GetSections($Pub, null, null, null, null, null, true);
if (count($sectionsRemaining) > 0) {
$errorMsgs[] = getGS('There are $1 section(s) left.', count($sectionsRemaining));
$doDelete = false;
}
$articlesRemaining = Article::GetNumUniqueArticles($Pub);
if ($articlesRemaining > 0) {
$errorMsgs[] = getGS('There are $1 article(s) left.', $articlesRemaining);
$doDelete = false;
}
$subscriptionsRemaining = Subscription::GetNumSubscriptions($Pub);
if ($subscriptionsRemaining > 0) {
$errorMsgs[] = getGS('There are $1 subscription(s) left.', $subscriptionsRemaining);
$doDelete = false;
}
if ($doDelete) {
$publicationObj->delete();
camp_html_goto_page("/{$ADMIN}/pub");
} else {
$errorMsgs[] = getGS('The publication $1 could not be deleted.', '<B>' . htmlspecialchars($publicationObj->getName()) . '</B>');
}
echo camp_html_content_top(getGS("Deleting publication"), array("Pub" => $publicationObj));
?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
示例3: camp_load_translation_strings
camp_load_translation_strings("user_subscriptions");
require_once($GLOBALS['g_campsiteDir']. '/classes/Input.php');
require_once($GLOBALS['g_campsiteDir']. '/classes/Subscription.php');
require_once($GLOBALS['g_campsiteDir']. '/classes/Publication.php');
require_once($GLOBALS['g_campsiteDir']."/db_connect.php");
$f_user_id = Input::Get('f_user_id', 'int', 0);
$f_subscription_offset = Input::Get('f_subscription_offset', 'int', 0, true);
if ($f_subscription_offset < 0) {
$f_subscription_offset = 0;
}
$ItemsPerPage = 20;
$manageUser = new User($f_user_id);
$publications = Publication::GetPublications();
$numSubscriptions = Subscription::GetNumSubscriptions(null, $f_user_id);
$subscriptions = Subscription::GetSubscriptions(null, $f_user_id,
array("ORDER BY" => array("Id" => "DESC"),
"LIMIT" => array("START" => $f_subscription_offset, "MAX_ROWS" => $ItemsPerPage)));
$crumbs = array();
$crumbs[] = array(getGS('Users'), '');
$crumbs[] = array(getGS('Subscribers'), "/$ADMIN/users/?uType=Subscribers");
$crumbs[] = array(getGS('Account') . " '".$manageUser->getUserName()."'",
"/$ADMIN/users/edit.php?User=$f_user_id&uType=Subscribers");
$crumbs[] = array(getGS('Subscriptions'), "/$ADMIN/users/subscriptions/?f_user_id=$f_user_id");
echo camp_html_breadcrumbs($crumbs);
if (sizeof($publications) > $numSubscriptions) {
?>
<P>