<?php
require("../include/intranet.inc.php");
$refer = $_REQUEST[refer];
$client = $_REQUEST[client];
$appl = $_REQUEST[appl];
?>
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' '[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>[/URL]
<html xmlns='[URL unfurl="true"]http://www.w3.org/1999/xhtml'>[/URL]
<head title='Add an Application'>
<LINK HREF='clientAppl.css' REL='stylesheet' TYPE='text/css' />
<script type='text/javascript' src='../include/jquery.js'></script>
<script type='text/javascript' src='../include/jquery.highlight.js'></script>
<script type='text/javascript' src='../include/jquery.validate.js'></script>
<script type='text/javascript' src='../include/jquery.form.js'></script>
<script type="text/javascript" src="../include/jquery.textarearesizer.js"></script>
<script type="text/javascript" src="../include/jquery.tools.min.js"></script>
<script type='text/javascript'>
$(document).ready(function(){
});
jQuery(function($) {
$('#form_container').load('layout.php', { 'client': <?php echo "'$client'" ?>, 'appl': <?php echo "'$appl'" ?> });
$().ajaxSend(function(r,s){
$('#loading').show();
});
$().ajaxStop(function(r,s){
$('#loading').fadeOut('fast');
$('#loading').remove();
$('form').highlight();
$('textarea.resizable:not(.processed)').TextAreaResizer();
$('a').click( function() {
var s1 = $('#stock1').val();
var s2 = $('#stock2').val();
var s3 = $('#stock3').val();
var s4 = $('#stock4').val();
var s5 = $('#stock5').val();
var param = '?stk1='+s1+'&stk2='+s2+'&stk3='+s3+'&stk4='+s4+'&stk5='+s5;
$('a').attr('href', 'clientEnsemble.php'+param);
});
// if the function argument is given to overlay,
// it is assumed to be the onBeforeLoad event listener
$("a[rel]").overlay({
expose: '#c0c0c0',
effect: 'apple',
onBeforeLoad: function() {
// grab wrapper element inside content
var wrap = this.getContent().find("div.wrap");
// load only for the first time it is opened
if (wrap.is(":empty")) {
wrap.load(this.getTrigger().attr("href"));
}
}
});
});
var v = $('#frm').validate({
rules: {
applCode: {
required: true,
maxlength: 1
},
applName: {
required: true,
minlength: 5
},
svDays: {
required: '#sv:checked',
digits: true
}
},
messages: {
applCode: {
required: 'Please enter an Application Code',
maxlength: 'Application code is a single character'
},
applName: {
required: 'Please enter an Application Name',
maxlength: 'Please use a name with at least 5 characters'
},
svDays: {
required: 'If S&V selected you must enter Hold months',
digits: 'Only use numbers for hold days'
}
},
submitHandler: function(form) {
$(form).ajaxSubmit({
target: "#form_results"
});
}
});
});
</script>
</head>
<?php
echo "
<body id='main_body'>
<img id='top' src='../images/form_top.png'>
<div id='loading'>
<img src='../images/loader_indicator.gif' alt='Loading, please wait...'><br>
Loading Application...
</div>
<form id='frm' class='dpForm' name='frmApplication' method='POST' action='submit.php'>
<div id='form_container'></div>
</form>
<img id='bottom' src='../images/form_bottom.png'>
</div>
<div class='overlay' id='overlay'>
<div class='wrap'></div>
</div>
</body>
</html>
";
?>