Bir sürü konu okudum şu 2 gün içinde girip çıkmadığım site/konu kalmadı ama işte bir türlü beceremedim aslında db'den alıp sayfalamayı başardım ama şu koda entegre edemedim bir türlü Yardımcı olabilirsiniz cidden çok sevinirim.
PHP:
<?php
$Category = $_GET['Category'];
$image_path ="../..";
include_once("skin.php");
echo $header;
echo "<h2>$Category wallpapers</h2>";
if ($image_path == "")
{
$image_path=$_SERVER['REQUEST_URI'];
}
if (substr($image_path,strlen($image_path)-1,1) != "/")
$image_path=$image_path."/";
//Category wallpapers.
#get the category ID
$cCategory = str_replace("+", " ", $Category);
$cQuery = "SELECT * FROM `Categories` WHERE `name`='$cCategory' LIMIT 1";
$cResult = mysql_query($cQuery) or die(mysql_error());
if (mysql_num_rows($cResult) <= 0)
{
echo "There are currently no wallpapers in this category.";
} else
{
$Row = mysql_fetch_object($cResult);
$id = $Row->id;
$result = mysql_query("SELECT * FROM `Wallpapers` WHERE `Category` = '".$id."' OR `Category` IN (SELECT `id` FROM `Categories` WHERE `Parent` = '".$id."') AND `approved` = '0' ORDER BY `ID` DESC");
$x = 0;
if (mysql_num_rows($result) <= 0)
{
echo "There are currently no wallpapers in this category.";
} else
{
while ($row = mysql_fetch_assoc($result)) {
$x += 1;
echo "\n".'<div class="Box Left">'."\n\t";
echo '<div style="font-size: 1em; margin-bottom: 5px;"><a href="'.$image_path.'wallpaper/'.str_replace(" ", "-", $row['Title']).'/">'.$row['Title']."</a></div>";
echo '<a href="'.$image_path.'wallpaper/'.str_replace(" ", "-", $row['Title']).'/"><img class="Thumbnail" src="image_resize.php?i=images/wallpapers/'.$row['Wallpaper1'].'&w=160&h=160" alt="'.$row['Name'].'" /></a>';
echo '<div class="Clear"></div>'."\n";
echo '</div>';
if (!is_int($x/3)){
echo '<div class="Spacer"> </div>';
}
}
}
}
echo '<div class="Clear"></div>';
echo $footer;
?>