This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class dbHandler { | |
private $con; | |
private $col; | |
function __construct() { | |
require_once dirname(__FILE__) . '/dbConnect.php'; | |
$db = new dbConnect(); | |
//Connect to database | |
$this->con = $db->connect(); | |
//Select "friends" collection, already defined in config.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once '/include/dbHandler.php'; | |
require_once '/lib/Slim/Slim/Slim.php'; | |
Slim\Slim::registerAutoloader(); | |
$app = new Slim\Slim(); | |
//Get All friends end point | |
$app->get('/friends', function() { | |
$db = new dbHandler(); | |
$cur = $db->getAllFriends(); | |
//Variable to store result |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
include 'db_con.php'; | |
$idbarang = $_GET['id_barang']; //mendapatkan informasi id barang dari file index.php | |
//melakukan query pada tabel penjualan sesaui dengan informasi id barang yang didapat dari metode GET | |
$sql = "select * from penjualan where id_barang = '".$idbarang."' "; | |
$query = mysql_query($sql); | |
//membuat kolom pada tabel | |
$tabel = array(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
try{ | |
$conn = mysql_connect("localhost","root",""); //isikan sesuai dengan alamat server,username, dan password | |
mysql_select_db("gchart",$conn); | |
} | |
catch(Exception $e) | |
{ | |
echo $e->getMessage("koneksi gagal"); | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//memanggil db_con.php untuk melakukan koneksi ke database | |
include "db_con.php"; | |
?> | |
<html> | |
<head> | |
<title>Laporan Penjualan</title> | |
</head> | |
<body> | |
<h1>Laporan Penjualan</h1> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Download the following ZIPs: | |
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links) | |
Download the correct GApps for your Android version: | |
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip) | |
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip) | |
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip) | |
Google Apps for Android 4.4.4 (https://www.androidfilehost.com/?fid=23501681358544845 - gapps-kk-20140606-signed.zip) | |
Google Apps for Android 4.3 (https://www.androidfilehost.com/?fid=23060877490000124 - gapps-jb-20130813-signed.zip) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php' //fitur autoload composer | |
//Inisiasi Slim Framewrok | |
$app = new \Slim\Slim(); | |
//home routing | |
$app->get('/', function(){ | |
echo "Home Base"; //print "Home Base" at http://localhost/slim | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RewriteEngine On | |
# Some hosts may require you to use the `RewriteBase` directive. | |
# If you need to use the `RewriteBase` directive, it should be the | |
# absolute physical path to the directory that contains this htaccess file. | |
# | |
RewriteBase /slim | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteCond %{REQUEST_FILENAME} !-f |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'vendor/autoload.php' //fitur autoload composer | |
//Inisiasi Slim Framewrok | |
$app = new \Slim\Slim(array( | |
'view' => new \Slim\Views\Twig(), //set template engine to Twig engine | |
'templates.path' => './templates' //lokasi default template bisa di ganti sesuai dengan kebutuhan | |
)); | |
//home routing dengan view | |
$app->get('/', function() use($app){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.webview; | |
import android.content.Intent; | |
import android.net.Uri; | |
import android.os.Bundle; | |
import android.support.v7.app.AppCompatActivity; | |
import android.view.KeyEvent; | |
import android.view.Menu; | |
import android.view.MenuItem; | |
import android.webkit.ValueCallback; |