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

S

<Span>

Гость
Открыть
index_data.php
PHP:
case 'mytorr':
$user_id = (int) $this->request['user_id'];
 
        $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 5");
 
$html = '<div class="xenOverlay" style="z-index: 1000; top: 200.1px; left: 386.5px; display: block; position: fixed"><div class="section">';
        $html .= '<h2 class="heading h1">Список моих раздач: '. get_username($user_id) .'</h2><div>';
$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><div class="sectionFooter overlayOnly"><a href="#" class="button primary OverlayCloser" onclick="$(\'.xenOverlay\').hide(\'slow\'); return false;" title="Закрыть список" >Закрыть</a></a></div></div></div>';
break;

Открыть
usercp_viewprofile.tpl
HTML:
<script type="text/javascript">
ajax.index_data = function(mode) {
ajax.exec({
action  : 'index_data',
mode    : mode,
user_id : {PROFILE_USER_ID}
});
}
ajax.callback.index_data = function(data) {
$('#index_data').html(data.html);
}
</script>
<a class="med" href="#" onclick="ajax.index_data('mytorr'); return false;"><input type="submit" value="Мои раздачи" class="main gen" /></a>
        <span id="index_data"></span>

Открыть
main.css

Код:
.xenOverlay {  display: none; width: 690px; z-index: 10000; }
.section { margin: 10px auto; }
.section  div{ max-height: 350px;  overflow: auto; }
.xenOverlay > .section, .xenOverlay > .sectionMain {  background: transparent; margin: 0px; }
.xenOverlay .section, .xenOverlay .sectionMain { border: 20px solid rgba(3, 42, 70, 0.506); border-radius: 20px;
    box-shadow: 0px 25px 50px rgba(0, 0, 0, 0.506);
    padding: 0px;
}
.xenOverlay .section .heading, .xenOverlay .sectionMain .heading {  border-radius: 0; margin-bottom: 0px; }
.heading { color: #F0F7FC; margin: 0px; }
.heading, .xenForm .formHeader {
    background-color: #65A5D1;
    border-bottom: 1px solid #176093;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    color: #F0F7FC;
    font-size: 11pt;
    font-weight: 700;
    margin-bottom: 3px;
    padding: 5px 10px;
}
.xenOverlay .section .subHeading, .xenOverlay .sectionMain .subHeading { margin-top: 0px; }
.subHeading {
    background: url("http://torrentpier.com/styles/default/xenforo/gradients/category-23px-light.png") 50% 0% repeat-x #F9D9B0;
    border-bottom: 1px solid #F9BC6D;
    border-top: 1px solid #F9D9B0;
    color: #6D3F03;
    font-size: 11px;
    margin: 3px auto 0px;
    padding: 5px 10px;
}
.pairsInline dl, .pairsInline dt, .pairsInline dd { display: inline; }
.pairs dt, .pairsInline dt, .pairsJustified dt { color: #969696; }
.pairsInline dl, .pairsInline dt, .pairsInline dd { display: inline; }
dl, dt, dd, ol, li { margin: 0px; padding: 0px;}
.subHeading a { color: #6D3F03; font-size: 11px; line-height: 1.27; }
.xenOverlay .overlayScroll { max-height: 400px; overflow: auto; }
 
.memberListItem { overflow: hidden; }
.primaryContent { background-color: #FCFCFF; border-bottom: 1px solid #D7EDFC; padding: 10px; }
.memberListItem .avatars, .memberListItem .icon { float: left; }
.avatars img, .avatars .img { background-color: #FCFCFF; border: 1px solid #A5CAE4; border-radius: 4px; padding: 2px; }
.avatars .img {
    background-position: 2px 2px;
    background-repeat: no-repeat;
    display: block;
    overflow: hidden;
    text-indent: 1000px;
    white-space: nowrap;
    word-wrap: normal;
}
.avatars .img.s {  height: 48px; width: 48px; }
.memberListItem .extra { float: right; font-size: 11px; }
.memberListItem .member { margin-left: 65px; }
.memberListItem h3.username { font-size: 13pt; font-weight: 700; margin-bottom: 3px; }
.memberListItem .userInfo { font-size: 11px; margin-bottom: 3px; }
.dimmed, a.dimmed, .dimmed a {color: #646464; }
.sectionFooter { overflow: hidden; }
.sectionFooter {
    background: url("http://torrentpier.com/styles/default/xenforo/gradients/category-23px-light.png") 50% 0% repeat-x #D7EDFC;
    border-bottom: 1px solid #A5CAE4;
    color: #65A5D1;
    font-size: 11px;
    line-height: 16px;
    padding: 4px 10px;
}
.xenOverlay .overlayOnly { display: block !important; }
.xenOverlay .sectionFooter .button, .xenOverlay .sectionFooter .buttonContainer { float: right; min-width: 75px; }
.button.primary { background-color: #A5CAE4; }
.button {
    background: url("http://torrentpier.com/styles/default/xenforo/gradients/form-button-white-25px.png") 50% 0% repeat-x #DCDCEB;
    border-bottom: 1px solid #B3B3BD;
    border-left: 1px solid #DDDDEB;
    border-radius: 7px;
    border-right: 1px solid #DDDDEB;
    border-top: 1px solid #FFFFFF;
    box-shadow: 0px 1px 4px 0px #C8C8D2;
    box-sizing: border-box;
    color: #000000;
    cursor: pointer;
    display: inline-block;
    font-family: "Calibri", "Trebuchet MS", "Verdana", "Geneva", "Arial", "Helvetica", sans-serif;
    font-size: 12px;
    font-style: normal;
    height: 23px;
    line-height: 23px;
    outline: medium none currentColor;
    padding: 0px 6px;
    text-align: center;
    text-shadow: 0px 0px 0px transparent, 0px -1px 2px white;
}
123.png
 
S

Sarymian

Гость
Пример выполнения, это раз!
Во вторых что за ***
PHP:
background: url("http://torrentpier.com/styles/default/xenforo/gradients/category-23px-light.png") 50% 0% repeat-x #F9D9B0;
 
S

Sarymian

Гость
Меня смущает что ссылка за пределы сайта. Так тяжело было "приклеить" файл к теме и прописать его в css нормально? Почему ж тогда на радикал не залил?!
 

dredd

Пользователь
Sarymian, а смысл выдёргивать файл, если оформление слизано с этого сайта? И картинка то не значительная, пару кб весит, не вижу смысла её качать и делать архив с модом и всеми прилегающими к нему картинками.
 
Сверху