本文整理汇总了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'));