
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">

<head>
  <title>KAMPUS MARKETI</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  <!-- **** layout stylesheet **** -->
  <link rel="stylesheet" type="text/css" href="http://localhost/univ/themes/default/style/style.css" />
  <!-- **** colour stylesheet **** -->
  <link rel="stylesheet" type="text/css" href="http://localhost/univ/themes/default/style/colour_3.css" />
</head>

<body>
  <div id="main">
    <div id="logo">
      <h1>Kampüs Marketi</h1>
      <? $me = Auth::instance()->get_user();?>
    </div>
    <div id="menubar">
      <ul id="menu">
              <li><a><?= html::anchor(" ","Anasayfa") ?></a></li>
              <li><a><?= html::anchor("register/registration","Kayıt Ol") ?></a></li>        
      </ul>
      <!--
      <div id="search">
        <form method="post" action="#">
          <p><input class="searchfield" type="text" value="" />
          <input class="searchbutton" name="submit" type="submit" value="search" /></p>
        </form>
      </div>
      -->
    </div>
    <div id="site_content">
        <div id="head_image">
        	<div id="slogan"><strong>KAMPÜS MARKETİ</strong> <br />
       	    Kampüs ve bölüm içindeki ilanlarınız için özelleştirilmiş bir websitesi</div>
            <div id="under_slogan_text">Kampüs içindeki her türlü ilana kolaylıkla ulaşın <br/>  
                Bölüm içindeki kitap alış-verişlerinizi artık rahatlıkla yapabilirsiniz <br/>
		Artık kolaylıkla kendi bölümünüzde ve kampüsünüzde ilan verebilirsiniz
		</div>
         </div>

      <div class="sidebar">
        <div class="sidebaritem">
          <h3>ÜYE GİRİŞİ</h3>
	  <?= View::factory("login") ?> &nbsp &nbsp
	  <?= html::anchor("register/registration","Kayıt Ol") ?><br/><br/>
	  <script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script><fb:like layout="button_count" show_faces="true" width="150" action="recommend" font="tahoma"></fb:like><br/><br/>
           <a href="http://twitter.com/share" class="twitter-share-button" data-url="http://kampusmarketi.com" data-count="horizontal">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
 
        </div>
        <div class="sidebaritem">
          <h3>İLAN ARA</h3>
          <ul>
            <li><?= html::anchor("login/index/-1","TÜM İLANLAR") ?> </li>
	      <div id="search2">
		Arama
	      <?=form::open("login/index")?>		
			      <?= form::input("search") ?>
			      <?=form::submit("ara", "Arama Yap")?>
	      <?=form::close()?> 
	      </div>

          </ul>
        </div>
        <div class="sidebaritem">
          <h3>KATEGORİLER</h3>
          <ul>
            <li><a><?= html::anchor("login/index/0","TÜM ÜRÜNLER") ?> </a></li>
            <li><a><?= html::anchor("login/index/2","KİTAP") ?> </a></li>
            <li><a><?= html::anchor("login/index/3","ELEKTRONİK") ?>  </a></li>
            <li><a><?= html::anchor("login/index/1","GİYSİ") ?> </a></li>
            <li><a><?= html::anchor("login/index/4","EV ARKADAŞI") ?>   </a></li>
          </ul>
        </div>

      </div>
      <div id="content">
	<div id="search1">
	<?=form::open("login/index")?>		
			<td><?= form::select("universities",$universities,"Select") ?>
			<?=form::submit("Üniversiteye Göre Sırala", "İlanları Üniversitene Göre Sırala")?></td>
	<?=form::close()?>
	</div>
	</br>
	<div id="ilan">
	<h1>İLANLAR</h1>
	</div>
          <? $i=(1+($pagination->current_page-1)*($pagination->items_per_page)); ?>
	<?  foreach($sales as $sale):?>
        <? $i++; ?>
<? if($i%2==0){  ?>
	<div id="sales1">
	   <blockquote>	    
	    <div id="sales2">
		<div id="number" >
		<h1><?//= $i; ?> </h1>
		</div>
		<div id="saleuser">    
		<?= $sale->user->username?>
		</div>
		<div id="saletime"> 
		<?=timation::sinceSaved(strtotime($sale->time))." ".'<br/>'?>
		</div>
		<div id="saleheader">
		  <?= html::anchor("register/registration/".$sale->id, substr($sale->header, 0,30)."...")?>
	      </div>
	      <div id="saleinfo">
		  <?= substr($sale->product_type,0,30)."..." ?>
	      </div></br>
	      <div id="university1">
		  <?= $sale->university->univname ?>
	      </div>
	    <?//= html::anchor("productcontrol/complain/".$sale->id," complain")?>
	    </div>
	    <?= "<hr align='center' width='85%'/>"?>
	   </blockquote>
	</div>
<? } else{ ?>
	<div id="sales3">
	  <blockquote>	
	  <div id="sales2">
	      <div id="number" >
	      <h1><?//= $i; ?> </h1>
	      </div>
	      <div id="saleuser">    
	      <?= $sale->user->username?>
	      </div>
	      <div id="saletime"> 
	      <?=timation::sinceSaved(strtotime($sale->time))." ".'<br/>'?>
	      </div>
	      <div id="saleheader">
		  <?= html::anchor("register/registration/".$sale->id, substr($sale->header, 0,30)."...")?>
	      </div>
	      <div id="saleinfo">
		  <?= substr($sale->product_type,0,30)."..." ?>
	      </div></br>
	      <div id="university1">
		  <?= $sale->university->univname ?> 
	      </div>
	  <?//= html::anchor("productcontrol/complain/".$sale->id," complain")?>
	  </div>
	  <?= "<hr align='center' width='85%'/>"?>
	 </blockquote>
	</div>
    <? } ?>
	<?  endforeach;?>
	</div>
	<br/><br/><br/>
	<div id="page">
	<?= $pagination?><br/>
    </div>

  </div>

</body>
    <div id="footer">
      Görüş ve önerileriniz için kampusmarketi@gmail.com adresine mail gönderebilirsiniz.
    </div>
</html>

	