Exemple #1
0
     echo "<tr><td colspan='4' align='left'>\n";
     echo "\t<br />\n";
     echo "\t<br />\n";
     echo "\t<b>" . $row["module_category"] . "</b>&nbsp;</td></tr>\n";
     echo $tmp_module_header;
 }
 $tr_link = permission_exists('module_edit') ? "href='module_edit.php?id=" . $row["module_uuid"] . "'" : null;
 echo "<tr " . $tr_link . ">\n";
 echo "   <td valign='top' class='" . $row_style[$c] . "'>";
 if (permission_exists('module_edit')) {
     echo "<a href='module_edit.php?id=" . $row["module_uuid"] . "'>" . $row["module_label"] . "</a>";
 } else {
     echo $row["module_label"];
 }
 echo "\t</td>\n";
 if ($mod->active($row["module_name"])) {
     echo "   <td valign='top' class='" . $row_style[$c] . "'>" . $text['label-running'] . "</td>\n";
     echo "   <td valign='top' class='" . $row_style[$c] . "'><a href='modules.php?a=stop&m=" . $row["module_name"] . "' alt='" . $text['label-stop'] . "'>" . $text['label-stop'] . "</a></td>\n";
 } else {
     if ($row['module_enabled'] == "true") {
         echo "   <td valign='top' class='" . $row_style[$c] . "'><b>" . $text['label-stopped'] . "</b></td>\n";
     } else {
         echo "   <td valign='top' class='" . $row_style[$c] . "'>" . $text['label-stopped'] . " " . $notice . "</td>\n";
     }
     echo "   <td valign='top' class='" . $row_style[$c] . "'><a href='modules.php?a=start&m=" . $row["module_name"] . "' alt='" . $text['label-start'] . "'>" . $text['label-start'] . "</a></td>\n";
 }
 echo "   <td valign='top' class='" . $row_style[$c] . "'>";
 if ($row["module_enabled"] == "true") {
     echo $text['option-true'];
 } else {
     if ($row["module_enabled"] == "false") {
Exemple #2
0
            echo "\t</td>\n";
            echo "</tr>\n";
            echo "</table>\n";
        }
    }
    echo "<br /><br />";
}
//memcache information
if (permission_exists("system_view_memcache") && file_exists($_SERVER["PROJECT_ROOT"] . "/app/sip_status/app_config.php")) {
    echo "<table width='100%' border='0' cellpadding='7' cellspacing='0'>\n";
    echo "\t<tr>\n";
    echo "\t\t<th class='th' colspan='2' align='left'>" . $text['title-memcache'] . "</th>\n";
    echo "\t</tr>\n";
    $memcache_fail = false;
    $mod = new modules();
    if ($mod->active("mod_memcache")) {
        $fp = event_socket_create($_SESSION['event_socket_ip_address'], $_SESSION['event_socket_port'], $_SESSION['event_socket_password']);
        if ($fp) {
            $switch_cmd = "memcache status verbose";
            $switch_result = event_socket_request($fp, 'api ' . $switch_cmd);
            $memcache_lines = preg_split('/\\n/', $switch_result);
            foreach ($memcache_lines as $memcache_line) {
                if (strlen(trim($memcache_line)) > 0 && substr_count($memcache_line, ': ') > 0) {
                    $memcache_temp = explode(': ', $memcache_line);
                    $memcache_status[$memcache_temp[0]] = $memcache_temp[1];
                }
            }
            if (is_array($memcache_status) && sizeof($memcache_status) > 0) {
                foreach ($memcache_status as $memcache_field => $memcache_value) {
                    echo "<tr>\n";
                    echo "\t<td width='20%' class='vncell' style='text-align: left;'>" . $memcache_field . "</td>\n";