Пример #1
0
 function attach_tasks($commentID, $projectID, $options)
 {
     if ($projectID) {
         // Begin buffering output to halt anything being sent to the web browser.
         ob_start();
         $t = new taskListPrint();
         $defaults = array("showAssigned" => true, "showDate1" => true, "showDate2" => true, "showDate3" => true, "showDate4" => true, "showDate5" => true, "showPercent" => true, "showStatus" => true, "taskView" => "prioritised", "projectID" => $projectID, "format" => $options);
         if ($options == "pdf_plus" || $options == "html_plus") {
             $defaults["showTimes"] = true;
         }
         $t->get_printable_file($defaults);
         // Capture the output into $str
         $str = (string) ob_get_clean();
         $suffix = ".html";
         $options != "html" && $options != "html_plus" and $suffix = ".pdf";
         $rtn["name"] = "taskList_" . $projectID . $suffix;
         $rtn["blob"] = $str;
         $rtn["size"] = strlen($str);
         return $rtn;
     }
 }
Пример #2
0
<?php

/*
 * Copyright (C) 2006-2011 Alex Lance, Clancy Malcolm, Cyber IT Solutions
 * Pty. Ltd.
 * 
 * This file is part of the allocPSA application <*****@*****.**>.
 * 
 * allocPSA is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or (at
 * your option) any later version.
 * 
 * allocPSA is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
 * License for more details.
 * 
 * You should have received a copy of the GNU Affero General Public License
 * along with allocPSA. If not, see <http://www.gnu.org/licenses/>.
*/
require_once "../alloc.php";
$t = new taskListPrint();
$t->get_printable_file($_GET);