$jum = json_decode($_GET['data']);
     newKaryawan($jum);
     break;
 case 'editKaryawan':
     $jum = json_decode($_GET['data']);
     editKaryawan($jum);
     break;
 case 'deleteKaryawan':
     $jum = json_decode($_GET['data']);
     deleteKaryawan($jum);
     break;
     //IKI ahir kodingan RObert
 //IKI ahir kodingan RObert
 case 'addStock':
     $jum = json_decode($_GET['data']);
     addStock($jum);
     break;
 case 'editStock':
     $jum = json_decode($_GET['data']);
     editStock($jum);
     break;
 case 'getResepByMenuID':
     $jum = json_decode($_GET['data']);
     //echo json_encode($jum);
     getResepByMenuID($jum);
     break;
 case 'newResep':
     $jum = json_decode($_GET['data']);
     newResep($jum);
     break;
 case 'getSettleByUser':
Example #2
0
<?php

require_once '360_safe3.php';
require_once "database.php";
if (!$_POST || !isset($_POST['price']) || !isset($_POST['count']) || !isset($_POST['code']) || !isset($_POST['user'])) {
    echo "<script type='text/javascript'>history.go(-1);</script>";
    return;
}
if (strlen(file_get_contents("http://hq.sinajs.cn/list=" . $_POST["code"])) >= 20) {
    addStock($_POST['user'], $_POST['code'], $_POST['price'], $_POST['count']);
}
echo "<script type='text/javascript'>history.go(-1);</script>";