Ejemplo n.º 1
0
            echo json_encode($response);
        } else {
            $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
        }
    } else {
        if ($tag == "create") {
            if (isset($_POST['uid']) && $_POST['uid'] != '' && isset($_POST['name']) && $_POST['name'] != '' && isset($_POST['icon']) && $_POST['icon'] != '' && isset($_POST['event']) && $_POST['event'] != '' && isset($_POST['creator']) && $_POST['creator'] != '') {
                $uid = $_POST['uid'];
                $name = $_POST['name'];
                $icon = $_POST['icon'];
                $time = $_POST['event'];
                $creator = $_POST['creator'];
                require_once 'include/DB_Functions.php';
                $db = new DB_Functions();
                $response = array("error" => FALSE);
                $success = $db->createEntry($uid, $name, $icon, $time, $creator);
                if (!$success) {
                    $response["error"] = TRUE;
                }
                echo json_encode($response);
            } else {
                $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
                echo json_encode($response);
            }
        } else {
            $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
            echo json_encode($response);
        }
    }
} else {
    $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
Ejemplo n.º 2
0
             }
         }
         echo json_encode($response);
     } else {
         $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
     }
 } else {
     if ($tag == "create") {
         if (isset($_POST['eid']) && $_POST['eid'] != '' && isset($_POST['name']) && $_POST['name'] != '' && isset($_POST['amount']) && $_POST['amount'] != '') {
             $eid = $_POST['eid'];
             $name = $_POST['name'];
             $amount = $_POST['amount'];
             require_once 'include/DB_Functions.php';
             $db = new DB_Functions();
             $response = array("error" => FALSE);
             $success = $db->createEntry($eid, $name, $amount);
             if (!$success) {
                 $response["error"] = TRUE;
             }
             echo json_encode($response);
         } else {
             $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
             echo json_encode($response);
         }
     } else {
         if ($tag == "select") {
             if (isset($_POST['eid']) && $_POST['eid'] != '' && isset($_POST['item']) && $_POST['item'] != '' && isset($_POST['number']) && $_POST['number'] != '' && isset($_POST['uid']) && $_POST['uid'] != "") {
                 $eid = $_POST['eid'];
                 $item = $_POST['item'];
                 $number = $_POST['number'];
                 $uid = $_POST['uid'];
Ejemplo n.º 3
0
            $response = array("error" => FALSE);
            $blob = $db->getBLOBbyEid($eid);
            $response['blob'] = $blob;
            echo json_encode($response);
        } else {
            $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
        }
    } else {
        if ($tag == "create") {
            if (isset($_POST['eid']) && $_POST['eid'] != '' && isset($_POST['blob']) && $_POST['blob'] != '') {
                $eid = $_POST['eid'];
                $blob = $_POST['blob'];
                require_once 'include/DB_Functions.php';
                $db = new DB_Functions();
                $response = array("error" => FALSE);
                $success = $db->createEntry($eid, $blob);
                if (!$success) {
                    $response["error"] = TRUE;
                }
                echo json_encode($response);
            } else {
                $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
                echo json_encode($response);
            }
        } else {
            $response = array("error" => TRUE, "error_msg" => "whatcha doin?");
            echo json_encode($response);
        }
    }
} else {
    $response = array("error" => TRUE, "error_msg" => "whatcha doin?");