Example #1
0
<?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;
Example #2
0
<?php

/**
 * @version      $Header$
 *
 * @author       lsces  <*****@*****.**>
 * @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;