Auto lighting system(LDR) + Security System(PIR+LCD Display)

Hello, i am currently doing an auto lighting system using LDR and Security System using PIR sensor and LCD display. I am having problems with the Security system part. Imagine 3 rooms, one room on the left side has a PIR sensor and 2 LED's( one related to PIR and one more connected to LDR).One room in the middle is the post guard in which the LCD display and a blinking LED is attached to it. The last one on the right has an LDR and one LED. I am having problems with the PIR sensor room. Firsly, let me explain, the LDR turns on when you flash a light on it(basic). So when the LDR is shed with light, one LED from the room with PIR lights up,and the one with LDR lights up aswell.Think of it as a auto lighting system inside an office.The two being rooms in an office.

So "during the night", when the PIR senses a motion, the other LED in that room, lights up(think of it as a spotlight) and another LED(located in the post guard blinks to alert the guard). In addition to this, the LCD will also display "Danger in room1". Keep in mind that the LDR is not related at all to the PIR sensor, just one LED located inside the room with the PIR.

So i did 2 void loops(void Pirsensor & void LDR) since the PIR is independent of the LDR. My problem with the coding is, when the motion is sensed(HIGH), yes, it works, the "spotlight" stays on,the LED in the post guard blinks, and the LCD displays, but when the loop ends, all the above goes off. Eventhough the motion is still high, all the above still goes off after the loop ends, and starts over. So what i want to know is,how do i make all the above stay on, while motion is still high?

I have attached my codings, and i know they're pretty basic but im still new, and hope you will help me out. Pls focus on the PIR+LCD part. Thank You

proje.txt (1.26 KB)

The codings if it bothers you to donwload the text,

#include <LiquidCrystal.h>

LiquidCrystal lcd(12, 11, 5, 4, 3, 2);
int led1 = 6;
int led2 = 7;
int led3 = 13;
int pirPin = 8;
int valpir = 0;
int ldrPin = A0;
int ldrVal = 0;

void setup() {
Serial.begin(9600);
lcd.begin(16, 2);
pinMode(led1, OUTPUT);
pinMode(led2, OUTPUT);
pinMode(led3,OUTPUT);

}
void loop() {
SensorPir();
SensorLdr();
}

void SensorPir(){

valpir = digitalRead(pirPin);

if ( valpir==HIGH){

lcd.setCursor(1,0);
lcd.print("Warning Room1");
digitalWrite(led1,HIGH);
digitalWrite(led2,LOW);
delay(1000);
digitalWrite(led2,HIGH);
delay(1000);
digitalWrite(led2,LOW);
delay(1000);
digitalWrite(led2,HIGH);
delay(1000);
digitalWrite(led2,LOW);
delay(1000);
digitalWrite(led2,HIGH);
delay(1000);

}

else if(valpir==LOW)
{

digitalWrite(led1,LOW);
digitalWrite(led2,LOW);
lcd.clear();
}

else{
lcd.clear();

}
}

void SensorLdr(){

ldrVal = analogRead(ldrPin);

if(ldrVal <= 300 && ldrVal >= 0){
digitalWrite(led3, HIGH);
}
else if(ldrVal <= 600 && ldrVal >= 300){
digitalWrite(led3, LOW);}

else{}

}

pls focus on the PIR part, i need to know how to make the loop(void sensorPIR) continues while the motion is still HIGH.Thank You