diff --git a/MediaServe.php b/MediaServe.php index 431c9e6..bc47420 100644 --- a/MediaServe.php +++ b/MediaServe.php @@ -67,6 +67,8 @@ class MediaServe { static function processProgram() This function first checks for POST or GET Module commands, and if found, attempts to call them, passing parameters as needed. Thereafter, it runs through every Module loaded and executes the Module's onProcess method if it exists. + + POST/GET parameter(s) can be declared in a single variable syntax, e.g., "p=value", or in array style syntax, e.g., "p[]=value1&p[]=value2". Parameters are passed to functions in the order they are provided. ================================ */ static function processProgram() { @@ -74,13 +76,21 @@ class MediaServe { if (isset($_POST['m'])) { if (isset($_POST['c'])) { if (method_exists('ktk\\MediaServe\\'.$_POST['m'], $_POST['c'])) { - call_user_func('ktk\\MediaServe\\'.$_POST['m'].'::'.$_POST['c'], $_POST['p1']); + if (is_array($_POST['p'])) { + call_user_func_array('ktk\\MediaServe\\'.$_POST['m'].'::'.$_POST['c'], $_POST['p']); + } else { + call_user_func('ktk\\MediaServe\\'.$_POST['m'].'::'.$_POST['c'], $_POST['p']); + } } } } else if (isset($_GET['m'])) { if (isset($_GET['c'])) { if (method_exists('ktk\\MediaServe\\'.$_GET['m'], $_GET['c'])) { - call_user_func('ktk\\MediaServe\\'.$_GET['m'].'::'.$_GET['c'], $_GET['p1']); + if (is_array($_GET['p'])) { + call_user_func_array('ktk\\MediaServe\\'.$_GET['m'].'::'.$_GET['c'], $_GET['p']); + } else { + call_user_func('ktk\\MediaServe\\'.$_GET['m'].'::'.$_GET['c'], $_GET['p']); + } } } } diff --git a/modules/Clock.php b/modules/Clock.php index f5eb733..0a7dac4 100644 --- a/modules/Clock.php +++ b/modules/Clock.php @@ -14,7 +14,7 @@ class Clock { static function onRender() { echo '
'.PHP_EOL; } static function changeTime($format) { diff --git a/modules/FileBrowser.css b/modules/FileBrowser.css index 8ecabbd..12ea5f2 100644 --- a/modules/FileBrowser.css +++ b/modules/FileBrowser.css @@ -51,7 +51,21 @@ color: #CCC; } +#ktk_MediaServe_FileBrowser button:hover, #ktk_MediaServe_FileBrowser input:hover { background-color: #777; cursor: pointer; } + +#ktk_MediaServe_FileBrowser button { + background-color: #777; + color: #CCC; + padding: 1px; +} + + +#ktk_MediaServe_FileBrowser_FilterInput { + border: 1px solid #777; + margin-left: 2px; + width: 115px; +} diff --git a/modules/FileBrowser.php b/modules/FileBrowser.php index 3340d8c..7735bb6 100644 --- a/modules/FileBrowser.php +++ b/modules/FileBrowser.php @@ -1,6 +1,10 @@ '; echo ' '; } + echo ' '; echo ''.$file[FileBrowser::F_EXT].' | |
'.$file[FileBrowser::F_EXT].' |