From: Valerie Pond Date: Tue, 7 Feb 2023 01:37:03 +0000 (+0000) Subject: Make Plugins page and require email for plugins X-Git-Tag: 0.9~334 X-Git-Url: https://jfr.im/git/irc/unrealircd/unrealircd-webpanel.git/commitdiff_plain/b65f04962537513f9195e7869cbd39eab1380440?hp=--cc Make Plugins page and require email for plugins --- b65f04962537513f9195e7869cbd39eab1380440 diff --git a/common.php b/common.php index b9f40db..d134290 100644 --- a/common.php +++ b/common.php @@ -32,7 +32,10 @@ $pages = Array( "Tools" => [ "IP WHOIS" => "tools/ip-whois.php", ], - "Settings" => "settings", + "Settings" => [ + "Panel Users" => "settings", + "Plugins" => "settings/plugins.php", + ], "News" => "news.php", ); diff --git a/plugins.php b/plugins.php index 969479e..de3307e 100644 --- a/plugins.php +++ b/plugins.php @@ -55,6 +55,7 @@ class Plugin public $version; public $description; public $handle; + public $email; public $error = NULL; function __construct($handle) @@ -84,6 +85,8 @@ class Plugin $this->error = "Plugin version not defined"; elseif (!isset($plugin->description)) $this->error = "Plugin description not defined"; + elseif (!isset($plugin->email)) + $this->error = "Plugin email not defined"; else { $this->handle = $handle; @@ -91,6 +94,7 @@ class Plugin $this->author = $plugin->author; $this->version = $plugin->version; $this->description = $plugin->description; + $this->email = $plugin->email; } } } diff --git a/plugins/example_plugin/example_plugin.php b/plugins/example_plugin/example_plugin.php index eeb6e9d..0ae218f 100644 --- a/plugins/example_plugin/example_plugin.php +++ b/plugins/example_plugin/example_plugin.php @@ -6,6 +6,7 @@ class example_plugin public $author = "Valware"; public $version = "1.0"; public $description = "An example plugin to show how to make stuff"; + public $email = "v.a.pond@outlook.com"; function __construct() { diff --git a/plugins/php_mailer/php_mailer.php b/plugins/php_mailer/php_mailer.php index 24f5de4..226c7ee 100644 --- a/plugins/php_mailer/php_mailer.php +++ b/plugins/php_mailer/php_mailer.php @@ -9,6 +9,7 @@ class php_mailer public $author = "Valware"; public $version = "1.0"; public $description = "Send mail using PHPMailer()"; + public $email = "v.a.pond@outlook.com"; function __construct() { @@ -41,9 +42,8 @@ class php_mailer $mail->AltBody = 'This is the body in plain text for non-HTML mail clients'; $mail->send(); - echo 'Message has been sent'; } catch (Exception $e) { - echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; + die("Could not send mail:". $e); } } diff --git a/plugins/sql_auth/sql_auth.php b/plugins/sql_auth/sql_auth.php index 122d0f2..f3ffcf5 100644 --- a/plugins/sql_auth/sql_auth.php +++ b/plugins/sql_auth/sql_auth.php @@ -9,6 +9,7 @@ class sql_auth public $author = "Valware"; public $version = "1.0"; public $description = "Provides a User Auth and Management Panel with an SQL backend"; + public $email = "v.a.pond@outlook.com"; function __construct() { diff --git a/settings/plugins.php b/settings/plugins.php new file mode 100644 index 0000000..ac574aa --- /dev/null +++ b/settings/plugins.php @@ -0,0 +1,39 @@ + + +

Active Plugins

+
+To load and unload plugins, see the PLUGINS section of your config.php
+
+ + + + + + + + + + + + + "; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + echo ""; + } + ?> + +
Plugin NameHandleVersionDescriptionAuthorContact
".$plugin->name."".$plugin->handle."".$plugin->version."".$plugin->description."".$plugin->author."".$plugin->email."
\ No newline at end of file