Made multilanguage. Catalan and Russian.
<?php
if(isset($title))
echo "<h2>$title</h2>";
?>
<table border=1>
<tr>
<th>
<?php if(isset($show_influences))
$colspan=3;
else
$colspan=2;?>
<th colspan="<?=$colspan?>"><?=$user_name?>
<th colspan="<?=$colspan?>"><?=$other_user_name?>
<tr>
<th><?=lang("id_str");?>
<?php if(isset($show_influences)):?>
<th><?=lang("influence_str")?>
<?php endif;?>
<th><?=lang("value_str")?>
<th><?=lang("calculated_str")?>
<?php if(isset($show_influences)):?>
<th><?=lang("influence_str")?>
<?php endif;?>
<th><?=lang("value_str")?>
<th><?=lang("calculated_str")?>
<th><?=lang("assertion_str")?>
<th><?=lang("change_str")?>
<?php foreach($assertions as $assertion):?>
<?=form_open("opiniarbo/index/$assertionid/$other_user");?>
<tr>
<?="<input type=\"hidden\" name=\"id\" id=\"id\" value=\"{$assertion['id']}\"/>";?>
<?php
if(isset($assertion['parent']))
echo "<input type=\"hidden\" name=\"parent\" id=\"parent\" value=\"{$assertion['parent']}\"/>";
echo "<td>{$assertion['id']}";
if(isset($assertion['value1']))
{
$value1 = sprintf("%2.2f", $assertion['value1']);
// We suppose any value1 comes with vid
echo "<input type=\"hidden\" name=\"vid\" id=\"vid\" value=\"{$assertion['vid']}\">";
}
else
$value1 = "";
if (isset($show_influences))
{
if (isset($assertion['parent']))
{
if(isset($assertion['influence1']))
$influence1 = sprintf("%2.2f", $assertion['influence1']);
else
$influence1 = "";
echo "<td><input type=\"text\" name=\"influence\" id=\"influence\" value=\"".
$influence1."\" maxlength=\"5\" size=\"3\" />";
}
else
echo "<td>";
}
echo "<td><input type=\"text\" name=\"value\" id=\"value\" value=\"".
$value1."\" maxlength=\"5\" size=\"3\" />";
if (isset($assertion['calc_value1']))
echo "<td>".sprintf("%2.2f", $assertion['calc_value1']);
else
echo "<td>";
if (isset($show_influences))
{
if (isset($assertion['parent']))
{
if(isset($assertion['influence2']))
$influence2 = sprintf("%2.2f", $assertion['influence2']);
else
$influence2 = "";
echo "<td>".$influence2;
}
else
echo "<td>";
}
if (isset($assertion['value2']))
echo "<td>".sprintf("%2.2f", $assertion['value2']);
else
echo "<td>";
if (isset($assertion['calc_value2']))
echo "<td>".sprintf("%2.2f", $assertion['calc_value2']);
else
echo "<td>";
echo "<td>" . anchor("opiniarbo/index/{$assertion['id']}/{$other_user}",
$assertion['text']);
?>
<td>
<?php if(isset($assertion['value1'])):?>
<input type="submit" name="modify" value="<?=lang("change_str");?>"/>
<input type="submit" name="delete" value="<?=lang("delete_str");?>"/>
<?php else:?>
<input type="submit" name="addvalue" value="<?=lang("addvalue_str");?>"/>
<?php endif;?>
</form>
<?php endforeach;?>
</table>