Random Password Generator (based on word list)
33
Simple upload class with features such as
- Upload of multiple files at the same time.
- Filtering uploads by size and extension.
- Uploads to configurable subdirs based on date.
- Automatic file renaming if a file with the same name exists.
- Transloading. Copying files from a different host to the local host. (Like Imageshack does)
- And more...
- Upload of multiple files at the same time.
- Filtering uploads by size and extension.
- Uploads to configurable subdirs based on date.
- Automatic file renaming if a file with the same name exists.
- Transloading. Copying files from a different host to the local host. (Like Imageshack does)
- And more...
11
If a visitor comes to your site from a search engine such as Google or Yahoo, this function will highlight the keywords in a given text the user used for his search.
19
This function makes URLs in a given text clickable, and shorts down the link text if it's length is over the specified one. (Like vBulletin, etc... does)
PS:
Please explain negative votes, they're pointless otherwise...
PS:
Please explain negative votes, they're pointless otherwise...
9
This PHP class allows you to send SMS to almost every country directly from your website. All you need is an account on www.tm4b.com and PHP 5.
Also required is either cURL or allow_url_fopen enabled in php.ini
Also required is either cURL or allow_url_fopen enabled in php.ini
11
The below code will generate a form dropdown for all 12 months, with the current month selected. Handy for those date pickers!
10
The below code will generate a form dropdown for all the days of the month, with today's day selected. Handy for those date pickers!
13
For those times you need to do a loop in PHP, but have the outcome be in descending order (ie, start at 10 and end at 1).
9
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
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
11
Convert an irregular name=value pair string into a formatted array.
21
Proper Paragraphs









