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


PHP PDFReport::__construct方法代码示例

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


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

示例1: SUM

 function __construct($orientation, $metric, $size, $year, $month)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $sql = "SELECT SUM(TIMESTAMPDIFF(MINUTE, starttime, endtime)) AS hours,  B.name AS customername\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}diary A \n\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}client B \n\t\t\t\t\t\tON B.id = A.clientid \n\t\t\t\t\t\tWHERE A.status IN ('I', 'C')\n\t\t\t\t\t\tAND YEAR(A.starttime) = {$year}\n\t\t\t\t\t\tAND MONTH(A.starttime) = {$month}\n\t\t\t\t\t\tAND A.deleted != 'Y'\n\t\t\t\t\t\tGROUP BY B.name\n\t\t\t\t\t\tORDER BY B.name";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $line = array("Customer" => $member['customername'], "Hours Worked" => number_format($member['hours'] / 60, 2));
                 if ($this->GetY() > 260) {
                     $this->AddPage();
                 }
                 $this->addLine($this->GetY(), $line, 5.5);
                 $this->Line(10, $this->GetY() - 0.5, 200, $this->GetY() - 0.5);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:Trianik,代码行数:25,代码来源:reporthoursworkedlib.php

示例2: while

 function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $sql = "SELECT A.*, \n\t\t\t\t\t    B.name AS customername, B.accountnumber, \n\t\t\t\t\t\tDATE_FORMAT(A.metacreateddate, '%d/%m/%Y %H:%I') AS metacreateddate, \n\t\t\t\t\t\tDATE_FORMAT(A.converteddatetime, '%d/%m/%Y %H:%I') AS converteddatetime,\n\t\t\t\t\t\tTIMEDIFF(A.converteddatetime, A.metacreateddate) as diff\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}quotation A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}customer B \n\t\t\t\t\t\tON B.id = A.customerid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C \n\t\t\t\t\t\tON C.member_id = A.takenbyid \n\t\t\t\t\t\tWHERE A.takenbyid = {$userid} \n\t\t\t\t\t\tAND A.metacreateddate >= '{$startdate}' \n\t\t\t\t\t\tAND A.metacreateddate <= '{$enddate}'  \n\t\t\t\t\t\tORDER BY A.metacreateddate DESC";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $diff = $member['diff'];
                 $conversiondate = $member['converteddatetime'];
                 if (substr($diff, 0, 1) == "-") {
                     $diff = " ";
                 }
                 if (substr($conversiondate, 0, 2) == "00") {
                     $conversiondate = " ";
                 }
                 $line = array("Customer" => $member['customername'], "Customer Code" => $member['accountnumber'], "Quotation Number" => getSiteConfigData()->bookingprefix . "-" . sprintf("%06d", $member['id']), "Quotation Date" => $member['metacreateddate'], "Conversion Date" => $conversiondate, "Time Taken" => $diff, "Total" => number_format($member['total'], 2));
                 $this->addLine($this->GetY(), $line);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:29,代码来源:reportconversion.php

示例3: COUNT

 function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $and = "";
         if ($startdate != "") {
             $and .= " AND A.matchdate >= '{$startdate}'  ";
         }
         if ($enddate != "") {
             $and .= " AND A.matchdate <= '{$enddate}'  ";
         }
         if ($userid != "0") {
             $and .= " AND A.refereeid = {$userid}   ";
         }
         $sql = "SELECT COUNT(*) AS matches, SUM(refereescore) AS score, \n\t\t\t\t\t    B.name AS refereeename\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchdetails A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B \n\t\t\t\t\t\tON B.id = A.refereeid \n\t\t\t\t\t\tWHERE refereescore >= 0 {$and}\n\t\t\t\t\t\tGROUP BY B.name  \n\t\t\t\t\t\tORDER BY B.name";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $line = array("Referee" => $member['refereeename'], "Games" => $member['matches'], "Average Score" => number_format($member['score'] / $member['matches'], 1));
                 if ($this->GetY() > 265) {
                     $this->AddPage();
                 }
                 $this->addLine($this->GetY(), $line);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:FA,代码行数:34,代码来源:refereereportlib.php

示例4: while

 function __construct($orientation, $metric, $size, $startdate, $enddate)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $and = "";
         if ($startdate != "") {
             $and .= " AND A.matchdate >= '{$startdate}'  ";
         }
         if ($enddate != "") {
             $and .= " AND A.matchdate <= '{$enddate}'  ";
         }
         $sql = "SELECT A.*, DATE_FORMAT(A.matchdate, '%d/%m/%Y') AS matchdate,\n\t\t\t\t\t    B.name AS refereeename,\n\t\t\t\t\t    C.age, C.name AS teamname\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchdetails A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B \n\t\t\t\t\t\tON B.id = A.refereeid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}teamagegroup C \n\t\t\t\t\t\tON C.id = A.teamid \n\t\t\t\t\t\tWHERE (A.ratereferee = 'P' OR A.rateplayers = 'P' OR A.ratemanagement = 'P' OR A.ratespectators = 'P' OR A.ratepitchsize = 'P' OR A.ratepitchcondition = 'P' OR A.rategoalsize = 'P' OR A.ratechangingrooms = 'P') {$and}\n\t\t\t\t\t\tORDER BY A.matchdate";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $line = array("Date of Match" => $member['matchdate'], "Age Group" => "Under " . $member['age'], "Division" => $member['division'], "Reported By" => $member['teamname'], "Match ID" => $member['id'], "Comments" => $member['remarks']);
                 if ($this->GetY() > 175) {
                     $this->AddPage();
                 }
                 $this->addLine($this->GetY(), $line);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:FA,代码行数:31,代码来源:poorresponsesreportlib.php

示例5: convertStringToDate

 function __construct($orientation, $metric, $size, $datefrom)
 {
     $dynamicY = 0;
     $this->dateFrom = $datefrom;
     start_db();
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $startdate = convertStringToDate($this->dateFrom);
         $sql = "SELECT A.name, C.amount,\n\t\t\t\t\t    (\n\t\t\t\t\t   \t\tSELECT SUM(B.amount) * D.retailprice\n\t\t\t\t\t   \t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t   \t\tINNER JOIN {$_SESSION['DB_PREFIX']}product D\n\t\t\t\t\t   \t\tON D.id = B.productid \n\t\t\t\t\t   \t\tWHERE B.eventid = A.id \n\t\t\t\t\t   \t\tAND B.eventdate = '{$startdate}' \n\t\t\t\t\t   \t\tAND B.type = 'S'\n\t\t\t\t\t    ) AS sold\n\t\t\t\t\t    FROM {$_SESSION['DB_PREFIX']}event A \n\t\t\t\t\t    LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}eventforecast C\n\t\t\t\t\t    ON C.eventid = A.id\n\t\t\t\t\t    AND C.forecastdate = '{$startdate}' \n\t\t\t\t\t\tORDER BY A.name";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $sold = $member['sold'] != "" ? $member['sold'] : 0;
                 $line = array("Event" => $member['name'], "Takings" => "£ " . number_format($sold, 2), "Expected" => "£ " . number_format($member['amount'], 2));
                 $this->addLine($this->GetY(), $line, 6.2);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:25,代码来源:reportdailycostslibdata.php

示例6: while

 function __construct($orientation, $metric, $size, $startdate, $enddate, $userid)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $and = "";
         if ($startdate != "") {
             $and .= " AND A.metacreateddate >= '{$startdate}'  ";
         }
         if ($enddate != "") {
             $and .= " AND A.metacreateddate <= '{$enddate}'  ";
         }
         if ($userid != "0") {
             $and .= " AND A.takenbyid = {$userid}   ";
         }
         $sql = "SELECT A.*, \n\t\t\t\t\t    B.name AS customername, B.accountnumber, \n\t\t\t\t\t    C.fullname,\n\t\t\t\t\t\tDATE_FORMAT(A.metacreateddate, '%d/%m/%Y %H:%I') AS metacreateddate\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}quotation A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}customer B \n\t\t\t\t\t\tON B.id = A.customerid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}members C \n\t\t\t\t\t\tON C.member_id = A.takenbyid \n\t\t\t\t\t\tWHERE 1 = 1 {$and}  \n\t\t\t\t\t\tORDER BY B.name, A.metacreateddate";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $line = array("Customer" => $member['customername'], "Customer Code" => $member['accountnumber'], "Quotation Number" => getSiteConfigData()->bookingprefix . "-" . sprintf("%06d", $member['id']), "User" => $member['fullname'], "Quotation Date" => $member['metacreateddate'], "Value" => number_format($member['total'], 2));
                 $this->addLine($this->GetY(), $line);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:31,代码来源:reportbulkquotationspdf.php

示例7: convertStringToDate

 function __construct($orientation, $metric, $size)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $startdate = convertStringToDate($_POST['datefrom']);
         $enddate = convertStringToDate($_POST['dateto']);
         if ($_POST['eventid'] != "0") {
             $eventid = $_POST['eventid'];
             $sql = "SELECT A.name, A.retailprice,\n\t\t\t\t\t\t   (SELECT SUM(B.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction B WHERE B.productid = A.id AND B.eventid = {$eventid} AND B.eventdate BETWEEN '{$startdate}' AND '{$enddate}') AS sold,\n\t\t\t\t\t\t   (SELECT SUM(C.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction C WHERE C.productid = A.id AND C.eventid = {$eventid} AND C.eventdate BETWEEN '{$startdate}' AND '{$enddate}') AS broken,\n\t\t\t\t\t\t   (SELECT SUM(D.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction D WHERE D.productid = A.id AND D.eventid = {$eventid} AND D.eventdate BETWEEN '{$startdate}' AND '{$enddate}') AS demo\n\t\t\t\t\t\t    FROM {$_SESSION['DB_PREFIX']}product A \n\t\t\t\t\t\t\tGROUP BY A.name\n\t\t\t\t\t\t\tORDER BY A.name";
         } else {
             $sql = "SELECT A.name, A.retailprice,\n\t\t\t\t\t\t   (SELECT SUM(B.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction B WHERE B.productid = A.id AND B.eventdate BETWEEN '{$startdate}' AND '{$enddate}' and B.type = 'S') AS sold,\n\t\t\t\t\t\t   (SELECT SUM(C.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction C WHERE C.productid = A.id AND C.eventdate BETWEEN '{$startdate}' AND '{$enddate}' and C.type = 'B') AS broken,\n\t\t\t\t\t\t   (SELECT SUM(D.amount) FROM {$_SESSION['DB_PREFIX']}eventtransaction D WHERE D.productid = A.id AND D.eventdate BETWEEN '{$startdate}' AND '{$enddate}' and D.type = 'G') AS demo\n\t\t\t\t\t\t    FROM {$_SESSION['DB_PREFIX']}product A \n\t\t\t\t\t\t\tGROUP BY A.name\n\t\t\t\t\t\t\tORDER BY A.name";
         }
         $result = mysql_query($sql);
         if ($result) {
             $total = 0;
             $totalsold = 0;
             $totalbroken = 0;
             $totaldemo = 0;
             while ($member = mysql_fetch_assoc($result)) {
                 $sold = $member['sold'] != "" ? $member['sold'] : 0;
                 $broken = $member['broken'] != "" ? $member['broken'] : 0;
                 $demo = $member['demo'] != "" ? $member['demo'] : 0;
                 $line = array("Product" => $member['name'], "Sold" => " " . $sold, "Broken" => " " . $broken, "Demo" => " " . $demo, "Cost" => "£ " . number_format($member['retailprice'] * ($broken + $sold + $demo), 2));
                 $this->addLine($this->GetY(), $line);
                 $total += $member['retailprice'] * ($broken + $sold + $demo);
                 $totalsold += $sold;
                 $totalbroken += $broken;
                 $totaldemo += $demo;
             }
             $line = array("Product" => "Total : ", "Sold" => " " . $totalsold, "Broken" => " " . $totalbroken, "Demo" => " " . $totaldemo, "Cost" => "£ " . number_format($total, 2));
             $this->addLine($this->GetY() + 4, $line);
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:41,代码来源:reportsaleslib.php

示例8: IN

 function __construct($orientation, $metric, $size, $startdate, $enddate)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $sql = "SELECT A.name, B.name AS clubname\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}teamagegroup A \n\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}team B \n\t\t\t\t\t\tON B.id = A.teamid \n\t\t\t\t\t\tWHERE A.id NOT IN (SELECT C.agegroupid FROM {$_SESSION['DB_PREFIX']}player C)\n\t\t\t\t\t\tORDER BY A.name, B.name";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $line = array("Club" => $member['clubname'], "Team" => $member['name']);
                 if ($this->GetY() > 265) {
                     $this->AddPage();
                 }
                 $this->addLine($this->GetY(), $line);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:FA,代码行数:24,代码来源:reportteamswithmissingplayers.php

示例9: convertStringToDate

 function __construct($orientation, $metric, $size, $startdate, $enddate)
 {
     $this->fromdate = convertStringToDate($startdate);
     $this->todate = convertStringToDate($enddate);
     $eventid = $_POST['eventid'];
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $total = array();
         $total[0] = 0;
         $total[1] = 0;
         $total[2] = 0;
         $total[3] = 0;
         $total[4] = 0;
         if ($eventid == 0) {
             $sql = "SELECT A.id, A.name, A.retailprice, B.stock \n\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}product A \n\t\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}eventproductmatrix B\n\t\t\t\t\t\t\tON B.productid = A.id\n\t\t\t\t\t\t\tORDER BY A.name";
         } else {
             $sql = "SELECT A.id, A.name, A.retailprice, B.stock \n\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}product A \n\t\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}eventproductmatrix B\n\t\t\t\t\t\t\tON B.productid = A.id\n\t\t\t\t\t\t\tAND B.eventid = {$eventid}\n\t\t\t\t\t\t\tORDER BY A.name";
         }
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $productid = $member['id'];
                 $productname = $member['name'];
                 $stock = $member['stock'];
                 $retailprice = $member['retailprice'];
                 $sold = 0;
                 $broken = 0;
                 $demo = 0;
                 if ($eventid == 0) {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.type = 'S'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 } else {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.eventid = {$eventid}\n\t\t\t\t\t\t\t\t\tAND B.type = 'S'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 }
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $sold = $itemmember['amount'];
                     }
                 } else {
                     logError($sql . " - " . mysql_error());
                 }
                 if ($eventid == 0) {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.type = 'B'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 } else {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.eventid = {$eventid}\n\t\t\t\t\t\t\t\t\tAND B.type = 'B'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 }
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $broken = $itemmember['amount'];
                     }
                 } else {
                     logError($sql . " - " . mysql_error());
                 }
                 if ($eventid == 0) {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.type = 'G'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 } else {
                     $sql = "SELECT \n\t\t\t\t\t\t\t\t\tIFNULL(SUM(B.amount), 0) AS amount \n\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\tAND B.eventid = {$eventid}\n\t\t\t\t\t\t\t\t\tAND B.type = 'G'\n\t\t\t\t\t\t\t\t\tAND B.eventdate BETWEEN '{$this->fromdate}' AND '{$this->todate}'";
                 }
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $demo = $itemmember['amount'];
                     }
                 } else {
                     logError($sql . " - " . mysql_error());
                 }
                 $total[0] += $sold;
                 $total[1] += $broken;
                 $total[2] += $demo;
                 $total[3] += $stock;
                 $total[4] += $sold * $retailprice;
                 $line = array(GetEventName($_POST['eventid']) => $productname, "SOLD" => $sold, "BROKEN" => $broken, "DEMO" => $demo, "BALANCE" => number_format($stock, 0), "SALES" => number_format($sold * $retailprice, 2));
                 $this->addLine($this->GetY(), $line, 5);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
         $line = array(GetEventName($_POST['eventid']) => "Total", "SOLD" => " " . $total[0], "BROKEN" => " " . $total[1], "DEMO" => " " . $total[2], "BALANCE" => " " . $total[3], "SALES" => " " . number_format($total[4], 2));
         $this->addLine($this->GetY() + 2, $line, 5);
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:87,代码来源:reportsummarybysitelib.php

示例10: while

 function __construct($orientation, $metric, $size, $id)
 {
     $dynamicY = 0;
     start_db();
     parent::__construct($orientation, $metric, $size);
     try {
         $sql = "SELECT \n\t\t\t\t\t\t A.*, \n\t\t\t\t\t\t DATE_FORMAT(A.matchdate, '%d/%m/%Y') AS matchdate,\n\t\t\t\t\t\t B.name AS refereename, C.name AS submittedteamname, D.name AS oppositionname, \n\t\t\t\t\t\t E.name AS agegroupname, E.age\n\t\t\t\t\t\t FROM  {$_SESSION['DB_PREFIX']}matchdetails A\n\t\t\t\t\t\t LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B\n\t\t\t\t\t\t ON B.id = A.refereeid\n\t\t\t\t\t\t LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}team C\n\t\t\t\t\t\t ON C.id = A.teamid\n\t\t\t\t\t\t LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}team D\n\t\t\t\t\t\t ON D.id = A.oppositionid\n\t\t\t\t\t\t LEFT OUTER JOIN {$_SESSION['DB_PREFIX']}teamagegroup E\n\t\t\t\t\t\t ON E.id = A.agegroupid\n\t\t\t\t\t\t WHERE A.id = {$id}";
         $result = mysql_query($sql);
         if ($result) {
             while ($this->headermember = mysql_fetch_assoc($result)) {
                 $dynamicY = $this->newPage() + 2;
                 $sql = "SELECT A.*, B.firstname, B.lastname, B.registrationnumber\n\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchplayerdetails A \n\t\t\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}player B \n\t\t\t\t\t\t\t\tON B.id = A.playerid\n\t\t\t\t\t\t\t\tWHERE A.matchid = {$id} \n\t\t\t\t\t\t\t\tORDER BY B.firstname, B.lastname";
                 $itemresult = mysql_query($sql);
                 $index = 1;
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $this->addText(15, $dynamicY, $index++, 10, 4, '');
                         $this->addText(25, $dynamicY, $itemmember['firstname'] . " " . $itemmember['lastname'], 10, 4, '');
                         $dynamicY = $this->addText(110, $dynamicY, $itemmember['registrationnumber'], 10, 4, '');
                     }
                 } else {
                     logError($qry . " - " . mysql_error());
                 }
                 $dynamicY = 153 + $this->margin;
                 $dynamicY = $this->addText(15, $dynamicY, "CLUB / MANAGERS REPORT (Including the FA Respect Codes of Conduct)", 10, 4, 'B') + 2;
                 if ($this->headermember['age'] < 12) {
                     $this->addText(15, $dynamicY, "Referee", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratereferee']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Opponent players", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['rateplayers']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Opponent Management", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratemanagement']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Opponent Spectators", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratespectators']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Pitch Size", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratepitchsize']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Pitch Condition", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratepitchcondition']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Goal Size", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['rategoalsize']), 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Changing Rooms", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->getRateDescription($this->headermember['ratechangingrooms']), 10, 4, '') + 1;
                 } else {
                     $this->addText(15, $dynamicY, "Did the pitch have the required barriers, cones and markings", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->headermember['requiredbarriers'] == 1 ? "Yes" : "No", 10, 4, '') + 1;
                     $this->addText(15, $dynamicY, "Was the pitch size/condition, goals and changing rooms adequate", 10, 4, '');
                     $dynamicY = $this->addText(150, $dynamicY, $this->headermember['pitchsize'] == 1 ? "Yes" : "No", 10, 4, '') + 1;
                 }
                 $this->addText(15, $dynamicY, "Did your opponent players, management and spectators comply with the Codes", 10, 4, '');
                 $dynamicY = $this->addText(150, $dynamicY, $this->headermember['complycodes'] == 1 ? "Yes" : "No", 10, 4, '') + 1;
                 $this->addText(15, $dynamicY, "Did you check your opponent players ID cards", 10, 4, '');
                 $dynamicY = $this->addText(150, $dynamicY, $this->headermember['opponentids'] == 1 ? "Yes" : "No", 10, 4, '') + 1;
                 $this->Line(15, $dynamicY, 195, $dynamicY);
                 $dynamicY = $this->addText(15, $dynamicY + 2, "REFEREE SECTION", 10, 4, 'B') + 3;
                 $this->addText(15, $dynamicY, "Referee", 10, 4, 'B');
                 $this->addText(45, $dynamicY, $this->headermember['referee'], 10, 4, '');
                 if ($this->headermember['refereescore'] > 0) {
                     $this->addText(105, $dynamicY, "Appointed by League", 10, 4, 'B');
                     $dynamicY = $this->addText(145, $dynamicY, $this->headermember['refappointedbyleague'] == "Y" ? "Yes" : "No", 10, 4, '') + 3;
                     $this->addText(15, $dynamicY, "Marks out of 100", 10, 4, 'B');
                     $dynamicY = $this->addText(45, $dynamicY, $this->headermember['refereescore'], 10, 4, '') + 3;
                     $this->addText(15, $dynamicY, "Remarks", 10, 4, 'B');
                     $dynamicY = $this->addText(45, $dynamicY, $this->headermember['refereeremarks'], 10, 4, '', 150) + 2;
                 } else {
                     $dynamicY = $this->addText(145, $dynamicY, " ", 10, 4, '');
                 }
                 $this->Line(15, $dynamicY, 195, $dynamicY);
                 $dynamicY = $this->addText(15, $dynamicY + 3, "SIGNED", 10, 4, 'B') + 2;
                 $this->DynamicImage($this->headermember['imageid'], 15, $dynamicY);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
     $this->AliasNbPages();
 }
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:78,代码来源:matchcardreport.php

示例11: while

 function __construct($orientation, $metric, $size, $id)
 {
     $dynamicY = 0;
     start_db();
     parent::__construct($orientation, $metric, $size);
     try {
         $sql = "SELECT A.*, DATE_FORMAT(A.invoicedate, '%d/%m/%Y') AS invoicedate,\n\t\t\t\t\t\tD.name AS customername, D.accountnumber, D.invoiceaddress1, D.invoiceaddress2, D.invoiceaddress3, \n\t\t\t\t\t\tD.invoicecity, D.invoicepostcode, B.deliveryaddress1, B.deliveryaddress2, \n\t\t\t\t\t\tB.deliveryaddress3, B.deliverycity, B.deliverypostcode, D.firstname, B.lastname,\n\t\t\t\t\t\tE.fullname AS takenbyname\n\t\t\t\t\t    FROM  {$_SESSION['DB_PREFIX']}invoice A\n\t\t\t\t\t    INNER JOIN  {$_SESSION['DB_PREFIX']}customerclientsite B\n\t\t\t\t\t    ON B.id = A.siteid\n\t\t\t\t\t    INNER JOIN  {$_SESSION['DB_PREFIX']}customerclient C\n\t\t\t\t\t    ON C.id = B.clientid\n\t\t\t\t\t    INNER JOIN  {$_SESSION['DB_PREFIX']}customer D\n\t\t\t\t\t    ON D.id = C.customerid\n\t\t\t\t\t    LEFT OUTER JOIN  {$_SESSION['DB_PREFIX']}members E\n\t\t\t\t\t    ON E.member_id = A.takenbyid\n\t\t\t\t\t    WHERE A.id = {$id}\n\t\t\t\t\t    ORDER BY A.id DESC";
         $result = mysql_query($sql);
         if ($result) {
             while ($this->headermember = mysql_fetch_assoc($result)) {
                 $shipping = $this->headermember['deliverycharge'];
                 $discount = $this->headermember['discount'];
                 $total = 0;
                 $dynamicY = $this->newPage() + 7;
                 $sql = "SELECT A.*, B.productcode, B.description\n\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}invoiceitem A \n\t\t\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}product B \n\t\t\t\t\t\t\t\tON B.id = A.productid \n\t\t\t\t\t\t\t\tWHERE A.invoiceid = {$id} \n\t\t\t\t\t\t\t\tORDER BY A.sequence";
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $line = array("Quantity" => $itemmember['quantity'], "Code" => $itemmember['productcode'], "Description" => $itemmember['description'], "Price Each" => number_format($itemmember['priceeach'], 2), "Line Total" => number_format($itemmember['priceeach'] * $itemmember['quantity'], 2));
                         $size = $this->addLine($dynamicY, $line);
                         $dynamicY += $size + 1;
                         if ($dynamicY > 225) {
                             $dynamicY = $this->newPage();
                             $dynamicY = 102;
                         }
                         $total = $total + $itemmember['priceeach'] * $itemmember['quantity'];
                         $totalvat += $itemmember['vat'];
                     }
                 } else {
                     logError($qry . " - " . mysql_error());
                 }
                 $line = array("Quantity" => " ", "Code" => " ", "Description" => " ", "Price Each" => "Goods Net:", "Line Total" => number_format($total, 2));
                 $size = $this->addLine(236, $line);
                 $line = array("Quantity" => " ", "Code" => " ", "Description" => " ", "Price Each" => "Delivery:", "Line Total" => number_format($shipping, 2));
                 $size = $this->addLine(242, $line);
                 $line = array("Quantity" => " ", "Code" => " ", "Description" => " ", "Price Each" => "Invoice Net:", "Line Total" => number_format($shipping + $total, 2));
                 $size = $this->addLine(248, $line);
                 $totalvat += $shipping * (getSiteConfigData()->vatrate / 100);
                 $line = array("Quantity" => " ", "Code" => " ", "Description" => " ", "Price Each" => "VAT:", "Line Total" => number_format($totalvat, 2));
                 $size = $this->addLine(254, $line);
                 $line = array("Quantity" => " ", "Code" => " ", "Description" => " ", "Price Each" => "Total:", "Line Total" => number_format($totalvat + $shipping + $total - $discount, 2));
                 $size = $this->addLine(260, $line);
                 $this->addText(162, 265, "Pounds Sterling", 6, 3);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
     } catch (Exception $e) {
         logError($e->getMessage());
     }
     $this->AliasNbPages();
 }
开发者ID:prodigyworks,项目名称:Coast-Guard,代码行数:52,代码来源:invoicereportlib.php

示例12: while

 function __construct($orientation, $metric, $size, $startdate, $enddate)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $and = "";
         if ($startdate != "") {
             $and .= " AND A.matchdate >= '{$startdate}'  ";
         }
         if ($enddate != "") {
             $and .= " AND A.matchdate <= '{$enddate}'  ";
         }
         $sql = "SELECT A.*, DATE_FORMAT(A.matchdate, '%d/%m/%Y') AS matchdate,\n\t\t\t\t\t    B.name AS refereeename,\n\t\t\t\t\t    C.age, C.name AS teamname\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}matchdetails A \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}referee B \n\t\t\t\t\t\tON B.id = A.refereeid \n\t\t\t\t\t\tLEFT OUTER JOIN {$_SESSION['DB_PREFIX']}teamagegroup C \n\t\t\t\t\t\tON C.id = A.teamid \n\t\t\t\t\t\tWHERE (A.remarks IS NOT NULL AND A.remarks != '') {$and}\n\t\t\t\t\t\tORDER BY A.matchdate";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 if ($member['division'] == "X") {
                     if ($member['leaguecup'] == "L") {
                         $pdivision = "League";
                     } else {
                         if ($member['leaguecup'] == "C") {
                             $pdivision = "Challenge Cup";
                         } else {
                             if ($member['leaguecup'] == "N") {
                                 $pdivision = "Combination";
                             } else {
                                 if ($member['leaguecup'] == "X") {
                                     $pdivision = "Cup";
                                 } else {
                                     if ($member['leaguecup'] == "T") {
                                         $pdivision = "Challenge Trophy";
                                     }
                                 }
                             }
                         }
                     }
                 } else {
                     if ($member['division'] == "P") {
                         $pdivision = "Premier";
                     } else {
                         if ($member['division'] == "1") {
                             $pdivision = "1";
                         } else {
                             if ($member['division'] == "2") {
                                 $pdivision = "2";
                             } else {
                                 if ($member['division'] == "3") {
                                     $pdivision = "3";
                                 } else {
                                     if ($member['division'] == "4") {
                                         $pdivision = "4";
                                     } else {
                                         if ($member['division'] == "5") {
                                             $pdivision = "5";
                                         } else {
                                             if ($member['division'] == "6") {
                                                 $pdivision = "6";
                                             } else {
                                                 if ($member['division'] == "A") {
                                                     $pdivision = "A";
                                                 } else {
                                                     if ($member['division'] == "B") {
                                                         $pdivision = "B";
                                                     } else {
                                                         if ($member['division'] == "C") {
                                                             $pdivision = "C";
                                                         } else {
                                                             if ($member['division'] == "D") {
                                                                 $pdivision = "D";
                                                             } else {
                                                                 if ($member['division'] == "E") {
                                                                     $pdivision = "E";
                                                                 } else {
                                                                     if ($member['division'] == "F") {
                                                                         $pdivision = "F";
                                                                     } else {
                                                                         if ($member['division'] == "G") {
                                                                             $pdivision = "G";
                                                                         } else {
                                                                             if ($member['division'] == "H") {
                                                                                 $pdivision = "H";
                                                                             }
                                                                         }
                                                                     }
                                                                 }
                                                             }
                                                         }
                                                     }
                                                 }
                                             }
                                         }
                                     }
                                 }
                             }
                         }
                     }
                 }
                 $line = array("Date of Match" => $member['matchdate'], "Age Group" => "Under " . $member['age'], "Division" => $pdivision, "Reported By" => $member['teamname'], "Match ID" => $member['id'], "Comments" => $member['remarks']);
//.........这里部分代码省略.........
开发者ID:prodigyworks,项目名称:FA,代码行数:101,代码来源:reportcommentsmadelib.php

示例13: SUM

 function __construct($orientation, $metric, $size, $year, $month)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $startdate = "{$year}-{$month}-01";
         $enddate = "{$year}-{$month}-" . cal_days_in_month(CAL_GREGORIAN, $month, $year);
         $sql = "SELECT SUM(TIMESTAMPDIFF(MINUTE, starttime, endtime)) AS hours,  B.fullname AS customername, B.member_id\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}diary A \n\t\t\t\t\t\tINNER JOIN {$_SESSION['DB_PREFIX']}members B \n\t\t\t\t\t\tON B.member_id = A.memberid \n\t\t\t\t\t\tWHERE A.status IN ('I', 'C')\n\t\t\t\t\t\tAND YEAR(A.starttime) = {$year}\n\t\t\t\t\t\tAND MONTH(A.starttime) = {$month}\n\t\t\t\t\t\tGROUP BY B.fullname\n\t\t\t\t\t\tORDER BY B.fullname";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $holidays = 0;
                 $absences = 0;
                 $memberid = $member['member_id'];
                 $sql = "SELECT A.startdate, A.enddate, A.enddate_half, A.startdate_half\n        \t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}holiday A \n                                WHERE A.memberid = {$memberid} \n                                AND A.startdate <= '{$enddate}' \n                                AND A.enddate >= '{$startdate}'\n        \t\t\t\t\t\tUNION ALL\n        \t\t\t\t\t\tSELECT B.startdate, B.enddate, B.enddate_half, B.startdate_half\n        \t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}bankholiday B\n                                WHERE B.startdate <= '{$enddate}' \n                                AND B.enddate >= '{$startdate}'";
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $date1 = new DateTime($startdate);
                         $date2 = new DateTime($itemmember['startdate']);
                         $diff = $date2->diff($date1)->format("%a");
                         if ($diff > 0) {
                             $realstartdate = $date2;
                         } else {
                             $realstartdate = $date1;
                         }
                         $date1 = new DateTime($enddate);
                         $date2 = new DateTime($itemmember['enddate']);
                         $diff = $date1->diff($date2)->format("%a");
                         if ($diff > 0) {
                             $realenddate = $date2;
                         } else {
                             $realenddate = $date1;
                         }
                         $holidays += $realenddate->diff($realstartdate)->format("%a");
                         $date = $realstartdate->format("Y-m-d");
                         while (strtotime($date) <= strtotime($realenddate->format("Y-m-d"))) {
                             if (date("w", strtotime($date)) == 0 || date("w", strtotime($date)) == 6) {
                                 $holidays--;
                             }
                             $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
                         }
                         if ($itemmember['enddate_half'] == 1) {
                             $holidays += 0.5;
                         }
                         if ($itemmember['startdate_half'] == 1) {
                             $holidays += 0.5;
                         }
                     }
                 } else {
                     logError($sql . " - " . mysql_error());
                 }
                 $sql = "SELECT *\n        \t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}absence A \n                                WHERE memberid = {$memberid} \n                                AND startdate <= '{$enddate}' \n                                AND enddate >= '{$startdate}'";
                 $itemresult = mysql_query($sql);
                 if ($itemresult) {
                     while ($itemmember = mysql_fetch_assoc($itemresult)) {
                         $date1 = new DateTime($startdate);
                         $date2 = new DateTime($itemmember['startdate']);
                         $diff = $date2->diff($date1)->format("%a");
                         if ($diff > 0) {
                             $realstartdate = $date2;
                         } else {
                             $realstartdate = $date1;
                         }
                         $date1 = new DateTime($enddate);
                         $date2 = new DateTime($itemmember['enddate']);
                         $diff = $date1->diff($date2)->format("%a");
                         if ($diff > 0) {
                             $realenddate = $date2;
                         } else {
                             $realenddate = $date1;
                         }
                         $absences += $realenddate->diff($realstartdate)->format("%a");
                         $date = $realstartdate->format("Y-m-d");
                         while (strtotime($date) <= strtotime($realenddate->format("Y-m-d"))) {
                             if (date("w", strtotime($date)) == 0 || date("w", strtotime($date)) == 6) {
                                 $absences--;
                             }
                             $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
                         }
                         if ($itemmember['enddate_half'] == 1) {
                             $absences += 0.5;
                         }
                         if ($itemmember['startdate_half'] == 1) {
                             $absences += 0.5;
                         }
                     }
                 } else {
                     logError($sql . " - " . mysql_error());
                 }
                 $line = array("Staff Member" => $member['customername'], "Holidays" => " " . number_format($holidays, 1), "Absences" => " " . number_format($absences, 1), "Hours Worked" => number_format($member['hours'] / 60, 2));
                 if ($this->GetY() > 260) {
                     $this->AddPage();
                 }
                 $this->addLine($this->GetY(), $line, 5.5);
                 $this->Line(10, $this->GetY() - 0.5, 200, $this->GetY() - 0.5);
             }
         } else {
//.........这里部分代码省略.........
开发者ID:prodigyworks,项目名称:Trianik,代码行数:101,代码来源:reporthoursstafflib.php

示例14: while

 function __construct($orientation, $metric, $size, $id)
 {
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 5);
     $this->AddPage();
     try {
         $sql = "SELECT *, DATE_FORMAT(A.startdate, '%d/%m/%Y') AS startdate\n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}client A \n\t\t\t\t\t\tWHERE id = {$id}";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $this->SetFillColor(100, 255, 100);
                 $this->Rect(5.3, 21.3, 42.6, 7, "F");
                 $this->Rect(106.3, 21.3, 31.6, 6.5, "F");
                 $this->Rect(5.3, 55.3, 42.6, 25.4, "F");
                 $this->Rect(5.3, 88.3, 42.6, 7, "F");
                 $this->Rect(5.3, 105.3, 42.6, 10.6, "F");
                 $this->Rect(5.3, 123.5, 42.6, 60.6, "F");
                 $this->Rect(5.3, 206.5, 42.6, 51.6, "F");
                 $this->SetFillColor(150, 150, 255);
                 $this->Rect(5.3, 28.3, 42.6, 26.5, "F");
                 $this->Rect(5.3, 81.40000000000001, 42.6, 7, "F");
                 $this->Rect(5.3, 95.40000000000001, 42.6, 10, "F");
                 $this->Rect(106.3, 81.40000000000001, 31.6, 6.5, "F");
                 $this->Rect(5.3, 116.4, 42.6, 7, "F");
                 $this->Rect(5.3, 184.4, 42.6, 22, "F");
                 $this->Rect(5.3, 258.4, 42.6, 21.2, "F");
                 $this->Line(106, 21, 106, 28);
                 $this->Line(138, 21, 138, 28);
                 $this->Line(106, 81, 106, 88);
                 $this->Line(138, 81, 138, 88);
                 $this->SetFillColor(0, 0, 0);
                 $this->Rect(50, 128.4, 82.59999999999999, 7);
                 $this->Rect(50, 140.4, 144, 7);
                 $this->Rect(50, 152.6, 144, 7);
                 $this->Line(59, 152.6, 59, 159.6);
                 $this->Line(68, 152.6, 68, 159.6);
                 $this->Line(77, 152.6, 77, 159.6);
                 $this->Line(86, 152.6, 86, 159.6);
                 $this->Line(95, 152.6, 95, 159.6);
                 $this->Line(104, 152.6, 104, 159.6);
                 $this->Line(113, 152.6, 113, 159.6);
                 $this->Line(122, 152.6, 122, 159.6);
                 $this->Line(131, 152.6, 131, 159.6);
                 $this->Line(140, 152.6, 140, 159.6);
                 $this->Line(149, 152.6, 149, 159.6);
                 $this->Line(158, 152.6, 158, 159.6);
                 $this->Line(167, 152.6, 167, 159.6);
                 $this->Line(176, 152.6, 176, 159.6);
                 $this->Line(185, 152.6, 185, 159.6);
                 $this->Rect(50, 164.6, 18, 7);
                 $this->Line(59, 164.6, 59, 171.6);
                 $this->Rect(80, 164.6, 18, 7);
                 $this->Line(89, 164.6, 89, 171.6);
                 $this->Rect(110, 164.6, 27, 7);
                 $this->Line(119, 164.6, 119, 171.6);
                 $this->Line(128, 164.6, 128, 171.6);
                 $this->Rect(150, 164.6, 21, 7);
                 $this->Rect(50, 191.6, 136.5, 9);
                 $this->Line(117.5, 200.6, 117.5, 206);
                 $this->Line(126.5, 200.6, 126.5, 206);
                 $this->Line(136.5, 200.6, 136.5, 206);
                 $this->Line(146.5, 200.6, 146.5, 206);
                 $this->Line(156.5, 200.6, 156.5, 206);
                 $this->Line(166.5, 200.6, 166.5, 206);
                 $this->Line(176.5, 200.6, 176.5, 206);
                 $this->Line(186.5, 200.6, 186.5, 206);
                 $this->Rect(92.5, 216, 10, 6);
                 $this->Rect(92.5, 224, 10, 6);
                 $this->Rect(92.5, 232, 50, 6);
                 $this->Rect(92.5, 240, 100, 6);
                 $this->Line(102.5, 232, 102.5, 238);
                 $this->Line(112.5, 232, 112.5, 238);
                 $this->Line(122.5, 232, 122.5, 238);
                 $this->Line(132.5, 232, 132.5, 238);
                 $margin = 74;
                 $this->Rect(50, 191.6 + $margin, 136.5, 9);
                 $this->Line(117.5, 200.6 + $margin, 117.5, 206 + $margin);
                 $this->Line(126.5, 200.6 + $margin, 126.5, 206 + $margin);
                 $this->Line(136.5, 200.6 + $margin, 136.5, 206 + $margin);
                 $this->Line(146.5, 200.6 + $margin, 146.5, 206 + $margin);
                 $this->Line(156.5, 200.6 + $margin, 156.5, 206 + $margin);
                 $this->Line(166.5, 200.6 + $margin, 166.5, 206 + $margin);
                 $this->Line(176.5, 200.6 + $margin, 176.5, 206 + $margin);
                 $this->Line(186.5, 200.6 + $margin, 186.5, 206 + $margin);
                 $this->Line(5, 28, 205, 28);
                 $this->Line(5, 55, 205, 55);
                 $this->Line(5, 81, 205, 81);
                 $this->Line(5, 88, 205, 88);
                 $this->Line(5, 95.5, 205, 95.5);
                 $this->Line(5, 105, 205, 105);
                 $this->Line(5, 116, 205, 116);
                 $this->Line(5, 123.5, 205, 123.5);
                 $this->Line(5, 184.5, 205, 184.5);
                 $this->Line(5, 206.2, 205, 206.2);
                 $this->Line(5, 258.2, 205, 258.2);
                 //						if ($member['paymentmethod'] == "Q") {
                 //							$paymentmethod = "Cheque";
                 //
                 //						} else if ($member['paymentmethod'] == "C") {
//.........这里部分代码省略.........
开发者ID:prodigyworks,项目名称:Trianik,代码行数:101,代码来源:newstarterreport.php

示例15: convertStringToDate

 function __construct($orientation, $metric, $size, $startdate)
 {
     $this->fromdate = convertStringToDate($startdate);
     $this->todate = date("Y-m-d", strtotime("+1 week", strtotime($this->fromdate)));
     $eventid = $_POST['eventid'];
     $dynamicY = 0;
     parent::__construct($orientation, $metric, $size);
     $this->SetAutoPageBreak(true, 30);
     $this->AddPage();
     try {
         $total = array();
         $total[0] = 0;
         $total[1] = 0;
         $total[2] = 0;
         $total[3] = 0;
         $total[4] = 0;
         $total[5] = 0;
         $total[6] = 0;
         $sql = "SELECT A.id, A.name \n\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}product A \n\t\t\t\t\t\tORDER BY A.name";
         $result = mysql_query($sql);
         if ($result) {
             while ($member = mysql_fetch_assoc($result)) {
                 $productid = $member['id'];
                 $productname = $member['name'];
                 $date = $this->fromdate;
                 $amounts = array();
                 while (strtotime($date) <= strtotime($this->todate)) {
                     if ($eventid == 0) {
                         $sql = "SELECT IFNULL(SUM(B.amount), 0) AS amount\n\t\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\t\tAND B.eventdate = '{$date}'";
                     } else {
                         $sql = "SELECT IFNULL(SUM(B.amount), 0) AS amount\n\t\t\t\t\t\t\t\t\t\tFROM {$_SESSION['DB_PREFIX']}eventtransaction B \n\t\t\t\t\t\t\t\t\t\tWHERE B.productid = {$productid} \n\t\t\t\t\t\t\t\t\t\tAND B.eventid = {$eventid}\n\t\t\t\t\t\t\t\t\t\tAND B.eventdate = '{$date}'";
                     }
                     $itemresult = mysql_query($sql);
                     if ($itemresult) {
                         while ($itemmember = mysql_fetch_assoc($itemresult)) {
                             array_push($amounts, $itemmember['amount']);
                         }
                     } else {
                         logError($sql . " - " . mysql_error());
                     }
                     $date = date("Y-m-d", strtotime("+1 day", strtotime($date)));
                 }
                 $total[0] += $amounts[0];
                 $total[1] += $amounts[1];
                 $total[2] += $amounts[2];
                 $total[3] += $amounts[3];
                 $total[4] += $amounts[4];
                 $total[5] += $amounts[5];
                 $total[6] += $amounts[6];
                 $line = array(GetEventName($_POST['eventid']) => $productname, $this->dates[0] => $amounts[0], $this->dates[1] => $amounts[1], $this->dates[2] => $amounts[2], $this->dates[3] => $amounts[3], $this->dates[4] => $amounts[4], $this->dates[5] => $amounts[5], $this->dates[6] => $amounts[6]);
                 $this->addLine($this->GetY(), $line, 5);
             }
         } else {
             logError($sql . " - " . mysql_error());
         }
         $line = array(GetEventName($_POST['eventid']) => "Total", $this->dates[0] => " " . $total[0], $this->dates[1] => " " . $total[1], $this->dates[2] => " " . $total[2], $this->dates[3] => " " . $total[3], $this->dates[4] => " " . $total[4], $this->dates[5] => " " . $total[5], $this->dates[6] => " " . $total[6]);
         $this->addLine($this->GetY() + 2, $line, 5);
     } catch (Exception $e) {
         logError($e->getMessage());
     }
 }
开发者ID:prodigyworks,项目名称:schokolat,代码行数:61,代码来源:reporsoldunitsbysitelib.php


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