Skip to content

Commit

Permalink
Content-Security-Policy
Browse files Browse the repository at this point in the history
  • Loading branch information
r23 committed Oct 20, 2023
1 parent e3b46b4 commit 304ba27
Show file tree
Hide file tree
Showing 34 changed files with 382 additions and 69 deletions.
12 changes: 10 additions & 2 deletions myoos/admin/admin_members.php
Expand Up @@ -647,5 +647,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
6 changes: 5 additions & 1 deletion myoos/admin/categories.php
Expand Up @@ -1568,6 +1568,8 @@ function resetBoxes() {


$products_count = 0;
$rows = 0;
$aDocument = [];
if (isset($_GET['search'])) {
$products_result = $dbconn->Execute("SELECT p.products_id, pd.products_name, p.products_quantity, p.products_reorder_level, p.products_image, p.products_price, p.products_base_price, p.products_base_unit, p.products_tax_class_id, p.products_date_added, p.products_last_modified, p.products_date_available, p.products_status, p.products_setting, p2c.categories_id, p.products_price_list, p.products_quantity_order_min, p.products_quantity_order_max, p.products_quantity_order_units, p.products_discount1, p.products_discount2, p.products_discount3, p.products_discount4, p.products_discount1_qty, p.products_discount2_qty, p.products_discount3_qty, p.products_discount4_qty, p.products_sort_order FROM " . $oostable['products'] . " p, " . $oostable['products_description'] . " pd, " . $oostable['products_to_categories'] . " p2c WHERE p.products_id = pd.products_id AND products_setting != 0 AND pd.products_languages_id = '" . intval($_SESSION['language_id']) . "' AND p.products_id = p2c.products_id AND pd.products_name like '%" . oos_db_input($_GET['search']) . "%' OR p.products_model like '%" . oos_db_input($_GET['search']) . "%' ORDER BY pd.products_name");
} else {
Expand All @@ -1594,7 +1596,9 @@ function resetBoxes() {
if (isset($pInfo) && is_object($pInfo) && ($products['products_id'] == $pInfo->products_id)) {
echo ' <tr>' . "\n";
} else {
echo ' <tr onclick="document.location.href=\'' . oos_href_link_admin($aContents['categories'], 'cPath=' . oos_prepare_input($cPath) . '&pID=' . $products['products_id']) . '\'">' . "\n";
$aDocument[] = ['id' => $rows,
'link' => oos_href_link_admin($aContents['categories'], 'cPath=' . oos_prepare_input($cPath) . '&pID=' . $products['products_id'])];
echo ' <tr id="row-' . $rows .'">' . "\n";
} ?>
<td><?php echo '<a href="' . oos_catalog_link($aCatalog['product_info'], 'products_id=' . $products['products_id']) . '" target="_blank" rel="noopener"><button class="btn btn-white btn-sm" type="button"><i class="fa fa-search"></i></button></a>&nbsp;' . '#' . $products['products_id'] . ' ' . $products['products_name']; ?></td>
<td><?php echo oos_get_manufacturers_name($products['products_id']) ?></td>
Expand Down
9 changes: 9 additions & 0 deletions myoos/admin/categories_slider.php
Expand Up @@ -525,4 +525,13 @@ function oos_set_slider_status($slider_id, $status)
echo '</script>' . "\n";
}

?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/content_block.php
Expand Up @@ -375,5 +375,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/content_page_type.php
Expand Up @@ -336,5 +336,13 @@ function oosGetPageType()

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/countries.php
Expand Up @@ -249,5 +249,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/coupon_admin.php
Expand Up @@ -1128,7 +1128,7 @@

<?php

$heading = [];
$heading = [];
$contents = [];

switch ($action) {
Expand Down Expand Up @@ -1235,5 +1235,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/currencies.php
Expand Up @@ -340,5 +340,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
10 changes: 9 additions & 1 deletion myoos/admin/customers.php
Expand Up @@ -929,5 +929,13 @@ function check_form() {

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/customers_status.php
Expand Up @@ -286,7 +286,7 @@
</tr>
</table></td>
<?php
$heading = [];
$heading = [];
$contents = [];

switch ($action) {
Expand Down Expand Up @@ -396,5 +396,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/geo_zones.php
Expand Up @@ -455,5 +455,13 @@ function update_zone(theForm) {

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
14 changes: 11 additions & 3 deletions myoos/admin/gv_queue.php
Expand Up @@ -232,7 +232,7 @@
</tr>
</table></td>
<?php
$unique_id = $gInfo->unique_id ?? '';
$unique_id = $gInfo->unique_id ?? '';
$date_created = $gInfo->date_created ?? '';
$amount = $gInfo->amount ?? 0;

Expand Down Expand Up @@ -283,5 +283,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
14 changes: 11 additions & 3 deletions myoos/admin/gv_sent.php
Expand Up @@ -135,7 +135,7 @@
</tr>
</table></td>
<?php
$coupon_id = $gInfo->coupon_id ?? '';
$coupon_id = $gInfo->coupon_id ?? '';
$coupon_amount = $gInfo->coupon_amount ?? 0;
$customer_id_sent = $gInfo->customer_id_sent ?? '';
$date_sent = $gInfo->date_sent ?? '';
Expand Down Expand Up @@ -197,5 +197,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
2 changes: 1 addition & 1 deletion myoos/admin/includes/classes/class_split_page_results.php
Expand Up @@ -106,7 +106,7 @@ public function display_links($query_numrows, $max_rows_per_page, $max_page_link
$display_links .= PREVNEXT_BUTTON_PREV . '&nbsp;&nbsp;';
}

$display_links .= sprintf(TEXT_RESULT_PAGE, oos_draw_pull_down_menu($page_name, '', $pages_array, '', 'onChange="this.form.submit();"'), $num_pages);
$display_links .= sprintf(TEXT_RESULT_PAGE, oos_draw_pull_down_menu($page_name, 'page', $pages_array, ''), $num_pages);

if (($current_page_number < $num_pages) && ($num_pages != 1)) {
$display_links .= '&nbsp;&nbsp;<a href="' . oos_href_link_admin(basename($php_self), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
Expand Down
12 changes: 10 additions & 2 deletions myoos/admin/information.php
Expand Up @@ -466,5 +466,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/languages.php
Expand Up @@ -924,5 +924,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/manual_loging.php
Expand Up @@ -201,7 +201,7 @@ function oos_set_login_status($man_info_id, $status)
</table></td></tr>
</table></td>
<?php
$heading = [];
$heading = [];
$contents = [];

switch ($action) {
Expand Down Expand Up @@ -256,5 +256,13 @@ function oos_set_login_status($man_info_id, $status)

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
9 changes: 9 additions & 0 deletions myoos/admin/manufacturers.php
Expand Up @@ -423,4 +423,13 @@ function oos_get_manufacturer_url($manufacturer_id, $language_id = '')
echo '</script>' . "\n";
}

?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/newsletters.php
Expand Up @@ -458,5 +458,13 @@

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/orders.php
Expand Up @@ -708,5 +708,13 @@ function oos_get_languages_id($iso_639_2)

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';
12 changes: 10 additions & 2 deletions myoos/admin/orders_status.php
Expand Up @@ -372,5 +372,13 @@ function oos_get_orders_status()

<?php
require 'includes/bottom.php';
require 'includes/nice_exit.php';
?>
?>
<script nonce="<?php echo NONCE; ?>">
// Add an event listener to the select element
document.getElementById('page').addEventListener('change', function() {
// Submit the form
this.form.submit();
});
</script>
<?php
require 'includes/nice_exit.php';

0 comments on commit 304ba27

Please sign in to comment.