English User Guide | | | | | Turkish User Guide

Presentation

Functions

Unnecessary features are renewed and better resolved.

What does it do?

- Allows you to upload files to your server, or files, object-based, flexible, can use it in all projects. Ajax with jquery framework has the feature of upload to. Also be available only ajax. For more details, see the examples. Download link

Features

  • You can specify you want to download the file extensions and mime types of controls have been added.
  • A single file or multiple files to upload offers.

  • Unique naming method is found.

  • Image files, will check whether the actual image file.

  • Prefix and suffix of the files to the front and rear is equipped with.

  • To calculate the size of uploading files do not have to deal with, the size and bytes, kilobytes, megabytes, just as stated.

  • Jquery Ajax file upload feature is due.

  • You can request to have only a single file named (For example, your company would be to install pdf information and the name of the newsletter each week would be advantageous in such cases.)

  • upload files with information you can get results.

Use

You first need to create an installation form. Installation forms part of the action, which the information in this form will be sent to the file must be specified.


<script src="ajax/upload.js" type="text/javascript"> </script>

<div id="result"></div>
<form method="POST" enctype="multipart/form-data" id="file_upload_form" name="aktar" action="ajax/picture_add.php">
<table width="500" height="29" border="0">
<tr>
<th colspan="2" scope="col" > picture add</th>
</tr>
<?php
$max_no_img = 4;
for ($res = 1; $res <= $max_no_img; $res++) {
?>
<tr >
<td width="100">
picture <?php echo $res;?>
</td>
<td width="500">
<input type="file" id="picture_<?php echo $res;?>" size="%50" name="file[]" />
</td>
<?php } ?>
</tr>
</table>
<input class="submit" type="submit" name="submit" value="save" >
<iframe id="upload_target" name="upload_target" src="" style="display:none;"></iframe>
</form>

To recall the necessary code


require_once ('../class/stnc_upload-ajax_class_v4.php');

$extension_types = array('jpg', 'gif', 'zip','png');
$Uploader = & new stnc_file_upload();
$Uploader->language = '../class/stnc_upload_class_lang/english.php';
$Uploader->picture_uploads (true, 'MB', '1');
$Uploader->file_upload( 'MB', '3');
$Uploader-> name_format (true,'reports','','');
$Uploader->uploader_set($_FILES['file'], '../uploads', $extension_types,true);
$Uploader->result_report();
//echo $Uploader->uploaded_files[0];

Functions

Functions, related to the installation process allows you to make various adjustments to the. Each function has a separate task.Allowed to use the functions described below.Example of the use of a variety of functions can be seen in the examples folder.

UPLOAD

Function is the founder and coach.

$Uploader = & new stnc_file_upload();
$Uploader->uploader_set($_FILES['file'], '../uploads', $extension_types,true);

$_FILES['file']expression, our file upload files with form elements are indicated.

'./upload_files' expression indicates that the files will be installed where.

$mime_types statement which indicates that extensions will be installed.

true expression of at least one even lets you specify that you want to do the installation, if installation is not mandatory should be false.

extension_types

Specifies the type of file to be loaded.

$extension_types = array('jpg', 'gif', 'zip','png'); 

language

Will use the language and the language allows you to specify the location of the file

$Uploader->language = '../class/stnc_upload_class_lang/english.php';    

picture_uploads

This section is intended only to customize the image upload feature
- The value of the real image files to check whether or içindir.True Gives false information.
- The second value custom images, pictures, many of which will be reported as type size allows.
Can take values "B", "KB", "MB" - Third, the size is the value for

$Uploader->picture_uploads (true, 'MB', '1');   

file_upload

Except that the only picture files (exe, pdf, zip) to upload their values are going to allow you to declare object.
- The value of the file allows you to tell what size it would be in the form.
Can take values "B", "KB", "MB"
- The second value allows you to tell the size of the file

$Uploader->file_upload( 'MB', '3');

name_format

Upload your files to adjust the settings are for naming, but also can request to have only a single file named.
(For example, your company information each week to install pdf and name do you want the newsletter to be advantageous in such cases.)

'true'=Have a name remain constant in
'bulten'=How hard is the name of the file you want? optional
'stnc_'=is expressed as a prefix to be given.
'_stnc'=is expressed as a suffix to be given

$Uploader->  name_format (true,'reportFile','st_','_nc');
     
My English is not very good for the faults may be sorry Create a unique name for naming method is used
To upload pictures and other files are a different size to be defined.
If you load image files, regardless of whether the lack of real images is checked.

Report Info

result_report

All errors in the installation process, and information which you can see this function.

$Uploader -> result_report();

uploaded

If the operation was successful will be informed.True or false gives information

$Uploader->uploaded;

Ajax Transactions

Ajax Transactions

Ajax examples for more detailed information about transactions, see, think of all the requirements are for Ajax.jquery is used

License Information

GNU GPL (General Public License)

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General var License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General var License for more details.

Contact

Contact

Download Link

Web site :www.selmantunc.com

Mail :stncweb@gmail.com

Twitter:http://twitter.com/stunc

Friendfeed :http://friendfeed.com/stnc

Facebook: http://www.facebook.com/s.stnc