Two functions work simultaneously and i don't know where the problem is

Hello! I want to control an application using arduino that is connected to a server. I want to make it work offline too. When the server is connected, both functions are working, and when i go offline, the ManualControl works untill the first if(), if(s=="albastru"). This is a program that controls 2 LED's and you can type which one of them to be ON or OFF, or you can control Both of them in the same time. What should i do?

#include <SPI.h>
#include <Ethernet.h>
byte mac[] = { 0x90, 0xA2, 0xDA, 0x11, 0x0E, 0xB9 };
byte ip[] = { 192, 168, 63, 154 };
byte server[] = { 192, 168, 63, 148 }; //connect to this server
EthernetClient client;
String c;
void setup()
{
  Serial.begin(9600);
  Ethernet.begin(mac, ip);
  pinMode(8, OUTPUT); //LED 1
  pinMode(9, OUTPUT); //LED 2
  Serial.println(F("Connecting..."));
  if (Ethernet.linkStatus() == LinkOFF) {
      Serial.println("Ethernet cable is not connected.");
    }
  if (client.connect(server, 1111)) {
    Serial.println(F("Connected"));
    Serial.println(F("Hello USER"));
    client.println();
  }
  else {
    Serial.println(F("No Internet Connection"));
    Serial.println(F("Connection failed"));
  }
  delay(1000); //Ethernet shield initialize
}

void loop()

{

  if (client.available())        
    {     ServerControl();} //Online Control
  else
      {   ManualControl(); } //Offline Control
}  

void ServerControl()
  {     c = client.readStringUntil('\r');
          Serial.println(c); 
    if(c=="albastru") //Blue LED ON
      {   
          client.println(F(" Led Albastru Pornit"));
          Serial.println(F(" Led albastru pornit"));
          digitalWrite(8, HIGH);
      }
          
    if(c=="galben") //Yellow LED ON
      {
          client.println(F(" Led Galben Pornit"));
          Serial.println(F(" Led Galben Pornit"));
          digitalWrite(9, HIGH);
      }
    if(c=="toate oprite") //ALL OFF
      {   client.println(F(" Leduri Oprite"));
          Serial.println(F(" Leduri Oprite"));
          digitalWrite(8, LOW);
          digitalWrite(9, LOW);
      }   
    if(c=="toate pornite") //ALL ON
      {   client.println(F(" Leduri Pornite"));
          Serial.println(F(" Leduri Pornite"));
          digitalWrite(8, HIGH);
          digitalWrite(9, HIGH);
      }
    if(c=="albastru oprit") //BLUE OFF
      {
          client.println(F(" Led Albastru OPRIT"));
          Serial.println(F(" Led Albastru OPRIT"));
          digitalWrite(8, LOW);
      }    
    if(c=="galben oprit") //YELLOW OFF
      {
          client.println(F(" Led Galben OPRIT"));
          Serial.println(F(" Led Galben OPRIT"));
          digitalWrite(9, LOW);
      }
  }

void ManualControl() 
  { 
      String s;
      s = Serial.readStringUntil('\r');
      Serial.println(s); 
      if(s=="albastru") //BLUE ON
      {     
          Serial.println(F(" Led albastru pornit"));
          digitalWrite(8, HIGH);
      }         
      if(s=="galben") //YELLOW ON
      {      
          Serial.println(F(" Led Galben Pornit"));
          digitalWrite(9, HIGH);
      }
      if(s=="toate oprite") //ALL OFF
      {   
          Serial.println(F(" Leduri Oprite"));
          digitalWrite(8, LOW);
          digitalWrite(9, LOW);
      }   
      if(s=="toate pornite") //ALL ON
      {   
          Serial.println(F(" Leduri Pornite"));
          digitalWrite(8, HIGH);
          digitalWrite(9, HIGH);
      }
      if(s=="albastru oprit") //BLUE OFF
      {     
          Serial.println(F(" Led Albastru OPRIT"));
          digitalWrite(8, LOW);
      }    
      if(s=="galben oprit") //YELLOW OFF
      {   
          Serial.println(F(" Led Galben OPRIT"));
          digitalWrite(9, LOW);
      }
 }

Thank you!

Please don't use single character variable names. It would be impossible to search for all the instances of a variable called 'c' or 's'

Meaningful variable names make a program much easier to understand and less likely to contain errors.

It is not a good idea to use the String (capital S) class on an Arduino as it can cause memory corruption in the small memory on an Arduino. This can happen after the program has been running perfectly for some time. Just use cstrings - char arrays terminated with '\0' (NULL).

...R