Esempio n. 1
0
 private function analyse_city($data)
 {
     $note = array('type' => CITY, 'category' => LoU::prepare_city_type($data), 'water' => $data['w'], 'state' => $data['s'], 'name' => $data['n'], 'alliance' => $data['an'], 'alliance_id' => $data['a'], 'points' => $data['po'], 'pos' => str_pad($data['x'], 3, '0', STR_PAD_LEFT) . ':' . str_pad($data['y'], 3, '0', STR_PAD_LEFT), 'x-coord' => str_pad($data['x'], 3, '0', STR_PAD_LEFT), 'y-coord' => str_pad($data['y'], 3, '0', STR_PAD_LEFT), 'continent' => $this->get_continent_by_koords($data['x'], $data['y']), 'player' => $data['pn'], 'player_id' => $data['p']);
     return $note;
 }
Esempio n. 2
0
 $cTest->drawScale($cDataSet->GetData(), $cDataSet->GetDataDescription(), SCALE_DIFF, 150, 150, 150, TRUE, 75, 0, FALSE, $skip_scale);
 $cTest->drawGrid(4, TRUE, 230, 230, 230, 40);
 // Draw the graph
 $cTest->drawFilledCubicCurve($cDataSet->GetData(), $cDataSet->GetDataDescription(), 0.1, 30);
 if ($scale_hours <= 48) {
     $cTest->drawPlotGraph($cDataSet->GetData(), $cDataSet->GetDataDescription(), 2, 1, 255, 255, 255);
 }
 // Draw labels
 if (!empty($mname)) {
     foreach ($mname as $k => $v) {
         $cTest->setLabel($cDataSet->GetData(), $cDataSet->GetDataDescription(), "points", $k, $v[1], 239, 233, 195);
     }
 }
 if (!empty($mtype)) {
     foreach ($mtype as $k => $v) {
         $cTest->setLabel($cDataSet->GetData(), $cDataSet->GetDataDescription(), "points", $k, 'Status: ' . LoU::prepare_city_type($v[0]), 221, 230, 174);
     }
 }
 if (!empty($mowner)) {
     foreach ($mowner as $k => $v) {
         $_un = $redis->HGET("user:{$v[1]}:data", 'name');
         if ($_un) {
             $cTest->setLabel($cDataSet->GetData(), $cDataSet->GetDataDescription(), "points", $k, 'Übernahme: ' . $_un, 239, 233, 195);
         }
     }
 }
 $cTest->clearShadow();
 // Finish the graph
 $cTest->drawLegend(75, 35, $cDataSet->GetDataDescription(), 236, 238, 240, 52, 58, 82);
 $cTest->setFontProperties("../charts/Fonts/tahoma.ttf", 10);
 $cTest->drawTitle(60, 22, $cities[$cid]['data']['name'] . ' - ' . $scale_hours . 'h' . ' Performance: ' . $mperformance . '%', 50, 50, 50, 585);