PHP Classes

File: sample.php

Recommend this page to a friend!
  Classes of Vagharshak Tozalakyan   Resources Manager   sample.php   Download  
File: sample.php
Role: Example script
Content type: text/plain
Description: Example
Class: Resources Manager
Manage files in the directory
Author: By
Last change: Foo
Date: 18 years ago
Size: 1,110 bytes
 

Contents

Class file image Download
<?php

 
require_once('resman.class.php');

 
$rm = new ResManager('');

 
// Full or relative path to the directory we wish to manage. No trialing slashes.
 
$rm->browse_dir = 'uploads';

 
// Full or relative URL of the directory we wish to manage. No trialing slashes.
 
$rm->browse_url = 'uploads';

 
// The array of shell glob style patterns.
 
$rm->filter = array('*.gif', '*.jpe*', '*.jpg');

 
// Show files with dot-started names (e.g. '.htaccess')?
 
$rm->show_specials = false;

 
// File list sorting mode - RM_SORT_NO, RM_SORT_TYPE, RM_SORT_NAME,
  // RM_SORT_SIZE or RM_SORT_MODIF.
 
$rm->sort_type = RM_SORT_TYPE;

 
// File list sorting order - RM_SORT_ASC or RM_SORT_DESC.
 
$rm->sort_order = RM_SORT_ASC;

 
// PHP style date format.
 
$rm->tm_format = 'd-m-y H:i:s';

 
// The array of shell glob style patterns used against uploaded files.
 
$rm->upl_filter = array('*.gif', '*.jpe*', '*.jpg');

 
// Maximal size of uploaded files in bytes.
 
$rm->upl_max_size = 2097152;

 
// Number of file inputs displayed.
 
$rm->upl_num = 3;

 
$rm->Show();
?>