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


PHP project::set_values方法代码示例

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


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

示例1: show_timeSheetItems

function show_timeSheetItems($template_name)
{
    global $date_to_view;
    $current_user =& singleton("current_user");
    global $TPL;
    $query = prepare("SELECT * \n                      FROM timeSheetItem \n                           LEFT JOIN timeSheet ON timeSheetItem.timeSheetID = timeSheet.timeSheetID\n                           LEFT JOIN project ON timeSheet.projectID = project.projectID\n                      WHERE dateTimeSheetItem='%s'\n                            AND timeSheet.personID=%d", date("Y-m-d", $date_to_view), $current_user->get_id());
    $db = new db_alloc();
    $db->query($query);
    while ($db->next_record()) {
        $timeSheetItem = new timeSheetItem();
        $timeSheetItem->read_db_record($db);
        $timeSheetItem->set_values();
        if ($timeSheetItem->get_value("unit") == "Hour") {
            $TPL["daily_hours_total"] += $timeSheetItem->get_value("timeSheetItemDuration");
        }
        $project = new project();
        $project->read_db_record($db);
        $project->set_values();
        if ($project->get_value("projectShortName")) {
            $TPL["item_description"] = $project->get_value("projectShortName");
        } else {
            $TPL["item_description"] = $project->get_value("projectName");
        }
        include_template($template_name);
    }
}
开发者ID:cjbayliss,项目名称:alloc,代码行数:26,代码来源:weeklyTime.php

示例2: client

    $project->set_id($projectID);
    $project->select() || alloc_error("Could not load project {$projectID}");
} else {
    // Creating a new record
    $project->read_globals();
    $projectID = $project->get_id();
    $project->select();
}
// Comments
$TPL["comment_buttons"] = "<input type=\"submit\" name=\"comment_save\" value=\"Save Comment\">";
// if someone uploads an attachment
if ($_POST["save_attachment"]) {
    move_attachment("project", $projectID);
    alloc_redirect($TPL["url_alloc_project"] . "projectID=" . $projectID . "&sbs_link=attachments");
}
$project->set_values("project_");
$db = new db_alloc();
$clientID = $project->get_value("clientID") or $clientID = $_GET["clientID"];
$client = new client();
$client->set_id($clientID);
$client->select();
$client->set_tpl_values("client_");
// If a client has been chosen
if ($clientID) {
    $query = prepare("SELECT * \n                      FROM clientContact\n                     WHERE clientContact.clientID = %d AND clientContact.primaryContact = true", $clientID);
    $db->query($query);
    $cc = new clientContact();
    $cc->read_db_record($db);
    $one = $client->format_address("postal");
    $two = $client->format_address("street");
    $thr = $cc->format_contact();
开发者ID:cjbayliss,项目名称:alloc,代码行数:31,代码来源:project.php


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