public function showVersionStatus()
        {
                $update_needed = false;

        $output = "<table class='tableBorder'>";
                $output .= "<tr><td class='tableHead' colspan='2'>IDS Version</td></tr>";

                $output .= "<tr><td class='tableCell' valign='top'>Filter:</td>\n<td class='tableCell'>";
                if ($this->isRulesUpdated()) {
                        $output .=  "<span style='color: green;'>aktuell.</span>";
                } else {
                        $output .=  "<span style='color: red;'>nicht aktuell.</span>";
                        $update_needed = true;
                }
                $output .= "<br />Letzte lokale &Auml;nderung: <strong>".$this->getLastRulesUpdate()."</strong><br />";
                $output .= "Letzte &Auml;nderung auf php-ids.org: <strong>".$this->getLastFileUpdate(self::FILENAME_RULES)."</strong><br />";
                $output .= "SHA-1 Hash: <br /> <code>".$this->getLocalFileHash(self::FILENAME_RULES)."</code>";
                if (!$this->isRulesUpdated()) {
                        $output .= "(local)<br /> <code>".$this->getCurrentFileHash(self::FILENAME_RULES)."</code>(remote)";
                }
                $output .= "</td></tr>";

                $output .= "<tr><td class='tableCell' valign='top'>Converter:</td>\n<td class='tableCell'>";
                if ($this->isConverterUpdated()) {
                        $output .=  "<span style='color: green;'>aktuell.</span>";
                } else {
                        $output .=  "<span style='color: red;'>nicht aktuell.</span>";
                        $update_needed = true;
                }
                $output .= "<br />Letzte lokale &Auml;nderung: <strong>".$this->getLastConverterUpdate()."</strong><br />";
                $output .= "Letzte &Auml;nderung auf php-ids.org: <strong>".$this->getLastFileUpdate(self::FILENAME_CONVERTER)."</strong><br />";
                $output .= "SHA-1 Hash: <br /> <code>".$this->getLocalFileHash(self::FILENAME_CONVERTER)."</code>";
                if (!$this->isConverterUpdated()) {
                        $output .= "(local)<br /> <code>".$this->getCurrentFileHash(self::FILENAME_CONVERTER)."</code>(remote)";
                }
                $output .= "</td></tr>";

                // is update possible?
                if (!$this->isRulesUpdated() || !$this->isConverterUpdated()) {
                        $output .= "<tr><td class='tableCell'> </td>\n<td class='tableCell'>";
                        if ($this->isWritable() && function_exists("curl_init")) {
                                $output .= "<form method='POST'>";
                                $output .= "<input type='submit' name='update_phpids' value='Automatisch Aktualisieren' />";
                                $output .= "</form>";
                        } else {
                                $output .= "Kein automatisches Update verf&uuml;gbar. (Dateien beschreibbar/ Curl-Extension verf&uuml;gbar?)";
                        }
                        $output .= "</td></tr>";
                }

                $output .= "</table>";

                return $output;
        }
public function showVersionStatus()
        {
                $update_needed = false;

        $output = "<table class='tableBorder'>";
                $output .= "<tr><td class='tableHead' colspan='2'>IDS Version</td></tr>";

                $output .= "<tr><td class='tableCell' valign='top'>Filter:</td>\n<td class='tableCell'>";
                if ($this->isRulesUpdated()) {
                        $output .=  "<span style='color: green;'>aktuell.</span>";
                } else {
                        $output .=  "<span style='color: red;'>nicht aktuell.</span>";
                        $update_needed = true;
                }
                $output .= "<br />Letzte lokale &Auml;nderung: <strong>".$this->getLastRulesUpdate()."</strong><br />";
                $output .= "Letzte &Auml;nderung auf php-ids.org: <strong>".$this->getLastFileUpdate(self::FILENAME_RULES)."</strong><br />";
                $output .= "SHA-1 Hash: <br /> <code>".$this->getLocalFileHash(self::FILENAME_RULES)."</code>";
                if (!$this->isRulesUpdated()) {
                        $output .= "(local)<br /> <code>".$this->getCurrentFileHash(self::FILENAME_RULES)."</code>(remote)";
                }
                $output .= "</td></tr>";

                $output .= "<tr><td class='tableCell' valign='top'>Converter:</td>\n<td class='tableCell'>";
                if ($this->isConverterUpdated()) {
                        $output .=  "<span style='color: green;'>aktuell.</span>";
                } else {
                        $output .=  "<span style='color: red;'>nicht aktuell.</span>";
                        $update_needed = true;
                }
                $output .= "<br />Letzte lokale &Auml;nderung: <strong>".$this->getLastConverterUpdate()."</strong><br />";
                $output .= "Letzte &Auml;nderung auf php-ids.org: <strong>".$this->getLastFileUpdate(self::FILENAME_CONVERTER)."</strong><br />";
                $output .= "SHA-1 Hash: <br /> <code>".$this->getLocalFileHash(self::FILENAME_CONVERTER)."</code>";
                if (!$this->isConverterUpdated()) {
                        $output .= "(local)<br /> <code>".$this->getCurrentFileHash(self::FILENAME_CONVERTER)."</code>(remote)";
                }
                $output .= "</td></tr>";

                // is update possible?
                if (!$this->isRulesUpdated() || !$this->isConverterUpdated()) {
                        $output .= "<tr><td class='tableCell'> </td>\n<td class='tableCell'>";
                        if ($this->isWritable() && function_exists("curl_init")) {
                                $output .= "<form method='POST'>";
                                $output .= "<input type='submit' name='update_phpids' value='Automatisch Aktualisieren' />";
                                $output .= "</form>";
                        } else {
                                $output .= "Kein automatisches Update verf&uuml;gbar. (Dateien beschreibbar/ Curl-Extension verf&uuml;gbar?)";
                        }
                        $output .= "</td></tr>";
                }

                $output .= "</table>";

                return $output;
        }
public function showVersionStatus ( ) { $ update_needed = false ; $ output = "<table class='tableBorder'>" ; $ output .= "<tr><td class='tableHead' colspan='2'>IDS Version</td></tr>" ; $ output .= "<tr><td class='tableCell' valign='top'>Filter:</td>\n<td class='tableCell'>" ; if ( $ this -> isRulesUpdated ( ) ) { $ output .= "<span style='color: green;'>aktuell.</span>" ; } else { $ output .= "<span style='color: red;'>nicht aktuell.</span>" ; $ update_needed = true ; } $ output .= "<br />Letzte lokale &Auml;nderung: <strong>" . $ this -> getLastRulesUpdate ( ) . "</strong><br />" ; $ output .= "Letzte &Auml;nderung auf php-ids.org: <strong>" . $ this -> getLastFileUpdate ( self :: FILENAME_RULES ) . "</strong><br />" ; $ output .= "SHA-1 Hash: <br /> <code>" . $ this -> getLocalFileHash ( self :: FILENAME_RULES ) . "</code>" ; if ( ! $ this -> isRulesUpdated ( ) ) { $ output .= "(local)<br /> <code>" . $ this -> getCurrentFileHash ( self :: FILENAME_RULES ) . "</code>(remote)" ; } $ output .= "</td></tr>" ; $ output .= "<tr><td class='tableCell' valign='top'>Converter:</td>\n<td class='tableCell'>" ; if ( $ this -> isConverterUpdated ( ) ) { $ output .= "<span style='color: green;'>aktuell.</span>" ; } else { $ output .= "<span style='color: red;'>nicht aktuell.</span>" ; $ update_needed = true ; } $ output .= "<br />Letzte lokale &Auml;nderung: <strong>" . $ this -> getLastConverterUpdate ( ) . "</strong><br />" ; $ output .= "Letzte &Auml;nderung auf php-ids.org: <strong>" . $ this -> getLastFileUpdate ( self :: FILENAME_CONVERTER ) . "</strong><br />" ; $ output .= "SHA-1 Hash: <br /> <code>" . $ this -> getLocalFileHash ( self :: FILENAME_CONVERTER ) . "</code>" ; if ( ! $ this -> isConverterUpdated ( ) ) { $ output .= "(local)<br /> <code>" . $ this -> getCurrentFileHash ( self :: FILENAME_CONVERTER ) . "</code>(remote)" ; } $ output .= "</td></tr>" ; // is update possible? if ( ! $ this -> isRulesUpdated ( ) || ! $ this -> isConverterUpdated ( ) ) { $ output .= "<tr><td class='tableCell'> </td>\n<td class='tableCell'>" ; if ( $ this -> isWritable ( ) && function_exists ( "curl_init" ) ) { $ output .= "<form method='POST'>" ; $ output .= "<input type='submit' name='update_phpids' value='Automatisch Aktualisieren' />" ; $ output .= "</form>" ; } else { $ output .= "Kein automatisches Update verf&uuml;gbar. (Dateien beschreibbar/ Curl-Extension verf&uuml;gbar?)" ; } $ output .= "</td></tr>" ; } $ output .= "</table>" ; return $ output ; }
Show version status table
Show version status table