Control $statusMsg class on PHP list plugin

jo-ka

Member
Hello.
I have a PHP list plugin, and I'm using the $statusMsg variable to pass messages from the code to the Success Message.

I would like to control the CSS of the message, depending the message type, for example if the code return some error, I would like to have CSS Danger like.

How can I accomplish this?

Here's part of the code...

PHP:
if($obj->{'Resultado'}=='OK'){
      $update="UPDATE .... ";
      $db->setQuery($update);
      $db->query();
      $contOk++;
      //die($update);
      $statusMsg = "Success. - Green";
    }
    else if($obj->{'Erros'}->{'error_1'} == 'Juiz já revalidado na época') {
     $update="UPDATE .... ";
      $db->setQuery($update);
      $db->query();
      $contNok++;
      $statusMsg = "Watchout. - Yellow";
    }
    else {
      $update="UPDATE .... ";
      $db->setQuery($update);
      $db->query();
      $contNok++;
      $statusMsg = "Danger - Error";
    }

}

upload_2022-9-1_2-7-19.png
upload_2022-9-1_2-17-14.png
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top