| 1 | <?php |
|---|
| 2 | /* |
|---|
| 3 | $Id: ftp_add.php,v 1.5 2006/01/12 01:10:48 anarcat Exp $ |
|---|
| 4 | ---------------------------------------------------------------------- |
|---|
| 5 | AlternC - Web Hosting System |
|---|
| 6 | Copyright (C) 2002 by the AlternC Development Team. |
|---|
| 7 | http://alternc.org/ |
|---|
| 8 | ---------------------------------------------------------------------- |
|---|
| 9 | Based on: |
|---|
| 10 | Valentin Lacambre's web hosting softwares: http://altern.org/ |
|---|
| 11 | ---------------------------------------------------------------------- |
|---|
| 12 | LICENSE |
|---|
| 13 | |
|---|
| 14 | This program is free software; you can redistribute it and/or |
|---|
| 15 | modify it under the terms of the GNU General Public License (GPL) |
|---|
| 16 | as published by the Free Software Foundation; either version 2 |
|---|
| 17 | of the License, or (at your option) any later version. |
|---|
| 18 | |
|---|
| 19 | This program is distributed in the hope that it will be useful, |
|---|
| 20 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 21 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 22 | GNU General Public License for more details. |
|---|
| 23 | |
|---|
| 24 | To read the license please visit http://www.gnu.org/copyleft/gpl.html |
|---|
| 25 | ---------------------------------------------------------------------- |
|---|
| 26 | Original Author of file: Benjamin Sonntag |
|---|
| 27 | Purpose of file: Ask the required values to add a ftp account |
|---|
| 28 | ---------------------------------------------------------------------- |
|---|
| 29 | */ |
|---|
| 30 | require_once("../class/config.php"); |
|---|
| 31 | include_once("head.php"); |
|---|
| 32 | |
|---|
| 33 | if (!$quota->cancreate("ftp")) { |
|---|
| 34 | $error=_("You cannot add any new ftp account, your quota is over."); |
|---|
| 35 | $fatal=1; |
|---|
| 36 | } |
|---|
| 37 | |
|---|
| 38 | ?> |
|---|
| 39 | <h3><?php __("Create a new ftp account"); ?></h3> |
|---|
| 40 | <hr id="topbar"/> |
|---|
| 41 | <br /> |
|---|
| 42 | <?php |
|---|
| 43 | if (isset($error) && $error) { |
|---|
| 44 | echo "<p class=\"error\">$error</p>"; |
|---|
| 45 | if ($fatal) { |
|---|
| 46 | include_once("foot.php"); |
|---|
| 47 | exit(); |
|---|
| 48 | } |
|---|
| 49 | } |
|---|
| 50 | ?> |
|---|
| 51 | <form method="post" action="ftp_doadd.php" name="main" id="main"> |
|---|
| 52 | <table> |
|---|
| 53 | <tr><th><input type="hidden" name="id" value="<?php echo $id ?>" /> |
|---|
| 54 | <label for="login"><?php __("Username"); ?></label></th><td> |
|---|
| 55 | <select class="inl" name="prefixe"><?php $ftp->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" /> |
|---|
| 56 | </td></tr> |
|---|
| 57 | <tr><th><label for="dir"><?php __("Folder"); ?></label></th><td><input type="text" class="int" name="dir" id="dir" value="" size="20" maxlength="255" /> |
|---|
| 58 | <script type="text/javascript"> |
|---|
| 59 | <!-- |
|---|
| 60 | document.write(" <input type=\"button\" name=\"bff\" onclick=\"browseforfolder('main.dir');\" value=\" <?php __("Choose a folder..."); ?> \" class=\"bff\">"); |
|---|
| 61 | // --> |
|---|
| 62 | </script> |
|---|
| 63 | </td></tr> |
|---|
| 64 | <tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /></td></tr> |
|---|
| 65 | <tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="64" /></td></tr> |
|---|
| 66 | <tr class="trbtn"><td colspan="2"> |
|---|
| 67 | <input type="submit" class="inb" name="submit" value="<?php __("Create this new FTP account."); ?>" /> |
|---|
| 68 | <input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='ftp_list.php'"/> |
|---|
| 69 | </td></tr> |
|---|
| 70 | </table> |
|---|
| 71 | </form> |
|---|
| 72 | <?php $mem->show_help("ftp_add"); ?> |
|---|
| 73 | <script type="text/javascript"> |
|---|
| 74 | document.forms['main'].login.focus(); |
|---|
| 75 | document.forms['main'].setAttribute('autocomplete', 'off'); |
|---|
| 76 | </script> |
|---|
| 77 | <?php include_once("foot.php"); ?> |
|---|