Мои раздачи на ajax

Dream

Пользователь
<Span>, что то я так повню что автор другой в этого мода, не так ли?

в оригинале аякс был такой:
PHP:
    case 'my_torrents':
        $user_id = (int) @$this->request['user_id'];
       
        $type = (int) @$this->request['type'];
        $limit = $type * 15;
       
        $sql = DB()->fetch_rowset("SELECT
            tor.topic_id as torrent_id , f.forum_id, f.forum_name, t.topic_id,
            t.topic_title, tor.complete_count,tor.size, tor.attach_id
        FROM ". BB_FORUMS ." f, ". BB_TOPICS ." t, ". BB_BT_TORRENTS ." tor
        WHERE tor.poster_id = ".$userdata['user_id']."
            AND t.topic_id = tor.topic_id
            AND t.forum_id = f.forum_id
        GROUP BY tor.topic_id
        ORDER BY tor.topic_id desc
        LIMIT ".$limit.",7");
           
        $html = '<div class="xenOverlay" style="z-index: 1000; top: 200.1px; left: 386.5px; display: block; position: fixed"><div class="section">';
        $html .= ($type) ? '<dl class="subHeading pairsInline"><a id="submit_chat" title="Предыдушие 5 раздач" href="#" onclick="ajax.exec({action : \'index_data\', mode: \'mytorr\', type: '. ($type - 1) .'}); return false;">&laquo;</a>' : '<dl class="subHeading pairsInline">';
        $html .= '<dt>Список моих раздач: </dt><dd>'. get_username($user_id) .' <a id="submit_chat" title="Следующие 5 раздач" href="#" onclick="ajax.exec({action : \'index_data\', mode: \'mytorr\', type: '. ($type + 1) .'}); return false;">&raquo;</a></dd></dl>';
        $html .= '<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
        <tr>
        <td class="row3" align="center"><span class="gen">Форум</span></td>
        <td class="row3" align="center"><span class="gen">Название</span></td>
        <td class="row3" align="center"><span class="gen">Скачать</span></td>
        <td class="row3" align="center"><span class="gen">Скачано раз</span></td>
        </tr>';           
       
        foreach ($sql as $row)
        {
            $html .= '<tr>';
            $html .= '
                <td><a href="viewforum.php?f='. $row['forum_id'].'" class="avatars" alt="">'.$row['forum_name'].'</a></td>
                <td><a href="viewtopic.php?t='. $row['topic_id'] .'">'.$row['topic_title'].'</a></td>
                <td align="center"><div class="gensmall" style="margin-top: 2px"><a class="bold" onclick="this.className="normal"" href="download.php?id=' . $row['attach_id'].'"" class="gensmall" style="text-decoration: none">Скачать</a></div></div></td>
                <td align="center"><b>'.$row['complete_count'].'</b></td>
   
            ';
            $html .= '</tr>';
        }
        $html .= '</table>';
        $html .= '<div class="sectionFooter overlayOnly"><a href="#" class="button primary OverlayCloser" onclick="$(\'.xenOverlay\').hide(\'slow\'); return false;" title="Закрыть список" >Закрыть</a></a></div></div></div></div>';
    break;
 
G

Gemini_13

Гость
Sarymian, ну написано же в ошибке, что case не ожидался, значит удалить кейс)))
 

Wertos

Пользователь
У меня такое чувство, что позиционироваться по центру оно будет только в этом шаблоне....
 
Сверху