include_once 'php_includes/common.php'; include_once 'php_includes/db_connect.php'; $stmt = $pdo -> query("SELECT logo FROM members_new WHERE status_record = 1 AND logo <> '' ORDER BY rand() LIMIT 1"); $row = $stmt -> fetch(); $member_logo = $row['logo']; $stmt = $pdo -> query("SELECT nazwa_imprezy, miejsce_imprezy, DAY(STR_TO_DATE(data_imprezy,'%Y-%m-%d')) AS dzien, MONTH(STR_TO_DATE(data_imprezy,'%Y-%m-%d')) AS miesiac, YEAR(STR_TO_DATE(data_imprezy,'%Y')) AS rok FROM imprezy_new WHERE STR_TO_DATE(data_imprezy,'%Y-%m-%d') >= CURDATE() AND status = 1 ORDER BY STR_TO_DATE(data_imprezy,'%Y-%m-%d') ASC LIMIT 1"); $row = $stmt -> fetch(PDO::FETCH_ASSOC); $miejsce_imprezy = $row['miejsce_imprezy']; $data_imprezy = $row['dzien'] . " " . $GLOBALS['MIESIACE_2'][$row['miesiac']] . " " . $row['rok']; $nazwa_imprezy = truncate($row['nazwa_imprezy'], 40); $stmt = $pdo -> query("SELECT news_id, news_title, news_company_name, DAY(STR_TO_DATE(news_date,'%Y-%m-%d')) AS dzien, MONTH(STR_TO_DATE(news_date,'%Y-%m-%d')) AS miesiac, YEAR(STR_TO_DATE(news_date,'%Y')) AS rok FROM news_polish WHERE news_status = 1 AND news_priority = 0 ORDER BY STR_TO_DATE(news_date,'%Y-%m-%d') DESC LIMIT 1"); $row = $stmt -> fetch(PDO::FETCH_ASSOC); $firma_aktualnosci = $row['news_company_name']; $data_aktualnosci = $row['dzien'] . " " . $GLOBALS['MIESIACE_2'][$row['miesiac']] . " " . $row['rok']; $tytul_aktualnosci = truncate($row['news_title'], 40); $news_id = $row['news_id']; $ciekawostka_stmt = $pdo -> query("SELECT * FROM ciekawostki ORDER BY rand() LIMIT 1"); $ciekawostka = $ciekawostka_stmt -> fetch(PDO::FETCH_ASSOC); $ciekawostka['ciekawostka'] = truncate($ciekawostka['ciekawostka'], 90); ?>
Beneficjenci
|
Aktualności
|
ZNAKOmite
przykłady |
$stmt_promoted = $pdo -> query("SELECT news_id, news_title, news_company_name, DAY(STR_TO_DATE(news_date,'%Y-%m-%d')) AS dzien, MONTH(STR_TO_DATE(news_date,'%Y-%m-%d')) AS miesiac, YEAR(STR_TO_DATE(news_date,'%Y')) AS rok FROM news_polish WHERE news_status = 1 AND news_priority = 1 ORDER BY news_id DESC LIMIT 1");
if($row_promoted = $stmt_promoted -> fetch(PDO::FETCH_ASSOC)){
?>
Aktualność
specjalna
Czy wiedziałeś,
że... |