naks - PHP Online

Form of PHP Sandbox

Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php in the places where the PHP script should be executed.



Your result can be seen below.

Result of php executing





Full code of naks.php

  1. <?php
  2. if ((in_array($itemId,[17958,9527,1024,1026,16904,15881,16905,11800,1053,16935,15402,15403,15404,15406,15407,15408,15410,15411,15412,15275,15413,15415,15416,15417,15419,15932,15933,14397,15438,15439,15440,15441,15442,15443,15445,15446,15447,15457,15460,15461,15462,15465,15466,8813,15477,15478,15479,15480,8825,8826,15481,15482,15487,2202,18075,2204,2205,2207,16036,13989,16037,16039,16040,2217,2218,16041,15196,2222,2223,2224,2225,2226,2227,16046,16047,16049,16048,16050,2233,2234,9401,9402,9403,16053,16056,16057,15201,15200,15202,12490,15203,15205,15206,15308,9437,9438,15207,15588,15589,15209,14062,14063,15602,15609,15610,15611,14081,15215,16648,16649,15539,17677,17678,17680,18710,18711,15218,15219,15220,15540,15543,15221,9523,9525,9526,15541,15170,15171,15172,9541,10750,9542,15176,15177,15178,15179,15180,15183,15184,15185,15187,15188,15542,15189,15190,10073,15195,15708,15709,15710,15198,15712,15713,15714,15715,15716,15717,15718,15199,15208,15721,15210,15211,15212,15204,15214,15727,15728,15217,15730,15731,15732,15733,12660,12661,15736,15737,12662,12663,12664,15741,12665,12666,12667,12668,12669,15742,15743,15544,15753,15754,15256,15257,15258,15259,15260,15773,15261,15775,15262,15778,15783,15272,15273,15786,15787,15788,9643,15278,15791,15792,15793,15794,15276,15277,15279,15798,2494,2495,17861,17862,17863,18889,15306,15819,15820,15821,15822,15823,15310,15307,15305,15309,15828,15829,15830,15831,15832,15835,15836,15841,15842,15335,15336,15853,15854,15855,15856,15857,1008,1011,1010,1012,16370,15866,15867,15868,15869,15870,16895,22649,22693,22652,22659,22661,22666,22669,22679,22694,22643,22645,22647,22650,22651,22653,22655,22656,22657,22658,22660,22662,22663,22667,22668,22670,22672,22697,22695,22685,22687,22688,22640,22654,22684,22639,22641,22642,22677,22678,22702,22681,22682,22683,22686,22690,22691,22696,22704,22710,22698,22700,22699,22701,22703,22705,22706,22707,22708,22709,22711,22712,22713,22714,22715,22716,22069,22070,22077,22074,22073,22075])
  3.             || (in_array($item["group_id"],[1, 2, 3, 4, 5]) && in_array($item["manufacturer"],['Kemppi', 'Telwin', 'Lorch', 'Сэлма', 'Эсва', 'Форсаж', 'Lincoln Electric', 'КЕДР']))
  4.             || ($item["rod_type"] == "Вольфрамовый" && $item["manufacturer"] == "КЕДР")
  5.             || $item["group_id"] == 6 && $item["manufacturer"] == "Deka" && $item["welding_wire_type"] == "Омедненная")
  6.         && !in_array($itemId,[1015,9573,23130])) {
  7.         return '<div data-v_popup="naks"><span class="naks"><span><a href="#">Доступно с НАКС</a></span></span></div>';
  8.     }
  9.     
  10.     
  11. SELECT * FROM welding_catalog_catalog1_items WHERE id IN (17958,9527,1024,1026,16904,15881,16905,11800,1053,16935,15402,15403,15404,15406,15407,15408,15410,15411,15412,15275,15413,15415,15416,15417,15419,15932,15933,14397,15438,15439,15440,15441,15442,15443,15445,15446,15447,15457,15460,15461,15462,15465,15466,8813,15477,15478,15479,15480,8825,8826,15481,15482,15487,2202,18075,2204,2205,2207,16036,13989,16037,16039,16040,2217,2218,16041,15196,2222,2223,2224,2225,2226,2227,16046,16047,16049,16048,16050,2233,2234,9401,9402,9403,16053,16056,16057,15201,15200,15202,12490,15203,15205,15206,15308,9437,9438,15207,15588,15589,15209,14062,14063,15602,15609,15610,15611,14081,15215,16648,16649,15539,17677,17678,17680,18710,18711,15218,15219,15220,15540,15543,15221,9523,9525,9526,15541,15170,15171,15172,9541,10750,9542,15176,15177,15178,15179,15180,15183,15184,15185,15187,15188,15542,15189,15190,10073,15195,15708,15709,15710,15198,15712,15713,15714,15715,15716,15717,15718,15199,15208,15721,15210,15211,15212,15204,15214,15727,15728,15217,15730,15731,15732,15733,12660,12661,15736,15737,12662,12663,12664,15741,12665,12666,12667,12668,12669,15742,15743,15544,15753,15754,15256,15257,15258,15259,15260,15773,15261,15775,15262,15778,15783,15272,15273,15786,15787,15788,9643,15278,15791,15792,15793,15794,15276,15277,15279,15798,2494,2495,17861,17862,17863,18889,15306,15819,15820,15821,15822,15823,15310,15307,15305,15309,15828,15829,15830,15831,15832,15835,15836,15841,15842,15335,15336,15853,15854,15855,15856,15857,1008,1011,1010,1012,16370,15866,15867,15868,15869,15870,16895,22649,22693,22652,22659,22661,22666,22669,22679,22694,22643,22645,22647,22650,22651,22653,22655,22656,22657,22658,22660,22662,22663,22667,22668,22670,22672,22697,22695,22685,22687,22688,22640,22654,22684,22639,22641,22642,22677,22678,22702,22681,22682,22683,22686,22690,22691,22696,22704,22710,22698,22700,22699,22701,22703,22705,22706,22707,22708,22709,22711,22712,22713,22714,22715,22716,22069,22070,22077,22074,22073,22075)
  12.  OR group_id IN (1, 2, 3, 4, 5) AND manufacturer IN ('Kemppi', 'Telwin', 'Lorch', 'Сэлма', 'Эсва', 'Форсаж', 'Lincoln Electric', 'КЕДР')
  13.  OR rod_type="Вольфрамовый" AND manufacturer="КЕДР"
  14.  OR group_id=6 AND manufacturer="Deka" AND welding_wire_type="Омедненная"
  15.  AND id NOT IN (1015,9573,23130)
File Description
  • naks
  • PHP Code
  • 18 Feb-2020
  • 4.84 Kb
You can Share it: