本文整理汇总了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);
示例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 (" . $ro->getTotalPx($fromMonth, $fromDay, $fromYear, $toMonth, $toDay, $toYear, "OPD") . ")</font>";
echo " vs ";
echo "<font color=red>IPD (" . $ro->getTotalPx($fromMonth, $fromDay, $fromYear, $toMonth, $toDay, $toYear, "IPD") . ")</font>";
echo "<hr>";
echo "<Br><Br>";