/**
 * Display checks in the given $checks_array in html table with 'remove' button at the bottom
 * @param $checks_array : array of all checks to display
 * @param $prefix: indicates where the checks belong to: guideline, guideline group or guideline subgroup.
 *                 'g_[guidelineID] for guideline checks
 *                 'gg_[groupID] for guideline group checks
 *                 'gsg_[subgroupID] for guideline subgroup checks
 * @return a html table to display all checks in $checks_array 
 */
function dispaly_check_table($checks_array, $prefix)
{
    if (is_array($checks_array)) {
        ?>
<form name="input_form_<?php 
        echo $prefix;
        ?>
" method="post" action="<?php 
        echo $_SERVER['PHP_SELF'];
        if (isset($_GET["id"])) {
            echo '?id=' . $_GET["id"];
        }
        ?>
" >
	<table class="data" rules="rows" >
		<thead>
		<tr>
			<th align="left" width="10%"><input type="checkbox" value="<?php 
        echo _AC('select_all');
        ?>
" id="all_del_<?php 
        echo $prefix;
        ?>
" title="<?php 
        echo _AC('select_all');
        ?>
" name="selectall_delchecks_<?php 
        echo $prefix;
        ?>
" onclick="CheckAll('del_checks_id_<?php 
        echo $prefix;
        ?>
[]','selectall_delchecks_<?php 
        echo $prefix;
        ?>
');" /></th>
			<th align="left" width="20%"><?php 
        echo _AC('html_tag');
        ?>
</th>
			<th align="left" width="20%"><?php 
        echo _AC('error_type');
        ?>
</th>
			<th align="left" width="40%"><?php 
        echo _AC('description');
        ?>
</th>
			<th align="left" width="10%"><?php 
        echo _AC('check_id');
        ?>
</th>
		</tr>
		</thead>
		
		<tfoot>
			<tr>
				<td colspan="5">
					<input type="submit" name="remove" value="<?php 
        echo _AC('remove');
        ?>
" onclick="javascript: return get_confirm();" />
				</td>
			</tr>
		</tfoot>

		<tbody>
<?php 
        foreach ($checks_array as $check_row) {
            ?>
		<tr onmousedown="document.getElementById('del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
').checked = !document.getElementById('del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
').checked; togglerowhighlight(this, 'del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
');" 
		    onkeydown="document.getElementById('del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
').checked = !document.getElementById('del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
').checked; togglerowhighlight(this, 'del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
');"
		    id="rdel_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
">
			<td><input type="checkbox" name="del_checks_id_<?php 
            echo $prefix;
            ?>
[]" value="<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
" id="del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
" 
			           onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" /></td>
			<td><?php 
            echo htmlspecialchars($check_row['html_tag']);
            ?>
</td>
			<td><?php 
            echo get_confidence_by_code($check_row['confidence']);
            ?>
</td>
			<td><span class="msg"><a target="_new" href="<?php 
            echo AC_BASE_HREF;
            ?>
checker/suggestion.php?id=<?php 
            echo $check_row["check_id"];
            ?>
" onclick="AChecker.popup('<?php 
            echo AC_BASE_HREF;
            ?>
checker/suggestion.php?id=<?php 
            echo $check_row["check_id"];
            ?>
'); return false;"><label for="del_checks_<?php 
            echo $prefix . '_' . $check_row['check_id'];
            ?>
"><?php 
            echo htmlspecialchars(_AC($check_row['name']));
            ?>
</label></a></span></td>
			<td><?php 
            echo $check_row['check_id'];
            ?>
</td>
		</tr>
<?php 
        }
        // end of foreach
        ?>
		</tbody>
	</table>
	<br/>
</form>
<?php 
    }
    // end of if
}
function dispaly_check_table($checks_array)
{
    if (is_array($checks_array)) {
        ?>
	<table class="data" rules="rows" >
		<thead>
		<tr>
			<th align="center"><?php 
        echo _AC('html_tag');
        ?>
</th>
			<th align="center"><?php 
        echo _AC('error_type');
        ?>
</th>
			<th align="center"><?php 
        echo _AC('description');
        ?>
</th>
			<th align="center"><?php 
        echo _AC('check_id');
        ?>
</th>
		</tr>
		</thead>
		
		<tbody>
	<?php 
        foreach ($checks_array as $check_row) {
            ?>
		<tr>
			<td><?php 
            echo htmlspecialchars($check_row['html_tag']);
            ?>
</td>
			<td><?php 
            echo get_confidence_by_code($check_row['confidence']);
            ?>
</td>
			<td><span class="msg"><a target="_new" href="<?php 
            echo AC_BASE_HREF;
            ?>
checker/suggestion.php?id=<?php 
            echo $check_row["check_id"];
            ?>
" onclick="AChecker.popup('<?php 
            echo AC_BASE_HREF;
            ?>
checker/suggestion.php?id=<?php 
            echo $check_row["check_id"];
            ?>
'); return false;"><?php 
            echo htmlspecialchars(_AC($check_row['name']));
            ?>
</a></span></td>
			<td><?php 
            echo $check_row['check_id'];
            ?>
</td>
		</tr>
	<?php 
        }
        // end of foreach
        ?>
		</tbody>
	</table>
	<?php 
    }
    // end of if
}
Esempio n. 3
0
                echo $row['check_id'];
                ?>
" id="m<?php 
                echo $row['check_id'];
                ?>
" 
			           onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" /></td>
		<?php 
            }
            ?>
			<td><?php 
            echo htmlspecialchars($row['html_tag']);
            ?>
</td>
			<td><?php 
            echo get_confidence_by_code($row['confidence']);
            ?>
</td>
			<td><label for="m<?php 
            echo $row['check_id'];
            ?>
"><?php 
            echo htmlspecialchars(_AC($row['name']));
            ?>
</label></td>
			<td><?php 
            if ($row['open_to_public']) {
                echo _AC('yes');
            } else {
                echo _AC('no');
            }
echo _AC('html_tag');
?>
:</th>
			<td align="left"><?php 
echo htmlspecialchars($this->check_row['html_tag']);
?>
</td>
		</tr>

		<tr>
			<th align="left"><?php 
echo _AC('error_type');
?>
:</th>
			<td align="left"><?php 
echo get_confidence_by_code($this->check_row['confidence']);
?>
</td>
		</tr>

		<tr>
			<th align="left"><?php 
echo _AC('name');
?>
:</th>
			<td align="left"><?php 
echo htmlspecialchars(_AC($this->check_row['name']));
?>
</td>
		</tr>
			           title="del_next_checks_<?php 
        echo $next_row['check_id'];
        ?>
" onmouseup="this.checked=!this.checked" onkeyup="this.checked=!this.checked" 
			           <?php 
        if (is_array($_POST['del_next_checks_id']) && in_array($next_row['check_id'], $_POST['del_next_checks_id'])) {
            echo 'checked="checked"';
        }
        ?>
 /></td>
			<td><?php 
        echo $next_row['html_tag'];
        ?>
</td>
			<td><?php 
        echo get_confidence_by_code($next_row['confidence']);
        ?>
</td>
			<td><span class="msg"><a target="_new" href="<?php 
        echo AC_BASE_HREF;
        ?>
checker/suggestion.php?id=<?php 
        echo $next_row["check_id"];
        ?>
" onclick="AChecker.popup('<?php 
        echo AC_BASE_HREF;
        ?>
checker/suggestion.php?id=<?php 
        echo $next_row["check_id"];
        ?>
'); return false;"><?php