Potrzebuje panel na strone główną na jutrzejszy dzień, panel na dzisiaj wygląda tak:
$link_do_play="http://www.overstream.net/image/play_button_green_32.png";
$link_do_play="http://www.overstream.net/image/play_button_green_32.png";
if (file_exists(INFUSIONS."event_calendar_panel/locale/".$settings['locale'].".php")) {
// Load the locale file matching the current site locale setting.
include INFUSIONS."event_calendar_panel/locale/".$settings['locale'].".php";
} else {
// Load the infusion's default locale file.
include INFUSIONS."event_calendar_panel/locale/English.php";
}
if (($dd <> "") && ($mm <> "") && ($yy <> "")) {
if ((substr($dd,0,1) <> "0") AND ($dd < 10)) { $dd = "0".$dd; }
$data = $yy."/".$mm."/".$dd;
$timestamp = mktime(0,0,0,intval($mm),intval($dd),intval($yy));
}
else {
$data = date("Y/m/d",time());
$datatmp = explode("/",$data);
$timestamp = mktime(0,0,0,intval($datatmp[1]),intval($datatmp[2]),intval($datatmp[0]));
$dd = $datatmp[2];
$mm = $datatmp[1];
$yy = $datatmp[0];
}
$month = $mm;
$year = $yy;
$today = getdate();
$month = $month ? $month : $today['mon'];
$year = $year ? $year : $today['year'];
$lastyear = ($month==1) ? $year-1 : $year;
$lastmonth = ($month==1) ? 12 : $month-1;
$nextyear = ($month==12) ? $year+1 : $year;
$nextmonth = ($month==12) ? 1 : $month+1;
opentable($locale['Cal103']);
$DATA = $yy."-".$mm."-".$dd;
$result = dbquery("SELECT * FROM ".$db_prefix."chanel_list WHERE event_data='$DATA' AND event_deleted='NO' ORDER BY event_orario ASC, idx ASC");
$rows = dbrows($result);
echo "<table width='100%' valign=\"top\" cellpadding='1' cellspacing='1' class='tbl-border'>\n";
if ($rows != 0) {
echo "<tr>";
echo "<td align=\"center\" valign=\"middle\" width=\"60px\" class='tbl2'><b>".$locale['Cal105']."</b></td>\n";
echo "<td align=\"center\" valign=\"middle\" class='tbl2'><b>".$locale['Cal111']."</b></td>\n";
echo "<td align=\"center\" valign=\"middle\" class='tbl2'><b>".$locale['Cal107']."</b></td>\n";
echo "<td align=\"center\" valign=\"middle\" class='tbl2'><b>".$locale['Cal133']."</b></td>\n";
echo "</tr>";
while($data = dbarray($result)) {
$ora = ($data[event_orario]=="00:00:00")?($locale['Cal132']):($data[event_orario]);
$czasik = explode(":", $ora);
$ora=$czasik[0].":".$czasik[1];
$kanal=$data[kanal];
$result2 = dbquery("SELECT * FROM ".$db_prefix."chanel_program WHERE id=".$kanal);
$datas = dbarray($result2);
if ($datas['nazwa']) $ch_name=$datas['nazwa']; else $ch_name="Kanał usunięty";
if ($datas['link']) $ch_link=$datas['link']; else $ch_link="#";
echo "<tr>";
echo "<td align=\"center\" valign=\"middle\" width=\"60px\" class='tbl1'><b>".$ora."</b></td>\n";
echo "<td align=\"center\" valign=\"middle\" width=\"60px\" class='tbl1'>".$data[event_titre]."</td>\n";
echo "<td align=\"left\" valign=\"middle\" class='tbl1'>".nl2br(parseubb($data[event_texte]))."</td>\n";
echo "<td align=\"left\" valign=\"middle\" width=\"80px\" class='tbl1'><center><a href='".$skocz_do.$ch_link."' target='_blank'><img src='".$link_do_play."' border='0'><br>".$ch_name."</a></center></td>\n";
echo "</tr>";
}
} else {
echo "<tr><td align=\"center\" valign=\"middle\" colspan='3' class='tbl1'>".$locale['Cal108']."</td></tr>\n";
}
echo "</table>";
tablebreak();
$result = dbquery("SELECT event_note FROM ".$db_prefix."chanel_list WHERE event_data='$DATA' AND event_deleted='NO' ORDER BY event_orario ASC, idx ASC");
$rows = dbrows($result);
if ($rows != 0) {
echo "<table width='100%' valign=\"top\" cellpadding='1' cellspacing='1' class='tbl-border'>\n";
while($note = dbarray($result)) {
if ($note[event_note] <> "") {
echo "<tr><td align=\"left\" valign=\"middle\" class='tbl1'> ".parseubb($note[event_note])."</td></tr>\n";
}
}
echo "</table>\n";
}
closetable();
PW od moderatora:
- Zmiana nazwy tematu - Chemikpil 27.10 - 19:29
- Przeniesienie tematu - Chemikpil 27.10 - 19:30
Edytowane przez Theo dnia 29.10.2010 14:15:13
|