123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- <script type="text/javascript" language="JavaScript">
- function enable_change(enable_over) {
- var endis;
- endis = !(document.iform.enable.checked || enable_over);
- document.iform.range_from.disabled = endis;
- document.iform.range_to.disabled = endis;
- }
- function show_advanced_config() {
- $('#show_advanced_box').slideToggle();
- $('#show_advanced').slideToggle();
- }
- </script>
- <form method='post' name='ifrm' action=''>
- <table width='100%' border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td colspan='2'>
- <table width="100%" border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td align='left' width="50%">
- <span class='title'>
- <?php
- if ($action == "update") {
- echo $text['header-xmpp-edit'];
- }
- else if ($action == "add") {
- echo $text['header-xmpp-add'];
- }
- ?>
- </span><br>
- </td> <td width='50%' align='right'>
- <input type='button' class='btn' name='' alt='back' onclick="window.location='xmpp.php'" value='<?php echo $text['button-back']?>'>
- <input type='submit' name='submit' class='btn' value='<?php echo $text['button-save']?>'>
- </td>
- </tr>
- <tr>
- <td align='left' colspan='2'>
- <?php echo $text['description-xmpp-edit-add']?><br />
- </td>
- </tr>
- </table>
- <br />
- </td>
- </tr>
- <tr>
- <td width="30%" class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-profile_name']?>:
- </td>
- <td width="70%" class='vtable' align='left'>
- <input class='formfld' type='text' name='profile_name' maxlength='255' value="<?php echo escape($profile['profile_name']); ?>" required='required'>
- <br />
- <?php echo $text['description-profile_name']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-username']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='profile_username' autocomplete='off' maxlength='255' value="<?php echo escape($profile['profile_username']);?>" required='required'>
- <br />
- <?php echo $text['description-username']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-password']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='password' name='profile_password' autocomplete='off' id='profile_password' maxlength='50' onmouseover="this.type='text';" onfocus="this.type='text';" onmouseout="if (!$(this).is(':focus')) { this.type='password'; }" onblur="this.type='password';" value="<?php echo escape($profile['profile_password']);?>" required='required'>
- <br />
- <?php echo $text['description-password']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-auto_login']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='auto_login'>
- <option value='true' <?php if($profile['auto_login'] == "true") echo "selected='selected'"; ?>><?php echo $text['label-true']?></option>
- <option value='false' <?php if($profile['auto_login'] == "false") echo "selected='selected'"; ?>><?php echo $text['label-false']?></option>
- </select>
- <br />
- <?php echo $text['description-auto_login']?>
- </td>
- </tr>
- <tr>
- <td width='30%' class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-xmpp_server']?>:
- </td>
- <td width='70%' class='vtable' align='left'>
- <input class='formfld' type='text' name='xmpp_server' maxlength='255' value="<?php echo escape($profile['xmpp_server']);?>">
- <br />
- <?php echo $text['description-xmpp_server']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-default_exten']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='default_exten' maxlength='255' value="<?php echo escape($profile['default_exten']);?>" required='required'>
- <br />
- <?php echo $text['description-default_exten']?>
- </td>
- </tr>
- <tr>
- <td style='padding: 0px;' colspan='2' class='' valign='top' align='left' nowrap='nowrap'>
- <div id="show_advanced_box">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <td width="30%" valign="top" class="vncell"> </td>
- <td width="70%" class="vtable">
- <input type="button" class="btn" onClick="show_advanced_config()" value="<?php echo $text['button-advanced']?>"></input>
- </td>
- </tr>
- </table>
- </div>
- <div id="show_advanced" style="display:none">
- <table width="100%" border="0" cellpadding="6" cellspacing="0">
- <tr>
- <?php if (if_group("superadmin")) { ?>
- <td width='30%' class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-context']?>:
- </td>
- <td width='70%' class='vtable' align='left'>
- <input class='formfld' type='text' name='context' maxlength='255' value="<?php echo escape($profile['context']);?>" required='required'>
- <br />
- <?php echo $text['description-context']?>
- </td>
- </tr>
- <?php } ?>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-rtp_ip']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='rtp_ip' maxlength='255' value="<?php echo escape($profile['rtp_ip']);?>" required='required'>
- <br />
- <?php echo $text['description-rtp_ip']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-ext_rtp_ip']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='ext_rtp_ip' maxlength='255' value="<?php echo escape($profile['ext_rtp_ip']);?>" required='required'>
- <br />
- <?php echo $text['description-ext_rtp_ip']?>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-sasl_type']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='sasl_type'>
- <option value='plain' <?php if($profile['sasl_type'] == "plain") echo "selected='selected'"; ?>>Plain</option>
- <option value='md5' <?php if($profile['sasl_type'] == "md5") echo "selected='selected'"; ?>>MD5</option>
- </select>
- <br />
- <?php echo $text['description-sasl_type']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-tls_enable']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='tls_enable'>
- <option value='true' <?php if($profile['tls_enable'] == "true") echo "selected='selected'"; ?>><?php echo $text['label-true']?></option>
- <option value='false' <?php if($profile['tls_enable'] == "false") echo "selected='selected'"; ?>><?php echo $text['label-false']?></option>
- </select>
- <br />
- <?php echo $text['description-tls_enable']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-use_rtp_timer']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='use_rtp_timer'>
- <option value='true' <?php if($profile['use_rtp_timer'] == "true") echo "selected='selected'"; ?>><?php echo $text['label-true']?></option>
- <option value='false' <?php if($profile['use_rtp_timer'] == "false") echo "selected='selected'"; ?>><?php echo $text['label-false']?></option>
- </select>
- <br />
- <?php echo $text['description-use_rtp_timer']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-vad']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='vad'>
- <option value='none' <?php if($profile['vad'] == "none") echo "selected='selected'"; ?>><?php echo $text['option-vad_none']?></option>
- <option value='in' <?php if($profile['vad'] == "in") echo "selected='selected'"; ?>><?php echo $text['option-vad_in']?></option>
- <option value='out' <?php if($profile['vad'] == "out") echo "selected='selected'"; ?>><?php echo $text['option-vad_out']?></option>
- <option value='both' <?php if($profile['vad'] == "both") echo "selected='selected'"; ?>><?php echo $text['option-vad_both']?></option>
- </select>
- <br />
- <?php echo $text['description-vad']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-candidate_acl']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='candidate_acl' maxlength='255' value="<?php echo escape($profile['candidate_acl']);?>">
- <br />
- <?php echo $text['description-candidate_acl']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-local_network_acl']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='local_network_acl' maxlength='255' value="<?php echo escape($profile['local_network_acl']);?>">
- <br />
- <?php echo $text['description-local_network_acl']?>
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- <tr>
- <td class='vncellreq' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-enabled']?>:
- </td>
- <td class='vtable' align='left'>
- <select class='formfld' name='enabled'>
- <option value='true' <?php if($profile['enabled'] == "true") echo "selected='selected'"; ?>><?php echo $text['label-true']?></option>
- <option value='false' <?php if($profile['enabled'] == "false") echo "selected='selected'"; ?>><?php echo $text['label-false']?></option>
- </select>
- <br />
- <?php echo $text['description-enabled']?>
- </td>
- </tr>
- <tr>
- <td class='vncell' valign='top' align='left' nowrap='nowrap'>
- <?php echo $text['label-description']?>:
- </td>
- <td class='vtable' align='left'>
- <input class='formfld' type='text' name='description' value='<?php echo escape($profile['description']);?>'>
- <br />
- <?php echo $text['description-description']?>
- </td>
- </tr>
- <tr>
- <td colspan='2' align='right'>
- <input type='hidden' name='profile_id' value='<?php echo escape($profile['xmpp_profile_uuid']); ?>'>
- <br>
- <input type='submit' name='submit' class='btn' value='<?php echo $text['button-save']?>'>
- </td>
- </tr>
- </table>
- <br><br>
- </form>
|