当前位置: 首页>>代码示例>>PHP>>正文


PHP showtask函数代码示例

本文整理汇总了PHP中showtask函数的典型用法代码示例。如果您正苦于以下问题:PHP showtask函数的具体用法?PHP showtask怎么用?PHP showtask使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了showtask函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: findchild

function findchild(&$tarr, $parent, $level = 0)
{
    global $tasks_opened, $tasks_closed, $tasks_filtered, $children_of;
    $tasks_closed = $tasks_closed ? $tasks_closed : array();
    $tasks_opened = $tasks_opened ? $tasks_opened : array();
    $level = $level + 1;
    foreach ($tarr as $x => $task) {
        if ($task['task_parent'] == $parent && $task['task_parent'] != $task['task_id']) {
            $is_opened = !in_array($task['task_id'], $tasks_closed);
            //check for child
            $no_children = empty($children_of[$task['task_id']]);
            showtask($task, $level, $is_opened, false, $no_children);
            if ($is_opened && !$no_children) {
                /*
                 * Yes, this is stupid, but there was previously a bug where if you had
                 * two dynamic tasks at the same level and the child of a dynamic task,
                 * they would only both display if the first one was closed.  The moment
                 * you opened the first one, the second would disappear.
                 * 
                 * There is something screwy happening in this function in the pass by
                 * reference.  I suspect it's a PHP4 vs PHP5 oddity.
                 */
                $tmp = $tarr;
                findchild($tmp, $task['task_id'], $level);
            }
        }
    }
}
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:28,代码来源:tasks.class.php

示例2: findchild

                    $shown_tasks[$t1['task_id']] = $t1['task_id'];
                    findchild($p['tasks'], $t1['task_id']);
                }
            }
            reset($p);
            //2nd pass parentless tasks
            foreach ($p['tasks'] as $i => $t1) {
                if (!isset($shown_tasks[$t1['task_id']])) {
                    //Here we are on a parentless task context, this can happen because we are:
                    //1) displaying filtered tasks that could be showing only child tasks and not its parents due to filtering.
                    //2) in a situation where child tasks are active and parent tasks are inactive or vice-versa.
                    //
                    //The IF condition makes sure:
                    //1) The parent task has been displayed and passed through the findchild first, so child tasks are not erroneously displayed as orphan (parentless)
                    //2) Only not displayed yet tasks are shown so we don't show duplicates due to findchild that may cause duplicate showtasks for level 1 (and higher) tasks.
                    showtask($t1, -1, true, false, true);
                    $shown_tasks[] = $t1['task_id'];
                }
            }
        }
        if ($tnums && $w2Pconfig['enable_gantt_charts'] && !$min_view) {
            ?>
					<tr>
					  <td colspan="<?php 
            echo $cols;
            ?>
" align="right">
					  <input type="button" class="button" value="<?php 
            echo $AppUI->_('Reports');
            ?>
" 
开发者ID:eureka2,项目名称:web2project,代码行数:31,代码来源:tasks.php

示例3: findchild

function findchild(&$tarr, $parent, $level = 0)
{
    global $shown_tasks;
    $level = $level + 1;
    $n = count($tarr);
    for ($x = 0; $x < $n; $x++) {
        if ($tarr[$x]['task_parent'] == $parent && $tarr[$x]['task_parent'] != $tarr[$x]['task_id']) {
            showtask($tarr[$x], $level, true);
            $shown_tasks[$tarr[$x]['task_id']] = $tarr[$x]['task_id'];
            findchild($tarr, $tarr[$x]['task_id'], $level);
        }
    }
}
开发者ID:joly,项目名称:web2project,代码行数:13,代码来源:tasks.class.php

示例4: calcEndByStartAndDuration

    for ($j = 0, $j_cmp = count($tasks); $j < $j_cmp; $j++) {
        if ($tasks[$j]['task_end_date'] == '0000-00-00 00:00:00' || $tasks[$j]['task_end_date'] == '') {
            if ($tasks[$j]['task_start_date'] == '0000-00-00 00:00:00' || $tasks[$j]['task_start_date'] == '') {
                $tasks[$j]['task_start_date'] = '0000-00-00 00:00:00';
                //just to be sure start date is "zeroed"
                $tasks[$j]['task_end_date'] = '0000-00-00 00:00:00';
            } else {
                $tasks[$j]['task_end_date'] = calcEndByStartAndDuration($tasks[$j]);
            }
        }
    }
}
$history_active = false;
// showing tasks
foreach ($tasks as $task) {
    echo showtask($task, 0, false, true);
}
if (w2PgetConfig('direct_edit_assignment')) {
    ?>
        <tr>
            <td colspan="9" align="right" height="30">
                <input type="submit" class="button" value="<?php 
    echo $AppUI->_('update task');
    ?>
" />
            </td>
            <td colspan="3" align="center">
            <?php 
    foreach ($priorities as $k => $v) {
        $options[$k] = $AppUI->_('set priority to ' . $v, UI_OUTPUT_RAW);
    }
开发者ID:viniciusbudines,项目名称:sisnuss,代码行数:31,代码来源:todo_tasks_sub.php

示例5: in_array

                $is_opened = in_array($t["task_id"], $tasks_opened);
                showtask($t, 0, $is_opened, '', $_GET["impr"]);
                if ($is_opened || !$t["task_dynamic"]) {
                    findchild($p['tasks'], $t["task_id"]);
                }
            }
            // else showtask( $t, 0, $is_opened );
        }
        // check that any 'orphaned' user tasks are also display
        for ($i = 0; $i < $tnums; $i++) {
            if (!in_array($p['tasks'][$i]["task_id"], $done)) {
                if ($p['tasks'][$i]["task_dynamic"] && in_array($p['tasks'][$i]["task_parent"], $tasks_closed)) {
                    closeOpenedTask($p['tasks'][$i]["task_id"]);
                }
                if (in_array($p['tasks'][$i]["task_parent"], $tasks_opened)) {
                    showtask($p['tasks'][$i], 1, false, '', $_GET["impr"]);
                }
            }
        }
        if ($tnums && $dPconfig['enable_gantt_charts'] && !$min_view) {
            ?>
		<?php 
            if ($_GET["impr"] != 1) {
                ?>
<tr>
			<td colspan="<?php 
                echo $cols;
                ?>
" align="right">
				<!--<input type="button" class="button" value="<?php 
                echo $AppUI->_('Reports');
开发者ID:Esleelkartea,项目名称:gestion-de-primeras-muestras,代码行数:31,代码来源:tasks.php

示例6: in_array

            if ($t["task_parent"] == $t["task_id"] || $p['tasks'][$i]["task_status"] != 0) {
                $is_opened = in_array($t["task_id"], $tasks_opened);
                showtask($t, 0, $is_opened);
                if ($is_opened || !$t["task_dynamic"]) {
                    findchild($p['tasks'], $t["task_id"]);
                }
            }
        }
        // check that any 'orphaned' user tasks are also display
        for ($i = 0; $i < $tnums; $i++) {
            if (!in_array($p['tasks'][$i]["task_id"], $done)) {
                if ($p['tasks'][$i]["task_dynamic"] && in_array($p['tasks'][$i]["task_parent"], $tasks_closed)) {
                    closeOpenedTask($p['tasks'][$i]["task_id"]);
                }
                if (in_array($p['tasks'][$i]["task_parent"], $tasks_opened)) {
                    showtask($p['tasks'][$i], 1, false);
                }
            }
        }
        if ($tnums && $dPconfig['enable_gantt_charts'] && !$min_view) {
            ?>
		<tr>
			<td colspan="<?php 
            echo $cols;
            ?>
" align="right">
				<input type="button" class="button" value="<?php 
            echo $AppUI->_('Reports');
            ?>
" onclick="javascript:window.location='index.php?m=projects&a=reports&project_id=<?php 
            echo $k;
开发者ID:juliogallardo1326,项目名称:proc,代码行数:31,代码来源:tasks.php

示例7: showtask

             } else {
                 if (!in_array($t1['task_parent'], $tasks_filtered)) {
                     /*
                      * don't "mess with" display when showing certain views 
                      * (or similiar filters that don't involve "breaking apart" a task tree 
                      * even though they might not use this page ever)
                      */
                     if (in_array($f, $never_show_with_dots)) {
                         showtask($t1, 1, true, false, true);
                     } else {
                         //display as close to "tree-like" as possible
                         $is_opened = !in_array($t1['task_id'], $tasks_closed);
                         //check for child
                         $no_children = empty($children_of[$t1['task_id']]);
                         $my_level = $task_id && $t1['task_parent'] == $task_id ? 0 : -1;
                         showtask($t1, $my_level, $is_opened, false, $no_children);
                         // indeterminate depth for child task
                         if ($is_opened && !$no_children) {
                             findchild($p['tasks'], $t1['task_id']);
                         }
                     }
                 }
             }
             /*
              * MerlinYoda: Not 100% sure if moving code from below to above always puts orphan trees 
              * closer to their ancestors. At worst it just displays orphans a little earlier
              */
         }
     }
 }
 $df = $AppUI->getPref('SHDATEFORMAT');
开发者ID:slawekmikula,项目名称:dotproject,代码行数:31,代码来源:tasks.php

示例8: findchild

function findchild(&$tarr, $parent, $level = 0)
{
    global $projects;
    global $tasks_opened;
    $level = $level + 1;
    $n = count($tarr);
    for ($x = 0; $x < $n; $x++) {
        if ($tarr[$x]["task_parent"] == $parent && $tarr[$x]["task_parent"] != $tarr[$x]["task_id"]) {
            $is_opened = in_array($tarr[$x]["task_id"], $tasks_opened);
            showtask($tarr[$x], $level, $is_opened);
            if ($is_opened || !$tarr[$x]["task_dynamic"]) {
                findchild($tarr, $tarr[$x]["task_id"], $level);
            }
        }
    }
}
开发者ID:juliogallardo1326,项目名称:proc,代码行数:16,代码来源:tasks.class.php

示例9: showtask

                 }
             } else {
                 if (!in_array($t1['task_parent'], $tasks_filtered)) {
                     /*
                      * don't "mess with" display when showing "Child tasks" 
                      * (or similiar filters that don't involve "breaking apart" a task tree 
                      * for that matter, even though they might not use this page ever)
                      */
                     if (in_array($f, $never_show_with_dots)) {
                         showtask($t1, 1, true, false, true);
                     } else {
                         //display as close to "tree-like" as possible
                         $is_opened = !$t1['task_dynamic'] || !in_array($t1['task_id'], $tasks_closed);
                         //check for child
                         $no_children = empty($children_of[$t1['task_id']]);
                         showtask($t1, -1, $is_opened, false, $no_children);
                         // indeterminate depth for child task
                         if ($is_opened && !$no_children) {
                             findchild($p['tasks'], $t1['task_id']);
                         }
                     }
                 }
             }
             /*
              * MerlinYoda: Not 100% sure if moving code from below to above always puts orphan trees 
              * closer to their ancestors. At worst it just displays orphans a little earlier
              */
         }
     }
 }
 if ($tnums && $dPconfig['enable_gantt_charts'] && !$min_view) {
开发者ID:magsilva,项目名称:dotproject,代码行数:31,代码来源:tasks.php


注:本文中的showtask函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。