I'm trying to get some php code to work in a Panel Pane.

In the code below, all my 'if' statements evaluate to 'false' because I'm missing something fundamental to how I access fields from a node. The panel is a Node View page and all the fields should refer to the node being viewed.

I'm hoping some kind Drupaler will tell me what I need to do to access these fields.

<?php
   $delta
= 1;
   
$workshopMenu = '<ul>';
   
// Description Link
   
$workshopMenu = $workshopMenu.'<li class="desc"><a href="#tabs-0-right-' . $delta . '"  title="Description">Description</a></li>';
      ++
$delta;
   
//  Video
   
if($vars['node']->field_workshop_video_reference['und'][0][nid]) {
     
$workshopMenu = $workshopMenu.'<li class="video"><a href="#tabs-0-right-'.$delta.'" title="Video">Video</a></li>';
      ++
$delta;
    }
   
// More Info Link
   
if($vars['node']->field_workshop_more_information['und'][0]['value'] || $vars['node']->field_workshop_things_to_bring['und'][0]['value']) {
     
$workshopMenu = $workshopMenu.'<li class="more-info"><a href="#tabs-0-right-'.$delta.'" title="More Information">More Information</a></li>';
      ++
$delta;
    }
   
// Continuing Education Link
   
print $vars['field_workshop_cont_ed']['und'];
    if(
$vars['field_workshop_cont_ed']['und']) {
     
$workshopMenu = $workshopMenu.'<li class="ce"><a href="#tabs-0-right-'.$delta.'"  title="Continuing Education">Continuing Education</a></li>';
      ++
$delta;
    }
   
// Schedule Link
   
if($vars['node']->field_workshop_schedule['und'][0]['value']) {
     
$workshopMenu = $workshopMenu.'<li class="ce"><a href="#tabs-0-right-'.$delta.'" title="Schedule">Schedule</a></li>';
      ++
$delta;
    }
   
// Teacher Links
    //if(count($vars['node']->field_workshop_people['und']) >= 9) {
   
if($vars['node']->field_workshop_people['und']) {
     
$workshopMenu = $workshopMenu.'<li class="teacher"><a href="#tabs-0-right-'.$delta.'" title="Workshop Teachers">Teachers</a></li>';
      ++
$delta;
    }
   
// ACC Link
   
if($vars['node']->field_workshop_acc_link['und'][0]['value']) {
     
$workshopMenu = $workshopMenu.'<li class="acc"><a href="'.$vars['node']->field_workshop_acc_link['und'][0]['value'].'" title="Accommodations & Commuter Fee">Accommodations & Commuter Fee</a></li>';
    } else {
     
$workshopMenu = $workshopMenu.'<li class="acc"><a href="/visit-us/rhinebeck-ny/planning-your-stay/accommodations" title="Accommodations & Commuter Fee">Accommodations & Commuter Fee</a></li>';
    }   
   
// Location Link
   
if($vars['node']->field_workshop_acc_link['und'][0]['value']) {
     
$location = node_load($vars['node']->field_workshop_campus['und'][0]['nid']);
     
$workshopMenu = $workshopMenu.'<li class="loc">'.l($location->title, 'node/'.$location->nid).'</li>';
    } else {
     
$workshopMenu = $workshopMenu.'<li class="loc"><a href="/visit-us/rhinebeck-ny/" title="Rhinebeck Campus Info">Rhinebeck Campus Info</a></li>';
    }
   
// Workshop Links
   
if($vars['node']->field_workshop_links['und'][0]['url']):
      foreach(
$vars['node']->field_workshop_links['und'] as $link) {
       
$workshopMenu = $workshopMenu.'<li class="extra">'.l($link['title'], $link['url']).'</li>';
      }
    endif;
   
// Cancelation Link
   
if($vars['node']->field_workshop_cancelation_link['und'][0]['value']) {
     
$workshopMenu = $workshopMenu.'<li class="cancel"><a href="'.$vars['node']->field_workshop_cancelation_link['und'][0]['value'].'" title="Cancellation Policy">Cancellation Policy</a></li>';
    } else {
     
$workshopMenu = $workshopMenu.'<li class="cancel"><a href="/workshops/cancellation-refund-policy" title="Cancellation Policy">Cancellation Policy</a></li>';
    }
   
$workshopMenu = '<div id="workshop-menu" class="block-menu block">'.$workshopMenu.'</ul></div>';
    print
$workshopMenu;
?>