This file contains hidden or 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 "../koneksi.php"; | |
$fullname = $_POST['fullname']; | |
$username = $_POST['username']; | |
$password = $_POST['password']; | |
$sql ="INSERT INTO user VALUES (null,'$fullname','$username','$password')"; | |
$query=mysql_query($sql); | |
$result = mysql_num_rows($query); |
This file contains hidden or 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
@Override | |
public void onBindViewHolder(ViewHolder holder, final int position) { | |
GetDataHistory data = getDataHistory.get(position); | |
holder.setData(data); | |
} |
This file contains hidden or 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
public void setData(GetDataHistory data){ | |
holder.ID.setText(data.getID()); | |
holder.IDSpace.setText(data.getIdSpace()); | |
holder.IDCompany.setText(data.getIdCompany()); | |
holder.EmailUser.setText(data.getEmailUser()); | |
holder.Name.setText(data.getName()); | |
holder.Company.setText(data.getCompany()); | |
holder.Location.setText(data.getLocation()); | |
holder.LocationUrl.setText(data.getLocationUrl()); | |
holder.Facility.setText(data.getFacility()); |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/activity_main" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical"> | |
<Button | |
android:id="@+id/btnLoadData" | |
android:layout_width="match_parent" |
This file contains hidden or 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
dependencies { | |
compile fileTree(dir: 'libs', include: ['*.jar']) | |
compile 'com.android.support:appcompat-v7:25.3.1' | |
//retrofit | |
compile 'com.squareup.retrofit2:retrofit:2.3.0' | |
//butterknife | |
compile 'com.jakewharton:butterknife:8.6.0' |
This file contains hidden or 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
<?xml version="1.0" encoding="utf-8"?> | |
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="id.kalviansofian.belajarretrofitbasic"> | |
<!-- permision intenet --> | |
<uses-permission android:name="android.permission.INTERNET"/> | |
<application | |
android:allowBackup="true" |
This file contains hidden or 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
public static ClientResponse SendEmailGun(String to) { | |
WebResource webresource = null; | |
MultivaluedMapImpl formData = new MultivaluedMapImpl(); | |
try { | |
Client client = Client.create(); | |
client.addFilter(new HTTPBasicAuthFilter("api", MAILGUN_API_KEY)); | |
webresource = client.resource(MAILGUN_HOST + "/messages"); | |
formData.add("from", "Excited User <[email protected]> "); | |
formData.add("to", to); | |
formData.add("subject", "Struk Belanja Anda"); |
This file contains hidden or 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
<? | |
include"koneksi.php"; | |
$id = $_GET['id']; | |
$q = "select * from user where No = $id"; | |
$h = mysql_query($q); | |
$row=mysql_fetch_array($h); | |
?> | |
<form method=post action=prosesedit.php> | |
<input type=hidden name="id" value="<?echo $row['No'];?>"> | |
<table width="200" border="1"> |
This file contains hidden or 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
for (int i = 0; i < data.length(); i++) { | |
JSONObject getData = data.getJSONObject(i); | |
int location_id = getData.getInt("location_id"); | |
int product_id = getData.getInt("product_id"); | |
int qty = getData.getInt("sum"); | |
stock_quant dataStok = new stock_quant(qty, product_id, location_id); | |
dataStok.save(); |
This file contains hidden or 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 id.kalviansofian.belajarfragment; | |
import android.support.v4.app.Fragment; | |
import android.support.v4.app.FragmentManager; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v7.app.AppCompatActivity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.Button; | |
import android.widget.LinearLayout; |