2016-01-10 11:01:49 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class beta5_tech_getBudget {
|
|
|
|
|
2024-12-31 00:50:29 +01:00
|
|
|
public function __construct($lib) {
|
2016-01-10 11:01:49 +01:00
|
|
|
$this->lib = $lib;
|
|
|
|
$this->db = $this->lib->game->db;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Returns an array containing research budget allocations
|
|
|
|
function run($pid) {
|
|
|
|
$q = $this->db->query("SELECT research FROM player WHERE id = $pid");
|
|
|
|
if (!($q && dbCount($q))) {
|
|
|
|
return array();
|
|
|
|
}
|
|
|
|
|
|
|
|
list($b) = dbFetchArray($q);
|
2024-12-31 00:50:29 +01:00
|
|
|
return explode('!', $b);
|
2016-01-10 11:01:49 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
?>
|