mirror of
https://github.com/glest/glest-source.git
synced 2025-02-24 19:52:25 +01:00
37 lines
993 B
PHP
37 lines
993 B
PHP
<?php
|
|
// Copyright (C) 2012 Mark Vejvoda, Titus Tscharntke and Tom Reynolds
|
|
// The Megaglest Team, under GNU GPL v3.0
|
|
// ==============================================================
|
|
|
|
define( 'INCLUSION_PERMITTED', true );
|
|
require_once( 'config.php' );
|
|
require_once( 'functions.php' );
|
|
|
|
define( 'DB_LINK', db_connect() );
|
|
|
|
$techs_in_db = mysql_db_query( MYSQL_DATABASE, 'SELECT * FROM glesttechs WHERE disabled=0 ORDER BY techname;' );
|
|
$all_techs = array();
|
|
while ( $tech = mysql_fetch_array( $techs_in_db ) )
|
|
{
|
|
array_push( $all_techs, $tech );
|
|
}
|
|
unset( $techs_in_db );
|
|
unset( $tech );
|
|
|
|
db_disconnect( DB_LINK );
|
|
|
|
// Representation starts here
|
|
header( 'Content-Type: text/plain; charset=utf-8' );
|
|
foreach( $all_techs as &$tech )
|
|
{
|
|
$outString =
|
|
"${tech['techname']}|${tech['factioncount']}|${tech['crc']}|${tech['description']}|${tech['url']}|${tech['imageUrl']}|";
|
|
$outString = $outString . "\n";
|
|
|
|
echo ($outString);
|
|
}
|
|
unset( $all_techs );
|
|
unset( $tech );
|
|
?>
|
|
|