$price_1cat[] = $row; } echo "<pre>"; print_r($price_1cat); echo "</pre>"; foreach ($price_1cat as $div) { $id = $div['goods_id']; $price = round($div['goodshascategory_price'] * $percent); $query = "UPDATE goodshascategory SET goodshascategory_active=1, " . "goodshascategory_price={$price} " . "WHERE goods_id={$id} AND category_id={$cat1a}"; if ($price != 0) { mysqli_query($db_connect, $query); echo $query . "<br>"; } $query = "UPDATE goods SET goods_price={$price} WHERE goods_id={$id}"; if ($price != 0) { mysqli_query($db_connect, $query); echo $query . "<br>"; } } } } $time_end = microtime(true); $time = $time_end - $time_start; echo "Время выполнения скрипта: {$time} секунд\n"; } //vika add_cat(119, 129, 4, true); //katun //add_cat(17,542,5,true); //uyut //add_cat(33,620,4,true);
break; case 'add_feature': add_feature(); break; case 'edit_feature': edit_feature(); break; case 'modify_feature': modify_feature(); list_feature(); break; case 'list_cat': list_cat(); break; case 'add_cat': add_cat(); break; case 'edit_cat': edit_cat(); break; case 'del_cat': del_cat(); list_cat(); break; case 'list_order': list_order(); break; case 'edit_order': edit_order(); break; case 'modify_order':
?action=process'"> <?php //echo 'hello:'; //echo get_search_set(20, '20'); if ($_REQUEST['cat'] == '') { $_REQUEST['cat'] = 0; } $new_cat = $_REQUEST['new_cat']; if ($new_cat != '') { if (strlen($new_cat) > 0) { if ($_REQUEST['allow_records'] == 'ON') { $allow_records = 'Y'; } else { $allow_records = 'N'; } add_cat($new_cat, $_REQUEST['cat'], $_SESSION[form_id], $allow_records); echo "{$new_cat} Category added."; format_cat_translation_table(0); if ($_REQUEST['save'] != '' && CACHE_ENABLED == 'YES') { $CACHE_ENABLED = 'NO'; include '../include/codegen_functions.php'; update_category_cache(0); $CACHE_ENABLED = 'YES'; } } else { echo "category name was left blank. Please retry.<br>"; } } if ($action == 'edit') { //if ($_SESSION['MDS_LANG'] == "EN") { if ($_REQUEST['allow_records'] == 'ON') {