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


PHP MYPDF::table方法代码示例

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


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

示例1: array

    $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);
        $pdf->Output("user-{$uname}-timetable.pdf", "D");
    }
} elseif ($action == "showproject") {
    if (!$userpermissions["timetracker"]["view"]) {
        $errtxt = $langfile["nopermission"];
        $noperm = $langfile["accessdenied"];
        $template->assign("errortext", "{$errtxt}<br>{$noperm}");
        $template->display("error.tpl");
        die;
    }
    if (!chkproject($userid, $id)) {
        $errtxt = $langfile["notyourproject"];
        $noperm = $langfile["accessdenied"];
        $template->assign("errortext", "{$errtxt}<br>{$noperm}");
        $template->display("error.tpl");
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:managetimetracker.php

示例2: elseif

                $actstr = $langfile["edited"];
            } elseif ($logged["action"] == 3) {
                $actstr = $langfile["deleted"];
            } elseif ($logged["action"] == 4) {
                $actstr = $langfile["opened"];
            } elseif ($logged["action"] == 5) {
                $actstr = $langfile["closed"];
            } elseif ($logged["action"] == 6) {
                $actstr = $langfile["assigned"];
            }
            $i = $i + 1;
            $obstr = $logged["name"];
            array_push($datlog, array($obstr . " " . $langfile["was"] . " " . $actstr, $logged["datum"], $logged["username"]));
        }
    }
    $pdf->table($headers, $datlog);
    $pdf->Output("project-{$id}-log.pdf", "D");
} elseif ($action == "projectlogxls") {
    if (!$userpermissions["admin"]["add"]) {
        $template->assign("errortext", "Permission denied.");
        $template->display("error.tpl");
        die;
    }
    $excelFile = fopen(CL_ROOT . "/files/" . CL_CONFIG . "/ics/project-{$id}-log.csv", "w");
    $headline = array(" ", $strtext, $straction, $strdate, $struser);
    fputcsv($excelFile, $headline);
    $thelog = new mylog();
    $datlog = array();
    $tlog = $thelog->getProjectLog($id, 100000);
    $tlog = $thelog->formatdate($tlog, CL_DATEFORMAT);
    if (!empty($tlog)) {
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:manageproject.php

示例3: count

    $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);
            }
        }
    }
    $etasks = reduceArray($tasks);
    $fintasks = array();
    foreach ($etasks as $etask) {
        array_push($fintasks, array($etask["title"], $etask["pname"], $etask["daysleft"]));
    }
    $pdf->table($headers, $fintasks);
    $pdf->Output("my-tasks-{$username}.pdf", "D");
}
开发者ID:Setrino,项目名称:collabtive,代码行数:31,代码来源:mytasks.php


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