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


PHP project::delete方法代码示例

本文整理汇总了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
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:project.php

示例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'];
        ?>
开发者ID:pmtool,项目名称:pmtool,代码行数:31,代码来源:projects.php

示例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;
开发者ID:BackupTheBerlios,项目名称:bitts-svn,代码行数:31,代码来源:administration_projects.php


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