本文整理汇总了PHP中dateToString函数的典型用法代码示例。如果您正苦于以下问题:PHP dateToString函数的具体用法?PHP dateToString怎么用?PHP dateToString使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dateToString函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getUserlist
/**
* @return string
*/
private function getUserlist()
{
$strReturn = "";
$strTemplateWrapperID = $this->objTemplate->readTemplate("/element_userlist/" . $this->arrElementData["char1"], "userlist_wrapper");
$strTemplateRowID = $this->objTemplate->readTemplate("/element_userlist/" . $this->arrElementData["char1"], "userlist_row");
$arrUserFinal = $this->loadUserlist();
$strRows = "";
foreach ($arrUserFinal as $objOneUser) {
$objTargetUser = $objOneUser->getObjSourceUser();
if ($objTargetUser instanceof class_usersources_user_kajona) {
$arrRow = array();
$arrRow["userName"] = $objTargetUser->getStrName();
$arrRow["userForename"] = $objTargetUser->getStrForename();
$arrRow["userStreet"] = $objTargetUser->getStrStreet();
$arrRow["userEmail"] = $objTargetUser->getStrEmail();
$arrRow["userPostal"] = $objTargetUser->getStrPostal();
$arrRow["userCity"] = $objTargetUser->getStrCity();
$arrRow["userPhone"] = $objTargetUser->getStrTel();
$arrRow["userMobile"] = $objTargetUser->getStrMobile();
$arrRow["userBirthday"] = uniStrlen($objTargetUser->getLongDate()) > 5 ? dateToString(new class_date($objTargetUser->getLongDate()), false) : "";
$strRows .= $this->fillTemplate($arrRow, $strTemplateRowID);
}
}
$strLink = getLinkPortalHref($this->getPagename(), "", "exportToCsv");
$strReturn .= $this->fillTemplate(array("userlist_rows" => $strRows, "csvHref" => $strLink), $strTemplateWrapperID);
return $strReturn;
}
示例2: testDateToString
/**
* @return void
*/
public function testDateToString()
{
class_carrier::getInstance()->getObjLang()->setStrTextLanguage("de");
if (class_carrier::getInstance()->getObjLang()->getLang("dateStyleShort", "system") != "d.m.Y") {
return;
}
$this->assertEquals("15.05.2013", dateToString(new class_date(20130515122324), false));
$this->assertEquals("15.05.2013 12:23:24", dateToString(new class_date(20130515122324), true));
$this->assertEquals("15.05.2013", dateToString(new class_date("20130515122324"), false));
$this->assertEquals("15.05.2013 12:23:24", dateToString(new class_date("20130515122324"), true));
$this->assertEquals("15.05.2013", dateToString(20130515122324, false));
$this->assertEquals("15.05.2013 12:23:24", dateToString(20130515122324, true));
$this->assertEquals("15.05.2013", dateToString("20130515122324", false));
$this->assertEquals("15.05.2013 12:23:24", dateToString("20130515122324", true));
$this->assertEquals("", dateToString(null));
$this->assertEquals("", dateToString(""));
$this->assertEquals("", dateToString("asdfsfdsfdsfds"));
class_carrier::getInstance()->getObjLang()->setStrTextLanguage("en");
if (class_carrier::getInstance()->getObjLang()->getLang("dateStyleShort", "system") != "m/d/Y") {
return;
}
$this->assertEquals("05/15/2013", dateToString(new class_date(20130515122324), false));
$this->assertEquals("05/15/2013 12:23:24", dateToString(new class_date(20130515122324), true));
$this->assertEquals("05/15/2013", dateToString(new class_date("20130515122324"), false));
$this->assertEquals("05/15/2013 12:23:24", dateToString(new class_date("20130515122324"), true));
$this->assertEquals("05/15/2013", dateToString(20130515122324, false));
$this->assertEquals("05/15/2013 12:23:24", dateToString(20130515122324, true));
$this->assertEquals("05/15/2013", dateToString("20130515122324", false));
$this->assertEquals("05/15/2013 12:23:24", dateToString("20130515122324", true));
}
示例3: print_laporan
function print_laporan($param_arr)
{
include "../include/fpdf17/mc_table.php";
$_BORDER = 0;
$_FONT = 'Times';
$_FONTSIZE = 10;
$pdf = new PDF_MC_Table();
$size = $pdf->_getpagesize('Legal');
$pdf->DefPageSize = $size;
$pdf->CurPageSize = $size;
$pdf->AddPage('Landscape', 'Legal');
$pdf->SetFont('helvetica', '', $_FONTSIZE);
$pdf->SetRightMargin(5);
$pdf->SetLeftMargin(9);
$pdf->SetAutoPageBreak(false, 0);
$pdf->SetFont('helvetica', '', 12);
$pdf->SetWidths(array(200));
$pdf->ln(1);
$pdf->RowMultiBorderWithHeight(array("Laporan pencetakan bulanan penerimaan sptpd"), array('', ''), 6);
//$pdf->ln(8);
$pdf->SetWidths(array(40, 200));
$pdf->ln(4);
$pdf->RowMultiBorderWithHeight(array("DAFTAR SPTPD", ": "), array('', ''), 6);
$pdf->RowMultiBorderWithHeight(array("TAHUN", ": " . $param_arr['year_code']), array('', ''), 6);
$pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start']) . " s/d " . dateToString($param_arr['date_end'])), array('', ''), 6);
$dbConn = new clsDBConnSIKP();
$query = "select * from sikp.f_laporan_pencetakan_bulanan(1," . $param_arr['year_code'] . ",'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "')";
//print_r($query);
//exit;
$dbConn->query($query);
$items = array();
$pdf->SetFont('helvetica', '', 9);
$pdf->ln(2);
$pdf->SetWidths(array(10, 24, 20, 15, 40, 18, 22, 25, 20, 61, 61, 27));
$pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$pdf->SetWidths(array(10, 40, 35, 15, 40, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18));
$pdf->SetFont('arial', '', 7);
$pdf->RowMultiBorderWithHeight(array("NO", "NAMA", "ALAMAT", "NPWPD", "DESEMBER THN SEBELUMNYA", "JANUARI", "FEBRUARI", "MARET", "APRIL", "MEI", "JUNI", "JULI", "AGUSTUS", "SEPTEMBER", "OKTOBER", "NOVEMBER"), array('LTB', 'LTB', 'LBT', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 9);
$pdf->SetFont('arial', '', 8);
$no = 1;
$pdf->SetAligns(array('C', 'L', 'L', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
$jumlah = 0;
$jumlah = 0;
while ($dbConn->next_record()) {
$items[] = $item = array('nama' => $dbConn->f("nama"), 'alamat' => $dbConn->f("alamat"), 'npwpd' => $dbConn->f("npwpd"), 'last_desember' => $dbConn->f("last_desember"), 'januari' => $dbConn->f("januari"), 'februari' => $dbConn->f("februari"), 'maret' => $dbConn->f("maret"), 'april' => $dbConn->f("april"), 'mei' => $dbConn->f("mei"), 'juni' => $dbConn->f("juni"), 'juli' => $dbConn->f("juli"), 'agustus' => $dbConn->f("agustus"), 'september' => $dbConn->f("september"), 'oktober' => $dbConn->f("oktober"), 'november' => $dbConn->f("november"));
$pdf->RowMultiBorderWithHeight(array($no, $item['nama'], $item['alamat'], $item['npwpd'], $item['last_desember'], $item['januari'], $item['februari'], $item['maret'], $item['april'], $item['mei'], $item['juni'], $item['juli'], $item['agustus'], $item['september'], $item['oktober'], $item['november']), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6);
$jumlah += $dbConn->f("amount");
// $jumlah_wp+=$dbConn->f("jumlah_wp");
$no++;
}
//print_r($items);
//exit;
$pdf->SetWidths(array(250, 70));
$pdf->ln(8);
$pdf->RowMultiBorderWithHeight(array("", "KASIE VOP"), array('', '', '', '', '', '', ''), 6);
$pdf->Output("", "I");
exit;
}
示例4: getValueAsText
/**
* Returns a textual representation of the formentries' value.
* May contain html, but should be stripped down to text-only.
*
* @return string
*/
public function getValueAsText()
{
$objDate = null;
if ($this->getStrValue() instanceof class_date) {
$objDate = $this->getStrValue();
} else {
if ($this->getStrValue() != "") {
$objDate = new class_date($this->getStrValue());
}
}
if ($objDate != null) {
return dateToString($objDate, true);
}
return "";
}
示例5: getDefaults
function getDefaults()
{
$therecord = parent::getDefaults();
$therecord["crontab"] = "*::*::*::*::*";
$therecord["min"] = "*";
$therecord["hrs"] = "*";
$therecord["date"] = "*";
$therecord["mo"] = "*";
$therecord["day"] = "*";
$therecord["startdate"] = dateToString(mktime(), "SQL");
$therecord["starttime"] = sqlTimeFromString(timeToString(time()));
$therecord["enddate"] = "";
$therecord["endtime"] = "";
$therecord["scripttype"] = "job";
return $therecord;
}
示例6: renderAdditionalActions
protected function renderAdditionalActions(class_model $objListEntry)
{
if ($objListEntry->rightEdit() && $objListEntry instanceof class_module_eventmanager_event) {
return array($this->objToolkit->listButton(getLinkAdmin($this->getArrModule("modul"), "listParticipant", "&systemid=" . $objListEntry->getSystemid(), "", $this->getLang("action_list_participant"), "icon_group")));
}
if ($objListEntry instanceof class_module_eventmanager_participant) {
if ($objListEntry->rightEdit()) {
$objValidator = new class_email_validator();
$objEvent = new class_module_eventmanager_event($objListEntry->getPrevId());
if ($objValidator->validate($objListEntry->getStrEmail())) {
$strPreset = "&mail_recipient=" . $objListEntry->getStrEmail();
$strPreset .= "&mail_subject=" . $this->getLang("participant_mail_subject");
$strPreset .= "&mail_body=" . $this->getLang("participant_mail_intro") . "\n" . $this->getLang("event_title") . " " . $objEvent->getStrTitle() . "\n" . $this->getLang("event_location") . " " . $objEvent->getStrLocation() . "\n" . $this->getLang("event_start") . " " . dateToString($objEvent->getObjStartDate());
return array($this->objToolkit->listButton(getLinkAdminDialog("system", "mailForm", $strPreset, "", $this->getLang("participant_mail"), "icon_mail")));
}
}
}
return parent::renderAdditionalActions($objListEntry);
}
示例7: getArrContent
/**
* Returns the contents of the info-block
*
* @return mixed
*/
public function getArrContent()
{
$objLang = class_carrier::getInstance()->getObjLang();
$arrReturn = array();
$arrReturn[] = array($objLang->getLang("version", "system"), phpversion());
$arrReturn[] = array($objLang->getLang("geladeneerweiterungen", "system"), implode(", ", get_loaded_extensions()));
$arrReturn[] = array($objLang->getLang("executiontimeout", "system"), class_carrier::getInstance()->getObjConfig()->getPhpIni("max_execution_time") . "s");
$arrReturn[] = array($objLang->getLang("inputtimeout", "system"), class_carrier::getInstance()->getObjConfig()->getPhpIni("max_input_time") . "s");
$arrReturn[] = array($objLang->getLang("memorylimit", "system"), bytesToString(ini_get("memory_limit"), true));
$arrReturn[] = array($objLang->getLang("errorlevel", "system"), class_carrier::getInstance()->getObjConfig()->getPhpIni("error_reporting"));
$arrReturn[] = array($objLang->getLang("systeminfo_php_safemode", "system"), ini_get("safe_mode") ? $objLang->getLang("commons_yes", "system") : $objLang->getLang("commons_no", "system"));
$arrReturn[] = array($objLang->getLang("systeminfo_php_urlfopen", "system"), ini_get("allow_url_fopen") ? $objLang->getLang("commons_yes", "system") : $objLang->getLang("commons_no", "system"));
$arrReturn[] = array($objLang->getLang("systeminfo_php_regglobal", "system"), ini_get("register_globals") ? $objLang->getLang("commons_yes", "system") : $objLang->getLang("commons_no", "system"));
$arrReturn[] = array($objLang->getLang("postmaxsize", "system"), bytesToString(ini_get("post_max_size"), true));
$arrReturn[] = array($objLang->getLang("uploadmaxsize", "system"), bytesToString(ini_get("upload_max_filesize"), true));
$arrReturn[] = array($objLang->getLang("uploads", "system"), class_carrier::getInstance()->getObjConfig()->getPhpIni("file_uploads") == 1 ? $objLang->getLang("commons_yes", "system") : $objLang->getLang("commons_no", "system"));
$arrReturn[] = array($objLang->getLang("timezone", "system"), date_default_timezone_get());
$arrReturn[] = array($objLang->getLang("datekajona", "system"), dateToString(new class_date()));
return $arrReturn;
}
示例8: getDefaults
function getDefaults()
{
$therecord["id"] = NULL;
$therecord["type"] = "Daily";
$therecord["until"] = dateToString(mktime(), "SQL");
$therecord["every"] = 1;
$therecord["times"] = 1;
$therecord["eachlist"] = NULL;
$therecord["ontheweek"] = NULL;
$therecord["ontheday"] = NULL;
$therecord["includepaymenttype"] = 0;
$therecord["statusid"] = $this->getDefaultStatus();
$therecord["assignedtoid"] = "";
$therecord["name"] = "";
$therecord["firstrepeat"] = NULL;
$therecord["lastrepeat"] = NULL;
$therecord["timesrepeated"] = 0;
$therecord["notificationroleid"] = "";
return $therecord;
}
示例9: getRecordsToPost
function getRecordsToPost($startdate = null, $enddate = null)
{
// This function creates an array of
// record ids within the date range given
$idarray = array();
$querystatement = "\n\t\t\t\tSELECT\n\t\t\t\t\t`" . $this->maintable . "`.id\n\t\t\t\tFROM\n\t\t\t\t\t`" . $this->maintable . "`\n\t\t\t\tWHERE\n\t\t\t\t\t`" . $this->maintable . "`.readytopost = 1";
if ($startdate) {
$querystatement .= "\n\t\t\t\t\tAND `" . $this->maintable . "`.`" . $this->datefieldname . "` >= '" . dateToString($startdate, "SQL") . "'\n\t\t\t\t\tAND `" . $this->maintable . "`.`" . $this->datefieldname . "` <= '" . dateToString($enddate, "SQL") . "'";
}
//endif
if ($this->notpostedCriteria) {
$querystatement .= "\n\t\t\t\t\tAND " . $this->notpostedCriteria;
}
//endif
$queryresult = $this->db->query($querystatement);
while ($therecord = $this->db->fetchArray($queryresult)) {
$idarray[] = $therecord["id"];
}
//return array of ids within that date range
return $idarray;
}
示例10: formDateSingle
/**
* Returns a simple date-form element. By default used to enter a date without a time.
*
* @param string $strName
* @param string $strTitle
* @param class_date $objDateToShow
* @param string $strClass = inputDate
* @param boolean $bitWithTime
*
* @throws class_exception
* @return string
* @since 3.2.0.9
*/
public function formDateSingle($strName, $strTitle, $objDateToShow, $strClass = "", $bitWithTime = false)
{
//check passed param
if ($objDateToShow != null && !$objDateToShow instanceof class_date) {
throw new class_exception("param passed to class_toolkit_admin::formDateSingle is not an instance of class_date", class_exception::$level_ERROR);
}
if ($bitWithTime) {
$strTemplateID = $this->objTemplate->readTemplate("/elements.tpl", "input_datetime_simple");
} else {
$strTemplateID = $this->objTemplate->readTemplate("/elements.tpl", "input_date_simple");
}
$arrTemplate = array();
$arrTemplate["class"] = $strClass;
$arrTemplate["titleDay"] = $strName . "_day";
$arrTemplate["titleMonth"] = $strName . "_month";
$arrTemplate["titleYear"] = $strName . "_year";
$arrTemplate["titleHour"] = $strName . "_hour";
$arrTemplate["titleMin"] = $strName . "_minute";
$arrTemplate["title"] = $strTitle;
$arrTemplate["valueDay"] = $objDateToShow != null ? $objDateToShow->getIntDay() : "";
$arrTemplate["valueMonth"] = $objDateToShow != null ? $objDateToShow->getIntMonth() : "";
$arrTemplate["valueYear"] = $objDateToShow != null ? $objDateToShow->getIntYear() : "";
$arrTemplate["valueHour"] = $objDateToShow != null ? $objDateToShow->getIntHour() : "";
$arrTemplate["valueMin"] = $objDateToShow != null ? $objDateToShow->getIntMin() : "";
$arrTemplate["valuePlain"] = dateToString($objDateToShow, false);
// if($bitWithTime)
$arrTemplate["dateFormat"] = class_carrier::getInstance()->getObjLang()->getLang("dateStyleShort", "system");
// else
// $arrTemplate["dateFormat"] = class_carrier::getInstance()->getObjLang()->getLang("dateStyleLong", "system");
$arrTemplate["calendarLang"] = class_carrier::getInstance()->getObjSession()->getAdminLanguage();
$arrTemplate["titleTime"] = class_carrier::getInstance()->getObjLang()->getLang("titleTime", "system");
//set up the container div
$arrTemplate["calendarId"] = $strName;
$strContainerId = $strName . "_calendarContainer";
$arrTemplate["calendarContainerId"] = $strContainerId;
$arrTemplate["calendarLang_weekday"] = " [" . class_carrier::getInstance()->getObjLang()->getLang("toolsetCalendarWeekday", "system") . "]\n";
$arrTemplate["calendarLang_month"] = " [" . class_carrier::getInstance()->getObjLang()->getLang("toolsetCalendarMonth", "system") . "]\n";
return $this->objTemplate->fillTemplate($arrTemplate, $strTemplateID);
}
示例11: getWidgetOutput
/**
* This method is called, when the widget should generate it's content.
* Return the complete content using the methods provided by the base class.
* Do NOT use the toolkit right here!
*
* @return string
*/
public function getWidgetOutput()
{
$strReturn = "";
if ($this->getFieldValue("location") == "") {
return "Please set up a location";
}
if (uniStrpos($this->getFieldValue("location"), "GM") !== false) {
return "This widget changed, please update your location by editing the widget";
}
//request the xml...
try {
$strFormat = "metric";
if ($this->getFieldValue("unit") == "f") {
$strFormat = "imperial";
}
$objRemoteloader = new class_remoteloader();
$objRemoteloader->setStrHost("api.openweathermap.org");
$objRemoteloader->setStrQueryParams("/data/2.5/forecast/daily?APPID=4bdceecc2927e65c5fb712d1222c5293&q=" . $this->getFieldValue("location") . "&units=" . $strFormat . "&cnt=4");
$strContent = $objRemoteloader->getRemoteContent();
} catch (class_exception $objExeption) {
$strContent = "";
}
if ($strContent != "" && json_decode($strContent, true) !== null) {
$arrResponse = json_decode($strContent, true);
$strReturn .= $this->widgetText($this->getLang("weather_location_string") . $arrResponse["city"]["name"] . ", " . $arrResponse["city"]["country"]);
foreach ($arrResponse["list"] as $arrOneForecast) {
$objDate = new class_date($arrOneForecast["dt"]);
$strReturn .= "<div>";
$strReturn .= $this->widgetText("<div style='float: left;'>" . dateToString($objDate, false) . ": " . round($arrOneForecast["temp"]["day"], 1) . "°</div>");
$strReturn .= $this->widgetText("<img src='http://openweathermap.org/img/w/" . $arrOneForecast["weather"][0]["icon"] . ".png' style='float: right;' />");
$strReturn .= "</div><div style='clear: both;'></div>";
}
} else {
$strReturn .= $this->getLang("weather_errorloading");
}
return $strReturn;
}
示例12: prepareFieldForSQL
/**
* function prepareFieldForSQL
*
* Given a value, and field type, prepare the
* value for SQL insertion (replacing nul with the SQL string NULL,
* and typeing variables)
*
* @param string/int $value to be prepared.
* @param string $type mysql field type
* @param string $flags A list of flags seperated by spaces (" ").
*/
function prepareFieldForSQL($value, $type, $flags)
{
switch ($type) {
case "blob":
case "string":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = "''";
}
} else {
$value = "'" . $value . "'";
}
break;
case "real":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = 0;
}
} else {
$value = (double) $value;
}
break;
case "int":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = 0;
}
} else {
$value = (int) $value;
}
break;
case "date":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = "'" . dateToString(mktime(), "SQL") . "'";
}
} else {
$value = "'" . sqlDateFromString($value, $this->dateFormat) . "'";
}
break;
case "time":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = "'" . timeToString(mktime(), "SQL") . "'";
}
} else {
$value = "'" . sqlTimeFromString($value, $this->timeFormat) . "'";
}
break;
case "year":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = @strftime("%Y");
}
}
break;
case "datetime":
case "timestamp":
if ($value === "" or $value === NULL) {
if (strpos($flags, "not_null") === false) {
$value = NULL;
} else {
$value = "'" . dateToString(mktime(), "SQL") . " " . timeToString(mktime(), "24 Hour") . "'";
}
} else {
$datetimearray = explode(" ", $value);
$date = null;
$time = null;
//If the value can be split by spaces we assume we
// are looking at a "date time"
if (count($datetimearray) > 1) {
$date = sqlDateFromString($datetimearray[0], $this->dateFormat);
//times can have spaces... so we need
//to resemble in some cases.
if (count($datetimearray) > 2) {
$datetimearray[1] = $datetimearray[1] . " " . $datetimearray[2];
}
//.........这里部分代码省略.........
示例13: print_excel
function print_excel($param_arr)
{
startExcel("teller_report_" . date('Y-m-d'));
echo "<div><h3> LAPORAN PENERIMAAN BPHTB </h3></div>";
echo '<table>
<tr>
<td><b>TANGGAL</b></td>
<td><b>: ' . dateToString(date('Y-m-d'), true) . '</b></td>
</tr>
<tr>
<td><b>NAMA USER</b></td>
<td><b>: ' . $param_arr['uid'] . '</b></td>
</tr>
</table>
';
echo '<table border="1">';
echo '<tr>
<th>NO</th>
<th>NO TRANSAKSI</th>
<th>NOP</th>
<th>TGL</th>
<th>NAMA</th>
<th>ALAMAT</th>
<th>KELURAHAN</th>
<th>KECAMATAN</th>
<th>LUAS TANAH</th>
<th>LUAS BGN</th>
<th>NJOP (Rp)</th>
<th>TOTAL BAYAR (Rp)</th>
</tr>';
$dbConn = new clsDBConnSIKP();
$whereClause = " WHERE ";
$whereClause .= " to_char(a.payment_date, 'YYYY-mm-dd') = '" . date("Y-m-d") . "'";
$whereClause .= " AND a.p_cg_terminal_id = '" . $param_arr['uid'] . "'";
$query = "SELECT a.receipt_no, b.njop_pbb, to_char(a.payment_date, 'YYYY-MM-DD') AS payment_date,\r\n\t\t\t\t\tb.wp_name, b.wp_address_name, kelurahan.region_name AS kelurahan_name, kecamatan.region_name AS kecamatan_name, b.land_area, b.building_area, b.land_total_price, a.payment_amount \r\n\t\t\t\t\tFROM t_payment_receipt_bphtb AS a\r\n\t\t\tLEFT JOIN t_bphtb_registration AS b ON a.t_bphtb_registration_id = b.t_bphtb_registration_id\r\n\t\t\tLEFT JOIN p_region AS kelurahan ON b.wp_p_region_id_kel = kelurahan.p_region_id\r\n\t\t\tLEFT JOIN p_region AS kecamatan ON b.wp_p_region_id_kec = kecamatan.p_region_id";
$query .= $whereClause;
$query .= " ORDER BY a.receipt_no ASC";
$dbConn->query($query);
$total_nilai_penerimaan = 0;
$no = 1;
while ($dbConn->next_record()) {
$item = array('receipt_no' => $dbConn->f("receipt_no"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'payment_date' => $dbConn->f("payment_date"), 'wp_name' => $dbConn->f("wp_name"), 'wp_address_name' => $dbConn->f("wp_address_name"), 'kelurahan_name' => $dbConn->f("kelurahan_name"), 'kecamatan_name' => $dbConn->f("kecamatan_name"), 'land_area' => $dbConn->f("land_area"), 'building_area' => $dbConn->f("building_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'payment_amount' => $dbConn->f("payment_amount"));
echo '<tr>';
echo '<td align="center">' . $no . '</td>';
echo '<td align="left"> ' . $item['receipt_no'] . '</td>';
echo '<td align="left"> ' . $item['njop_pbb'] . '</td>';
echo '<td align="center">' . dateToString($item['payment_date']) . '</td>';
echo '<td align="left">' . trim(strtoupper($item['wp_name'])) . '</td>';
echo '<td align="left">' . $item['wp_address_name'] . '</td>';
echo '<td align="left">' . $item['kelurahan_name'] . '</td>';
echo '<td align="left">' . $item['kecamatan_name'] . '</td>';
echo '<td align="right">' . number_format($item['land_area'], 0, ",", ".") . '</td>';
echo '<td align="right">' . number_format($item['building_area'], 0, ",", ".") . '</td>';
echo '<td align="right">' . number_format($item['land_total_price'], 2, ",", ".") . '</td>';
echo '<td align="right">' . number_format($item['payment_amount'], 2, ",", ".") . '</td>';
echo '</tr>';
$total_nilai_penerimaan += $item['payment_amount'];
$no++;
}
echo '<tr>
<td align="center" colspan="11"> <b>TOTAL</b> </td>
<td align="right"><b>' . number_format($total_nilai_penerimaan, 2, ",", ".") . ' </b></td>
</tr>';
echo '</table>';
exit;
}
示例14: GetCetakExcel
function GetCetakExcel($p_rqst_type_id, $year_code, $year_period_id, $date_start, $date_end, $jenis_tahun, $rqst_type_code)
{
startExcel("LAPORAN_PENERIMAAN_PAJAK.xls");
$output = '';
$output .= '<table>
<tr>';
$output = '<table id="table-piutang" class="grid-table-container" border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>
<td valign="top">
<table class="grid-table" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="th" colspan=6 align="center"><strong>LAPORAN PENERIMAAN GLOBAL PER TANGGAL PENERIMAAN</strong></td>
</tr>
<tr>
<td class="th"><strong></strong></td>
<td class="th"><strong>JENIS PAJAK</strong></td>
<td class="th"><strong>: ' . $rqst_type_code . '</strong></td>
</tr>
<tr>
<td class="th"><strong></strong></td>
<td class="th"><strong>TANGGAL</strong></td>
<td class="th"><strong>: ' . dateToString($date_start) . ' s/d ' . dateToString($date_end) . '</strong></td>
</tr>
<tr>
</tr>
</table>
<table id="table-piutang-detil" class="Grid" border="1" cellspacing="0" cellpadding="3px">
<tr class="Caption">';
$output .= '<th>NO</th>';
$output .= '<th>BULAN</th>';
$output .= '<th>BESARNYA</th>';
$output .= '<th>JUMLAH WP</th>';
$output .= '<th>JUMLAH SSPD</th>';
$output .= '<th>KETERANGAN</th>';
$output .= '</tr>';
$no = 1;
$jumlah = 0;
$jumlah_wp = 0;
$dbConn = new clsDBConnSIKP();
if ($jenis_tahun == 'pajak') {
$query = "select * from sikp.f_laporan_per_thn_pajak(" . $p_rqst_type_id . "," . $year_period_id . ",'" . $date_start . "', '" . $date_end . "')";
} else {
if ($jenis_tahun == 'bayar') {
$query = "select * from sikp.f_laporan_per_thn_bayar(" . $p_rqst_type_id . ",2013,'" . $date_start . "', '" . $date_end . "')";
}
}
$dbConn->query($query);
while ($dbConn->next_record()) {
$items[] = array('bulan_wp' => $dbConn->f("bulan_wp"), 'total_amount' => $dbConn->f("total_amount"), 'jumlah_wp' => $dbConn->f("jumlah_wp"));
$output .= '<tr>';
$output .= '<td style="font-weight:bold;" align="left">' . $no . '</td>';
$output .= '<td style="font-weight:bold;" align="left">' . strtoupper($dbConn->f("bulan_wp")) . '</td>';
$output .= '<td style="font-weight:bold;" align="right">' . number_format($dbConn->f("total_amount"), 0, ',', '.') . '</td>';
$output .= '<td style="font-weight:bold;" align="right">' . number_format($dbConn->f("jumlah_wp"), 0, ',', '.') . '</td>';
$output .= '<td style="font-weight:bold;" align="right"></td>';
$output .= '<td style="font-weight:bold;" align="right"></td>';
$output .= '</tr>';
$jumlah += $dbConn->f("total_amount");
$jumlah_wp += $dbConn->f("jumlah_wp");
$no++;
}
$output .= '<tr>';
$output .= '<td style="font-weight:bold;" align="left"></td>';
$output .= '<td style="font-weight:bold;" align="left">JUMLAH</td>';
$output .= '<td style="font-weight:bold;" align="right">' . number_format($jumlah, 0, ',', '.') . '</td>';
$output .= '<td style="font-weight:bold;" align="right">' . number_format($jumlah_wp, 0, ',', '.') . '</td>';
$output .= '<td style="font-weight:bold;" align="right"></td>';
$output .= '<td style="font-weight:bold;" align="right"></td>';
$output .= '</tr>';
$output .= '</table></table>';
$output .= '<table>';
$output .= '<tr></tr>';
$output .= '<tr></tr>';
$output .= '<tr>';
$output .= '<td colspan=4 style="font-weight:bold;" align="right"></td>';
$output .= '<td colspan=2 style="font-weight:bold;" align="center">KEPALA SEKSI VERIFIKASI OTORISASI DAN</td>';
$output .= '</tr>';
$output .= '<tr>';
$output .= '<td colspan=4 style="font-weight:bold;" align="right"></td>';
$output .= '<td colspan=2 style="font-weight:bold;" align="center">PEMBUKUAN</td>';
$output .= '</tr>';
$output .= '<tr></tr>';
$output .= '<tr></tr>';
$output .= '<tr></tr>';
$output .= '<tr>';
$output .= '<td colspan=4 style="font-weight:bold;" align="right"></td>';
$output .= '<td colspan=2 style="font-weight:bold;" align="center">(Drs. H. Deden Saepulloh, MM.)</td>';
$output .= '</tr>';
$output .= '<tr>';
$output .= '<td colspan=4 style="font-weight:bold;" align="right"></td>';
$output .= '<td colspan=2 style="font-weight:bold;" align="center">(NIP 19681210 199010 001)</td>';
$output .= '</tr>';
$output .= '</table>';
echo $output;
exit;
}
示例15: UK
<option value="English, UK" <?php
if ($therecord["date_format"] == "English, UK") {
echo "selected=\"selected\"";
}
?>
>English, UK (<?php
echo dateToString(mktime(), "English, UK");
?>
)</option>
<option value="Dutch, NL" <?php
if ($therecord["date_format"] == "Dutch, NL") {
echo "selected=\"selected\"";
}
?>
>Dutch, NL (<?php
echo dateToString(mktime(), "Dutch, NL");
?>
)</option>
</select>
</p>
<p>
<label for="time_format">time format</label><br />
<select id="time_format" name="time_format">
<option value="24 Hour" <?php
if ($therecord["time_format"] == "24 Hour") {
echo "selected=\"selected\"";
}
?>
>24 Hour (<?php
echo timeToString(mktime(), "24 Hour");
?>