Advertisement
Nowwhat47

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

Jan 21st, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.39 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement