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;
 }
Ejemplo n.º 2
0
 * @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 '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'];