Skip to content

Commit

Permalink
$action == 'default'
Browse files Browse the repository at this point in the history
  • Loading branch information
r23 committed Oct 15, 2023
1 parent 069eeb6 commit 83c25ce
Show file tree
Hide file tree
Showing 25 changed files with 53 additions and 96 deletions.
3 changes: 3 additions & 0 deletions myoos/admin/edit_orders.php
Expand Up @@ -43,6 +43,9 @@
$php_self = filter_var($_SERVER['PHP_SELF'], FILTER_SANITIZE_URL);
$step = $_GET['step'] ?? $_POST['step'] ?? 1;
$oID = filter_input(INPUT_GET, 'oID', FILTER_VALIDATE_INT);
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';



$update_products = isset($_POST['update_products']) ? oos_db_prepare_input($_POST['update_products']) : '';
$update_totals = isset($_POST['update_totals']) ? oos_db_prepare_input($_POST['update_totals']) : '';
Expand Down
4 changes: 1 addition & 3 deletions myoos/admin/featured.php
Expand Up @@ -48,8 +48,7 @@ function oos_set_featured_status($featured_id, $status)
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';
$fID = filter_input(INPUT_GET, 'fID', FILTER_VALIDATE_INT);

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'setflag':
if (isset($_GET['id']) && is_numeric($_GET['id'])) {
oos_set_featured_status($_GET['id'], $_GET['flag']);
Expand Down Expand Up @@ -83,7 +82,6 @@ function oos_set_featured_status($featured_id, $status)

oos_redirect_admin(oos_href_link_admin($aContents['featured'], 'page=' . $nPage));
break;
}
}

require 'includes/header.php';
Expand Down
8 changes: 2 additions & 6 deletions myoos/admin/geo_zones.php
Expand Up @@ -55,8 +55,7 @@ function oosGetGeoZoneName($geo_zone_id)

$saction = filter_string_polyfill(filter_input(INPUT_GET, 'saction')) ?: 'default';

if (!empty($saction)) {
switch ($saction) {
switch ($saction) {
case 'insert_sub':
$zID = oos_db_prepare_input($_GET['zID']);
$zone_country_id = oos_db_prepare_input($_POST['zone_country_id']);
Expand Down Expand Up @@ -89,13 +88,11 @@ function oosGetGeoZoneName($geo_zone_id)

oos_redirect_admin(oos_href_link_admin($aContents['geo_zones'], 'zpage=' . $nzPage . '&zID=' . $_GET['zID'] . '&action=list&spage=' . $nsPage));
break;
}
}

$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert_zone':
$geo_zone_name = oos_db_prepare_input($_POST['geo_zone_name']);
$geo_zone_description = oos_db_prepare_input($_POST['geo_zone_description']);
Expand Down Expand Up @@ -128,7 +125,6 @@ function oosGetGeoZoneName($geo_zone_id)

oos_redirect_admin(oos_href_link_admin($aContents['geo_zones'], 'zpage=' . $nzPage));
break;
}
}

require 'includes/header.php';
Expand Down
3 changes: 2 additions & 1 deletion myoos/admin/gv_mail.php
Expand Up @@ -246,7 +246,8 @@
$messageStack->add(sprintf(NOTICE_EMAIL_SENT_TO, $_GET['mail_sent_to']), 'notice');
}

require 'includes/header.php';
require 'includes/header.php';

?>
<div class="wrapper">
<!-- Header //-->
Expand Down
2 changes: 1 addition & 1 deletion myoos/admin/gv_queue.php
Expand Up @@ -128,7 +128,7 @@
}
}

require 'includes/header.php';
require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
8 changes: 3 additions & 5 deletions myoos/admin/information.php
Expand Up @@ -28,8 +28,7 @@
$iID = filter_input(INPUT_GET, 'iID', FILTER_VALIDATE_INT);
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'setflag':
if (isset($_GET['flag']) && ($_GET['flag'] == '0')) {
$dbconn->Execute(
Expand Down Expand Up @@ -114,10 +113,9 @@

oos_redirect_admin(oos_href_link_admin($aContents['information'], 'page=' . $nPage));
break;

}
}
require 'includes/header.php';

require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
9 changes: 4 additions & 5 deletions myoos/admin/languages.php
Expand Up @@ -26,8 +26,7 @@
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'setflag':
$lID = oos_db_prepare_input($_GET['lID']);

Expand Down Expand Up @@ -705,10 +704,10 @@
$messageStack->add(ERROR_REMOVE_DEFAULT_LANGUAGE, 'error');
}
break;
}
}
$lang_select_array = [['id' => '0', 'text' => TEXT_ALL_LANGUAGES], ['id' => '1', 'text' => TEXT_ACTIVE_LANGUAGES]];
require 'includes/header.php';

$lang_select_array = [['id' => '0', 'text' => TEXT_ALL_LANGUAGES], ['id' => '1', 'text' => TEXT_ACTIVE_LANGUAGES]];
require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
7 changes: 3 additions & 4 deletions myoos/admin/manual_loging.php
Expand Up @@ -94,15 +94,14 @@ function oos_set_login_status($man_info_id, $status)
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'setflag':
oos_set_login_status($_GET['id'], $_GET['flag']);
oos_redirect_admin(oos_href_link_admin($aContents['manual_loging'], ''));
break;
}
}
require 'includes/header.php';

require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
7 changes: 3 additions & 4 deletions myoos/admin/manufacturers.php
Expand Up @@ -42,8 +42,7 @@ function oos_get_manufacturer_url($manufacturer_id, $language_id = '')
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert':
case 'save':
if (isset($_GET['mID'])) {
Expand Down Expand Up @@ -184,9 +183,9 @@ function oos_get_manufacturer_url($manufacturer_id, $language_id = '')

oos_redirect_admin(oos_href_link_admin($aContents['manufacturers'], 'page=' . $nPage));
break;
}
}
require 'includes/header.php';

require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
4 changes: 1 addition & 3 deletions myoos/admin/modules.php
Expand Up @@ -56,8 +56,7 @@

$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'save':

$aKeys = [];
Expand Down Expand Up @@ -120,7 +119,6 @@
}
oos_redirect_admin(oos_href_link_admin($aContents['modules'], 'set=' . $set . '&module=' . $class));
break;
}
}

require 'includes/header.php';
Expand Down
4 changes: 1 addition & 3 deletions myoos/admin/newsletters.php
Expand Up @@ -25,8 +25,7 @@
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';
$nID = filter_input(INPUT_GET, 'nID', FILTER_VALIDATE_INT);

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'lock':
case 'unlock':
$status = (($action == 'lock') ? '1' : '0');
Expand Down Expand Up @@ -104,7 +103,6 @@
oos_redirect_admin(oos_href_link_admin($aContents['newsletters'], 'page=' . $nPage . '&nID=' . $nID));
}
break;
}
}

require 'includes/header.php';
Expand Down
6 changes: 1 addition & 5 deletions myoos/admin/orders.php
Expand Up @@ -18,7 +18,6 @@
Released under the GNU General Public License
---------------------------------------------------------------------- */


define('OOS_VALID_MOD', 'yes');
require 'includes/main.php';

Expand Down Expand Up @@ -104,8 +103,7 @@ function oos_get_languages_id($iso_639_2)
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'update_order':
$oID = oos_db_prepare_input($_GET['oID']);
$comments = isset($_POST['comments']) ? oos_db_prepare_input($_POST['comments']) : '';
Expand Down Expand Up @@ -205,8 +203,6 @@ function oos_get_languages_id($iso_639_2)

oos_redirect_admin(oos_href_link_admin($aContents['orders'], oos_get_all_get_params(['oID', 'action'])));
break;

}
}

if (($action == 'edit') && isset($_GET['oID'])) {
Expand Down
6 changes: 2 additions & 4 deletions myoos/admin/orders_status.php
Expand Up @@ -83,8 +83,7 @@ function oos_get_orders_status()
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert':
case 'save':
$orders_status_id = oos_db_prepare_input($_GET['oID']);
Expand Down Expand Up @@ -157,10 +156,9 @@ function oos_get_orders_status()
}
}
break;
}
}

require 'includes/header.php';
require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down
17 changes: 8 additions & 9 deletions myoos/admin/plugins.php
Expand Up @@ -18,16 +18,15 @@
Released under the GNU General Public License
---------------------------------------------------------------------- */

define('OOS_VALID_MOD', 'yes');
require 'includes/main.php';
require 'includes/functions/function_modules.php';
define('OOS_VALID_MOD', 'yes');
require 'includes/main.php';
require 'includes/functions/function_modules.php';

$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

$installed = explode(';', (string) MODULE_PLUGIN_EVENT_INSTALLED);
$installed = explode(';', (string) MODULE_PLUGIN_EVENT_INSTALLED);

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'save':
foreach ($_POST['configuration'] as $key => $value) {
$configurationtable = $oostable['configuration'];
Expand Down Expand Up @@ -136,8 +135,8 @@
}
oos_redirect_admin(oos_href_link_admin($aContents['plugins'], 'plugin=' . $_GET['plugin']));
break;
}
}

}

$sLocaleDir = OOS_ABSOLUTE_PATH . 'includes/plugins/';
$aDirectory = [];
Expand Down
5 changes: 1 addition & 4 deletions myoos/admin/product_model_viewer.php
Expand Up @@ -29,8 +29,7 @@
$cPath = (isset($_GET['cPath']) ? oos_prepare_input($_GET['cPath']) : $current_category_id);
$pID = filter_input(INPUT_GET, 'pID', FILTER_VALIDATE_INT) ?: 0;

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert_model':
case 'update_model':

Expand Down Expand Up @@ -176,8 +175,6 @@
oos_redirect_admin(oos_href_link_admin($aContents['categories'], 'cPath=' . oos_prepare_input($cPath) . '&pID=' . $products_id));
}
break;

}
}

require 'includes/header.php';
Expand Down
5 changes: 1 addition & 4 deletions myoos/admin/product_video.php
Expand Up @@ -32,8 +32,7 @@
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;


if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert_video':
case 'update_video':

Expand Down Expand Up @@ -186,8 +185,6 @@
oos_redirect_admin(oos_href_link_admin($aContents['categories'], 'cPath=' . oos_prepare_input($cPath) . '&page=' . intval($nPage) . '&pID=' . intval($products_id)));
}
break;

}
}

require 'includes/header.php';
Expand Down
5 changes: 1 addition & 4 deletions myoos/admin/product_webgl_gltf.php
Expand Up @@ -30,8 +30,7 @@
$cPath = (isset($_GET['cPath']) ? oos_prepare_input($_GET['cPath']) : $current_category_id);
$pID = filter_input(INPUT_GET, 'pID', FILTER_VALIDATE_INT) ?: 0;

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert_model':
case 'update_model':

Expand Down Expand Up @@ -211,8 +210,6 @@
oos_redirect_admin(oos_href_link_admin($aContents['categories'], 'cPath=' . oos_prepare_input($cPath) . '&pID=' . $products_id));
}
break;

}
}

require 'includes/header.php';
Expand Down
4 changes: 1 addition & 3 deletions myoos/admin/products_attributes.php
Expand Up @@ -116,8 +116,7 @@
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'add_product_options':
for ($i = 0, $n = is_countable($aLanguages) ? count($aLanguages) : 0; $i < $n; $i ++) {
$option_name = oos_db_prepare_input($_POST['option_name']);
Expand Down Expand Up @@ -443,7 +442,6 @@
$dbconn->Execute("DELETE FROM $products_attributes_downloadtable WHERE products_attributes_id = '" . intval($_GET['attribute_id']) . "'");
oos_redirect_admin(oos_href_link_admin($aContents['products_attributes'], $page_info));
break;
}
}


Expand Down
10 changes: 4 additions & 6 deletions myoos/admin/products_status.php
Expand Up @@ -60,8 +60,7 @@ function oos_get_products_status()
$nPage = filter_input(INPUT_GET, 'page', FILTER_VALIDATE_INT) ?: 1;
$action = filter_string_polyfill(filter_input(INPUT_GET, 'action')) ?: 'default';

if (!empty($action)) {
switch ($action) {
switch ($action) {
case 'insert':
case 'save':
$products_status_id = oos_db_prepare_input($_GET['psID']);
Expand Down Expand Up @@ -122,11 +121,10 @@ function oos_get_products_status()
$remove_status = false;
$messageStack->add(ERROR_REMOVE_DEFAULT_ORDER_STATUS, 'error');
}
break;

}
break;
}
require 'includes/header.php';

require 'includes/header.php';
?>
<div class="wrapper">
<!-- Header //-->
Expand Down

0 comments on commit 83c25ce

Please sign in to comment.