Annotation of /mambo/trunk/administrator/components/com_installer/admin.installer.html.php
Parent Directory
|
Revision Log
Revision 1 - (view) (download)
| 1 : | root | 1 | <?php |
| 2 : | /** | ||
| 3 : | * @version $Id: admin.installer.html.php,v 1.1 2005/07/22 01:52:21 eddieajau Exp $ | ||
| 4 : | * @package Mambo | ||
| 5 : | * @subpackage Installer | ||
| 6 : | * @copyright (C) 2000 - 2005 Miro International Pty Ltd | ||
| 7 : | * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL | ||
| 8 : | * Mambo is Free Software | ||
| 9 : | */ | ||
| 10 : | |||
| 11 : | /** ensure this file is being included by a parent file */ | ||
| 12 : | defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); | ||
| 13 : | |||
| 14 : | function writableCell( $folder ) { | ||
| 15 : | echo '<tr>'; | ||
| 16 : | echo '<td class="item">' . $folder . '/</td>'; | ||
| 17 : | echo '<td align="left">'; | ||
| 18 : | echo is_writable( $GLOBALS['mosConfig_absolute_path'] . '/' . $folder ) ? '<b><font color="green">Writeable</font></b>' : '<b><font color="red">Unwriteable</font></b>' . '</td>'; | ||
| 19 : | echo '</tr>'; | ||
| 20 : | } | ||
| 21 : | |||
| 22 : | /** | ||
| 23 : | * @package Mambo | ||
| 24 : | */ | ||
| 25 : | class HTML_installer { | ||
| 26 : | |||
| 27 : | function showInstallForm( $title, $option, $element, $client = "", $p_startdir = "", $backLink="" ) { | ||
| 28 : | ?> | ||
| 29 : | <script language="javascript" type="text/javascript"> | ||
| 30 : | function submitbutton3(pressbutton) { | ||
| 31 : | var form = document.adminForm_dir; | ||
| 32 : | |||
| 33 : | // do field validation | ||
| 34 : | if (form.userfile.value == ""){ | ||
| 35 : | alert( "Please select a directory" ); | ||
| 36 : | } else { | ||
| 37 : | form.submit(); | ||
| 38 : | } | ||
| 39 : | } | ||
| 40 : | </script> | ||
| 41 : | <form enctype="multipart/form-data" action="index2.php" method="post" name="filename"> | ||
| 42 : | <table class="adminheading"> | ||
| 43 : | <tr> | ||
| 44 : | <th class="install"> | ||
| 45 : | <?php echo $title;?> | ||
| 46 : | </th> | ||
| 47 : | <td align="right" nowrap="true"> | ||
| 48 : | <?php echo $backLink;?> | ||
| 49 : | </td> | ||
| 50 : | </tr> | ||
| 51 : | </table> | ||
| 52 : | |||
| 53 : | <table class="adminform"> | ||
| 54 : | <tr> | ||
| 55 : | <th> | ||
| 56 : | Upload Package File | ||
| 57 : | </th> | ||
| 58 : | </tr> | ||
| 59 : | <tr> | ||
| 60 : | <td align="left"> | ||
| 61 : | Package File: | ||
| 62 : | <input class="text_area" name="userfile" type="file" size="70"/> | ||
| 63 : | <input class="button" type="submit" value="Upload File & Install" /> | ||
| 64 : | </td> | ||
| 65 : | </tr> | ||
| 66 : | </table> | ||
| 67 : | |||
| 68 : | <input type="hidden" name="task" value="uploadfile"/> | ||
| 69 : | <input type="hidden" name="option" value="<?php echo $option;?>"/> | ||
| 70 : | <input type="hidden" name="element" value="<?php echo $element;?>"/> | ||
| 71 : | <input type="hidden" name="client" value="<?php echo $client;?>"/> | ||
| 72 : | </form> | ||
| 73 : | <br /> | ||
| 74 : | |||
| 75 : | <form enctype="multipart/form-data" action="index2.php" method="post" name="adminForm_dir"> | ||
| 76 : | <table class="adminform"> | ||
| 77 : | <tr> | ||
| 78 : | <th> | ||
| 79 : | Install from directory | ||
| 80 : | </th> | ||
| 81 : | </tr> | ||
| 82 : | <tr> | ||
| 83 : | <td align="left"> | ||
| 84 : | Install directory: | ||
| 85 : | <input type="text" name="userfile" class="text_area" size="65" value="<?php echo $p_startdir; ?>"/> | ||
| 86 : | <input type="button" class="button" value="Install" onclick="submitbutton3()" /> | ||
| 87 : | </td> | ||
| 88 : | </tr> | ||
| 89 : | </table> | ||
| 90 : | |||
| 91 : | <input type="hidden" name="task" value="installfromdir" /> | ||
| 92 : | <input type="hidden" name="option" value="<?php echo $option;?>"/> | ||
| 93 : | <input type="hidden" name="element" value="<?php echo $element;?>"/> | ||
| 94 : | <input type="hidden" name="client" value="<?php echo $client;?>"/> | ||
| 95 : | </form> | ||
| 96 : | <?php | ||
| 97 : | } | ||
| 98 : | |||
| 99 : | /** | ||
| 100 : | * @param string | ||
| 101 : | * @param string | ||
| 102 : | * @param string | ||
| 103 : | * @param string | ||
| 104 : | */ | ||
| 105 : | function showInstallMessage( $message, $title, $url ) { | ||
| 106 : | global $PHP_SELF; | ||
| 107 : | ?> | ||
| 108 : | <table class="adminheading"> | ||
| 109 : | <tr> | ||
| 110 : | <th class="install"> | ||
| 111 : | <?php echo $title; ?> | ||
| 112 : | </th> | ||
| 113 : | </tr> | ||
| 114 : | </table> | ||
| 115 : | |||
| 116 : | <table class="adminform"> | ||
| 117 : | <tr> | ||
| 118 : | <td align="left"> | ||
| 119 : | <strong><?php echo $message; ?></strong> | ||
| 120 : | </td> | ||
| 121 : | </tr> | ||
| 122 : | <tr> | ||
| 123 : | <td colspan="2" align="center"> | ||
| 124 : | [ <a href="<?php echo $url;?>" style="font-size: 16px; font-weight: bold">Continue ...</a> ] | ||
| 125 : | </td> | ||
| 126 : | </tr> | ||
| 127 : | </table> | ||
| 128 : | <?php | ||
| 129 : | } | ||
| 130 : | } | ||
| 131 : | ?> |
| ViewVC Help | |
| Powered by ViewVC 1.0.0 |
Web Hosting provided by Network Redux.

