Просмотр исходного кода

Merge branch 'main' into feature/statistics-page

Kristan Kenney 5 лет назад
Родитель
Сommit
e960af1337
1 измененных файлов с 218 добавлено и 219 удалено
  1. 218 219
      web/templates/admin/edit_web.html

+ 218 - 219
web/templates/admin/edit_web.html

@@ -5,7 +5,7 @@
         </div>
         </div>
         <div class="l-unit-toolbar__buttonstrip float-right">
         <div class="l-unit-toolbar__buttonstrip float-right">
             <a href="/delete/web/cache/?domain=<?=$_GET['domain'];?>&token=<?=$_SESSION['token'];?>" class="ui-button cancel <?php if ( $v_nginx_cache == 'yes' || ($v_proxy_template == 'caching' && $_SESSION['PROXY_SYSTEM'] == 'nginx')) { echo "block"; } else{ echo "hidden"; }?>" id="v-clear-cache">
             <a href="/delete/web/cache/?domain=<?=$_GET['domain'];?>&token=<?=$_SESSION['token'];?>" class="ui-button cancel <?php if ( $v_nginx_cache == 'yes' || ($v_proxy_template == 'caching' && $_SESSION['PROXY_SYSTEM'] == 'nginx')) { echo "block"; } else{ echo "hidden"; }?>" id="v-clear-cache">
-                <i class="fas fa-trash status-icon red"></i><?=_('Purge Cache');?>
+                <i class="fas fa-trash status-icon red"></i><?=_('Purge Nginx Cache');?>
             </a>
             </a>
 
 
             <a href="/add/webapp/?domain=<?=$v_domain?>" class="ui-button cancel" dir="ltr">
             <a href="/add/webapp/?domain=<?=$v_domain?>" class="ui-button cancel" dir="ltr">
@@ -71,6 +71,7 @@
                                     <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                     <input type="hidden" name="v_domain" value="<?=htmlentities(trim($v_domain, "'"))?>">
                                 </td>
                                 </td>
                             </tr>
                             </tr>
+                            </tr>
                             <tr>
                             <tr>
                                 <td class="vst-text input-label">
                                 <td class="vst-text input-label">
                                     <?php print _('Aliases');?>
                                     <?php print _('Aliases');?>
@@ -90,7 +91,7 @@
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
-                                <td class="vst-text input-label step-top">
+                                <td class="vst-text input-label">
                                     <?php print _('IP Address');?>
                                     <?php print _('IP Address');?>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
@@ -106,9 +107,8 @@
                                         ?>
                                         ?>
                                     </select>
                                     </select>
                                 </td>
                                 </td>
-                            </tr>
                             <tr>
                             <tr>
-                                <td class="vst-text input-label">
+                                <td class="vst-text step-top">
                                     <?php print _('Web Statistics');?>
                                     <?php print _('Web Statistics');?>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
@@ -127,19 +127,14 @@
                                             }
                                             }
                                     ?>
                                     ?>
                                     </select>
                                     </select>
-                                    <br>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td class="input-label">
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr  class="stats-auth" style="<? if ($v_stats == 'none') { ?>display:none<? } ?>">
                             <tr  class="stats-auth" style="<? if ($v_stats == 'none') { ?>display:none<? } ?>">
-                                <td class="vst-text input-label">
+                                <td class="vst-text input-label step-left">
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"><?php print _('Statistics Authorization');?></label>
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v_stats_auth" <?php if (!empty($v_stats_user)) echo "checked=yes" ?> onclick="javascript:elementHideShow('statstable');"><?php print _('Statistics Authorization');?></label>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
-                            <tr class="stats-auth step-top">
+                            <tr class="stats-auth">
                                 <td class="step-left">
                                 <td class="step-left">
                                     <table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
                                     <table style="display:<?php if (empty($v_stats_user)) { echo 'none';} else {echo 'block';}?> ;" id="statstable" name="v-add-web-domain-stats-user">
                                         <tr>
                                         <tr>
@@ -154,7 +149,7 @@
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td class="vst-text input-label">
                                             <td class="vst-text input-label">
-                                                <?php print _('Password');?> <a href="javascript:WEBrandom();" title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
+                                                <?php print _('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print _('generate');?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
@@ -166,7 +161,7 @@
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
-                                <td class="vst-text">
+                                <td class="vst-text input-label">
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v-redirect-checkbox" <?php if (!empty($v_redirect)) echo "checked=yes" ?> onclick="javascript:elementHideShow('v_redirect');"><?php print _('Enable domain redirection');?></label>
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v-redirect-checkbox" <?php if (!empty($v_redirect)) echo "checked=yes" ?> onclick="javascript:elementHideShow('v_redirect');"><?php print _('Enable domain redirection');?></label>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
@@ -175,9 +170,9 @@
                                     <table style="display:<?php if (empty($v_redirect)) { echo 'none';} else {echo 'block';}?> ;" id="v_redirect">
                                     <table style="display:<?php if (empty($v_redirect)) { echo 'none';} else {echo 'block';}?> ;" id="v_redirect">
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <label><input type="radio" name="v-redirect" value="<?php echo 'www.'.$v_domain;?>" <?php if ($v_redirect == "www.".$v_domain) echo "checked"; ?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),"www.".$v_domain);?></input></label><br />
-                                                <label><input type="radio" name="v-redirect" value="<?php echo $v_domain;?>" <?php if( $v_redirect == $v_domain) echo "checked";?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),$v_domain);?></input></label><br />
-                                                <label><input type="radio" name="v-redirect" value="custom" <?php if( !empty($v_redirect_custom)) echo "checked";?> class="v-redirect-custom-value"><?=_("Redirect visitors to a custom domain or web address");?></input></label>
+                                                <input type="radio" name="v-redirect" value="<?php echo 'www.'.$v_domain;?>" <?php if ($v_redirect == "www.".$v_domain) echo "checked"; ?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),"www.".$v_domain);?></label></input><br />
+                                                <input type="radio" name="v-redirect" value="<?php echo $v_domain;?>" <?php if( $v_redirect == $v_domain) echo "checked";?> class="v-redirect-custom-value"><?=sprintf(_('Redirect visitors to %s'),$v_domain);?></label></input><br />
+                                                <input type="radio" name="v-redirect" value="custom" <?php if( !empty($v_redirect_custom)) echo "checked";?> class="v-redirect-custom-value"><?=_("Redirect visitors to a custom domain or web address");?></label></input>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
@@ -217,7 +212,7 @@
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
-                                <td class="vst-text">
+                                <td class="vst-text input-label">
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:App.Actions.WEB.toggle_ssl(this);"><?php print _('SSL Support');?></label>
                                     <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ssl" <?php if ($v_ssl == 'yes') echo "checked=yes" ?> onclick="javascript:App.Actions.WEB.toggle_ssl(this);"><?php print _('SSL Support');?></label>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
@@ -300,7 +295,7 @@
                                                     <? if($v_ssl_aliases){?>
                                                     <? if($v_ssl_aliases){?>
                                                     <tr>
                                                     <tr>
                                                         <td>
                                                         <td>
-                                                            <b><?=_('Aliases')?>:</b>
+                                                            <b><?=_('ALIASES')?>:</b>
                                                         </td>
                                                         </td>
                                                         <td class="details">
                                                         <td class="details">
                                                             <?=$v_ssl_aliases?>
                                                             <?=$v_ssl_aliases?>
@@ -354,102 +349,68 @@
                                     </table>
                                     </table>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
-                            <tr>
-                                <td class="step-top vst-text " style="/*padding: 32px 0 20px 0;*/">
-                                    <a href="javascript:elementHideShow('advanced-options-table');" class="vst-advanced"><i class="fas fa-eye status-icon lightblue icon-pad-right"></i><?php print _('Advanced options');?></a>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                        <table id="advanced-options-table" style="display: none;" class="step-top">
-                                            
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Web Template')  . "<span class='optional'>" .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_template">
-                                        <?php
-                                            foreach ($templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
-                                                $svalue = "'".$value."'";
-                                                if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php if($_SESSION['WEB_SYSTEM'] == 'nginx'){?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Enable Fast CGI Cache'); ?> <a href="https://docs.hestiacp.com/admin_docs/nginx_caching.html" target="_blank"><i class="fas fa-question-circle"></i></a>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_nginx_cache">
-                                        <option value="no"><?php echo _('No');?></option>
-                                        <option value="yes" <?php if ( $v_nginx_cache == "yes") { echo 'selected'; }?>><?php echo _('Yes');?></option>
-                                    </select>
-                                </td>
-                            </tr>
-                             <?php } ?>                          
-                            <?php if (!empty($_SESSION['WEB_BACKEND'])) { ?>
-                            <tr>
-                                <td class="vst-text input-label">
-                                    <?php print _('Backend Template') . " <span class='optional'>" . strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
-                                </td>
-                            </tr>
-                            <tr>
-                                <td>
-                                    <select class="vst-list" name="v_backend_template">
-                                        <?php
-                                            foreach ($backend_templates as $key => $value) {
-                                                echo "\t\t\t\t<option value=\"".$value."\"";
-                                                $svalue = "'".$value."'";
-                                                if ((!empty($v_backend_template)) && ( $value == $v_backend_template ) || ($svalue == $v_backend_template)){
-                                                    echo ' selected' ;
-                                                }
-                                                if ((empty($v_backend_template)) && ($value == 'default')){
-                                                    echo ' selected' ;
-                                                }
-                                                echo ">".htmlentities($value)."</option>\n";
-                                            }
-                                        ?>
-                                    </select>
-                                </td>
-                            </tr>
-                            <?php }?>
-                            <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { ?>
-                            <!-- <tr>
-                                <td class="vst-text step-top">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');"><?php print _('Proxy Support') . "<span class='optional'>" . strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?></label>
-                                </td>
-                            </tr>-->
-                            <tr>
-                                <td>
-                                    <table id="proxytable">
+
+                        <tr>
+                            <td class="step-top vst-text" style="/*padding: 32px 0 20px 0;*/">
+                                <a href="javascript:elementHideShow('advanced-opts');" class="vst-advanced"><?php print _('Advanced options');?></a>
+                            </td>
+                        </tr>
+                        <tr>
+                                <td class="step-top">
+                                    <table id="advanced-opts" style="display: none;">
                                         <tr>
                                         <tr>
                                             <td class="vst-text input-label">
                                             <td class="vst-text input-label">
-                                                <?php print _('Proxy Template');?> <span class='optional'><?php echo strtoupper($_SESSION['PROXY_SYSTEM']) ?></span>
+                                                <?php print _('Web Template')  . "<span class='optional'>" .strtoupper($_SESSION['WEB_SYSTEM']) . "</span>";?>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <select class="vst-list" name="v_proxy_template">
+                                                <select class="vst-list" name="v_template">
                                                     <?php
                                                     <?php
-                                                        foreach ($proxy_templates as $key => $value) {
+                                                        foreach ($templates as $key => $value) {
                                                             echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
                                                             echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
                                                             $svalue = "'".$value."'";
                                                             $svalue = "'".$value."'";
-                                                            if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template ) || ($svalue == $v_proxy_template)){
+                                                            if ((!empty($v_template)) && ( $value == $v_template ) || ($svalue == $v_template)){
+                                                                echo ' selected' ;
+                                                            }
+                                                            echo ">".htmlentities($value)."</option>\n";
+                                                        }
+                                                    ?>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php if($_SESSION['WEB_SYSTEM'] == 'nginx'){?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Enable Fast CGI Cache'); ?> <a href="https://docs.hestiacp.com/admin_docs/nginx_caching.html" target="_blank"><i class="fas fa-question-circle"></i></a>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_nginx_cache">
+                                                    <option value="no"><?php echo _('No');?></option>
+                                                    <option value="yes" <?php if ( $v_nginx_cache == "yes") { echo 'selected'; }?>><?php echo _('Yes');?></option>
+                                                </select>
+                                            </td>
+                                        </tr>
+                                        <?php } ?>                          
+                                        <?php if (!empty($_SESSION['WEB_BACKEND'])) { ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <?php print _('Backend Template') . " <span class='optional'>" . strtoupper($_SESSION['WEB_BACKEND']) . "</span>";?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td>
+                                                <select class="vst-list" name="v_backend_template">
+                                                    <?php
+                                                        foreach ($backend_templates as $key => $value) {
+                                                            echo "\t\t\t\t<option value=\"".$value."\"";
+                                                            $svalue = "'".$value."'";
+                                                            if ((!empty($v_backend_template)) && ( $value == $v_backend_template ) || ($svalue == $v_backend_template)){
                                                                 echo ' selected' ;
                                                                 echo ' selected' ;
                                                             }
                                                             }
-                                                            if ((empty($v_proxy_template)) && ($value == 'default')){
+                                                            if ((empty($v_backend_template)) && ($value == 'default')){
                                                                 echo ' selected' ;
                                                                 echo ' selected' ;
                                                             }
                                                             }
                                                             echo ">".htmlentities($value)."</option>\n";
                                                             echo ">".htmlentities($value)."</option>\n";
@@ -458,151 +419,189 @@
                                                 </select>
                                                 </select>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
-                                        <tr>
+                                        <?php }?>
+                                        <?php if (!empty($_SESSION['PROXY_SYSTEM'])) { ?>
+                                        <tr style="display: none;">
                                             <td class="vst-text input-label">
                                             <td class="vst-text input-label">
-                                                <?php print _('Proxy Extensions');?>
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');"><?php print _('Proxy Support') . "<span class='optional'>" . strtoupper($_SESSION['PROXY_SYSTEM']) . "</span>";?></label>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
                                             <td>
                                             <td>
-                                                <textarea size="20" class="vst-textinput short" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo htmlentities(trim($v_proxy_ext, "'"));} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                <table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
+                                                    <tr>
+                                                        <td class="vst-text input-label">
+                                                            <?php print _('Proxy Template');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <select class="vst-list" name="v_proxy_template">
+                                                                <?php
+                                                                    foreach ($proxy_templates as $key => $value) {
+                                                                        echo "\t\t\t\t<option value=\"".htmlentities($value)."\"";
+                                                                        $svalue = "'".$value."'";
+                                                                        if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template ) || ($svalue == $v_proxy_template)){
+                                                                            echo ' selected' ;
+                                                                        }
+                                                                        if ((empty($v_proxy_template)) && ($value == 'default')){
+                                                                            echo ' selected' ;
+                                                                        }
+                                                                        echo ">".htmlentities($value)."</option>\n";
+                                                                    }
+                                                                ?>
+                                                            </select>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="vst-text input-label">
+                                                            <?php print _('Proxy Extensions');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <textarea size="20" class="vst-textinput short" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo htmlentities(trim($v_proxy_ext, "'"));} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; }  ?></textarea>
+                                                        </td>
+                                                    </tr>
+                                                </table>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
-                                    </table>
-                                </td>
-                            </tr>
-                            <?php } ?>
+                                        <?php } ?>
+                                        <tr>
+                                            <td class="vst-text input-label">
+                                                <label><input type="checkbox" size="20" class="vst-checkbox" name="v_custom_doc_root_check" <?php if (!empty($v_custom_doc_root)) echo "checked=yes" ?> onclick="javascript:elementHideShow('v_custom_doc_root');"><?php print _('Custom document root');?></label>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="step-left">
+                                                <table style="display:<?php if (empty($v_custom_doc_root)) { echo 'none';} else {echo 'block';}?> ;" id="v_custom_doc_root">
+                                                    <tr>
+                                                        <td class="vst-text input-label">
+                                                            <?php print _('Point to');?>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="hidden" name="v-custom-doc-root_prepath" value="<?php echo $v_custom_doc_root_prepath;?>">
+                                                            <select class="vst-list" name="v-custom-doc-domain">
+                                                            <?php foreach ($user_domains as $domain): ?>
+                                                                <option value="<?php echo $domain;?>"
+                                                                    <?=($v_custom_doc_domain === $domain || (empty($v_custom_doc_domain) && $domain === $v_domain))?' selected="selected" ':''; ?>>
+                                                                    <?php echo $domain;?>
+                                                                </option>
+                                                            <?php endforeach; ?>
+                                                            </select>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td class="vst-text input-label">
+                                                            <?php print( _('Directory'));?> <span class="optional">(<?php print _('optional');?>)</span>
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <input type="text" size="20" class="vst-input"
+                                                            name="v-custom-doc-folder" value="<?=htmlentities(trim($v_custom_doc_folder, "'"))?>">
+                                                        </td>
+                                                    </tr>
+                                                    <tr>
+                                                        <td>
+                                                            <small class="custom_docroot_hint"></small>
+                                                        </td>
+                                                    </tr>
+
+                                                </table>
+                                            </td>
+                                        </tr>
+                                        
                             <tr>
                             <tr>
-                                <td class="vst-text">
-                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_custom_doc_root_check" <?php if (!empty($v_custom_doc_root)) echo "checked=yes" ?> onclick="javascript:elementHideShow('v_custom_doc_root');"><?php print _('Custom document root');?></label>
+                                <td class="vst-text input-label">
+                                    <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_additional_ftp_accounts(this)"><?php print _('Additional FTP Account');?></label>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
                             <tr>
                             <tr>
-                                <td class="step-left">
-                                    <table style="display:<?php if (empty($v_custom_doc_root)) { echo 'none';} else {echo 'block';}?> ;" id="v_custom_doc_root">
+                                <td>
+
+                                    <?php foreach ($v_ftp_users as $i => $ftp_user): ?>
+                                    <?php
+                                        $v_ftp_user     = $ftp_user['v_ftp_user'];
+                                        $v_ftp_password = $ftp_user['v_ftp_password'];
+                                        $v_ftp_path     = $ftp_user['v_ftp_path'];
+                                        $v_ftp_email    = $ftp_user['v_ftp_email'];
+                                        $v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
+                                    ?>
+                                    <table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" class="ftptable ftptable-nrm" name="v_add_domain_ftp">
                                         <tr>
                                         <tr>
                                             <td class="vst-text input-label">
                                             <td class="vst-text input-label">
-                                                <?php print _('Point to');?>
+                                                <?php print _('FTP') ?> #<span class="ftp-user-number"><?php print $i + 1; ?></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)"><?=_('delete')?></a>
+                                                <input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[<?php print $i ?>][delete]" value="0" />
+                                                <input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[<?php print $i ?>][is_new]" value="<?php print htmlentities($ftp_user['is_new']) ?>" />
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td>
-                                                <input type="hidden" name="v-custom-doc-root_prepath" value="<?php echo $v_custom_doc_root_prepath;?>">
-                                                <select class="vst-list" name="v-custom-doc-domain">
-                                                <?php foreach ($user_domains as $domain): ?>
-                                                    <option value="<?php echo $domain;?>"
-                                                        <?=($v_custom_doc_domain === $domain || (empty($v_custom_doc_domain) && $domain === $v_domain))?' selected="selected" ':''; ?>>
-                                                        <?php echo $domain;?>
-                                                    </option>
-                                                <?php endforeach; ?>
-                                                </select>
+                                            <td class="vst-text step-left input-label">
+                                                <?php print _('Username');?><br>
+                                                <span style="font-size: 10pt; color:#777;"><?php print sprintf(_('Prefix %s will be added to username automatically'),$user."_");?></span>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td class="vst-text input-label">
-                                                <?php print( _('Directory'));?> <span class="optional">(<?php print _('optional');?>)</span>
+                                            <td class="step-left">
+                                                <input type="text" size="20" class="vst-input v-ftp-user" <?php print $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?>
+                                                name="v_ftp_user[<?php print $i ?>][v_ftp_user]" value="<?=htmlentities(trim($v_ftp_user, "'"))?>">
+                                                <small class="hint"></small>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td>
-                                                <input type="text" size="20" class="vst-input"
-                                                name="v-custom-doc-folder" value="<?=htmlentities(trim($v_custom_doc_folder, "'"))?>">
+                                            <td class="vst-text step-left  input-label">
+                                                <?php print _('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print _('generate');?></a>
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
                                         <tr>
                                         <tr>
-                                            <td>
-                                                <small class="custom_docroot_hint"></small>
+                                            <td class="step-left">
+                                                <input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[<?php print $i ?>][v_ftp_password]" value="<?=htmlentities(trim($v_ftp_password, "'"))?>">
                                             </td>
                                             </td>
                                         </tr>
                                         </tr>
 
 
-                                    </table>
+                                        <tr>
+                                            <td class="vst-text step-left input-label">
+                                                 <?php print _('Path');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="step-left">
+                                                <input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="<?php print !empty($v_ftp_pre_path) ? htmlentities(trim($v_ftp_pre_path, "'")) : '/'; ?>">
+                                                <input type="hidden"  class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path_prev]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")) ?>">
+                                                <input type="text"  class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")); ?>">
+                                                <br /><span class="ftp-path-prefix"><?=htmlentities(trim($v_ftp_pre_path, "'"))?></span><span class="ftp-path-value v-ftp-path-hint"></span>
+                                            </td>
+                                        </tr>
+                                        <?php if ($ftp_user['is_new'] == 1): ?>
+                                        <tr>
+                                            <td class="vst-text step-left input-label">
+                                                 <?php print _('Send FTP credentials to email');?>
+                                            </td>
+                                        </tr>
+                                        <tr>
+                                            <td class="step-left">
+                                                <input type="text"  class="vst-input vst-email-alert-on-psw" name="v_ftp_user[<?php print $i ?>][v_ftp_email]" value="<?=htmlentities(trim($v_ftp_email, "'"))?>">
+                                            </td>
+                                        </tr>
+                                        <?php endif; ?>
+                                </table>
+                                    <?php endforeach; ?>
                                 </td>
                                 </td>
                             </tr>
                             </tr>
-                            
-                            <?php foreach ($v_ftp_users as $i => $ftp_user): ?>
-                            <?php
-                                $v_ftp_user     = $ftp_user['v_ftp_user'];
-                                $v_ftp_password = $ftp_user['v_ftp_password'];
-                                $v_ftp_path     = $ftp_user['v_ftp_path'];
-                                $v_ftp_email    = $ftp_user['v_ftp_email'];
-                                $v_ftp_pre_path = $ftp_user['v_ftp_pre_path'];
-                            ?>
-                                            <tr>
-                                                <td>
-                                                    <tr>
-                                                        <td class="vst-text">
-                                                            <label><input type="checkbox" size="20" class="vst-checkbox" name="v_ftp" <?php if (!empty($v_ftp_user)) echo "checked=yes" ?> onclick="App.Actions.WEB.toggle_additional_ftp_accounts(this)"><?php print _('Additional FTP Account');?></label>
-                                                        </td>
-                                                    </tr>
-                                        <table style="display:<?php if (empty($v_ftp_user)) { echo 'none';} else {echo 'block';}?> ;" class="ftptable ftptable-nrm" name="v_add_domain_ftp">
-                                            <tr>
-                                                <td class="vst-text input-label">
-                                                    <?php print _('FTP') ?> #<span class="ftp-user-number"><?php print $i + 1; ?></span> <a class="ftp-remove-user additional-control vst-advanced button danger" onCLick="App.Actions.WEB.remove_ftp_user(this)"><i class="fas fa-user-times icon-pad-right" title="<?=_('delete')?>"></i><?=_('delete')?></a>
-                                                    <input type="hidden" class="v-ftp-user-deleted" name="v_ftp_user[<?php print $i ?>][delete]" value="0" />
-                                                    <input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[<?php print $i ?>][is_new]" value="<?php print htmlentities($ftp_user['is_new']) ?>" />
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="vst-text step-left input-label">
-                                                    <?php print _('Username');?><br>
-                                                    <span style="font-size: 10pt; color:#777;"><?php print sprintf(_('Prefix %s will be added to username automatically'),$user."_");?></span>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="step-left">
-                                                    <input type="text" size="20" class="vst-input v-ftp-user" <?php print $ftp_user['is_new'] != 1 ? 'disabled="disabled"' : '' ?>
-                                                    name="v_ftp_user[<?php print $i ?>][v_ftp_user]" value="<?=htmlentities(trim($v_ftp_user, "'"))?>">
-                                                    <small class="hint"></small>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="vst-text step-left  input-label">
-                                                    <?php print _('Password');?> <a href="javascript:void(0);"" onClick="FTPrandom(this)"title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="step-left">
-                                                    <input type="text" class="vst-input v-ftp-user-psw password" name="v_ftp_user[<?php print $i ?>][v_ftp_password]" value="<?=htmlentities(trim($v_ftp_password, "'"))?>">
-                                                </td>
-                                            </tr>
 
 
-                                            <tr>
-                                                <td class="vst-text step-left input-label">
-                                                    <?php print _('Path');?>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="step-left">
-                                                    <input type="hidden" class="vst-input v-ftp-pre-path" name="v_ftp_pre_path" value="<?php print !empty($v_ftp_pre_path) ? htmlentities(trim($v_ftp_pre_path, "'")) : '/'; ?>">
-                                                    <input type="hidden"  class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path_prev]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")) ?>">
-                                                    <input type="text"  class="vst-input v-ftp-path" name="v_ftp_user[<?php print $i ?>][v_ftp_path]" value="<?php if (!empty($v_ftp_path)) echo ($v_ftp_path[0] != '/' ? '/' : '').htmlentities(trim($v_ftp_path, "'")); ?>">
-                                                    <br /><span class="ftp-path-prefix"><?=htmlentities(trim($v_ftp_pre_path, "'"))?></span><span class="ftp-path-value v-ftp-path-hint"></span>
-                                                </td>
-                                            </tr>
-                                            <?php if ($ftp_user['is_new'] == 1): ?>
-                                            <tr>
-                                                <td class="vst-text step-left input-label">
-                                                    <?php print _('Send FTP credentials to email');?>
-                                                </td>
-                                            </tr>
-                                            <tr>
-                                                <td class="step-left">
-                                                    <input type="text"  class="vst-input vst-email-alert-on-psw" name="v_ftp_user[<?php print $i ?>][v_ftp_email]" value="<?=htmlentities(trim($v_ftp_email, "'"))?>">
-                                                </td>
-                                            </tr>
-                                            <?php endif; ?>
-                                        </table>                          
-                                    </td>
-                                </tr>
-                                <tr class="add-new-ftp-user-button" style="<?php print !empty($v_ftp_user) ? '' : 'display:none;' ?>">
-                                    <td class="vst-text step-top v-add-new-user step-bottom">
-                                        <a class="additional-control vst-advanced" onClick="App.Actions.WEB.add_ftp_user_form()"><i class="fas fa-plus-circle status-icon green icon-pad-right" title="<?php print _('Add one more FTP Account');?>"></i><?php print _('Add one more FTP Account');?></a>
-                                    </td>
-                                </tr>
-                                        <?php endforeach; ?>
-                                    </td>
-                                </tr>
-                            </table>
+                            <tr class="add-new-ftp-user-button" style="<?php print !empty($v_ftp_user) ? '' : 'display:none;' ?>">
+                                <td class="vst-text step-top v-add-new-user step-bottom">
+                                    <a class="additional-control vst-advanced" onClick="App.Actions.WEB.add_ftp_user_form()"><?php print _('Add one more FTP Account');?></a>
+                                </td>
+                            </tr>
+                                    </table>
+                                </td>
+                            </tr>
+                        </table>
+                        <table class="data-col2">
                         </table>
                         </table>
                     </td>
                     </td>
                 </tr>
                 </tr>
@@ -613,7 +612,7 @@
             <table class="ftptable ftptable-nrm" name="v_add_domain_ftp">
             <table class="ftptable ftptable-nrm" name="v_add_domain_ftp">
                 <tr>
                 <tr>
                     <td class="vst-text input-label">
                     <td class="vst-text input-label">
-                        <?php print _('FTP') ?> #<span class="ftp-user-number"></span> <a class="ftp-remove-user additional-control vst-advanced button danger" onCLick="App.Actions.WEB.remove_ftp_user(this)"><i class="fas fa-user-times icon-pad-right" title="<?=_('delete')?>"></i><?=_('delete')?></a>
+                        <?php print _('FTP') ?> #<span class="ftp-user-number"></span> <a class="ftp-remove-user additional-control" onCLick="App.Actions.WEB.remove_ftp_user(this)"><?=_('delete')?></a>
                         <input type="hidden"  class="v-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0" />
                         <input type="hidden"  class="v-ftp-user-deleted" name="v_ftp_user[%INDEX%][delete]" value="0" />
                         <input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1" />
                         <input type="hidden" class="v-ftp-user-is-new" name="v_ftp_user[%INDEX%][is_new]" value="1" />
                     </td>
                     </td>
@@ -632,7 +631,7 @@
                 </tr>
                 </tr>
                 <tr>
                 <tr>
                     <td class="vst-text step-left  input-label">
                     <td class="vst-text step-left  input-label">
-                        <?php print _('Password');?> <a href="javascript:void(0);" onClick="FTPrandom(this)" title="<?php print _('generate');?>"><i class="fas fa-sync status-icon green icon-large"></i></a>
+                        <?php print _('Password');?> / <a href="javascript:void(0);" onClick="FTPrandom(this)"; class="generate" ><?php print _('generate');?></a>
                     </td>
                     </td>
                 </tr>
                 </tr>
                 <tr>
                 <tr>