AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Plugins (https://forums.alliedmods.net/forumdisplay.php?f=108)
-   -   [CS:GO|WEB] CtBans Web Page (https://forums.alliedmods.net/showthread.php?t=305253)

1DreaM 02-13-2018 09:06

[CS:GO|WEB] CtBans Web Page
 
1 Attachment(s)
CTBans Page.
CtBans web page for databomb's ctbans plugin.


Prewiev: https://overgame.eu/ctbans.php

GitHub: Link

Donation: Link


Installation !
  1. Upload file to your FTP.

  2. Customize in ctbans_settings.php:

    PHP Code:

    <?php
    /**
    *
    *                                            -->        SETTINGS    <--
    *
    **/
    ///////////////////////////////////////////////////////////////
    //        DATABASE SETTING
    $server="";
    $username="";
    $password="";
    $database="";
    $table_prefix="";
    ///////////////////////////////////////////////////////////////
     
    //        RESULTS SETTING
    $results_per_page="15";
    ///////////////////////////////////////////////////////////////
    //        HEADER AND SUBHEADER SETTINGS
    //    Enable Sticky Header
    //    true = enable, false = disable
    $sticky_header true;
    //    Page Name
    $page_name "JailBreak | CTBanlist";
    //    Header Name
    $header "JailBreak | CT Bans";
    //    Header Color
    //    DEFAULT --> "#f1f1f1"
    $header_background_color "#f1f1f1";
    //    Header text color 
    //    DEFAULT --> "black" / "#000"
    $header_text1_color "black";
    //    Enable or Disable SubHeader
    //    true = enable, false = disable
    $enable_subheader true;
    //    SubHeader Text
    $subHeader "Ctbanlist for JailBreak server.";
    //    SubHeader Color
    //    DEFAULT --> "black" / "#000"
    $header_text2_color "black";
    ///////////////////////////////////////////////////////////////
    //        MENU SETTINGS
    //    Home size
    //    DEFAULT top --> 16px, side --> 16px;
    $menu_size_top "16px";
    $menu_size_side "16px";
    //    Home button name
    $menu_home_button_name "Home";
    //    Home button color
    //    DEFAULT --> "#3473c1"
    $menu_home_button_color "#3473c1";
    //        MENU BUTTONS SETTINGS
    //        RIGHT SIDE
    //    BTN 1 (default)
    $btn1_name "Web";
    $btn1_link "#";
    //    BTN 2
    //    Enable or Disable BTN 2
    //    true = enable, false = disable
    $btn2_enable true;
    $btn2_name "BanList";
    $btn2_link "#";
    //    BTN 3
    //    Enable or Disable BTN 3
    //    true = enable, false = disable
    $btn3_enable false;
    $btn3_name "BUTTON";
    $btn3_link "#";
    //        LEFT SIDE
    //    BTN 4 (default)
    $btn4_name "Fórum";
    $btn4_link "#";
    //    BTN 5
    //    Enable or Disable BTN 5
    //    true = enable, false = disable
    $btn5_enable true;
    $btn5_name "HLstatsX";
    $btn5_link "#";
    //    BTN 6
    //    Enable or Disable BTN 6
    //    true = enable, false = disable
    $btn6_enable false;
    $btn6_name "BUTTON";
    $btn6_link "#";
    ///////////////////////////////////////////////////////////////
    //        SIDEBAR SETTINGS
    //    Enable or Disable Sidebar
    //    true = enable, false = disable
    $sidebar_enable true;
    //    SID 1
    $sid1_name "EVIP";
    $sid1_link "#";
    //    DEFAULT --> "#4CAF50"
    $sid1_color "#4CAF50";
    //    DEFAULT --> "grade" Example: https://www.w3schools.com/icons/google_icons_action.asp
    $sid1_icon "grade";
    //    SID 2
    $sid2_name "Obchod";
    $sid2_link "#";
    //    DEFAULT --> "#2196F3"
    $sid2_color "#2196F3";
    //    DEFAULT --> "shopping_cart" Example: https://www.w3schools.com/icons/google_icons_action.asp
    $sid2_icon "shopping_cart";
    //    SID  LOGIN {default}
    //    Enable or Disable Sidebar Login
    //    true = enable, false = disable
    $sidebar_login true;
    //    DEFAULT --> "#f44336"
    $sid3_color "#f44336";
    //    DEFAULT --> "perm_identity" Example: https://www.w3schools.com/icons/google_icons_action.asp
    $sid3_icon "perm_identity";
    ///////////////////////////////////////////////////////////////
    //        SEARCH SETTINGS
    //    Enable or Disable Search
    //    true = enable, false = disable
    $search_enable true;
    //    Search button name
    //    DEFAULT --> "Search"
    $search_name "Search";
    //    Search button color
    //    DEFAULT --> "#3473c1"
    $search_color "#3473c1";
    ///////////////////////////////////////////////////////////////
    //        OTHER SETTINGS
    //    Indicate scroll on the top of the page
    //    true = enable, false = disable
    $scroll_indicator true;
    //    Page background color
    //    DEFAULT --> "#fcfcfc"
    $page_background_color "#fcfcfc";
    //    Bans table color
    //    DEFAULT --> "#2184ff"
    $table_color "#2184ff";
    //    Display alert when version is out of date
    //    true = enable, false = disable
    $display_alert true;
    //        END
    ///////////////////////////////////////////////////////////////


ChangeLog:

Code:

1.0.0
  • Updated PHP.

  • Design remake.

  • + menu, search and favicon.

  • + colors.

  • ...(little changes)


1.1.0
  • Repair of search.


1.2.0
  • Design remake.

  • Added details.


1.2.1
  • Fixed search.

  • Sql injection.


1.3.0
  • + sidebar.

  • + scroll indicator.

  • Better footer.

  • + scroll to top.

  • New design.

  • New main menu.


1.4.0
  • + link to admin, perp's steam profile.

  • + settings file.


1.5.0
  • + version control.

  • + admin panel.

  • Search update.

  • + sk translation.


1.5.1
  • Security fix.




CONTACT
  1. Email: Email
  2. PM: Message




Bara 02-13-2018 09:13

Re: [CS:GO|WEB] Web Interface for CtBans
 
1. Web Interface isn't a plugin.
2. No download

paulo_crash 04-09-2018 20:53

Re: [CS:GO|WEB] CtBans Web Page
 
This new version does not work the search option, search, could fix.

I could put it back to show the Steam_ID of the banned player and the ADMIN that banned it.

1DreaM 04-10-2018 00:58

Re: [CS:GO|WEB] CtBans Web Page
 
I will fix search. Thx.

If you tap on the player, it will show details.

eryk172 04-10-2018 09:39

Re: [CS:GO|WEB] CtBans Web Page
 
Thanks! :D

http://nafarcie.pl/jbgo/banyct.php ,Works fine ;)

paulo_crash 04-11-2018 14:46

Re: [CS:GO|WEB] CtBans Web Page
 
I downloaded the GitHub version: https://github.com/1DreaM1/Ctbans-Web-Page

Now you no longer want to connect to the database, you get the following error:
Quote:

Unable to connect to database server with specified parameters

1DreaM 04-11-2018 15:36

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2587234)
I downloaded the GitHub version: https://github.com/1DreaM1/Ctbans-Web-Page

Now you no longer want to connect to the database, you get the following error:

Github file is working well.

PLS, check up your parameters in file -->

PHP Code:

$server=""//db host
$username=""//db username
$password=""//db password
$database=""//db name 

maybe you have done mistake.

j1gg 04-12-2018 07:39

Re: [CS:GO|WEB] CtBans Web Page
 
How can i add link in sourcebans like you added here http://sourcebans.gsp-europe.net/sou...dex.php?p=home ?

1DreaM 04-12-2018 07:53

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by j1gg (Post 2587347)
How can i add link in sourcebans like you added here http://sourcebans.gsp-europe.net/sou...dex.php?p=home ?

includes/system-functions.php LINE: 137-196

PHP Code:

/**
 * Adds a tab to the page
 *
 * @param string $title The title of the tab
 * @param string $utl The link of the tab
 * @param boolean $active Is the tab active?
 * @return noreturn
 */

function AddTab($title$url$desc$active=false)
{
    global 
$tabs;
    
$tab_arr = array();
    
$tab_arr[0] = "Home";
    
$tab_arr[1] = "Servers";
    
$tab_arr[2] = "&nbsp;BanList&nbsp;";
    
$tab_arr[3] = "Mute/GaG";
    
$tab_arr[4] = "CtBans";
    
$tab_arr[5] = "Web";
    
$tabs = array();
    
$tabs['title'] = $title;
    
$tabs['url'] = $url;
    
$tabs['desc'] = $desc;
    if (
$_GET['p'] == "default" && $title == $tab_arr[intval($GLOBALS['config']['config.defaultpage'])]) {
        
$tabs['active'] = true;
        
$GLOBALS['pagetitle'] = $title;
    } else {
        if (
$_GET['p'] != "default" && substr($url12) == $_GET['p']) {
            
$tabs['active'] = true;
            
$GLOBALS['pagetitle'] = $title;
        } else {
            
$tabs['active'] = false;
        }
    }
    include 
TEMPLATES_PATH "/tab.php";
}

/**
 * Displays the pagetabs
 *
 * @return noreturn
 */
function BuildPageTabs()
{
    global 
$userbank;
    
AddTab("Home""index.php?p=home""This page shows an overview of your bans and servers.");
    
AddTab("Servers""index.php?p=servers""All of your servers and their status can be viewed here");
    
AddTab("Bans""index.php?p=banlist""All of the bans in the database can be viewed from here.");
    if (
$GLOBALS['config']['config.enablecomms'] == "1") {
        
AddTab("Mute/GaG""index.php?p=commslist""All of the communication bans (such as chat gags and voice mutes) in the database can be viewed from here.");
    }
    if (
$GLOBALS['config']['config.enablesubmit']=="1") {
        
AddTab("CtBans""https://overgame.eu/ctbans.php""List of CtBans");
    }
    if (
$GLOBALS['config']['config.enableprotest']=="1") {
        
AddTab("Web""https://overgame.eu""Our website.");
    }
    if (
$userbank->is_admin()) {
        
AddTab(" Admin Panel ""index.php?p=admin""This is the control panel for SourceBans where you can setup new admins, add new server, etc.");
    } 


eryk172 04-12-2018 10:03

Re: [CS:GO|WEB] CtBans Web Page
 
Searching for me does not work, Why?
http://nafarcie.pl/jbgo/banyct.php

//EDIT: Sorry, all works.. I must update :D

1DreaM 04-12-2018 10:07

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by eryk172 (Post 2587367)
Searching for me does not work, Why?
http://nafarcie.pl/jbgo/banyct.php

Fix is in the newest version. :)

Kats 04-12-2018 20:35

Re: [CS:GO|WEB] CtBans Web Page
 
Pasting a steam id in the search bar does not show bans, and it only shows per page
if you have banned user with name "egg" on page 1, and if you try to search "egg" while being on page 2 it won't show

xFlane 04-13-2018 06:37

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2587368)
Fix is in the newest version. :)

merge this pull https://github.com/1DreaM1/Ctbans-Web-Page/pull/1
to block the available sql injection.

paulo_crash 04-13-2018 07:23

Re: [CS:GO|WEB] CtBans Web Page
 
It would have a suggestion if we could put it so that when we clicked to see the banned players information we could click on Steam_ID of it and open the link to steam it would also be good in the Steam_ID of ADMIN that applied the ban.

1DreaM 04-13-2018 09:54

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2587474)
It would have a suggestion if we could put it so that when we clicked to see the banned players information we could click on Steam_ID of it and open the link to steam it would also be good in the Steam_ID of ADMIN that applied the ban.

Ok

BTW Fixed sql injection.

paulo_crash 04-18-2018 20:43

Re: [CS:GO|WEB] CtBans Web Page
 
I believe I found a BUG, ​​have some players that are being banned and does not show ban ban information on the web interface.

1DreaM 04-19-2018 01:48

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2588403)
I believe I found a BUG, ​​have some players that are being banned and does not show ban ban information on the web interface.



Databomb:
Quote:

*Unfortunately, there is no way to accommodate your use case entirely in SourcePawn with clientprefs extension because of the cached data that exists. There will still be a mismatch between the data unless I pull from SQL every time, which I would rather not do.
Quote:

Instead there is another way to make your use case work. It is recommended that you do something similar to sourcebans and execute a server rcon command. There are several rcon commands already included with ctbans 2.0.0 such as the offline commands that will do exactly what you need.*
On this you need UDP, TCP connection.

paulo_crash 04-23-2018 12:41

Re: [CS:GO|WEB] CtBans Web Page
 
Like this new interface, I just did not like the menu in the case, could leave it smaller, leave it in the size that the menu occupies, if it has 3 links, you leave only the size for the 3, and so on.

It would be possible?

A and what I mentioned before, when you open the information of a banned player have the option of clicking on his Steam_ID and open his Steam profile, same thing in ADMIN that applied the ban on it.

1DreaM 04-25-2018 14:24

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2589039)
Like this new interface, I just did not like the menu in the case, could leave it smaller, leave it in the size that the menu occupies, if it has 3 links, you leave only the size for the 3, and so on.

It would be possible?

A and what I mentioned before, when you open the information of a banned player have the option of clicking on his Steam_ID and open his Steam profile, same thing in ADMIN that applied the ban on it.

Download new version.

Already with links to Steam profiles.
+ you can set up menu yourself.

paulo_crash 04-25-2018 14:33

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2589378)
Download new version.

Already with links to Steam profiles.
+ you can set up menu yourself.

Perfect, thanks.

I'll see.

paulo_crash 05-03-2018 01:12

Re: [CS:GO|WEB] CtBans Web Page
 
I'm using the ctbans_1.4.0.php version and the search option does not work there.

1DreaM 05-03-2018 06:19

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2590472)
I'm using the ctbans_1.4.0.php version and the search option does not work there.

On line: 586

Change this:
PHP Code:

  $_GET['submit_search']=='Search'


To this:
PHP Code:

  $_GET['submit_search']=='Pesquisar'


paulo_crash 05-03-2018 07:01

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2590496)
On line: 586

Change this:
PHP Code:

  $_GET['submit_search']=='Search'


To this:
PHP Code:

  $_GET['submit_search']=='Pesquisar'


I made the changes and it did not work.

I checked the one from your link and it also does not work.

https://overgame.eu/ctbans.php

1DreaM 05-03-2018 07:44

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2590501)
I made the changes and it did not work.

I checked the one from your link and it also does not work.

https://overgame.eu/ctbans.php

Else there:

Line: 639


PHP Code:

if (!empty($_GET['search']) && $_GET['submit_search']=='Search') { 

To:

PHP Code:

if (!empty($_GET['search']) && $_GET['submit_search']=='Pesquisar') { 


paulo_crash 05-03-2018 13:29

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2590502)
Else there:

Line: 639


PHP Code:

if (!empty($_GET['search']) && $_GET['submit_search']=='Search') { 

To:

PHP Code:

if (!empty($_GET['search']) && $_GET['submit_search']=='Pesquisar') { 


Worked, thank you!

I have a suggestion, when we search for a player it is not possible to search again, in case you would have to click the back button and search again.

You could put it to search straight, even if you have already done a search.

1DreaM 05-04-2018 03:00

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2590566)
Worked, thank you!

I have a suggestion, when we search for a player it is not possible to search again, in case you would have to click the back button and search again.

You could put it to search straight, even if you have already done a search.

I will do.

paulo_crash 05-04-2018 06:57

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2590631)
I will do.

:):):) :bacon!::bacon!::bacon!:

Thank you!

1DreaM 05-14-2018 13:24

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2590667)
:):):) :bacon!::bacon!::bacon!:

Thank you!

You can download new version.

paulo_crash 05-14-2018 13:44

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2592170)
You can download new version.

Perfect, just one question, do I have to do the previous procedures to search the players again?

1DreaM 05-14-2018 14:27

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2592174)
Perfect, just one question, do I have to do the previous procedures to search the players again?

No, you don't have to.

Just type what you want to search and click search button.

NanoC 09-18-2018 07:19

Re: [CS:GO|WEB] CtBans Web Page
 
I seriously need help with this xd, im using databomb's ctban and this one, i did everything correct but cannot see anything in the webpage, it just says "First login: user: admin / password: admin" but when i type this, it says "User or password incorrect"
I dont know what to do. Im using databomb's ctban with sqlite but i set my database to it for test this plugin and nope, nothing..

1DreaM 09-18-2018 12:25

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by NanoC (Post 2615674)
I seriously need help with this xd, im using databomb's ctban and this one, i did everything correct but cannot see anything in the webpage, it just says "First login: user: admin / password: admin" but when i type this, it says "User or password incorrect"
I dont know what to do. Im using databomb's ctban with sqlite but i set my database to it for test this plugin and nope, nothing..


It works with mysql, I have not tested it on sqlite yet.
Could you send me your db.

NanoC 09-18-2018 12:34

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2615722)
It works with mysql, I have not tested it on sqlite yet.
Could you send me your db.

I'm using mysql right now but it still not working, i sent you a pm

paulo_crash 09-20-2018 14:18

Re: [CS:GO|WEB] CtBans Web Page
 
Doubt, I saw the same problem in your CTBan Web Interface.

Some player nicks and ban reasons are bogged down due to special characters.

How would I fix this, how can I correct it?

1DreaM 09-20-2018 14:43

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2616058)
Doubt, I saw the same problem in your CTBan Web Interface.

Some player nicks and ban reasons are bogged down due to special characters.

How would I fix this, how can I correct it?

I'm still solving this problem.

It's encoding problem.

paulo_crash 10-20-2018 13:06

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by 1DreaM (Post 2616060)
I'm still solving this problem.

It's encoding problem.

Any news on the coding problem? (BUG Character)

paulo_crash 10-23-2018 18:18

Re: [CS:GO|WEB] CtBans Web Page
 
It would be possible to make it compatible with other Plugins CTBans, in this case: https://forums.alliedmods.net/showthread.php?p=2496904

shanapu 10-23-2018 19:29

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by paulo_crash (Post 2621009)
It would be possible to make it compatible with other Plugins CTBans, in this case: https://forums.alliedmods.net/showthread.php?p=2496904

https://github.com/oaaron99/CTBans/issues/4
It's possible to make a version for addicted ctbans, but his version doesn't save player nicks in database so the loading time of the webpanel is a mess.

painlesstgp 06-07-2019 21:23

Re: [CS:GO|WEB] CtBans Web Page
 
How can this work if databombs' ctban plugin doesnt support mysql? and only local storage?

Hackmastr 09-13-2019 05:37

Re: [CS:GO|WEB] CtBans Web Page
 
Quote:

Originally Posted by painlesstgp (Post 2654781)
How can this work if databombs' ctban plugin doesnt support mysql? and only local storage?

It does support Mysql.


All times are GMT -4. The time now is 18:29.

Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.