Main commonfuncs file

Function name in categories:

/*******************************************************************************
 * Created By Brandon Nimon
 * bnimon@gmail.com
 * www.nimonpro.com
 *   
 * (C) 2013 Brandon Nimon
 ******************************************************************************/


/*******************************************************************************
* Functions I commonly use.                                                    *
********************************************************************************
* convert_smart_quotes ($string)                                               *
* xml_date_break ($date_str)                                                   *
* strtodate ($str, $add_date = false)                                          *
* limit_str_size ($str, $size)                                                 *
* add_slash ($str)                                                             *
* jumptopage ($href)                                                           *
* alpha_numerics ($str)                                                        *
* username_filter ($str)                                                       *
* alphas ($str)                                                                *
* umerics ($str)                                                               *
* numbersuffix ($num)                                                          *
* urldecode_to_array ($url)                                                    *
* validEmail ($email)                                                          *
* password_strength2 ($password)                                               *
* sendemail ($to, $from, $sub, $reply, $message)                               *
* generate_random_password ($length = 10, $simple = false)                     *
* encrypt ($value)                                                             *
* decrypt ($value)                                                             *
* set_key ($keystr = false)                                                    *
* recreate_query_string ($start_char = '?')                                    *
* time_ago ($tm, $rcs = 0)                                                     *
* time_disp ($secs, $rcs = 0, $denomname = false, $denomval = false)           *
* redirect ($url)                                                              *
* english_implode ($arr)                                                       *
* even_dist_arr ($arr, $size)                                                  *
*******************************************************************************/


/*******************************************************************************
* Common mySQL fcuntions.                                                      *
********************************************************************************
* myquery ($query, $line, $do_die = false)                                     *
* log_error ($query, $line, $do_die = false)                                   *
*******************************************************************************/


/*******************************************************************************
* Common file information or manipulation functions.                           *
********************************************************************************
* get_ftype ($file)                                                            *
* filesz ($size, $denom = false, $round = 2)                                   *
* write_text ($file, $contents)                                                *
* file_safe ($file)                                                            ** 
* del ($source)                                                                *
* cp ($source, $dest)                                                          *
*******************************************************************************/


/*******************************************************************************
* Common image information or manipulation functions.                          *
* * (probably doesn't wo * anymor )                                              *
********************************************************************************
* image_size_str ($source)                                                     *
* image_size_mp ($source)                                                      *
* make_jpg ($source, $dest, $size)                                             *
*******************************************************************************/


/*******************************************************************************
* Little script to search and/or replace strings in all PHP files in current   *
* directory.                                                                   *
********************************************************************************
* searchreplace()                                                              *
*******************************************************************************/


/*******************************************************************************
* Displays a caledar month (specified month or current if left blank. Can put  *
* a link on each day of the month. Use ^d as day placeholder, or ^/^/^ as      *
* m/d/y placeholder, it will be converted to that day's value in the link. You *
* can highlight a day of the month with $day (by default, today).              *
********************************************************************************
* cal( [$month [, $day [, $ghost_adjacent [, $href [, $tableclass ]]]]] )      *
*******************************************************************************/


/*******************************************************************************
* Login control.                                                               *
********************************************************************************
* logintest ()                                                                 *
* create_user ($user, $email, $pass, $groupid, $emailconfirm = '1')            *
* login_form ($header = false, $add_action = NULL, $keep_query = true, $action = false) *
* sessdestroy ()                                                               *
* bad_login ($type, $user)                                                     *
* log_visits ()                                                                *
* ipallowdeny ($ipallow_ar, $ipblock_ar)                                       *
*******************************************************************************/