-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvalidate.php
More file actions
105 lines (93 loc) · 2.73 KB
/
Copy pathvalidate.php
File metadata and controls
105 lines (93 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<?
$classtype = "commandStaffTitle";
// include("setup/conf.php");
$result=0;
$qry = "select email,password,psd,bio from crew where crewid='" . $crewid . "'";
$result = mysql_query($qry,$link) or die ("Invalid Query");
$num_of_rows = mysql_num_rows ($result);
if ($num_of_rows > 0) {
$ud = mysql_fetch_row($result);
$uname = $ud[0];
$passwd = $ud[1];
if ($uname == $username) {
if ($passwd == $password) {
/* THIS IS THE EDITOR PART */
$qry = "SELECT * FROM crew WHERE crewid=" . $crewid;
$result = mysql_query($qry,$link);
$data = mysql_fetch_row($result);
/* Array for crew
0 = ID
1 = Real Name
2 = E-mail Address
3 = Password
4 = Last Name
5 = First Name
6 = Middle Name
7 = Race
8 = Birthplace
9 = Date of Birth
10 = Age
11 = GenderID (see table gender)
12 = RankID (see table rank)
13 = Current Assignment (Defaults to $shipname)
14 = PositionID (See table position)
15 = Personal Appearance Description (!! May be HTML fomatted!)
16 = Biography (!! May be HTML fomatted!)
17 = AOL
*/
?>
<h1 align='center'>Editing <?
if ($data[5] != "") {
echo $data[5] . " ";
}
if ($data[6] != "")
{
echo $data[6]." ";
}
echo $data[4]."'s Biography";
?></h1>
<center>
<form action="main.php?pageref=update_bio&crewid=<? echo $crewid ?>" method="post" align="center">
<table width="640" cellspacing="0" cellpadding="0" border="0">
<tr>
<td width="40" class="<? echo $classtype ?>"><? echo " " ?></td>
<td width="600" colspan="2" align="left" class="<? echo $classtype ?>"><b>Editable Fields</b></td>
</tr>
<tr>
<td width="40" class="<? echo $classtype ?>"><? echo " " ?></td>
<td width="600" colspan="2" align="left"><br>Character Description:<br>
<TEXTAREA NAME="desc" ROWS="10" COLS="70" WRAP="PHYSICAL"><? echo $data[15] ?></TEXTAREA><br></td>
</tr>
<tr>
<td width="40" class="<? echo $classtype ?>"><? echo " " ?></td>
<td width="600" colspan="2" align="left"><br>Biographical Data:<br>
<TEXTAREA NAME="bio" ROWS="10" COLS="70" WRAP="PHYSICAL"><? echo $data[16] ?></TEXTAREA><br></td>
</tr>
<tr>
<td width="40" class="<? echo $classtype ?>"><? echo " " ?></td>
<td width="600" colspan="2" align="left"><br><INPUT TYPE="SUBMIT" VALUE="Update"></td>
</tr>
</table>
</form>
</center>
<?
/* END OF THE EDITOR PART */
}
else {
//header("Location: main.php?pageref=bio_template.php&crewid=" . $crewid);
// password incorrect
echo "Password Incorrect";
}
}
else {
//header("Location: main.php?pageref=bio_template.php&crewid=" . $crewid);
// username incorrect
echo "Password Incorrect";
}
}
else {
//header("Location: main.php?pageref=bio_template.php&crewid=" . $crewid);
// Username doesn't exist
echo "Unknown Error!";
}
?>