當前位置: 首頁>>代碼示例>>PHP>>正文


PHP database1::getTotalPx方法代碼示例

本文整理匯總了PHP中database1::getTotalPx方法的典型用法代碼示例。如果您正苦於以下問題:PHP database1::getTotalPx方法的具體用法?PHP database1::getTotalPx怎麽用?PHP database1::getTotalPx使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在database1的用法示例。


在下文中一共展示了database1::getTotalPx方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ImageCreate

<?php

include "../../myDatabase1.php";
$month = $_GET['month'];
$day = $_GET['day'];
$year = $_GET['year'];
$month1 = $_GET['month1'];
$day1 = $_GET['day1'];
$year1 = $_GET['year1'];
$ro = new database1();
$totalPx = $ro->getTotalPx($month, $day, $year, $month1, $day1, $year1, "OPD") + $ro->getTotalPx($month, $day, $year, $month1, $day1, $year1, "IPD");
$opd1 = $ro->getTotalPx($month, $day, $year, $month1, $day1, $year1, "OPD") / $totalPx;
$ipd1 = $ro->getTotalPx($month, $day, $year, $month1, $day1, $year1, "IPD") / $totalPx;
$opd2 = $opd1 * 360;
$ipd2 = $ipd1 * 360;
$myImage = ImageCreate(250, 200);
$white = ImageColorAllocate($myImage, 255, 255, 255);
$red = ImageColorAllocate($myImage, 255, 0, 0);
$green = ImageColorAllocate($myImage, 0, 255, 0);
$blue = ImageColorAllocate($myImage, 0, 0, 255);
$lt_red = ImageColorAllocate($myImage, 255, 150, 150);
$lt_green = ImageColorAllocate($myImage, 150, 255, 150);
$lt_blue = ImageColorAllocate($myImage, 150, 150, 255);
for ($i = 120; $i > 100; $i--) {
    ImageFilledArc($myImage, 100, $i, 200, 120, 0, $opd2, $lt_red, IMG_ARC_PIE);
    ImageFilledArc($myImage, 100, $i, 200, 120, $ipd2, 360, $lt_blue, IMG_ARC_PIE);
    //  ImageFilledArc ($myImage, 100, $i, 200, 150, 180, 360, $lt_blue, IMG_ARC_PIE);
}
ImageFilledArc($myImage, 100, 100, 200, 120, 0, $opd2, $red, IMG_ARC_PIE);
ImageFilledArc($myImage, 100, 100, 200, 120, $ipd2, 360, $blue, IMG_ARC_PIE);
//ImageFilledArc($myImage, 100, 100, 200, 150, 180, 360 , $blue, IMG_ARC_PIE);
開發者ID:rickyx12,項目名稱:protacio,代碼行數:31,代碼來源:censusPie.php

示例2:

<?php

include "../../myDatabase1.php";
$fromMonth = $_GET['fromMonth'];
$fromDay = $_GET['fromDay'];
$fromYear = $_GET['fromYear'];
$toMonth = $_GET['toMonth'];
$toDay = $_GET['toDay'];
$toYear = $_GET['toYear'];
$ro = new database1();
echo "<center><font size=6>" . $ro->getReportInformation("hmoSOA_name") . "</font></center>";
echo "<center><font size=4>Registration Census</font></center>";
echo "<center><font size=3>( {$fromMonth} {$fromDay}, {$fromYear} - {$toMonth} {$toDay}, {$toYear})</font></center>";
echo "<Br><Br>";
echo "<hr>";
echo "<centeR><img src='/COCONUT/graphicalReport/censusPie.php?month={$fromMonth}&day={$fromDay}&year={$fromYear}&month1={$toMonth}&day1={$toDay}&year1={$toYear}' >";
echo "<Br>";
echo "<font color=blue>OPD&nbsp;(" . $ro->getTotalPx($fromMonth, $fromDay, $fromYear, $toMonth, $toDay, $toYear, "OPD") . ")</font>";
echo "&nbsp;&nbsp;vs&nbsp;&nbsp;";
echo "<font color=red>IPD&nbsp;(" . $ro->getTotalPx($fromMonth, $fromDay, $fromYear, $toMonth, $toDay, $toYear, "IPD") . ")</font>";
echo "<hr>";
echo "<Br><Br>";
開發者ID:rickyx12,項目名稱:protacio,代碼行數:22,代碼來源:showCensusPie.php


注:本文中的database1::getTotalPx方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。