-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjoin.php
More file actions
162 lines (110 loc) · 4.63 KB
/
join.php
File metadata and controls
162 lines (110 loc) · 4.63 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
<!--text and stuff for join modal if we ever get it working-->
<script type="text/javascript" src="<?=VIRTUAL_PATH; ?>_js/util.js"></script>
<!-- Edit Required Form Elements via JavaScript Here -->
<script type="text/javascript">
//here we make sure the user has entered valid data
function checkForm(thisForm)
{//check form data for valid info
if(empty(thisForm.Name,"Please Enter Your Name")){return false;}
if(!isEmail(thisForm.Email,"Please enter a valid Email Address")){return false;}
return true;//if all is passed, submit!
}
</script>
<style>
p:first-letter{ text-transform: capitalize; }
</style>
<!-- JS for captcha. Move to your _JS? (or not) -->
<script type="text/javascript">
var RecaptchaOptions = {
theme : "clean"
};
</script>
<!-- CSS class for captcha. Move to your CSS? (or not) -->
<style>
.g-recaptcha div { margin-left: auto; margin-right: auto;}
#recaptcha_area { margin: auto;}
</style>
<!-- begin JOIN/REGISTER MODAL begin -->
<!-- Modal -->
<div class="modal fade" id="joinMC" role="dialog">
<div class="modal-dialog">
<!-- begin MODAL CONTENT -->
<form action="#" method="post">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h4 class="modal-title">Join Marvel Champions!</h4>
</div>
<div class="modal-body">
<div class="form-group">
<label for="email">User Name:</label>
<input type="email" class="form-control" id="userName">
</div>
<div class="form-group">
<label for="email">Email address:</label>
<input type="email" class="form-control" id="email">
</div>
<div class="form-group">
<label for="emailConfirm">Comfirm Email:</label>
<input type="email" class="form-control" id="emailConfirm">
</div>
<div class="form-group">
<label for="pwd">Password:</label>
<input type="password" class="form-control" id="pwd">
</div>
<div class="form-group">
<label for="pwConfirm">Confirm Password:</label>
<input type="password" class="form-control" id="pwConfirm">
</div>
<?Php
/*
It wouldn't account for the errors in the log, but it looks like you did forget to echo $str after you concatenated all of the options. Could the undefined index in the logs be an old error that was corrected but didn't look fixed because the dropdown is still empty?
*/
#vars for join/register modal
$player = $str = '';
$trueSite = 'Marvel Champions';
$trueAbbreviation = 'MC';
# form handler
#$sqlCharacters = 'SELECT Codename FROM ma_Characters WHERE UserID = NULL';
$sqlChar = $resultChar= '';
$sqlChar = "SELECT CodeName FROM ma_Characters WHERE UserID <= 3 ORDER BY CodeName ASC";
$resultChar = mysqli_query(IDB::conn(), $sqlChar) or die(trigger_error(mysqli_error(IDB::conn()), E_USER_ERROR));
if (mysqli_num_rows($resultChar) > 0)//at least one record!
{//show results
echo '<div class="form-group"><label for="characterRequest" control-label="maxOption2">Request Character</label>
<div class="col-sm-12"><select id="maxOption1" class="selectpicker show-menu-arrow form-control" >';
while ($row = mysqli_fetch_assoc($resultChar))
{//dbOut() function is a 'wrapper' designed to strip slashes, etc. of data leaving db
echo $str = '<option>' . dbOut($row['CodeName']) . '</option></p>';
}
#closing formating here...
echo '</select></div></div>';
}else{//no records
echo '<option disabled>There Are Currently No Unclaimed Characters Available</option>';
}
@mysqli_free_result($resultChar); //free resources
?>
<div class="clearfix"></div>
<?php
include INCLUDE_PATH . "aarContent-inc.php";
echo $aarContent['EvalPost']; #content for RP Response Sample
?>
<div class="form-group">
<label for="rpSample">RP Sample:</label>
<textarea class="form-control" rows="7" id="rpSample" placeholder="<?=$aarContent['EvalPlaceholder']; #Placeholder copy pulled from array ?>"></textarea>
</div>
<?=$aarContent['Terms']; #Terms & Conditions text ?>
<div class="clearfix"></div>
<div class="checkbox">
<label class="pull-right"><input type="checkbox"> I accept Marvel Champions terms and conditions<br /> for membership and agree to abide by them.</label>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default btn-sm" data-dismiss="modal">Close</button>
<button type="submit" class="btn btn-default btn-sm">Submit</button>
</div>
</form>
</div><!-- begin MODAL CONTENT -->
</div>
</div><!-- END MODAL -->
<!-- end JOIN/REGISTER MODAL end -- THEMES / BOOTSTRAP / FOOTER_INC -->