View difference between Paste ID: S74yMzup and mL5KhbTn
SHOW: | | - or go back to the newest paste.
1
<?PHP 
2
$ArrPageModule['166']=array(
3
	"Path"=>"files",
4
	"FileName"=>"166"
5
);	
6-
6+
$PageModule = null;
7-
7+
8
echo "Please choose your server number.";
9-
	
9+
10
	$PageModule=strip_tags($_GET['s']);
11-
	$PageModule=$_GET['s'];
11+
12
if ($PageModule==null){
13-
if ($PageModule=='1'){
13+
	echo "<font color=red><h1>You need to define a server</h2></font>";
14-
	require_once( 'files/1.cvs');
14+
15
	if ( array_key_exists($PageModule,$ArrPageModule)){
16
		$RequireFile = $ArrPageModule[$PageModule]['Path'].'/'.$ArrPageModule[$PageModule]['FileName'].'.csv';
17
	}
18
	else {
19
		$PageErrorId = 1;
20
		//header('Location: /');
21
		exit();
22
	}
23
	//$RequireFile = RootFilePath.$RequireFile;
24
	/* 	
25
	if ( file_exists($RequireFile)){
26
		require_once($RequireFile);
27
	}else{
28
		$PageErrorId = 2;
29
		header('Location: /');
30
		exit();
31
	} 
32
	*/
33
}
34-
34+
35
<head>
36-
36+
<title>Evony map :: DrWhat Project ::0.0.3.1 </title>
37
</head>
38
<body>
39-
<title>Evony map :: DrWhat Project ::0.0.3 </title>
39+
40
<hr><hr> Suck on this evony<hr><hr>
41
TODO:</br>
42
Find subtitle software to scan all servers speedy,</br>
43
CSS,</br>
44
JS table formatting</br>
45
Add search</br>
46
Run off MySQL database rather then a CVS file</br>
47
</br></br>
48
<?php echo "You are viewing Coordenates for server ".$PageModule.". </br> Download full list by <a href='".$RequireFile."'>clicking here</a>";?>
49
<table></br>
50
<thead>
51
<tr>
52
<th>X</th>
53
<th>Y</th>
54
<th>City Name</th>
55
<th>Lord Name</th>
56
<th>Allaince</th>
57
<th>Status</th>
58
<th>Flag</th>
59
<th>Honor</th>
60
<th>Prestige</th>
61
<th>Disposition</th>
62
</tr>
63-
63+
64
<tbody>
65
<?PHP
66
   if (($handle = fopen($RequireFile, "r")) !== FALSE) {
67
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE)
68
    {
69
    echo '<tr>';
70
    for ($c=0; $c < count($data); $c++)
71
    {
72
    echo "<td>{$data[$c]}</td>";
73
    }
74
    echo '</tr>';
75
    }
76
    fclose($handle);
77
  } 
78
?>
79
</tbody>
80
</table> 
81
</body>