本文整理汇总了PHP中task::load_task_filter方法的典型用法代码示例。如果您正苦于以下问题:PHP task::load_task_filter方法的具体用法?PHP task::load_task_filter怎么用?PHP task::load_task_filter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类task
的用法示例。
在下文中一共展示了task::load_task_filter方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show_projects
function show_projects($template_name)
{
global $TPL;
global $default;
$_FORM = task::load_form_data($defaults);
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
if (is_array($_FORM["projectID"])) {
$projectIDs = $_FORM["projectID"];
foreach ($projectIDs as $projectID) {
$project = new project();
$project->set_id($projectID);
$project->select();
$_FORM["projectID"] = array($projectID);
$TPL["graphTitle"] = urlencode($project->get_value("projectName"));
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
include_template($template_name);
}
}
}
示例2: array
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
* License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
$TPL["main_alloc_title"] = "Task List - " . APPLICATION_NAME;
$defaults = array("showHeader" => true, "showTaskID" => true, "showEdit" => true, "taskView" => "byProject", "showStatus" => "true", "showTotals" => "true", "padding" => 1, "url_form_action" => $TPL["url_alloc_taskList"], "form_name" => "taskList_filter");
// Load task list
$_FORM = task::load_form_data($defaults);
$TPL["taskListRows"] = task::get_list($_FORM);
$TPL["_FORM"] = $_FORM;
// Load filter
$arr = task::load_task_filter($_FORM);
is_array($arr) and $TPL = array_merge($TPL, $arr);
// Check for updates
if ($_POST["mass_update"]) {
if ($_POST["select"]) {
$allowed_auto_fields = array("dateTargetStart", "dateTargetCompletion", "dateActualStart", "dateActualCompletion", "managerID", "timeLimit", "timeBest", "timeWorst", "timeExpected", "priority", "taskTypeID", "taskStatus", "personID");
foreach ($_POST["select"] as $taskID => $selected) {
$task = new task();
$task->set_id($taskID);
$task->select();
// Special case: projectID and parentTaskID have to be done together
if ($_POST["update_action"] == "projectIDAndParentTaskID") {
// Can't set self to be parent
if ($_POST["parentTaskID"] != $task->get_id()) {
$task->set_value("parentTaskID", $_POST["parentTaskID"]);
}