<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Serpito &#187; resim</title>
	<atom:link href="http://www.serpito.com/etiket/resim/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.serpito.com</link>
	<description>Güncel Teknoloji ve Yazılım Blogu</description>
	<lastBuildDate>Fri, 03 Feb 2012 11:44:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP &#8211; Sayfalama Sistemi (Paging)</title>
		<link>http://www.serpito.com/php-de-sayfalama-sistemi/</link>
		<comments>http://www.serpito.com/php-de-sayfalama-sistemi/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 07:38:20 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Java Kaynakları]]></category>
		<category><![CDATA[MySQL Dersleri]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Web kaynakları]]></category>
		<category><![CDATA[COUNT]]></category>
		<category><![CDATA[haber]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[limit değişkeni]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[resim]]></category>
		<category><![CDATA[sayfalama]]></category>
		<category><![CDATA[sayfalama sistemi]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://serpito.com/php-de-sayfalama-sistemi/</guid>
		<description><![CDATA[Veri tabanımızda bulunan haberleri 15 &#8216;er 15&#8242;er sayfalarda göstererek örneğimize başlıyoruz. İlk olarak veri tabanımıza bağlanım haber tablomuzdaki haber sayısını ögreniyoruz. &#60; ?php require_once(&#34;mysql.php&#34;); $qh_sayisi=&#34;SELECT COUNT(id) FROM haber&#34;; $res_h_sayisi=$dba-&#62;query($qh_sayisi); $row_h=$dba-&#62;fetch_assoc($res_h_sayisi); $haber_sayisi=$row_h[&#039;COUNT(id)&#039;];&#60;span id=&#34;more-268&#34;&#62;&#60;/span&#62; $kacar=15; $s_sayisi=(floor($s_sayisi=$haber_sayisi/$kacar)); $kalan=$haber_sayisi%$kacar; if ($kalan==0){                // paga sayfa sayısını belirledik $s_sayisi; }else if($kalan!=0){ $s_sayisi=$s_sayisi+1; } ?&#62; Yukarıdaki kodlar ile &#8220;$haber_sayisi=$row_h['COUNT(id)'];&#8221; <a href="http://www.serpito.com/php-de-sayfalama-sistemi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Veri tabanımızda bulunan haberleri 15 &#8216;er 15&#8242;er sayfalarda göstererek örneğimize başlıyoruz. İlk olarak veri tabanımıza bağlanım haber tablomuzdaki haber sayısını ögreniyoruz.</p>
<p><a href="http://www.serpito.com/wp-content/uploads/paging.jpg" title="Paging CSS"></a></p>
<p style="text-align: center"><a href="http://www.serpito.com/wp-content/uploads/paging.jpg" title="Paging CSS"><img src="http://www.serpito.com/wp-content/uploads/paging.jpg" alt="Paging CSS" height="39" width="451" /></a></p>
<pre class="brush: php; ">

&lt; ?php

require_once(&quot;mysql.php&quot;);
$qh_sayisi=&quot;SELECT COUNT(id) FROM haber&quot;;
$res_h_sayisi=$dba-&gt;query($qh_sayisi);
$row_h=$dba-&gt;fetch_assoc($res_h_sayisi);
$haber_sayisi=$row_h[&#039;COUNT(id)&#039;];&lt;span id=&quot;more-268&quot;&gt;&lt;/span&gt;

$kacar=15;
$s_sayisi=(floor($s_sayisi=$haber_sayisi/$kacar));
$kalan=$haber_sayisi%$kacar;
if ($kalan==0){                // paga sayfa sayısını belirledik
$s_sayisi;
}else if($kalan!=0){
$s_sayisi=$s_sayisi+1;
}

?&gt;
</pre>
<p>Yukarıdaki kodlar ile &#8220;$haber_sayisi=$row_h['COUNT(id)'];&#8221; ile haber sayısınıhaber_sayısı değişkenine bildirdik. $kacar=15; ile her sayfada kaç adet kayıtın gösterileceğini belirlemiş olduk.</p>
<p>$kalan=$haber_sayisi%$kacar;<br />
if ($kalan==0){                // paga sayfa sayısını belirledik<br />
$s_sayisi;<br />
}else if($kalan!=0){<br />
$s_sayisi=$s_sayisi+1;<br />
}</p>
<p>Bu kodlar ilede kaç sayfanın yer alacagını belirledik. Kalan bir sayı varsa örneğin 15 li sayfalama sisteminde 16 adet kayıt varsa 2 sayfa göstercek.Kalan bir sayı yoksa direk o sayıyı atıyacak örneğin 15 &#8216;li sayfalama sisteminde 45 adet kayıt varsa 3 gibi.</p>
<p>Aşağıdaki kodlar ilede hafızaya aldığımız sayfa sayısını ekrana yazdırıyoruz.</p>
<pre class="brush: php; ">

&lt; ?php
for ($i=1; $i&lt;=$s_sayisi; $i++) {
echo &quot;&lt;a href=haber.php?page=$i&gt;$i &quot;;
}
?&gt;
</pre>
<p>Son olarakda sayfamız açıldıgında verilerin gösterilmesi kalıyor. Bu gösterme işlemini aşagıdaki kodlar ile yapabiliyoruz.</p>
<pre class="brush: php; ">

&lt; ?php
if (empty($_GET[&#039;page&#039;])){
$q1=&quot;select * from haber order by id desc LIMIT 15&quot;; // page değeri boş ilen son eklenen 15 kayıtın gelmesini sağladık

}else if (isset($_GET[&#039;page&#039;])){
$nerden=($_GET[&#039;page&#039;]*$kacar)-$kacar;
$q1=&quot;select * from haber order by id desc LIMIT $nerden,$kacar&quot;;//page değerine bağlı olarak 15 kayıtın gelmesini sağladık.

}
$res1=$dba-&gt;query($q1);
while($row=$dba-&gt;fetch_assoc($res1)){
$header=$row[&#039;header&#039;];
$icerigi=substr($row[&#039;icerigi&#039;],0,530);
$image=$row[&#039;image&#039;];
$id=$row[&#039;id&#039;];
?&gt;

&lt;div class=&quot;templatemo_section_1&quot;&gt;
&lt;h2 align=&quot;left&quot;&gt;&lt; ?=$header?&gt;&lt;/h2&gt;
&lt;p&gt;
&lt; ?php
if (empty($image)){
?&gt;
&lt;img src=&quot;admin/images/xampp_stop.png&quot; width=&quot;125&quot; height=&quot;70&quot; border=&quot;2&quot; align=&quot;top&quot; /&gt;
&lt; ?php
}else if (isset($image)){
?&gt;
&lt;a href=&quot;admin/images/&lt;?=$image?&gt;&quot; rel=&quot;lightbox&quot;&gt;&lt;img src=&quot;admin/images/&lt;?=$image?/&gt;&quot; width=&quot;125&quot; height=&quot;70&quot; alt=&quot;&quot; /&gt;&lt;/a&gt;

&lt; ?php
}
?&gt;
&lt; ?=$icerigi?&gt;&lt;br /&gt;
&lt;a href=&quot;haber.php?haber=&lt;?=$id?&gt;&quot;&gt;DEVAMI&lt;/a&gt;
&lt;/p&gt;
&lt;div class=&quot;templatemo_line&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt; ?php
}if (isset($_GET[&#039;haber&#039;])){
echo $_GET[&#039;haber&#039;];
}
}else if (isset($_GET[&#039;haber&#039;])){
$id=$_GET[&#039;haber&#039;];
$query=&quot;select * from haber where id=&#039;$id&#039; LIMIT 1 &quot;;
$result=$dba-&gt;query($query);
$row_ht=$dba-&gt;fetch_assoc($result);
$id=$row_ht[&#039;id&#039;];
$header=$row_ht[&#039;header&#039;];
$icerigi=$row_ht[&#039;icerigi&#039;];
$image=$row_ht[&#039;image&#039;];
?&gt;
&lt;div class=&quot;templatemo_section_1_h&quot;&gt;
&lt;h1&gt;&lt;center&gt;&lt; ?=$header?&gt;&lt;/center&gt;&lt;/h1&gt;
&lt; ?php
if (empty($image)){
?&gt;
&lt;img src=&quot;admin/images/xampp_stop.png&quot; width=&quot;160&quot; height=&quot;200&quot; border=&quot;1&quot;  /&gt;
&lt; ?php
}else if (isset($image)){
?&gt;
&lt;a href=&quot;admin/images/&lt;?=$image?&gt;&quot; rel=&quot;lightbox&quot;&gt; &lt;img src=&quot;admin/images/&lt;?=$image?/&gt;&quot; width=&quot;160&quot; height=&quot;200&quot; border=&quot;1&quot;  /&gt;&lt;/a&gt;
&lt; ?php
}
?&gt;
&lt;p&gt;o
&lt;b&gt;&lt; ?=$icerigi?&gt;&lt;/b&gt;
&lt;/p&gt;
&lt;p&gt;
&lt;a href=&quot;haber.php&quot;&gt;Geri&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;

&lt;/p&gt;
&lt;div class=&quot;templatemo_line&quot;&gt;&lt;/div&gt;
&lt;/div&gt;
&lt; ?php
}
?&gt;
&lt;center&gt;
&lt;b&gt;
&lt; ?php
for ($i=1; $i&lt;=$s_sayisi; $i++) {
echo &quot;&lt;a href=haber.php?page=$i&gt;$i &quot;;
}
?&gt;
&lt;/b&gt;
&lt;/center&gt;

&lt;div id=&quot;templatemo_footer&quot;&gt;

İLETİŞİM Bilgileri
&lt;/div&gt;
</pre>
<p>Kodlar&#8217;ın hepsi ve proje dosyalarnı buradan indire bilirsiniz.<a href="http://serpito.com/wp-content/uploads/kisisel.rar" title="Porje Dosyaları">Porje Dosyaları</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-de-sayfalama-sistemi/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Resim Galerisi</title>
		<link>http://www.serpito.com/php-resim-galerisi/</link>
		<comments>http://www.serpito.com/php-resim-galerisi/#comments</comments>
		<pubDate>Fri, 22 May 2009 06:44:35 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Güncel]]></category>
		<category><![CDATA[Java Kaynakları]]></category>
		<category><![CDATA[MySQL Dersleri]]></category>
		<category><![CDATA[PHP Dersleri]]></category>
		<category><![CDATA[Proje]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[div]]></category>
		<category><![CDATA[galeri]]></category>
		<category><![CDATA[jpeg yükleme]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[resim]]></category>
		<category><![CDATA[upload]]></category>

		<guid isPermaLink="false">http://serpito.com/resim-galerisi/</guid>
		<description><![CDATA[Bu örnek ile admin panelinden resimler ekleyip bu resimleri sitemizde yer alan resim galerileri ile görüntülemeyi ele alıyoruz. Admin panelinde resim ekleme &#8211; düzenleme ve silme bölümleri yer almaktadır. Aşagıdaki kodlar ile resim Upload işlemini gerçekleştirmiş oluyoruz. Diğer kodlar ve proje dosyaları buradan indire bilirsiniz.Dosyalar &#60; ?php require_once(&#34;mysql.php&#34;); if (isset($_POST[&#039;resimyukle&#039;])){ $aciklama=mysql_real_escape_string($_POST[&#039;aciklama&#039;]);&#60;span id=&#34;more-266&#34;&#62;&#60;/span&#62; $sorgu=getimagesize($_FILES[&#34;resimx&#34;][&#34;tmp_name&#34;]); $en=$sorgu[0]; $boy=$sorgu[1]; <a href="http://www.serpito.com/php-resim-galerisi/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bu örnek ile admin panelinden resimler ekleyip bu resimleri sitemizde yer alan resim galerileri ile görüntülemeyi ele alıyoruz.</p>
<p>Admin panelinde resim ekleme &#8211; düzenleme ve silme bölümleri yer almaktadır. Aşagıdaki kodlar ile resim Upload<br />
işlemini gerçekleştirmiş oluyoruz. Diğer kodlar ve proje dosyaları buradan indire bilirsiniz.<a href="http://serpito.com/wp-content/uploads/ac_menu.rar" title="Dosyalar">Dosyalar</a></p>
<pre class="brush: php; ">

&lt; ?php
require_once(&quot;mysql.php&quot;);
if (isset($_POST[&#039;resimyukle&#039;])){
$aciklama=mysql_real_escape_string($_POST[&#039;aciklama&#039;]);&lt;span id=&quot;more-266&quot;&gt;&lt;/span&gt;
$sorgu=getimagesize($_FILES[&quot;resimx&quot;][&quot;tmp_name&quot;]);
$en=$sorgu[0]; $boy=$sorgu[1];
if($_FILES[&#039;resimx&#039;][&#039;size&#039;]&gt;&quot;64000000&quot;){
}elseif ($_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/gif&quot; &amp;&amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/jpeg&quot; &amp;&amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/pjpeg&quot; &amp;&amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/x-png&quot;){
}else {
if($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/gif&quot;) $uzanti=&quot;.gif&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/jpeg&quot;) $uzanti=&quot;.jpeg&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/pjpeg&quot;) $uzanti=&quot;.jpg&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/x-pn&quot;) $uzanti=&quot;.png&quot;;
$resim=$_FILES[&#039;resimx&#039;][&#039;name&#039;];
$uzanti=substr_replace($resim,&quot;&quot;,0,-3);
$isim=md5(rand(9,99999));
$yeniisim=$isim.&quot;.&quot;.$uzanti;
$resim=$yeniisim;
move_uploaded_file($_FILES[&#039;resimx&#039;][&#039;tmp_name&#039;], &quot;images/&quot;.$yeniisim);
}
$yeniisim;
$id=$_SESSION[&#039;images_id&#039;];
$q=&quot;insert into images(name,aciklama) values(&#039;&quot;.$yeniisim.&quot;&#039;,&#039;&quot;.$aciklama.&quot;&#039;) &quot;;
$result=$dba-&gt;query($q);
}
?&gt;
&lt;form METHOD=&quot;POST&quot; ACTION=&quot;index.php?link=insert&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;table align=&quot;center&quot;&gt;
&lt;tr&gt;
&lt;td&gt;Resim&lt;/td&gt;
&lt;td&gt; :&lt;/td&gt;
&lt;td&gt;&lt;input name=&quot;resimx&quot; type=&quot;file&quot;/&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Açiklama&lt;/td&gt;
&lt;td&gt;:&lt;/td&gt;
&lt;td&gt;&lt;textarea name=&quot;aciklama&quot; cols=&quot;24&quot; rows=&quot;3&quot;&gt;&lt;/textarea&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;2&quot; align=&quot;center&quot;&gt; &lt;input type=&quot;submit&quot; name=&quot;resimyukle&quot; value=&quot;Yükle&quot; class=&quot;login_submit&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-resim-galerisi/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>PHP &#8211; Resim Upload Script</title>
		<link>http://www.serpito.com/php-resim-upload-script/</link>
		<comments>http://www.serpito.com/php-resim-upload-script/#comments</comments>
		<pubDate>Mon, 11 May 2009 20:06:54 +0000</pubDate>
		<dc:creator>sword fish</dc:creator>
				<category><![CDATA[Güncel]]></category>
		<category><![CDATA[MySQL Dersleri]]></category>
		<category><![CDATA[PHP Dersleri]]></category>
		<category><![CDATA[Uygulamalar]]></category>
		<category><![CDATA[Web kaynakları]]></category>
		<category><![CDATA[jpeg]]></category>
		<category><![CDATA[png]]></category>
		<category><![CDATA[random]]></category>
		<category><![CDATA[require]]></category>
		<category><![CDATA[require_once]]></category>
		<category><![CDATA[resim]]></category>
		<category><![CDATA[resim yükleme]]></category>
		<category><![CDATA[update]]></category>
		<category><![CDATA[yükleme]]></category>

		<guid isPermaLink="false">http://serpito.com/resim-update-etme/</guid>
		<description><![CDATA[Bu uygulamamızda user_images klasörüne php ile resim yüklüyoruz. Resmi kaydederken randon bir isim atıyoruz ve bu şekilde kaydediyoruz. En son olarakta veri tabanında uye tablosunun image bölümüne resmin adını ve uzantısını ekliyoruz. require_once(&#8220;mysql.php&#8221;); bu komut satırı ile mysqli bağlantımızı ilk başta gerçekleştirmiş oluyoruz. Buradan indiriniz.   mysql.rar &#60; ? require_once(&#34;mysql.php&#34;); $sorgu=getimagesize($_FILES[&#34;resimx&#34;][&#34;tmp_name&#34;]); $en=$sorgu[0]; $boy=$sorgu[1]; if($_FILES[&#039;resimx&#039;][&#039;size&#039;]&#62;&#34;999999999999999999&#34;){ }elseif <a href="http://www.serpito.com/php-resim-upload-script/"> read more <span class="meta-nav">&#187;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Bu uygulamamızda user_images klasörüne php ile resim yüklüyoruz. Resmi kaydederken randon bir isim atıyoruz ve bu şekilde kaydediyoruz. En son olarakta veri tabanında uye tablosunun image bölümüne resmin adını ve uzantısını ekliyoruz.</p>
<p>require_once(&#8220;mysql.php&#8221;); bu komut satırı ile mysqli bağlantımızı ilk başta gerçekleştirmiş oluyoruz. Buradan indiriniz. <span id="more-264"></span>  <a title="mysql.rar" href="http://serpito.com/wp-content/uploads/mysql.rar">mysql.rar</a></p>
<pre class="brush: php; ">

&lt; ?

require_once(&quot;mysql.php&quot;);
$sorgu=getimagesize($_FILES[&quot;resimx&quot;][&quot;tmp_name&quot;]);
$en=$sorgu[0]; $boy=$sorgu[1];
if($_FILES[&#039;resimx&#039;][&#039;size&#039;]&gt;&quot;999999999999999999&quot;){
}elseif ($_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/gif&quot; &amp;amp;&amp;amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/jpeg&quot; &amp;amp;&amp;amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/pjpeg&quot; &amp;amp;&amp;amp;
$_FILES[&#039;resimx&#039;][&#039;type&#039;] != &quot;image/png&quot;){
}else {
if($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/gif&quot;) $uzanti=&quot;.gif&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/jpeg&quot;) $uzanti=&quot;.jpeg&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/pjpeg&quot;) $uzanti=&quot;.jpg&quot;;
elseif($_FILES[&#039;resimx&#039;][&#039;type&#039;] == &quot;image/x-pn&quot;) $uzanti=&quot;.png&quot;;
$resim=$_FILES[&#039;resimx&#039;][&#039;name&#039;];
$uzanti=substr_replace($resim,&quot;&quot;,0,-3);
$isim=md5(rand(9,99999));
$yeniisim=$isim.&quot;.&quot;.$uzanti;
$resim=$yeniisim;
move_uploaded_file($_FILES[&#039;resimx&#039;][&#039;tmp_name&#039;], &quot;user_images/&quot;.$yeniisim);
}
$yeniisim;
$q1=&quot;UPDATE uye SET image=&#039;$yeniisim&#039; where id=&#039;$id&#039; &quot;;
$result=$dba-&gt;query($q1);
echo $id;

?&gt;
&lt;form METHOD=&quot;POST&quot; ACTION=&quot;index.php?link=user&amp;amp;user=images&amp;amp;images=&lt;?=$id?&gt;&quot; enctype=&quot;multipart/form-data&quot;&gt;
&lt;table align=&quot;center&quot;&gt;
&lt;tr&gt;
&lt;td colspan=&quot;3&quot;&gt;Sadece jpeh uzantýlý resim yükleyiniz.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Resim : &lt;input name=&quot;resimx&quot; type=&quot;file&quot;/&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td colspan=&quot;3&quot; align=&quot;center&quot;&gt;&lt;input type=&quot;submit&quot; value=&quot;Resim Yükle&quot; class=&quot;resim_yukle&quot; /&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
&lt;/form&gt;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.serpito.com/php-resim-upload-script/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>

