function GetMinmatarTowers() { $dbconn =& DBGetConn(true); $sql = "SELECT *\n FROM " . TBL_PREFIX . "tower_info\n WHERE pos_race = '4'"; $result = $dbconn->Execute($sql); if ($dbconn->ErrorNo() != 0) { Eve::SessionSetVar('errormsg', $dbconn->ErrorMsg() . $sql); return false; } for (; !$result->EOF; $result->MoveNext()) { $rows[] = $result->GetRowAssoc(2); } $result->Close(); return $rows; }
function AddNewMoonMaterial($args) { if (!$args) { Eve::SessionSetVar('errormsg', 'No Arguments!'); return false; } $userinfo = POSMGMT::GetUserInfo(); $characterID = $userinfo['eve_id']; $dbconn =& DBGetConn(true); $sql = "INSERT INTO " . TBL_PREFIX . "moonmaterials (moonID,\n material_id,\n abundance,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t notes,\n taken,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t characterID,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t datetime)\n VALUES ('" . Eve::VarPrepForStore($args['moonID']) . "',\n '" . Eve::VarPrepForStore($args['material_id']) . "',\n '" . Eve::VarPrepForStore($args['abundance']) . "',\n '" . Eve::VarPrepForStore($args['notes']) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t '" . Eve::VarPrepForStore($args['taken']) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t '" . Eve::VarPrepForStore($characterID) . "',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t '" . Eve::VarPrepForStore(time()) . "')"; $dbconn->Execute($sql); if ($dbconn->ErrorNo() != 0) { Eve::SessionSetVar('errormsg', $dbconn->ErrorMsg() . $sql); return false; } return true; }
function MoonDB_uninstall() { global $posmgmt; $tables = array(TBL_PREFIX . 'moonmaterials'); $values = array('test', 'test1', 'test2'); $dbconn =& DBGetConn(true); foreach ($tables as $table) { $dbconn->Execute("DROP TABLE IF EXISTS " . $table); if ($dbconn->ErrorNo() != 0) { Eve::SessionSetVar('errormsg', "Problem with table: " . $table); return false; } } foreach ($values as $value) { $posmgmt->ModuleDelVar('MoonDB', $value); } return 0; }
function API_Connect2($url, $conntype = 'POST') { if (!$url) { Eve::SessionSetVar('errormsg', 'NO URL'); return false; } $data = array(); $extensions = get_loaded_extensions(); $curl = in_array('curl', $extensions); if ($curl) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); if ($data) { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); } $content = curl_exec($ch); curl_close($ch); } //Create XML Parser try { $xml = new SimpleXMLElement($content); } catch (Exception $e) { Eve::SessionSetVar('errormsg', 'Error: ' . $e->getMessage()); return false; } foreach ($xml->xpath('//error') as $error) { Eve::SessionSetVar('errormsg', 'Error Code: ' . $error['code'] . '::' . $error); return false; //$fail = 1; } return $xml; }
include_once 'includes/eveRender.class.php'; include_once 'eveconfig/config.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $pID = 'register'; $eveRender->Assign('pID', $pID); $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $userinfo = $eve->GetUserVars(); $action = $eve->VarCleanFromInput('action'); $api_userid = $eve->VarCleanFromInput('api_userid'); $api_key = $eve->VarCleanFromInput('api_key'); if ($action == 'getchars') { if (empty($api_key) || empty($api_userid)) { $eve->SessionSetVar('errormsg', 'Missing API Information!'); $eve->RedirectUrl('register.php'); } $characters = $posmgmt->API_GetCharacters($api_userid, $api_key); if (!$characters) { $eve->SessionSetVar('errormsg', 'API ERROR or No Character on provided API Information!'); $eve->RedirectUrl('register.php'); } foreach ($characters as $key => $char) { $apicorp = $posmgmt->API_GetCorpInfo($char['corporationID']); $characters[$key]['alliance'] = $apicorp; } //echo '<pre>';print_r($characters);echo '</pre>';exit; $eveRender->Assign('action', $action); $eveRender->Assign('api_userid', $api_userid); $eveRender->Assign('api_key', $api_key);
$eveRender = new eveRender($config, $mod, false); $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $userinfo = $posmgmt->GetUserInfo(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('5', $access) && !in_array('6', $access) && !in_array('83', $access)) { $eve->RedirectUrl('track.php'); } $pos_id = $eve->VarCleanFromInput('i'); if (!$pos_id) { $eve->SessionSetVar('errormsg', 'Need an ID!'); $eve->RedirectUrl('index.php'); } $pos = $posmgmt->GetTowerInfo($pos_id); $arrposize = array(1 => 'Small', 2 => 'Medium', 3 => 'Large'); $arrporace = array(1 => 'Amarr CT', 2 => 'Caldari CT', 3 => 'Gallente CT', 4 => 'Minmatar CT', 5 => 'Angel CT', 6 => 'Blood CT', 7 => 'Dark Blood CT', 8 => 'Domination CT', 9 => 'Dread Guristas CT', 10 => 'Guristas CT', 11 => 'Sansha CT', 12 => 'Serpentis CT', 13 => 'Shadow CT', 14 => 'True Sansha CT'); $pos['pos_type_name'] = $arrporace[$pos['pos_race']]; $pos['pos_size_name'] = $arrposize[$pos['pos_size']]; //echo '<pre>';print_r($pos); echo '</pre>';exit; if (!$pos) { $eve->SessionSetVar('errormsg', 'That POS apparently does not exist!'); $eve->RedirectUrl('track.php'); } $action = $eve->VarCleanFromInput('action'); if ($action == 'deletepos') { if (in_array('5', $access) || in_array('6', $access) || in_array('83', $access) && ($pos['owner_id'] == $userinfo['eve_id'] || $pos['secondary_owner_id'] == $userinfo['eve_id'])) {
$eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $access = $eve->SessionGetVar('access'); $theme_id = $eve->SessionGetVar('theme_id'); $pID = 'login'; $eveRender->Assign('pID', $pID); $action = $eve->VarCleanFromInput('action'); $eveRender->Assign('access', $access); if ($action == 'Login') { $name = $eve->VarCleanFromInput('name'); $pass = $eve->VarCleanFromInput('pass'); if (empty($name) || empty($pass)) { $eve->SessionSetVar('errormsg', 'Please fill the form properly!'); $eve->RedirectUrl('login.php'); } $user = $posmgmt->LogUser(array('name' => $name, 'pass' => $pass)); if ($user) { $eve->SessionSetVar('statusmsg', 'Welcome ' . $user['name']); $eve->RedirectURL('track.php'); } else { $eve->SessionSetVar('statusmsg', 'Wrong Login or Pass!'); $eve->RedirectURL('login.php'); } } if ($eve->IsMiniBrowser()) { if (!$eve->IsTrusted()) { $eve->RequestTrust('You must add this site to your trusted list to log in in-game!'); } else {
* LICENSE: This file is part of POS-Tracker2. * POS-Tracker2 is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 3 of the License. * * POS-Tracker2 is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with POS-Tracker2. If not, see <http://www.gnu.org/licenses/>. * * @author Stephen Gulickk <*****@*****.**> * @author DeTox MinRohim <*****@*****.**> * @author Andy Snowden <*****@*****.**> * @copyright 2007-2009 (C) Stephen Gulick, DeTox MinRohim, and Andy Snowden * @license http://www.gnu.org/licenses/gpl-3.0.html GPL 3.0 * @package POS-Tracker2 * @version SVN: $Id$ * @link https://sourceforge.net/projects/pos-tracker2/ * @link http://www.eve-online.com/ */ include_once 'eveconfig/config.php'; include_once 'includes/eveclass.php'; $eve = new Eve(); session_start(); session_unset(); session_destroy(); $eve->SessionSetVar('statusmsg', 'Bye Bye! :)'); $eve->RedirectUrl('index.php');
* * You should have received a copy of the GNU General Public License * along with POS-Tracker2. If not, see <http://www.gnu.org/licenses/>. * * @author Stephen Gulickk <*****@*****.**> * @author DeTox MinRohim <*****@*****.**> * @author Andy Snowden <*****@*****.**> * @copyright 2007-2009 (C) Stephen Gulick, DeTox MinRohim, and Andy Snowden * @license http://www.gnu.org/licenses/gpl-3.0.html GPL 3.0 * @package POS-Tracker2 * @version SVN: $Id$ * @link https://sourceforge.net/projects/pos-tracker2/ * @link http://www.eve-online.com/ */ include_once 'eveconfig/config.php'; include_once 'includes/eveclass.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eve = new Eve(); $access = $eve->SessionGetVar('access'); $eveRender->Assign('access', $access); $eveRender->Assign('config', $config); if (isset($access)) { $eve->SessionSetVar('errormsg', 'Welcome to the POS Tracker!'); $eve->RedirectUrl('track.php'); } else { $eve->SessionSetVar('errormsg', 'Welcome to the POS Tracker!'); $eve->RedirectUrl('login.php'); //$eveRender->Display('home.tpl'); }
*/ include_once 'eveconfig/config.php'; include_once 'includes/dbfunctions.php'; EveDBInit(); include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; include_once 'includes/class.posmailer.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eve = new Eve(); $posmgmt = new POSMGMT(); $mail = new posMailer(); $mail->mailinit(); $userinfo = $posmgmt->GetUserInfo(); $eve->SessionSetVar('userlogged', 1); $access = 5; $eve->SessionSetVar('access', $access); $eveRender->Assign('access', $access); $args['pr'] = 2; $rows = $posmgmt->GetAllPos2($args); foreach ($rows as $key => $row) { $row2 = $posmgmt->GetLastPosUpdate($row['pos_id']); $tower = $posmgmt->GetTowerInfo($row['pos_id']); if ($tower) { $tower['current_cpu'] = $tower['cpu']; $tower['current_pg'] = $tower['powergrid']; } $charters_needed = $tower['charters_needed']; $pos_size = $row['pos_size']; $pos_race = $row['pos_race'];
include_once 'includes/eveRender.class.php'; include_once 'version.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eveRender->Assign('config', $config); $eveRender->Assign('version', VERSION); $eve = new Eve(); $posmgmt = new POSMGMT(); $API = new API(); $userinfo = $posmgmt->GetUserInfo(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $pID = 'admin'; $eveRender->Assign('pID', $pID); if (!$userinfo || $userinfo['access'] != 5 && $userinfo['access'] != 6) { $eve->SessionSetVar('errormsg', 'Admin Access Level Required - Please login!'); $eve->RedirectUrl('login.php'); } else { $access = explode('.', $userinfo['access']); $eveRender->Assign('access', $access); } $file_check = 'install.php'; $installchecker = file_exists($file_check) ? true : false; $eveRender->Assign('installchecker', $installchecker); $op = $eve->VarCleanFromInput('op'); if ($op == 'modules') { $posmgmt->ModuleLoadVars(); $func = $eve->VarCleanFromInput('func'); if ($func == 'install' || $func == 'uninstall') { $modname = $eve->VarCleanFromInput('modname'); if (file_exists('mods/' . $modname . '/install.php')) {
include_once 'includes/dbfunctions.php'; EveDBInit(); include_once 'includes/eveclass.php'; include 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('60', $access) && !in_array(61, $access) && !in_array('5', $access) && !in_array('6', $access)) { $eve->SessionSetVar('errormsg', 'Access Denied - Redirecting you back!'); $eve->RedirectUrl('outpost.php'); } $outpost_id = $eve->VarCleanFromInput('i'); // Dirty fix if (empty($outpost_id)) { $outpost_id = $eve->VarCleanFromInput('outpost_id'); } if (empty($outpost_id)) { $eve->SessionSetVar('errormsg', 'No Outpost ID!'); $eve->RedirectUrl('track.php'); } if (!is_numeric($outpost_id)) { $eve->SessionSetVar('errormsg', 'Incorrect Outpost ID!'); $eve->RedirectUrl('track.php'); }
$eveRender->Assign('userinfo', $userinfo); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('5', $access) && !in_array('6', $access) && !in_array('83', $access)) { $eve->RedirectUrl('track.php'); } $eveRender->Assign('step', $step); $action = $eve->VarCleanFromInput('action'); if ($step == 2) { // Select Constellation $regionID = $eve->VarCleanFromInput('regionID'); if (!$regionID) { $eve->SessionSetVar('errormsg', 'No Regions selected!'); $eve->RedirectUrl('addpos.php'); } $constellations = $posmgmt->GetConstellationInfo($regionID); foreach ($constellations as $constellationID => $constellation) { $arrconstellation[$constellationID] = $constellation['constellationName']; } $eveRender->Assign('regionID', $regionID); $eveRender->Assign('arrconstellation', $arrconstellation); $eveRender->Display('addpos.tpl'); exit; } elseif ($step == 3) { $constellationID = $eve->VarCleanFromInput('constellationID'); if (!$constellationID) { $eve->SessionSetVar('errormsg', 'No Constellations selected!'); $eve->RedirectUrl('addpos.php');
* @link https://sourceforge.net/projects/pos-tracker2/ * @link http://www.eve-online.com/ */ include_once 'eveconfig/config.php'; include_once 'includes/dbfunctions.php'; EveDBInit(); include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; include_once 'eveconfig/config.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; //echo '<pre>';print_r($_SESSION); echo '</pre>';exit; $eve = new Eve(); $posmgmt = new POSMGMT(); $eve->SessionSetVar('userlogged', 1); $userinfo = $posmgmt->GetUserInfo(); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); $eveRender->Assign('config', $config); if (empty($pos_id)) { $pos_id = $eve->VarCleanFromInput('pos_id'); } $xmlstyle = $eve->VarCleanFromInput('xmlstyle'); $mods = $posmgmt->GetAllPosMods($pos_id); if ($mods) { //if (mysql_num_rows($result) != 0) { //Set Header to XML header("Pragma: public"); header("Expires: 0");
$posmgmt = new POSMGMT(); $userinfo = $posmgmt->GetUserInfo(); $eveRender->Assign('userinfo', $userinfo); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('1', $access) && !in_array('5', $access) && !in_array('6', $access)) { $eve->RedirectUrl('track.php'); } $pos_id = $eve->VarCleanFromInput('i'); if (empty($pos_id)) { $pos_id = $eve->VarCleanFromInput('pos_id'); if (empty($pos_id)) { $eve->SessionSetVar('errormsg', 'No ID defined!'); $eve->RedirectUrl('track.php'); } } $structs = $posmgmt->GetAllStaticStructures2(); $action = $eve->VarCleanFromInput('action'); if ($action == 'Done') { $dbconn =& DBGetConn(true); foreach ($structs as $struct) { $structvalue = $eve->VarCleanFromInput('s_id' . $struct['id']); if ($structvalue != 0) { for ($x = 1; $x <= $structvalue; $x++) { $structures[] = $struct['id']; } } }
* @package POS-Tracker2 * @version SVN: $Id: viewpos.php 237 2012-01-28 05:26:03Z frozenice2525 $ * @link http://code.google.com/p/pos-tracker-eve/ * @link http://www.eve-online.com/ */ include_once 'eveconfig/config.php'; include_once 'includes/dbfunctions.php'; EveDBInit(); include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eve = new Eve(); $posmgmt = new POSMGMT(); $eve->SessionSetVar('userlogged', 1); $userinfo = $posmgmt->GetUserInfo(); $eve_id = $eve->SessionGetVar('eve_id'); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $eveRender->Assign('config', $config); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (in_array('1', $access) || in_array('5', $access) || in_array('6', $access)) { $pos_id = $eve->VarCleanFromInput('i'); if (!empty($pos_id)) { $tower = $posmgmt->GetTowerInfo($pos_id); //if ($row = mysql_fetch_array($result)) { if ($tower) { $current_fuelblock = $tower['fuelblock'];
$eveRender->Assign('fuel_oxygen', $fuel_oxygen); $eveRender->Assign('fuel_uranium', $fuel_uranium); $eveRender->Assign('fuel_mechanical_parts', $fuel_mechanical_parts); $eveRender->Assign('fuel_coolant', $fuel_coolant); $eveRender->Assign('fuel_robotics', $fuel_robotics); $eveRender->Assign('fuel_ozone', $fuel_ozone); $eveRender->Assign('fuel_heavy_water', $fuel_heavy_water); $eveRender->Assign('total_size', $total_size); $eveRender->Assign('fuel_A_total_size', $fuel_A_total_size); $eveRender->Assign('fuel_C_total_size', $fuel_C_total_size); $eveRender->Assign('fuel_G_total_size', $fuel_G_total_size); $eveRender->Assign('fuel_M_total_size', $fuel_M_total_size); $eveRender->Assign('fuel_A_total', $fuel_A_total); $eveRender->Assign('fuel_C_total', $fuel_C_total); $eveRender->Assign('fuel_G_total', $fuel_G_total); $eveRender->Assign('fuel_M_total', $fuel_M_total); $eveRender->Assign('fuel_time', $fuel_time); $eveRender->Assign('amarrFB_cost', $amarrFB_cost); $eveRender->Assign('caldariFB_cost', $caldariFB_cost); $eveRender->Assign('gallenteFB_cost', $gallenteFB_cost); $eveRender->Assign('minmatarFB_cost', $minmatarFB_cost); $eveRender->Assign('charter_total_size', $charter_total_size); $eveRender->Assign('charter_total', $charter_total); $eveRender->Assign('fb_total_size', $fb_total_size); $eveRender->Assign('towers', $disp_towers); $eveRender->Assign('towerName', $towerName); $eveRender->Display('fuelbill.tpl'); } else { $eve->SessionSetVar('errormsg', 'Access Denied - Redirecting you back!'); $eve->RedirectUrl('track.php'); }
include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $colors = $eveRender->themeconfig; $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); //$userinfo = $posmgmt->GetUserInfo(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('5', $access)) { $eve->SessionSetVar('errormsg', 'Admin Not Logged In!'); $eve->RedirectUrl('login.php'); } $upgradeList = array(333 => 'FG Update for Tyrannis', 501 => 'v5.0.1 - Material Volume Fix', 502 => 'v5.0.2 - Theme Install', 511 => 'v5.1.1 - Incursion DB & Corp Jobs Install', 512 => 'v5.1.2 - Prices & Ship Assembly Array Fix', 514 => 'v5.1.4 - User & Global Settings Update', 517 => 'v5.1.7 - Hyasyoda ML & Wormhole Update', 520 => 'v5.2.0 - Fuel Block Support'); $eveRender->Assign('upgradeList', $upgradeList); $step = $eve->VarCleanFromInput('step'); $step = empty($step) ? $step = 1 : $step; if ($step <= 1) { $install = false; } $upgrade = $eve->VarCleanFromInput('upgrade'); if ($step == 1) { $eveRender->Assign('step', $step); } if ($step == 2) { $dbconn =& DBGetConn(true);
include 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $userinfo = $posmgmt->GetUserInfo(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $pID = 'outpost'; $eveRender->Assign('pID', $pID); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('1', $access) && !in_array('5', $access) && !in_array('6', $access)) { $eve->SessionSetVar('errormsg', 'Access Denied - Redirecting you back!'); $eve->RedirectUrl('outpost.php'); } $action = $eve->VarCleanFromInput('action'); switch ($action) { case 'Add Outpost': $fuel['corp'] = $userinfo['corp']; $fuel['outpost_name'] = $eve->VarCleanFromInput('outpostName'); $fuel['uranium'] = $eve->VarCleanFromInput('uranium'); $fuel['oxygen'] = $eve->VarCleanFromInput('oxygen'); $fuel['mechanical_parts'] = $eve->VarCleanFromInput('mechanical_parts'); $fuel['coolant'] = $eve->VarCleanFromInput('coolant'); $fuel['robotics'] = $eve->VarCleanFromInput('robotics'); $fuel['heisotope'] = $eve->VarCleanFromInput('heisotope'); $fuel['hyisotope'] = $eve->VarCleanFromInput('hyisotope'); $fuel['oxisotope'] = $eve->VarCleanFromInput('oxisotope');
$userinfo = $posmgmt->GetUserInfo(); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('1', $access) && !in_array('5', $access) && !in_array('6', $access)) { $eve->RedirectUrl('login.php'); } $pos_id = $eve->VarCleanFromInput('i'); // Dirty fix if (empty($pos_id)) { $pos_id = $eve->VarCleanFromInput('pos_id'); } if (empty($pos_id)) { $eve->SessionSetVar('errormsg', 'No POS ID!'); $eve->RedirectUrl('track.php'); } $action = $eve->VarCleanFromInput('action'); switch ($action) { case 'Change Tower Information': $newstatus = $eve->VarCleanFromInput('newstatus'); $new_tower_name = $eve->VarCleanFromInput('new_tower_name'); $new_outpost_id = $eve->VarCleanFromInput('outpostlist'); $new_pg = $eve->VarCleanFromInput('new_pg'); $new_cpu = $eve->VarCleanFromInput('new_cpu'); if (!is_numeric($new_pg) || $new_pg < 0) { $new_pg = 0; } if (!is_numeric($new_cpu) || $new_cpu < 0) { $new_cpu = 0;
<?php include_once 'eveconfig/config.php'; include_once 'includes/dbfunctions.php'; EveDBInit(); include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, '', false); $eve = new Eve(); $posmgmt = new POSMGMT(); $userinfo = $posmgmt->GetUserInfo(); $eve->SessionSetVar('userlogged', 1); $eveRender->Assign('name', $userinfo['name']); $eveRender->Assign('corp', $userinfo['corp']); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); $theme_id = $eve->SessionGetVar('theme_id'); $eveRender->Assign('theme_id', $theme_id); $pID = 'track'; $eveRender->Assign('pID', $pID); include_once 'themes/posmanager/style/theme' . $theme_id . '.php'; $user_track = explode('.', $userinfo['user_track']); if (in_array('1', $access) || in_array('5', $access) || in_array('6', $access)) { //sets current time $time = time(); //pulls time out of database for last update $pulltime = $posmgmt->GetLastSystemUpdate(); $sovtime = $posmgmt->get_formatted_timediff($pulltime, $now = false); //gives a difference value for the warning message
include_once 'includes/eveclass.php'; include_once 'includes/class.pos.php'; include_once 'includes/eveRender.class.php'; $eveRender = new eveRender($config, $mod, false); $eveRender->Assign('config', $config); $pID = 'user'; $eveRender->Assign('pID', $pID); $eve = new Eve(); $posmgmt = new POSMGMT(); $userinfo = $posmgmt->GetUserInfo(); if (!$userinfo) { $eve->RedirectUrl('register.php'); } $IS_IGB = $eve->IsMiniBrowser(); if (!$userinfo['access'] || in_array('-1', $access)) { $eve->SessionSetVar('errormsg', 'You don\'t have access to this tracker!'); $eve->RedirectUrl('index.php'); } $action = $eve->VarCleanFromInput('action'); if ($action == 'changeinfo') { $theme_id = $eve->VarCleanFromInput('theme_id'); $user_track_display = $eve->VarCleanFromInput('user_track_display'); $user_track_sort = $eve->VarCleanFromInput('user_track_sort'); $trackArray = array($user_track_display, $user_track_sort); $user_track = implode(".", array_filter($trackArray)); $away = $eve->VarCleanFromInput('away'); $email = $eve->VarCleanFromInput('email'); $newpass = $eve->VarCleanFromInput('newpass'); $newpass2 = $eve->VarCleanFromInput('newpass2'); if ($posmgmt->UpdateUserSettings(array('id' => $userinfo['id'], 'newtheme' => $theme_id, 'new_user_track' => $user_track, 'newaway' => $away))) { $eve->SessionSetVar('statusmsg', 'User Settings Updated!');
$eveRender->Assign('config', $config); // Called it index for easy access... would need to be less noobish include_once 'mods/' . $mod . '/index.php'; //echo $op;exit; //Execute the function from func $function = $mod . '_' . $func; if (function_exists($function)) { $template = $function(); // $template is filled by the $op.php file. Not clean, needs some work ModHead(); $eveRender->Display($template); ModFoot(); } else { echo 'Error'; exit; $eve->SessionSetVar('errormsg', 'Error somewhere!'); $eve->RedirectUrl('index.php'); } function ModHead() { global $eve, $eveRender, $additional_header; if ($eve->SessionGetVar('noheader')) { $eve->SessionSetVar('noheader', false); return null; } return $eveRender->display('header.tpl'); } function ModFoot() { global $eve, $eveRender; if ($eve->SessionGetVar('nofooter')) {
include_once 'eveconfig/config.php'; $eveRender = new eveRender($config, $mod, false); $eveRender->Assign('config', $config); $eve = new Eve(); $posmgmt = new POSMGMT(); $access = $eve->SessionGetVar('access'); $access = explode('.', $access); $eveRender->Assign('access', $access); if (!in_array('1', $access) && !in_array('5', $access) && !in_array('6', $access)) { $eve->RedirectUrl('track.php'); } if (empty($pos_id)) { $pos_id = $eve->VarCleanFromInput('pos_id'); } if (empty($pos_id)) { $eve->SessionSetVar('errormsg', 'No POS ID!'); $eve->RedirectUrl('track.php'); } $tower['pos_id'] = $pos_id; $action = $eve->VarCleanFromInput('action'); switch ($action) { case 'Import Structures': $eveRender->Assign('tower', $tower); $eveRender->Display('importfit.tpl'); break; case 'Send File': $tmp_name = $_FILES["fitimport"]["tmp_name"]; if (file_exists($tmp_name)) { try { $xml = simplexml_load_file($tmp_name); } catch (Exception $e) {
$sqls[] = $query; } $eveRender->Assign('querycount', 0); $eveRender->Assign('querytotal', count($sqls)); $eveRender->Display('install/install.tpl'); } elseif ($step == 2) { $eveRender->Assign('step', $step); $do = $eve->VarCleanFromInput('do'); if ($do) { echo $do(); exit; } $upgrade = $eve->VarCleanFromInput('upgrade'); if ($upgrade) { //$eveRender->Assign('upgrade', $upgrade); $eve->SessionSetVar('statusmsg', 'Tables created/updated succesfully'); $eve->RedirectUrl('install.php?step=4'); } if ($eve->IsMiniBrowser()) { if (!$eve->IsTrusted()) { $eve->RequestTrust('You must add this site to your trusted list to log in in-game!'); } else { $userinfo = $eve->GetUserVars(); $eveRender->Assign('IS_IGB', true); $eveRender->Assign('userinfo', $userinfo); } } else { $eveRender->Assign('IS_IGB', false); } $eveRender->Assign('done', true); $eveRender->Display('install/install.tpl');
/** * POSMGMT::ModuleDelVar() * * @param string $modname * @param string $name * @return */ function ModuleDelVar($modname = '', $name = '') { $modname = isset($modname) ? (string) $modname : ''; $name = isset($name) ? (string) $name : ''; if (empty($name) || empty($modname)) { return false; } $dbconn =& DBGetConn(true); if (isset($GLOBALS['modconfig'][$modname][$name])) { unset($GLOBALS['modconfig'][$modname][$name]); } $sql = "DELETE FROM " . TBL_PREFIX . "module_vars\n WHERE name = '" . Eve::VarPrepForStore($name) . "'\n AND modname = '" . Eve::VarPrepForStore($modname) . "'"; $dbconn->Execute($sql); if ($dbconn->ErrorNo() != 0) { Eve::SessionSetVar('errormsg', $dbconn->ErrorMsg() . $sql); return false; } return true; }