本文整理汇总了PHP中project::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP project::delete方法的具体用法?PHP project::delete怎么用?PHP project::delete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类project
的用法示例。
在下文中一共展示了project::delete方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: projectPerson
$client->save();
}
if ($definitely_new_project) {
$projectPerson = new projectPerson();
$projectPerson->currency = $project->get_value("currencyTypeID");
$projectPerson->set_value("projectID", $projectID);
$projectPerson->set_value_role("isManager");
$projectPerson->set_value("personID", $current_user->get_id());
$projectPerson->save();
}
alloc_redirect($TPL["url_alloc_project"] . "projectID=" . $project->get_id());
}
} else {
if ($_POST["delete"]) {
$project->read_globals();
$project->delete();
alloc_redirect($TPL["url_alloc_projectList"]);
// If they are creating a new project that is based on an existing one
} else {
if ($_POST["copy_project_save"] && $_POST["copy_projectID"] && $_POST["copy_project_name"]) {
$p = new project();
$p->set_id($_POST["copy_projectID"]);
if ($p->select()) {
$p2 = new project();
$p2->read_row_record($p->row());
$p2->set_id("");
$p2->set_value("projectName", $_POST["copy_project_name"]);
$p2->set_value("projectShortName", "");
$p2->save();
$TPL["message_good"][] = "Project details copied successfully.";
// Copy project people
示例2: elseif
if (!$loginInst->isCustomer()) {
#######################################################################
## perform action
$status = 1;
if (tool::securePost('action') == "save" && tool::securePost('id')) {
# fill project with submitted data
$projectInst->id = tool::securePost('id');
$projectInst->fill(tool::securePostAll());
$status = $projectInst->update();
} elseif (tool::securePost('action') == "save") {
$projectInst->fill(tool::securePostAll());
$status = $projectInst->insert();
}
if (tool::securePost('action') == "delete") {
$projectInst->id = tool::securePost('id');
$projectInst->delete();
}
if (tool::securePost('action') == "edit") {
$status = 0;
$projectInst->activate(tool::securePost('id'));
}
#######################################################################
## make edit / new form
if (!$status) {
echo "<h2>" . $lang['common_editRecord'] . " (<a href=\"" . $toolInst->encodeUrl("index.php?content=" . $content) . "\">" . $lang['common_newRecord'] . "</a>)</h2>\n";
} else {
$projectInst->clear();
?>
<h2><?php
echo $lang['common_newRecord'];
?>
示例3: project
if ($administration_project->has_dependencies()) {
$error_level = 13;
// Related role(s) exist
$_POST['action'] = '';
}
// Format dates (from uts to display)
$_POST['projects_start_date_display'] = tep_strftime(DATE_FORMAT_SHORT, $_POST['projects_start_date']);
if ($_POST['projects_end_date'] != 0) {
$_POST['projects_end_date_display'] = tep_strftime(DATE_FORMAT_SHORT, $_POST['projects_end_date']);
} else {
$_POST['projects_end_date_display'] = '';
}
break;
case 'delete_entry_confirmed':
$administration_project = new project($_POST['projects_id']);
$administration_project->delete();
unset($_POST['projects_id']);
$_POST['action'] = '';
break;
}
// Reload the project object in order to
// update the project listing below
$_SESSION['project'] = new project(0, null, $_POST['show_history']);
// header //
require DIR_WS_INCLUDES . 'header.php';
?>
<!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
<tr>
<td width="<?php
echo BOX_WIDTH;