azad_rpi

Left Div Section Code

Mar 18th, 2015
347
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.74 KB | None | 0 0
  1.         <div id="left" >
  2.             <!-- <IMG SRC="images/photo.png"  BORDER="0" ALT=""> -->
  3.  
  4.         <?php
  5.             $where = "gallery_id=:gallery_id AND object_type=:object_type  ORDER BY `id` DESC";
  6.             $execute = array(':gallery_id' => $image_details['gallery_id'],':object_type' =>$image_details['object_type']);
  7.             $gallery_all_imgs = find('all', TB_IMAGES, 'id,image_name', $where, $execute);
  8.  
  9.  
  10.  
  11.             /* Get singledimensional array===================*/
  12.             $allImg = array();
  13.             $i= 0;
  14.             $imgNo = 0;
  15.             foreach($gallery_all_imgs as $v)
  16.             {
  17.                 $allImg[] = $v['id'];
  18.                 if($v['id'] == $_GET['object_id'])
  19.                 {
  20.                     $imgNo = $i;
  21.                 }
  22.                 $i++;
  23.             }
  24.             /* End===========================================*/
  25.             $totalImg = count($allImg);
  26.             if($totalImg >1)
  27.             {
  28.         ?>
  29.             <!-- <div class="image_prv_nxt "> -->
  30.                 <?php
  31.                 if($imgNo<($totalImg-1))
  32.                 {
  33.                 ?>
  34.                     <a href="<?php echo pk_tran('index_1').'image-detail.php?e_object_id='.base64_encode($allImg[$imgNo+1]).'&e_user_id='.base64_encode($_GET['user_id']);?>"  title="<?= pk_tran('gallery_44');?>" class="facebook_class nxt ">
  35.                         <!-- <span class="">Next</span> -->
  36.                     </a>
  37.                 <?php
  38.                 }
  39.                 else
  40.                 {
  41.                 ?>
  42.                     <a href="<?php echo pk_tran('index_1').'image-detail.php?e_object_id='.base64_encode($allImg[0]).'&e_user_id='.base64_encode($_GET['user_id']);?>"  title="<?= pk_tran('gallery_44');?>" class="facebook_class nxt">
  43.                     </a>
  44.                 <?php
  45.                 }
  46.                 ?>
  47.                     <!-- <span class="">|</span> -->
  48.                 <?php
  49.                 if($imgNo>0)
  50.                 {
  51.                 ?>
  52.                     <a href="<?php echo pk_tran('index_1').'image-detail.php?e_object_id='.base64_encode($allImg[$imgNo-1]).'&e_user_id='.base64_encode($_GET['user_id']);?>"   class="facebook_class prv" title="<?= pk_tran('gallery_45');?>" >
  53.                     </a>
  54.                 <?php
  55.                 }
  56.                 else
  57.                 {
  58.                 ?>
  59.                     <a href="<?php echo pk_tran('index_1').'image-detail.php?e_object_id='.base64_encode($allImg[$totalImg-1]).'&e_user_id='.base64_encode($_GET['user_id']);?>" class="facebook_class prv" title="<?= pk_tran('gallery_45');?>" >
  60.                     </a>
  61.                 <?php
  62.                 }
  63.                 ?>
  64.             <!-- </div> -->
  65.             <?php
  66.             }
  67.             ?>
  68.  
  69.  
  70. <style>
  71. /* popup window image box*/
  72. .set_style{
  73.     margin: 0 !important;
  74.     width: 100%;
  75. }
  76. .set_style .fullscreen-btn{
  77.     right:5px;
  78.     top:5px;
  79.     position:absolute;
  80.     margin: 0;
  81.     padding: 0;
  82.     border: 0;
  83.     outline: 0;
  84.     cursor: pointer;
  85.     background-image: url(/img/full_icon.png);
  86.     background-repeat: no-repeat;
  87.     background-size: auto;
  88.     background-position: 0 -53px;
  89.     display: block;
  90.     height: 16px;
  91.     opacity: 0.2;
  92.     -webkit-transform: translateZ(0);
  93.     -webkit-transition: opacity .3s;
  94.     width: 16px;
  95. }
  96. .set_style:hover > .fullscreen-btn{
  97.     opacity:1;
  98. }
  99.  
  100. /***************************************************************************  size for ipad,iphone..... ***************************************************************************/
  101.  
  102. @media only screen and (max-width: 1280px){
  103.  
  104.  
  105. #image-main .fullscreen-btn{
  106.     right:5px;
  107.     top:5px;
  108.     position:absolute;
  109.     margin: 0;
  110.     padding: 0;
  111.     border: 0;
  112.     outline: 0;
  113.     cursor: pointer;
  114.     background-image: url(/img/full_icon.png);
  115.     background-repeat: no-repeat;
  116.     background-size: auto;
  117.     background-position: 0 -53px;
  118.     display: block;
  119.     height: 16px;
  120.     opacity: 0.2;
  121.     -webkit-transform: translateZ(0);
  122.     -webkit-transition: opacity .3s;
  123.     width: 16px;
  124. }
  125. #image-main:hover > .fullscreen-btn{ opacity:1;}
  126. }
  127.  
  128. @media only screen and (max-width: 980px){
  129.  
  130.  
  131. #image-main .fullscreen-btn{
  132.     left:15px;
  133.     top:15px;
  134.     position:absolute;
  135.     margin: 0;
  136.     padding: 0;
  137.     border: 0;
  138.     outline: 0;
  139.     cursor: pointer;
  140.     background-image: url(/img/full_icon.png);
  141.     background-repeat: no-repeat;
  142.     background-size: auto;
  143.     background-position: 0 -53px;
  144.     display: block;
  145.     height: 16px;
  146.     opacity: 0.2;
  147.     -webkit-transform: translateZ(0);
  148.     -webkit-transition: opacity .3s;
  149.     width: 16px;
  150. }
  151. #image-main:hover > .fullscreen-btn{ opacity:1;}
  152. }
  153. /***************************************************************************    size for ipad,iphone END.....   ***************************************************************************/
  154.  
  155. </style>
  156.  
  157.             <table class="table">
  158.                 <tr><td>
  159.                     <div class="set_style" id="image-main">
  160.                         <a title="<?= pk_tran('image_detail_6');?>"  href="javascript:;"   class="fullscreen-btn"/></a>
  161.                             <img id="res-img" id="imgtag_single" src="<?php echo(pk_tran('index_1').'resize.php?pic='.$galleryimages.$gallery_creator['username'].'/'.$image_details['gallery_id'].'/'.$image_details['image_name']);?>&amp;w=1280&amp;h=780&amp;t=<?php echo time(); ?>" align="center" border="0" alt="" onClick="getTagSingleImage('modalLeft','<?php echo ($image_details['id']);?>');" >
  162. <!-- config in jquery.colorbox.js for popup window -->
  163.                     </div>
  164.                 </td></tr>
  165.             </table>
Advertisement
Add Comment
Please, Sign In to add comment