Fixes #1357
This commit is contained in:
parent
e881725cdb
commit
572137fccd
|
@ -38,6 +38,9 @@ include_once("head.php");
|
|||
<h3><?php if (!$id) { __("New Statistics"); } else { __("Edit Statistics"); } ?></h3>
|
||||
<hr id="topbar"/>
|
||||
<br />
|
||||
<?php __("Awstats will analyze every logs availables for this domain (since its creation).");?>
|
||||
<br/>
|
||||
<br/>
|
||||
<?php
|
||||
if (isset($error) && $error) {
|
||||
echo "<p class=\"error\">$error</p></body></html>";
|
||||
|
@ -87,17 +90,6 @@ foreach($r as $v) {
|
|||
}
|
||||
|
||||
?></td></tr>
|
||||
<tr><th><?php __("View public"); ?></th><td>
|
||||
<select class="inl" name="public" id="public">
|
||||
<?php
|
||||
// Public ?
|
||||
$pub=$aws->get_view_public($id);
|
||||
if($pub == 0) {
|
||||
echo "<option selected=\"selected\" value=\"0\">"._("Yes")."</option><option value=\"1\">"._("No")."</option>";
|
||||
} else {
|
||||
echo "<option selected=\"selected\" value=\"1\">"._("No")."</option><option value=\"0\">"._("Yes")."</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</td></tr>
|
||||
<tr class="trbtn"><td colspan="2">
|
||||
|
|
|
@ -28,12 +28,11 @@ $fields = array (
|
|||
"hostname" => array ("post", "string", ""),
|
||||
"awsusers" => array ("post", "array", ""),
|
||||
"hostaliases" => array ("post", "array", ""),
|
||||
"public" => array ("post", "integer", "")
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
if ($aws->check_host_available($hostname)) {
|
||||
$r=$aws->add_stats($hostname,$awsusers,$hostaliases,$public);
|
||||
$r=$aws->add_stats($hostname,$awsusers,$hostaliases,1);
|
||||
if (!$r) {
|
||||
$error=$err->errstr();
|
||||
include("aws_add.php");
|
||||
|
|
|
@ -25,17 +25,23 @@
|
|||
require_once("../class/config.php");
|
||||
|
||||
$fields = array (
|
||||
"prefixe" => array ("request", "string", ""),
|
||||
"login" => array ("request", "string", ""),
|
||||
"pass" => array ("request", "string", ""),
|
||||
"prefixe" => array ("request", "string", ""),
|
||||
"login" => array ("request", "string", ""),
|
||||
"pass" => array ("request", "string", ""),
|
||||
"passconf" => array ("request", "string", "")
|
||||
);
|
||||
getFields($fields);
|
||||
|
||||
$r=$aws->add_login($prefixe.(($login)?"_":"").$login,$pass);
|
||||
if (!$r) {
|
||||
$error=$err->errstr();
|
||||
} else {
|
||||
$error=_("The Awstat account has been successfully created");
|
||||
if ($pass != $passconf) {
|
||||
$error = _("Passwords do not match");
|
||||
}else{
|
||||
$r=$aws->add_login($prefixe.(($login)?"_":"").$login,$pass);
|
||||
|
||||
if (!$r) {
|
||||
$error=$err->errstr();
|
||||
} else {
|
||||
$error=_("The Awstat account has been successfully created");
|
||||
}
|
||||
}
|
||||
|
||||
include("aws_users.php");
|
||||
|
|
|
@ -48,6 +48,7 @@ if (!$r=$aws->list_login()) {
|
|||
<select class="inl" name="prefixe"><?php $aws->select_prefix_list($prefixe); ?></select> <b>_</b> <input type="text" class="int" name="login" id="login" value="" size="20" maxlength="64" />
|
||||
</td></tr>
|
||||
<tr><th><label for="pass"><?php __("Password"); ?></label></th><td><input type="password" class="int" name="pass" id="pass" value="" size="20" maxlength="64" /></td></tr>
|
||||
<tr><th><label for="passconf"><?php __("Confirm password"); ?></label></th><td><input type="password" class="int" name="passconf" id="passconf" value="" size="20" maxlength="64" /></td></tr>
|
||||
<tr class="trbtn"><td colspan="2">
|
||||
<input type="submit" class="inb" name="submit" value="<?php __("Create this new awstat account"); ?>" />
|
||||
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='aws_list.php'"/>
|
||||
|
|
Loading…
Reference in New Issue