Welcome to the RaGEZONE - MMORPG development forums.

PhoenixPHP Command Logs HK Plugin

This is a discussion on PhoenixPHP Command Logs HK Plugin within the Habbo Releases forums, part of the Habbo Hotel category; Hi, This is my plugin of commands logs for PhoenixPHP HK. First you need to add those files to /housekeeping/ ...

LyncusMU
Results 1 to 11 of 11
  1. #1
    Member
    Rank
    Newbie
    Join Date
    Jun 2009
    Location
    The Netherlands
    Posts
    40
    Liked
    4

    PhoenixPHP Command Logs HK Plugin

    Tabo Hotel
    Hi,

    This is my plugin of commands logs for PhoenixPHP HK.

    First you need to add those files to /housekeeping/

    cmdlogs.php
    PHP Code:
    <?php
    // Created by Michael from CubieHotel.nl ©
    // ************* username: supers242
    // RaGEZONE username: supers242
    // Do not remove this notice

    define('USERNAME_REQUIRED'TRUE);
    define('ACCOUNT_REQUIRED'TRUE);
    include(
    "../global.php");
    $username $core->EscapeString($_SESSION['username']);
    if(!
    $users->UserPermission('hk_cmdlogs'$username))
    {
    header("Location: nopermission.php");
    die;
    }
    if(isset(
    $_GET['start'])){
        
    $start=$core->EscapeString($_GET['start']);
        }
        else 
    $start=0;
    if(!isset(
    $_GET['uname'])){
        
    $cmdlogsq mysql_query("SELECT * FROM cmdlogs ORDER BY id DESC LIMIT ".$start.",20");
        }
        else {
            
    $cmdlogsq mysql_query("SELECT * FROM cmdlogs WHERE user_name='".$core->EscapeString($_GET['uname'])."' ORDER BY id DESC LIMIT ".$start.",20");
            }
    ?>
    <script language="javascript">
            
            function LoadPage(PageName) {
                $('.page').css('display', 'none');
                $('.overlay').css('display', 'none');
                $.ajax({
                   type: "POST",
                   url: PageName + ".php",
                   success: function(msg){
                     $('.conColumn').html(msg);
                     $('li#' + OldPage).removeClass('selected');
                     $('li#' + PageName).addClass('selected');
                     OldPage = PageName;
                   }
                 });
            }        
            
            function RefreshPage(PageName) {
                
                $('.page').css('display', 'none');
                $('.overlay').css('display', 'none');
                $.ajax({
                   type: "POST",
                   url: PageName + ".php<?php if (isset($_GET['uname'])) echo '?uname='.$core->EscapeString($_GET['uname']);?>",
                   success: function(msg){
                     $('.conColumn').html(msg);
                     $('li#' + OldPage).removeClass('selected');
                     $('li#' + PageName).addClass('selected');
                     OldPage = PageName;
                   }
                 });
            }
            
            function NextPage(PageName) {
                var start=<?php echo $start;?>;
                start=start+20;
                $('.page').css('display', 'none');
                $('.overlay').css('display', 'none');
                $.ajax({
                   type: "POST",
                   url: PageName + ".php?start="+start+"<?php if (isset($_GET['uname'])) echo '&uname='.$_GET['uname'];?>",
                   success: function(msg){
                     $('.conColumn').html(msg);
                     $('li#' + OldPage).removeClass('selected');
                     $('li#' + PageName).addClass('selected');
                     OldPage = PageName;
                   }
                 });
            }
            
            function PreviousPage(PageName) {
                var start=<?php echo $start;?>;
                start=start-20;
                $('.page').css('display', 'none');
                $('.overlay').css('display', 'none');
                $.ajax({
                   type: "POST",
                   url: PageName + ".php?start="+start+"<?php if (isset($_GET['uname'])) echo '&uname='.$_GET['uname'];?>",
                   success: function(msg){
                     $('.conColumn').html(msg);
                     $('li#' + OldPage).removeClass('selected');
                     $('li#' + PageName).addClass('selected');
                     OldPage = PageName;
                   }
                 });
            }
            
            function GetUserChat(uname,PageName) {
                $('.page').css('display', 'none');
                $('.overlay').css('display', 'none');
                $.ajax({
                   type: "POST",
                   url: PageName + ".php?uname=" + uname,
                   success: function(msg){
                     $('.conColumn').html(msg);
                     $('li#' + OldPage).removeClass('selected');
                     $('li#' + PageName).addClass('selected');
                     OldPage = PageName;
                   }
                 });
            }
            
            
        </script>
    <div>
        <h1>Command Logs</h1>
        <div class="overlay hidden">
            <div class="page hidden">
                <div class="exitbutton"></div>
                <div class="content">
                </div>
            </div>
        </div>
        <div>        
            <?php while($cmdlogs = @mysql_fetch_array($cmdlogsq)){ ?>
                <div style="padding:2px; cursor:pointer;" onmouseover="this.style.fontWeight='bold';" onmouseout="this.style.fontWeight='normal';">
                <div style="width:150px; float:left"><?php echo @date("d/m/y : H:i:s",$cmdlogs['timestamp']);?></div>
                <div style="width:150px; float:left; cursor:pointer;" onclick="GetUserChat('<?php echo $cmdlogs['user_name'];?>', 'cmdlogs');"><?php echo $cmdlogs['user_name'];?></div>
                <div style="float:left">:<?php echo stripslashes($core->EscapeString($cmdlogs['extra_data'])); ?></div><br>

                </div>
                <?php ?>
                <?php if (isset($_GET['uname'])) {?><button id="refresh" onclick="RefreshPage('cmdlogs');" style="float:left;">Refresh <?php echo $_GET['uname']; ?> </button>&nbsp;&nbsp;&nbsp;<?php }?> 
                <button id="refresh" onclick="LoadPage('cmdlogs');" style="float:left;">Refresh Page</button><br /><br />

                <div >
               <?php $num_rows mysql_num_rows($cmdlogsq);
               if(
    $start>0){ echo '
               <button id="PreviousPage" onclick="PreviousPage(\'cmdlogs\');" style="float:left;"><< Previous Page</button>
               '
    ;}
               if(
    $num_rows>=20){ echo '<button id="NextPage" onclick="NextPage(\'cmdlogs\');" style="float:left;">Next Page >></button>';}?>
               </div>
        </div>
    </div>
    install_cmdlogs.xml
    Code:
    <?xml version="1.0" encoding="utf-8"?>
    <plugin>
    	<name>Command Logs</name>
    	<install_code>mysql_query("ALTER TABLE permissions_ranks ADD hk_cmdlogs enum('1','0') collate utf8_unicode_ci NOT NULL default '0'"); mysql_query("ALTER TABLE permissions_users ADD hk_cmdlogs enum('1','0') collate utf8_unicode_ci NOT NULL default '0'");</install_code>
    	<uninstall_code>mysql_query("ALTER TABLE  permissions_ranks DROP hk_cmdlogs"); mysql_query("ALTER TABLE permissions_users DROP hk_cmdlogs");</uninstall_code>
    	<hk_tab>1</hk_tab>
    	<hk_text>Command Logs</hk_text>
    	<hk_link>cmdlogs</hk_link>
    	<cms_tab>0</cms_tab>
    	<cms_text></cms_text>
    	<cms_link></cms_link>
    </plugin>
    Then go to Plugins in HK and type in on Xml file URL:
    ../install_cmdlogs.xml

    They you have to edit the permission: hk_cmdlogs

    Once you've done that, simply refresh the HK and you will see in the menu "Command Logs".

    If you click on that tab, you'll get the command logs. If you click on someone's name, you will get the command logs of that user.

    Don't forget to like

    - supers242

    Edit:

    Here are some screens:
    http://i40.tinypic.com/14wws2r.png
    http://i39.tinypic.com/2qko60k.png

    Edit 2:
    This is a little edit of the chatlog plugin. Credits to that guy.
    Last edited by supers242; 23-01-12 at 05:57 PM.

  2. HostKey.com: Unmetered Dedicated servers in the Netherlands
  3. #2
    Average Member
    Rank
    Newbie
    Join Date
    Nov 2011
    Location
    Sweden
    Posts
    62
    Liked
    2

    Re: PhoenixPHP Command Logs HK Plugin

    Screens? Its looks nice, but could you post som images of it? :)

  4. #3
    The Omega
    Rank
    Member
    Join Date
    Jul 2009
    Location
    Netherlands
    Posts
    108
    Liked
    35

    Re: PhoenixPHP Command Logs HK Plugin

    Nice, but i still prefer my own cms ;p.

    PhoenixPHP is a little bit sloppy.

  5. #4
    MEHHREKHwhgfkehrkgthregir
    Rank
    Member +
    Join Date
    Sep 2011
    Location
    υηιтє∂
    Posts
    925
    Liked
    303

    Re: PhoenixPHP Command Logs HK Plugin

    This would be heavy on the MySQL server, nice work though >.<

  6. #5
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Nov 2008
    Location
    Manchester, UK
    Posts
    3,264
    Liked
    821

    Re: PhoenixPHP Command Logs HK Plugin

    Quote Originally Posted by ησвяαιη View Post
    This would be heavy on the MySQL server, nice work though >.<
    This hasn't an auto reload paging so only heavy if you sit there pressing F5 every 5 seconds...

  7. #6
    Developer
    Rank
    Member +
    Join Date
    May 2008
    Posts
    482
    Liked
    201

    Re: PhoenixPHP Command Logs HK Plugin

    Even then... 1 query every 5 seconds is peanuts for an MySQL server.

    Anyways, nice little edit of the original chatlog. You should give whoever created the original one some credits in your little notice there, LOL

    Jk
    Posted via Mobile Device

  8. #7
    Member
    Rank
    Newbie
    Join Date
    Feb 2007
    Posts
    36
    Liked
    0

    Re: PhoenixPHP Command Logs HK Plugin

    You didn't even post where you have to create a table in the SQL database called cmdlogs... the install xml and the cmdlogs.php won't work by itself it will only give everyone a blank page

  9. #8
    Delta Subscription
    Rank
    Subscriber
    Join Date
    Nov 2008
    Location
    Manchester, UK
    Posts
    3,264
    Liked
    821

    Re: PhoenixPHP Command Logs HK Plugin

    Quote Originally Posted by INeedAServer View Post
    You didn't even post where you have to create a table in the SQL database called cmdlogs... the install xml and the cmdlogs.php won't work by itself it will only give everyone a blank page
    Obviously this is only for Phoenix 3.7.0, and the SQL for cmdlogs table comes with Phoenix 3.7.0!

  10. #9
    Average Member
    Rank
    Newbie
    Join Date
    Dec 2011
    Location
    Dksv
    Posts
    57
    Liked
    1

    Re: PhoenixPHP Command Logs HK Plugin

    Nice :D

  11. #10
    Programmer
    Rank
    Member +
    Join Date
    Jan 2011
    Location
    home.php
    Posts
    273
    Liked
    72

    Re: PhoenixPHP Command Logs HK Plugin

    Ugh let phoenixphp die its badly coded and most exploitable cms ever

  12. #11
    Azure subscription
    Rank
    Subscriber
    Join Date
    Dec 2011
    Location
    єαятн
    Posts
    1,734
    Liked
    263

    Re: PhoenixPHP Command Logs HK Plugin

    This is nice, and useful for people who use PhoenixPHP. But sadly the CMS is so insecure and slow. :ranger:

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •