Browse Source

fixing remove.php

old-stable
root 12 years ago
committed by Rahul Bansal
parent
commit
1a1f7094da
  1. 3
      init.php
  2. 9
      remove.php

3
init.php

@ -1,5 +1,5 @@
<?php <?php
chdir(dirname(__FILE__));
/* This will have configuration */ /* This will have configuration */
// Report all PHP errors (see changelog) // Report all PHP errors (see changelog)
error_reporting(E_ALL); error_reporting(E_ALL);
@ -30,7 +30,6 @@ echo $hello . "\n";
/*** OK enough now. This is second & last time I am reminding YOU CAN IGNORE ANYTHING BELOW THIS LINE **/ /*** OK enough now. This is second & last time I am reminding YOU CAN IGNORE ANYTHING BELOW THIS LINE **/
chdir(dirname(__FILE__));
/* Useful test to avoid time-wastage */ /* Useful test to avoid time-wastage */
if($local_env['mysql_user'] == 'USER' || $local_env['mysql_pass'] == 'PASS'){ if($local_env['mysql_user'] == 'USER' || $local_env['mysql_pass'] == 'PASS'){

9
remove.php

@ -1,4 +1,6 @@
<?php <?php
include_once('init.php');
/** /**
* prompt user to eneter domain name * prompt user to eneter domain name
*/ */
@ -17,15 +19,18 @@ if(strpos($usr_domain,"..") !== false ){
if(strpos($usr_domain,"\\") !== false ){ if(strpos($usr_domain,"\\") !== false ){
die("domain cannot contain \\ !"); die("domain cannot contain \\ !");
} }
/* /*
* Set domain environment values * Set domain environment values
*/ */
$domain['name'] = $usr_domain; $domain['name'] = $usr_domain;
$domain['conf'] = $local_env['nginx_dir_sites_avilable'] . '/' . $domain['name']; $domain['conf'] = $local_env['nginx_dir_sites_avilable'] . '/' . $domain['name'] ;
$domain['rootdir'] = $local_env['webroot'] . '/' . $domain['name']; $domain['rootdir'] = $local_env['webroot'] . '/' . $domain['name'] ;
$domain['htdocs'] = $domain['rootdir'] . '/' . $local_env['htdocs'] ; $domain['htdocs'] = $domain['rootdir'] . '/' . $local_env['htdocs'] ;
$domain['logs'] = $domain['rootdir'] . '/' . $local_env['logs'] ; $domain['logs'] = $domain['rootdir'] . '/' . $local_env['logs'] ;
/** /**
* Check if domain config file already exists * Check if domain config file already exists
*/ */

Loading…
Cancel
Save