You should have received a copy of the GNU General Public License
along with Manufacturersimports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = 0;
}
if (!isset($_GET["preconfig"])) {
    $_GET["preconfig"] = -1;
}
$config = new PluginManufacturersimportsConfig();
$model = new PluginManufacturersimportsModel();
if (isset($_POST["add"])) {
    Session::checkRight("plugin_manufacturersimports", CREATE);
    $config->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        Session::checkRight("plugin_manufacturersimports", UPDATE);
        $config->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            Session::checkRight("plugin_manufacturersimports", PURGE);
            $config->delete($_POST, true);
            Html::redirect("./config.form.php");
        } else {
            if (isset($_POST["update_model"])) {
                Session::checkRight("plugin_manufacturersimports", UPDATE);
                $model->addModel($_POST);
Example #2
0
You should have received a copy of the GNU General Public License
along with Manufacturersimports. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
include '../../../inc/includes.php';
if (!isset($_GET["id"])) {
    $_GET["id"] = 0;
}
if (!isset($_GET["preconfig"])) {
    $_GET["preconfig"] = -1;
}
$config = new PluginManufacturersimportsConfig();
$model = new PluginManufacturersimportsModel();
if (isset($_POST["add"])) {
    Session::checkRight("config", "w");
    $newID = $config->add($_POST);
    Html::back();
} else {
    if (isset($_POST["update"])) {
        Session::checkRight("config", "w");
        $config->update($_POST);
        Html::back();
    } else {
        if (isset($_POST["delete"])) {
            Session::checkRight("config", "w");
            $config->delete($_POST, 1);
            Html::redirect("./config.form.php");
        } else {
            if (isset($_POST["update_model"])) {
                $model->addModel($_POST);
                Html::back();