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


PHP task::del方法代码示例

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


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

示例1: task

 /**
  * Delete a tasklist
  *
  * @param int $id Tasklist ID
  * @return bool
  */
 function del_liste($id)
 {
     global $conn, $mylog;
     $id = (int) $id;
     $sel = $conn->query("SELECT project, name FROM tasklist WHERE ID = {$id}");
     $del = $conn->query("DELETE FROM tasklist WHERE ID = {$id}");
     if ($del) {
         $tasks1 = $this->getTasksFromList($id);
         $taskobj = new task();
         if (!empty($tasks1)) {
             foreach ($tasks1 as $task) {
                 $taskobj->del($task["ID"]);
             }
         }
         $tasks2 = $this->getTasksFromList($id, 0);
         if (!empty($tasks2)) {
             foreach ($tasks2 as $task) {
                 $taskobj->del($task["ID"]);
             }
         }
         $sel1 = $sel->fetch();
         $proj = $sel1[0];
         $name = $sel1[1];
         $mylog->add($name, 'tasklist', 3, $proj);
         return true;
     } else {
         return false;
     }
 }
开发者ID:raum01,项目名称:Collabtive,代码行数:35,代码来源:class.tasklist.php

示例2: task

        die;
    }
    $task = new task();
    $tasks = $task->getAllMyProjectTasks($id, 100, $usr);
    if ($id > 0 and $assignto > 0) {
        if (!empty($tasks)) {
            foreach ($tasks as $mytask) {
                if ($task->deassign($mytask["ID"], $usr)) {
                    $task->assign($mytask["ID"], $assignto);
                }
            }
        }
    } else {
        if (!empty($tasks)) {
            foreach ($tasks as $mytask) {
                $task->del($mytask["ID"]);
            }
        }
    }
    if ($project->deassign($usr, $id)) {
        if ($redir) {
            $redir = $url . $redir;
            $redir = $redir . "&mode=deassigned";
            header("Location: {$redir}");
        } else {
            header("Location: manageuser.php?action=showproject&id={$id}&mode=deassigned");
        }
    }
} elseif ($action == "projectlogpdf") {
    if (!$userpermissions["admin"]["add"]) {
        $errtxt = $langfile["nopermission"];
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:manageproject.php

示例3: del

 /**
  * Deletes a project including everything else that was assigned to it (e.g. Milestones, tasks, timetracker entries)
  *
  * @param int $id Project ID
  * @return bool
  */
 function del($id)
 {
     global $conn, $mylog;
     $userid = $_SESSION["userid"];
     $id = (int) $id;
     // Delete assignments of tasks of this project to users
     $task = new task();
     $tasks = $task->getProjectTasks($id);
     if (!empty($tasks)) {
         foreach ($tasks as $tas) {
             $task->del($tas["ID"]);
         }
     }
     // Delete files and the assignments of these files to the messages they were attached to
     $fil = new datei();
     $files = $fil->getProjectFiles($id, 1000000);
     if (!empty($files)) {
         foreach ($files as $file) {
             $del_files = $fil->loeschen($file["ID"]);
         }
     }
     $del_messages = $conn->query("DELETE FROM messages WHERE project = {$id}");
     $del_milestones = $conn->query("DELETE FROM milestones WHERE project = {$id}");
     $del_projectassignments = $conn->query("DELETE FROM projekte_assigned WHERE projekt = {$id}");
     $del_tasklists = $conn->query("DELETE FROM tasklist WHERE project = {$id}");
     $del_tasks = $conn->query("DELETE FROM tasks WHERE project = {$id}");
     $del_timetracker = $conn->query("DELETE FROM timetracker WHERE project = {$id}");
     $del_customer = $conn->query("DELETE FROM customers_assigned WHERE project = {$id}");
     $del_logentries = $conn->query("DELETE FROM log WHERE project = {$id}");
     $del = $conn->query("DELETE FROM projekte WHERE ID = {$id}");
     delete_directory(CL_ROOT . "/files/" . CL_CONFIG . "/{$id}");
     if ($del) {
         $mylog->add($userid, 'projekt', 3, $id);
         return true;
     } else {
         return false;
     }
 }
开发者ID:raum01,项目名称:Collabtive,代码行数:44,代码来源:class.project.php


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