</body>

<footer>
  <?php
  if ($_SERVER['SCRIPT_NAME'] == '/user.php') {
    $args = [];
    $arr = explode('&', $_SERVER['QUERY_STRING']);

    foreach ($arr as $a) {
      $tmp = explode('=', $a);
      $key = $tmp[0];
      $value = $tmp[1];

      $args[$key] = $value;
    }

    if (isset($args['action'])) {
      if ($args['action'] == 'signup') {
        echo '
  <script src="js/profile_picture_cropper_modal.js"></script>
  <script src="js/upload.js"></script>
';
      } else if ($args['action'] == 'view') {
        echo '<script src="js/user_actions_modal.js"></script>
';
      }
    }
  }
  ?>
</footer>

</html>
