Exemplo n.º 1
0
 public function load($iRecordID)
 {
     $oCon = new connection();
     $sSQL = "SELECT RecordID, Title, Artist, Price, GenreID, PhotoPath\n\t\t\t\tFROM tbrecords \n\t\t\t\tWHERE RecordID = " . $iRecordID;
     $oResultSet = $oCon->query($sSQL);
     $aRow = $oCon->fetchArray($oResultSet);
     $this->iRecordID = $aRow['RecordID'];
     $this->sTitle = $aRow['Title'];
     $this->sArtist = $aRow['Artist'];
     $this->fPrice = $aRow['Price'];
     $this->iGenreID = $aRow['GenreID'];
     $this->iPhotoPath = $aRow['PhotoPath'];
     $oCon->close();
 }
Exemplo n.º 2
0
<?php 
require_once 'dotclear/inc/prepend.php';
$con = new connection($dbuser, $dbpass, $dbhost, $dbbase);
$blog = new blog($con, DB_PREFIX, 1, dc_encoding);
$news = $blog->getLastNews(3, 'actualite');
if ($news->isEmpty()) {
    echo "  <p>Aucune actualité</p>\n";
} else {
    while (!$news->EOF()) {
        echo '  <h3>', $news->f('post_titre'), "</h3>\n";
        echo '  <h4>', strftime('%x', strtotime($news->f('post_dt'))), "</h4>\n";
        echo '  ', $news->f('post_content'), "\n\n";
        $news->moveNext();
    }
}
$con->close();
?>
  <p class="tous"><a href="/actualite/">Toutes les actualités</a></p>
</div>
<!-- Fin Actualité -->

<!-- Début Derniers Articles -->
<div id="articles">
<?php 
OW_liste_document(array('type' => 'A'), 3, 'Derniers articles&#8230;');
?>
  <p class="tous"><a href="/articles/">Tous les articles</a></p>
</div>
<!-- Fin Derniers Articles -->

</div>