| 1 |
<?php |
<?php |
| 2 |
// $Id: timemap.module,v 1.1 2008/06/02 03:43:49 sethfreach Exp $ |
// $Id: timemap.module,v 1.1.2.1 2008/06/04 13:59:06 sethfreach Exp $ |
| 3 |
|
|
| 4 |
/** |
/** |
| 5 |
* @file |
* @file |
| 457 |
drupal_add_js(drupal_get_path('module', 'timemap') ."/timemap_simile-timeline.js"); |
drupal_add_js(drupal_get_path('module', 'timemap') ."/timemap_simile-timeline.js"); |
| 458 |
drupal_add_css(drupal_get_path('module', 'timemap') ."/timemap.css"); |
drupal_add_css(drupal_get_path('module', 'timemap') ."/timemap.css"); |
| 459 |
|
|
| 460 |
return $people_chooser .'<div id="time_map" uid="'. $uid .'" offset="'. $user->timezone .'"></div><div class="time_controls" id="time_controls"></div>'; |
return $people_chooser .'<div id="time_map" basepath="'. base_path() .'" uid="'. $uid .'" offset="'. $user->timezone .'"></div><div class="time_controls" id="time_controls"></div>'; |
| 461 |
|
|
| 462 |
} |
} |
| 463 |
|
|
| 542 |
function timemap_viewable_reports_list() { |
function timemap_viewable_reports_list() { |
| 543 |
global $user; |
global $user; |
| 544 |
|
|
| 545 |
|
if ($user->uid == 1) { |
| 546 |
|
$names = array(1, $user->name); |
| 547 |
|
} |
| 548 |
|
|
| 549 |
// view all? |
// view all? |
| 550 |
if (user_access('view all reports')) { |
if ( user_access('view all reports') || ($user->uid == 1) ) { |
| 551 |
$result = db_query("select distinct uid from {timemap_doings}"); |
$result = db_query("select distinct uid from {timemap_doings}"); |
| 552 |
while ($row = db_fetch_object($result)) { |
while ($row = db_fetch_object($result)) { |
| 553 |
$userrec = user_load(array('uid' => $row->uid)); |
$userrec = user_load(array('uid' => $row->uid)); |