Commit | Line | Data |
---|---|---|
e586807d H |
1 | <!-- |
2 | This program is free software. It comes without any warranty, to | |
3 | the extent permitted by applicable law. You can redistribute it | |
4 | and/or modify it under the terms of the Do What The Fuck You Want | |
5 | To Public License, Version 2, as published by Sam Hocevar. See | |
6 | http://sam.zoy.org/wtfpl/COPYING for more details. | |
7 | --> | |
8 | ||
9 | ||
10 | {get_movement user_id=1538 offset=$offset listing_amount=$listing_amount} | |
11 | ||
12 | ||
13 | {math equation="max(x)" x=$get_movement} | |
14 | ||
15 | {*section name=bb loop=$get_movement} | |
16 | {math equation="max(x)" x=$get_movement[bb].node_id} | |
17 | {/section*} | |
18 | ||
19 | <br><br> | |
20 | ||
21 | Graph<br> | |
22 | {ldelim}<br> | |
23 | ### metadata ###<br> | |
24 | @name="movment graph";<br> | |
25 | @description=;<br> | |
26 | @numNodes=dosadit+1;<br> | |
27 | @numLinks={$listing_amount};<br> | |
28 | @numPaths=0;<br> | |
29 | @numPathLinks=0;<br> | |
30 | <br> | |
31 | ||
32 | ### structural data ###<br> | |
33 | @links=[<br> | |
34 | ||
35 | {foreach from=$get_movement name=grafnode item=movement} | |
36 | {ldelim} @source={$movement.node_parent}; @destination={$movement.node_id}; {rdelim} ,<br> | |
37 | {if $smarty.foreach.grafnode.last} | |
38 | {ldelim} @source={$movement.node_parent}; @destination={$movement.node_id}; {rdelim}<br> | |
39 | {/if} | |
40 | {/foreach} | |
41 | ];<br> | |
42 | @paths=; | |
43 | <br><br> | |
44 | ### attribute data ###<br> | |
45 | @enumerations=;<br> | |
46 | @attributeDefinitions=<br> | |
47 | [<br> | |
48 | {ldelim}<br> | |
49 | @name=$root;<br> | |
50 | @type=bool;<br> | |
51 | @default=|| false ||;<br> | |
52 | @nodeValues=[ {ldelim} @id=0; @value=T; {rdelim} ];<br> | |
53 | @linkValues=;<br> | |
54 | @pathValues=;<br> | |
55 | {rdelim},<br> | |
56 | {ldelim}<br> | |
57 | @name=$tree_link;<br> | |
58 | @type=bool;<br> | |
59 | @default=|| true ||;<br> | |
60 | @nodeValues=;<br> | |
61 | @linkValues=;<br> | |
62 | @pathValues=;<br> | |
63 | {rdelim}<br> | |
64 | ];<br> | |
65 | @qualifiers=[<br> | |
66 | {ldelim}<br> | |
67 | @type=$spanning_tree;<br> | |
68 | @name=$sample_spanning_tree;<br> | |
69 | @description=;<br> | |
70 | @attributes=[<br> | |
71 | {ldelim}@attribute=0;@alias=$root;{rdelim},<br> | |
72 | {ldelim}@attribute=1;@alias=$tree_link;{rdelim}<br> | |
73 | ];<br> | |
74 | {rdelim}<br> | |
75 | ];<br> | |
76 | <br> | |
77 | ### visualization hints ###<br> | |
78 | @filters=;<br> | |
79 | @selectors=;<br> | |
80 | @displays=;<br> | |
81 | @presentations=;<br> | |
82 | <br> | |
83 | ### interface hints ###<br> | |
84 | @presentationMenus=;<br> | |
85 | @displayMenus=;<br> | |
86 | @selectorMenus=;<br> | |
87 | @filterMenus=;<br> | |
88 | @attributeMenus=;<br> | |
89 | {rdelim} | |
90 | <hr> | |
91 | array pre numNodes [vytvorit si to <a href="http://marin.x86.sk/toolz/numnodes.php">niekde</a> inde do php]:: | |
92 | <br><br> | |
93 | ||
94 | ||
95 | {*section name=naj loop=$get_movement} | |
96 | {$get_movement[naj].node_id}, | |
97 | {$get_movement[naj].node_parent}, | |
98 | {/section*} | |
99 | ||
100 | ||
101 | <div> | |
102 | <?php<br><br> | |
103 | $a = array({foreach from=$get_movement name=grafnum item=movement} | |
104 | {$movement.node_parent}, {$movement.node_id}, {if $smarty.foreach.grafnum.last} {$movement.node_parent}, {$movement.node_id}{/if} | |
105 | {/foreach}); | |
106 | <br> | |
107 | <p>echo $aMax = max($a);</p> | |
108 | <br>?> | |
109 | </div> | |
110 | ||
111 | {*get_movement user_id=1538 offset=$offset listing_amount=$listing_amount} | |
112 | {foreach from=$get_movement item=movement} | |
113 | <a href='/id/{$movement.node_id}'>{$movement.node_name}</a> <br> | |
114 | {/foreach*} | |
115 |