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


PHP client::set_value方法代码示例

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


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

示例1: rtrim

    }
    $db->query($query);
    $db->next_record();
    if ($db->f('count') > 0) {
        alloc_error("A project with that nickname already exists.");
    }
    if (!$TPL["message"]) {
        $project->set_value("projectComments", rtrim($project->get_value("projectComments")));
        $project->save();
        $projectID = $project->get_id();
        interestedParty::make_interested_parties("project", $project->get_id(), $_POST["interestedParty"]);
        $client = new client();
        $client->set_id($project->get_value("clientID"));
        $client->select();
        if ($client->get_value("clientStatus") == 'Potential') {
            $client->set_value("clientStatus", "Current");
            $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();
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:project.php

示例2: client

    $_FORM["clientID"] = $clientID;
    // Restrict non-admin users records
    if (!$current_user->have_role("admin")) {
        $_FORM["personID"] = $current_user->get_id();
    }
    $rows = invoice::get_list($_FORM);
    echo invoice::get_list_html($rows, $_FORM);
}
$client = new client();
$clientID = $_POST["clientID"] or $clientID = $_GET["clientID"];
if ($_POST["save"]) {
    if (!$_POST["clientName"]) {
        alloc_error("Please enter a Client Name.");
    }
    $client->read_globals();
    $client->set_value("clientModifiedTime", date("Y-m-d"));
    $clientID = $client->get_id();
    $client->set_values("client_");
    if (!$client->get_id()) {
        // New client.
        $client->set_value("clientCreatedTime", date("Y-m-d"));
        $new_client = true;
    }
    if (!$TPL["message"]) {
        $client->save();
        $clientID = $client->get_id();
        $client->set_values("client_");
    }
} else {
    if ($_POST["save_attachment"]) {
        move_attachment("client", $clientID);
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:client.php

示例3: while

 Postal Postcode
 Street Address
 Street Suburb
 Comment
 Main_Contact
 Main Contact Email
*/
$row = 1;
if (($handle = fopen("../../David_Clients.csv", "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        foreach ($data as $key => $val) {
            $data[$key] = utf8_encode($data[$key]);
        }
        unset($comment_id, $cc_id);
        $client = new client();
        $client->set_value("clientName", $data[0]);
        $client->set_value("clientPhoneOne", $data[1]);
        $client->set_value("clientFaxOne", $data[2]);
        $client->set_value("clientStreetAddressOne", $data[3]);
        $client->set_value("clientSuburbOne", $data[4]);
        $client->set_value("clientStateOne", $data[5]);
        $client->set_value("clientPostcodeOne", $data[6]);
        $client->set_value("clientStreetAddressTwo", $data[7]);
        $client->set_value("clientSuburbTwo", $data[8]);
        $client->set_value("clientStatus", "current");
        $client->set_value("clientModifiedUser", $current_user->get_id());
        $client->save();
        if ($client->get_id()) {
            if (rtrim($data[9])) {
                $comment = new comment();
                $comment->set_value("commentMaster", "client");
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:csv_clients.php


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