First, let me break this into three threads to generate the code for each PHP page
INDEX.PHP
<?php require '../config.php'; ?>
<?php require 'vars.php'; ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>[<?php print $guild_name; ?> ZG Event Signup Sheet]</title>
<link rel="stylesheet" type="text/css" href="<?php print $stylesheet2 ?>">
<link rel="stylesheet" type="text/css" href="<?php print $stylesheet1 ?>">
<style type="text/css">
/* This is the border line & background colour round the entire page */
.bodyline { background-color: #000000; border: 1px #212121 solid; }
</style>
</head>
<!--(Body)==========================================================-->
<body>
<!--(Generated Code)================================================-->
<!--(WARNING: DO NOT EDIT OR DELETE THIS SECTION!)==================-->
<!--begin!kadov{{===================================================-->
<form>
<!--}}end!kadov=====================================================-->
<div placeholder
id=header
style="width: 100%; position: relative;">
<p style="text-align: center;"
align=center><a href="<?php print $website_address ?>"><img src="<?php print $logo ?>" alt="" border="0"></a></p>
</div>
<h1><center>FAB Loot Table</center></h1>
<p> </p>
<?php require 'zglist.php';?>
</body>
</html>
CONFIG.PHP
<?php
#-- ZG Signup Configuration File --------------------------------------------
// Author: Drabin (Scarlet Crusade - Alliance Server)
// Version: 1.0
#--------------------------------------------------------------------------
// Report all errors except E_NOTICE
// This is the default value set in php.ini
error_reporting(E_ALL ^ E_NOTICE);
#--[ MYSQL CONFIG ]--------------------------------------------------------
$db_user = 'testuser'; // MYSQL Database Username
$db_passwd = 'testpass'; // MYSQL Database Password
$db_name = 'testname'; // MYSQL Database Name
$db_host = 'testhost'; // MYSQL Server Address (localhost if the database is on the same machine)
$db_prefix = ''; // MYSQL Database Table prefix for Roster tables. (Blank for backwards compatibility)
// Table Names
define('TOTAL',$db_prefix.'fab_total');
define('VALUE',$db_prefix.'fab_value');
define('ZG',$db_prefix.'fab_zg');
define('MC',$db_prefix.'fab_mc');
define('BWL',$db_prefix.'fab_bwl');
// MySQL debug statements ( 1 on | 0 off )
$sqldebug=1;
#--[ ZGSIGNUP CONFIG ]-------------------------------------------------------
// ZGSignup version number
$version = '1.0'; // Current version of the zgsignup form
// Localization setting. Possible languages at the moment ( deDE | enUS )
$roster_lang = 'enUS';
// _LIMITED_ multilanguage support. ( array('enUS','deDE') | array($roster_lang) )
// Remember, $roster_lang is the main roster language
$multilanguages = array($roster_lang);
#--[ SITE CONFIG ]---------------------------------------------------------
$logo = '../img/wow3.jpg'; // header logo
$website_address = 'http://praetorianknights.mmorpg-gaming.net'; // header logo website address
$zgfabloot_dir = '/fabloot/zg/'; // zg fabloot directory
// CSS Styles
// Do not change the below files unless you know what you are doing
$stylesheet = '../css/default.css';
$stylesheet1 = '../css/styles.css';
$stylesheet2 = '../css/styles2.css';
$stylesheet3 = '../css/profile-style.css';
$overlib = '../css/js/overlib.js';
$profile = '../css/js/profile-script.js';
$color1 = '#2A2A2A';
$color2 = '#363636';
#--[ GUILD CONFIG ]--------------------------------------------------------
$guild_name = 'Praetorian Knights'; // Enter your guild name EXACTLY as it is spelled in the game.
$server_name = "Scarlet Crusade"; // Enter your server name EXACTLY as it is in the game.
$guild_desc = "Adventures Await the Strong"; // Enter your Guild Description here.
$faction = 'A'; // Guild faction ( 'A' {Alliance} | 'H' {Horde} )
$server_type = '(PvE-EST)'; // This for your type of server ( PvE-Timezone | PvP-Timezone | RP-Timezone | RPPvP-Timezone )
$timezone = ''; // Display after timestamps so people know what timezone the time references are in, eg. '(PST)' or '(GMT+5)', etc..
$localtimeoffset = 0; // Enter the timezone offset from UTC (GMT) that you would like roster times to be displayed in
// Eg. for PST set it to -8, for Sydney, Australia set it to 10, etc...
#--[ END OF CONFIG ]-------------------------------------------------------
for ($i=0;$i<count($multilanguages);$i++) {
require $subdir.'../localization/'.$multilanguages[$i].'.php';
}
?>
VARS.PHP
<?php
// Establish our connection and select our database
$link = mysql_connect($db_host, $db_user, $db_passwd) or die ("Could not connect to desired database.");
mysql_select_db($db_name) or die ("Could not select desired database.");
## Performing a query to find all the ingredients of the ZG loot system, including the
## event days where the names match up for both tables
//$coincount = "SELECT name, COUNT(coins) as coins FROM `".ZG."` GROUP BY name HAVING ( COUNT(coins) >= 1 )";
$coincount = "SELECT fab_zg.name,
fab_zg.class,
fab_zg.coins as loot1,
fab_zg.bijous as loot2,
fab_zg.primals as loot3,
fab_zg.common as loot4,
fab_zg.rares as loot5,
fab_zg.epics as loot6,
COUNT(fab_zg.coins) as coins,
COUNT(fab_zg.bijous) as bijous,
COUNT(fab_zg.primals) as primals,
COUNT(fab_zg.common) as common,
COUNT(fab_zg.rares) as rares,
COUNT(fab_zg.epics) as epics,
fab_total.ed_zg as events
FROM `".ZG."`, `".TOTAL."`
WHERE fab_zg.name = fab_total.name
GROUP BY name";
//HAVING ( COUNT(coins) >= 1 )";
$coinresult = mysql_query($coincount);
$num=mysql_numrows($coinresult);
## Get Variable for the ZG System percentages
$varcoins = "SELECT * FROM `".VALUE."`";
$varresult = mysql_query($varcoins);
$coinperc = mysql_result($varresult, 0, "zgcoins");
$bijouperc = mysql_result($varresult, 0, "zgbijous");
$primalperc = mysql_result($varresult, 0, "zgprimals");
$commonperc = mysql_result($varresult, 0, "zgcommon");
$rareperc = mysql_result($varresult, 0, "zgrares");
$epicperc = mysql_result($varresult, 0, "zgepics");
?>