51ff3226 |
1 | |
2 | {get_movement user_id=1538 offset=$offset listing_amount=$listing_amount} |
3 | |
4 | |
5 | {math equation="max(x)" x=$get_movement} |
6 | |
7 | {*section name=bb loop=$get_movement} |
8 | {math equation="max(x)" x=$get_movement[bb].node_id} |
9 | {/section*} |
10 | |
11 | <br><br> |
12 | |
13 | Graph<br> |
14 | {ldelim}<br> |
15 | ### metadata ###<br> |
16 | @name="movment graph";<br> |
17 | @description=;<br> |
18 | @numNodes=dosadit+1;<br> |
19 | @numLinks={$listing_amount};<br> |
20 | @numPaths=0;<br> |
21 | @numPathLinks=0;<br> |
22 | <br> |
23 | |
24 | ### structural data ###<br> |
25 | @links=[<br> |
26 | |
27 | {foreach from=$get_movement name=grafnode item=movement} |
28 | {ldelim} @source={$movement.node_parent}; @destination={$movement.node_id}; {rdelim} ,<br> |
29 | {if $smarty.foreach.grafnode.last} |
30 | {ldelim} @source={$movement.node_parent}; @destination={$movement.node_id}; {rdelim}<br> |
31 | {/if} |
32 | {/foreach} |
33 | ];<br> |
34 | @paths=; |
35 | <br><br> |
36 | ### attribute data ###<br> |
37 | @enumerations=;<br> |
38 | @attributeDefinitions=<br> |
39 | [<br> |
40 | {ldelim}<br> |
41 | @name=$root;<br> |
42 | @type=bool;<br> |
43 | @default=|| false ||;<br> |
44 | @nodeValues=[ {ldelim} @id=0; @value=T; {rdelim} ];<br> |
45 | @linkValues=;<br> |
46 | @pathValues=;<br> |
47 | {rdelim},<br> |
48 | {ldelim}<br> |
49 | @name=$tree_link;<br> |
50 | @type=bool;<br> |
51 | @default=|| true ||;<br> |
52 | @nodeValues=;<br> |
53 | @linkValues=;<br> |
54 | @pathValues=;<br> |
55 | {rdelim}<br> |
56 | ];<br> |
57 | @qualifiers=[<br> |
58 | {ldelim}<br> |
59 | @type=$spanning_tree;<br> |
60 | @name=$sample_spanning_tree;<br> |
61 | @description=;<br> |
62 | @attributes=[<br> |
63 | {ldelim}@attribute=0;@alias=$root;{rdelim},<br> |
64 | {ldelim}@attribute=1;@alias=$tree_link;{rdelim}<br> |
65 | ];<br> |
66 | {rdelim}<br> |
67 | ];<br> |
68 | <br> |
69 | ### visualization hints ###<br> |
70 | @filters=;<br> |
71 | @selectors=;<br> |
72 | @displays=;<br> |
73 | @presentations=;<br> |
74 | <br> |
75 | ### interface hints ###<br> |
76 | @presentationMenus=;<br> |
77 | @displayMenus=;<br> |
78 | @selectorMenus=;<br> |
79 | @filterMenus=;<br> |
80 | @attributeMenus=;<br> |
81 | {rdelim} |
82 | <hr> |
83 | array pre numNodes [vytvorit si to <a href="http://marin.x86.sk/toolz/numnodes.php">niekde</a> inde do php]:: |
84 | <br><br> |
85 | |
86 | |
87 | {*section name=naj loop=$get_movement} |
88 | {$get_movement[naj].node_id}, |
89 | {$get_movement[naj].node_parent}, |
90 | {/section*} |
91 | |
92 | |
93 | <div> |
94 | <?php<br><br> |
95 | $a = array({foreach from=$get_movement name=grafnum item=movement} |
96 | {$movement.node_parent}, {$movement.node_id}, {if $smarty.foreach.grafnum.last} {$movement.node_parent}, {$movement.node_id}{/if} |
97 | {/foreach}); |
98 | <br> |
99 | <p>echo $aMax = max($a);</p> |
100 | <br>?> |
101 | </div> |
102 | |
103 | {*get_movement user_id=1538 offset=$offset listing_amount=$listing_amount} |
104 | {foreach from=$get_movement item=movement} |
105 | <a href='/id/{$movement.node_id}'>{$movement.node_name}</a> <br> |
106 | {/foreach*} |
107 | |