sidebar_right.phpbk 7.58 KB
<?php
@session_start();
@include "../config.php";
$lan=$_SESSION['language'];
global $sitedata;
?>
<style type="text/css">
.in-rt-tbl tr:nth-child(3) {
    line-height: 16px !important;
}
</style>

<script type="text/javascript">

// $(function() {

//     var docReliventHeightForRightInner = ($(document).height() - ($('#footer').height() + $('.header1').height()));

//     var offsetPixels = $(window).scrollTop();

//     if (offsetPixels > 0 && docReliventHeightForRightInner > offsetPixels) {

//         $(".inner_right").css({

//             "margin-top": offsetPixels + "px"

//         });

//     }

//     var docReliventHeightForLeftInner = docReliventHeightForRightInner - $('.inner_left').height();

//     docReliventHeightForRightInner = docReliventHeightForRightInner - $('.inner_right').height();



//     if (offsetPixels > 0 && docReliventHeightForLeftInner > offsetPixels) {

//         $(".inner_left").css({

//             "margin-top": offsetPixels + "px"

//         });

//     }

//     $(window).scroll(function() {

//         offsetPixels = $(window).scrollTop();



//         if (offsetPixels > 54 && offsetPixels < docReliventHeightForRightInner) {

//             $(".inner_right").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//         if (offsetPixels > 54 && offsetPixels < docReliventHeightForLeftInner) {

//             $(".inner_left").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//         if (offsetPixels < 54) {

//             $(".inner_right").css({

//                 "margin-top": offsetPixels + "px"

//             });

//             $(".inner_left").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//     });



// });

// $(function() {

//     var docReliventHeightForRightInner = ($(document).height() - ($('#footer').height() + $('.header1').height()));

//     var offsetPixels = $(window).scrollTop();

//     if (offsetPixels > 0 && docReliventHeightForRightInner > offsetPixels) {

//         $(".inner_right").css({

//             "margin-top": offsetPixels + "px"

//         });

//     }

//     var docReliventHeightForLeftInner = docReliventHeightForRightInner - $('.inner_left').height();

//     docReliventHeightForRightInner = docReliventHeightForRightInner - $('.inner_right').height();



//     if (offsetPixels > 0 && docReliventHeightForLeftInner > offsetPixels) {

//         $(".inner_left").css({

//             "margin-top": offsetPixels + "px"

//         });

//     }

//     $(window).scroll(function() {

//         offsetPixels = $(window).scrollTop();



//         if (offsetPixels > 54 && offsetPixels < docReliventHeightForRightInner) {

//             $(".inner_right").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//         if (offsetPixels > 54 && offsetPixels < docReliventHeightForLeftInner) {

//             $(".inner_left").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//         if (offsetPixels < 54) {

//             $(".inner_right").css({

//                 "margin-top": offsetPixels + "px"

//             });

//             $(".inner_left").css({

//                 "margin-top": offsetPixels + "px"

//             });

//         }

//     });

// });

</script>
<section class="container"  id="sidebar_right" style="width:100%;">
<div class="inner_right hidden-xs hidden-md hidden-sm">
        <?php
            $i=0;
            $query = mysql_query("SELECT * FROM lts_advertisement WHERE active_status='1' and start_date_and_time <= NOW() and end_date_and_time >= NOW()  ORDER BY RAND() LIMIT 2");
            while ($advdata = mysql_fetch_array($query)) {
        ?>
        <div style="width:100%;border:none;" class="in-rt-tbl" >
              <div style="border:none; float:left; color:#a4a4a4; padding-left:5px;">
                       Sponser
                    </div>
                    <div style="border:none; float:right; padding-right:5px;">
                       <a href="#" style="text-decoration:none; color:#0071E2;"> Create Ad </a>
                  </div>
            <div class="rowcls">   
					
                    <div class="col-md-12" style="float:left;padding-left:5px;text-align:left;">
                        <a href="counter.php?id=<?php echo base64_encode(@$advdata['id']); ?>" target="_blank" style="text-decoration:none;">
                            <img width="235px" height="150px" src="<?PHP echo SITE_URL;?>/timthumb.php?src=<?PHP echo SITE_URL;?>/images/advertisement/<?php echo stripslashes(@$advdata['adv_image']);?>&q=80&h=130&w=160" >
                        </a>
                        
                    </div>
          
                   <div class="col-md-12" style="float:left;padding-left:5px;text-align:left;">
                        <a href="counter.php?id=<?php echo base64_encode(@$advdata['id']); ?>" target="_blank" style="text-decoration:none;font-size:16px;">
                            <font color="#cc0e0e">
                                <?php
                                    if (strlen(@$advdata[$lan.'_title']) > 20) {
                                        echo substr(@$advdata[$lan.'_title'], 0, 18).'...';
                                    } else {
                                        echo @$advdata[$lan.'_title'];
                                    }
                                ?>
                                
                            </font>
                        </a>
                    </div>
             
                    <div class="col-md-12" style="float:left;padding-left:5px;text-align:left;">
                        <a href="counter.php?id=<?php echo base64_encode(@$advdata['id']); ?>" target="_blank" style="text-decoration:none;font-size:14px;">
                            <font color="#0080ff">
                                <?php
                                    $str = strstr(@$advdata['adv_redirect_url'],'www');
                                    if (strlen($str) > 20) {
                                        echo substr($str, 0, 18).'...';
                                    } else {
                                        echo $str;
                                    }
                                ?>
                            </font>
                        </a>
                      
                    </div>
              
                  <div class="col-md-12" style="float:left;padding-left:5px;text-align:left;">
                        <a  href="counter.php?id=<?php echo base64_encode(@$advdata['id']); ?>" target="_blank">
                        <p style="float:left;text-decoration:none; font-size:14px;text-align:left;">
                            <font color="#323232">
                                <?php
                                    if (strlen(@$advdata[$lan.'_description']) > 90) {
                                        echo substr(@$advdata[$lan.'_description'], 0, 90).'...';
                                    } else {
                                        echo @$advdata[$lan.'_description'];
                                    }
                                 
                                ?>
                            </font>
                            </p>
                        </a>
                   </div>
            </div>
            <?php if($i++ != 0) { ?>
                <hr style="width:100%;height:1px;border:0px;border-top:1px solid #c5c5c5;"><?php } ?>
            <?php } ?>
    </div>
</div>
</section>
<!---inner_right--->

<!---****-------------------------->