Current File : //etc/sentora/panel/modules/show_mysql_processes/code/controller.ext.php |
<?php
class module_controller extends ctrl_module
{
/**
* The 'worker' methods.
*/
static function getProcessList()
{
global $zdbh;
$sql = "SHOW PROCESSLIST";
$process = $zdbh->prepare($sql);
$process->execute();
while($row=$process->fetch())
{
$res[] = array('Id' => $row['Id'],
'User' => $row['User'],
'Host' => $row['Host'],
'db' => $row['db'],
'Time' => $row['Time'],
'Command' => $row['Command'],
'State'=>$row['State'],
'Info' => $row['Info']);
}
return $res;
}
static function gethelpicon()
{
global $zdbh;
global $controller;
$temp=$controller->GetControllerRequest('URL','module') ;
$val = '/assets/one.txt';
$val1 = '/modules/';
$name=file_get_contents("modules/$temp/assets/helpicon.txt");
return $name;
}
}