РЕШЕНО Unable to save changes on Admin Panel - admin/config - Password Wrong

Статус
Закрыто для дальнейших ответов.

itshim7

Местный
Hi, I am unable to save the settings on Admin Panel, it says Password is Wrong. I am using the default Admin ID & Password. 1589627973685.png
 

itshim7

Местный
Hi, Thanks for the reply. following is the pages / admin / config file
A.
A.
A.
A.
<? PHP
if (! defined ('PSWeb') || PSWeb! == true) {Header ('Location: / 404'); return }
$ _OPTIMIZATION ["title"] = "Admin - Settings";
?>
<div class = "s-bk-lf">
<div class = "acc-title"> Settings </div>
</div>
<div class = "silver-bk"> <div class = "clr"> </div>
<? PHP
# Update
if (isset ($ _ POST ["admin"])) {
$ string = '';
# Check for errors
$ errors = array ();
$ admin = $ func-> IsLogin ($ _ POST ['admin']);
$ pass = $ func-> md5password ($ func-> IsPassword ($ _ POST ['pass']));
$ pass = $ func-> IsPassword ($ _ POST ['pass']);
$ ser_per_wmr = intval ($ _ POST ['ser_per_wmr']);
$ min_pay = intval ($ _ POST ['min_pay']);
$ percent_swap = intval ($ _ POST ['percent_swap']);
$ percent_sell = intval ($ _ POST ['percent_sell']);
$ items_per_coin = intval ($ _ POST ['items_per_coin']);
foreach ($ items as $ item => $ description) {
$ in_h = $ description ['char'] .'_ in_h ';
$$ in_h = floatval ($ _ POST [$ description ['char'] .'_ in_h ']);
if ($$ in_h <0.0001) {
$ errors [] = '<center> <font color = "red"> <b> Incorrect fertility setting per hour! Minimum 0.0001 </b> </font> </center> <BR /> ';
}
$ amount = 'amount _'. $ item;
$$ amount = floatval ($ _ POST ['amount _'. $ item]);
if ($$ amount <1) {
$ errors [] = '<center> <font color = "red"> <b> The minimum cost of a tree must not be less than 1 silver </b> </font> </center> <BR />';
}
$ string. = ',' '. $ in_h.'` = \' '. $$ in_h.' \ ', ``. $ amount.'` = \' '. $$ amount.' \ '';
}
if ($ admin === false) {
$ errors [] = '<center> <font color = "red"> <b> The administrator login is in the wrong format </b> </font> </center> <BR />';
}
if ($ pass! = $ db_config ['pass']) {
$ errors [] = '<center> <font color = "red"> <b> Password is invalid </b> </font> </center> <BR />';
}
if ($ min_pay <0) {
$ errors [] = '<center> <font color = "red"> <b> The minimum payout amount must not be less than 0 </b> </font> </center> <BR />';
}
if ($ percent_swap <1 OR $ percent_swap> 99) {
$ errors [] = '<center> <font color = "red"> <b> The added percentage during the exchange must be from 1 to 99 </b> </font> </center> <BR />';
}

if ($ percent_sell <1 OR $ percent_sell> 99) {
$ errors [] = '<center> <font color = "red"> <b>% of silver on withdrawal at sale should be from 1 to 99 </b> </font> </center> <BR />';
}

if ($ items_per_coin <1 OR $ items_per_coin> 50000) {
$ errors [] = '<center> <font color = "red"> <b> How many loot = 1 silver, there must be from 1 to 50,000 </b> </font> </center> <BR />';
}

# Update
if (empty ($ errors)) {
$ db-> Query ("UPDATE db_config SET
admin = '$ admin',
pass = '$ pass',
ser_per_wmr = '$ ser_per_wmr',
min_pay = '$ min_pay',
percent_swap = '$ percent_swap',
percent_sell = '$ percent_sell',
items_per_coin = '$ items_per_coin'
$ string
WHERE id = '1' ");
echo "<center> <font color = 'green'> <b> Saved </b> </font> </center> <BR />";
$ db-> Query ("SELECT * FROM db_config WHERE id = '1'");
$ db_config = $ db-> FetchArray ();
} else {
foreach ($ errors as $ error) {
echo $ error;
}
}

}

?>
<form action = "" method = "post">
<table width = "100%" border = "0">
<tr>
<td> <b> Admin Login: </b> </td>
<td width = "150" align = "center"> <input type = "text" name = "admin" value = "<? = $ db_config [" admin "];?>" /> </td>
</tr>
<tr>
<td> <b> Administrator Password: </b> </td>
<td width = "150" align = "center"> <input type = "password" name = "pass" value = "" /> </td>
</tr>

<tr>
<td> <b> Cost 1 RUB (Silver): </b> </td>
<td width = "150" align = "center"> <input type = "text" name = "ser_per_wmr" value = "<? = $ db_config [" ser_per_wmr "];?>" /> </td>
</tr>
<tr>
<td> <b> Minimum payout amount (Silver): </b> </td>
<td width = "150" align = "center"> <input type = "text" name = "min_pay" value = "<? = $ db_config [" min_pay "];?>" /> </td>
</tr>
<tr>
<td> <b> Add% upon exchange (1 to 99): </b> </td>
<td width = "150" align = "center"> <input type = "text" name = "percent_swap" value = "<? = $ db_config [" percent_swap "];?>" /> </td>
</tr>

<tr>
<td> <b>% silver on withdrawal upon sale (from 1 to 99): </b> <BR /> </td>
<td width = "150" align = "center"> <input type = "text" name = "percent_sell" value = "<? = $ db_config [" percent_sell "];?>" /> </td>
</tr>

<tr>
<td> <b> How many fruits = 1 silver: </b> </td>
<td width = "150" align = "center"> <input type = "text" name = "items_per_coin" value = "<? = $ db_config [" items_per_coin "];?>" /> </td>
</tr>
<tr>
<? PHP
foreach ($ items as $ item => $ description) {
echo '<tr>';
echo '<td> <b> Fertility per hour'. $ description ['name']. ': </b> </td>';
echo '<td width = "150" align = "center"> <input type = "text" name = "'. $ description ['char'] .'_ in_h" value = "'. $ db_config [$ description [' char '] .'_ in_h']. '"/> </td>';
echo '</tr>';
}
foreach ($ items as $ item => $ description) {
echo '<tr>';
echo '<td> <b> Silver value'. $ description ['name']. ': </b> </td>';
echo '<td width = "150" align = "center"> <input type = "text" name = "amount _'. $ item. '" value = "'. $ db_config ['amount _'. $ item]. ' "/> </td> ';
echo '</tr>';
}
?>
<tr> <td colspan = "2" align = "center"> <input type = "submit" value = "Save" /> </td> </tr>
</table>
</form>
</div>
 

itshim7

Местный
Hello, What do you mean by - Length 'pass' row 50 character ?
I guess mine is set to 20 characters.

1589785745350.png

I get this following error when I save md5 result into 'pass' row in db_config table

1589785894183.png

Thanks
 

pligin

Команда форума
Администратор
Статус
Закрыто для дальнейших ответов.
Верх