force sync from /var/www/html/panel: 2025-09-08T20:36:30Z
This commit is contained in:
commit
4f717c9ee8
18119 changed files with 2566034 additions and 0 deletions
52
ControlPanel/modules/ftp/includes/database.inc.php
Executable file
52
ControlPanel/modules/ftp/includes/database.inc.php
Executable file
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
// -------------------------------------------------------------------------------
|
||||
// | net2ftp: a web based FTP client |
|
||||
// | Copyright (c) 2003-2013 by David Gartner |
|
||||
// | |
|
||||
// | This program is free software; you can redistribute it and/or |
|
||||
// | modify it under the terms of the GNU General Public License |
|
||||
// | as published by the Free Software Foundation; either version 2 |
|
||||
// | of the License, or (at your option) any later version. |
|
||||
// | |
|
||||
// -------------------------------------------------------------------------------
|
||||
|
||||
|
||||
// **************************************************************************************
|
||||
// **************************************************************************************
|
||||
// ** **
|
||||
// ** **
|
||||
|
||||
function connect2db() {
|
||||
|
||||
// --------------
|
||||
// This function logs user accesses to the site
|
||||
// --------------
|
||||
|
||||
// -------------------------------------------------------------------------
|
||||
// Global variables
|
||||
// -------------------------------------------------------------------------
|
||||
global $net2ftp_settings;
|
||||
|
||||
$mydb = mysql_connect($net2ftp_settings["dbserver"], $net2ftp_settings["dbusername"], $net2ftp_settings["dbpassword"]);
|
||||
if ($mydb == false) {
|
||||
setErrorVars(false, __("Unable to connect to the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
$result2 = mysql_select_db($net2ftp_settings["dbname"]);
|
||||
if ($result2 == false) {
|
||||
setErrorVars(false, __("Unable to select the MySQL database. Please check your MySQL database settings in net2ftp's configuration file settings.inc.php."), debug_backtrace(), __FILE__, __LINE__);
|
||||
return false;
|
||||
}
|
||||
|
||||
return $mydb;
|
||||
|
||||
} // End connect2db
|
||||
|
||||
// ** **
|
||||
// ** **
|
||||
// **************************************************************************************
|
||||
// **************************************************************************************
|
||||
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue