function smarty_function_pager($params, &$smarty)
{
    $startnum = $params['startnum'];
    $numitems = $params['numitems'];
    // Going to be common so let's use it
    $searchphrase = $params['searchphrase'];
    if (!$numitems) {
        return null;
    }
    $max = $params['numitems'];
    $split = $params['limit'];
    $html = "<br /><p><strong>[</strong> ";
    $endpage = ceil($max / $split);
    $page = Eve::VarCleanFromInput('page');
    $qstring = Eve::ServerGetVar('QUERY_STRING');
    $script = Eve::ServerGetVar('SCRIPT_NAME');
    //$script = substr($script, -1, strlen($script));
    if ($page) {
        $url = preg_replace("/&page=([0-9]?[0-9]?[0-9])/", "", $qstring);
        //return $url;
        if ($url == $qstring) {
            $url = preg_replace("/page=([0-9]?[0-9]?[0-9])/", "", $qstring);
        }
    } else {
        $url = $qstring;
        //urlencode($qstring);
        $page = 1;
    }
    //if (eregi('.html', $url)) {
    //$url = 'a='.Eve::SessionGetVar('kburl');
    //}
    // Fixing damn &amp; for validation
    $url = preg_replace("/&/", "&amp;", $url);
    for ($i = 1; $i <= $endpage; $i++) {
        if ($i != $page) {
            if ($i == 1 || $i == $endpage || $i >= $page - 1 && $i <= $page + 1) {
                if ($i != 1) {
                    $html .= "<a href=\"" . $script . "?" . $url . (empty($url) ? "" : "&amp;") . "page=" . $i . (!empty($searchphrase) ? "&amp;searchphrase=" . urlencode($searchphrase) : "") . "\" title=\"Page " . $i . "\">" . $i . "</a>&nbsp;";
                } else {
                    $html .= "<a href=\"" . $script . "?" . $url . "\" title=\"Page " . $i . "\">" . $i . "</a>&nbsp;";
                }
            } elseif ($i < $page && !$dotted) {
                $dotted = true;
                $html .= "<strong>..&nbsp;</strong>";
            } elseif ($i > $page && !$ldotted) {
                $ldotted = true;
                $html .= "<strong>..&nbsp;</strong>";
            }
        } else {
            $html .= "<strong>" . $i . "</strong>&nbsp;";
        }
    }
    $html .= "<strong>]</strong></p>";
    return $html;
}
Ejemplo n.º 2
0
}
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;
$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;
Ejemplo n.º 3
0
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;
$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');
Ejemplo n.º 4
0
include_once 'includes/eveclass.php';
include 'includes/class.pos.php';
include_once 'includes/eveRender.class.php';
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)) {
Ejemplo n.º 5
0
include_once '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);
$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');
Ejemplo n.º 6
0
$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!');
        $eve->RedirectUrl('user.php');
    }
    if (!empty($email) && $email != $userinfo['email']) {
Ejemplo n.º 7
0
<?php

include_once 'eveconfig/config.php';
include_once 'includes/dbfunctions.php';
EveDBInit();
include_once 'includes/eveclass.php';
include_once 'includes/eveRender.class.php';
$colors = $eveRender->themeconfig;
$eve = new Eve();
$access = $eve->SessionGetVar('access');
$additional_header = array();
// NEEDS SOME CHECKING AROUND HERE, THIS IS ONLY AN EXAMPLE
$op = $eve->VarCleanFromInput('op');
$mod = $eve->VarCleanFromInput('name');
$func = $eve->VarCleanFromInput('func');
if (empty($func)) {
    $func = 'index';
}
$eveRender = new eveRender($config, $mod, false);
if (is_dir('mods/' . $mod . '/plugins')) {
    array_push($eveRender->plugins_dir, 'mods/' . $mod . '/plugins');
}
/*if (is_dir('mods/'.$mod.'/style') && file_exists('mods/'.$mod.'/style/style.css')) { CSS PAIN
    $additional_header[] = "<link rel=\"stylesheet\" type=\"text/css\" href=\"mods/".$mod."/style/style.css\" />";
}*/
$theme_id = $eve->SessionGetVar('theme_id');
$eveRender->Assign('theme_id', $theme_id);
$eveRender->Assign('access', $access);
$eveRender->Assign('config', $config);
// Called it index for easy access... would need to be less noobish
include_once 'mods/' . $mod . '/index.php';
Ejemplo n.º 8
0
$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 'mods/' . $modname . '/install.php';
            if (function_exists($modname . '_' . $func)) {
                $install = $modname . '_' . $func;
                $result = $install();
            } else {
                $result = 0;
            }
        } else {
            $result = $func == 'install' ? 1 : 0;
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");
    header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
    header("Cache-Control: public");
    header("Content-Description: File Transfer");
    header('Content-Type: text/xml');
    // create a new XML document
    if ($xmlstyle == 'tracker') {
        $doc = new DOMDocument('1.0', 'iso-8859-1');
$eveRender = new eveRender($config, $mod, false);
$colors = $eveRender->themeconfig;
$eveRender->Assign('config', $config);
$eve = new Eve();
$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++) {
Ejemplo n.º 11
0
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'];
            $outpost_id = $tower['outpost_id'];
            $current_strontium = $tower['strontium'];
            $current_charters = $tower['charters'];
            $pos_size = $tower['pos_size'];
            $pos_race = $tower['pos_race'];
            $towerName = $tower['towerName'];
            $systemID = $tower['systemID'];
            $location = $tower['moonName'];
            $tower_cpu = $tower['cpu'];
            $tower_pg = $tower['powergrid'];
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();
$userinfo = $posmgmt->GetUserInfo();
$theme_id = $eve->SessionGetVar('theme_id');
$eveRender->Assign('theme_id', $theme_id);
$pID = 'fuelcalc';
$eveRender->Assign('pID', $pID);
$access = $eve->SessionGetVar('access');
$access = explode('.', $access);
$eveRender->Assign('access', $access);
$pos_to_refuel = $eve->VarCleanFromInput('pos_to_refuel');
$optlevels = array(1 => 'Current Level - Yes', 0 => 'Current Level - No');
$disopt = array(1 => 'Display Optimals - Yes', 0 => 'Display Optimals - No');
$partialopt = array(0 => 'Partial Fuelup - No', 1 => 'Partial Fuelup - Yes');
$eveRender->Assign('optlevels', $optlevels);
$eveRender->Assign('disopt', $disopt);
$eveRender->Assign('partialopt', $partialopt);
if (!empty($pos_to_refuel)) {
    $days = $eve->VarCleanFromInput('days');
    $hours = $eve->VarCleanFromInput('hours');
    $use_current_levels = $eve->VarCleanFromInput('use_current_levels');
    $display_optimal = $eve->VarCleanFromInput('display_optimal');
    $partial_fuelup = $eve->VarCleanFromInput('partial_fuelup');
    $use_hanger_levels = 0;
    //$eve->VarCleanFromInput('use_hanger_levels');
    $cargosize = $eve->VarCleanFromInput('size');
Ejemplo n.º 13
0
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();
$theme_id = $eve->SessionGetVar('theme_id');
$eveRender->Assign('theme_id', $theme_id);
$pID = 'jobs';
$eveRender->Assign('pID', $pID);
$access = $eve->SessionGetVar('access');
$access = explode('.', $access);
$eveRender->Assign('access', $access);
$userinfo = $posmgmt->GetUserInfo();
$eveRender->Assign('userinfo', $userinfo);
$submit = $eve->VarCleanFromInput('submit');
$completed = $eve->VarCleanFromInput('completed');
$settings = $posmgmt->GetSettings();
if (in_array('5', $access) || in_array('6', $access)) {
    $ignore = 0;
} elseif ($settings[0]['gsetting'] == '') {
    $ignore = 0;
} elseif ($settings[0]['gsetting'] >= 0 || $settings[0]['gsetting'] <= 3) {
    $ignore = $settings[0]['gsetting'];
}
if (in_array('1', $access) && (in_array('40', $access) || in_array('41', $access) || in_array('45', $access)) || in_array('5', $access) || in_array('6', $access)) {
    if (!empty($submit)) {
        if ($completed == 1 && (in_array('41', $access) || in_array('45', $access) || in_array('5', $access) || in_array('6', $access))) {
            $jobs = $posmgmt->GetAllIndustrialJobs(1, $ignore);
        } else {
            $jobs = $posmgmt->GetAllIndustrialJobs(0, $ignore);
Ejemplo n.º 14
0
 /**
  * POSMGMT::comparePassword()
  *
  * @param mixed $password
  * @param mixed $dbhash
  * @return
  */
 function comparePassword($password, $dbhash)
 {
     $password = Eve::VarCleanFromInput('pass');
     //$_POST['pass'];
     $salt = substr($dbhash, 0, 8);
     $hash = $this->getPasswordHash($salt, $password);
     $shash = $salt . $hash;
     if ($shash == $dbhash) {
         return true;
     } else {
         return false;
     }
 }
Ejemplo n.º 15
0
 $fuel_C_fuelblock = 0;
 $fuel_C_total_size = 0;
 $fuel_C_total = 0;
 $fuel_G_fuelblock = 0;
 $fuel_G_total_size = 0;
 $fuel_G_total = 0;
 $fuel_M_fuelblock = 0;
 $fuel_M_total_size = 0;
 $fuel_M_total = 0;
 $default_days = 0;
 $total_size = 0;
 $charter_total_size = 0;
 $charter_total = 0;
 $fb_total_size = 0;
 $args = array();
 $filter = $eve->VarCleanFromInput('filter');
 $submit = $eve->VarCleanFromInput('submit');
 $use_current_levels = $eve->VarCleanFromInput('use_current_levels');
 $display_optimal = $eve->VarCleanFromInput('display_optimal');
 if (!empty($filter) || !empty($submit)) {
     $days_to_refuel = $eve->VarCleanFromInput('days_to_refuel');
     if (is_numeric($days_to_refuel)) {
         $args['days_to_refuel'] = $days_to_refuel;
     } else {
         $default_days = 0;
     }
     $pos_ids = $eve->VarCleanFromInput('pos_ids');
     if (is_array($pos_ids)) {
         $optposids = $pos_ids;
         $pos_ids = array_keys($pos_ids);
         $args['pos_ids'] = $pos_ids;
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');
}
// TODO: Make this configurable via the UI
$daysToStock = 60;
$action = $eve->VarCleanFromInput('action');
Ejemplo n.º 17
0
$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');
        $fuel['niisotope'] = $eve->VarCleanFromInput('niisotope');
        $fuel['ozone'] = $eve->VarCleanFromInput('ozone');
        $fuel['heavy_water'] = $eve->VarCleanFromInput('heavy_water');
Ejemplo n.º 18
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, $mod, false);
$colors = $eveRender->themeconfig;
$eveRender->Assign('config', $config);
$eve = new Eve();
$posmgmt = new POSMGMT();
$step = $eve->VarCleanFromInput('step');
$step = empty($step) ? $step = 1 : $step;
$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('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) {
Ejemplo n.º 19
0
 $pulltimeally = $posmgmt->GetLastAllianceUpdate();
 $allytime = $posmgmt->get_formatted_timediff($pulltimeally, $now = false);
 //gives a difference value for the warning message
 $allytimedifference = $time - $pulltimeally;
 if ($sovtimedifference >= "86400" && (in_array('5', $access) || in_array('6', $access))) {
     //1 day
     $errormsg = '<b>Warning, Your Sovereignty data is out of date.</b> ' . $sovtime . '<br />';
 }
 if ($allytimedifference >= "604800" && (in_array('5', $access) || in_array('6', $access))) {
     #1 week
     $errormsg .= 'Warning, Your Alliance data is out of date. ' . $allytime . '<br />';
 }
 if ($errormsg) {
     $eve->SessionSetVar('errormsg', $errormsg);
 }
 $sb = $eve->VarCleanFromInput('sb');
 if (!empty($sb)) {
     $user_track[1] = $sb;
 }
 $sd = $eve->VarCleanFromInput('sd');
 $sdd = $eve->SessionGetVar('sdd');
 if (!empty($sd)) {
     $user_track[0] = $sd;
     $eve->SessionSetVar('sdd', $sd);
 } elseif (!empty($sdd)) {
     $user_track[0] = $sdd;
 }
 $st = $eve->VarCleanFromInput('st');
 if (!empty($st)) {
     if ($st == 1) {
         $eve->SessionSetVar('st', $st);
Ejemplo n.º 20
0
$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);
    $sql = file_get_contents('install/upgrade/' . $upgrade . '.sql');
    $sql = preg_replace('/%prefix%/', TBL_PREFIX, $sql);
    $sql = trim($sql);
    $sql = explode(';', $sql);
    foreach ($sql as $query) {
Ejemplo n.º 21
0
 * @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/class.pos.php';
include_once 'includes/eveRender.class.php';
error_reporting(E_ALL & ~E_NOTICE & ~E_WARNING);
//error_reporting(E_ALL);
$eveRender = new eveRender($config, '', false);
$colors = $eveRender->themeconfig;
$eveRender->Assign('config', $config);
$eve = new Eve();
$posmgmt = new POSMGMT();
$step = $eve->VarCleanFromInput('step');
$action = $eve->VarCleanFromInput('action');
if ($action && !isset($step)) {
    $step = 5;
}
$step = empty($step) ? $step = 1 : $step;
if ($step <= 1) {
    $install = false;
}
if ($step > 1) {
    include_once 'includes/dbfunctions.php';
    EveDBInit();
    $dbconn =& DBGetConn(true);
    $sql = "SELECT * FROM " . $dbconfig['prefix'] . "user";
    $result = $dbconn->Execute($sql);
    if ($dbconn->ErrorNo() != 0) {
Ejemplo n.º 22
0
$eveRender->Assign('config', $config);
$eve = new Eve();
$posmgmt = new POSMGMT();
$theme_id = $eve->SessionGetVar('theme_id');
$eveRender->Assign('theme_id', $theme_id);
$eve_id = $eve->SessionGetVar('eve_id');
$pID = 'production';
$eveRender->Assign('pID', $pID);
$userinfo = $posmgmt->GetUserInfo();
$eveRender->Assign('userinfo', $userinfo);
$access = $eve->SessionGetVar('access');
$access = explode('.', $access);
$eveRender->Assign('access', $access);
$user_id = $_SESSION['delsid'];
if (in_array('1', $access) || in_array('5', $access) || in_array('6', $access)) {
    $action = $eve->VarCleanFromInput('action');
    if ($action == 'Update Amount') {
        $sql = "SELECT * FROM " . TBL_PREFIX . "silo_info";
        $result = mysql_query($sql) or die('Could not get access to the user/pos database; ' . mysql_error());
        while ($value = mysql_fetch_array($result)) {
            $new_amount = $eve->VarCleanFromInput('new_amount_' . $value[0]);
            $structure_id = $eve->VarCleanFromInput('structure_id_' . $value[0]);
            if ($value[4] != $new_amount) {
                UpdateSiloAmount(array('new_amount' => $new_amount, 'structure_id' => $structure_id));
            }
        }
    }
    $regions = $posmgmt->GetInstalledRegions();
    $systems = $posmgmt->GetSystemsWithPos();
    $optregions[] = 'All Regions';
    foreach ($regions as $regID => $region) {