trim($_POST); if(!$objPromo->valid($_POST,$_FILES)){ $saveId = $objPromo->SaveNews($_POST,$_FILES); header("location:" . URL . "admin.php?action={$rule['action']}&modAction=products&ID={$_GET['ID']}"); } }elseif(isset($_GET['editID']) && $_GET['editID']>0){ $objPromo->admin_infoEditNewsOne($_GET['editID']); } $objPromo->displayNewsSave(); } elseif(isset($_GET['deleteID']) && $_GET['deleteID']>0){ $objPromo->admin_deleteNewsOne($_GET['deleteID']); header("location:" . URL . "admin.php?action={$rule['action']}&modAction=products&ID={$_GET['ID']}"); } else{ $objPromo->viewAllNews($_GET); $objPromo->displayNews(); } ?>