本文整理汇总了PHP中Tasks::store方法的典型用法代码示例。如果您正苦于以下问题:PHP Tasks::store方法的具体用法?PHP Tasks::store怎么用?PHP Tasks::store使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Tasks
的用法示例。
在下文中一共展示了Tasks::store方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Tasks
<?php
/**
* @version $Header$
*
* Copyright (c) 2006 bitweaver.org
* All Rights Reserved. See below for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See http://www.gnu.org/copyleft/lesser.html for details
*
* @package citizen
* @subpackage functions
*/
/**
* required setup
*/
require_once '../kernel/setup_inc.php';
$gBitSystem->verifyPackage('tasks');
include_once TASKS_PKG_PATH . 'Tasks.php';
$userstate = $gBitUser->getPreference('task_process', 0);
if ($userstate) {
if (!empty($_REQUEST["content_id"])) {
$gTask = new Tasks(null, $userstate);
$gTask->load();
$updatetask = array();
$updatetask['new_citizen'] = $_REQUEST['content_id'];
$gTask->store($updatetask);
}
}
header("location: " . TASKS_PKG_URL . "index.php");
die;
示例2: Tasks
<?php
/**
* @version $Header$
*
* @author lsces <lester@lsces.co.uk>
* @package tasks
* @copyright 2008 bitweaver
* @license LGPL {@link http://www.gnu.org/licenses/lgpl.html}
**/
/**
* Setup
*/
require_once '../kernel/setup_inc.php';
$gBitSystem->verifyPackage('tasks');
require_once TASKS_PKG_PATH . 'Tasks.php';
$gTask = new Tasks();
$offset = 0;
if (!empty($_REQUEST['type'])) {
$offset = ($_REQUEST['type'] - 1) * 10000;
}
if (!empty($_REQUEST['pass'])) {
$offset = 50000;
}
$newtask = array();
$newtask['task_offset'] = $offset;
$gTask->store($newtask);
$gBitUser->storePreference('task_process', $gTask->mContentId);
// Refresh display
header("location: " . TASKS_PKG_URL . "index.php");
die;