View Single Post
  #25  
Old 28th October 2012, 18:27
endebe endebe is offline
Junior Member
 
Join Date: Apr 2008
Posts: 2
Thanks: 2
Thanked 0 Times in 0 Posts
Arrow Only works for main domain

In this php script it only works for the master domain.
I've different domains hosted on my server, but i'm not good con sql
Anybody could give me a hint for the right way, so anybody connects to his domain, and not to my domain?
Thanks
Best regards, endebe
PHP Code:
<?php
require_once('../../lib/config.inc.php');
require_once(
'../../lib/app.inc.php');
$app->auth->check_module_permissions('sites');
if (!isset(
$_GET['id'])){
die (
"No site selected!");
}
$domainId intval($_GET['id']);
$dbData $app->db->queryOneRecord("SELECT server_id FROM web_domain WHERE
domain_id = " 
$domainId);
$serverId intval($dbData['server_id']);
if (
$serverId == 0){
die (
"No Server found!");
}
$serverData $app->db->queryOneRecord(
"SELECT server_name FROM server WHERE server_id = "
$serverId);
header('location:/webftp?servername="'.$serverData['server_name'].'"');
exit;
?>
follow the next post for my solution

Last edited by endebe; 28th October 2012 at 19:15. Reason: found solution, description in following post
Reply With Quote