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