author | viric@mandarina |
Sun, 28 Dec 2008 17:20:55 +0000 | |
changeset 4 | fcb273554da6 |
parent 3 | f3e55c2386a1 |
child 5 | cb13c07e7e5d |
permissions | -rw-r--r-- |
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
1 |
<?php |
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
2 |
if(isset($title)) |
3 | 3 |
echo "<h2>$title</h2>"; |
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
4 |
|
3 | 5 |
?> |
6 |
<table border=1> |
|
7 |
<tr> |
|
8 |
<th> |
|
9 |
<?php if(isset($show_influences)) |
|
10 |
$colspan=3; |
|
11 |
else |
|
12 |
$colspan=2;?> |
|
13 |
<th colspan="<?=$colspan?>"><?=$user_name?> |
|
14 |
<th colspan="<?=$colspan?>"><?=$other_user_name?> |
|
15 |
<tr> |
|
16 |
<th>Id |
|
17 |
<?php if(isset($show_influences)):?> |
|
18 |
<th>Influo |
|
19 |
<?php endif;?> |
|
20 |
<th>Valoro |
|
21 |
<th>Kalkulita |
|
22 |
<?php if(isset($show_influences)):?> |
|
23 |
<th>Influo |
|
24 |
<?php endif;?> |
|
25 |
<th>Valoro |
|
26 |
<th>Kalkulita |
|
27 |
<th>Teksto |
|
28 |
<th>Ŝanĝi |
|
29 |
<?php foreach($assertions as $assertion):?> |
|
30 |
<?=form_open("opiniarbo/index/$assertionid/$other_user");?> |
|
31 |
<tr> |
|
32 |
<?="<input type=\"hidden\" name=\"id\" id=\"id\" value=\"{$assertion['id']}\"/>";?> |
|
33 |
<?php |
|
34 |
if(isset($assertion['parent'])) |
|
35 |
echo "<input type=\"hidden\" name=\"parent\" id=\"parent\" value=\"{$assertion['parent']}\"/>"; |
|
36 |
echo "<td>{$assertion['id']}"; |
|
37 |
if(isset($assertion['value1'])) |
|
38 |
{ |
|
39 |
$value1 = $assertion['value1']; |
|
40 |
// We suppose any value1 comes with vid |
|
41 |
echo "<input type=\"hidden\" name=\"vid\" id=\"vid\" value=\"{$assertion['vid']}\">"; |
|
42 |
} |
|
43 |
else |
|
44 |
$value1 = ""; |
|
45 |
if (isset($show_influences)) |
|
46 |
{ |
|
47 |
if (isset($assertion['parent'])) |
|
48 |
{ |
|
49 |
if(isset($assertion['influence1'])) |
|
50 |
$influence1 = $assertion['influence1']; |
|
51 |
else |
|
52 |
$influence1 = ""; |
|
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
53 |
echo "<td><input type=\"text\" name=\"influence\" id=\"influence\" value=\"". |
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
54 |
sprintf("%2.2f", $influence1)."\" maxlength=\"5\" size=\"3\" />"; |
3 | 55 |
} |
56 |
else |
|
57 |
echo "<td>"; |
|
58 |
} |
|
59 |
||
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
60 |
echo "<td><input type=\"text\" name=\"value\" id=\"value\" value=\"". |
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
61 |
sprintf("%2.2f", $value1)."\" maxlength=\"5\" size=\"3\" />"; |
3 | 62 |
|
63 |
if (isset($assertion['calc_value1'])) |
|
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
64 |
echo "<td>".sprintf("%2.2f", $assertion['calc_value1']); |
3 | 65 |
else |
66 |
echo "<td>"; |
|
67 |
||
68 |
if (isset($show_influences)) |
|
69 |
{ |
|
70 |
if (isset($assertion['parent'])) |
|
71 |
{ |
|
72 |
if(isset($assertion['influence2'])) |
|
73 |
$influence2 = $assertion['influence2']; |
|
74 |
else |
|
75 |
$influence2 = ""; |
|
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
76 |
echo "<td>".sprintf("%2.2f", $influence2); |
3 | 77 |
} |
78 |
else |
|
79 |
echo "<td>"; |
|
80 |
} |
|
81 |
||
82 |
if (isset($assertion['value2'])) |
|
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
83 |
echo "<td>".sprintf("%2.2f", $assertion['value2']); |
3 | 84 |
else |
85 |
echo "<td>"; |
|
86 |
||
87 |
if (isset($assertion['calc_value2'])) |
|
4
fcb273554da6
Fixing problems recalculating, and showing values as %2.2f
viric@mandarina
parents:
3
diff
changeset
|
88 |
echo "<td>".sprintf("%2.2f", $assertion['calc_value2']); |
3 | 89 |
else |
90 |
echo "<td>"; |
|
91 |
echo "<td>" . anchor("opiniarbo/index/{$assertion['id']}/{$other_user}", |
|
92 |
$assertion['text']); |
|
93 |
?> |
|
94 |
<td> |
|
95 |
<?php if(isset($assertion['value1'])):?> |
|
96 |
<input type="submit" name="modify" value="Ŝanĝi"/> |
|
97 |
<input type="submit" name="delete" value="Forigi"/> |
|
98 |
<?php else:?> |
|
99 |
<input type="submit" name="addvalue" value="Taksi"/> |
|
100 |
<?php endif;?> |
|
101 |
</form> |
|
102 |
<?php endforeach;?> |
|
103 |
</table> |