function show_comments() { global $clientID; global $TPL; global $client; $TPL["commentsR"] = comment::util_get_comments("client", $clientID); $TPL["commentsR"] and $TPL["class_new_comment"] = "hidden"; $interestedPartyOptions = $client->get_all_parties(); $interestedPartyOptions = interestedParty::get_interested_parties("client", $client->get_id(), $interestedPartyOptions); $TPL["allParties"] = $interestedPartyOptions or $TPL["allParties"] = array(); $TPL["entity"] = "client"; $TPL["entityID"] = $client->get_id(); $TPL["clientID"] = $client->get_id(); $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "client")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); include_template("../comment/templates/commentM.tpl"); }
$TPL["currencyOptions"] = page::select_options($currencyOptions, config::get_config_item("currency")); $db = new db_alloc(); $display = array("", "username", ", ", "emailAddress"); $person = new person(); $people =& get_cached_table("person"); foreach ($people as $p) { $peeps[$p["personID"]] = $p["name"]; } // get the default time sheet manager/admin options $TPL["defaultTimeSheetManagerListText"] = get_person_list(config::get_config_item("defaultTimeSheetManagerList")); $TPL["defaultTimeSheetAdminListText"] = get_person_list(config::get_config_item("defaultTimeSheetAdminList")); $days = array("Sun" => "Sun", "Mon" => "Mon", "Tue" => "Tue", "Wed" => "Wed", "Thu" => "Thu", "Fri" => "Fri", "Sat" => "Sat"); $TPL["calendarFirstDayOptions"] = page::select_options($days, config::get_config_item("calendarFirstDay")); $TPL["timeSheetPrintOptions"] = page::select_options($TPL["timeSheetPrintOptions"], $TPL["timeSheetPrint"]); $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName"); $TPL["rssStatusFilterOptions"] = page::select_options(task::get_task_statii_array(true), config::get_config_item("rssStatusFilter")); if (has("timeUnit")) { $timeUnit = new timeUnit(); $rate_type_array = $timeUnit->get_assoc_array("timeUnitID", "timeUnitLabelB"); } $TPL["timesheetRate_options"] = page::select_options($rate_type_array, config::get_config_item("defaultTimeSheetUnit")); $TPL["main_alloc_title"] = "Setup - " . APPLICATION_NAME; include_template("templates/configM.tpl"); function get_person_list($personID_array) { global $peeps; $people = array(); foreach ($personID_array as $personID) { $people[] = $peeps[$personID]; }
function show_comments() { global $taskID; global $TPL; global $task; if ($_REQUEST["commentSummary"]) { $_REQUEST["showTaskHeader"] = true; $_REQUEST["clients"] = true; $TPL["commentsR"] = comment::get_list_summary($_REQUEST); $TPL["extra_page_links"] = '<a href="' . $TPL["url_alloc_task"] . 'taskID=' . $TPL["task_taskID"] . '&sbs_link=comments">Full</a>'; } else { $TPL["commentsR"] = comment::util_get_comments("task", $taskID); $TPL["extra_page_links"] = '<a href="' . $TPL["url_alloc_task"] . 'taskID=' . $TPL["task_taskID"]; $TPL["extra_page_links"] .= '&sbs_link=comments&commentSummary=true&maxCommentLength=50000000">Summary</a>'; } $TPL["commentsR"] and $TPL["class_new_comment"] = "hidden"; $TPL["allParties"] = $task->get_all_parties($task->get_value("projectID")) or $TPL["allParties"] = array(); $TPL["entity"] = "task"; $TPL["entityID"] = $task->get_id(); if (has("project")) { $project = $task->get_foreign_object("project"); $TPL["clientID"] = $project->get_value("clientID"); } $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "task")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); include_template("../comment/templates/commentM.tpl"); }
function show_comments() { global $timeSheetID; global $TPL; global $timeSheet; if ($timeSheetID) { $TPL["commentsR"] = comment::util_get_comments("timeSheet", $timeSheetID); $TPL["class_new_comment"] = "hidden"; $TPL["allParties"] = $timeSheet->get_all_parties($timeSheet->get_value("projectID")) or $TPL["allParties"] = array(); $TPL["entity"] = "timeSheet"; $TPL["entityID"] = $timeSheet->get_id(); $p = $timeSheet->get_foreign_object('project'); $TPL["clientID"] = $p->get_value("clientID"); $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "timeSheet")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); $timeSheetPrintOptions = config::get_config_item("timeSheetPrintOptions"); $timeSheetPrint = config::get_config_item("timeSheetPrint"); $ops = array("" => "Format as..."); foreach ($timeSheetPrint as $value) { $ops[$value] = $timeSheetPrintOptions[$value]; } $TPL["attach_extra_files"] = " "; $TPL["attach_extra_files"] .= "Attach Time Sheet "; $TPL["attach_extra_files"] .= '<select name="attach_timeSheet">' . page::select_options($ops) . '</select><br>'; include_template("../comment/templates/commentM.tpl"); } }
function show_comments() { global $projectID; global $TPL; global $project; $TPL["commentsR"] = comment::util_get_comments("project", $projectID); $TPL["commentsR"] and $TPL["class_new_comment"] = "hidden"; $interestedPartyOptions = $project->get_all_parties(); $interestedPartyOptions = interestedParty::get_interested_parties("project", $project->get_id(), $interestedPartyOptions); $TPL["allParties"] = $interestedPartyOptions or $TPL["allParties"] = array(); $TPL["entity"] = "project"; $TPL["entityID"] = $project->get_id(); $TPL["clientID"] = $project->get_value("clientID"); $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "project")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); $ops = array("" => "Format as...", "pdf" => "PDF", "pdf_plus" => "PDF+", "html" => "HTML", "html_plus" => "HTML+"); $TPL["attach_extra_files"] = " "; $TPL["attach_extra_files"] .= "Attach Task Report "; $TPL["attach_extra_files"] .= '<select name="attach_tasks">' . page::select_options($ops) . '</select><br>'; include_template("../comment/templates/commentM.tpl"); }
function show_comments() { global $invoiceID; global $TPL; global $invoice; if ($invoiceID) { $TPL["commentsR"] = comment::util_get_comments("invoice", $invoiceID); $TPL["class_new_comment"] = "hidden"; if ($invoice->get_value("projectID")) { $project = $invoice->get_foreign_object("project"); $interestedPartyOptions = $project->get_all_parties($invoice->get_value("projectID")); $client = $project->get_foreign_object("client"); $clientID = $client->get_id(); } else { if ($invoice->get_value("clientID")) { $client = $invoice->get_foreign_object("client"); $interestedPartyOptions = $client->get_all_parties($invoice->get_value("clientID")); $clientID = $client->get_id(); } } $interestedPartyOptions = interestedParty::get_interested_parties("invoice", $invoice->get_id(), $interestedPartyOptions); $TPL["allParties"] = $interestedPartyOptions or $TPL["allParties"] = array(); $TPL["entity"] = "invoice"; $TPL["entityID"] = $invoice->get_id(); $TPL["clientID"] = $clientID; $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "invoice")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); $ops = array("" => "Format as...", "generate_pdf" => "PDF Invoice", "generate_pdf_verbose" => "PDF Invoice - verbose"); $TPL["attach_extra_files"] = " "; $TPL["attach_extra_files"] .= "Attach Invoice "; $TPL["attach_extra_files"] .= '<select name="attach_invoice">' . page::select_options($ops) . '</select><br>'; include_template("../comment/templates/commentM.tpl"); } }
function show_comments() { global $productSaleID; global $TPL; global $productSale; if ($productSaleID) { $TPL["commentsR"] = comment::util_get_comments("productSale", $productSaleID); $TPL["class_new_comment"] = "hidden"; $TPL["entity"] = "productSale"; $TPL["entityID"] = $productSale->get_id(); $project = $productSale->get_foreign_object('project'); $TPL["clientID"] = $project->get_value("clientID"); $TPL["allParties"] = $productSale->get_all_parties($productSale->get_value("projectID")) or $TPL["allParties"] = array(); $commentTemplate = new commentTemplate(); $ops = $commentTemplate->get_assoc_array("commentTemplateID", "commentTemplateName", "", array("commentTemplateType" => "productSale")); $TPL["commentTemplateOptions"] = "<option value=\"\">Comment Templates</option>" . page::select_options($ops); include_template("../comment/templates/commentM.tpl"); } }