Skip to content

Commit

Permalink
add setflag
Browse files Browse the repository at this point in the history
  • Loading branch information
ClicShopping committed Jan 8, 2024
1 parent 20d4c2d commit 2f9af03
Showing 1 changed file with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<?php
/**
*
* @copyright 2008 - https://www.clicshopping.org
* @Brand : ClicShoppingAI(TM) at Inpi all right Reserved
* @Licence GPL 2 & MIT
* @Info : https://www.clicshopping.org/forum/trademark/
*
*/

namespace ClicShopping\Apps\Tools\AdministratorMenu\Sites\ClicShoppingAdmin\Pages\Home\Actions\AdministratorMenu;

use ClicShopping\OM\HTML;
use ClicShopping\OM\Registry;

use ClicShopping\Apps\Tools\AdministratorMenu\Classes\ClicShoppingAdmin\Status;

class SetFlag extends \ClicShopping\OM\PagesActionsAbstract
{
protected mixed $app;

public function __construct()
{
$this->app = Registry::get('AdministratorMenu');
}

public function execute()
{
if (($_GET['flag'] == 0) || ($_GET['flag'] == 1)) {
if (isset($_GET['cPath'])) {
$cPath = HTML::sanitize($_GET['cPath']);
} else {
$cPath = 0;
}

if (isset($_GET['cID'])) {
Status::getAministratorMenuStatus($_GET['cID'], (int)$_GET['flag']);
}
}

if (isset($_GET['cID'])) {
$this->app->redirect('AdministratorMenu&cPath=' . $cPath . '&cID=' . $_GET['cID']);
} else {
$this->app->redirect('AdministratorMenu&cPath=' . $cPath);
}
}
}

0 comments on commit 2f9af03

Please sign in to comment.