0) { define('MESSAGE', 'Domain name is already associated with another site.'); return; } $sql = 'INSERT INTO sites (user_id, site_name, site_docroot, site_curdocroot) VALUES ('.UID.', \''.m($row['domain_name']).'\',\''.m($path).'\',\''.m($path).'\')'; $res = mysql_query($sql) or mf(__FILE__, __LINE__, $sql); $id = mysql_insert_id(); $sql = 'INSERT INTO records (record_type, domain_id, record_value) VALUES (\'UTD\', '.m($_POST['domain']).', \''.m($id).'\')'; mysql_query($sql) or mf(__FILE__, __LINE__, $sql); $sql = 'INSERT INTO actions (user_id, action_type, action_value) VALUES ('; $sql .= UID . ', \'updateconf\', \'bind\')'; mysql_query($sql) or mf(__FILE__, __LINE__, $sql); logger::log('Added site: '.$row['domain_name'].' ['.$path.']', logger::info); header('Location: '.CP_PATH.'editsite/'.$id); exit; } meep(); require_once('lib/header.php'); require_once('pages/addsite.php'); require_once('lib/footer.php'); ?>