Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] PHP
RKP
post 30.09.2008, 18:27:12
Post #1





Grupa: Zarejestrowani
Postów: 5
Pomógł: 0
Dołączył: 30.09.2008

Ostrzeżenie: (0%)
-----


Błąd w linijkach 18 i 23. Pomóżcie...
  1. <?php
  2.    $dir   = $_GET["folder"];
  3.    $photo = $_GET["photo"];
  4.  
  5.    include("folderlib.php");
  6.    $files =  file_list("gallery/" .$dir ."/640x480/",false);
  7.    function cmp($a, $b)
  8.    {
  9.        preg_match("/([^d]+)([d]+)(.+)/", $a, $matches_a);
  10.        preg_match("/([^d]+)([d]+)(.+)/", $b, $matches_b);
  11.  
  12.        if(strcmp($matches_a[1], $matches_b[1])==0)
  13.        {
  14.            if($matches_a[2]!=$matches_b[2]) return $matches_a[2]-$matches_b[2];
  15.            return strcmp($matches_a[3], $matches_b[3]);
  16.        }
  17.        return strcmp($matches_a[1], $matches_b[1]);
  18.    }
  19.    usort($files,cmp);
  20.  
  21.    //print_r($files);
  22.    //print '<br />' .$photo;
  23.    $__length = count($files);
  24.    $__curent = array_search($photo,$files);
  25.  
  26.    if($__curent>0)
  27.    {
  28.        $prev = '<a href="?folder=' .$folder .'&photo=' .$files[($__curent-1)] .'">';
  29.        $prev .= '<img src="images/poprzednie.gif" alt="poprzedni" border="0">';
  30.        $prev .= '</a>';
  31.    }
  32.    if($__curent<$__length-1)
  33.    {
  34.        $next = '<a href="?folder=' .$folder .'&photo=' .$files[($__curent+1)] .'">';
  35.        $next .= '<img src="images/nastepne.gif" alt="">';
  36.        $prev .= '</a>';
  37.    }
  38.  
  39. ?>
  40. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "htt://www.w3.org/TR/html4/loose.dtd">
  41.  
  42. <html>
  43. <head>
  44.  
  45. <title>Galeria - Nutka</title>
  46.  
  47. <meta http-equiv="Content-type" content="text/html; charset=iso-8859-2">
  48. <meta name="Keywords" content="nutka zdjecia">
  49. <meta name="Description" content="Niebuliczne przedszkole Nutka">
  50. <meta name="Author" content="info@info-lab.waw.pl">
  51. <meta name="Robots" content="ALL">
  52. <link rel="stylesheet" type="text/css" href="style.css" />
  53.  
  54. </head>
  55. <body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" >
  56.  
  57. <table border="0" class="tab_center" cellspacing="0" cellpadding="10">
  58. <tr>
  59.    <td>
  60.        <img src="images/slonko_gal.gif" alt=""></td>
  61.    <td>
  62.        <img src="images/hmurka1.gif" alt=""></td>
  63.    <td>
  64.        <img src="images/hmurka2.gif" alt=""></td>
  65. </tr>
  66.  
  67. <?php
  68.  
  69. print '<tr>
  70.    <td>';
  71. print $prev;
  72. print '</td><td>';
  73.        //<div class="center"><img src="images/zamknij_galerie.gif" alt=""></div>
  74. print '</td><td>';
  75. print $next;
  76. print '</td></tr>';
  77.  
  78. ?>
  79.  
  80. <tr>
  81.    <td>
  82.        &nbsp;</td>
  83.    <td>
  84.    <?php
  85.  
  86.  
  87.        print '<img src="gallery/' .$dir ."/640x480/" .$photo .'" alt="">';
  88.        //<img src="galeria/fotka.jpg" alt="">
  89.    ?>
  90.  
  91.    </td>
  92.  
  93.    <td>
  94.        &nbsp;</td>
  95. </tr>
  96.  
  97. </table>
  98.  
  99.  
  100. </BODY>
  101. </HTML>


Ten post edytował webdice 30.09.2008, 20:57:24
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Wersja Lo-Fi Aktualny czas: 14.08.2025 - 03:23