Jump to content

[SOLVED] if condition and JS slider not working


deepson2

Recommended Posts

Hello,

 

i am showing one of my selection query  using JS slider. its working fine though when i put this query into if condition it wont works only. ??? ??? strenge problem

 

here is my code

 

<?
$blogdata    = $blog->personaldata(); // using this function i am fetching data of the user's(not logged in one) profile i want to see 

// $userid = user who is logged in
// $blogdata->author = user who's profile logged in user is visited

if(!$userid)
{
  echo "user is logged in";
}
else{

$sqlpage    = $op->runsql("SELECT  a.username,a.avatar,r.visitor_id,r.visiting_count,TIMESTAMPDIFF(MINUTE, r.recent_visited, NOW()) AS MinsSinceLastVisit FROM recent_visitor as r ,author as a WHERE (r.visitor_id = a.id) AND r.profile_owner = '$blogdata->author'");

if(mysql_num_rows($sqlpage) > 0){
while($row1 = $op->select($sqlpage)){

$imagearr = explode(",",$row1['avatar']);
$imagearr[0]= preg_replace("/\/avatar\//","/small/", $imagearr[0]);
        
?>
<li><a href='/profile/<?=$blog->spacereplace($row1['username']);?>/' title="<?=$row1['username']?>"><img src="<?=$retpath;?>/<?=$imagearr[0];?>" width="60" height="60" alt=""/></a></li>
<?
}}?>
</ul>

<?
}//else loop is completed
?>

 

here is my JS code for it

<link href="../style.css" rel="stylesheet" type="text/css" />

<!--
  jQuery library
-->
<script type="text/javascript" src="lib/jquery-1.2.3.pack.js"></script>

<!--
  jCarousel library
-->
<script type="text/javascript" src="lib/jquery.jcarousel.pack.js"></script>

<!--
  jCarousel core stylesheet
-->
<link rel="stylesheet" type="text/css" href="lib/jquery.jcarousel.css" />

<!--
  jCarousel skin stylesheet
-->
<link rel="stylesheet" type="text/css" href="skins/tango/skin.css" />

<style type="text/css">

/**
* Overwrite for having a carousel with dynamic width.
*/
.jcarousel-skin-tango .jcarousel-container-horizontal {
    width: 100%;
}

.jcarousel-skin-tango .jcarousel-clip-horizontal {
    width: 100%;
}

</style>

 

can anyone tell me. why its not working when i keep it in if condition's loop?

thanks in advance.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.