-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcreate-template.php
92 lines (80 loc) · 3.23 KB
/
create-template.php
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
<?php include('includes/header.php');?>
<?php include('includes/login/auth.php');?>
<?php include('includes/templates/main.php');?>
<?php
//IDs
$aid = isset($_GET['i']) && is_numeric($_GET['i']) ? mysqli_real_escape_string($mysqli, $_GET['i']) : exit;
if(get_app_info('is_sub_user'))
{
if(get_app_info('app')!=get_app_info('restricted_to_app'))
{
echo '<script type="text/javascript">window.location="'.addslashes(get_app_info('path')).'/templates?i='.get_app_info('restricted_to_app').'"</script>';
exit;
}
}
?>
<script src="<?php echo get_app_info('path');?>/js/ckeditor/ckeditor.js?7"></script>
<script src="<?php echo get_app_info('path');?>/js/create/editor.js?7"></script>
<!-- Validation -->
<script type="text/javascript" src="<?php echo get_app_info('path');?>/js/validate.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#edit-form").validate({
rules: {
template_name: {
required: true
},
html: {
required: true
}
},
messages: {
template_name: "<?php echo addslashes(_('The name of this template is required'));?>",
html: "<?php echo addslashes(_('Your HTML code is required'));?>"
}
});
});
</script>
<div class="row-fluid">
<div class="span2">
<?php include('includes/sidebar.php');?>
</div>
<div class="span10">
<div class="row-fluid">
<div class="span10">
<div>
<p class="lead"><?php echo get_app_data('app_name');?></p>
</div>
<h2><?php echo _('Create template');?></h2><br/>
</div>
</div>
<div class="row-fluid">
<form action="<?php echo get_app_info('path')?>/includes/templates/save-template.php?i=<?php echo get_app_info('app')?>" method="POST" accept-charset="utf-8" class="form-vertical" id="edit-form">
<div class="span3">
<label class="control-label" for="template_name"><?php echo _('Template name');?></label>
<div class="control-group">
<div class="controls">
<input type="text" class="input-xlarge" id="template_name" name="template_name" placeholder="<?php echo _('Name of this template');?>">
</div>
</div>
<button type="submit" class="btn btn-inverse" id="save-button"><i class="icon-ok icon-white"></i> <?php echo _('Save template');?></button>
</div>
<div class="span9">
<p>
<label class="control-label" for="html"><?php echo _('HTML code');?></label>
<div class="control-group">
<div class="controls">
<textarea class="input-xlarge" id="html" name="html" rows="10" placeholder="<?php echo _('Email content');?>"></textarea>
</div>
</div>
<p><?php echo _('Use the following tags in your subject, plain text or HTML code and they\'ll automatically be formatted when your campaign is sent. For web version and unsubscribe tags, you can style them with inline CSS.');?></p><br/>
<div class="row-fluid">
<?php include('includes/helpers/personalization.tags.php');?>
</div>
</p>
</div>
</form>
</div>
</div>
</div>
<?php include('includes/footer.php');?>