<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'function/byte_format.php'; @$smarty->register_modifier('byte', 'byte_format'); $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { if (isset($_POST['ip'], $_POST['host'], $_POST['limit'])) { $sbnc->Call("addvhost", array($_POST['ip'], $_POST['limit'], $_POST['host'])); } if (isset($_GET['del'])) { $sbnc->Call('delvhost', array($_GET['del'])); } $smarty->assign('vhosts', $sbnc->Call('getvhosts')); $smarty->assign('file', 'adm_vhosts.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; } $sbnc->Destroy(); } } header('Location: /login.php', true, 301);
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'class/irctohtml.php'; require_once 'function/duration.php'; $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { $smarty->append('breadcrumb', $lang['menu_index']); $smarty->assign('traffic', $sbnc->Call('gettraffic')); $smarty->assign('nick', $sbnc->Call('getvalue', array('nick'))); $smarty->assign('server', $sbnc->Call('getvalue', array('server'))); $smarty->assign('port', $sbnc->Call('getvalue', array('port'))); $smarty->assign('ssl', $sbnc->Call('getvalue', array('ssl'))); $smarty->assign('ipv6', $sbnc->Call('getvalue', array('ipv6'))); $smarty->assign('uptime', duration($sbnc->Call('getvalue', array('uptime')))); $smarty->assign('channels', $sbnc->Call('getchannels')); $smarty->assign('file', 'index.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; } $sbnc->Destroy(); } } else { header('Location: /login.php', true, 301);
<?php define('sBNC', true); session_start(); require_once 'config.php'; require_once 'class/itype.php'; require_once 'class/sbnc.php'; $smarty->append('breadcrumb', $lang['menu_login']); if (isset($_POST['sbnc_user'], $_POST['sbnc_pass']) && !empty($_POST['sbnc_user']) && !empty($_POST['sbnc_pass'])) { $sbnc = new SBNC(HOST, PORT, $_POST['sbnc_user'], $_POST['sbnc_pass']); if ($sbnc) { $result = @$sbnc->Call('commands'); if ($result != 'RPC_INVALIDUSERPASS') { $_SESSION['sbnc_user'] = $_POST['sbnc_user']; $_SESSION['sbnc_pass'] = $_POST['sbnc_pass']; $_SESSION['sbnc_isloggedin'] = true; if ($sbnc->Call("getvalue", array('admin'))) { $_SESSION['sbnc_isadmin'] = true; } } header('Location: /', true, 301); $sbnc->Destroy(); exit; } } else { $smarty->assign('file', 'login.tpl'); $smarty->display('site.tpl'); }
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'class/irctohtml.php'; $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { $smarty->append('breadcrumb', $lang['menu_settings']); if (isset($_POST['realname'])) { $sbnc->Call('setvalue', array('realname', $_POST['realname'])); } if (isset($_POST['vhost'])) { $sbnc->Call('setvalue', array('vhost', $_POST['vhost'])); } if (isset($_POST['server'])) { $sbnc->Call('setvalue', array('server', $_POST['server'])); } if (isset($_POST['port'])) { $sbnc->Call('setvalue', array('port', $_POST['port'])); } if (isset($_POST['serverpass'])) { $sbnc->Call('setvalue', array('serverpass', $_POST['serverpass'])); } if (isset($_POST['awaynick'])) { $sbnc->Call('setvalue', array('awaynick', $_POST['awaynick'])); }
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'function/byte_format.php'; @$smarty->register_modifier('byte', 'byte_format'); $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { if (isset($_POST['ip'])) { $sbnc->Call('addtrustedip', array($_POST['ip'])); } if (isset($_GET['del'])) { $sbnc->Call('removetrustedip', array($_GET['del'])); } $smarty->assign('trustedips', $sbnc->Call('gettrustedips')); $smarty->assign('file', 'adm_trustedips.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; } $sbnc->Destroy(); } } header('Location: /login.php', true, 301);
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'class/irctohtml.php'; $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call('commands') != 'RPC_INVALIDUSERPASS') { $smarty->append('breadcrumb', $lang['menu_log']); if (isset($_POST['erase'])) { $sbnc->Call('erasemainlog'); $smarty->assign('deleted', true); } $log = $sbnc->Call('getmainlog', array('0', 'end')); $irc2html = new IRCtoHTML(''); if (is_array($log)) { foreach ($log as $line) { $irc2html->IRCtoHTML(utf8_decode($line)); $line = $irc2html->getHTML(); $smarty->append('log', $line); } } $smarty->assign('file', 'log.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; }
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'function/byte_format.php'; @$smarty->register_modifier('byte', 'byte_format'); $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { $traffic = $sbnc->Call("gettraffic"); $smarty->append('breadcrumb', $lang['menu_traffic']); $smarty->assign('traffic', $traffic); $smarty->assign('file', 'traffic.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; } $sbnc->Destroy(); } } header('Location: /login.php', true, 301);
<?php define('sBNC', true); session_start(); require_once 'config.php'; if (isset($_SESSION['sbnc_isloggedin'], $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']) && $_SESSION['sbnc_isloggedin']) { require_once 'class/itype.php'; require_once 'class/sbnc.php'; require_once 'class/irctohtml.php'; $sbnc = new SBNC(HOST, PORT, $_SESSION['sbnc_user'], $_SESSION['sbnc_pass']); if ($sbnc) { if ($sbnc->Call("commands") != 'RPC_INVALIDUSERPASS') { $smarty->append('breadcrumb', $lang['menu_log']); if (isset($_POST['erase'])) { $sbnc->Call("eraselog"); $smarty->assign('deleted', true); } $log = $sbnc->Call("getlog", array("0", "end")); $irc2html = new IRCtoHTML(''); if (is_array($log)) { foreach ($log as $line) { $irc2html->IRCtoHTML(utf8_decode($line)); $line = $irc2html->getHTML(); $smarty->append('log', $line); } } $smarty->assign('file', 'log.tpl'); $smarty->display('site.tpl'); $sbnc->Destroy(); exit; }