本文整理汇总了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;
}
}
示例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"];
示例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;
}
}