PHP Classes

File: san-andreas-layout.php

Recommend this page to a friend!
  Classes of Bogdan Zarchievici   San Andreas - Multi Theft Auto Server Query   san-andreas-layout.php   Download  
File: san-andreas-layout.php
Role: Auxiliary script
Content type: text/plain
Description: Layout for the example
Class: San Andreas - Multi Theft Auto Server Query
Query information from a SA-MTA game server
Author: By
Last change:
Date: 18 years ago
Size: 2,044 bytes
 

Contents

Class file image Download
<?

// ------------------------------------------------------------------
// SAN ANDREAS: MULTI THEFT AUTO GAME SERVER QUERY CLASS
// ------------------------------------------------------------------
// Written by: Bogdan Zarchievici <opensource@creative-media.ro>
// Version: 1.0.0.a
// Revision: Tuesday, February 07, 2006 at 10:44:39 PM
// ------------------------------------------------------------------
// Comments: works with any PHP version greater than 4.1.0.
// ------------------------------------------------------------------
// Special thanks to: Alexandru Burdulea and all of you who have been
// actively interested in the development of this class.
// ------------------------------------------------------------------
// For more details on MTA:SA please visit:
// http://www.mtasa.com
// http://multitheftauto.com/blog
// ------------------------------------------------------------------

error_reporting(0);
ini_set("max_execution_time",5);

function
version($current,$required)
{ list(
$current[3],$current[2],$current[1])=split('[/.-]',$current);
  list(
$required[3],$required[2],$required[1])=split('[/.-]',$required);
  if (
$current[3]>$required[3]) return true;
  if (
$current[3]<$required[3]) return false;
  if (
$current[2]>$required[2]) return true;
  if (
$current[2]<$required[2]) return false;
  if (
$current[1]>=$required[1]) return true;
  return
true; }

function
call($class,$version)
{ if (
version($version,"4.1.0")) { if (!include($class.'.php')) die('Please copy the PHP class in the current directory.'); }
  else { die(
'Current PHP version ['.$version.'] is too low for this class. You need PHP 4.1.0 or greater.'); }}

call('san-andreas-class',PHP_VERSION);
$class=&new san_andreas($_GET['ip'],$_GET['port']);
$status=get_object_vars($class);

include(
'templates/classic.php');

// 3 templates are currently available:
// raw: displays the raw content returned by the PHP class;
// classic: all the data returned by the class is nicely put into tables;

?>