Jump to content
php.lv forumi

Paulinjsh

Reģistrētie lietotāji
  • Posts

    755
  • Joined

  • Last visited

Posts posted by Paulinjsh

  1. Tajā vietā, kur tev galeriju skripts, čeko piemēram.

    <?php
    $kategorijas	= array('mape', 'mape2'); // ieliekam atļautos get
    $path	= '/path/to/images/';
    $path_url	= '/images/';
    $path_to_images	= '';
    $path_url_to_images	= '';
    
    if(!empty($_GET['kategorija']) && in_array($_GET['kategorija'], $kategorijas)) {
    $path_to_images = $path.$_GET['kategorija'].'/';
    $path_url_to_images = $path_url.$_GET['kategorija'].'/';
    if ($handle = opendir($path_to_images)) {
    	while (false !== ($file = readdir($handle))) {
    		list($w, $h) = getimagesize($path_to_images.$file);
    		if ($w > 0 && $h > 0) {
    			echo '<image src="'.$path_url_to_images.$file.'" alt="" width="'.$w.'" heigth="'.$h.'" />';
    		}
    	}
    	closedir($handle);
    }
    }

     

    Kaut kā tā.. Pirmais, kas ienāca prātā!

     

    Vēl var pamuhļīties ar file name, kur varam pat description utt sabāzt, lai gan tas tāds perverss risinājums.

  2. Mediaparks meklē Xhtml/CSS/XML programmētāju.

     

    Darba pienākumos ietilpst sagatavota PSD dizaina pārvēršana Xhtml un CSS. Rezultātam ir jāatbilst XHTML 1.0 Strict. Gan Xhtml, gan CSS ir jābūt "W3C validate". Piedāvājam darbu pie interesantiem projektiem. Neizpaliek arī atbilstošs atalgojums, kurš būs augstāks kā vidēji xhtml programmētājs saņem.

     

    Sākumā paredzēts pamatdarbs pie viena, konkrēta un liela apjoma projekta, vēlāk pie citiem projektiem.

     

    Sūti savu CV, motivācijas vēstuli un portfolio uz [email protected]

  3. tu gadījumā neuzliec cookie uz kādu noteiktu path? http://lv.php.net/setcookie

     

    bool setcookie ( string $name [, string $value [, int $expire [, string $path [, string $domain [, bool $secure [, bool $httponly]]]]]] )

     

    path

     

    The path on the server in which the cookie will be available on. If set to '/', the cookie will be available within the entire domain. If set to '/foo/', the cookie will only be available within the /foo/ directory and all sub-directories such as /foo/bar/ of domain. The default value is the current directory that the cookie is being set in.

×
×
  • Create New...