CSR request generator

This commit is contained in:
Serghey Rodin 2014-01-22 16:45:16 +02:00
commit 523528784e
15 changed files with 416 additions and 23 deletions

112
web/generate/ssl/index.php Normal file
View file

@ -0,0 +1,112 @@
<?php
// Init
error_reporting(NULL);
session_start();
$TAB = 'WEB';
include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
// Header
include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
// Panel
top_panel($user,$TAB);
// Prepare values
if (!empty($_GET['domain'])) {
$v_domain = $_GET['domain'];
} else {
$v_domain = 'example.ltd';
}
$v_email = 'admin@' . $v_domain;
$v_country = 'US';
$v_state = 'California';
$v_locality = 'San Francisco';
$v_org = 'MyCompany LLC';
$v_org_unit = 'IT';
// Back uri
$_SESSION['back'] = '';
// Check POST
if (!isset($_POST['generate'])) {
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
exit();
}
// Check input
if (empty($_POST['v_domain'])) $errors[] = __('domain');
if (empty($_POST['v_country'])) $errors[] = __('country');
if (empty($_POST['v_state'])) $errors[] = __('domain');
if (empty($_POST['v_locality'])) $errors[] = __('city');
if (empty($_POST['v_org'])) $errors[] = __('organization');
$v_domain = $_POST['v_domain'];
$v_email = $_POST['v_email'];
$v_country = $_POST['v_country'];
$v_state = $_POST['v_state'];
$v_locality = $_POST['v_locality'];
$v_org = $_POST['v_org'];
// Check for errors
if (!empty($errors[0])) {
foreach ($errors as $i => $error) {
if ( $i == 0 ) {
$error_msg = $error;
} else {
$error_msg = $error_msg.", ".$error;
}
}
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
unset($_SESSION['error_msg']);
exit();
}
// Protect input
$v_domain = escapeshellarg($_POST['v_domain']);
$v_email = escapeshellarg($_POST['v_email']);
$v_country = escapeshellarg($_POST['v_country']);
$v_state = escapeshellarg($_POST['v_state']);
$v_locality = escapeshellarg($_POST['v_locality']);
$v_org = escapeshellarg($_POST['v_org']);
exec (VESTA_CMD."v-generate-ssl-cert ".$v_domain." ".$v_email." ".$v_country." ".$v_state." ".$v_locality." ".$v_org." IT json", $output, $return_var);
// Revert to raw values
$v_domain = $_POST['v_domain'];
$v_email = $_POST['v_email'];
$v_country = $_POST['v_country'];
$v_state = $_POST['v_state'];
$v_locality = $_POST['v_locality'];
$v_org = $_POST['v_org'];
// Check return code
if ($return_var != 0) {
$error = implode('<br>', $output);
if (empty($error)) $error = __('Error code:',$return_var);
$_SESSION['error_msg'] = $error;
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/generate_ssl.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
unset($_SESSION['error_msg']);
exit();
}
// OK message
$_SESSION['ok_msg'] = __('SSL_GENERATED_OK');
// Parse output
$data = json_decode(implode('', $output), true);
unset($output);
$v_crt = $data[$v_domain]['CRT'];
$v_key = $data[$v_domain]['KEY'];
$v_csr = $data[$v_domain]['CSR'];
// Back uri
$_SESSION['back'] = $_SERVER['REQUEST_URI'];
include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_ssl.html');
include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');
unset($_SESSION['ok_msg']);
?>

View file

@ -80,6 +80,7 @@ $LANG['cz'] = array(
'restart' => 'restart',
'update' => 'aktualizovat',
'generate' => 'generovat',
'Generate CSR' => 'Generovat CSR',
'reread IP' => 'číst IP',
'Adding User' => 'Přidání uživatele',
@ -102,6 +103,7 @@ $LANG['cz'] = array(
'Editing Package' => 'Úprava Package',
'Adding IP address' => 'Editace IP adresy',
'Editing IP Address' => 'Úprava IP adresy',
'Generating CSR' => 'Generování CSR',
'Listing' => 'Výpis',
'Search Results' => 'Výsledky vyhledávání',
@ -239,6 +241,7 @@ $LANG['cz'] = array(
'SSL Certificate' => 'SSL certifikát',
'SSL Key' => 'SSL klíč',
'SSL Certificate Authority / Intermediate' => 'SSL Certifikační autorita / Intermediate',
'SSL CSR' => 'CSR zádost',
'optional' => 'volitelný',
'internal' => 'interní',
'Statistics Authorization' => 'Statistiky autorizace',
@ -315,8 +318,13 @@ $LANG['cz'] = array(
'Last 70 lines of %s.%s.log' => 'Posledních 70 řádků %s.%s.log',
'Download AccessLog' => 'Stáhnout AccessLog',
'Download ErrorLog' => 'Stáhnout ErrorLog',
'Country' => 'Země',
'2 letter code' => 'dvoupísmenný kód',
'State / Province' => 'Kraj',
'City / Locality' => 'Město / Obec',
'Organization' => 'Organizace',
'1 account' => '1 účet',
'1 account' => '1 účet',
'%s accounts' => '%s účtů',
'1 domain' => '1 doména',
'%s domains' => '%s domén',
@ -351,6 +359,7 @@ $LANG['cz'] = array(
'CRON_CREATED_OK' => 'Cron job byl úspěšně vytvořen.',
'IP_CREATED_OK' => 'IP adresa <a href="/edit/ip/?ip=%s"><b>%s</b></a> byla úspěšně vytvořena.',
'PACKAGE_CREATED_OK' => 'Package <a href="/edit/package/?package=%s"><b>%s</b></a> byl úspěšně vytvořen.',
'SSL_GENERATED_OK' => 'SSL certifikát byl úspěšně vygenerován.',
'Changes has been saved.' => 'Změny byly uloženy.',
'Confirmation' => 'Potvrzení',
'DELETE_USER_CONFIRMATION' => 'Opravdu chcete odstranit uživatele %s?',

View file

@ -79,6 +79,7 @@ $LANG['de'] = array(
'restart' => 'Neustarten',
'update' => 'Aktualisieren',
'generate' => 'Generieren',
'Generate CSR' => 'CSR generieren',
'reread IP' => 'IP aktualisieren',
'Adding User' => 'Benutzer anlegen',
@ -101,6 +102,7 @@ $LANG['de'] = array(
'Editing Package' => 'Packet bearbeiten',
'Adding IP address' => 'IP hinzufügen',
'Editing IP Address' => 'IP bearbeiten',
'Generating CSR' => 'CSR generieren',
'Listing' => 'Auflistung',
'Search Results' => 'Suchergebnisse',
@ -238,6 +240,7 @@ $LANG['de'] = array(
'SSL Certificate' => 'SSL Zertifikat',
'SSL Key' => 'SSL Schlüssel',
'SSL Certificate Authority / Intermediate' => 'SSL Zertifikat Ersteller',
'SSL CSR' => 'CSR-Anfrage',
'optional' => 'Freiwillig',
'internal' => 'Intern',
'Statistics Authorization' => 'Statistik Autorisierung',
@ -314,8 +317,13 @@ $LANG['de'] = array(
'Last 70 lines of %s.%s.log' => 'Die letzten 70 Zeilen von %s.%s.log',
'Download AccessLog' => 'AccessLog runterladen',
'Download ErrorLog' => 'ErrorLog runterladen',
'Country' => 'Land',
'2 letter code' => '2-Buchstaben-Code',
'State / Province' => 'Staat / Provinz',
'City / Locality' => 'Stadt / Lokalitat',
'Organization' => 'Organisation',
'1 account' => '1 Konto',
'1 account' => '1 Konto',
'%s accounts' => '%s Konten',
'1 domain' => '1 Domäne',
'%s domains' => '%s Domänen',
@ -350,6 +358,7 @@ $LANG['de'] = array(
'CRON_CREATED_OK' => 'Cron Job wurde erfolgreich angelegt.',
'IP_CREATED_OK' => 'IP Adresse <a href="/edit/ip/?ip=%s"><b>%s</b></a> wurde erfolgreich hinzugefügt.',
'PACKAGE_CREATED_OK' => 'Packet <a href="/edit/package/?package=%s"><b>%s</b></a> wurde erfolgreich angelegt.',
'SSL_GENERATED_OK' => 'SSL zertifikat wurde erfolgreich angelegt.',
'Changes has been saved.' => 'Änderungen wurden gespeichert.',
'Confirmation' => 'Bestätigung',
'DELETE_USER_CONFIRMATION' => '%s wirklich löschen?',

View file

@ -80,6 +80,7 @@ $LANG['en'] = array(
'restart' => 'restart',
'update' => 'update',
'generate' => 'generate',
'Generate CSR' => 'Generate CSR',
'reread IP' => 'reread IP',
'Adding User' => 'Adding User',
@ -102,6 +103,7 @@ $LANG['en'] = array(
'Editing Package' => 'Editing Package',
'Adding IP address' => 'Adding IP address',
'Editing IP Address' => 'Editing IP Address',
'Generating CSR' => 'Generating CSR',
'Listing' => 'Listing',
'Search Results' => 'Search Results',
@ -239,6 +241,7 @@ $LANG['en'] = array(
'SSL Certificate' => 'SSL Certificate',
'SSL Key' => 'SSL Key',
'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
'SSL CSR' => 'SSL CSR',
'optional' => 'optional',
'internal' => 'internal',
'Statistics Authorization' => 'Statistics Authorization',
@ -315,6 +318,11 @@ $LANG['en'] = array(
'Last 70 lines of %s.%s.log' => 'Last 70 lines of %s.%s.log',
'Download AccessLog' => 'Download AccessLog',
'Download ErrorLog' => 'Download ErrorLog',
'Country' => 'Country',
'2 letter code' => '2 letter code',
'State / Province' => 'State / Province',
'City / Locality' => 'City / Locality',
'Organization' => 'Organization',
'1 account' => '1 account',
'%s accounts' => '%s accounts',
@ -351,6 +359,7 @@ $LANG['en'] = array(
'CRON_CREATED_OK' => 'Cron job has been created successfully.',
'IP_CREATED_OK' => 'IP address <a href="/edit/ip/?ip=%s"><b>%s</b></a> has been created successfully.',
'PACKAGE_CREATED_OK' => 'Package <a href="/edit/package/?package=%s"><b>%s</b></a> has been created successfully.',
'SSL_GENERATED_OK' => 'Certificate has been generated successfully.',
'Changes has been saved.' => 'Changes has been saved.',
'Confirmation' => 'Confirmation',
'DELETE_USER_CONFIRMATION' => 'Are you sure to delete user %s?',

View file

@ -79,6 +79,7 @@ $LANG['es'] = array(
'restart' => 'reiniciar',
'update' => 'actualizar',
'generate' => 'generar',
'Generate CSR' => 'Generar CSR',
'reread IP' => 'releer IP',
'Adding User' => 'Añadiendo Usuario',
@ -101,6 +102,7 @@ $LANG['es'] = array(
'Editing Package' => 'Editando Plan',
'Adding IP address' => 'Añadiendo Dirección IP',
'Editing IP Address' => 'Editando Dirección IP',
'Generating CSR' => 'Generar solicitud de CSR',
'Listing' => 'Listando',
'Search Results' => 'Resultado de Busqueda',
@ -238,6 +240,7 @@ $LANG['es'] = array(
'SSL Certificate' => 'Certificado SSL',
'SSL Key' => 'Llave SSL',
'SSL Certificate Authority / Intermediate' => 'Certificado SSL Autoridad / Intermedio',
'SSL CSR' => 'SSL CSR',
'optional' => 'opcional',
'internal' => 'interno',
'Statistics Authorization' => 'Autorización de Estadísticas',
@ -314,8 +317,13 @@ $LANG['es'] = array(
'Last 70 lines of %s.%s.log' => 'Últimos 70 líneas de %s.%s.log',
'Download AccessLog' => 'Descargar AccessLog',
'Download ErrorLog' => 'Descargar ErrorLog',
'Country' => 'País',
'2 letter code' => 'código de 2 letras',
'State / Province' => 'Estado / Provincia',
'City / Locality' => 'Ciudad / Localidad',
'Organization' => 'Organización',
'1 account' => '1 cuenta',
'1 account' => '1 cuenta',
'%s accounts' => '%s cuentas',
'1 domain' => '1 dominio',
'%s domains' => '%s dominios',
@ -350,6 +358,7 @@ $LANG['es'] = array(
'CRON_CREATED_OK' => 'Trabajo en Cron ha sido creado correctamente.',
'IP_CREATED_OK' => 'Dirección IP <a href="/edit/ip/?ip=%s"><b>%s</b></a> ha sido creada correctamente.',
'PACKAGE_CREATED_OK' => 'Plan <a href="/edit/package/?package=%s"><b>%s</b></a> ha sido creado correctamente.',
'SSL_GENERATED_OK' => 'SSL certificado ha sido creado correctamente.',
'Changes has been saved.' => 'Los cambios han sido guardados.',
'Confirmation' => 'Confirmación',
'DELETE_USER_CONFIRMATION' => '¿Está seguro que desea eliminar el usuario %s?',

View file

@ -79,6 +79,7 @@ $LANG['pt'] = array(
'restart' => 'reiniciar',
'update' => 'atualizar',
'generate' => 'gerar',
'Generate CSR' => 'Gerar CSR',
'reread IP' => 'ler IP novamente',
'Adding User' => 'Adicionando Usuário',
@ -101,6 +102,7 @@ $LANG['pt'] = array(
'Editing Package' => 'Editando Pacote',
'Adding IP address' => 'Adicionando Endereço IP',
'Editing IP Address' => 'Editando Endereço IP',
'Generating CSR' => 'Gerando CSR',
'Listing' => 'Listando',
'Search Results' => 'Resultados da Busca',
@ -238,6 +240,7 @@ $LANG['pt'] = array(
'SSL Certificate' => 'Cerificado SSL',
'SSL Key' => 'Chave SSL',
'SSL Certificate Authority / Intermediate' => 'Autoridade Certificadora SSL / Intermediária',
'SSL CSR' => 'SSL CSR (pedido)',
'optional' => 'opcional',
'internal' => 'interno',
'Statistics Authorization' => 'Permissões de Estatística',
@ -314,8 +317,13 @@ $LANG['pt'] = array(
'Last 70 lines of %s.%s.log' => 'Últimas 70 linhas de %s.%s.log',
'Download AccessLog' => 'Baixar AccessLog',
'Download ErrorLog' => 'Baixar ErrorLog',
'Country' => 'País',
'2 letter code' => 'código de duas letras',
'State / Province' => 'Estado / Região',
'City / Locality' => 'Localidade',
'Organization' => 'Organização',
'1 account' => '1 conta',
'1 account' => '1 conta',
'%s accounts' => '%s contas',
'1 domain' => '1 domínio',
'%s domains' => '%s domínio',
@ -350,6 +358,7 @@ $LANG['pt'] = array(
'CRON_CREATED_OK' => 'Tarefa do Cron adicionada com sucesso.',
'IP_CREATED_OK' => 'Endereço IP <a href="/edit/ip/?ip=%s"><b>%s</b></a> criado com sucesso.',
'PACKAGE_CREATED_OK' => 'Pacote <a href="/edit/package/?package=%s"><b>%s</b></a> criado com sucesso.',
'SSL_GENERATED_OK' => 'SSL certificado criado sucesso.',
'Changes has been saved.' => 'As alterações foram salvas.',
'Confirmation' => 'Confirmação',
'DELETE_USER_CONFIRMATION' => 'Tem certeza que deseja deletar o usuário %s?',

View file

@ -81,6 +81,7 @@ $LANG['ro'] = array(
'restart' => 'repornește',
'update' => 'actualiza',
'generate' => 'generează',
'Generate CSR' => 'Genera cere CSR',
'reread IP' => 'recitește IP',
'Adding User' => 'Adăugare utilizator',
@ -103,6 +104,7 @@ $LANG['ro'] = array(
'Editing Package' => 'Editare pachetul',
'Adding IP address' => 'Adăugare adresă IP',
'Editing IP Address' => 'Editare adresă IP',
'Generate CSR' => 'Cerere CSR',
'Listing' => 'Vizualizare',
'Search Results' => 'Rezultatele căutării',
@ -240,6 +242,7 @@ $LANG['ro'] = array(
'SSL Certificate' => 'Certificat SSL',
'SSL Key' => 'Cheia SSL',
'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
'SSL CSR' => 'Cerere CSR',
'optional' => 'opțional',
'internal' => 'intern',
'Statistics Authorization' => 'Autorizarea statistici',
@ -316,6 +319,11 @@ $LANG['ro'] = array(
'Last 70 lines of %s.%s.log' => 'Ultimele 70 linii de %s.%s.log',
'Download AccessLog' => 'Descarcă AccessLog',
'Download ErrorLog' => 'Descarcă ErrorLog',
'Country' => 'Țară',
'2 letter code' => 'cod de 2 litere',
'State / Province' => 'Județ',
'City / Locality' => 'Oraș / Localitate',
'Organization' => 'Organizație',
'1 account' => '1 utilizator',
'%s accounts' => '%s utilizatori',
@ -352,6 +360,7 @@ $LANG['ro'] = array(
'CRON_CREATED_OK' => 'Sarcina a fost creată cu succes.',
'IP_CREATED_OK' => '"IP adresa <a href="/edit/ip/?ip=%s"><b>%s</b></a> a fost creată cu succes.',
'PACKAGE_CREATED_OK' => 'Pachet <a href="/edit/package/?package=%s"><b>%s</b></a> a fost creat cu succes.',
'SSL_GENERATED_OK' => 'SSL certificat a fost generat cu succes.',
'Changes has been saved.' => 'Modificările au fost salvate.',
'Confirmation' => 'Confirmare',
'DELETE_USER_CONFIRMATION' => 'Ești sigur că dorești să ștergi %s?',

View file

@ -81,6 +81,7 @@ $LANG['ru'] = array(
'restart' => 'перезапустить',
'update' => 'обновить',
'generate' => 'сгенерировать',
'Generate CSR' => 'Cгенерировать CSR запрос',
'reread IP' => 'перечитать IP',
'Adding User' => 'Добавление аккаунта',
@ -105,6 +106,7 @@ $LANG['ru'] = array(
'Editing IP Address' => 'Редактирование IP адреса',
'Listing' => 'Просмотр',
'Search Results' => 'Результаты поиска',
'Generating CSR' => 'Генерирование CSR запроса',
'active' => 'активен',
'spnd' => 'заблокировано',
@ -240,6 +242,7 @@ $LANG['ru'] = array(
'SSL Certificate' => 'SSL сертификат',
'SSL Key' => 'Ключ SSL сертификата',
'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',
'SSL CSR' => 'SSL CSR запрос',
'optional' => 'опционально',
'internal' => 'внутренний',
'Statistics Authorization' => 'Ограниченный доступ к статистике',
@ -316,6 +319,11 @@ $LANG['ru'] = array(
'Last 70 lines of %s.%s.log' => 'Последние 70 строк файла %s.%s.log',
'Download AccessLog' => 'Скачать AccessLog',
'Download ErrorLog' => 'Скачать ErrorLog',
'Country' => 'Страна',
'2 letter code' => 'двухбуквенный код',
'State / Province' => 'Область',
'City / Locality' => 'Город / Населенный пункт',
'Organization' => 'Организация',
'1 account' => ' пользователей на странице: 1',
'%s accounts' => 'пользователей на странице: %s',
@ -352,6 +360,7 @@ $LANG['ru'] = array(
'CRON_CREATED_OK' => 'Задание успешно создано',
'IP_CREATED_OK' => '"IP адрес <a href="/edit/ip/?ip=%s"><b>%s</b></a> успешно создан.',
'PACKAGE_CREATED_OK' => 'Пакет <a href="/edit/package/?package=%s"><b>%s</b></a> успешно создан.',
'SSL_GENERATED_OK' => 'SSL cертификат был успешно сгенерирован.',
'Changes has been saved.' => 'Изменения сохранены.',
'Confirmation' => 'Подтверждение',
'DELETE_USER_CONFIRMATION' => 'Вы уверены, что хотите удалить пользователя %s?',

View file

@ -81,6 +81,7 @@ $LANG['ua'] = array(
'restart' => 'перевиконати',
'update' => 'оновити',
'generate' => 'згенерувати',
'Generate CSR' => 'Згенерувати CSR запит',
'reread IP' => 'оновити IP',
'Adding User' => 'Додавання акаунту',
@ -103,6 +104,7 @@ $LANG['ua'] = array(
'Editing Package' => 'Редагування пакету',
'Adding IP address' => 'Додавання IP адреси',
'Editing IP Address' => 'Редагування IP адреси',
'Generating CSR' => 'Генерування CSR запиту',
'Listing' => 'Перегляд',
'Search Results' => 'Результати пошуку',
@ -240,6 +242,7 @@ $LANG['ua'] = array(
'SSL Certificate' => 'SSL сертификат',
'SSL Key' => 'Ключ SSL сертифікату',
'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',
'SSL CSR' => 'SSL CSR запит',
'optional' => 'опційно',
'internal' => 'внутрішній',
'Statistics Authorization' => 'Обмежений доступ до статистики',
@ -316,6 +319,11 @@ $LANG['ua'] = array(
'Last 70 lines of %s.%s.log' => 'Останні 70 ліній файла %s.%s.log',
'Download AccessLog' => 'Завантажити AccessLog',
'Download ErrorLog' => 'Завантажити ErrorLog',
'Country' => 'Країна',
'2 letter code' => 'двобуквений код',
'State / Province' => 'Область',
'City / Locality' => 'Місто / Населений пункт',
'Organization' => 'Організація',
'1 account' => ' користувач на сторінці: 1',
'%s accounts' => 'користувачів на сторінці: %s',
@ -352,6 +360,7 @@ $LANG['ua'] = array(
'CRON_CREATED_OK' => 'Завдання успішно додано',
'IP_CREATED_OK' => '"IP адреса <a href="/edit/ip/?ip=%s"><b>%s</b></a> успішно створена.',
'PACKAGE_CREATED_OK' => 'Пакет <a href="/edit/package/?package=%s"><b>%s</b></a> успішно створений.',
'SSL_GENERATED_OK' => 'SSL cертификат успішно створено.',
'Changes has been saved.' => 'Зміни збережені.',
'Confirmation' => 'Підтвердження',
'DELETE_USER_CONFIRMATION' => 'Ви впевнені, що хочете видалити користувача %s?',

View file

@ -176,7 +176,8 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Support');?>
<?php print __('SSL Support');?> /
<a class="generate" target="_blank" href="/generate/ssl/"><?php print __('Generate CSR') ?></a>
</td>
</tr>
<tr>
@ -226,7 +227,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('SSL Certificate Authority / Intermediate');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('optional');?>)</span>
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
</td>
</tr>
<tr>
@ -284,7 +285,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:WEBrandom();" class="genpass"><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
</td>
</tr>
<tr>
@ -322,7 +323,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:FTPrandom();" class="genpass" ><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate" ><?php print __('generate');?></a>
</td>
</tr>
<tr>

View file

@ -78,6 +78,7 @@
<table class="data-col2" width="830px">
<tr>
<td class="vst-text" style="padding: 20px 0 0 2px;">
<?php print __('Domain');?>
</td>
</tr>
@ -192,7 +193,8 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Support');?>
<?php print __('SSL Support');?> /
<a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a>
</td>
</tr>
<tr>
@ -211,6 +213,7 @@
<tr>
<td>
<select class="vst-list" name="v_ssl_home">
<option value='same' <?php if ($v_ssl_home == 'same') echo "selected";?>>
public_html
</option>
@ -222,7 +225,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Certificate');?>
<?php print __('SSL Certificate');?>
</td>
</tr>
<tr>
@ -242,7 +245,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Certificate Authority / Intermediate');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('optional');?>)</span>
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
</td>
</tr>
<tr>
@ -300,7 +303,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('Password');?> <a href="javascript:WEBrandom();" class="genpass"><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
</td>
</tr>
<tr>
@ -332,18 +335,18 @@
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user; ?>>
<input type="text" size="20" class="vst-input" name="v_ftp_user" <?php if (!empty($v_ftp_user)) echo "value=".$v_ftp_user;?>>
<small class="hint"></small>
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:FTPrandom();" class="genpass" ><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate"><?php print __('generate');?></a>
</td>
</tr>
<tr>
<td>
<input type="text" class="vst-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password; ?>>
<input type="text" class="vst-input" name="v_ftp_password" <?php if (!empty($v_ftp_password)) echo "value=".$v_ftp_password;?>>
</td>
</tr>
<?php

View file

@ -0,0 +1,119 @@
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/list/web/'";
} else {
$back = "location.href='".$back."'";
}
?>
<table class="submenu">
<tr>
<td style="padding: 18px 8px;" ><a class="name"><b><?php print __('Generating CSR');?></b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<span class=\"vst-error\"> → ".$_SESSION['error_msg']."</span>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
}
}
?>
</td>
</tr>
</table>
</div>
<form id="vstobjects" name="v_generate_csr" method="post">
<table class='data'>
<tr class="data-add">
<td class="data-dotted" width="150">
<table class="data-col1">
<tr>
<td>
</td>
</tr>
</table>
</td>
<td class="data-dotted" width="830px">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td class="vst-text" style="padding: 20px 0 0 2px;">
<?php print __('Domain');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_domain" value="<?php print $v_domain ?>">
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('Email');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_email" value="<?php print $v_email ?>">
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('Country'); ?>
<span class="optional">(<?php print __('2 letter code');?>)</span>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_country" value="<?php print $v_country?>">
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('State / Province');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_state" value="<?php print $v_state ?>">
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('City / Locality');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_locality" value="<?php print $v_locality ?>">
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('Organization');?>
</td>
</tr>
<tr>
<td>
<input type="text" size="20" class="vst-input" name="v_org" value="<?php print $v_org ?>">
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td style="padding: 24px 0 0 0;" width="116px">
<input type="submit" class="button" name="generate" value="<?php print __('Ok');?>">
</td>
<td style="padding: 24px 0 0 0;">
<input type="button" class="button" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -0,0 +1,84 @@
<?php
$back = $_SESSION['back'];
if (empty($back)) {
$back = "location.href='/generate/ssl/'";
} else {
$back = "location.href='".$back."'";
}
?>
<table class="submenu">
<tr>
<td style="padding: 18px 8px;" ><a class="name"><b><?php print __('Generating CSR');?></b></a>
<?php
if (!empty($_SESSION['error_msg'])) {
echo "<span class=\"vst-error\"> → ".$_SESSION['error_msg']."</span>";
} else {
if (!empty($_SESSION['ok_msg'])) {
echo "<span class=\"vst-ok\"> → ".$_SESSION['ok_msg']."</span>";
}
}
?>
</td>
</tr>
</table>
</div>
<form id="vstobjects" name="v_generate_csr" method="post">
<table class='data'>
<tr class="data-add">
<td class="data-dotted" width="150">
<table class="data-col1">
<tr>
<td>
</td>
</tr>
</table>
</td>
<td class="data-dotted" width="830px">
<table width="830px">
<tr>
<td></td>
</tr>
</table>
<table class="data-col2" width="830px">
<tr>
<td class="vst-text" style="padding: 20px 0 0 2px;">
<?php print __('SSL CSR');?>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="vst-textinput" name="v_csr"><?php print $v_csr ?> </textarea>
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 20px 0 0 2px;"><?php print __('SSL Certificate');?>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="vst-textinput" name="v_crt"><?php print $v_crt ?> </textarea>
</td>
</tr>
<tr>
<td class="vst-text" style="padding: 20px 0 0 2px;">
<?php print __('SSL Key');?>
</td>
</tr>
<tr>
<td>
<textarea size="20" class="vst-textinput" name="v_key"><?php print $v_key ?> </textarea>
</td>
</tr>
</table>
<table class="data-col2">
<tr>
<td style="padding: 24px 0 0 0;">
<input type="button" class="button" value="<?php print __('Back');?>" onclick="<?php echo $back ?>">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>

View file

@ -176,7 +176,8 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Support');?>
<?php print __('SSL Support');?> /
<a class="generate" target="_blank" href="/generate/ssl/"><?php print __('Generate CSR') ?></a>
</td>
</tr>
<tr>
@ -226,7 +227,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('SSL Certificate Authority / Intermediate');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('optional');?>)</span>
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
</td>
</tr>
<tr>
@ -284,7 +285,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:WEBrandom();" class="genpass"><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
</td>
</tr>
<tr>
@ -322,7 +323,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:FTPrandom();" class="genpass" ><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate" ><?php print __('generate');?></a>
</td>
</tr>
<tr>

View file

@ -148,7 +148,8 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Support');?>
<?php print __('SSL Support');?> /
<a class="generate" target="_blank" href="/generate/ssl/?domain=<?php echo $v_domain ?>"><?php print __('Generate CSR') ?></a>
</td>
</tr>
<tr>
@ -198,7 +199,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('SSL Certificate Authority / Intermediate');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('optional');?>)</span>
<?php print __('SSL Certificate Authority / Intermediate');?> <span class="optional">(<?php print __('optional');?>)</span>
</td>
</tr>
<tr>
@ -256,7 +257,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 2px;">
<?php print __('Password');?> <a href="javascript:WEBrandom();" class="genpass"><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:WEBrandom();" class="generate"><?php print __('generate');?></a>
</td>
</tr>
<tr>
@ -294,7 +295,7 @@
</tr>
<tr>
<td class="vst-text" style="padding: 10px 0 0 0;">
<?php print __('Password');?> <a href="javascript:FTPrandom();" class="genpass" ><?php print __('generate');?></a>
<?php print __('Password');?> / <a href="javascript:FTPrandom();" class="generate" ><?php print __('generate');?></a>
</td>
</tr>
<tr>