' . $additional_content . '
'; print_r($ar); echo ''; } /***************************************************** ** Error HTML content *****************************************************/ function load_error_template() { $error_template = '
{txt_system_message}
{message}
'; return $error_template; } /***************************************************** ** Get environment variables *****************************************************/ function date_elements($date) { $elements = explode(' ', date("Y m d H i s", $date)); $environment = array( 'year' => $elements[0] ,'month' => $elements[1] ,'day' => $elements[2] ,'hour' => $elements[3] ,'minute' => $elements[4] ,'second' => $elements[5] ,'iso_date' => $elements[0] . '-' . $elements[1] . '-' . $elements[2] . ' (' . $elements[3] . ':' . $elements[4] . ':' . $elements[5] . ')' ); return $environment; } /***************************************************** ** Get real user ip - taken from php.net user ** contribution. *****************************************************/ function get_ip() { if (isset($_SERVER) and !empty($_SERVER)) { if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } else if (isset($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } else { $ip = $_SERVER['REMOTE_ADDR']; } } else { if (getenv('HTTP_X_FORWARDED_FOR')) { $ip = getenv('HTTP_X_FORWARDED_FOR'); } else if (getenv('HTTP_CLIENT_IP')) { $ip = getenv('HTTP_CLIENT_IP'); } else { $realip = getenv('REMOTE_ADDR'); } } return $ip; } ?>