function brilliant_gallery_checklist_loadall in Brilliant Gallery 6.3
Same name and namespace in other branches
- 5.4 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 5.3 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 6.4 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 6 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 6.2 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 7.2 OLD_brilliant_gallery.module \brilliant_gallery_checklist_loadall()
- 7 brilliant_gallery.module \brilliant_gallery_checklist_loadall()
1 string reference to 'brilliant_gallery_checklist_loadall'
File
- ./
brilliant_gallery.module, line 100
Code
function brilliant_gallery_checklist_loadall($nid = '') {
global $user;
$GLOBALS['devel_shutdown'] = FALSE;
$uid = $user->uid;
$dcvals = array();
// any checkbox id that starts with user- we remember the current user's settings
// any other id is global and we use user=0
$result = db_query("select qid,state from {brilliant_gallery_checklist} " . " where nid=%d and qid not like 'user-%' and user=0 " . " union " . "select qid,state from {brilliant_gallery_checklist} " . "where nid=%d and qid like 'user-%' and user=%d ", $nid, $nid, $uid);
$count = 0;
while ($data = db_fetch_object($result)) {
$dcvals[$count] = array(
qid => $data->qid,
state => $data->state,
);
$count++;
}
print drupal_to_js($dcvals);
exit;
}