36 lines
710 B
PHP
36 lines
710 B
PHP
|
<?php // Create new post
|
||
|
|
||
|
require_once("../_auth.php");
|
||
|
require_once("../_utils.php");
|
||
|
|
||
|
|
||
|
|
||
|
// Create single publication
|
||
|
function Post_Create ($author, $tags, $pic_path, $title = null, $prev_path = null, $comms_enabled = false, $edit_lock = false) {
|
||
|
global $db;
|
||
|
|
||
|
// $s = $db->prepare("INSERT ...");
|
||
|
// $s->bind_param("s", $author);
|
||
|
// $s->execute();
|
||
|
// $d = $s->get_result()->fetch_assoc();
|
||
|
//
|
||
|
// if (!(bool)$d) {
|
||
|
// return null;
|
||
|
// }
|
||
|
|
||
|
return $result;
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
if (ThisFileIsRequested(__FILE__)) {
|
||
|
require_once("../_json.php");
|
||
|
|
||
|
// Check if there are necessary input
|
||
|
if (!(isset($_POST["tags"]) && isset($_FILES["pic"])))
|
||
|
ReturnJSONError($Err_RDP_InvalidArgs, "not enough arguments");
|
||
|
|
||
|
// TODO
|
||
|
}
|
||
|
|
||
|
?>
|