Jump to content

ondi

Members
  • Posts

    69
  • Joined

  • Last visited

    Never

Everything posted by ondi

  1. Hi, appologies if this has been covered before, but my searches didn't come up with anything. I am in the process of creating a site using wordpress. (It can be seen here: http://www.adp-design-demos.com/brolim2/) However, the menu aligns with the side of the browser, rather than the content of my wordpress site. I have been through the CSS, and know where the menu CSS is, but at the moment all I've managed to do is move it by percentage. Can anyone help me with the coding so that the menu appears in a fixed position regardless of window/browser size and location. Cheers CSS: The area I have been editing: .nav_categories ul { width: 1000px; margin: 0 auto 0 auto; } .nav_categories a { display: block; padding: 15px; align: center; font-size: 15px; font-weight: bold; text-transform: uppercase; color: #fff; } .nav_categories li { float:right; position:relative; left:-42%; text-align:left; The whole CSS file. body { background: #dad5d2; background-position: top center; margin: 0; padding: 0; font-family: Helvetica, Arial; font-size: 12px; line-height: 20px; color: #666; } #wrap { width: 1000px; margin: 0px auto 0 auto; padding: 0px; } #header { background: #e3dfdd url('images/header.png') no-repeat; background-position: top center; margin: 0; overflow: hidden; } #header .content { width: 1000px; margin: 20px auto 0 auto; position: relative; } #header .logo { color: #999999; float: left; width: 45%; overflow: hidden; } #header .logo p { text-shadow: #eee 0 1px 0px; } #header .banner { float: right; text-align: right; } #header .feed { background: url('images/ico_rss.png') no-repeat; display: block; float: right; width: 43px; height: 32px; overflow: hidden; text-indent: -999px; position: absolute; bottom: 0; right: 0; } #header .nav { background: #E0DCD9 url('images/bg_nav.png') repeat-x; overflow: hidden; } #header .nav ul { list-style-type: none; margin: 0; padding: 0; } #header .nav li { float: left; } #header .nav li a { display: block; padding: 12px 18px 13px 18px; font-size: 14px; font-weight: bold; text-transform: uppercase; } #header .nav li ul { margin: 0; padding: 0; position: absolute; margin-top: 26px; } #header .nav li li a { font-size: 11px; padding: 0; margin: 0 0 0 20px; } #header .nav li li { width: auto; display: inline; float: none; } #header .nav li li a:hover { background: none; } #header .nav li a:hover, #header .nav .current_page_item a { background: #4B3F33; color: #fff; } #header .nav li ul { display: none; } #header .nav .current_page_item ul { display: block; position: absolute; left: 652px; } #header .nav .current_page_item ul li a { background: none; color: #666; } .nav_categories { background: #f58220; background-position: top center; overflow: hidden; } .nav_categories ul { width: 1000px; margin: 0 auto 0 auto; } .nav_categories a { display: block; padding: 15px; align: center; font-size: 15px; font-weight: bold; text-transform: uppercase; color: #fff; } .nav_categories li { float:right; position:relative; left:-42%; text-align:left; } .nav_categories .current-cat a, .nav_categories a:hover { color: #4b3f33; } #main { margin-top: 20px; } #content { width: 600px; float: left; } /* different content widthes based on sidebar visibility preferences */ .nosidebar #content { float: none; width: auto; } #sidebar { min-width: 330px !important; width: 330px; float: right; } #footer { margin-top: 5px; overflow: hidden; } #footer .content { margin: 30px auto 25px auto; } #footer #s { width: 150px; } #footerbar .widget { width: 28%; margin-right: 40px; float: left; } #footerbar .widget ul { background: #fff; padding: 10px; } #footerbar .widget li { border-bottom: 1px dotted #aaa; padding-bottom: 2px; } #footerbar .widget input { display: block; } .copyright { background: #d0ccc9; margin-top: 00px; overflow: hidden; } .copyright .content { width: 1000px; margin: 10px auto 10px auto; } .copyright .text { float: left; margin: 10; } .copyright .footer_nav { float: left; margin-left: 40px; } .copyright .footer_nav a { color: #666; } .copyright .footer_nav a:hover { text-decoration: underline; } .copyright .footer_nav li { display: inline; margin-right: 10px; } #idesigneco { text-align: right; float: right; } /* ________________________________________________________ */ .pagetitle { margin-bottom: 25px; color: #666; } .post { background: #fff; padding: 15px; margin: 0 0 50px 0; } .post .share { background: #fff; width: 20px; position: absolute; margin-left: -35px; padding: 3px 0 3px 3px; } .post .share li { margin-bottom: 4px; } .post .share li a { display: block; overflow: hidden; text-indent: -999px; } .post .share .fb a { background: url('images/ico_fb.png') no-repeat; } .post .share .tt a { background: url('images/ico_tt.png') no-repeat; } .post .text { overflow: hidden; } .post .text a { text-decoration: underline; } .post .text h1, .post .text h2, .post .text h3, .post .text h4 { margin: 35px 0 10px 0; } .post .meta { background: #f7f5f4 url('images/bg_meta.png') repeat-x; background-position: bottom left; padding: 6px; border-width: 1px 0 1px 0; border-style: solid; border-color: #eee; margin-bottom: 20px; } .post .postmetadata { margin: 10px 0 20px 0; } .post .postmetadata { margin-top: 30px; font-weight: normal; font-size: 10px; list-style-type: none; } .post .meta p { padding: 0; margin: 0; } .post .meta .category { float: left; width: 40%; } .post .meta .date { float: left; width: 40%; } .post .meta .comments { float: right; width: 20%; text-align: right; } .post .meta .author { float: left; } .post .meta .tags { background: url('images/ico_tag.png') no-repeat; background-position: 0px 6px; float: right; padding-left: 16px; min-height: 12px; font-size: 11px; } .homepage { margin-bottom: 30px; } .homepage .slideshow { width: 600px; float: left; } #homefeatured { width: 570px; height: 250px; border: 15px solid #fff; overflow: hidden; position: relative; } #homefeatured .featured { background-repeat: no-repeat; width: 570px; height: 250px; overflow: hidden; position: absolute; } #homefeatured .featured .title { background: url('images/bg_title_arrow.png') no-repeat; background-position: 10px 0; margin: 170px 12px 0 10px; overflow: hidden; } #homefeatured .featured .title a { background: url('images/bg_title.png'); line-height: 20px; display: block; margin-top: 10px; padding: 9px; font-size: 20px; color: #333; border-radius: 4px; -border-radius: 4px; -khtml-border-radius: 4px; -moz-border-radius: 4px; -webkit-border-radius: 4px; } .homepage .dots { margin-top: 5px; text-align: center; } .homepage .dots li { display: inline; } .homepage .dots a { font-size: 40px; color: #B9B2AD; margin-right: 10px; } .homepage .dots a:hover, .homepage .dots .sel { color: #88827F; text-decoration: none; } .homepage .banner { float: right; text-align: right; border: 15px solid #fff; } /* ________________________________________________________ */ .sticky { background: #f7f7f7; padding: 0 10px 10px; } .sticky h2 { padding-top: 10px; } #respond, #comments { margin-top: 50px; } #respond textarea { width: 95% !important; } .commentlist li ul li { } .commentlist li { font-weight: bold; background: #eee; padding: 6px; margin-bottom: 10px; } .commentlist li .avatar { float: right; border: 1px solid #eee; padding: 2px; background: #fff; } .commentlist cite, .commentlist cite a { font-weight: bold; font-style: normal; font-size: 1.1em; } .commentlist p { font-weight: normal; line-height: 1.5em; text-transform: none; } .commentmetadata { font-weight: normal; } /* ________________________________________________________ */ .widget ul { background: #fff; margin: 0; padding: 10px; list-style-type: none; } .widgetbanners { list-style-type: none; padding: 0; margin: 0; } .widgetbanners li { display: inline; margin: 2px 2px 2px 0; } #sidebar .widget { margin-bottom: 15px; margin-left: 10px; margin-right: 10px; clear: both; } .ide_widget_ecosocial { background: #dad5d2; overflow: hidden; border: 15px solid #fff; } .ide_widget_ecosocial ul { background: none; list-style-type: none; width: 28%; padding: 0 !important; float: left; } .ide_widget_ecosocial .list { margin: 20px 0 0 10px; } .ide_widget_ecosocial .list li { margin-bottom: 6px; } .ide_widget_ecosocial .list li .sel { font-weight: bold; } .ide_widget_ecosocial .stats { width: 60%; float: right; margin: 15px 15px 15px 0; text-align: center; overflow: hidden; } .ide_widget_ecosocial .stats li { display: none; overflow: hidden; text-align: center; } .ide_widget_ecosocial .stats .caption { display: block; } .ide_widget_ecosocial .stats .twitter p { font-size: 10px !important; } .ide_widget_ecosocial .stats .twitter .twtr-ft { display: none; } /* ________________________________________________________ */ .searchform { position: absolute; top: 2px; right: 5px; } .searchform .input, #s { background: #fff; width: 150px; border: none; margin: 6px 0 0 0; padding-left: 12px; font-size: 12px; color: #aaa; border-radius: 15px; -border-radius: 15px; -khtml-border-radius: 15px; -moz-border-radius: 15px; -webkit-border-radius: 15px; } /* ________________________________________________________ */ a { text-decoration: none; color: #4b3f33; } a:hover { color: #666; } a img { border: 0; } h1,h2,h3, h4 { margin: 0 0 10px 0; font-size: 38px; font-weight: normal; } h1 { letter-spacing: -1px; line-height: 38px; font-weight: 400; font-size: 32px; } h2 { font-size: 18px; } h3 { font-size: 16px; font-weight: bold; } h4 { font-size: 14px; font-weight: bold; } input, select, textarea { border: 1px solid #ccc; padding: 6px; font-family: Helvetica, Arial; font-size: 16px; } blockquote { background: #efefef; padding: 1px 5px 1px 5px; font-family: Georgia, Helvetica, Arial; font-style: italic; } blockquote blockquote { margin: 5px; padding: 5px; clear: both; } acronym, abbr, span.caps { font-size: 0.9em; letter-spacing: .07em; } .alignleft { float: left; margin: 5px 10px 5px 0; } .alignright { float: right; margin: 5px 0 5px 10px; } .aligncenter, div.aligncenter { display: block; margin: 10px auto; text-align: center; } img.alignleft { float: left; margin: 5px 10px 5px 0; } img.alignright { float: right; margin: 5px 0 5px 10px; } img.aligncenter { display: block; margin: 10px auto; text-align: center; } .wp-caption { background-color: #f3f3f3; border: 1px solid #ddd; padding-top: 4px; text-align: center; } .wp-caption img { border: none; margin: 0; padding: 0; } .wp-caption p.wp-caption-text { color: #111; font-size: 11px; line-height: 17px; margin: 0; padding: 0 4px 5px; } .noul { margin: 0; padding: 0; list-style-type: none; } .button, #searchsubmit { background: #4B3F33; width: auto; padding: 4px 15px 4px 15px; border: 0; font-weight: bold; font-size: 14px; color: #fff; } a.button:hover { background: #666; color: #fff; } .clear { clear: both; line-height: 0; padding: 0; margin: 0; }
  2. At the moment I am getting this error: DEPRECATED: FUNCTION EREGI() IS DEPRECATED IN C:\XAMPP\HTDOCS\FOREST\TEMPLATES\SPORT\SUCKERFISH.PHP ON LINE 17 Here is my suckerfish.php <?php defined( '_JEXEC' ) or die( 'Restricted moo access' ); function mosRecurseListMenu( $id, $level, &$children, $open, &$indents, $class_sfx, $highlight ) { global $Itemid; global $HTTP_SERVER_VARS; if (@$children[$id]) { $n = min( $level, count( $indents )-1 ); if ($level==0) echo '<ul class="nav" id="horiznav">'; else echo $indents[$n][0]; foreach ($children[$id] as $row) { switch ($row->type) { case 'separator': $row->link = "seperator"; break; case 'url': if ( eregi( 'index.php\?', $row->link ) ) { if ( !eregi( 'Itemid=', $row->link ) ) { $row->link .= '&Itemid='. $row->id; } } break; default: $row->link .= "&Itemid=$row->id"; break; } $li = "\n".$indents[$n][1] ; $current_itemid = trim( JRequest::getVar( 'Itemid', 0 ) ); if ($row->link != "seperator" && $current_itemid == $row->id || $row->id == $highlight || (JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $_SERVER['REQUEST_URI'] || (JRoute::_( substr($_SERVER['PHP_SELF'],0,-9) . $row->link)) == $HTTP_SERVER_VARS['REQUEST_URI']) { $li = "<li class=\"active\">"; } echo $li; echo mosGetLink( $row, $level, $class_sfx ); mosRecurseListMenu( $row->id, $level+1, $children, $open, $indents, $class_sfx, "" ); echo $indents[$n][2]; } echo "\n".$indents[$n][3]; } } function getTheParentRow($rows, $id) { if (isset($rows[$id]) && $rows[$id]) { if($rows[$id]->parent > 0) { return $rows[$id]->parent; } } return -1; } function mosGetLink( $mitem, $level, $class_sfx='' ) { global $Itemid; $txt = ''; $menuclass = ''; $topdaddy = 'top'; JRoute::_('$mitem->link'); if (strcasecmp(substr($mitem->link,0,4),"http")) { $mitem->link = JRoute::_($mitem->link); } switch ($mitem->browserNav) { case 1: if ($mitem->cnt > 0) { if ($level == 0) { $txt = "<a class=\"topdaddy\" target=\"_window\" href=\"$mitem->link\">$mitem->name</a>"; $topdaddy = "topdaddy"; } else { $txt = "<a class=\"daddy\" target=\"_window\" href=\"$mitem->link\">$mitem->name</a>"; } } else { $txt = "<a href=\"$mitem->link\" target=\"_window\" >$mitem->name</a>\n"; } break; case 2: if ($mitem->cnt > 0) { if ($level == 0) { $txt = "<a href=\"#\" class=\"topdaddy\" onClick=\"javascript: window.open('$mitem->link', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');\" class=\"$menuclass\">$mitem->name</a>\n"; $topdaddy = "topdaddy"; } else { $txt = "<a href=\"#\" class=\"daddy\" onClick=\"javascript: window.open('$mitem->link', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');\" class=\"$menuclass\">$mitem->name</a>\n"; } } else { $txt = "<a href=\"#\" onClick=\"javascript: window.open('$mitem->link', '', 'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=780,height=550');\" class=\"$menuclass\">$mitem->name</a>\n"; } break; case 3: if ($mitem->cnt > 0) { if ($level == 0) { $txt = "<a class=\"topdaddy\">$mitem->name</a>"; $topdaddy = "topdaddy"; } else { $txt = "<a class=\"daddy\">$mitem->name</a>"; } } else { $txt = "<a>$mitem->name</a>\n"; } break; default: if (isset($mitem->cnt) && $mitem->cnt > 0) { if ($level == 0) { $txt = "<a class=\"topdaddy\" href=\"$mitem->link\">$mitem->name</a>"; $topdaddy = "topdaddy"; } else { $txt = "<a class=\"daddy\" href=\"$mitem->link\"> $mitem->name</a>"; } } else { $txt = "<a href=\"$mitem->link\">$mitem->name</a>"; } break; } return "<span class=\"" . $topdaddy . "\">" . $txt . "</span>"; } ini_set('arg_separator.output','&'); function mosShowListMenu($menutype) { global $mainframe, $Itemid; $database = JFactory::getDBO(); $user = JFactory::getUser(); $class_sfx = null; error_reporting(E_ALL); $hilightid = null; if ($mainframe->getCfg('shownoauth')) { $sql = ("SELECT m.*, count(p.parent) as cnt" . "\nFROM #__menu AS m" . "\nLEFT JOIN #__menu AS p ON p.parent = m.id" . "\nWHERE m.menutype='$menutype' AND m.published='1'" . "\nGROUP BY m.id ORDER BY m.parent, m.ordering "); } else { $sql = ("SELECT m.*, sum(case when p.published=1 then 1 else 0 end) as cnt" . "\nFROM #__menu AS m" . "\nLEFT JOIN #__menu AS p ON p.parent = m.id" . "\nWHERE m.menutype='$menutype' AND m.published='1' AND m.access <= " . $user->get('aid', 0) . // Picks up the access-id "\nGROUP BY m.id ORDER BY m.parent, m.ordering "); } $database->setQuery($sql); $rows = $database->loadObjectList( 'id' ); echo $database->getErrorMsg(); $sql = "SELECT m.* FROM #__menu AS m" . "\nWHERE menutype='". $menutype ."' AND m.published='1'"; $database->setQuery( $sql ); $subrows = $database->loadObjectList( 'id' ); $maxrecurse = 5; $parentid = $Itemid; while ($maxrecurse-- > 0) { $parentid = getTheParentRow($subrows, $parentid); if (isset($parentid) && $parentid >= 0 && $subrows[$parentid]) { $hilightid = $parentid; } else { break; } } $indents = array( array( "<ul>", "<li>" , "</li>", "</ul>" ), ); $children = array(); foreach ($rows as $v ) { $pt = $v->parent; $list = @$children[$pt] ? $children[$pt] : array(); array_push( $list, $v ); $children[$pt] = $list; } $open = array( $Itemid ); $count = 20; // maximum levels - to prevent runaway loop $id = $Itemid; while (--$count) { if (isset($rows[$id]) && $rows[$id]->parent > 0) { $id = $rows[$id]->parent; $open[] = $id; } else { break; } } $class_sfx = null; mosRecurseListMenu( 0, 0, $children, $open, $indents, $class_sfx, $hilightid ); } ?> Not quite sure what is going wrong, can anyone help please?
  3. I have the following code <font face="Arial" size="1"> <?php /* *************************************************************************** * tplSoccerStats * ----------------------------------------------------------------------- * Copyright: TPL Design * email: info@tpl-design.com * www: www.tpl-design.com/tplsoccerstats *************************************************************************** */ session_start(); include('admin/user.php'); $connection = mysql_connect("$host","$user","$password") or die(mysql_error()); mysql_select_db("$txt_db_name",$connection) or die(mysql_error()); if( !isset($_SESSION['getAdditional']) ) $_SESSION['getAdditional'] = 0; if( isset($_GET['additional']) ) $_SESSION['getAdditional'] = $_GET['additional']; // //Haetaan asetukset // $pref = mysql_query("SELECT * FROM tplss_preferences WHERE ID = '0'",$connection) or die(mysql_error()); $pdata = mysql_fetch_array($pref); mysql_free_result($pref); include('preferences.inc'); // //Katsotaan, onko sessiomuuttuvat rekisteröity // if(!session_is_registered('defaultseasonid_tplss') || !session_is_registered('defaultmatchtypeid_tplss') || !session_is_registered('defaultlanguage_tplss')) { $_SESSION['defaultseasonid_tplss'] = $pdata['DefaultSeasonID']; $_SESSION['defaultmatchtypeid_tplss'] = $pdata['DefaultMatchTypeID']; $_SESSION['defaultlanguage_tplss'] = $pdata['DefaultLanguage']; $defaultseasonid = $_SESSION['defaultseasonid_tplss']; $defaultmatchtypeid = $_SESSION['defaultmatchtypeid_tplss']; $defaultlanguage = $_SESSION['defaultlanguage_tplss']; } else { $defaultseasonid = $_SESSION['defaultseasonid_tplss']; $defaultmatchtypeid = $_SESSION['defaultmatchtypeid_tplss']; $defaultlanguage = $_SESSION['defaultlanguage_tplss']; } // //Sisällytetään monikielituki // include('language.inc'); // //Haetaan kaudet ja ottelutyypit valikoita varten // $get_seasons = mysql_query("SELECT * FROM tplss_seasonnames WHERE SeasonPublish = '1' ORDER BY SeasonName DESC",$connection) or die(mysql_error()); $get_types = mysql_query("SELECT * FROM tplss_matchtypes ORDER BY MatchTypeName",$connection) or die(mysql_error()); // //Järjestely kauden nimen mukaan, jos sort-muuttujaa ei ole määritelty // $sort = $_REQUEST['sort']; if(!isset($sort)) { $sort = 'season_name'; } // //Pelaajan tiedot:nimi, numero ja esittely // $id = $_REQUEST['id']; $get_player_info = mysql_query("SELECT CONCAT(P.PlayerFirstName, ' ', P.PlayerLastName) AS name, P.PlayerFirstName AS firstname, P.PlayerLastName AS lastname, P.PlayerID AS id, P.PlayerNumber AS number, P.PlayerDescription AS descr, P.PlayerProfile AS prof, P.PlayerHonours AS hono, T.TransferredReason AS reason, IF(P.PlayerDOB='0000-00-00','',DATE_FORMAT(P.PlayerDOB,'%d/%m/%Y')) AS dob, P.PlayerPOB AS pob, IF(P.PlayerDOD='0000-00-00','',DATE_FORMAT(P.PlayerDOD,'%d/%m/%Y')) AS dod, P.PlayerPOD AS pod, P.PlayerIsManager AS ismanager FROM tplss_players P LEFT OUTER JOIN tplss_transferred T ON T.TransferredPlayerID = P.PlayerID WHERE P.PlayerID = '$id' LIMIT 1",$connection) or die(mysql_error()); $playerdata = mysql_fetch_array($get_player_info); mysql_free_result($get_player_info); ?> <? /* Let check if player is manager and show proper table */ if( $playerdata['ismanager'] ) { ?> <table width="<?= $tb2_width ?>%" cellspacing="1" cellpadding="2" border="0"> <tr> <td align="left" valign="middle" bgcolor="#000033" colspan="6"> <b><font color="#ffffff" size="1"><?php echo "$playerdata[name]'s managerial record" ?></b> </td> </tr> <tr> <td font size="1" align="left" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=season_name&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_season_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=games&id=<?php echo $id ?>"><font face="Arial" size="1">Games</a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=won&id=<?php echo $id ?>"><font face="Arial" size="1">Won </a> </td> <td font face="Arial" size="1" align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=draw&id=<?php echo $id ?>"><font face="Arial" size="1">Drawn </a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=lost&id=<?php echo $id ?>"><font face="Arial" size="1">Lost </a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort2=winpct&id=<?php echo $id ?>"><font face="Arial" size="1">Win%</a> </td> </tr> <font face="Arial" size="1"> <? $query = " SELECT SE.SeasonName AS season_name, M.MatchSeasonID, COUNT(M.MatchSeasonID) AS games, SUM(IF(M.MatchGoals > M.MatchGoalsOpponent,1,0)) AS won, SUM(IF(M.MatchGoals < M.MatchGoalsOpponent,1,0)) AS lost, SUM(IF(M.MatchGoals = M.MatchGoalsOpponent,1,0)) AS draw, IF( COUNT(M.MatchSeasonID)>0, ROUND( SUM(IF(M.MatchGoals > M.MatchGoalsOpponent,1,0)) / COUNT(M.MatchSeasonID) * 100, 2), 0) AS winpct FROM tplss_matches M, tplss_appearancesmngr A, tplss_players P, tplss_seasonnames SE WHERE M.MatchID = A.AppearanceMatchID AND A.AppearancePlayerID = P.PlayerID AND P.PlayerIsManager = 1 AND P.PlayerID = {$id} AND M.MatchSeasonID = SE.SeasonID GROUP BY M.MatchSeasonID "; $sort = isset($_GET['sort2']) ? $_GET['sort2'] : 'season_name'; if( !in_array($sort,array('season_name','games','won','lost','draw','winpct')) ) $sort = 'season_name'; $query .= " ORDER BY " . $sort . " ASC"; $rst = mysql_query($query); echo mysql_error(); $j=1; $tmp = "<b>%s</b>"; while( $r = mysql_fetch_array($rst) ) { if( ($j++) % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo" <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> {$r[season_name]} </a> </td> <td align=\"center\" valign=\"middle\" font face=\"Arial\" size=\"1\" bgcolor=\"$temp\">"; printf( ($sort == 'games'?$tmp:"%s"), $r['games'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'won'?$tmp:"%s"), $r['won'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'draw'?$tmp:"%s"), $r['draw'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'lost'?$tmp:"%s"), $r['lost'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'winpct'?$tmp:"%s"), $r['winpct'] ); echo"</td> </tr> \n"; $games += $r['games']; $won += $r['won']; $draw += $r['draw']; $lost += $r['lost']; } ?> <tr> <td align="left" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1">Total</b> </td> <td align="center" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1"><?= $games?></b> </td> <td align="center" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1"><?= $won?></b> </td> <td align="center" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1"><?= $draw?></b> </td> <td align="center" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1"><?= $lost?></b> </td> <td align="center" valign="middle" bgcolor="<?=$top_bg ?>"> <b><font face="Arial" size="1"><?= sprintf("%.2f", ( $games > 0 ? $won / $games * 100 : 0))?></b> </td> </tr> </table> <br> <br> <? } /* else { // show player stats */ // //TARKASTETAAN OTTELUTYYPPI-DROPIN VAIHTOEHTO // //'Kaikki'-vaihtoehto ei ole valittu, haetaan siis ensimmäiseen iffiin matsintyypin mukaan // if($defaultmatchtypeid != 0) { $get_seasons = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( A.AppearancePlayerID ) AS apps FROM tplss_seasons S, tplss_seasonnames SE LEFT OUTER JOIN tplss_matches M ON M.MatchSeasonID = S.SeasonID AND M.MatchTypeID = '$defaultmatchtypeid' LEFT OUTER JOIN tplss_appearances A ON A.AppearancePlayerID = '$id' AND A.AppearanceSeasonID = S.SeasonID AND A.AppearanceMatchID = M.MatchID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_goals = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( G.GoalPlayerID ) AS goals FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_matches M ON M.MatchSeasonID = S.SeasonID AND M.MatchTypeID = '$defaultmatchtypeid' LEFT OUTER JOIN tplss_goals G ON G.GoalPlayerID = '$id' AND GoalOwn = '0' AND G.GoalSeasonID = S.SeasonID AND G.GoalMatchID = M.MatchID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_ins = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( SU.SubstitutionPlayerIDIn ) AS ins FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_matches M ON M.MatchSeasonID = S.SeasonID AND M.MatchTypeID = '$defaultmatchtypeid' LEFT OUTER JOIN tplss_substitutions SU ON SU.SubstitutionPlayerIDIn = '$id' AND SU.SubstitutionSeasonID = S.SeasonID AND SU.SubstitutionMatchID = M.MatchID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_yellows = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( Y.YellowCardPlayerID ) AS yellows FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_matches M ON M.MatchSeasonID = S.SeasonID AND M.MatchTypeID = '$defaultmatchtypeid' LEFT OUTER JOIN tplss_yellowcards Y ON Y.YellowCardPlayerID = '$id' AND Y.YellowCardSeasonID = S.SeasonID AND Y.YellowCardMatchID = M.MatchID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_reds = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( R.RedCardPlayerID ) AS reds FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_matches M ON M.MatchSeasonID = S.SeasonID AND M.MatchTypeID = '$defaultmatchtypeid' LEFT OUTER JOIN tplss_redcards R ON R.RedCardPlayerID = '$id' AND R.RedCardSeasonID = S.SeasonID AND R.RedCardMatchID = M.MatchID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); } else { $get_seasons = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( A.AppearancePlayerID ) AS apps FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_appearances A ON A.AppearancePlayerID = '$id' AND A.AppearanceSeasonID = S.SeasonID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_goals = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( G.GoalPlayerID ) AS goals FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_goals G ON G.GoalPlayerID = '$id' AND GoalOwn = '0' AND G.GoalSeasonID = S.SeasonID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_ins = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( SU.SubstitutionPlayerIDIn ) AS ins FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_substitutions SU ON SU.SubstitutionPlayerIDIn = '$id' AND SU.SubstitutionSeasonID = S.SeasonID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_yellows = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( Y.YellowCardPlayerID ) AS yellows FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_yellowcards Y ON Y.YellowCardPlayerID = '$id' AND Y.YellowCardSeasonID = S.SeasonID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); $get_reds = mysql_query("SELECT SE.SeasonName AS name, S.SeasonID AS id, COUNT( R.RedCardPlayerID ) AS reds FROM (tplss_seasons S, tplss_seasonnames SE) LEFT OUTER JOIN tplss_redcards R ON R.RedCardPlayerID = '$id' AND R.RedCardSeasonID = S.SeasonID WHERE SE.SeasonID = S.SeasonID AND S.SeasonPlayerID = '$id' GROUP BY S.SeasonID ORDER BY name",$connection) or die(mysql_error()); } /* Get additional stats */ $where = ""; if( $_SESSION['getAdditional'] == 0 ) $where = " AND PlayerId = 0"; if( $defaultmatchtypeid == 0 ) $query = "SELECT * FROM tplss_additionalstats WHERE PlayerId = $id" . $where; else $query = "SELECT * FROM tplss_additionalstats WHERE PlayerId = $id AND MatchType = $defaultmatchtypeid" . $where; $get_additional = mysql_query($query,$connection) or die(mysql_error()); $get_additional_setup = mysql_query("SELECT IsTotal FROM tplss_additionalstats_setup",$connection) or die(mysql_error()); $additional_setup = mysql_fetch_array( $get_additional_setup ); // //Laitetaan kauden nimi ja avaukset taulukoihin myöhempää lajittelua varten // $i=0; while($data = mysql_fetch_array($get_seasons)) { $season_names[$i] = $data['name']; $season_ids[$i] = $data['id']; $apps[$i] = $data['apps']; $i++; } // //Laitetaan maalit taulukkoon myöhempää lajittelua varten // $i=0; while($data = mysql_fetch_array($get_goals)) { $goals[$i] = $data['goals']; $i++; } // //Laitetaan kentälle tulot taulukkoon myöhempää lajittelua varten // $i=0; while($data = mysql_fetch_array($get_ins)) { $ins[$i] = $data['ins']; $i++; } // //Laitetaan keltaiset taulukkoon myöhempää lajittelua varten // $i=0; while($data = mysql_fetch_array($get_yellows)) { $yellows[$i] = $data['yellows']; $i++; } // //Laitetaan punaiset taulukkoon myöhempää lajittelua varten // $i=0; while($data = mysql_fetch_array($get_reds)) { $reds[$i] = $data['reds']; $i++; } /* additional stats */ $additional_seasons = array(); while($data = mysql_fetch_array($get_additional)) { $season_names[$i] = $data['SeasonName'] . " (" . $data['Team'] . ")"; $apps[$i] = $data['Started']; $goals[$i] = $data['Goals']; $ins[$i] = $data['Sub']; $yellows[$i] = $data['Yellows']; $reds[$i] = $data['Reds']; $additional_seasons[] = $season_names[$i]; $i++; } // //kausien määrä muuttujaan ja vapautetaan muisti // $qty = mysql_num_rows($get_seasons) + mysql_num_rows($get_additional); // //Vapautetaan muisti // mysql_free_result($get_seasons); mysql_free_result($get_yellows); mysql_free_result($get_reds); mysql_free_result($get_goals); mysql_free_result($get_ins); if( $qty ) { ?> <!-- statistiikka taulu --> <table font face="Arial" size="1" width="<?= $tb2_width ?>%" cellspacing="1" cellpadding="2" border="0"> <tr> <td font face="Arial" size="1" align="left" valign="middle" bgcolor="#000033" colspan="6"> <b><font color="#ffffff" font face="Arial" size="1"><?php echo "$playerdata[name]'s playing record" ?></b> </td> </tr> <tr> <td align="left" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=season_name&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_season_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=apps&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_openings_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=ins&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_to_the_field_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=goals&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_goals_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=yellows&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_yellow_cards_short ?></a> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=reds&id=<?php echo $id ?>"><font face="Arial" size="1"><?= $txt_red_cards_short ?></a> </td> </tr> <?php // //Järjestellään multisortin avulla // switch($sort) { case 'season_name': array_multisort($season_names, SORT_ASC, SORT_STRING, $goals, $apps, $yellows, $reds, $ins); break; case 'apps': array_multisort($apps, SORT_DESC, SORT_NUMERIC, $season_names, SORT_ASC, SORT_STRING, $goals, $yellows, $reds, $ins); break; case 'ins': array_multisort($ins, SORT_DESC, SORT_NUMERIC, $season_names, SORT_ASC, SORT_STRING, $apps, $goals, $yellows, $reds); break; case 'goals': array_multisort($goals, SORT_DESC, SORT_NUMERIC, $season_names, SORT_ASC, SORT_STRING, $apps, $yellows, $reds, $ins); break; case 'yellows': array_multisort($yellows, SORT_DESC, SORT_NUMERIC, $season_names, SORT_ASC, SORT_STRING, $goals, $apps, $reds, $ins); break; case 'reds': array_multisort($reds, SORT_DESC, SORT_NUMERIC, $season_names, SORT_ASC, SORT_STRING, $goals, $apps, $yellows, $ins); break; } // //Annetaan alkuatrvot yhteensä-muuttujille // $total_apps = 0; $total_ins = 0; $total_goals = 0; $total_yellows = 0; $total_reds = 0; // //Tulostetaan tilastot // $i=0; $j=1; while($i < $qty) { // //Tarkastetaan jakojäännöksellä, kumpi väreistä valitaan solun taustaksi // if($j % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo" <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> <a href=\"player2.php?id={$id}&season={$season_ids[$i]}\"> $season_names[$i] </a> </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; // //Vahvennetaan tilasto tietyn ominaisuuden kohdalta // if($sort == 'apps') echo'<b>'; echo"$apps[$i]"; if($sort == 'apps') echo'</b>'; echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($sort == 'ins') echo'<b>'; echo"$ins[$i]"; if($sort == 'ins') echo'</b>'; echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($sort == 'goals') echo'<b>'; echo"$goals[$i]"; if($sort == 'goals') echo'</b>'; echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($sort == 'yellows') echo'<b>'; echo"$yellows[$i]"; if($sort == 'yellows') echo'</b>'; echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($sort == 'reds') echo'<b>'; echo"$reds[$i]"; if($sort == 'reds') echo'</b>'; echo"</td> </tr> \n"; // //Kasvatetaan yhteensä-muuttujien arvoa // //if( !in_array($season_names[$i],$additional_seasons) // || (in_array($season_names[$i],$additional_seasons) && $additional_setup[0] != 0 ) ) //{ $total_apps = $total_apps + $apps[$i]; $total_goals = $total_goals + $goals[$i]; $total_ins = $total_ins + $ins[$i]; $total_yellows = $total_yellows + $yellows[$i]; $total_reds = $total_reds + $reds[$i]; //} $i++; $j++; } ?> <tr> <td align="left" valign="middle" bgcolor="<?php echo $top_bg ?>"> <b><font face="Arial" size="1"><?= $txt_total ?></b> </td> <td font face="Arial" size="1" align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <font face="Arial" size="1"> <?php echo "<b>$total_apps</b>"; ?> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <font face="Arial" size="1"> <?php echo "<b>$total_ins</b>"; ?> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <font face="Arial" size="1"> <?php echo "<b>$total_goals</b>"; ?> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <font face="Arial" size="1"> <?php echo "<b>$total_yellows</b>"; ?> </td> <td align="center" valign="middle" bgcolor="<?php echo $top_bg ?>"> <font face="Arial" size="1"> <?php echo "<b>$total_reds</b>"; ?> </td> </tr> <tr><font face="Arial" size="1"> <td align="center" valign="middle" colspan="6" bgcolor="<?php echo $top_bg ?>"> <a href="?sort=season_name&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_by_season ?></a> | <a href="?sort=apps&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_in_opening ?></a> | <a href="?sort=ins&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_substituted ?></a> | <a href="?sort=goals&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_goals_long ?></a> | <a href="?sort=yellows&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_yellow_cards_long ?></a> | <a href="?sort=reds&id=<?php echo $id ?>"><font face="Arial" size="1"> <?= $txt_red_cards_long ?></a> </td> </tr> </table> <?php } // //Haetaan viimeiset pelit, missä pelaaja on esiintynyt avauksessa // // Full debut switch($print_date) { case 1: { $how_to_print = "%d.%m.%Y $txt_at %H:%i"; } break; case 2: { $how_to_print = "%m.%d.%Y $txt_at %H:%i"; } break; case 3: { $how_to_print = "%b %D %Y $txt_at %H:%i"; } break; } $query = mysql_query(" SELECT M.MatchID AS id, M.MatchGoals AS goals, M.MatchGoalsOpponent AS goals_opponent, M.MatchPublish AS publish, DATE_FORMAT(M.MatchDateTime, '$how_to_print') AS time, MT.MatchTypeName AS type, M.MatchAdditionalType AS add_type, O.OpponentName AS opponent, O.OpponentID AS oppid, M.MatchPlaceID AS place, M.MatchNeutral AS neutral FROM ( tplss_matches M, tplss_matchtypes MT, tplss_appearances A, tplss_opponents O ) WHERE M.MatchTypeID = MT.MatchTypeID AND M.MatchID = A.AppearanceMatchID AND A.AppearancePlayerID = '$id' AND M.MatchOpponent = O.OpponentID ORDER BY M.MatchDateTime LIMIT 1 ",$connection) or die(mysql_error()); if( mysql_num_rows($query) ) { ?> <br><br> <table width="<?= $tb2_width ?>%" cellspacing="1" cellpadding="2" border="0"> <tr> <td align="left" valign="middle" bgcolor="#000033" colspan="5"> <b><font color="#ffffff" font face="Arial" size="1" ><?php echo "$playerdata[name]'s full debut" ?></b> </td> </tr> <?php // //Tarkistetaan, miten printataan päivämäärä // // //Onko yhtään? // /* if(mysql_num_rows($query) == 0) { echo"<td align=\"left\" valign=\"middle\" bgcolor=\"$bg2\" colspan=\"5\"> $txt_none </td>"; } else { */ $j=1; while($data = mysql_fetch_array($query)) { // //Tarkastetaan jakojäännöksellä, kumpi väreistä valitaan solun taustaksi // if($j % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo"<tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> $data[time] </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['add_type'] == '') { echo"$data[type]"; } else { echo"$data[type] / $data[add_type]"; } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; // //Tarkastetaan onko kyseessä koti, vieras vai puolueeton // if($data['neutral'] == 1) { echo"$txt_neutral_short"; } else { if($data['place'] == 1) { echo"$txt_home_short"; } elseif($data['place'] == 2) { echo"$txt_away_short"; } } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\"> <a href=\"opponent.php?opp=$data[oppid]\">$data[opponent]</a> </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['goals'] == NULL || $data['goals_opponent'] == NULL) { echo" "; } else { // //Tarkistetaan, onko peli julkaistu // if($data['publish'] == 1) echo"<a href=\"matchdetails.php?id=$data[id]\">$data[goals] - $data[goals_opponent]</a>"; else echo"$data[goals] - $data[goals_opponent]"; } echo'</td> </tr>'; $j++; } //} mysql_free_result($query); ?> </table> <? } // full debut // //Haetaan viimeiset pelit, missä pelaaja on esiintynyt avauksessa // // Latest matches $query = mysql_query(" SELECT M.MatchID AS id, M.MatchGoals AS goals, M.MatchGoalsOpponent AS goals_opponent, M.MatchPublish AS publish, DATE_FORMAT(M.MatchDateTime, '$how_to_print') AS time, MT.MatchTypeName AS type, M.MatchAdditionalType AS add_type, O.OpponentName AS opponent, O.OpponentID AS oppid, M.MatchPlaceID AS place, M.MatchNeutral AS neutral FROM ( tplss_matches M, tplss_matchtypes MT, tplss_appearances A, tplss_opponents O ) WHERE M.MatchTypeID = MT.MatchTypeID AND M.MatchID = A.AppearanceMatchID AND A.AppearancePlayerID = '$id' AND M.MatchOpponent = O.OpponentID ORDER BY M.MatchDateTime DESC LIMIT 5 ",$connection) or die(mysql_error()); if( mysql_num_rows($query) ) { ?> <br><br> <table width="<?= $tb2_width ?>%" cellspacing="1" cellpadding="2" border="0"> <tr> <td align="left" valign="middle" bgcolor="#000033" colspan="5"> <b><font color="#ffffff"><?= $txt_latest_appearances ?><?php echo "$playerdata[name] started" ?></b> </td> </tr> <?php // //Tarkistetaan, miten printataan päivämäärä // switch($print_date) { case 1: { $how_to_print = "%d.%m.%Y $txt_at %H:%i"; } break; case 2: { $how_to_print = "%m.%d.%Y $txt_at %H:%i"; } break; case 3: { $how_to_print = "%b %D %Y $txt_at %H:%i"; } break; } // //Onko yhtään? // /* if(mysql_num_rows($query) == 0) { echo"<td align=\"left\" valign=\"middle\" bgcolor=\"$bg2\" colspan=\"5\"> $txt_none </td>"; } else { */ $j=1; while($data = mysql_fetch_array($query)) { // //Tarkastetaan jakojäännöksellä, kumpi väreistä valitaan solun taustaksi // if($j % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo"<tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> $data[time] </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['add_type'] == '') { echo"$data[type]"; } else { echo"$data[type] / $data[add_type]"; } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; // //Tarkastetaan onko kyseessä koti, vieras vai puolueeton // if($data['neutral'] == 1) { echo"$txt_neutral_short"; } else { if($data['place'] == 1) { echo"$txt_home_short"; } elseif($data['place'] == 2) { echo"$txt_away_short"; } } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\"> <a href=\"opponent.php?opp=$data[oppid]\">$data[opponent]</a> </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['goals'] == NULL || $data['goals_opponent'] == NULL) { echo" "; } else { // //Tarkistetaan, onko peli julkaistu // if($data['publish'] == 1) echo"<a href=\"matchdetails.php?id=$data[id]\">$data[goals] - $data[goals_opponent]</a>"; else echo"$data[goals] - $data[goals_opponent]"; } echo'</td> </tr>'; $j++; } //} mysql_free_result($query); ?> </table> <? } // //Haetaan viimeiset pelit, missä pelaaja on tehnyt maalin //latest matches scored $query = mysql_query(" SELECT DISTINCT M.MatchID AS id, M.MatchGoals AS goals, M.MatchPublish AS publish, M.MatchGoalsOpponent AS goals_opponent, DATE_FORMAT(M.MatchDateTime, '$how_to_print') AS time, MT.MatchTypeName AS type, M.MatchAdditionalType AS add_type, O.OpponentName AS opponent, O.OpponentID AS oppid, M.MatchPlaceID AS place, M.MatchNeutral AS neutral FROM ( tplss_matches M, tplss_matchtypes MT, tplss_goals G, tplss_opponents O ) WHERE M.MatchTypeID = MT.MatchTypeID AND M.MatchID = G.GoalMatchID AND G.GoalPlayerID = '$id' AND G.GoalOwn = '0' AND M.MatchOpponent = O.OpponentID ORDER BY M.MatchDateTime DESC LIMIT 5 ",$connection) or die(mysql_error()); if( mysql_num_rows($query) ) { ?> <br><br> <table width="<?= $tb2_width ?>%" cellspacing="1" cellpadding="2" border="0"> <tr> <td align="left" valign="middle" bgcolor="#000033" colspan="5"> <b><font color="#ffffff"><?= $txt_latest_goals ?><?php echo "$playerdata[name] scored" ?></b> </td> </tr> <?php // //Tarkastetaan löytyykö yhtään // /* if(mysql_num_rows($query) == 0) { echo"<td align=\"left\" valign=\"middle\" bgcolor=\"$bg2\" colspan=\"5\"> $txt_none </td>"; } else { */ $j=1; while($data = mysql_fetch_array($query)) { // //Tarkastetaan jakojäännöksellä, kumpi väreistä valitaan solun taustaksi // if($j % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo"<tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> $data[time] </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['add_type'] == '') { echo"$data[type]"; } else { echo"$data[type] / $data[add_type]"; } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; // //Tarkastetaan onko kyseessä koti, vieras vai puolueeton // if($data['neutral'] == 1) { echo"$txt_neutral_short"; } else { if($data['place'] == 1) { echo"$txt_home_short"; } elseif($data['place'] == 2) { echo"$txt_away_short"; } } echo"</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\"> <a href=\"opponent.php?opp=$data[oppid]\">$data[opponent]</a> </td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; if($data['goals'] == NULL || $data['goals_opponent'] == NULL) { echo" "; } else { // //Tarkistetaan, onko peli julkaistu // if($data['publish'] == 1) echo"<a href=\"matchdetails.php?id=$data[id]\">$data[goals] - $data[goals_opponent]</a>"; else echo"$data[goals] - $data[goals_opponent]"; } echo'</td> </tr>'; $j++; } //} mysql_free_result($query); ?> </table> <? } //} // show player stats ?> </td> </tr> </table> </td> </tr> </table> <?php include('bottom.txt'); ?> </form> And as you can see here: http://www.walthamforest-fc.co.uk/stats/penpicplayer.php?id=410 Some of my text is different sizes. How can I make it so the entire file is the same text size? Thanks
  4. Here's a snippet of my code. I can't for the life of me work out where to put the font size instruction, could someone point me in the right direction? Thanks $sort = isset($_GET['sort2']) ? $_GET['sort2'] : 'season_name'; if( !in_array($sort,array('season_name','games','won','lost','draw','winpct')) ) $sort = 'season_name'; $query .= " ORDER BY " . $sort . " ASC"; $rst = mysql_query($query); echo mysql_error(); $j=1; $tmp = "<b>%s</b>"; while( $r = mysql_fetch_array($rst) ) { if( ($j++) % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo" <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> {$r[season_name]} </a> </td> <td align=\"center\" valign=\"middle\" font face=\"Arial\" size=\"1\" bgcolor=\"$temp\">"; printf( ($sort == 'games'?$tmp:"%s"), $r['games'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'won'?$tmp:"%s"), $r['won'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'draw'?$tmp:"%s"), $r['draw'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'lost'?$tmp:"%s"), $r['lost'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'winpct'?$tmp:"%s"), $r['winpct'] ); echo"</td> </tr> \n"; $games += $r['games']; $won += $r['won']; $draw += $r['draw']; $lost += $r['lost']; } ?> Here's the font code which i've been trying to use... font size=\"1\"
  5. Can anyone shed some light on this please? Thanks
  6. well, either way, im no closer to solving my problem! tried using <span style="font-size: 14px;"> but all that did was change my font to times new roman, and teh size wouldn't change!
  7. I know i should be using CSS, but creating an entire style sheet will take far too long, I'm just looking for a quick fix.
  8. How would i incorporate that into printf( ($sort == 'games'?$tmp:"%s"), $r['games'] ); echo "</td> Thanks
  9. Here's a snippet of my code. I can't for the life of me work out where to put the font size instruction, could someone point me in the right direction? Thanks $sort = isset($_GET['sort2']) ? $_GET['sort2'] : 'season_name'; if( !in_array($sort,array('season_name','games','won','lost','draw','winpct')) ) $sort = 'season_name'; $query .= " ORDER BY " . $sort . " ASC"; $rst = mysql_query($query); echo mysql_error(); $j=1; $tmp = "<b>%s</b>"; while( $r = mysql_fetch_array($rst) ) { if( ($j++) % 2 == 0) $temp = "$bg1"; else $temp = "$bg2"; echo" <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\"> {$r[season_name]} </a> </td> <td align=\"center\" valign=\"middle\" font face=\"Arial\" size=\"1\" bgcolor=\"$temp\">"; printf( ($sort == 'games'?$tmp:"%s"), $r['games'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'won'?$tmp:"%s"), $r['won'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'draw'?$tmp:"%s"), $r['draw'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'lost'?$tmp:"%s"), $r['lost'] ); echo "</td> <td align=\"center\" valign=\"middle\" bgcolor=\"$temp\">"; printf( ($sort == 'winpct'?$tmp:"%s"), $r['winpct'] ); echo"</td> </tr> \n"; $games += $r['games']; $won += $r['won']; $draw += $r['draw']; $lost += $r['lost']; } ?> Here's the font code which i've been trying to use... font size=\"1\"
  10. I'm still rather lost could you give me an example using my code? Thanks
  11. I gathered that much... do i put it after each <td align="left" valign="top"> Looking For (Home/Away/Neutral):</td> <td align="left" valign="top"> <input type="text" name="pod" size="30"></td>
  12. This is what my page looks like: http://79.170.43.200/adp-design-demos.com/findmeagame/addgame.php And here is my code: <?php $host = 'localhost'; $user = 'user'; $password = 'pass'; $txt_db_name = 'web176-findme'; $connection = mysql_connect("$host","$user","$password") or die(mysql_error()); mysql_select_db("$txt_db_name",$connection) or die(mysql_error()); $get_matches = mysql_query(" SELECT MD.matchid AS matchid, DATE_FORMAT(MD.date, '%W %d %b') AS date, DATE_FORMAT(MD.date, '%H:%i') AS clock, MD.teamname AS teamname, MD.homeaway AS venue, MD.level AS level, MD.contact AS contact FROM matchdetails MD ORDER BY MD.date ASC ", $connection) or die(mysql_error()); ?> <table> <form method="post" action="<?php echo "$PHP_SELF?sessioid=$sessio" ?>"> <table width="100%" cellspacing="3" cellpadding="3" border="0"> <tr> <td align="left" valign="top"> Date and time: </td> <td align="left" valign="top"> <select name="day"> <?php //printataan päivät for($i = 1 ; $i < 32 ; $i++) { if($i<10) { $i = "0".$i; } if($i == "01") echo "<option value=\"$i\" SELECTED>$i</option>\n"; else echo "<option value=\"$i\">$i</option>\n"; } ?> </select> / <select name="month"> <?php //printataan kuukaudet for($i = 1 ; $i < 13 ; $i++) { if($i<10) { $i = "0".$i; } if($i == "05") echo "<option value=\"$i\" SELECTED>$i</option>\n"; else echo "<option value=\"$i\">$i</option>\n"; } ?> </select> / <select name="year"> <?php //printataan vuodet for($i = 2009 ; $i < 2015 ; $i++) { if($i<10) { $i = "0".$i; } if($i == "2015") echo "<option value=\"$i\" SELECTED>$i</option>\n"; else echo "<option value=\"$i\">$i</option>\n"; } ?> </select> at <select name="hour"> <?php //printataan tunnnit for($i = 0 ; $i < 24 ; $i++) { if($i<10) { $i = "0".$i; } if($i == "15") echo "<option value=\"$i\" SELECTED>$i</option>\n"; else echo "<option value=\"$i\">$i</option>\n"; } ?> </select> : <select name="minute"> <?php //printataan minuutit for($i = 0 ; $i < 60 ; $i++) { if($i<10) { $i = "0".$i; } if($i == "00") echo "<option value=\"$i\" SELECTED>$i</option>\n"; else echo "<option value=\"$i\">$i</option>\n"; } ?> </select> </td> </tr> <tr> <td align="left" valign="top"> Team Name:</td> <td align="left" valign="top"> <input type="text" name="pob" size="30"></td> </tr> <tr> <td align="left" valign="top"> Looking For (Home/Away/Neutral):</td> <td align="left" valign="top"> <input type="text" name="pod" size="30"></td> </tr> <tr> <td align="left" valign="top"> Level of Your Team:</td> <td align="left" valign="top"> <input type="text" name="pod" size="30"></td> </tr> <tr> <td align="left" valign="top"> Contact Details:</td> <td align="left" valign="top"> <input type="text" name="pod" size="30"></td> </tr> </table> <input type="submit" name="add_submit" value="Add game request"> </form> I want to make it so when the user clicks the submit button, 'Date and time:' goes into 'MD.date' 'Team Name:' goes into 'MD.teamname' And so on... can someone help me out please? Thanks
  13. Thanks crayon, i now have errorless code but nothing prints! Here is my code: <?php $host = 'localhost'; $user = 'web176-findme'; $password = 'arsenal'; $txt_db_name = 'web176-findme'; $connection = mysql_connect("$host","$user","$password") or die(mysql_error()); mysql_select_db("$txt_db_name",$connection) or die(mysql_error()); $get_report = mysql_query(" SELECT MD.matchid AS matchid, DATE_FORMAT(MD.date, '%W %d %b') AS date, DATE_FORMAT(MD.date, '%H:%i') AS clock, MD.teamname AS teamname, MD.homeaway AS venue, MD.level AS level, MD.contact AS contact FROM matchdetails MD ORDER BY MD.date DESC ", $connection) or die(mysql_error()); { echo"<center> $data[date]<br> $data[teamname]<br> $data[venue] $data[level] - $data[contact] "; } ?> and an image of the data in my table: [/code]
  14. My code now looks something like this <?php $host = 'localhost'; $user = 'web176-findme'; $password = 'arsenal'; $txt_db_name = 'web176-findme'; $connection = mysql_connect("$host","$user","$password") or die(mysql_error()); mysql_select_db("$txt_db_name",$connection) or die(mysql_error()); $get_report = mysql_query(" SELECT MD.matchid AS matchid, DATE_FORMAT(M.date, '%W %d %b') AS match_date, DATE_FORMAT(M.date, '%H:%i') AS clock, MD.teamname AS teamname MD.homeaway AS venue, MD.level AS level, MD.contact AS contact, FROM matchdetails MD, WHERE MD.date < CURRENT_TIMESTAMP AND ORDER BY MD.date DESC LIMIT $range ", $connection) or die(mysql_error()); { echo"<center> $data[match_date], $data[clock]<br> $data[teamname]<br> $data[venue] $data[level] - $data[contact] Attendance: $data[crowd]<br> "; } ?> But still with the error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MD.homeaway AS venue, MD.level AS level, MD.contact AS contact, FROM matchdetail' at line 6
  15. Hi, I'm trying to write my own code for the first time, but can't get over this error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'MD.homeaway AS venue, MD.level AS level MD.contact AS contact FROM matchdetails ' at line 6 Here is my code. Can someone have a look? Line 6 is only connection details, which are all correct. <?php $host = 'localhost'; $user = 'user'; $password = 'password'; $txt_db_name = 'web176-findme'; $connection = mysql_connect("$host","$user","$password") or die(mysql_error()); mysql_select_db("$txt_db_name",$connection) or die(mysql_error()); $get_report = mysql_query(" SELECT MD.matchid AS matchid, DATE_FORMAT(M.date, '%W %d %b') AS match_date, DATE_FORMAT(M.date, '%H:%i') AS clock, MD.teamname AS teamname MD.homeaway AS venue, MD.level AS level MD.contact AS contact FROM matchdetails MD, WHERE MD.date < CURRENT_TIMESTAMP AND ORDER BY M.MatchDateTime DESC LIMIT $range ", $connection) or die(mysql_error()); { echo"<center> $data[match_date], $data[clock]<br> $data[teamname]<br> $data[venue] $data[level] - $data[contact] Attendance: $data[crowd]<br> <a href=\"stats/matchdetails.php?id=$data[id]\"></a><a href=\"http://www.walthamforest-fc.co.uk/stats/matchdetails.php?id=$data[id]#report\">Match Report</a> "; } ?>
  16. First of all, I have only just started this site, and it's only ever going to be a very basic HTML site. It's going to be a ground guide for Non-League football. Here is one of the completed ground pages so far. Most of the links don't actually take you to anything in perticular, so don't shout! I'd just like a couple of ideas on how to improve the general look of the site. Thanks! http://79.170.43.200/adp-design-demos.com/nlgg/wadham_lodge.html Don't worry about the ugly domain, it's only going to be like that during testing
  17. Hi, Here's my CSS code, but no matter how many times i re-up or refresh, my site background won't change. The background code is the first part of the CSS. Site: www.walthamforest-fc.co.uk Can anyone see where I'm going wrong? ------- ---------------------------------------------------------------*/ bg { background-color: #174f00; background-image: url(http://www.walthamforest-fc.co.uk/images/backgroundgradient.jpg); background-repeat: repeat-x; } a:link, a:visited { color: #07546E; } a:hover { color: #199dd1; } div#toparea { background-color: #2b9700; border-bottom: 1px solid #06455f; } table#contentwrap { background-color: #fff; } table#downarea { background: url('../images/style1/sportmx_bg_extradown.png') repeat-x 0 top; background-color: #2b9700; border-bottom: 1px solid #1D4251; } .spacer { background: url('../images/style1/sportmx_footer_separator.png') no-repeat left 19px; } td#insetwrap { background-color: #f2f3f3; } div.shadow-l { background: url('../images/style1/sportmx_bg_inset_module.png') no-repeat 0 0; } div.shadow-r { background: url('../images/style1/sportmx_bg_inset_module-r.png') no-repeat 0 0; } td#rightwrap { background-color: #ffffff; } div#memberarea { background: url('../images/style1/sportmx_icon-memberarea.png') no-repeat 10px 50%; color: #fff; } div#memberarea form input.button, div#searcharea form input.button { background: transparent url('../images/style1/sportmx_button_marea.png') no-repeat 0 100%; color: #fff; } div#memberarea form input.button:hover, div#searcharea form input.button:hover { color: #199dd1; } div#memberarea form input.button:active, div#searcharea form input.button:active { color: #fff; } div#searcharea input.inputbox { background: #fff url('../images/style1/sportmx_icon-search.png') no-repeat 100% 50%; } div#header { background: #2b9700 url('../images/style1/sportmx_bg_head.jpg') repeat-x 0 0; } div#imghead { background: url('../images/style1/sportmx_bg_header.jpg') no-repeat 0 0; } div#menu { background: url('../images/style1/sportmx_bg_menu.png') repeat-x 0 0; } div#footer { background: url('../images/style1/sportmx_bg_footer.gif') repeat-x 0 0; color: #199dd1; } div#footer span#info a { color: #199dd1; } /* MODULETABLE ------------------------------------------------------------------------------------------ */ div.moduletable, div.moduletable-black, div.moduletable-gkmod, div.moduletable-clear, div.moduletable-advert { color: #312E2E; } div.moduletable-advert { float: right; width: 248px; color: #fff; height: 60px; margin-top: 63px; overflow: hidden; } div.moduletable-clear { color: #312E2E; } div.moduletable h3, div.moduletable-black h3, div.moduletable-gkmod h3 { background: url('../images/style1/sportmx_bg_module-h3.png') repeat-x -15px 0; color: #2b9700; } div.moduletable-advert h3 { background-color: #fff; color: #9F9F9F; } div.moduletable-clear h3 { background: none; color: #0b3745; } div.moduletable-black { color: #fff; background-color: #2b9700; } div.moduletable-black h3 { background: url('../images/style1/sportmx_bg_black_module-h3.png') repeat-x -15px 0; color: #fff; } div.moduletable-black a:link, div.moduletable-black a:visited { color: #199dd1; } div.moduletable-black a:hover { color: #FFFFFF; } #insetwrap div.moduletable h3 { background: url('../images/style1/sportmx_bg_inset_module-h3.png') repeat-x -15px 0; } #rightwrap div.moduletable h3 { background: url('../images/style1/sportmx_bg_right_module-h3.png') repeat-x -15px 0; } #downarea div.moduletable { color: #fff; } #downarea div.moduletable h3 { background: none; color: #199dd1; } #downarea a:link, #downarea a:visited, #newsflasharea a:link, #newsflasharea a:visited { color: #199dd1; } #downarea a:hover, #newsflasharea a:hover { color: #FFFFFF; } /*JOOMLA CLASSES -----------------------------------------------------------------------------------------*/ .contentheading { color: #084B5E; } .contentheading a:link, .contentheading a:visited { color: #084B5E; } .contentheading a:hover { color: #045600; } .contentpaneopen h2 { color: #030709; } .small, .modifydate, .createdate, .mosimage_caption { color: #000; } .smalldark { color: #0c3642; } .sectiontableentry1, .sectiontableentry2 { border-bottom: 1px solid #a1b9c9; } .componentheading { color: #084b5e; } table.contenttoc { background-color: #fff; border-left: 1px solid #a1b9c9; } .sectiontableheader { border-bottom: 1px solid #B8D2E4; border-top: 1px solid #B8D2E4; color: #fff; background-color: #2b9700; } tr.sectiontableentry1 td, tr.sectiontableentry2 td, td.sectiontableentry1, td.sectiontableentry2 { border-bottom: 1px solid #b3d2e4; } tr.sectiontableentry1 td, td.sectiontableentry1 { background-color: #f0f0f0; } tr.sectiontableentry2 td, td.sectiontableentry2 { background-color: #dde9f0; } tr.sectiontableentry1:hover td, tr.sectiontableentry2:hover td { background-color: #2b9700; } .highlight { background-color: #ffff99; } table.pollstableborder img, table.pollstableborder-blue img, table.pollstableborder-bdark img, table.pollstableborder-beige img { vertical-align: baseline; } a.readon { background: transparent url('../images/style1/sportmx_bg_button.png') no-repeat 0 0; color: #fff; } div.back_button a { background: transparent url('../images/style1/sportmx_bg_back.png') no-repeat 0 0; color: #fff; } div.back_button a:active { color: #fff; } /* typography */ span.color { border-top: 1px solid #B8D2E4; border-bottom: 1px solid #B8D2E4; background-color: #f2f3f3; } span.color-1 { background-color: #E8F2F8; border-left: 4px solid #084B5E; color: #084B5E; } /* NEWS MODULES CLASSES ------------------------------------------------------------------------------------------ */ /*NS 1.0 SE*/ img.gk_ns_image { background-color: #edf3f5; border: 1px solid #d8e1e5; } div.moduletable-black img.gk_ns_image, table#downarea img.gk_ns_image { background-color: #17323c; border: 1px solid #1f4452; } /*News Column*/ div.gk_news_column_col h3 { background: none; border: none; border-top: 1px solid #B8D2E4; border-bottom: 1px solid #B8D2E4; background-color: #2b9700; } /*FCS 3.0*/ a.gk_fcs_news_image_link { border: none; } img.gk_fcs_image { border: 1px solid #ffffff; } ul.gk_ns_rest_news_floated { background-color: #E8F2F8; border-top: 1px solid #B8D2E4; border-bottom: 1px solid #B8D2E4; } div.fcs3_panel img { border: 1px solid #B8D2E4; } div.fcs3_options img { border: 1px solid #B8D2E4; } /*News Slider 1.0*/ img.gk_ns10_image { background-color: #edf3f5; border: 1px solid #d8e1e5; } div.moduletable-black img.gk_ns10_image { background-color: #17323c; border: 1px solid #1f4452; } div.ns10_panel img { border: 1px solid #B8D2E4; } /*SUCKERFISH MENU ----------------------------------------------------------------------*/ #nav a { color: #2b9700; } #nav li.active a { color: #2b9700; background: url('../images/style2/shaddow.png') repeat-x 0 top; } #nav li a:hover { background: url('../images/style2/shaddow.png') repeat-x 0 top; } #nav li li a { background: none; color: #939393; } #nav ul li ul li a:hover { background: url('../images/style1/menuleftgreen.png') ; } #nav ul li a:hover, #nav ul li ul li ul li a:hover { color: #045600; } #nav li li { background: none; border-bottom: 1px solid #252121; } #nav ul ul a { color: #000000; } #nav li { background: none; } #nav li ul { border-right: 1px solid #2b9700; border-left: 1px solid #2b9700; } #nav li:hover, #nav li.sfhover { background: url('../images/style2/shaddow.png') repeat-x 0 top; } #nav li:hover a, #nav li.sfhover a { color: #000000; } #nav li li:hover a, #nav li li.sfhover a { color: #000000; } #nav li li:hover a:hover, #nav li li.sfhover a:hover { color: #045600; } #nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul, #nav li li li li.sfhover ul { background: url('../images/style1/menuleftlight.png') ; }
  18. Hi, here's my code, and things are working as they should. My only problem is I can't seem to move my drop-down list from the cell it is in to the cell left one. (see photo) Can anyone see from my code whats going wrong? Site url: http://www.walthamforest-fc.co.uk/stats/newplayer.php?id=3 <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR VALIGN=middle ALIGN=center> <td><img src="http://www.walthamforest-fc.co.uk/stats/images/playerbar.jpg"></TD> </TR> <tr VALIGN=left ALIGN=center> <td><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . "_1.jpg"; ?>"/><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . ".jpg"; ?>"/> </td></tr> <tr> <td background="/stats/images/playernameback.jpg" width="308" height="46"> <font face="Arial" size="4"><span style="letter-spacing: 0pt"><font color="#018609"> <?php echo "$playerdata[firstname]" ?> <?php echo "$playerdata[lastname]" ?> </TD> <td> <td background="/stats/images/playernameback.jpg" width="202" height="46"><?php // //Haetaan kaikki pelaajat dropdownia varten // $sql = ' SELECT P.PlayerID AS id, P.PlayerLastName AS lastname, P.PlayerFirstName AS firstname, P.PlayerPublish AS publish FROM tplss_seasons S LEFT OUTER JOIN tplss_players P ON P.PlayerID = S.SeasonPlayerID '; if($defaultseasonid == 0) { $sql .= " WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } else { $sql .= " AND S.SeasonID = '$defaultseasonid' WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } $query = mysql_query("$sql", $connection) or die(mysql_error()); echo"<select name=\"playerid\">"; while($data = mysql_fetch_array($query)) { if($data['id'] == $id) { echo"<option value=\"$data[id]\" SELECTED>$data[firstname] $data[lastname]</option>\n"; } else { echo"<option value=\"$data[id]\">$data[firstname] $data[lastname]</option>\n"; } } echo"</select> <input type=\"submit\" name=\"change_player\" value=\"$txt_change\">"; mysql_free_result($query); $ttl = (($_SESSION['getAdditional'] + 1) % 2) ? "Show": "Hide"; ?> </td> </tr>
  19. No luck with rowspan and colspan, it made everything look very strange. anyone else have any ideas?
  20. ondi

    Font sizes

    No luck with that ProjectFear, I get: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/stats/newplayer.php on line 355
  21. I cant for the life of me change the font size in this code: <tr> <td align=\"left\" valign=\"middle\" bgcolor=\"$temp\" > $data[opponent] </td> </tr> I've tried using font size=\"1\" but to no avail
  22. Hi, here's my code, and things are working as they should. My only problem is I can't seem to move my drop-down list from the cell it is in to the cell left one. (see photo) Can anyone see from my code whats going wrong? Site url: http://www.walthamforest-fc.co.uk/stats/newplayer.php?id=3 <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <TR VALIGN=middle ALIGN=center> <td><img src="http://www.walthamforest-fc.co.uk/stats/images/playerbar.jpg"></TD> </TR> <tr VALIGN=left ALIGN=center> <td><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . "_1.jpg"; ?>"/><img src=" <?php echo $image_url = "images/" . $playerdata['id'] . ".jpg"; ?>"/> </td></tr> <tr> <td background="/stats/images/playernameback.jpg" width="308" height="46"> <font face="Arial" size="4"><span style="letter-spacing: 0pt"><font color="#018609"> <?php echo "$playerdata[firstname]" ?> <?php echo "$playerdata[lastname]" ?> </TD> <td> <td background="/stats/images/playernameback.jpg" width="202" height="46"><?php // //Haetaan kaikki pelaajat dropdownia varten // $sql = ' SELECT P.PlayerID AS id, P.PlayerLastName AS lastname, P.PlayerFirstName AS firstname, P.PlayerPublish AS publish FROM tplss_seasons S LEFT OUTER JOIN tplss_players P ON P.PlayerID = S.SeasonPlayerID '; if($defaultseasonid == 0) { $sql .= " WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } else { $sql .= " AND S.SeasonID = '$defaultseasonid' WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } $query = mysql_query("$sql", $connection) or die(mysql_error()); echo"<select name=\"playerid\">"; while($data = mysql_fetch_array($query)) { if($data['id'] == $id) { echo"<option value=\"$data[id]\" SELECTED>$data[firstname] $data[lastname]</option>\n"; } else { echo"<option value=\"$data[id]\">$data[firstname] $data[lastname]</option>\n"; } } echo"</select> <input type=\"submit\" name=\"change_player\" value=\"$txt_change\">"; mysql_free_result($query); $ttl = (($_SESSION['getAdditional'] + 1) % 2) ? "Show": "Hide"; ?> </td> </tr>
  23. I've a drop down list and a button created no problems. However, when the button is clicked, it only takes you to the same page, no matter which drop down option you chose. <?php // //Haetaan kaikki pelaajat dropdownia varten // $sql = ' SELECT P.PlayerID AS id, P.PlayerLastName AS lastname, P.PlayerFirstName AS firstname, P.PlayerPublish AS publish FROM tplss_seasons S LEFT OUTER JOIN tplss_players P ON P.PlayerID = S.SeasonPlayerID '; if($defaultseasonid == 0) { $sql .= " WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } else { $sql .= " AND S.SeasonID = '$defaultseasonid' WHERE P.PlayerID != '' AND P.PlayerPublish = '1' GROUP BY id ORDER BY firstname, lastname"; } $query = mysql_query("$sql", $connection) or die(mysql_error()); echo"<br>$txt_change_player: <select name=\"playerid\">"; while($data = mysql_fetch_array($query)) { if($data['id'] == $id) { echo"<option value=\"$data[id]\" SELECTED>$data[firstname] $data[lastname]</option>\n"; } else { echo"<option value=\"$data[id]\">$data[firstname] $data[lastname]</option>\n"; } } echo"</select> <input type=\"submit\" name=\"change_player\" value=\"$txt_change\">"; mysql_free_result($query); $ttl = (($_SESSION['getAdditional'] + 1) % 2) ? "Show": "Hide"; ?> Here's my code, can anyone help me with whats going wrong? Thanks.
  24. Hi Kat, i now get this error: Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/fhlinux222/w/walthamforest-fc.co.uk/user/htdocs/stats/newplayer.php on line 115 My image isn't standard for every page, it's relative to the playerid.
  25. I know my code works as it displays the correct image. However, when i put the code inside a table cell the picture wont show. Can anyone see where I'm going wrong? Here's my code: <TABLE WIDTH="520" ALIGN=center BORDER=0 CELLSPACING=0 CELLPADDING=0> <tr VALIGN=left ALIGN=center> <td> <?php $image_url = "images/" . $playerdata['id'] . ".jpg"; ?> </td></tr></table>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.