/**
  * @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;
 }
 /**
  * @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));
 }
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;
}
 /**
  * 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 "";
 }
Example #5
0
 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;
 }
 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);
 }
 /**
  * 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;
 }
Example #8
0
 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;
 }
Example #9
0
 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;
 }
 /**
  * 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);
 }
 /**
  * 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;
 }
Example #12
0
 /**
  *  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];
                     }
                     $time = sqlTimeFromString($datetimearray[1], $this->timeFormat);
                 }
                 //endif
                 //If we don't have a date, perhaps only a date was passed
                 if (!$date) {
                     $date = sqlDateFromString($value, $this->dateFormat);
                     //still no date?, then assume only a time was passed,
                     // so we need to set the time to the deafult
                     // date.
                     if (!$date) {
                         $date = "0000-00-00";
                     }
                 }
                 //endif
                 //if we don't have a time, let's try the getting the
                 //time from the full value.
                 if (!$time) {
                     $time = sqlTimeFromString($value, $this->timeFormat);
                 }
                 $value = "'" . trim($date . " " . $time) . "'";
             }
             //end if
             break;
         case "password":
             $value = "ENCODE('" . $value . "','" . ENCRYPTION_SEED . "')";
             break;
     }
     //end switch
     if ($value === NULL) {
         $value = "NULL";
     }
     return $value;
 }
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">&nbsp;' . $item['receipt_no'] . '</td>';
        echo '<td align="left">&nbsp;' . $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;
}
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;
}
Example #15
0
                            <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");
?>
 /**
  * In nearly all cases, the additional info is rendered left to the action-icons.
  *
  * @return string
  */
 public function getStrAdditionalInfo()
 {
     return dateToString($this->getObjDate());
 }
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 PENERIMAAN BPHTB "), array('', ''), 6);
    //$pdf->ln(8);
    $pdf->SetWidths(array(40, 200));
    $pdf->ln(4);
    $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start'], true) . " s/d " . dateToString($param_arr['date_end'], true)), array('', ''), 6);
    $dbConn = new clsDBConnSIKP();
    $whereClause = '';
    $criteria = array();
    if (!empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
        $criteria[] = " (trunc(a.payment_date) BETWEEN '" . $param_arr['date_start'] . "' AND '" . $param_arr['date_end'] . "') ";
    } else {
        if (!empty($param_arr['date_start']) && empty($param_arr['date_end'])) {
            $criteria[] = " trunc(a.payment_date) >= '" . $param_arr['date_start'] . "' ";
        } else {
            if (empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
                $criteria[] = " trunc(a.payment_date) <= '" . $param_arr['date_end'] . "' ";
            }
        }
    }
    if (!empty($param_arr['receipt_no'])) {
        $criteria[] = " a.receipt_no ILIKE '%" . $param_arr['receipt_no'] . "%' ";
    }
    if (!empty($param_arr['njop_pbb'])) {
        $criteria[] = " b.njop_pbb = '" . $param_arr['njop_pbb'] . "' ";
    }
    if (!empty($param_arr['wp_name'])) {
        $criteria[] = " b.wp_name ILIKE '%" . $param_arr['wp_name'] . "%' ";
    }
    if (!empty($param_arr['p_region_id_kecamatan'])) {
        $criteria[] = " b.wp_p_region_id_kec = " . $param_arr['p_region_id_kecamatan'];
    }
    if (!empty($param_arr['p_region_id_kelurahan'])) {
        $criteria[] = " b.wp_p_region_id_kel = " . $param_arr['p_region_id_kelurahan'];
    }
    if ($param_arr['p_bphtb_legal_doc_type_id'] != 0) {
        $criteria[] = " b.p_bphtb_legal_doc_type_id = " . $param_arr['p_bphtb_legal_doc_type_id'];
    }
    $whereClause = join(" AND ", $criteria);
    $query = "SELECT a.receipt_no, b.njop_pbb, to_char(a.payment_date, 'YYYY-MM-DD') AS payment_date, to_char(b.creation_date, 'YYYY-MM-DD') AS creation_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";
    if (!empty($whereClause)) {
        $query .= " WHERE " . $whereClause;
    }
    $query .= " order by trunc(b.creation_date) ASC, upper(b.wp_name) ASC";
    //print_r($query);
    //exit;
    $dbConn->query($query);
    $items = array();
    $pdf->SetFont('helvetica', '', 9);
    $pdf->ln(2);
    /* HEADER */
    $pdf->SetAligns(array('C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C', 'C'));
    $pdf->SetWidths(array(10, 28, 35, 19, 19, 41, 51, 28, 28, 15, 15, 25, 28));
    $pdf->SetFont('arial', 'B', 7);
    $pdf->RowMultiBorderWithHeight(array("NO", "NO TRANSAKSI", "NOP", "TGL BAYAR", "TGL DAFTAR", "NAMA", "ALAMAT", "KELURAHAN", "KECAMATAN", "LUAS TNH", "LUAS BGN", "NJOP (Rp)", "TOTAL BAYAR (Rp)"), array('LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'LTB', 'TLBR'), 5);
    /* END HEADER */
    /* CONTENTS */
    $pdf->SetFont('arial', '', 8);
    $no = 1;
    $pdf->SetAligns(array('C', 'L', 'L', 'C', 'C', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R'));
    $total_nilai_penerimaan = 0;
    while ($dbConn->next_record()) {
        $items[] = $item = array('receipt_no' => $dbConn->f("receipt_no"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'payment_date' => $dbConn->f("payment_date"), 'creation_date' => $dbConn->f("creation_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"));
        $pdf->RowMultiBorderWithHeight(array($no, $item['receipt_no'], $item['njop_pbb'], dateToString($item['payment_date']), dateToString($item['creation_date']), trim(strtoupper($item['wp_name'])), $item['wp_address_name'], $item['kelurahan_name'], $item['kecamatan_name'], number_format($item['land_area'], 0), number_format($item['building_area'], 0), number_format($item['land_total_price'], 0, ",", "."), number_format($item['payment_amount'], 0, ",", ".")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6);
        $total_nilai_penerimaan += $item['payment_amount'];
        $no++;
    }
    /* END CONTENTS */
    /* BOTTOM */
    $pdf->SetWidths(array(314, 28));
    $pdf->SetAligns(array('C', 'R'));
    $pdf->SetFont('arial', 'B', 8);
    $pdf->RowMultiBorderWithHeight(array("TOTAL", number_format($total_nilai_penerimaan, 0, ",", ".")), array('LB', 'LBR'), 6);
    /* END BOTTOM */
    $pdf->ln(12);
    $pdf->SetAligns(array("C", "C"));
    $pdf->SetWidths(array(169, 163));
    if ($param_arr['date_start'] == '') {
        $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n DIN KAMADIANTINI S.IP, MM \n  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4);
        $pdf->RowMultiBorderWithHeight(array("NIP : 19710320.199803.2.006", "NIP : 19731031.2009.1.1001"), array("", ""), 1);
    } else {
        if (date(strtotime($param_arr['date_start'])) < date(strtotime('01-06-2015'))) {
            $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n RACHMAT SATIADI, S.IP, M.Si \n  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4);
            $pdf->RowMultiBorderWithHeight(array("NIP : 19691104.199803.1.007", "NIP : 19731031.2009.1.1001"), array("", ""), 1);
        } else {
            $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n DIN KAMADIANTINI S.IP, MM \n  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Admin Penerimaan BPHTB" . "\n\n\n\n\n\n\n\n INDRA WISNU, SE. \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4);
            $pdf->RowMultiBorderWithHeight(array("NIP : 19710320.199803.2.006", "NIP : 19731031.2009.1.1001"), array("", ""), 1);
        }
    }
    $pdf->Output("", "I");
    exit;
}
Example #18
0
                                     <div class="col-sm-1"></div>
                                </div><!--  end row1-->
                                
                                 <div class="row"><!--  start row1-->
                                   <div class="col-sm-2"></div>
                                     <div class="col-sm-7"></div>
                                     <div class="col-sm-3">Lastupdate
                                      <span class="label label-warning">
                   <i class="icon-calendar"></i>
				   <?php 
    if ($update_date != "") {
        echo dateToString($update_date) . " , " . $update_time;
        ?>
             <?php 
    } else {
        echo dateToString($create_date) . " , " . $create_time;
    }
    ?>
                    </span>
                                     </div>
                                </div><!--  end row1-->
                                
                                    
                            </div>
                            
                    	</div>
                      <?php 
} else {
    ?>
                    <div class="page-content">
					
function print_excel($param_arr)
{
    startExcel("lapora_global_per_wp");
    echo "<div><h3> Penerimaan Global Per WP</h3></div>";
    echo "<div><b>Jenis Pajak : " . $param_arr['rqst_type_code'] . "</b></div>";
    echo "<div><b>Tanggal : " . dateToString($param_arr['date_start']) . " s.d " . dateToString($param_arr['date_end']) . "</b></div><br/>";
    $dbConn = new clsDBConnSIKP();
    $query = "select a.*, f_get_wilayah(b.npwd) as kode_wilayah , to_char(b.active_date,'dd-mm-yyyy') as active_date,\r\n\t\t\tb.brand_address_name ||' '|| nvl(b.brand_address_no,'') as alamat_new\r\n\t\t\tfrom sikp.f_laporan_global_wp2(" . $param_arr['p_rqst_type_id'] . ",'" . $param_arr['date_start'] . "', '" . $param_arr['date_end'] . "') a\r\n\t\t\tleft join t_cust_account b on a.npwpd = b.npwd\r\n\t\t\twhere f_get_wilayah_id(b.npwd) = " . $param_arr['kode_wilayah'] . " \r\n\t\t\torder by jenis_pajak,TRIM(company_brand)";
    $dbConn->query($query);
    $no = 1;
    $jumlah = 0;
    echo '<table border="1">';
    echo '<tr>
			<th>NO</th>
			<th>NAMA WP</th>
			<th>ALAMAT</th>
			<th>NPWPD</th>
			<th>BESARNYA (Rp)</th>
			<th>JML SSPD</th>
			<th>NAMA AYAT</th>
			<th>PENGUKUHAN</th>
			<th>KETERANGAN</th>
		</tr>';
    while ($dbConn->next_record()) {
        $items[] = array('nama_wp' => $dbConn->f("nama_wp"), 'alamat_new' => $dbConn->f("alamat_new"), 'npwpd' => $dbConn->f("npwpd"), 'amount' => $dbConn->f("amount"), 'tot_sspd' => $dbConn->f("tot_sspd"), 'kode_wilayah' => $dbConn->f("kode_wilayah"), 'active_date' => $dbConn->f("active_date"), 'jenis_pajak' => $dbConn->f("jenis_pajak"));
        echo '<tr>';
        echo '<td align="center">' . $no . '</td>';
        echo '<td>' . $dbConn->f("nama_wp") . '</td>';
        echo '<td>' . $dbConn->f("alamat_new") . '</td>';
        echo '<td>' . $dbConn->f("npwpd") . '</td>';
        echo '<td align="right">' . number_format($dbConn->f("amount"), 2, ",", ".") . '</td>';
        echo '<td align="right">' . $dbConn->f("tot_sspd") . '</td>';
        echo '<td>' . $dbConn->f('jenis_pajak') . '</td>';
        echo '<td>' . $dbConn->f('active_date') . '</td>';
        echo '<td>' . $dbConn->f('kode_wilayah') . '</td>';
        echo '</tr>';
        $jumlah += $dbConn->f("amount");
        $jumlah_wp += $dbConn->f("tot_sspd");
        $no++;
    }
    echo '<tr>
		<td colspan="4" align="center"> <b> JUMLAH </b> </td>
		<td align="right"><b>' . number_format($jumlah, 2, ",", ".") . '</b></td>
		<td align="right"><b>' . $jumlah_wp . '</b></td>
	</tr>';
    echo '</table>';
    exit;
}
Example #20
0
    function showOptions()
    {
        include "include/fields.php";
        global $phpbms;
        $db =& $this->db;
        $phpbms->cssIncludes[] = "pages/aritems_clientstatement.css";
        $phpbms->jsIncludes[] = "modules/bms/javascript/aritem_clientstatement.js";
        $phpbms->showMenu = false;
        $formSubmit = htmlentities($_SERVER['REQUEST_URI']);
        $theform = new phpbmsForm();
        $theinput = new inputDatePicker("statementdate", dateToString(mktime(0, 0, 0), "SQL"), "statement date", true);
        $theform->addField($theinput);
        $theinput = new inputCheckbox("showpayments", true, "show new payments");
        $theform->addField($theinput);
        $theinput = new inputCheckbox("showclosed", false, "show closed items (history)");
        $theform->addField($theinput);
        $theform->jsMerge();
        include "header.php";
        ?>

		<div class="bodyline" id="dialog">
			<h1><span>AR Summary Report</span></h1>
			<form action="<?php 
        echo $formSubmit;
        ?>
" id="record" method="post">
			<input type="hidden" id="command" name="command" />

				<fieldset>
					<legend>options</legend>

					<p><?php 
        $theform->showField("statementdate");
        ?>
</p>

					<p><?php 
        $theform->showField("showclosed");
        ?>
</p>

					<p><?php 
        $theform->showField("showpayments");
        ?>
</p>

				</fieldset>

<!--		THIS NO WORKY		-->
				<!--<fieldset>
					<legend>payments</legend>

					<p>
						<input type="radio" name="payments" id="paymentsNew" value="new" class="radiochecks" checked="checked"/>
						<label for="paymentsNew">show new payments</label>
					</p>

					<p>
						<input type="radio" name="payments" id="paymentsAll" value="all" class="radiochecks"/>
						<label for="paymentsAll">show all payments</label>
					</p>

					<p>
						<input type="radio" name="payments" id="paymentsNone" value="none" class="radiochecks"/>
						<label for="paymentsNone">show no payments</label>
					</p>

				</fieldset>-->

				<fieldset>
					<legend>Records</legend>

					<p>
						<input type="radio" name="selrecords" id="allOpen" value="allOpen" class="radiochecks" checked="checked"/>
						<label for="allOpen">all clients with open items</label>
					</p>

					<p>
						<input type="radio" name="selrecords" id="allClients" value="allClients" class="radiochecks"/>
						<label for="allClients">all clients with any credit history</label>
					</p>

					<p>
						<input type="radio" name="selrecords" id="fromPrint" value="fromPrint" class="radiochecks"/>
						<label for="fromPrint">clients based on records from print screen</label>
					</p>

				</fieldset>

				<p align="right">
					<button type="button" class="Buttons" id="printButton">print</button>
					<button type="button" class="Buttons" id="cancelButton">cancel</button>
				</p>
			</form>
		</div>

		<?php 
        include "footer.php";
    }
function GetCetakHTML($data, $pajak_periode, $jenis_pajak, $tgl_jatuh_tempo, $status)
{
    $output = '';
    $output .= '<table id="table-piutang" class="grid-table-container" border="0" cellspacing="0" cellpadding="0" width="100%">
          		<tr>
            		<td valign="top">';
    $output .= '<table class="grid-table" border="0" cellspacing="0" cellpadding="0">
                	<tr>
                  		<td class="HeaderLeft"><img border="0" alt="" src="../Styles/sikp/Images/Spacer.gif"></td> 
                  		<td class="th"><strong>LAPORAN STATUS SURAT TEGURAN</strong></td> 
                  		<td class="HeaderRight"><img border="0" alt="" src="../Styles/sikp/Images/Spacer.gif"></td>
                	</tr>
              		</table>';
    $output .= '<h2>JENIS PAJAK : ' . $jenis_pajak . ' </h2>';
    $output .= '<h2>PERIODE PAJAK : ' . $pajak_periode . '</h2>';
    $output .= '<h2>JATUH TEMPO : ' . strtoupper(dateToString($tgl_jatuh_tempo)) . '</h2> <br/>';
    $output .= '<table id="table-piutang-detil" class="Grid" border="1" cellspacing="0" cellpadding="3px">
                <tr >';
    $output .= '<th align="center" rowspan="2">NO</th>';
    $output .= '<th align="center" rowspan="2" width="200">WAJIB PAJAK</th>';
    $output .= '<th align="center" rowspan="2" width="90">NPWPD</th>';
    $output .= '<th align="center" rowspan="2">SPTPD</th>';
    $output .= '<th align="center" rowspan="2">STPD</th>';
    $output .= '<th align="center" colspan="2">TEGURAN I <br/> ' . $data[0]['f_teg1_sts'] . '</th>';
    $output .= '<th align="center" colspan="2">TEGURAN II <br/> ' . $data[0]['f_teg2_sts'] . '</th>';
    $output .= '<th align="center" colspan="2">TEGURAN III <br/> ' . $data[0]['f_teg3_sts'] . '</th>';
    $output .= '<th align="center" rowspan="2">AKSI <br/>' . $data[0]['f_action_date'] . '</th>';
    if ($status == '2') {
        $output .= '<th align="center" rowspan="2" width="150">PEMBAYARAN SETELAH <br/>' . $data[0]['f_action_date'] . '</th>';
    }
    $output .= '</tr>';
    $output .= '<tr >';
    $output .= '<th align="center">SPTPD</th>';
    $output .= '<th align="center">STPD</th>';
    $output .= '<th align="center">SPTPD</th>';
    $output .= '<th align="center">STPD</th>';
    $output .= '<th align="center">SPTPD</th>';
    $output .= '<th align="center">STPD</th>';
    $output .= '</tr>';
    for ($i = 0; $i < count($data); $i++) {
        $output .= '<tr>';
        $output .= '<td align="center">' . ($i + 1) . '</td>';
        $output .= '<td align="left">' . $data[$i]['nama'] . '</td>';
        $output .= '<td align="center">' . $data[$i]['npwpd'] . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_amount'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_penalty'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg1_amount'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg1_penalty'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg2_amount'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg2_penalty'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg3_amount'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($data[$i]['f_teg3_penalty'], 0, ",", ".") . '</td>';
        if ($status == '') {
            $kolom_aksi = is_numeric($data[$i]['f_action_sts']) ? number_format($data[$i]['f_action_sts'], 0, ",", ".") : $data[$i]['f_action_sts'];
            $output .= '<td align="right">' . $kolom_aksi . '</td>';
        } else {
            if ($status == '1') {
                $output .= '<td align="right">' . $data[$i]['f_action_sts'] . '</td>';
            } else {
                if ($status == '2') {
                    if ($data[$i]['bayar_setelah'] == 't') {
                        $output .= '<td align="right"> </td>';
                        $output .= '<td align="right">' . number_format($data[$i]['f_action_sts'], 0, ",", ".") . '</td>';
                    } else {
                        $output .= '<td align="right"></td>';
                        $output .= '<td align="right"></td>';
                    }
                }
            }
        }
        $output .= '</tr>';
    }
    $output .= '</td></tr></table>';
    $output .= '</table>';
    return $output;
}
Example #22
0
 function prepareVariables($variables, $userid = NULL)
 {
     if ($userid == NULL) {
         if (isset($_SESSION["userinfo"]["id"])) {
             $userid = $_SESSION["userinfo"]["id"];
         }
     }
     if ($variables["id"]) {
         //i.e. only on update
         unset($this->fields["type"]);
         if ($variables["typeCheck"] == "TS" && isset($variables["repeating"]) && $variables["lastrepeat"]) {
             $variables["lastrepeat"] = NULL;
             $variables["firstrepeat"] = NULL;
             $variables["timesrepeated"] = NULL;
             if (isset($variables["completed"])) {
                 $variables["completedChange"] = 0;
             }
             $this->resetRepeating($variables["id"]);
         }
         //end if
     }
     //end if
     if (isset($variables["thetype"])) {
         $variables["type"] = $variables["thetype"];
     }
     if (!isset($variables["completed"])) {
         $variables["completeddate"] = NULL;
     }
     if ($variables["enddate"] == "") {
         $variables["enddate"] = NULL;
         $variables["endtime"] = NULL;
     }
     if ($variables["startdate"] == "") {
         $variables["startdate"] = NULL;
         $variables["starttime"] = NULL;
     }
     if (isset($variables["repeating"])) {
         $thename = "Every ";
         switch ($variables["repeattype"]) {
             case "Daily":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " days";
                 } else {
                     $thename .= " day ";
                 }
                 $variables["repeatechlist"] = NULL;
                 $variables["repeatontheday"] = NULL;
                 $variables["repeatontheweek"] = NULL;
                 break;
             case "Weekly":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " weeks on";
                 } else {
                     $thename .= "week on";
                 }
                 foreach (explode("::", $variables["eachlist"]) as $dayNum) {
                     $tempday = $dayNum != 7 ? $dayNum + 1 : 1;
                     $thename .= " " . nl_langinfo(constant("ABDAY_" . $tempday)) . ", ";
                 }
                 $thename = substr($thename, 0, strlen($thename) - 2);
                 if (strpos($thename, ",") != false) {
                     $thename = strrev(preg_replace("/,/", "dna ", strrev($thename), 1));
                 }
                 $variables["repeateachlist"] = $variables["eachlist"];
                 $variables["repeatontheday"] = NULL;
                 $variables["repeatontheweek"] = NULL;
                 break;
             case "Monthly":
                 if ($variables["repeatevery"] != 1) {
                     $thename .= $variables["repeatevery"] . " months";
                 } else {
                     $thename .= "month";
                 }
                 $thename .= " on the";
                 if ($variables["monthlyWhat"] == 1) {
                     foreach (explode("::", $variables["eachlist"]) as $dayNum) {
                         $thename .= " " . ordinal($dayNum) . ", ";
                     }
                     $thename = substr($thename, 0, strlen($thename) - 2);
                     if (strpos($thename, ",") != false) {
                         $thename = strrev(preg_replace("/,/", "dna ", strrev($thename), 1));
                     }
                     $variables["repeateachlist"] = $variables["eachlist"];
                     $variables["repeatontheday"] = NULL;
                     $variables["repeatontheweek"] = NULL;
                 } else {
                     foreach ($this->weekArray as $key => $value) {
                         if ($value == $variables["monthlyontheweek"]) {
                             $thename .= " " . strtolower($key);
                         }
                     }
                     foreach ($this->dayOfWeekArray as $key => $value) {
                         if ($value == $variables["monthlyontheday"]) {
                             $thename .= " " . $key;
                         }
                     }
                     $variables["repeateachlist"] = NULL;
                     $variables["repeatontheday"] = $variables["monthlyontheday"];
                     $variables["repeatontheweek"] = $variables["monthlyontheweek"];
                 }
                 break;
             case "Yearly":
                 if ($variables["repeatevery"] > 1) {
                     $thename .= $variables["repeatevery"] . " years";
                 } else {
                     $thename .= "year";
                 }
                 $thename .= " in";
                 foreach (explode("::", $variables["eachlist"]) as $monthNum) {
                     $thename .= " " . nl_langinfo(constant("MON_" . $monthNum)) . ", ";
                 }
                 $thename = substr($thename, 0, strlen($thename) - 2);
                 if (strpos($thename, ",") != false) {
                     $thename = strrev(preg_replace("/,/", "dna ", strrev($thename), 1));
                 }
                 $variables["repeateachlist"] = $variables["eachlist"];
                 if (isset($variables["yearlyOnThe"])) {
                     $thename .= " on the";
                     foreach ($this->weekArray as $key => $value) {
                         if ($value == $variables["yearlyontheweek"]) {
                             $thename .= " " . strtolower($key);
                         }
                     }
                     foreach ($this->dayOfWeekArray as $key => $value) {
                         if ($value == $variables["yearlyontheday"]) {
                             $thename .= " " . $key;
                         }
                     }
                     $variables["repeatontheday"] = $variables["yearlyontheday"];
                     $variables["repeatontheweek"] = $variables["yearlyontheweek"];
                 } else {
                     $variables["repeatontheday"] = NULL;
                     $variables["repeatontheweek"] = NULL;
                 }
                 //end if
                 break;
         }
         switch ($variables["repeatend"]) {
             case "never":
                 $variables["repeatuntil"] = NULL;
                 $variables["repeattimes"] = NULL;
                 break;
             case "after":
                 $thename .= " for " . $variables["repeattimes"];
                 $variables["repeatuntil"] = NULL;
                 break;
             case "on date":
                 $thename .= " until " . $variables["repeatuntil"];
                 $variables["repeattimes"] = NULL;
                 break;
         }
         $thename = trim($thename) . ".";
         $variables["repeatname"] = $thename;
         $variables["firstrepeat"] = dateToString(stringToDate($variables["firstrepeat"], "SQL"));
         $variables["lastrepeat"] = dateToString(stringToDate($variables["lastrepeat"], "SQL"));
         $variables["timesrepeated"] = NULL;
     } else {
         $variables["repeat"] = 0;
         $variables["repeatechlist"] = NULL;
         $variables["repeatontheday"] = NULL;
         $variables["repeatontheweek"] = NULL;
         $variables["repeatname"] = NULL;
         $variables["repeatuntil"] = NULL;
         $variables["repeattimes"] = NULL;
         $variables["firstrepeat"] = NULL;
         $variables["lastrepeat"] = NULL;
         $variables["timesrepeated"] = NULL;
     }
     //endif repeat
     if ($variables["assignedtoid"] != $variables["assignedtochange"]) {
         if ($variables["assignedtoid"] != "") {
             $variables["assignedbyid"] = getUuid($this->db, "tbld:afe6d297-b484-4f0b-57d4-1c39412e9dfb", $userid);
         } else {
             $variables["assignedbyid"] = '';
         }
     }
     //endif
     return $variables;
 }
 /**
  * @see interface_admin_systemtask::executeTask()
  * @throws class_exception
  * @return string
  */
 public function executeTask()
 {
     if (!class_module_system_module::getModuleByName("pages")->rightEdit()) {
         return $this->getLang("commons_error_permissions");
     }
     //load the page itself
     $objPage = class_module_pages_page::getPageByName($this->getParam("pageExport"));
     if ($objPage !== null) {
         $objSystem = class_module_system_module::getModuleByName("system");
         $objXmlWriter = new XMLWriter();
         $strExportFolder = $this->getParam("exportFolder");
         $strExportPrefix = $this->getParam("exportPrefix");
         if ($strExportFolder == "") {
             $strExportFolder = _realpath_ . _projectpath_ . "/temp";
         } else {
             $strExportFolder = _realpath_ . "/" . $strExportFolder;
         }
         if ($strExportPrefix != "") {
             $strExportPrefix = "_" . $strExportPrefix;
         }
         if (is_dir($strExportFolder)) {
             if (!$objXmlWriter->openUri($strExportFolder . "/" . $strExportPrefix . $objPage->getSystemid() . ".xml")) {
                 throw new class_exception("failed to open export file ", class_exception::$level_ERROR);
             }
             //$objXmlWriter->openMemory();
             $objXmlWriter->setIndent(true);
             $objXmlWriter->startDocument("1.0", "UTF-8");
             $objXmlWriter->startComment();
             $strComment = "\n   Kajona XML export\n";
             $strComment .= "   (c) Kajona, www.kajona.de\n";
             $strComment .= "   Kernel version:  " . $objSystem->getStrVersion() . "\n";
             $strComment .= "   Schema version:  1.0\n";
             $strComment .= "   Export Date:     " . dateToString(new class_date()) . "\n";
             $objXmlWriter->text($strComment);
             $objXmlWriter->endComment();
             $objXmlWriter->startElement("pages");
             $objXmlWriter->startElement("page");
             $objXmlWriter->startElement("metadata");
             $objXmlWriter->startElement("kernelVersion");
             $objXmlWriter->text($objSystem->getStrVersion());
             $objXmlWriter->endElement();
             $objXmlWriter->startElement("systemid");
             $objXmlWriter->text($objPage->getSystemid());
             $objXmlWriter->endElement();
             $objXmlWriter->startElement("previd");
             $objXmlWriter->text($objPage->getPrevId());
             $objXmlWriter->endElement();
             $objXmlWriter->startElement("pagename");
             $objXmlWriter->text($objPage->getStrName());
             $objXmlWriter->endElement();
             //try to load the parent page-name
             $strParentName = "";
             if (validateSystemid($objPage->getPrevId())) {
                 $objParentPage = new class_module_pages_page($objPage->getPrevId());
                 $strParentName = $objParentPage->getStrName();
             }
             $objXmlWriter->startElement("prevname");
             $objXmlWriter->text($strParentName);
             $objXmlWriter->endElement();
             $objXmlWriter->startElement("pageproperties");
             $this->createPageMetadata($objPage->getSystemid(), $objXmlWriter);
             $objXmlWriter->endElement();
             //metadata
             $objXmlWriter->endElement();
             $objXmlWriter->startElement("elements");
             $this->createElementData($objPage->getSystemid(), $objXmlWriter);
             $objXmlWriter->endElement();
             //page
             $objXmlWriter->endElement();
             //pages
             $objXmlWriter->endElement();
             $objXmlWriter->flush();
             //return $objXmlWriter->outputMemory(true);
             return $this->getLang("systemtask_pageexport_success") . $strExportFolder . "/" . $strExportPrefix . $objPage->getSystemid() . ".xml" . "";
         } else {
             throw new class_exception("writing XML: Folder " . $strExportFolder . " does not exist! ", class_exception::$level_ERROR);
         }
     }
     return $this->getLang("systemtask_pageexport_error");
 }
Example #24
0
$temparray = array("never" => "never", "after" => "after", "on date" => "on date");
$thevalue = "never";
if ($therecord["id"]) {
    if ($therecord["repeattimes"]) {
        $thevalue = "after";
    } elseif ($therecord["repeatuntil"]) {
        $thevalue = "on date";
    }
}
$theinput = new inputBasiclist("repeatend", $thevalue, $temparray, "end");
$theinput->setAttribute("onchange", "changeRepeatEnd();");
$theform->addField($theinput);
$theinput = new inputField("repeattimes", $therecord["repeattimes"], "repeat until number of times", false, "integer", 3, 5, false);
$theform->addField($theinput);
if (!$therecord["repeatuntil"]) {
    $therecord["repeatuntil"] = dateToString(mktime(), "SQL");
}
$theinput = new inputDatePicker("repeatuntil", $therecord["repeatuntil"], "repeat until date", false, 10, 15, false);
$theform->addField($theinput);
//end repeat fields
$thetable->getCustomFieldInfo();
$theform->prepCustomFields($db, $thetable->customFieldsQueryResult, $therecord);
$theform->jsMerge();
//==============================================================
//End Form Elements
include "header.php";
?>
<div class="bodyline">
	<?php 
$theform->startForm($pageTitle);
?>
 /**
  * returns a list of the last logins
  *
  * @return string
  * @autoTestable
  * @permissions right1
  */
 protected function actionLoginLog()
 {
     $strReturn = "";
     //fetch log-rows
     $objLogbook = new class_module_user_log();
     $objIterator = new class_array_section_iterator($objLogbook->getLoginLogsCount());
     $objIterator->setPageNumber((int) ($this->getParam("pv") != "" ? $this->getParam("pv") : 1));
     $objIterator->setArraySection(class_module_user_log::getLoginLogs($objIterator->calculateStartPos(), $objIterator->calculateEndPos()));
     $arrRows = array();
     foreach ($objIterator as $arrLogRow) {
         $arrSingleRow = array();
         $arrSingleRow[] = $arrLogRow["user_log_sessid"];
         $arrSingleRow[] = $arrLogRow["user_username"] != "" ? $arrLogRow["user_username"] : $arrLogRow["user_log_userid"];
         $arrSingleRow[] = dateToString(new class_date($arrLogRow["user_log_date"]));
         $arrSingleRow[] = $arrLogRow["user_log_enddate"] != "" ? dateToString(new class_date($arrLogRow["user_log_enddate"])) : "";
         $arrSingleRow[] = $arrLogRow["user_log_status"] == 0 ? $this->getLang("login_status_0") : $this->getLang("login_status_1");
         $arrSingleRow[] = $arrLogRow["user_log_ip"];
         $strUtraceLinkMap = "href=\"http://www.utrace.de/ip-adresse/" . $arrLogRow["user_log_ip"] . "\" target=\"_blank\"";
         $strUtraceLinkText = "href=\"http://www.utrace.de/whois/" . $arrLogRow["user_log_ip"] . "\" target=\"_blank\"";
         if ($arrLogRow["user_log_ip"] != "127.0.0.1" && $arrLogRow["user_log_ip"] != "::1") {
             $arrSingleRow[] = $this->objToolkit->listButton(class_link::getLinkAdminManual($strUtraceLinkMap, "", $this->getLang("login_utrace_showmap"), "icon_earth")) . " " . $this->objToolkit->listButton(class_link::getLinkAdminManual($strUtraceLinkText, "", $this->getLang("login_utrace_showtext"), "icon_text"));
         } else {
             $arrSingleRow[] = $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_earthDisabled", $this->getLang("login_utrace_noinfo"))) . " " . $this->objToolkit->listButton(class_adminskin_helper::getAdminImage("icon_textDisabled", $this->getLang("login_utrace_noinfo")));
         }
         $arrRows[] = $arrSingleRow;
     }
     //Building the surrounding table
     $arrHeader = array();
     $arrHeader[] = $this->getLang("login_sessid");
     $arrHeader[] = $this->getLang("login_user");
     $arrHeader[] = $this->getLang("login_logindate");
     $arrHeader[] = $this->getLang("login_logoutdate");
     $arrHeader[] = $this->getLang("login_status");
     $arrHeader[] = $this->getLang("login_ip");
     $arrHeader[] = $this->getLang("login_utrace");
     //and fetch the table
     $strReturn .= $this->objToolkit->dataTable($arrHeader, $arrRows);
     $strReturn .= $this->objToolkit->getPageview($objIterator, "user", "loginlog");
     return $strReturn;
 }
 /**
  * Shows technical details of a workflow-instance
  *
  * @return string
  * @permissions edit
  */
 protected function actionShowDetails()
 {
     $strReturn = "";
     $objWorkflow = new class_module_workflows_workflow($this->getSystemid());
     $strReturn .= $this->objToolkit->formHeadline($this->getLang("workflow_general"));
     $arrRows = array();
     $arrRows[] = array($this->getLang("workflow_class"), $objWorkflow->getStrClass());
     $arrRows[] = array($this->getLang("workflow_systemid"), $objWorkflow->getStrAffectedSystemid());
     $arrRows[] = array($this->getLang("workflow_trigger"), dateToString($objWorkflow->getObjTriggerdate()));
     $arrRows[] = array($this->getLang("workflow_runs"), $objWorkflow->getIntRuns());
     $arrRows[] = array($this->getLang("workflow_status"), $this->getLang("workflow_status_" . $objWorkflow->getIntState()));
     $strResponsible = "";
     foreach (explode(",", $objWorkflow->getStrResponsible()) as $strOneId) {
         if (validateSystemid($strOneId)) {
             if ($strResponsible != "") {
                 $strResponsible .= ", ";
             }
             $objUser = new class_module_user_user($strOneId, false);
             if ($objUser->getStrUsername() != "") {
                 $strResponsible .= $objUser->getStrUsername();
             } else {
                 $objGroup = new class_module_user_group($strOneId);
                 $strResponsible .= $objGroup->getStrName();
             }
         }
     }
     $arrRows[] = array($this->getLang("workflow_responsible"), $strResponsible);
     $strCreator = "";
     if (validateSystemid($objWorkflow->getStrOwner())) {
         $objUser = new class_module_user_user($objWorkflow->getStrOwner(), false);
         $strCreator .= $objUser->getStrUsername();
     }
     $arrRows[] = array($this->getLang("workflow_owner"), $strCreator);
     $strReturn .= $this->objToolkit->dataTable(null, $arrRows);
     $strReturn .= $this->objToolkit->formHeadline($this->getLang("workflow_params"));
     $arrRows = array();
     $arrRows[] = array($this->getLang("workflow_int1"), $objWorkflow->getIntInt1());
     $arrRows[] = array($this->getLang("workflow_int2"), $objWorkflow->getIntInt2());
     $arrRows[] = array($this->getLang("workflow_char1"), $objWorkflow->getStrChar1());
     $arrRows[] = array($this->getLang("workflow_char2"), $objWorkflow->getStrChar2());
     $arrRows[] = array($this->getLang("workflow_date1"), $objWorkflow->getLongDate1());
     $arrRows[] = array($this->getLang("workflow_date2"), $objWorkflow->getLongDate2());
     $arrRows[] = array($this->getLang("workflow_text"), $objWorkflow->getStrText());
     $arrRows[] = array($this->getLang("workflow_text2"), $objWorkflow->getStrText2());
     $arrRows[] = array($this->getLang("workflow_text3"), $objWorkflow->getStrText3());
     $strReturn .= $this->objToolkit->dataTable(null, $arrRows);
     $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($this->getArrModule("modul"), "list"));
     $strReturn .= $this->objToolkit->formInputSubmit($this->getLang("commons_back"));
     $strReturn .= $this->objToolkit->formClose();
     return $strReturn;
 }
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);
    $textFilter = '';
    if (!empty($param_arr['filter_lap'])) {
        if ($param_arr['filter_lap'] == 1) {
            //sudah bayar
            $textFilter = '(Sudah Bayar)';
        }
        if ($param_arr['filter_lap'] == 2) {
            //belum bayar
            $textFilter = '(Belum Bayar)';
        }
        if ($param_arr['filter_lap'] == 3) {
            //belum bayar
            $textFilter = '(Nihil)';
        }
    }
    $pdf->SetFont('helvetica', '', 12);
    $pdf->SetWidths(array(200));
    $pdf->ln(1);
    $pdf->RowMultiBorderWithHeight(array("DAFTAR NOTA VERIFIKASI BPHTB " . $textFilter), array('', ''), 6);
    //$pdf->ln(8);
    $pdf->SetWidths(array(40, 200));
    $pdf->ln(4);
    $pdf->RowMultiBorderWithHeight(array("TANGGAL", ": " . dateToString($param_arr['date_start'], "-") . " s/d " . dateToString($param_arr['date_end'], "-")), array('', ''), 6);
    $dbConn = new clsDBConnSIKP();
    $whereClause = '';
    if (!empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
        $whereClause .= " AND (trunc(reg_bphtb.creation_date) BETWEEN '" . $param_arr['date_start'] . "'";
        $whereClause .= " AND '" . $param_arr['date_end'] . "')";
    } else {
        if (!empty($param_arr['date_start']) && empty($param_arr['date_end'])) {
            $whereClause .= " AND trunc(reg_bphtb.creation_date) >= '" . $param_arr['date_start'] . "'";
        } else {
            if (empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
                $whereClause .= " AND trunc(reg_bphtb.creation_date) <= '" . $param_arr['date_end'] . "'";
            }
        }
    }
    if (!empty($param_arr['filter_lap'])) {
        if ($param_arr['filter_lap'] == 1) {
            //sudah bayar
            $whereClause .= " AND (payment.receipt_no is not null or payment.receipt_no <> '') ";
            $whereClause .= " AND ( bphtb_amt_final > 0 ) ";
        }
        if ($param_arr['filter_lap'] == 2) {
            //belum bayar
            $whereClause .= " AND ( payment.receipt_no is null or payment.receipt_no = '') ";
            $whereClause .= " AND ( bphtb_amt_final > 0 ) ";
        }
        if ($param_arr['filter_lap'] == 3) {
            //nihil
            $whereClause .= " AND ( bphtb_amt_final < 1 ) ";
        }
    }
    $query = "SELECT\r\n\t\t\t\tto_char(reg_bphtb.creation_date, 'YYYY-MM-DD') as creation_date,\r\n\t\t\t\tregistration_no,\r\n\t\t\t\twp_name,\r\n\t\t\t\treg_bphtb.p_bphtb_legal_doc_type_id,\r\n\t\t\t\tbphtb_doc.description,\r\n\t\t\t\tnjop_pbb,\r\n\t\t\t\tland_area,\r\n\t\t\t\tland_total_price,\r\n\t\t\t\tbuilding_area,\r\n\t\t\t\tbuilding_total_price,\r\n\t\t\t\tmarket_price,\r\n\t\t\t\tbphtb_amt_final,\r\n\t\t\t\tland_price_per_m,\r\n\t\t\t\tbuilding_price_per_m\r\n\t\t\tFROM\r\n\t\t\t\tsikp.t_bphtb_registration reg_bphtb\r\n\t\t\tLEFT JOIN p_bphtb_legal_doc_type bphtb_doc on bphtb_doc.p_bphtb_legal_doc_type_id = reg_bphtb.p_bphtb_legal_doc_type_id\r\n\t\t\tLEFT JOIN t_customer_order cust_order ON cust_order.t_customer_order_id = reg_bphtb.t_customer_order_id \r\n\t\t\tLEFT JOIN t_payment_receipt_bphtb payment ON reg_bphtb.t_bphtb_registration_id = payment.t_bphtb_registration_id \r\n\t\t\tWHERE cust_order.p_order_status_id <> 1";
    $query .= $whereClause;
    $query .= " order by trunc(reg_bphtb.creation_date) ASC,upper(wp_name) ASC";
    $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', 'C'));
    $pdf->SetWidths(array(10, 24, 23, 37, 30, 35, 18, 28, 24, 28, 25, 40, 18, 18, 18, 18, 18));
    $pdf->SetFont('arial', '', 7);
    $pdf->RowMultiBorderWithHeight(array("NO", "TANGGAL", "NO.REGISTRASI", "NAMA WP", "JENIS TRANSAKSI", "NOP", "LT / LB", "HARGA TANAH / m2 (Rp)", "HARGA BANGUNAN / m2 (Rp)", "TOTAL NJOP (Rp)", "HARGA PASAR / TRANSAKSI / LELANG (Rp)", "NILAI PAJAK YANG HARUS DIBAYAR(Rp)"), array('LTB', 'LTB', 'LBT', 'LTB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLB', 'TLBR'), 5);
    $pdf->SetFont('arial', '', 8);
    $no = 1;
    $pdf->SetAligns(array('C', 'L', 'L', 'L', 'L', 'L', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R', 'R'));
    $jumlah = 0;
    $jumlah = 0;
    $total_nilai_pajak = 0;
    $nilai_njop = 0;
    while ($dbConn->next_record()) {
        $items[] = $item = array('creation_date' => $dbConn->f("creation_date"), 'registration_no' => $dbConn->f("registration_no"), 'wp_name' => $dbConn->f("wp_name"), 'p_bphtb_legal_doc_type_id' => $dbConn->f("p_bphtb_legal_doc_type_id"), 'description' => $dbConn->f("description"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'land_area' => $dbConn->f("land_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'building_area' => $dbConn->f("building_area"), 'building_total_price' => $dbConn->f("building_total_price"), 'market_price' => $dbConn->f("market_price"), 'bphtb_amt_final' => $dbConn->f("bphtb_amt_final"), 'land_price_per_m' => $dbConn->f("land_price_per_m"), 'building_price_per_m' => $dbConn->f("building_price_per_m"));
        $nilai_njop = $dbConn->f("building_total_price") + $dbConn->f("land_total_price");
        $pdf->RowMultiBorderWithHeight(array($no, dateToString($item['creation_date']), $item['registration_no'], $item['wp_name'], $item['description'], $item['njop_pbb'], number_format($item['land_area'], 0, ",", ".") . " / " . number_format($item['building_area'], 0, ",", "."), number_format($item['land_price_per_m'], 2, ",", "."), number_format($item['building_price_per_m'], 2, ",", "."), number_format($nilai_njop, 2, ",", "."), number_format($item['market_price'], 2, ",", "."), number_format($item['bphtb_amt_final'], 2, ",", ".")), array('LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LB', 'LBR'), 6);
        $jumlah += $dbConn->f("amount");
        //	$jumlah_wp+=$dbConn->f("jumlah_wp");
        $total_nilai_pajak += $item['bphtb_amt_final'];
        $no++;
    }
    $pdf->SetWidths(array(282, 40));
    $pdf->SetAligns(array('C', 'R'));
    $pdf->SetFont('arial', 'B', 8);
    $pdf->RowMultiBorderWithHeight(array("TOTAL", number_format($total_nilai_pajak, 2, ",", ".")), array('LB', 'LBR'), 6);
    /*print_r($items);
    	exit;*/
    //$pdf->SetWidths(array(250,70));
    $pdf->ln(12);
    $pdf->SetAligns(array("C", "C"));
    $pdf->SetWidths(array(169, 163));
    $pdf->RowMultiBorderWithHeight(array("Mengetahui, \n Kepala Seksi Penyelesaian Piutang \n\n\n\n\n\n\n\n RACHMAT SATIADI, SIP, M.Si. \n  ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ", "\n Koordinator BPHTB" . "\n\n\n\n\n\n\n\n ZAENAL MANSUR \n ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ "), array("", ""), 4);
    $pdf->RowMultiBorderWithHeight(array("NIP : 19691104.1998.03.1.007", "NIP : 19630817.1989.01.1.006"), array("", ""), 1);
    //$pdf->RowMultiBorderWithHeight(array("","KASIE VOP"),array('','','','','','',''),6);
    $pdf->Output("", "I");
    exit;
}
function tampilkan_html($param_arr)
{
    $dbConn = new clsDBConnSIKP();
    $whereClause = '';
    if (!empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
        $whereClause .= " AND (trunc(reg_bphtb.creation_date) BETWEEN '" . $param_arr['date_start'] . "'";
        $whereClause .= " AND '" . $param_arr['date_end'] . "')";
    } else {
        if (!empty($param_arr['date_start']) && empty($param_arr['date_end'])) {
            $whereClause .= " AND trunc(reg_bphtb.creation_date) >= '" . $param_arr['date_start'] . "'";
        } else {
            if (empty($param_arr['date_start']) && !empty($param_arr['date_end'])) {
                $whereClause .= " AND trunc(reg_bphtb.creation_date) <= '" . $param_arr['date_end'] . "'";
            }
        }
    }
    if (!empty($param_arr['filter_lap'])) {
        if ($param_arr['filter_lap'] == 1) {
            //sudah bayar
            $whereClause .= " AND (payment.receipt_no is not null or payment.receipt_no <> '') ";
        }
        if ($param_arr['filter_lap'] == 2) {
            //belum bayar
            $whereClause .= " AND ( payment.receipt_no is null or payment.receipt_no = '') ";
        }
    }
    $query = "SELECT\r\n\t\t\t\treg_bphtb.t_bphtb_registration_id,\r\n\t\t\t\tto_char(reg_bphtb.creation_date, 'YYYY-MM-DD') as creation_date,\r\n\t\t\t\tregistration_no,\r\n\t\t\t\twp_name,\r\n\t\t\t\treg_bphtb.p_bphtb_legal_doc_type_id,\r\n\t\t\t\tbphtb_doc.description,\r\n\t\t\t\tnjop_pbb,\r\n\t\t\t\tland_area,\r\n\t\t\t\tland_total_price,\r\n\t\t\t\tbuilding_area,\r\n\t\t\t\tbuilding_total_price,\r\n\t\t\t\tmarket_price,\r\n\t\t\t\tbphtb_amt_final\r\n\t\t\tFROM\r\n\t\t\t\tsikp.t_bphtb_registration reg_bphtb\r\n\t\t\tLEFT JOIN p_bphtb_legal_doc_type bphtb_doc on bphtb_doc.p_bphtb_legal_doc_type_id = reg_bphtb.p_bphtb_legal_doc_type_id\r\n\t\t\tLEFT JOIN t_customer_order cust_order ON cust_order.t_customer_order_id = reg_bphtb.t_customer_order_id \r\n\t\t\tLEFT JOIN t_payment_receipt_bphtb payment ON reg_bphtb.t_bphtb_registration_id = payment.t_bphtb_registration_id \r\n\t\t\tWHERE cust_order.p_order_status_id <> 1 \r\n\t\t\tAND reg_bphtb.status_verifikasi = 'Y'";
    $query .= $whereClause;
    $query .= " order by trunc(reg_bphtb.creation_date) ASC,upper(wp_name) ASC";
    $dbConn->query($query);
    $items = array();
    while ($dbConn->next_record()) {
        $items[] = $item = array('t_bphtb_registration_id' => $dbConn->f("t_bphtb_registration_id"), 'creation_date' => $dbConn->f("creation_date"), 'registration_no' => $dbConn->f("registration_no"), 'wp_name' => $dbConn->f("wp_name"), 'p_bphtb_legal_doc_type_id' => $dbConn->f("p_bphtb_legal_doc_type_id"), 'description' => $dbConn->f("description"), 'njop_pbb' => $dbConn->f("njop_pbb"), 'land_area' => $dbConn->f("land_area"), 'land_total_price' => $dbConn->f("land_total_price"), 'building_area' => $dbConn->f("building_area"), 'building_total_price' => $dbConn->f("building_total_price"), 'market_price' => $dbConn->f("market_price"), 'bphtb_amt_final' => $dbConn->f("bphtb_amt_final"));
    }
    $output = '';
    $output .= '<table id="table-piutang" class="grid-table-container" border="0" cellspacing="0" cellpadding="0" width="100%">
          		<tr>
            		<td valign="top">';
    $output .= '<table class="grid-table" border="0" cellspacing="0" cellpadding="0">
                	<tr>
                  		<td class="HeaderLeft"><img border="0" alt="" src="../Styles/sikp/Images/Spacer.gif"></td> 
                  		<td class="th"><strong>DAFTAR NOTA VERIFIKASI BPHTB YANG SUDAH BAYAR</strong></td> 
                  		<td class="HeaderRight"><img border="0" alt="" src="../Styles/sikp/Images/Spacer.gif"></td>
                	</tr>
               </table>';
    //$output .= '<h2>LAPORAN REALISASI HARIAN PER JENIS PAJAK </h2>';
    //$output .= '<h2>TANGGAL : '.dateToString($date_start, "-")." s/d ".dateToString($date_end, "-").'</h2> <br/>';
    $output .= '<table class="report" cellspacing="0" cellpadding="3px" width="100%">
                <tr>';
    $output .= '<th>NO</th>';
    $output .= '<th>TANGGAL</th>';
    $output .= '<th>NO.REGISTRASI</th>';
    $output .= '<th>NAMA WP</th>';
    $output .= '<th>JENIS TRANSAKSI</th>';
    $output .= '<th>NOP</th>';
    $output .= '<th>LT / LB</th>';
    $output .= '<th>HARGA TANAH</br>(Rp)</th>';
    $output .= '<th>HARGA BANGUNAN</br>(Rp)</th>';
    $output .= '<th>TOTAL NJOP </br>(Rp)</th>';
    $output .= '<th>HARGA PASAR / </br>TRANSAKSI / LELANG (Rp)</th>';
    $output .= '<th>NILAI PAJAK </br>YANG HARUS DIBAYAR(Rp)</th>';
    $output .= '<th>CETAK</th>';
    $output .= '</tr>';
    $no = 1;
    foreach ($items as $item) {
        $output .= '<tr>';
        $output .= '<td align="center">' . $no . '</td>';
        $output .= '<td align="left">' . dateToString($item['creation_date']) . '</td>';
        $output .= '<td align="left">' . $item['registration_no'] . '</td>';
        $output .= '<td align="left">' . $item['wp_name'] . '</td>';
        $output .= '<td align="left">' . $item['description'] . '</td>';
        $output .= '<td align="left">' . $item['njop_pbb'] . '</td>';
        $output .= '<td align="right">' . number_format($item['land_area'], 0, ",", ".") . " / " . number_format($item['building_area'], 0, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($item['land_total_price'], 2, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($item['building_total_price'], 2, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($nilai_njop, 2, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($item['market_price'], 2, ",", ".") . '</td>';
        $output .= '<td align="right">' . number_format($item['bphtb_amt_final'], 2, ",", ".") . '</td>';
        $output .= '<td><button class="btn_tambah" onclick="cetak_surat_validasi_bphtb(' . $item['registration_no'] . ')">Cetak</button></td>';
        $output .= '</tr>';
        $no = $no + 1;
    }
    $output .= '</td></tr></table>';
    $output .= '</table>';
    return $output;
}
Example #29
0
    function displayWeek($userid, $dayInWeek = null)
    {
        // Creates a week view calendar for the widget
        if (!$dayInWeek) {
            $dayInWeek = mktime(0, 0, 0);
        }
        $firstDay = $dayInWeek;
        $dayArray = localtime($firstDay, true);
        while ($dayArray["tm_wday"] != 0) {
            $firstDay = strtotime("yesterday", $firstDay);
            $dayArray = localtime($firstDay, true);
        }
        //endwhile
        //build the initial array
        $events = array();
        $lastDay = strtotime("6 days", $firstDay);
        $tempDay = $firstDay;
        for ($i = 0; $i < 7; $i++) {
            $events["d" . $tempDay] = array();
            $tempDay = strtotime("tomorrow", $tempDay);
        }
        //endfor
        //first lets get the regular events in the timeframe;
        $querystatement = "\n            SELECT\n                notes.id,\n                notes.startdate,\n                notes.starttime,\n                notes.enddate,\n                notes.endtime,\n                notes.subject\n            FROM\n                notes\n            WHERE\n                (\n                    notes.private = 0\n                    OR notes.createdby=" . $userid . "\n                )\n                AND notes.type='EV'\n                AND notes.repeating = 0\n                AND notes.startdate >= '" . dateToString($firstDay, "SQL") . "'\n                AND notes.startdate <= '" . dateToString($lastDay, "SQL") . "'";
        $queryresult = $this->db->query($querystatement);
        while ($therecord = $this->db->fetchArray($queryresult)) {
            $events["d" . stringToDate($therecord["startdate"], "SQL")]["t" . stringToTime($therecord["starttime"], "24 Hour")][] = $therecord;
        }
        //next we do recurring events
        $querystatement = "\n            SELECT\n                notes.id,\n                notes.startdate,\n                notes.starttime,\n                notes.enddate,\n                notes.endtime,\n                notes.subject,\n                notes.repeattype,\n                notes.repeatevery,\n                notes.firstrepeat,\n                notes.lastrepeat,\n                notes.timesrepeated,\n                notes.repeatontheday,\n                notes.repeatontheweek,\n                notes.repeateachlist,\n                notes.repeatuntil,\n                notes.repeattimes\n            FROM\n                notes\n            WHERE\n                repeating =1\n                AND (\n                    notes.private = 0\n                    OR notes.createdby=" . $userid . "\n                ) AND notes.type='EV'\n                AND (\n                    notes.repeatuntil IS NULL\n                    OR notes.repeatuntil >= '" . dateToString($firstDay, "SQL") . "'\n                    )\n                AND (\n                    notes.repeattimes IS NULL\n                    OR notes.repeattimes > notes.timesrepeated\n                    )";
        $queryresult = $this->db->query($querystatement);
        $thetable = new notes($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1");
        while ($therecord = $this->db->fetchArray($queryresult)) {
            $dateArray = $thetable->getValidInRange(stringToDate($therecord["startdate"], "SQL"), $lastDay, $therecord);
            foreach ($dateArray as $date) {
                if ($date >= $firstDay && $date <= $lastDay) {
                    if ($therecord["enddate"]) {
                        $therecord["enddate"] = dateToString($date + (stringToDate($therecord["enddate"], "SQL") - stringToDate($therecord["startdate"], "SQL")), "SQL");
                    }
                    $therecord["startdate"] = dateToString($date, "SQL");
                    $events["d" . $date]["t" . stringToTime($therecord["starttime"], "24 Hour")][] = $therecord;
                }
                //endif
            }
            //endforeach
        }
        //endwhile
        $querystatement = "\n            SELECT\n                DECODE(password,'" . ENCRYPTION_SEED . "') AS decpass\n            FROM\n                users\n            WHERE\n                id=" . $_SESSION["userinfo"]["id"];
        $queryresult = $this->db->query($querystatement);
        $passrec = $this->db->fetchArray($queryresult);
        $icallink = "?u=" . $_SESSION["userinfo"]["id"] . "&amp;h=" . md5("phpBMS" . $_SESSION["userinfo"]["firstname"] . $_SESSION["userinfo"]["lastname"] . $_SESSION["userinfo"]["id"] . $passrec["decpass"]);
        ?>
        <input type="hidden" id="eventDateLast" value="<?php 
        echo strtotime("-7 days", $firstDay);
        ?>
" />
        <input type="hidden" id="eventDateToday" value="<?php 
        echo mktime(0, 0, 0);
        ?>
" />
        <input type="hidden" id="eventDateNext" value="<?php 
        echo strtotime("tomorrow", $lastDay);
        ?>
" />

        <ul id="eventButtons">
            <li id="icalLi"><a href="ical.php<?php 
        echo $icallink;
        ?>
" title="ical subscription link" id="icalA"><span>ical</span></a>&nbsp;</li>
            <li><button id="eventLastWeek" type="button" title="previous week" class="smallButtons"><span>&lt;&lt;</span></button></li>
            <li><button id="eventToday" type="button" title="today" class="smallButtons"><span>today</span></button></li>
            <li><button id="eventNextWeek" type="button" title="next week" class="smallButtons"><span>&gt;&gt;</span></button></li>
        </ul>
        <table border="0" cellspacing="0" cellpadding="0" width="100%" id="eventsList"><?php 
        foreach ($events as $date => $times) {
            ?>
<tr class="eventDayName" <?php 
            if (mktime(0, 0, 0) === (int) str_replace("d", "", $date)) {
                echo 'id="today"';
            }
            ?>
>
                        <td nowrap="nowrap"><?php 
            echo @strftime("%A", (int) str_replace("d", "", $date));
            ?>
</td>
                        <td width="100%" align="right"><?php 
            echo @strftime("%b %e %Y", (int) str_replace("d", "", $date));
            ?>
</td>
                </tr><?php 
            if (count($times)) {
                ksort($times);
                foreach ($times as $time => $timeevents) {
                    foreach ($timeevents as $event) {
                        ?>
                                <tr>
                                        <td nowrap="nowrap" valign="top" align="right"><?php 
                        echo formatFromSQLTime($event["starttime"]);
                        ?>
</td>
                                        <td valign="top" ><a href="<?php 
                        echo getAddEditFile($this->db, "tbld:a4cdd991-cf0a-916f-1240-49428ea1bdd1") . "?id=" . $event["id"];
                        ?>
&amp;backurl=snapshot.php"><?php 
                        echo htmlQuotes($event["subject"]);
                        ?>
</a></td>
                                </tr><?php 
                    }
                    //endforeach events
                }
                //endforeach time
            } else {
                ?>
                        <tr>
                                <td class="disabledtext" align="right">no events</td>
                                <td>&nbsp;</td>
                        </tr><?php 
            }
            // endif
        }
        //endforeach day
        ?>
</table><?php 
    }
 /**
  * @return string
  * @permissions view,right1
  */
 protected function actionSaveRegisterForEvent()
 {
     $strReturn = "";
     $objEvent = new class_module_eventmanager_event($this->getSystemid());
     class_module_pages_portal::registerAdditionalTitle($objEvent->getStrTitle());
     $bitIsLoggedin = false;
     $bitIsParticipant = false;
     if ($this->objSession->isLoggedin() && $this->objTemplate->containsSection($this->objTemplate->readTemplate("/module_eventmanager/" . $this->arrElementData["char1"]), "event_register_loggedin")) {
         $bitIsLoggedin = true;
         if ($objEvent->isParticipant($this->objSession->getUserID())) {
             $bitIsParticipant = true;
         }
     }
     $arrErrors = array();
     //what to do?
     $objTextValidator = new class_text_validator();
     $objMailValidator = new class_email_validator();
     if (!$bitIsLoggedin && !$objTextValidator->validate($this->getParam("forename"), 3)) {
         $arrErrors[] = $this->getLang("noForename");
     }
     if (!$bitIsLoggedin && !$objTextValidator->validate($this->getParam("lastname"), 3)) {
         $arrErrors[] = $this->getLang("noLastname");
     }
     if (!$bitIsLoggedin && !$objMailValidator->validate($this->getParam("email"))) {
         $arrErrors[] = $this->getLang("invalidEmailadress");
     }
     //Check captachcode
     if (!$bitIsLoggedin && ($this->getParam("form_captcha") == "" || $this->getParam("form_captcha") != $this->objSession->getCaptchaCode())) {
         $arrErrors[] = $this->getLang("commons_captcha");
     }
     if (count($arrErrors) != 0) {
         return $this->actionRegisterForEvent($arrErrors);
     }
     if ($objEvent->getIntLimitGiven() == "1" && $objEvent->getIntParticipantsLimit() <= class_module_eventmanager_participant::getActiveParticipantsCount($this->getSystemid())) {
         $strMessage = $this->getLang("participantLimitReached");
         $strWrapperID = $this->objTemplate->readTemplate("/module_eventmanager/" . $this->arrElementData["char1"], "event_register_message");
         $strReturn = $this->objTemplate->fillTemplate(array("title" => $objEvent->getStrTitle(), "message" => $strMessage), $strWrapperID);
         return $strReturn;
     }
     if ($bitIsParticipant) {
         $objParticipant = class_module_eventmanager_participant::getParticipantByUserid($this->objSession->getUserID(), $objEvent->getSystemid());
     } else {
         $objParticipant = new class_module_eventmanager_participant();
     }
     //here we go, create the complete event registration
     $objParticipant->setStrComment($this->getParam("comment"));
     if ($bitIsLoggedin) {
         $objParticipant->setStrUserId($this->objSession->getUserID());
         $objParticipant->setIntParticipationStatus($this->getParam("participant_status"));
     } else {
         $objParticipant->setStrForename($this->getParam("forename"));
         $objParticipant->setStrLastname($this->getParam("lastname"));
         $objParticipant->setStrPhone($this->getParam("phone"));
         $objParticipant->setStrEmail($this->getParam("email"));
     }
     $objParticipant->updateObjectToDb($this->getSystemid());
     if ($bitIsParticipant) {
         $strMessage = $this->getLang("participantUpdateMessage");
         $strWrapperID = $this->objTemplate->readTemplate("/module_eventmanager/" . $this->arrElementData["char1"], "event_register_message");
         return $this->objTemplate->fillTemplate(array("title" => $objEvent->getStrTitle(), "message" => $strMessage), $strWrapperID);
     }
     $objParticipant->setIntRecordStatus(0);
     $objParticipant->updateObjectToDb();
     $objMail = new class_mail();
     $objMail->setSubject($this->getLang("registerMailSubject"));
     $strBody = $this->getLang("registerMailBodyIntro");
     $strBody .= $objEvent->getStrTitle() . "<br />";
     $strBody .= dateToString($objEvent->getObjStartDate(), true) . "<br />";
     $strBody .= $objEvent->getStrLocation() . "<br />";
     $strBody .= "\n";
     $strTemp = class_link::getLinkPortalHref($this->getPagename(), "", "participantConfirmation", "&participantId=" . $objParticipant->getSystemid(), $this->getSystemid(), "", $objEvent->getStrTitle());
     $strBody .= html_entity_decode("<a href=\"" . $strTemp . "\">" . $strTemp . "</a>");
     $objScriptlet = new class_scriptlet_helper();
     $strBody = $objScriptlet->processString($strBody);
     $objMail->setHtml($strBody);
     $objMail->addTo($objParticipant->getStrEmail());
     $objMail->sendMail();
     $strMessage = $this->getLang("participantSuccessMail");
     $strWrapperID = $this->objTemplate->readTemplate("/module_eventmanager/" . $this->arrElementData["char1"], "event_register_message");
     $strReturn .= $this->objTemplate->fillTemplate(array("title" => $objEvent->getStrTitle(), "message" => $strMessage), $strWrapperID);
     return $strReturn;
 }