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


PHP CTask::htmlDecode方法代码示例

本文整理汇总了PHP中CTask::htmlDecode方法的典型用法代码示例。如果您正苦于以下问题:PHP CTask::htmlDecode方法的具体用法?PHP CTask::htmlDecode怎么用?PHP CTask::htmlDecode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CTask的用法示例。


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

示例1: deepCopy

 public function deepCopy($destProject_id = 0, $destTask_id = 0)
 {
     global $AppUI;
     $children = $this->getChildren();
     $newObj = $this->copy($destProject_id, $destTask_id);
     $new_id = $newObj->task_id;
     if (!empty($children)) {
         $tempTask = new CTask();
         foreach ($children as $child) {
             $tempTask->load($child);
             $tempTask->htmlDecode($child);
             $newChild = $tempTask->deepCopy($destProject_id, $new_id);
             $newChild->store($AppUI);
         }
     }
     return $newObj;
 }
开发者ID:eureka2,项目名称:web2project,代码行数:17,代码来源:tasks.class.php

示例2: cleanText

    } else {
        $AppUI->setMsg('deleted', UI_MSG_ALERT);
    }
    $AppUI->redirect();
} else {
    $obj->task_log_costcode = cleanText($obj->task_log_costcode);
    if ($msg = $obj->store()) {
        $AppUI->setMsg($msg, UI_MSG_ERROR);
        $AppUI->redirect();
    } else {
        $AppUI->setMsg(@$_POST['task_log_id'] ? 'updated' : 'inserted', UI_MSG_OK, true);
    }
}
$task = new CTask();
$task->load($obj->task_log_task);
$task->htmlDecode();
$task->check();
$task_end_date = new CDate($task->task_end_date);
$task->task_percent_complete = dPgetParam($_POST, 'task_percent_complete', null);
if (dPgetParam($_POST, 'task_end_date', '') != '') {
    $new_date = new CDate($_POST['task_end_date']);
    $new_date->setTime($task_end_date->hour, $task_end_date->minute, $task_end_date->second);
    $task->task_end_date = $new_date->format(FMT_DATETIME_MYSQL);
}
if ($task->task_percent_complete >= 100 && (!$task->task_end_date || $task->task_end_date == '0000-00-00 00:00:00')) {
    $task->task_end_date = $obj->task_log_date;
}
if ($msg = $task->store()) {
    $AppUI->setMsg($msg, UI_MSG_ERROR, true);
}
$new_task_end = new CDate($task->task_end_date);
开发者ID:illuminate3,项目名称:dotproject,代码行数:31,代码来源:do_updatetask.php

示例3: deepMove

 function deepMove($destProject_id = 0, $destTask_id = 0)
 {
     $children = $this->getChildren();
     $this->move($destProject_id, $destTask_id);
     if (!empty($children)) {
         foreach ($children as $child) {
             $tempChild = new CTask();
             $tempChild->peek($child);
             $tempChild->htmlDecode($child);
             $tempChild->deepMove($destProject_id, $this->task_id);
             $tempChild->store();
         }
     }
     $this->store();
 }
开发者ID:hoodoogurus,项目名称:dotprojecteap,代码行数:15,代码来源:tasks.class.php

示例4: updateDynamics

 function updateDynamics($fromChildren = false)
 {
     //Has a parent or children, we will check if it is dynamic so that it's info is updated also
     $q =& new DBQuery();
     $modified_task = new CTask();
     if ($fromChildren) {
         $modified_task =& $this;
     } else {
         $modified_task->load($this->task_parent);
         $modified_task->htmlDecode();
     }
     if ($modified_task->task_dynamic == 1) {
         //Update allocated hours based on children with duration type of 'hours'
         $q->addTable($this->_tbl);
         $q->addQuery('SUM(task_duration * task_duration_type)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_duration_type = 1 ');
         $q->addGroup('task_parent');
         $sql = $q->prepare();
         $q->clear();
         $children_allocated_hours1 = (double) db_loadResult($sql);
         /*
          * Update allocated hours based on children with duration type of 'days'
          * use the daily working hours instead of the full 24 hours to calculate 
          * dynamic task duration!
          */
         $q->addTable($this->_tbl);
         $q->addQuery(' SUM(task_duration * ' . dPgetConfig('daily_working_hours') . ')');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_duration_type <> 1 ');
         $q->addGroup('task_parent');
         $sql = $q->prepare();
         $q->clear();
         $children_allocated_hours2 = (double) db_loadResult($sql);
         // sum up the two distinct duration values for the children with duration type 'hrs'
         // and for those with the duration type 'day'
         $children_allocated_hours = $children_allocated_hours1 + $children_allocated_hours2;
         if ($modified_task->task_duration_type == 1) {
             $modified_task->task_duration = round($children_allocated_hours, 2);
         } else {
             $modified_task->task_duration = round($children_allocated_hours / dPgetConfig('daily_working_hours'), 2);
         }
         //Update worked hours based on children
         $q->addTable('tasks', 't');
         $q->innerJoin('task_log', 'tl', 't.task_id = tl.task_log_task');
         $q->addQuery('SUM(task_log_hours)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_dynamic <> 1 ');
         $sql = $q->prepare();
         $q->clear();
         $children_hours_worked = (double) db_loadResult($sql);
         //Update worked hours based on dynamic children tasks
         $q->addTable('tasks');
         $q->addQuery('SUM(task_hours_worked)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_dynamic = 1 ');
         $sql = $q->prepare();
         $q->clear();
         $children_hours_worked += (double) db_loadResult($sql);
         $modified_task->task_hours_worked = $children_hours_worked;
         //Update percent complete
         $q->addTable('tasks');
         $q->addQuery('SUM(task_percent_complete * task_duration * task_duration_type)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_duration_type = 1 ');
         $sql = $q->prepare();
         $q->clear();
         $real_children_hours_worked = (double) db_loadResult($sql);
         $q->addTable('tasks');
         $q->addQuery('SUM(task_percent_complete * task_duration * task_duration_type)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND task_duration_type <> 1 ');
         $sql = $q->prepare();
         $q->clear();
         $real_children_hours_worked += (double) db_loadResult($sql);
         $total_hours_allocated = (double) ($modified_task->task_duration * ($modified_task->task_duration_type > 1 ? dPgetConfig('daily_working_hours') : 1));
         if ($total_hours_allocated > 0) {
             $modified_task->task_percent_complete = ceil($real_children_hours_worked / $total_hours_allocated);
         } else {
             $q->addTable('tasks');
             $q->addQuery('AVG(task_percent_complete)');
             $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id);
             $sql = $q->prepare();
             $q->clear();
             $modified_task->task_percent_complete = db_loadResult($sql);
         }
         //Update start date
         $q->addTable('tasks');
         $q->addQuery('MIN(task_start_date)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND ! isnull(task_start_date)' . " AND task_start_date <>\t'0000-00-00 00:00:00'");
         $sql = $q->prepare();
         $q->clear();
         $d = db_loadResult($sql);
         if ($d) {
             $modified_task->task_start_date = $d;
         } else {
             $modified_task->task_start_date = '0000-00-00 00:00:00';
         }
         //Update end date
         $q->addTable('tasks');
         $q->addQuery('MAX(task_end_date)');
         $q->addWhere('task_parent = ' . $modified_task->task_id . ' AND task_id <> ' . $modified_task->task_id . ' AND ! isnull(task_end_date)');
         $sql = $q->prepare();
         $q->clear();
         $modified_task->task_end_date = db_loadResult($sql);
         //If we are updating a dynamic task from its children we don't want to store() it
//.........这里部分代码省略.........
开发者ID:magsilva,项目名称:dotproject,代码行数:101,代码来源:tasks.class.php


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