diff options
author | 2018-01-29 16:04:13 -0500 | |
---|---|---|
committer | 2018-01-29 16:05:35 -0500 | |
commit | 3c56284f7fe1926f6bf6ebd97ec72805d94df1e4 (patch) | |
tree | 805a3fb4cfb14519c0bebc3f1863f4759e916a82 | |
download | bouncer-3c56284f7fe1926f6bf6ebd97ec72805d94df1e4.tar.gz bouncer-3c56284f7fe1926f6bf6ebd97ec72805d94df1e4.tar.bz2 bouncer-3c56284f7fe1926f6bf6ebd97ec72805d94df1e4.zip |
Import existing bouncer.g.o into gitv1.0-20181208-IMPORT
91 files changed, 13453 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3a7b40c --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +php/cfg/config.php +php/cfg/config.php.orig @@ -0,0 +1,69 @@ +----------------------- +Mirror Project +Open Source Lab +Oregon State University +----------------------- +*Coding Standards + + http://pear.php.net/manual/en/standards.php + +*PHP Documentation + + PHP documentation generated by PHP Documentor can be found in /docs. View index.html using file://. + +*Configuration + + Application configuration is done using define() calls. The configuration script is located in: + cfg/config-dist.php + + Copy this config file to cfg/config.php and the init script (cfg/init.php) will process it as intended. + + !! DO NOT store password information in config-dist.php and checkin !! + +*Apache + + Don't forget to set up raw logs: + ErrorLog "|/usr/bin/cronolog /var/www/download/logs/%Y%m%d/error.log" + CustomLog "|/usr/bin/cronolog /var/www/download/logs/%Y%m%d/access.log" + + DB-based logging is configurable by enabling the LOGGING constant in config.php. + +*DB + + DB information is stored in: + cfg/mirror.sql + + DB connections are persistent (msyql_pconnect()). For more info view the PHP manual: + http://php.oregonstate.edu/mysql_pconnect + http://php.oregonstate.edu/manual/en/features.persistent-connections.php + + The DB server should optimally NOT be localhost (save cycles). + +*Questions + + Send questions and rants to <mike dot morgan at oregonstate dot edu> + +*Output Buffering + + This application uses output buffering. + + ob_start() is called in inc/header.php. + ob_end_flush() is called in inc/footer.php. + + No browser output (echo, print, etc.) should _ever_ happen outside of these boundaries. + +*Permissions + + The project directory should be readable by the web server. + +*Benchmarking + + !! ALL benchmark referencing /index.php should be done using ?print=true. !! + !! This disables the actual redirects and avoids spamming mirrors. !! + +*Developers + + Scott Kveton <scott at osuosl dot org> + Mike Morgan <mike dot morgan at oregonstate dot edu> + Alex Polvi <polvi at osuosl dot org> + Danny Robert <robert at osuosl dot org> diff --git a/docs/blank.html b/docs/blank.html new file mode 100644 index 0000000..f83c9a7 --- /dev/null +++ b/docs/blank.html @@ -0,0 +1,13 @@ +<html> +<head> + <title>mirror</title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> +</head> +<body> +<div align="center"><h1>mirror</h1></div> +<b>Welcome to default!</b><br /> +<br /> +This documentation was generated by <a href="http://www.phpdoc.org">phpDocumentor v1.3.0RC3</a><br /> +</body> +</html>
\ No newline at end of file diff --git a/docs/classtrees_mirror.html b/docs/classtrees_mirror.html new file mode 100644 index 0000000..19a95cb --- /dev/null +++ b/docs/classtrees_mirror.html @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
+<!-- Start of Class Data --> +<H2> + +</H2> + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </body> +</html>
\ No newline at end of file diff --git a/docs/elementindex.html b/docs/elementindex.html new file mode 100644 index 0000000..9b40eba --- /dev/null +++ b/docs/elementindex.html @@ -0,0 +1,1193 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<a name="top"></a> +<h2>Full index</h2> +<h3>Package indexes</h3> +<ul> + <li><a href="elementindex_mirror.html">mirror</a></li> +</ul> +<br /> +<div class="index-letter-menu"> + <a class="index-letter" href="elementindex.html#a">a</a> + <a class="index-letter" href="elementindex.html#c">c</a> + <a class="index-letter" href="elementindex.html#d">d</a> + <a class="index-letter" href="elementindex.html#e">e</a> + <a class="index-letter" href="elementindex.html#f">f</a> + <a class="index-letter" href="elementindex.html#g">g</a> + <a class="index-letter" href="elementindex.html#h">h</a> + <a class="index-letter" href="elementindex.html#i">i</a> + <a class="index-letter" href="elementindex.html#l">l</a> + <a class="index-letter" href="elementindex.html#m">m</a> + <a class="index-letter" href="elementindex.html#o">o</a> + <a class="index-letter" href="elementindex.html#p">p</a> + <a class="index-letter" href="elementindex.html#r">r</a> + <a class="index-letter" href="elementindex.html#s">s</a> + <a class="index-letter" href="elementindex.html#u">u</a> + <a class="index-letter" href="elementindex.html#w">w</a> +</div> + + <a name="a"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">a</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">array_days</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_days">array_days()</a> in forms.php</div> + <div class="index-item-description">Get calendar days in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_hours</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_hours">array_hours()</a> in forms.php</div> + <div class="index-item-description">Get calendar hours in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_minutes</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_minutes">array_minutes()</a> in forms.php</div> + <div class="index-item-description">Get array of minutes.</div> + </dd> + <dt class="field"> + <span class="method-title">array_months</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_months">array_months()</a> in forms.php</div> + <div class="index-item-description">Get calendar months in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_order_by</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionarray_order_by">array_order_by()</a> in util.php</div> + <div class="index-item-description">Sort a two dimensional array based on a 'column' key</div> + </dd> + <dt class="field"> + <span class="method-title">array_states</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_states">array_states()</a> in forms.php</div> + <div class="index-item-description">Get array of states.</div> + </dd> + <dt class="field"> + <span class="method-title">array_years</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_years">array_years()</a> in forms.php</div> + <div class="index-item-description">Get calendar years in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_create_session</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_create_session">auth_create_session()</a> in auth.php</div> + <div class="index-item-description">Start a valid session.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_is_valid_session</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_is_valid_session">auth_is_valid_session()</a> in auth.php</div> + <div class="index-item-description">Check admin session against sessions table in database.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_logout</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_logout">auth_logout()</a> in auth.php</div> + <div class="index-item-description">Logout.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_mysql</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_mysql">auth_mysql()</a> in auth.php</div> + <div class="index-item-description">Authentication a user.</div> + </dd> + <dt class="field"> + <span class="include-title">admin_init.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_admin_init_php.html">admin_init.php</a> in admin_init.php</div> + </dd> + <dt class="field"> + <span class="include-title">admin_nav.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_admin_nav_php.html">admin_nav.php</a> in admin_nav.php</div> + </dd> + <dt class="field"> + <span class="include-title">auth.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html">auth.php</a> in auth.php</div> + </dd> + </dl> + <a name="c"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">c</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">clean_in</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionclean_in">clean_in()</a> in forms.php</div> + <div class="index-item-description">Cleans a string or an array of strings for DB input.</div> + </dd> + <dt class="field"> + <span class="method-title">clean_out</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionclean_out">clean_out()</a> in forms.php</div> + <div class="index-item-description">Cleans a string or an array of strings for HTML presentation.</div> + </dd> + <dt class="field"> + <span class="include-title">config-dist.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html">config-dist.php</a> in config-dist.php</div> + </dd> + </dl> + <a name="d"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">d</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">DBHOST</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBHOST">DBHOST</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBNAME</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBNAME">DBNAME</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBPASS</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBPASS">DBPASS</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBUSER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBUSER">DBUSER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">db_close</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_close">db_close()</a> in db.php</div> + <div class="index-item-description">Close the db connection. If a dbh is not specified, assume the last opened link.</div> + </dd> + <dt class="field"> + <span class="method-title">db_connect</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_connect">db_connect()</a> in db.php</div> + <div class="index-item-description">Connect to a MySQL database server.</div> + </dd> + <dt class="field"> + <span class="method-title">db_fetch</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_fetch">db_fetch()</a> in db.php</div> + <div class="index-item-description">Fetch a row as an array from a result.</div> + </dd> + <dt class="field"> + <span class="method-title">db_fieldnames</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_fieldnames">db_fieldnames()</a> in db.php</div> + <div class="index-item-description">Get all of the fieldnames for the specified table.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_get">db_get()</a> in db.php</div> + <div class="index-item-description">Fetch an array based on a query.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get_one</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_get_one">db_get_one()</a> in db.php</div> + <div class="index-item-description">Get one record.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get_to_options</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functiondb_get_to_options">db_get_to_options()</a> in forms.php</div> + <div class="index-item-description">Take a db_get result and return an array of options.</div> + </dd> + <dt class="field"> + <span class="method-title">db_insert_id</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_insert_id">db_insert_id()</a> in db.php</div> + <div class="index-item-description">Since PHP's mysql_insert_id() sometimes throws an error, this is the replacement</div> + </dd> + <dt class="field"> + <span class="method-title">db_makeinsert</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makeinsert">db_makeinsert()</a> in db.php</div> + <div class="index-item-description">Create a MySQL INSERT statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_makereplace</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makereplace">db_makereplace()</a> in db.php</div> + <div class="index-item-description">Create a MySQL REPLACE statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_makeupdate</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makeupdate">db_makeupdate()</a> in db.php</div> + <div class="index-item-description">Create a MySQL UPDATE statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_name_to_id</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_name_to_id">db_name_to_id()</a> in db.php</div> + <div class="index-item-description">Get an ID based on name.</div> + </dd> + <dt class="field"> + <span class="method-title">db_numrows</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_numrows">db_numrows()</a> in db.php</div> + <div class="index-item-description">Determine number of rows in result.</div> + </dd> + <dt class="field"> + <span class="method-title">db_query</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_query">db_query()</a> in db.php</div> + <div class="index-item-description">Execute a MySQL query.</div> + </dd> + <dt class="field"> + <span class="method-title">db_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_select">db_select()</a> in db.php</div> + <div class="index-item-description">Select database.</div> + </dd> + <dt class="field"> + <span class="method-title">db_toggle_bool</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_toggle_bool">db_toggle_bool()</a> in db.php</div> + <div class="index-item-description">Sets enum booleans to their opposite</div> + </dd> + <dt class="field"> + <span class="method-title">debug_r</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functiondebug_r">debug_r()</a> in util.php</div> + <div class="index-item-description">Print out an varible enclosed by &lt;pre&gt; tags</div> + </dd> + <dt class="field"> + <span class="include-title">db.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html">db.php</a> in db.php</div> + </dd> + </dl> + <a name="e"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">e</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">emptify_in_array</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionemptify_in_array">emptify_in_array()</a> in util.php</div> + <div class="index-item-description">This recursive function empty values in an 'multi-dimensional' array.</div> + </dd> + </dl> + <a name="f"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">f</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">FILEPATH</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineFILEPATH">FILEPATH</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">FOOTER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineFOOTER">FOOTER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_fix_dates</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_fix_dates">form_array_fix_dates()</a> in forms.php</div> + <div class="index-item-description">Fix dates for form display, or proper db entry</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_get_date</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_get_date">form_array_get_date()</a> in forms.php</div> + <div class="index-item-description">Get put a date back together after a POST.</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_get_datetime</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_get_datetime">form_array_get_datetime()</a> in forms.php</div> + <div class="index-item-description">Get put a datetime back together after a POST.</div> + </dd> + <dt class="field"> + <span class="method-title">form_checkbox</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_checkbox">form_checkbox()</a> in forms.php</div> + <div class="index-item-description">Writes a checkbox input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_end</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_end">form_end()</a> in forms.php</div> + <div class="index-item-description">Writes the ending form tag.</div> + </dd> + <dt class="field"> + <span class="method-title">form_hidden</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_hidden">form_hidden()</a> in forms.php</div> + <div class="index-item-description">Writes a hidden field.</div> + </dd> + <dt class="field"> + <span class="method-title">form_label</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_label">form_label()</a> in forms.php</div> + <div class="index-item-description">Writes a form input label.</div> + </dd> + <dt class="field"> + <span class="method-title">form_password</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_password">form_password()</a> in forms.php</div> + <div class="index-item-description">Writes a password input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_radio</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_radio">form_radio()</a> in forms.php</div> + <div class="index-item-description">Writes a radio input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_reset</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_reset">form_reset()</a> in forms.php</div> + <div class="index-item-description">Writes a reset input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_select">form_select()</a> in forms.php</div> + <div class="index-item-description">Writes a select list with options.</div> + </dd> + <dt class="field"> + <span class="method-title">form_start</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_start">form_start()</a> in forms.php</div> + <div class="index-item-description">Writes the beginning form tag.</div> + </dd> + <dt class="field"> + <span class="method-title">form_submit</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_submit">form_submit()</a> in forms.php</div> + <div class="index-item-description">Writes a submit input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_text</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_text">form_text()</a> in forms.php</div> + <div class="index-item-description">Writes a text input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_textarea</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_textarea">form_textarea()</a> in forms.php</div> + <div class="index-item-description">Writes a textarea</div> + </dd> + <dt class="field"> + <span class="include-title">footer.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_footer_php.html">footer.php</a> in footer.php</div> + </dd> + <dt class="field"> + <span class="include-title">forms.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html">forms.php</a> in forms.php</div> + </dd> + </dl> + <a name="g"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">g</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">geo_get_coordinates</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_coordinates">geo_get_coordinates()</a> in geo.php</div> + <div class="index-item-description">Get longitude and latitude of an IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_country</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_country">geo_get_country()</a> in geo.php</div> + <div class="index-item-description">Get country of an IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_distance</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_distance">geo_get_distance()</a> in geo.php</div> + <div class="index-item-description">Calculate the distance between two geo points.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_record</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_record">geo_get_record()</a> in geo.php</div> + <div class="index-item-description">Get complete record based on IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_query</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_query">geo_query()</a> in geo.php</div> + <div class="index-item-description">Query NetGeo based on API and parse results.</div> + </dd> + <dt class="field"> + <span class="method-title">get_order</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionget_order">get_order()</a> in list.php</div> + <div class="index-item-description">Determine current sort order.</div> + </dd> + <dt class="field"> + <span class="method-title">get_orderby</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionget_orderby">get_orderby()</a> in list.php</div> + <div class="index-item-description">Determine whether or not list is currently sorted.</div> + </dd> + <dt class="field"> + <span class="include-title">geo.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html">geo.php</a> in geo.php</div> + </dd> + </dl> + <a name="h"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">h</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">HEADER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineHEADER">HEADER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">header.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_header_php.html">header.php</a> in header.php</div> + </dd> + </dl> + <a name="i"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">i</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">INC</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineINC">INC</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">is_email_address</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionis_email_address">is_email_address()</a> in forms.php</div> + <div class="index-item-description">Validates email addresses</div> + </dd> + <dt class="field"> + <span class="method-title">is_phone_number</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionis_phone_number">is_phone_number()</a> in forms.php</div> + <div class="index-item-description">Validates phone number</div> + </dd> + <dt class="field"> + <span class="include-title">index.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_index_php.html">index.php</a> in index.php</div> + </dd> + <dt class="field"> + <span class="include-title">init.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_init_php.html">init.php</a> in init.php</div> + </dd> + <dt class="field"> + <span class="include-title">index.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/pub/_php_index_php.html">index.php</a> in index.php</div> + </dd> + </dl> + <a name="l"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">l</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">LIB</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineLIB">LIB</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">list_edit_ids</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionlist_edit_ids">list_edit_ids()</a> in list.php</div> + <div class="index-item-description">Parses $_POST for ids, shows edit forms for each id with populated data.</div> + </dd> + <dt class="field"> + <span class="method-title">list_update_ids</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionlist_update_ids">list_update_ids()</a> in list.php</div> + <div class="index-item-description">Process a submitted list_edit_ids form.</div> + </dd> + <dt class="field"> + <span class="const-title">LOGGING</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineLOGGING">LOGGING</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">locations.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_locations_php.html">locations.php</a> in locations.php</div> + </dd> + <dt class="field"> + <span class="include-title">login.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_login_php.html">login.php</a> in login.php</div> + </dd> + <dt class="field"> + <span class="include-title">logout.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_logout_php.html">logout.php</a> in logout.php</div> + </dd> + <dt class="field"> + <span class="include-title">location.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_location_php.html">location.php</a> in location.php</div> + </dd> + <dt class="field"> + <span class="include-title">list.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html">list.php</a> in list.php</div> + </dd> + </dl> + <a name="m"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">m</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">microtime_float</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionmicrotime_float">microtime_float()</a> in util.php</div> + <div class="index-item-description">determine float value of now</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_location">mirror_delete_location()</a> in mirror.php</div> + <div class="index-item-description">Delete a location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_mirror">mirror_delete_mirror()</a> in mirror.php</div> + <div class="index-item-description">Delete mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_os">mirror_delete_os()</a> in mirror.php</div> + <div class="index-item-description">Delete a os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_product">mirror_delete_product()</a> in mirror.php</div> + <div class="index-item-description">Delete a product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_region">mirror_delete_region()</a> in mirror.php</div> + <div class="index-item-description">Delete a region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_user">mirror_delete_user()</a> in mirror.php</div> + <div class="index-item-description">Delete a user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_locations</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_locations">mirror_get_locations()</a> in mirror.php</div> + <div class="index-item-description">Get locations.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirrors</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors">mirror_get_mirrors()</a> in mirror.php</div> + <div class="index-item-description">Get list of mirrors.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirrors_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors_select">mirror_get_mirrors_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of mirrors for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirror_stats</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirror_stats">mirror_get_mirror_stats()</a> in mirror.php</div> + <div class="index-item-description">Get mirror statistics.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_location">mirror_get_one_location()</a> in mirror.php</div> + <div class="index-item-description">Get one location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_mirror">mirror_get_one_mirror()</a> in mirror.php</div> + <div class="index-item-description">Get one mirror record.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_os">mirror_get_one_os()</a> in mirror.php</div> + <div class="index-item-description">Get one os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_product">mirror_get_one_product()</a> in mirror.php</div> + <div class="index-item-description">Get one product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_region">mirror_get_one_region()</a> in mirror.php</div> + <div class="index-item-description">Get one region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_user">mirror_get_one_user()</a> in mirror.php</div> + <div class="index-item-description">Get one user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss">mirror_get_oss()</a> in mirror.php</div> + <div class="index-item-description">Get operating systems.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select">mirror_get_oss_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select_priority">mirror_get_oss_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products">mirror_get_products()</a> in mirror.php</div> + <div class="index-item-description">Get products.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select">mirror_get_products_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of products for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select_priority">mirror_get_products_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_product_stats</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_product_stats">mirror_get_product_stats()</a> in mirror.php</div> + <div class="index-item-description">Get product statistics.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions">mirror_get_regions()</a> in mirror.php</div> + <div class="index-item-description">Get regions.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select">mirror_get_regions_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of regions for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select_priority">mirror_get_regions_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of regions for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_users</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_users">mirror_get_users()</a> in mirror.php</div> + <div class="index-item-description">Get users.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_location">mirror_insert_location()</a> in mirror.php</div> + <div class="index-item-description">Insert a new location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_mirror">mirror_insert_mirror()</a> in mirror.php</div> + <div class="index-item-description">Insert mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_os">mirror_insert_os()</a> in mirror.php</div> + <div class="index-item-description">Insert os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_product">mirror_insert_product()</a> in mirror.php</div> + <div class="index-item-description">Insert product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_region">mirror_insert_region()</a> in mirror.php</div> + <div class="index-item-description">Insert region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_user">mirror_insert_user()</a> in mirror.php</div> + <div class="index-item-description">Insert a new user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_toggle</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_toggle">mirror_toggle()</a> in mirror.php</div> + <div class="index-item-description">Enable or disable a mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_location">mirror_update_location()</a> in mirror.php</div> + <div class="index-item-description">Update a location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_mirror">mirror_update_mirror()</a> in mirror.php</div> + <div class="index-item-description">Update mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_os">mirror_update_os()</a> in mirror.php</div> + <div class="index-item-description">Update os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_product">mirror_update_product()</a> in mirror.php</div> + <div class="index-item-description">Update product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_region">mirror_update_region()</a> in mirror.php</div> + <div class="index-item-description">Update region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_user">mirror_update_user()</a> in mirror.php</div> + <div class="index-item-description">Update a user.</div> + </dd> + <dt class="field"> + <span class="include-title">mstats.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_mstats_php.html">mstats.php</a> in mstats.php</div> + </dd> + <dt class="field"> + <span class="include-title">mirror.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_mirror_php.html">mirror.php</a> in mirror.php</div> + </dd> + <dt class="field"> + <span class="include-title">mirror.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html">mirror.php</a> in mirror.php</div> + </dd> + </dl> + <a name="o"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">o</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">os.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_os_php.html">os.php</a> in os.php</div> + </dd> + <dt class="field"> + <span class="include-title">os.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_os_php.html">os.php</a> in os.php</div> + </dd> + </dl> + <a name="p"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">p</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">password_gen</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionpassword_gen">password_gen()</a> in util.php</div> + <div class="index-item-description">Generate a random string good for passwords</div> + </dd> + <dt class="field"> + <span class="include-title">products.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_products_php.html">products.php</a> in products.php</div> + </dd> + <dt class="field"> + <span class="include-title">pstats.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_pstats_php.html">pstats.php</a> in pstats.php</div> + </dd> + <dt class="field"> + <span class="include-title">product.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_product_php.html">product.php</a> in product.php</div> + </dd> + </dl> + <a name="r"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">r</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">regions.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_regions_php.html">regions.php</a> in regions.php</div> + </dd> + <dt class="field"> + <span class="include-title">region.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_region_php.html">region.php</a> in region.php</div> + </dd> + <dt class="field"> + <span class="method-title">record_exists</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionrecord_exists">record_exists()</a> in util.php</div> + <div class="index-item-description">This function checks for the existence of a particular row in a particular table matching a value.</div> + </dd> + </dl> + <a name="s"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">s</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">set_error</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionset_error">set_error()</a> in util.php</div> + <div class="index-item-description">Add an error message to SESSION['errors'] array.</div> + </dd> + <dt class="field"> + <span class="method-title">set_msg</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionset_msg">set_msg()</a> in util.php</div> + <div class="index-item-description">Add a message to SESSION['messages'] array.</div> + </dd> + <dt class="field"> + <span class="method-title">show_error</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_error">show_error()</a> in util.php</div> + <div class="index-item-description">Show errors messages.</div> + </dd> + <dt class="field"> + <span class="method-title">show_headers</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_headers">show_headers()</a> in list.php</div> + <div class="index-item-description">Show table headers.</div> + </dd> + <dt class="field"> + <span class="method-title">show_list</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_list">show_list()</a> in list.php</div> + <div class="index-item-description">Show a list of values, for forms.</div> + </dd> + <dt class="field"> + <span class="method-title">show_msg</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_msg">show_msg()</a> in util.php</div> + <div class="index-item-description">Show messages.</div> + </dd> + <dt class="field"> + <span class="method-title">show_row</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_row">show_row()</a> in list.php</div> + <div class="index-item-description">Show table data.</div> + </dd> + <dt class="field"> + <span class="method-title">show_tabs</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_tabs">show_tabs()</a> in util.php</div> + <div class="index-item-description">Show user tabs, based on an array.</div> + </dd> + </dl> + <a name="u"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">u</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">users.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_users_php.html">users.php</a> in users.php</div> + </dd> + <dt class="field"> + <span class="include-title">user.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_user_php.html">user.php</a> in user.php</div> + </dd> + <dt class="field"> + <span class="include-title">util.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html">util.php</a> in util.php</div> + </dd> + <dt class="field"> + <span class="method-title">url_out</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionurl_out">url_out()</a> in forms.php</div> + <div class="index-item-description">Returns http:// and the string if the string does not begin with http://</div> + </dd> + </dl> + <a name="w"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">w</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">WEBPATH</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineWEBPATH">WEBPATH</a> in config-dist.php</div> + </dd> + </dl> + +<div class="index-letter-menu"> + <a class="index-letter" href="elementindex.html#a">a</a> + <a class="index-letter" href="elementindex.html#c">c</a> + <a class="index-letter" href="elementindex.html#d">d</a> + <a class="index-letter" href="elementindex.html#e">e</a> + <a class="index-letter" href="elementindex.html#f">f</a> + <a class="index-letter" href="elementindex.html#g">g</a> + <a class="index-letter" href="elementindex.html#h">h</a> + <a class="index-letter" href="elementindex.html#i">i</a> + <a class="index-letter" href="elementindex.html#l">l</a> + <a class="index-letter" href="elementindex.html#m">m</a> + <a class="index-letter" href="elementindex.html#o">o</a> + <a class="index-letter" href="elementindex.html#p">p</a> + <a class="index-letter" href="elementindex.html#r">r</a> + <a class="index-letter" href="elementindex.html#s">s</a> + <a class="index-letter" href="elementindex.html#u">u</a> + <a class="index-letter" href="elementindex.html#w">w</a> +</div>
</body> +</html>
\ No newline at end of file diff --git a/docs/elementindex_mirror.html b/docs/elementindex_mirror.html new file mode 100644 index 0000000..c32689e --- /dev/null +++ b/docs/elementindex_mirror.html @@ -0,0 +1,1190 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<a name="top"></a> +<h2>[mirror] element index</h2> +<a href="elementindex.html">All elements</a> +<br /> +<div class="index-letter-menu"> + <a class="index-letter" href="elementindex_mirror.html#a">a</a> + <a class="index-letter" href="elementindex_mirror.html#c">c</a> + <a class="index-letter" href="elementindex_mirror.html#d">d</a> + <a class="index-letter" href="elementindex_mirror.html#e">e</a> + <a class="index-letter" href="elementindex_mirror.html#f">f</a> + <a class="index-letter" href="elementindex_mirror.html#g">g</a> + <a class="index-letter" href="elementindex_mirror.html#h">h</a> + <a class="index-letter" href="elementindex_mirror.html#i">i</a> + <a class="index-letter" href="elementindex_mirror.html#l">l</a> + <a class="index-letter" href="elementindex_mirror.html#m">m</a> + <a class="index-letter" href="elementindex_mirror.html#o">o</a> + <a class="index-letter" href="elementindex_mirror.html#p">p</a> + <a class="index-letter" href="elementindex_mirror.html#r">r</a> + <a class="index-letter" href="elementindex_mirror.html#s">s</a> + <a class="index-letter" href="elementindex_mirror.html#u">u</a> + <a class="index-letter" href="elementindex_mirror.html#w">w</a> +</div> + + <a name="a"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">a</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">admin_init.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_admin_init_php.html">admin_init.php</a> in admin_init.php</div> + </dd> + <dt class="field"> + <span class="include-title">admin_nav.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_admin_nav_php.html">admin_nav.php</a> in admin_nav.php</div> + </dd> + <dt class="field"> + <span class="method-title">array_days</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_days">array_days()</a> in forms.php</div> + <div class="index-item-description">Get calendar days in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_hours</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_hours">array_hours()</a> in forms.php</div> + <div class="index-item-description">Get calendar hours in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_minutes</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_minutes">array_minutes()</a> in forms.php</div> + <div class="index-item-description">Get array of minutes.</div> + </dd> + <dt class="field"> + <span class="method-title">array_months</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_months">array_months()</a> in forms.php</div> + <div class="index-item-description">Get calendar months in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">array_order_by</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionarray_order_by">array_order_by()</a> in util.php</div> + <div class="index-item-description">Sort a two dimensional array based on a 'column' key</div> + </dd> + <dt class="field"> + <span class="method-title">array_states</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_states">array_states()</a> in forms.php</div> + <div class="index-item-description">Get array of states.</div> + </dd> + <dt class="field"> + <span class="method-title">array_years</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionarray_years">array_years()</a> in forms.php</div> + <div class="index-item-description">Get calendar years in array format.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_create_session</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_create_session">auth_create_session()</a> in auth.php</div> + <div class="index-item-description">Start a valid session.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_is_valid_session</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_is_valid_session">auth_is_valid_session()</a> in auth.php</div> + <div class="index-item-description">Check admin session against sessions table in database.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_logout</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_logout">auth_logout()</a> in auth.php</div> + <div class="index-item-description">Logout.</div> + </dd> + <dt class="field"> + <span class="method-title">auth_mysql</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html#functionauth_mysql">auth_mysql()</a> in auth.php</div> + <div class="index-item-description">Authentication a user.</div> + </dd> + <dt class="field"> + <span class="include-title">auth.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_auth_php.html">auth.php</a> in auth.php</div> + </dd> + </dl> + <a name="c"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">c</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">config-dist.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html">config-dist.php</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">clean_in</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionclean_in">clean_in()</a> in forms.php</div> + <div class="index-item-description">Cleans a string or an array of strings for DB input.</div> + </dd> + <dt class="field"> + <span class="method-title">clean_out</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionclean_out">clean_out()</a> in forms.php</div> + <div class="index-item-description">Cleans a string or an array of strings for HTML presentation.</div> + </dd> + </dl> + <a name="d"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">d</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">DBHOST</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBHOST">DBHOST</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBNAME</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBNAME">DBNAME</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBPASS</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBPASS">DBPASS</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">DBUSER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineDBUSER">DBUSER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="method-title">db_close</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_close">db_close()</a> in db.php</div> + <div class="index-item-description">Close the db connection. If a dbh is not specified, assume the last opened link.</div> + </dd> + <dt class="field"> + <span class="method-title">db_connect</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_connect">db_connect()</a> in db.php</div> + <div class="index-item-description">Connect to a MySQL database server.</div> + </dd> + <dt class="field"> + <span class="method-title">db_fetch</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_fetch">db_fetch()</a> in db.php</div> + <div class="index-item-description">Fetch a row as an array from a result.</div> + </dd> + <dt class="field"> + <span class="method-title">db_fieldnames</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_fieldnames">db_fieldnames()</a> in db.php</div> + <div class="index-item-description">Get all of the fieldnames for the specified table.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_get">db_get()</a> in db.php</div> + <div class="index-item-description">Fetch an array based on a query.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get_one</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_get_one">db_get_one()</a> in db.php</div> + <div class="index-item-description">Get one record.</div> + </dd> + <dt class="field"> + <span class="method-title">db_get_to_options</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functiondb_get_to_options">db_get_to_options()</a> in forms.php</div> + <div class="index-item-description">Take a db_get result and return an array of options.</div> + </dd> + <dt class="field"> + <span class="method-title">db_insert_id</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_insert_id">db_insert_id()</a> in db.php</div> + <div class="index-item-description">Since PHP's mysql_insert_id() sometimes throws an error, this is the replacement</div> + </dd> + <dt class="field"> + <span class="method-title">db_makeinsert</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makeinsert">db_makeinsert()</a> in db.php</div> + <div class="index-item-description">Create a MySQL INSERT statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_makereplace</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makereplace">db_makereplace()</a> in db.php</div> + <div class="index-item-description">Create a MySQL REPLACE statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_makeupdate</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_makeupdate">db_makeupdate()</a> in db.php</div> + <div class="index-item-description">Create a MySQL UPDATE statement based on $_POST array generated by form submission.</div> + </dd> + <dt class="field"> + <span class="method-title">db_name_to_id</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_name_to_id">db_name_to_id()</a> in db.php</div> + <div class="index-item-description">Get an ID based on name.</div> + </dd> + <dt class="field"> + <span class="method-title">db_numrows</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_numrows">db_numrows()</a> in db.php</div> + <div class="index-item-description">Determine number of rows in result.</div> + </dd> + <dt class="field"> + <span class="method-title">db_query</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_query">db_query()</a> in db.php</div> + <div class="index-item-description">Execute a MySQL query.</div> + </dd> + <dt class="field"> + <span class="method-title">db_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_select">db_select()</a> in db.php</div> + <div class="index-item-description">Select database.</div> + </dd> + <dt class="field"> + <span class="method-title">db_toggle_bool</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html#functiondb_toggle_bool">db_toggle_bool()</a> in db.php</div> + <div class="index-item-description">Sets enum booleans to their opposite</div> + </dd> + <dt class="field"> + <span class="method-title">debug_r</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functiondebug_r">debug_r()</a> in util.php</div> + <div class="index-item-description">Print out an varible enclosed by &lt;pre&gt; tags</div> + </dd> + <dt class="field"> + <span class="include-title">db.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_db_php.html">db.php</a> in db.php</div> + </dd> + </dl> + <a name="e"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">e</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">emptify_in_array</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionemptify_in_array">emptify_in_array()</a> in util.php</div> + <div class="index-item-description">This recursive function empty values in an 'multi-dimensional' array.</div> + </dd> + </dl> + <a name="f"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">f</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">FILEPATH</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineFILEPATH">FILEPATH</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">FOOTER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineFOOTER">FOOTER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">footer.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_footer_php.html">footer.php</a> in footer.php</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_fix_dates</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_fix_dates">form_array_fix_dates()</a> in forms.php</div> + <div class="index-item-description">Fix dates for form display, or proper db entry</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_get_date</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_get_date">form_array_get_date()</a> in forms.php</div> + <div class="index-item-description">Get put a date back together after a POST.</div> + </dd> + <dt class="field"> + <span class="method-title">form_array_get_datetime</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_array_get_datetime">form_array_get_datetime()</a> in forms.php</div> + <div class="index-item-description">Get put a datetime back together after a POST.</div> + </dd> + <dt class="field"> + <span class="method-title">form_checkbox</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_checkbox">form_checkbox()</a> in forms.php</div> + <div class="index-item-description">Writes a checkbox input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_end</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_end">form_end()</a> in forms.php</div> + <div class="index-item-description">Writes the ending form tag.</div> + </dd> + <dt class="field"> + <span class="method-title">form_hidden</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_hidden">form_hidden()</a> in forms.php</div> + <div class="index-item-description">Writes a hidden field.</div> + </dd> + <dt class="field"> + <span class="method-title">form_label</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_label">form_label()</a> in forms.php</div> + <div class="index-item-description">Writes a form input label.</div> + </dd> + <dt class="field"> + <span class="method-title">form_password</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_password">form_password()</a> in forms.php</div> + <div class="index-item-description">Writes a password input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_radio</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_radio">form_radio()</a> in forms.php</div> + <div class="index-item-description">Writes a radio input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_reset</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_reset">form_reset()</a> in forms.php</div> + <div class="index-item-description">Writes a reset input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_select">form_select()</a> in forms.php</div> + <div class="index-item-description">Writes a select list with options.</div> + </dd> + <dt class="field"> + <span class="method-title">form_start</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_start">form_start()</a> in forms.php</div> + <div class="index-item-description">Writes the beginning form tag.</div> + </dd> + <dt class="field"> + <span class="method-title">form_submit</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_submit">form_submit()</a> in forms.php</div> + <div class="index-item-description">Writes a submit input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_text</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_text">form_text()</a> in forms.php</div> + <div class="index-item-description">Writes a text input.</div> + </dd> + <dt class="field"> + <span class="method-title">form_textarea</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionform_textarea">form_textarea()</a> in forms.php</div> + <div class="index-item-description">Writes a textarea</div> + </dd> + <dt class="field"> + <span class="include-title">forms.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html">forms.php</a> in forms.php</div> + </dd> + </dl> + <a name="g"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">g</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">geo_get_coordinates</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_coordinates">geo_get_coordinates()</a> in geo.php</div> + <div class="index-item-description">Get longitude and latitude of an IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_country</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_country">geo_get_country()</a> in geo.php</div> + <div class="index-item-description">Get country of an IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_distance</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_distance">geo_get_distance()</a> in geo.php</div> + <div class="index-item-description">Calculate the distance between two geo points.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_get_record</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_get_record">geo_get_record()</a> in geo.php</div> + <div class="index-item-description">Get complete record based on IP.</div> + </dd> + <dt class="field"> + <span class="method-title">geo_query</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html#functiongeo_query">geo_query()</a> in geo.php</div> + <div class="index-item-description">Query NetGeo based on API and parse results.</div> + </dd> + <dt class="field"> + <span class="method-title">get_order</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionget_order">get_order()</a> in list.php</div> + <div class="index-item-description">Determine current sort order.</div> + </dd> + <dt class="field"> + <span class="method-title">get_orderby</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionget_orderby">get_orderby()</a> in list.php</div> + <div class="index-item-description">Determine whether or not list is currently sorted.</div> + </dd> + <dt class="field"> + <span class="include-title">geo.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_geo_php.html">geo.php</a> in geo.php</div> + </dd> + </dl> + <a name="h"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">h</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">HEADER</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineHEADER">HEADER</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">header.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/inc/_php_inc_header_php.html">header.php</a> in header.php</div> + </dd> + </dl> + <a name="i"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">i</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">index.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_index_php.html">index.php</a> in index.php</div> + </dd> + <dt class="field"> + <span class="const-title">INC</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineINC">INC</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">init.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_init_php.html">init.php</a> in init.php</div> + </dd> + <dt class="field"> + <span class="method-title">is_email_address</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionis_email_address">is_email_address()</a> in forms.php</div> + <div class="index-item-description">Validates email addresses</div> + </dd> + <dt class="field"> + <span class="method-title">is_phone_number</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionis_phone_number">is_phone_number()</a> in forms.php</div> + <div class="index-item-description">Validates phone number</div> + </dd> + <dt class="field"> + <span class="include-title">index.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/pub/_php_index_php.html">index.php</a> in index.php</div> + </dd> + </dl> + <a name="l"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">l</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">locations.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_locations_php.html">locations.php</a> in locations.php</div> + </dd> + <dt class="field"> + <span class="include-title">login.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_login_php.html">login.php</a> in login.php</div> + </dd> + <dt class="field"> + <span class="include-title">logout.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_logout_php.html">logout.php</a> in logout.php</div> + </dd> + <dt class="field"> + <span class="const-title">LIB</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineLIB">LIB</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="const-title">LOGGING</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineLOGGING">LOGGING</a> in config-dist.php</div> + </dd> + <dt class="field"> + <span class="include-title">location.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_location_php.html">location.php</a> in location.php</div> + </dd> + <dt class="field"> + <span class="method-title">list_edit_ids</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionlist_edit_ids">list_edit_ids()</a> in list.php</div> + <div class="index-item-description">Parses $_POST for ids, shows edit forms for each id with populated data.</div> + </dd> + <dt class="field"> + <span class="method-title">list_update_ids</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionlist_update_ids">list_update_ids()</a> in list.php</div> + <div class="index-item-description">Process a submitted list_edit_ids form.</div> + </dd> + <dt class="field"> + <span class="include-title">list.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html">list.php</a> in list.php</div> + </dd> + </dl> + <a name="m"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">m</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">mstats.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_mstats_php.html">mstats.php</a> in mstats.php</div> + </dd> + <dt class="field"> + <span class="include-title">mirror.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_mirror_php.html">mirror.php</a> in mirror.php</div> + </dd> + <dt class="field"> + <span class="method-title">microtime_float</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionmicrotime_float">microtime_float()</a> in util.php</div> + <div class="index-item-description">determine float value of now</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_location">mirror_delete_location()</a> in mirror.php</div> + <div class="index-item-description">Delete a location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_mirror">mirror_delete_mirror()</a> in mirror.php</div> + <div class="index-item-description">Delete mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_os">mirror_delete_os()</a> in mirror.php</div> + <div class="index-item-description">Delete a os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_product">mirror_delete_product()</a> in mirror.php</div> + <div class="index-item-description">Delete a product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_region">mirror_delete_region()</a> in mirror.php</div> + <div class="index-item-description">Delete a region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_delete_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_user">mirror_delete_user()</a> in mirror.php</div> + <div class="index-item-description">Delete a user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_locations</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_locations">mirror_get_locations()</a> in mirror.php</div> + <div class="index-item-description">Get locations.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirrors</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors">mirror_get_mirrors()</a> in mirror.php</div> + <div class="index-item-description">Get list of mirrors.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirrors_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors_select">mirror_get_mirrors_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of mirrors for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_mirror_stats</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirror_stats">mirror_get_mirror_stats()</a> in mirror.php</div> + <div class="index-item-description">Get mirror statistics.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_location">mirror_get_one_location()</a> in mirror.php</div> + <div class="index-item-description">Get one location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_mirror">mirror_get_one_mirror()</a> in mirror.php</div> + <div class="index-item-description">Get one mirror record.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_os">mirror_get_one_os()</a> in mirror.php</div> + <div class="index-item-description">Get one os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_product">mirror_get_one_product()</a> in mirror.php</div> + <div class="index-item-description">Get one product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_region">mirror_get_one_region()</a> in mirror.php</div> + <div class="index-item-description">Get one region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_one_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_user">mirror_get_one_user()</a> in mirror.php</div> + <div class="index-item-description">Get one user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss">mirror_get_oss()</a> in mirror.php</div> + <div class="index-item-description">Get operating systems.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select">mirror_get_oss_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_oss_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select_priority">mirror_get_oss_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products">mirror_get_products()</a> in mirror.php</div> + <div class="index-item-description">Get products.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select">mirror_get_products_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of products for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_products_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select_priority">mirror_get_products_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of operating systems for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_product_stats</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_product_stats">mirror_get_product_stats()</a> in mirror.php</div> + <div class="index-item-description">Get product statistics.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions">mirror_get_regions()</a> in mirror.php</div> + <div class="index-item-description">Get regions.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions_select</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select">mirror_get_regions_select()</a> in mirror.php</div> + <div class="index-item-description">Get an alpha-list of regions for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_regions_select_priority</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select_priority">mirror_get_regions_select_priority()</a> in mirror.php</div> + <div class="index-item-description">Get an priority-list of regions for select list.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_get_users</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_get_users">mirror_get_users()</a> in mirror.php</div> + <div class="index-item-description">Get users.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_location">mirror_insert_location()</a> in mirror.php</div> + <div class="index-item-description">Insert a new location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_mirror">mirror_insert_mirror()</a> in mirror.php</div> + <div class="index-item-description">Insert mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_os">mirror_insert_os()</a> in mirror.php</div> + <div class="index-item-description">Insert os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_product">mirror_insert_product()</a> in mirror.php</div> + <div class="index-item-description">Insert product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_region">mirror_insert_region()</a> in mirror.php</div> + <div class="index-item-description">Insert region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_insert_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_user">mirror_insert_user()</a> in mirror.php</div> + <div class="index-item-description">Insert a new user.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_toggle</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_toggle">mirror_toggle()</a> in mirror.php</div> + <div class="index-item-description">Enable or disable a mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_location</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_location">mirror_update_location()</a> in mirror.php</div> + <div class="index-item-description">Update a location.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_mirror</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_mirror">mirror_update_mirror()</a> in mirror.php</div> + <div class="index-item-description">Update mirror.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_os</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_os">mirror_update_os()</a> in mirror.php</div> + <div class="index-item-description">Update os.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_product</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_product">mirror_update_product()</a> in mirror.php</div> + <div class="index-item-description">Update product.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_region</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_region">mirror_update_region()</a> in mirror.php</div> + <div class="index-item-description">Update region.</div> + </dd> + <dt class="field"> + <span class="method-title">mirror_update_user</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html#functionmirror_update_user">mirror_update_user()</a> in mirror.php</div> + <div class="index-item-description">Update a user.</div> + </dd> + <dt class="field"> + <span class="include-title">mirror.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_mirror_php.html">mirror.php</a> in mirror.php</div> + </dd> + </dl> + <a name="o"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">o</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">os.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_os_php.html">os.php</a> in os.php</div> + </dd> + <dt class="field"> + <span class="include-title">os.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_os_php.html">os.php</a> in os.php</div> + </dd> + </dl> + <a name="p"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">p</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">products.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_products_php.html">products.php</a> in products.php</div> + </dd> + <dt class="field"> + <span class="include-title">pstats.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_pstats_php.html">pstats.php</a> in pstats.php</div> + </dd> + <dt class="field"> + <span class="include-title">product.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_product_php.html">product.php</a> in product.php</div> + </dd> + <dt class="field"> + <span class="method-title">password_gen</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionpassword_gen">password_gen()</a> in util.php</div> + <div class="index-item-description">Generate a random string good for passwords</div> + </dd> + </dl> + <a name="r"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">r</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">regions.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_regions_php.html">regions.php</a> in regions.php</div> + </dd> + <dt class="field"> + <span class="include-title">region.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_region_php.html">region.php</a> in region.php</div> + </dd> + <dt class="field"> + <span class="method-title">record_exists</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionrecord_exists">record_exists()</a> in util.php</div> + <div class="index-item-description">This function checks for the existence of a particular row in a particular table matching a value.</div> + </dd> + </dl> + <a name="s"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">s</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="method-title">set_error</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionset_error">set_error()</a> in util.php</div> + <div class="index-item-description">Add an error message to SESSION['errors'] array.</div> + </dd> + <dt class="field"> + <span class="method-title">set_msg</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionset_msg">set_msg()</a> in util.php</div> + <div class="index-item-description">Add a message to SESSION['messages'] array.</div> + </dd> + <dt class="field"> + <span class="method-title">show_error</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_error">show_error()</a> in util.php</div> + <div class="index-item-description">Show errors messages.</div> + </dd> + <dt class="field"> + <span class="method-title">show_headers</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_headers">show_headers()</a> in list.php</div> + <div class="index-item-description">Show table headers.</div> + </dd> + <dt class="field"> + <span class="method-title">show_list</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_list">show_list()</a> in list.php</div> + <div class="index-item-description">Show a list of values, for forms.</div> + </dd> + <dt class="field"> + <span class="method-title">show_msg</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_msg">show_msg()</a> in util.php</div> + <div class="index-item-description">Show messages.</div> + </dd> + <dt class="field"> + <span class="method-title">show_row</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_list_php.html#functionshow_row">show_row()</a> in list.php</div> + <div class="index-item-description">Show table data.</div> + </dd> + <dt class="field"> + <span class="method-title">show_tabs</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html#functionshow_tabs">show_tabs()</a> in util.php</div> + <div class="index-item-description">Show user tabs, based on an array.</div> + </dd> + </dl> + <a name="u"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">u</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="include-title">users.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/admin/_php_admin_users_php.html">users.php</a> in users.php</div> + </dd> + <dt class="field"> + <span class="include-title">user.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/forms/_php_inc_forms_user_php.html">user.php</a> in user.php</div> + </dd> + <dt class="field"> + <span class="include-title">util.php</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_util_php.html">util.php</a> in util.php</div> + </dd> + <dt class="field"> + <span class="method-title">url_out</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/lib/_php_lib_forms_php.html#functionurl_out">url_out()</a> in forms.php</div> + <div class="index-item-description">Returns http:// and the string if the string does not begin with http://</div> + </dd> + </dl> + <a name="w"></a> + <div class="index-letter-section"> + <div style="float: left" class="index-letter-title">w</div> + <div style="float: right"><a href="#top">top</a></div> + <div style="clear: both"></div> + </div> + <dl> + <dt class="field"> + <span class="const-title">WEBPATH</span> + </dt> + <dd class="index-item-body"> + <div class="index-item-details"><a href="mirror/cfg/_php_cfg_config-dist_php.html#defineWEBPATH">WEBPATH</a> in config-dist.php</div> + </dd> + </dl> + +<div class="index-letter-menu"> + <a class="index-letter" href="elementindex_mirror.html#a">a</a> + <a class="index-letter" href="elementindex_mirror.html#c">c</a> + <a class="index-letter" href="elementindex_mirror.html#d">d</a> + <a class="index-letter" href="elementindex_mirror.html#e">e</a> + <a class="index-letter" href="elementindex_mirror.html#f">f</a> + <a class="index-letter" href="elementindex_mirror.html#g">g</a> + <a class="index-letter" href="elementindex_mirror.html#h">h</a> + <a class="index-letter" href="elementindex_mirror.html#i">i</a> + <a class="index-letter" href="elementindex_mirror.html#l">l</a> + <a class="index-letter" href="elementindex_mirror.html#m">m</a> + <a class="index-letter" href="elementindex_mirror.html#o">o</a> + <a class="index-letter" href="elementindex_mirror.html#p">p</a> + <a class="index-letter" href="elementindex_mirror.html#r">r</a> + <a class="index-letter" href="elementindex_mirror.html#s">s</a> + <a class="index-letter" href="elementindex_mirror.html#u">u</a> + <a class="index-letter" href="elementindex_mirror.html#w">w</a> +</div>
</body> +</html>
\ No newline at end of file diff --git a/docs/errors.html b/docs/errors.html new file mode 100644 index 0000000..89f9ba9 --- /dev/null +++ b/docs/errors.html @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>phpDocumentor Parser Errors and Warnings</title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<a href="#Post-parsing">Post-parsing</a><br> +<a href="#config-dist.php">config-dist.php</a><br> +<a href="#header.php">header.php</a><br> +<a href="#index.php">index.php</a><br> +<a href="#init.php">init.php</a><br> +<a href="#locations.php">locations.php</a><br> +<a href="#login.php">login.php</a><br> +<a href="#logout.php">logout.php</a><br> +<a href="#mstats.php">mstats.php</a><br> +<a href="#os.php">os.php</a><br> +<a href="#products.php">products.php</a><br> +<a href="#pstats.php">pstats.php</a><br> +<a href="#regions.php">regions.php</a><br> +<a href="#users.php">users.php</a><br> +<a href="#util.php">util.php</a><br> +<a name="admin_init.php"></a> +<h1>admin_init.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 6</b> - Page-level DocBlock precedes "require_once admin_init.php", use another DocBlock to document the source element<br> +<a name="config-dist.php"></a> +<h1>config-dist.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 6</b> - Page-level DocBlock precedes "define FILEPATH", use another DocBlock to document the source element<br> +<a name="header.php"></a> +<h1>header.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 53</b> - Page-level DocBlock precedes "require_once header.php", use another DocBlock to document the source element<br> +<a name="index.php"></a> +<h1>index.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once index.php", use another DocBlock to document the source element<br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once index.php", use another DocBlock to document the source element<br> +<a name="init.php"></a> +<h1>init.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 6</b> - Page-level DocBlock precedes "require_once init.php", use another DocBlock to document the source element<br> +<a name="locations.php"></a> +<h1>locations.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once locations.php", use another DocBlock to document the source element<br> +<a name="login.php"></a> +<h1>login.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 6</b> - Page-level DocBlock precedes "require_once login.php", use another DocBlock to document the source element<br> +<a name="logout.php"></a> +<h1>logout.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 6</b> - Page-level DocBlock precedes "require_once logout.php", use another DocBlock to document the source element<br> +<a name="mstats.php"></a> +<h1>mstats.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once mstats.php", use another DocBlock to document the source element<br> +<a name="os.php"></a> +<h1>os.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once os.php", use another DocBlock to document the source element<br> +<a name="products.php"></a> +<h1>products.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once products.php", use another DocBlock to document the source element<br> +<a name="pstats.php"></a> +<h1>pstats.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once pstats.php", use another DocBlock to document the source element<br> +<a name="regions.php"></a> +<h1>regions.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once regions.php", use another DocBlock to document the source element<br> +<a name="users.php"></a> +<h1>users.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 7</b> - Page-level DocBlock precedes "require_once users.php", use another DocBlock to document the source element<br> +<a name="util.php"></a> +<h1>util.php</h1> +<h2>Warnings:</h2><br> +<b>Warning on line 157</b> - Unknown tag "@ret" used<br> + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </body> +</html>
\ No newline at end of file diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..d300169 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html + PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//FR" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> +<head> + <!-- Generated by phpDocumentor on Mon, 8 Nov 2004 13:43:03 -0800 --> + <title>mirror</title> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> +</head> + +<FRAMESET rows='120,*'> + <FRAME src='packages.html' name='left_top' frameborder="1" bordercolor="#999999"> + <FRAMESET cols='25%,*'> + <FRAME src='li_mirror.html' name='left_bottom' frameborder="1" bordercolor="#999999"> + <FRAME src='blank.html' name='right' frameborder="1" bordercolor="#999999"> + </FRAMESET> + <NOFRAMES> + <H2>Frame Alert</H2> + <P>This document is designed to be viewed using the frames feature. + If you see this message, you are using a non-frame-capable web client.</P> + </NOFRAMES> +</FRAMESET> +</HTML>
\ No newline at end of file diff --git a/docs/li_mirror.html b/docs/li_mirror.html new file mode 100644 index 0000000..50cc378 --- /dev/null +++ b/docs/li_mirror.html @@ -0,0 +1,231 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<div class="package-title">mirror</div> +<div class="package-details"> + + <dl class="tree"> + + <dt class="folder-title">Description</dt> + <dd> + <a href='classtrees_mirror.html' target='right'>Class trees</a><br /> + <a href='elementindex_mirror.html' target='right'>Index of elements</a><br /> + <a href="todolist.html" target="right">Todo List</a><br /> + </dd> + + + + + + + + <dt class="sub-package">admin</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/admin/_php_admin_index_php.html' target='right'>index.php</a></dd> + <dd><a href='mirror/admin/_php_admin_locations_php.html' target='right'>locations.php</a></dd> + <dd><a href='mirror/admin/_php_admin_login_php.html' target='right'>login.php</a></dd> + <dd><a href='mirror/admin/_php_admin_logout_php.html' target='right'>logout.php</a></dd> + <dd><a href='mirror/admin/_php_admin_mstats_php.html' target='right'>mstats.php</a></dd> + <dd><a href='mirror/admin/_php_admin_os_php.html' target='right'>os.php</a></dd> + <dd><a href='mirror/admin/_php_admin_products_php.html' target='right'>products.php</a></dd> + <dd><a href='mirror/admin/_php_admin_pstats_php.html' target='right'>pstats.php</a></dd> + <dd><a href='mirror/admin/_php_admin_regions_php.html' target='right'>regions.php</a></dd> + <dd><a href='mirror/admin/_php_admin_users_php.html' target='right'>users.php</a></dd> + </dl> + </dd> + + + + + <dt class="sub-package">cfg</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/cfg/_php_cfg_admin_init_php.html' target='right'>admin_init.php</a></dd> + <dd><a href='mirror/cfg/_php_cfg_config-dist_php.html' target='right'>config-dist.php</a></dd> + <dd><a href='mirror/cfg/_php_cfg_init_php.html' target='right'>init.php</a></dd> + </dl> + </dd> + + + + + <dt class="sub-package">forms</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/forms/_php_inc_forms_location_php.html' target='right'>location.php</a></dd> + <dd><a href='mirror/forms/_php_inc_forms_mirror_php.html' target='right'>mirror.php</a></dd> + <dd><a href='mirror/forms/_php_inc_forms_os_php.html' target='right'>os.php</a></dd> + <dd><a href='mirror/forms/_php_inc_forms_product_php.html' target='right'>product.php</a></dd> + <dd><a href='mirror/forms/_php_inc_forms_region_php.html' target='right'>region.php</a></dd> + <dd><a href='mirror/forms/_php_inc_forms_user_php.html' target='right'>user.php</a></dd> + </dl> + </dd> + + + + + <dt class="sub-package">inc</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/inc/_php_inc_admin_nav_php.html' target='right'>admin_nav.php</a></dd> + <dd><a href='mirror/inc/_php_inc_footer_php.html' target='right'>footer.php</a></dd> + <dd><a href='mirror/inc/_php_inc_header_php.html' target='right'>header.php</a></dd> + </dl> + </dd> + + + + + <dt class="sub-package">lib</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Functions</dt> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_days' target='right'>array_days</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_hours' target='right'>array_hours</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_minutes' target='right'>array_minutes</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_months' target='right'>array_months</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionarray_order_by' target='right'>array_order_by</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_states' target='right'>array_states</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionarray_years' target='right'>array_years</a></dd> + <dd><a href='mirror/lib/_php_lib_auth_php.html#functionauth_create_session' target='right'>auth_create_session</a></dd> + <dd><a href='mirror/lib/_php_lib_auth_php.html#functionauth_is_valid_session' target='right'>auth_is_valid_session</a></dd> + <dd><a href='mirror/lib/_php_lib_auth_php.html#functionauth_logout' target='right'>auth_logout</a></dd> + <dd><a href='mirror/lib/_php_lib_auth_php.html#functionauth_mysql' target='right'>auth_mysql</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionclean_in' target='right'>clean_in</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionclean_out' target='right'>clean_out</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_close' target='right'>db_close</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_connect' target='right'>db_connect</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_fetch' target='right'>db_fetch</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_fieldnames' target='right'>db_fieldnames</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_get' target='right'>db_get</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_get_one' target='right'>db_get_one</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functiondb_get_to_options' target='right'>db_get_to_options</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_insert_id' target='right'>db_insert_id</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_makeinsert' target='right'>db_makeinsert</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_makereplace' target='right'>db_makereplace</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_makeupdate' target='right'>db_makeupdate</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_name_to_id' target='right'>db_name_to_id</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_numrows' target='right'>db_numrows</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_query' target='right'>db_query</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_select' target='right'>db_select</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html#functiondb_toggle_bool' target='right'>db_toggle_bool</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functiondebug_r' target='right'>debug_r</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionemptify_in_array' target='right'>emptify_in_array</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_array_fix_dates' target='right'>form_array_fix_dates</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_array_get_date' target='right'>form_array_get_date</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_array_get_datetime' target='right'>form_array_get_datetime</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_checkbox' target='right'>form_checkbox</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_end' target='right'>form_end</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_hidden' target='right'>form_hidden</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_label' target='right'>form_label</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_password' target='right'>form_password</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_radio' target='right'>form_radio</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_reset' target='right'>form_reset</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_select' target='right'>form_select</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_start' target='right'>form_start</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_submit' target='right'>form_submit</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_text' target='right'>form_text</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionform_textarea' target='right'>form_textarea</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html#functiongeo_get_coordinates' target='right'>geo_get_coordinates</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html#functiongeo_get_country' target='right'>geo_get_country</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html#functiongeo_get_distance' target='right'>geo_get_distance</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html#functiongeo_get_record' target='right'>geo_get_record</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html#functiongeo_query' target='right'>geo_query</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionget_order' target='right'>get_order</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionget_orderby' target='right'>get_orderby</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionis_email_address' target='right'>is_email_address</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionis_phone_number' target='right'>is_phone_number</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionlist_edit_ids' target='right'>list_edit_ids</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionlist_update_ids' target='right'>list_update_ids</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionmicrotime_float' target='right'>microtime_float</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_location' target='right'>mirror_delete_location</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_mirror' target='right'>mirror_delete_mirror</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_os' target='right'>mirror_delete_os</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_product' target='right'>mirror_delete_product</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_region' target='right'>mirror_delete_region</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_delete_user' target='right'>mirror_delete_user</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_locations' target='right'>mirror_get_locations</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors' target='right'>mirror_get_mirrors</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirrors_select' target='right'>mirror_get_mirrors_select</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_mirror_stats' target='right'>mirror_get_mirror_stats</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_location' target='right'>mirror_get_one_location</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_mirror' target='right'>mirror_get_one_mirror</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_os' target='right'>mirror_get_one_os</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_product' target='right'>mirror_get_one_product</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_region' target='right'>mirror_get_one_region</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_one_user' target='right'>mirror_get_one_user</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss' target='right'>mirror_get_oss</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select' target='right'>mirror_get_oss_select</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_oss_select_priority' target='right'>mirror_get_oss_select_priority</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products' target='right'>mirror_get_products</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select' target='right'>mirror_get_products_select</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_products_select_priority' target='right'>mirror_get_products_select_priority</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_product_stats' target='right'>mirror_get_product_stats</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions' target='right'>mirror_get_regions</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select' target='right'>mirror_get_regions_select</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_regions_select_priority' target='right'>mirror_get_regions_select_priority</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_get_users' target='right'>mirror_get_users</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_location' target='right'>mirror_insert_location</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_mirror' target='right'>mirror_insert_mirror</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_os' target='right'>mirror_insert_os</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_product' target='right'>mirror_insert_product</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_region' target='right'>mirror_insert_region</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_insert_user' target='right'>mirror_insert_user</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_toggle' target='right'>mirror_toggle</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_location' target='right'>mirror_update_location</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_mirror' target='right'>mirror_update_mirror</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_os' target='right'>mirror_update_os</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_product' target='right'>mirror_update_product</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_region' target='right'>mirror_update_region</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html#functionmirror_update_user' target='right'>mirror_update_user</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionpassword_gen' target='right'>password_gen</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionrecord_exists' target='right'>record_exists</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionset_error' target='right'>set_error</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionset_msg' target='right'>set_msg</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionshow_error' target='right'>show_error</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionshow_headers' target='right'>show_headers</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionshow_list' target='right'>show_list</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionshow_msg' target='right'>show_msg</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html#functionshow_row' target='right'>show_row</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html#functionshow_tabs' target='right'>show_tabs</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html#functionurl_out' target='right'>url_out</a></dd> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/lib/_php_lib_auth_php.html' target='right'>auth.php</a></dd> + <dd><a href='mirror/lib/_php_lib_db_php.html' target='right'>db.php</a></dd> + <dd><a href='mirror/lib/_php_lib_forms_php.html' target='right'>forms.php</a></dd> + <dd><a href='mirror/lib/_php_lib_geo_php.html' target='right'>geo.php</a></dd> + <dd><a href='mirror/lib/_php_lib_list_php.html' target='right'>list.php</a></dd> + <dd><a href='mirror/lib/_php_lib_mirror_php.html' target='right'>mirror.php</a></dd> + <dd><a href='mirror/lib/_php_lib_util_php.html' target='right'>util.php</a></dd> + </dl> + </dd> + + + + + <dt class="sub-package">pub</dt> + <dd> + <dl class="tree"> + <dt class="folder-title">Files</dt> + <dd><a href='mirror/pub/_php_index_php.html' target='right'>index.php</a></dd> + </dl> + </dd> + + + </dl> +</div> +<p class="notes"><a href="http://www.phpdoc.org" target="_blank">phpDocumentor v <span class="field">1.3.0RC3</span></a></p> +</BODY> +</HTML>
\ No newline at end of file diff --git a/docs/media/banner.css b/docs/media/banner.css new file mode 100644 index 0000000..f2149eb --- /dev/null +++ b/docs/media/banner.css @@ -0,0 +1,32 @@ +body +{ + background-color: #CCCCFF; + margin: 0px; + padding: 0px; +} + +/* Banner (top bar) classes */ + +.banner { } + +.banner-menu +{ + clear: both; + padding: .5em; + border-top: 2px solid #6666AA; +} + +.banner-title +{ + text-align: right; + font-size: 20pt; + font-weight: bold; + margin: .2em; +} + +.package-selector +{ + background-color: #AAAADD; + border: 1px solid black; + color: yellow; +} diff --git a/docs/media/stylesheet.css b/docs/media/stylesheet.css new file mode 100644 index 0000000..94870fb --- /dev/null +++ b/docs/media/stylesheet.css @@ -0,0 +1,144 @@ +a { color: #336699; text-decoration: none; } +a:hover { color: #6699CC; text-decoration: underline; } +a:active { color: #6699CC; text-decoration: underline; } + +body { background : #FFFFFF; } +body, table { font-family: Georgia, Times New Roman, Times, serif; font-size: 10pt } +p, li { line-height: 140% } +a img { border: 0px; } +dd { margin-left: 0px; padding-left: 1em; } + +/* Page layout/boxes */ + +.info-box {} +.info-box-title { margin: 1em 0em 0em 0em; padding: .25em; font-weight: normal; font-size: 14pt; border: 2px solid #999999; background-color: #CCCCFF } +.info-box-body { border: 1px solid #999999; padding: .5em; } +.nav-bar { font-size: 8pt; white-space: nowrap; text-align: right; padding: .2em; margin: 0em 0em 1em 0em; } + +.oddrow { background-color: #F8F8F8; border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} +.evenrow { border: 1px solid #AAAAAA; padding: .5em; margin-bottom: 1em} + +.page-body { max-width: 800px; margin: auto; } +.tree dl { margin: 0px } + +/* Index formatting classes */ + +.index-item-body { margin-top: .5em; margin-bottom: .5em} +.index-item-description { margin-top: .25em } +.index-item-details { font-weight: normal; font-style: italic; font-size: 8pt } +.index-letter-section { background-color: #EEEEEE; border: 1px dotted #999999; padding: .5em; margin-bottom: 1em} +.index-letter-title { font-size: 12pt; font-weight: bold } +.index-letter-menu { text-align: center; margin: 1em } +.index-letter { font-size: 12pt } + +/* Docbook classes */ + +.description {} +.short-description { font-weight: bold; color: #666666; } +.tags { padding-left: 0em; margin-left: 3em; color: #666666; list-style-type: square; } +.parameters { padding-left: 0em; margin-left: 3em; font-style: italic; list-style-type: square; } +.redefinitions { font-size: 8pt; padding-left: 0em; margin-left: 2em; } +.package { } +.package-title { font-weight: bold; font-size: 14pt; border-bottom: 1px solid black } +.package-details { font-size: 85%; } +.sub-package { font-weight: bold; font-size: 120% } +.tutorial { border-width: thin; border-color: #0066ff } +.tutorial-nav-box { width: 100%; border: 1px solid #999999; background-color: #F8F8F8; } +.nav-button-disabled { color: #999999; } +.nav-button:active, +.nav-button:focus, +.nav-button:hover { background-color: #DDDDDD; outline: 1px solid #999999; text-decoration: none } +.folder-title { font-style: italic } + +/* Generic formatting */ + +.field { font-weight: bold; } +.detail { font-size: 8pt; } +.notes { font-style: italic; font-size: 8pt; } +.separator { background-color: #999999; height: 2px; } +.warning { color: #FF6600; } +.disabled { font-style: italic; color: #999999; } + +/* Code elements */ + +.line-number { } + +.class-table { width: 100%; } +.class-table-header { border-bottom: 1px dotted #666666; text-align: left} +.class-name { color: #000000; font-weight: bold; } + +.method-summary { padding-left: 1em; font-size: 8pt } +.method-header { } +.method-definition { margin-bottom: .3em } +.method-title { font-weight: bold; } +.method-name { font-weight: bold; } +.method-signature { font-size: 85%; color: #666666; margin: .5em 0em } +.method-result { font-style: italic; } + +.var-summary { padding-left: 1em; font-size: 8pt; } +.var-header { } +.var-title { margin-bottom: .3em } +.var-type { font-style: italic; } +.var-name { font-weight: bold; } +.var-default {} +.var-description { font-weight: normal; color: #000000; } + +.include-title { } +.include-type { font-style: italic; } +.include-name { font-weight: bold; } + +.const-title { } +.const-name { font-weight: bold; } + +/* Syntax highlighting */ + +.src-code { border: 1px solid #336699; padding: 1em; background-color: #EEEEEE; } +*[class="src-code"] { line-height : 0.5em } + +.src-comm { color: green; } +.src-id { } +.src-inc { color: #0000FF; } +.src-key { color: #0000FF; } +.src-num { color: #CC0000; } +.src-str { color: #66cccc; } +.src-sym { font-weight: bold; } +.src-var { } + +.src-php { font-weight: bold; } + +.src-doc { color: #009999 } +.src-doc-close-template { color: #0000FF } +.src-doc-coretag { color: #0099FF; font-weight: bold } +.src-doc-inlinetag { color: #0099FF } +.src-doc-internal { color: #6699cc } +.src-doc-tag { color: #0080CC } +.src-doc-template { color: #0000FF } +.src-doc-type { font-style: italic } +.src-doc-var { font-style: italic } + +.tute-tag { color: #009999 } +.tute-attribute-name { color: #0000FF } +.tute-attribute-value { color: #0099FF } +.tute-entity { font-weight: bold; } +.tute-comment { font-style: italic } +.tute-inline-tag { color: #636311; font-weight: bold } + +/* tutorial */ + +.authors { } +.author { font-style: italic; font-weight: bold } +.author-blurb { margin: .5em 0em .5em 2em; font-size: 85%; font-weight: normal; font-style: normal } +.example { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; } +*[class="example"] { line-height : 0.5em } +.listing { border: 1px dashed #999999; background-color: #EEEEEE; padding: .5em; white-space: nowrap; } +*[class="listing"] { line-height : 0.5em } +.release-info { font-size: 85%; font-style: italic; margin: 1em 0em } +.ref-title-box { } +.ref-title { } +.ref-purpose { font-style: italic; color: #666666 } +.ref-synopsis { } +.title { font-weight: bold; margin: 1em 0em 0em 0em; padding: .25em; border: 2px solid #999999; background-color: #CCCCFF } +.cmd-synopsis { margin: 1em 0em } +.cmd-title { font-weight: bold } +.toc { margin-left: 2em; padding-left: 0em } + diff --git a/docs/mirror/_php_cfg_admin_init_php.html b/docs/mirror/_php_cfg_admin_init_php.html new file mode 100644 index 0000000..33b23f1 --- /dev/null +++ b/docs/mirror/_php_cfg_admin_init_php.html @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page admin_init.php</title> + <link rel="stylesheet" href="../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/cfg/admin_init.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Admin initialization.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_LIB_/auth_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/auth.php'</span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/forms_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/forms.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/list_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/list.php'</span>) + (line <span class="line-number">9</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:30:41 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/_php_index_php.html b/docs/mirror/_php_index_php.html new file mode 100644 index 0000000..8a0609b --- /dev/null +++ b/docs/mirror/_php_index_php.html @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page index.php</title> + <link rel="stylesheet" href="../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/index.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Main handler.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="__/cfg/config_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">'./cfg/config.php'</span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/db_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/db.php'</span>) + (line <span class="line-number">11</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:30:42 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_index_php.html b/docs/mirror/admin/_php_admin_index_php.html new file mode 100644 index 0000000..5ccf292 --- /dev/null +++ b/docs/mirror/admin/_php_admin_index_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page index.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/index.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Regions.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/mirror_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/mirror.php'</span>) + (line <span class="line-number">105</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/mirror_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/mirror.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">72</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">109</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_locations_php.html b/docs/mirror/admin/_php_admin_locations_php.html new file mode 100644 index 0000000..580fdc5 --- /dev/null +++ b/docs/mirror/admin/_php_admin_locations_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page locations.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/locations.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">File locations.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/location_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/location.php'</span>) + (line <span class="line-number">95</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/location_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/location.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">66</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">99</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_login_php.html b/docs/mirror/admin/_php_admin_login_php.html new file mode 100644 index 0000000..5fb9b53 --- /dev/null +++ b/docs/mirror/admin/_php_admin_login_php.html @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page login.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/login.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Admin login.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/auth_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/auth.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">23</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_logout_php.html b/docs/mirror/admin/_php_admin_logout_php.html new file mode 100644 index 0000000..23ead61 --- /dev/null +++ b/docs/mirror/admin/_php_admin_logout_php.html @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page logout.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/logout.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Admin logout.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/auth_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/auth.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_mstats_php.html b/docs/mirror/admin/_php_admin_mstats_php.html new file mode 100644 index 0000000..7a8c630 --- /dev/null +++ b/docs/mirror/admin/_php_admin_mstats_php.html @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page mstats.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/mstats.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Mirror Statistics.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">12</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">31</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_os_php.html b/docs/mirror/admin/_php_admin_os_php.html new file mode 100644 index 0000000..f8d93d8 --- /dev/null +++ b/docs/mirror/admin/_php_admin_os_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page os.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/os.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Operating Systems.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/os_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/os.php'</span>) + (line <span class="line-number">95</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/os_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/os.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">66</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">99</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_products_php.html b/docs/mirror/admin/_php_admin_products_php.html new file mode 100644 index 0000000..d370b59 --- /dev/null +++ b/docs/mirror/admin/_php_admin_products_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page products.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/products.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Products.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/product_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/product.php'</span>) + (line <span class="line-number">95</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/product_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/product.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">66</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">99</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_pstats_php.html b/docs/mirror/admin/_php_admin_pstats_php.html new file mode 100644 index 0000000..0ad4f4e --- /dev/null +++ b/docs/mirror/admin/_php_admin_pstats_php.html @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page pstats.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/pstats.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Product Statistics.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="___/cfg/init_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">12</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">28</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_regions_php.html b/docs/mirror/admin/_php_admin_regions_php.html new file mode 100644 index 0000000..a90e209 --- /dev/null +++ b/docs/mirror/admin/_php_admin_regions_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page regions.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/regions.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Regions.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/region_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/region.php'</span>) + (line <span class="line-number">96</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/region_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/region.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">66</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">100</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/admin/_php_admin_users_php.html b/docs/mirror/admin/_php_admin_users_php.html new file mode 100644 index 0000000..fd347e9 --- /dev/null +++ b/docs/mirror/admin/_php_admin_users_php.html @@ -0,0 +1,145 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page users.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/admin/users.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Users.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_INC_/forms/user_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/user.php'</span>) + (line <span class="line-number">99</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_INC_/forms/user_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">include_once</span> + (<span class="include-name">INC.'/forms/user.php'</span>) + (line <span class="line-number">41</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">37</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="___/cfg/init_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_init_php.html">'../cfg/init.php'</a></span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_HEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">HEADER</span>) + (line <span class="line-number">68</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">103</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_FOOTER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">FOOTER</span>) + (line <span class="line-number">47</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/cfg/_php_cfg_admin_init_php.html b/docs/mirror/cfg/_php_cfg_admin_init_php.html new file mode 100644 index 0000000..904abc5 --- /dev/null +++ b/docs/mirror/cfg/_php_cfg_admin_init_php.html @@ -0,0 +1,89 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page admin_init.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/cfg/admin_init.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Admin initialization.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_LIB_/auth_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/auth.php'</span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/forms_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/forms.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/list_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/list.php'</span>) + (line <span class="line-number">9</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/cfg/_php_cfg_config-dist_php.html b/docs/mirror/cfg/_php_cfg_config-dist_php.html new file mode 100644 index 0000000..d4e6b53 --- /dev/null +++ b/docs/mirror/cfg/_php_cfg_config-dist_php.html @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page config-dist.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/cfg/config-dist.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-constants">Constants</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Mirror configuration document.</p> + + </div> +</div> + + + + <a name="sec-constants"></a> + <div class="info-box"> + <div class="info-box-title">Constants</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Constants</span> + </div> + <div class="info-box-body"> + <a name="defineDBHOST"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">DBHOST</span> = '' + (line <span class="line-number">13</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineDBNAME"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="const-title"> + <span class="const-name">DBNAME</span> = '' + (line <span class="line-number">14</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineDBPASS"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">DBPASS</span> = '' + (line <span class="line-number">16</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineDBUSER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="const-title"> + <span class="const-name">DBUSER</span> = '' + (line <span class="line-number">15</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineFILEPATH"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">FILEPATH</span> = '/var/www/download' + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineFOOTER"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="const-title"> + <span class="const-name">FOOTER</span> = INC.'/footer.php' + (line <span class="line-number">12</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineHEADER"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">HEADER</span> = INC.'/header.php' + (line <span class="line-number">11</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineINC"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="const-title"> + <span class="const-name">INC</span> = FILEPATH.'/inc' + (line <span class="line-number">10</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineLIB"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">LIB</span> = FILEPATH.'/lib' + (line <span class="line-number">9</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineLOGGING"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="const-title"> + <span class="const-name">LOGGING</span> = 1 + (line <span class="line-number">17</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> +<a name="defineWEBPATH"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="const-title"> + <span class="const-name">WEBPATH</span> = '' + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + + +</div> + </div> + </div> + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/cfg/_php_cfg_init_php.html b/docs/mirror/cfg/_php_cfg_init_php.html new file mode 100644 index 0000000..1166cbe --- /dev/null +++ b/docs/mirror/cfg/_php_cfg_init_php.html @@ -0,0 +1,117 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page init.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/cfg/init.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Init.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_config_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">'config.php'</span>) + (line <span class="line-number">7</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/util_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/util.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/mirror_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/mirror.php'</span>) + (line <span class="line-number">10</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/db_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/db.php'</span>) + (line <span class="line-number">11</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_admin_init_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name"><a href="../../mirror/cfg/_php_cfg_admin_init_php.html">'admin_init.php'</a></span>) + (line <span class="line-number">15</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_location_php.html b/docs/mirror/forms/_php_inc_forms_location_php.html new file mode 100644 index 0000000..4450a8f --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_location_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page location.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/location.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">File location form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_mirror_php.html b/docs/mirror/forms/_php_inc_forms_mirror_php.html new file mode 100644 index 0000000..89399af --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_mirror_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page mirror.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/mirror.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Region form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_os_php.html b/docs/mirror/forms/_php_inc_forms_os_php.html new file mode 100644 index 0000000..6def3e7 --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_os_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page os.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/os.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">OS form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_product_php.html b/docs/mirror/forms/_php_inc_forms_product_php.html new file mode 100644 index 0000000..5d7b5d4 --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_product_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page product.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/product.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Product form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_region_php.html b/docs/mirror/forms/_php_inc_forms_region_php.html new file mode 100644 index 0000000..0796126 --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_region_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page region.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/region.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Region form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/forms/_php_inc_forms_user_php.html b/docs/mirror/forms/_php_inc_forms_user_php.html new file mode 100644 index 0000000..f4b527c --- /dev/null +++ b/docs/mirror/forms/_php_inc_forms_user_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page user.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/forms/user.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">User form.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/inc/_php_inc_admin_nav_php.html b/docs/mirror/inc/_php_inc_admin_nav_php.html new file mode 100644 index 0000000..34c8f45 --- /dev/null +++ b/docs/mirror/inc/_php_inc_admin_nav_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page admin_nav.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/admin_nav.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Admin navigation.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/inc/_php_inc_footer_php.html b/docs/mirror/inc/_php_inc_footer_php.html new file mode 100644 index 0000000..5ec21f7 --- /dev/null +++ b/docs/mirror/inc/_php_inc_footer_php.html @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page footer.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/footer.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Footer document.</p> + + </div> +</div> + + + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/inc/_php_inc_header_php.html b/docs/mirror/inc/_php_inc_header_php.html new file mode 100644 index 0000000..9eabc3c --- /dev/null +++ b/docs/mirror/inc/_php_inc_header_php.html @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page header.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/inc/header.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Header document.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="_$nav"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">$nav</span>) + (line <span class="line-number">54</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_auth_php.html b/docs/mirror/lib/_php_lib_auth_php.html new file mode 100644 index 0000000..b40ce29 --- /dev/null +++ b/docs/mirror/lib/_php_lib_auth_php.html @@ -0,0 +1,150 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page auth.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/auth.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Home-cooked auth libraries - because PEAR is fat.</p> + <ul class="tags"> + <li><span class="field">todo:</span> re-enforce one-per-user session limit</li> + </ul> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functionauth_create_session" id="functionauth_create_session"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">auth_create_session</span> (line <span class="line-number">56</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Start a valid session.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + auth_create_session + </span> + (<span class="var-type">array</span> <span class="var-name">$user</span>, [<span class="var-type">mixed</span> <span class="var-name">$secure</span> = <span class="var-default">0</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$user</span><span class="var-description">: array containing user information.</span> </li> + </ul> + + +</div> +<a name="functionauth_is_valid_session" id="functionauth_is_valid_session"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">auth_is_valid_session</span> (line <span class="line-number">13</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Check admin session against sessions table in database.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + auth_is_valid_session + </span> + () + </div> + + + +</div> +<a name="functionauth_logout" id="functionauth_logout"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">auth_logout</span> (line <span class="line-number">68</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Logout.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + auth_logout + </span> + () + </div> + + + +</div> +<a name="functionauth_mysql" id="functionauth_mysql"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">auth_mysql</span> (line <span class="line-number">37</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Authentication a user.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing user data or false on failure</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array|bool</span> + <span class="method-name"> + auth_mysql + </span> + (<span class="var-type">string</span> <span class="var-name">$username</span>, <span class="var-type">string</span> <span class="var-name">$password</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$username</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$password</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_db_php.html b/docs/mirror/lib/_php_lib_db_php.html new file mode 100644 index 0000000..5b8ddbd --- /dev/null +++ b/docs/mirror/lib/_php_lib_db_php.html @@ -0,0 +1,527 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page db.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/db.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Minimal wrappers for core PHP mysql_* functions.</p> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functiondb_close" id="functiondb_close"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_close</span> (line <span class="line-number">258</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Close the db connection. If a dbh is not specified, assume the last opened link.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + db_close + </span> + ([<span class="var-type">resource</span> <span class="var-name">$dbh</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">resource</span> + <span class="var-name">$dbh</span><span class="var-description">: optional dbh to close</span> </li> + </ul> + + +</div> +<a name="functiondb_connect" id="functiondb_connect"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_connect</span> (line <span class="line-number">15</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Connect to a MySQL database server.</p> + <ul class="tags"> + <li><span class="field">return:</span> dbh</li> + </ul> + + <div class="method-signature"> + <span class="method-result">resource</span> + <span class="method-name"> + db_connect + </span> + ([<span class="var-type">string</span> <span class="var-name">$host</span> = <span class="var-default">'localhost'</span>], [<span class="var-type">string</span> <span class="var-name">$user</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$password</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$host</span><span class="var-description">: db server, defaults to localhost</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$user</span><span class="var-description">: db username</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$password</span><span class="var-description">: db password</span> </li> + </ul> + + +</div> +<a name="functiondb_fetch" id="functiondb_fetch"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_fetch</span> (line <span class="line-number">69</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Fetch a row as an array from a result.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + db_fetch + </span> + ([<span class="var-type">string</span> <span class="var-name">$result</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span> <span class="var-name">$type</span> = <span class="var-default">MYSQL_BOTH</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$result</span><span class="var-description">: (default to null)</span> </li> + </ul> + + +</div> +<a name="functiondb_fieldnames" id="functiondb_fieldnames"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_fieldnames</span> (line <span class="line-number">121</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get all of the fieldnames for the specified table.</p> + <ul class="tags"> + <li><span class="field">return:</span> array of column names, must be an array</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + db_fieldnames + </span> + (<span class="var-type">string</span> <span class="var-name">$table</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of table to describe</span> </li> + </ul> + + +</div> +<a name="functiondb_get" id="functiondb_get"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_get</span> (line <span class="line-number">96</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Fetch an array based on a query.</p> + <ul class="tags"> + <li><span class="field">return:</span> array of database rows Example of returned array: <pre><ol><code><pre><li> <a href="../../mirror/lib/_php_lib_db_php.html#functiondb_get">db_get</a><span class="src-sym">(</span><span class="src-str">"SELECT * FROM table"</span><span class="src-sym">,</span><span class="src-id">MYSQL_ASSOC</span><span class="src-sym">)</span><span class="src-sym">;</span></li> +<li> <span class="src-id">returns</span>...</li> +<li> <span class="src-key">Array</span></li> +<li> <span class="src-sym">(</span></li> +<li> <span class="src-sym">[</span><span class="src-num">0</span><span class="src-sym">] </span>=> <span class="src-key">Array</span></li> +<li> <span class="src-sym">(</span></li> +<li> <span class="src-sym">[</span><span class="src-id">id</span><span class="src-sym">] </span>=> <span class="src-num">1</span></li> +<li> <span class="src-sym">[</span><span class="src-id">field1</span><span class="src-sym">] </span>=> <span class="src-id">data1</span></li> +<li> <span class="src-sym">[</span><span class="src-id">field2</span><span class="src-sym">] </span>=> <span class="src-id">data2</span></li> +<li> <span class="src-sym">)</span></li> +<li> </li> +<li> <span class="src-sym">)</span></li> +</pre></code></ol></pre></li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + db_get + </span> + (<span class="var-type">string</span> <span class="var-name">$query</span>, [<span class="var-type">int</span> <span class="var-name">$type</span> = <span class="var-default">MYSQL_BOTH</span>], [<span class="var-type">string</span> <span class="var-name">$col_id</span> = <span class="var-default">NULL</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$query</span><span class="var-description">: database query</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$type</span><span class="var-description">: result type</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$col_id</span><span class="var-description">: if passed it, the values of this column in the result set will be used as the array keys in the returned array</span> </li> + </ul> + + +</div> +<a name="functiondb_get_one" id="functiondb_get_one"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_get_one</span> (line <span class="line-number">268</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one record.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + db_get_one + </span> + (<span class="var-type">string</span> <span class="var-name">$query</span>, [<span class="var-type">int</span> <span class="var-name">$type</span> = <span class="var-default">MYSQL_ASSOC</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$query</span><span class="var-description">: query</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$type</span><span class="var-description">: result type</span> </li> + </ul> + + +</div> +<a name="functiondb_insert_id" id="functiondb_insert_id"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_insert_id</span> (line <span class="line-number">237</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Since PHP's mysql_insert_id() sometimes throws an error, this is the replacement</p> + <ul class="tags"> + <li><span class="field">return:</span> the return value of MySQL's last_insert_id()</li> + </ul> + + <div class="method-signature"> + <span class="method-result">int</span> + <span class="method-name"> + db_insert_id + </span> + ([<span class="var-type">resource</span> <span class="var-name">$dbh</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">resource</span> + <span class="var-name">$dbh</span><span class="var-description">: optional dbh to get the last inserted id from</span> </li> + </ul> + + +</div> +<a name="functiondb_makeinsert" id="functiondb_makeinsert"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_makeinsert</span> (line <span class="line-number">151</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Create a MySQL INSERT statement based on $_POST array generated by form submission.</p> +<p class="description"><p><ul><li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li><li>do not use clean_in() before this, or you'll have double the slashes</li><li>use the function only when it saves you time, not _always_</li><li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li></ul></p></p> + <ul class="tags"> + <li><span class="field">return:</span> resulting MySQL insert string</li> + </ul> + + <div class="method-signature"> + <span class="method-result">string</span> + <span class="method-name"> + db_makeinsert + </span> + (<span class="var-type">array</span> <span class="var-name">$vars</span>, <span class="var-type">string</span> <span class="var-name">$table</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$vars</span><span class="var-description">: array of posts</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of the table that fields will be inserted into</span> </li> + </ul> + + +</div> +<a name="functiondb_makereplace" id="functiondb_makereplace"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_makereplace</span> (line <span class="line-number">183</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Create a MySQL REPLACE statement based on $_POST array generated by form submission.</p> +<p class="description"><p><ul><li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li><li>do not use clean_in() before this, or you'll have double the slashes</li><li>use the function only when it saves you time, not _always_</li><li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li></ul></p></p> + <ul class="tags"> + <li><span class="field">return:</span> resulting MySQL insert string</li> + </ul> + + <div class="method-signature"> + <span class="method-result">string</span> + <span class="method-name"> + db_makereplace + </span> + (<span class="var-type">array</span> <span class="var-name">$vars</span>, <span class="var-type">string</span> <span class="var-name">$table</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$vars</span><span class="var-description">: array of posts</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of the table that fields will be inserted into</span> </li> + </ul> + + +</div> +<a name="functiondb_makeupdate" id="functiondb_makeupdate"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_makeupdate</span> (line <span class="line-number">215</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Create a MySQL UPDATE statement based on $_POST array generated by form submission.</p> +<p class="description"><p><ul><li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li><li>do not use clean_in() before this, or you'll have double the slashes</li><li>use the function only when it saves you time, not _always_</li><li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li></ul></p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + db_makeupdate + </span> + (<span class="var-type">array</span> <span class="var-name">$vars</span>, <span class="var-type">string</span> <span class="var-name">$table</span>, <span class="var-type">string</span> <span class="var-name">$where</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$vars</span><span class="var-description">: array of posts</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of the table that fields will be inserted into</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$where</span><span class="var-description">: where clause, describing which records are to be updated</span> </li> + </ul> + + +</div> +<a name="functiondb_name_to_id" id="functiondb_name_to_id"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_name_to_id</span> (line <span class="line-number">280</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an ID based on name.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + db_name_to_id + </span> + (<span class="var-type">string</span> <span class="var-name">$table</span>, <span class="var-type">string</span> <span class="var-name">$id_col</span>, <span class="var-type">string</span> <span class="var-name">$name_col</span>, <span class="var-type">string</span> <span class="var-name">$name</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id_col</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name_col</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + </ul> + + +</div> +<a name="functiondb_numrows" id="functiondb_numrows"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_numrows</span> (line <span class="line-number">249</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Determine number of rows in result.</p> + <ul class="tags"> + <li><span class="field">return:</span> number of rows in query result</li> + </ul> + + <div class="method-signature"> + <span class="method-result">int</span> + <span class="method-name"> + db_numrows + </span> + ([<span class="var-type">resource</span> <span class="var-name">$result</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">resource</span> + <span class="var-name">$result</span><span class="var-description">: mysql result</span> </li> + </ul> + + +</div> +<a name="functiondb_query" id="functiondb_query"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_query</span> (line <span class="line-number">48</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Execute a MySQL query.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + db_query + </span> + ([<span class="var-type">string</span> <span class="var-name">$qry</span> = <span class="var-default">null</span>], [<span class="var-type">resource</span> <span class="var-name">$dbh</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$qry</span><span class="var-description">: MySQL query</span> </li> + <li> + <span class="var-type">resource</span> + <span class="var-name">$dbh</span><span class="var-description">: valid dbh</span> </li> + </ul> + + +</div> +<a name="functiondb_select" id="functiondb_select"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_select</span> (line <span class="line-number">33</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Select database.</p> + <ul class="tags"> + <li><span class="field">return:</span> success of command</li> + </ul> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + db_select + </span> + (<span class="var-type">string</span> <span class="var-name">$database</span>, [<span class="var-type">resource</span> <span class="var-name">$dbh</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$database</span><span class="var-description">: name of the database to select</span> </li> + <li> + <span class="var-type">resource</span> + <span class="var-name">$dbh</span><span class="var-description">: valid dbh, null if not defined</span> </li> + </ul> + + +</div> +<a name="functiondb_toggle_bool" id="functiondb_toggle_bool"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">db_toggle_bool</span> (line <span class="line-number">294</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Sets enum booleans to their opposite</p> + + <div class="method-signature"> + <span class="method-result">int</span> + <span class="method-name"> + db_toggle_bool + </span> + (<span class="var-type">string</span> <span class="var-name">$table</span>, <span class="var-type">string</span> <span class="var-name">$pri</span>, <span class="var-type">string</span> <span class="var-name">$col</span>, <span class="var-type">array</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$pri</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$col</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_forms_php.html b/docs/mirror/lib/_php_lib_forms_php.html new file mode 100644 index 0000000..aadc7f2 --- /dev/null +++ b/docs/mirror/lib/_php_lib_forms_php.html @@ -0,0 +1,942 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page forms.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/forms.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Form functions for handling form input, output, and markup.</p> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functionarray_days" id="functionarray_days"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">array_days</span> (line <span class="line-number">76</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get calendar days in array format.</p> + <ul class="tags"> + <li><span class="field">return:</span> days from 1->[28-31] (zero-filled)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_days + </span> + ([<span class="var-type">int</span> <span class="var-name">$month</span> = <span class="var-default">''</span>], [<span class="var-type">int</span> <span class="var-name">$year</span> = <span class="var-default">''</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$month</span><span class="var-description">: numeric representation of month (optional) default is empty, accepted range value is 1-12 inclusive, this affects the total number of days in given month</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$year</span><span class="var-description">: the year (optional) default is empty, this affects the total number of days in given month</span> </li> + </ul> + + +</div> +<a name="functionarray_hours" id="functionarray_hours"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">array_hours</span> (line <span class="line-number">159</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get calendar hours in array format.</p> + <ul class="tags"> + <li><span class="field">return:</span> hours (zero-filled)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_hours + </span> + () + </div> + + + +</div> +<a name="functionarray_minutes" id="functionarray_minutes"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">array_minutes</span> (line <span class="line-number">187</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get array of minutes.</p> + <ul class="tags"> + <li><span class="field">return:</span> minutes (zero-filled)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_minutes + </span> + ([<span class="var-type">int</span> <span class="var-name">$interval</span> = <span class="var-default">15</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$interval</span><span class="var-description">: interval between minutes (optional) default is 15</span> </li> + </ul> + + +</div> +<a name="functionarray_months" id="functionarray_months"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">array_months</span> (line <span class="line-number">105</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get calendar months in array format.</p> + <ul class="tags"> + <li><span class="field">return:</span> months from 01-12 (zero-filled)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_months + </span> + () + </div> + + + +</div> +<a name="functionarray_states" id="functionarray_states"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">array_states</span> (line <span class="line-number">203</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get array of states.</p> + <ul class="tags"> + <li><span class="field">return:</span> states (abbr=>fullname)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_states + </span> + () + </div> + + + +</div> +<a name="functionarray_years" id="functionarray_years"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">array_years</span> (line <span class="line-number">130</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get calendar years in array format.</p> + <ul class="tags"> + <li><span class="field">return:</span> years</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_years + </span> + ([<span class="var-type">int</span> <span class="var-name">$num</span> = <span class="var-default">5</span>], [<span class="var-type">int</span> <span class="var-name">$year</span> = <span class="var-default">''</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$num</span><span class="var-description">: number of years to display (optional) default is 5, negative numbers change direction of array</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$year</span><span class="var-description">: starting year (optional) default is this year</span> </li> + </ul> + + +</div> +<a name="functionclean_in" id="functionclean_in"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">clean_in</span> (line <span class="line-number">41</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Cleans a string or an array of strings for DB input.</p> + <ul class="tags"> + <li><span class="field">return:</span> slashes added, if necessary</li> + </ul> + + <div class="method-signature"> + <span class="method-result">mixed</span> + <span class="method-name"> + clean_in + </span> + (<span class="var-type">mixed</span> <span class="var-name">$str</span>, [<span class="var-type">mixed</span> <span class="var-name">$single_quotes</span> = <span class="var-default">FALSE</span>], [<span class="var-type">bool</span> <span class="var-name">$decode</span> = <span class="var-default">FALSE</span>], <span class="var-type">bool</span> <span class="var-name">$single_quote</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$str</span><span class="var-description">: dirty</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$single_quote</span><span class="var-description">: add single quotes around the string, optional</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$decode</span><span class="var-description">: run html_entity_decode(), optional</span> </li> + </ul> + + +</div> +<a name="functionclean_out" id="functionclean_out"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">clean_out</span> (line <span class="line-number">14</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Cleans a string or an array of strings for HTML presentation.</p> + <ul class="tags"> + <li><span class="field">return:</span> cleaned for HTML</li> + </ul> + + <div class="method-signature"> + <span class="method-result">mixed</span> + <span class="method-name"> + clean_out + </span> + (<span class="var-type">mixed</span> <span class="var-name">$str</span>, [<span class="var-type">bool</span> <span class="var-name">$slashes</span> = <span class="var-default">FALSE</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$str</span><span class="var-description">: dirty</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$slashes</span><span class="var-description">: default to false, this parameter indicate if stripslashes is desired, usually use for magic qoutes</span> </li> + </ul> + + +</div> +<a name="functiondb_get_to_options" id="functiondb_get_to_options"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">db_get_to_options</span> (line <span class="line-number">650</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Take a db_get result and return an array of options.</p> + <ul class="tags"> + <li><span class="field">return:</span> array of options ($val=>$text)</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + db_get_to_options + </span> + (<span class="var-type">array</span> <span class="var-name">$data</span>, <span class="var-type">string</span> <span class="var-name">$val_col</span>, <span class="var-type">string</span> <span class="var-name">$name_col</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$data</span><span class="var-description">: db_get result</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$val_col</span><span class="var-description">: column containing the value for each option</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name_col</span><span class="var-description">: column containing the text</span> </li> + </ul> + + +</div> +<a name="functionform_array_fix_dates" id="functionform_array_fix_dates"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_array_fix_dates</span> (line <span class="line-number">532</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Fix dates for form display, or proper db entry</p> + <ul class="tags"> + <li><span class="field">return:</span> null, or the original array modified to have separated date values for the forms</li> + </ul> + + <div class="method-signature"> + <span class="method-result">mixed</span> + <span class="method-name"> + form_array_fix_dates + </span> + (<span class="var-type">array</span> <span class="var-name">$dates</span>, <span class="var-type">array</span> <span class="var-name">$datetimes</span>, [<span class="var-type">int</span> <span class="var-name">$way</span> = <span class="var-default">1</span>], [<span class="var-type">array</span> <span class="var-name">$orig</span> = <span class="var-default">''</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$dates</span><span class="var-description">: array of date field names</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$datetimes</span><span class="var-description">: array of datetime field names</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$way</span><span class="var-description">: 1 is done after a post, 2 is done when selecting for forms</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$orig</span><span class="var-description">: for way 2, the array we need to add the separated date values to (usually $posts)</span> </li> + </ul> + + +</div> +<a name="functionform_array_get_date" id="functionform_array_get_date"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_array_get_date</span> (line <span class="line-number">587</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get put a date back together after a POST.</p> + <ul class="tags"> + <li><span class="field">return:</span> repaired date, as an array that corresponds to the form</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + form_array_get_date + </span> + (<span class="var-type">string</span> <span class="var-name">$field</span>, <span class="var-type">int</span> <span class="var-name">$key</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$field</span><span class="var-description">: name of post index of date field</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$key</span><span class="var-description">: index of form array that the field value belongs to</span> </li> + </ul> + + +</div> +<a name="functionform_array_get_datetime" id="functionform_array_get_datetime"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_array_get_datetime</span> (line <span class="line-number">603</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get put a datetime back together after a POST.</p> + <ul class="tags"> + <li><span class="field">return:</span> repaired datetime, as an array that corresponds to the form</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + form_array_get_datetime + </span> + (<span class="var-type">string</span> <span class="var-name">$field</span>, <span class="var-type">int</span> <span class="var-name">$key</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$field</span><span class="var-description">: name of post index of datetime field</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$key</span><span class="var-description">: index of form array that the field value belongs to</span> </li> + </ul> + + +</div> +<a name="functionform_checkbox" id="functionform_checkbox"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_checkbox</span> (line <span class="line-number">359</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a checkbox input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_checkbox + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span> <span class="var-name">$checked</span> = <span class="var-default">0</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$checked</span><span class="var-description">: checked?</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_end" id="functionform_end"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_end</span> (line <span class="line-number">289</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes the ending form tag.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_end + </span> + () + </div> + + + +</div> +<a name="functionform_hidden" id="functionform_hidden"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_hidden</span> (line <span class="line-number">454</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a hidden field.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_hidden + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_label" id="functionform_label"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_label</span> (line <span class="line-number">301</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a form input label.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_label + </span> + ([<span class="var-type">string</span> <span class="var-name">$text</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$for</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$text</span><span class="var-description">: label text</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$for</span><span class="var-description">: id of corresponding field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: class css class of label</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_password" id="functionform_password"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_password</span> (line <span class="line-number">340</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a password input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_password + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">int</span> <span class="var-name">$size</span> = <span class="var-default">'30'</span>], [<span class="var-type">int</span> <span class="var-name">$maxlength</span> = <span class="var-default">'100'</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>], <span class="var-type">string</span> <span class="var-name">$css</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$css</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$size</span><span class="var-description">: size of field (optional) default is 30</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$maxlength</span><span class="var-description">: maxlength of field (optional)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_radio" id="functionform_radio"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_radio</span> (line <span class="line-number">391</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a radio input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_radio + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span> <span class="var-name">$checked</span> = <span class="var-default">0</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$checked</span><span class="var-description">: checked?</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_reset" id="functionform_reset"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_reset</span> (line <span class="line-number">439</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a reset input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_reset + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">'Reset'</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value (button text)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_select" id="functionform_select"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_select</span> (line <span class="line-number">477</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a select list with options.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_select + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$options</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$selected</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$options</span><span class="var-description">: possible options, usually pulled from db, or array_* funcs</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$selected</span><span class="var-description">: <p>if the value matches, it is selected</p><p>Multiple selects based on sets come out of a database as val,val,val so the explode was intended to create the instance of an array based on the string regardless of whether or not it has val,val,val.</p></span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_start" id="functionform_start"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_start</span> (line <span class="line-number">276</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes the beginning form tag.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_start + </span> + ([<span class="var-type">string</span> <span class="var-name">$name</span> = <span class="var-default">'form'</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$method</span> = <span class="var-default">'post'</span>], [<span class="var-type">string</span> <span class="var-name">$action</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: form name</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: class name</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$method</span><span class="var-description">: method (post or get)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$action</span><span class="var-description">: action</span> </li> + </ul> + + +</div> +<a name="functionform_submit" id="functionform_submit"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_submit</span> (line <span class="line-number">422</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a submit input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_submit + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">'Submit'</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: the id attribute</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value (button text)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_text" id="functionform_text"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">form_text</span> (line <span class="line-number">321</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a text input.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_text + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">int</span> <span class="var-name">$size</span> = <span class="var-default">'30'</span>], [<span class="var-type">int</span> <span class="var-name">$maxlength</span> = <span class="var-default">'100'</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>], <span class="var-type">string</span> <span class="var-name">$css</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$css</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$size</span><span class="var-description">: size of field</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$maxlength</span><span class="var-description">: maxlength of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters (optional)</span> </li> + </ul> + + +</div> +<a name="functionform_textarea" id="functionform_textarea"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">form_textarea</span> (line <span class="line-number">513</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Writes a textarea</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + form_textarea + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, [<span class="var-type">string</span> <span class="var-name">$id</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">null</span>], [<span class="var-type">int</span> <span class="var-name">$rows</span> = <span class="var-default">'6'</span>], [<span class="var-type">int</span> <span class="var-name">$cols</span> = <span class="var-default">'50'</span>], [<span class="var-type">string</span> <span class="var-name">$value</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$id</span><span class="var-description">: id of field, must be unique per page</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$rows</span><span class="var-description">: number of rows (height)</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$cols</span><span class="var-description">: number of cols (width)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$value</span><span class="var-description">: value of field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: any extra parameters</span> </li> + </ul> + + +</div> +<a name="functionis_email_address" id="functionis_email_address"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">is_email_address</span> (line <span class="line-number">618</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Validates email addresses</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + is_email_address + </span> + (<span class="var-type">string</span> <span class="var-name">$email</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$email</span> </li> + </ul> + + +</div> +<a name="functionis_phone_number" id="functionis_phone_number"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">is_phone_number</span> (line <span class="line-number">628</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Validates phone number</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + is_phone_number + </span> + (<span class="var-type">string</span> <span class="var-name">$phone</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$phone</span> </li> + </ul> + + +</div> +<a name="functionurl_out" id="functionurl_out"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">url_out</span> (line <span class="line-number">638</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Returns http:// and the string if the string does not begin with http://</p> + + <div class="method-signature"> + <span class="method-result">string</span> + <span class="method-name"> + url_out + </span> + (<span class="var-type">string</span> <span class="var-name">$url</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$url</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_geo_php.html b/docs/mirror/lib/_php_lib_geo_php.html new file mode 100644 index 0000000..a441634 --- /dev/null +++ b/docs/mirror/lib/_php_lib_geo_php.html @@ -0,0 +1,204 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page geo.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/geo.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Functions for netgeo lookups.</p> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functiongeo_get_coordinates" id="functiongeo_get_coordinates"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">geo_get_coordinates</span> (line <span class="line-number">45</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get longitude and latitude of an IP.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing results or false on failure</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array|false</span> + <span class="method-name"> + geo_get_coordinates + </span> + (<span class="var-type">string</span> <span class="var-name">$ip</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$ip</span><span class="var-description">: an IP address</span> </li> + </ul> + + +</div> +<a name="functiongeo_get_country" id="functiongeo_get_country"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">geo_get_country</span> (line <span class="line-number">65</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get country of an IP.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing results or false on failure</li> + </ul> + + <div class="method-signature"> + <span class="method-result">string|false</span> + <span class="method-name"> + geo_get_country + </span> + (<span class="var-type">string</span> <span class="var-name">$ip</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$ip</span><span class="var-description">: an IP address</span> </li> + </ul> + + +</div> +<a name="functiongeo_get_distance" id="functiongeo_get_distance"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">geo_get_distance</span> (line <span class="line-number">16</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Calculate the distance between two geo points.</p> + <ul class="tags"> + <li><span class="field">return:</span> rounded distance in _km_ between these points</li> + </ul> + + <div class="method-signature"> + <span class="method-result">int</span> + <span class="method-name"> + geo_get_distance + </span> + (<span class="var-type">int</span> <span class="var-name">$lat1</span>, <span class="var-type">int</span> <span class="var-name">$lon1</span>, <span class="var-type">int</span> <span class="var-name">$lat2</span>, <span class="var-type">int</span> <span class="var-name">$lon2</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$lat1</span><span class="var-description">: latitude of first point</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$lon1</span><span class="var-description">: longitude of first point</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$lat2</span><span class="var-description">: latitude of second point</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$lon2</span><span class="var-description">: longitude of second point</span> </li> + </ul> + + +</div> +<a name="functiongeo_get_record" id="functiongeo_get_record"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">geo_get_record</span> (line <span class="line-number">55</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get complete record based on IP.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing results or false on failure</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array|false</span> + <span class="method-name"> + geo_get_record + </span> + (<span class="var-type">string</span> <span class="var-name">$ip</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$ip</span><span class="var-description">: an IP address</span> </li> + </ul> + + +</div> +<a name="functiongeo_query" id="functiongeo_query"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">geo_query</span> (line <span class="line-number">27</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Query NetGeo based on API and parse results.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing results or false on failure</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array|false</span> + <span class="method-name"> + geo_query + </span> + (<span class="var-type">string</span> <span class="var-name">$ip</span>, [<span class="var-type">string</span> <span class="var-name">$method</span> = <span class="var-default">'getRecord'</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$ip</span><span class="var-description">: an IP address</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$method</span><span class="var-description">: lookup method, based on NetGeo API.</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_list_php.html b/docs/mirror/lib/_php_lib_list_php.html new file mode 100644 index 0000000..2e810d7 --- /dev/null +++ b/docs/mirror/lib/_php_lib_list_php.html @@ -0,0 +1,362 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page list.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/list.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">List functions for lists of values.</p> + <ul class="tags"> + <li><span class="field">author:</span> <p>Mike Morgan <<a href="mailto:mike.morgan@oregonstate.edu">mike.morgan@oregonstate.edu</a>></p><p>Usage example: <pre><ol><code><pre><li> <span class="src-var">$orderby</span>=<a href="../../mirror/lib/_php_lib_list_php.html#functionget_order">get_order</a><span class="src-sym">(</span><span class="src-sym">)</span><span class="src-sym">;</span></li> +<li> <span class="src-var">$query</span>=<span class="src-str">"</span><span class="src-id">SELECT</span> * <span class="src-id">FROM fic_courses </span><span class="src-var">$orderby</span><span class="src-str">"</span><span class="src-sym">;</span></li> +<li> <span class="src-var">$courses</span>=<a href="../../mirror/lib/_php_lib_db_php.html#functiondb_get">db_get</a><span class="src-sym">(</span><span class="src-var">$query</span><span class="src-sym">,</span><span class="src-id">MYSQL_ASSOC</span><span class="src-sym">)</span><span class="src-sym">;</span></li> +<li> <span class="src-var">$headers</span>=<span class="src-key">array</span><span class="src-sym">(</span></li> +<li> <span class="src-str">'course_id'</span>=><span class="src-str">''</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'title'</span>=><span class="src-str">'Course Title'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'date_start_course'</span>=><span class="src-str">'Start'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'date_end_course'</span>=><span class="src-str">'End'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'date_start_reg'</span>=><span class="src-str">'Reg Starts'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'date_end_reg'</span>=><span class="src-str">'Reg Ends'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'active'</span>=><span class="src-str">'Active?'</span><span class="src-sym">,</span></li> +<li> <span class="src-str">'entry_date'</span>=><span class="src-str">'Created'</span></li> +<li> <span class="src-sym">)</span><span class="src-sym">;</span></li> +<li> <a href="../../mirror/lib/_php_lib_list_php.html#functionshow_list">show_list</a><span class="src-sym">(</span><span class="src-var">$courses</span><span class="src-sym">,</span><span class="src-var">$headers</span><span class="src-sym">)</span><span class="src-sym">;</span></li> +</pre></code></ol></pre></p><p>Accompanying CSS for table output: <pre><ol><code><pre><li> .list</li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">border</span>:<span class="src-num">1</span><span class="src-id">px solid </span><span class="src-comm">#999;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .list <span class="src-id">th</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#eee;</span></li> +<li> <span class="src-id">border</span>:<span class="src-num">1</span><span class="src-id">px solid </span><span class="src-comm">#000;</span></li> +<li> <span class="src-id">font</span>-<span class="src-id">weight</span>:<span class="src-id">bold</span><span class="src-sym">;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .list <span class="src-id">th a</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">display</span>:<span class="src-id">block</span><span class="src-sym">;</span></li> +<li> <span class="src-id">padding</span>:<span class="src-num">0 14</span><span class="src-id">px</span><span class="src-sym">;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .list <span class="src-id">th a</span>:<span class="src-id">hover</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>-<span class="src-id">color</span>:<span class="src-comm">#fff;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<span class="src-id">row1</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#ddd;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<span class="src-id">row2</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#ccc;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<span class="src-id">row1</span>:<span class="src-id">hover</span><span class="src-sym">, </span>.<span class="src-id">row2</span>:<span class="src-id">hover</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>-<span class="src-id">color</span>:<span class="src-comm">#fec;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<a href="http://www.php.net/current">current</a>-<a href="http://www.php.net/sort">sort</a></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#fda;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<a href="http://www.php.net/sort">sort</a>-<span class="src-id">desc</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#fec url(../img/up.gif) no-repeat right;</span></li> +<li> <span class="src-sym">}</span></li> +<li> .<a href="http://www.php.net/sort">sort</a>-<span class="src-id">asc</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">background</span>:<span class="src-comm">#fec url(../img/down.gif) no-repeat right;</span></li> +<li> <span class="src-sym">}</span></li> +</pre></code></ol></pre> Accompanying JavaScript for select all / inverse: <pre><ol><code><pre><li> <<span class="src-id">script type</span>=<span class="src-str">"text/javascript"</span>></li> +<li> <span class="src-comm">//<!--</span></li> +<li> <span class="src-key">function </span><span class="src-id">selectAll</span><span class="src-sym">(</span><span class="src-id">formObj</span><span class="src-sym">,</span><span class="src-id">invert</span><span class="src-sym">)</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-key">for </span><span class="src-sym">(</span><span class="src-key">var </span><span class="src-id">i</span>=<span class="src-num">0</span><span class="src-sym">;</span><span class="src-id">i </span>< <span class="src-id">formObj</span>.<span class="src-id">elements</span>.<span class="src-id">length</span><span class="src-sym">;</span><span class="src-id">i</span>++<span class="src-sym">)</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">fldObj </span>= <span class="src-id">formObj</span>.<span class="src-id">elements</span><span class="src-sym">[</span><span class="src-id">i</span><span class="src-sym">]</span><span class="src-sym">;</span></li> +<li> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">fldObj</span>.<span class="src-id">type </span>== <span class="src-str">'checkbox'</span><span class="src-sym">)</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-key">if </span><span class="src-sym">(</span><span class="src-id">invert</span>==<span class="src-num">1</span><span class="src-sym">)</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">fldObj</span>.<span class="src-id">checked </span>= <span class="src-sym">(</span><span class="src-id">fldObj</span>.<span class="src-id">checked</span><span class="src-sym">) </span>? <span class="src-id">false </span>: <span class="src-id">true</span><span class="src-sym">;</span></li> +<li> <span class="src-sym">}</span></li> +<li> <span class="src-key">else</span></li> +<li> <span class="src-sym">{</span></li> +<li> <span class="src-id">fldObj</span>.<span class="src-id">checked </span>= <span class="src-id">true</span><span class="src-sym">;</span></li> +<li> <span class="src-sym">}</span></li> +<li> <span class="src-sym">}</span></li> +<li> <span class="src-sym">}</span></li> +<li> <span class="src-sym">}</span></li> +<li> <span class="src-comm">//--></span></li> +<li> <span class="src-php"></script></span></li> +</pre></code></ol></pre></p></li> + </ul> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functionget_order" id="functionget_order"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">get_order</span> (line <span class="line-number">283</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Determine current sort order.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + get_order + </span> + () + </div> + + + +</div> +<a name="functionget_orderby" id="functionget_orderby"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">get_orderby</span> (line <span class="line-number">293</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Determine whether or not list is currently sorted.</p> + <ul class="tags"> + <li><span class="field">return:</span> cleaned orderby clause based on saved sort information or null if no orderby is set in the defined method</li> + </ul> + + <div class="method-signature"> + <span class="method-result">mixed</span> + <span class="method-name"> + get_orderby + </span> + ([<span class="var-type">string</span> <span class="var-name">$method</span> = <span class="var-default">'get'</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$method</span><span class="var-description">: which http method to check for sort information</span> </li> + </ul> + + +</div> +<a name="functionlist_edit_ids" id="functionlist_edit_ids"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">list_edit_ids</span> (line <span class="line-number">334</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Parses $_POST for ids, shows edit forms for each id with populated data.</p> +<p class="description"><p><ul><li>name will be used to retrieve an _array_ from $_POST of the same name</li><li>the form will be an include, with $posts[col_name] as the default for all values</li><li>try to keep your query simple (no crazy sorting, etc.) -- we're talking one record at a time here anyway</li></ul> Example: <pre><ol><code><pre><li> <a href="../../mirror/lib/_php_lib_list_php.html#functionlist_edit_ids">list_edit_ids</a><span class="src-sym">(</span><span class="src-str">'course_id'</span><span class="src-sym">,</span><span class="src-str">'../forms/course.php'</span><span class="src-sym">,</span><span class="src-str">'SELECT * FROM fic_courses'</span><span class="src-sym">,</span><span class="src-str">'1'</span><span class="src-sym">)</span><span class="src-sym">;</span></li> +</pre></code></ol></pre></p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + list_edit_ids + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">string</span> <span class="var-name">$form</span>, <span class="var-type">string</span> <span class="var-name">$q_front</span>, [<span class="var-type">string</span> <span class="var-name">$q_where</span> = <span class="var-default">'1'</span>], [<span class="var-type">array</span> <span class="var-name">$dates</span> = <span class="var-default">null</span>], [<span class="var-type">array</span> <span class="var-name">$datetimes</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span><span class="var-description">: name of id field</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$form</span><span class="var-description">: path to form to be used to items</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$q_front</span><span class="var-description">: front half of query</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$q_where</span><span class="var-description">: where statement</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$dates</span><span class="var-description">: array of date field names, so they can be fixed for forms</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$datetimes</span><span class="var-description">: array of datetime field names, so they can be fixed for forms</span> </li> + </ul> + + +</div> +<a name="functionlist_update_ids" id="functionlist_update_ids"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">list_update_ids</span> (line <span class="line-number">370</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Process a submitted list_edit_ids form.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + list_update_ids + </span> + (<span class="var-type">array</span> <span class="var-name">$name</span>, <span class="var-type">string</span> <span class="var-name">$table</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$name</span><span class="var-description">: array of primary ids posted from the form, these are vital to the WHERE clause of the UPDATE statements.</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of table being affected</span> </li> + </ul> + + +</div> +<a name="functionshow_headers" id="functionshow_headers"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">show_headers</span> (line <span class="line-number">190</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show table headers.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_headers + </span> + (<span class="var-type">array</span> <span class="var-name">$headers</span>, <span class="var-type">string</span> <span class="var-name">$type</span>, [<span class="var-type">bool</span> <span class="var-name">$sortable</span> = <span class="var-default">true</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$headers</span><span class="var-description">: column name => column title (for table heads)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$type</span><span class="var-description">: type of list that is being shown</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$sortable</span><span class="var-description">: whether or not to show sortable column headers (links in th's)</span> </li> + </ul> + + +</div> +<a name="functionshow_list" id="functionshow_list"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">show_list</span> (line <span class="line-number">110</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show a list of values, for forms.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_list + </span> + (<span class="var-type">array</span> <span class="var-name">$list</span>, <span class="var-type">array</span> <span class="var-name">$headers</span>, [<span class="var-type">string</span> <span class="var-name">$type</span> = <span class="var-default">'checkbox'</span>], [<span class="var-type">mixed</span> <span class="var-name">$actions</span> = <span class="var-default">null</span>], [<span class="var-type">string</span> <span class="var-name">$form_id</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span> <span class="var-name">$sortable</span> = <span class="var-default">true</span>], [<span class="var-type">array|string</span> <span class="var-name">$selected</span> = <span class="var-default">null</span>], <span class="var-type">array</span> <span class="var-name">$array</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$list</span><span class="var-description">: associative array</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$headers</span><span class="var-description">: column name => column title (for table heads)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$type</span><span class="var-description">: checkbox, radio, simple</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$array</span><span class="var-description">: actions to display in actions select list</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$form_id</span><span class="var-description">: id of form holding list</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$sortable</span><span class="var-description">: whether or not to show sortable column headers (links in th's)</span> </li> + <li> + <span class="var-type">array|string</span> + <span class="var-name">$selected</span><span class="var-description">: if type is checkbox, array otherwise string with one val</span> </li> + </ul> + + +</div> +<a name="functionshow_row" id="functionshow_row"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">show_row</span> (line <span class="line-number">245</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show table data.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_row + </span> + (<span class="var-type">array</span> <span class="var-name">$headers</span>, <span class="var-type">array</span> <span class="var-name">$row</span>, <span class="var-type">string</span> <span class="var-name">$type</span>, [<span class="var-type">mixed</span> <span class="var-name">$num</span> = <span class="var-default">null</span>], [<span class="var-type">array|string</span> <span class="var-name">$selected</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$headers</span><span class="var-description">: column name => column title (for knowing which ones to display)</span> </li> + <li> + <span class="var-type">array</span> + <span class="var-name">$row</span><span class="var-description">: table row, assoc</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$type</span><span class="var-description">: type of table, determines first column, which could be an input</span> </li> + <li> + <span class="var-type">array|string</span> + <span class="var-name">$selected</span><span class="var-description">: selected items; if type is checkbox, array otherwise string with one val</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_mirror_php.html b/docs/mirror/lib/_php_lib_mirror_php.html new file mode 100644 index 0000000..1f6b576 --- /dev/null +++ b/docs/mirror/lib/_php_lib_mirror_php.html @@ -0,0 +1,1112 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page mirror.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/mirror.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Application functions. Dependent on lib/db.php!</p> + <ul class="tags"> + <li><span class="field">todo:</span> add transactions once innodb table types are in place</li> + </ul> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functionmirror_delete_location" id="functionmirror_delete_location"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_delete_location</span> (line <span class="line-number">340</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete a location.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_location + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_delete_mirror" id="functionmirror_delete_mirror"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_delete_mirror</span> (line <span class="line-number">130</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete mirror.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_mirror + </span> + (<span class="var-type">mixed</span> <span class="var-name">$mirror_id</span>) + </div> + + + +</div> +<a name="functionmirror_delete_os" id="functionmirror_delete_os"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_delete_os</span> (line <span class="line-number">244</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete a os.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_os + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_delete_product" id="functionmirror_delete_product"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_delete_product</span> (line <span class="line-number">192</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete a product.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_product + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_delete_region" id="functionmirror_delete_region"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_delete_region</span> (line <span class="line-number">73</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete a region.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_region + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_delete_user" id="functionmirror_delete_user"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_delete_user</span> (line <span class="line-number">405</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Delete a user.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_delete_user + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_locations" id="functionmirror_get_locations"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_locations</span> (line <span class="line-number">349</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get locations.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing all location information.</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_locations + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_mirrors" id="functionmirror_get_mirrors"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_mirrors</span> (line <span class="line-number">149</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get list of mirrors.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_mirrors + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_mirrors_select" id="functionmirror_get_mirrors_select"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_mirrors_select</span> (line <span class="line-number">82</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an alpha-list of mirrors for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_mirrors_select + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_mirror_stats" id="functionmirror_get_mirror_stats"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_mirror_stats</span> (line <span class="line-number">443</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get mirror statistics.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_mirror_stats + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_one_location" id="functionmirror_get_one_location"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_one_location</span> (line <span class="line-number">359</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one location.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_location + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_one_mirror" id="functionmirror_get_one_mirror"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_one_mirror</span> (line <span class="line-number">140</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one mirror record.</p> + <ul class="tags"> + <li><span class="field">return:</span> mirror information</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_mirror + </span> + (<span class="var-type">int</span> <span class="var-name">$mirror_id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$mirror_id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_one_os" id="functionmirror_get_one_os"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_one_os</span> (line <span class="line-number">234</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one os.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_os + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_one_product" id="functionmirror_get_one_product"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_one_product</span> (line <span class="line-number">182</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one product.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_product + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_one_region" id="functionmirror_get_one_region"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_one_region</span> (line <span class="line-number">63</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one region.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_region + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_one_user" id="functionmirror_get_one_user"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_one_user</span> (line <span class="line-number">424</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get one user.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_one_user + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + </ul> + + +</div> +<a name="functionmirror_get_oss" id="functionmirror_get_oss"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_oss</span> (line <span class="line-number">253</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get operating systems.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_oss + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_oss_select" id="functionmirror_get_oss_select"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_oss_select</span> (line <span class="line-number">262</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an alpha-list of operating systems for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_oss_select + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_oss_select_priority" id="functionmirror_get_oss_select_priority"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_oss_select_priority</span> (line <span class="line-number">275</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an priority-list of operating systems for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_oss_select_priority + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_products" id="functionmirror_get_products"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_products</span> (line <span class="line-number">201</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get products.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_products + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_products_select" id="functionmirror_get_products_select"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_products_select</span> (line <span class="line-number">288</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an alpha-list of products for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_products_select + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_products_select_priority" id="functionmirror_get_products_select_priority"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_products_select_priority</span> (line <span class="line-number">301</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an priority-list of operating systems for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_products_select_priority + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_product_stats" id="functionmirror_get_product_stats"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_product_stats</span> (line <span class="line-number">452</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get product statistics.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_product_stats + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_regions" id="functionmirror_get_regions"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_regions</span> (line <span class="line-number">95</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get regions.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_regions + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_regions_select" id="functionmirror_get_regions_select"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_regions_select</span> (line <span class="line-number">13</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an alpha-list of regions for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_regions_select + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_regions_select_priority" id="functionmirror_get_regions_select_priority"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_get_regions_select_priority</span> (line <span class="line-number">26</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get an priority-list of regions for select list.</p> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_regions_select_priority + </span> + () + </div> + + + +</div> +<a name="functionmirror_get_users" id="functionmirror_get_users"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_get_users</span> (line <span class="line-number">414</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Get users.</p> + <ul class="tags"> + <li><span class="field">return:</span> array containing all user information.</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + mirror_get_users + </span> + () + </div> + + + +</div> +<a name="functionmirror_insert_location" id="functionmirror_insert_location"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_insert_location</span> (line <span class="line-number">317</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert a new location.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_location + </span> + (<span class="var-type">int</span> <span class="var-name">$product</span>, <span class="var-type">int</span> <span class="var-name">$os</span>, <span class="var-type">string</span> <span class="var-name">$path</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$product</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$os</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$path</span> </li> + </ul> + + +</div> +<a name="functionmirror_insert_mirror" id="functionmirror_insert_mirror"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_insert_mirror</span> (line <span class="line-number">108</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert mirror.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_mirror + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$region_id</span>, <span class="var-type">string</span> <span class="var-name">$baseurl</span>, <span class="var-type">int</span> <span class="var-name">$rating</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$region_id</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$baseurl</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$rating</span> </li> + </ul> + + +</div> +<a name="functionmirror_insert_os" id="functionmirror_insert_os"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_insert_os</span> (line <span class="line-number">212</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert os.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_os + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_insert_product" id="functionmirror_insert_product"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_insert_product</span> (line <span class="line-number">160</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert product.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_product + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_insert_region" id="functionmirror_insert_region"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_insert_region</span> (line <span class="line-number">41</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert region.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_region + </span> + (<span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_insert_user" id="functionmirror_insert_user"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_insert_user</span> (line <span class="line-number">374</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Insert a new user.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_insert_user + </span> + (<span class="var-type">string</span> <span class="var-name">$username</span>, <span class="var-type">string</span> <span class="var-name">$password</span>, <span class="var-type">string</span> <span class="var-name">$rpassword</span>, <span class="var-type">string</span> <span class="var-name">$firstname</span>, <span class="var-type">string</span> <span class="var-name">$lastname</span>, <span class="var-type">string</span> <span class="var-name">$email</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$username</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$password</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$rpassword</span><span class="var-description">: (re-entered password)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$firstname</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$lastname</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$email</span> </li> + </ul> + + +</div> +<a name="functionmirror_toggle" id="functionmirror_toggle"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_toggle</span> (line <span class="line-number">434</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Enable or disable a mirror.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_toggle + </span> + (<span class="var-type">int</span> <span class="var-name">$mirror</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$mirror</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_location" id="functionmirror_update_location"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_update_location</span> (line <span class="line-number">330</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update a location.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_location + </span> + (<span class="var-type">int</span> <span class="var-name">$location</span>, <span class="var-type">int</span> <span class="var-name">$product</span>, <span class="var-type">int</span> <span class="var-name">$os</span>, <span class="var-type">string</span> <span class="var-name">$path</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$location</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$product</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$os</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$path</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_mirror" id="functionmirror_update_mirror"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_update_mirror</span> (line <span class="line-number">121</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update mirror.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_mirror + </span> + (<span class="var-type">mixed</span> <span class="var-name">$id</span>, <span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$region_id</span>, <span class="var-type">string</span> <span class="var-name">$baseurl</span>, <span class="var-type">int</span> <span class="var-name">$rating</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$region_id</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$baseurl</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$rating</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_os" id="functionmirror_update_os"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_update_os</span> (line <span class="line-number">224</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update os.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_os + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>, <span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_product" id="functionmirror_update_product"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_update_product</span> (line <span class="line-number">172</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update product.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_product + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>, <span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_region" id="functionmirror_update_region"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">mirror_update_region</span> (line <span class="line-number">53</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update region.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_region + </span> + (<span class="var-type">int</span> <span class="var-name">$id</span>, <span class="var-type">string</span> <span class="var-name">$name</span>, <span class="var-type">int</span> <span class="var-name">$priority</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$id</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$name</span> </li> + <li> + <span class="var-type">int</span> + <span class="var-name">$priority</span> </li> + </ul> + + +</div> +<a name="functionmirror_update_user" id="functionmirror_update_user"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">mirror_update_user</span> (line <span class="line-number">394</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Update a user.</p> + + <div class="method-signature"> + <span class="method-result">bool</span> + <span class="method-name"> + mirror_update_user + </span> + (<span class="var-type">int</span> <span class="var-name">$user</span>, <span class="var-type">string</span> <span class="var-name">$username</span>, <span class="var-type">string</span> <span class="var-name">$password</span>, <span class="var-type">string</span> <span class="var-name">$rpassword</span>, <span class="var-type">string</span> <span class="var-name">$firstname</span>, <span class="var-type">string</span> <span class="var-name">$lastname</span>, <span class="var-type">string</span> <span class="var-name">$email</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">int</span> + <span class="var-name">$user</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$username</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$password</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$rpassword</span><span class="var-description">: (re-entered password)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$firstname</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$lastname</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$email</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:05 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/lib/_php_lib_util_php.html b/docs/mirror/lib/_php_lib_util_php.html new file mode 100644 index 0000000..98baab8 --- /dev/null +++ b/docs/mirror/lib/_php_lib_util_php.html @@ -0,0 +1,369 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page util.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/lib/util.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-functions">Functions</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Utility funcs.</p> + + </div> +</div> + + + + + + <a name="sec-functions"></a> + <div class="info-box"> + <div class="info-box-title">Functions</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Functions</span> + </div> + <div class="info-box-body"> + <a name="functionarray_order_by" id="functionarray_order_by"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">array_order_by</span> (line <span class="line-number">198</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Sort a two dimensional array based on a 'column' key</p> + <ul class="tags"> + <li><span class="field">return:</span> the original array on argument errors, the sorted array on success</li> + </ul> + + <div class="method-signature"> + <span class="method-result">array</span> + <span class="method-name"> + array_order_by + </span> + (<span class="var-type">array</span> <span class="var-name">&$array</span>, [<span class="var-type">mixed</span> <span class="var-name">$key</span> = <span class="var-default">null</span>], [<span class="var-type">mixed</span> <span class="var-name">$order</span> = <span class="var-default">null</span>], [<span class="var-type">bool</span> <span class="var-name">$retain_keys</span> = <span class="var-default">TRUE</span>], [<span class="var-type">bool</span> <span class="var-name">$case_sensitive</span> = <span class="var-default">FALSE</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$array</span><span class="var-description">: the array to be sorted</span> </li> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$key</span><span class="var-description">: the column key to be used for sorting, an array of keys are also acceptable</span> </li> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$order</span><span class="var-description">: the order of the sort, either 'asc' (ascending) or 'desc' (descending), can also be an array (with matching array keys to the $key param)</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$retain_keys</span><span class="var-description">: option to retain the original keys; default to true</span> </li> + <li> + <span class="var-type">bool</span> + <span class="var-name">$case_sensitive</span><span class="var-description">: option for a case sensitive sort; default to false</span> </li> + </ul> + + +</div> +<a name="functiondebug_r" id="functiondebug_r"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">debug_r</span> (line <span class="line-number">98</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Print out an varible enclosed by &lt;pre&gt; tags</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + debug_r + </span> + (<span class="var-type">mixed</span> <span class="var-name">&$var</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$var</span><span class="var-description">: the variable to print by print_r</span> </li> + </ul> + + +</div> +<a name="functionemptify_in_array" id="functionemptify_in_array"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">emptify_in_array</span> (line <span class="line-number">131</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">This recursive function empty values in an 'multi-dimensional' array.</p> + <ul class="tags"> + <li><span class="field">return:</span> false if an empty needle passed in, else a copy of the array with needle values replaced with empty strings</li> + </ul> + + <div class="method-signature"> + <span class="method-result">mixed</span> + <span class="method-name"> + emptify_in_array + </span> + (<span class="var-type">mixed</span> <span class="var-name">$array</span>, <span class="var-type">mixed</span> <span class="var-name">$needle</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">mixed</span> + <span class="var-name">$needle</span><span class="var-description">: it accepts just one value or an array of values</span> </li> + </ul> + + +</div> +<a name="functionmicrotime_float" id="functionmicrotime_float"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">microtime_float</span> (line <span class="line-number">12</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">determine float value of now</p> + <ul class="tags"> + <li><span class="field">return:</span> value of current time in seconds</li> + </ul> + + <div class="method-signature"> + <span class="method-result">float</span> + <span class="method-name"> + microtime_float + </span> + () + </div> + + + +</div> +<a name="functionpassword_gen" id="functionpassword_gen"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">password_gen</span> (line <span class="line-number">110</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Generate a random string good for passwords</p> + <ul class="tags"> + <li><span class="field">return:</span> password</li> + </ul> + + <div class="method-signature"> + <span class="method-result">string</span> + <span class="method-name"> + password_gen + </span> + ([<span class="var-type">in</span> <span class="var-name">$len</span> = <span class="var-default">6</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">in</span> + <span class="var-name">$len</span><span class="var-description">: the length of the password string</span> </li> + </ul> + + +</div> +<a name="functionrecord_exists" id="functionrecord_exists"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">record_exists</span> (line <span class="line-number">158</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">This function checks for the existence of a particular row in a particular table matching a value.</p> +<p class="description"><p>Use this with libdb, unless you want lots of problems. :)</p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + record_exists + </span> + (<span class="var-type">string</span> <span class="var-name">$table</span>, <span class="var-type">string</span> <span class="var-name">$column</span>, <span class="var-type">string</span> <span class="var-name">$val</span>, [<span class="var-type">string</span> <span class="var-name">$extra</span> = <span class="var-default">NULL</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$table</span><span class="var-description">: name of table</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$column</span><span class="var-description">: name of column containing value to match</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$val</span><span class="var-description">: value to match against database (goes in WHERE clause)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$extra</span><span class="var-description">: (optional) any AND or ORDER BY or LIMIT or anything you want to add.</span> </li> + </ul> + + +</div> +<a name="functionset_error" id="functionset_error"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">set_error</span> (line <span class="line-number">61</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Add an error message to SESSION['errors'] array.</p> +<p class="description"><p>The $_SESSION['errors'] array stores error messages.</p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + set_error + </span> + ([<span class="var-type">string</span> <span class="var-name">$str</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$str</span><span class="var-description">: message to add (optional)</span> </li> + </ul> + + +</div> +<a name="functionset_msg" id="functionset_msg"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">set_msg</span> (line <span class="line-number">23</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Add a message to SESSION['messages'] array.</p> +<p class="description"><p>The $_SESSION['messages'] array stores general or success messages.</p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + set_msg + </span> + ([<span class="var-type">string</span> <span class="var-name">$str</span> = <span class="var-default">null</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$str</span><span class="var-description">: message to add (optional)</span> </li> + </ul> + + +</div> +<a name="functionshow_error" id="functionshow_error"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">show_error</span> (line <span class="line-number">74</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show errors messages.</p> +<p class="description"><p>Iterates through $_SESSION['errors'] and displays them in a ul.</p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_error + </span> + ([<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">'error'</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class for message style</span> </li> + </ul> + + +</div> +<a name="functionshow_msg" id="functionshow_msg"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="method-title">show_msg</span> (line <span class="line-number">36</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show messages.</p> +<p class="description"><p>Iterates through $_SESSION['messages'] and displays them in a ul.</p></p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_msg + </span> + ([<span class="var-type">string</span> <span class="var-name">$class</span> = <span class="var-default">'msg'</span>]) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">string</span> + <span class="var-name">$class</span><span class="var-description">: css class for message style</span> </li> + </ul> + + +</div> +<a name="functionshow_tabs" id="functionshow_tabs"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="method-title">show_tabs</span> (line <span class="line-number">173</span>) + </div> + + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Show user tabs, based on an array.</p> + + <div class="method-signature"> + <span class="method-result">void</span> + <span class="method-name"> + show_tabs + </span> + (<span class="var-type">array</span> <span class="var-name">$tabs</span>, <span class="var-type">string</span> <span class="var-name">$current</span>) + </div> + + <ul class="parameters"> + <li> + <span class="var-type">array</span> + <span class="var-name">$tabs</span><span class="var-description">: array of tabs (name=>href)</span> </li> + <li> + <span class="var-type">string</span> + <span class="var-name">$current</span><span class="var-description">: name of tab to highlight</span> </li> + </ul> + + +</div> + </div> + </div> + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/mirror/pub/_php_index_php.html b/docs/mirror/pub/_php_index_php.html new file mode 100644 index 0000000..3546d7f --- /dev/null +++ b/docs/mirror/pub/_php_index_php.html @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Docs for page index.php</title> + <link rel="stylesheet" href="../../media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="page-body">
+<h2 class="file-name">/php/index.php</h2> + +<a name="sec-description"></a> +<div class="info-box"> + <div class="info-box-title">Description</div> + <div class="nav-bar"> + <span class="disabled">Description</span> | + <a href="#sec-includes">Includes</a> + </div> + <div class="info-box-body"> + <!-- ========== Info from phpDoc block ========= --> +<p class="short-description">Main handler.</p> + + </div> +</div> + + + <a name="sec-includes"></a> + <div class="info-box"> + <div class="info-box-title">Includes</div> + <div class="nav-bar"> + <a href="#sec-description">Description</a> | + <span class="disabled">Includes</span> + </div> + <div class="info-box-body"> + <a name="__/cfg/config_php"><!-- --></a> +<div class="evenrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">'./cfg/config.php'</span>) + (line <span class="line-number">8</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> +<a name="_LIB_/db_php"><!-- --></a> +<div class="oddrow"> + + <div> + <span class="include-title"> + <span class="include-type">require_once</span> + (<span class="include-name">LIB.'/db.php'</span>) + (line <span class="line-number">12</span>) + </span> + </div> + + <!-- ========== Info from phpDoc block ========= --> + +</div> + </div> + </div> + + + + + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:04 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </div></body> +</html>
\ No newline at end of file diff --git a/docs/packages.html b/docs/packages.html new file mode 100644 index 0000000..dc8572f --- /dev/null +++ b/docs/packages.html @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <link rel="stylesheet" href="media/banner.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> + <div class="banner"> + <div class="banner-title">mirror</div> + <div class="banner-menu"> + <table cellpadding="0" cellspacing="0" style="width: 100%"> + <tr> + <td> + + <a href="ric_README.html" target="right">README</a> + + </td> + <td style="width: 2em"> </td> + <td style="text-align: right"> + </td> + </tr> + </table> + </div> + </div> + </body> + </html>
\ No newline at end of file diff --git a/docs/ric_README.html b/docs/ric_README.html new file mode 100644 index 0000000..d3d6790 --- /dev/null +++ b/docs/ric_README.html @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title></title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<h1 align="center">README</h1> +<pre> +----------------------- +Mirror Project +Open Source Lab +Oregon State University +----------------------- +*Coding Standards + + http://pear.php.net/manual/en/standards.php + +*PHP Documentation + + PHP documentation generated by PHP Documentor can be found in /docs. View index.html using file://. + +*Configuration + + Application configuration is done using define() calls. The configuration script is located in: + cfg/config-dist.php + + Copy this config file to cfg/config.php and the init script (cfg/init.php) will process it as intended. + + !! DO NOT store password information in config-dist.php and checkin !! + +*Apache + + Don't forget to set up raw logs: + ErrorLog "|/usr/bin/cronolog /var/www/download/logs/%Y%m%d/error.log" + CustomLog "|/usr/bin/cronolog /var/www/download/logs/%Y%m%d/access.log" + + DB-based logging is configurable by enabling the LOGGING constant in config.php. + +*DB + + DB information is stored in: + cfg/mirror.sql + + DB connections are persistent (msyql_pconnect()). For more info view the PHP manual: + http://php.oregonstate.edu/mysql_pconnect + http://php.oregonstate.edu/manual/en/features.persistent-connections.php + + The DB server should optimally NOT be localhost (save cycles). + +*Questions + + Send questions and rants to <mike dot morgan at oregonstate dot edu> + +*Output Buffering + + This application uses output buffering. + + ob_start() is called in inc/header.php. + ob_end_flush() is called in inc/footer.php. + + No browser output (echo, print, etc.) should _ever_ happen outside of these boundaries. + +*Permissions + + The project directory should be readable by the web server. + +*Benchmarking + + !! ALL benchmark referencing /index.php should be done using ?print=true. !! + !! This disables the actual redirects and avoids spamming mirrors. !! + +*Developers + + Scott Kveton <scott at osuosl dot org> + Mike Morgan <mike dot morgan at oregonstate dot edu> + Alex Polvi <polvi at osuosl dot org> + Danny Robert <robert at osuosl dot org> + +</pre> + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:03 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </body> +</html>
\ No newline at end of file diff --git a/docs/todolist.html b/docs/todolist.html new file mode 100644 index 0000000..533190c --- /dev/null +++ b/docs/todolist.html @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="iso-8859-1"?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + <html xmlns="http://www.w3.org/1999/xhtml"> + <head> + <!-- template designed by Marco Von Ballmoos --> + <title>Todo List</title> + <link rel="stylesheet" href="media/stylesheet.css" /> + <meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/> + </head> + <body> +
<div align="center"><h1>Todo List</h1></div> +<h2>mirror</h2> +<h3><a href="mirror/lib/_php_lib_auth_php.html">auth.php</a></h3> +<ul> + <li>re-enforce one-per-user session limit</li> +</ul> +<h3><a href="mirror/lib/_php_lib_mirror_php.html">mirror.php</a></h3> +<ul> + <li>add transactions once innodb table types are in place</li> +</ul> + <p class="notes" id="credit"> + Documentation generated on Mon, 8 Nov 2004 13:43:06 -0800 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.3.0RC3</a> + </p> + </body> +</html>
\ No newline at end of file diff --git a/php/admin/index.php b/php/admin/index.php new file mode 100644 index 0000000..8c3db5c --- /dev/null +++ b/php/admin/index.php @@ -0,0 +1,111 @@ +<?php +/** + * Regions. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add mirror +if (!empty($_POST['add-submit'])) { + if (mirror_insert_mirror($_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) { + set_msg('Mirror added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/'); + exit; + } else { + set_error('Mirror could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['mirror_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_mirror($_POST['mirror_id'],$_POST['mirror_name'],$_POST['region_id'],$_POST['mirror_baseurl'],$_POST['mirror_rating'])) { + set_msg('Mirror updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/'); + exit; + } else { + set_error('Mirror update failed.'); + } + } else { + $title = 'Edit Mirror'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit Mirror</h2>'; + $posts = mirror_get_one_mirror($_POST['mirror_id']); + form_start(); + include_once(INC.'/forms/mirror.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('mirror_id',$_POST['mirror_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if (mirror_delete_mirror($_POST['mirror_id'])) { + set_msg('Mirror deleted successfully.'); + } else { + set_error('Mirror could not be deleted.'); + } + break; + case 'toggle': + if (mirror_toggle($_POST['mirror_id'])) { + set_msg('Mirror enabled/disabled.'); + } else { + set_error('Mirror could not be enabled/disabled.'); + } + } + } else { + set_error('You must select a mirror to continue.'); + } +} + +$title = 'Mirrors'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Mirrors</h2>'; + +show_error(); +show_msg(); + +$mirrors = mirror_get_mirrors(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'mirror_active'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; +$mirrors=array_order_by($mirrors,$_GET['sort'],$_GET['order']); + +$headers = array( + 'mirror_id'=>'', + 'mirror_active'=>'Status', + 'mirror_rating'=>'Rating', + 'mirror_name'=>'Host Name', + 'mirror_baseurl'=>'Address', + 'region_name'=>'Region', + 'mirror_count'=>'Hits' +); + +$actions = array( + 'toggle'=>'Enable/Disable', + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($mirrors,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a Mirror</h2>'; +form_start(); +include_once(INC.'/forms/mirror.php'); +form_submit('add-submit','','button1','Add Mirror'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/admin/locations.php b/php/admin/locations.php new file mode 100644 index 0000000..f1bb456 --- /dev/null +++ b/php/admin/locations.php @@ -0,0 +1,100 @@ +<?php +/** + * File locations. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add mirror +if (!empty($_POST['add-submit'])&&!empty($_POST['location_path'])) { + if (mirror_insert_location($_POST['product_id'],$_POST['os_id'],$_POST['location_path'])) { + set_msg('Location added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/locations.php'); + exit; + } else { + set_error('Location could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['location_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_location($_POST['location_id'],$_POST['product_id'],$_POST['os_id'],$_POST['location_path'])) { + set_msg('Location updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/locations.php'); + exit; + } else { + set_error('Location update failed.'); + } + } else { + $title = 'Edit Location'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit Location</h2>'; + $posts = mirror_get_one_location($_POST['location_id']); + form_start(); + include_once(INC.'/forms/location.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('location_id',$_POST['location_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if (mirror_delete_location($_POST['location_id'])) { + set_msg('Location deleted successfully.'); + } else { + set_error('Location could not be deleted.'); + } + break; + } + } else { + set_error('You must select a mirror to continue.'); + } +} + +$title = 'Locations'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Locations</h2>'; +show_error(); +show_msg(); + +$locations = mirror_get_locations(); + +$_GET['sort'] = (!empty($_GET['sort']))?$_GET['sort']:'product_name'; +$_GET['order'] = (!empty($_GET['order']))?$_GET['order']:'ASC'; +$locations = array_order_by($locations,$_GET['sort'],$_GET['order']); + +$headers = array( + 'location_id'=>'', + 'product_name'=>'Product', + 'os_name'=>'OS', + 'location_path'=>'Path' +); + +$actions = array( + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($locations,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a Location</h2>'; +form_start(); +include_once(INC.'/forms/location.php'); +form_submit('add-submit','','button1','Add Location'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/admin/login.php b/php/admin/login.php new file mode 100644 index 0000000..5e9d4c3 --- /dev/null +++ b/php/admin/login.php @@ -0,0 +1,42 @@ +<?php +/** + * Admin login. + * @package mirror + * @subpackage admin + */ +require_once('../cfg/init.php'); +require_once(LIB.'/auth.php'); + +// authenticate +if (!empty($_POST['submit'])) { + if ($auth = auth_mysql($_POST['username'],$_POST['password'])) { + auth_create_session($auth); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/'); + exit; + } else { + $msg = 'Authentication failed. Please check username and password and try again.'; + } +} + +$title='Gentoo Mirror Manager Login'; +$body_tags=' onload="document.getElementById(\'username\').focus();" '; +require_once(HEADER); +?> +<h1>Gentoo Mirror Manager Login</h1> +<?php echo (!empty($msg))?'<pre>'.$msg.'</pre>':null; ?> +<form name="form" id="form" method="post" action="./login.php" > +<div> + <label for="username">Username:</label> + <input type="text" name="username" id="username" size="30" maxlength="100" /> +</div> +<br /> +<div> + <label for="password">Password:</label> + <input type="password" name="password" id="password" size="30" maxlength="100" /> +</div> +<br /> +<input type="submit" name="submit" id="submit" class="button" value="Log In" /> +</form> +<?php +require_once(FOOTER); +?> diff --git a/php/admin/logout.php b/php/admin/logout.php new file mode 100644 index 0000000..d980d9d --- /dev/null +++ b/php/admin/logout.php @@ -0,0 +1,12 @@ +<?php +/** + * Admin logout. + * @package mirror + * @subpackage admin + */ +require_once('../cfg/init.php'); +require_once(LIB.'/auth.php'); +auth_logout(); +header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/login.php'); +exit; +?> diff --git a/php/admin/lstats.php b/php/admin/lstats.php new file mode 100644 index 0000000..f7f1900 --- /dev/null +++ b/php/admin/lstats.php @@ -0,0 +1,59 @@ +<?php +/** + * Location Statistics. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +$stats = db_get(" + SELECT + IF(mirror_location_mirror_map.location_active='0','DISABLED','ok') as location_active, + mirror_name, + mirror_baseurl, + location_path + FROM + mirror_mirrors, + mirror_location_mirror_map, + mirror_locations + WHERE + mirror_mirrors.mirror_id = mirror_location_mirror_map.mirror_id AND + mirror_locations.location_id = mirror_location_mirror_map.location_id +",MYSQL_ASSOC); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'location_active'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; +$stats=array_order_by($stats,$_GET['sort'],$_GET['order']); + +$headers = array( + 'location_active'=>'Status', + 'mirror_name'=>'Host Name', + 'mirror_baseurl'=>'Address', + 'location_path'=>'Path' +); + +// should we export to csv? +if (!empty($_GET['csv'])) { + $csv = array(); + $csv[] = $headers; + foreach ($stats as $row) { + $csv[] = $row; + } + csv_send_csv($csv); + exit; +} + +$title = 'Location Statistics'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Location Statistics</h2>'; + +echo '<p>This shows whether or not a server is serving up a certain file.</p>'; + +show_list($stats,$headers,'simple'); + +echo '<p><a href="./lstats.php?csv=1&sort='.$_GET['sort'].'&order='.$_GET['order'].'">Save this page as CSV »</a></p>'; + +require_once(FOOTER); +?> diff --git a/php/admin/mirror-list.php b/php/admin/mirror-list.php new file mode 100644 index 0000000..c161efd --- /dev/null +++ b/php/admin/mirror-list.php @@ -0,0 +1,74 @@ +<?php +/** + * Regions. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +if (!empty($_GET['os'])&&!empty($_GET['product'])) { + // clean in os and product strings + $os_name = mysql_real_escape_string(trim(strtolower($_GET['os']))); + $product_name = mysql_real_escape_string(trim(strtolower($_GET['product']))); + // get os and product IDs + $os_id = db_name_to_id('mirror_os','os_id','os_name',$os_name); + $product_id = db_name_to_id('mirror_products','product_id','product_name',$product_name); +} + +if (!empty($_GET['os_id'])&&!empty($_GET['product_id'])) { + + $os_id = intval($_GET['os_id']); + $product_id = intval($_GET['product_id']); + + + $mirrors = db_get(" + SELECT DISTINCT + mirror_baseurl + FROM + mirror_mirrors + INNER JOIN + mirror_location_mirror_map + ON + mirror_location_mirror_map.mirror_id = mirror_mirrors.mirror_id + INNER JOIN + mirror_locations + ON + mirror_location_mirror_map.location_id = mirror_locations.location_id + WHERE + mirror_locations.os_id = {$os_id} AND + mirror_locations.product_id = {$product_id} AND + mirror_location_mirror_map.location_active = '1' AND + mirror_mirrors.mirror_active = '1' + "); + + header("Content-type: text/plain;"); + foreach ($mirrors as $mirror) { + echo $mirror['mirror_baseurl']."\n"; + } + exit; + +} else { + + $title = 'Mirror Listing'; + require_once(HEADER); + echo '<h1>Mirror List</h1>'; + echo '<p>Use this form to get a list of all mirrors serving up active files + for the selected Product/OS.</p>'; + form_start('list','list','get','./mirror-list.php'); + echo '<div>'; + form_label('Product', 'product','label-small'); + form_select('product_id','product','',mirror_get_products_select(),$posts['product_id']); + echo ' [<a href="./products.php">edit products</a>]'; + echo '</div><br />'; + + echo '<div>'; + form_label('OS', 'os','label-small'); + form_select('os_id','os','',mirror_get_oss_select(),$posts['os_id']); + echo ' [<a href="./os.php">edit operating systems</a>]'; + echo '</div><br />'; + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); +} +?> diff --git a/php/admin/mstats.php b/php/admin/mstats.php new file mode 100644 index 0000000..5778d16 --- /dev/null +++ b/php/admin/mstats.php @@ -0,0 +1,32 @@ +<?php +/** + * Mirror Statistics. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +$title = 'Mirror Statistics'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Mirror Statistics</h2>'; + +$stats = mirror_get_mirror_stats(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'count'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'DESC'; +$stats=array_order_by($stats,$_GET['sort'],$_GET['order']); + +$headers = array( + 'count'=>'Hits', + 'mirror_rating'=>'Rating', + 'mirror_name'=>'Host Name', + 'mirror_baseurl'=>'Address', + 'region_name'=>'Region' +); + +show_list($stats,$headers,'simple'); + +require_once(FOOTER); +?> diff --git a/php/admin/os.php b/php/admin/os.php new file mode 100644 index 0000000..b150245 --- /dev/null +++ b/php/admin/os.php @@ -0,0 +1,100 @@ +<?php +/** + * Operating Systems. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add os +if (!empty($_POST['add-submit'])&&!empty($_POST['os_name'])) { + if (mirror_insert_os($_POST['os_name'],$_POST['os_priority'])) { + set_msg('OS added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); + exit; + } else { + set_error('OS could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['os_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_os($_POST['os_id'],$_POST['os_name'],$_POST['os_priority'])) { + set_msg('OS updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/os.php'); + exit; + } else { + set_error('OS update failed.'); + } + } else { + $title = 'Edit OS'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit OS</h2>'; + $posts = mirror_get_one_os($_POST['os_id']); + form_start(); + include_once(INC.'/forms/os.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('os_id',$_POST['os_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if (!record_exists('mirror_locations','os_id',$_POST['os_id'])&&mirror_delete_os($_POST['os_id'])) { + set_msg('OS deleted successfully.'); + } else { + set_error('OS cannot be deleted because it is being used by a file location.'); + } + break; + } + } else { + set_error('You must select a os to continue.'); + } +} + +$title = 'Operating Systems'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Operating Systems</h1>'; + +show_error(); +show_msg(); + +$oss = mirror_get_oss(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'os_name'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; +$oss=array_order_by($oss,$_GET['sort'],$_GET['order']); + +$headers = array( + 'os_id'=>'', + 'os_name'=>'OS Name', + 'os_priority'=>'Priority' +); + +$actions = array( + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($oss,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a OS</h2>'; +form_start(); +include_once(INC.'/forms/os.php'); +form_submit('add-submit','','button1','Add OS'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/admin/products.php b/php/admin/products.php new file mode 100644 index 0000000..e93686f --- /dev/null +++ b/php/admin/products.php @@ -0,0 +1,101 @@ +<?php +/** + * Products. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add product +if (!empty($_POST['add-submit'])&&!empty($_POST['product_name'])) { + if (mirror_insert_product($_POST['product_name'],$_POST['product_priority'])) { + set_msg('Product added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/products.php'); + exit; + } else { + set_error('Product could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['product_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_product($_POST['product_id'],$_POST['product_name'],$_POST['product_priority'])) { + set_msg('Product updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/products.php'); + exit; + } else { + set_error('Product update failed.'); + } + } else { + $title = 'Edit Product'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit Product</h2>'; + $posts = mirror_get_one_product($_POST['product_id']); + form_start(); + include_once(INC.'/forms/product.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('product_id',$_POST['product_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if (!record_exists('mirror_locations','product_id',$_POST['product_id'])&&mirror_delete_product($_POST['product_id'])) { + set_msg('Product deleted successfully.'); + } else { + set_error('Product cannot be deleted because it is being used by a file location.'); + } + break; + } + } else { + set_error('You must select a product to continue.'); + } +} + +$title = 'Products'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Products</h1>'; + +show_error(); +show_msg(); + +$products = mirror_get_products(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'product_name'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; +$products=array_order_by($products,$_GET['sort'],$_GET['order']); + +$headers = array( + 'product_id'=>'', + 'product_name'=>'Product Name', + 'product_priority'=>'Priority', + 'product_count'=>'Downloads' +); + +$actions = array( + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($products,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a Product</h2>'; +form_start(); +include_once(INC.'/forms/product.php'); +form_submit('add-submit','','button1','Add Product'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/admin/pstats.php b/php/admin/pstats.php new file mode 100644 index 0000000..e0b4aff --- /dev/null +++ b/php/admin/pstats.php @@ -0,0 +1,29 @@ +<?php +/** + * Product Statistics. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +$title = 'Product Statistics'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Product Statistics</h2>'; + +$stats = mirror_get_product_stats(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'count'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'DESC'; +$stats=array_order_by($stats,$_GET['sort'],$_GET['order']); + +$headers = array( + 'count'=>'Hits', + 'product_name'=>'Product' +); + +show_list($stats,$headers,'simple'); + +require_once(FOOTER); +?> diff --git a/php/admin/regions.php b/php/admin/regions.php new file mode 100644 index 0000000..f42c0da --- /dev/null +++ b/php/admin/regions.php @@ -0,0 +1,101 @@ +<?php +/** + * Regions. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add region +if (!empty($_POST['add-submit'])&&!empty($_POST['region_name'])) { + if (mirror_insert_region($_POST['region_name'],$_POST['region_priority'])) { + set_msg('Region added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/regions.php'); + exit; + } else { + set_error('Region could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['region_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_region($_POST['region_id'],$_POST['region_name'],$_POST['region_priority'])) { + set_msg('Region updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/regions.php'); + exit; + } else { + set_error('Region update failed.'); + } + } else { + $title = 'Edit Region'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit Region</h2>'; + $posts = mirror_get_one_region($_POST['region_id']); + form_start(); + include_once(INC.'/forms/region.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('region_id',$_POST['region_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if (!record_exists('mirror_mirror_region_map','region_id',$_POST['region_id'])&&mirror_delete_region($_POST['region_id'])) { + set_msg('Region deleted successfully.'); + } else { + set_error('Region cannot be deleted because it is linked to a mirror.'); + } + break; + } + } else { + set_error('You must select a region to continue.'); + } +} + +$title = 'Regions'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Regions</h2>'; + +show_error(); +show_msg(); + +$regions = mirror_get_regions(); + +$_GET['sort']=(!empty($_GET['sort']))?$_GET['sort']:'region_name'; +$_GET['order']=(!empty($_GET['order']))?$_GET['order']:'ASC'; +$regions=array_order_by($regions,$_GET['sort'],$_GET['order']); + +$headers = array( + 'region_id'=>'', + 'region_name'=>'Region Name', + 'mirrors'=>'Mirrors', + 'region_priority'=>'Priority' +); + +$actions = array( + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($regions,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a Region</h2>'; +form_start(); +include_once(INC.'/forms/region.php'); +form_submit('add-submit','','button1','Add Region'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/admin/users.php b/php/admin/users.php new file mode 100644 index 0000000..3017c49 --- /dev/null +++ b/php/admin/users.php @@ -0,0 +1,104 @@ +<?php +/** + * Users. + * @package mirror + * @subpackage admin + */ +$protect=1; // protect this page +require_once('../cfg/init.php'); + +// add user +if (!empty($_POST['add-submit'])&&!empty($_POST['username'])&&!empty($_POST['password'])&&!empty($_POST['rpassword'])) { + if (mirror_insert_user($_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { + set_msg('User added successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php'); + exit; + } else { + set_error('User could not be added because of an unknown error.'); + } +} + +// process actions +if (!empty($_POST['submit'])) { + if (!empty($_POST['user_id'])) { + switch($_POST['action']) { + case 'edit': + if (!empty($_POST['doit'])) { + if (mirror_update_user($_POST['user_id'],$_POST['username'],$_POST['password'],$_POST['rpassword'],$_POST['user_firstname'],$_POST['user_lastname'],$_POST['user_email'])) { + set_msg('User updated successfully.'); + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/users.php'); + exit; + } else { + set_error('User update failed.'); + } + } else { + $title = 'Edit User'; + $nav = INC.'/admin_nav.php'; + require_once(HEADER); + echo '<h2>Edit User</h2>'; + $posts = mirror_get_one_user($_POST['user_id']); + form_start(); + include_once(INC.'/forms/user.php'); + form_hidden('doit','1'); + form_hidden('action','edit'); + form_hidden('user_id',$_POST['user_id']); + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); + exit; + } + break; + case 'delete': + if ($_POST['user_id']==$_SESSION['user']['user_id']) { + set_error('You cannot delete yourself.'); + } elseif (mirror_delete_user($_POST['user_id'])) { + set_msg('User deleted successfully.'); + } else { + set_error('User could not be deleted because of an error.'); + } + break; + } + } else { + set_error('You must select a user to continue.'); + } +} + +$title = 'Users'; +$nav = INC.'/admin_nav.php'; +require_once(HEADER); +echo '<h2>Users</h2>'; + +show_error(); +show_msg(); + +$users = mirror_get_users(); + +$_GET['sort'] = (!empty($_GET['sort']))?$_GET['sort']:'user_lastname'; +$_GET['order'] = (!empty($_GET['order']))?$_GET['order']:'ASC'; +$users = array_order_by($users,$_GET['sort'],$_GET['order']); + +$headers = array( + 'user_id'=>'', + 'user_lastname'=>'Last', + 'user_firstname'=>'First', + 'user_email'=>'Email', + 'username'=>'Username' +); + +$actions = array( + 'edit'=>'Edit', + 'delete'=>'Delete' +); + +form_start(); +show_list($users,$headers,'radio',$actions); +form_end(); + +echo '<h2>Add a User</h2>'; +form_start(); +include_once(INC.'/forms/user.php'); +form_submit('add-submit','','button1','Add User'); +form_end(); + +require_once(FOOTER); +?> diff --git a/php/cfg/admin_init.php b/php/cfg/admin_init.php new file mode 100644 index 0000000..7d22ab3 --- /dev/null +++ b/php/cfg/admin_init.php @@ -0,0 +1,15 @@ +<?php +/** + * Admin initialization. + * @package mirror + * @subpackage cfg + */ +require_once(LIB.'/auth.php'); // auth functions +require_once(LIB.'/forms.php'); // form library +require_once(LIB.'/list.php'); // list library + +if (!auth_is_valid_session()) { + header('Location: http://'.$_SERVER['HTTP_HOST'].WEBPATH.'/admin/login.php'); + exit; +} +?> diff --git a/php/cfg/config-dist.php b/php/cfg/config-dist.php new file mode 100644 index 0000000..308e844 --- /dev/null +++ b/php/cfg/config-dist.php @@ -0,0 +1,18 @@ +<?php +/** + * Mirror configuration document. + * @package mirror + * @subpackage cfg + */ +define('FILEPATH','/var/www/download'); // filepath of root dir +define('WEBPATH',''); // web path of root dir +define('LIB',FILEPATH.'/lib'); // path to lib dir +define('INC',FILEPATH.'/inc'); // path to inc dir +define('HEADER',INC.'/header.php'); // header document +define('FOOTER',INC.'/footer.php'); // footer document +define('DBHOST', ''); // db host +define('DBNAME', ''); // db name +define('DBUSER', ''); // db user +define('DBPASS', ''); // db pass +define('LOGGING',1); // enable logging? 1=on 0=off +?> diff --git a/php/cfg/init.php b/php/cfg/init.php new file mode 100644 index 0000000..4eb6ed0 --- /dev/null +++ b/php/cfg/init.php @@ -0,0 +1,18 @@ +<?php +/** + * Init. + * @package mirror + * @subpackage cfg + */ +require_once('config.php'); // config file that defines constants +require_once(LIB.'/util.php'); // util file for random functions (no SQL here) +require_once(LIB.'/csv.php'); // util file for random functions (no SQL here) +$start = microtime_float(); // start timer +require_once(LIB.'/mirror.php'); // user and admin functions for the mirror app (some SQL) +require_once(LIB.'/db.php'); // core mysql wrappers used in mirror functions +db_connect(DBHOST,DBUSER,DBPASS); // open persistent connection to db +db_select(DBNAME); // select db +if (!empty($protect)) { + require_once('admin_init.php'); +} +?> diff --git a/php/css/print.css b/php/css/print.css new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/php/css/print.css diff --git a/php/css/screen.css b/php/css/screen.css new file mode 100644 index 0000000..e2e67c9 --- /dev/null +++ b/php/css/screen.css @@ -0,0 +1,84 @@ +/* nav */ +ul#nav li a { + font-weight:bold; +} +ul#nav li ul li a { + font-weight:normal; +} +.logout { + color:#f00; +} + +/* forms */ +.label-small { + display: inline; + float: left; + width: 8em; + padding-right: 1ex; + text-align:right; +} +.label-medium{ + display: inline; + float: left; + width: 14em; + padding-right: 1ex; + text-align:right; +} +.label-large{ + display: inline; + float: left; + width: 20em; + padding-right: 1ex; + text-align:right; +} +.button1 { + background-color:#9c9; + cursor:pointer; +} +.button1:hover { + background-color:#fff; + border:inset 2px #999; +} + +/* lists */ +.list { + margin-top:.5em; +} +.list td { + padding:.2em; + text-align:left; +} +.list td label { + border-bottom:1px dashed #999; + font-weight:normal; +} +.list th { + background:#eee; + border:1px solid #000; + font-weight:bold; + padding:0; +} +.list th a { + display:block; + padding:.2em 1.2em .2em .2em; + text-align:left; +} +.list th a:hover { + background-color:#fff; +} +.row1 { + background:#ddd; +} +.row2 { + background:#ccc; +} +.row1:hover, .row2:hover { + background-color:#fff; +} +.sort-desc { + background:#ccf url(../img/up.gif) no-repeat right; +} +.sort-asc { + background:#ccf url(../img/down.gif) no-repeat right; +} + diff --git a/php/images/gridtest.gif b/php/images/gridtest.gif Binary files differnew file mode 100644 index 0000000..6dd05dc --- /dev/null +++ b/php/images/gridtest.gif diff --git a/php/images/gtop-www.jpg b/php/images/gtop-www.jpg Binary files differnew file mode 100644 index 0000000..4122618 --- /dev/null +++ b/php/images/gtop-www.jpg diff --git a/php/img/down.gif b/php/img/down.gif Binary files differnew file mode 100644 index 0000000..2813965 --- /dev/null +++ b/php/img/down.gif diff --git a/php/img/up.gif b/php/img/up.gif Binary files differnew file mode 100644 index 0000000..6d5a795 --- /dev/null +++ b/php/img/up.gif diff --git a/php/inc/admin_nav.php b/php/inc/admin_nav.php new file mode 100644 index 0000000..073ab0a --- /dev/null +++ b/php/inc/admin_nav.php @@ -0,0 +1,27 @@ +<?php +/** + * Admin navigation. + * @package mirror + * @subpackage inc + */ +?> +<div id="side"> +<ul id="nav"> +<li><a href="<?php echo WEBPATH; ?>/admin/logout.php" class="logout" title="Logout to end your session.">« Logout <?php echo $_SESSION['user']['username']?></a></li> +<li> + <a href="<?php echo WEBPATH; ?>/admin/" title="Manage current mirrors.">Mirrors</a> + <ul> + <li><a href="<?php echo WEBPATH; ?>/admin/regions.php" title="A region is an area that has a set of mirrors.">Regions</a></li> + </ul> +</li> +<li> + <a href="<?php echo WEBPATH; ?>/admin/products.php" title="Products (firefox, thunderbird, etc.)">Products</a> + <ul> + <li><a href="<?php echo WEBPATH; ?>/admin/locations.php" title="Product file locations based on OS.">File Locations</a></li> + <li><a href="<?php echo WEBPATH; ?>/admin/os.php" title="Operating systems.">Operating Systems</a></li> + <li><a href="<?php echo WEBPATH; ?>/admin/lstats.php" title="View location statuses.">Location Statuses</a></li> + </ul> +</li> +<li><a href="<?php echo WEBPATH; ?>/admin/users.php" title="Manage administrator accounts.">Users</a></li> +</ul> +</div> diff --git a/php/inc/footer.php b/php/inc/footer.php new file mode 100644 index 0000000..efa17e7 --- /dev/null +++ b/php/inc/footer.php @@ -0,0 +1,24 @@ +<?php +/** + * Footer document. + * @package mirror + * @subpackage inc + */ +?> +</td></tr></table></td></tr></table> +<hr class="hide"> +</div> +<?php +if (!empty($nav)) { + echo '</div>'; +} +?> +<div id="footer"> +<p class="copyright">Copyright © 2005 The Gentoo Foundation, portions Copyright © 1998-2004 The Mozilla Organization</p> +</div> +</div> +</body> +</html> +<?php +ob_end_flush(); +?> diff --git a/php/inc/forms/location.php b/php/inc/forms/location.php new file mode 100644 index 0000000..60e35cb --- /dev/null +++ b/php/inc/forms/location.php @@ -0,0 +1,23 @@ +<?php +/** + * File location form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('Product', 'product','label-small'); +form_select('product_id','product','',mirror_get_products_select(),$posts['product_id']); +echo ' [<a href="./products.php">edit products</a>]'; +echo '</div><br />'; + +echo '<div>'; +form_label('OS', 'os','label-small'); +form_select('os_id','os','',mirror_get_oss_select(),$posts['os_id']); +echo ' [<a href="./os.php">edit operating systems</a>]'; +echo '</div><br />'; + +echo '<div>'; +form_label('File Location', 'floc','label-small'); +form_text('location_path', 'floc', '', $posts['location_path'], 30, 100); +echo '</div><br />'; +?> diff --git a/php/inc/forms/mirror.php b/php/inc/forms/mirror.php new file mode 100644 index 0000000..c1e7dcb --- /dev/null +++ b/php/inc/forms/mirror.php @@ -0,0 +1,27 @@ +<?php +/** + * Region form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('Mirror Name', 'mname','label-small'); +form_text('mirror_name', 'mname', '', $posts['mirror_name'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Region', 'mregion','label-small'); +form_select('region_id','mregion','',mirror_get_regions_select(),$posts['region_id']); +echo ' [<a href="./regions.php">edit regions</a>]'; +echo '</div><br />'; + +echo '<div>'; +form_label('Base URL', 'murl','label-small'); +form_text('mirror_baseurl', 'murl', '', $posts['mirror_baseurl'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Rating', 'mrating','label-small'); +form_text('mirror_rating', 'mrating', '', $posts['mirror_rating'], 30, 100); +echo '</div><br />'; +?> diff --git a/php/inc/forms/os.php b/php/inc/forms/os.php new file mode 100644 index 0000000..63a7643 --- /dev/null +++ b/php/inc/forms/os.php @@ -0,0 +1,16 @@ +<?php +/** + * OS form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('OS Name', 'oname','label-small'); +form_text('os_name', 'oname', '', $posts['os_name'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Priority', 'p','label-small'); +form_text('os_priority', 'p', '', $posts['os_priority'], 30, 100); +echo '</div><br />'; +?> diff --git a/php/inc/forms/product.php b/php/inc/forms/product.php new file mode 100644 index 0000000..0dc3c04 --- /dev/null +++ b/php/inc/forms/product.php @@ -0,0 +1,16 @@ +<?php +/** + * Product form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('Product Name', 'pname','label-small'); +form_text('product_name', 'pname', '', $posts['product_name'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Priority', 'pty','label-small'); +form_text('product_priority', 'pty', '', $posts['product_priority'], 30, 100); +echo '</div><br />'; +?> diff --git a/php/inc/forms/region.php b/php/inc/forms/region.php new file mode 100644 index 0000000..9262809 --- /dev/null +++ b/php/inc/forms/region.php @@ -0,0 +1,16 @@ +<?php +/** + * Region form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('Region Name', 'rname','label-small'); +form_text('region_name', 'rname', '', $posts['region_name'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Priority', 'rp','label-small'); +form_text('region_priority', 'rp', '', $posts['region_priority'], 30, 100); +echo '</div><br />'; +?> diff --git a/php/inc/forms/user.php b/php/inc/forms/user.php new file mode 100644 index 0000000..bfd92bc --- /dev/null +++ b/php/inc/forms/user.php @@ -0,0 +1,37 @@ +<?php +/** + * User form. + * @package mirror + * @subpackage forms + */ +echo '<div>'; +form_label('Username', 'uname','label-small'); +form_text('username', 'uname', '', $posts['username'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Password', 'password','label-small'); +form_password('password', 'password', '', 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Re-enter Password', 'rpassword','label-small'); +form_password('rpassword', 'rpassword', '', 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('First Name', 'fname','label-small'); +form_text('user_firstname', 'fname', '', $posts['user_firstname'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Last Name', 'lname','label-small'); +form_text('user_lastname', 'lname', '', $posts['user_lastname'], 30, 100); +echo '</div><br />'; + +echo '<div>'; +form_label('Email', 'email','label-small'); +form_text('user_email', 'email', '', $posts['user_email'], 30, 100); +echo '</div><br />'; + +?> diff --git a/php/inc/header.php b/php/inc/header.php new file mode 100644 index 0000000..dbe97b2 --- /dev/null +++ b/php/inc/header.php @@ -0,0 +1,55 @@ +<?php +/** + * Header document. + * @package mirror + * @subpackage inc + */ +ob_start(); +?> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> +<link rel="home" title="Home" href="http://www.gentoo.org/"> +<link rel="stylesheet" type="text/css" href="http://www.gentoo.org/css/main.css" media="all"> +<link rel="stylesheet" type="text/css" href="<?php echo WEBPATH; ?>/css/screen.css" media="screen"> + +<link rel="icon" href="http://www.gentoo.org/favicon.ico" type="image/png"> +<title><?php echo $title; ?></title> +<meta name="robots" content="all"> +<meta name="keywords" content="gentoo linux distribution source compile"> +<?php echo (!empty($extra_headers))?$extra_headers:null?> +</head> +<body id="www-mozilla-org" class="secondLevel"<?php echo (!empty($body_tags))?' '.$body_tags.' ':null; ?>> +<div id="container"> +<div id="header"> + +<table border="0" width="100%" cellspacing="0" cellpadding="0"> +<tr> +<td valign="top" height="125" width="1%" bgcolor="#45347b"><a href="/"><img border="0" src="/images/gtop-www.jpg" alt="Gentoo Logo"></a></td> +<td valign="bottom" align="left" bgcolor="#000000" colspan="2"><p class="menu"> + <H2><font color="#FFFFFF"> Gentoo Mirror Management</font></H2> + </p></td> +</tr> +<tr> +<td valign="top" align="right" width="1%" bgcolor="#dddaec"><table width="100%" cellspacing="0" cellpadding="0" border="0"> +<tr><td height="1%" valign="top" align="right"><img src="/images/gridtest.gif" alt="Gentoo Spaceship"></td></tr> +<tr><td height="99%" valign="top" align="right"><table cellspacing="0" cellpadding="5" border="0"><tr><td valign="top"> +<p class="altmenu"> +<?php +if (!empty($nav)) { + require_once($nav); +} +?> +</p> + +<br><br> +</td></tr></table></td></tr></table> +</td><td><table><tr><td> </td><td> + +</div> +<div id="mBody"> +<?php + echo '<div id="mainContent">'; +?> + diff --git a/php/inc/nav.php b/php/inc/nav.php new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/php/inc/nav.php diff --git a/php/index-list.php b/php/index-list.php new file mode 100644 index 0000000..1705ee6 --- /dev/null +++ b/php/index-list.php @@ -0,0 +1,83 @@ +<?php +/** + * Regions. + * @package mirror + * @subpackage admin + */ +require_once('./cfg/init.php'); +require_once(LIB.'/auth.php'); // auth functions +require_once(LIB.'/forms.php'); // form library +require_once(LIB.'/list.php'); // list library +error_reporting(E_GET); + +if (!empty($_GET['os'])&&!empty($_GET['product'])) { + // clean in os and product strings + $os_name = mysql_real_escape_string(trim(strtolower($_GET['os']))); + $product_name = mysql_real_escape_string(trim(strtolower($_GET['product']))); + // get os and product IDs + $os_id = db_name_to_id('mirror_os','os_id','os_name',$os_name); + $product_id = db_name_to_id('mirror_products','product_id','product_name',$product_name); +} +if (!empty($_GET['os_id'])&&!empty($_GET['product_id'])) { + $os_id = intval($_GET['os_id']); + $product_id = intval($_GET['product_id']); +} + +if (!empty($os_id)&&!empty($product_id)) { + + $mirrors = db_get(" + SELECT DISTINCT + mirror_baseurl, location_path + FROM + mirror_mirrors + INNER JOIN + mirror_location_mirror_map + ON + mirror_location_mirror_map.mirror_id = mirror_mirrors.mirror_id + INNER JOIN + mirror_locations + ON + mirror_location_mirror_map.location_id = mirror_locations.location_id + WHERE + mirror_locations.os_id = {$os_id} AND + mirror_locations.product_id = {$product_id} AND + mirror_location_mirror_map.location_active = '1' AND + mirror_mirrors.mirror_active = '1' + ORDER BY + mirror_rating DESC, mirror_baseurl + "); + + header("Content-type: text/plain;"); + foreach ($mirrors as $mirror) { + $b = $mirror['mirror_baseurl']; + $l = $mirror['location_path']; + if($l[0] == '/' && substr($b,-1) == '/') { + $b = substr($b, 0, -1); + } + echo $b.$l."\n"; + } + exit; + +} else { + + $title = 'Mirror Listing'; + require_once(HEADER); + echo '<h1>Mirror List</h1>'; + echo '<p>Use this form to get a list of all mirrors serving up active files + for the selected Product/OS.</p>'; + form_start('list','list','get','./index-list.php'); + echo '<div>'; + form_label('Product', 'product','label-small'); + form_select('product_id','product','',mirror_get_products_select(),$_GET['product_id']); + echo ' [<a href="./products.php">edit products</a>]'; + echo '</div><br />'; + + echo '<div>'; + form_label('OS', 'os','label-small'); + form_select('os_id','os','',mirror_get_oss_select(),$_GET['os_id']); + echo ' [<a href="./os.php">edit operating systems</a>]'; + echo '</div><br />'; + form_submit('submit','','button1','Update'); + form_end(); + require_once(FOOTER); +} diff --git a/php/index.php b/php/index.php new file mode 100644 index 0000000..eacb99e --- /dev/null +++ b/php/index.php @@ -0,0 +1,75 @@ +<?php +/** + * Main handler. + * @package mirror + * @subpackage pub + */ +error_reporting(0); // hide all errors +require_once('./cfg/config.php'); // config file that defines constants + +// if we don't have an os, make it windows, playing the odds +if (empty($_GET['os'])) { + $_GET['os'] = 'Any'; +} + +// do we even have an os or product? +if (!empty($_GET['os'])&&!empty($_GET['product'])) { + require_once(LIB.'/db.php'); // core mysql wrappers + db_connect(DBHOST,DBUSER,DBPASS); // open persistent connection to db + db_select(DBNAME); // select db + + // clean in os and product strings + $os_name = mysql_real_escape_string(trim(strtolower($_GET['os']))); + $product_name = mysql_real_escape_string(trim(strtolower($_GET['product']))); + + // get os and product IDs + $os_id = db_name_to_id('mirror_os','os_id','os_name',$os_name); + $product_id = db_name_to_id('mirror_products','product_id','product_name',$product_name); + + // do we have a valid os and product? + if (!empty($os_id)&&!empty($product_id)) { + $location = db_get_one("SELECT location_id,location_path FROM mirror_locations WHERE product_id={$product_id} AND os_id={$os_id}"); + + // did we get a valid location? + if (!empty($location)) { + $mirror = db_get_one("SELECT mirror_mirrors.mirror_id,mirror_baseurl FROM mirror_mirrors, mirror_location_mirror_map WHERE mirror_mirrors.mirror_id = mirror_location_mirror_map.mirror_id AND mirror_location_mirror_map.location_id = {$location['location_id']} AND mirror_active='1' AND location_active ='1' ORDER BY rand()*(1/mirror_rating)"); + + // did we get a valid mirror? + if (!empty($mirror)) { + + // if logging is enabled, insert log + if (LOGGING) { + db_query("UPDATE mirror_mirrors SET mirror_count=mirror_count+1 WHERE mirror_id={$mirror['mirror_id']}"); + db_query("UPDATE mirror_products SET product_count=product_count+1 WHERE product_id={$product_id}"); + } + + // LANGUAGE HACK + if (!empty($_GET['lang'])) { +//// $location['location_path'] = str_replace('x86',$_GET['lang'],$location['location_path']); + $location['location_path'] = str_replace('en-US',$_GET['lang'],$location['location_path']); + } + + // BitTorrent HACK - robbat2 + if (!empty($_GET['extra'])) { + $extra = $_GET['extra']; + $location['location_path'] .= ereg_replace('\?.*|&.*','',$extra); + } + + // if we are just testing, then just print and exit. + if (!empty($_GET['print'])) { + print('Location: '.$mirror['mirror_baseurl'].$location['location_path']); + exit; + } + + // otherwise, by default, redirect them and exit + header('Location: '.$mirror['mirror_baseurl'].$location['location_path']); + exit; + } + } + } +} + +// if we get here, the request was invalid; redirect to mozilla home +header('Location: http://www.gentoo.org/'); +exit; +?> diff --git a/php/index.php.orig b/php/index.php.orig new file mode 100644 index 0000000..9cc7791 --- /dev/null +++ b/php/index.php.orig @@ -0,0 +1,79 @@ +<?php +/** + * Main handler. + * @package mirror + * @subpackage pub + */ +error_reporting(0); // hide all errors +require_once('./cfg/config.php'); // config file that defines constants + +// if we don't have an os, make it windows, playing the odds +if (empty($_GET['os'])) { + $_GET['os'] = 'Any'; +} + +// do we even have an os or product? +if (!empty($_GET['os'])&&!empty($_GET['product'])) { + require_once(LIB.'/db.php'); // core mysql wrappers + db_connect(DBHOST,DBUSER,DBPASS); // open persistent connection to db + db_select(DBNAME); // select db + + // clean in os and product strings + $os_name = mysql_real_escape_string(trim(strtolower($_GET['os']))); + $product_name = mysql_real_escape_string(trim(strtolower($_GET['product']))); + + printf("osname=%s<br />\nprname=%s<br />\n",$os_name,$product_name); + + // get os and product IDs + $os_id = db_name_to_id('mirror_os','os_id','os_name',$os_name); + $product_id = db_name_to_id('mirror_products','product_id','product_name',$product_name); + + printf("osid=%s<br />\nprid=%s<br />\n",$os_id,$product_id); + + // do we have a valid os and product? + if (!empty($os_id)&&!empty($product_id)) { + $location = db_get_one("SELECT location_id,location_path FROM mirror_locations WHERE product_id={$product_id} AND os_id={$os_id}"); + + // did we get a valid location? + if (!empty($location)) { + $mirror = db_get_one("SELECT mirror_mirrors.mirror_id,mirror_baseurl FROM mirror_mirrors, mirror_location_mirror_map WHERE mirror_mirrors.mirror_id = mirror_location_mirror_map.mirror_id AND mirror_location_mirror_map.location_id = {$location['location_id']} AND mirror_active='1' AND location_active ='1' ORDER BY rand()*(1/mirror_rating)"); + + // did we get a valid mirror? + if (!empty($mirror)) { + + // if logging is enabled, insert log + if (LOGGING) { + db_query("UPDATE mirror_mirrors SET mirror_count=mirror_count+1 WHERE mirror_id={$mirror['mirror_id']}"); + db_query("UPDATE mirror_products SET product_count=product_count+1 WHERE product_id={$product_id}"); + } + + // LANGUAGE HACK + if (!empty($_GET['lang'])) { +//// $location['location_path'] = str_replace('x86',$_GET['lang'],$location['location_path']); + $location['location_path'] = str_replace('en-US',$_GET['lang'],$location['location_path']); + } + + // BitTorrent HACK - robbat2 + if (!empty($_GET['extra'])) { + $extra = $_GET['extra']; + $location['location_path'] .= ereg_replace('\?.*|&.*','',$extra); + } + + // if we are just testing, then just print and exit. + if (!empty($_GET['print'])) { + print('Location: '.$mirror['mirror_baseurl'].$location['location_path']); + exit; + } + + // otherwise, by default, redirect them and exit + header('Location: '.$mirror['mirror_baseurl'].$location['location_path']); + exit; + } + } + } +} + +// if we get here, the request was invalid; redirect to mozilla home +header('Location: http://www.gentoo.org/'); +exit; +?> diff --git a/php/lib/auth.php b/php/lib/auth.php new file mode 100644 index 0000000..f03db32 --- /dev/null +++ b/php/lib/auth.php @@ -0,0 +1,75 @@ +<?php +/** + * Home-cooked auth libraries - because PEAR is fat. + * @package mirror + * @subpackage lib + * @todo re-enforce one-per-user session limit + */ + +/** + * Check admin session against sessions table in database. + * @return bool + */ +function auth_is_valid_session() +{ + if (!empty($_COOKIE['mozilla-mirror-admin'])) { // check cookie + $res = db_query("SELECT * FROM mirror_sessions WHERE session_id = '{$_COOKIE['mozilla-mirror-admin']}'"); // check db for id + if ($res && db_numrows($res)>0) { + $buf = db_fetch($res,MYSQL_ASSOC); + // comment line below to disable gc and allow multiple sessions per username + db_query("DELETE FROM mirror_sessions WHERE username='{$buf['username']}' AND session_id != '{$_COOKIE['mozilla-mirror-admin']}'"); // garbage collection + $user = db_fetch(db_query("SELECT * FROM mirror_users WHERE username='{$buf['username']}'"),MYSQL_ASSOC); + if (empty($_SESSION)) { + auth_create_session($user); // if session isn't started, create it and push user data + } + return true; + } + } + return false; +} + +/** + * Authentication a user. + * @param string $username + * @param string $password + * @return array|bool array containing user data or false on failure + */ +function auth_mysql($username,$password) +{ + if (empty($username)||empty($password)) { + return false; + } + $username = trim(strip_tags(addslashes($username))); + $password = trim(strip_tags(addslashes($password))); + $res = db_query("SELECT * FROM mirror_users WHERE username='{$username}' AND password=MD5('{$password}')"); + if ($res && db_numrows($res)>0) { + return db_fetch($res,MYSQL_ASSOC); + } else { + return false; + } +} + +/** + * Start a valid session. + * @param array $user array containing user information. + */ +function auth_create_session($user,$secure=0) +{ + session_name('mozilla-mirror-admin'); + session_set_cookie_params(0,'/',$_SERVER['HTTP_HOST'],$secure); + session_start(); + db_query("INSERT INTO mirror_sessions(session_id,username) VALUES('".session_id()."','{$user['username']}')"); + $_SESSION['user']=$user; +} + +/** + * Logout. + */ +function auth_logout() +{ + // comment line below to keep gc from deleting other sessions for this user + db_query("DELETE FROM mirror_sessions WHERE session_id='{$_COOKIE['mozilla-mirror-admin']}' OR username='{$_SESSION['user']['username']}'"); + $_COOKIE = array(); + $_SESSION = array(); +} +?> diff --git a/php/lib/csv.php b/php/lib/csv.php new file mode 100644 index 0000000..e98d37c --- /dev/null +++ b/php/lib/csv.php @@ -0,0 +1,216 @@ +<?php +/** + * Functions that take a db result and export it to CSV. + * Usage example: + * <code> + * if ($_GET['csv']) + * { + * $res=db_query("SELECT * FROM fic_courses"); + * csv_send_csv($res); + * exit; + * } + * </code> + * @package libs + * @subpackage csv + * @author Richard Faaberg <faabergr@onid.orst.edu> + * @author Mike Morgan <mike.morgan@oregonstate.edu> + * @copyright Central Web Services, Oregon State University + */ + +/** + * @param resource $res MySQL resource / result + * @return array $ret_val array of CSV rows, parsed properly (false if $res is not resource) + */ +function csv_export_to_csv($res) +{ + // parse all results, format for CSV + while ( $buf=db_fetch($res,MYSQL_ASSOC) ) + { + // get the keys (headers), if not already done + if ( empty($heads) ) + { + $heads=array_keys($buf); + foreach ($heads as $key=>$val) + { + $heads[$key]=csv_add_quotes(csv_fix_quotes($val)); + } + $heads=implode(',',$heads); + $csv[]=$heads."\n"; + } + // fix inner quotes, add outer quotes for all values + $row=csv_array_to_csv($buf); + $csv[]=$row."\n"; + } + return $csv; +} + +/** + * Use a resource or two dimensional array, then send the CSV results to user. + * @param mixed $res MySQL resource / result, or a two dimensional array + * @param string $name name of the export file + * @return bool true if file sent, false otherwise + */ +function csv_send_csv($res,$name=null) +{ + // set name of the export file + $filename=(is_null($name))?'export-'.date('Y-m-d').'.csv':$name.'.csv'; + // check for valid resource + if ( is_resource($res) ) + { + $csv=csv_export_to_csv($res); + } + elseif( is_array($res) && !empty($res) ) + { + foreach ($res as $row) + { + if ( !is_array($row) ) + ; + else + $csv[] = csv_array_to_csv($row)."\n"; + } + } + + if ( is_array($csv) ) + { + // stream csv to user + header("Content-type: application/x-csv"); + header('Content-disposition: inline; filename="'.$filename.'"'); + header('Cache-Control: private'); + header('Pragma: public'); + foreach ($csv as $row) + { + echo $row; + } + return true; + } + + return false; +} + +/** + * Replace quotes inside of a field with double quotes, which is something CSV requires. + * @param string $string unquoted quotes + * @return string $string quoted quotes + */ +function csv_fix_quotes($string) +{ + return preg_replace('/"/','""',$string); +} + +/** + * Replace line breaks with commas trailed by a space. + * @param string $string string containing line breaks + * @param string string without line breaks + */ +function csv_fix_line_breaks($string) +{ + return preg_replace('/(\n\r|\r)/','\n',$string); +} + +/** + * Replaces instances of double quotes in a string with a single quote. + * @param string $string the string to perform the replacement on + * @return string the string with "" replaced by " + */ +function csv_unfix_quotes($string) +{ + return preg_replace('/""/', '"', $string); +} + +/** + * Place quotes outside of every field, which inherently solves space, line break issues. + * @param string $string + * @return string $string with quotes around it + */ +function csv_add_quotes($string) +{ + return '"'.$string.'"'; +} + +/** + * Removes quotes from the beginning and the end of a string. + * @param string $string the string to remove the quotes from + * @return string the string, sans quotes at the beginning and end + */ +function csv_remove_quotes($string) +{ + $pattern = "/^\"(.*)\"$/"; + $replacement = "$1"; + return preg_replace($pattern, $replacement, $string); +} + +/** + * Convert an array into a CSV string with quotes around each value. + * @param array $array + * @return string the values in $array surrounded by quotes and separated by commas + */ +function csv_array_to_csv($array) +{ + $csv_arr = array(); + foreach ($array as $value) + { + $csv_arr[]=csv_add_quotes(csv_fix_quotes(csv_fix_line_breaks($value))); + } + $csv_string=implode(',',$csv_arr); + + return $csv_string; +} + +/** + * Convert a CSV string into an array. + * Please use sparingly - this creates temp files + * @param string $string the CSV string + * @return array the elements from the CSV string in an array + */ +function csv_csv_to_array($string) +{ + $return = array(); + $length = strlen($string); + + // create a temp file and write the string to it + $tmpfname = tempnam('/tmp', 'csvlib'); + $fh = fopen($tmpfname, 'w'); + fwrite($fh, $string); + fclose($fh); + + // open the file for csv parsing + $csvh = fopen($tmpfname, 'r'); + while (($arraydata = fgetcsv($csvh, $length, ',')) !== false) + { + $return = array_merge($return, $arraydata); + } + + fclose($csvh); + unlink($tmpfname); + + return $return; +} + +/** + * Read a CSV file into a two dimensional array + * It returns all the rows in the file, so if the first row are headers, you'd need to take care of that in the returned array + * @param string $filepath the path to the csv file + * @param string $delimiter delimiter, default to ',' + * @param string $enclosure enclosure character, default to '"' + * @return &array the two dimensional array with the csv file content, or an empty if an error occured + */ +function &csv_csv_file_to_array($filepath, $delimiter=',', $enclosure='"') +{ + $return = array(); + + if (!file_exists($filepath) || !is_readable($filepath)) + return $return; + + $fh =& fopen($filepath, 'r'); + $size = filesize($filepath)+1; + + while ($data =& fgetcsv($fh, $size, $delimiter, $enclosure)) + { + $return[] = $data; + } + + fclose($fh); + + return $return; +} +?> diff --git a/php/lib/db.php b/php/lib/db.php new file mode 100644 index 0000000..3f9435f --- /dev/null +++ b/php/lib/db.php @@ -0,0 +1,298 @@ +<?php +/** + * Minimal wrappers for core PHP mysql_* functions. + * @package mirror + * @subpackage lib + */ + +/** + * Connect to a MySQL database server. + * @param string $host db server, defaults to localhost + * @param string $user db username + * @param string $password db password + * @return resource dbh + */ +function db_connect($host='localhost',$user=null,$password=null) +{ + static $dbh = null; + if (!empty($host) && isset($user) && isset($password)) { + $dbh = @mysql_connect($host,$user,$password); + } + if (is_resource($dbh)) { + return $dbh; + } + else die("Unable to create database connection in db_connect()"); +} + +/** + * Select database. + * @param string $database name of the database to select + * @param resource $dbh valid dbh, null if not defined + * @return bool success of command + */ +function db_select($database,$dbh=null) +{ + if(is_resource($dbh)){ + return @mysql_select_db($database); + }else{ + return @mysql_select_db($database, db_connect()); + } + +} + +/** + * Execute a MySQL query. + * @param string $qry MySQL query + * @param resource $dbh valid dbh + */ +function db_query($qry=null,$dbh=null) +{ + static $result = null; + if(!is_resource($dbh)) $dbh = db_connect(); + if(is_null($qry)) + { + if(is_resource($result)) return $result; + else return false; + } + else + { + $result = @mysql_query($qry,$dbh); + return $result; + } +} + +/** + * Fetch a row as an array from a result. + * @param string $result (default to null) + * @return array + */ +function db_fetch($result=null,$type=MYSQL_BOTH) +{ + return (!is_resource($result))? @mysql_fetch_array(db_query()) : @mysql_fetch_array($result,$type); +} + +/** + * Fetch an array based on a query. + * @param string $query database query + * @param int $type result type + * @param string $col_id if passed it, the values of this column in the result set will be used as the array keys in the returned array + * @return array $list array of database rows + * Example of returned array: + * <code> + * db_get("SELECT * FROM table",MYSQL_ASSOC); + * returns... + * Array + * ( + * [0] => Array + * ( + * [id] => 1 + * [field1] => data1 + * [field2] => data2 + * ) + * + * ) + * </code> + */ +function db_get($query,$type=MYSQL_BOTH,$col_id=NULL) +{ + $res = db_query($query); + $list = array(); + if (is_resource($res) && !is_null($col_id) && ($type == MYSQL_BOTH || $type == MYSQL_ASSOC) && @mysql_num_rows($res) !== 0) { + $col_test = db_fetch($res,$type); + @mysql_data_seek($res, 0); + if (array_key_exists($col_id,$col_test)) { + while ( $buf = db_fetch($res,$type) ) { + $list[$buf[$col_id]] = $buf; + } + return $list; + } + } + while ( $buf = db_fetch($res,$type) ) { + $list[] = $buf; + } + return $list; +} + +/** + * Get all of the fieldnames for the specified table. + * @param string $table name of table to describe + * @return array array of column names, must be an array + */ +function db_fieldnames($table) +{ + $dbh = db_connect(); + $results = db_query("DESCRIBE $table"); + if (is_resource($results)) + { + while ($buf=db_fetch($results)) + { + $field_names[] = $buf[0]; + } + } + else + { + $field_names[] = 0; + } + return $field_names; +} + +/** + * Create a MySQL INSERT statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @return string $query resulting MySQL insert string + */ +function db_makeinsert($vars,$table) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (get_magic_quotes_gpc) $vars[$field] = stripslashes($vars[$field]); + $vars[$field] = addslashes($vars[$field]); + if (isset($vars[$field])) + { + isset($q1)?$q1 .= ','.$field:$q1='INSERT INTO '.$table.'('.$field; + isset($q2)?$q2 .= ",'$vars[$field]'":$q2=" VALUES('$vars[$field]'"; + } + } + $q1 .= ')'; + $q2 .= ')'; + $query = $q1.$q2; + return $query; +} + +/** + * Create a MySQL REPLACE statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @return string $query resulting MySQL insert string + */ +function db_makereplace($vars,$table) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (get_magic_quotes_gpc) $vars[$field] = stripslashes($vars[$field]); + $vars[$field] = addslashes($vars[$field]); + if (isset($vars[$field])) + { + isset($q1)?$q1 .= ','.$field:$q1='REPLACE INTO '.$table.'('.$field; + isset($q2)?$q2 .= ",'$vars[$field]'":$q2=" VALUES('$vars[$field]'"; + } + } + $q1 .= ')'; + $q2 .= ')'; + $query = $q1.$q2; + return $query; +} + +/** + * Create a MySQL UPDATE statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @param string $where where clause, describing which records are to be updated + */ +function db_makeupdate($vars,$table,$where) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (isset($vars[$field])) + { + if (get_magic_quotes_gpc()) $vars[$field] = stripslashes($vars[$field]); + $vars[$field]=addslashes($vars[$field]); + $q1 = isset($q1)?$q1 .= ' ,'.$field."='$vars[$field]'":'UPDATE '.$table.' set '.$field."='$vars[$field]'"; + } + } + $query = $q1.' '.$where; + return $query; +} + +/** + * Since PHP's mysql_insert_id() sometimes throws an error, this is the replacement + * @param resource $dbh optional dbh to get the last inserted id from + * @return int the return value of MySQL's last_insert_id() + */ +function db_insert_id($dbh=null) +{ + if(!is_resource($dbh)) $dbh = db_connect(); + $buf = db_fetch(db_query("SELECT LAST_INSERT_ID()", $dbh)); + return empty($buf[0]) ? false : $buf[0]; +} + +/** + * Determine number of rows in result. + * @param resource $result mysql result + * @return int number of rows in query result + */ +function db_numrows($result=null) +{ + return (!is_resource($result))? @mysql_num_rows(db_query()) : @mysql_num_rows($result); +} + +/** + * Close the db connection. If a dbh is not specified, assume the last opened link. + * @param resource $dbh optional dbh to close + */ +function db_close($dbh=null) +{ + return is_resource($dbh)?@mysql_close($dbh):@mysql_close(); +} + +/** + * Get one record. + * @param string $query query + * @param int $type result type + */ +function db_get_one($query,$type=MYSQL_ASSOC) { + $buf = db_get($query.' LIMIT 1',$type); + return $buf[0]; +} + +/** + * Get an ID based on name. + * @param string $table + * @param string $id_col + * @param string $name_col + * @param string $name + */ +function db_name_to_id($table,$id_col,$name_col,$name) +{ + $buf = db_get_one("SELECT {$id_col} FROM {$table} WHERE {$name_col} = '{$name}'", MYSQL_NUM); + return $buf[0]; +} + +/** + * Sets enum booleans to their opposite + * @param string $table + * @param string $pri + * @param string $col + * @param array $id + * @return int + */ +function db_toggle_bool($table, $pri, $col, $id) +{ + return db_query("UPDATE {$table} SET {$col} = IF({$col} = '1', '0', '1') WHERE {$pri} = {$id}"); +} +?> diff --git a/php/lib/db.php.orig b/php/lib/db.php.orig new file mode 100644 index 0000000..23dd1ea --- /dev/null +++ b/php/lib/db.php.orig @@ -0,0 +1,306 @@ +<?php +/** + * Minimal wrappers for core PHP mysql_* functions. + * @package mirror + * @subpackage lib + */ + +/** + * Connect to a MySQL database server. + * @param string $host db server, defaults to localhost + * @param string $user db username + * @param string $password db password + * @return resource dbh + */ +function db_connect($host='localhost',$user=null,$password=null) +{ + static $dbh = null; + if (!empty($host) && isset($user) && isset($password)) { + $dbh = @mysql_connect($host,$user,$password); + } + if (is_resource($dbh)) { + return $dbh; + } + else die("Unable to create database connection in db_connect()"); +} + +/** + * Select database. + * @param string $database name of the database to select + * @param resource $dbh valid dbh, null if not defined + * @return bool success of command + */ +function db_select($database,$dbh=null) +{ + if(is_resource($dbh)){ + return @mysql_select_db($database); + }else{ + return @mysql_select_db($database, db_connect()); + } + +} + +/** + * Execute a MySQL query. + * @param string $qry MySQL query + * @param resource $dbh valid dbh + */ +function db_query($qry=null,$dbh=null) +{ + static $result = null; + if(!is_resource($dbh)) $dbh = db_connect(); + printf("q:%s dbh=%s\n",$qry,$dbh); + if(is_null($qry)) + { + if(is_resource($result)) return $result; + else return false; + } + else + { + $result = mysql_query($qry,$dbh); + return $result; + } +} + +/** + * Fetch a row as an array from a result. + * @param string $result (default to null) + * @return array + */ +function db_fetch($result=null,$type=MYSQL_BOTH) +{ + if(!is_resource($result)) { + print 'Rerun query"'.$result.'"'; + return @mysql_fetch_array(db_query()); + } else { + return @mysql_fetch_array($result,$type); + } +} + +/** + * Fetch an array based on a query. + * @param string $query database query + * @param int $type result type + * @param string $col_id if passed it, the values of this column in the result set will be used as the array keys in the returned array + * @return array $list array of database rows + * Example of returned array: + * <code> + * db_get("SELECT * FROM table",MYSQL_ASSOC); + * returns... + * Array + * ( + * [0] => Array + * ( + * [id] => 1 + * [field1] => data1 + * [field2] => data2 + * ) + * + * ) + * </code> + */ +function db_get($query,$type=MYSQL_BOTH,$col_id=NULL) +{ + $res = db_query($query); + $list = array(); + if (is_resource($res) && !is_null($col_id) && ($type == MYSQL_BOTH || $type == MYSQL_ASSOC) && @mysql_num_rows($res) !== 0) { + $col_test = db_fetch($res,$type); + @mysql_data_seek($res, 0); + if (array_key_exists($col_id,$col_test)) { + while ( $buf = db_fetch($res,$type) ) { + $list[$buf[$col_id]] = $buf; + } + return $list; + } + } + while ( $buf = db_fetch($res,$type) ) { + $list[] = $buf; + } + return $list; +} + +/** + * Get all of the fieldnames for the specified table. + * @param string $table name of table to describe + * @return array array of column names, must be an array + */ +function db_fieldnames($table) +{ + $dbh = db_connect(); + $results = db_query("DESCRIBE $table"); + if (is_resource($results)) + { + while ($buf=db_fetch($results)) + { + $field_names[] = $buf[0]; + } + } + else + { + $field_names[] = 0; + } + return $field_names; +} + +/** + * Create a MySQL INSERT statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @return string $query resulting MySQL insert string + */ +function db_makeinsert($vars,$table) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (get_magic_quotes_gpc) $vars[$field] = stripslashes($vars[$field]); + $vars[$field] = addslashes($vars[$field]); + if (isset($vars[$field])) + { + isset($q1)?$q1 .= ','.$field:$q1='INSERT INTO '.$table.'('.$field; + isset($q2)?$q2 .= ",'$vars[$field]'":$q2=" VALUES('$vars[$field]'"; + } + } + $q1 .= ')'; + $q2 .= ')'; + $query = $q1.$q2; + return $query; +} + +/** + * Create a MySQL REPLACE statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @return string $query resulting MySQL insert string + */ +function db_makereplace($vars,$table) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (get_magic_quotes_gpc) $vars[$field] = stripslashes($vars[$field]); + $vars[$field] = addslashes($vars[$field]); + if (isset($vars[$field])) + { + isset($q1)?$q1 .= ','.$field:$q1='REPLACE INTO '.$table.'('.$field; + isset($q2)?$q2 .= ",'$vars[$field]'":$q2=" VALUES('$vars[$field]'"; + } + } + $q1 .= ')'; + $q2 .= ')'; + $query = $q1.$q2; + return $query; +} + +/** + * Create a MySQL UPDATE statement based on $_POST array generated by form submission. + * <ul> + * <li>does not work with mysql functions (PASSWORD, etc.) because there are forced double quotes</li> + * <li>do not use clean_in() before this, or you'll have double the slashes</li> + * <li>use the function only when it saves you time, not _always_</li> + * <li>form items not set will not be processed (unchecked radios, checkboxes) - handle these manually, or don't use the func</li> + * </ul> + * @param array $vars array of posts + * @param string $table name of the table that fields will be inserted into + * @param string $where where clause, describing which records are to be updated + */ +function db_makeupdate($vars,$table,$where) +{ + $dbh = db_connect(); + $fields = db_fieldnames($table); + foreach ($fields as $field) + { + if (isset($vars[$field])) + { + if (get_magic_quotes_gpc()) $vars[$field] = stripslashes($vars[$field]); + $vars[$field]=addslashes($vars[$field]); + $q1 = isset($q1)?$q1 .= ' ,'.$field."='$vars[$field]'":'UPDATE '.$table.' set '.$field."='$vars[$field]'"; + } + } + $query = $q1.' '.$where; + return $query; +} + +/** + * Since PHP's mysql_insert_id() sometimes throws an error, this is the replacement + * @param resource $dbh optional dbh to get the last inserted id from + * @return int the return value of MySQL's last_insert_id() + */ +function db_insert_id($dbh=null) +{ + if(!is_resource($dbh)) $dbh = db_connect(); + $buf = db_fetch(db_query("SELECT LAST_INSERT_ID()", $dbh)); + return empty($buf[0]) ? false : $buf[0]; +} + +/** + * Determine number of rows in result. + * @param resource $result mysql result + * @return int number of rows in query result + */ +function db_numrows($result=null) +{ + return (!is_resource($result))? @mysql_num_rows(db_query()) : @mysql_num_rows($result); +} + +/** + * Close the db connection. If a dbh is not specified, assume the last opened link. + * @param resource $dbh optional dbh to close + */ +function db_close($dbh=null) +{ + return is_resource($dbh)?@mysql_close($dbh):@mysql_close(); +} + +/** + * Get one record. + * @param string $query query + * @param int $type result type + */ +function db_get_one($query,$type=MYSQL_ASSOC) { + $buf = db_get($query.' LIMIT 1',$type); + return $buf[0]; +} + +/** + * Get an ID based on name. + * @param string $table + * @param string $id_col + * @param string $name_col + * @param string $name + */ +function db_name_to_id($table,$id_col,$name_col,$name) +{ + $q = "SELECT {$id_col} FROM {$table} WHERE {$name_col} = '{$name}'"; + print 'Query: '.$q."<br />\n"; + $buf = db_get_one($q, MYSQL_NUM); + return $buf[0]; +} + +/** + * Sets enum booleans to their opposite + * @param string $table + * @param string $pri + * @param string $col + * @param array $id + * @return int + */ +function db_toggle_bool($table, $pri, $col, $id) +{ + return db_query("UPDATE {$table} SET {$col} = IF({$col} = '1', '0', '1') WHERE {$pri} = {$id}"); +} +?> diff --git a/php/lib/forms.php b/php/lib/forms.php new file mode 100644 index 0000000..0317949 --- /dev/null +++ b/php/lib/forms.php @@ -0,0 +1,659 @@ +<?php +/** + * Form functions for handling form input, output, and markup. + * @package mirror + * @subpackage lib + */ + +/** + * Cleans a string or an array of strings for HTML presentation. + * @param mixed $str dirty + * @param bool $slashes default to false, this parameter indicate if stripslashes is desired, usually use for magic qoutes + * @return mixed $str cleaned for HTML + */ +function clean_out($str, $slashes=FALSE) +{ + if (is_array($str)) + { + foreach ($str as $key => $val) + { + $str[$key] =& clean_out($val, $slashes); + } + } + else + { + if ($slashes) + $str =& trim(htmlentities(stripslashes($str))); + else + $str =& trim(htmlentities($str)); + } + + return $str; +} + +/** + * Cleans a string or an array of strings for DB input. + * @param mixed $str dirty + * @param bool $single_quote add single quotes around the string, optional + * @param bool $decode run html_entity_decode(), optional + * @return mixed $ret slashes added, if necessary + */ +function clean_in($str, $single_quotes=FALSE, $decode=FALSE) +{ + if (is_array($str)) + { + foreach ($str as $key => $val) + { + $str[$key] =& clean_in($val, $single_quotes); + } + } + else + { + if (get_magic_quotes_gpc() === 1) + { + $str =& trim($str); + } + else + { + $str =& addslashes(trim($str)); + } + if ($single_quotes) { + $str = "'" . $str . "'"; + } + if ($decode) { + html_entity_decode($str); + } + } + return $str; +} + +/** + * Get calendar days in array format. + * @param int $month numeric representation of month (optional) default is empty, accepted range value is 1-12 inclusive, this affects the total number of days in given month + * @param int $year the year (optional) default is empty, this affects the total number of days in given month + * @return array $days days from 1->[28-31] (zero-filled) + */ +function array_days($month='',$year='') +{ + $days = Array(); + $num = 1; + + // get total number of days of a particular month if given a month and year + if (!empty($month) && !empty($year) && is_numeric($month) + && is_numeric($year) && $month > 0 && $month < 13) + { + $days_inmonth = (int) date("t", strtotime($year."-".$month."-01")); + } + else + $days_inmonth = 31; + + while ($num <= $days_inmonth) + { + // zero-fill + if ($num < 10) $num = "0$num"; + else $num = "$num"; + $days[$num] = $num; + $num++; + } + return $days; +} + +/** + * Get calendar months in array format. + * @return array $months months from 01-12 (zero-filled) + */ +function array_months() +{ + $months=array( + '01' => 'Jan', + '02' => 'Feb', + '03' => 'Mar', + '04' => 'Apr', + '05' => 'May', + '06' => 'Jun', + '07' => 'Jul', + '08' => 'Aug', + '09' => 'Sep', + '10' => 'Oct', + '11' => 'Nov', + '12' => 'Dec', + ); + return $months; +} + +/** + * Get calendar years in array format. + * @param int $num number of years to display (optional) default is 5, negative numbers change direction of array + * @param int $year starting year (optional) default is this year + * @return array $years years + */ +function array_years($num=5,$year='') +{ + $years=Array(); + $year=($year==null)?date('Y'):$year; + if ($num>0) + { + while ($num > 0) + { + $years[$year] = $year; + $year--; + $num--; + } + } + elseif ($num<0) + { + while ($num < 0) + { + $years[$year] = $year; + $year++; + $num++; + } + } + return $years; +} + +/** + * Get calendar hours in array format. + * @return array $hours hours (zero-filled) + */ +function array_hours() +{ + $hours=array( + '07' => '7 am', + '08' => '8 am', + '09' => '9 am', + '10' => '10 am', + '11' => '11 am', + '12' => '12 pm', + '13' => '1 pm', + '14' => '2 pm', + '15' => '3 pm', + '16' => '4 pm', + '17' => '5 pm', + '18' => '6 pm', + '19' => '7 pm', + '20' => '8 pm', + '21' => '9 pm', + '22' => '10 pm', + ); + return $hours; +} + +/** + * Get array of minutes. + * @param int $interval interval between minutes (optional) default is 15 + * @return array $minutes minutes (zero-filled) + */ +function array_minutes($interval=15) +{ + $minutes=array(); + $count=$interval; + for ($i=0;$i<60;$i+=$interval) + { + $tmp=($i<10)?'0'.$i:$i; + $minutes[$tmp]=$tmp; + } + return $minutes; +} + +/** + * Get array of states. + * @return array $states states (abbr=>fullname) + */ +function array_states() +{ + $states=array ( + 'AL' => 'Alabama', + 'AK' => 'Alaska', + 'AS' => 'American Samoa', + 'AZ' => 'Arizona', + 'AR' => 'Arkansas', + 'CA' => 'California', + 'CO' => 'Colorado', + 'CT' => 'Connecticut', + 'DE' => 'Delaware', + 'DC' => 'District of Columbia', + 'FM' => 'Federated States of Micronesia', + 'FL' => 'Florida', + 'GA' => 'Georgia', + 'GU' => 'Guam', + 'HI' => 'Hawaii', + 'ID' => 'Idaho', + 'IL' => 'Illinois', + 'IN' => 'Indiana', + 'IA' => 'Iowa', + 'KS' => 'Kansas', + 'KY' => 'Kentucky', + 'LA' => 'Louisiana', + 'ME' => 'Maine', + 'MH' => 'Marshall Islands', + 'MD' => 'Maryland', + 'MA' => 'Massachusetts', + 'MI' => 'Michigan', + 'MN' => 'Minnesota', + 'MS' => 'Mississippi', + 'MO' => 'Missouri', + 'MT' => 'Montana', + 'NE' => 'Nebraska', + 'NV' => 'Nevada', + 'NH' => 'New Hampshire', + 'NJ' => 'New Jersey', + 'NM' => 'New Mexico', + 'NY' => 'New York', + 'NC' => 'North Carolina', + 'ND' => 'North Dakota', + 'MP' => 'Northern Mariana Islands', + 'OH' => 'Ohio', + 'OK' => 'Oklahoma', + 'OR' => 'Oregon', + 'PW' => 'Palau', + 'PA' => 'Pennsylvania', + 'PR' => 'Puerto Rico', + 'RI' => 'Rhode Island', + 'SC' => 'South Carolina', + 'SD' => 'South Dakota', + 'TN' => 'Tennessee', + 'TX' => 'Texas', + 'UT' => 'Utah', + 'VT' => 'Vermont', + 'VI' => 'Virgin Islands', + 'VA' => 'Virginia', + 'WA' => 'Washington', + 'WV' => 'West Virginia', + 'WI' => 'Wisconsin', + 'WY' => 'Wyoming' + ); + return $states; +} + +/** + * Writes the beginning form tag. + * @param string $name form name + * @param string $class class name + * @param string $method method (post or get) + * @param string $action action + */ +function form_start($name='form', $class=null, $method='post', $action=null, $extra=null) +{ + $query_string = (empty($_SERVER['QUERY_STRING'])) ? '' : '?'.htmlentities($_SERVER['QUERY_STRING']); + $action = (empty($action)) ? $_SERVER['PHP_SELF'].$query_string : $action; + echo "\n"; + echo "<form name=\"$name\" id=\"$name\""; + echo ($class) ? " class=\"$class\"" : ''; + echo " method=\"$method\" action=\"$action\" $extra>"; +} + +/** + * Writes the ending form tag. + */ +function form_end() +{ + echo "\n".'</form>'; +} + +/** + * Writes a form input label. + * @param string $text label text + * @param string $for id of corresponding field + * @param string $class class css class of label + * @param string $extra any extra parameters (optional) + */ +function form_label($text=null, $for=null, $class=null, $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo "\n"; + echo '<label'; + echo ($for) ? " for=\"$for\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo "$extra>$text</label>"; +} + +/** + * Writes a text input. + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $css css class + * @param string $value value + * @param int $size size of field + * @param int $maxlength maxlength of field + * @param string $extra any extra parameters (optional) + */ +function form_text($name, $id=null, $class=null, $value=null, $size='30', $maxlength='100', $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo '<input type="text" name="'.$name.'"'; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo ($value) ? " value=\"$value\"" : ''; + echo " size=\"$size\" maxlength=\"$maxlength\"$extra />"; +} + +/** + * Writes a password input. + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $css css class + * @param int $size size of field (optional) default is 30 + * @param int $maxlength maxlength of field (optional) + * @param string $extra any extra parameters (optional) + */ +function form_password($name, $id=null, $class=null, $size='30', $maxlength='100', $extra=null) +{ + if ($extra) {$extra = ' '.$extra; } + echo "\n"; + echo "<input type=\"password\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo " size=\"$size\" maxlength=\"$maxlength\"$extra />"; +} + +/** + * Writes a checkbox input. + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $class css class + * @param string $value value + * @param bool $checked checked? + * @param string $extra any extra parameters (optional) + */ +function form_checkbox($name, $id=null, $class=null, $value=null, $checked=0, $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + if ($checked == 1) + { + echo "\n"; + echo "<input type=\"checkbox\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo ($value) ? " value=\"$value\"" : ''; + echo " checked=\"checked\"$extra />"; + } + else + { + echo "\n"; + echo "<input type=\"checkbox\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo ($value) ? " value=\"$value\"" : ''; + echo "$extra />"; + } +} + +/** + * Writes a radio input. + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $class css class + * @param string $value value + * @param bool $checked checked? + * @param string $extra any extra parameters (optional) + */ +function form_radio($name, $id=null, $class=null, $value=null, $checked=0, $extra=null) +{ + if ($extra) { $extra = ' '.$extra; } + if ($checked == 1) + { + echo "\n"; + echo "<input type=\"radio\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo ($value) ? " value=\"$value\"" : ''; + echo " checked=\"checked\"$extra />"; + } + else + { + echo "\n"; + echo "<input type=\"radio\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo ($value) ? " value=\"$value\"" : ''; + echo "$extra />"; + } +} + +/** + * Writes a submit input. + * @param string $id the id attribute + * @param string $name name name of field + * @param string $class css class + * @param string $value value (button text) + * @param string $extra any extra parameters (optional) + */ +function form_submit($name, $id=null, $class=null, $value='Submit', $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo "\n"; + echo "<input type=\"submit\" name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo " value=\"$value\"$extra />"; +} + +/** + * Writes a reset input. + * @param string $name name of field + * @param string $class css class + * @param string $value value (button text) + * @param string $extra any extra parameters (optional) + */ +function form_reset($name, $class=null, $value='Reset', $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo "\n"; + echo "<input type=\"reset\" name=\"$name\" id=\"$name\""; + echo ($class) ? " class=\"$class\"" : ''; + echo " value=\"$value\"$extra />"; +} + +/** + * Writes a hidden field. + * @param string $name name of field + * @param string $value value + * @param string $extra any extra parameters (optional) + */ +function form_hidden($name, $value=null, $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo "\n"; + echo "<input type=\"hidden\" name=\"$name\""; + echo ($value) ? " value=\"$value\"" : ''; + echo "$extra />"; +} + +/** + * Writes a select list with options. + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $class css class + * @param array $options possible options, usually pulled from db, or array_* funcs + * @param string $selected if the value matches, it is selected + * + * Multiple selects based on sets come out of a database as val,val,val + * so the explode was intended to create the instance of an array based + * on the string regardless of whether or not it has val,val,val. + * + * @param string $extra any extra parameters (optional) + */ +function form_select($name, $id=null, $class=null, $options=null, $selected=null, $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + if (!empty($selected)) + { + $selected = explode(',',$selected); + foreach ($selected as $key=>$val) {$selected[$key]=trim($val);} + } + echo "\n"; + echo "<select name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo "$extra>"; + if (is_array($options)) + { + foreach ($options as $key=>$val) + { + if (!empty($selected) && in_array($key, $selected)) + echo "\n\t".'<option value="'.$key.'" selected="selected">'.$val.'</option>'; + else + echo "\n\t".'<option value="'.$key.'">'.$val.'</option>'; + } + } + echo "\n".'</select>'; +} + +/** + * Writes a textarea + * @param string $name name of field + * @param string $id id of field, must be unique per page + * @param string $class css class + * @param int $rows number of rows (height) + * @param int $cols number of cols (width) + * @param string $value value of field + * @param string $extra any extra parameters + */ +function form_textarea($name, $id=null, $class=null, $rows='6', $cols='50', $value=null, $extra=null) +{ + if ($extra) {$extra = ' '.$extra;} + echo "\n"; + echo "<textarea name=\"$name\""; + echo ($id) ? " id=\"$id\"" : ''; + echo ($class) ? " class=\"$class\"" : ''; + echo " rows=\"$rows\" cols=\"$cols\""; + echo "$extra>$value</textarea>"; +} + +/** + * Fix dates for form display, or proper db entry + * @param array $dates array of date field names + * @param array $datetimes array of datetime field names + * @param int $way 1 is done after a post, 2 is done when selecting for forms + * @param array $orig for way 2, the array we need to add the separated date values to (usually $posts) + * @return mixed null, or the original array modified to have separated date values for the forms + */ +function form_array_fix_dates($dates,$datetimes,$way=1,$orig='') +{ + if($way==1) + { + if (is_array($dates)) + { + foreach ($dates as $date) + { + $_POST[$date]=form_array_get_date($date); + } + } + if (is_array($datetimes)) + { + foreach ($datetimes as $datetime) + { + $_POST[$datetime]=form_array_get_datetime($datetime); + } + } + } + elseif ($way==2) + { + if (is_array($dates)) + { + foreach ($dates as $date) + { + list(${date.'_year'},${date.'_month'},${date.'_day'})=explode('-',$orig[$date]); + $orig[$date.'_year']=${date.'_year'}; + $orig[$date.'_month']=${date.'_month'}; + $orig[$date.'_day']=${date.'_day'}; + } + } + if (is_array($datetimes)) + { + foreach ($datetimes as $datetime) + { + $buf=explode(' ',$orig[$datetime]); + $date=explode('-',$buf[0]); + $time=explode(':',$buf[1]); + $orig[$datetime.'_year']=$date[0]; + $orig[$datetime.'_month']=$date[1]; + $orig[$datetime.'_day']=$date[2]; + $orig[$datetime.'_hour']=$time[0]; + $orig[$datetime.'_minute']=$time[1]; + } + } + return $orig; + } +} + +/** + * Get put a date back together after a POST. + * @param string $field name of post index of date field + * @param int $key index of form array that the field value belongs to + * @return array $date repaired date, as an array that corresponds to the form + */ +function form_array_get_date($field) +{ + $keys=array_keys($_POST[$field.'_year']); + foreach ($keys as $key) + { + $date[$key]=$_POST[$field.'_year'][$key].'-'.$_POST[$field.'_month'][$key].'-'.$_POST[$field.'_day'][$key]; + } + return $date; +} + +/** + * Get put a datetime back together after a POST. + * @param string $field name of post index of datetime field + * @param int $key index of form array that the field value belongs to + * @return array $datetime repaired datetime, as an array that corresponds to the form + */ +function form_array_get_datetime($field) +{ + $keys=array_keys($_POST[$field.'_year']); + foreach ($keys as $key) + { + $datetime[$key]=$_POST[$field.'_year'][$key].'-'.$_POST[$field.'_month'][$key].'-'.$_POST[$field.'_day'][$key].' '.$_POST[$field.'_hour'][$key].':'.$_POST[$field.'_minute'][$key]; + } + return $datetime; +} + +/** + * Validates email addresses + * @param string $email + * @returns bool + */ +function is_email_address($email) +{ + return preg_match("/^ *[0-9a-zA-Z]+[-_\.0-9a-zA-Z]*@([0-9a-zA-Z]+[-\.0-9a-zA-Z]+)+\.[a-zA-Z]+ *$/", $email); +} + +/** + * Validates phone number + * @param string $phone + * @returns bool + */ +function is_phone_number($phone) +{ + return preg_match("/^ *((1[- \.]?((\([0-9]{3}\))|([0-9]{3}))[- \.]?)|((((\([0-9]{3}\))|([0-9]{3}))[- \.]?)?))[0-9]{3}[- \.]?[0-9]{4} *$/", $phone); +} + +/** + * Returns http:// and the string if the string does not begin with http:// + * @param string $url + * @returns string + */ +function url_out($url) +{ + return (preg_match("#^http://#", $url)) ? trim($url) : 'http://'.trim($url); +} + +/** + * Take a db_get result and return an array of options. + * @param array $data db_get result + * @param string $val_col column containing the value for each option + * @param string $name_col column containing the text + * @return array $options array of options ($val=>$text) + */ +function db_get_to_options($data,$val_col,$name_col) +{ + $options=array(); + foreach ($data as $row) + { + $options[$row[$val_col]]=$row[$name_col]; + } + return $options; +} +?> diff --git a/php/lib/geo.php b/php/lib/geo.php new file mode 100644 index 0000000..bd80744 --- /dev/null +++ b/php/lib/geo.php @@ -0,0 +1,69 @@ +<?php +/** + * Functions for netgeo lookups. + * @package mirror + * @subpackage lib + */ + +/** + * Calculate the distance between two geo points. + * @param int $lat1 latitude of first point + * @param int $lon1 longitude of first point + * @param int $lat2 latitude of second point + * @param int $lon2 longitude of second point + * @return int $distance rounded distance in _km_ between these points + */ +function geo_get_distance($lat1,$lon1,$lat2,$lon2) +{ + return null; +} + +/** + * Query NetGeo based on API and parse results. + * @param string $ip an IP address + * @param string $method lookup method, based on NetGeo API. + * @return array|false array containing results or false on failure + */ +function geo_query($ip,$method='getRecord') +{ + $raw = strip_tags(file_get_contents(GEO_URL.'?target='.$ip.'&method='.$method)); + $lines = array_slice(explode("\n",$raw),5); + array_pop($lines); + foreach ($lines as $row) + { + $buf = preg_split('/:\s*/',$row); + $data[$buf[0]] = $buf[1]; + } + return $data; +} + +/** + * Get longitude and latitude of an IP. + * @param string $ip an IP address + * @return array|false array containing results or false on failure + */ +function geo_get_coordinates($ip) +{ + return ($data = geo_query($ip,'getLatLong'))?array('lat'=>$data['LAT'],'long'=>$data['LONG']):false; +} + +/** + * Get complete record based on IP. + * @param string $ip an IP address + * @return array|false array containing results or false on failure + */ +function geo_get_record($ip) +{ + return ($data = geo_query($ip,'getRecord'))?$data:false; +} + +/** + * Get country of an IP. + * @param string $ip an IP address + * @return string|false array containing results or false on failure + */ +function geo_get_country($ip) +{ + return ($data = geo_query($ip,'getCountry'))?$data['COUNTRY']:false; +} +?> diff --git a/php/lib/list.php b/php/lib/list.php new file mode 100644 index 0000000..5deb5e9 --- /dev/null +++ b/php/lib/list.php @@ -0,0 +1,391 @@ +<?php +/** + * List functions for lists of values. + * @package mirror + * @subpackage lib + * @author Mike Morgan <mike.morgan@oregonstate.edu> + * + * Usage example: + * <code> + * $orderby=get_order(); + * $query="SELECT * FROM fic_courses $orderby"; + * $courses=db_get($query,MYSQL_ASSOC); + * $headers=array( + * 'course_id'=>'', + * 'title'=>'Course Title', + * 'date_start_course'=>'Start', + * 'date_end_course'=>'End', + * 'date_start_reg'=>'Reg Starts', + * 'date_end_reg'=>'Reg Ends', + * 'active'=>'Active?', + * 'entry_date'=>'Created' + * ); + * show_list($courses,$headers); + * </code> + * + * Accompanying CSS for table output: + * <code> + * .list + * { + * border:1px solid #999; + * } + * .list th + * { + * background:#eee; + * border:1px solid #000; + * font-weight:bold; + * } + * .list th a + * { + * display:block; + * padding:0 14px; + * } + * .list th a:hover + * { + * background-color:#fff; + * } + * .row1 + * { + * background:#ddd; + * } + * .row2 + * { + * background:#ccc; + * } + * .row1:hover, .row2:hover + * { + * background-color:#fec; + * } + * .current-sort + * { + * background:#fda; + * } + * .sort-desc + * { + * background:#fec url(../img/up.gif) no-repeat right; + * } + * .sort-asc + * { + * background:#fec url(../img/down.gif) no-repeat right; + * } + * </code> + + * Accompanying JavaScript for select all / inverse: + * <code> + * <script type="text/javascript"> + * //<!-- + * function selectAll(formObj,invert) + * { + * for (var i=0;i < formObj.elements.length;i++) + * { + * fldObj = formObj.elements[i]; + * if (fldObj.type == 'checkbox') + * { + * if (invert==1) + * { + * fldObj.checked = (fldObj.checked) ? false : true; + * } + * else + * { + * fldObj.checked = true; + * } + * } + * } + * } + * //--> + * </script> + * </code> + */ + +/** + * Show a list of values, for forms. + * @param array $list associative array + * @param array $headers column name => column title (for table heads) + * @param string $type checkbox, radio, simple + * @param array $array actions to display in actions select list + * @param string $form_id id of form holding list + * @param bool $sortable whether or not to show sortable column headers (links in th's) + * @param array|string $selected if type is checkbox, array otherwise string with one val + */ +function show_list($list,$headers,$type='checkbox',$actions=null,$form_id=null,$sortable=true,$selected=null) +{ + if ( is_array($list) && count($list)>0 && is_array($headers) ) + { + if ( $type!='simple' && !empty($_GET['sort']) && !empty($_GET['order']) ) + { + form_hidden('sort',$_GET['sort']); + form_hidden('order',$_GET['order']); + } + echo "\n".'<table class="list">'; + show_headers($headers,$type,$sortable); + echo "\n".'<tbody>'; + foreach ($list as $row) + { + show_row($headers,$row,$type,$count++,$selected); + } + echo "\n".'</tbody>'; + echo "\n".'</table>'; + if ($type=='checkbox') + { +echo <<<js +<script type="text/javascript"> +//<!-- +function list_select(formObj,invert) +{ + for (var i=0;i < formObj.elements.length;i++) + { + fldObj = formObj.elements[i]; + if (fldObj.type == 'checkbox') + { + if (invert==1) + { + fldObj.checked = (fldObj.checked) ? false : true; + } + else + { + fldObj.checked = true; + } + } + } +} +//--> +</script> +js; + echo "\n".'<p><input type="button" name="selectall" onclick="list_select(this.form,0);" class="button2" value="Select All"/> <input type="button" name="selectall" onclick="list_select(this.form,1);" class="button2" value="Invert"/></p>'; + } + if ($type=='radio'||$type='checkbox-small') + { + echo '<br />'; + } + if (is_array($actions)&&$type!='simple') + { + if (count($actions) == 1) { + $actions = array_values($actions); + echo '<p>'; + form_submit('submit','submit','button1',$actions[0].' »'); + echo '</p>'; + } else { + echo '<p>'; + echo '<label for="action">With selected: </label>'; + form_select('action','action','text2',$actions,''); + form_submit('submit','submit','button1','Go »'); + echo '</p>'; + } + } + } + elseif ( !is_array($headers) ) + { + echo "\n".'<h1>FIX HEADERS ARRAY</h1>'; + } + else + { + echo "\n".'<p>No records found.</p>'; + } +} + +/** + * Show table headers. + * @param array $headers column name => column title (for table heads) + * @param string $type type of list that is being shown + * @param bool $sortable whether or not to show sortable column headers (links in th's) + */ +function show_headers($headers,$type,$sortable=true) +{ + echo "\n".'<thead><tr>'; + $sort=$_GET['sort']; + $order=get_order(); + $count=0; + foreach ($headers as $col=>$title) + { + if ( !empty($sort) && !empty($order) ) + { + if ($col==$sort && $order=='ASC') + { + $a_class=' class="sort-asc current-sort" '; + } + elseif ($col==$sort && $order=='DESC') + { + $a_class=' class="sort-desc current-sort" '; + } + else + { + $a_class=null; + } + } + if ($type!='simple'&&$count==0) + { + echo "\n".'<th> </th>'; + next; + } + elseif($sortable) + { + $qs = array(); + foreach ($_GET as $qn=>$qv) { $qs[$qn] = $qv; } // existing query string variables + $qs['sort'] = $col; // add/replace sort to query string + $qs['order'] = $order; // add/replace order by to query string + foreach ($qs as $qn=>$qv) { $querystring[] = $qn.'='.$qv; } // existing query string variables + echo "\n".'<th><a '.$a_class.'href="'.$_SERVER['PHP_SELF'].'?'.implode('&',$querystring).'">'.$title.'</a></th>'; + unset($qs); + unset($querystring); + } + else + { + echo "\n".'<th>'.$title.'</th>'; + } + $count++; + } + echo "\n".'</tr></thead>'; +} + +/** + * Show table data. + * @param array $headers column name => column title (for knowing which ones to display) + * @param array $row table row, assoc + * @param string $type type of table, determines first column, which could be an input + * @param array|string $selected selected items; if type is checkbox, array otherwise string with one val + */ +function show_row($headers,$row,$type,$num=null,$selected=null) +{ + $indexes=array_keys($headers); + $idname = $indexes[0]; + $count=0; + $tr_class=($num%2)?' class="row1" ':' class="row2" '; + echo "\n".'<tr'.$tr_class.'>'; + foreach ($indexes as $index) + { + $row[$index]=clean_out($row[$index]); + if ($type!='simple'&&$count==0) + { + $id=preg_replace('/[^[:alnum:]]/', '', $index).$row[$index]; + if ($type=='checkbox'||$type=='checkbox-small') + { + echo "\n".'<td>'; + form_checkbox($idname.'[]',$id,null,$row[$index],(is_array($selected) && in_array($row[$index], $selected))); + echo "\n".'</td>'; + } + elseif ($type=='radio') + { + echo "\n".'<td>'; + form_radio($idname,$id,null,$row[$index], ($row[$index] == $selected)); + echo "\n".'</td>'; + } + } + else + { + echo ($type=='simple')?"\n".'<td>'.$row[$index].'</td>':"\n".'<td><label for="'.$id.'">'.$row[$index].'</label></td>'; + } + $count++; + } + echo "\n".'</tr>'; +} + +/** + * Determine current sort order. + */ +function get_order() +{ + return ($_GET['order']=='ASC')?'DESC':'ASC'; +} + +/** + * Determine whether or not list is currently sorted. + * @param string $method which http method to check for sort information + * @return mixed cleaned orderby clause based on saved sort information or null if no orderby is set in the defined method + */ +function get_orderby($method='get') +{ + if ( $method=='get' && !empty($_GET['sort']) && !empty($_GET['order']) ) + { + $sort=clean_in($_GET['sort']); + $order=clean_in($_GET['order']); + return " ORDER BY $sort $order "; + } + elseif ( $method=='post' && !empty($_POST['sort']) && !empty($_POST['order']) ) + { + $sort=clean_in($_POST['sort']); + $order=clean_in($_POST['order']); + return " ORDER BY $sort $order "; + } + elseif ( $method=='session' && !empty($_SESSION['sort']) && !empty($_SESSION['order']) ) + { + $sort=clean_in($_SESSION['sort']); + $order=clean_in($_SESSION['order']); + return " ORDER BY $sort $order "; + } + else return null; +} + +/** + * Parses $_POST for ids, shows edit forms for each id with populated data. + * <ul> + * <li>name will be used to retrieve an _array_ from $_POST of the same name</li> + * <li>the form will be an include, with $posts[col_name] as the default for all values</li> + * <li>try to keep your query simple (no crazy sorting, etc.) -- we're talking one record at a time here anyway</li> + * </ul> + * Example: + * <code> + * list_edit_ids('course_id','../forms/course.php','SELECT * FROM fic_courses','1'); + * </code> + * @param string $name name of id field + * @param string $form path to form to be used to items + * @param string $q_front front half of query + * @param string $q_where where statement + * @param array $dates array of date field names, so they can be fixed for forms + * @param array $datetimes array of datetime field names, so they can be fixed for forms + */ +function list_edit_ids($name,$form,$q_front,$q_where='1',$dates=null,$datetimes=null) +{ + if ( !empty($_SESSION[$name]) && is_array($_SESSION[$name]) ) + { + $ids=implode(',',$_SESSION[$name]); + $orderby=get_orderby('session'); + $query=$q_front.' WHERE '.$q_where." AND $name IN($ids) ".$orderby; + $records=db_get($query); + form_start($name); + foreach ($records as $record) + { + echo "\n".'<div class="record">'; + $record=form_array_fix_dates($dates,$datetimes,2,$record); + foreach ($record as $key=>$val) + { + $posts[$key]=clean_out($val); + } + include($form); + echo "\n".'<div class="record-submit">'; + form_submit('submit', '', 'button1'); + echo "\n".'</div>'; + echo "\n".'</div>'; + } + form_end(); + } + else + { + echo '<p>You must select a record. <a href="javascript:history.back();">Go back</a>.</p>'; + } +} + +/** + * Process a submitted list_edit_ids form. + * @param array $name array of primary ids posted from the form, these are vital to the WHERE clause of the UPDATE statements. + * @param string $table name of table being affected + */ +function list_update_ids($name,$table) +{ + $keys=array_keys($_POST[$name]); + foreach ($keys as $index) + { + foreach ($_POST as $key=>$val) + { + if ($key!='submit') + { + $posts[$index][$key]=$val[$index]; + } + } + } + foreach ($posts as $dataset) + { + $query=db_makeupdate($dataset,$table," WHERE $name='".$dataset[$name]."' "); + db_query($query); + } +} +?> diff --git a/php/lib/mirror.php b/php/lib/mirror.php new file mode 100644 index 0000000..a618a86 --- /dev/null +++ b/php/lib/mirror.php @@ -0,0 +1,531 @@ +<?php +/** + * Application functions. Dependent on lib/db.php! + * @package mirror + * @subpackage lib + * @todo add transactions once innodb table types are in place + */ + +/** + * Get an alpha-list of regions for select list. + * @return array $regions + */ +function mirror_get_regions_select() +{ + $regions = db_get("SELECT region_id,region_name FROM mirror_regions ORDER BY region_name ASC",MYSQL_ASSOC); + foreach ($regions as $region) { + $retval[$region['region_id']]=$region['region_name']; + } + return $retval; +} + +/** + * Get an priority-list of regions for select list. + * @return array $regions + */ +function mirror_get_regions_select_priority() +{ + $regions = db_get("SELECT region_id,region_name FROM mirror_regions ORDER BY region_priority ASC",MYSQL_ASSOC); + foreach ($regions as $region) { + $retval[$region['region_id']]=$region['region_name']; + } + return $retval; +} + +/** + * Insert region. + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_insert_region($name,$priority) +{ + return db_query("INSERT INTO mirror_regions(region_name,region_priority) VALUES('{$name}',{$priority})"); +} + +/** + * Update region. + * @param int $id + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_update_region($id,$name,$priority) +{ + return db_query("UPDATE mirror_regions SET region_name='{$name}',region_priority={$priority} WHERE region_id={$id}"); +} + +/** + * Get one region. + * @param int $id + * @return array + */ +function mirror_get_one_region($id) +{ + return db_get_one("SELECT * FROM mirror_regions WHERE region_id = {$id}"); +} + +/** + * Delete a region. + * @param int $id + * @return bool + */ +function mirror_delete_region($id) +{ + return db_query("DELETE FROM mirror_regions WHERE region_id={$id}"); +} + +/** + * Get an alpha-list of mirrors for select list. + * @return array $mirrors + */ +function mirror_get_mirrors_select() +{ + $mirrors = db_get("SELECT mirror_id,mirror_name FROM mirror_mirrors ORDER BY mirror_name ASC",MYSQL_ASSOC); + foreach ($mirrors as $mirror) { + $retval[$mirror['mirror_id']]=$mirror['mirror_name']; + } + return $retval; +} + +/** + * Get regions. + * @return array + */ +function mirror_get_regions() +{ + return db_get(" + SELECT + mirror_regions.*, + COUNT(mirror_id) as mirrors + FROM + mirror_regions + LEFT JOIN + mirror_mirror_region_map + ON + mirror_regions.region_id = mirror_mirror_region_map.region_id + GROUP BY + mirror_regions.region_id + ",MYSQL_ASSOC); +} + +/** + * Insert mirror. + * @param string $name + * @param int $region_id + * @param string $baseurl + * @param int $rating + * @return bool + */ +function mirror_insert_mirror($name,$region_id,$baseurl,$rating) +{ + return (db_query("INSERT INTO mirror_mirrors(mirror_name,mirror_baseurl,mirror_rating) VALUES('{$name}','{$baseurl}','{$rating}')") && db_query("INSERT INTO mirror_mirror_region_map(mirror_id,region_id) VALUES('".db_insert_id()."','$region_id')"))?true:false; +} + +/** + * Update mirror. + * @param string $name + * @param int $region_id + * @param string $baseurl + * @param int $rating + * @return bool + */ +function mirror_update_mirror($id,$name,$region_id,$baseurl,$rating) +{ + return (db_query("UPDATE mirror_mirrors SET mirror_name='{$name}',mirror_baseurl='{$baseurl}',mirror_rating='{$rating}' WHERE mirror_id={$id}") && db_query("UPDATE mirror_mirror_region_map SET region_id={$region_id} WHERE mirror_id={$id}"))?true:false; +} + +/** + * Delete mirror. + * @return bool + */ +function mirror_delete_mirror($mirror_id) +{ + return (db_query("DELETE FROM mirror_mirrors WHERE mirror_id={$mirror_id}")&&db_query("DELETE FROM mirror_mirror_region_map WHERE mirror_id={$mirror_id}"))?true:false; +} + +/** + * Get one mirror record. + * @param int $mirror_id + * @return array mirror information + */ +function mirror_get_one_mirror($mirror_id) +{ + return db_get_one("SELECT mirror_mirrors.*,region_id FROM mirror_mirrors,mirror_mirror_region_map WHERE mirror_mirrors.mirror_id={$mirror_id} AND mirror_mirrors.mirror_id=mirror_mirror_region_map.mirror_id"); +} + +/** + * Get list of mirrors. + * @return array + */ +function mirror_get_mirrors() +{ + return db_get(" + SELECT + mirror_mirrors.*, + IF(mirror_mirrors.mirror_active='0','DISABLED','ok') as mirror_active, + region_name + FROM + mirror_mirrors, + mirror_regions, + mirror_mirror_region_map + WHERE + mirror_regions.region_id = mirror_mirror_region_map.region_id AND + mirror_mirrors.mirror_id = mirror_mirror_region_map.mirror_id + ",MYSQL_ASSOC); +} + +/** + * Insert product. + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_insert_product($name,$priority) +{ + return db_query("INSERT INTO mirror_products(product_name,product_priority) VALUES('{$name}',{$priority})"); +} + +/** + * Update product. + * @param int $id + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_update_product($id,$name,$priority) +{ + return db_query("UPDATE mirror_products SET product_name='{$name}',product_priority={$priority} WHERE product_id={$id}"); +} + +/** + * Get one product. + * @param int $id + * @return array + */ +function mirror_get_one_product($id) +{ + return db_get_one("SELECT * FROM mirror_products WHERE product_id = {$id}"); +} + +/** + * Delete a product. + * @param int $id + * @return bool + */ +function mirror_delete_product($id) +{ + return db_query("DELETE FROM mirror_products WHERE product_id={$id}"); +} + +/** + * Get products. + * @return array + */ +function mirror_get_products() +{ + return db_get(" + SELECT + * + FROM + mirror_products + ",MYSQL_ASSOC); +} + +/** + * Insert os. + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_insert_os($name,$priority) +{ + return db_query("INSERT INTO mirror_os(os_name,os_priority) VALUES('{$name}',{$priority})"); +} + +/** + * Update os. + * @param int $id + * @param string $name + * @param int $priority + * @return bool + */ +function mirror_update_os($id,$name,$priority) +{ + return db_query("UPDATE mirror_os SET os_name='{$name}',os_priority={$priority} WHERE os_id={$id}"); +} + +/** + * Get one os. + * @param int $id + * @return array + */ +function mirror_get_one_os($id) +{ + return db_get_one("SELECT * FROM mirror_os WHERE os_id = {$id}"); +} + +/** + * Delete a os. + * @param int $id + * @return bool + */ +function mirror_delete_os($id) +{ + return db_query("DELETE FROM mirror_os WHERE os_id={$id}"); +} + +/** + * Get operating systems. + * @return array + */ +function mirror_get_oss() +{ + return db_get(" + SELECT + * + FROM + mirror_os + ",MYSQL_ASSOC); +} + +/** + * Get an alpha-list of operating systems for select list. + * @return array $oss + */ +function mirror_get_oss_select() +{ + $oss = db_get("SELECT os_id,os_name FROM mirror_os ORDER BY os_name ASC",MYSQL_ASSOC); + foreach ($oss as $os) { + $retval[$os['os_id']]=$os['os_name']; + } + return $retval; +} + +/** + * Get an priority-list of operating systems for select list. + * @return array $oss + */ +function mirror_get_oss_select_priority() +{ + $oss = db_get("SELECT os_id,os_name FROM mirror_os ORDER BY os_priority ASC",MYSQL_ASSOC); + foreach ($oss as $os) { + $retval[$os['os_id']]=$os['os_name']; + } + return $retval; +} + +/** + * Get an alpha-list of products for select list. + * @return array $products + */ +function mirror_get_products_select() +{ + $products = db_get("SELECT product_id,product_name FROM mirror_products ORDER BY product_name ASC",MYSQL_ASSOC); + foreach ($products as $product) { + $retval[$product['product_id']]=$product['product_name']; + } + return $retval; +} + +/** + * Get an priority-list of operating systems for select list. + * @return array $oss + */ +function mirror_get_products_select_priority() +{ + $products = db_get("SELECT product_id,product_name FROM mirror_products ORDER BY product_priority ASC",MYSQL_ASSOC); + foreach ($products as $product) { + $retval[$product['product_id']]=$product['product_name']; + } + return $retval; +} + +/** + * Insert a new location. + * @param int $product + * @param int $os + * @param string $path + * @return bool + */ +function mirror_insert_location($product,$os,$path) +{ + return db_query("INSERT INTO mirror_locations(product_id,os_id,location_path) VALUES({$product},{$os},'{$path}')"); +} + +/** + * Update a location. + * @param int $location + * @param int $product + * @param int $os + * @param string $path + * @return bool + */ +function mirror_update_location($location,$product,$os,$path) +{ + return db_query("UPDATE mirror_locations SET product_id={$product},os_id={$os},location_path='{$path}' WHERE location_id={$location}"); +} + +/** + * Delete a location. + * @param int $id + * @return bool + */ +function mirror_delete_location($id) +{ + return db_query("DELETE FROM mirror_locations WHERE location_id={$id}"); +} + +/** + * Get locations. + * @return array $locations array containing all location information. + */ +function mirror_get_locations() +{ + return db_get(" + SELECT + location_id, + product_name, + os_name, + location_path + FROM + mirror_locations, + mirror_products, + mirror_os + WHERE + mirror_locations.product_id = mirror_products.product_id AND + mirror_locations.os_id = mirror_os.os_id + "); +} + +/** + * Get one location. + * @param int $id + * @return array + */ +function mirror_get_one_location($id) +{ + return db_get_one("SELECT * FROM mirror_locations WHERE location_id = {$id}"); +} + +/** + * Insert a new user. + * @param string $username + * @param string $password + * @param string $rpassword (re-entered password) + * @param string $firstname + * @param string $lastname + * @param string $email + * @return bool + */ +function mirror_insert_user($username,$password,$rpassword,$firstname,$lastname,$email) +{ + if ($password==$rpassword) { + return db_query("INSERT INTO mirror_users(username,password,user_firstname,user_lastname,user_email) VALUES('{$username}',MD5('{$password}'),'{$firstname}','{$lastname}','{$email}')"); + } else { + set_error('User could not be added because passwords did not match.'); + } +} + +/** + * Update a user. + * @param int $user + * @param string $username + * @param string $password + * @param string $rpassword (re-entered password) + * @param string $firstname + * @param string $lastname + * @param string $email + * @return bool + */ +function mirror_update_user($user,$username,$password,$rpassword,$firstname,$lastname,$email) +{ + $query = ($password==$rpassword&&!empty($password))?"UPDATE mirror_users SET username='{$username}',password=MD5('{$password}'),user_firstname='{$firstname}',user_lastname='{$lastname}',user_email='{$email}' WHERE user_id={$user}":"UPDATE mirror_users SET username='{$username}',user_firstname='{$firstname}',user_lastname='{$lastname}',user_email='{$email}' WHERE user_id={$user}"; + return db_query($query); +} + +/** + * Delete a user. + * @param int $id + * @return bool + */ +function mirror_delete_user($id) +{ + return db_query("DELETE FROM mirror_users WHERE user_id={$id}"); +} + +/** + * Get users. + * @return array $users array containing all user information. + */ +function mirror_get_users() +{ + return db_get("SELECT * FROM mirror_users"); +} + +/** + * Get one user. + * @param int $id + * @return array + */ +function mirror_get_one_user($id) +{ + return db_get_one("SELECT * FROM mirror_users WHERE user_id = {$id}"); +} + +/** + * Enable or disable a mirror. + * @param int $mirror + * @return bool + */ +function mirror_toggle($mirror) +{ + return (db_toggle_bool('mirror_mirrors','mirror_id','mirror_active',$mirror))?true:false; +} + +/** + * Get mirror statistics. + * @return array $stats + */ +function mirror_get_mirror_stats() +{ + return db_get(" + SELECT + *, + COUNT(mirror_log.mirror_id) as count + FROM + mirror_mirrors, + mirror_log, + mirror_regions, + mirror_mirror_region_map + WHERE + mirror_log.mirror_id = mirror_mirrors.mirror_id AND + mirror_mirrors.mirror_id = mirror_mirror_region_map.mirror_id AND + mirror_regions.region_id = mirror_mirror_region_map.region_id + GROUP BY + mirror_log.mirror_id + "); +} + +/** + * Get product statistics. + * @return array $stats + */ +function mirror_get_product_stats() +{ + return db_get(" + SELECT + *, + COUNT(mirror_locations.product_id) as count + FROM + mirror_log, + mirror_locations, + mirror_products + WHERE + mirror_log.location_id = mirror_locations.location_id AND + mirror_locations.product_id = mirror_products.product_id + GROUP BY + mirror_locations.product_id + "); +} +?> diff --git a/php/lib/util.php b/php/lib/util.php new file mode 100644 index 0000000..af64fbb --- /dev/null +++ b/php/lib/util.php @@ -0,0 +1,322 @@ +<?php +/** + * Utility funcs. + * @package mirror + * @subpackage lib + */ + +/** + * determine float value of now + * @return float value of current time in seconds + */ +function microtime_float() +{ + list($usec, $sec) = explode(" ", microtime()); + return ((float)$usec + (float)$sec); +} + +/** + * Add a message to SESSION['messages'] array. + * The $_SESSION['messages'] array stores general or success messages. + * @param string $str message to add (optional) + */ +function set_msg($str=null) +{ + if (!empty($str)) + { + $_SESSION['messages'][]=$str; + } +} + +/** + * Show messages. + * Iterates through $_SESSION['messages'] and displays them in a ul. + * @param string $class css class for message style + */ +function show_msg($class='msg') +{ + if (is_array($_SESSION['messages']) && count($_SESSION['messages']) > 0) + { + echo ($class !== NULL) ? '<div class="'.$class.'">' : ''; + echo '<ul>'; + foreach ($_SESSION['messages'] as $message) + echo '<li>'.$message.'</li>'; + echo '</ul>'; + echo ($class !== NULL) ? '</div>' : ''; + $ret = count($_SESSION['messages']); + } + else + { + $ret = 0; + } + unset($_SESSION['messages']); + return $ret; +} + +/** + * Add an error message to SESSION['errors'] array. + * The $_SESSION['errors'] array stores error messages. + * @param string $str message to add (optional) + */ +function set_error($str=null) +{ + if (!empty($str)) + { + $_SESSION['errors'][]=$str; + } +} + +/** + * Show errors messages. + * Iterates through $_SESSION['errors'] and displays them in a ul. + * @param string $class css class for message style + */ +function show_error($class='error') +{ + if (@is_array($_SESSION['errors']) && count($_SESSION['errors']) > 0) + { + echo '<div class="'.$class.'">'; + echo '<ul>'; + foreach ($_SESSION['errors'] as $error) + echo '<li>'.$error.'</li>'; + echo '</ul>'; + echo '</div>'; + $ret = count($_SESSION['errors']); + unset($_SESSION['errors']); + } + else + { + $ret = 0; + } + return $ret; +} + +/** + * Print out an varible enclosed by <pre> tags + * @param mixed $var the variable to print by print_r + */ +function debug_r(&$var) +{ + echo '<pre>'; + print_r($var); + echo '</pre>'; +} + +/** + * Generate a random string good for passwords + * @param in $len the length of the password string + * @return string password + */ +function password_gen($len=6) +{ + + $set = array( '0','1','2','3','4','5','6','7','8','9','a','e','i','o','u','y','b','c','d','f','g','h','j','k','l','m','n','p','q','r','s','t','v','w','x','y','z' ); + $pw = ''; + + while (strlen($pw) <= $len) + { + // random alphanum + $char = $set[array_rand($set)]; + $pw .= $char; + } + + return $pw; +} + +/** + * This recursive function empty values in an 'multi-dimensional' array. + * @param mixed $needle it accepts just one value or an array of values + * @return mixed false if an empty needle passed in, else a copy of the array with needle values replaced with empty strings + */ +function emptify_in_array($array, $needle) +{ + if ($needle == '') + return FALSE; + + foreach ($array as $key=>$val) + { + if (is_array($val)) + $array[$key] = emptify_in_array($val, $needle); + elseif (is_array($needle) && in_array($val, $needle)) + $array[$key] = ''; + elseif ($val === $needle) + $array[$key] = ''; + } + + return $array; +} + +/** + * This function checks for the existence of a particular row in a particular table matching a value. + * Use this with libdb, unless you want lots of problems. :) + * @param string $table name of table + * @param string $column name of column containing value to match + * @param string $val value to match against database (goes in WHERE clause) + * @param string $extra (optional) any AND or ORDER BY or LIMIT or anything you want to add. + * @ret bool if a match exists, return true -- otherwise return false + */ +function record_exists($table,$column,$val,$extra=NULL) +{ + $result = db_query("SELECT * FROM {$table} WHERE {$column}='{$val}' {$extra}"); + if ($result&&mysql_num_rows($result)>0) + { + return true; + } + return false; +} + +/** + * Show user tabs, based on an array. + * @param array $tabs array of tabs (name=>href) + * @param string $current name of tab to highlight + */ +function show_tabs($tabs,$current) +{ + if ( is_array($tabs) ) + { + echo "\n".'<div id="tabs"><ul>'; + foreach ( $tabs as $key=>$val ) + { + if ( strtolower($key) == $current) + echo "\n".'<li class="active-tab"><a href="'.$val.'">'.$key.'</a></li>'; + else + echo "\n".'<li><a href="'.$val.'">'.$key.'</a></li>'; + } + echo "\n".'</ul></div>'; + } +} + +/** + * Sort a two dimensional array based on a 'column' key + * @param array $array the array to be sorted + * @param mixed $key the column key to be used for sorting, an array of keys are also acceptable + * @param mixed $order the order of the sort, either 'asc' (ascending) or 'desc' (descending), can also be an array (with matching array keys to the $key param) + * @param bool $retain_keys option to retain the original keys; default to true + * @param bool $case_sensitive option for a case sensitive sort; default to false + * @return array the original array on argument errors, the sorted array on success + */ +function array_order_by(&$array, $key=null, $order=null, $retain_keys=TRUE, $case_sensitive=FALSE) +{ + if (is_array($key) && count($key)==1) + { + $temp = each($key); + $key = $temp['value']; + $order = $order[$temp['key']]; + unset($temp); + } + + if (is_array($key)) + { + if (!is_array($order)) + { + $order = array(); + } + if (count($key) > count($order)) + { + $order = array_pad($order, count($key), 'asc'); + } + + // sort it according to the first key + $temp_sort_key = reset($key); + $temp_order_val = $order[key($key)]; + $return_arr = array_order_by($array, $temp_sort_key, $temp_order_val, $retain_keys, $case_sensitive); + + // set up the arrays for the 'inner', next recursion + $key_copy = $key; + $order_copy = $order; + unset($key_copy[key($key)]); + unset($order_copy[key($key)]); + + // get the sorting column's value in the first row + $temp = current($return_arr); + $temp_prev_sort_val = $temp[$temp_sort_key]; + unset($temp); + + $temp_return_arr = array(); + $temp_partial_array = array(); + + foreach ($return_arr as $return_arr_key=>$return_arr_val) + { + if ($return_arr_val[$temp_sort_key] == $temp_prev_sort_val) + { + $temp_partial_array[$return_arr_key] = $return_arr_val; + } + else + { + if ($retain_keys) + { + $temp_return_arr = $temp_return_arr + array_order_by($temp_partial_array, $key_copy, $order_copy, $retain_keys, $case_sensitive); + } + else + { + $temp = array_order_by($temp_partial_array, $key_copy, $order_copy, $retain_keys, $case_sensitive); + foreach ($temp as $temp_val) + { + $temp_return_arr[] = $temp_val; + } + unset($temp); + } + $temp_prev_sort_val = $return_arr_val[$temp_sort_key]; + $temp_partial_array = array(); + $temp_partial_array[$return_arr_key] = $return_arr_val; + } + } + + // important! if the last n $temp_prev_sort_val has the same value, then they aren't sorted and added to the temp array + if (count($return_arr) > count($temp_return_arr)) + { + if ($retain_keys) + { + $temp_return_arr = $temp_return_arr + array_order_by($temp_partial_array, $key_copy, $order_copy, $retain_keys, $case_sensitive); + } + else + { + $temp = array_order_by($temp_partial_array, $key_copy, $order_copy, $retain_keys, $case_sensitive); + foreach ($temp as $temp_val) + { + $temp_return_arr[] = $temp_val; + } + unset($temp); + } + } + + return $temp_return_arr; + } + + if (empty($array) || is_null($key)) + return $array; + + if (!array_key_exists($key, reset($array))) + return $array; + + $order =& strtolower($order); + if ($order == '' || ($order != 'asc' && $order != 'desc')) + $order = 'asc'; + + // construct an array that will be used to order the keys + foreach($array as $row_key => $row) + { + $x[$row_key] = $row[$key]; + } + + if ($case_sensitive) + natsort($x); + else + natcasesort($x); + + if ($order == 'desc') + $x =& array_reverse($x, TRUE); + + // now use those keys to order the original array + foreach($x as $row_key => $uselessvalue) + { + if ($retain_keys) + $return_arr[$row_key] =& $array[$row_key]; + else + $return_arr[] =& $array[$row_key]; + } + + return $return_arr; +} + +?> diff --git a/php/mozilla.js b/php/mozilla.js new file mode 100644 index 0000000..90ae99d --- /dev/null +++ b/php/mozilla.js @@ -0,0 +1,22 @@ +function getDownloadURLForLanguage(aABCD, aPlatform) +{ + var url = "http://download.mozilla.org/?product=firefox&os="; + + switch (aPlatform) { + case PLATFORM_WINDOWS: + url += "win"; + break; + case PLATFORM_LINUX: + url += "linux"; + break; + case PLATFORM_MACOSX: + url += "osx"; + if (aABCD == "ja-JP") + aABCD = "ja-JPM"; + break; + default: + return "http://www.mozilla.org/products/firefox/all.html"; + } + + return url + "&lang=" + aABCD; +} diff --git a/php/rss/download-counts.php b/php/rss/download-counts.php new file mode 100644 index 0000000..4559647 --- /dev/null +++ b/php/rss/download-counts.php @@ -0,0 +1,55 @@ +<?php +/** + * RSS 2.0 feed for download counts. + * @package mirror + * @subpackage rss + */ + +require_once('../cfg/config.php'); // config file +require_once(LIB.'/db.php'); // core mysql wrappers + +db_connect(DBHOST,DBUSER,DBPASS); // open persistent connection to db +db_select(DBNAME); // select db + +// get download counts per product +$data = db_get("SELECT * FROM mirror_products ORDER BY product_name"); + +// time to go at the end of each item +$now = date('G',time()); + +// content headers, replace Content-type if already set +header('Content-type: text/xml', true); +echo '<?xml version="1.0"?>'."\n\n"; + +// doctype +echo '<rdf:RDF'."\n"; +echo ' xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"'."\n"; +echo ' xmlns="http://purl.org/rss/1.0/">'."\n\n"; + +// channel details +echo '<channel rdf:about="http://bouncer.gentoo.org/rss/download-counts.php">'."\n"; +echo ' <title>Gentoo Download Counts</title>'."\n"; +echo ' <link>http://www.gentoo.org/</link>'."\n"; +echo ' <description>Gentoo product download counts pulled from Bouncer database.</description> '."\n"; + +// item listing +echo ' <items>'."\n"; +echo ' <rdf:Seq>'."\n"; +foreach ($data as $product) { + echo ' <rdf:li rdf:resource="http://bouncer.gentoo.org/?product='.$product['product_name'].'&lastmod='.$now.'"/>'."\n"; +} +echo ' </rdf:Seq>'."\n"; +echo ' </items>'."\n"; +echo '</channel>'."\n\n"; + +// item details +foreach ($data as $product) { + echo '<item rdf:about="http://bouncer.gentoo.org/?product='.$product['product_name'].'&lastmod='.$now.'">'."\n"; + echo ' <title>'.$product['product_name'].'</title>'."\n"; + echo ' <description>'.$product['product_count'].'</description>'."\n"; + echo ' <link>http://bouncer.gentoo.org/?product='.$product['product_name'].'&lastmod='.$now.'</link>'."\n"; + echo '</item>'."\n"; +} + +echo "\n".'</rdf:RDF>'; +?> |