הרשם שאלות ותשובות רשימת חברים לוח שנה חיפוש הודעות מהיום סמן פורומים כנקראו

   
|!|

 
 
כלים לאשכול תצורת הצגה
Prev הודעה קודמת   הודעה הבאה Next
ישן 23-10-08, 12:08   # 8
shai_shoko
חבר חדש
 
מיני פרופיל
תאריך הצטרפות: Sep 2008
הודעות: 11

shai_shoko לא מחובר  

אממ יש לי קוד שעשיתי לא מזמן עם עמודים והכל..בקשה (רק תאבטח את הGET)
PHP קוד:
<?php 
$fileregex 
"[jpg|jpeg|png|gif]"
$dirname "/img/avatars/"
$dir opendir(".$dirname"); 
$images = array(); 
while (
$file readdir($dir)) 
 if (!
is_dir($dirname.$file) and $file <> ".." and $file <> "."
  if (
preg_match($fileregex,$file)) 
   
array_push($images,$dirname.$file); 
asort($images); 
$rpp 3;  
$ipr 3;  
$image_num count($images); 
$pages ceil($image_num / ($ipr $rpp)); 
$rows 1
if (isset(
$_GET['page'])) $page $_GET['page']; 
else 
$page 1
echo 
"<table>\n    <tr>\n"
for (
$i = ($ipr $rpp) * ($page 1); $i< ($ipr $rpp) * $page$i++) { 
if (
$i >= $image_num) break; 
echo 
"        <td>\n            <a href=\"".$images[$i]."\"><img height=\"100\" width=\"100\" src=\"".$images[$i]."\" /></a>\n        </td>\n"
if(
is_int(($i+1) / $ipr)) 

 echo 
"    </tr>\n    <tr>\n"
 
$rows++; 


echo 
"    </tr>\n</table>\n"
for(
$i 1$i<=$pages;$i++) 
echo 
"<a href=\"?page=$i\">$i</a>\n"
?>
  Reply With Quote
 

חברים פעילים הצופים באשכול זה: 1 (0 חברים ו- 1 אורחים)
 

כלים לאשכול
תצורת הצגה

חוקי פירסום
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is מופעל
סמיילים הם מופעל
[IMG] קוד מופעל
קוד HTML מכובה

קפיצה לפורום


כל הזמנים הם GMT +2. הזמן כעת הוא 00:09.

מופעל באמצעות VBulletin גרסה 3.8.6
כל הזכויות שמורות ©
כל הזכויות שמורות לסולל יבוא ורשתות (1997) בע"מ