| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- /*
- *
- * Application Name: PHP Custom Content Uploader
- * Module Name: upload.php
- *
- * Copyright (c) 2020 DBMXPCA Technologies. All rights reserved.
- * https://www.dbmxpca.com/
- *
- */
- require_once($_SERVER['DOCUMENT_ROOT'] . "/core.php");
- /*
- *
- * This script is designed to be called with the following parameters:
- *
- * Parameter Description
- * -----------------------------------------------------------------
- * u Username, corresponding to the user's name in the "users.json" file. Value may not be empty. Case-sensitive.
- * k API Key, corresponding to the user's "key" value in the "users.json" file. Value may not be empty. Not case-sensitive by default but can be changed in "config.php".
- *
- */
- // Check user authorization.
- $err = null;
- if (CHECK_USER($err)){
-
- // Check image prelim data.
- $err = null;
- if (CHECK_IMAGE_PRELIM_DATA($err)){
-
- $err = null;
- if (CHECK_IMAGE_ERRORS($err)){
-
- // Attempt to create user's directory within UCD.
- if (CREATE_USER_CONTENT_DIR($_REQUEST['u'])){
-
- echo "ok";
-
-
-
- }
-
- else{
-
- $err = "500_1";
- DIE_ERR($err);
- }
- }
- else{
-
- DIE_ERR($err);
- }
- }
- else{
-
- DIE_ERR($err);
- }
- }
- else{
-
- DIE_ERR($err);
- }
|