fix variable mess

$i has been used several times for different usages
This commit is contained in:
Uwe Steinmann 2016-08-03 09:54:13 +02:00
parent 7ce31e80a6
commit 4e221419f7

View File

@ -245,14 +245,14 @@ $(document).ready( function() {
print "<td>";
$show = $group->getShow($member);
$shows = array();
for($i=0; $i<4; $i++) {
if(1 << $i & $show)
$shows[] = 1 << $i;
for($j=0; $j<4; $j++) {
if(1 << $j & $show)
$shows[] = 1 << $j;
}
print "<form action=\"../op/op.AttributeGroupMgr.php\" method=\"post\" class=\"form-inline\" style=\"display: inline-block; margin-bottom: 0px;\"><input type=\"hidden\" name=\"attrdefgroupid\" value=\"".$group->getID()."\" /><input type=\"hidden\" name=\"action\" value=\"setshow\" /><input type=\"hidden\" name=\"attrdefid\" value=\"".$member->getID()."\" />".createHiddenFieldWithKey('setshow');
echo "<select class=\"chzn-select\" multiple=\"multiple\" name=\"shows[]\" data-placeholder=\"".getMLText('select_attrdefgrp_show')."\">";
foreach(array(1=>'list', 2=>'detail', 4=>'search') as $i=>$k)
echo "<option value=\"".$i."\"".(($show & $i) ? " selected" : "").">".getMLText('attrdefgrp_show_'.$k)."</option>";
foreach(array(1=>'list', 2=>'detail', 4=>'search') as $j=>$k)
echo "<option value=\"".$j."\"".(($show & $j) ? " selected" : "").">".getMLText('attrdefgrp_show_'.$k)."</option>";
echo "</select> ";
print "<button type=\"submit\" class=\"btn\"><i class=\"icon-save\"></i></button></form>";
print "</td>";