~studentersamfundet-web/studentersamfundet-web/web

« back to all changes in this revision

Viewing changes to prog.php

  • Committer: Markus Igeland
  • Date: 2011-02-04 13:05:34 UTC
  • mto: (212.5.2 public_html)
  • mto: This revision was merged to the branch mainline in revision 214.
  • Revision ID: markusigeland@gmail.com-20110204130534-kxe31p23q3h2eofa
Fix til Bug #485247 - Sorteringsfeil på programsiden.

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
    );
14
14
 
15
15
load_posts( wp_parse_args( $_SERVER['QUERY_STRING'] , $defaults ) );
 
16
if( isset($_GET['type']) ) { // hvis man ser p� en type arrangement akkurat n�
 
17
        $tillatte_typer = array('konsert', 'debatt', 'film', 'fest', 'teater', 'annet'); //definerer gyldige arrangementstyper
 
18
        if( in_array($_GET['type'], $tillatte_typer) ) {
 
19
                $arr_type = $_GET['type'];
 
20
        }
 
21
}
16
22
?>
17
23
 
18
24
        <div id="content">
19
25
            <ul id="sorting">
20
26
                <li>
21
 
                    <span class="event-name"><a href="prog.php?sort=tittel&amp;sort2=<?php echo( "tittel" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Tittel:</a></span>
22
 
                    <span class="event-type"><a href="prog.php?sort=type&amp;sort2=<?php echo( "type" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Type:</a></span>
23
 
                    <span class="event-date"><a href="prog.php?sort=tid&amp;sort2=<?php echo( "tid" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Dato:</a></span>
24
 
                    <span class="event-place"><a href="prog.php?sort=sted&amp;sort2=<?php echo( "sted" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Sted:</a></span>
 
27
                    <span class="event-name"><a href="prog.php?type=<?=$arr_type?>&sort=tittel&amp;sort2=<?php echo( "tittel" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Tittel:</a></span>
 
28
                    <span class="event-type"><a href="prog.php?type=<?=$arr_type?>&sort=type&amp;sort2=<?php echo( "type" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Type:</a></span>
 
29
                    <span class="event-date"><a href="prog.php?type=<?=$arr_type?>&sort=tid&amp;sort2=<?php echo( "tid" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Dato:</a></span>
 
30
                    <span class="event-place"><a href="prog.php?type=<?=$arr_type?>&sort=sted&amp;sort2=<?php echo( "sted" == $sort && "asc" == $sort2 ? "desc" : "asc" ); ?>">Sted:</a></span>
25
31
                </li>
26
32
            </ul>
27
33