#!/usr/bin/php -q 'http://localhost/pub/selectcase?buffer_length=1', CURLOPT_UNIX_SOCKET_PATH => '/var/run/nginx.socket', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $message, CURLOPT_RETURNTRANSFER => true ]); curl_exec($nchan); curl_close($nchan); } $boot = "/boot/config/plugins/dynamix"; $file = $argv[1]; $exist = is_file("$boot/$file"); $cmodel = $exist ? file_get_contents("$boot/$file") : ''; $style = [""; $script = [""; $html = ["
"]; $cases = explode("\n",file_get_contents("$docroot/webGui/styles/default-cases.css")); foreach ($cases as $case) if (substr($case,0,6)=='.case-') $models[] = substr($case,1,strpos($case,':')-1); natsort($models); for ($i=0; $i < count($models); $i++) { $model = $models[$i]; $name = substr($model,5); $title = str_replace('3u-avs-10-4','3u-avs-10/4',$name); $select = $name==$cmodel ? 'color:#e68a00' : ''; $html[] = "
$title
"; } $html[] = "
"._('custom image')."
"; $i++; $html[] = "
"; $select = substr($cmodel,-4)=='.png' ? 'color:#e68a00' : ''; $html[] = ""; $html[] = ""; usleep(100000); write(implode($style).implode($script).implode($html)); ?>