• 30-04-2009, 12:47:29
    #1
    Merhaba arkadaşlar sorunum,Örneğin oyun sitesinde ***** kategorisinde adense yayınlamak istemiyorum diğer kategorilerde yayınlamak istiyorum bunu nasıl ayarlayabilirim scriptimde kodlar mevcut ama bir turlu olmuyor nedense eksik birseyler var bakarrsanız sevinirim..

    Sağ Banner Reklam Kodu;
    <?php
    		$reklam = mysql_fetch_array(mysql_query("select * from reklam where alan='2'"));
    
    
    
    	if(($_GET["kategori"]=="cocuk-oyunlari") or ($_GET["id"]==10)){
    		$aq= "*****";	
    	}else{
    	
    	if($_COOKIE["dil"]=="")
    	{
    		$aq= "kod";
    	}elseif($_COOKIE["dil"]=="tr"){
    		$aq = "kod";
    	}elseif($_COOKIE["dil"]=="en"){
    		$aq = "ingilizce";
    	}
    	
    	}
    		$kod = $reklam["kod"];
    		
    		if($kod==""){
    		echo '<img src="http://www.hizoyun.com/images/160r.jpg" width="160" height="600" />';
    		}else{
    		echo $kod;
    		}
    		
    ?>
    Admin Paneli Reklam yeri kodu;
    <?php
    ob_clean();
    if(!$_COOKIE[admin])
    {
    echo "<script>alert('Giris YaP..!!')</script>";
    echo "<script>location.href='login.php'</script>";
    exit();
    }
    ?><head>
    <style type="text/css">
    <!--
    body{
    background-color:transparent;
    }
    .style1 {
    	font-size: 12px;
    	color: #999999;
    }
    .style4 {font-size: 12px}
    #ust{
    margin-top:0px;
    width:950px;
    height:66px;
    background:url(http://www.siteadı.com/images/ust1.jpg);
    }
    #ust2{
    width:950px;
    height:65px;
    background:url(http://www.siteadı.com/images/siteyontmbg.jpg);
    }
    #ortacevre{
    width:950px;
    height:500px;
    margin-top:10px;
    
    background-color:#f5f5f5;
    }
    #ortasol{
    float:left;
    width:250px;
    margin-top:10px;
    height:100%;
    background:url(http://www.siteadı.com/images/solbg.jpg) no-repeat top 60px;
    }
    #ortaicerik{
    float:left;
    margin-top:10px;
    width:700px;
    }
    body,td,th {
    	font-family: tahoma;
    	font-size: 13px;
    }
    a:link {
    	color: #000000;
    }
    a:visited {
    	color: #000000;
    }
    a:hover {
    	color: #333333;
    }
    a:active {
    	color: #000000;
    }
    
    -->
    </style>
    
    <script type="text/javascript" src="../js/png.js"></script>
    </head>
    <?php
    include "../../baglan.php";
    
    $do = $_GET["do"];
    switch($do){
    default;
    def();
    break;
    case "ekle";
    ekle();
    break;
    case "ekaydet";
    ekaydet();
    break;
    case "duzenle";
    duzenle();
    break;
    case "guncelle";
    guncelle();
    break;
    }
    
    ?>
    
    <div align="center">
    
    <?php
      function def(){
    ?>
    <div align="center">
    <table id="Table_" width="318" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="41" align="right"><img id="altmenu_01" src="../images/altmenu_01.jpg" width="17" height="31" alt="" /></td>
        <td width="236" background="../images/altmenu_02.jpg"><div align="center" class="tb">
          <li><a href="reklam.php?do=ekle" target="orta">Reklam Ekle</a></li>
      
        </div></td>
        <td width="41" align="left"><img id="altmenu_05" src="../images/altmenu_05.jpg" width="14" height="31" alt="" /></td>
      </tr>
    </table></div><br>
    <br>
    
    <table width="585" border="0" cellspacing="3" cellpadding="0">
      <tr>
        <td width="19" bgcolor="#EBEBEB">İd</td>
        <td width="296" bgcolor="#EBEBEB">Reklam Adı</td>
        <td width="156" bgcolor="#EBEBEB">Tarih</td>
        <td width="56" align="center" bgcolor="#EBEBEB">D&uuml;zenle</td>
        <td width="40" align="center" bgcolor="#EBEBEB">Sil</td>
      </tr>
      <?php
    	$sayi = 1;
    	$bg1 = "#eaeaea";
    	$bg2 = "#dcdcdc";
      	$sor = mysql_query("select * from reklam");
    	while($yaz=mysql_fetch_array($sor)){
    			$id = $yaz["id"];
    			$baslik = $yaz["baslik"];
    			$tarih	= $yaz["tarih"];
    			
    			  if($sayi%2==1){
    			  	$back = $bg1;
    			  }else{
    			  	$back = $bg2;
    			  }
      ?>
      <tr>
        <td bgcolor="<?=$back?>"><?=$id?></td>
        <td bgcolor="<?=$back?>"><?=$baslik?></td>
        <td bgcolor="<?=$back?>"><?=$tarih?></td>
        <td align="center" bgcolor="<?=$back?>"><a href="reklam.php?do=duzenle&id=<?=$id?>"><img src="../images/duzenle.png" width="20" height="17" border="0" /></a></td>
        <td align="center" bgcolor="<?=$back?>"><img src="../images/sil.png" width="20" height="18" /></td>
      </tr>
      
      <?php
      $sayi++;
    
      }//while
    
      ?>
    </table>
    <br>
    <?php
      }//default
    function ekle(){
    ?>
    <div align="center">
    <table id="Table_" width="318" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="41" align="right"><img id="altmenu_01" src="../images/altmenu_01.jpg" width="17" height="31" alt="" /></td>
        <td width="236" background="../images/altmenu_02.jpg"><div align="center" class="tb">
              <li><a href="icerik.php" target="orta">Reklamları Listele</a></li>
        </div></td>
        <td width="41" align="left"><img id="altmenu_05" src="../images/altmenu_05.jpg" width="14" height="31" alt="" /></td>
      </tr>
    </table></div>
    <form name="form6" method="post" action="reklam.php?do=ekaydet">
    
    <table width="604" border="0" cellspacing="2" cellpadding="0">
      <tr>
        <td align="left" valign="top">Reklam Başlığı</td>
        <td valign="top">:</td>
        <td valign="top"><label>
          <input name="baslik" type="text" id="baslik" size="40">
        </label></td>
      </tr>
      <tr>
        <td width="108" align="left" valign="top">Reklam Alanı</td>
        <td width="12" valign="top">:</td>
        <td width="481" valign="top"><label>
          <select name="alani" id="alani">
            <option value="1">468 * 60</option>
            <option value="2">728 * 90</option>
            <option value="3">160 * 600</option>
          </select>
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">Reklam Kodu</td>
        <td valign="top">:</td>
        <td valign="top"><label>
          <textarea name="icerik" id="icerik" cols="60" rows="5"></textarea>
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">&nbsp;</td>
        <td valign="top">&nbsp;</td>
        <td valign="top"><label>
          <input type="submit" name="button" id="button" value="Kaydet">
        </label></td>
      </tr>
    </table>
    </form><br>
    
    
    <?php
    }//ekle
    
    function ekaydet(){
    
    $baslik = $_POST["baslik"];
    $alan	= $_POST["alan"];
    $icerik = $_POST["icerik"];
    $tarih	= date("d.m.Y");
    		$ek = mysql_query("insert into reklam (baslik,kod,alan,tarih) values ('$baslik','$icerik','$alan','$tarih')");
    		
    		if($ek){
    		echo "<script>alert('Reklam basariyla eklenmistir');</script>";
    		header("Refresh: 0.5; url=reklam.php");
    		}else{
    		echo "<script>alert('Reklam eklenemedi !');</script>";
    		header("Refresh; 0.5; url=reklam.php");
    		}
    }//ekaydet
    function duzenle(){
    $id = $_GET["id"];
    	$yaz = mysql_fetch_array(mysql_query("select * from reklam where id='$id' "));
    		$baslik	= $yaz["baslik"];
    		$kod	= $yaz["kod"];
    		$*****	= $yaz["*****"];
    		$ing	= $yaz["ingilizce"];
    		?>
            <div align="center">
    <table id="Table_" width="318" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="41" align="right"><img id="altmenu_01" src="../images/altmenu_01.jpg" width="17" height="31" alt="" /></td>
        <td width="236" background="../images/altmenu_02.jpg"><div align="center" class="tb">
              <li><a href="icerik.php" target="orta">Reklamları Listele</a></li>
        </div></td>
        <td width="41" align="left"><img id="altmenu_05" src="../images/altmenu_05.jpg" width="14" height="31" alt="" /></td>
      </tr>
    </table></div>
    <form name="form1" method="post" action="reklam.php?do=guncelle&id=<?=$id?>">
    
    <table width="604" border="0" cellspacing="2" cellpadding="0">
      <tr>
        <td width="123" align="left" valign="top">Reklam Başlığı</td>
        <td width="12" valign="top">:</td>
        <td width="468" valign="top"><label>
          <input name="baslik" type="text" id="baslik" value="<?=$baslik?>" size="40">
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">Reklam Kodu</td>
        <td valign="top">:</td>
        <td valign="top"><label>
          <textarea name="icerik" id="icerik" cols="50" rows="5"><?=$kod?></textarea>
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">***** Reklam Kodu</td>
        <td valign="top">:</td>
        <td valign="top"><label>
          <textarea name="*****" id="*****" cols="50" rows="5"><?=$*****?></textarea>
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">İng. Reklam Kodu</td>
        <td valign="top">:</td>
        <td valign="top"><label>
          <textarea name="ing" id="ing" cols="50" rows="5"><?=$ing?></textarea>
        </label></td>
      </tr>
      <tr>
        <td align="left" valign="top">&nbsp;</td>
        <td valign="top">&nbsp;</td>
        <td valign="top"><label>
          <input type="submit" name="button" id="button" value="Kaydet">
        </label></td>
      </tr>
    </table>
    </form><br>
    
            <?php
    }//
    function guncelle(){
    $id = $_GET["id"];
    $baslik = $_POST["baslik"];
    $alan	= $_POST["alan"];
    $icerik = $_POST["icerik"];
    $*****	= $_POST["*****"];
    $ing	= $_POST["ing"];
    $tarih	= date("d.m.Y");
    
    		$ek = mysql_query("update reklam set baslik='$baslik',kod='$icerik',*****='$*****',ingilizce='$ing' where id='$id' ");
    		if($ek){
    		echo "<script>alert('Reklam basariyla guncellendi');</script>";
    		echo "<script>location.href='reklam.php'</script>";
    		}else{
    		echo "<script>alert('Reklam guncellenemedi !');</script>";
    		echo "<script>location.href='reklam.php'</script>";
    		}
    }
    ?>
    </div>
    ***** Oyunları Kategorisi id numarası 12..

    Admin Paneli Reklam Yeri Resmi
  • 30-04-2009, 13:23:50
    #2
    anlamadımki zaten ***** diye ayrı bi bölüm var :S ***** text ine adsense konu koyma daha açıklayacı söylersen iyi olur
  • 30-04-2009, 13:29:22
    #3
    tolgay007 adlı üyeden alıntı: mesajı görüntüle
    anlamadımki zaten ***** diye ayrı bi bölüm var :S ***** text ine adsense konu koyma daha açıklayacı söylersen iyi olur
    Resimdeki Ustde Bulunan Reklam koduna reklamı yerlestirdiğimde tum kategorilerde cıkıyor ***** kategorisinde cıkmaması lazım..***** kategorisinde reklam cıkması icin ***** reklam kodunu yerlestirmem lazım..
  • 30-04-2009, 13:40:29
    #4
    <?
    if($_GET[id] != 12){
    include"reklam.php";
    }else{
    echo "***** var";
    }
    ?>
    bu işini görür sanırım. id 12 değilse reklam.php yi çekiyor id 12 ise ***** var diyor. kendine göre düzenlersin.
  • 30-04-2009, 13:44:04
    #5
    akaturk adlı üyeden alıntı: mesajı görüntüle
    <?
    if($_GET[id] != 12){
    include"reklam.php";
    }else{
    echo "***** var";
    }
    ?>
    bu işini görür sanırım. id 12 değilse reklam.php yi çekiyor id 12 ise ***** var diyor. kendine göre düzenlersin.
    bu kodu nereyle değişecem..
  • 30-04-2009, 13:49:16
    #6
    <?php 
    if($_GET[id] != 12){  
    $reklam = mysql_fetch_array(mysql_query("select * from reklam where alan='2'")); 
        if(($_GET["kategori"]=="cocuk-oyunlari") or ($_GET["id"]==10)){ 
            $aq= "*****";     
        }else{ 
         
        if($_COOKIE["dil"]=="") 
        { 
            $aq= "kod"; 
        }elseif($_COOKIE["dil"]=="tr"){ 
            $aq = "kod"; 
        }elseif($_COOKIE["dil"]=="en"){ 
            $aq = "ingilizce"; 
        } 
         
        } 
            $kod = $reklam["kod"]; 
             
            if($kod==""){ 
            echo '<img src="http://www.hizoyun.com/images/160r.jpg" width="160" height="600" />'; 
            }else{ 
            echo $kod; 
            } 
    }else{
    echo '<img src="http://www.hizoyun.com/images/160r.jpg" width="160" height="600" />';
    }
    ?>
    Sağ Banner Reklam Kodu ile değişirmisin şu kodları. bakalım olmuş mu?
  • 30-04-2009, 13:53:16
    #7
    olmadı aynı değişen birşey yok..
    Söyle olması gerekir.. Normal kategoriler Google adense reklamı,***** Oyunlar Kategorisi Adtech Reklamları cıkması gerekir 160*600 Reklamda..
  • 30-04-2009, 13:57:30
    #8
    <?php 
            $reklam = mysql_fetch_array(mysql_query("select * from reklam where alan='2'")); 
    
    
    
        if(($_GET["kategori"]=="cocuk-oyunlari") or ($_GET["id"]==12)){ 
            $aq= "*****";     
        }else{ 
         
        if($_COOKIE["dil"]=="") 
        { 
            $aq= "kod"; 
        }elseif($_COOKIE["dil"]=="tr"){ 
            $aq = "kod"; 
        }elseif($_COOKIE["dil"]=="en"){ 
            $aq = "ingilizce"; 
        } 
         
        } 
            $kod = $reklam["kod"]; 
             
            if($kod==""){ 
            echo '<img src="http://www.hizoyun.com/images/160r.jpg" width="160" height="600" />'; 
            }else{ 
            echo $kod; 
            } 
             
    ?>
    şöyle bi dene
  • 30-04-2009, 13:59:05
    #9
    olmadı Yine Reklam.php den alıyor dosyaları..