Changeset 97 for dev/mods/item_values

Show
Ignore:
Timestamp:
11/28/06 16:39:57 (14 years ago)
Author:
Coni
Message:

Update to settings.php made it hipper and prettier

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • dev/mods/item_values/settings.php

    r96 r97  
    11<?php 
     2require_once("common/class.page.php"); 
     3require_once("common/admin_menu.php"); 
    24// This script goies out and sync's the ship values to the database. 
    35//Ebil Hax by coni cus hes and ass ;) 
     
    57// enable the mod, then click on settings for the mod, and it will go out and get ship pricing. 
    68 
    7 require_once("common/class.page.php"); 
    8 require_once("common/admin_menu.php"); 
    99require_once("common/db.php"); //Include database interface - May need to change this to reflect your local, its not a dev tool for nothing. 
    1010require_once("xmllibrary.php"); //include xml interface 
    1111 
    1212$page = new Page("Settings - ship price import"); 
     13if ($_POST['submit']) 
     14{ 
    1315 
    14 if ($_REQUEST['do'] == 'scan') 
    15 { 
    1616    //http://eve-central.com/home/marketstat_xml.html?typeid= 
    1717    $html = "Querying Database for Ship Item Numbers<br>"; 
     
    4646    while ($row = $qry->getRow()) 
    4747    { 
    48         //$row = $qry->getRow(); 
    4948        //Get data for every single ship in the database 
    5049        //Get the information from eve central; 
    51 //      $html .= "Getting Value of item: " . $row['itm_name'] . "<br>"; 
    5250        $pricedata = file_get_contents("http://eve-central.com/home/marketstat_xml.html?typeid=" . $row['itm_externalid']); 
    5351        $pdata = XML_unserialize($pricedata); 
     
    6765else 
    6866{ 
    69     $html .= '<a href="?a=settings_item_values&do=scan">Scan</a><br/>'; 
     67$html .= "<div class=block-header2>Global options</div>"; 
     68$html .= "<form id=options name=options method=post action=>"; 
     69$html .= "<div class=block-header2>Value Sync</div>"; 
     70$html .= "<br>Look for neat stuff here and more sync stuff later, Until then hit submit to update your ship values."; 
     71$html .= "<br>This takes a hell of a long time!"; 
     72$html .= "<br>And if you know anyone at eve central, please convince them to give us the xml output we asked for<br>"; 
     73$html .= "<br><input type=submit name=submit value=\"Submit\">"; 
    7074} 
     75 
     76 
     77 
     78 
     79 
    7180$page->setContent($html); 
    7281$page->addContext($menubox->generate());