This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script> | |
| /** | |
| * Show the time and update it every second | |
| * | |
| * clock_id (string) DOM id value of element to update | |
| * offset (int) Optional value to modify local time by, usefull if synchronizing to another clock | |
| */ | |
| function clock(clock_id, offset) | |
| { | |
| if(offset == null || offset == ""){ offset = 0; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * formatted as: array("2-letter state code" => "State Name") | |
| * | |
| * example usage: | |
| * <select> | |
| * <?php $selected = "CT"; //default to this selected state | |
| * foreach( $stateList as $code => $state_name ){ ?> | |
| * <option value="<?=$code ?>" <?=($selected==$code) ? " SELECTED" : "" ?> ><?=$state_name ?></option> | |
| * <? } ?> | |
| * </select> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * use cURL to get the contents on a remote page uses redirect headers | |
| * necessary when local server does not allow location | |
| */ | |
| function curl($url,$recursive_attempt=0){ | |
| if (!function_exists('curl_init')) { return false; } | |
| $content = false; | |
| $can_follow = ( ini_get('safe_mode') || ini_get('open_basedir') ) ? false : true; //cURL can't follow redirects in safe mode or if open_basedir is on |
NewerOlder