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


PHP camp_html_goto_page函数代码示例

本文整理汇总了PHP中camp_html_goto_page函数的典型用法代码示例。如果您正苦于以下问题:PHP camp_html_goto_page函数的具体用法?PHP camp_html_goto_page怎么用?PHP camp_html_goto_page使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: require_once

require_once($GLOBALS['g_campsiteDir']."/classes/Country.php");

if (!SecurityToken::isValid()) {
    camp_html_display_error(getGS('Invalid security token!'));
    exit;
}

// 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', 0);
$Language = Input::Get('Language', 'int', 1, true);
$CountryCode = Input::Get('CountryCode');

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

$publicationObj = new Publication($Pub);
$defaultTime = new SubscriptionDefaultTime($CountryCode, $Pub);
$defaultTime->delete();

$logtext = getGS('Subscription default time for "$1":$2 deleted', $publicationObj->getName(), $CountryCode);
Log::Message($logtext, $g_user->getUserId(), 5);
camp_html_add_msg(getGS("Country subscription settings deleted."), "ok");
camp_html_goto_page("/$ADMIN/pub/deftime.php?Pub=$Pub&Language=$Language");
?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_deldeftime.php

示例2: camp_successful_login

function camp_successful_login($user, $f_login_language)
{
    global $ADMIN, $LiveUser, $LiveUserAdmin, $request, $requestId;

    $user->initLoginKey();
    $data = array('KeyId' => $user->getKeyId());
    if (is_object($LiveUser->_perm)) {
        $permUserId = $LiveUser->_perm->getProperty('perm_user_id');
        $LiveUserAdmin->updateUser($data, $permUserId);
        $LiveUser->updateProperty(true, true);
        LoginAttempts::ClearLoginAttemptsForIp();
        setcookie("LoginUserId", $user->getUserId());
        setcookie("LoginUserKey", $user->getKeyId());
        setcookie("TOL_Language", $f_login_language);
        Article::UnlockByUser($user->getUserId());

        // Try to restore request.
        if (!empty($request)) { // restore request
            camp_session_set("request_$requestId", $request);
            $request = unserialize($request);
            camp_html_goto_page($request['uri'], TRUE, array(
                'request' => $requestId,
            ));
        }

        // Go to admin index if no request is set.
        camp_html_goto_page("/$ADMIN/index.php");
    }
}
开发者ID:nistormihai,项目名称:Newscoop,代码行数:29,代码来源:do_login.php

示例3: Issue

	    $issuePublishObj->setIssueNumber($Issue);
	    $issuePublishObj->setLanguageId($Language);
	    $issuePublishExists = false;
	}
    $issuePublishObj->setPublishAction($action);
    $issuePublishObj->setPublishArticlesAction($publish_articles);
    $issuePublishObj->setActionTime($publish_time);
	$created = 1;
}
if ($created) {

        $action = ($issuePublishExists) ? 'updated' : 'added';
        $issueObj = new Issue($Pub, $Language, $Issue);
        $logtext = getGS('Scheduled action $1 for issue #$2: "$3" (Publication: $4)', $action, $Issue, $issueObj->getName(), $Pub);
        Log::Message($logtext, $g_user->getUserId(), 16);
        camp_html_goto_page("/$ADMIN/issues/edit.php?Pub=$Pub&Issue=$Issue&Language=$Language");
}

$issueObj = new Issue($Pub, $Language, $Issue);
$publicationObj = new Publication($Pub);
$crumbs = array("Pub" => $publicationObj, "Issue" => $issueObj);
camp_html_content_top(getGS("Scheduling a new publish action"), $crumbs);
?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="0" class="box_table">
	<TR>
		<TD COLSPAN="2">
			<B> <?php  putGS("Scheduling a new publish action"); ?> </B>
			<HR NOSHADE SIZE="1" COLOR="BLACK">
		</TD>
	</TR>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:autopublish_do_add.php

示例4: User

	camp_html_display_error(getGS("You do not have the right to change subscriptions status."));
	exit;
}

$f_user_id = Input::Get('f_user_id', 'int', 0);
$f_subscription_id = Input::Get('f_subscription_id', 'int', 0);
$f_publication_id = Input::Get('f_publication_id');

$manageUser = new User($f_user_id);
$subscription = new Subscription($f_subscription_id);
$changed = $subscription->setIsActive(!$subscription->isActive());
if (!$changed) {
	$errorMsgs[] = getGS('Subscription status could not be changed.');
}
else {
	camp_html_goto_page("/$ADMIN/users/subscriptions/?f_user_id=$f_user_id");
}
$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$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");
$crumbs[] = array(getGS("Change subscription status"), "");
echo camp_html_breadcrumbs($crumbs);

?>
<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_status.php

示例5: camp_html_goto_page

     if (!is_readable($file)) {
         camp_html_goto_page("/{$ADMIN}/backup.php");
     }
     set_time_limit(0);
     ob_end_flush();
     flush();
     echo str_repeat(' ', 2048);
     echo '<pre>';
     $options = array('f' => true, 'e' => true, 'b' => $file, '--keep-session');
     include CS_PATH_SITE . DIR_SEP . 'bin' . DIR_SEP . 'newscoop-restore';
     echo '</pre><script type="text/javascript">window.opener.location.reload();</script>';
     echo '<center><a href=# onclick="window.close()">' . $translator->trans('Close') . '</a></center>';
     exit(0);
 case 'download':
     if (!is_readable($file)) {
         camp_html_goto_page("/{$ADMIN}/backup.php");
     }
     header('Content-Disposition: attachment; filename=' . basename($file));
     header('Content-Length: ' . filesize($file));
     header('Content-Type: application/x-gzip');
     header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
     header('Content-Transfer-Encoding: binary');
     set_time_limit(0);
     // it looks that a problem could happen here if the server is out of its disk space
     try {
         $fp = fopen($file, 'r');
         while (!feof($fp)) {
             print fread($fp, 8192);
             flush();
             ob_flush();
         }
开发者ID:alvsgithub,项目名称:Newscoop,代码行数:31,代码来源:backup.php

示例6: array

$created = false;
$errorMsgs = array();
if (empty($cName)) {
    $correct = false;
    $errorMsgs[] = $translator->trans('You must fill in the $1 field.', array('$1' => '<B>Name</B>'));
}
$aliases = 0;
if ($correct) {
    $aliasDups = count(Alias::GetAliases(null, null, $cName));
    if ($aliasDups <= 0) {
        $newAlias = new Alias();
        $created = $newAlias->create(array('Name' => "{$cName}", "IdPublication" => "{$cPub}"));
        if ($created) {
            $cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
            $cacheService->clearNamespace('publication');
            camp_html_goto_page("/{$ADMIN}/pub/aliases.php?Pub={$cPub}");
        }
    } else {
        $errorMsgs[] = $translator->trans('Another alias with the same name exists already.', array(), 'pub');
    }
}
if (!$created && !$correct) {
    $errorMsgs[] = $translator->trans('The site alias $1 could not be added.', array('$1' => '<B>' . $cName . '</B>'), 'pub');
}
$crumbs = array($translator->trans("Publication Aliases", array(), 'pub') => "aliases.php?Pub={$cPub}");
camp_html_content_top($translator->trans("Adding new alias", array(), 'pub'), array("Pub" => $publicationObj), true, false, $crumbs);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_add_alias.php

示例7: getGS

if (empty($cName)) {
	$correct = false;
	$errorMsgs[] = getGS('You must fill in the $1 field.', '<B>Name</B>');
}

$aliases = 0;
if ($correct) {
	$aliasDups = count(Alias::GetAliases(null, null, $cName));
	if ($aliasDups <= 0) {
		$newAlias = new Alias();
		$created = $newAlias->create(array('Name' => "$cName", "IdPublication" => "$cPub"));
		if ($created) {
			$logtext = getGS('The site alias "$1" has been added to publication "$2".',
						$cName, $publicationObj->getName());
			Log::Message($logtext, $g_user->getUserId(), 151);
			camp_html_goto_page("/$ADMIN/pub/aliases.php?Pub=$cPub");
		}
	}
	else {
		$errorMsgs[] = getGS('Another alias with the same name exists already.');
	}
}

if (!$created && !$correct) {
	$errorMsgs[] = getGS('The site alias $1 could not be added.', '<B>'.$cName.'</B>');
}

$crumbs = array(getGS("Publication Aliases") => "aliases.php?Pub=$cPub");
camp_html_content_top(getGS("Adding new alias"), array("Pub" => $publicationObj), true, false, $crumbs);
?>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:30,代码来源:do_add_alias.php

示例8: getGS

	}

	$res = ArticleType::merge($f_src, $f_dest, $f_src_c);
    if (!$res) {
        $errMsgs[] = getGS("Merge failed.");
        $ok = false;
    }
    if ($ok) {
    	$f_delete = Input::get('f_delete', 'checkbox', 0);
        if ($f_delete) {
            // delete the source article type
            $at = new ArticleType($f_src);
            $at->delete();
        }

        camp_html_goto_page("/$ADMIN/article_types/");
        exit(0);
    }
}


//
// Otherwise, we are in preview mode, so render up a preview
//
if ($ok) {
    //
    // calculate where this article is in relation to all the articles of the src type
    //
    $articlesArray = $src->getArticlesArray();
    if (!count($articlesArray)) {
        $errMsgs[] = getGS("No articles.");
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:merge3.php

示例9: camp_html_display_error

$translator = \Zend_Registry::get('container')->getService('translator');
if (!SecurityToken::isValid()) {
    camp_html_display_error($translator->trans('Invalid security token!'));
    exit;
}
if (!$g_user->hasPermission('DeleteCountries')) {
    camp_html_display_error($translator->trans("You do not have the right to delete countries.", array(), 'country'));
    exit;
}
$f_country_code = Input::Get('f_country_code');
$f_country_language = Input::Get('f_country_language');
$country = new Country($f_country_code, $f_country_language);
$language = new Language($f_country_language);
$deleted = $country->delete();
if ($deleted) {
    camp_html_goto_page("/{$ADMIN}/country");
}
$crumbs = array();
$crumbs[] = array($translator->trans("Configure"), "");
$crumbs[] = array($translator->trans("Countries"), "/{$ADMIN}/country/");
$crumbs[] = array($translator->trans("Delete country", array(), 'country'), "");
echo camp_html_breadcrumbs($crumbs);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
		<B> <?php 
echo $translator->trans("Delete country", array(), 'country');
?>
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_del.php

示例10: array

//$Path = camp_topic_path($topicParent, $f_topic_language_id);

$errorMsgs = array();


if ($f_type_language_id <= 0) {
	$correct = false;
	$errorMsgs[] = getGS('You must choose a language for the article type.');
}

if ($correct) {
	// Translate existing type
	$type = new ArticleType($f_type_id);
	$created = $type->setName($f_type_language_id, $f_type_translation_name);
	if ($created) {
		camp_html_goto_page("/$ADMIN/article_types/index.php");
	}
	else {
		$errorMsgs[] = getGS('The translation could not be added.');
	}
}

$crumbs = array();
$crumbs[] = array(getGS("Configure"), "");
$crumbs[] = array(getGS("Article Types"), "/$ADMIN/article_types/");
$crumbs[] = array(getGS("Adding new article type"), "");

echo camp_html_breadcrumbs($crumbs);

?>
<P>
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_translate.php

示例11: camp_html_display_error

if (!SecurityToken::isValid()) {
    camp_html_display_error(getGS('Invalid security token!'));
    exit;
}

$canManage = $g_user->hasPermission('ManageUserTypes');
if (!$canManage) {
	$error = getGS("You do not have the right to delete user types.");
	camp_html_display_error($error);
	exit;
}

$uTypeId = Input::Get('UType', 'string', '');
if (is_numeric($uTypeId) && $uTypeId > 0) {
	$userType = new UserType($uTypeId);
	if (!$userType->exists()) {
		camp_html_display_error(getGS('No such user type.'));
		exit;
	}
	$userType->delete();
} else {
	camp_html_display_error(getGS('No such user type.'));
	exit;
}

$msg = getGS("User Type '$1' successfully deleted", $userType->getName());
camp_html_add_msg($msg, 'ok');
camp_html_goto_page("/$ADMIN/user_types/");

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

示例12: camp_html_add_msg

                $articleObj->setIsLocked(false);
            }
        }
        camp_html_add_msg(getGS("Article(s) unlocked."), "ok");
        break;
    case "context_box_update":
        camp_html_add_msg(getGS("Context Box updated"), "ok");
        break;
    case "schedule_publish":
        $args = $_REQUEST;
        unset($args[SecurityToken::SECURITY_TOKEN]);
        unset($args["f_article_code"]);
        $argsStr = camp_implode_keys_and_values($args, "=", "&");
        foreach ($_REQUEST["f_article_code"] as $code) {
            $argsStr .= "&f_article_code[]={$code}";
        }
        camp_html_goto_page("/{$ADMIN}/articles/multi_autopublish.php?" . $argsStr);
    case "translate":
        $args = $_REQUEST;
        unset($args[SecurityToken::SECURITY_TOKEN]);
        unset($args["f_article_code"]);
        $argsStr = camp_implode_keys_and_values($args, "=", "&");
        foreach ($_REQUEST["f_article_code"] as $code) {
            $argsStr .= "&f_article_code={$code}";
            break;
        }
        camp_html_goto_page("/{$ADMIN}/articles/translate.php?" . $argsStr);
}
$backUrl = "/{$ADMIN}/articles/index.php?f_publication_id={$f_publication_id}" . "&f_issue_number={$f_issue_number}&f_section_number={$f_section_number}" . "&f_language_id={$f_language_id}&f_language_selected={$f_language_selected}" . "&{$offsetVarName}={$f_article_offset}";
camp_html_goto_page($backUrl);
开发者ID:nidzix,项目名称:Newscoop,代码行数:30,代码来源:do_article_list_action.php

示例13: camp_html_display_error

    exit;
}
if (!$g_user->hasPermission('ManageCountries')) {
    camp_html_display_error($translator->trans("You do not have the right to change country names.", array(), 'country'));
    exit;
}
$f_country_code = Input::Get('f_country_code');
$f_country_language = Input::Get('f_country_language');
$f_country_name = trim(Input::Get('f_country_name'));
$country = new Country($f_country_code, $f_country_language);
$language = new Language($f_country_language);
if (empty($f_country_name)) {
    $errorMsgs[] = $translator->trans("You must fill in the \$1 field.", array('$1' => "<B>" . $translator->trans("Name") . "</B>"));
} else {
    if ($country->setName($f_country_name)) {
        camp_html_goto_page("/{$ADMIN}/country/index.php");
    } else {
        $errorMsgs[] = $translator->trans('The country name $1 could not be changed', array('$1' => '<B>' . htmlspecialchars($country->getName()) . '</B>'), 'country');
    }
}
$crumbs = array();
$crumbs[] = array($translator->trans("Configure"), "");
$crumbs[] = array($translator->trans("Countries"), "/{$ADMIN}/country/");
$crumbs[] = array($translator->trans("Changing country name", array(), 'country'), "");
echo camp_html_breadcrumbs($crumbs);
?>

<P>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="8" class="message_box">
<TR>
	<TD COLSPAN="2">
开发者ID:sourcefabric,项目名称:newscoop,代码行数:31,代码来源:do_edit.php

示例14: getGS

	// save user customized rights
	$editUser->updatePermissions($permissions);

	$logtext = getGS('Permissions changed for user "$1"',$editUser->getUserName());
	Log::Message($logtext, $g_user->getUserId(), 55);
}
if ($editUser->isAdmin() && !$customizeRights && $canManage) {
	// save user rights based on existing user type
	$userTypeId = Input::Get('UserType', 'int', 0);
	if ($userTypeId != 0) {
		$editUser->setUserType($userTypeId);
	}
}

// unsubscribe
$unsubscribe = Input::Get('unsubscribe', 'bool', false);
if ($unsubscribe 
    && ($canManage || $editUser->getUserId() == $g_user->getUserId())) {
    $editUser->setPermission('MailNotify', false);
}

camp_html_add_msg(getGS("User '$1' information was changed successfully.",
	$editUser->getUserName()), "ok");
$editUser->fetch();
if ($editUser->getUserName() == $g_user->getUserName() && !$editUser->hasPermission('ManageUsers')) {
	camp_html_goto_page("/$ADMIN/");
}
camp_html_goto_page("/$ADMIN/users/edit.php?$typeParam&User=".$editUser->getUserId());

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

示例15: Phorum_message

$commentObj = new Phorum_message();
$commentObj->create($forumId,
                    $f_comment_subject,
                    $f_comment_body,
                    $threadId,
                    $f_comment_parent_id,
                    $f_comment_nickname,
                    $g_user->getEmail(),
                    $g_user->getUserId());
$commentObj->setStatus(PHORUM_STATUS_APPROVED);

// Link the message to the article
$isFirstMessage = ($threadId == 0);
ArticleComment::Link($f_article_number, $f_language_id, $commentObj->getMessageId(), $isFirstMessage);

camp_html_goto_page(camp_html_article_url($articleObj, $f_language_selected, "edit.php")."#add_comment");


/**
 * Create the first message for an article, which is a blank message
 * with the title of the article as the subject.
 *
 * @param Article $p_article
 * @param int $p_forumId
 * @return mixed
 *      The comment created (or the one that already exists) on success,
 *      or false on error.
 */
function camp_comment_first_post($p_article, $p_forumId)
{
    // Check if the first post already exists.
开发者ID:nistormihai,项目名称:Newscoop,代码行数:31,代码来源:do_add_comment.php


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