Protection de l'accès à la config par la fonction accessforbidden.
This commit is contained in:
parent
20994125c2
commit
411fe42634
@ -21,6 +21,10 @@
|
|||||||
*/
|
*/
|
||||||
require("./pre.inc.php");
|
require("./pre.inc.php");
|
||||||
|
|
||||||
|
if (!$user->admin)
|
||||||
|
accessforbidden();
|
||||||
|
|
||||||
|
|
||||||
if ($action == 'nbprod' && $user->admin)
|
if ($action == 'nbprod' && $user->admin)
|
||||||
{
|
{
|
||||||
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'PROPALE_NEW_FORM_NB_PRODUCT', value='".$value."', visible=0";
|
$sql = "REPLACE INTO ".MAIN_DB_PREFIX."const SET name = 'PROPALE_NEW_FORM_NB_PRODUCT', value='".$value."', visible=0";
|
||||||
@ -35,12 +39,6 @@ if ($action == 'nbprod' && $user->admin)
|
|||||||
|
|
||||||
llxHeader();
|
llxHeader();
|
||||||
|
|
||||||
if (!$user->admin)
|
|
||||||
{
|
|
||||||
print "Forbidden";
|
|
||||||
llxfooter();
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($action == 'set')
|
if ($action == 'set')
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user