[solved]Need help about TSN RankSystem.

xator

Member
May 3, 2016
58
30
53
dBj7Gev.png

so i just done editing TSNRanksystem, and now i have no idea why this one is not changing like the original version, anyone have idea what must i do? anyone can help me so this one work like the original version? this holder should changing into our name that we use on ts server and ofc we must connected to the server, i tried many times edit this and still not working :confused:.


-sorry about my terrible language :(
 

xator

Member
May 3, 2016
58
30
53
oh one more, the script also same like the original one
PHP:
            <ul class="nav navbar-right top-nav">
                <?PHP
                $lastscan = $mysqlcon->query("SELECT * FROM $dbname.job_check WHERE job_name='calc_user_lastscan'");
                $lastscan = $lastscan->fetchAll();
                if((time() - $lastscan[0]['timestamp']) > 600) { ?>
                <li class="navbar-form navbar-left">
                    <span class="label label-warning"><?PHP echo $lang['stnv0027']; ?></span>
                </li>
                <?PHP } ?>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><?PHP echo '&nbsp;&nbsp;' .($_SESSION['connected'] == 0 ? $lang['stnv0028'] : $_SESSION['tsname']); ?>&nbsp;<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <?PHP echo (!isset($_SESSION['tsname']) ? ' ' : '<li><a href="my_stats.php"><i class="fa fa-fw fa-user"></i>&nbsp;'.$lang['stmy0001'].'</a></li>'); ?>
                        <li>
                            <a href="#myModal" data-toggle="modal"><i class="fa fa-fw fa-envelope"></i>&nbsp;<?PHP echo $lang['stnv0001']; ?></a>
                        </li>
                    </ul>
                </li>
                <li>
                    <div class="navbar-form navbar-center">
                        <div class="btn-group">
                            <a href="#myModal2" data-toggle="modal" class="btn btn-primary">
                                <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
                            </a>
                        </div>
                    </div>
                </li>
               
            </ul>
            <!-- Sidebar Menu Items - These collapse to the responsive navigation menu on small screens -->
            <div class="collapse navbar-collapse navbar-ex1-collapse">
                <ul class="nav navbar-nav side-nav">
                    <?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "index.php" ? ' class="active">' : '>'); ?>
                        <a href="index.php"><i class="fa fa-fw fa-area-chart"></i>&nbsp;<?PHP echo $lang['stix0001']; ?></a>
                    </li>
                    <?PHP echo '<li'.(basename($_SERVER['SCRIPT_NAME']) == "my_stats.php" ? ' class="active">' : '>'); ?>
                        <?PHP if($_SESSION['connected'] == 0) {
                            echo '<a href="#myStatsModal" data-toggle="modal"><i class="fa fa-fw fa-exclamation-triangle"></i>&nbsp;*',$lang['stmy0001'],'</a>';
                        } else {
                            echo '<a href="my_stats.php"><i class="fa fa-fw fa-bar-chart-o"></i>&nbsp;',$lang['stmy0001'],'</a>';
                        }?>
                    </li>
PHP:
                <?PHP
                $lastscan = $mysqlcon->query("SELECT * FROM $dbname.job_check WHERE job_name='calc_user_lastscan'");
                $lastscan = $lastscan->fetchAll();
                if((time() - $lastscan[0]['timestamp']) > 600) { ?>
                <li class="navbar-form navbar-left">
                    <span class="label label-warning"><?PHP echo $lang['stnv0027']; ?></span>
                </li>
                <?PHP } ?>
                   
                </ul>
                <ul class="nav navbar-nav navbar-right">
                   <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user"></i><?PHP echo '&nbsp;&nbsp;' .($_SESSION['connected'] == 0 ? $lang['stnv0028'] : $_SESSION['tsname']); ?>&nbsp;<b class="caret"></b></a>
                    <ul class="dropdown-menu">
                        <?PHP echo (!isset($_SESSION['tsname']) ? ' ' : '<li><a href="my_stats.php"><i class="fa fa-fw fa-user"></i>&nbsp;'.$lang['stmy0001'].'</a></li>'); ?>
                        <li>
                            <a href="#serverstatsModal" data-toggle="modal"><i class="fa fa-fw fa-envelope"></i>&nbsp;<?PHP echo $lang['stnv0001']; ?></a>
                        </li>
                    </ul>
                </li>
                    <li>
                    <div class="navbar-form navbar-center">
                        <div class="btn-group">
                            <a href="#refresh" data-toggle="modal" class="btn btn-primary">
                                <span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
                            </a>
                        </div>
                    </div>
                </li>
                   
            </ul>
            </div>
            <!-- /.navbar-collapse -->
        </div>
        <!-- /.container-fluid -->
    </nav>
 

xator

Member
May 3, 2016
58
30
53
and also, when i replace the new nav with the old one, the result still same, i do many editing to the script TSNRanksystem, and i think this problem not came from nav, but the other file that handle session tsname, anyone ? :(
 

xator

Member
May 3, 2016
58
30
53
you should post how you fixed it for other members
forgot to add session file :D
i add this line in nav.php file
PHP:
require_once('other/session.php');
and this line
PHP:
if(!isset($_SESSION['tsname'])) {
    $hpclientip = ip2long($_SERVER['REMOTE_ADDR']);
    set_session_ts3($hpclientip, $ts['voice'], $mysqlcon, $dbname);
}

and now all works great :oops:
 
Top