|
|
Hi Rafioso ,
endlich hat es funktioniert.
Ich kann zwar die Tabelle bs_threads mit MySQL nicht finden, aber auch egal. Hauptsache es klappt jetzt.
Vielen Dank.
Für alle die auch eine Terminanzeige gebrauchen können, hier der komplette PHP-Code. Einfach eine Datei im Verzeichnis extern mit folgendem Inhalt anlegen:
PHP: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
| <?php // define the path to the root of boardsolution (relative) // this is required for the bs_api.php define('BS_PATH','../');
// include bs_api.php, which initializes all required stuff // After this call you can use $BS_base which contains all objects of BS $BS_base = include_once('bs_api.php'); $target = 'target="_parent"';
// we have to set the charset here to force the browser to use the selected charset header('Content-Type: text/html; charset='.BS_HTML_CHARSET);
// now add the html-header ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>Eigene Termine</title> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo BS_HTML_CHARSET; ?>" /> <style type="text/css"> p {font-family:verdana, tahoma, arial, helvetica, sans-serif; font-weight:small; font-size:11px; color:#444444;} a:link {font-family:verdana, tahoma, arial, helvetica, sans-serif; text-decoration:none; font-weight:bold; color:#0000ff; font-size:11px; } a:visited {font-family:verdana, tahoma, arial, helvetica, sans-serif; text-decoration:none; font-weight:bold; color:#0000ff; font-size:11px;} a:hover {font-family:verdana, tahoma, arial, helvetica, sans-serif; text-decoration:none; font-weight:bold; color:#ff0000; font-size:11px;} a:active {font-family:verdana, tahoma, arial, helvetica, sans-serif; text-decoration:none; font-weight:bold; font-size:11px;} a:focus {font-family:verdana, tahoma, arial, helvetica, sans-serif; text-decoration:none; font-weight:bold; font-size:11px;} </style> </head> <body bgcolor="#EBEBEB">
<?php // check if the user is logged in? if($BS_base->sess->is_loggedin());
else die("Nicht eingeloggt.");
$qry = $BS_base->db->sql_qry(' SELECT a.id, a.tid, a.announced_user, a.event_title, a.event_begin, b.rubrikid FROM '.BS_TB_EVENTS.' as a LEFT OUTER JOIN '.BS_TB_THREADS.' as b ON (b.id = a.tid) WHERE a.max_announcements >= 0 AND b.rubrikid <> 0 AND a.event_begin > '.time().' ORDER BY a.event_begin ');
while($row = $BS_base->db->sql_fetch_assoc($qry)) { $announced_user = BS_advanced_explode(',',$row['announced_user']); if(in_array($BS_base->sess->user_id,$announced_user)) { $url = $BS_base->url->get_frontend_url( '&'.BS_URL_ACTION.'=posts&'.BS_URL_FID.'='.$row['rubrikid'] .'&'.BS_URL_TID.'='.$row['tid'] ); echo '<p>('.$BS_base->sess->get_date($row['event_begin'],false).') - <a href="'.$url.'"'.$target.'>'.$row['event_title'].'</a> </p>';
} } ?> </body> </html> |
Vielen Dank nochmals an Nils und Rafioso für die Hilfen und Gedankenanstöße.
Beste Grüße und noch ein sonniges Wochenende, Nico
|
|