Exemplo n.º 1
0
{
    $kode = explode("[", $kota);
    $kode = explode("-", $kode[0]);
    $kode = $kode[1];
    return trim($kode, " ");
}
$d = konversiKota($dari);
$a = konversiKota($ke);
//$date=konversiTanggal($tgl_berangkat);
$date = $tgl_berangkat;
$status = '0';
$adult = '1';
$child = '0';
$infant = '0';
if ($status == '1') {
    $ret_date = konversiTanggal($tgl_tiba);
    $pulang = $pulang;
} else {
    if ($status == '0') {
        $ret_date = '';
        $pulang = '';
    }
}
$Secret = '87ec16a248fa7088b0a489b8dad4d03b';
//Zainal
$GetToken = "http://api.sandbox.tiket.com/apiv1/payexpress?method=getToken&secretkey=" . $Secret . "&output=json";
$TokenJSON = json_decode(file_get_contents($GetToken), true);
$Status = $TokenJSON['diagnostic']['status'];
if ($Status != '403') {
    $Token = $TokenJSON['token'];
}
Exemplo n.º 2
0
function ListArtikel()
{
    $x = bukaquery("SELECT * FROM artikel where page='artikel' ORDER BY id DESC LIMIT 4");
    while ($row = mysql_fetch_array($x)) {
        $judul = $row['1'];
        $isi = substr($row['1'], 0, 160);
        $post = konversiTanggal(substr($row[4], 0, 10));
        echo "<ul><li><b>{$judul}</b><br />\r\n\t\t\t\t\t<small>posted on {$post}</small><br/>";
        echo "{$isi}<a href=\"index.php?act=News&id={$row['0']}\">...detail</a>";
        echo "</li></ul>";
    }
}