Yangi formatda davom etish uchun: https://uzfor.net/view.php?id=736&page=34
Johncms bo'yicha umumiy savollar
Mavzu fayllari (121)
Xabarlar
Mirkom, kutubxona bo'limini modlang, umuman olganda kutubxona sayt uchun kerak modlari bor, modlash ham shart emas
MasteR-Habibi, salom shu emasmi
Kodlar (+/-)
public static function display_date($times)
{
$pl = function ($int, $arr) {
if ($int > 10 && $int < 15) {
$out = ' '. $arr[2];
} elseif (($int % 10) == 1) {
$out = ' '. $arr[0];
} elseif (($int % 10) > 1 && ($int % 10) < 5) {
$out = ' '. $arr[1];
} else {
$out = ' '. $arr[2];
}
return $int . $out;
};
$time = time();
$label = $time - $times;
$shift = (self::$system_set['timeshift']
+ self::$user_set['timeshift']) * 3600;
$w = 'секунд';
$arrSec = [$w .'у', $w .'ы', $w];
$w = 'минут';
$arrMin = [$w .'у', $w .'ы', $w];
$back = ' назад';
if ($label == 0) {
$timesp = 'Только что';
} elseif ($label < 60) {
$timesp = $pl($label, $arrSec) . $back;
} elseif ($label < 3600) {
$timesp = $pl(intval($label / 60), $arrMin) . $back;
} else {
$today = date('j M Y', $time + $shift);
$yesterday = date('j M Y', strtotime('-1 day'));
$timesp = date('j M Y в H:i', $times + $shift);
$timesp = str_replace($today, 'Сегодня', $timesp);
$timesp = str_replace($yesterday, 'Вчера', $timesp);
$timesp = strtr(
$timesp,
[
'Jan' => 'Янв',
'Feb' => 'Фев',
'Mar' => 'Марта',
'May' => 'Мая',
'Apr' => 'Апр',
'Jun' => 'Июня',
'Jul' => 'Июля',
'Aug' => 'Авг',
'Sep' => 'Сент',
'Oct' => 'Окт',
'Nov' => 'Ноября',
'Dec' => 'Дек'
]
);
}
return $timesp;
}
{
$pl = function ($int, $arr) {
if ($int > 10 && $int < 15) {
$out = ' '. $arr[2];
} elseif (($int % 10) == 1) {
$out = ' '. $arr[0];
} elseif (($int % 10) > 1 && ($int % 10) < 5) {
$out = ' '. $arr[1];
} else {
$out = ' '. $arr[2];
}
return $int . $out;
};
$time = time();
$label = $time - $times;
$shift = (self::$system_set['timeshift']
+ self::$user_set['timeshift']) * 3600;
$w = 'секунд';
$arrSec = [$w .'у', $w .'ы', $w];
$w = 'минут';
$arrMin = [$w .'у', $w .'ы', $w];
$back = ' назад';
if ($label == 0) {
$timesp = 'Только что';
} elseif ($label < 60) {
$timesp = $pl($label, $arrSec) . $back;
} elseif ($label < 3600) {
$timesp = $pl(intval($label / 60), $arrMin) . $back;
} else {
$today = date('j M Y', $time + $shift);
$yesterday = date('j M Y', strtotime('-1 day'));
$timesp = date('j M Y в H:i', $times + $shift);
$timesp = str_replace($today, 'Сегодня', $timesp);
$timesp = str_replace($yesterday, 'Вчера', $timesp);
$timesp = strtr(
$timesp,
[
'Jan' => 'Янв',
'Feb' => 'Фев',
'Mar' => 'Марта',
'May' => 'Мая',
'Apr' => 'Апр',
'Jun' => 'Июня',
'Jul' => 'Июля',
'Aug' => 'Авг',
'Sep' => 'Сент',
'Oct' => 'Окт',
'Nov' => 'Ноября',
'Dec' => 'Дек'
]
);
}
return $timesp;
}
BestMaker, # BestMaker (20.12.2017 / 11:51)
Yangi yilgacha qancha vaqt (kun, soat, daqiqa, soniya)qolganini ko'rsatadigan kod kimda bor?view.php?act=post&id=2006
Soat va daqiqalarini chiqaradiganini topa olmadim siz kabi -)
Yangi yilgacha qancha vaqt (kun, soat, daqiqa, soniya)qolganini ko'rsatadigan kod kimda bor?view.php?act=post&id=2006
Soat va daqiqalarini chiqaradiganini topa olmadim siz kabi -)
uddaburon, # uddaburon (20.12.2017 / 12:52)
Mana
echo '<script src="http://masteruz.lark.ru/js/newyear.js"></script>';bu faqat kunni ko'rsatyabdi. Php kodlisi yo'qmi?
Mana
echo '<script src="http://masteruz.lark.ru/js/newyear.js"></script>';bu faqat kunni ko'rsatyabdi. Php kodlisi yo'qmi?
BestMaker, buni ko'ringchi
Rahmat aytdi (1): Жасурбек,
Biriktirilgan fayllar [1]:
— newyear.zip (0.88 KB) (156 ↴)
— newyear.zip (0.88 KB) (156 ↴)
ERKIN7717, # ERKIN7717 (20.12.2017 / 13:31)
BestMaker, buni ko'ringchi2 soat oldinda ekan qanday togirlaymiz, 11 soat qoldi deb yozib quyibdi aslida 9 soat qoldi
BestMaker, buni ko'ringchi2 soat oldinda ekan qanday togirlaymiz, 11 soat qoldi deb yozib quyibdi aslida 9 soat qoldi
ERKIN7717, # ERKIN7717 (20.12.2017 / 15:09)
BestMaker, saytingizdagi bazani soatini to'g'irlang menda to'g'ri ishlayaptikuIshladi
BestMaker, saytingizdagi bazani soatini to'g'irlang menda to'g'ri ishlayaptikuIshladi
Döstlar yordam kerak?
johncmsda link history degan modni örnatdim har sahifani bazaga yozib boryapti lekin har kungi link history ustuni bazada avtomatik tozalamas ekan. Endi har kungi link history ustuni ochistit qilib turishim kerak shunga php sahifa tuzishga yordam beringlar cronga qöyib qöyaman yangilanib turadi yordam
johncmsda link history degan modni örnatdim har sahifani bazaga yozib boryapti lekin har kungi link history ustuni bazada avtomatik tozalamas ekan. Endi har kungi link history ustuni ochistit qilib turishim kerak shunga php sahifa tuzishga yordam beringlar cronga qöyib qöyaman yangilanib turadi yordam
Tavsiya etamiz:
- Hoziroq maydonlarni to'ldiring va reklamangizni joylashtiring!
Mavzuga oid xabarlar soni: 3101 ta
So'ngi faollik vaqti: 15:21:31, 19 Apr 2022