root/dev/mods/value_fetch/fetch_values.php @ 361

Revision 338, 1.4 KB (checked in by beans, 12 years ago)

+ MOD: Value fetcher
+ MOD: API_Mod (and class.eveapi.php in common/includes)
+ admin_troubleshooting and images

Line 
1<?php
2
3// Set timeout and memory, we neeeeed it ;)
4@set_time_limit(0);
5@ini_set('memory_limit',999999999);
6
7require_once('common/admin/admin_menu.php');
8require_once('mods/value_fetch/fetcher.php');
9/**
10*       Author: Niels Brinkø (HyperBeanie)
11*
12*       Licence: Do what you like with it, credit me as the original author
13*                Not warrantied for anything, might eat your cat.  Your responsibility.
14*/
15
16
17$page = new Page();
18$page->setAdmin();
19$page->setTitle('Fetcher - Item Values');
20
21$fetch = new Fetcher();
22$html = "<center>";
23if ($_POST['faction'] == 'factionyes')
24        $faction = true;
25else
26        $faction = false;
27
28if ($_POST['php'] == "PHP4")
29{
30        $count = $fetch->fetch_values_php4($faction);
31        $fetch->destroy();
32        $html .= $count."</b> from eve-central cached file!<br><br>";
33        $html .= "They were added to the database.<br><br>";
34}
35elseif ($_POST['php'] == "PHP5")
36{
37        $count = $fetch->fetch_values_php5($faction);
38        $html .= $count."</b> from eve-central cached file!<br><br>";
39        $html .= "They were added to the database.<br><br>";
40}
41else
42{
43        $html .= "No values fetched from eve-central cache";
44}
45
46if (($_POST['ship'] == "shipyes") || ($_GET['type'] == 3))
47{
48        $ships = $fetch->updateShips();
49        $html .= "Updated ".$ships." ships.";
50}
51$html .= "</center>";
52
53$page->addContext($menubox->generate());
54$page->setContent($html);
55$page->generate();
56?>
Note: See TracBrowser for help on using the browser.