Initial commit
This commit is contained in:
48
lesung.php
Normal file
48
lesung.php
Normal file
@ -0,0 +1,48 @@
|
||||
<?php
|
||||
#require("config/datenbankanbindung.php");
|
||||
/*
|
||||
# Fuer debugging
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
#echo __LINE__."<br>";
|
||||
*/
|
||||
|
||||
function lesung($datum, $template, $verzeichnis, $podcast){
|
||||
|
||||
include_once 'classes/lg-on_Smarty.class.php';
|
||||
$smarty = new lgon_Smarty();
|
||||
require_once("config.inc.php");
|
||||
require_once("func_rollenrechte.php");
|
||||
$templatename = "lesung.html"; # bei dynamischem Inhalt nimmt er ansicht.html
|
||||
|
||||
require_once "language/german.inc.php";
|
||||
$user_admin=$_COOKIE["user_admin"];
|
||||
|
||||
$db = dbconnect();
|
||||
$result_lesung = $db->query("SELECT ueberschrift, inhalt
|
||||
FROM quelle
|
||||
WHERE datum='$datum'
|
||||
AND kid = '12'");
|
||||
$row_lesung = $result_lesung->fetch_array();
|
||||
|
||||
$inhalt = strip_tags($row_lesung['inhalt'], '<br>,<b>,<strong>,<ul>,<li>,<ol>,<a>');
|
||||
|
||||
$result_podcast = $db->query("SELECT dateiname
|
||||
FROM admin_rechte
|
||||
WHERE admin_rolle = 'a_podcast'");
|
||||
$row_podcast = $result_podcast->fetch_array();
|
||||
|
||||
if(rore($user_admin,'a_podcast','RE') and $podcast != ''){
|
||||
|
||||
$smarty->assign('lesung_icon_podcast_right', "1");
|
||||
|
||||
$smarty->assign('lesung_icon_podcast', "<a href=\"$row_podcast[dateiname]/$verzeichnis/$podcast\" target='top'><img src=\"images/lautsprecher.gif\" border=\"0\"></a>");
|
||||
}
|
||||
|
||||
$smarty->assign('lesung_ueberschrift', "$row_lesung[ueberschrift]");
|
||||
$smarty->assign('lesung_inhalt', "$inhalt");
|
||||
|
||||
|
||||
return $smarty->fetch("$template/$templatename");
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user