mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-07-06 04:51:52 -07:00
enable/disable softaculous plugin
This commit is contained in:
parent
fbc0cf5151
commit
42f6ceddc4
3 changed files with 137 additions and 0 deletions
|
@ -459,6 +459,33 @@ if (!empty($_POST['save'])) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// activating softaculous
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'yes'){
|
||||
exec (VESTA_CMD."v-add-sys-softaculous", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = __('Softaculous Activated');
|
||||
$_SESSION['SOFTACULOUS'] = 'yes';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// disable softaculous
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
if($_SESSION['SOFTACULOUS'] != $_POST['v_softaculous'] && $_POST['v_softaculous'] == 'no'){
|
||||
exec (VESTA_CMD."v-delete-sys-softaculous", $output, $return_var);
|
||||
check_return_code($return_var,$output);
|
||||
unset($output);
|
||||
if (empty($_SESSION['error_msg'])) {
|
||||
$_SESSION['ok_msg'] = __('Softaculous Disabled');
|
||||
$_SESSION['SOFTACULOUS'] = '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Check system configuration
|
||||
|
|
|
@ -14,4 +14,20 @@ $(document).ready(function(){
|
|||
$('.sftp.description').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('select[name=v_softaculous]').change(function(){
|
||||
if($(this).val() == 'yes'){
|
||||
$('.softaculous.description').show();
|
||||
} else {
|
||||
$('.softaculous.description').hide();
|
||||
}
|
||||
});
|
||||
|
||||
$('input[name=v_mail_relay]').change(function(){
|
||||
if($(this).is(':checked')){
|
||||
$('.mail-relay').show();
|
||||
} else {
|
||||
$('.mail-relay').hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
|
@ -280,6 +280,68 @@
|
|||
<br><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="vst-text step-top">
|
||||
<label>
|
||||
<input type="checkbox" class="vst-checkbox use_relay" name="v_mail_relay"">
|
||||
<?=__('Use relay')?>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="mail-relay" style="display: none;">
|
||||
<td>
|
||||
<table>
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Hostname');?><br>
|
||||
<span style="font-size: 10pt; color:#777;"><?=__('enter hostname or IP address');?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_relay_hostname" value="<?=htmlentities(trim($v_relay_hostname, "'"))?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Port');?><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_relay_port" value="<?=htmlentities(trim($v_relay_port, "'"))?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Username');?><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_relay_username" value="<?=htmlentities(trim($v_relay_username, "'"))?>">
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="vst-text step-left input-label">
|
||||
<?php print __('Password');?><br>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="step-left">
|
||||
<input type="text" size="20" class="vst-input v-ftp-user" name="v_relay_password" value="<?=htmlentities(trim($v_relay_password, "'"))?>">
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -846,6 +908,38 @@
|
|||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="vst-text" id="module-softaculous">
|
||||
<?php print __('Softaculous') ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<select class="vst-list" name="v_softaculous">
|
||||
<option value='no'><?=__('no')?></option>
|
||||
<option value='yes' <? if($_GET['lead'] == 'softaculous' || $_SESSION['SOFTACULOUS'] == 'yes') echo 'selected="selected"'; ?>><?=__('yes')?></option>
|
||||
</select>
|
||||
<br><br>
|
||||
<div class="softaculous description" <? if ($_SESSION['SOFTACULOUS'] != 'yes') { ?>style="display:none" <? } ?>>
|
||||
<h5>Web Application Installations Made Easy</h5>
|
||||
Softaculous is a great Auto Installer having 426 great scripts, 1115 PHP Classes
|
||||
and we are still adding more. Softaculous is ideal for Web Hosting companies and
|
||||
it could give a significant boost to your sales. These scripts cover most of the
|
||||
uses a customer could ever have. We have covered a wide array of Categories so that
|
||||
everyone could find the required script one would need to power their Web Site.
|
||||
<ul>
|
||||
<li>
|
||||
<a href="https://www.softaculous.com/softaculous/" class="purchase" target="_blank"><?=__('Get Premium License')?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue