function ShowPageMain() { global $ARGV; global $BERLIOS_GROUP_ID; global $PROTO; global $banners; global $subpages; // set default page if the frontpage does not exist if (isset($ARGV['area'])) { $area = $ARGV['area']; } else { $area = 'home'; } // get page for area if (isset($subpages[$area])) { $ar_attr = $subpages[$area]; } // include page file if (isset($ar_attr) && isset($ar_attr['path'])) { $file = $ar_attr['path']; if (is_file($file)) { include $file; } } print '<?xml version="1.0" encoding="ISO-8859-1"?>'; print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">'; print '<html><head>'; print '<link rel=StyleSheet href="dreams.css" type="text/css">'; print '<meta name="Keywords" content="rrtools,c64,retro replay,mmc64,rrnet">'; print '<meta name="Description" content="Retro Replay Tools Homepage">'; print '<title>Retro Replay Tools'; if (isset($ar_attr) && isset($ar_attr['name'])) { print ' - '; print $ar_attr['name']; } print '</title>'; print '</head>'; print '<body>'; print "<table border=0 cellpadding=0 cellspacing=0 width=\"100%\"><tbody>\n"; print '<tr><td class=menu_ul><img src="blk1x1.gif" alt=""></td><td class=menu_u><img src="blk1x1.gif" alt=""></td><td class=menu_ur><img src="blk1x1.gif" alt=""></td><td class=menu_g><img src="blk2x2.gif" alt=""></td><td class=parea_u><img src="blk1x1.gif" alt=""></td></tr>'; print "\n"; print "<tr><td class=menu_l><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_cu>\n"; print "<strong>Menu</strong><br>\n"; if (isset($subpages['home'])) { $attr = $subpages['home']; print ' <a class=menuitem href="index.php?area=home">'; print str_replace(' ', ' ', $attr['name']); print "</a><br>\n"; } print " <a class=menuitem href=\"{$PROTO}://developer.berlios.de/projects/rrtools\">Project Page</a><br>\n"; print " <a class=menuitem href=\"{$PROTO}://developer.berlios.de/project/showfiles.php?group_id={$BERLIOS_GROUP_ID}\">All Downloads</a><br>\n"; print " <a class=menuitem href=\"{$PROTO}://developer.berlios.de/mail/?group_id={$BERLIOS_GROUP_ID}\">All Mailinglists</a><br>\n"; if (isset($subpages['links'])) { $attr = $subpages['links']; print ' <a class=menuitem href="index.php?area=links">'; print str_replace(' ', ' ', $attr['name']); print "</a><br>\n"; } print "<p>\n"; print "<strong>Projects</strong><br>\n"; foreach ($subpages as $section => $prj_attr) { // is the description set? if (isset($prj_attr['dsc'])) { print ' <a class=menuitem href="index.php?area='; print $section; print '">'; print str_replace(' ', ' ', $prj_attr['name']); print "</a><br>\n"; } } print "<p>"; print '<strong>Quick Links</strong><br>'; ShowLinks(' ', "<br>\n"); print '<p><br>'; print "</td><td class=menu_r><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_g><img src=\"blk2x2.gif\" alt=\"\"></td>\n"; print '<td valign=top rowspan=2 '; if (function_exists("ShowTD")) { // insert table cell attributes like background etc. ShowTD(); } print ">\n"; if (function_exists('ShowPage')) { ShowPage(); } else { print "Page {$area} does not exist yet."; } print '</td></tr>'; print "<tr><td class=menu_l><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_cb>\n"; // show some banners foreach ($banners as $code) { print "<p class=banner>{$code}</p>\n"; } print '<p><br>'; // show berlios logo, but not for local development print "<p class=banner>Thanks to<br>\n"; if (isset($_SERVER['SERVER_ADDR']) && $_SERVER['SERVER_ADDR'] == "127.0.0.1") { print 'BerliOS<br>'; } else { print "<a href=\"{$PROTO}://developer.berlios.de\"><img class=banner src=\"{$PROTO}://developer.berlios.de/bslogo.php?group_id={$BERLIOS_GROUP_ID}\" width=\"124\" height=\"32\" alt=\"BerliOS Logo\"/></a><br>\n"; } print "for hosting us!</p>\n"; print '<p><br>'; // show contact info print '<p class=contact>Contact: <img src="contact.png" alt="baccy_drm*berlios.de"></p><br>'; print "</td><td class=menu_r><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_g><img src=\"blk2x2.gif\" alt=\"\"></td>\n"; print "<tr><td class=menu_bl><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_b><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_br><img src=\"blk8x8.gif\" alt=\"\"></td><td class=menu_g><img src=\"blk2x2.gif\" alt=\"\"></td><td><img src=\"blk2x2.gif\" alt=\"\"></td></tr></tbody></table></body></html>"; }
/** * 列表 */ public function indexAction() { $page = reqnum("page", 1); $pagesize = reqnum("pagesize", 10); $trainModel = new Psys_TrainModel(); $w = array(); $list = $trainModel->GetList($w, 'id DESC', $page, $pagesize, "*"); $pagestr = ShowPage('/train/index', $page, $list['allnum'], $pagesize, true, true, '辆', 8); foreach ($list['allrow'] as $k1 => &$v1) { $v1['traintypestr'] = @$trainModel->traintype[$v1['traintype']]; $v1['trainno'] = str_ireplace(",", "/", trim($v1['trainno'], ',')); } $this->smarty->assign('list', $list['allrow']); $this->smarty->assign('pagestr', $pagestr); $this->forward = "index"; }
$msg = '<span class="red">Nie ma takiego klubu.</span>'; } } else { $msg = '<span class="red">Błąd.</span>'; } } if ($user_team = mysql_fetch_assoc(mysql_query("SELECT * FROM `mp_teams` WHERE `id` = '" . $user['team'] . "'"))) { $user_team_name = '<span>Aktualny klub: <strong>' . $user_team['name'] . '</strong></span>'; } else { $user_team_name = '<span>Nie jesteś członkiem żadnego klubu.</span>'; } $l_array = array('Brak Ligii', 'IV Liga', 'III Liga', 'II Liga', 'I Liga', 'Extraklasa'); $list = ''; for ($league = 0; $league <= 5; $league++) { $teams = mysql_query("SELECT * FROM `mp_teams` WHERE `league` = '" . $league . "'"); $list .= '<strong>' . $l_array[$league] . '</strong>'; while ($item = mysql_fetch_assoc($teams)) { $list .= '<span class="team_name">' . $item['name'] . '</span><span class="team_join"><a href="teams.php?join=' . $item['id'] . '">Dołącz</a></span>'; } } $body = '<div id="game_main"> <div id="t_info"> ' . $msg . ' ' . $user_team_name . ' </div> <div id="team_list"> ' . $list . ' </div> </div>'; ShowPage($head, $body, $user);