Ejemplo n.º 1
0
    error_page("bad clause");
}
$q = new SqlQueryString();
$q->process_form_items();
if (isset($nresults)) {
    $entries_to_show = $nresults;
} else {
    $entries_to_show = 20;
}
$page_entries_to_show = $entries_to_show;
if (isset($last_pos)) {
    $start_at = $last_pos;
} else {
    $start_at = 0;
}
$title = table_title($table);
admin_page_head($title);
$count = $q->count();
if ($count < $start_at + $entries_to_show) {
    $entries_to_show = $count - $start_at;
}
$last = $start_at + $entries_to_show;
$main_query = $q->get_select_query($entries_to_show, $start_at);
// For display, convert query string characters < and > into 'html form' so
// that they will be displayed.
//
$html_text = str_replace('<', '&lt;', str_replace('>', '&gt;', $main_query));
echo "<p>Query: <b>{$html_text}</b><p>\n";
$start_1_offset = $start_at + 1;
echo "\r\n\t<p>{$count} records match the query.\r\n\tDisplaying {$start_1_offset} to {$last}.<p>\r\n";
$url = $q->get_url("db_action.php");
Ejemplo n.º 2
0
<h2>Pengaturan Hak Akses</h2>

<?php 
echo table_open_tag('cellspacing="0" cellpadding="5" width="100%"');
$title = array('Nama Group', '-');
echo table_title($title);
foreach ($results as $row) {
    $data = array($row->NAMA_GROUP, anchor('user_roles/group/' . $row->ID, 'Edit Permission'));
    echo table_contents($data);
}
echo table_close_tag();