当前位置: 首页>>代码示例>>PHP>>正文


PHP fetchData函数代码示例

本文整理汇总了PHP中fetchData函数的典型用法代码示例。如果您正苦于以下问题:PHP fetchData函数的具体用法?PHP fetchData怎么用?PHP fetchData使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了fetchData函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: boxesInstagram

function boxesInstagram($user_id)
{
    $boxes = array();
    function fetchData($url)
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($ch, CURLOPT_TIMEOUT, 20);
        $result = curl_exec($ch);
        curl_close($ch);
        return $result;
    }
    $result = fetchData('https://api.instagram.com/v1/users/' . $user_id . '/media/recent/?access_token=10392439.44b554e.ab889407055b456381897320866ab6b7');
    $result = json_decode($result);
    $i = 0;
    foreach ($result->data as $post) {
        $boxes[$i]['type'] = $post->type;
        $boxes[$i]['id'] = $post->id;
        $boxes[$i]['image_url'] = $post->images->low_resolution->url;
        //$boxes[$i]['date'] = date( "D n/j" , strtotime( $post->created_time ) );
        $boxes[$i]['text'] = $post->caption->text;
        $boxes[$i]['link'] = $post->link;
        $i++;
    }
    return $boxes;
}
开发者ID:ThatGuySam,项目名称:warp-drive,代码行数:27,代码来源:boxes.php

示例2: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $align;
     global $length;
     global $colArr;
     global $title;
     global $kdOrg;
     global $tgl;
     # Bulan
     // $optBulan =
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     $this->SetFont('Arial', '', 8);
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['kodeorg'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $_SESSION['empl']['lokasitugas'], '', 0, 'L');
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['user'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, $_SESSION['standard']['username'], 0, 0, 'L');
     $this->Ln();
     $query2 = selectQuery($dbname, 'organisasi', 'namaorganisasi', "kodeorganisasi='" . $kdOrg . "'");
     $orgData2 = fetchData($query2);
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['kebun'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $orgData2[0]['namaorganisasi'], '', 0, 'L');
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, date('d-m-Y H:i:s'), '', 1, 'L');
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['periode'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $tgl[1] . "-" . $tgl[0], '', 0, 'L');
     $this->Ln();
     $this->SetFont('Arial', 'U', 12);
     $this->Cell($width, $height, $title, 0, 1, 'C');
     $this->Ln();
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(220, 220, 220);
     // $this->Cell(10/100*$width,$height,'No',1,0,'C',1);
     foreach ($colArr as $key => $head) {
         $this->Cell($length[$key] / 100 * $width, $height, $_SESSION['lang'][$head], 1, 0, 'C', 1);
     }
     $this->Ln();
 }
开发者ID:halimc17,项目名称:magsys,代码行数:60,代码来源:kebun_2curahHujanPdf.php

示例3: getHookImages

function getHookImages($hook, $count)
{
    $sql = e107::getDb();
    $pref = e107::pref('imggregator');
    $count = isset($count) ? $count : $pref['imagesToFetch'];
    $tokens = explode(';', $sql->retrieve('hooks', 'hook_tokens', 'hook_name="' . $hook . '"'));
    if ($hook == 'instagram') {
        $user_id = explode(':', $tokens[0]);
        $access_token = explode(':', $tokens[1]);
        $url = fetchData('https://api.instagram.com/v1/users/' . $user_id[1] . '/media/recent/?access_token=' . $access_token[1] . '&count=' . $count);
        $result = json_decode($url);
        $i = 0;
        foreach ($result->data as $image) {
            copy($image->images->standard_resolution->url, 'images/instagram' . $i . '.jpg');
            $i++;
            //$images[] = $image->images->standard_resolution->url;
        }
    } else {
        if ($hook == 'flickr') {
            $user_id = explode(':', $tokens[0]);
            $api_key = explode(':', $tokens[1]);
            $xml = simplexml_load_file('https://api.flickr.com/services/rest/?method=flickr.people.getPublicPhotos&api_key=' . $api_key[1] . '&user_id=' . urlencode($user_id[1]) . '&format=rest');
            $i = 0;
            foreach ($xml->photos->photo as $photo) {
                if ($photo['ispublic'] == 1) {
                    copy('https://farm' . $photo['farm'] . '.staticflickr.com/' . $photo['server'] . '/' . $photo['id'] . '_' . $photo['secret'] . '.jpg', 'images/flickr' . $i . '.jpg');
                    $i++;
                    //$images[] .= 'https://farm'.$photo['farm'].'.staticflickr.com/'.$photo['server'].'/'.$photo['id'].'_'.$photo['secret'].'.jpg';
                }
            }
        }
    }
    return $images;
}
开发者ID:septor,项目名称:imggregator,代码行数:34,代码来源:_class.php

示例4: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $align;
     global $length;
     global $colArr;
     global $title;
     global $periode;
     //$periode=$_GET['column'];
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     $this->SetFont('Arial', '', 8);
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['user'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, ucfirst($_SESSION['standard']['username']), '', 0, 'L');
     /*   $this->Cell((20/100*$width)-5,$height,$_SESSION['lang']['periode'],'',0,'L');
          $this->Cell(5,$height,':','',0,'L');
          $this->Cell(15/100*$width,$height, $periode,0,0,'L');*/
     $this->Ln();
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, date('d-m-Y H:i:s'), '', 0, 'L');
     $this->Ln();
     $this->SetFont('Arial', 'U', 12);
     $this->Cell($width, $height, $_SESSION['lang']['rekomendasiPupuk'], 0, 1, 'C');
     $this->Ln();
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(220, 220, 220);
     // $this->Cell(10/100*$width,$height,'No',1,0,'C',1);
     /*foreach($colArr as $key=>$head) {
           $this->Cell($length[$key]/100*$width,$height,$_SESSION['lang'][$head],1,0,'C',1);
       }*/
     $this->Cell(3 / 100 * $width, $height, 'No', 1, 0, 'C', 1);
     $this->Cell(12 / 100 * $width, $height, $_SESSION['lang']['tahunpupuk'], 1, 0, 'C', 1);
     $this->Cell(21 / 100 * $width, $height, $_SESSION['lang']['afdeling'], 1, 0, 'C', 1);
     $this->Cell(12 / 100 * $width, $height, $_SESSION['lang']['blok'], 1, 0, 'C', 1);
     $this->Cell(13 / 100 * $width, $height, $_SESSION['lang']['tahuntanam'], 1, 0, 'C', 1);
     $this->Cell(16 / 100 * $width, $height, $_SESSION['lang']['jenisPupuk'], 1, 0, 'C', 1);
     $this->Cell(7 / 100 * $width, $height, $_SESSION['lang']['dosis'], 1, 0, 'C', 1);
     $this->Cell(7 / 100 * $width, $height, $_SESSION['lang']['satuan'], 1, 0, 'C', 1);
     $this->Cell(10 / 100 * $width, $height, $_SESSION['lang']['jenisbibit'], 1, 1, 'C', 1);
 }
开发者ID:halimc17,项目名称:magsys,代码行数:58,代码来源:kebun_slave_rekomendasipupukPdf.php

示例5: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $align;
     global $length;
     global $colArr;
     global $title;
     global $nopp;
     global $tglSdt;
     global $statPP;
     $kdorg = explode("/", $nopp);
     # Bulan
     // $optBulan =
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     $this->SetFont('Arial', '', 8);
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['user'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $_SESSION['standard']['username'], '', 0, 'L');
     $this->Ln();
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, date('d-m-Y H:i:s'), '', 0, 'L');
     $this->Ln();
     $this->Ln();
     $this->Ln();
     $this->SetFont('Arial', 'B', 10);
     $this->Cell($width, $height, strtoupper($_SESSION['lang']['riwayatPP']), 0, 1, 'C');
     $this->SetFont('Arial', 'B', 7);
     $this->SetFillColor(220, 220, 220);
     $this->Ln();
     $this->Cell(3 / 100 * $width, $height, 'No.', 1, 0, 'C', 1);
     $this->Cell(8 / 100 * $width, $height, $_SESSION['lang']['nopp'], 1, 0, 'C', 1);
     $this->Cell(18 / 100 * $width, $height, $_SESSION['lang']['namabarang'], 1, 0, 'C', 1);
     $this->Cell(18 / 100 * $width, $height, $_SESSION['lang']['status'], 1, 0, 'C', 1);
     $this->Cell(10 / 100 * $width, $height, $_SESSION['lang']['nopo'], 1, 0, 'C', 1);
     $this->Cell(5 / 100 * $width, $height, $_SESSION['lang']['tanggal'] . " PO", 1, 0, 'C', 1);
     $this->Cell(12 / 100 * $width, $height, $_SESSION['lang']['status'] . " PO", 1, 0, 'C', 1);
     $this->Cell(10 / 100 * $width, $height, $_SESSION['lang']['namasupplier'], 1, 0, 'C', 1);
     $this->Cell(10 / 100 * $width, $height, $_SESSION['lang']['rapbNo'], 1, 0, 'C', 1);
     $this->Cell(5 / 100 * $width, $height, $_SESSION['lang']['tanggal'], 1, 1, 'C', 1);
 }
开发者ID:halimc17,项目名称:magsys,代码行数:58,代码来源:log_slave_2riwayatPPpdf.php

示例6: getParam

 /**
  * getParam
  * Get Parameter Jurnal based on kodeaplikasi dan kodejurnal
  */
 public function getParam($holding, $kodeApp, $kodeJurnal)
 {
     global $dbname;
     $qParam = selectQuery($dbname, 'keu_5parameterjurnal', 'noakundebet,noakunkredit,sampaidebet,sampaikredit', "kodeorg='" . $holding . "' and kodeaplikasi='" . $kodeApp . "' and jurnalid='" . $kodeJurnal . "' and aktif=1");
     $resParam = fetchData($qParam);
     if (empty($resParam)) {
         return array();
     } else {
         return $resParam[0];
     }
 }
开发者ID:halimc17,项目名称:magsys,代码行数:15,代码来源:zJournal.php

示例7: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $bulan;
     global $tahun;
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $sPeriode = "select distinct periode from " . $dbname . ".setup_periodeakuntansi where kodeorg='" . $_SESSION['empl']['lokasitugas'] . "'\r\n            and tutupbuku = 0";
     $qPeriode = mysql_query($sPeriode) or die(mysql_error());
     $rPeriode = mysql_fetch_assoc($qPeriode);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     $this->SetFont('Arial', '', 8);
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['kodeorg'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $_SESSION['empl']['lokasitugas'], '', 0, 'L');
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['periode'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, $rPeriode['periode'], 0, 0, 'L');
     $this->Ln();
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['user'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(45 / 100 * $width, $height, $_SESSION['standard']['username'], '', 0, 'L');
     $this->Cell(20 / 100 * $width - 5, $height, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, date('d-m-Y H:i:s'), '', 1, 'L');
     $this->Ln();
     $this->SetFont('Arial', 'U', 12);
     $this->Cell($width, $height, strtoupper($this->_title), 0, 1, 'C');
     if ($this->_noThead == false) {
         $this->Ln();
         $this->SetFont('Arial', 'B', 9);
         $this->SetFillColor(220, 220, 220);
         foreach ($this->_colArr as $key => $head) {
             $this->Cell($this->_length[$key] / 100 * $width, $height, $_SESSION['lang'][$head], 1, 0, 'C', 1);
         }
         $this->Ln();
     }
 }
开发者ID:halimc17,项目名称:magsys,代码行数:53,代码来源:zPdfMaster.php

示例8: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $tmpBar;
     $strx = "select b.namaorganisasi from " . $dbname . ".datakaryawan a \r\n\t\t\t\tleft join " . $dbname . ".organisasi b on a.kodeorganisasi=b.kodeorganisasi\r\n\t\t\t\twhere a.karyawanid=" . $tmpBar->karyawanid;
     $resOrg = fetchData($strx);
     $this->SetFillColor(255, 255, 255);
     $this->SetMargins(15, 10, 0);
     $path = 'images/logo.jpg';
     $this->Image($path, 15, 5, 30);
     $this->SetFont('Arial', '', 6);
     $this->SetX(163);
     $this->Cell(30, 10, 'PRINT TIME : ' . date('d-m-Y H:i:s'), 0, 1, 'L');
     $this->Ln();
 }
开发者ID:halimc17,项目名称:magsys,代码行数:16,代码来源:sdm_slave_printSP_pdf.php

示例9: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $align;
     global $length;
     global $colArr;
     global $title;
     global $dataTR;
     $dataTR = explode(",", $_GET['column']);
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     //                $this->SetFont('Arial','',8);
     //                $this->Cell((20/100*$width)-5,$height,$_SESSION['lang']['user'],'',0,'L');
     //                $this->Cell(5,$height,':','',0,'L');
     //                $this->Cell(45/100*$width,$height,$_SESSION['standard']['username'],'',0,'L');
     //
     //                $this->Ln();
     //                $this->Cell((20/100*$width)-5,$height,$_SESSION['lang']['tanggal'],'',0,'L');
     //                $this->Cell(5,$height,':','',0,'L');
     //                $this->Cell(45/100*$width,$height,date('d-m-Y H:i:s'),'',0,'L');
     $this->Ln();
     $this->SetFont('Arial', 'U', 11);
     $this->Cell($width, $height, $_SESSION['lang']['pengirimanBibit'], 0, 1, 'C');
     $this->Ln(35);
     //                $this->SetFont('Arial','B',9);
     //                $this->SetFillColor(220,220,220);
     // $this->Cell(10/100*$width,$height,'No',1,0,'C',1);
     /*foreach($colArr as $key=>$head) {
           $this->Cell($length[$key]/100*$width,$height,$_SESSION['lang'][$head],1,0,'C',1);
       }*/
 }
开发者ID:halimc17,项目名称:magsys,代码行数:47,代码来源:kebun_slavepengirimanBibitPdf.php

示例10: main

function main()
{
    $serviceUrl = 'https://service.berlin.de/terminvereinbarung/termin/tag.php?termin=1&anliegen[]=%s&Datum=%s&dienstleisterlist=%s';
    $officeList = [150230, 122301, 122297, 122294, 122210, 122217, 122219, 122227, 122280, 122282, 122284];
    $date = time();
    // Change accordingly....
    $serviceType = '120686';
    // This one is for Almendung
    // Generate the URL with all the offices we need
    $url = sprintf($serviceUrl, $serviceType, $date, implode(',', $officeList));
    // Fetch the data from our URL
    $data = fetchData($url);
    // Parse received data from berlin.de
    $finalLinks = parseData($data);
    // Render links for booking if found
    renderResults($finalLinks);
}
开发者ID:kennycoder,项目名称:etc,代码行数:17,代码来源:berlin-termin.php

示例11: Header

 function Header()
 {
     global $conn;
     global $dbname;
     global $periode;
     $cols = 247.5;
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 20;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 3, $this->lMargin + $width, $this->tMargin + $height * 3);
     $this->SetFont('Arial', 'B', 10);
     $this->Cell($width, $height, "Laporan Biaya per Blok ", '', 0, 'C');
     $this->Ln();
     $this->Cell($width, $height, strtoupper($_SESSION['lang']['periode']) . " : " . substr($periode, 5, 2) . "-" . substr($periode, 0, 4), '', 0, 'C');
     $this->Ln();
     $this->SetFont('Arial', 'B', 10);
     $this->SetFillColor(220, 220, 220);
     $this->SetX(80);
     $this->Cell(7 / 100 * $width, $height, "No.", 1, 0, 'C', 1);
     $this->Cell(15 / 100 * $width, $height, $_SESSION['lang']['kodeblok'], 1, 0, 'C', 1);
     $this->Cell(14 / 100 * $width, $height, $_SESSION['lang']['tahuntanam'], 1, 0, 'C', 1);
     $this->Cell(15 / 100 * $width, $height, $_SESSION['lang']['luas'], 1, 0, 'C', 1);
     $this->Cell(15 / 100 * $width, $height, $_SESSION['lang']['statusblok'], 1, 0, 'C', 1);
     $this->Cell(15 / 100 * $width, $height, $_SESSION['lang']['totalbiaya'], 1, 0, 'C', 1);
 }
开发者ID:halimc17,项目名称:magsys,代码行数:36,代码来源:kebun_slave_3LaporanBiayaPerBlok_12112015.php

示例12: exit

<?php

require_once 'master_validation.php';
require_once 'config/connection.php';
require_once 'lib/zLib.php';
$lokasibaru = $_POST['lokasibaru'];
if ($_SESSION['empl']['lokasitugas'] == $lokasibaru) {
    exit("Warning: Lokasi Tugas sama dengan lokasi saat ini");
}
$qPt = "select induk from " . $dbname . ".organisasi where kodeorganisasi='" . $lokasibaru . "'";
$resPt = fetchData($qPt);
$pt = $resPt[0]['induk'];
$data = array('lokasitugas' => array('old' => $_SESSION['empl']['lokasitugas'], 'new' => $lokasibaru), 'kodeorganisasi' => array('old' => $_SESSION['org']['kodeorganisasi'], 'new' => $pt));
$strInsHis = "insert into " . $dbname . ".hist_datakaryawan(updatetime,updateby,karyawanid,data) values ('" . date('Y-m-d H:i:s') . "','" . $_SESSION['standard']['userid'] . "','" . $_SESSION['standard']['userid'] . "','" . json_encode($data) . "')";
// echo $strInsHis;exit('error');
mysql_query($strInsHis);
$str = "update " . $dbname . ".datakaryawan set kodeorganisasi='" . $pt . "',\r\n\t      lokasitugas='" . $lokasibaru . "', updateby=" . $_SESSION['standard']['userid'] . "\r\n\t       where karyawanid=" . $_SESSION['standard']['userid'];
if (mysql_query($str)) {
    echo "Updated";
} else {
    echo " Gagal," . addslashes(mysql_error($conn));
}
开发者ID:halimc17,项目名称:magsys,代码行数:22,代码来源:setup_slave_save_pindahLokasi.php

示例13: error_log

    include $cacheFile;
    exit;
}
error_log("No cache file found; generating page...");
ob_start();
function fetchData()
{
    global $greyVid, $bradyVids, $lastUpdate;
    $greyVid = sqlQuery("SELECT * FROM Video WHERE creator='C.G.P. Grey' ORDER BY uploaddate DESC LIMIT 1")[0];
    $bradyVids = sqlQuery("SELECT * FROM Video WHERE creator='Brady Haran' AND uploaddate > \$1 ORDER BY uploaddate DESC", array($greyVid["uploaddate"]));
    $lastUpdate = sqlQuery("SELECT * FROM UpdateLog ORDER BY updatedatetime DESC LIMIT 1")[0]['updatedatetime'];
}
fetchData();
if (!$greyVid || !$lastUpdate) {
    update_with_api();
    fetchData();
    // Use the newly-found data
}
function echoVidRow($vid)
{
    $creator = $vid['creator'];
    $channel = $vid['channel'];
    $uploaded = $vid['uploaddate'];
    $uploaded = strftime('%B %d, %Y @ %I:%M %p', strtotime($uploaded));
    $views = $vid['viewcount'];
    $title = $vid['title'];
    $url = "http://youtube.com/watch?v=" . $vid['youtubeid'];
    if ($views == 301) {
        $views = '<a href="http://youtube.com/watch?v=oIkhgagvrjI">301</a>';
        // EASTER EGG!
    } elseif ($views == -1) {
开发者ID:abhinav4848,项目名称:Veritasium-Collector,代码行数:31,代码来源:classic.php

示例14: Header

 function Header()
 {
     global $kodeorg;
     global $thnbudget;
     global $lebar1;
     global $lebar2;
     global $lebar3;
     global $lebar4;
     global $lebar5;
     global $lebar6;
     global $dbname;
     global $kgolah;
     global $jenis;
     global $kgoil;
     global $kgkernel;
     global $kgcpo;
     # Bulan
     // $optBulan =
     # Alamat & No Telp
     $query = selectQuery($dbname, 'organisasi', 'alamat,telepon', "kodeorganisasi='" . $_SESSION['org']['kodeorganisasi'] . "'");
     $orgData = fetchData($query);
     $width = $this->w - $this->lMargin - $this->rMargin;
     $height = 12;
     $path = 'images/logo.jpg';
     $this->Image($path, $this->lMargin, $this->tMargin, 0, 55);
     $this->SetFont('Arial', 'B', 9);
     $this->SetFillColor(255, 255, 255);
     $this->SetX(100);
     $this->Cell($width - 100, $height, $_SESSION['org']['namaorganisasi'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, $orgData[0]['alamat'], 0, 1, 'L');
     $this->SetX(100);
     $this->Cell($width - 100, $height, "Tel: " . $orgData[0]['telepon'], 0, 1, 'L');
     $this->Line($this->lMargin, $this->tMargin + $height * 4, $this->lMargin + $width, $this->tMargin + $height * 4);
     $this->Ln();
     $this->SetFont('Arial', '', 8);
     $this->Cell(10 / 100 * $width - 5, $height, $_SESSION['lang']['produksi'] . " PP", '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(8 / 100 * $width, $height, number_format($kgoil / 1000 . 'Ton', 0, ".", ","), '', 0, 'R');
     $this->Cell(52 / 100 * $width, $height, '', '', 0, 'L');
     $this->Cell(10 / 100 * $width - 5, $height, 'Printed By', '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, $_SESSION['empl']['name'], '', 1, 'L');
     $this->Cell(10 / 100 * $width - 5, $height, $_SESSION['lang']['produksi'] . " CPO", '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(8 / 100 * $width, $height, number_format($kgcpo / 1000 . 'Ton', 0, ".", ","), '', 0, 'R');
     $this->Cell(52 / 100 * $width, '', '', 0, 'L');
     $this->Cell(10 / 100 * $width - 5, $height, $_SESSION['lang']['tanggal'], '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(15 / 100 * $width, $height, date('d-m-Y H:i:s'), '', 1, 'L');
     $this->Cell(10 / 100 * $width - 5, $height, $_SESSION['lang']['produksi'] . " KER", '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(8 / 100 * $width, $height, number_format($kgkernel / 1000 . 'Ton', 0, ".", ","), '', 1, 'R');
     $this->Cell(10 / 100 * $width - 5, $height, 'TBS', '', 0, 'L');
     $this->Cell(5, $height, ':', '', 0, 'L');
     $this->Cell(8 / 100 * $width, $height, number_format($kgolah / 1000 . 'Ton', 0, ".", ","), '', 0, 'R');
     $title = "BUDGET BIAYA " . $jenis . " PKS " . $kodeorg . "  " . $thnbudget;
     $this->Ln();
     $this->SetFont('Arial', 'U', 10);
     $this->Cell($width, $height, $title, 0, 1, 'C');
     $this->Ln();
     $this->SetFont('Arial', '', 9);
     $this->SetFillColor(220, 220, 220);
     $this->Cell($lebar1 / 100 * $width, $height, $_SESSION['lang']['nourut'], 1, 0, 'C', 1);
     $this->Cell($lebar2 / 100 * $width, $height, $_SESSION['lang']['noakun'], 1, 0, 'C', 1);
     $this->Cell($lebar3 / 100 * $width, $height, $_SESSION['lang']['namaakun'], 1, 0, 'C', 1);
     $this->Cell($lebar4 / 100 * $width, $height, $_SESSION['lang']['jumlahrp'], 1, 0, 'C', 1);
     $this->Cell($lebar5 / 100 * $width, $height, $_SESSION['lang']['rpperkg'], 1, 0, 'C', 1);
     for ($i = 1; $i <= 12; $i++) {
         if (strlen($i) == 1) {
             $ii = "0" . $i;
         } else {
             $ii = $i;
         }
         if ($i != 12) {
             $this->Cell($lebar6 / 100 * $width, $height, $ii . '(Rp)', 1, 0, 'C', 1);
         } else {
             $this->Cell($lebar6 / 100 * $width, $height, $ii . '(Rp)', 1, 1, 'C', 1);
         }
     }
 }
开发者ID:halimc17,项目名称:magsys,代码行数:81,代码来源:bgt_laporan_RPKG_pks_pdf.php

示例15: fetchData

         $resData[$resAbsn['karyawanid']][] = $resAbsn['karyawanid'];
     }
 }
 $sKehadiran = "select absensi,tanggal,karyawanid,notransaksi,umr from " . $dbname . ".kebun_kehadiran_vw \n            where tanggal between  '" . $tgl1 . "' and '" . $tgl2 . "' and kodeorg like '%" . $unit . "%'";
 //exit("Error".$sKehadiran);
 $rkehadiran = fetchData($sKehadiran);
 foreach ($rkehadiran as $khdrnBrs => $resKhdrn) {
     if ($resKhdrn['absensi'] != '') {
         $umrList[$resKhdrn['karyawanid']][$resKhdrn['tanggal']][] = array('umr' => $resKhdrn['umr']);
         $hasilAbsn[$resKhdrn['karyawanid']][$resKhdrn['tanggal']][] = array('absensi' => $resKhdrn['absensi']);
         $resData[$resKhdrn['karyawanid']][] = $resKhdrn['karyawanid'];
     }
 }
 $sPrestasi = "select a.upahkerja,b.tanggal,a.jumlahhk,a.nik,a.notransaksi from " . $dbname . ".kebun_prestasi a left join " . $dbname . ".kebun_aktifitas b on a.notransaksi=b.notransaksi \n            where b.notransaksi like '%PNN%' and b.kodeorg like '%" . $unit . "%' and b.tanggal between '" . $tgl1 . "' and '" . $tgl2 . "'";
 //exit("Error".$sPrestasi);
 $rPrestasi = fetchData($sPrestasi);
 foreach ($rPrestasi as $presBrs => $resPres) {
     //$umrList[$resKhdrn['karyawanid']][$resKhdrn['tanggal']][]=array('umr'=>$resKhdrn['upahkerja']);
     $umrList[$resPres['nik']][$resPres['tanggal']][] = array('umr' => $resPres['upahkerja']);
     $hasilAbsn[$resPres['nik']][$resPres['tanggal']][] = array('absensi' => 'H');
     $notran[$resPres['nik']][$resPres['tanggal']] .= 'BKM:' . $resPres['notransaksi'] . '__';
     $resData[$resPres['nik']][] = $resPres['nik'];
 }
 //print_r($umrList);
 // ambil pengawas
 $dzstr = "SELECT tanggal,nikmandor,a.notransaksi FROM " . $dbname . ".kebun_aktifitas a\n    left join " . $dbname . ".kebun_prestasi b on a.notransaksi=b.notransaksi\n    left join " . $dbname . ".datakaryawan c on a.nikmandor=c.karyawanid\n    where a.tanggal between '" . $tgl1 . "' and '" . $tgl2 . "' and b.kodeorg like '%" . $unit . "%' and c.namakaryawan is not NULL\n    union select tanggal,nikmandor1,a.notransaksi FROM " . $dbname . ".kebun_aktifitas a \n    left join " . $dbname . ".kebun_prestasi b on a.notransaksi=b.notransaksi\n    left join " . $dbname . ".datakaryawan c on a.nikmandor1=c.karyawanid\n    where a.tanggal between '" . $tgl1 . "' and '" . $tgl2 . "' and b.kodeorg like '%" . $unit . "%' and c.namakaryawan is not NULL";
 //exit("Error".$dzstr." ".mysql_error($conn));
 $dzres = mysql_query($dzstr);
 while ($dzbar = mysql_fetch_object($dzres)) {
     $umrList[$dzbar->nikmandor][$dzbar->tanggal][] = array('umr' => 'ind');
     $hasilAbsn[$dzbar->nikmandor][$dzbar->tanggal][] = array('absensi' => 'H');
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_3tjabsen.php


注:本文中的fetchData函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。