-
Notifications
You must be signed in to change notification settings - Fork 1
/
newspot.inc.php
116 lines (94 loc) · 4.02 KB
/
newspot.inc.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
<?php
include "includes/form-messages.inc.php";
if (showResults($result)) {
return ;
} # if
?>
<div class="newspotdiv">
<div></div> <!-- Empty div we can set loading to -->
<form class="newspotform" name="newspotform" id="newspotform" action="<?php echo $tplHelper->makePostSpotAction(); ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="newspotform[xsrfid]" value="<?php echo $tplHelper->generateXsrfCookie('newspotform'); ?>">
<input type="hidden" name="newspotform[newmessageid]" value="">
<input type="hidden" name="newspotform[submitpost]" value="Post">
<input type="hidden" name="newspotform[randomstr]" value="<?php echo $tplHelper->getCleanRandomString(12); ?>">
<fieldset>
<div>
<div class="categorydropdown">
<dt id='txtcategory'><?php echo _('Category'); ?></dt>
<dd>
<select id='spotcategoryselectbox' name='newspotform[category]' onchange="categorySelectChanged()">
<?php foreach(SpotCategories::$_head_categories as $catnr => $catvalue) { ?>
<option value="<?php echo $catnr; ?>"><?php echo $catvalue; ?></option>
<?php } ?>
</select>
</dd>
</div>
<div class="categorydropdown">
<dt id='txtsubcatz'><?php echo _('Type'); ?></dt>
<dd>
<select id='subcatzselectbox' name='newspotform[subcatz]' onchange="categorySelectChanged()">
</select>
</dd>
</div>
<div class="categorydropdown">
<dt id='txtsubcata'><?php echo _('Format'); ?></dt>
<dd>
<select id='subcataselectbox' name='newspotform[subcata]'>
</select>
</dd>
</div>
</div>
<div class='clear'></div>
<div>
<dt><label for="newspotform[title]"><?php echo _('Titel'); ?></label></dt>
<dd><input type="text" name="newspotform[title]" size="60" maxlength="250" value=""></dd>
<dt><label for="newspotform[body]"><?php echo _('Description'); ?></label></dt>
<dd><textarea name="newspotform[body]" id="newspotform[body]" cols="70" rows="8"><?php echo htmlspecialchars($currentSession['user']['prefs']['newspotdefault_body']); ?></textarea><br />
<?php
$smileyList = $tplHelper->getSmileyList();
foreach ($smileyList as $name => $image) {
echo "<a onclick=\"addText(' [img=" . $name . "]', 'newspotform[body]'); return false;\"><img src=\"" . $image . "\" alt=\"" . $name . "\" name=\"" . $name . "\"></a> ";
}
?>
</dd>
<dt><label for="newspotform[tag]"><?php echo _('Tag'); ?></label></dt>
<dd><input type="text" name="newspotform[tag]" size="94" maxlength="99" value="<?php echo htmlspecialchars($currentSession['user']['prefs']['newspotdefault_tag']); ?>"></dd>
<dt><label for="newspotform[website]"><?php echo _('Website'); ?></label></dt>
<dd><input type="text" name="newspotform[website]" size="94" maxlength="255" value=""></dd>
<dt><label for="newspotform[nzbfile]"><?php echo _('NZB file'); ?></label></dt>
<dd><input name="newspotform[nzbfile]" size="82" type="file" /></dd>
<dt><label for="newspotform[imagefile]"><?php echo _('Picture'); ?></label></dt>
<dd><input name="newspotform[imagefile]" size="82" type="file" /></dd>
</div>
<div class='clear'></div>
<div>
<div class="subcategorylistbox">
<dt id='txtsubcatb'><?php echo _('Source'); ?></dt>
<dd>
<select id='subcatbselectbox' name='newspotform[subcatb][]' multiple='multiple' size='8'>
</select>
</dd>
</div>
<div class="subcategorylistbox">
<dt id='txtsubcatc'><?php echo _('Language'); ?></dt>
<dd>
<select id='subcatcselectbox' name='newspotform[subcatc][]' multiple='multiple' size='8'>
</select>
</dd>
</div>
<div class="subcategorylistbox">
<dt id='txtsubcatd'><?php echo _('Genre'); ?></dt>
<dd>
<select id='subcatdselectbox' name='newspotform[subcatd][]' multiple='multiple' size='8'>
</select>
</dd>
</div>
</div>
<div class='clear'><br></div>
<dd><input class="greyButton" type="submit" name="dummySubmit" value="<?php echo _('Add'); ?>"></dd>
</fieldset>
</form>
</div>
<script type='text/javascript'>
categorySelectChanged();
</script>