SHARE
TWEET

function already_connected (in /etc/inc/captiveportal.inc)

Nowwhat47 Jan 21st, 2015 (edited) 389 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function already_connected($sessionid)
  2. {
  3.         global $g, $config, $cpzone;
  4.         if ($sessionid != "")   {
  5.                 $query = "WHERE sessionid = '{$sessionid}'";
  6.                 $cpdb = captiveportal_read_db($query);
  7.                 foreach ($cpdb as $cpentry) {
  8.                         if ($cpentry[5] == $sessionid) {
  9.                                 captiveportal_logportalauth($cpentry[4], $sessionid, $cpentry[2], "Found sessionid");
  10.                                 return true;
  11.                         }
  12.                 }
  13.         }
  14.         return false;
  15. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top