View file isp_api/func/jabber.add.php

File size: 1.17Kb
<?php

if (empty($_POST['submit'])) {
    echo '<b>Создание Jabber аккаунта</b>' . "\n";
    echo '<hr />' . "\n";
    echo '<form action="?func=jabber.add&amp;plid=' . urlencode($_GET['plid']) . '" method="post">' . "\n";
    echo 'JID:<br />' . "\n";
    echo '<input name="jid" /><br />' . "\n";
    echo 'Пароль:<br />' . "\n";
    echo '<input name="pass" type="password" /><br />' . "\n";
    echo '<input name="submit" type="submit" value="Создать" />' . "\n";
    echo '</form>' . "\n";
    echo '<hr />' . "\n";
    echo '<img src="images/t-back.png" alt=".." /><a href="?func=jabber.list&amp;elid=' . urlencode($_GET['plid']) . '">Вернуться</a>' . "\n";
} else {
    $content = api_query('https://' . $server . '/manager/ispmgr?func=jabber.add&jid=' . urlencode($_POST['jid']) . '&pass=' . urlencode($_POST['pass']) . '&sok=ok&out=xml&auth=' . urlencode($_SESSION['auth']));
    echo '<div style="text-align:center">' . "\n";
    echo 'Jabber аккаунт успешно создан!<br />' . "\n";
    echo '<a href="?func=jabber.list&amp;elid=' . urlencode($_GET['plid']) . '">Продолжить&#187;</a>' . "\n";
    echo '</div>' . "\n";
} 

?>