padding-top: 15px; width: 45px; margin: 10px; color: white; } .site-online{ background-color: green; } .site-offline{ background-color: red; } EOL; Yii::app()->clientScript->registerCss("circle-ness", $newStyle); /*Check class */ $sc = new ServerCheck($data->websiteURL); if ($sc->getServerStatus() === "OFFLINE") { $classname = "site-offline"; //report to sir about the incident $mailer = new YiiMailer(); $mailer->setView('contact'); $mailer->setData(array("websiteURL" => $data->websiteURL, "accountName" => $data->claimAccountName, "description" => "We cant seem to ping these website please double check these website.")); $mailer->setFrom("*****@*****.**"); $mailer->setTo("*****@*****.**"); $mailer->setSubject(" {$data->claimAccountName}- Went Down"); $mailer->send(); } else { } $applicationStatus = $data->application_status == Accounts::OK ? "site-online" : "site-offline"; $dataBaseApplication = $data->database_status == Accounts::OK ? "site-online" : "site-offline"; ?>