Changeset 9038 for trunk/www


Ignore:
Timestamp:
Oct 31, 2004, 2:08:26 PM (15 years ago)
Author:
matt
Message:

Modifications for archives.php

Location:
trunk/www/fr
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/fr/includes/functions.inc

    r8293 r9038  
    11<?php
    22
    3 # $Id: functions.inc,v 1.5 2004/09/14 18:19:21 matt Exp $
     3# $Id: functions.inc,v 1.6 2004/10/31 14:08:26 matt Exp $
    44# Copyright (c) 2003, OpenDarwin
    55
     
    5050      $rss .= "    <item>\n";
    5151      $rss .= "      <title>$row->title</title>\n";
    52       $rss .= "      <link>http://darwinports.opendarwin.org/archives/$row->id.php</link>\n";
     52      $rss .= "      <link>http://darwinports.opendarwin.org/archives.php?id=$row->id</link>\n";
    5353
    5454      $desc_query = "SELECT SUBSTRING_INDEX(news, ' ', 26) FROM headlines WHERE id=$row->id";
     
    5959
    6060      $rss .= "      <description><![CDATA[$description...</p>]]></description>\n";
    61       $rss .= "      <guid isPermaLink=\"true\">http://darwinports.opendarwin.org/archives/$row->id.php</guid>\n";
     61      $rss .= "      <guid isPermaLink=\"true\">http://darwinports.opendarwin.org/archives.php?id=$row->id</guid>\n";
    6262      $rss .= "      <content:encoded><![CDATA[$row->news]]></content:encoded>\n";
    6363      $rss .= "    </item>\n";
     
    246246  if(mysql_num_rows($result) > 0) {
    247247    while($row = mysql_fetch_object($result)) {
    248       echo "<p><a href=\"/archives/$row->id.php\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">éditer</a></p>\n\n";
     248      echo "<p><a href=\"/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp&nbsp;&nbsp;|&nbsp;&nbsp;<a href=\"edit.php?id=$row->id\">éditer</a></p>\n\n";
    249249    }
    250250  }
     
    254254}
    255255
     256######################################################################
     257
     258# print a list of all existing headlines without the admin foobage
     259# (this is cheap and could be better)
     260function print_all_headlines_nonadmin() {
     261  global $connect;
     262
     263  $query = "SELECT id, title, DATE_FORMAT(timestamp, '%e %b %Y, %l:%i %p') AS f_timestamp FROM headlines ORDER BY id DESC";
     264  $result = mysql_query($query) or die("Error: $query.");
     265  if(!$result) {
     266    die("Error: $result.");
     267  }
     268  if(mysql_num_rows($result) > 0) {
     269    while($row = mysql_fetch_object($result)) {
     270      echo "<p><a href=\"/archives.php?id=$row->id\">$row->title</a><br />&nbsp&nbsp;$row->f_timestamp</p>\n\n";
     271    }
     272  }
     273  else {
     274    echo "<p>Aucunes dépêches disponibles.</p>\n\n";
     275  }
     276}
     277
     278
     279
    256280?>
  • trunk/www/fr/index.php

    r8293 r9038  
    2525        liés à l'installation/utilisation, vous pouvez <a href="/fr/help/">demander de l'aide</a>.</p>
    2626
    27           <p>Les rapports de bogues, demandes d'ajout de fonctionnalités et les
     27    <p>Les rapports de bogues, demandes d'ajout de fonctionnalités et les
    2828        nouveaux ports devront être soumis à <a href="http://www.opendarwin.org/bugzilla/">Bugzilla</a>.</p>
    2929
     
    3434          print_headlines();
    3535        ?>
     36    <p>Vous pouvez également lire les <a href="archives.php">archives</a>.</p>
    3637      </div>
    3738    </div>
Note: See TracChangeset for help on using the changeset viewer.