| Server IP : 10.200.247.200 / Your IP : 216.73.217.19 Web Server : Apache System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64 User : jeremy ( 1001) PHP Version : 8.4.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/personal_sites/cruzkirchhausen.com/ |
Upload File : |
<?php
include('mysql.php');
$db = new MySQL('db.syndbs.com', 'lc2user', 'SYN57CRUZ', 'geo');
$countries = $db->get_results("SELECT iso2,short_name FROM geo.country_cruz WHERE 1 ORDER BY short_name ASC");
$states = $db->get_results("SELECT state_short,state FROM geo.states WHERE conus='yes' ORDER BY state ASC");
?>
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Cruz Mission Call Prediction</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js" charset="utf-8"></script>
<style type="text/css">
body {
background: #2675b9;
color:white;
font-size:28px;
}
label {
display:inline-block;
margin:20px 0px;
}
input[type=text],select {
font-size:28px;
padding:10px;
width:375px;
}
input[type=radio] {
width:28px;
height:28px;
}
</style>
<script type="text/javascript">
function submit_results(frm) {
var errors = '';
if($('[name=your_name]').val()=='') {
errors += (errors=='') ? '' : "\n";
errors += "Please enter your name.";
}
if($('[name=location_bigger]:checked').length==0) {
errors += (errors=='') ? '' : "\n";
errors += "Please select if you think the call will be in the US or Foreign.";
}
if($('[name=location_bigger]:checked').val()=='United States') {
if($('#states').val()=='') {
errors += (errors=='') ? '' : "\n";
errors += "Please select a state.";
} else {
$('#real_country_code').append('<option value="US">United States</option>');
$('#real_country_code').val('US');
}
}
if(errors!='') {
alert(errors);
return false;
} else {
var str = '';
$(frm).find('input,select').each(function() {
if(this.type=='radio') {
if($(this).is(':checked')) {
str += (str=='') ? '' : '&';
str += this.name + '=' + encodeURIComponent($(this).val());
}
} else {
str += (str=='') ? '' : '&';
str += this.name + '=' + encodeURIComponent($(this).val());
}
});
$.ajax
({
cache: false,
data: str,
type: "POST",
url: "add_guess_new.php",
success: function(data)
{
$('#confirmation').html(data);
$('#main_form').hide();
$('#confirmation').show();
window.setTimeout(function() {
window.location.reload(false);
},5000);
}
});
}
}
</script>
</head>
<body>
<center>
<div style="width:100%;max-width:800px;">
<h1 style="font-size:76px;">Cruz, Called To Serve...</h1>
<table style="width:100%;text-align:left;">
<tr>
<td style="width:50%;vertical-align:top;">
<img src="cruz.png" style="width:100%;" />
</td>
<td style="width:50%;vertical-align:top;">
<form method="post" action="index.php" id="main_form" style="padding-left:20px;" onsubmit="submit_results(this); return false;">
<div>
<label>Your Name<br />
<input type="text" name="your_name" maxlength="12" />
</label>
</div>
<div>
<div>Location
<div><label onclick="$('#states').show(); $('#real_country_code').hide();"><input type="radio" name="location_bigger" value="United States" onclick="$('#states').show(); $('#real_country_code').hide();" /> United States</label></div>
<div><label onclick="$('#states').hide(); $('#real_country_code').show();"><input type="radio" name="location_bigger" value="Foreign" onclick="$('#states').hide(); $('#real_country_code').show();" /> Foreign</label></div>
</div>
</div>
<div>
<select id="real_country_code" name="real_country_code" style="display:none;">
<option value="">Country</option>
<?php foreach($countries as $country) { ?>
<option value="<?= $country->iso2;?>"><?= $country->short_name;?></option>
<?php } ?>
</select>
<select id="states" name="states" style="display:none;">
<option value="">State</option>
<?php foreach($states as $state) { ?>
<option value="<?= $state->state_short;?>"><?= $state->state;?></option>
<?php } ?>
</select>
</div>
<br />
<center>
<input type="submit" name="submit" value="Submit" style="padding:20px 50px;font-size:36px;" />
</center>
</form>
<div id="confirmation" style="display:none;"></div>
</td>
</tr>
</table>
</div>
</center>
</body>
</html>