How to Change Logos in Radius Manager


Changing Logo in Radius Manager
Path Details
Ubuntu
/var/www/radiusmanager/images
CentOS
/var/www/html/radiusmanager/images

Image Files are Below
radmanlogo_small.gif
main1_01.gif
main1_02.gif
main1_03.gif

Copy Your Company Logo to radmanlogo_small.gif & main1_01.gif
cp Your Company Logo radmanlogo_small.gif
cp Your Company Logo main1_01.gif

Re-Starting Web Service
Ubuntu
sudo service apache2 restart
CentOS
/etc/init.d/httpd restart

Check Your DMA Radius Admin Page
http://IP-Address/radiusmanager/admin.php

Advertisements

Deleting Old Years Users Data Script


#!/bin/bash

SET @year = “2013”;

Create Temporary radacct Table
CREATE TABLE radacct2 (
username varchar(64) NOT NULL default ”,
acctsessiontime int(12) default NULL,
acctinputoctets bigint(20) default NULL,
acctoutputoctets bigint(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Cumulate Datas From Previous Years From Radacct(radacct2)
SET @yearlike = CONCAT(@year, “%”);
SET @cumuldatetime = CONCAT(@year, “-12-31 23:59:59”);

INSERT INTO radacct2 (username, acctsessiontime, acctinputoctets, acctoutputoctets)
SELECT username, SUM(acctsessiontime), SUM(acctinputoctets), SUM(acctoutputoctets)
FROM radacct
WHERE acctstarttime LIKE @yearlike
GROUP BY username;

Delete all Data From radacct Specified Year
DELETE FROM radacct WHERE acctstarttime LIKE @yearlike;

Create Temporary rm_radacct Table
CREATE TABLE rm_radacct2 (
username varchar(64) NOT NULL default ”,
acctsessiontime int(12) default NULL,
ulbytes bigint(20) default NULL,
dlbytes bigint(20) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Cumulate Datas From Previous Years From rm_radacct(rm_radacct2)
SET @yearlike = CONCAT(@year, “%”);
SET @cumuldatetime = CONCAT(@year, “-12-31 23:59:59”);

INSERT INTO rm_radacct2 (username, acctsessiontime, ulbytes, dlbytes)
SELECT username, SUM(acctsessiontime), SUM(ulbytes), SUM(dlbytes)
FROM rm_radacct
WHERE acctstarttime LIKE @yearlike
GROUP BY username;

Delete all Data From rm_radacct Specified Year
DELETE FROM rm_radacct WHERE acctstarttime LIKE @yearlike;

Substract Deleted Values (radacct2) From radacct
UPDATE rm_users, radacct2
SET rm_users.uptimelimit = rm_users.uptimelimit – radacct2.acctsessiontime,
rm_users.uplimit     = rm_users.uplimit     – radacct2.acctinputoctets,
rm_users.downlimit   = rm_users.downlimit   – radacct2.acctoutputoctets,
rm_users.comblimit   = rm_users.comblimit   – radacct2.acctoutputoctets – radacct2.acctinputoctets
WHERE rm_users.username = radacct2.username;

Substract Deleted Values (rm_radacct2) From radacct
UPDATE rm_users, rm_radacct2
SET rm_users.uptimelimit = rm_users.uptimelimit + rm_radacct2.acctsessiontime,
rm_users.uplimit     = rm_users.uplimit     + rm_radacct2.ulbytes,
rm_users.downlimit   = rm_users.downlimit   + rm_radacct2.dlbytes,
rm_users.comblimit   = rm_users.comblimit   + rm_radacct2.dlbytes + rm_radacct2.ulbytes
WHERE rm_users.username = rm_radacct2.username;

Drop Temporary Table
DROP TABLE radacct2;
DROP TABLE rm_radacct2;

Adding Search Button in Radius Manager


Add Code Below “<td>{CONTENT} </td>”

&nbsp;<table border=”1″ width=”100%”>
<tr>
<td><table width=”100%” border=”0″ cellpadding=”5″ cellspacing=”0″ class=”tb-bg”>
<tr>
<td><form name=”form2″ method=”post” action=”admin.php?cont=list_users”>
<p class=”title2″><font color=”#000000″> User Search Database </font></p>
<table border=”0″ align=”center” cellpadding=”2″ cellspacing=”2″ width=”441″>
<tr>
<td nowrap class=”normal” width=”112″>

</td>
<td class=”normal”>&nbsp;<input name=”username” type=”text” class=”normal” id=”username” size=”29″ maxlength=”32″></td>
</tr>
</table>
<p align=”center”>
<input type=”submit” name=”Submit2″ value=”{FNDUSR23}”>
</p>
</form> </td>
</tr>
</table></td>

Check Your Search Button
http://IP-Address/radiusmanager/admin.php

search button