<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Visualizzare immagine]]></title><description><![CDATA[<p dir="auto">Ciao a Tutti,<br />
sto utilizzando uno script di una galleria fotografica e succede che quando inserisco una foto non mi permette la visualizzazione della stessa.<br />
In effetti se mi porto con la freccetta sulla miniatura mi da come link:</p>
<pre><code class="language-php">&lt;a id="pirobox_gall" class="zmadho first last" href="fotot/galeria/plot/galeria32229203311726" rel="1&amp;nbsp;of&amp;nbsp;1" rev="0"/&gt;
</code></pre>
<p dir="auto">in realtà dovrebbe essere :</p>
<pre><code class="language-php">&lt;a id="pirobox_gall" class="zmadho first last" href="fotot/galeria/plot/galeria32229203311726.jpg" rel="1&amp;nbsp;of&amp;nbsp;1" rev="0"/&gt;
</code></pre>
<p dir="auto">il codice per intero è:</p>
<pre><code class="language-php">&lt;?php
$max = 12;
if(isset($_GET['p'])) { $p = $_GET['p'];  }
if(empty($p)) { $p = 1;}
$limits = ($p - 1) * $max; 

//tkerkimit///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
$sql = mysql_query("SELECT * FROM galeria ORDER BY id DESC LIMIT ".$limits.",$max") or die(mysql_error());
$totalres = mysql_result(mysql_query("SELECT COUNT(id) AS tot FROM galeria"),0);
$sqlrk = mysql_query("SELECT * FROM galeria") or die(mysql_error()); 
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
echo '&lt;div class="reshti"&gt;';
$totalpages = ceil($totalres / $max); 
if (mysql_num_rows($sql) &gt; 0) {
$rezkerkimeve = mysql_num_rows($sqlrk);
while($r = mysql_fetch_array($sql,MYSQL_ASSOC))
{
$id = $r['id']; 
$foto = $r['foto']; 
$v=$v+1;
echo '&lt;div class="foto"&gt;
      &lt;div class="fotomb"&gt;&lt;div align="center"&gt;&lt;img src="fotot/galeria/para/'.$foto.'" /&gt;&lt;/div&gt;&lt;/div&gt;
      &lt;div style="clear:both;"&gt;&lt;/div&gt;
      &lt;a href="fotot/galeria/plot/'.$foto.'" class="zmadho" id="pirobox_gall"&gt;&lt;/a&gt;&lt;/div&gt;';
if($v==4 || $v==8 || $v==12) { echo '&lt;/div&gt;&lt;div class="reshti"&gt;'; }
      }}
echo '&lt;/div&gt;&lt;/div&gt;';    
    

if(!isset($foto)) { echo 'Nessuna foto caricata'; } else { 
$prp=$p-1;
$ardh=$p+1;
echo '&lt;div class="pastrimi"&gt;&lt;/div&gt;';
echo '&lt;div class="galeriaBtn"&gt;';
    if($p==1) { echo '&lt;div class="kthehuBtn"&gt;&lt;img src="fotot/kthehuBtn_pasiv.gif" alt="kthehu" /&gt;&lt;/div&gt;'; } else { 
                echo '&lt;div class="kthehuBtn"&gt;&lt;a href="index.php?p='.$prp.'"&gt;&lt;img src="fotot/kthehuBtn_aktiv.gif" alt="kthehu" /&gt;&lt;/a&gt;&lt;/div&gt;'; }
    if($p==$totalpages) { echo '&lt;div class="vazhdoBtn"&gt;&lt;img src="fotot/vazhdoBtn_pasiv.gif" alt="kthehu" /&gt;&lt;/div&gt;'; } else {
                          echo '&lt;div class="vazhdoBtn"&gt;&lt;a href="index.php?p='.$ardh.'"&gt;&lt;img src="fotot/vazhdoBtn_aktiv.gif" alt="kthehu" /&gt;&lt;/a&gt;&lt;/div&gt;'; }
echo '&lt;/div&gt;'; }
?&gt;
</code></pre>
<p dir="auto">Potete aiutarmi a fargli riconoscere l'estensione dell'immagine??</p>
<p dir="auto">Grazie a tutti</p>
]]></description><link>https://dev.connect.gt/topic/118135/visualizzare-immagine</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 17:14:29 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/118135.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 29 Dec 2009 18:39:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Visualizzare immagine on Sat, 09 Jan 2010 11:43:01 GMT]]></title><description><![CDATA[<p dir="auto">Ragazzi ma posso avere una risposta?? E' una cosa fattibile?</p>
]]></description><link>https://dev.connect.gt/post/881738</link><guid isPermaLink="true">https://dev.connect.gt/post/881738</guid><dc:creator><![CDATA[pusherxx]]></dc:creator><pubDate>Sat, 09 Jan 2010 11:43:01 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Mon, 04 Jan 2010 17:01:11 GMT]]></title><description><![CDATA[<p dir="auto">Thedarkita non puoi proprio aiutarmi?</p>
]]></description><link>https://dev.connect.gt/post/881737</link><guid isPermaLink="true">https://dev.connect.gt/post/881737</guid><dc:creator><![CDATA[pusherxx]]></dc:creator><pubDate>Mon, 04 Jan 2010 17:01:11 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Thu, 31 Dec 2009 12:11:23 GMT]]></title><description><![CDATA[<p dir="auto">no no, avevo inserito n altro script, ma è sbagliato...asp un secondo!!<br />
è questo:</p>
<pre><code class="language-php">&lt;?php session_start(); ob_start(); if(!isset($_SESSION['admin'])) { header('Location: hyrja'); exit(); } include('mjetet/ldb.php'); 

            $destinacioni="galeria";
            
            //vendi ku do t&amp;euml; rruhen imazhet
            $paravendi = "../fotot/".$destinacioni."/para/";
            $plotvendi = "../fotot/".$destinacioni."/plot/";
            
            //A d&amp;euml;shironi ti limitoni ekstenzionet e ngarkimit ? (po/jo)
            $kufizimitipit = "po"; 
            
            //Ekstenzionet e lejuara
            $tipetelejuara = array(".gif",".jpg",".png",".jpeg",".bmp");
            
            // ruajm informacionet e t&amp;euml; dh&amp;euml;n&amp;euml;s p&amp;euml;rkoh&amp;euml;sisht
            $tipiitedhenes = $_FILES['imazhi']['type'];
            $emriitedhenes = $_FILES['imazhi']['name'];
            $masaetedhenes = $_FILES['imazhi']['size'];
            $edheneperkohshme = $_FILES['imazhi']['tmp_name'];
            
            //kontrollojme se a &amp;euml;sht&amp;euml; ngarkuar ndonj&amp;euml; t&amp;euml; dh&amp;euml;n&amp;euml;
            if(!is_uploaded_file($edheneperkohshme)){
            $mesazhi="Error: Please choose a picture!.";
            } else {
            
            //kontrollojm&amp;euml; ekstenzionin
            $ekst = strrchr($emriitedhenes,'.');
            $ekst = strtolower($ekst);
            if (($kufizimitipit == "po") &amp;&amp; (!in_array($ekst,$tipetelejuara))) {
            $mesazhi="Choosen Picture isn't allowed.";  } }
            
            //marrim prapashtesen.
            $merrekst = explode ('.', $emriitedhenes);
            $ekstitedhenes = $merrekst[count($merrekst)-1];
            
            //definojm&amp;euml; emrin e rast&amp;euml;sish&amp;euml;m
            $emri_irastit = md5(time());
            $emri_irastit= "".$destinacioni."".rand(0,999999999999999)."";
                
            // caktojm masat se sa do t&amp;euml; jen p&amp;euml;r proporcionim t&amp;euml; automatizuar
            $paramasaGJ= 160;
            $plotmasaGJ= 800;
            $paramasaL= 115;
            $plotmasaL= 600;
            
            //rruajm formen e imazhit
            if($masaetedhenes){
            if($tipiitedhenes == "image/pjpeg" || $tipiitedhenes == "image/jpeg"){
            $imazhiri = imagecreatefromjpeg($edheneperkohshme);
            $imazhiri2 = imagecreatefromjpeg($edheneperkohshme);
            }elseif($tipiitedhenes == "image/x-png" || $tipiitedhenes == "image/png"){
            $imazhiri = imagecreatefrompng($edheneperkohshme);
            $imazhiri2 = imagecreatefrompng($edheneperkohshme);
            }elseif($tipiitedhenes == "image/gif"){
            $imazhiri = imagecreatefromgif($edheneperkohshme);
            $imazhiri2 = imagecreatefromgif($edheneperkohshme);
            }
            
            //tani vendosim p&amp;euml;r p&amp;euml;rmasat e reja
            list($gjeresia, $gjatesia) = getimagesize($edheneperkohshme);
            if ($gjatesia &gt; $gjeresia ) {   
                     $zmadho = $paramasaGJ / $gjatesia;  
                     $gjatesiaere = $paramasaL;   
                     $gjeresiaere = $gjeresia * $zmadho;   
                  } else {    
                    $zmadho = $paramasaGJ / $gjeresia;   
                    $gjeresiaere = $paramasaGJ; 
                    $gjatesiaere = $gjatesia * $zmadho;
                  } 
            if ($gjatesia &gt; $gjeresia) {   
                     $zmadho = $plotmasaGJ / $gjatesia;  
                     $gjatesiaere2 = $plotmasaL;   
                     $gjeresiaere2 = $gjeresia * $zmadho;   
                  } else {    
                    $zmadho = $plotmasaGJ / $gjeresia;   
                    $gjeresiaere2 = $plotmasaGJ; 
                    $gjatesiaere2 = $gjatesia * $zmadho;
                  } 

            
            //funksioni i rizmadhimit
            if (function_exists(imagecreatetruecolor)){
            $imazhirizmadhuar = imagecreatetruecolor($gjeresiaere,$gjatesiaere);
            $imazhirizmadhuar2 = imagecreatetruecolor($gjeresiaere2,$gjatesiaere2);
            }else{
            die("Error: Please ask your hoster to support higher GD library as GD2.");
            }
            imagecopyresampled($imazhirizmadhuar, $imazhiri, 0, 0, 0, 0, $gjeresiaere, $gjatesiaere, $gjeresia, $gjatesia);
            imagecopyresampled($imazhirizmadhuar2, $imazhiri2, 0, 0, 0, 0, $gjeresiaere2, $gjatesiaere2, $gjeresia, $gjatesia);
            //ruajm imazhet
            ImageJpeg ($imazhirizmadhuar,"$paravendi/$emri_irastit.$ekstitedhenes",100);
            ImageJpeg ($imazhirizmadhuar2,"$plotvendi/$emri_irastit.$ekstitedhenes",100);
            ImageDestroy ($imazhirizmadhuar);
            ImageDestroy ($imazhirizmadhuar2);
            ImageDestroy ($imazhiri);
            ImageDestroy ($imazhiri2);
            
            //postojm&amp;euml; informacionet n&amp;euml; databaz&amp;euml;
            $d_to_dt = "INSERT INTO galeria VALUES('','".$emri_irastit.".".$ekstitedhenes."')";
            $get_r= mysql_query($d_to_dt,$lidhja) or die (mysql_error($lidhja));
            $mesazhi="&lt;br/&gt;Picture has been uploaded!&lt;br/&gt;&lt;a href=\"shfleto.php\"&gt;go back to browse&lt;/a&gt;&lt;br/&gt;&lt;br/&gt;&lt;br/&gt;"; }
            
?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/post/881740</link><guid isPermaLink="true">https://dev.connect.gt/post/881740</guid><dc:creator><![CDATA[pusherxx]]></dc:creator><pubDate>Thu, 31 Dec 2009 12:11:23 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Thu, 31 Dec 2009 12:07:57 GMT]]></title><description><![CDATA[<p dir="auto">Non è questo, questo si occupa solo di creare le tabelle del database se non esistono.</p>
]]></description><link>https://dev.connect.gt/post/881676</link><guid isPermaLink="true">https://dev.connect.gt/post/881676</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Thu, 31 Dec 2009 12:07:57 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Thu, 31 Dec 2009 11:55:25 GMT]]></title><description><![CDATA[<p dir="auto">questo è lo script:</p>
<pre><code class="language-php"> &lt;?php
      if(!$lidhja) { } else {
      
        $tabelaadmin = "   CREATE TABLE IF NOT EXISTS `admin` (
                          `id` int(11) NOT NULL AUTO_INCREMENT,
                          `admin` varchar(255) NOT NULL,
                          `fjalekalimi` varchar(255) NOT NULL,
                          PRIMARY KEY (`id`)
                        ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;";
        mysql_query($tabelaadmin,$lidhja);
        echo '&lt;p id="tkerkuarats"&gt; Created admin table.&lt;/p&gt;';            

        $tabelagaleria = "CREATE TABLE IF NOT EXISTS `galeria` (
                          `id` int(11) NOT NULL AUTO_INCREMENT,
                          `foto` varchar(21) NOT NULL,
                          PRIMARY KEY (`id`)
                        ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
        mysql_query($tabelagaleria,$lidhja);
        echo '&lt;p id="tkerkuarats"&gt; Created galeria table, wich will handle your pictures.&lt;/p&gt;';            
                
        $tabelagaleria = "CREATE TABLE IF NOT EXISTS `siguria` (
                          `id` int(11) NOT NULL AUTO_INCREMENT,
                          `ip` varchar(255) NOT NULL,
                          `statusi` varchar(255) NOT NULL,
                          `datadheora` varchar(255) NOT NULL,
                          `kush` varchar(255) NOT NULL,
                          PRIMARY KEY (`id`)
                        ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;";
        mysql_query($tabelagaleria,$lidhja);
        echo '&lt;p id="tkerkuarats"&gt; Created siguria table, wich will save your gallery from hackers.&lt;/p&gt;';
        mysql_close($lidhja); 
        $krijo = fopen("ldb.php", "w");
        if($krijo==false) {
        echo 'We could not create file ldb.php wich will be in mjetet/ldb.php please take your time and create a php file with this content:'; include('ldb.txt');
        } else {
            $ldb = "../admin/mjetet/ldb.php";
            $hap = fopen($ldb, 'w');
            fclose($hap); 
                        
            $hap = fopen($ldb, 'w');
            echo '&lt;p id="tkerkuarats"&gt;Opened file successfully.&lt;/p&gt;';
$tedhenat = '&lt;?php
//Konstantet
$emridb="'.$dbnameposted.'";
$hosti="'.$dbhostposted.'";
$epdb="'.$dbuserposted.'";
$fkdb="'.$dbpassposted.'";
//Lidhja me bazen e te dhenave 
$lidhja = mysql_connect($hosti,$epdb,$fkdb);
//Zgjidhja e bazes se te dhenave
mysql_select_db($emridb,$lidhja);
?&gt;';
            fwrite($hap, $tedhenat);
            echo '&lt;p id="tkerkuarats"&gt;Writing informations on file successfully.&lt;/p&gt;';
            fclose($hap); 
            echo '&lt;p id="tkerkuarats"&gt;Closing and finishing successfully.&lt;/p&gt;';
 }


            }
      ?&gt;
</code></pre>
<p dir="auto">cosa dovrei aggiungere?<br />
scusami ma di codici non ne capisco tanto!<br />
Ti ringrazio in anticipo!!<img src="https://dev.connect.gt/assets/plugins/nodebb-plugin-emoji/emoji/customizations/54a3bffb-5e4a-4eb8-81dc-99b2072e5d05-175.gif?v=12b9555a9a1" class="not-responsive emoji emoji-customizations emoji--ciauz" style="height:1.4em;width:auto;vertical-align:middle" title=":ciauz:" alt="" /></p>
]]></description><link>https://dev.connect.gt/post/881739</link><guid isPermaLink="true">https://dev.connect.gt/post/881739</guid><dc:creator><![CDATA[pusherxx]]></dc:creator><pubDate>Thu, 31 Dec 2009 11:55:25 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Thu, 31 Dec 2009 10:29:06 GMT]]></title><description><![CDATA[<p dir="auto">Dovresti guardare lo script che si occupa dell'inserimento.</p>
]]></description><link>https://dev.connect.gt/post/881675</link><guid isPermaLink="true">https://dev.connect.gt/post/881675</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Thu, 31 Dec 2009 10:29:06 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Wed, 30 Dec 2009 19:34:31 GMT]]></title><description><![CDATA[<p dir="auto">Ciao, grazie per la risposta, ma come faccio ad inserire l'estensione??<br />
puoi darmi una mano?</p>
]]></description><link>https://dev.connect.gt/post/881736</link><guid isPermaLink="true">https://dev.connect.gt/post/881736</guid><dc:creator><![CDATA[pusherxx]]></dc:creator><pubDate>Wed, 30 Dec 2009 19:34:31 GMT</pubDate></item><item><title><![CDATA[Reply to Visualizzare immagine on Wed, 30 Dec 2009 10:51:02 GMT]]></title><description><![CDATA[<p dir="auto">Ciao pusherxx,</p>
<p dir="auto">dovresti inserire anche l'estensione nel database.</p>
]]></description><link>https://dev.connect.gt/post/881668</link><guid isPermaLink="true">https://dev.connect.gt/post/881668</guid><dc:creator><![CDATA[thedarkita]]></dc:creator><pubDate>Wed, 30 Dec 2009 10:51:02 GMT</pubDate></item></channel></rss>