<?php require_once '_session.php'; $id_mi = $_SESSION['id_mi']; //TODO test uploads if ($id_mi > 0) { require_once '_conn.php'; $query = mins('items', array('idmi_i'), array($id_mi)); mquery($query); $id_i = mysql_insert_id(); $title = 'Create - Product'; $headerstuff = '<link href="http://cdnjs.cloudflare.com/ajax/libs/dropzone/3.7.1/css/dropzone.min.css" rel="stylesheet"> <script src="http://cdnjs.cloudflare.com/ajax/libs/dropzone/3.7.1/dropzone.js"></script>'; require_once 'lay/lay.top.php'; require_once '_genparams.php'; $bot_script = ' $("#parameters").hide(); var totalparams=1; $("#name").focusout(function(data){ $.post("/update.productname.php",{id_i:' . $id_i . ',name: $(this).val()},function(data){ $("#name_label").html("Product Name:"); }); }).focus(function(){ $("#name_label").html("<i>* Product Name:</i>"); }); $("#price").focusout(function(data){ $.post("/update.price.php",{id_i:' . $id_i . ',price: $(this).val()},function(data){ $("#price_label").html("Price:"); }); }).focus(function(){ $("#price_label").html("<i>* Price:</i>");
<?php require_once 'libs/fn_form.php'; if ($submitted == 1) { require_once '_conn.php'; $query = mins('parameters', array('idi_p', 'param_name', 'translate_x', 'translate_y', 'translate_z', 'translate_x1', 'translate_y1', 'translate_z1', 'rotate_x', 'rotate_y', 'rotate_z', 'rotate_x1', 'rotate_y1', 'rotate_z1', 'scale_x', 'scale_y', 'scale_z', 'scale_x1', 'scale_y1', 'scale_z1', 'color'), array($id_i, $param_name, $translate_x, $translate_y, $translate_z, $translate_x1, $translate_y1, $translate_z1, $rotate_x, $rotate_y, $rotate_z, $rotate_x1, $rotate_y1, $rotate_z1, $scale_x, $scale_y, $scale_z, $scale_x1, $scale_y1, $scale_z1, $color)); mquery($query); $id_p = mysql_insert_id(); $json['id_p'] = $id_p; echo json_encode($json); } else { ?> <form> <?php echo formfield('id_i', 'text'); echo formfield('param_name', 'text'); echo formfield('translate_x', 'text'); echo formfield('translate_y', 'text'); echo formfield('translate_z', 'text'); echo formfield('translate_x1', 'text'); echo formfield('translate_y1', 'text'); echo formfield('translate_z1', 'text'); echo formfield('rotate_x', 'text'); echo formfield('rotate_y', 'text'); echo formfield('rotate_z', 'text'); echo formfield('rotate_x1', 'text'); echo formfield('rotate_y1', 'text'); echo formfield('rotate_z1', 'text'); echo formfield('scale_x', 'text'); echo formfield('scale_y', 'text'); echo formfield('scale_z', 'text');
<?php if ($submitted == 1) { $query = mins('merchantinfo', array('idu_mi', 'storename', 'info', 'icon'), array($id_u, $storename, $info, $icon)); mquery($query); $id_mi = mysql_insert_id(); $json['id_mi'] = $id_mi; echo json_encode($json); } else { ?> <form> <div id="id_u"><label for="id_u">id_u</label> <input type="text" name="id_u" /></div> <div id="info"><label for="info">info</label> <input type="text" name="info" /></div> <div id="icon"><label for="icon">icon</label> <input type="text" name="icon" /></div> <input type="hidden" name="submitted" value="1" /> <input type="submit" /> </form> <?php }
<?php if ($submitted == 1) { require_once '_conn.php'; // generate thumbnails require_once 'image.resizer.php'; $photo_large = ResizeImage(256, 256, $photo); $photo_thumb = ResizeImage(64, 64, $photo); $query = mins('items', array('name', 'photo', 'model', 'description', 'price', 'photo_large', 'photo_thumb'), array($name, $photo, $model, $description, $price, $photo_large, $photo_thumb)); mquery($query); $id_i = mysql_insert_id(); $json['id_i'] = '"' . $id_i . '"'; echo stripslashes(json_encode($json)); } else { ?> <form> <div id="name"><label for="name">name</label> <input type="text" name="name" /></div> <div id="photo"><label for="photo">photo</label> <input type="text" name="photo" /></div> <div id="model"><label for="model">model</label> <input type="text" name="model" /></div> <div id="description"><label for="description">description</label> <input type="text" name="description" /></div> <div id="price"><label for="price">price</label> <input type="text" name="price" /></div> <input type="hidden" name="submitted" value="1" /> <input type="submit" /> </form> <?php }
<?php require_once '_session.php'; if ($submitted == 1) { require_once '_conn.php'; $u = $_REQUEST['username']; $p = $_REQUEST['password']; $e = $_REQUEST['email']; $query = mins('users', array('username', 'password', 'email'), array($u, $p, $e)); // echo $query; mquery($query); $id_u = mysql_insert_id(); $json['id_u'] = $id_u; if ($fromform != 1) { echo json_encode($json); } else { $_SESSION['id_u'] = $id_u; $_SESSION['username'] = $u; header('Location: /dashboard'); } } else { $title = 'Register'; require_once 'lay/lay.top.php'; require_once 'lay/lay.topbar.php'; ?> <div class="container"> <form method="post" action="/register.php" role="form"><input type="hidden" name="form_submitted" value="1" /><input type="hidden" name="submitted" value="1" /><input type="hidden" name="fromform" value="1" /> <div class="form-group"> <label for="username">Username</label> <input type="text" class="form-control" id="username" name="username" placeholder="Username"> </div>