function timeOut($params) { $this->view = false; $controller = $params[0]; $action = $params[1]; $param = $params[2]; \Glial\Synapse\FactoryController::rootNode($controller, $action, $param); }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ use Glial\Html\Form\Form; echo '<div class="well">'; \Glial\Synapse\FactoryController::addNode("Common", "displayClientEnvironment", array()); function remove($array) { $params = explode("/", trim($_GET['url'], "/")); //print_r($params); foreach ($params as $key => $param) { foreach ($array as $var) { if (strstr($param, $var . ':')) { unset($params[$key]); } } } $ret = implode('/', $params); return $ret; } echo '<br />'; echo '<form action="" method="POST">'; echo __("Server") . " : "; echo Form::select("mysql_server", "id", $data['servers'], "", array("data-live-search" => "true", "class" => "selectpicker", "data-width" => "auto")); echo ' '; echo '<button type="submit" class="btn btn-primary">Filter</button>'; echo '</form>';
<?php \Glial\Synapse\FactoryController::addNode("Agent", "logs", array());
?> notification.style.css" /> <link rel="stylesheet" type="text/css" href="<?php echo CSS; ?> title.css" /> <link rel="stylesheet" type="text/css" href="<?php echo CSS; ?> reporting.css" /> <link rel="stylesheet" type="text/css" href="<?php echo CSS; ?> pmacontrol.css" /> <link rel="stylesheet" type="text/css" href="<?php echo CSS; ?> bootstrap-select.min.css" /> <link href="<?php echo CSS; ?> font-awesome.min.css" rel="stylesheet"> </head> <body> <?php if ($data['auth'] !== 1) { FactoryController::addNode("Menu", "show", array("1")); } else { FactoryController::addNode("Menu", "show", array("3")); }
<?php echo '<form action="" method="post" class="form-inline">'; echo '<div class="form-group">'; \Glial\Synapse\FactoryController::addNode("Common", "getSelectServerAvailable", array()); echo ' <button type="submit" class="btn btn-primary">Submit</button>'; echo '</div>'; echo '</form>'; echo '<br />'; if (!empty($_POST['mysql_server']['id'])) { \Glial\Synapse\FactoryController::addNode("Spider", "testIfSpiderExist", array($_POST['mysql_server']['id'])); \Glial\Synapse\FactoryController::addNode("Spider", "Server", array($_POST['mysql_server']['id'])); }
<br /> <?php if (!empty($data['id_cleaner'])) { echo '<div class="well">'; echo '<div class="btn-group" role="group" aria-label="Default button group">'; $class = "log" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'Cleaner/index/' . $data['id_cleaner'] . '/log" type="button" class="btn ' . $class . '"><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> ' . __('Logs') . '</a>'; $class = "treatment" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'Cleaner/index/' . $data['id_cleaner'] . '/treatment" type="button" class="btn ' . $class . '"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> ' . __('Last treatement') . '</a>'; $class = "statistics" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'Cleaner/index/' . $data['id_cleaner'] . '/statistics" type="button" class="btn ' . $class . '"><span class="glyphicon glyphicon-stats" aria-hidden="true"></span> ' . __('Statistics') . '</a>'; $class = "settings" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'Cleaner/index/' . $data['id_cleaner'] . '/settings" type="button" class="btn ' . $class . '"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> ' . __('Settings') . '</a>'; echo '</div>'; echo '</div>'; } ?> <div class="well"> <div class="btn-group" role="group" aria-label="Default button group"> <?php echo "</div>"; if (!empty($data['id_cleaner'])) { \Glial\Synapse\FactoryController::addNode("Cleaner", $data['menu'], array($data['id_cleaner'])); } ?> </div> </div>
public function mpd($param) { $default = $this->di['db']->sql(DB_DEFAULT); $this->title = __("The Physical Schemata Panel"); $this->ariane = " > " . __("MySQL") . " > " . $this->title; $db = $this->di['db']->sql(str_replace('-', '_', $param[0])); if (!empty($param[2])) { $this->table_to_purge = FactoryController::addNode("Cleaner", "getTableImpacted", array($param[2])); } $file_name = TMP . $param[0] . "_" . $param[1] . ".svg"; $data['file'] = $file_name; $path_parts = pathinfo($file_name); $path = $path_parts['dirname']; $type = $path_parts['extension']; $file = $path_parts['filename']; $sql = "SELECT * FROM `INFORMATION_SCHEMA`.`TABLES` WHERE TABLE_SCHEMA ='" . $param[1] . "' AND TABLE_TYPE='BASE TABLE'"; $tables = $db->sql_fetch_yield($sql); if ($fp = fopen($path . '/' . $file . '.dot', "w")) { fwrite($fp, "digraph Replication { rankdir = LR; " . PHP_EOL); //fwrite($fp, "\t size=\"10,1000\";"); fwrite($fp, "\t edge [color=\"#5cb85c\"];" . PHP_EOL); fwrite($fp, "\t node [color=\"#5cb85c\" shape=circo style=filled fontsize=8 ranksep=0 concentrate=true splines=true overlap=true];" . PHP_EOL); foreach ($tables as $table) { if (in_array($table['TABLE_NAME'], $this->table_to_purge)) { fwrite($fp, "\t node [color=\"#337ab7\"];" . PHP_EOL); } else { fwrite($fp, "\t node [color=\"#5cb85c\"];" . PHP_EOL); } // shape=Mrecord fwrite($fp, ' "' . $table['TABLE_NAME'] . '" [style="" penwidth="3" fillcolor="yellow" fontname="arial" label =<<table border="0" cellborder="0" cellspacing="0" cellpadding="2" bgcolor="white"><tr><td bgcolor="black" color="white" align="center"><font color="white">' . $table['TABLE_NAME'] . '</font></td></tr>'); fwrite($fp, '<tr><td bgcolor="grey" align="left">' . $table['ENGINE'] . ' (' . $table['ROW_FORMAT'] . ')</td></tr>' . PHP_EOL); fwrite($fp, '<tr><td bgcolor="grey" align="left">total of ' . $table['TABLE_ROWS'] . '</td></tr>'); $sql = "SELECT * FROM information_schema.`COLUMNS`\r\n WHERE TABLE_SCHEMA = '" . $param[1] . "' AND TABLE_NAME ='" . $table['TABLE_NAME'] . "' ORDER BY ORDINAL_POSITION"; $columns = $db->sql_fetch_yield($sql); foreach ($columns as $column) { fwrite($fp, '<tr><td bgcolor="#dddddd" align="left" title="' . $column['COLUMN_NAME'] . '">' . $column['COLUMN_NAME'] . '</td></tr>' . PHP_EOL); } fwrite($fp, '</table>> ];' . PHP_EOL); } $sql = "SELECT count(1) as cpt FROM information_schema.`tables` where table_name = 'REFERENTIAL_CONSTRAINTS' and table_schema = 'information_schema'"; $res = $db->sql_query($sql); $ob = $db->sql_fetch_object($res); if ($ob->cpt === "1") { $sql = "SELECT * FROM information_schema.`REFERENTIAL_CONSTRAINTS`\r\n WHERE CONSTRAINT_SCHEMA ='" . $param[1] . "' AND UNIQUE_CONSTRAINT_SCHEMA ='" . $param[1] . "'"; $contraints = $db->sql_fetch_yield($sql); foreach ($contraints as $contraint) { if (in_array($contraint['REFERENCED_TABLE_NAME'], $this->table_to_purge) && in_array($contraint['REFERENCED_TABLE_NAME'], $this->table_to_purge)) { $color = "#337ab7"; } else { $color = "#5cb85c"; } fwrite($fp, "" . $contraint['TABLE_NAME'] . " -> " . $contraint['REFERENCED_TABLE_NAME'] . '[ arrowsize="1.5" penwidth="2" fontname="arial" fontsize=8 color="' . $color . '" label ="" edgetarget="" edgeURL=""];' . PHP_EOL); } } else { $data['NO_FK'] = 1; } fwrite($fp, '}'); fclose($fp); exec('dot -T' . $type . ' ' . $path . '/' . $file . '.dot -o ' . $path . '/' . $file . '.' . $type . ''); } $this->set('data', $data); }
<div class="well"> <div class="btn-group" role="group" aria-label="Default button group"> <?php $class = "listStorage" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'backup/storageArea/listStorage" type="button" class="btn ' . $class . '">' . '<span class="glyphicon glyphicon-list-alt" style="font-size:12px" aria-hidden="true"></span> ' . __('Listing') . '</a>'; $class = "add" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<a href="' . LINK . 'backup/storageArea/add" type="button" class="btn ' . $class . '">' . '<span class="glyphicon glyphicon-plus" style="font-size:12px" aria-hidden="true"></span> ' . __('Add') . '</a>'; $class = "edit" === $data['menu'] ? 'btn-primary' : 'btn-default'; echo '<span type="button" class="btn ' . $class . '">' . '<span class="glyphicon glyphicon-stats" style="font-size:12px" aria-hidden="true"></span> ' . __('Edit') . '</span>'; ?> </div> </div> <?php if ($data['menu'] == "listStorage" && !empty($data['cpt']) || $data['menu'] != "listStorage") { \Glial\Synapse\FactoryController::addNode("Backup", $data['menu']); }
</div> <div class="col-md-4"> <?php echo Form::select("compare_main", "database__compare", $data['listdb2'], "", array("class" => "form-control")); ?> </div> </div> <div class="row"> <div class="col-md-12"> <button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-transfer" style="font-size:12px"></span> <?php echo __("Compare"); ?> </button> <button type="reset" class="btn btn-danger"><span class="glyphicon glyphicon-remove" style="font-size:12px"></span> <?php echo __("Reset"); ?> </button> </div> </div> </div> </form> <?php if ($data['display']) { $menu = FactoryController::addNode("Compare", "menu", array($data)); FactoryController::addNode("Compare", "getObjectDiff", array($data, $menu)); }
<?php use Glial\Synapse\FactoryController; echo '<div class="well">'; echo '<div class="btn-group" role="group" aria-label="Default button group">'; foreach ($data['link'] as $link) { echo '<a href="' . LINK . $link['url'] . '" type="button" class="btn btn-primary" style="font-size:12px">' . ' <span class="glyphicon ' . $link['icon'] . '" aria-hidden="true"></span> ' . $link['name'] . '</a>'; } echo '</div>'; echo '</div>'; FactoryController::addNode("Home", "list_server", array()); $svg = 'tmp/replication.svg'; //echo '<div style="background: url('.IMG.$svg.')"></div>'; //echo '<embed src="'.IMG.$svg.'" type="image/svg+xml" />';
<?php use Glial\Synapse\FactoryController; use Glial\I18n\I18n; FactoryController::addNode("Layout", "headerPma", $GLIALE_TITLE); echo '<div id="page">'; echo "<div id=\"glial-title\">"; echo "<h2>" . $GLIALE_TITLE . "</h2>"; echo "<span class=\"ariane\"><a href=\"" . WWW_ROOT . "\">" . __("Home") . "</a> " . $GLIALE_ARIANE . "</span>"; echo "</div>"; echo "<div style=\"padding:0 10px 10px 10px\">"; get_flash(); echo $GLIALE_CONTENT; echo "</div>"; echo '</div>'; FactoryController::addNode("Layout", "footerPma");
$msg = $_SYSTEM['controller'] . "/" . $_SYSTEM['action'] . "<br />" . __("Your rank to this website is not enough to acess to this page"); } set_flash("error", __("Acess denied"), __("Acess denied") . " : " . $msg); header("location: " . LINK . $url); exit; } } } else { set_flash("error", __("Error 404"), __("Page not found") . " : " . __("Sorry, the page you requested : \"" . $_SYSTEM['controller'] . "/" . $_SYSTEM['action'] . "\"is not on this server. Please contact us if you have questions or concerns")); header("location: " . LINK . "Error/_404"); exit; } } DEBUG ? $_DEBUG->save("ACL loaded") : ""; //demarre l'application FactoryController::rootNode($_SYSTEM['controller'], $_SYSTEM['action'], $_SYSTEM['param']); $i = 10; DEBUG ? $_DEBUG->save("Layout loaded") : ""; if (DEBUG && !IS_CLI && !IS_AJAX) { //ENVIRONEMENT $execution_time = microtime(true) - TIME_START; echo "<hr />"; echo "Temps d'exéution de la page : " . round($execution_time, 5) . " seconds"; echo "<br />Nombre de requette : " . $_DB->sql(DB_DEFAULT)->get_count_query(); $file_list = get_included_files(); echo "<br />Nombre de fichier loaded : <b>" . count($file_list) . "</b><br />"; debug($file_list); if ($_DB->sql(DB_DEFAULT)->get_count_query() != 0) { echo "<table class=\"debug\" style=\"width:100%\">"; echo "<tr><th>#</th><th>File</th><th>Line</th><th>Query</th><th>Rows</th><th>Last inserted id</th><th>Time</th></tr>"; $i = 0;
$color = "btn-primary"; } else { $color = "btn-default"; } echo '<a href="' . $elem['path'] . '" type="button" class="btn ' . $color . '" style="font-size:12px">' . ' ' . $elem['icone'] . ' ' . __($elem['name']) . '</a>'; } echo '</div>'; echo '<div style="float:right" class="btn-group" role="group" aria-label="Default button group">'; echo ' <a href="/pmacontrol/en/Cleaner/add/" class="btn btn-primary" style="font-size:12px"><span class="glyphicon glyphicon-plus" style="font-size:12px"></span> Add a MySQL server</a> '; echo '</div>'; echo ' <div style="float:right" class="btn-group" role="group" aria-label="Default button group">'; echo ' <a href="' . LINK . 'Agent/stop/' . $data['pid'] . '" type="button" class="btn btn-primary" style="font-size:12px"> <span class="glyphicon glyphicon-stop" aria-hidden="true" style="font-size:12px"></span> Stop Daemon</a>'; echo '<a href="' . LINK . 'Agent/start" type="button" class="btn btn-primary" style="font-size:12px"> <span class="glyphicon glyphicon-play" aria-hidden="true" style="font-size:12px"></span> Start Daemon</a>'; if (empty($data['pid'])) { echo '<a href="' . LINK . 'Server/listing/logs" type="button" class="btn btn-warning" style="font-size:12px"><span class="glyphicon glyphicon-warning-sign" aria-hidden="true" style="font-size:13px"></span> Stopped</a>'; } else { $cmd = "ps -p " . $data['pid']; $alive = shell_exec($cmd); if (strpos($alive, $data['pid']) !== false) { echo '<a href="' . LINK . 'Server/listing/logs" type="button" class="btn btn-success" style="font-size:12px"><span class="glyphicon glyphicon-ok" aria-hidden="true" style="font-size:12px"></span> Running (PID : ' . $data['pid'] . ')</a>'; } else { echo '<a href="' . LINK . 'Server/listing/logs" type="button" class="btn btn-danger" style="font-size:12px"><span class="glyphicon glyphicon-remove" aria-hidden="true" style="font-size:12px"></span> Error</a>'; } } echo '</div>'; echo '</div>'; echo '</div>'; $elems = explode('/', $_GET['path']); $method = end($elems); \Glial\Synapse\FactoryController::addNode("Server", $method, array());
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ use Glial\Html\Form\Form; echo '<div class="well">'; echo '<form action="" method="post" class="form-inline">'; echo '<div class="form-group">'; \Glial\Synapse\FactoryController::addNode("Common", "getSelectServerAvailable", array()); //echo Form::select('mysql_server', 'id', $data['server_mysql'], "", array('style' => 'margin-bottom:0px', 'class' => 'form-control')); //class="form-control" if ($data['performance_schema']) { echo ' '; echo Form::select('database', 'id', $data['databases'], "", array('style' => 'margin-bottom:0px', 'class' => 'form-control')); echo ' '; echo Form::input('database', 'filter', array('style' => 'margin-bottom:0px', 'placeholder' => __("Filter"), 'class' => 'form-control')); echo '<b> ' . __("ORDER BY") . ' </b>'; echo Form::select('field', 'id', $data['fields'], "", array('style' => 'margin-bottom:0px', 'class' => 'form-control')); echo ' '; echo Form::select('orderby', 'id', $data['orderby'], "", array('style' => 'margin-bottom:0px', 'class' => 'form-control')); } echo ' <button type="submit" class="btn btn-primary">Submit</button>'; echo '</div>'; echo '</form>'; if (!empty($data['pagination'])) { echo '<br />'; echo $data['pagination']; }