Stránka 1 z 1

Pomohl by mi někdo upravit kod PHP?

Napsal: 30 pro 2011 19:29
od Gizzer2
Dobrý den

Můžu poprosit někoho kdo by byl tak hodný a upravil mi prosím PHP kod.
Sám to neumí a byl bych vděčný kdyby mi to někdo udělal.
Vše je označeno na obrázcích jak bych to chtěl pokud to tedy půjde(nevyznám se v tom)

Kód: Vybrat vše

        $query = 'SELECT seasonid, seasonname FROM sportsdb_seasons ORDER BY seasonorder';
        $result = mysql_query($query) or die("Error in query $query");
        $num = mysql_num_rows($result);

        while ($seasons = mysql_fetch_array($result)) {
            $seasonname = htmlspecialchars($seasons['seasonname'], ENT_QUOTES);
            print '<h3>' . $seasonname;
            if ($is_admin || full_check('manage_conf') ) {
                print '<span style="font-size: 12px;"> - <a href="' . $_SERVER['PHP_SELF'] . '?action=conferences&season=' . $seasons['seasonid'] . '">Správa konference</a></span>';
            }
            print '</h3>' . "\n";
           
            // List the conferences in each season
            $queryconf = 'SELECT confid, confname FROM sportsdb_conferences WHERE season = ' . $seasons['seasonid'] . ' ORDER BY conforder';
            $resultconf = mysql_query($queryconf) or die ('Error in query ' . $queryconf);
            $numconf = mysql_num_rows($resultconf);

            while ($confs = mysql_fetch_array($resultconf)) {
                print '<p><a href="' . $_SERVER['PHP_SELF'] . "?action=mainview&conf={$confs['confid']}\">{$confs['confname']}</a></p>\n";
            }
        }

Re: Pomohl by mi někdo upravit kod PHP?

Napsal: 31 pro 2011 16:03
od Stene
Potřebuješ tedy pouze skýt/zobrazit těch pár řádků?

Re: Pomohl by mi někdo upravit kod PHP?  Vyřešeno

Napsal: 31 pro 2011 18:51
od CZechBoY
už jsem mu to upravl ;)
k H3 dáš onClick="hideShow('sezona-$i')" a k pak tam uděláš DIV id="sezona-$i" a do toho divu dáš ten obsah

funkce hideShow v JS:
function hideShow(id)
{
var el = document.getElementById(id);
if(!el) return
el.styl.display=el.style.display=='block' ? 'none' : 'block';
}

Re: Pomohl by mi někdo upravit kod PHP?

Napsal: 01 led 2012 00:21
od Gizzer2
Na tebe je vždy spolehnutí.

Díky Kamaráde.