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


PHP MYPDF::setup方法代码示例

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


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

示例1: fclose

    fclose($excelFile);
    $loc = $url . "files/" . CL_CONFIG . "/ics/user-{$id}-timetrack.csv";
    header("Location: {$loc}");
} elseif ($action == "userpdf") {
    if (!empty($start) and !empty($end)) {
        $track = $tracker->getUserTrack($id, $fproject, $taski, $start, $end, false);
    } else {
        $track = $tracker->getUserTrack($id, $fproject, $taski, 0, 0, false);
    }
    $thetrack = array();
    $totaltime = $tracker->getTotalTrackTime($track);
    $totaltime = str_replace(".", ",", $totaltime);
    $uname = $conn->query("SELECT name FROM user WHERE ID = {$conn->quote($id)}")->fetch();
    $uname = $uname[0];
    $pdf = new MYPDF("P", PDF_UNIT, "A4", true);
    $pdf->setup($langfile["timetable"] . " " . $uname, array(239, 232, 229));
    $headers = array($langfile["project"], $langfile["task"], $langfile["comment"], $langfile["started"] . " - " . $langfile["ended"], $langfile["hours"]);
    $thetrack = array();
    if (!empty($track)) {
        foreach ($track as $tra) {
            if (empty($tra["tname"])) {
                $tra["tname"] = "";
            }
            $hrs = round($tra["hours"], 2);
            $hrs = number_format($hrs, 2, ",", ".");
            $tra["comment"] = strip_tags($tra["comment"]);
            array_push($thetrack, array($tra["pname"], $tra["tname"], $tra["comment"], $tra["daystring"] . "/" . $tra["startstring"] . "-" . $tra["endstring"], $hrs));
        }
        $totaltime = $tracker->getTotalTrackTime($track);
        $totaltime = str_replace(".", ",", $totaltime);
        $pdf->table($headers, $thetrack);
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:managetimetracker.php

示例2: header

        } else {
            header("Location: manageuser.php?action=showproject&id={$id}&mode=deassigned");
        }
    }
} elseif ($action == "projectlogpdf") {
    if (!$userpermissions["admin"]["add"]) {
        $errtxt = $langfile["nopermission"];
        $noperm = $langfile["accessdenied"];
        $template->assign("errortext", "{$errtxt}<br>{$noperm}");
        $template->display("error.tpl");
        die;
    }
    $pdf = new MYPDF("P", PDF_UNIT, "A4", true);
    $tproject = $project->getProject($id);
    $headstr = $tproject["name"] . " " . $activity;
    $pdf->setup($headstr, array(235, 234, 234));
    $headers = array($langfile["action"], $langfile["day"], $langfile["user"]);
    $thelog = new mylog();
    $datlog = array();
    $tlog = $thelog->getProjectLog($id, 100000);
    $tlog = $thelog->formatdate($tlog, CL_DATEFORMAT . " / H:i:s");
    if (!empty($tlog)) {
        $i = 0;
        foreach ($tlog as $logged) {
            if ($logged["action"] == 1) {
                $actstr = $langfile["added"];
            } elseif ($logged["action"] == 2) {
                $actstr = $langfile["edited"];
            } elseif ($logged["action"] == 3) {
                $actstr = $langfile["deleted"];
            } elseif ($logged["action"] == 4) {
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:manageproject.php

示例3: reduceArray

                $tasknum = $tasknum + $tcount;
                array_push($alltasks, $tasks);
            }
            $cou = $cou + 1;
        }
    }
    $etasks = reduceArray($alltasks);
    $title = $langfile['mytasks'];
    $template->assign("title", $title);
    $template->assign("tasks", $etasks);
    $template->assign("tasknum", count($etasks));
    $template->assign("myprojects", $myprojects);
    $template->display("mytasks.tpl");
} elseif ($action == "pdf") {
    $pdf = new MYPDF("P", PDF_UNIT, "A4", true);
    $pdf->setup($langfile["mytasks"], array(229, 235, 235));
    $headers = array($langfile["title"], $langfile["project"], $langfile["daysleft"]);
    $mtask = new task();
    $msg = new message();
    $myprojects = $project->getMyProjects($userid);
    $messages = array();
    $milestones = array();
    $tasks = array();
    if (!empty($myprojects)) {
        foreach ($myprojects as $proj) {
            $task = $mtask->getAllMyProjectTasks($proj["ID"], 100);
            if (!empty($task)) {
                array_push($tasks, $task);
            }
        }
    }
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:mytasks.php


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