// Common functions
require_once 'plc_functions.php';
require_once 'plc_peers.php';
-require_once 'plc_minitabs.php';
-require_once 'plc_tables.php';
+require_once 'linetabs.php';
+require_once 'table.php';
//fix the memory limit for this page
ini_set("memory_limit","48M");
// --- decoration
$title="Accounts";
$tabs=array();
-$tabs['My accounts'] = array('url'=>l_persons(),
- 'values'=>array('site_id'=>plc_my_site_id()),
- 'bubble'=>'Lists accounts on site ' . plc_my_site_id());
+$tabs []= tab_persons_mysite();
+
+if (plc_is_admin())
+ $tabs []= tab_persons_local();
// --------------------
$person_filter=array();
$name=$site['name'];
$login_base=$site['login_base'];
$title .= t_site($site);
- $tabs = array_merge($tabs,tabs_site($site));
$person_filter['person_id']=$site['person_ids'];
- if ($site_id == plc_my_site_id())
- unset($tabs['My accounts']);
+ if ($site_id != plc_my_site_id())
+ $tabs []= tab_site($site);
}
if ($slice_id) {
$slices=$api->GetSlices(array($slice_id),array('person_ids','name'));
$slice=$slices[0];
$title .= t_slice($slice);
- $tabs = array_merge($tabs,tabs_slice($slice));
+ $tabs []= tab_slice($slice);
$person_filter['person_id'] = $slice['person_ids'];
}
// --------------------
drupal_set_title($title);
-plc_tabs($tabs);
+plekit_linetabs($tabs);
if ( ! $persons ) {
drupal_set_message ('No account found');
}
$headers = array ("Peer"=>"string",
- "Roles"=>"string",
"First"=>"string",
"Last"=>"string",
"Email"=>"string",
"Site" => "string",
+ "R"=>"string",
"S" => "int",
"Status"=>"string",
);
// initial sort on email
-$table=new PlcTable("persons",$headers,4);
+$table=new PlekitTable("persons",$headers,3);
$table->start();
$peers=new Peers ($api);
+
// write rows
foreach ($persons as $person) {
$table->row_start();
$table->cell($shortname);
- $table->cell($roles);
$table->cell ($person['first_name']);
$table->cell ($person['last_name']);
$table->cell(l_person_t($person_id,$email));
- $table->cell($login_base);
+ $table->cell(l_site_t($site_id,$login_base));
+ $table->cell($roles);
$table->cell(count($person['slice_ids']));
$table->cell(person_status($person));
$table->row_end();
$notes=array("The S column shows the number of slices for the given user");
$table->end(array('notes'=>$notes));
+//plekit_linetabs ($tabs,"bottom");
+
// Print footer
include 'plc_footer.php';