vBuLLetin BanLı Üye LiSteSi

Son güncelleme: 18.12.2009 14:02
  • vBuLLetin Banlog Stats 3.7.x



    BanLanan ÜyeLerin LiSteSini Ayrı Bir Sayfada GöStermeye Yarar...

    Demo Için TıkLayın...


    KuruLumu:

    Bir Metin Editörünü (Not Defteri, WordPard Gibi) Açarak A$aqıdaki KodLarı KopyaLayın we DoSyanın Adını banlog.php oLarak Kaydedin...

    Kaydettiqiniz Bu DoSyayı Forum Ana Dizinine YükLeyin...

    [HTML]<?php

    // ######################## SET PHP ENVIRONMENT ###########################
    error_reporting(E_ALL & ~E_NOTICE);

    define('THIS_SCRIPT[/swf2][swf3]banlist');

    // #################### PRE-CACHE TEMPLATES AND DATA ######################
    // get special phrase groups
    $phrasegroups = array();

    // get special data templates from the datastore
    $specialtemplates = array();

    // pre-cache templates used by all actions
    $globaltemplates = array(
    'my_banlist'
    );

    // pre-cache templates used by specific actions
    $actiontemplates = array();

    // ########################## REQUIRE BACK-END ############################
    require_once('./global.php');

    // #################### HARD CODE JAVASCRIPT PATHS ########################
    $headinclude = str_replace('clientscript', $vbulletin->options['bburl'] . '/clientscript', $headinclude);

    // ########################################################################
    // ######################### START MAIN SCRIPT ############################
    // ########################################################################

    $navbits = array();

    $navbits[$parent] = 'The Ban Log';

    $navbits = construct_navbits($navbits);
    eval('$navbar = "' . fetch_template('navbar') . '";');

    $querygroups = array();
    foreach ($vbulletin->usergroupcache AS $usergroupid => $usergroup)
    {
    if (!($usergroup['genericoptions'] & $vbulletin->bf_ugp_genericoptions['isnotbannedgroup']))
    {
    $querygroups["$usergroupid"] = $usergroup['title'];
    }
    }
    if (!empty($querygroups))
    {
    // now query users from the specified groups
    $getusers = $db->query_read("
    SELECT user.userid, user.username, user.usergroupid AS busergroupid,
    userban.usergroupid AS ousergroupid,
    IF(userban.displaygroupid = 0, userban.usergroupid, userban.displaygroupid) AS odisplaygroupid,
    bandate, liftdate, reason,
    adminuser.userid AS adminid, adminuser.username AS adminname
    FROM " . TABLE_PREFIX . "user AS user
    LEFT JOIN " . TABLE_PREFIX . "userban AS userban ON(userban.userid = user.userid)
    LEFT JOIN " . TABLE_PREFIX . "user AS adminuser ON(adminuser.userid = userban.adminid)
    WHERE user.usergroupid IN(" . implode(',', array_keys($querygroups)) . ")
    ORDER BY userban.liftdate ASC, user.username
    ");
    if ($db->num_rows($getusers))
    {
    $users = array();
    while ($user = $db->fetch_array($getusers))
    {
    $temporary = iif($user['liftdate'], 1, 0);
    $users["$temporary"][] = $user;
    }
    }
    $db->free_result($getusers);

    // show temporarily banned users
    if (!empty($users[1]))
    {
    foreach ($users[1] AS $user)
    {
    if ($user['liftdate'] == 0)
    {
    $user['banperiod'] = $vbphrase['permanent'];
    $user['banlift'] = $vbphrase['never'];
    $user['banremaining'] = $vbphrase['forever'];
    }
    else
    {
    $user['banlift'] = vbdate($vbulletin->options['dateformat'] . ', ~' . $vbulletin->options['timeformat'], $user['liftdate']);
    $user['banperiod'] = ceil(($user['liftdate'] - $user['bandate']) / 86400);
    if ($user['banperiod'] == 1)
    {
    $user['banperiod'] .= " $vbphrase[day]";
    }
    else
    {
    $user['banperiod'] .= " $vbphrase[days]";
    }

    $remain = $user['liftdate'] - TIMENOW;
    $remain_days = floor($remain / 86400);
    $remain_hours = ceil(($remain - ($remain_days * 86400)) / 3600);
    if ($remain_hours == 24)
    {
    $remain_days += 1;
    $remain_hours = 0;
    }

    if ($remain_days < 0)
    {
    $user['banremaining'] = "<i>$vbphrase[will_be_lifted_soon]</i>";
    }
    else
    {
    if ($remain_days == 1)
    {
    $day_word = $vbphrase['day'];
    }
    else
    {
    $day_word = $vbphrase['days'];
    }
    if ($remain_hours == 1)
    {
    $hour_word = $vbphrase['hour'];
    }
    else
    {
    $hour_word = $vbphrase['hours'];
    }
    $user['banremaining'] = "$remain_days $day_word, $remain_hours $hour_word";
    }
    }
    $lista .= "<tr>
    <td valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['username']."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['adminname']."</div>
    </td>
    <td align=\"right\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".vbdate($vbulletin->options['dateformat'], $user['bandate'])."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banperiod']."</div>
    </td>
    <td align=\"right\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banlift']."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banremaining']."</div>
    </td>
    <td align=\"right\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['reason']."</div>
    </td>
    </tr>";
    }
    }

    // show permanently banned users
    if (!empty($users[0]))
    {
    foreach ($users[0] AS $user)
    {
    if ($user['liftdate'] == 0)
    {
    $user['banperiod'] = "Permanent";
    $user['banlift'] = "Never";
    $user['banremaining'] = "Forever";
    }
    else
    {
    $user['banlift'] = vbdate($vbulletin->options['dateformat'] . ', ~' . $vbulletin->options['timeformat'], $user['liftdate']);
    $user['banperiod'] = ceil(($user['liftdate'] - $user['bandate']) / 86400);
    if ($user['banperiod'] == 1)
    {
    $user['banperiod'] .= " $vbphrase[day]";
    }
    else
    {
    $user['banperiod'] .= " $vbphrase[days]";
    }

    $remain = $user['liftdate'] - TIMENOW;
    $remain_days = floor($remain / 86400);
    $remain_hours = ceil(($remain - ($remain_days * 86400)) / 3600);
    if ($remain_hours == 24)
    {
    $remain_days += 1;
    $remain_hours = 0;
    }

    if ($remain_days < 0)
    {
    $user['banremaining'] = "<i>$vbphrase[will_be_lifted_soon]</i>";
    }
    else
    {
    if ($remain_days == 1)
    {
    $day_word = $vbphrase['day'];
    }
    else
    {
    $day_word = $vbphrase['days'];
    }
    if ($remain_hours == 1)
    {
    $hour_word = $vbphrase['hour'];
    }
    else
    {
    $hour_word = $vbphrase['hours'];
    }
    $user['banremaining'] = "$remain_days $day_word, $remain_hours $hour_word";
    }
    }
    $listb .= "<tr>
    <td valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['username']."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['adminname']."</div>
    </td>
    <td align=\"right\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".vbdate($vbulletin->options['dateformat'], $user['bandate'])."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banperiod']."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banlift']."</div>
    </td>
    <td align=\"center\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['banremaining']."</div>
    </td>
    <td align=\"right\" valign=\"top\" class=\"alt1\">
    <div class=\"smallfont\">".$user['reason']."</div>
    </td>
    </tr>";
    }
    }
    }

    eval('print_output("' . fetch_template('my_banlist') . '");');

    ?> [/HTML]


    Daha Sonra KuLLandıqınız Temada Bir TempLate oLu$turarak A$aqıdaki KodLarı EkLeyin we Adını my_banlist oLarak Kaydedin...

    [HTML]$stylevar[htmldoctype]
    <html xmlns="http://www.w3.org/1999/xhtml" dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
    <head>
    $headinclude
    <title>Banlog - $vboptions[bbtitle]</title>
    </head>
    <body>

    $header
    $navbar

    <table class="tborder" align="center" border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
    <td colspan="7" class="tcat">
    <strong>Banned Users: Temporary Bans</strong>
    </td>
    </tr>
    <tr>
    <td align="center" class="alt1">
    <strong>User Name</strong>
    </td><br />
    <td align="center" class="alt1">
    <strong>Banned By</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Banned On</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Period</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Will Be Lifted On</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Time Remaining</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Reason</strong>
    </td>
    </tr>

    <if condition="$lista == ''">

    </table><br />

    <div align="center"><strong>No one is currently banned... Hmmmm... Must be a good day!</strong></div>

    <else />

    $lista

    </table><br />

    </if>



    <table class="tborder" align="center" border="0" cellpadding="3" cellspacing="2" width="100%">
    <tr>
    <td colspan="7" class="tcat">
    <strong>Banned Users: Permanent Bans</strong>
    </td>
    </tr>
    <tr>
    <td align="center" class="alt1">
    <strong>User Name</strong>
    </td><br />
    <td align="center" class="alt1">
    <strong>Banned By</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Banned On</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Period</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Will Be Lifted On</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Time Remaining</strong>
    </td>
    <td align="center" class="alt1">
    <strong>Ban Reason</strong>
    </td>
    </tr>


    <if condition="$listb == ''">

    </table><br />

    <div align="center"><strong>No one is currently banned... Hmmmm... Must be a good day!</strong></div>

    <else />

    $listb

    </table><br />

    </if>

    $footer
    </body>
    </html>[/HTML]


    Bu Kadar...



    SpeCiaL ThankS To jredrum

    OriginaL Link:
    http://www.vbulletin.org/forum/showthread.php?t=188118
#14.08.2008 21:35 0 0 0
  • Ustam 3.6.8 de calisirmi?
    Saygilar
#30.09.2008 00:06 0 0 0
  • @sabikali adlı üyeden alıntı:
    Ustam 3.6.8 de calisirmi?
    Saygilar
    Orijinali Göster...


    ÇaLı$maya BiLir Emin DeqiLim...

    vBuLLetin.Org de 3.6 Için UyumLuSu Vardır... Ara BakaLım Bi...
#30.09.2008 12:16 0 0 0
  • demo adresi çalısmıyor....
#16.11.2009 15:34 0 0 0
  • demo çalısmayınca biz deneyelim dedik :)

    3.8.4 de çalıştı arkadasım ...

    noimage
#16.11.2009 15:45 0 0 0
  • nerde açılıyor nu panel acaba?
#06.12.2009 03:44 0 0 0
  • çalışıyor 3.8.4 de ancak bu 4 sürümü çok gıcık yaw sinir ediyor adamı
#06.12.2009 03:59 0 0 0
#06.12.2009 10:13 0 0 0
  • vb 33.8.2 kullanıyom banlist acılıyor ama bannerın ustunde bu yazı cıkıyor

    Warning: define() expects at least 2 parameters, 1 given in /home2/tusenaco/public_html/twilighttr/banlog.php on line 6 sebebi ne olabılır
#17.12.2009 22:45 0 0 0
  • @anofel adlı üyeden alıntı:
    vb 33.8.2 kullanıyom banlist acılıyor ama bannerın ustunde bu yazı cıkıyor

    Warning: define() expects at least 2 parameters, 1 given in /home2/tusenaco/public_html/twilighttr/banlog.php on line 6 sebebi ne olabılır
    Orijinali Göster...


    banlog.php 'yi Yeniden Indirin ve Atın... 6. Satırında Bir Hata Varmı$...
#18.12.2009 14:02 0 0 0