コード例 #1
0
ファイル: plugininfo.php プロジェクト: aaronraimist/pcbsd
$sccmd = array("{$cmd} name", "{$cmd} icon", "{$cmd} description", "{$cmd} screenshots", "{$cmd} tags", "{$cmd} website");
$pbiarray = send_sc_query($sccmd);
$pbiname = $pbiarray["{$cmd} name"];
$pbiicon = $pbiarray["{$cmd} icon"];
$pbidesc = $pbiarray["{$cmd} description"];
$pbiss = $pbiarray["{$cmd} screenshots"];
$pbitags = $pbiarray["{$cmd} tags"];
$pbiweb = $pbiarray["{$cmd} website"];
if ($pbiss == " ") {
    $pbiss = "";
}
if (empty($pbiname) or $pbiname == " ") {
    die("No such app: {$pbi}");
}
// Check if this app is installed
$pkgoutput = syscache_ins_plugin_list();
$pkglist = explode(", ", $pkgoutput);
if (array_search_partial($pbiorigin . " ", $pkglist) !== false) {
    $pbiInstalled = true;
} else {
    $pbiInstalled = false;
}
$hasService = false;
$hasConfig = false;
$pbirunning = false;
// Now check if this jail / plugin is running
if ($pbiInstalled) {
    $ioid = get_iocage_id_from_origin($pbiorigin);
    $jail = $ioid;
    $pbirunning = is_pbicage_running($ioid);
}
コード例 #2
0
ファイル: sysplugins.php プロジェクト: aaronraimist/pcbsd
<h1>Installed Plugins</h1>
<br>
<table class="jaillist" style="width:100%">
<tr>
   <th style="width: 50%"></th>
   <th style="width: 50%"></th>
</tr>
<?php 
$skipstop = $skip + 50;
$totalCols = 2;
// Now loop through pbi origins
$col = 1;
// Set the counter
$curItem = 0;
$atEnd = true;
$pbilist = syscache_ins_plugin_list();
$parray = explode(", ", $pbilist);
foreach ($parray as $pbiline) {
    if ($pbiline == " ") {
        continue;
    }
    $pbiarray = explode(" ", $pbiline);
    parse_plugin_details($pbiarray[0], $col, true, false);
    if ($col == $totalCols) {
        $col = 1;
    } else {
        $col++;
    }
    $curItem++;
}
echo "</tr>";