Custom Drupal & PHP Code for REPDA