本文整理汇总了PHP中modules::active方法的典型用法代码示例。如果您正苦于以下问题:PHP modules::active方法的具体用法?PHP modules::active怎么用?PHP modules::active使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类modules
的用法示例。
在下文中一共展示了modules::active方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
echo "<tr><td colspan='4' align='left'>\n";
echo "\t<br />\n";
echo "\t<br />\n";
echo "\t<b>" . $row["module_category"] . "</b> </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") {
示例2: modules
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";