/* Check to make sure we are connected to the database before allowing access to the home page. If not connected, go connect and initialize; otherwise, welcome the user.\ */ if(!database.connected()) redirect("init.htm"); client.numberofplans = 0; totalplanscursor = database.cursor("select * from benefit_plan", true); secondtotalplanscursor = database.cursor("select * from benefit_plan", true); while (totalplanscursor.next()) { client.numberofplans++; } project.lock(); cursor = database.cursor("select plan_code from primary_coverage order by plan_code"); project.unlock(); total = new MakeArray(client.numberofplans); while (cursor.next()) { total[cursor.plan_code]++; } Plan Summary

Below is a real-time listing of each benefit plan and the number of associated enrollees.

var i = 1; while (secondtotalplanscursor.next()) { write(""); i++; }
PlanTotal Enrollees
" + secondtotalplanscursor.plan_descp + " - $" + secondtotalplanscursor.plan_cost + "" + total[i] + "

Return to Main Menu