⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wish_match.php

📁 A website for keeping track of wishes for your character in WoW Users are able to make a user accoun
💻 PHP
字号:
<?php
include "auth.inc.php";
include "conn.inc.php";
?>

<html>
	<head>
		<title>WoW-Wish: Wish matching</title>
		<link rel="stylesheet" href="wish.css">
	</head>
	<body>
		<?php include "header.inc.php"; ?>
        <h1>Find matching wishes</h1>

<?php		
        if (isset($_GET['wish'])) //IS IT A WISH?
		{
			//YES= get the dungeon id and hc flags
			$s_dungeonid = addslashes($_GET['wish']); //sanitise
			$heroic = addslashes($_GET['hc']); //sanitise
			
			$dnamequery = "SELECT dungeonname FROM dungeons WHERE dungeonid = '". $s_dungeonid ."';";
			$dnameresult = mysql_query($dnamequery) or die (mysql_error());
			$row = mysql_fetch_assoc($dnameresult);
			$dungeonname = $row[dungeonname];
			
			
			echo "<h2>So you want to go to ". $dungeonname;
			if ($heroic == 1)
				{echo " (heroic)";}
			else
				{echo " (normal)";}
			echo "?</h2>";
			
			echo "You wished to go here on these characters:<br />&bull; ";
			
			
			$s_session_user_logged = addslashes($_SESSION['user_logged']);
			$altquery = "SELECT altname FROM alts INNER JOIN wishes ON ".
				"alts.owner = '". $s_session_user_logged . "' AND ".
				"wishes.wishaltid = alts.altid AND ".
				"wishes.wishdungeonid = '". $s_dungeonid . "' AND ".
				"wishes.heroic = '". $heroic .
				"';";
			$altresult = mysql_query($altquery) or die (mysql_error());
			
			while ($row = mysql_fetch_assoc($altresult))
            {
                echo "<b>". $row[altname] ."</b>";
				if ($row[faction] ==1)
                    { echo "<font color=\"blue\">[A]</font>, "; }
                elseif ($row[faction] ==2)
                    { echo "<font color=\"red\">[H]</font>, "; }
				else
					{ echo ",  "; }
				/*
				foreach($row as $altname)
                {
					echo "<b>". $altname . "</b>, "; //add A/H tag
				}*/
			}
			
			echo "<br />";
			echo "Other people wish to go here on these characters which are on your realm:<br />&bull; ";
			
			$altquery = "SELECT altname FROM alts INNER JOIN wishes ON ".
				"NOT alts.owner = '". $s_session_user_logged . "' AND ".
				"wishes.wishaltid = alts.altid AND ".
				"wishes.wishdungeonid = '". $s_dungeonid . "' AND ".
				"wishes.heroic = '". $heroic .
				"';";
			$altresult = mysql_query($altquery) or die (mysql_error());
			
			if (mysql_num_rows($altresult) == 0) 
            {
                echo "no matches found";
            }
			else
			{
				while ($row = mysql_fetch_assoc($altresult))
				{
					foreach($row as $altname)
					{
						echo "<b>".$altname . "</b>, ";//add A/H tag
						
					}
				}
			}
			
		}
		else 
		{
			//NO = send to the list
			echo "You need to select one of your wishes from <a href=\"alt_list.php\">here</a>";
		}
?>		
    </body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -