Giter VIP home page Giter VIP logo

uploader-phpvms's Introduction

Uploader-phpVMS - File Upload addon for phpVMS Copyright © 2012 Timothy Sturm

phpVMS - Virtual Airline Administration Software Copyright (c) 2008 Nabeel Shahzad

phpVMS and Uploader-phpVMS is licenced under the following license: Creative Commons Attribution Non-commercial Share Alike (by-nc-sa) View license.txt in the root, or visit: http://creativecommons.org/licenses/by-nc-sa/3.0/

INSTALLATION

Make a backup of your site, and it's database.

Open the SQL document uploader.sql.txt located in the core directory of this package.

edit everywhere you see "phpvms_" to match your table prefix.

Note: If you do not know your table prefix it will be located in your local.config.php Normally located in the core directory, the table prefix is normally defined on line 20

Run the SQL queries and then delete the file uploader.sql.txt

Delete test.php and ~test.php.htm if they exist

Upload the remaining contents to your site.

USAGE

During usage of this script keep in mind that, as a security measure, all files uploaded will be renamed to a random sequence to numbers in the format of xxxxxxxxxx-xxxxxx But it will keep it's original extension.

To edit any options, they will be located in core/common/Uploader.class.php on lines 23, 24, 25

To use this addon create an HTML forum and make sure it has the enctype attribute set to multipart/form-data like so <form enctype="multipart/form-data"> and you have a file input element, for example: <input type="file" name=HTML_FILE_UPLOAD_ELEMENT />

When a user submits the form with a file process with php it like so: Uploader::Upload($_FILES[HTML_FILE_UPLOAD_ELEMENT], $target); Where $target is the directory to upload to, use of SITE_ROOT constant is recommended. However in theory you could use SITE_URL although this has not been tested, for example: $target = SITE_ROOT.'lib'.DS.'images';

To delete an uploaded file, process with php like so: Uploader::DeleteUpload($target); Where $target is the uploaded file to be deleted, use of SITE_ROOT constant is recommended. However in theory you could use SITE_URL although this has not been tested, for example: $target = SITE_ROOT.'lib'.DS.'images'.DS.'xxxxxxxxx - xxxxxxxxx';

Keep in mind this addon will not delete a file if it was not uploaded by this script.


For more information on phpVMS, visit www.phpvms.net Forums: http://forum.phpvms.net Documentation: http://docs.phpvms.net

uploader-phpvms's People

Contributors

oxymoron290 avatar

Watchers

James Cloos avatar  avatar  avatar

uploader-phpvms's Issues

Test.php not working

Thank you for creating this addon. I have installed according to instruction, however, could not get it to work with the standard pirep. I tried the included test.php and always get "that file is not allowed or uploading is disabled." Any assistance would be most appreciated.

Denied Uploads are not Denied

It appears that even though a file type is in the UPLOADS_DENIED or not in the UPLOADS_ALLOWED constant, it appears to still be allowed.

Database?

I have the uploader working and the file gets placed into the server folder, however, what is the purpose of the database as nothing gets entered in it.

Unlimited amount of uploads per user.

this will probably require ALOT more of coding, but currently a user can upload an unlimited amount of data to the server. Not all at one time of course due to post data, but over and over a user can theoretically take up the servers bandwidth and quota. Will require more research.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.