Please help Multi button with debounce

I am new in Arduino, I am try to use multi button input in my project. It work but alway cause false alarm by turn on/off light or fan. So kindly help help me to correct the code.
-For on/off button: I use code from the forum to debouce 3s. It work well but only for single button.(don’t cause false alarm)
-For multi button: I use code as below. It work but cause false alarm when I turn off/on Light or fan(ie the alarm activated when the button have not pressed yet).
Please help me.
Thank you very much.
Code:

/**
MULTI BUTTON
*/
#include <LiquidCrystal.h>
LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
#include <Button.h>
const int buttonPin = 29;
const int ledPin = 49;
int ledState = HIGH;
int buttonState;
int lastButtonState = LOW;
long lastDebounceTime = 0;
long debounceDelay = 300;

Button button = Button(31,BUTTON_PULLUP_INTERNAL);//kho gas
Button button1 = Button(33,BUTTON_PULLUP_INTERNAL);//ban 1,2
Button button2 = Button(35,BUTTON_PULLUP_INTERNAL);//ban 3,4,5
Button button3 = Button(37,BUTTON_PULLUP_INTERNAL);//ban 6
Button button4 = Button(39,BUTTON_PULLUP_INTERNAL);//ban 7
Button button5 = Button(41,BUTTON_PULLUP_INTERNAL);//ban 8
Button button6 = Button(43,BUTTON_PULLUP_INTERNAL);//testing
Button button7 = Button(45,BUTTON_PULLUP_INTERNAL);//em

void setup()
{
lcd.begin(16, 2);
lcd.setCursor(0,0);
lcd.print(" SYSTEM STARTING “);
lcd.setCursor(0,1);
lcd.print(” PLEASE WAIT “);
delay(1000);
lcd.setCursor(0,0);
lcd.print(“TU BAO GAS BY LP”);
lcd.setCursor(0,1);
lcd.print(” V0 20/11/2014 “);
delay(2000);
lcd.clear();
lcd.print(” LPG “);
lcd.setCursor(0,1);
lcd.print(” NORMAL STATUS ");
pinMode(buttonPin, INPUT);//start button
pinMode(ledPin, OUTPUT);//output relay

pinMode(47,OUTPUT);//output alarm
}

void loop(){
{
/*
FOR ON/OFF BUTTON: WORKING WELL (PRESS AND HOLD 3S)

/
int reading = digitalRead(buttonPin);
if (reading != lastButtonState) {
lastDebounceTime = millis();
}
if ((millis() - lastDebounceTime) > debounceDelay) {
if (reading != buttonState) {
buttonState = reading;
if (buttonState == HIGH) {
ledState = !ledState;
}
}
}
digitalWrite(ledPin, ledState);
lastButtonState = reading;
}
/

FOR MULTI BUTTON INPUT FROM BUTTON TO BUTTON 8
Wire like this:
GND -----/ button ------ pin
*/
{
if(button.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" GAS XI “);
lcd.setCursor(0,1);
lcd.print(” KHO GAS ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}

}
else if(button1.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" GAS XI “);
lcd.setCursor(0,1);
lcd.print(” BAN SO 1,2 “);
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}
else if(button2.isPressed())
{
lcd.setCursor(0,0);
lcd.print(” GAS XI “);
lcd.setCursor(0,1);
lcd.print(” BAN SO 3,4,5 ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}

else if(button3.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" GAS XI “);
lcd.setCursor(0,1);
lcd.print(” BAN SO 6 ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}

else if(button4.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" GAS XI “);
lcd.setCursor(0,1);
lcd.print(” BAN SO 7 ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}

else if(button5.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" GAS XI “);
lcd.setCursor(0,1);
lcd.print(” BAN SO 8 ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}

else if(button6.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" LPG PANEL “);
lcd.setCursor(0,1);
lcd.print(” SYSTEM TEST ");
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}

else if(button7.isPressed())
{
lcd.setCursor(0,0);
lcd.print(" EM STOP “);
lcd.setCursor(0,1);
lcd.print(” SYSTEM LOCK “);
{ boolean latch = true;
while(latch){
digitalWrite(47,LOW);
}}
}
else
{
digitalWrite(47,HIGH);
lcd.setCursor(0,0);
lcd.print(” LPG “);
lcd.setCursor(0,1);
lcd.print(” NORMAL STATUS ");
}
}
}

You might get some ideas from the simple debounce procedure in several things at a time but it doesn't use the button library and I don't know anything about that library.

...R

Thank Robin2