public function checkSession($username) { $link = new link(); $con = $link->connect(); if (!isset($_SESSION['user'])) { return "Session expired"; $session_state = 0; } else { $user_active_session = $_SESSION['user']; $character_get = $_GET['character']; $check_char_belong_session = mysqli_query($con, "SELECT * FROM v_user_characters\n WHERE username = '******' AND character_eve_idcharacter = '{$character_get}'") or die(mysqli_error($con)); if (mysqli_num_rows($check_char_belong_session) == 0) { $session_state = 0; echo "Sneaky sneaky"; //exit(); } else { $session_state = 1; } } }
<?php require_once 'tax.php'; require_once 'link.php'; $stationFromID = 60003760; $stationToID = 60008494; $link = new link(); $con = $link->connect(); $character_get = 95060857; $transFrom = "buy"; $transTo = "sell"; $taxcalc = new tax($stationFromID, $stationToID, $con, $character_get, $transFrom, $transTo); /* echo ($taxcalc->getCorpOwnerIDFromStation()); echo ($taxcalc->getCorpOwnerIDToStation()); echo ($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation())); echo ($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation())); echo $taxcalc->getFromCorpStanding($taxcalc->getCorpOwnerIDFromStation()); echo $taxcalc->getToCorpStanding($taxcalc->getCorpOwnerIDToStation()); echo ($taxcalc->getFromFactionStanding($taxcalc->getFactionOwnerIDFromStation($taxcalc->getCorpOwnerIDFromStation()))); echo ($taxcalc->getToFactionStanding($taxcalc->getFactionOwnerIDToStation($taxcalc->getCorpOwnerIDToStation()))); echo $taxcalc->getBrokerLevel(); echo $taxcalc->getAccountingLevel();*/ echo $taxcalc->calculateBrokerFrom();