Browse code

version 3.5.7

Jimako authored on 2024/04/08 12:21:57
Showing 1 changed files
... ...
@@ -28,6 +28,7 @@ if(!defined("_CHARSET")) exit( );
28 28
 if(!isset($catid)) $catid = array( );
29 29
 
30 30
 $output .= "<div style='width: 99.9%; float: left;'>\r\n
31
+<div style=\"text-align: center;\"><b>"._MULTIPLESELECT."</b></div>\r\n
31 32
 		<div style='width: 40%; float: left;'><label for='catoptions'>"._CATOPTIONS."</label> <br />
32 33
 		<select name='catoptions' id='catoptions' multiple='multiple' size='8' onchange='resetCats(\"catoptions\");' style='width: 100%;'>";
33 34
 $selectedCats = "";
... ...
@@ -51,4 +52,4 @@ $output .= "</select></div>
51 52
 			(!empty($selectedCats) ? $selectedCats : "")."</select></div>
52 53
 		</div>
53 54
 		<input type='hidden' name='catid' id='catid' value='".(isset($cats) ? implode(",", $cats) : "")."'>";
54
-?>
55 55
\ No newline at end of file
56
+?>
Browse code

3.5.6 efiction version

Jimako authored on 2024/03/09 16:09:42
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,54 @@
1
+<?php
2
+// ----------------------------------------------------------------------
3
+// Copyright (c) 2007 by Tammy Keefer
4
+// Valid HTML 4.01 Transitional
5
+// Based on eFiction 1.1
6
+// Copyright (C) 2003 by Rebecca Smallwood.
7
+// http://efiction.sourceforge.net/
8
+// ----------------------------------------------------------------------
9
+// LICENSE
10
+//
11
+// This program is free software; you can redistribute it and/or
12
+// modify it under the terms of the GNU General Public License (GPL)
13
+// as published by the Free Software Foundation; either version 2
14
+// of the License, or (at your option) any later version.
15
+//
16
+// This program is distributed in the hope that it will be useful,
17
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
18
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
+// GNU General Public License for more details.
20
+//
21
+// To read the license please visit http://www.gnu.org/copyleft/gpl.html
22
+// ----------------------------------------------------------------------
23
+
24
+if(!defined("_CHARSET")) exit( );
25
+
26
+// Adds the categories selection section to a form.
27
+
28
+if(!isset($catid)) $catid = array( );
29
+
30
+$output .= "<div style='width: 99.9%; float: left;'>\r\n
31
+		<div style='width: 40%; float: left;'><label for='catoptions'>"._CATOPTIONS."</label> <br />
32
+		<select name='catoptions' id='catoptions' multiple='multiple' size='8' onchange='resetCats(\"catoptions\");' style='width: 100%;'>";
33
+$selectedCats = "";
34
+$cats = array( );
35
+foreach($catlist as $cat => $info) {
36
+	if($info['pid'] == -1) 
37
+		$output .= "<option value='$cat'".(isset($info['locked']) ? " class='locked'" : "").">".$info['name']."</option>\r\n";
38
+	if((is_array($catid) && in_array($cat, $catid)) && $info['locked'] != 1) {
39
+		$selectedCats .= "<option value='$cat'>".$info['name']."</option>\r\n";
40
+		$cats[] = $cat;
41
+	}
42
+}
43
+$output .= "</select></div>
44
+		<div style='float: left; width: 20%; text-align: center; padding-top: 3em;'>
45
+			<input type='button' class='button' value='>' name='Select' onClick='addCat(\"catoptions\", \"selectCats\");'><br /><br />
46
+			<input type='button' class='button' value='"._REMOVE."' onClick='removeCat(\"selectCats\");'>
47
+		</div>
48
+		<div style='width: 40%; float: left;'>
49
+			<label for='catoptions'>"._SELECTCATS."</label> ".(count($cats) < 1 ? "<span style=\"font-weight: bold; color: red\">*</span>" : "")."<br />
50
+			<select name='selectCats' id='selectCats' multiple='multiple' size='8' style='width: 100%;'>".
51
+			(!empty($selectedCats) ? $selectedCats : "")."</select></div>
52
+		</div>
53
+		<input type='hidden' name='catid' id='catid' value='".(isset($cats) ? implode(",", $cats) : "")."'>";
54
+?>
0 55
\ No newline at end of file