File splitter





ranking Sort Sort   |   date Sort Sort   |   member Sort Sort
Syndication

9
Date Submitted Sun. Nov. 19th, 2006 12:30 PM
Revision 1
Beginner pcolella
Tags PHP
Comments 2 comments
This is a rewrite of a basic ADODB / PHP Database pager. This pager has some very slick search, sort, and display configuration options. Modifications and improvements are very welcome. Thus I am sharing this code.

A basic example for using this pager would be as follows:

// Check class code for CSS styles used
require_once ('class.init.php');

// SQL Statement
$sql = 'SELECT table1.field1, table1.field2, table1.field3 FROM table1';

// Field Labels
$label_arr = array (
'field1' => 'Field 1 Heading',
'field2' => 'Field 2 Heading',
'field3' => 'Field 3 Heading'
);

// Hidden Fields
$vsel_arr = array (
'field3' => 0 // don't display field3 unless requested by the user
);

$sort_arr = array (
'field1' => 'asc' // sort by field1 ascending order (asc) or (desc)
);

// Config array
$config = array (
'db' => &$dbconn, // open ADODB connection
'sql' => $sql, // String of sql
'id' => 'table1_pager', // pager id for session variables
'label_arr' => $label_arr, // field heading array
'vsel_arr' => $vsel_arr, // fields to hide
'extra_param' => '', // extra paramaters to pass with edit, delete, add anchors
'form_width' => '100%', // table with
'form_title' => 'Table 1', // table title
'edit_anchor' => 'Edit', // link to edit
'del_anchor' => 'Del', // link to delete
'add_anchor' => 'Add', // link to add
'print_anchor' => 'Print', // link to print
'header_view' => true, // no function at this time
'search_view' => true, // no function at this time
'pk' => array ('field1' => true), // primary key field
'sort_arr' => $sort_arr, // sort field array
);

// create object then render it ...
$_pager = new pager($config); // create instance
echo $_pager->render(25); // render output
9
Date Submitted Thu. Feb. 22nd, 2007 5:20 PM
Revision 1
Beginner fleft
Tags File | Files | management | PHP | upload | uploader
Comments 4 comments
This is a Tiny PHP Uploading script. It SHOULD be safe from both really large files and non-image files.
9
Date Submitted Thu. Mar. 9th, 2006 10:41 PM
Revision 1
Beginner atlamp
Tags copy | File | Java | tmp
Comments 0 comments
Copy a file to a new location, optionally marking the file as a temporary file (to be deleted on application exit).

Note there are issues for temporary files - not all the parent directories that might be created are guaranteed to be deleted - only the immediate parent directory will be deleted on exit if created. Other higher-level directories will not be deleted, even if the file is marked as temporary.
9
Date Submitted Mon. Oct. 10th, 2005 10:25 AM
Revision 1
Coder mattrmiller
Tags File | PHP | Size
Comments 3 comments
Get File Size
9
Date Submitted Thu. Apr. 13th, 2006 10:46 AM
Revision 1
Coder mattrmiller
Tags Array | Case | PHP
Comments 0 comments
Change the case of an array.
8
Date Submitted Mon. Oct. 30th, 2006 12:17 AM
Revision 1
Scripter SCoon
Tags Directory | File | Ruby
Comments 0 comments
Customizable recursive directory scanner.
8
Date Submitted Tue. Mar. 21st, 2006 11:58 AM
Revision 1
Helper gbarendt
Tags File | programming | python | system
Comments 1 comments
Copies files from nested folders into one source, flat directory.
8
Date Submitted Wed. Mar. 29th, 2006 10:55 AM
Revision 1
Helper digitaljunkie
Tags File | MD5 | Perl
Comments 0 comments
Is this file the same as that file? The files may or may not be binary. We could compare the modify dates, or the sizes. But, those are not very accurate to know if a file has really changed.

Introducing MD5 Checksum. We can feed the files into Digest::MD5 in binary mode.

This is a great way to do Incremental Backups.

This is also an easy way to verify checksums when downloading files from the internet which list their MD5 Checksums.

You'll need the Digest::MD5 Perl Module.
8
Date Submitted Fri. Aug. 4th, 2006 4:16 AM
Revision 1
Helper axsaxs
Tags File | I/O
Comments 0 comments
Class method to read a binary file and copy it to a byte array.
8
Date Submitted Thu. Jan. 25th, 2007 11:16 AM
Revision 1
Helper RobHarrigan
Tags File | grab | lines | yank | yoink
Comments 0 comments
Use this utility to grab lines from a file. Arguments are the input file, starting ling number and ending line number.