<tr class="lst"> <td><label for="<?php echo $key; ?> "><?php echo $qarray[$name]; ?> </label></td> <td><input type="text" class="int" size="16" maxlength="16" name="<?php echo $key; ?> " id="<?php echo $key; ?> " value="<?php ehe($value); ?> " /></td></tr> <?php } //foreach ?> </table> <br/> </div> <script type="text/javascript"> $("#div-quot-<?php echo md5($type); ?> ").toggle();
" /><?php __("Folder"); ?> </th> <td><code><?php echo $dir; ?> </code></td> </tr> <tr> <th><label for="user"><?php __("Username"); ?> </label></th> <td><input type="text" class="int" name="user" id="user" value="<?php ehe($user); ?> " size="20" maxlength="64" /></td> </tr> <tr> <th><label for="password"><?php __("Password"); ?> </label></th> <td><input type="password" class="int" name="password" id="password" value="" size="20" maxlength="64" /><?php display_div_generate_password(DEFAULT_PASS_SIZE, "#password", "#passwordconf"); ?> </td> </tr> <tr> <th><label for="passwordconf"><?php
?> </p> <?php exit; } if (isset($error) && $error) { echo "<p class=\"alert alert-danger\">{$error}</p>"; } ?> <form method="post" action="dom_doadd.php" id="main"> <p> <label for="newdomain"><b><?php __("Domain name"); ?> :</b></label> <span class="int" id="newdomwww">www.</span><input type="text" class="int" id="newdomain" name="newdomain" value="<?php ehe($newdomain); ?> " size="32" maxlength="255" /> <a class="inb configure" href="dom_import.php"><?php __("Advanced import"); ?> </a> </p> <p> <input type="checkbox" name="dns" class="inc" value="1" id="yndns"<?php cbox($dns == "1"); ?> /> <label for="yndns"><?php __("host my dns here"); ?> </label> </p>
?> </select> results per page </p> <p><input type="submit" value="Search" class="button" /></p> </fieldset> <fieldset><legend>Search a file by name</legend> File name: <input type="text" name="file" id="file" size="30" maxlength="60" class="text" value="<?php ehe($view["file"]); ?> " /> <input type="submit" value="Search by attach filename" class="button" /></fieldset> <fieldset><legend>Directly go to a document by ID</legend> Document-ID: <input type="text" name="docid" id="docid" size="9" maxlength="9" class="text" value="<?php ehe($view["docid"]); ?> " /> <input type="submit" value="GO" class="button" /></fieldset> </form> </div> <hr> <?php if ($view["grandtotal"] == 0) { if ($view["q"] != "" || $view["file"] != "") { ?> <div class="flash warning">Your search returned no result, please try something else</div> <?php
cbox($r["gzip"] == 1); ?> /><label for="bck_gzip1"><?php __("Yes"); ?> </label><br /> </td> </tr> <tr> <th><label for="bck_dir"><?php __("In which folder do you want to store the backups?"); ?> </label></th> <td><input type="text" class="int" name="bck_dir" id="bck_dir" size="30" maxlength="255" value="<?php @ehe($r["dir"]); ?> " /> <?php display_browser(isset($r["dir"]) ? $r["dir"] : "", "main.bck_dir"); ?> </td> </tr> <tr class="trbtn"><td colspan="2"> <input class="inb ok" type="submit" name="submit" value="<?php __("Change the MySQL backup parameters"); ?> " /> <input type="button" class="inb cancel" name="cancel" value="<?php __("Cancel");
<form method="post" action="adm_mxaccount.php" name="main" id="main"> <table class="tedit"> <tr><th><label for="newlogin"><?php __("Login"); ?> </label></th><th><label for="newpass"><?php __("Password"); ?> </label></th></tr> <tr> <td><input type="text" class="int" value="<?php ehe($newlogin); ?> " id="newlogin" name="newlogin" maxlength="64" size="32" /><br/><br/></td> <td><input type="password" class="int" value="<?php ehe($newpass); ?> " id="newpass" name="newpass" maxlength="64" size="32" /><?php display_div_generate_password(DEFAULT_PASS_SIZE, "#newpass"); ?> </td> </tr> <tr class="trbtn"><td colspan="2"> <input type="submit" value="<?php __("Add this account to the allowed list"); ?> " class="inb" /> </td></tr> </table> </form>
<a href="ftp_edit.php?id=<?php ehe($id); ?> "><?php __("Edit the ftp account"); ?> </a> </span> <?php __("that exists in this folder"); ?> <?php } else { ?> <span class="ina"> <a href="ftp_edit.php?create=1&dir=<?php ehe($R); ?> "><?php __("Create an ftp account in this folder"); ?> </a> </span> <?php } ?> <p> </p> <p> <span class="ina"> <a href="bro_pref.php"><?php __("Configure the file editor"); ?>
<p> <input type="hidden" name="caller" value="<?php echo $caller; ?> " /> <input type="hidden" name="lastcurdir" value="<?php echo $curdir; ?> " /> <input type="hidden" name="bid" value="<?php echo $bid; ?> " /> <input type="text" class="int" id="file" name="file" size="20" value="<?php ehe($file); ?> " /><br /> <input type="button" name="select" value="<?php __("Select"); ?> " class="inb" onclick="retour();" /> <input type="button" name="cancel" value="<?php __("Cancel"); ?> " class="inb" onclick="window.parent.jQuery('#<?php echo $bid; ?> ').dialog('close');" /> </p>
</label></th> <td><input type="text" class="int" name="nom" id="nom" value="<?php ehe($r["nom"]); ?> " size="20" maxlength="128" /> / <input type="text" class="int" name="prenom" id="prenom" value="<?php ehe($r["prenom"]); ?> " size="20" maxlength="128" /></td> </tr> <tr> <th><label for="nmail"><?php __("Email address"); ?> </label></th> <td><input type="text" class="int" name="nmail" id="nmail" value="<?php ehe($r["mail"]); ?> " size="30" maxlength="128" /></td> </tr> <tr> <th><label for="type"><?php __("Account type"); ?> </label></th> <td><select name="type" id="type" class="inl"> <?php eoption($quota->listtype(), $r['type'], true); ?> </select> <input type="checkbox" name="reset_quotas" id="reset_quotas" class="inc" /><label for="reset_quotas"><?php __("Reset quotas to default?"); ?>
</label></th> <td><input class="int" type="text" id="nom" name="nom" value="<?php ehe($nom); ?> " size="16" maxlength="128" /> / <input type="text" name="prenom" id="prenom" value="<?php ehe($prenom); ?> " class="int" size="16" maxlength="128" /></td> </tr> <tr> <th><label for="nmail"><?php __("Email address"); ?> </label></th> <td><input type="text" name="nmail" id="nmail" class="int" value="<?php ehe($nmail); ?> " size="30" maxlength="128" /></td> </tr> <tr> <th><label for="type"><?php __("Account type"); ?> </label></th> <td><select name="type" id="type" class="inl"> <?php eoption($quota->listtype(), 'default', true); ?> </select> </td> </tr>
<form method="post" action="hta_doadd.php" name="main" id="main"> <table border="1" cellspacing="0" cellpadding="4" class='tedit'> <tr> <th><label for="dir"><?php __("Folder"); ?> </label></th> <td> <input type="text" class="int" name="dir" id="dir" value="<?php isset($dir) ?: ($dir = ""); ehe($dir); ?> " maxlength="255" /> <?php display_browser(ehe($dir, false), "main.dir"); ?> </td> </tr> </table> <br /> <input type="submit" class="inb lock" value="<?php __("Protect this folder"); ?> " onClick="return false_if_empty('dir', '<?php echo addslashes(_("Can't have empty directory.")); ?> ');" /> </form> <script type="text/javascript">
<td><select class="inl" name="prefixe"><?php @$ftp->select_prefix_list($rr[0]["prefixe"]); ?> </select> <b>_</b> <input type="text" class="int" name="login" id="login" value="<?php @ehe($rr[0]["login"]); ?> " size="20" maxlength="64" /></td> </tr> <tr> <th><label for="dir"><?php __("Folder"); ?> </label></th> <td> <input type="text" class="int" name="dir" id="dir" value="<?php empty($dir) ? @ehe("/" . $rr[0]["dir"]) : @ehe($dir); ?> " size="20" maxlength="64" /> <?php display_browser(empty($dir) ? "/" . (isset($rr[0]["dir"]) ? $rr[0]["dir"] : '') : $dir, "main.dir"); ?> <p><?php __("This is the root folder for this FTP user. i.e. this FTP user can access to this forlder and all its sub-folders."); ?> </p> </td> </tr> <tr id='ftp_tr_pass1'> <th><label for="pass"><?php __("Password");
/** * Affiche un bouton pour selectionner un dossier sur le serveur * * @param string $dir * @param string $caller * @param int $width * @param int $height */ function display_browser($dir = "", $caller = "main.dir", $width = 350, $height = 450) { // Browser id $bid = "b" . rand(1, 1000); echo "<script type=\"text/javascript\">\n <!--\n \$(function() {\n \$( \"#" . $bid . "\" ).dialog({\n autoOpen: false,\n width: " . $width . ",\n height: " . $height . ",\n modal: true,\n open: function()\n {\n \$('.ui-widget-overlay').css('opacity', .70);\n \$('.ui-dialog-content').css('background-color', '#F0F0FA');\n },\n });\n \n \$( \"#bt" . $bid . "\" )\n .button()\n .attr(\"class\", \"ina\")\n .click(function() {\n \$( \"#" . $bid . "\" ).dialog( \"open\" );\n return false;\n });\n });\n \n \n document.write(' <input type=\"button\" id=\"bt" . $bid . "\" value=\"" . _("Choose a folder...") . "\" class=\"ina\">');\n document.write('<div id=\"" . $bid . "\" title=\"" . _("Choose a folder...") . "\" style=\"display: none; bgcolor:red;\">');\n document.write(' <iframe src=\"/browseforfolder2.php?caller=" . $caller . "&file=" . ehe($dir, false) . "&bid=" . $bid . "\" width=\"" . ($width - 40) . "\" height=\"" . ($height - 64) . "\" frameborder=\"no\" id=\"browseiframe\"></iframe>');\n document.write('</div>');\n // -->\n </script>\n "; }
?> <br /> <small><?php __("Warning : only some final tld are known in the whois function of AlternC, please check m_dom.php accordingly."); ?> </small> </p> <form method="post" action="adm_tlddoadd.php" name="main" id="main"> <table class="tedit"> <tr><th><label for="tld"><?php __("TLD"); ?> </label></th><td><input type="text" id="tld" name="tld" class="int" value="<?php ehe(isset($tld) ? $tld : ''); ?> " size="20" maxlength="64" /></td></tr> <tr><th><label for="mode"><?php __("Allowed Mode"); ?> </label></th><td><select name="mode" id="mode" class="inl"> <?php $admin->selecttldmode($mode); ?> </select></td></tr> <tr class="trbtn"><td colspan="2"> <input type="submit" class="inb" value="<?php __("Add a new TLD"); ?> " />
<tr id='mail_edit_pass1'><td><label for="pass"><?php __("Enter a POP/IMAP password"); ?> </label></td><td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="32" autocomplete="off" /><?php display_div_generate_password(DEFAULT_PASS_SIZE, "#pass", "#passconf"); ?> </td></tr> <tr id='mail_edit_pass2'><td><label for="passconf"><?php __("Confirm password"); ?> </label></td><td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="32" autocomplete="off" /></td></tr> <tr><td><label for="quotamb"><?php __("Maximum allowed size of this Mailbox"); ?> </label></td><td><input type="text" class="int intleft" style="text-align: right" name="quotamb" id="quotamb" value="<?php ehe($quotamb); ?> " size="7" maxlength="6" /><span class="int intright"><?php __("MB"); ?> </span></td></tr> </table> </div> </td></tr> <?php if ($islocal) { ?> <tr id="turnoff"><td colspan="2" class="alert alert-warning"><?php __("WARNING: turning POP/IMAP off will DELETE the stored messages in this email address."); ?> </td></tr>
<form method="post" action="adm_slavedns.php" name="main" id="main"> <table class="tedit"> <tr><th><label for="newlogin"><?php __("Login"); ?> </label></th><th><label for="newpass"><?php __("Password"); ?> </label></th></tr> <tr> <td><input type="text" class="int" value="<?php ehe(isset($newlogin) ? $newlogin : ''); ?> " id="newlogin" name="newlogin" maxlength="64" size="32" /><br/><br/></td> <td><input type="password" class="int" value="<?php ehe(isset($newpass) ? $newpass : ''); ?> " id="newpass" name="newpass" maxlength="64" size="32" /><?php display_div_generate_password(DEFAULT_PASS_SIZE, "#newpass"); ?> </td> </tr> <tr class="trbtn"><td colspan="2"><input type="submit" value="<?php __("Add this account to the allowed list"); ?> " class="inb" /></td></tr> </table> </form> <script type="text/javascript"> document.forms['main'].setAttribute('autocomplete', 'off');
exit; } } ?> <form method="post" action="sql_users_doadd.php" id="main" name="main"> <table class="tedit"> <tr> <th><label for="usern"><?php __("Username"); ?> </label></th> <td><span class="int" id="usernpfx"><?php echo $mem->user["login"]; ?> _</span><input type="text" class="int" name="usern" id="usern" value="<?php ehe($usern); ?> " size="20" maxlength="20" /></td> </tr> <tr> <th><label for="password"><?php __("Password"); ?> </label></th> <td><input type="password" class="int" name="password" id="password" size="26"/><?php display_div_generate_password(DEFAULT_PASS_SIZE, "#password", "#passconf"); ?> </td> </tr> <tr> <th><label for="password"><?php
<div style="position: fixed; left: 20px; top: 60px; width: 800px; height: 48px;" id="messagebox"> <?php if (isset($_REQUEST["msg"])) { ?> <div id="alertmsg" class="alert alert-success"> <button type="button" class="close" data-dismiss="alert">×</button> <?php ehe($_REQUEST["msg"]); ?> </div> <script type="text/javascript"> $(document).ready( function () { window.setTimeout(function() { $("#alertmsg").fadeTo(500,0, function () { $("#alertmsg").alert('close'); } ) }, 3000); } ); </script> <?php } if (isset($_REQUEST["error"])) { ?> <div id="alertmsg" class="alert alert-error"> <button type="button" class="close" data-dismiss="alert">×</button> <?php ehe($_REQUEST["error"]); ?> </div> <script type="text/javascript"> $(document).ready( function () { window.setTimeout(function() { $("#alertmsg").fadeTo(500,0, function () { $("#alertmsg").alert('close'); } ) }, 3000); } ); </script> <?php } ?> </div>
<table border="1" cellspacing="0" cellpadding="4"> <tr><td colspan="2"><input type="hidden" name="usr" value="<?php echo $usr; ?> " /><input type="hidden" name="cookie" value="<?php echo $cookie; ?> " /> <?php __("Change the email of the account"); ?> <br /> <?php __("Enter the key you got when you requested the mailbox change, then click the OK button."); ?> </td></tr> <tr><th><label for="cle"><?php __("Key"); ?> </label></th><td><input type="text" class="int" name="cle" id="cle" value="<?php ehe($cle); ?> " size="8" maxlength="8" /></td></tr> <tr><td align="center" colspan="3"><input type="submit" class="inb" name="submit" value="<?php __("OK"); ?> " /></td></tr> </table> </form> <?php include_once "foot.php";
if ($_COOKIE["currentrelease"]) { ?> <td class="links"><a class="icon icon-fav" href="javascript:adddocnow(<?php echo doubleval($view["doc"]["id"]); ?> ,<?php echo doubleval($_COOKIE["currentrelease"]); ?> )" title="Add this doc to the current release">Add this doc to the current release</a></td> <?php } ?> <h2><?php ehe($view["doc"]["title"]); ?> </h2> <?php show_messages(); ?> <table class=""> <?php if (substr($view["doc"]["date"], 0, 10) != "1970-01-01") { ?> <tr> <th>Date</th> <td><?php
<?php $creator = $mem->get_creator_by_uid($member_id); $ml = array(); foreach ($admin->get_list() as $mid => $mlogin) { $ml[$mid] = $mlogin['login']; } echo _("See the vars for the account") . " "; echo "<select name='member_id'>"; eoption($ml, $member_id); echo "</select>"; echo " " . _("logged via") . " "; echo "<select name='fqdn_id'>"; eoption($dom->get_panel_url_list(), $fqdn_id); echo "</select> "; echo "<input type='submit' class='ina' value=\""; ehe(_("View")); echo "\" />"; ?> </form> <br/> <?php if ($member_id && $fqdn_id) { $sub_infos = $dom->get_sub_domain_all($fqdn_id); $domList = $dom->get_panel_url_list(); $fqdn = $domList[$fqdn_id]; $impersonated_conf = $variables->get_impersonated($fqdn, $member_id); echo sprintf(_("Here are values for members %s logged via %s"), '<b>' . $ml[$member_id] . '</b>', "<b>{$fqdn}</b>"); ?> <table class='tlist' id="tab_listvar_impers"> <?php
?> </td> <td><img src="images/check_no.png" alt="<?php __("Disabled"); ?> " /></td> <?php } else { if (!$val["type"]) { ?> <td align="center"> <input class="inc" type="checkbox" id="del_<?php echo $i; ?> " name="d[]" value="<?php ehe($val["id"]); ?> " /> </td> <td class="<?php echo $grey; ?> "> <div class="ina edit"><a href="mail_edit.php?mail_id=<?php echo $val["id"]; ?> "><?php __("Edit"); ?> </a></div></td> <td class="<?php
<?php echo "<p>"; __("Warning: Write the complete path and the filename. <br />For example if your backups are in the directory /Backups,<br />write /Backups/file.sql.gz (where file.sql.gz is the filename)."); echo "</p>"; ?> <form action="sql_dorestore.php" method="post"> <input type="hidden" name="id" value="<?php echo $id; ?> " /> <p><label for="restfile"><?php __("Please enter the path and the filename containing SQL data to be restored."); ?> </label></p> <p><input type="text" class="int" id="restfile" name="restfile" size="35" maxlength="255" value="<?php ehe($filename); ?> " /> <input class="inb" type="submit" name="submit" onClick='return restfilenotempty();' value="<?php __("Restore my database"); ?> " /><i><?php __("Tip: you can restore a file directly in the File Browser"); ?> </i></p> </form> <script type="text/javascript"> function restfilenotempty() { if ( $('#restfile').val() == '' ) { alert("<?php __("Please the complete path of the filename"); ?>
function add_var($stratatata, $stratatata_arr = null) { global $var, $allvars; echo "<div id='add_var_div_{$stratatata}'><form method=post>"; echo "<input type='hidden' name='strata' value='"; ehe($stratatata); echo "' />"; echo "<input type='hidden' name='var_name' value='"; ehe($var); echo "' />"; if (is_array($stratatata_arr)) { echo "<select name='strata_id'>"; eoption($stratatata_arr, null); echo "</select> "; } $infotype = $allvars['DEFAULT'][null][$var]['type']; if (is_array($infotype) && (isset($infotype['desc']) && isset($infotype['type']))) { var_input($infotype, "var_value"); } else { if (is_array($infotype) && !(isset($infotype['desc']) && isset($infotype['type']))) { echo "<ul>"; foreach ($allvars['DEFAULT'][null][$var]['type'] as $kk => $vv) { echo "<li>"; if (is_array($vv) && !(isset($vv['desc']) && isset($vv['type']))) { // if is an array but not the last array, used to contain DESC and TYPE echo $kk; echo "<ul>"; foreach ($vv as $ll => $mm) { echo "<li>"; var_input($infotype[$kk][$ll], "var_value_arr[{$kk}][{$ll}]"); echo "</li>"; } echo "</ul>"; } else { var_input($infotype[$kk], "var_value_arr[{$kk}]"); } echo "</li>"; } echo "</ul>"; } else { echo "<input type='text' class='int' name='var_value' value='' size='30' />"; } } echo "<br/>"; echo "<input type='button' class='inb cancel' name='cancel' value='" . _('Cancel') . "' onclick=\"\$('#add_var_div_{$stratatata}').toggle();\" />"; echo "<input type='submit' class='inb ok' value='" . _("Apply") . "'/>"; echo "</form></div>"; echo "<script type='text/javascript'>\$('#add_var_div_{$stratatata}').toggle();</script>"; }
function sub_domains_edit($domain, $sub_domain_id = false) { global $admin, $err, $oldid, $isedit; $dom = new m_dom(); $dom->lock(); if (!($r = $dom->get_domain_all($domain))) { $error = $err->errstr(); } /* if (! empty($sub)) { if (!$sd=$dom->get_sub_domain_all($domain,$sub,$type,$value)) { $error=$err->errstr(); } } */ $sd = $dom->get_sub_domain_all($sub_domain_id); $type = $sd['type']; $sub = $sd['name']; $dom->unlock(); ?> <form action="dom_subdoedit.php" method="post" name="main" id="main"> <table border="0"> <tr> <td> <input type="hidden" name="domain" value="<?php ehe($domain); ?> " /> <input type="hidden" name="sub_domain_id" value="<?php echo $sub_domain_id; ?> " /> <input type="hidden" name="action" value="add" /> <?php if ($isedit) { __("Edit a subdomain:"); } else { __("Create a subdomain:"); } ?> </td><td> <input type="text" class="int" name="sub" style="text-align:right" value="<?php ehe($sub); ?> " size="22" id="sub" /><span class="int" id="newsubname">.<?php echo $domain; ?> </span></td> </tr> <?php $first_advanced = true; $lst_advanced = array(); foreach ($dom->domains_type_lst() as $dt) { // If this type is disabled AND it's not the type in use here, continue if ($dt['enable'] == 'NONE' && strtoupper($type) != strtoupper($dt['name'])) { continue; } // If this type is only for ADMIN and i'm not an admin, continue (oldid is to check if we are an admin who take user identity) if ($dt['enable'] == 'ADMIN' && (!$admin->enabled and !intval($oldid))) { continue; } if (!$r['dns'] and $dt['need_dns']) { continue; } $targval = strtoupper($type) == strtoupper($dt['name']) ? $sd['dest'] : ''; if ($dt['advanced']) { $lst_advanced[] = $dt['name']; if ($first_advanced) { $first_advanced = false; echo "<tr><td colspan=\"2\" class=\"advdom\"></td></tr>"; echo "<tr id='domtype_show' onClick=\"domtype_advanced_show();\"><td colspan='2'><a href=\"javascript:domtype_advanced_show();\"><b>+ "; __("Show advanced options"); echo "</b></a></td></tr>"; echo "<tr id='domtype_hide' onClick=\"domtype_advanced_hide();\" style='display:none'><td colspan='2'><a href=\"javascript:domtype_advanced_hide();\"><b>- "; __("Hide advanced options"); echo "</b></a></td></tr>"; echo "<tr><td colspan=\"2\" class=\"advdom\"></td></tr>"; } } ?> <tr id="tr_<?php echo $dt['name']; ?> "> <td> <input type="radio" id="r_<?php echo $dt['name']; ?> " class="inc" name="type" value="<?php echo $dt['name']; ?> " <?php cbox(strtoupper($type) == strtoupper($dt['name'])); ?> OnClick="getElementById('t_<?php echo $dt['name']; ?> ').focus();"/> <label for="r_<?php echo $dt['name']; ?> "><?php __($dt['description']); ?> </label> </td> <td> <?php switch ($dt['target']) { case "DIRECTORY": ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe($targval); ?> " size="28" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <?php display_browser($targval, "main.t_" . $dt['name']); break; case "URL": ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe(empty($targval) ? 'http://' : $targval); ?> " size="50" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <small><?php __("(enter an URL here)"); ?> </small><?php break; case 'IP': ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe($targval); ?> " size="16" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <small><?php __("(enter an IPv4 address, for example 192.168.1.2)"); ?> </small><?php break; case 'IPV6': ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe($targval); ?> " size="32" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <small><?php __("(enter an IPv6 address, for example 2001:0910::0)"); ?> </small><?php break; case 'TXT': ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe($targval); ?> " size="32" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <small><?php __("(enter a TXT content for this domain)"); ?> </small><?php break; case 'DOMAIN': ?> <input type="text" class="int" name="t_<?php echo $dt['name']; ?> " id="t_<?php echo $dt['name']; ?> " value="<?php ehe($targval); ?> " size="32" onKeyPress="getElementById('r_<?php echo $dt['name']; ?> ').checked=true;" /> <small><?php __("(enter a domain name or subdomain)"); ?> </small><?php break; case "NONE": default: break; } // switch ?> </td> </tr> <?php } // foreach ?> <tr class="trbtn"> <td colspan="2"><input type="submit" class="inb ok" name="add" onclick='return check_type_selected();' value="<?php if ($isedit) { __("Edit this subdomain"); } else { __("Add this subdomain"); } ?> " /></td> </tr> </table> </form> <script type="text/javascript"> function check_type_selected() { if ( $('input[name=type]:radio:checked').val() ) { // there is a value var ll = $('input[name=type]:radio:checked').val(); var tt = $('#t_'+ll); if ( tt.length == 0 ) { // this element do not exist, so OK return true; } if ( tt.val() == '' ) { alert("<?php __("Missing value for this sub-domain"); ?> "); return false; } return true; } alert("<?php __("Please select a type for this sub-domain"); ?> "); return false; } function domtype_advanced_hide() { <?php foreach ($lst_advanced as $adv) { echo "\$(\"#tr_{$adv}\").hide();\n"; } ?> $("#domtype_show").show(); $("#domtype_hide").hide(); } function domtype_advanced_show() { <?php foreach ($lst_advanced as $adv) { echo "\$(\"#tr_{$adv}\").show();\n"; } ?> $("#domtype_show").hide(); $("#domtype_hide").show(); } <?php if (isset($type) && in_array($type, $lst_advanced)) { // if it's an edit of an advanced option, we need to show the advanced options ?> domtype_advanced_show(); <?php } else { ?> domtype_advanced_hide(); <?php } // if advanced ?> </script> <?php }