[ PHPXref.com ] [ Generated: Sun Jul 20 19:01:47 2008 ] [ N/X CMS 4.1 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/wwwdev/ -> tour.php (source)

   1  <?PHP
   2    require_once  "nxheader.inc.php";
   3    $cds->layout->addStyleSheet("css/styles.css");
   4    $cds->layout->htmlHeader(); 
   5    include  "modules/siteheader.php";
   6  
   7    echo $cds->content->get("Headline");
   8    br();
   9    br();
  10    
  11    $articles = $cds->channel->get("Stage"); 
  12    $article = value("article", "NUMERIC", $articles[0]);
  13    
  14    $position = 1;
  15    
  16    for ($i=0; $i < count($articles); $i++) {            
  17        if ($article == $articles[$i]) {
  18            $position = $i + 1;
  19        } 
  20    }
  21    
  22    if ($position == 0) {
  23        $article = $articles[0];
  24        $position = 1;
  25    }
  26    
  27    echo '<div align="center">'; 
  28    if ($position > 1) {
  29      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[0].'">&lt;&lt;</a>';
  30      echo '&nbsp;&nbsp;';
  31      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[$position-2].'">&lt;</a>';
  32      echo '&nbsp;&nbsp;';
  33    } else {
  34        echo '&lt;&lt;';
  35      echo '&nbsp;&nbsp;';
  36      echo '&lt;';    
  37      echo '&nbsp;&nbsp;';
  38    }
  39    
  40    echo $position.'/'.count($articles);
  41  
  42    if ($position < count($articles)) {
  43      echo '&nbsp;&nbsp;';
  44      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[$position].'">&gt;</a>';
  45      echo '&nbsp;&nbsp;';
  46      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[count($articles)-1].'">&gt;&gt;</a>';
  47    } else {
  48        echo '&nbsp;&nbsp;';
  49      echo '&gt;';
  50      echo '&nbsp;&nbsp;';
  51      echo '&gt;&gt;';  
  52    }
  53    echo '</div>';
  54    br();br();
  55    
  56    // Article

  57    echo $cds->cluster->draw($article);
  58    
  59    //code duplication. not the clean way.

  60    br(); br();
  61    echo '<div align="center">';
  62    
  63    if ($position > 1) {
  64      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[0].'">&lt;&lt;</a>';
  65      echo '&nbsp;&nbsp;';
  66      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[$position-2].'">&lt;</a>';
  67      echo '&nbsp;&nbsp;';
  68    } else {
  69        echo '&lt;&lt;';
  70      echo '&nbsp;&nbsp;';
  71      echo '&lt;';    
  72      echo '&nbsp;&nbsp;';
  73    }
  74    
  75    echo $position.'/'.count($articles);
  76  
  77    if ($position < count($articles)) {
  78      echo '&nbsp;&nbsp;';
  79      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[$position].'">&gt;</a>';
  80      echo '&nbsp;&nbsp;';
  81      echo '<a href="'.$cds->getPageURL().'?v='.$cds->variation.'&page='.$cds->pageId.'&article='.$articles[count($articles)-1].'">&gt;&gt;</a>';
  82    } else {
  83        echo '&nbsp;&nbsp;';
  84      echo '&gt;';
  85      echo '&nbsp;&nbsp;';
  86      echo '&gt;&gt;';  
  87    }
  88    
  89    echo '</div>'; 
  90    include  "modules/sitefooter.php";
  91    require_once  "nxfooter.inc.php";
  92  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]