Example #1
0
<?php

if ($id_i > 0 && strlen($description) > 1) {
    require_once '_conn.php';
    $query = mupd('items', 'description', $description, 'id_i', $id_i);
    mquery($query);
}
Example #2
0
<?php

if ($submitted == 1 && $id_i > 0) {
    $filepath = $_FILES['file']['tmp_name'];
    // TODO add azure storage
    if (strlen($_FILES['file']['name']) > 2) {
        $uniqid = uniqid('mesh');
        $newpath = 'objs/' . $uniqid . '.obj';
        move_uploaded_file($filepath, $newpath);
        $urlpath = 'http://futurestore.areality3d.com/objs/' . $uniqid . '.obj';
        require_once '_conn.php';
        $query = mupd('items', 'model', $urlpath, 'id_i', $id_i);
        mquery($query);
        echo 'success';
    }
} else {
    ?>
<html>
<body>

<form action="item.meshupload.php" method="post" enctype="multipart/form-data">
id_i: <input type="text" name="id_i" />
<input type="hidden" name="submitted" value="1" />
file: <label for="file">File</label><input type="file" name="file" id="file" /><br>
<input type="submit" name="submit" value="Submit">
</form>

</body>
</html>
<?php 
}
Example #3
0
<?php

if ($id_i > 0 && strlen($name) > 1) {
    require_once '_conn.php';
    $query = mupd('items', 'name', $name, 'id_i', $id_i);
    mquery($query);
}
Example #4
0
<?php

if ($submitted == 1 && $id_i > 0) {
    $filepath = $_FILES['file']['tmp_name'];
    // TODO add azure storage
    if (strlen($_FILES['file']['name']) > 2) {
        $uniqid = uniqid('pic');
        $newpath = 'img/' . $uniqid . '.' . $_FILES['file']['name'];
        move_uploaded_file($filepath, $newpath);
        $urlpath = 'http://futurestore.areality3d.com/' . $newpath;
        require_once '_conn.php';
        $query = mupd('items', 'photo', $urlpath, 'id_i', $id_i);
        mquery($query);
        require_once 'image.resizer.php';
        $photo_large = ResizeImage(256, 256, $urlpath);
        $photo_thumb = ResizeImage(64, 64, $urlpath);
        $query = mupd('items', 'photo_thumb', $photo_thumb, 'id_i', $id_i);
        mquery($query);
        $query = mupd('items', 'photo_large', $photo_large, 'id_i', $id_i);
        mquery($query);
    }
}
Example #5
0
<?php

if ($id_i > 0 && strlen($price) > 0) {
    require_once '_conn.php';
    $query = mupd('items', 'price', (double) $price, 'id_i', $id_i);
    mquery($query);
}