Quick and simple PHP gift registry
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
phpgiftreg/templates_c/^566f5794b6a64bbcb83596184b...

189 lines
7.2 KiB

<?php /* Smarty version Smarty-3.1.12, created on 2021-12-19 05:19:57
compiled from "./templates/signup.tpl" */ ?>
<?php /*%%SmartyHeaderCode:2763809486012f06227ee21-21048019%%*/if(!defined('SMARTY_DIR')) exit('no direct access allowed');
$_valid = $_smarty_tpl->decodeProperties(array (
'file_dependency' =>
array (
'566f5794b6a64bbcb83596184b4ac30cafe28918' =>
array (
0 => './templates/signup.tpl',
1 => 1611976167,
2 => 'file',
),
),
'nocache_hash' => '2763809486012f06227ee21-21048019',
'function' =>
array (
),
'version' => 'Smarty-3.1.12',
'unifunc' => 'content_6012f0622a1df6_88982009',
'variables' =>
array (
'error' => 0,
'action' => 0,
'opt' => 0,
'username' => 0,
'fullname' => 0,
'email' => 0,
'familycount' => 0,
'families' => 0,
'row' => 0,
'familyid' => 0,
),
'has_nocache_code' => false,
),false); /*/%%SmartyHeaderCode%%*/?>
<?php if ($_valid && !is_callable('content_6012f0622a1df6_88982009')) {function content_6012f0622a1df6_88982009($_smarty_tpl) {?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Gift Registry - Sign Up</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet">
<link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="bootstrap/js/bootstrap.min.js"></script>
<script src="js/jquery.validate.min.js"></script>
<script src="js/giftreg.js"></script>
<script language="JavaScript" type="text/javascript">
$(document).ready(function() {
$("#signupform").validate({
highlight: validate_highlight,
success: validate_success,
rules: {
username: {
required: true,
maxlength: 20
},
fullname: {
required: true,
maxlength: 50
},
email: {
required: true,
email: true,
maxlength: 255
},
familyid: {
required: true
}
},
messages: {
username: {
required: "A username is required.",
maxlength: "Username must be 20 characters or less."
},
fullname: {
required: "Your full name is required.",
maxlength: "Your full name must be 50 characteres or less."
},
email: "A valid e-mail address is required.",
familyid: "Please select a family."
}
});
});
</script>
</head>
<body>
<div class="container" style="padding-top: 30px;">
<?php if (isset($_smarty_tpl->tpl_vars['error']->value)){?>
<div class="row">
<div class="span8 offset2">
<div class="alert alert-block"><?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['error']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
</div>
</div>
</div>
<?php }?>
<?php if (isset($_smarty_tpl->tpl_vars['action']->value)&&$_smarty_tpl->tpl_vars['action']->value=="signup"&&!isset($_smarty_tpl->tpl_vars['error']->value)){?>
<div class="row">
<div class="span8 offset2">
<div class="well">
<p>Thank you for signing up.</p>
<?php if ($_smarty_tpl->tpl_vars['opt']->value['newuser_requires_approval']){?>
<p>The administrators have been informed of your request and you will receive an e-mail once they've made a decision.</p>
<?php }else{ ?>
<p>Shortly, you will receive an e-mail with your initial password.</p>
<?php }?>
<p>Once you've received your password, click <a href="login.php">here</a> to login.</p>
</div>
</div>
</div>
<?php }else{ ?>
<div class="row">
<div class="span8 offset2">
<div class="alert alert-info">
<p>Complete the form below and click Submit.</p>
<?php if ($_smarty_tpl->tpl_vars['opt']->value['newuser_requires_approval']){?>
<p>The list administrators will be notified of your request by e-mail and will approve or decline your request.
</p>
<p>If the e-mail address you supply is valid, you will be notified once a decision is made.</p>
<?php }else{ ?>
<p>If the e-mail address you supply is valid, you will shortly receive an e-mail with your initial password.</p>
<?php }?>
</div>
</div>
</div>
<div class="row">
<div class="span8 offset2">
<form name="signupform" id="signupform" method="post" action="signup.php" class="well form-horizontal">
<input type="hidden" name="action" value="signup">
<fieldset>
<legend>Sign Up for the Gift Registry</legend>
<div class="control-group">
<label class="control-label" for="username">Username</label>
<div class="controls">
<input id="username" name="username" type="text" class="input-xlarge" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['username']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" placeholder="Username">
</div>
</div>
<div class="control-group">
<label class="control-label" for="fullname">Full name</label>
<div class="controls">
<input id="fullname" name="fullname" type="text" class="input-xlarge" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['fullname']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" placeholder="Full name">
</div>
</div>
<div class="control-group">
<label class="control-label" for="email">E-mail address</label>
<div class="controls">
<input id="email" name="email" type="text" class="input-xlarge" value="<?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['email']->value, ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
" placeholder="you@somewhere.com">
</div>
</div>
<?php if ($_smarty_tpl->tpl_vars['familycount']->value>1){?>
<div class="control-group">
<label class="control-label" for="familyid">Family</label>
<div class="controls">
<select name="familyid">
<option value="">(select one)</option>
<?php $_smarty_tpl->tpl_vars['row'] = new Smarty_Variable; $_smarty_tpl->tpl_vars['row']->_loop = false;
$_from = $_smarty_tpl->tpl_vars['families']->value; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array');}
foreach ($_from as $_smarty_tpl->tpl_vars['row']->key => $_smarty_tpl->tpl_vars['row']->value){
$_smarty_tpl->tpl_vars['row']->_loop = true;
?>
<option value="<?php echo $_smarty_tpl->tpl_vars['row']->value['familyid'];?>
"><?php echo mb_convert_encoding(htmlspecialchars($_smarty_tpl->tpl_vars['row']->value['familyname'], ENT_QUOTES, 'UTF-8', true), "HTML-ENTITIES", 'UTF-8');?>
</option>
<?php } ?>
</select>
</div>
</div>
<?php }else{ ?>
<input type="hidden" name="familyid" value="<?php echo $_smarty_tpl->tpl_vars['familyid']->value;?>
">
<?php }?>
<div class="form-actions">
<button type="submit" class="btn btn-primary">Submit</button>
<button type="button" class="btn" onClick="document.location.href='login.php';">Cancel</button>
</div>
</fieldset>
</form>
</div>
</div>
<?php }?>
</div>
</body>
</html>
<?php }} ?>