// including classes/smarty include "../../../class/DbException.php"; include "../../../class/DbMysql.php"; include "../../../class/DbMysqlStatement.php"; include "../../../include/utils.php"; // initalize classes $db = DbMySql::getInstance(); $id = (int) $_GET[id]; // collect data from db $cDate = date("Y-m-d H:i:s"); $query = "select * from service_newssystem_tickersettings where service_newssystem_tickersettings_id=:->1"; $data_config = $db->prepare($query)->execute($id)->fetch_assoc(); $data_main = $db->prepare("SELECT language FROM service_newssystem WHERE service_newssystem_id=:->1")->execute($id)->fetch_row(); $language = $data_main[0]; $count = $data_config[news_count]; $query = "SELECT topic,service_newssystem_news_id AS id "; $query.= "FROM service_newssystem_news "; $query.= "WHERE service_newssystem_id=:->1 AND \"".$cDate."\" > start AND \"".$cDate."\" < end AND archives=:->2 "; $query.= "ORDER BY start desc LIMIT 0,".$count; try { $data_news = $db->prepare($query)->execute($id,"0")->fetchall_assoc(); } catch (DbException $e) { logError("Ticker SQL SELECT Fehler",$e->getMessage(),__FILE__,__LINE__); } // Ausgabe echo ""; echo "
"; echo ""; echo "