• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP fetchData函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: fetchData

				<?php 
    }
}
?>
				</ul>

			</div>
			<div class="clear"></div>
			<hr />
			<br />
			</div>
		</div>
		<div class="class_right">
		<?php 
$instaUrl = "https://api.instagram.com/v1/users/1181790550/media/recent/?access_token=1181790550.5b9e1e6.241cfbd9499840d0ae20eebf2b8ece4c&count=6";
$insta_res = fetchData($instaUrl);
// print_r($insta_res);
$insta_res = json_decode($insta_res);
?>
			<div class="side-youtube">
		 		<h2>Instagram:</h2>
		<?php 
foreach ($insta_res->data as $post) {
    if (!empty($post->caption->text)) {
        echo '<div class="img"><a class="instagram-unit" target="_blank" href="' . $post->link . '">
        <img src="' . $post->images->low_resolution->url . '" alt="' . $post->caption->text . '" width="100%" height="auto" /></a></div>';
        ?>
       			
       	<?php 
    }
}
开发者ID:Kylemurray25,项目名称:wmlmusicguide,代码行数:31,代码来源:index.php


示例17: foreach

$bpjsSehat = $dSehat['bebankaryawan'];
#masukin BPJS Tenaga Kerja ke sini
foreach ($umrbulanan as $key => $nilai) {
    if ($bpjstenaga[$key] != '') {
        $readyData[] = array('kodeorg' => $param['kodeorg'], 'periodegaji' => $param['periodegaji'], 'karyawanid' => $key, 'idkomponen' => 3, 'jumlah' => $bpjsKerja / 100 * $nilai, 'pengali' => 1);
    }
}
#masukin BPJS kesehatan ke sini
foreach ($umrbulanan as $key => $nilai) {
    if ($bpjskes[$key] != '') {
        $readyData[] = array('kodeorg' => $param['kodeorg'], 'periodegaji' => $param['periodegaji'], 'karyawanid' => $key, 'idkomponen' => 44, 'jumlah' => $bpjsSehat / 100 * $nilai, 'pengali' => 1);
    }
}
//calculate to component
$strx = "select id as komponen, case plus when 0 then -1 else plus end as pengali,name as nakomp \r\n              FROM " . $dbname . ".sdm_ho_component";
$comRes = fetchData($strx);
$comp = array();
$nakomp = array();
foreach ($comRes as $idx => $row) {
    $comp[$row['komponen']] = $row['pengali'];
    $nakomp[$row['komponen']] = $row['nakomp'];
}
//=tampilan  ============================
$listbutton = "<button class=mybuttton name=postBtn id=postBtn onclick=post()>Proses</button>";
$list0 = "<table class=sortable border=0 cellspacing=1>\r\n                     <thead>\r\n                     <tr class=rowheader>";
$list0 .= "<td>" . $_SESSION['lang']['nomor'] . "</td>";
$list0 .= "<td>" . $_SESSION['lang']['periodegaji'] . "</td>";
$list0 .= "<td>" . $_SESSION['lang']['karyawanid'] . "</td>";
$list0 .= "<td>" . $_SESSION['lang']['tipe'] . "</td>";
$list0 .= "<td>" . $_SESSION['lang']['jumlah'] . "</td></tr></thead><tbody>";
//periksa gaji minus
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:sdm_slave_3prosesgjharian.php


示例18: open_body

//@Copy nangkoelframework
require_once 'master_validation.php';
include 'lib/nangkoelib.php';
include_once 'lib/zLib.php';
echo open_body();
include 'master_mainMenu.php';
OPEN_BOX('', '<b>' . strtoupper($_SESSION['lang']['daftaroperator']) . '</b>');
//1 O
?>

<script type="text/javascript" src="js/vhc_daftaroperator.js" /></script>
<div id="action_list">
<?php 
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi');
$sOrg = "select distinct kodetraksi from " . $dbname . ".vhc_5master order by kodetraksi asc";
$qOrg = fetchData($sOrg);
$optPt = "";
foreach ($qOrg as $brsOrg) {
    $optPt .= "<option value=" . $brsOrg['kodetraksi'] . ">" . $optOrg[$brsOrg['kodetraksi']] . "</option>";
}
$optJns = "<option value=>" . $_SESSION['lang']['all'] . "</option>";
$sJvhc = "select distinct jenisvhc,namajenisvhc from " . $dbname . ".vhc_5jenisvhc order by namajenisvhc asc";
$qJvhc = mysql_query($sJvhc) or die(mysql_error($sJvhc));
while ($rJvhc = mysql_fetch_assoc($qJvhc)) {
    $optJns .= "<option value=" . $rJvhc['jenisvhc'] . ">" . $rJvhc['namajenisvhc'] . "</option>";
}
$optper = "<option value=''>" . $_SESSION['lang']['all'] . "</option>";
$sTgl = "select distinct substr(tanggal,1,7) as periode from " . $dbname . ".vhc_penggantianht order by tanggal desc";
$qTgl = mysql_query($sTgl) or die(mysql_error());
while ($rTgl = mysql_fetch_assoc($qTgl)) {
    $optper .= "<option value='" . $rTgl['periode'] . "'>" . substr($rTgl['periode'], 5, 2) . "-" . substr($rTgl['periode'], 0, 4) . "</option>";
开发者ID:halimc17,项目名称:magsys,代码行数:31,代码来源:vhc_daftaroperator.php


示例19: mysql_query

$pdf->Ln();
$ko = 0;
$pdf->Cell(20, 1.5 * $height, 'No.', 'TBLR', 0, 'C');
$pdf->Cell(120, 1.5 * $height, $_SESSION['lang']['nama'] . ' / ' . $_SESSION['lang']['kodejabatan'], 'TBLR', 0, 'C');
$pdf->Cell(70, 1.5 * $height, $_SESSION['lang']['lokasitugas'], 'TBLR', 0, 'C');
$pdf->Cell(100, 1.5 * $height, $_SESSION['lang']['keputusan'], 'TBLR', 0, 'C');
$pdf->Cell(240, 1.5 * $height, $_SESSION['lang']['note'], 'TBLR', 0, 'C');
$pdf->Ln();
$sCek = "select nopp from " . $dbname . ".log_prapodt where nopp='" . $column . "'";
//echo $sCek;exit();
$qCek = mysql_query($sCek) or die(mysql_error());
$rCek = mysql_num_rows($qCek);
if ($rCek > 0) {
    $qp = "select * from " . $dbname . ".`log_prapoht` where `nopp`='" . $column . "'";
    //echo $qp;
    $qyr = fetchData($qp);
    foreach ($qyr as $hsl) {
        for ($i = 1; $i < 6; $i++) {
            if ($hsl['hasilpersetujuan' . $i] == 1) {
                $b['status'] = $_SESSION['lang']['disetujui'];
            } elseif ($hsl['hasilpersetujuan' . $i] == 3) {
                $b['status'] = $_SESSION['lang']['ditolak'];
            } elseif ($hsl['hasilpersetujuan' . $i] == '' || $hsl['hasilpersetujuan' . $i] == 0) {
                $b['status'] = $_SESSION['lang']['wait_approve'];
            }
            if ($hsl['persetujuan' . $i] != 00) {
                $sql = "select * from " . $dbname . ".`datakaryawan` where `karyawanid`='" . $hsl['persetujuan' . $i] . "'";
                //echo $sql;//exit();
                $keterangan = $hsl['komentar' . $i];
                $tanggal = tanggalnormal($hsl['tglp' . $i]);
                $query = mysql_query($sql) or die(mysql_error());

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP fetchOne函数代码示例发布时间:2022-05-15
下一篇:
PHP fetchCurrency函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap