You are here

function makemeeting_mypage in Make Meeting Scheduler 6

Same name and namespace in other branches
  1. 7 makemeeting.pages.inc \makemeeting_mypage()

Show own polls page Only authenticated users can access this page

1 string reference to 'makemeeting_mypage'
makemeeting_menu in ./makemeeting.module
Implements hook_menu().

File

./makemeeting.pages.inc, line 121

Code

function makemeeting_mypage() {
  global $user;

  // get my polls from the database
  $res = db_query("SELECT n.title, p.url, p.admin_url FROM {makemeeting_poll_heads} as p JOIN {node} as n ON p.nid = n.nid WHERE (n.type = 'makemeeting' OR n.type = 'makemeeting_simplepoll') AND n.uid = %d ORDER BY n.created DESC", $user->uid);
  $data = array();
  while ($row = db_fetch_array($res)) {
    $data[] = $row;
  }

  // set the navigation line
  drupal_set_breadcrumb(array(
    l(t('Home'), NULL),
    l(t('Make Meetings'), 'makemeeting'),
    l(t('List of my polls'), 'makemeeting/mypage'),
  ));

  // returning information using makemeeting_mypage theme
  return theme("makemeeting_mypage", $data);
}