آخرین کتاب های کتابخانه

{source}<?php


$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select($db->quoteName('ordering'));
$query->from($db->quoteName('#__phocadownload'));
$query->where($db->quoteName('catid') . ' =1 ');
$db->setQuery($query);
$column= $db->loadColumn();
sort($column);
$latest= $column[count($column)-1];
for ($x = 0; $x <= 2; $x++) {
// Create a new query object.
$query = $db->getQuery(true);

// Select all records from the user profile table where key begins with "custom.".
// Order it by the ordering field.


$query->select($db->quoteName(array('id', 'filename', 'title','image_download', 'ordering')));
$query->from($db->quoteName('#__phocadownload'));
$query->where($db->quoteName('catid') . ' =1 ');


$or_num = $latest-$x;

$query->where($db->quoteName('ordering') . ' = ' . $or_num);


$query->order('ordering ASC');

// Reset the query using our newly populated query object.
$db->setQuery($query);

// Load the results as a list of stdClass objects (see later for more options on retrieving data).
$results = $db->loadObjectList();


$row = $db->loadRow();
$im_down=$row['3'];
$im_id=$row['0'];
?>
<a href="/<?php echo "/index.php?option=com_phocadownload&view=file&id=".$im_id ?>" style="margin: 0px 0px 0px 10px;">
<img src ="<?php echo "/images/phocadownload/".$im_down; ?>" style="width: 100%;" />
</a>
<?php
echo "\n";
} ?>
{/source}

تماس با ما

مهندس سید یحیی مطلبی

09134514707

© 2015 Your Company. All Rights Reserved. Designed By JoomShaper

Search

اگر تاکنون ثبت نام نکرده اید، اینجا را کلیک کنید.

ورود به حساب کاربری