function mobile_tools_roles_overview in Mobile Tools 5
Same name and namespace in other branches
- 6.3 mobile_tools_roles.module \mobile_tools_roles_overview()
- 6 mobile_tools_roles.inc \mobile_tools_roles_overview()
- 7.2 mobile_tools_roles/mobile_tools_roles.module \mobile_tools_roles_overview()
- 7.2 mobile_tools_roles/mobile_tools_roles.inc \mobile_tools_roles_overview()
1 call to mobile_tools_roles_overview()
- mobile_tools_roles_configuration_form in ./
mobile_tools.module - Configuration form for configuring the mobile context in the permission system
File
- ./
mobile_tools.module, line 497 - Mobile Tools provides a range of functionality assisting in creating a mobile drupal site . this functionality contains:
Code
function mobile_tools_roles_overview() {
$query = "SELECT * FROM {mobile_tools_roles_relations}";
$result = db_query($query);
$rows = array();
while ($item = db_fetch_object($result)) {
$query = "SELECT * FROM {role} WHERE rid = %d";
$result1 = db_query($query, $item->rid);
$result2 = db_query($query, $item->mrid);
$rows[] = array(
db_fetch_object($result1)->name,
db_fetch_object($result2)->name,
);
}
$headers = array(
"original role",
"mobile role",
);
if (count($rows) == 0) {
$output .= '<div class="message">No Mobile roles where assigned</div>';
}
else {
$output .= theme('table', $headers, $rows);
$output .= '<br>' . t('Configure the !permissions', array(
'!permissions' => l('permissions', 'admin/user/access'),
)) . '<br />';
}
return $output;
}