Вопрос по jquery
Значит так обьяснаю по пунктам
есть Jshttpequest скриптик case "getInfo": $res=sql_query("select a.*,b.name from gallery_info a LEFT JOIN sys_users b ON b.id=a.user_id where user_id='$user_id'",$dbi); $row_o=sql_fetch_object($res,$dbi); $res=sql_query("select * from gallery_img where author_id='$user_id' and is_active=1 order by sort_id asc limit 1000",$dbi); $row_img=sql_fetch_object($res,$dbi); if($row_o->fotos==0){$row_img->file="img/gallery/empty.jpg";} elseif($row_o->fotos>0 && !$row_img->file){$row_img->file="img/gallery/wait.jpg";} else {$img=$row_img->file;$row_img->file="img/gallery/small/small_$row_img->file";} $nick=nick($row_o->name); if($row_o->name_real) {$name_real="Имя:$row_o->name_real";} if($row_o->pol=="m") {$pol="Пол:муж.";} else {$pol="Пол:жен.";} if($row_o->age){$age="Возраст:$row_o->age";} if($row_o->city){$city="Город:$row_o->city";} sql_query("update gallery_info set showns=showns+1 where user_id='$user_id'",$dbi); $v=execsqlone("select count(*) from vote where mod_id='13' and source_id='$user_id' and user_id='$fa_userid'"); if($v==0 && $fa_userid!=$user_id && $fa_userid!=0){ $vote="<table><tr align=center><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td></tr><tr><td><input class='pole1' name=ball type='radio' value='1'></td><td><input class='pole1' name=ball type='radio' value='2'></td> <td><input class='pole1' name=ball type='radio' value='3'></td><td><input class='pole1' name=ball type='radio' value='4'></td><td><input class='pole1' name=ball type='radio' value='5' checked></td></tr><tr align=center><td colspan=5><input type=button value='Голосовать' onclick=vote('$user_id') class=pole1></td></tr></table>"; }else {$vote="";} $sql_output12="select * from gallery_img where author_id='$user_id' and is_active=1 order by sort_id asc limit 100"; $resik=sql_query($sql_output12,$dbi); #список юзеров с фотками while ($rowers=sql_fetch_array($resik,$dbi)) { $rowers->file="img/gallery/small/small_$rowers->file"; $p_arr="<li><img src='http://tzserv.ru/img/gallery/orig/$img' alt='$fa_userid' width='80' height='80' ></li>"; } $GLOBALS['_RESULT'] = array( "vote" => $vote, "link" => "Ссылка на фотографии: <a href='/?mod=gallery&n=".str_replace("+", "%20",urlencode($row_o->name))."'>http://tzapocalipsys.ru/?mod=gallery&n=$row_o->name", "nick" => $nick, "info" => "$name_real $pol $age $city", "foto" =>"<a href=/img/gallery/orig/$img target=_blank><img src=$row_img->file border=0></a><br><br>$row_img->comment", "mycarousel" => "<ul id=mycarousel class=jcarousel-skin-tango>$p_arr</ul>", "stat" =>"текущий рейтинг: $row_o->rating<br>кол-во голосов: $row_o->votes баллы: $row_o->balls кол-во просмотров: $row_o->showns", "col_com"=>"<a href='javascript:{}' onclick=activateCom('$user_id')>комментарии [$row_o->comments]</a>"); /* $GLOBALS['_RESULT']['nick'] = $nick; $GLOBALS['_RESULT']['info'] ="$name_real $pol $age $city"; $GLOBALS['_RESULT']['foto'] ="<img src=$row_img->file border=1><br><br>$row_img->comment"; $GLOBALS['_RESULT']['pages'] = "<li>$p_arr</li></ul>"; $GLOBALS['_RESULT']['stat'] ="текущий рейтинг: $row_o->rating<br>кол-во голосов: $row_o->votes баллы: $row_o->balls кол-во просмотров: $row_o->showns"; $GLOBALS['_RESULT']['col_com'] ="<span class=hand onclick=activateCom('$user_id')>комментарии [$row_o->comments]</span>"; */ #echo "<pre>"; #print_r($GLOBALS['_RESULT']); echo "var_dump($img)"; print_r($GLOBALS['_RESULT']); break; есть пхп скрипт где идут онклики через js #первичный вывод фотки if($n){$sql_n=" or b.name='$n'";} $res=sql_query("select a.*,b.name,b.klan,b.align,b.level,b.rank from gallery_info a LEFT JOIN sys_users b ON b.id=a.user_id where user_id='$user_id' $sql_n",$dbi); $row_o=sql_fetch_object($res,$dbi); $res=sql_query("select * from gallery_img where author_id='$row_o->user_id' and is_active=1 order by sort_id asc limit 10",$dbi); $row_img=sql_fetch_object($res,$dbi); if($row_o->fotos==0){$row_img->file="img/gallery/empty.jpg";} elseif($row_o->fotos>0 && !$row_img->file){$row_img->file="img/gallery/wait.jpg";} else {$img=$row_img->file;$row_img->file="img/gallery/small/small_$row_img->file";} $nick=nick_noBd($row_o->name,$row_o->klan,$row_o->level,$row_o->align,$row_o->rank); if($row_o->name_real) {$name_real="Имя:$row_o->name_real";} if($row_o->pol=="m") {$pol="Пол:муж.";} else {$pol="Пол:жен.";} if($row_o->age){$age="Возраст:$row_o->age";} if($row_o->city){$city="Город:$row_o->city";} $sql_output12="select * from gallery_img where author_id='$user_id' and is_active=1 order by sort_id asc limit 100"; $resik=sql_query($sql_output12,$dbi); #список юзеров с фотками while ($rowers=sql_fetch_array($resik,$dbi)) { $rowers->file="img/gallery/small/small_$rowers->file"; $p_arr="<li><img src='http://tzserv.ru/img/gallery/orig/$img' alt='$fa_userid' width='80' height='80' ></li>"; } echo "<table width='460' border='0' cellspacing='0' cellpadding='0' >"; echo "<tr align=center><td><div id=nick>$nick</div></td></tr>"; echo "<tr align=center><td bgcolor=#EDEDED><div id=info>$name_real $pol $age $city</div></td></tr>"; echo "<tr align=center><td height=450><br><div id=foto><a href=/img/gallery/orig/$img target=_blank><img src=$row_img->file border=0></a><br><br>$row_img->comment</div><br></td></tr>"; echo "<tr align=center><td bgcolor=#EDEDED>Фотографии:<ul id=mycarousel class=jcarousel-skin-tango>$p_arr</ul>"; echo "</td></tr>"; echo "</td></tr></table>"; и такой сам js который обрабатовает function goToNick(value) { value3="getInfo"; JsHttpRequest.query( 'index.php?mod=gallery_ajax', // backend { // pass a text value user_id: value, a: value3 }, // Function is called when an answer arrives. function(result, errors) { document.getElementById("nick").innerHTML = result["nick"]; document.getElementById("info").innerHTML = result["info"]; document.getElementById("foto").innerHTML = result["foto"]; document.getElementById("mycarousel").innerHTML = result["mycarousel"]; document.getElementById("rating").innerHTML = result["stat"]; document.getElementById("col_com").innerHTML = result["col_com"]; document.getElementById("comments").innerHTML = ""; document.getElementById("vote").innerHTML = result["vote"]; document.getElementById("link").innerHTML = result["link"]; var obj = document.getElementById("addTab"); obj.style.display = "none"; // Write the answer. }, false // do not disable caching ); } проблема в следущем почемуто в галереи не листаются фотки хотя тестил все эти картинки через html то все нормально грузится использую плагины jquery.jcarousel подключаю так jQuery(document).ready(function() { jQuery('#mycarousel').jcarousel(); }); почемуто не хочет перелистовать не подскажите в чем может быть проблема? |
Часовой пояс GMT +3, время: 05:30. |