'; print '

Browser Control Panel

'; $username = $acc->getSetting('name'); if ($username == '') { print '

Not logged in. (Log in)'; } else { print '

Logged in as '.$username.'. (Log out)'; } print '

'; /////////////////////////////////////// // Debugging dump stuff /////////////////////////////////////// if ($acc->getPriv('developer')) { print '

Developer-Only Debugging Stuff

'; print '
'; } //////////////////////////////////////// // Section for settables and things similar to settables // // Mind that the select boxes require lame initialization code fbjs.php, so // keep that in sync with changes here. //////////////////////////////////////// print '

Current Settings

'; print '
'; //////////////////////////////////////// // Links to handy internal stuffs //////////////////////////////////////// if ($acc->getPriv('kb_fb_read')) { $kb = $acc->getSetting('kb'); $kb = str_replace(' (default)', '', $kb); $resources_url = RESOURCES_WEB."/$kb"; $resources_dir = RESOURCES_FS."/$kb"; print '

Internal Links

'; print '
'; } // bkdb TODO: dump the fbjump stuff in here for now. Later, we'll have curator instead if ($acc->getPriv('kb_fb_write')) { $populateOnly = true; $splitByPerson = true; $all_cats = $db->get_preds(FALSE); $all_rels = $db->get_preds(TRUE); $people = array("asaparov", "azariaa", "bbd", "bkisiel", "dwijaya", "eplatani", "estevam", "jayantk", "mitchell", "mg1", "ndapa", "shashans"); if (!$splitByPerson) $people = array("Everybody"); // Optionally restrict to preds that are populate=true $cats = array(); $rels = array(); foreach ($all_cats as $c) if (!$populateOnly || $c['populate']) $cats[] = $c; foreach ($all_rels as $r) if (!$populateOnly || $r['populate']) $rels[] = $r; $numP = sizeof($people); $numC = sizeof($cats); $numR = sizeof($rels); // Make mapping from pred to person, filtering slave relations, and getting OKI status $assign = array(); for ($p = 0; $p < sizeof($people); $p++) { $person = $people[$p]; $assign[$person]['cat'] = array(); $assign[$person]['rel'] = array(); for ($c = 0; $c < sizeof($cats); $c++) { if ($c % $numP == $p) { $pid = $cats[$c]['pid']; $pfbmap = fb_loadp($acc, $pid); $riestate = fb_get_riestate($pfbmap); if ($riestate[3] >= 0) { $cats[$c]['oki'] = $riestate[3]; } $assign[$person]['cat'][] = $cats[$c]; } } for ($r = 0; $r < sizeof($rels); $r++) { if ($rels[$r]['slave'] == 0) { if ($r % $numP == $p) { $pid = $rels[$r]['pid']; $pfbmap = fb_loadp($acc, $pid); $riestate = fb_get_riestate($pfbmap); if ($riestate[3] >= 0) { $rels[$r]['oki'] = $riestate[3]; } $assign[$person]['rel'][] = $rels[$r]; } } } } // Put current user at the top of the listing if possible $user = $acc->getSetting('name'); for ($p = 1; $p < sizeof($people); $p++) { if ($people[$p] == $user) { $tmp = $people[0]; $people[0] = $user; $people[$p] = $tmp; } } print '

Feedback Jump

'; print ''; } include('../inc/kb_footer.php'); ?>