Exemplo n.º 1
0
    ?>
</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");
    ?>
" onclick="document.location='sql_list.php'"/>
</td></tr>
</table>
Exemplo n.º 2
0
    &nbsp; |&nbsp;
  <input type="submit" class="ina" name="actcopy" value="<?php 
    __("Copy");
    ?>
" onClick=" return actmoveto_not_empty();"/>
    <input type="submit" class="ina" name="actmove" value="<?php 
    __("Move");
    ?>
" onClick=" return actmoveto_not_empty();"/>
    <?php 
    __("To");
    ?>
 
    <input type="text" class="int" id='actmoveto' name="actmoveto" value="" />
    <?php 
    display_browser("", "main.actmoveto");
    ?>

    </td></tr>

    </table>

<script type="text/javascript">
function actmoveto_not_empty() {
  if ( $('#actmoveto').val() =='' ) {
    alert("<?php 
    __("Please select a destination folder");
    ?>
");
    return false;
  }
Exemplo n.º 3
0
@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");
?>
</label></th>
      <td><input type="password" class="int" name="pass" id="pass" size="20" maxlength="64" value=""/><?php 
display_div_generate_password(DEFAULT_PASS_SIZE, "#pass", "#passconf");
Exemplo n.º 4
0
<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">
Exemplo n.º 5
0
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 
}