Location: PHPKode > projects > eqEpic > eqEpic0.7.8/steps_tooltip.php
<?php 
/******************************************************************************
* steps_tooltip.php                                                           *
* Tooltip File                                                                *
* See readme.txt for additional information                                   *
*******************************************************************************
* eqEpic - The Epic Raid Manager                                              *
* Open-Source Project By Ryan Christenson                                     *
* =========================================================================== *
* Software Version:           eqEpic 0.7.8                                    *
* Software by:                The RSWR Network (http://www.rswr.net)          *
* Copyright 2006-2007 by:     Ryan Christenson (http://www.rswr.net)          *
* Support, News, Updates at:  http://forum.rswr.net/                          *
*******************************************************************************
* This program is free software; you can redistribute it and/or modify        *
* it under the terms of the GNU General Public License as published by        *
* the Free Software Foundation; either version 2 of the License, or           *
* (at your option) any later version.                                         *
*                                                                             *
* This program is distributed in the hope that it will be useful,             *
* but WITHOUT ANY WARRANTY; without even the implied warranty of              *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               *
* GNU General Public License for more details.                                *
*                                                                             *
* You should have received a copy of the GNU General Public License           *
* along with DownloadCounter; if not, write to the Free Software              *
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA   *
******************************************************************************/
session_start();
ob_start();
?>
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); // Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); // Always modified
header("Cache-Control: private, no-store, no-cache, must-revalidate"); // HTTP/1.1 
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache"); // HTTP/1.0
?>
<?php include ("ewconfig.php") ?>
<?php include ("db.php") ?>
<?php include ("stepsinfo.php") ?>
<?php include ("advsecu.php") ?>
<?php include ("phpmkrfn.php") ?>
<?php
if (!IsLoggedIn() && (@$_COOKIE[ewCookieAutoLogin] == "autologin" && @$_COOKIE[ewCookiePassword] <> "")) {
	ob_end_clean();
	header("Location: login.php");
	exit();
}
LoadUserLevel();
$ewCurSec = (IsLoggedIn())? CurrentUserLevelPriv("steps") : GetAnonymousPriv("steps");	
if (($ewCurSec & ewAllowView) <> ewAllowView) {
	ob_end_clean();
	header("Location: stepslist.php");
	exit();
}
?>
<?php

// Initialize common variables
$x_class = NULL;
$ox_class = NULL;
$z_class = NULL;
$ar_x_class = NULL;
$ari_x_class = NULL;
$x_classList = NULL;
$x_classChk = NULL;
$cbo_x_class_js = NULL;
$x_step = NULL;
$ox_step = NULL;
$z_step = NULL;
$ar_x_step = NULL;
$ari_x_step = NULL;
$x_stepList = NULL;
$x_stepChk = NULL;
$cbo_x_step_js = NULL;
$x_descrip = NULL;
$ox_descrip = NULL;
$z_descrip = NULL;
$ar_x_descrip = NULL;
$ari_x_descrip = NULL;
$x_descripList = NULL;
$x_descripChk = NULL;
$cbo_x_descrip_js = NULL;
$x_num_grp = NULL;
$ox_num_grp = NULL;
$z_num_grp = NULL;
$ar_x_num_grp = NULL;
$ari_x_num_grp = NULL;
$x_num_grpList = NULL;
$x_num_grpChk = NULL;
$cbo_x_num_grp_js = NULL;
$x_zone = NULL;
$ox_zone = NULL;
$z_zone = NULL;
$ar_x_zone = NULL;
$ari_x_zone = NULL;
$x_zoneList = NULL;
$x_zoneChk = NULL;
$cbo_x_zone_js = NULL;
$x_chest = NULL;
$ox_chest = NULL;
$z_chest = NULL;
$ar_x_chest = NULL;
$ari_x_chest = NULL;
$x_chestList = NULL;
$x_chestChk = NULL;
$cbo_x_chest_js = NULL;
$x_mob_url = NULL;
$ox_mob_url = NULL;
$z_mob_url = NULL;
$ar_x_mob_url = NULL;
$ari_x_mob_url = NULL;
$x_mob_urlList = NULL;
$x_mob_urlChk = NULL;
$cbo_x_mob_url_js = NULL;
$x_id = NULL;
$ox_id = NULL;
$z_id = NULL;
$ar_x_id = NULL;
$ari_x_id = NULL;
$x_idList = NULL;
$x_idChk = NULL;
$cbo_x_id_js = NULL;
?>
<?php

// Get key
$x_step = @$_GET["step"];
if (($x_step == "") || (is_null($x_step))) {
	ob_end_clean();
	header("Location: stepslist.php");
	exit();
}

// Get action
$sAction = @$_POST["a_view"];
if (($sAction == "") || ((is_null($sAction)))) {
	$sAction = "I";	// Display record
}

// Open connection to the database
$conn = phpmkr_db_connect(HOST, USER, PASS, DB, PORT);
switch ($sAction)
{
	case "I": // Display record
		if (!LoadData($conn)) { // Load record
			$_SESSION[ewSessionMessage] = "No Steps Found";
			phpmkr_db_close($conn);
			ob_end_clean();
			header("Location: stepslist.php");
			exit();
		}
}
?>
<?php include ("sources/header_tooltip.php") ?>
<script type="text/javascript">
<!--
EW_LookupFn = "ewlookup.php"; // ewlookup file name
EW_AddOptFn = "ewaddopt.php"; // ewaddopt.php file name

//-->
</script>
<script type="text/javascript" src="ewp.js"></script>
<table height="380" align="center" class="toolTable">
	<tr>
	  <td height="1" align="center" class="ewTableHeader"><p> Groups</p></td>
	  <td height="1" align="center" class="ewTableHeader"><p>Zone</p></td>
	  <td height="1" align="center" class="ewTableHeader"><p>Chest</p></td>
	</tr>
	<tr>
	  <td align="center" class="ewTableAltRow"><?php if (is_null($x_num_grp)) { ?>
N/A
  <?php } else { ?>
  <?php echo $x_num_grp; ?>
  <?php } ?></td>
	  <td align="center" class="ewTableAltRow"><?php if (is_null($x_zone)) { ?>
N/A
  <?php } else { ?>
  <?php echo $x_zone; ?>
  <?php } ?></td>
	  <td align="center" class="ewTableAltRow"><?php if (is_null($x_chest)) { ?>
N/A
  <?php } else { ?>
  <?php
switch ($x_chest) {
	case "Yes":
		echo "<img src='images/checktool-trans.gif' border='0' width='32' height='32' alt='Chest on Success' />";
		break;
	case "No":
		echo "<img src='images/unchecktool-trans.gif' border='0' width='32' height='32' alt='No Chest' />";
		break;
	case "?":
		echo "<img src='images/questiontool-trans.gif' border='0' width='32' height='32' alt='Chest?' />";
		break;
}
?>
  <?php } ?></td>
  </tr>
	<tr>
		<td height="1" colspan="3" class="ewTableHeader">Mob Information</td>
	</tr>
	<tr>
	  <td colspan="3" valign="top" class="ewTableAltRow">
<?php if (is_null($x_descrip)) { ?>
N/A
<?php } else { ?>
<?php echo str_replace(chr(10), "<br />", $x_descrip); ?>
<?php } ?>	  </td>
  </tr>
	<tr>
	  <td height="1" colspan="3" valign="top" class="ewTableHeader">Additional Information </td>
  </tr>
	<tr>
	  <td colspan="3" valign="top" class="ewTableAltRow">
<?php if (is_null($x_mob_url)) { ?>
N/A
<?php } else { ?>
<a href="<?php echo $x_mob_url; ?>" target="_blank">NPC Info</a>
<?php } ?>	</td>
	</tr>
</table>
<?php
phpmkr_db_close($conn);
?>
<?php

//-------------------------------------------------------------------------------
// Function LoadData
// - Variables setup: field variables

function LoadData($conn)
{
	global $x_step;
	$sFilter = ewSqlKeyWhere;
	$x_step =  (get_magic_quotes_gpc()) ? stripslashes($x_step) : $x_step;
	$sFilter = str_replace("@step", AdjustSql($x_step), $sFilter); // Replace key value
	$sSql = ewBuildSql(ewSqlSelect, ewSqlWhere, ewSqlGroupBy, ewSqlHaving, ewSqlOrderBy, $sFilter, "");
	$rs = phpmkr_query($sSql,$conn) or die("Failed to execute query at line " . __LINE__ . ": " . phpmkr_error($conn) . '<br />SQL: ' . $sSql);
	if (phpmkr_num_rows($rs) == 0) {
		$bLoadData = false;
	} else {
		$bLoadData = true;
		$row = phpmkr_fetch_array($rs);

		// Get the field contents
		$GLOBALS["x_class"] = $row["class"];
		$GLOBALS["x_step"] = $row["step"];
		$GLOBALS["x_descrip"] = $row["descrip"];
		$GLOBALS["x_num_grp"] = $row["num_grp"];
		$GLOBALS["x_zone"] = $row["zone"];
		$GLOBALS["x_chest"] = $row["chest"];
		$GLOBALS["x_mob_url"] = $row["mob_url"];
		$GLOBALS["x_id"] = $row["id"];
	}
	phpmkr_free_result($rs);
	return $bLoadData;
}
?>
Return current item: eqEpic