</tr> <tr align="center"> <td width="51%" align="left" bgcolor="#BFBFBF"> Versión de PHP</td> <td bgcolor="#DFDFDF" align="right" width="49%"> <?php echo apache_phpversion(); ?> </td> </tr> <tr align="center"> <td width="51%" align="left" bgcolor="#BFBFBF"> Versión de MySQL</td> <td bgcolor="#DFDFDF" align="right" width="49%"> <?php echo db_mysql_version(0); ?> </td> </tr> <tr align="center"> <td width="51%" align="left" bgcolor="#BFBFBF"> Versión de Apache</td> <td bgcolor="#DFDFDF" align="right" width="49%"> <?php echo apache_version(); ?> </td> </tr> </table> </td> </tr>
<?php include "webpanel/" . $_GET['grupo'] . "/include_permiso.php"; $array_listado = db_mysql_listdbase(); //Busca dato si se ha solicitado if (trim($_GET['fndBusqueda']) != "") { $array_busqueda = array(); foreach ($array_listado as $value) { if (stripos($value, $_GET['fndBusqueda']) !== false) { $array_busqueda[] = $value; } } $array_listado = $array_busqueda; } $total_registros = count($array_listado); $version = db_mysql_version(0); $numpage_total = $total_registros; $numpage_urlweb = "index.php?grupo=" . $_GET['grupo'] . "&seccion=" . $_GET['seccion'] . "&pag=" . $_GET['pag']; include "include_top_numpage.php"; ?> <div align="center"><font size="2" face="Arial, Helvetica, sans-serif">Listado Mysql [<?php echo $version; ?> ].</font><br> <table border="1" width="552" align="center" cellspacing="0" bordercolor="#999999"> <tr> <td align="center" valign="middle"> <form name="frmBusqueda" action="index.php" method="get" onSubmit="return checkForm(this);"> <input type="hidden" name="grupo" size="46" maxlength="150" value="<?php echo $_GET['grupo']; ?>
function db_mysql_dbasecrear($dominio, $dbase, $password) { $link = mysql_connect(_CFG_MYSQL_SERVER, _CFG_MYSQL_USER, _CFG_MYSQL_PASSWORD); mysql_select_db(_CFG_MYSQL_DB, $link); @mysql_query("CREATE DATABASE `{$dbase}`;", $link); $version = db_mysql_version(1); switch ($version) { case "3.23": mysql_query("INSERT INTO user VALUES('localhost','{$dbase}',PASSWORD('{$password}'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N');", $link); mysql_query("INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv) values ('localhost','{$dbase}','{$dbase}','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');", $link); break; case "4.0": mysql_query("INSERT INTO user VALUES('localhost','{$dbase}',PASSWORD('{$password}'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);", $link); mysql_query("INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Create_tmp_table_priv,Lock_tables_priv) values ('localhost','{$dbase}','{$dbase}','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');", $link); break; case "4.1": mysql_query("INSERT INTO user VALUES('localhost','{$dbase}',OLD_PASSWORD('{$password}'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0);", $link); mysql_query("INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Create_tmp_table_priv,Lock_tables_priv) values ('localhost','{$dbase}','{$dbase}','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');", $link); break; case "5.0": mysql_query("INSERT INTO user VALUES('localhost','{$dbase}',OLD_PASSWORD('{$password}'),'N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0);", $link); mysql_query("INSERT INTO db (Host,Db,User,Select_priv,Insert_priv,Update_priv,Delete_priv,Create_priv,Drop_priv,Grant_priv,References_priv,Index_priv,Alter_priv,Create_tmp_table_priv,Lock_tables_priv) values ('localhost','{$dbase}','{$dbase}','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y');", $link); break; } @mysql_query("FLUSH PRIVILEGES;", $link); mysql_close($link); //Crea la configuracion en el XML $EXISTE = xmlconfig_buscar(_CFG_XML_BASEDATOS, "DOMINIO", $dominio, "DATABASE", $dbase, "posicion"); if ($EXISTE == 0) { //Crea copia seguridad antes de modificar xmlconfig_backup(_CFG_XML_BASEDATOS); $conf = new patConfiguration(); $conf->setConfigDir(_CFG_XML_CONFIG_DIR); $conf->parseConfigFile(_CFG_XML_BASEDATOS, a); $NEW_ID = xmlconfig_generaid(_CFG_XML_BASEDATOS); $conf->setConfigValue($NEW_ID, array("ID" => $NEW_ID, "DOMINIO" => $dominio, "DATABASE" => $dbase, "USUARIO" => $dbase, "PASSWORD" => md5_encrypt($password, _CFG_INTERFACE_BLOWFISH), "ESTADO" => 1), "array"); $conf->writeConfigFile(_CFG_XML_BASEDATOS, "xml", array("mode" => "pretty")); //Fin fichero configuracion XML } }