public void deleteCalendar(String calendar, String user) {

		boolean active;
		String activeBoolean = null;

		try {
			String table = "calendars";
			String[] fields = {"active", "createdBy"};
			String[] fieldsUpdate = {"active"};

			crs = qb.selectFrom(fields, table).where("calendar", "=", calendar).executeQuery();

			if(crs.next()) {
				String username = crs.getString("createdBy");

				if(username.equals(user) || user.equals("admin")) {
					active = crs.getBoolean("active");

					if(active) {
						activeBoolean = "0";
					} else if (!active){
						activeBoolean = "1";
					}
					if(!activeBoolean.equals(null)) {
						String[] values = {activeBoolean};

						qb.update(table, fieldsUpdate, values).where("calendar", "=", calendar).execute();
					}
				}
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				crs.close();
			} catch (SQLException e) {
				e.printStackTrace();
			}
		}
	}