Merhaba Hocam...
Site mukemmel.
Bana gore 1 eksik var oda parola sifirlama.
Parolami unutmustum. Bilgisayari degistirmistim. Bulamiyordum profilin parolasini. En son sana yazacakdim ki hocam nolur hesabimi geri ver.
passwords.google.com imdadima catdi.
Parola sifirlama eklersen iyi olur. Ellerine saglik
slider Content
$slider_data = $db->query("SELECT * FROM slider")->fetchAll(PDO::FETCH_ASSOC);
$content_slider = draw_slider_content($slider_data);
// Banner Content
$uslider_data = $db->query("SELECT * FROM under_slider")->fetchAll(PDO::FETCH_ASSOC);
$content_uslider = draw_uslider_content($uslider_data);
// Big Banner
$banner_data = $db->query("SELECT * FROM banner WHERE id=1")->fetch(PDO::FETCH_ASSOC);
$content_banner = draw_banner_content($banner_data);
// Latest Products
$latest = $db->query("SELECT * FROM products ORDER BY id DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC);
$latest_content = contentProductsIndexLatest($latest);
// Anbar
$stock = $db->query("SELECT * FROM products WHERE stock=1 ORDER BY id DESC LIMIT 10")->fetchAll(PDO::FETCH_ASSOC);
$stock_content = contentProductsIndexLatest($stock);
Sorgularim bunlar
@onlywhatchess Resim yukledim kodlar template den geldigi icin cok karisik ona gore atmadim
Ve ya Bir döngü içinde yazdıysan koşul yazıp, continue ile yapa bilirsin
foreach ($rows as $row) {
if($row["username"] == $_SESSION["name"]) {
continue;
}
}
gibi gibi
abs() -ni silmemişsindir sen :)
Buyur :)
Böyle dene
<?php
function time_left($date) {
$date2 = date("Y-m-d H:i:s");
$diff = strtotime($date) - strtotime($date2);
if($diff<0) {
echo " Coktan gecti be kardeşim...";
}
else {
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$weeks = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (7*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24)/ (60*60*24));
$hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24)/ (60*60));
$minutes = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24-$hours*60*60)/60);
$seconds = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24-$hours*60*60-$minutes*60));
$_years= ($years>0?$years." years ":""); //yil varsa goster
$_months =($months>0?$months." months ":""); //ay varsa goster
$_weeks = ($weeks>0?$weeks." weeks ":""); //hafta varsa goster
$_days =($days>0?$days." days ":""); //gun varsa goster
$_hours = ($hours>0?$hours." hours ":"");//saat varsa goster
$_minutes = ($minutes>0?$minutes." minutes ":""); //dakika varsa goster
$_seconds =($seconds>0?$seconds." seconds ":""); //saniye varsa goster
echo $_years.$_months.$_weeks.$_days.$_hours.$_minutes.$_seconds;
}
}
time_left("2021-01-9 15:15:15");
?>
@qplot eger oyle yapsam gerek her uye icin olusturum o kurali. Oda bana uygun deyil. Bu arada php ile yaziyorum.
@aydinkeskin yazdigin kod çalışıyor fakat ben `
file_get_content()`
fonksiyonu ile çekiyorum contenti. kodu kullandıkda çekmek olmuyor
Buyur. Kalsın bende kullanırım :)
<?php
function time_left($date) {
$date2 = date("Y-m-d H:i:s");
$diff = abs(strtotime($date2) - strtotime($date));
$years = floor($diff / (365*60*60*24));
$months = floor(($diff - $years * 365*60*60*24) / (30*60*60*24));
$weeks = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24)/ (7*60*60*24));
$days = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24)/ (60*60*24));
$hours = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24)/ (60*60));
$minutes = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24-$hours*60*60)/60);
$seconds = floor(($diff - $years * 365*60*60*24 - $months*30*60*60*24-$weeks*7*60*60*24-$days*60*60*24-$hours*60*60-$minutes*60));
$_years= ($years>0?$years." years ":""); //yil varsa goster
$_months =($months>0?$months." months ":""); //ay varsa goster
$_weeks = ($weeks>0?$weeks." weeks ":""); //hafta varsa goster
$_days =($days>0?$days." days ":""); //gun varsa goster
$_hours = ($hours>0?$hours." hours ":"");//saat varsa goster
$_minutes = ($minutes>0?$minutes." minutes ":""); //dakika varsa goster
$_seconds =($seconds>0?$seconds." seconds ":""); //saniye varsa goster
echo $_years.$_months.$_weeks.$_days.$_hours.$_minutes.$_seconds;
}
time_left("2022-01-19 15:15:15");
?>