1 | <? |
---|
2 | /******************************************** |
---|
3 | * Made by Agustino and HyperBeanie |
---|
4 | * If you use and like these tools, please donate some isk! |
---|
5 | * |
---|
6 | * *****************************************/ |
---|
7 | require_once( "class.page.php" ); |
---|
8 | require_once( "class.kill.php" ); |
---|
9 | require_once( "globals.php" ); |
---|
10 | require_once( "class.pilot.php" ); |
---|
11 | require_once( "class.corp.php" ); |
---|
12 | require_once( "class.alliance.php" ); |
---|
13 | require_once( "class.killlist.php" ); |
---|
14 | |
---|
15 | $plt_id = $_GET[plt_id]; |
---|
16 | |
---|
17 | |
---|
18 | // Make the pilot |
---|
19 | $pilot = new Pilot( $plt_id ); |
---|
20 | $page = new Page( "Administration - Killmail export - " .$pilot->getName() ); |
---|
21 | $page->setAdmin(); |
---|
22 | $corp = $pilot->getCorp(); |
---|
23 | $alliance = $corp->getAlliance(); |
---|
24 | |
---|
25 | // Do the check |
---|
26 | if ( !$pilot->exists() ) { |
---|
27 | $html = "That pilot doesn't exist."; |
---|
28 | $page->generate( $html ); |
---|
29 | exit; |
---|
30 | } |
---|
31 | $html .= "<form><textarea class=killmail id=killmail name=killmail cols=\"55\" rows=\"35\" readonly=readonly>"; |
---|
32 | // Setup the lists |
---|
33 | $klist = new KillList(); |
---|
34 | $klist->setOrdered( true ); |
---|
35 | $klist->addInvolvedPilot( $pilot ); |
---|
36 | $klist->rewind(); |
---|
37 | while($kll_id = $klist->getKill()) { |
---|
38 | $kill = new Kill( $kll_id->getID() ); |
---|
39 | $html .= "\""; |
---|
40 | $html .= $kill->getRawMail(); |
---|
41 | $html .= "\",\n\n"; |
---|
42 | } |
---|
43 | |
---|
44 | // Losses |
---|
45 | $llist = new KillList(); |
---|
46 | $llist->setOrdered( true ); |
---|
47 | //$list->setPodsNoobships( true ); // Not working!! |
---|
48 | $llist->addVictimPilot( $pilot ); |
---|
49 | $llist->rewind(); |
---|
50 | while($lss_id = $llist->getKill()) { |
---|
51 | $html .= "\""; |
---|
52 | $loss = new Kill( $lss_id->getID() ); |
---|
53 | $html .= $loss->getRawMail(); |
---|
54 | $html .= "\",\n\n"; |
---|
55 | } |
---|
56 | $html .= "</textarea><br>"; |
---|
57 | $html .= "<input type=\"button\" value=\"Select All\" onClick=\"this.form.killmail.select();this.form.killmail.focus(); document.execCommand('Copy')\"></form><br>"; |
---|
58 | $html .= "Copy content of textbox to another location (eg. a textfile)"; |
---|
59 | $page->setContent( $html ); |
---|
60 | $page->generate(); |
---|
61 | ?> |
---|
62 | |
---|