install -

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
<?php < /* * Invision Power File Manager * Installer * Copyright (c) 2003 Invision Power Services * ------------------------------------- * You may not remove the copyright or * redistribute the script in any form * * Authors: Stephen Ball <stephen@invisionfilemanager.com> * * Last Modified: 17th March 2003 * */ error_reporting(E_ERROR | E_WARNING | E_PARSE); set_magic_quotes_runtime(0); s // Check if the lock file exist, i.e. the user has completed installing the script but never deleted the installer if (file_exists("install.lock")) { die("You cannot run the installer whilst the lock file &quot;install.lock&quot; exists"); } // Check the PHP Version if (phpversion() < "4.0.4") { die("Sorry but Invision Power File Manager requires at least PHP 4.0.4 in order to run"); } // A function to return the correct variable function param($name, $method) { // Use ternary, check if the method exists in the super global area, ie _METHOD // If so return the value from that array, otherwise use the GLOBALS array // along with the HTTP_METHOD_VARS index to return the correct value return @isset($_{$method}) ? $_{$method}[$name] : $GLOBALS["HTTP_{$method}_VARS"][$name]; } // A function to build the templates drop down list function dropdown($items, $selected = 0) { $list = ""; foreach ($items as $key => $var) { if ($key == $selected) { // IE uses selected, Mozilla uses checked $list .= "<option value=\"$key\" checked=\"checked\" selected=\"selected\">" . $var . "</option>"; } else
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
{ $list .= "<option value=\"$key\">" . $var . "</option>"; } } return $list; } // Cleans CRLF data to match the platform function clean_crlf($data) { $server = param("SERVER_SOFTWARE", "SERVER"); // If windows isn't being used, or apache is being used, remove the \r if (eregi("win", PHP_OS) == FALSE || eregi("apache", $server) == TRUE) { $data = str_replace("\r\n", "\n", $data); } return $data; } // A function to display the HTML code function msg($msg, $title = "User Error") { $data = "<html>\r\n"; $data .= "<head>\r\n"; $data .= "<title>Invision Power File Manager - Installing</title>\r\n"; $data .= "<style sheet=\"text/css\">\r\n"; $data .= "<!--\r\n"; $data .= "body, td, th, p, span { font-family: Verdana, Geneva, Arial, Helvetica, Sans-Serif; font-size: 10px; color: #000000; }\r\n"; $data .= "a { text-decoration: none; color: #0000FF }\r\n"; $data .= "form { margin: 0 }\r\n"; $data .= "input, select, textarea, option { padding: 1; font-family: verdana, tahoma; color: #000000; font-size: 10px; }\r\n"; $data .= "-->\r\n"; $data .= "</style>\r\n"; $data .= "</head>\r\n"; $data .= "<body bgcolor=\"#FFFFFF\">\r\n"; $data .= "<div align=\"center\">\r\n"; $data .= "<table border=\"0\" width=\"75%\" cellspacing=\"1\" cellpadding=\"4\" bgcolor=\"#000000\">\r\n"; $data .= " <tr>\r\n"; $data .= " <th align=\"left\" bgcolor=\"#4682B4\"><font face=\"Verdana, Geneva, Arial, Helvetica, Sans-Serif\" size=\"2\" color=\"#FFFFFF\">&raquo; " . $title . "</font></th>\r\n";
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 04/18/2011 for the course CSE 099 taught by Professor Hawkins during the Spring '11 term at N. Arizona.

Page1 / 13

install -

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online