/
random
105 lines (95 loc) · 2.13 KB
/
random
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
[comment]
ui_component: random
ui_component_label: Random items
matches:
label: Number to show
widget: select
options: 1,2*,3,4,5,6,7,8,9,10
pool:
label: Number to select from
widget: select
options: 100,1000*,10000
help: Controls now many items will be returned and randomized, \
always from the beginning of the database/text file
table_width:
label: Table width
options: 150,300,450
widget: combo
filter: nullselect
cols:
label: Columns
options: 1*,2,3,4
widget: select
banner:
label: Banner for top box
widget: text
width: 40
[/comment]
<!-- BEGIN COMPONENT [control component random] -->
<br>
<table width="[control table_width 90%]" align="center">
<tr>
<td class="categorybar">
<b>[control banner See also]</b>
</td>
</tr>
<tr>
<td align="center">
<br>
[calc]
my $n = [control cols 2];
$Scratch->{width_percent} = int(100 / $n) . '%';
return;
[/calc]
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
[table-organize embed=1 pretty=1 cols="[control cols 2]"]
[loop
random="[control size 2]"
search="
fi=products
st=db
ra=yes
ml=[control pool 1000]
"]
<TD width="[scratch width_percent]" valign="top" align="center">
<table border="0" cellspacing="0" cellpadding="0" width="75%">
<tr>
<td width="75%" id=rv class="contentbar1" align="center">
[loop-description]
</td>
</tr>
<tr>
<td id=rv nowrap align="center">
<a href="[area [loop-code]]">More Info</a>
[if-loop-data options o_modular]
[page [loop-code]]
[else]
[order [loop-code]]
[/else]
[/if-loop-data]
<img align="top" src="__THEME_IMG_DIR__buynow.gif" border="0"></A>
</td>
</tr>
<tr>
<td id=rv align="center">
Our Price: <b>[loop-price]</b>
</td>
</tr>
<tr>
<td align="center">
<a href="[area [loop-code]]">
<img border="0" src="thumb/[loop-field thumb]"></a>
</td>
</tr>
<tr>
<td><p> <br><br></p></td>
</tr>
</table>
</TD>
[/loop]
[/table-organize]
</table>
</td>
</tr>
</table>
<!-- END COMPONENT [control component random] -->