本文整理匯總了PHP中Tasks::isValid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tasks::isValid方法的具體用法?PHP Tasks::isValid怎麽用?PHP Tasks::isValid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tasks
的用法示例。
在下文中一共展示了Tasks::isValid方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Tasks
/**
* @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();
if (!empty($_REQUEST['queue_id'])) {
$gTask->getNextTask($_REQUEST['queue_id']);
}
if ($gTask->isValid()) {
$gBitSmarty->assignByRef('taskInfo', $gTask->mInfo);
require_once CITIZEN_PKG_PATH . 'Citizen.php';
$gCitizen = new Citizen($this->mCitizenId);
if ($gCitizen->isValid()) {
$gBitSmarty->assignByRef('citizenInfo', $gCitizen->mInfo);
}
$gBitSystem->setBrowserTitle("Task List Item");
$gBitSystem->display('bitpackage:tasks/show_task.tpl', NULL, array('display_mode' => 'display'));
} else {
header("location: " . TASKS_PKG_URL . "view.php");
die;
}
示例2: Tasks
$gTask->store($updatetask);
}
}
}
}
} else {
if (!empty($_REQUEST['content_id'])) {
$gTask = new Tasks(null, $_REQUEST['content_id']);
$gTask->load();
$gBitUser->storePreference('task_process', $_REQUEST['content_id']);
$userstate = $_REQUEST['content_id'];
} else {
$gTask = new Tasks();
}
}
if ($gTask->isValid() and $userstate != 0) {
$gBitSmarty->assignByRef('userstate', $userstate);
$gBitSmarty->assignByRef('taskInfo', $gTask->mInfo);
$dept_tree = $gTask->listQueues();
$gBitSmarty->assignByRef('departments', $dept_tree['depts']);
$gBitSmarty->assignByRef('tags', $dept_tree['tags']);
$gBitSmarty->assignByRef('subtags', $dept_tree['subtags']);
require_once CITIZEN_PKG_PATH . 'Citizen.php';
$gCitizen = new Citizen(null, $gTask->mCitizenId);
$gCitizen->load();
if ($gCitizen->isValid()) {
$gCitizen->loadXrefList();
$gBitSmarty->assignByRef('citizenInfo', $gCitizen->mInfo);
}
$gBitSystem->setBrowserTitle("Task List Item");
$gBitSystem->display('bitpackage:tasks/show_task.tpl', NULL, array('display_mode' => 'display'));