Need help on the shell script

Hi all,
Im a newbie to Unixshell script .Please explain me what this below shell script does and assistance with me a description

################################
#   CODE                 #
################################
if [[ $# -ne 4 ]]
then
    echo "Usage: $(basename $0) \$SS_APPL \$SS_DB \$S_U_PATH \$SS_HOME_PATH"
    MESSAGE="Invalid number of input parameters"
    ERROR_CODE=1
else
   export CURR_YEAR=`date +%Y`
   export CURR_DATE=`date +%d%b%Y_%H%M%S`
   export SS_APPL=$1
   export SS_DB=$2
   export S_U_PATH=$3
   export SS_HOME_PATH=$4
   export LOGDIR=${S_U_PATH}/backup/logs
   export LOGFILE=$LOGDIR/$SS_DB.restructure.log
   export SCRIPTS_DIR=${S_U_PATH}/backup/scripts
   export PATH=$PATH:${S_U_PATH}/backup/scripts
   export HYPERION_HOME=${SS_HOME_PATH}/hyperion
   export ARBORPATH=${SS_HOME_PATH}/hyperion/products/SSbase/SSbaseServer
   export SSBASEPATH=${SS_HOME_PATH}/hyperion/products/SSbase/SSbaseServer
   export SSLANG=English_UnitedStates.Latin1@Binary
   export LD_LIBRARY_PATH=${HYPERION_HOME}/common/JRE-64/Sun/1.5.0/lib/amd64/server:$HYPERION_HOME/common/JRE-   
64/Sun/1.5.0/lib/amd64:$HYPERION_HOME/common/ODBC-64/Meran/5.2/lib:$SSBASEPATH/bin:$LD_LIBRARY_PATH
  export PATH=${ARBORPATH}/bin:$PATH
  export LOGDIR=${S_U_PATH}/backup/logs
  BLANK=" "
  MAILGRP=${SCRIPTS_DIR}/o.notify
  MAILGRP1=${SCRIPTS_DIR}/o.notify_ap1
  MAILGROUP1=${SCRIPTS_DIR}/o.notify_ap1
  MESSAGE1="Success"
  BORAPPL=${SS_HOME_PATH}/hyperion/products/SSbase/SSbaseServer/app/$SS_APPL
  echo  $SS_APPL $SS_DB "Restructure started at : `date`" > $LOGFILE
   echo  $BLANK >> $LOGFILE
   echo  $BLANK >> $LOGFILE
   ERROR_CODE=0
fi

What the script does is to set/export necessary environment and library variables in the server for reference.

Please use code tags in future posts.