PDO::ERRMODE_WARNING, PDO::ATTR_PERSISTENT=>PERSISTENT]); }catch(PDOException $e){ die('No Connection to MySQL database!'); } session_start(); $user=check_login(); if(isset($_REQUEST['action']) && isset($_REQUEST['onion']) && $_REQUEST['action']==='edit'){ $stmt=$db->prepare('SELECT onions.version FROM onions INNER JOIN users ON (users.id=onions.user_id) WHERE onions.onion=? AND users.id=?;'); $stmt->execute([$_REQUEST['onion'], $user['id']]); if($onion=$stmt->fetch(PDO::FETCH_NUM)){ $stmt=$db->prepare('UPDATE onions SET enabled = ?, enable_smtp = ?, num_intros = ?, max_streams = ? WHERE onion=?;'); $enabled = isset($_REQUEST['enabled']) ? 1 : 0; $enable_smtp = isset($_REQUEST['enable_smtp']) ? 1 : 0; $num_intros = intval($_REQUEST['num_intros']); if($num_intros<3){ $num_intros = 3; }elseif($onion[0]==2 && $num_intros>10){ $num_intros = 10; }elseif($num_intros>20){ $num_intros = 20; } $max_streams = intval($_REQUEST['max_streams']); if($max_streams<0){ $max_streams = 0; }elseif($max_streams>65535){ $max_streams = 65535; } $stmt->execute([$enabled, $enable_smtp, $num_intros, $max_streams, $_REQUEST['onion']]); $stmt=$db->prepare('UPDATE service_instances SET reload = 1 WHERE id=?'); $stmt->execute([substr($_REQUEST['onion'], 0, 1)]); } } header('Content-Type: text/html; charset=UTF-8'); echo ''; echo 'Daniel\'s Hosting - Dashboard'; echo ''; echo ''; echo ''; echo ''; echo "

Logged in as $user[username] Logout | Change passwords | FileManager | Delete account

"; echo "

Enter system account password to check your $user[system_account]@" . ADDRESS . " mail:

"; echo '

Domains

'; echo ''; echo ''; $stmt=$db->prepare('SELECT onion, private_key, enabled, enable_smtp, num_intros, max_streams FROM onions WHERE user_id=?;'); $stmt->execute([$user['id']]); while($onion=$stmt->fetch(PDO::FETCH_ASSOC)){ echo "'; echo ''; echo ''; echo ''; echo ''; } echo '
OnionPrivate keyEnabledSMTP enabledNr. of introsMax streams per rend circuitSave
$onion[onion].onion"; if(isset($_REQUEST['show_priv'])){ echo "
$onion[private_key]
"; }else{ echo 'Show private key'; } echo '
'; echo '

MySQL Database

'; echo ''; echo ''; $stmt=$db->prepare('SELECT mysql_database FROM mysql_databases WHERE user_id=?;'); $stmt->execute([$user['id']]); while($mysql=$stmt->fetch(PDO::FETCH_ASSOC)){ echo ""; } echo '
DatabaseHostUser
$mysql[mysql_database]localhost$user[mysql_user]
'; echo '

Change MySQL password

'; echo '

You can use PHPMyAdmin and Adminer for web based database administration.

'; echo '

System Account

'; echo ''; echo ''; foreach(SERVERS as $server=>$tmp){ echo ""; } echo '
UsernameHostFTP PortSFTP PortPOP3 PortIMAP PortSMTP port
$user[system_account]$server$tmp[ftp]$tmp[sftp]$tmp[pop3]$tmp[imap]$tmp[smtp]
'; echo '

Change system account password

'; echo '

You can use the FileManager for web based file management.

'; echo '

Logs

'; echo ''; echo ''; echo ''; echo ''; echo '
Dateaccess.logerror.log
Todayaccess.logerror.log
Yesterdayaccess.logerror.log
'; echo '';