function viewStat() { if (!file_exists($this->logFile)) { file_put_contents($this->logFile, "#<?php exit()?>\n"); } error_reporting(E_ALL); if (isset($_GET['action'])) { error_log($this->now . "\t" . $_GET['action'] . "\t" . $_GET['p'] . "\n", 3, $this->logFile); } if (!file_exists($this->logFile . '.time') || filemtime($this->logFile . '.time') < $this->now - 300) { //5分钟处理一次log touch($this->logFile . '.time'); $work = dirname($this->logFile) . '/tmp.' . $this->now . '.php'; copy($this->logFile, $work); unlink($this->logFile); while ($lines = $this->parseLog($work)) { foreach ($lines as $line) { if ($line[1] == 'product:index') { $pdtView[$line[2]][day($line[0])]++; } } } unlink($work); } $today = day(time()); if ($pdtView > 0) { $db =& $this->database(); foreach ($db->select('select view_count,view_w_count,count_stat,goods_id from sdb_goods where goods_id in (' . implode(',', array_keys($pdtView)) . ')') as $row) { if (!($stat = unserialize($row['count_stat']))) { $stat = array('view' => array(), 'buy' => array()); } foreach ($pdtView[$row['goods_id']] as $day => $count) { $stat['view'][$day] += $count; } $w_count = 0; foreach ($stat['view'] as $day => $count) { if ($day < $today - 90) { //todo:只保留最近90天 unset($stat['view'][$day]); } elseif ($day > $today - 7) { $w_count += $count; } } $row['view_w_count'] = $w_count; $row['view_count'] += array_sum($pdtView[$row['goods_id']]); //浏览量增加 $stat = addslashes(serialize($stat)); $db->exec("update sdb_goods set view_w_count={$row['view_w_count']},count_stat=\"{$stat}\",view_count={$row['view_count']} where goods_id=" . $row['goods_id'], true); } } }
function show_detail($gid) { $o =& $this->system->loadModel('trading/goods'); $goods = $o->getFieldById($gid, array('thumbnail_pic', 'disabled', 'marketable', 'rank_count', 'view_count', 'view_w_count', 'buy_count', 'buy_w_count', 'count_stat')); $this->pagedata['goods'] =& $goods; $this->pagedata['is_pub'] = $goods['marketable'] != 'false' && $goods['disabled'] != 'true'; $this->pagedata['url'] = $this->system->realUrl('product', 'index', array($gid), null); $this->pagedata['buy_w_count'] = $goods['buy_w_count']; $this->pagedata['view_w_count'] = $goods['view_w_count']; $this->pagedata['buy_count'] = $goods['buy_count']; $this->pagedata['view_count'] = $goods['view_count']; $this->pagedata['status'] = unserialize($goods['count_stat']); $today = day(time()); $view_chardata = array(); $buy_chardata = array(); foreach (range($today - 14, $today) as $day) { $view_chardata[$day] = intval($this->pagedata['status']['view'][$day]); $buy_chardata[$day] = intval($this->pagedata['status']['buy'][$day]); } $this->pagedata['view_chart'] = $this->_linechart($view_chardata); $this->pagedata['buy_chart'] = $this->_linechart($buy_chardata); }
<?php if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { header("HTTP/1.1 404 Not Found"); exit; } global $url_situs; ob_start(); echo '<table width="100%" border="0" cellspacing="0" cellpadding="0">'; include "mod/statistik/counter.php"; include "mod/statistik/online.php"; include "mod/statistik/hits.php"; include "mod/statistik/useronline.php"; echo ' <tr><td><img src="' . $url_situs . '/mod/statistik/images/visitor.png" alt="Visitors"/></td><td>Visitors</td><td>:</td><td><b>' . $theCount . '</b></td></tr> <tr><td><img src="' . $url_situs . '/mod/statistik/images/hits.png" alt="Hits"/></td><td>Hits</td><td>:</td><td><b>' . $hits . '</b></td></tr> <tr><td><img src="' . $url_situs . '/mod/statistik/images/month.png" alt="Month"/></td><td>Month</td><td>:</td><td><b>' . month() . '</b></td></tr> <tr><td><img src="' . $url_situs . '/mod/statistik/images/today.png" alt="Today"/></td><td>Today</td><td>:</td><td><b>' . day() . '</b></td></tr> </table>'; $out = ob_get_contents(); ob_end_clean();
function cetakReviewSpjMulti() { $id = $this->uri->segment(3); $this->mr->setIdPerjalanan($id); $this->fpdf->FPDF('P', 'cm', 'A4'); $this->fpdf->AddPage(); $this->fpdf->Ln(); $this->fpdf->AcceptPageBreak(); $this->fpdf->SetMargins(2, 2, 2); //Header //$this->fpdf->SetFont('helvetica','',11); //$this->fpdf->SetTextColor(5, 76, 143); //$this->fpdf->Text(3.5,1.2,'KEMENTERIAN KOMUNIKASI DAN INFORMATIKA REPUBLIK INDONESIA'); //$this->fpdf->Text(3.5,1.7,'DIREKTORAT JENDERAL SUMBER DAYA DAN PERANGKAT POS DAN INFORMATIKA'); //$this->fpdf->Text(3.5,2.2,'BALAI BESAR PENGUJIAN PERANGKAT TELEKOMUNIKASI'); //$this->fpdf->Image('../appspj/assets/images/informasi.jpg',3.3,2.4,8.5,0.65,'JPG'); //$this->fpdf->SetFont('helvetica','',9); //$this->fpdf->Text(3.5,3.4,'Jl. BINTARA RAYA No.17'); //$this->fpdf->Text(9,3.4,'Tel : 021 - 3835992'); //$this->fpdf->Text(13,3.4,'Fax : 021 - 3522915'); //$this->fpdf->Text(16.9,3.4,'www.depkominfo.go.id'); //$this->fpdf->Text(3.5,3.8,'BEKASI BARAT 17134'); //$this->fpdf->Text(10.53,3.8,'3835977'); //$this->fpdf->Text(17.7,3.8,'www.postel.go.id'); //$this->fpdf->Image('../appspj/assets/images/kominfo.jpg',1,0.8,2.3,2.6,'JPG'); //$this->fpdf->Image('../appspj/assets/images/header_line_blue.png',1,4,19.1,0.2,'PNG'); $sql = "select pmd.personil from perjalanan_multi_detail pmd where pmd.id_perjalanan= '" . $id . "'"; $query = $this->db->query($sql); $arrayPersonil = array(); foreach ($query->result() as $row) { $arrayPersonil[] = $row->personil; } //Content $sql = "SELECT\tpmd.id_detail,\n\t\t\t\t\t\ts.nama,\n\t\t\t\t\t\ts.nip,\n\t\t\t\t\t\tp.golongan,\n\t\t\t\t\t\ts.jabatan,\n\t\t\t\t\t\tp.pangkat,\n\t\t\t\t\t\tk.kota,\n\t\t\t\t\t\tpmd.no_spt,\n\t\t\t\t\t\tpm.tgl_spt,\n\t\t\t\t\t\tpm.tiket1\n\t\t\t\tFROM\n\t\t\t\t\t\tpangkat p\n\t\t\t\t\t\tINNER JOIN staff s ON p.id = s.golongan\n\t\t\t\t\t\tINNER JOIN perjalanan_multi_detail pmd ON s.id = pmd.personil\n\t\t\t\t\t\tINNER JOIN perjalanan_multi pm ON pmd.id_perjalanan = pm.id\n\t\t\t\t\t\tINNER JOIN dinas d ON pm.dinas = d.id\n\t\t\t\t\t\tINNER JOIN kota k ON d.kota_tujuan = k.id\n\t\t\t\tWHERE\n\t\t\t\t\t\tpmd.id_perjalanan = '" . $id . "'\n\t\t\t\tORDER BY s.golongan_id ASC"; $query = $this->db->query($sql); $namaStaff = array(); $nip = array(); $golongan = array(); $jabatan = array(); $tujuan = array(); $noSpt = array(); $tglSpt = array(); foreach ($query->result() as $row) { $namaStaff[] = $row->nama; $nip[] = $row->nip; $golongan[] = $row->golongan; $pangkat[] = $row->pangkat; $jabatan[] = $row->jabatan; $tujuan[] = $row->kota; $noSpt[] = $row->no_spt; $tglSpt[] = $row->tgl_spt; $tiket1 = $row->tiket1; } //Set variable Id Perjalanan to class ModelReport $resultNotaDinas = $this->mr->getNotaDinas(); $nomorNotaDinas = $resultNotaDinas[0]; $tanggalNotaDinas = $resultNotaDinas[1]; $tentangNotaDinas = $resultNotaDinas[2]; $isExtraNotes = $resultNotaDinas[3]; //Set alokasi anggaran $resultAlokasiAnggaran = $this->mr->getAlokasiAnggaran(); $nomorAnggaran = $resultAlokasiAnggaran[0]; $tanggalAnggaran = $resultAlokasiAnggaran[1]; $kodeKegiatanAnggaran = $resultAlokasiAnggaran[2]; $subKodeKegiatanAnggaran = $resultAlokasiAnggaran[3]; $kegiatanAnggaran = $resultAlokasiAnggaran[4]; $mak1 = $resultAlokasiAnggaran[5]; $mak1_ket = $resultAlokasiAnggaran[6]; $mak2 = $resultAlokasiAnggaran[7]; $mak2_ket = $resultAlokasiAnggaran[8]; $mak3 = $resultAlokasiAnggaran[9]; $mak3_ket = $resultAlokasiAnggaran[10]; $this->fpdf->SetTextColor(0, 0, 0); $this->fpdf->SetFont('Arial', 'U', 12); $this->fpdf->Text(6.8, 5.3, 'SURAT PERINTAH PELAKSANAAN TUGAS'); $this->fpdf->setFont('Arial', '', 12); $this->fpdf->Text(6.9, 5.9, 'Nomor : ' . $noSpt[0], 'C'); $this->fpdf->setFont('Arial', '', 10); $this->fpdf->setXY(2.6, 6.8); $this->fpdf->MultiCell(0.6, 0.5, 'A.', ''); $this->fpdf->setXY(3.3, 6.8); $this->fpdf->MultiCell(6.5, 0.5, 'Pejabat Pemberi Tugas', ''); $this->fpdf->setXY(9.699999999999999, 6.8); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(10.2, 6.8); $this->fpdf->MultiCell(9.300000000000001, 0.5, 'KEPALA BALAI BESAR PENGUJIAN PERANGKAT TELEKOMUNIKASI', '', 'L'); $this->fpdf->setXY(2.6, 7.8); $this->fpdf->MultiCell(0.6, 0.5, 'B.', ''); $this->fpdf->setXY(3.3, 7.8); $this->fpdf->MultiCell(6.5, 0.5, 'Penggunaan Alokasi Anggaran', ''); //$this->fpdf->setXY(8.5,7.8); //$this->fpdf->MultiCell(0.5,0.5,':'); $this->fpdf->setXY(3.3, 8.4); $this->fpdf->MultiCell(5.6, 0.5, '1. Nomor dan tanggal DIPA', 0); $this->fpdf->setXY(9.699999999999999, 8.4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(10.2, 8.4); $this->fpdf->MultiCell(8, 0.5, 'Nomor'); $this->fpdf->setXY(12.7, 8.4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, 8.4); $this->fpdf->MultiCell(8, 0.5, $nomorAnggaran); $this->fpdf->setXY(10.2, 8.9); $this->fpdf->MultiCell(5, 0.5, 'Tanggal DIPA'); $this->fpdf->setXY(12.7, 8.9); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, 8.9); $this->fpdf->MultiCell(8, 0.5, day($tanggalAnggaran)); $this->fpdf->setXY(3.3, 9.4); $this->fpdf->MultiCell(6.5, 0.5, '2. Kode Kegiatan / Sub Kegiatan / MAK'); $this->fpdf->setXY(9.699999999999999, 9.4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(10.2, 9.4); $this->fpdf->MultiCell(7.5, 0.5, 'Kode Kegiatan'); $this->fpdf->setXY(12.7, 9.4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, 9.4); $this->fpdf->MultiCell(8, 0.5, $kodeKegiatanAnggaran . ' - ' . $subKodeKegiatanAnggaran); $this->fpdf->setXY(10.2, 9.9); $this->fpdf->MultiCell(7.5, 0.5, 'Sub Kegiatan'); $this->fpdf->setXY(12.7, 9.9); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, 9.9); $this->fpdf->MultiCell(5.5, 0.5, $kegiatanAnggaran); //$this->fpdf->Ln(); $y1 = $this->fpdf->GetY(); $this->fpdf->setXY(10.2, $y1); $this->fpdf->MultiCell(7.5, 0.5, 'MAK'); $this->fpdf->setXY(12.7, $y1); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, $y1); $this->fpdf->MultiCell(2, 0.5, $mak1); $this->fpdf->setXY(15, $y1); $this->fpdf->MultiCell(5.5, 0.5, $mak1_ket, '', 'L'); $y2 = $this->fpdf->GetY(); $this->fpdf->setXY(13, $y2); $this->fpdf->MultiCell(2, 0.5, $mak2); $this->fpdf->setXY(15, $y2); $this->fpdf->MultiCell(5.5, 0.5, $mak2_ket, '', 'L'); $y3 = $this->fpdf->GetY(); $this->fpdf->setXY(13, $y3); $this->fpdf->MultiCell(2, 0.5, $mak3); $this->fpdf->setXY(15, $y3); $this->fpdf->MultiCell(5.5, 0.5, $mak3_ket, '', 'L'); //for Multi Staff $y3 = $this->fpdf->GetY(); $this->fpdf->setXY(2.6, $y3); $this->fpdf->MultiCell(0.6, 0.5, 'C.', ''); $this->fpdf->setXY(3.3, $y3); $this->fpdf->MultiCell(6.5, 0.5, 'Dasar Pelaksanaan Tugas', ''); $y4 = $this->fpdf->GetY(); $this->fpdf->setXY(3.3, $y4); $this->fpdf->MultiCell(5.6, 0.5, '1. Undangan', 0); $this->fpdf->setXY(9.699999999999999, $y4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(10.2, $y4); $this->fpdf->MultiCell(2, 0.5, 'Nomor'); $this->fpdf->setXY(12.7, $y4); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, $y4); $this->fpdf->MultiCell(8, 0.5, $nomorNotaDinas); $y5 = $this->fpdf->GetY(); $this->fpdf->setXY(10.2, $y5); $this->fpdf->MultiCell(2, 0.5, 'Tanggal'); $this->fpdf->setXY(12.7, $y5); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, $y5); if ($tanggalNotaDinas == '') { $this->fpdf->MultiCell(8, 0.5, '-'); } else { $this->fpdf->MultiCell(8, 0.5, day($tanggalNotaDinas)); } $y6 = $this->fpdf->GetY(); $this->fpdf->setXY(10.2, $y6); $this->fpdf->MultiCell(2, 0.5, 'Tentang'); $this->fpdf->setXY(12.7, $y6); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(13, $y6); $this->fpdf->MultiCell(7.5, 0.5, $tentangNotaDinas, '', 'L'); $this->fpdf->Ln(); /** * add nota tambahan(Rutin/Undangan [Internal or Eksternal],Rutin,)Kontrak , SK TIM) */ $headerNote = ''; if (!empty($isExtraNotes)) { $jenisNotaExtra = $this->mr->getJenisNotaDinasExtra(); if ($jenisNotaExtra == 'Internal') { $headerNote = '2. Nota-Dinas'; } else { if ($jenisNotaExtra == 'Eksternal') { $headerNote = '2. Undangan'; } else { if ($jenisNotaExtra == 'Kontrak') { $headerNote = '2. Kontrak'; } else { if ($jenisNotaExtra == 'Tim') { $headerNote = '2. SK.TIM'; } } } } $ResultExtraNotes = $this->mr->getExtraNotaDinas(); $nomorExtra = $ResultExtraNotes[0]; $tanggalExtra = $ResultExtraNotes[1]; $perihalExtra = $ResultExtraNotes[2]; $koorY = 10.9; $rs = 0.5; $this->fpdf->Ln(); $this->fpdf->setXY(3.3, $koorY); $this->fpdf->MultiCell(5.6, 0.5, $headerNote); $this->fpdf->setXY(9.300000000000001, $koorY); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(10.3, $koorY); $this->fpdf->MultiCell(2, 0.5, 'Nomor'); $this->fpdf->setXY(11.9, $koorY); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(12.2, $koorY); $this->fpdf->MultiCell(8, 0.5, $nomorExtra); $koorY = $koorY + $rs; $this->fpdf->setXY(10.3, $koorY); $this->fpdf->MultiCell(2, 0.5, 'Tanggal'); $this->fpdf->setXY(11.9, $koorY); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(12.2, $koorY); $this->fpdf->MultiCell(8, 0.5, day($tanggalExtra)); $koorY = $koorY + $rs; $this->fpdf->setXY(10.3, $koorY); $this->fpdf->MultiCell(2, 0.5, 'Perihal'); $this->fpdf->setXY(11.9, $koorY); $this->fpdf->MultiCell(0.5, 0.5, ':'); $this->fpdf->setXY(12.2, $koorY); $this->fpdf->MultiCell(7.5, 0.5, $perihalExtra); } else { $koorY = 8; $rs = 0.5; } $rr = 2.5; $koorY = $koorY + $rr; $y7 = $this->fpdf->GetY(); $this->fpdf->setXY(2.6, $y7); $this->fpdf->MultiCell(0.6, 0.5, 'D.', ''); $this->fpdf->setXY(3.3, $y7); $this->fpdf->MultiCell(6.5, 0.5, 'Pegawai yang ditugaskan', ''); $this->fpdf->setXY(8.5, $y7); $this->fpdf->MultiCell(0.5, 0.5, ':'); $koorY = $koorY + $rs; $y8 = $this->fpdf->GetY(); $this->fpdf->setXY(2.5, $y8); $this->fpdf->MultiCell(1, 1, 'NO', 'LTRB', 'C'); $this->fpdf->setXY(3.5, $y8); $this->fpdf->MultiCell(4.5, 1, 'N A M A ', 'TB', 'C'); $this->fpdf->setXY(8, $y8); $this->fpdf->MultiCell(5.5, 1, 'GOL / NIP', 'LTB', 'C'); $this->fpdf->setXY(13.5, $y8); $this->fpdf->MultiCell(6, 1, 'JABATAN', 'LTRB', 'C'); $this->fpdf->Ln(); $y9 = $y8 + 1; $rs = 1; //$koorY = $this->fpdf->getY(); $koorY = $y8 + $rs; //15.9; $no = 1; $counter = 0; for ($i = 0; $i < sizeof($namaStaff); $i++) { $koorX = array(2.5, 3.5, 8, 8, 13.5); $rr = 1; $this->fpdf->setXY($koorX[0], $koorY); $this->fpdf->Cell(1, 1, $no . '.', 'LRBT', '', 'C'); $this->fpdf->Cell(4.5, 1, ' ' . ucwords(mb_strtolower($namaStaff[$i])), 'BT', '', 'L'); $this->fpdf->Cell(5.5, 0.5, ' ' . $pangkat[$i] . ' ' . $golongan[$i], 'LT', '', 'L'); $this->fpdf->setXY($koorX[3], $koorY + 0.5); $this->fpdf->Cell(5.5, 0.5, ' ' . 'NIP : ' . $nip[$i], 'LB', '', 'L'); $this->fpdf->setXY($koorX[4], $koorY); if (strlen($jabatan[$i]) <= 26) { $this->fpdf->MultiCell(6, 1, $jabatan[$i], 'LRBT', 'L'); } else { if (strlen($jabatan[$i]) > 26) { if ($jabatan[$i] == "KASI STANDAR PENERTIBAN PPI") { $this->fpdf->MultiCell(6, 1, $jabatan[$i], 'LRBT', ''); } else { $this->fpdf->MultiCell(6, 0.5, $jabatan[$i], 'LRBT', ''); } } } $koorY = $koorY + $rr; if ($koorY >= 26.5) { $this->fpdf->AddPage(); $koorY = 1; } $no++; } $GetY = $this->fpdf->GetY(); if ($GetY > 25) { $koorY = 1; $this->fpdf->AddPage(); $rr = 1.5; } $GetY = $this->fpdf->GetY(); $koorY = $GetY + 0.5; $sql = "SELECT d.berangkat,d.kembali from perjalanan_multi p inner join dinas d on p.dinas = d.id where p.id = '" . $id . "'"; $query = $this->db->query($sql); foreach ($query->result() as $row) { $tanggalBerangkat = $row->berangkat; $tanggalKembali = $row->kembali; } $this->fpdf->Ln(); $this->fpdf->setXY(2.6, $koorY); $this->fpdf->Cell(0.6, 0.5, 'E.', ''); $this->fpdf->Cell(5.3, 0.5, 'Maksud dan Tujuan Penugasan', ''); $this->fpdf->Cell(0.5, 0.5, ':'); $GetY = $this->fpdf->GetY(); $rr = 1; $koorY = $GetY + $rr; // $this->fpdf->Ln(); $this->fpdf->Text(3.25, $koorY, '1. Tempat Tujuan'); $this->fpdf->Text(8, $koorY, ':'); $this->fpdf->Text(8.300000000000001, $koorY, $this->mr->getKotaTujuan()); $GetY = $this->fpdf->GetY(); // $rr = 1.1; $koorY = $GetY + $rr; $this->fpdf->Text(3.25, $koorY, '2. Tanggal Kegiatan'); $this->fpdf->Text(8, $koorY, ':'); $tgl_berangkat = str_split($tanggalBerangkat, 4); $this->fpdf->Text(8.300000000000001, $koorY, $tgl_berangkat[2] . ' s/d ' . day($tanggalKembali)); $GetY = $this->fpdf->GetY(); // $rr = 1.7; $koorY = $GetY + $rr; $this->fpdf->Text(3.65, $koorY, ''); $this->fpdf->Text(8, $koorY, ':'); $this->fpdf->Text(8.300000000000001, $koorY, $this->mr->getTotalHariDinas() . ' (' . $this->mr->terbilang($this->mr->getTotalHariDinas()) . ')' . ' Hari'); $GetYCur = $this->fpdf->GetY(); // $koorY = $GetY + $rr; $rr = 1; if ($GetYCur >= 25) { $this->fpdf->AddPage(); $koorY = 1; $rr = 1.5; $koorY = $rr; //$this->fpdf->SetTopMargin(3); } else { $GetY = $this->fpdf->GetY(); // $rr = 2; $koorY = $GetY + $rr; } $this->fpdf->SetXY(3.15, $koorY); $this->fpdf->Cell(4, 0.5, '3. Untuk'); $this->fpdf->SetXY(7.9, $koorY); $this->fpdf->Cell(1, 0.5, ':'); $this->fpdf->SetXY(8.199999999999999, $koorY); $this->fpdf->MultiCell(10.5, 0.5, $this->mr->getMaksud(), '', 'L'); $GetY = $this->fpdf->GetY(); // $rr = 0.5; if (empty($tiket1)) { $this->setTransportasi("Kendaraan Umum"); } else { $this->setTransportasi("Pesawat Udara"); } $koorY = $GetY + $rr; $koorY = $this->fpdf->GetY() + 0.5; $this->fpdf->Text(3.25, $koorY, '4. Alat Transportasi'); $this->fpdf->Text(8, $koorY, ':'); $this->fpdf->Text(8.300000000000001, $koorY, $this->TRANSPORTASI); $this->fpdf->Ln(); $GetY = $this->fpdf->GetY(); // $rr = 1; $koorY = $GetY + $rr; $this->fpdf->Ln(); $this->fpdf->setXY(2.6, $koorY); $this->fpdf->Cell(0.6, 0.5, 'F.', ''); $this->fpdf->Cell(4.7, 0.5, 'Keterangan lain-lain', ''); $this->fpdf->Cell(0.5, 0.5, ':'); $GetY = $this->fpdf->GetY(); // $koorY = $GetY + $rr; $this->fpdf->setXY(3.2, $koorY); $this->fpdf->Cell(0.6, 0.5, '1.', ''); $this->fpdf->MultiCell(15.5, 0.5, 'Melaporkan hasil pelaksanaan tugas selambat-lambatnya 7 (tujuh) hari kerja setelah pelaksanaan dengan melampirkan dokumen pendukung administrasi lainnya sesuai peraturan perundang-undangan yang berlaku.', ''); $rr = 0.5; $GetY = $this->fpdf->GetY(); // $koorY = $GetY + $rr; $this->fpdf->setXY(3.2, $koorY); $this->fpdf->Cell(0.6, 0.5, '2.', ''); $this->fpdf->MultiCell(15.5, 0.5, 'Para nama pegawai yang ditugaskan agar melaksanakan tugas ini dengan penuh tanggung jawab dan berlaku sejak tanggal ditetapkan.', ''); $GetY = $this->fpdf->GetY(); // $koorY = $GetY + $rr; $this->fpdf->setXY(3.2, $koorY); $this->fpdf->Cell(0.6, 0.5, '3.', ''); $this->fpdf->MultiCell(15.5, 0.5, 'Segala biaya yang dikeluarkan berkenaan dengan pelaksanaan kegiatan ini dibebankan pada kegiatan tersebut diatas.', ''); //Footer $rr = 1; $GetYCur = $this->fpdf->GetY(); $koorY = $GetY + $rr; if ($GetYCur > 17) { $this->fpdf->AddPage(); $koorY = $this->fpdf->GetY(); $rr = 3; $koorY = $rr; //$this->fpdf->SetTopMargin(3); } else { $GetY = $this->fpdf->GetY(); // $rr = 2; $koorY = $GetY + $rr; } $this->fpdf->Ln(); $this->fpdf->setFont('Arial', '', 11); $this->fpdf->SetXY(11.5, $koorY); $this->fpdf->MultiCell(2.5, 0.5, 'Ditetapkan'); $this->fpdf->SetXY(14.5, $koorY); $this->fpdf->MultiCell(1, 0.5, ':'); $this->fpdf->SetXY(15, $koorY); $this->fpdf->MultiCell(3, 0.5, ' BEKASI'); $rr = 0; $GetY = $this->fpdf->GetY(); $koorY = $GetY; $this->fpdf->setFont('Arial', '', 11); $this->fpdf->SetXY(11.5, $koorY); $this->fpdf->Cell(3, 0.5, 'Pada tanggal', 'B'); $this->fpdf->SetXY(14.5, $koorY); $this->fpdf->Cell(0.2, 0.5, ':', 'B'); $this->fpdf->SetXY(14.7, $koorY); $this->fpdf->Cell(3.6, 0.5, ' ' . month(date("m")) . ' ' . date("Y "), 'B'); $GetY = $this->fpdf->GetY(); $rr = 1.5; $koorY = $GetY + $rr; $this->fpdf->setFont('Arial', 'B', 10); $this->fpdf->Text(12, $koorY, 'KEPALA BALAI BESAR PENGUJIAN'); $GetY = $this->fpdf->GetY(); $rr = 2.0; $koorY = $GetY + $rr; $this->fpdf->setFont('Arial', 'B', 10); $this->fpdf->Text(12, $koorY, ' PERANGKAT TELEKOMUNIKASI'); $GetY = $this->fpdf->GetY(); $rr = 4.5; $koorY = $GetY + $rr; if ($namaStaff === "MOCHAMAD RUS\\'AN") { $TTD = $this->NAMA_PLT; } else { $TTD = $this->NAMA_DIREKTUR; } $this->fpdf->SetXY(12, $koorY); $this->fpdf->Cell(6, 0.5, $TTD, 0, '', 'C'); $GetY = $this->fpdf->GetY(); $rr = 1; $koorY = $GetY + $rr; $this->fpdf->Ln(); $this->fpdf->setFont('Verdana', 'B', 9); $this->fpdf->Text(2.6, $koorY, 'Tembusan :'); $this->fpdf->Text(2.6, $koorY + 0.05, '_________'); $this->fpdf->setFont('Verdana', '', 9); $GetY = $this->fpdf->GetY(); $rr = 1; $koorY = $GetY + $rr; $this->fpdf->Text(2.6, $koorY, 'Disampaikan Yth. Kepada :'); $GetY = $this->fpdf->GetY(); $rr = 1.5; $koorY = $GetY + $rr; $this->fpdf->Text(2.6, $koorY, '1. Yth. Sdr Kabag TU BBPPT'); $GetY = $this->fpdf->GetY(); $rr = 2.05; $koorY = $GetY + $rr; $this->fpdf->Text(3, $koorY, 'Mohon menyiapkan SPPD/DOP bagi ybs'); $GetY = $this->fpdf->GetY(); $rr = 2.5; $koorY = $GetY + $rr; $this->fpdf->Text(2.6, $koorY, '2. Yth. Sdr Bendahara BBPPT'); $GetY = $this->fpdf->GetY(); $rr = 3; $koorY = $GetY + $rr; $this->fpdf->Text(3, $koorY, 'usulan pendanaan bagi ybs'); /***** //Insert Page Number $this->fpdf->setFont('Arial','',7); $this->fpdf->Text(10.4,28.7, 'Page ' . $this->fpdf->PageNo()); ******/ $this->fpdf->Output(); //$this->fpdf->Output('pdf/SPPT '.ucwords(mb_strtolower($namaStaff)).' '.date("dmY").'.pdf','F'); }
<table class="table_setting1"> <!--day--!> <? echo day("Monday","mo",$mo_val_day,$mo_all_time,$mo_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Tuesday","tu",$tu_val_day,$tu_all_time,$tu_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Wednesday","we",$we_val_day,$we_all_time,$we_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Thursday","th",$th_val_day,$th_all_time,$th_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Friday","fr",$fr_val_day,$fr_all_time,$fr_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Saturday","sa",$sa_val_day,$sa_all_time,$sa_time); echo '<tr><td colspan="3"><hr class="hr_alert_day"></td></tr>'; echo day("Sunday","su",$su_val_day,$su_all_time,$su_time); ?> <!--/day--!> </table> <!--/end_day!--!> <table> <tr> <td width="200"></td> <td> <input id="btn_save_setting" type="submit" class="button black medium" value=" Save Setting "> </td> </tr> </table> </fieldset> </div> </form>
<?php if (is_category()) { ?> <span class="lsf">folder </span><?php single_cat_title(); } else { if (is_tag()) { ?> <span class="lsf">tag </span><?php single_cat_title(); } else { if (is_date()) { ?> <span class="lsf">time </span><?php year_month(); day(); } else { if (is_author()) { ?> <span class="lsf">user </span><?php the_author(); ?> が書いた記事 <?php } } } } ?> </h1>
function format_Time($timeStr, $nType) { $y = ''; $m = ''; $d = ''; $h = ''; $mi = ''; $s = ''; $format_Time = ''; if (isDate($timeStr) == false) { return @$format_Time; } $y = cStr(year($timeStr)); $m = cStr(month($timeStr)); if (len($m) == 1) { $m = '0' . $m; } $d = cStr(day($timeStr)); //在vb.net里要这样用 D = CStr(CDate(timeStr).Day) if (len($d) == 1) { $d = '0' . $d; } $h = cStr(hour($timeStr)); if (len($h) == 1) { $h = '0' . $h; } $mi = cStr(minute($timeStr)); if (len($mi) == 1) { $mi = '0' . $mi; } $s = cStr(second($timeStr)); if (len($s) == 1) { $s = '0' . $s; } switch ($nType) { case 1: //yyyy-mm-dd hh:mm:ss $format_Time = $y . '-' . $m . '-' . $d . ' ' . $h . ':' . $mi . ':' . $s; break; case 2: //yyyy-mm-dd $format_Time = $y . '-' . $m . '-' . $d; break; case 3: //hh:mm:ss $format_Time = $h . ':' . $mi . ':' . $s; break; case 4: //yyyy年mm月dd日 $format_Time = $y . '年' . $m . '月' . $d . '日'; break; case 5: //yyyymmdd $format_Time = $y . $m . $d; break; case 6: //yyyymmddhhmmss $format_Time = $y . $m . $d . $h . $mi . $s; break; case 7: //mm-dd $format_Time = $m . '-' . $d; break; case 8: //yyyy年mm月dd日 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ':' . $s; break; case 9: //yyyy年mm月dd日H时mi分S秒 早上 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒,' . getDayStatus($h, 1); break; case 10: //yyyy年mm月dd日H时 $format_Time = $y . '年' . $m . '月' . $d . '日' . $h . '时'; break; case 11: //yyyy年mm月dd日H时mi分S秒 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分' . $s . '秒'; break; case 12: //yyyy年mm月dd日H时mi分 $format_Time = $y . '年' . $m . '月' . $d . '日' . ' ' . $h . '时' . $mi . '分'; break; case 13: //yyyy年mm月dd日H时mi分 早上 $format_Time = $m . '月' . $d . '日' . ' ' . $h . ':' . $mi . ' ' . getDayStatus($h, 0); break; case 14: //yyyy年mm月dd日 $format_Time = $y . '/' . $m . '/' . $d; break; case 15: //yyyy年mm月 第1周 $format_Time = $y . '年' . $m . '月 第' . GetCountPage($d, 7) . '周'; } return @$format_Time; }
echo " selected "; } echo ">" . $i . "\n"; } } echo "</select> \n"; } echo "</div></form>"; echo "</td>"; echo "<td align=right valign=middle width=33%>"; if ($allowsearch == 1 && $searchdayok == 1) { search(); } echo "</td></tr></table>"; } else { echo "<br/><div class=titlefont>" . translate("disabled") . ".</div>"; } } switch ($op) { // view per day case "day": day($ask, $date); break; // default: // default: default: day($ask, $date); break; } include 'cal_functions.inc.php'; include 'cal_footer.inc.php';
<?php if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) { header("HTTP/1.1 404 Not Found"); exit; } ob_start(); /* echo '<div style="text-align:center;"><!-- Histats.com START --> <script type="text/javascript" > var s_sid = 508946; var st_dominio = 4; var cimg = 30; var cwi =130; var che =80; </script> <script type="text/javascript" language="javascript" src="http://s10.histats.com/js9.js"></script> <noscript><p> <img src="http://s4.histats.com/stats/0.gif?508946&1" alt="cool hit counter" /></p> </noscript> <!-- Histats.com END --></div>'; */ echo "<table><tr><td>"; include "mod/statistik/counter.php"; include "mod/statistik/online.php"; include "mod/statistik/hits.php"; include "mod/statistik/useronline.php"; echo "\n<img src=\"{url}/images/8.gif\" border=\"0\" alt=\"\" /> Visitors :<b>{$theCount}</b> Users<br />\n<img src=\"{url}/images/9.gif\" border=\"0\" alt=\"\" /> Hits : <b>{$hits}</b> hits<br />\n<img src=\"{url}/images/10.gif\" border=\"0\" alt=\"\" /> Month : <b>" . month() . "</b> Users<br />\n<img src=\"{url}/images/8.gif\" border=\"0\" alt=\"\" /> Today : <b>" . day() . "</b> Users<br />\n<img src=\"{url}/images/9.gif\" border=\"0\" alt=\"\" /> Online : <b>" . useronline() . "</b> Member\n</td></tr></table><br />"; $out = ob_get_contents(); ob_end_clean();
function printDay($id, $three = false) { return day($id, $three); }
<?php include "mod/statistik/counter.php"; include "mod/statistik/online.php"; include "mod/statistik/hits.php"; include "mod/statistik/useronline.php"; echo '<img src="' . $url_situs . '/mod/statistik/images/visitor.png" alt="Visitors"/>Visitors : <b>' . $theCount . '</b><br> <img src="' . $url_situs . '/mod/statistik/images/hits.png" alt="Hits"/> Hits : <b>' . $hits . '</b><br> <img src="' . $url_situs . '/mod/statistik/images/month.png" alt="Month"/> Month : <b>' . month() . '</b><br> <img src="' . $url_situs . '/mod/statistik/images/today.png" alt="Today"/> Today : <b>' . day() . '</b><br>';
<?php if (preg_match('/' . basename(__FILE__) . '/', $_SERVER['PHP_SELF'])) { header("HTTP/1.1 404 Not Found"); exit; } include "mod/statistik/hits.php"; include "mod/statistik/counter.php"; echo '<table cellpadding="10"><tr><td valign="top"><img style="margin-right:5px; margin-top:5px; padding:1px;float:left;max-height:75px;max-width:75px;" src="images/logo.png"> </td><td valign="top"> <b>SpinS Interactional School</b><br> Jl. Karangan PDAM no 24 Wiyung – Surabaya 60228<br> Phone : ( 62-31) 7523999, Fax. : (62-31 ) - 7525310<br> Email : admin@spinschool.net, URL : http://www.spinschool.org </td>'; echo '<td width="8%"> </td>'; echo '<td> <b>Find Us On :</b><br> <a href="https://www.facebook.com/Spinschool" target="_blank"><img src="images/fb_logo2.png" width="50px"></a> <a href=""><img src="images/tw_logo.png" width="50px"></a> </td>'; echo '<td width="8%"> </td>'; echo "<td>"; echo "<img src=\"{$url_situs}/mod/statistik/images/visitor.png\" border=\"0\" alt=\"\" /> Visitors :<b>{$theCount}</b> Users<br />\n<img src=\"{$url_situs}/mod/statistik/images/hits.png\" border=\"0\" alt=\"\" /> Hits : <b>{$hits}</b> hits<br />\n<img src=\"{$url_situs}/mod/statistik/images/month.png\" border=\"0\" alt=\"\" /> Month : <b>" . month() . "</b> Users<br />\n<img src=\"{$url_situs}/mod/statistik/images/today.png\" border=\"0\" alt=\"\" /> Today : <b>" . day() . "</b> Users<br />"; echo "<td>"; echo '</tr></table>';
$str = ''; $list = array_chunk($list, 8); foreach ($list as $a => $b) { $morning = "-----上午-----\n"; $afternoon = "-----下午-----\n"; foreach ($b as $k => $v) { if ($v['gdpukb_num'] <= 3) { $morning .= $v['gdpukb_content'] . "\n"; } else { $afternoon .= $v['gdpukb_content'] . "\n"; } } if ($day != 0 & $day != 6 && $all != 'all') { $str .= "【 星 期 " . day($day) . " 】\n" . $morning . $afternoon . "\n"; } else { $str .= "【 星 期 " . day($a + 1) . " 】\n" . $morning . $afternoon . "\n"; } } echo $str; /* * 添加选修模块 $xuanxiu=xuanxiu($xh,$pw); */ function day($date) { if ($date == 0) { $day = "天"; } if ($date == 1) { $day = "一"; } if ($date == 2) {
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Toevoegen</title> <link rel="stylesheet" type="text/css" href="../common/main.css"> </head> <body> <h1>Nieuwe verjaardag</h1> <form action="create.php" method="post"> naam: <input type="text" name="name"><br> datum: <select name="day"> <?php echo day(); ?> </select> <select name="month"> <?php echo month(); ?> </select> <select name="year"> <?php echo year(); ?> </select>
function get_end($local_func) { switch ($local_func) { case 1: // Today // Today case 2: // Yesterday+ // Yesterday+ case 3: // This week // This week case 5: // Last week+ // Last week+ case 6: // This month // This month case 8: // This year return mysql_format_date(mktime(23, 59, 59, month(), day(), year())); // m, d, y -- date ('D, M j', // return mysql_format_date(now()); // m, d, y -- date ('D, M j', break; case 4: // Last week return mysql_format_date(monday() - 1); // m, d, y -- last monday break; case 7: // Last month return mysql_format_date(mktime(0, 0, 0, month(), 1, year())); // m, d, y -- date ('D, M j', break; case 9: // Last year return mysql_format_date(mktime(23, 59, 59, 12, 31, year() - 1)); // m, d, y -- date ('D, M j', break; default: echo __LINE__ . " error error error error error \n"; } }
</dd> <dt>Birthday</dt> <dd> <select name="strMonth" class="span2 selectpicker" data-live-search="true"> <option value="">-- Month --</option> <?php $month = month(); for ($x = 1; $x <= 12; $x++) { echo '<option value="' . $month[$x] . '">' . $month[$x] . '</option>'; } ?> </select> <select name="strDays" class="span2 selectpicker" data-live-search="true"> <option value="">-- Day --</option> <?php $day = day(); for ($x = 1; $x <= 31; $x++) { echo '<option value="' . $day[$x] . '">' . $day[$x] . '</option>'; } ?> </select> <select name="strYear" class="span2 selectpicker" data-live-search="true"> <option value="">-- Year --</option> <?php $year = year(); foreach ($year as $key => $val) { echo '<option value="' . $val . '">' . $val . '</option>'; } ?> </select> </dd>
?> </option> <?php } ?> </select>月 <select name="day"> <option value="">--</option> <?php for ($i = 1; $i <= 31; $i++) { ?> <option value="<?php echo $i; ?> " <?php if ($i == day($result[0]['birthday'])) { echo "selected"; } ?> ><?php echo $i; ?> </option> <?php } ?> </select>日 <br><br> 種別: <br>
function updateRank($gid, $item, $num = 1) { $weekMark = false; switch ($item) { case "comments_count": break; // $weekMark = 'view'; // break; // $weekMark = 'view'; // break; case "buy_count": $weekMark = 'buy'; break; case "rank_count": break; } if ($weekMark) { $aGstat = $this->getFieldById($gid, array('count_stat')); $count_stat = unserialize($aGstat['count_stat']); $dayNum = day(time()); $weekNum = $num; foreach ($count_stat[$weekMark] as $day => $countNum) { if ($dayNum > $day + 30) { unset($count_stat[$weekMark][$day]); } if ($dayNum < $day + 8) { $weekNum += $countNum; } } $count_stat[$weekMark][$dayNum] += $num; $sqlCol = ',' . $weekMark . '_w_count=' . intval($weekNum) . ', count_stat=\'' . serialize($count_stat) . '\''; } $sql = "UPDATE sdb_goods SET " . $item . " = " . $item . "+" . intval($num) . $sqlCol . " WHERE goods_id =" . intval($gid); return mysql_query($sql); //last_modify不做更新 }
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Is it friday yet?</title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <?php /* * 'Is it friday yet?' * Testing if I am knowledge able enough to make an 'Is it friday' page' */ $friday = "Friday"; function day($friday) { if (date("l") == $friday) { echo '<div id="friday">It\'s friday!'; } else { echo '<div id="weekdays">Get back to work!</div>'; } } ?> <body id="bg"> <?php day($friday); ?> </body> </html>
function shamsi($dat = '', $far = False) { $d = array(); for ($row = 1; $row <= 12; $row++) { $d[$row] = 0; } $dy = array(); for ($row = 1; $row <= 7; $row++) { $dy[$row] = ''; } $yy = year($dat); $d[1] = 31; if ($yy % 4 == 0) { $d[2] = 29; } else { $d[2] = 28; } $dy[1] = 'يکشنبه'; $dy[2] = 'دوشنبه'; $dy[3] = 'سه شنبه'; $dy[4] = 'چهار شنبه'; $dy[5] = 'پنج شنبه'; $dy[6] = 'جمعه'; $dy[7] = 'شنبه'; $d[3] = 31; $d[4] = 30; $d[5] = 31; $d[6] = 30; $d[7] = 31; $d[8] = 31; $d[9] = 30; $d[10] = 31; $d[11] = 30; $d[12] = 31; $mm = 0; for ($i = 1; $i <= month($dat) - 1; $i++) { $mm = $mm + $d[$i]; } $yy = $yy - 1; $dd = day($dat); $ldays = $yy * 365 + floor(($yy - 1) / 4) + $mm + $dd; //print "<br>ldays:".$ldays; $idays = $ldays - 226899; $ff = ltrim(month($dat)); $gg = ltrim(day($dat)); if (strlen($ff) < 2) { $ff = '0' . $ff; } if (strlen($gg) < 2) { $gg = '0' . $gg; } $hh = $ff . $gg; if ($hh < '0320' or $hh == '0320' and year($dat) / 4 != floor(year($dat) / 4)) { $yy = year($dat) - 622; } else { $yy = year($dat) - 621; } $mm = $idays - floor(($yy - 1) / 4) - ($yy - 1) * 365; $yy1 = year($dat) - 1; if ($yy1 / 4 == floor($yy1 / 4) and $hh <= '0320') { $mm = $mm + 1; } if (year($dat) / 2 == floor(year($dat) / 2) and year($dat) / 4 != floor(year($dat) / 4) and $hh <= '0320') { $mm = $mm - 1; } if ($mm <= 186) { $dd = $mm % 31; if ($dd == 0) { $dd = 31; $mm = floor($mm / 31); } else { $mm = floor($mm / 31) + 1; } } else { $mm = $mm - 186; $dd = $mm % 30; if ($dd == 0) { $dd = 30; $mm = floor($mm / 30) + 6; } else { $mm = floor($mm / 30) + 7; } } if ($far) { $qstr = strr($yy, 4) . '/'; if ($mm < 10) { $qstr = $qstr . '0' . strr($mm, 1) . '/'; } else { $qstr = $qstr . strr($mm, 2) . '/'; } if ($dd < 10) { $qstr = $qstr . '0' . strr($dd, 1); } else { $qstr = $qstr . strr($dd, 2); } // $qstr=strr($yy,4).'/'.strr($mm,2).'/'.strr($dd,2); } else { $yy = $yy % 100; $qstr = strr($yy, 2) . '/'; if ($mm < 10) { $qstr = $qstr . '0' . strr($mm, 1) . '/'; } else { $qstr = $qstr . strr($mm, 2) . '/'; } if ($dd < 10) { $qstr = $qstr . '0' . strr($dd, 1); } else { $qstr = $qstr . strr($dd, 2); } } return $qstr; }
echo $birthday["person"]; ?> </h1> <form action="edit.php?id=<?php echo $_GET["id"]; ?> " method="post"> naam: <input type="text" value="<?php echo $birthday["person"]; ?> " name="name"><br> datum: <select name="day"> <?php echo day($birthday['day']); ?> </select> <select name="month"> <?php echo month($birthday['month']); ?> </select> <select name="year"> <?php echo year($birthday['year']); ?> </select>