request['do'] == 'check' ) { /* Check Directory */ if ( ! ( is_dir( $this->request['install_dir'] ) ) ) { $error = true; $this->registry->output->addWarning( 'Указанной директории не существует' ); } /* Check URL */ if ( ! $this->request['install_dir'] ) { $error = true; $this->registry->output->addWarning( 'Вы не указали URL' ); } if( ! $error ) { /* Save Form Data */ IPSSetUp::setSavedData('install_dir', preg_replace( "#(//)$#", "", str_replace( '\\', '/', $this->request['install_dir'] ) . '/' ) ); IPSSetUp::setSavedData('install_url', preg_replace( "#(//)$#", "", str_replace( '\\', '/', $this->request['install_url'] ) . '/' ) ); /* Next Action */ $this->registry->autoLoadNextAction( 'db' ); } } /* Guess at directory */ $dir = str_replace( 'admin/install' , '' , getcwd() ); $dir = str_replace( 'admin\install' , '' , $dir ); // Windows $dir = str_replace( '\\' , '/', $dir ); /* Guess at URL */ $url = str_replace( "/admin/installer/index.php" , "", $_SERVER['HTTP_REFERER'] ); $url = str_replace( "/admin/installer/" , "", $url); $url = str_replace( "/admin/installer" , "", $url); $url = str_replace( "/admin/install/index.php" , "", $_SERVER['HTTP_REFERER'] ); $url = str_replace( "/admin/install/" , "", $url); $url = str_replace( "/admin/install" , "", $url); $url = str_replace( "/admin" , "", $url); $url = str_replace( "index.php" , "", $url); $url = preg_replace( "!\?(.+?)*!" , "", $url ); $url = "{$url}/"; /* Page Output */ $this->registry->output->setTitle( "Директории и URLы" ); $this->registry->output->setNextAction( "address&do=check" ); $this->registry->output->addContent( $this->registry->output->template()->page_address( $dir, $url ) ); $this->registry->output->sendOutput(); } }