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>
|
<h3><?php if (!$id) { __("New Statistics"); } else { __("Edit Statistics"); } ?></h3>
|
||||||
<hr id="topbar"/>
|
<hr id="topbar"/>
|
||||||
<br />
|
<br />
|
||||||
|
<?php __("Awstats will analyze every logs availables for this domain (since its creation).");?>
|
||||||
|
<br/>
|
||||||
|
<br/>
|
||||||
<?php
|
<?php
|
||||||
if (isset($error) && $error) {
|
if (isset($error) && $error) {
|
||||||
echo "<p class=\"error\">$error</p></body></html>";
|
echo "<p class=\"error\">$error</p></body></html>";
|
||||||
|
@ -87,17 +90,6 @@ foreach($r as $v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
?></td></tr>
|
?></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>
|
</select>
|
||||||
</td></tr>
|
</td></tr>
|
||||||
<tr class="trbtn"><td colspan="2">
|
<tr class="trbtn"><td colspan="2">
|
||||||
|
|
|
@ -28,12 +28,11 @@ $fields = array (
|
||||||
"hostname" => array ("post", "string", ""),
|
"hostname" => array ("post", "string", ""),
|
||||||
"awsusers" => array ("post", "array", ""),
|
"awsusers" => array ("post", "array", ""),
|
||||||
"hostaliases" => array ("post", "array", ""),
|
"hostaliases" => array ("post", "array", ""),
|
||||||
"public" => array ("post", "integer", "")
|
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
if ($aws->check_host_available($hostname)) {
|
if ($aws->check_host_available($hostname)) {
|
||||||
$r=$aws->add_stats($hostname,$awsusers,$hostaliases,$public);
|
$r=$aws->add_stats($hostname,$awsusers,$hostaliases,1);
|
||||||
if (!$r) {
|
if (!$r) {
|
||||||
$error=$err->errstr();
|
$error=$err->errstr();
|
||||||
include("aws_add.php");
|
include("aws_add.php");
|
||||||
|
|
|
@ -25,17 +25,23 @@
|
||||||
require_once("../class/config.php");
|
require_once("../class/config.php");
|
||||||
|
|
||||||
$fields = array (
|
$fields = array (
|
||||||
"prefixe" => array ("request", "string", ""),
|
"prefixe" => array ("request", "string", ""),
|
||||||
"login" => array ("request", "string", ""),
|
"login" => array ("request", "string", ""),
|
||||||
"pass" => array ("request", "string", ""),
|
"pass" => array ("request", "string", ""),
|
||||||
|
"passconf" => array ("request", "string", "")
|
||||||
);
|
);
|
||||||
getFields($fields);
|
getFields($fields);
|
||||||
|
|
||||||
$r=$aws->add_login($prefixe.(($login)?"_":"").$login,$pass);
|
if ($pass != $passconf) {
|
||||||
if (!$r) {
|
$error = _("Passwords do not match");
|
||||||
$error=$err->errstr();
|
}else{
|
||||||
} else {
|
$r=$aws->add_login($prefixe.(($login)?"_":"").$login,$pass);
|
||||||
$error=_("The Awstat account has been successfully created");
|
|
||||||
|
if (!$r) {
|
||||||
|
$error=$err->errstr();
|
||||||
|
} else {
|
||||||
|
$error=_("The Awstat account has been successfully created");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
include("aws_users.php");
|
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" />
|
<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>
|
</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="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">
|
<tr class="trbtn"><td colspan="2">
|
||||||
<input type="submit" class="inb" name="submit" value="<?php __("Create this new awstat account"); ?>" />
|
<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'"/>
|
<input type="button" class="inb" name="cancel" value="<?php __("Cancel"); ?>" onclick="document.location='aws_list.php'"/>
|
||||||
|
|
Loading…
Reference in New Issue