-
+2
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
...
<tr>
<td class=ArtelAdminTableTdCaption>Заголовок
<td><input type=text name=f[caption] value="<?=$row['sct_caption']?>" size=50 style=width:340>
</tr>
</table>
</tr>
<tr>
<td><input type=submit name=save_Goods_supcatalog3s value="Сохранить">
</tr>
</form>
</table>
...
WOW! WOW! WOW!
tutov2013,
03 Сентября 2015
-
+3
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
// чето у меня совсем хуёво с сортировками
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS) {
return -1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] != static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] != static::STORAGE_TYPE_5DAYS)
) {
return -1;
}
if (($a['TYPE_CODE'] != static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] != static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS)
) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS)
) {
return $a['ID'] < $b['ID'] ? -1 : 1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS) {
return -1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] != static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] != static::STORAGE_TYPE_7DAYS)
) {
return -1;
}
if (($a['TYPE_CODE'] != static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] != static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS)
) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_MAIN && $b['TYPE_CODE'] == static::STORAGE_TYPE_MAIN)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS)
) {
return $a['ID'] < $b['ID'] ? -1 : 1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS) {
return -1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] != static::STORAGE_TYPE_5DAYS)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] != static::STORAGE_TYPE_7DAYS)
) {
return -1;
}
if (($a['TYPE_CODE'] != static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS)
|| ($a['TYPE_CODE'] != static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS)
) {
return 1;
}
if (($a['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_5DAYS)
|| ($a['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS && $b['TYPE_CODE'] == static::STORAGE_TYPE_7DAYS)
) {
return $a['ID'] < $b['ID'] ? -1 : 1;
}
if ($a['TYPE_CODE'] == static::STORAGE_TYPE_COMING && $b['TYPE_CODE'] == static::STORAGE_TYPE_COMING) {
$aTs = MakeTimeStamp($a['UF_ARRIVAL_DATE']);
$bTs = MakeTimeStamp($b['UF_ARRIVAL_DATE']);
return $aTs < $bTs ? -1 : ($aTs > $bTs ? 1 : 0);
}
return 1;
n1ce22rus,
03 Сентября 2015
-
+9
- 1
for($S='a';$S<'z';){${$S++}=$S;};$$S='a';echo $$$$$$$$$S.($S=$$$$$$S).($S=$$$$$$$$S).$S.($S=$$$$S).' '.$$$$$$$$$S.$S.($S=$$$$S).$$$$$$$$$$$$$$$$$$$$$S.$$$$$$$$$$$$$S;
Порт hello world с брейнфака
m0003r,
02 Сентября 2015
-
+3
- 1
- 2
foreach($arResult['ITEMS'] as $key => &$arItem) {
$priceRes2 = CIBlockElement::GetList(array(), array("IBLOCK_ID" => 34, "PROPERTY_PERIOD" => 1, "PROPERTY_PERIOD_TYPE" => 85, "PROPERTY_OBJECT_RELATION" => $arItem['ID']), false, false, array("NAME"));
"Я программист 1C-bitrix и с каждой новой итерацией я делаю новый запрос к инфоблоку."
tutov2013,
01 Сентября 2015
-
+7
- 1
void parse_csv_string_string_string_string(string in_file, vector<string>& spectrum_id_list, vector<string>& file_name_list, vector<string>& name_list, vector<string>& id_list) {
– Дяденька, осторожно, у вас клавиатура солидолом намазана...
Yuuri,
31 Августа 2015
-
+3
- 1
- 2
- 3
- 4
- 5
if (!$('#enable-continious').is(':checked') && $('#enable-continious').is(':checked')) {
...
} else {
...
}
Продолжаем находить великие письмена великих людей на проекте. К слову, человек на позиции Senior PHP Developer является автором.
Un3Solka,
31 Августа 2015
-
+3
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
- 90
- 91
- 92
- 93
$(document).ready(function() {
if ($('.delivery_type:checked').val() != 0) {
var delivery = $('.delivery_type:checked').val();
if (delivery == '0') {
$('.payment_panel').hide;
return (false);
}
}
$('.delivery_type').change(function() {
if ($(this).val() == 4) {
$('#d_text').html($('#d_text_u').val());
$('#dostav').show();
}
if ($(this).val() == 8) {
$('#d_text').html($('#d_text_np').val());
$('#dostav').show();
}
if ($('#d_day').val() <= 5 || ($('#d_day').val() == 5 && $('#d_time').val() < 15)) {
if ($(this).val() >= 1 && $(this).val() <= 3 && $('#d_time').val() < 15) {
$('#d_text').html($('#d_text_m11').val());
$('#dostav').show();
}
if (($(this).val() == 7 || $(this).val() == 11) && $('#d_time').val() < 15) {
$('#d_text').html($('#d_text_m21').val());
$('#dostav').show();
}
if ($(this).val() >= 1 && $(this).val() <= 3 && $('#d_time').val() >= 15) {
$('#d_text').html($('#d_text_m12').val());
$('#dostav').show();
}
if (($(this).val() == 7 || $(this).val() == 11) && $('#d_time').val() >= 15) {
$('#d_text').html($('#d_text_m22').val());
$('#dostav').show();
}
} else {
if ($('#d_day').val() < 7 || ($('#d_day').val() == 7 && $('#d_time').val() < 15)) {
if ($(this).val() >= 1 && $(this).val() <= 3) {
$('#d_text').html($('#d_text_m31').val());
$('#dostav').show();
}
if (($(this).val() == 7 || $(this).val() == 11)) {
$('#d_text').html($('#d_text_m32').val());
$('#dostav').show();
}
} else {
if ($(this).val() >= 1 && $(this).val() <= 3) {
$('#d_text').html($('#d_text_m33').val());
$('#dostav').show();
}
if (($(this).val() == 7 || $(this).val() == 11)) {
$('#d_text').html($('#d_text_m34').val());
$('#dostav').show();
}
}
}
if ($(this).val() == 10 || $(this).val() == 9) {
$('#dostav').hide();
}
if ($(this).val() > 0 && $(this).val() != 4) {
if ($(this).val() == 1) {
$('#address').val('ул. ******, 13/14');
}
if ($(this).val() == 2) {
$('#address').val('ул. ******, 127');
}
if ($(this).val() == 3) {
$('#address').val('пр. ******, 98/2');
}
if ($(this).val() == 7) {
$('#address').val('ул. ********, 8');
}
if ($(this).val() == 11) {
$('#address').val('пр. ******, 66');
}
} else {
$('#address').val('');
}
var delivery = $(this).val();
$('.dop_fields').hide();
$('.dop_fields span').html('');
$('.only_ukr').hide();
$('.only_kur').hide();
$('.only_sv').hide();
$('.only_novp').hide('');
if (delivery == 4) {
$('.only_ukr').show();
$('.ukr span').html('*');
$('.dop_fields').show();
}
Выбор способа доставки в интернет магазине
NotFake,
31 Августа 2015
-
+1
- 1
- 2
- 3
- 4
- 5
{% if _view.data['User']['bday']|date("Y") != "2100" %}
<input id="UserBDay" type="text" name="data[User][bday]" class="txt" placeholder="mm/dd/YYYY" value="{% if _view.data['User']['bday'] != '1970-01-01' %} {{ _view.data['User']['bday']|date("m/d/Y") }} {% endif %}">
{% else %}
<input id="UserBDay" type="text" name="data[User][bday]" class="txt" placeholder="mm/dd/YYYY" value="{% if _view.data['User']['bday'] != '1970-01-01' %} {{ _view.data['User']['bday']|date("m/d/") }} {% endif %}">
{% endif %}
Вот так вот мы обращаемся с датами рождения.
SergeyKaravay,
28 Августа 2015
-
+8
- 1
- 2
- 3
- 4
// Init function
function init() {
...
}
Не говнокод, но инвормативные и полезные комментарии - это хорошо.
keitoaino,
28 Августа 2015
-
+1
- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
switch ($result[$j]) {
case 0: $res .= $result[$j];
break;
case 1: $res .= $result[$j];
break;
case 2: $res .= $result[$j];
break;
case 3: $res .= $result[$j];
break;
case 4: $res .= $result[$j];
break;
case 5: $res .= $result[$j];
break;
case 6: $res .= $result[$j];
break;
case 7: $res .= $result[$j];
break;
case 8: $res .= $result[$j];
break;
case 9: $res .= $result[$j];
break;
case 10: $res .= "a";
break;
case 11: $res .= "b";
break;
case 12: $res .= "c";
break;
case 13: $res .= "d";
break;
case 14: $res .= "e";
break;
case 15: $res .= "f";
break;
case 16: $res .= "g";
break;
}
p0p,
27 Августа 2015