forked from lwtsn/bitcoin-directory
/
review-listing.php
162 lines (136 loc) · 5.03 KB
/
review-listing.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
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
<?php
session_start();
require (__DIR__.'/lib/common.php');
require(__DIR__.'/inc/blocks/header.php');
require(__DIR__.'/inc/blocks/menu.php');
if($_GET['id_site'])
{
$sql = ("
SELECT nm_site_name,
url_site_address,
tx_site_description,
tx_site_image,
int_category
FROM pending_listing
WHERE id_site = ?");
$stm = $conn->prepare($sql);
$stm->execute(array($_GET['id_site']));
$result = $stm->fetchAll();
$SITE = $result[0];
}
else
{
echo '<h1>Error please go back to the site and submit a listing</h1>';
exit();
}
?>
<div class='col-12 col-lg-12'>
<fieldset disabled>
<legend>Review Your Listing</legend>
<img src='<?= $SITE['tx_site_image']?>' class='img-responsive' />
<div class="form-group">
<input type="text" class="form-control" id="sitename" value="<?= $SITE['nm_site_name'] ?>" placeholder="Site Name" required>
</div>
<div class="form-group">
<input type="url" class="form-control" id="siteurl" value="<?= $SITE['url_site_address'] ?>" placeholder="http://www.domain.com" required>
</div>
<div class="form-group">
<textarea id="sitedescription" name="sitedescription" required maxlength="255" class="form-control" rows="5"><?= $SITE['tx_site_description'] ?></textarea>
<div class="pull-right" id="textarea_feedback"></div>
</div>
<label for="disabledInput">Category</label>
<input type="text" class="form-control" placeholder='<?= categoryName($SITE['int_category']); ?>'><br>
</fieldset>
<?= "<form method='POST' action='place-listing.php?id_site={$_GET['id_site']}'>" ?>
<fieldset>
<ul class='featured well col-12'>
<div class='col-12'>
<button type="button" class="btn btn-default btn-large check-button" >
<span style='font-size:25px;'>Featured listing </span>
</button>
<a target='_blank' title=' Visit <?= $SITE['nm_site_name']; ?>' href=" <?= $SITE['url_site_address']; ?> " >
<h3>
<?= $SITE['nm_site_name']; ?>
</h3>
</a>
<div class='well' style='width:100%; position:relative; margin:0 auto;'>
<img src='<?= $SITE['tx_site_image']?>' class='img-responsive' />
<i style='background:#144b23; bottom:0; right:0; position:absolute;' class='icon-trophy pull-right trophy'></i>
</div>
<div class='caption'>
<p style='font-size:14px;'>
<?= $SITE['tx_site_description']; ?>
</p>
<label class='btn btn-default btn-large check-button'>
<i class='icon-trophy trophy'></i> Set featured listing
<input type='checkbox' id='featured' name='featured'>
</label>
</div>
</div>
</ul>
<div height="100%" class='col-6 well'>
<h2 style='text-align:center;'>Premium listing</h2>
<ul class='thumbnails'>
<li class='col-12 clearfix'>
<a target='_blank' title='Visit <?= $SITE['nm_site_name']; ?>' href=" <?= $SITE['url_site_address']; ?> ">
<h4>
<?= $SITE['nm_site_name']; ?>
</h4>
</a>
<div class='well text-center' style='width:100%; position:relative; margin:0 auto;'>
<img src='<?= $SITE['tx_site_image']?>' class='img-responsive' />
<i style='background:#144b23; bottom:0; right:0; position:absolute;' class='icon-star pull-right star'></i>
</div>
<div class='clearfix text-center'>
<p style='font-size:14px;'>
<?= $SITE['tx_site_description']; ?>
</p>
<label class='btn btn-default btn-large check-button'>
<i class='icon-star star'></i> Premium Listing
<input type='checkbox' id='premium' name='premium'>
</label>
</div>
</li>
</ul>
</div>
<div height="100%" class='col-6 well pull-right'>
<h2 style='text-align:center;'>Standard listing</h2>
<ul class='listing'>
<a target='_blank' title='<?= $SITE['nm_site_name']; ?>' href=" <?= $SITE['url_site_address']; ?> ">
<h4>
<?= $SITE['nm_site_name']; ?>
</h4>
</a>
<p style='font-size:14px;'>
<?= $SITE['tx_site_description']; ?>
</p>
<label class='btn btn-default btn-large check-button' width="100%">
<i class='icon-bitcoin bitcoin'></i> Standard Listing
<input disabled="disabled" value='standard' checked="checked" type='checkbox' name='standard'>
</label>
</ul>
</div>
<div class='col-12 well'>
<button type='submit' name='review' class='btn btn-default btn-large check-button'>
Submit
</button>
</fieldset>
</div>
</form>
</div><!--end content-->
<?php
require(__DIR__.'/inc/blocks/footer.php');
?>
</div>
<script>
$(document).ready(function() {
var text_max = 255;
$('#textarea_feedback').html(text_max + ' characters');
$('#sitedescription').keyup(function() {
var text_length = $('#sitedescription').val().length;
var text_remaining = text_max - text_length;
$('#textarea_feedback').html(text_remaining + ' characters');
});
});
</script>
</body>