diff --git a/README.md b/README.md deleted file mode 100644 index 33092b8..0000000 --- a/README.md +++ /dev/null @@ -1,8 +0,0 @@ -infernalhosting.net -=================== - -infernal hosting: the site hosting platform that never was - -Required Gems: - - activemerchant - - money \ No newline at end of file diff --git a/REVISION b/REVISION new file mode 100644 index 0000000..2ebd3a0 --- /dev/null +++ b/REVISION @@ -0,0 +1 @@ +945 diff --git a/app/.DS_Store b/app/.DS_Store deleted file mode 100644 index b1504a0..0000000 Binary files a/app/.DS_Store and /dev/null differ diff --git a/app/.svn/entries b/app/.svn/entries deleted file mode 100644 index c902437..0000000 --- a/app/.svn/entries +++ /dev/null @@ -1,40 +0,0 @@ -8 - -dir -988 -svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app -svn://svn.evilcode.net/sites - - - -2008-03-13T06:52:16.240218Z -988 -ryan - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b1206cc1-2106-0410-84da-53eeff8bd16c - -helpers -dir - -models -dir - -controllers -dir - -views -dir - diff --git a/app/.svn/format b/app/.svn/format deleted file mode 100644 index 45a4fb7..0000000 --- a/app/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/app/controllers/.svn/entries b/app/controllers/.svn/entries deleted file mode 100644 index 8c19bc1..0000000 --- a/app/controllers/.svn/entries +++ /dev/null @@ -1,88 +0,0 @@ -8 - -dir -988 -svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/controllers -svn://svn.evilcode.net/sites - - - -2008-03-13T06:52:16.240218Z -988 -ryan - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b1206cc1-2106-0410-84da-53eeff8bd16c - -zones_controller.rb -file - - - - -2008-03-13T06:52:35.000000Z -24d24a885f9afc049b0513dbbc231d8a -2008-03-13T06:52:16.240218Z -988 -ryan - -accounts_controller.rb -file - - - - -2008-03-12T23:21:53.000000Z -b8da5f0596ec7b36ad5a4abb95d92915 -2008-03-12T00:18:13.520046Z -979 -ryan - -application.rb -file - - - - -2008-03-13T06:52:35.000000Z -cb8cd09d1644a2828b296b6a31a62be1 -2008-03-13T06:52:16.240218Z -988 -ryan - -sessions_controller.rb -file - - - - -2008-03-12T23:21:54.000000Z -149360fc935c8dc202e02d76568ea064 -2008-03-12T07:58:44.630596Z -980 -ryan - -dashboard_controller.rb -file - - - - -2008-03-13T06:52:35.000000Z -1df089faedbea7d12159bc4b054b21cc -2008-03-13T06:52:16.240218Z -988 -ryan - diff --git a/app/controllers/.svn/format b/app/controllers/.svn/format deleted file mode 100644 index 45a4fb7..0000000 --- a/app/controllers/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/app/controllers/.svn/text-base/accounts_controller.rb.svn-base b/app/controllers/.svn/text-base/accounts_controller.rb.svn-base deleted file mode 100644 index 366c113..0000000 --- a/app/controllers/.svn/text-base/accounts_controller.rb.svn-base +++ /dev/null @@ -1,63 +0,0 @@ -class AccountsController < ApplicationController - # Protect these actions behind an admin login - # before_filter :admin_required, :only => [:suspend, :unsuspend, :destroy, :purge] - before_filter :find_account, :only => [:suspend, :unsuspend, :destroy, :purge] - - # render new.rhtml - def new - end - - def create - cookies.delete :auth_token - - @account = Account.new(params[:account]) - @account.register! if @account.valid? - - if @account.errors.empty? - self.current_account = @account - render :template => 'accounts/processing' - else - render :action => 'signup' - end - end - - def activate - flash.clear - self.current_account = Account.find_by_activation_code(params[:activation_code]) - - if logged_in? && !current_account.active? - current_account.activate! - flash[:notice] = "Sweet! Your account is now activated, and you're free to log in." - render :template => 'accounts/completed' - else - flash[:notice] = "Sorry, but I couldn't activate your account! Did you follow the link in your welcome email?" - redirect_back_or_default login_url - end - end - - def suspend - @account.suspend! - redirect_to accounts_path - end - - def unsuspend - @account.unsuspend! - redirect_to accounts_path - end - - def destroy - @account.delete! - redirect_to accounts_path - end - - def purge - @account.destroy - redirect_to accounts_path - end - -protected - def find_account - @account = Account.find(params[:id]) - end - -end diff --git a/app/controllers/.svn/text-base/application.rb.svn-base b/app/controllers/.svn/text-base/application.rb.svn-base deleted file mode 100644 index 358b5fe..0000000 --- a/app/controllers/.svn/text-base/application.rb.svn-base +++ /dev/null @@ -1,48 +0,0 @@ -class ApplicationController < ActionController::Base - include AuthenticatedSystem - layout 'xhtml' - - # static named routes - def show_services - @title = 'services' - render :action => 'services' - end - - def show_about - @title = 'about' - render :action => 'about' - end - - def show_support - @title = 'support' - render :action => 'support' - end - - def show_contact - @title = 'contact' - render :action => 'contact' - end - - def show_eula - @title = 'eula' - render :action => 'eula' - end - - def error - render :action => 'error' - end - - protected - - def check_authorization - unless logged_in? - flash[:notice] = 'Sorry, but you need to log in first!' - session[:redirect_url] = request.request_uri - redirect_to '/' - end - end - - def check_for_https - # this method should check the existing protocol and redirect to https if it's not already - end -end diff --git a/app/controllers/.svn/text-base/dashboard_controller.rb.svn-base b/app/controllers/.svn/text-base/dashboard_controller.rb.svn-base deleted file mode 100644 index ee0d440..0000000 --- a/app/controllers/.svn/text-base/dashboard_controller.rb.svn-base +++ /dev/null @@ -1,7 +0,0 @@ -class DashboardController < ApplicationController - before_filter :check_authorization - - def index - @title = "my dashboard" - end -end diff --git a/app/controllers/.svn/text-base/sessions_controller.rb.svn-base b/app/controllers/.svn/text-base/sessions_controller.rb.svn-base deleted file mode 100644 index 53ee698..0000000 --- a/app/controllers/.svn/text-base/sessions_controller.rb.svn-base +++ /dev/null @@ -1,37 +0,0 @@ -# This controller handles the login/logout function of the site. -class SessionsController < ApplicationController - - # render new.rhtml - def new - end - - def login - create - end - - def create - self.current_account = Account.authenticate(params[:login], params[:password]) - if logged_in? - if params[:remember_me] == "1" - self.current_account.remember_me - cookies[:auth_token] = { :value => self.current_account.remember_token , :expires => self.current_account.remember_token_expires_at } - end - redirect_back_or_default('/') - flash[:notice] = "Logged in successfully" - else - render :action => 'new' - end - end - - def logout - destroy - end - - def destroy - self.current_account.forget_me if logged_in? - cookies.delete :auth_token - reset_session - flash[:notice] = "You have been logged out." - redirect_back_or_default('/') - end -end diff --git a/app/controllers/.svn/text-base/zones_controller.rb.svn-base b/app/controllers/.svn/text-base/zones_controller.rb.svn-base deleted file mode 100644 index e2e7902..0000000 --- a/app/controllers/.svn/text-base/zones_controller.rb.svn-base +++ /dev/null @@ -1,124 +0,0 @@ -class ZonesController < ApplicationController - before_filter :check_authorization - before_filter :load_zones, :only => [ :index, :list ] - before_filter :load_zone_by_id, :only => [ :show, :edit, :update, :destroy ] - before_filter :load_zone_by_origin, :only => [ :show_by_origin ] - - protected - def load_zone_by_id - @zone = DnsZone.find_by_id( params[:id] ) or raise ActiveRecord::RecordNotFound - end - - def load_zone_by_origin - @zone = DnsZone.find_by_origin( params[:origin] ) or raise ActiveRecord::RecordNotFound - end - - def load_zones - @zones = DnsZone.find(:all, :order => 'origin') - end - - public - def index - render :action => 'list' - end - - def show_by_origin - respond_to do |format| - format.html { render :action => 'show' } - format.xml { render :xml => @zone.to_xml } - format.txt { render :action => 'show', :layout => false } - end - end - - def show - respond_to do |format| - format.html { render :action => 'show' } - format.xml { render :xml => @zone.to_xml } - format.txt { render :action => 'show', :layout => false } - end - end - - def list - respond_to do |format| - format.html { render :action => 'list' } - format.xml { render :xml => @zones.to_xml } - end - end - - def edit - render :action => 'edit' - end - - def update - update = @zone.update_attributes( params[:zone] ) - - params[:dns_resources].each do |id, r| - if id.eql? 'new' - record = r.merge({:dns_resource_type => DnsResourceType.find_by_id(r[:dns_resource_type_id])}) - record.delete("dns_resource_type_id") - @zone.dns_resources << DnsResource.create( record ) unless r[:name].empty? and r[:ttl].empty? and r[:aux].empty? and r[:data].empty? - else - record = DnsResource.find_by_id( id ) - r.delete('id') - if r[:delete].eql? "1" - record.destroy - else - record.update_attributes( r ) - end - end - end - - if update - flash[:notice] = 'Zone was successfully updated.' - - respond_to do |format| - format.html { redirect_to zone_detail_url( @zone.origin ) } - format.xml { head :ok } - end - else - flash[:error] = 'Unable to save changes to zone: ' - flash[:error] += @zone.errors.collect {|field, errors| "#{field.capitalize} #{errors}"}.to_sentence - - respond_to do |format| - format.html { render :template => 'zones/edit' } - format.xml { render :xml => @server.errors.to_xml } - end - end - end - - def new - @zone = DnsZone.new - end - - def create - @zone = DnsZone.new( params[:zone].merge(:serial => 1) ) - - if @zone.save - @zone.dns_resources = DnsResource.default_records.map {|r| DnsResource.create( r.merge(:dns_zone => @zone) )} if params[:dns_resources][:default].eql? "true" - flash[:notice] = 'Zone was successfully created.' - - respond_to do |format| - format.html { redirect_to zone_detail_path( @zone.origin ) } - format.xml { head :created, :location => zone_detail_path( @zone.origin ) } - end - else - flash[:error] = 'Unable to create the new zone.' - - respond_to do |format| - format.html { render :template => 'zones/new' } - format.xml { render :xml => @zone.errors.to_xml } - end - end - end - - def destroy - @zone.resources.each {|r| r.destroy } - @zone.destroy - flash[:notice] = 'Zone has been removed from the database.' - - respond_to do |format| - format.html { redirect_to zones_url } - format.xml { head :ok } - end - end -end diff --git a/app/controllers/about_controller.rb b/app/controllers/about_controller.rb new file mode 100644 index 0000000..a14c528 --- /dev/null +++ b/app/controllers/about_controller.rb @@ -0,0 +1,4 @@ +class AboutController < ApplicationController + def index + end +end diff --git a/app/controllers/account_controller.rb b/app/controllers/account_controller.rb new file mode 100644 index 0000000..73272a0 --- /dev/null +++ b/app/controllers/account_controller.rb @@ -0,0 +1,24 @@ +class AccountController < ApplicationController + before_filter :login_from_cookie + + # say something nice, you goof! something sweet. + def index + redirect_to(:action => 'signup') unless logged_in? || User.count > 0 + end + + def login + redirect_to :controller => "login" + end + + def signup + @user = User.new(params[:user]) + return unless request.post? + @user.save! + self.current_user = @user + redirect_back_or_default(:controller => '/account', :action => 'index') + flash[:notice] = "Thanks for signing up!" + rescue ActiveRecord::RecordInvalid + render :action => 'signup' + end + +end diff --git a/app/controllers/accounts_controller.rb b/app/controllers/accounts_controller.rb deleted file mode 100644 index 366c113..0000000 --- a/app/controllers/accounts_controller.rb +++ /dev/null @@ -1,63 +0,0 @@ -class AccountsController < ApplicationController - # Protect these actions behind an admin login - # before_filter :admin_required, :only => [:suspend, :unsuspend, :destroy, :purge] - before_filter :find_account, :only => [:suspend, :unsuspend, :destroy, :purge] - - # render new.rhtml - def new - end - - def create - cookies.delete :auth_token - - @account = Account.new(params[:account]) - @account.register! if @account.valid? - - if @account.errors.empty? - self.current_account = @account - render :template => 'accounts/processing' - else - render :action => 'signup' - end - end - - def activate - flash.clear - self.current_account = Account.find_by_activation_code(params[:activation_code]) - - if logged_in? && !current_account.active? - current_account.activate! - flash[:notice] = "Sweet! Your account is now activated, and you're free to log in." - render :template => 'accounts/completed' - else - flash[:notice] = "Sorry, but I couldn't activate your account! Did you follow the link in your welcome email?" - redirect_back_or_default login_url - end - end - - def suspend - @account.suspend! - redirect_to accounts_path - end - - def unsuspend - @account.unsuspend! - redirect_to accounts_path - end - - def destroy - @account.delete! - redirect_to accounts_path - end - - def purge - @account.destroy - redirect_to accounts_path - end - -protected - def find_account - @account = Account.find(params[:id]) - end - -end diff --git a/app/controllers/application.rb b/app/controllers/application.rb index dcd4aae..926435a 100644 --- a/app/controllers/application.rb +++ b/app/controllers/application.rb @@ -1,52 +1,25 @@ class ApplicationController < ActionController::Base include AuthenticatedSystem - layout 'xhtml' - # static named routes - def index - render :action => 'index' - end - - def show_services - @title = 'services' - render :action => 'services' - end - - def show_about - @title = 'about' - render :action => 'about' - end + layout :select_layout - def show_support - @title = 'support' - render :action => 'support' + def show_splash + render :action => 'splash', :layout => 'splash' end - def show_contact - @title = 'contact' - render :action => 'contact' + protected + # Checks the ownership of this domain + # + # * params[:origin] - name of the origin; ie: 'infernalhosting.net' + def check_domain_ownership + redirect_to :controller => '/eatmyshit' if DnsZone.find_by_origin( params[:origin] ).user_id != session[:user] end - def show_eula - @title = 'eula' - render :action => 'eula' - end - - def error - render :action => 'error' + private + # Chooses the main layout for the render + # + def select_layout + layout = "xhtml" if ! params[:ajax] end - protected - - def check_authorization - unless logged_in? - flash[:notice] = 'Sorry, but you need to log in first!' - session[:redirect_url] = request.request_uri - redirect_to '/' - end - end - - def check_for_https - # this method should check the existing protocol and redirect to https if it's not already - end end diff --git a/app/controllers/contact_controller.rb b/app/controllers/contact_controller.rb new file mode 100644 index 0000000..351a4fc --- /dev/null +++ b/app/controllers/contact_controller.rb @@ -0,0 +1,4 @@ +class ContactController < ApplicationController + def index + end +end diff --git a/app/controllers/dashboard_controller.rb b/app/controllers/dashboard_controller.rb deleted file mode 100644 index ee0d440..0000000 --- a/app/controllers/dashboard_controller.rb +++ /dev/null @@ -1,7 +0,0 @@ -class DashboardController < ApplicationController - before_filter :check_authorization - - def index - @title = "my dashboard" - end -end diff --git a/app/controllers/dns_controller.rb b/app/controllers/dns_controller.rb new file mode 100644 index 0000000..8ca8c9c --- /dev/null +++ b/app/controllers/dns_controller.rb @@ -0,0 +1,70 @@ +class DnsController < ApplicationController + before_filter :login_required + before_filter :check_domain_ownership + + # If a domain is already specified, redirect to the dns editor + # Otherwise, redirect to the domain overview to select a domain to manage + # + def index + if params[:origin] + edit + render :action => 'edit' + + else + redirect_to :controller => 'domain' + end + end + + # Edit the DNS for the specified domain + # + def edit + @domain = DnsZone.find_by_origin(params[:origin], :order => 'origin') + @title = "#{@domain.name} :: manage dns" + end + + def soa + @domain = DnsZone.find_by_origin(params[:origin]) + + if @domain.update_attributes(params[:domain]) + flash[:notice] = "The domain's SOA values have been updated." + end + + render :partial => 'soa' + end + + def rr + @domain = DnsZone.find_by_origin(params[:origin]) + + # Update existing records + if params[:updates] + for update in params[:updates] + record_id = update[0] + record = DnsResource.find_by_id( record_id ) + values = update[1] + + if values[:delete] == "1" + record.destroy + else + values[:ttl] = values[:ttl].nil? ? nil : values[:ttl] + values[:aux] = values[:aux].nil? ? nil : values[:aux] + record.update_attributes( values ) + end + end + end + + # Add new entry, if set + new_data = params[:new] + if !new_data[:data].nil? + new_record = DnsResource.new(new_data) + new_record.dns_zone_id = @domain.id + new_record.ttl = new_record.ttl.nil? ? nil : new_record.ttl + new_record.aux = new_record.aux.nil? ? nil : new_record.aux + + new_record.save! + end + + flash[:notice] = "The domain's resource records have been updated." + render :partial => 'rr' + end + +end diff --git a/app/controllers/domain_controller.rb b/app/controllers/domain_controller.rb new file mode 100644 index 0000000..077064b --- /dev/null +++ b/app/controllers/domain_controller.rb @@ -0,0 +1,89 @@ +class DomainController < ApplicationController + before_filter :login_required + + # If a domain is already specified, redirect to the domain overview. + # Otherwise, display a list of hosted domains for management. + # + def index + if params[:origin] + overview + render :action => 'overview' + + else + list + render :action => 'list' + + end + end + + # Review the hosting options for the specified domain name. + # + def overview + @domain = DnsZone.find_by_origin(params[:origin]) + @title = "#{@domain.name} :: overview" + end + + # Display a list of domains attached to the user's account. + # + def list + @user = User.find_by_id(session[:user]) + @domains = @user.domains + @title = "hosted domains" + + end + + # Removes the domain from the database and cascades its dependencies + # + def destroy + domain = DnsZone.find(params[:id]) + domain.destroy + + flash[:notice] = 'The domain has been deleted.' + redirect_to :action => 'list' + end + + # Add a domain to the database and redirect to the domain overview. + # + def add + @title = "add a domain" + + @domain = DnsZone.new + end + + # Creates the domain and associates it with the user. + # + def create + @domain = DnsZone.new(params[:domain]) + @domain.user_id = current_user.id + @domain.mbox = 'dns.infernalhosting.net' + @domain.ns = 'ns0.infernalhosting.net' + + if @domain.save + flash[:notice] = 'The domain was successfully added to your list of hosted domains.' + + if params[:defaults] + create_defaults( @domain.id ) + end + + redirect_to :action => 'list' + else + render :action => 'add' + end + end + + # Creates the default records to be added on zone creation. + # (could be a hook to a db call to look up profiles) + # + def create_defaults(zone_id) + domain = DnsZone.find_by_id( zone_id ) + + DnsResource.new(:dns_zone_id => zone_id, :name => "", :type => "A", :data => "67.15.197.146", :aux => 0, :ttl => 300).save + DnsResource.new(:dns_zone_id => zone_id, :name => "", :type => "MX", :data => "mail.infernalhosting.net.", :aux => 0, :ttl => 300).save + DnsResource.new(:dns_zone_id => zone_id, :name => "", :type => "NS", :data => "ns0.infernalhosting.net.", :aux => 0, :ttl => 300).save + DnsResource.new(:dns_zone_id => zone_id, :name => "", :type => "NS", :data => "ns1.infernalhosting.net.", :aux => 0, :ttl => 300).save + DnsResource.new(:dns_zone_id => zone_id, :name => "webmail", :type => "CNAME", :data => "webmail.infernalhosting.net.", :aux => 0, :ttl => 300).save + DnsResource.new(:dns_zone_id => zone_id, :name => "www", :type => "CNAME", :data => domain.name.gsub(/$/, '.'), :aux => 0, :ttl => 300).save + end + + +end diff --git a/app/controllers/error_controller.rb b/app/controllers/error_controller.rb new file mode 100644 index 0000000..bab8e2c --- /dev/null +++ b/app/controllers/error_controller.rb @@ -0,0 +1,12 @@ +class ErrorController < ApplicationController + def index + error_404 + render :action => "error_404" + end + + def error_404 + end + + def error_503 + end +end diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb new file mode 100644 index 0000000..dc45bfe --- /dev/null +++ b/app/controllers/login_controller.rb @@ -0,0 +1,40 @@ +class LoginController < ApplicationController + + def index + render :action => "login" + end + + def login + @title = 'Login' + + if params[:user][:username] + self.current_user = User.authenticate(params[:user][:username], params[:user][:password]) + + if logged_in? + flash[:notice] = "Logged in successfully" + redirect_back_or_default(:controller => '/panel') + + else + @title = "Login Failed" + + flash[:notice] = "Your login credentials were incorrect. Please try again." + render :action => "login" + end + end + + end + + def logout + @title = 'Logout' + + if logged_in? + self.current_user = nil + end + + #cookies.delete :auth_token + reset_session + flash[:notice] = "You have been logged out." + redirect_back_or_default(:controller => '/login') + end + +end diff --git a/app/controllers/mail_controller.rb b/app/controllers/mail_controller.rb new file mode 100644 index 0000000..ca424da --- /dev/null +++ b/app/controllers/mail_controller.rb @@ -0,0 +1,132 @@ +class MailController < ApplicationController + before_filter :login_required + before_filter :check_domain_ownership + + # If a domain is already specified, redirec to the mailbox editor + # Otherwise, redirect to the domain overview to select a domain to manage + def index + if params[:origin] + list + render :action => 'list' + else + redirect_to :controller => 'domain' + end + end + + # List the mailboxes for the specified domain + # + def list + @domain = DnsZone.find_by_origin(params[:origin]) + @title = "#{@domain.name} :: manage mail" + end + + ## Mailboxes + + # Create a new Mailbox for the specified domain + # + def new_mailbox + @domain = DnsZone.find_by_origin(params[:origin]) + @mailbox = MailUser.new + + render :layout => false + end + + # Edit a particular mailbox + # + def edit_mailbox + @domain = DnsZone.find_by_origin(params[:origin]) + @mailbox = MailUser.find_by_id( params[:id] ) + + render :layout => false + end + + # Creates a new mailbox + # + def create_mailbox + @domain = DnsZone.find_by_origin(params[:origin]) + @mailbox = MailUser.new( params[:mailbox] ) + @mailbox.encrypt_password + @mailbox.user_id = session[:user] + + if @mailbox.save + flash[:notice] = 'Mailbox was successfully created.' + end + + render :partial => 'list_mailboxes', :layout => false + end + + # Updates the new mailbox + # + def update_mailbox + @domain = DnsZone.find_by_origin(params[:origin]) + @mailbox = MailUser.find( params[:id] ) + + if params[:delete] + @mailbox.destroy + flash[:notice] = 'Mailbox was deleted.' + + elsif @mailbox.update_attributes( params[:mailbox] ) + # re-hash password if set + if ! params[:mailbox][:password].nil? + @mailbox.encrypt_password + @mailbox.save! + end + + flash[:notice] = 'Mailbox was successfully updated.' + end + + render :partial => 'list_mailboxes', :layout => false + end + + ## Aliases + + # Creates a new alias + # + def new_alias + @domain = DnsZone.find_by_origin(params[:origin]) + @alias = MailAlias.new + + render :layout => false + end + + # Edits a particular alias + # + def edit_alias + @domain = DnsZone.find_by_origin(params[:origin]) + @alias = MailAlias.find_by_id( params[:id] ) + + render :layout => false + end + + # Create a new mail alias + # + def create_alias + @domain = DnsZone.find_by_origin( params[:origin] ) + @alias = MailAlias.new( params[:alias] ) + @alias.user_id = session[:user] + + if @alias.save + flash[:notice] = 'Mail Alias was successfully created.' + end + + render :partial => 'list_aliases', :layout => false + end + + # Updates the mail alias + # + def update_alias + @domain = DnsZone.find_by_origin( params[:origin] ) + @alias = MailAlias.find( params[:id] ) + + if params[:delete] + @alias.destroy + flash[:notice] = 'Mail Alias was deleted.' + + elsif @alias.update_attributes( params[:alias] ) + flash[:notice] = 'Mail Alias was successfully updated.' + end + + render :partial => 'list_aliases', :layout => false + end + +end diff --git a/app/controllers/main_controller.rb b/app/controllers/main_controller.rb new file mode 100644 index 0000000..6519d7b --- /dev/null +++ b/app/controllers/main_controller.rb @@ -0,0 +1,2 @@ +class MainController < ApplicationController +end diff --git a/app/controllers/panel_controller.rb b/app/controllers/panel_controller.rb new file mode 100644 index 0000000..8f8322b --- /dev/null +++ b/app/controllers/panel_controller.rb @@ -0,0 +1,7 @@ +class PanelController < ApplicationController + before_filter :login_required + + def index + @user = User.find_by_id(session[:user]) + end +end diff --git a/app/controllers/services_controller.rb b/app/controllers/services_controller.rb new file mode 100644 index 0000000..71801db --- /dev/null +++ b/app/controllers/services_controller.rb @@ -0,0 +1,4 @@ +class ServicesController < ApplicationController + def index + end +end diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb deleted file mode 100644 index 53ee698..0000000 --- a/app/controllers/sessions_controller.rb +++ /dev/null @@ -1,37 +0,0 @@ -# This controller handles the login/logout function of the site. -class SessionsController < ApplicationController - - # render new.rhtml - def new - end - - def login - create - end - - def create - self.current_account = Account.authenticate(params[:login], params[:password]) - if logged_in? - if params[:remember_me] == "1" - self.current_account.remember_me - cookies[:auth_token] = { :value => self.current_account.remember_token , :expires => self.current_account.remember_token_expires_at } - end - redirect_back_or_default('/') - flash[:notice] = "Logged in successfully" - else - render :action => 'new' - end - end - - def logout - destroy - end - - def destroy - self.current_account.forget_me if logged_in? - cookies.delete :auth_token - reset_session - flash[:notice] = "You have been logged out." - redirect_back_or_default('/') - end -end diff --git a/app/controllers/support_controller.rb b/app/controllers/support_controller.rb new file mode 100644 index 0000000..d743cd1 --- /dev/null +++ b/app/controllers/support_controller.rb @@ -0,0 +1,4 @@ +class SupportController < ApplicationController + def index + end +end diff --git a/app/controllers/suspended_controller.rb b/app/controllers/suspended_controller.rb new file mode 100644 index 0000000..1daaa05 --- /dev/null +++ b/app/controllers/suspended_controller.rb @@ -0,0 +1,5 @@ +class SuspendedController < ApplicationController + def index + render :partial => "index" + end +end diff --git a/app/controllers/web_controller.rb b/app/controllers/web_controller.rb new file mode 100644 index 0000000..47902db --- /dev/null +++ b/app/controllers/web_controller.rb @@ -0,0 +1,79 @@ +class WebController < ApplicationController + before_filter :login_required + before_filter :check_domain_ownership + + # If a domain is already specified, redirect to the web site editor + # Otherwise, redirect to the domain overview to select a domain to manage + def index + if params[:origin] + list + render :action => 'list' + else + redirect_to :controller => 'domain' + end + end + + # List the mailboxes for the specified domain + # + def list + @domain = DnsZone.find_by_origin(params[:origin]) + @title = "#{@domain.name} :: manage sites" + end + + ## Sites + + # Create a new Site for the specified domain + # + def new_site + @domain = DnsZone.find_by_origin(params[:origin]) + @site = WebSite.new + + render :layout => false + end + + # Edit a particular mailbox + # + def edit_site + @domain = DnsZone.find_by_origin(params[:origin]) + @site = WebSite.find_by_id( params[:id] ) + + render :layout => false + end + + # Creates a new site + # + def create_site + @domain = DnsZone.find_by_origin(params[:origin]) + @site = WebSite.new( params[:site] ) + @site.quota_bytes = 0 + @site.user_id = session[:user] + + if @site.save + flash[:notice] = 'Site was successfully created.' + end + + if params["aliases"] = "true" + @domain.service_records_by_name('www').each {|name, id| WebAlias.new( :web_site_id => @site.id, :dns_resource_id => id) } + end + + render :partial => 'list_sites', :layout => false + end + + # Updates the new site + # + def update_site + @domain = DnsZone.find_by_origin(params[:origin]) + @site = WebSite.find( params[:id] ) + + if params[:delete] + @site.destroy + flash[:notice] = 'Site was deleted.' + + elsif @site.update_attributes( params[:site] ) + flash[:notice] = 'Site was successfully updated.' + end + + render :partial => 'list_sites', :layout => false + end + +end diff --git a/app/controllers/zones_controller.rb b/app/controllers/zones_controller.rb deleted file mode 100644 index e2e7902..0000000 --- a/app/controllers/zones_controller.rb +++ /dev/null @@ -1,124 +0,0 @@ -class ZonesController < ApplicationController - before_filter :check_authorization - before_filter :load_zones, :only => [ :index, :list ] - before_filter :load_zone_by_id, :only => [ :show, :edit, :update, :destroy ] - before_filter :load_zone_by_origin, :only => [ :show_by_origin ] - - protected - def load_zone_by_id - @zone = DnsZone.find_by_id( params[:id] ) or raise ActiveRecord::RecordNotFound - end - - def load_zone_by_origin - @zone = DnsZone.find_by_origin( params[:origin] ) or raise ActiveRecord::RecordNotFound - end - - def load_zones - @zones = DnsZone.find(:all, :order => 'origin') - end - - public - def index - render :action => 'list' - end - - def show_by_origin - respond_to do |format| - format.html { render :action => 'show' } - format.xml { render :xml => @zone.to_xml } - format.txt { render :action => 'show', :layout => false } - end - end - - def show - respond_to do |format| - format.html { render :action => 'show' } - format.xml { render :xml => @zone.to_xml } - format.txt { render :action => 'show', :layout => false } - end - end - - def list - respond_to do |format| - format.html { render :action => 'list' } - format.xml { render :xml => @zones.to_xml } - end - end - - def edit - render :action => 'edit' - end - - def update - update = @zone.update_attributes( params[:zone] ) - - params[:dns_resources].each do |id, r| - if id.eql? 'new' - record = r.merge({:dns_resource_type => DnsResourceType.find_by_id(r[:dns_resource_type_id])}) - record.delete("dns_resource_type_id") - @zone.dns_resources << DnsResource.create( record ) unless r[:name].empty? and r[:ttl].empty? and r[:aux].empty? and r[:data].empty? - else - record = DnsResource.find_by_id( id ) - r.delete('id') - if r[:delete].eql? "1" - record.destroy - else - record.update_attributes( r ) - end - end - end - - if update - flash[:notice] = 'Zone was successfully updated.' - - respond_to do |format| - format.html { redirect_to zone_detail_url( @zone.origin ) } - format.xml { head :ok } - end - else - flash[:error] = 'Unable to save changes to zone: ' - flash[:error] += @zone.errors.collect {|field, errors| "#{field.capitalize} #{errors}"}.to_sentence - - respond_to do |format| - format.html { render :template => 'zones/edit' } - format.xml { render :xml => @server.errors.to_xml } - end - end - end - - def new - @zone = DnsZone.new - end - - def create - @zone = DnsZone.new( params[:zone].merge(:serial => 1) ) - - if @zone.save - @zone.dns_resources = DnsResource.default_records.map {|r| DnsResource.create( r.merge(:dns_zone => @zone) )} if params[:dns_resources][:default].eql? "true" - flash[:notice] = 'Zone was successfully created.' - - respond_to do |format| - format.html { redirect_to zone_detail_path( @zone.origin ) } - format.xml { head :created, :location => zone_detail_path( @zone.origin ) } - end - else - flash[:error] = 'Unable to create the new zone.' - - respond_to do |format| - format.html { render :template => 'zones/new' } - format.xml { render :xml => @zone.errors.to_xml } - end - end - end - - def destroy - @zone.resources.each {|r| r.destroy } - @zone.destroy - flash[:notice] = 'Zone has been removed from the database.' - - respond_to do |format| - format.html { redirect_to zones_url } - format.xml { head :ok } - end - end -end diff --git a/app/helpers/.svn/entries b/app/helpers/.svn/entries deleted file mode 100644 index 1c97c40..0000000 --- a/app/helpers/.svn/entries +++ /dev/null @@ -1,88 +0,0 @@ -8 - -dir -988 -svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/helpers -svn://svn.evilcode.net/sites - - - -2008-03-13T06:52:16.240218Z -988 -ryan - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b1206cc1-2106-0410-84da-53eeff8bd16c - -zones_helper.rb -file - - - - -2008-03-13T06:41:53.000000Z -cf96548b65ec2b3075c5c78af635a6ff -2008-03-13T06:35:53.795148Z -984 -ryan - -accounts_helper.rb -file - - - - -2008-03-12T23:21:43.000000Z -9f7194f5e5090d4c659cbfa24a308b42 -2008-03-12T00:18:13.520046Z -979 -ryan - -application_helper.rb -file - - - - -2008-03-13T06:41:53.000000Z -822433a7484daf7b0ea9740e2aa8ed1b -2008-03-13T04:14:42.024206Z -983 -ryan - -sessions_helper.rb -file - - - - -2008-03-12T23:21:43.000000Z -c6ef790c3028e485f5ef90cc114359d9 -2008-03-12T00:18:13.520046Z -979 -ryan - -dashboard_helper.rb -file - - - - -2008-03-13T06:52:33.000000Z -469507365365a84fdb6ab60ae58a197d -2008-03-13T06:52:16.240218Z -988 -ryan - diff --git a/app/helpers/.svn/format b/app/helpers/.svn/format deleted file mode 100644 index 45a4fb7..0000000 --- a/app/helpers/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/app/helpers/.svn/text-base/accounts_helper.rb.svn-base b/app/helpers/.svn/text-base/accounts_helper.rb.svn-base deleted file mode 100644 index 974ccc2..0000000 --- a/app/helpers/.svn/text-base/accounts_helper.rb.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -module AccountsHelper -end \ No newline at end of file diff --git a/app/helpers/.svn/text-base/application_helper.rb.svn-base b/app/helpers/.svn/text-base/application_helper.rb.svn-base deleted file mode 100644 index 531d614..0000000 --- a/app/helpers/.svn/text-base/application_helper.rb.svn-base +++ /dev/null @@ -1,83 +0,0 @@ -module ApplicationHelper - def header_text - header = "infernalhosting.net" - header += " :: #{@title.downcase}" if @title - return header - end - - def navigation_list - list = [] - - list << content_tag(:li, link_to("My Dashboard", dashboard_url)) if logged_in? - - list << content_tag(:li, link_to("Services", services_url)) - list << content_tag(:li, link_to("About", about_url)) - list << content_tag(:li, link_to("Support", support_url)) - list << content_tag(:li, link_to("Contact", contact_url)) - - unless logged_in? - list << content_tag(:li, link_to("Login", login_url)) - else - list << content_tag(:li, link_to("Logout", logout_url)) - end - - content_tag(:ul, list.join, :id => 'navigation') - end - - def footer - content_tag(:div, "© 2008 " + link_to('Infernal Hosting', 'http://infernalhosting.net/') , :id => 'footer') - end - - def flash_notice - if flash[:notice] - notice = flash[:notice] - flash.clear - content_tag(:div, notice, :id => 'errorExplanation') - end - end - - def html_error - case params[:code] - when '404' then - summary = "File Not Found" - description = "The request you have made cannot be found on this server." - when '500' then - summary = "Service Temporarily Unavailable" - description = "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." - else - summary = "Error Unknown" - description = "How did you even trigger this error?" - end - - [content_tag(:h2, "Error #{params[:code]}"), content_tag(:h4, summary), content_tag(:p, description)] - end - - - def all_error_messages_for *models - errors = [] - - for object_name in models - object = instance_variable_get("@#{object_name.to_s}") - unless object.errors.empty? - object.errors.full_messages.each { |error| errors << error} - end - end - - unless errors.empty? - content_tag(:div, - content_tag(:h2, "There seems to be something wrong...") + - content_tag(:p, "There were problems with the following fields:") + - content_tag(:ul, errors.collect {|e| content_tag(:li, e)}), - "id" => "errorExplanation", "class" => "errorExplanation" - ) - end - end - - def hider_toggle( text, div ) - link = link_to_function(text , nil) do |page| - page.visual_effect :toggle_blind, div, :duration => 0.2 - end - - content_tag(:span, link, :class => 'trigger') - end -end diff --git a/app/helpers/.svn/text-base/dashboard_helper.rb.svn-base b/app/helpers/.svn/text-base/dashboard_helper.rb.svn-base deleted file mode 100644 index 9df8b73..0000000 --- a/app/helpers/.svn/text-base/dashboard_helper.rb.svn-base +++ /dev/null @@ -1,10 +0,0 @@ -module DashboardHelper - - def dashboard_menu - list = [] - - list << content_tag(:li, link_to('Zones', zones_url), :class => 'admin_option') - - content_tag(:ul, list.join, :id => 'dashboard_menu') - end -end diff --git a/app/helpers/.svn/text-base/sessions_helper.rb.svn-base b/app/helpers/.svn/text-base/sessions_helper.rb.svn-base deleted file mode 100644 index f54a8fc..0000000 --- a/app/helpers/.svn/text-base/sessions_helper.rb.svn-base +++ /dev/null @@ -1,2 +0,0 @@ -module SessionsHelper -end \ No newline at end of file diff --git a/app/helpers/.svn/text-base/zones_helper.rb.svn-base b/app/helpers/.svn/text-base/zones_helper.rb.svn-base deleted file mode 100644 index d0664c7..0000000 --- a/app/helpers/.svn/text-base/zones_helper.rb.svn-base +++ /dev/null @@ -1,19 +0,0 @@ -module ZonesHelper - def domain_list - list = [] - @zones.each do |zone| - content = content_tag(:h4, link_to(zone.origin, zone_detail_path(zone.origin))) - - options = [] - options << content_tag(:li, link_to('Add Services To Domain', '#')) - list << content_tag(:div, [content, content_tag(:ul, options, :class => 'options')], :class => 'grid-item') - end - - list - end - - def collect_dns_resource_types( resource = nil ) - selected = resource.nil? ? [] : [resource.name, resource.id] - options_for_select DnsResourceType.find(:all, :order => 'name').map {|t| [t.name, t.id]}, selected - end -end diff --git a/app/helpers/about_helper.rb b/app/helpers/about_helper.rb new file mode 100644 index 0000000..68e69ae --- /dev/null +++ b/app/helpers/about_helper.rb @@ -0,0 +1,2 @@ +module AboutHelper +end diff --git a/app/helpers/account_helper.rb b/app/helpers/account_helper.rb new file mode 100644 index 0000000..1b63056 --- /dev/null +++ b/app/helpers/account_helper.rb @@ -0,0 +1,2 @@ +module AccountHelper +end \ No newline at end of file diff --git a/app/helpers/accounts_helper.rb b/app/helpers/accounts_helper.rb deleted file mode 100644 index 974ccc2..0000000 --- a/app/helpers/accounts_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module AccountsHelper -end \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 531d614..22a7940 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,83 +1,3 @@ +# Methods added to this helper will be available to all templates in the application. module ApplicationHelper - def header_text - header = "infernalhosting.net" - header += " :: #{@title.downcase}" if @title - return header - end - - def navigation_list - list = [] - - list << content_tag(:li, link_to("My Dashboard", dashboard_url)) if logged_in? - - list << content_tag(:li, link_to("Services", services_url)) - list << content_tag(:li, link_to("About", about_url)) - list << content_tag(:li, link_to("Support", support_url)) - list << content_tag(:li, link_to("Contact", contact_url)) - - unless logged_in? - list << content_tag(:li, link_to("Login", login_url)) - else - list << content_tag(:li, link_to("Logout", logout_url)) - end - - content_tag(:ul, list.join, :id => 'navigation') - end - - def footer - content_tag(:div, "© 2008 " + link_to('Infernal Hosting', 'http://infernalhosting.net/') , :id => 'footer') - end - - def flash_notice - if flash[:notice] - notice = flash[:notice] - flash.clear - content_tag(:div, notice, :id => 'errorExplanation') - end - end - - def html_error - case params[:code] - when '404' then - summary = "File Not Found" - description = "The request you have made cannot be found on this server." - when '500' then - summary = "Service Temporarily Unavailable" - description = "The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later." - else - summary = "Error Unknown" - description = "How did you even trigger this error?" - end - - [content_tag(:h2, "Error #{params[:code]}"), content_tag(:h4, summary), content_tag(:p, description)] - end - - - def all_error_messages_for *models - errors = [] - - for object_name in models - object = instance_variable_get("@#{object_name.to_s}") - unless object.errors.empty? - object.errors.full_messages.each { |error| errors << error} - end - end - - unless errors.empty? - content_tag(:div, - content_tag(:h2, "There seems to be something wrong...") + - content_tag(:p, "There were problems with the following fields:") + - content_tag(:ul, errors.collect {|e| content_tag(:li, e)}), - "id" => "errorExplanation", "class" => "errorExplanation" - ) - end - end - - def hider_toggle( text, div ) - link = link_to_function(text , nil) do |page| - page.visual_effect :toggle_blind, div, :duration => 0.2 - end - - content_tag(:span, link, :class => 'trigger') - end end diff --git a/app/helpers/contact_helper.rb b/app/helpers/contact_helper.rb new file mode 100644 index 0000000..83d146d --- /dev/null +++ b/app/helpers/contact_helper.rb @@ -0,0 +1,2 @@ +module ContactHelper +end diff --git a/app/helpers/dashboard_helper.rb b/app/helpers/dashboard_helper.rb deleted file mode 100644 index 9df8b73..0000000 --- a/app/helpers/dashboard_helper.rb +++ /dev/null @@ -1,10 +0,0 @@ -module DashboardHelper - - def dashboard_menu - list = [] - - list << content_tag(:li, link_to('Zones', zones_url), :class => 'admin_option') - - content_tag(:ul, list.join, :id => 'dashboard_menu') - end -end diff --git a/app/helpers/dns_helper.rb b/app/helpers/dns_helper.rb new file mode 100644 index 0000000..d110d87 --- /dev/null +++ b/app/helpers/dns_helper.rb @@ -0,0 +1,2 @@ +module DnsHelper +end diff --git a/app/helpers/domain_helper.rb b/app/helpers/domain_helper.rb new file mode 100644 index 0000000..6f62d31 --- /dev/null +++ b/app/helpers/domain_helper.rb @@ -0,0 +1,2 @@ +module DomainHelper +end diff --git a/app/helpers/email_helper.rb b/app/helpers/email_helper.rb new file mode 100644 index 0000000..37a644c --- /dev/null +++ b/app/helpers/email_helper.rb @@ -0,0 +1,2 @@ +module EmailHelper +end diff --git a/app/helpers/error_helper.rb b/app/helpers/error_helper.rb new file mode 100644 index 0000000..8c30586 --- /dev/null +++ b/app/helpers/error_helper.rb @@ -0,0 +1,2 @@ +module ErrorHelper +end diff --git a/app/helpers/login_helper.rb b/app/helpers/login_helper.rb new file mode 100644 index 0000000..a0418e3 --- /dev/null +++ b/app/helpers/login_helper.rb @@ -0,0 +1,2 @@ +module LoginHelper +end diff --git a/app/helpers/main_helper.rb b/app/helpers/main_helper.rb new file mode 100644 index 0000000..826effe --- /dev/null +++ b/app/helpers/main_helper.rb @@ -0,0 +1,2 @@ +module MainHelper +end diff --git a/app/helpers/panel_helper.rb b/app/helpers/panel_helper.rb new file mode 100644 index 0000000..d9757b9 --- /dev/null +++ b/app/helpers/panel_helper.rb @@ -0,0 +1,2 @@ +module PanelHelper +end diff --git a/app/helpers/services_helper.rb b/app/helpers/services_helper.rb new file mode 100644 index 0000000..de58435 --- /dev/null +++ b/app/helpers/services_helper.rb @@ -0,0 +1,2 @@ +module ServicesHelper +end diff --git a/app/helpers/sessions_helper.rb b/app/helpers/sessions_helper.rb deleted file mode 100644 index f54a8fc..0000000 --- a/app/helpers/sessions_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module SessionsHelper -end \ No newline at end of file diff --git a/app/helpers/support_helper.rb b/app/helpers/support_helper.rb new file mode 100644 index 0000000..9b5bc84 --- /dev/null +++ b/app/helpers/support_helper.rb @@ -0,0 +1,2 @@ +module SupportHelper +end diff --git a/app/helpers/suspended_helper.rb b/app/helpers/suspended_helper.rb new file mode 100644 index 0000000..c6a6a3c --- /dev/null +++ b/app/helpers/suspended_helper.rb @@ -0,0 +1,2 @@ +module SuspendedHelper +end diff --git a/app/helpers/web_helper.rb b/app/helpers/web_helper.rb new file mode 100644 index 0000000..55cd56a --- /dev/null +++ b/app/helpers/web_helper.rb @@ -0,0 +1,2 @@ +module WebHelper +end diff --git a/app/helpers/zones_helper.rb b/app/helpers/zones_helper.rb deleted file mode 100644 index d0664c7..0000000 --- a/app/helpers/zones_helper.rb +++ /dev/null @@ -1,19 +0,0 @@ -module ZonesHelper - def domain_list - list = [] - @zones.each do |zone| - content = content_tag(:h4, link_to(zone.origin, zone_detail_path(zone.origin))) - - options = [] - options << content_tag(:li, link_to('Add Services To Domain', '#')) - list << content_tag(:div, [content, content_tag(:ul, options, :class => 'options')], :class => 'grid-item') - end - - list - end - - def collect_dns_resource_types( resource = nil ) - selected = resource.nil? ? [] : [resource.name, resource.id] - options_for_select DnsResourceType.find(:all, :order => 'name').map {|t| [t.name, t.id]}, selected - end -end diff --git a/app/models/.svn/entries b/app/models/.svn/entries deleted file mode 100644 index 89201fa..0000000 --- a/app/models/.svn/entries +++ /dev/null @@ -1,100 +0,0 @@ -8 - -dir -988 -svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/models -svn://svn.evilcode.net/sites - - - -2008-03-13T06:35:53.795148Z -984 -ryan - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b1206cc1-2106-0410-84da-53eeff8bd16c - -dns_zone.rb -file - - - - -2008-03-13T06:41:55.000000Z -52727323f44ce75587297a8bd66206a5 -2008-03-13T06:35:53.795148Z -984 -ryan - -account_observer.rb -file - - - - -2008-03-12T23:21:47.000000Z -7525c0a105d6b37ab01a334ff00d98a9 -2008-03-12T00:18:13.520046Z -979 -ryan - -account_mailer.rb -file - - - - -2008-03-12T23:21:48.000000Z -634e752e3f78ed697fe881e8dd1ddfd7 -2008-03-12T00:18:13.520046Z -979 -ryan - -dns_resource.rb -file - - - - -2008-03-13T06:41:55.000000Z -6da8fad535046f64728ab55ddb9ebbd1 -2008-03-13T06:35:53.795148Z -984 -ryan - -account.rb -file - - - - -2008-03-12T23:21:49.000000Z -b14f06af29ed1a14073de357b51fc98b -2008-03-12T00:18:13.520046Z -979 -ryan - -dns_resource_type.rb -file - - - - -2008-03-12T23:21:49.000000Z -3cb42ed82e209b8322d36d9a81e51263 -2008-03-12T23:19:06.376507Z -981 -ryan - diff --git a/app/models/.svn/format b/app/models/.svn/format deleted file mode 100644 index 45a4fb7..0000000 --- a/app/models/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/app/models/.svn/text-base/account.rb.svn-base b/app/models/.svn/text-base/account.rb.svn-base deleted file mode 100644 index a428f40..0000000 --- a/app/models/.svn/text-base/account.rb.svn-base +++ /dev/null @@ -1,117 +0,0 @@ -require 'digest/sha1' -class Account < ActiveRecord::Base - # Virtual attribute for the unencrypted password - attr_accessor :password - - validates_presence_of :first_name, :last_name, :login, :email_address, :phone_number - validates_presence_of :password, :if => :password_required? - validates_presence_of :password_confirmation, :if => :password_required? - validates_length_of :password, :within => 4..40, :if => :password_required? - validates_confirmation_of :password, :if => :password_required? - validates_length_of :login, :within => 3..40 - validates_length_of :email_address, :within => 3..100 - validates_uniqueness_of :login, :email_address, :case_sensitive => false - before_save :encrypt_password - - attr_accessible :first_name, :last_name, :phone_number, :login, :email_address, :password, :password_confirmation - - acts_as_state_machine :initial => :pending - state :passive - state :pending, :enter => :make_activation_code - state :active, :enter => :do_activate - state :suspended - state :deleted, :enter => :do_delete - - event :register do - transitions :from => :passive, :to => :pending, :guard => Proc.new {|u| !(u.crypted_password.blank? && u.password.blank?) } - end - - event :activate do - transitions :from => :pending, :to => :active - end - - event :suspend do - transitions :from => [:passive, :pending, :active], :to => :suspended - end - - event :delete do - transitions :from => [:passive, :pending, :active, :suspended], :to => :deleted - end - - event :unsuspend do - transitions :from => :suspended, :to => :active, :guard => Proc.new {|u| !u.activated_at.blank? } - transitions :from => :suspended, :to => :pending, :guard => Proc.new {|u| !u.activation_code.blank? } - transitions :from => :suspended, :to => :passive - end - - # Authenticates a user by their login name and unencrypted password. Returns the user or nil. - def self.authenticate(login, password) - u = find_in_state :first, :active, :conditions => {:login => login} # need to get the salt - u && u.authenticated?(password) ? u : nil - end - - # Encrypts some data with the salt. - def self.encrypt(password, salt) - Digest::SHA1.hexdigest("--#{salt}--#{password}--") - end - - # Encrypts the password with the user salt - def encrypt(password) - self.class.encrypt(password, salt) - end - - def authenticated?(password) - crypted_password == encrypt(password) - end - - def remember_token? - remember_token_expires_at && Time.now.utc < remember_token_expires_at - end - - # These create and unset the fields required for remembering users between browser closes - def remember_me - remember_me_for 2.weeks - end - - def remember_me_for(time) - remember_me_until time.from_now.utc - end - - def remember_me_until(time) - self.remember_token_expires_at = time - self.remember_token = encrypt("#{email_address}--#{remember_token_expires_at}") - save(false) - end - - def forget_me - self.remember_token_expires_at = nil - self.remember_token = nil - save(false) - end - - protected - # before filter - def encrypt_password - return if password.blank? - self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record? - self.crypted_password = encrypt(password) - end - - def password_required? - crypted_password.blank? || !password.blank? - end - - def make_activation_code - self.deleted_at = nil - self.activation_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join ) - end - - def do_delete - self.deleted_at = Time.now.utc - end - - def do_activate - self.activated_at = Time.now.utc - self.deleted_at = self.activation_code = nil - end -end diff --git a/app/models/.svn/text-base/account_mailer.rb.svn-base b/app/models/.svn/text-base/account_mailer.rb.svn-base deleted file mode 100644 index f7fcea4..0000000 --- a/app/models/.svn/text-base/account_mailer.rb.svn-base +++ /dev/null @@ -1,22 +0,0 @@ -class AccountMailer < ActionMailer::Base - def signup_notification(account) - setup_email(account) - @subject += 'Please activate your new account' - @body[:url] = "https://infernalhosting.net/activate/#{account.activation_code}" - end - - def activation(account) - setup_email(account) - @subject += 'Your account has been activated!' - @body[:url] = 'http://infernalhosting.net/' - end - - protected - def setup_email(account) - @recipients = "#{account.email_address}" - @from = "signup@infernalhosting.net" - @subject = "[infernalhosting.net] " - @sent_on = Time.now - @body[:account] = account - end -end diff --git a/app/models/.svn/text-base/account_observer.rb.svn-base b/app/models/.svn/text-base/account_observer.rb.svn-base deleted file mode 100644 index adeddf9..0000000 --- a/app/models/.svn/text-base/account_observer.rb.svn-base +++ /dev/null @@ -1,9 +0,0 @@ -class AccountObserver < ActiveRecord::Observer - def after_create(account) - AccountMailer.deliver_signup_notification(account) - end - - def after_save(account) - AccountMailer.deliver_activation(account) if account.pending? - end -end diff --git a/app/models/.svn/text-base/dns_resource.rb.svn-base b/app/models/.svn/text-base/dns_resource.rb.svn-base deleted file mode 100644 index 78ec3fd..0000000 --- a/app/models/.svn/text-base/dns_resource.rb.svn-base +++ /dev/null @@ -1,77 +0,0 @@ -# Table name: dns_resources -# -# id :integer(11) not null, primary key -# dns_zone_id :integer(11) not null, foreign key -# dns_resource_type_id :integer(11) not null, foreign key -# name :string(64) not null -# data :string(255) not null -# aux :integer(11) -# ttl :integer(11) -# - -class DnsResource < ActiveRecord::Base - belongs_to :dns_zone - belongs_to :dns_resource_type - - validates_presence_of :dns_zone_id, :dns_resource_type_id - validates_presence_of :data - validates_numericality_of :aux, :ttl - - # shorthand methods - # - def resource_type - self.dns_resource_type.name - end - - def self.default_records - defaults = [] - defaults << {:dns_resource_type_id => 1, :name => '', :data => '72.232.239.133', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 6, :name => '', :data => 'ns0.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 6, :name => '', :data => 'ns1.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 5, :name => '', :data => 'mail.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 3, :name => 'mail', :data => 'mail.infernalhosting.net', :aux => 0, :ttl => 300} - end - - ## formatting methods - # - def formatted_data - case resource_type - when "A" then data # IPv4 - when "AAAA" then data # IPv6 - when "CNAME" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "HINFO" then '"' + data + '"' # text field - when "MX" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "NS" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "PTR" then data # IPv4 or IPv6 address - when "SRV" then data # would be 'port target' - when "TXT" then '"' + data + '"' # text field - else data # general case - end - end - - def to_xml( options = {} ) - options[:indent] ||= 2 - xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:ident]) - xml.instruct! unless options[:skip_instruct] - xml.resource do - xml.id( id, :type => 'integer' ) - xml.name( name ) - xml.type( resource_type ) - xml.data( data ) - xml.aux( aux, :type => 'integer' ) unless aux.nil? - xml.ttl( ttl, :type => 'integer' ) unless ttl.nil? - end - end - - def to_txt - wire = [] - wire << name - wire << ttl unless ttl.to_i < dns_zone.ttl.to_i - wire << "IN" # could be HS or CH historically - wire << resource_type - wire << aux unless aux.eql? 0 and !resource_type.eql? 'MX' - wire << formatted_data - - wire.join("\t") - end -end diff --git a/app/models/.svn/text-base/dns_resource_type.rb.svn-base b/app/models/.svn/text-base/dns_resource_type.rb.svn-base deleted file mode 100644 index d48bbb8..0000000 --- a/app/models/.svn/text-base/dns_resource_type.rb.svn-base +++ /dev/null @@ -1,13 +0,0 @@ -# Table name: dns_resource_types -# -# id :integer(11) not null, primary key -# name :string(255) not null -# description :text -# - -class DnsResourceType < ActiveRecord::Base - - validates_presence_of :name - validates_format_of :name, :with => /(A|AAAA|CNAME|HINFO|MX|NS|PTR|SRV|TXT)/ - -end diff --git a/app/models/.svn/text-base/dns_zone.rb.svn-base b/app/models/.svn/text-base/dns_zone.rb.svn-base deleted file mode 100644 index ea87f2b..0000000 --- a/app/models/.svn/text-base/dns_zone.rb.svn-base +++ /dev/null @@ -1,63 +0,0 @@ -# Table name: dns_zones -# -# id :integer(11) not null, primary key -# origin :string(255) not null -# ns :string(255) not null -# mbox :string(255) not null -# serial :integer(11) not null -# refresh :integer(11) not null, default 10800 -# retry :integer(11) not null, default 3600 -# expire :integer(11) not null, default 604800 -# ttl :integer(11) not null, default 3600 -# minimum :integer(11) not null, default 3600 -# - -class DnsZone < ActiveRecord::Base - has_many :dns_resources, :order => 'name' - - validates_presence_of :origin, :ns, :mbox - validates_presence_of :refresh, :retry, :expire, :ttl - validates_numericality_of :refresh, :retry, :expire, :ttl - validates_uniqueness_of :origin - - ## shorthand methods - # - def resources - self.dns_resources - end - - ## formatting methods - # - def formatted_origin - origin =~ /\.$/ ? origin : origin.gsub(/$/,'.') - end - - def formatted_ns - ns =~ /\.$/ ? ns : ns.gsub(/$/,'.') - end - - def formatted_mbox - mbox =~ /\.$/ ? mbox : mbox.gsub(/$/,'.') - end - - def to_xml( options = {} ) - options[:indent] ||= 2 - xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:ident]) - xml.instruct! unless options[:skip_instruct] - xml.zone do - xml.id( id, :type => 'integer' ) - xml.origin( origin ) - xml.ns( ns ) - xml.mbox( mbox ) - xml.refresh( refresh, :type => 'integer' ) unless refresh.nil? - xml.retry( self.retry, :type => 'integer' ) unless self.retry.nil? - xml.expire( expire, :type => 'integer' ) unless expire.nil? - xml.ttl( ttl, :type => 'integer' ) unless ttl.nil? - resources.to_xml(:skip_instruct => true, :builder => xml) unless resources.empty? - end - end - - def to_txt( options = {} ) - - end -end diff --git a/app/models/account.rb b/app/models/account.rb deleted file mode 100644 index a428f40..0000000 --- a/app/models/account.rb +++ /dev/null @@ -1,117 +0,0 @@ -require 'digest/sha1' -class Account < ActiveRecord::Base - # Virtual attribute for the unencrypted password - attr_accessor :password - - validates_presence_of :first_name, :last_name, :login, :email_address, :phone_number - validates_presence_of :password, :if => :password_required? - validates_presence_of :password_confirmation, :if => :password_required? - validates_length_of :password, :within => 4..40, :if => :password_required? - validates_confirmation_of :password, :if => :password_required? - validates_length_of :login, :within => 3..40 - validates_length_of :email_address, :within => 3..100 - validates_uniqueness_of :login, :email_address, :case_sensitive => false - before_save :encrypt_password - - attr_accessible :first_name, :last_name, :phone_number, :login, :email_address, :password, :password_confirmation - - acts_as_state_machine :initial => :pending - state :passive - state :pending, :enter => :make_activation_code - state :active, :enter => :do_activate - state :suspended - state :deleted, :enter => :do_delete - - event :register do - transitions :from => :passive, :to => :pending, :guard => Proc.new {|u| !(u.crypted_password.blank? && u.password.blank?) } - end - - event :activate do - transitions :from => :pending, :to => :active - end - - event :suspend do - transitions :from => [:passive, :pending, :active], :to => :suspended - end - - event :delete do - transitions :from => [:passive, :pending, :active, :suspended], :to => :deleted - end - - event :unsuspend do - transitions :from => :suspended, :to => :active, :guard => Proc.new {|u| !u.activated_at.blank? } - transitions :from => :suspended, :to => :pending, :guard => Proc.new {|u| !u.activation_code.blank? } - transitions :from => :suspended, :to => :passive - end - - # Authenticates a user by their login name and unencrypted password. Returns the user or nil. - def self.authenticate(login, password) - u = find_in_state :first, :active, :conditions => {:login => login} # need to get the salt - u && u.authenticated?(password) ? u : nil - end - - # Encrypts some data with the salt. - def self.encrypt(password, salt) - Digest::SHA1.hexdigest("--#{salt}--#{password}--") - end - - # Encrypts the password with the user salt - def encrypt(password) - self.class.encrypt(password, salt) - end - - def authenticated?(password) - crypted_password == encrypt(password) - end - - def remember_token? - remember_token_expires_at && Time.now.utc < remember_token_expires_at - end - - # These create and unset the fields required for remembering users between browser closes - def remember_me - remember_me_for 2.weeks - end - - def remember_me_for(time) - remember_me_until time.from_now.utc - end - - def remember_me_until(time) - self.remember_token_expires_at = time - self.remember_token = encrypt("#{email_address}--#{remember_token_expires_at}") - save(false) - end - - def forget_me - self.remember_token_expires_at = nil - self.remember_token = nil - save(false) - end - - protected - # before filter - def encrypt_password - return if password.blank? - self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--") if new_record? - self.crypted_password = encrypt(password) - end - - def password_required? - crypted_password.blank? || !password.blank? - end - - def make_activation_code - self.deleted_at = nil - self.activation_code = Digest::SHA1.hexdigest( Time.now.to_s.split(//).sort_by {rand}.join ) - end - - def do_delete - self.deleted_at = Time.now.utc - end - - def do_activate - self.activated_at = Time.now.utc - self.deleted_at = self.activation_code = nil - end -end diff --git a/app/models/account_mailer.rb b/app/models/account_mailer.rb deleted file mode 100644 index f7fcea4..0000000 --- a/app/models/account_mailer.rb +++ /dev/null @@ -1,22 +0,0 @@ -class AccountMailer < ActionMailer::Base - def signup_notification(account) - setup_email(account) - @subject += 'Please activate your new account' - @body[:url] = "https://infernalhosting.net/activate/#{account.activation_code}" - end - - def activation(account) - setup_email(account) - @subject += 'Your account has been activated!' - @body[:url] = 'http://infernalhosting.net/' - end - - protected - def setup_email(account) - @recipients = "#{account.email_address}" - @from = "signup@infernalhosting.net" - @subject = "[infernalhosting.net] " - @sent_on = Time.now - @body[:account] = account - end -end diff --git a/app/models/account_observer.rb b/app/models/account_observer.rb deleted file mode 100644 index adeddf9..0000000 --- a/app/models/account_observer.rb +++ /dev/null @@ -1,9 +0,0 @@ -class AccountObserver < ActiveRecord::Observer - def after_create(account) - AccountMailer.deliver_signup_notification(account) - end - - def after_save(account) - AccountMailer.deliver_activation(account) if account.pending? - end -end diff --git a/app/models/dns_resource.rb b/app/models/dns_resource.rb index 78ec3fd..58e03be 100644 --- a/app/models/dns_resource.rb +++ b/app/models/dns_resource.rb @@ -1,77 +1,9 @@ -# Table name: dns_resources -# -# id :integer(11) not null, primary key -# dns_zone_id :integer(11) not null, foreign key -# dns_resource_type_id :integer(11) not null, foreign key -# name :string(64) not null -# data :string(255) not null -# aux :integer(11) -# ttl :integer(11) -# - class DnsResource < ActiveRecord::Base - belongs_to :dns_zone - belongs_to :dns_resource_type - - validates_presence_of :dns_zone_id, :dns_resource_type_id - validates_presence_of :data - validates_numericality_of :aux, :ttl - - # shorthand methods - # - def resource_type - self.dns_resource_type.name - end - - def self.default_records - defaults = [] - defaults << {:dns_resource_type_id => 1, :name => '', :data => '72.232.239.133', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 6, :name => '', :data => 'ns0.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 6, :name => '', :data => 'ns1.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 5, :name => '', :data => 'mail.infernalhosting.net', :aux => 0, :ttl => 300} - defaults << {:dns_resource_type_id => 3, :name => 'mail', :data => 'mail.infernalhosting.net', :aux => 0, :ttl => 300} - end - - ## formatting methods - # - def formatted_data - case resource_type - when "A" then data # IPv4 - when "AAAA" then data # IPv6 - when "CNAME" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "HINFO" then '"' + data + '"' # text field - when "MX" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "NS" then data =~ /\.$/ ? data : data.gsub(/$/,'.') # alias to name - when "PTR" then data # IPv4 or IPv6 address - when "SRV" then data # would be 'port target' - when "TXT" then '"' + data + '"' # text field - else data # general case - end - end - - def to_xml( options = {} ) - options[:indent] ||= 2 - xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:ident]) - xml.instruct! unless options[:skip_instruct] - xml.resource do - xml.id( id, :type => 'integer' ) - xml.name( name ) - xml.type( resource_type ) - xml.data( data ) - xml.aux( aux, :type => 'integer' ) unless aux.nil? - xml.ttl( ttl, :type => 'integer' ) unless ttl.nil? - end - end + belongs_to :dns_zone - def to_txt - wire = [] - wire << name - wire << ttl unless ttl.to_i < dns_zone.ttl.to_i - wire << "IN" # could be HS or CH historically - wire << resource_type - wire << aux unless aux.eql? 0 and !resource_type.eql? 'MX' - wire << formatted_data - - wire.join("\t") - end + self.inheritance_column = "inheritance_type" + + def type + self['type'] + end end diff --git a/app/models/dns_resource_type.rb b/app/models/dns_resource_type.rb deleted file mode 100644 index d48bbb8..0000000 --- a/app/models/dns_resource_type.rb +++ /dev/null @@ -1,13 +0,0 @@ -# Table name: dns_resource_types -# -# id :integer(11) not null, primary key -# name :string(255) not null -# description :text -# - -class DnsResourceType < ActiveRecord::Base - - validates_presence_of :name - validates_format_of :name, :with => /(A|AAAA|CNAME|HINFO|MX|NS|PTR|SRV|TXT)/ - -end diff --git a/app/models/dns_zone.rb b/app/models/dns_zone.rb index ea87f2b..00d9b4e 100644 --- a/app/models/dns_zone.rb +++ b/app/models/dns_zone.rb @@ -1,63 +1,54 @@ -# Table name: dns_zones -# -# id :integer(11) not null, primary key -# origin :string(255) not null -# ns :string(255) not null -# mbox :string(255) not null -# serial :integer(11) not null -# refresh :integer(11) not null, default 10800 -# retry :integer(11) not null, default 3600 -# expire :integer(11) not null, default 604800 -# ttl :integer(11) not null, default 3600 -# minimum :integer(11) not null, default 3600 -# - class DnsZone < ActiveRecord::Base - has_many :dns_resources, :order => 'name' - - validates_presence_of :origin, :ns, :mbox - validates_presence_of :refresh, :retry, :expire, :ttl - validates_numericality_of :refresh, :retry, :expire, :ttl - validates_uniqueness_of :origin - - ## shorthand methods - # - def resources - self.dns_resources - end - - ## formatting methods - # - def formatted_origin - origin =~ /\.$/ ? origin : origin.gsub(/$/,'.') - end - - def formatted_ns - ns =~ /\.$/ ? ns : ns.gsub(/$/,'.') - end - - def formatted_mbox - mbox =~ /\.$/ ? mbox : mbox.gsub(/$/,'.') - end - - def to_xml( options = {} ) - options[:indent] ||= 2 - xml = options[:builder] ||= Builder::XmlMarkup.new(:indent => options[:ident]) - xml.instruct! unless options[:skip_instruct] - xml.zone do - xml.id( id, :type => 'integer' ) - xml.origin( origin ) - xml.ns( ns ) - xml.mbox( mbox ) - xml.refresh( refresh, :type => 'integer' ) unless refresh.nil? - xml.retry( self.retry, :type => 'integer' ) unless self.retry.nil? - xml.expire( expire, :type => 'integer' ) unless expire.nil? - xml.ttl( ttl, :type => 'integer' ) unless ttl.nil? - resources.to_xml(:skip_instruct => true, :builder => xml) unless resources.empty? - end - end - - def to_txt( options = {} ) - - end + belongs_to :user + has_many :dns_resources, :order => 'name, type' + + validates_presence_of :origin + + def service_records + DnsResource.find(:all, :include => ['dns_zone'], :order => 'dns_resources.id, dns_resources.name', :conditions => ["dns_resources.dns_zone_id = ? and (dns_resources.type = 'A' or dns_resources.type = 'CNAME')", self.id]).collect {|r| [ sprintf("%s%s%s",r.name, !r.name.empty? ? '.' : '', r.dns_zone.origin), r.id]} + end + + def service_records_by_name(name) + DnsResource.find(:all, :include => ['dns_zone'], :order => 'dns_resources.id, dns_resources.name', :conditions => ["dns_resources.dns_zone_id = ? and (dns_resources.type = 'A' or dns_resources.type = 'CNAME') and dns_resources.name = ?", self.id, name]).collect {|r| [ sprintf("%s%s%s",r.name, !r.name.empty? ? '.' : '', r.dns_zone.origin), r.id]} + end + + def service_records_with_omit(omit = []) + records = self.service_records + + # remove the matching omitions + for pattern in omit + records.delete_if {|record, id| record =~ /#{pattern}/} + end + + # return the list + records + end + + def prices + {:register => "$6.99", :transfer => "$6.99"} + end + + def name + self.origin + end + + def sites + WebSite.find(:all, :include => ['dns_resource'], :conditions => ['dns_resources.dns_zone_id = ?', self.id]) + end + + def mailboxes + MailUser.find(:all, :include => ['dns_resource'], :conditions => ['dns_resources.dns_zone_id = ?', self.id]) + end + + def mailaliases + MailAlias.find(:all, :include => ['dns_resource'], :conditions => ['dns_resources.dns_zone_id = ?', self.id]) + end + + def databases + Array.new + end + + def records + self.dns_resources + end end diff --git a/app/models/mail_alias.rb b/app/models/mail_alias.rb new file mode 100644 index 0000000..47796eb --- /dev/null +++ b/app/models/mail_alias.rb @@ -0,0 +1,20 @@ +class MailAlias < ActiveRecord::Base + belongs_to :user + belongs_to :dns_resource + + ## shorthand formatting functions + + # displays the domain for the mailbox + # + def domain + sprintf("%s%s%s", self.dns_resource.name, !self.dns_resource.name.empty? ? '.' : '', self.dns_resource.dns_zone.origin) + end + + # displays the the full address of the mailbox + # + def address + sprintf("%s@%s", self.username, self.domain) + end + + +end diff --git a/app/models/mail_user.rb b/app/models/mail_user.rb new file mode 100644 index 0000000..616ddb0 --- /dev/null +++ b/app/models/mail_user.rb @@ -0,0 +1,50 @@ +class MailUser < ActiveRecord::Base + belongs_to :user + belongs_to :dns_resource + + validates_presence_of :name + validates_presence_of :username + validates_presence_of :password, :if => :password_required? + validates_length_of :password, :within => 4..40, :if => :password_required? + + #before_save :encrypt_password + + ## shorthand formatting functions + + # displays the domain for the mailbox + # + def domain + sprintf("%s%s%s", self.dns_resource.name, !self.dns_resource.name.empty? ? '.' : '', self.dns_resource.dns_zone.origin) + end + + # displays the the full address of the mailbox + # + def address + sprintf("%s@%s", self.username, self.domain) + end + + # Encrypts the user's password as a salted md5 hash + # + # * password - the raw password to be encrypted + def encrypt(password) + Crypt::crypt(password, :md5) + end + + # Checks an unencrypted password against the encrypted one + # + # * password - the raw password to be checked + def authenticated?(password) + Crypt::check(password, self.password, :md5) + end + + def encrypt_password + return if self.password.blank? + self.password = encrypt(password) + end + + protected + + def password_required? + self.password.blank? || !password.blank? + end +end diff --git a/app/models/registrar.rb b/app/models/registrar.rb new file mode 100644 index 0000000..cfa6477 --- /dev/null +++ b/app/models/registrar.rb @@ -0,0 +1,19 @@ +class Registrar + + # ryan@kaneda.net + # parent id 999999998 + # demo url: http://api.onlyfordemo.net/anacreon/servlet/APIv3 + # retail url: http://www.myorderbox.com/anacreon/servlet/APIv3 + + + class ConnectionFactory + def initialize + end + + end + + def initialize + @factory = ConnectionFactory.new + end + +end diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..b42ba47 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,61 @@ +class User < ActiveRecord::Base + has_many :dns_zones + has_many :mail_users + has_many :web_sites + + validates_presence_of :username + validates_presence_of :password, :if => :password_required? + validates_length_of :password, :within => 4..40, :if => :password_required? + validates_confirmation_of :password, :if => :password_required? + validates_length_of :username, :within => 3..40 + validates_uniqueness_of :username, :case_sensitive => false + + before_save :encrypt_password + + ## + ## Authentication + ## + + # Checks the given credentials for logging the User in. + # + # * username - the account name. + # * password - the password. + def self.authenticate(username, password) + u = find_by_username(username) + u && u.authenticated?(password) ? u : nil + end + + # Encrypts the user's password as a salted md5 hash + # + # * password - the raw password to be encrypted + def encrypt(password) + Crypt::crypt(password, :md5) + end + + # Checks an unencrypted password against the encrypted one + # + # * password - the raw password to be checked + def authenticated?(password) + Crypt::check(password, self.password, :md5) + end + + ## + ## DNS + ## + def domains + DnsZone.find(:all, :conditions => [ "user_id =?", self.id], :order => 'origin') + end + + protected + + # Create a new encrypted password + # + def encrypt_password + return if self.password.blank? + self.password = encrypt(password) + end + + def password_required? + self.password.blank? || !password.blank? + end +end diff --git a/app/models/web_alias.rb b/app/models/web_alias.rb new file mode 100644 index 0000000..88e7907 --- /dev/null +++ b/app/models/web_alias.rb @@ -0,0 +1,3 @@ +class WebAlias < ActiveRecord::Base + belongs_to :web_site +end diff --git a/app/models/web_site.rb b/app/models/web_site.rb new file mode 100644 index 0000000..0cb4b96 --- /dev/null +++ b/app/models/web_site.rb @@ -0,0 +1,14 @@ +class WebSite < ActiveRecord::Base + belongs_to :user + belongs_to :dns_resource + has_many :web_alias + + ## shorthand formatting functions + + # displays the domain for the mailbox + # + def domain + sprintf("%s%s%s", self.dns_resource.name, !self.dns_resource.name.empty? ? '.' : '', self.dns_resource.dns_zone.origin) + end + +end diff --git a/app/views/.svn/entries b/app/views/.svn/entries deleted file mode 100644 index 746a34f..0000000 --- a/app/views/.svn/entries +++ /dev/null @@ -1,52 +0,0 @@ -8 - -dir -988 -svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views -svn://svn.evilcode.net/sites - - - -2008-03-13T06:35:53.795148Z -984 -ryan - - -svn:special svn:externals svn:needs-lock - - - - - - - - - - - -b1206cc1-2106-0410-84da-53eeff8bd16c - -accounts -dir - -layouts -dir - -application -dir - -account_mailer -dir - -sessions -dir - -shared -dir - -dashboard -dir - -zones -dir - diff --git a/app/views/.svn/format b/app/views/.svn/format deleted file mode 100644 index 45a4fb7..0000000 --- a/app/views/.svn/format +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/app/views/about/index.rhtml b/app/views/about/index.rhtml new file mode 100644 index 0000000..5d52c10 --- /dev/null +++ b/app/views/about/index.rhtml @@ -0,0 +1,18 @@ +
Let's be frank. Traditional hosting solutions suck. +You end up at the mercy of some geek(s) you can never get +ahold of when you have trouble. Or the service is so unreliable +you might as well not have a website at all. Perhaps you have +to spend hours wading through nested menu's in some arcane +hosting panel that looks as if it were created 15 years ago, +only to find that you can't do what you want. Maybe even all +of the above, and more. But not to worry, you're only spending +$7.95 a month for your troubles!
+Our services are designed for the people who notice when +their website goes down. For the people who know the difference +between an email address and an alias or forward. We designed +infernalhosting for you, the +discriminating web author who desires a comprehensive solution +covering all of their hosting needs, an easily affordable solution that just +flat out works.
+ diff --git a/app/views/account/index.rhtml b/app/views/account/index.rhtml new file mode 100644 index 0000000..4848d3a --- /dev/null +++ b/app/views/account/index.rhtml @@ -0,0 +1,9 @@ +<%= session.inspect %>
+
+
diff --git a/app/views/sessions/.svn/text-base/new.html.erb.svn-base b/app/views/account/login.rhtml
similarity index 91%
rename from app/views/sessions/.svn/text-base/new.html.erb.svn-base
rename to app/views/account/login.rhtml
index 3f333eb..a14ff99 100644
--- a/app/views/sessions/.svn/text-base/new.html.erb.svn-base
+++ b/app/views/account/login.rhtml
@@ -1,4 +1,4 @@
-<% form_tag session_path do -%>
+<% form_tag do -%>
<%= text_field_tag 'login' %>
diff --git a/app/views/account/signup.rhtml b/app/views/account/signup.rhtml
new file mode 100644
index 0000000..c0012a7
--- /dev/null
+++ b/app/views/account/signup.rhtml
@@ -0,0 +1,16 @@
+<%= error_messages_for :user %>
+<% form_for :user do |f| -%>
+
+<%= f.text_field :login %>
+
+
+<%= f.text_field :email %>
+
+
+<%= f.password_field :password %>
+
+
+<%= f.password_field :password_confirmation %>
+
+<%= submit_tag 'Sign up' %>
+<% end -%>
diff --git a/app/views/account_mailer/.svn/entries b/app/views/account_mailer/.svn/entries
deleted file mode 100644
index 4f28eda..0000000
--- a/app/views/account_mailer/.svn/entries
+++ /dev/null
@@ -1,52 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/account_mailer
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-signup_notification.html.erb
-file
-
-
-
-
-2008-03-12T23:22:09.000000Z
-c0d57f74608cc68e2885b94ae5d5d6f1
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-activation.html.erb
-file
-
-
-
-
-2008-03-12T23:22:09.000000Z
-8da521b1a61e37ff37379b827ea3f7ab
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
diff --git a/app/views/account_mailer/.svn/format b/app/views/account_mailer/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/account_mailer/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/account_mailer/.svn/text-base/activation.html.erb.svn-base b/app/views/account_mailer/.svn/text-base/activation.html.erb.svn-base
deleted file mode 100644
index 8d577b4..0000000
--- a/app/views/account_mailer/.svn/text-base/activation.html.erb.svn-base
+++ /dev/null
@@ -1,9 +0,0 @@
-Hey <%= @account.first_name %>! Guess what?
-
-Our minions have *just* finished your wiring and plugged in the juice; your account is now raring to go!
-
-It looks like your credit card has been accepted and you should be able to start setting up what you want to host.
-
-What are you waiting for? You should go log in and start taking over the internets!
-
-http://infernalhosting.net/login/
\ No newline at end of file
diff --git a/app/views/account_mailer/.svn/text-base/signup_notification.html.erb.svn-base b/app/views/account_mailer/.svn/text-base/signup_notification.html.erb.svn-base
deleted file mode 100644
index 5277ed0..0000000
--- a/app/views/account_mailer/.svn/text-base/signup_notification.html.erb.svn-base
+++ /dev/null
@@ -1,12 +0,0 @@
-Hey <%= @account.first_name %>!
-
-Thanks for signing up with infernalhosting.net. To activate your account and pick your hosting plan, simply visit:
-
-<%= @url %>
-
-Write down your login credentials for future use:
-
-Username: <%= @account.login %>
-Password: <%= @account.password %>
-
-Can you hear that? The minions have already begun preparing for your arrival...
\ No newline at end of file
diff --git a/app/views/account_mailer/activation.html.erb b/app/views/account_mailer/activation.html.erb
deleted file mode 100644
index 8d577b4..0000000
--- a/app/views/account_mailer/activation.html.erb
+++ /dev/null
@@ -1,9 +0,0 @@
-Hey <%= @account.first_name %>! Guess what?
-
-Our minions have *just* finished your wiring and plugged in the juice; your account is now raring to go!
-
-It looks like your credit card has been accepted and you should be able to start setting up what you want to host.
-
-What are you waiting for? You should go log in and start taking over the internets!
-
-http://infernalhosting.net/login/
\ No newline at end of file
diff --git a/app/views/account_mailer/signup_notification.html.erb b/app/views/account_mailer/signup_notification.html.erb
deleted file mode 100644
index 5277ed0..0000000
--- a/app/views/account_mailer/signup_notification.html.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-Hey <%= @account.first_name %>!
-
-Thanks for signing up with infernalhosting.net. To activate your account and pick your hosting plan, simply visit:
-
-<%= @url %>
-
-Write down your login credentials for future use:
-
-Username: <%= @account.login %>
-Password: <%= @account.password %>
-
-Can you hear that? The minions have already begun preparing for your arrival...
\ No newline at end of file
diff --git a/app/views/accounts/.svn/entries b/app/views/accounts/.svn/entries
deleted file mode 100644
index 75aaa44..0000000
--- a/app/views/accounts/.svn/entries
+++ /dev/null
@@ -1,64 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/accounts
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-signup.haml
-file
-
-
-
-
-2008-03-12T23:21:58.000000Z
-2a6a05197661447d229695c3c068ce1c
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-completed.haml
-file
-
-
-
-
-2008-03-12T23:21:58.000000Z
-306aaf149f795bb22c8ba05899072582
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-processing.haml
-file
-
-
-
-
-2008-03-12T23:21:58.000000Z
-a065d73cff19e1f17b4a4fe6744e3018
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
diff --git a/app/views/accounts/.svn/format b/app/views/accounts/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/accounts/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/accounts/.svn/text-base/completed.haml.svn-base b/app/views/accounts/.svn/text-base/completed.haml.svn-base
deleted file mode 100644
index f9ac31e..0000000
--- a/app/views/accounts/.svn/text-base/completed.haml.svn-base
+++ /dev/null
@@ -1,9 +0,0 @@
-%h2 Account Activation Complete
-
-%p Alright! You've done it. You're now ready to begin configuring your services and taking over the internets!
-
-%p
- %strong.gray
- Start by
- = link_to "Logging in", login_url
- !
\ No newline at end of file
diff --git a/app/views/accounts/.svn/text-base/processing.haml.svn-base b/app/views/accounts/.svn/text-base/processing.haml.svn-base
deleted file mode 100644
index 4ad7475..0000000
--- a/app/views/accounts/.svn/text-base/processing.haml.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-%h2 Signup For Services
-
-%h4 Thanks for signing up and choosing Infernal Hosting!
-%p We've sent you an email with some instructions on how to verify your account and begin hosting services. Keep an eye on your mailbox and we'll see you back here soon!
\ No newline at end of file
diff --git a/app/views/accounts/.svn/text-base/signup.haml.svn-base b/app/views/accounts/.svn/text-base/signup.haml.svn-base
deleted file mode 100644
index a67f8bb..0000000
--- a/app/views/accounts/.svn/text-base/signup.haml.svn-base
+++ /dev/null
@@ -1,49 +0,0 @@
-%h2 Signup For Services
-%p Tired of all the other crappy hosting companies and ready to signup with us? Just fill out this form to get the process started. Once it's complete, we'll send you an email telling you what to do next.
-
-= error_messages_for :account
-
-- form_for :account, :url => accounts_path do |account|
- %fieldset#signup
- %h3 Contact Information
-
- %div
- %label{:for => 'account_first_name'} First Name
- = account.text_field :first_name
- %p.caption What is your first name?
-
- %div
- %label{:for => 'account_last_name'} Last Name
- = account.text_field :last_name
- %p.caption What is your last name?
-
- %div
- %label{:for => 'account_email_address'} Email Address
- = account.text_field :email_address
- %p.caption What is your email address? (not on a domain you plan on hosting with us)
-
- %div
- %label{:for => 'account_phone_number'} Phone Number
- = account.text_field :phone_number
- %p.caption What is a good phone number we can reach you at?
-
- %h3 Login Information
-
- %div
- %label{:for => 'account_login'} Login
- = account.text_field :login
- %p.caption What login do you want to use for your account?
-
- %div
- %label{:for => 'account_password'} Password
- = account.password_field :password
- %p.caption What password do you want to use? (It needs to be 4-40 letters or numbers)
-
- %div
- %label{:for => 'account_password_confirmation'} Password Again
- = account.password_field :password_confirmation
- %p.caption Can you confirm that password you just typed once more?
-
- #submit= submit_tag "Continue"
-
-
diff --git a/app/views/accounts/completed.haml b/app/views/accounts/completed.haml
deleted file mode 100644
index f9ac31e..0000000
--- a/app/views/accounts/completed.haml
+++ /dev/null
@@ -1,9 +0,0 @@
-%h2 Account Activation Complete
-
-%p Alright! You've done it. You're now ready to begin configuring your services and taking over the internets!
-
-%p
- %strong.gray
- Start by
- = link_to "Logging in", login_url
- !
\ No newline at end of file
diff --git a/app/views/accounts/processing.haml b/app/views/accounts/processing.haml
deleted file mode 100644
index 4ad7475..0000000
--- a/app/views/accounts/processing.haml
+++ /dev/null
@@ -1,4 +0,0 @@
-%h2 Signup For Services
-
-%h4 Thanks for signing up and choosing Infernal Hosting!
-%p We've sent you an email with some instructions on how to verify your account and begin hosting services. Keep an eye on your mailbox and we'll see you back here soon!
\ No newline at end of file
diff --git a/app/views/accounts/signup.haml b/app/views/accounts/signup.haml
deleted file mode 100644
index a67f8bb..0000000
--- a/app/views/accounts/signup.haml
+++ /dev/null
@@ -1,49 +0,0 @@
-%h2 Signup For Services
-%p Tired of all the other crappy hosting companies and ready to signup with us? Just fill out this form to get the process started. Once it's complete, we'll send you an email telling you what to do next.
-
-= error_messages_for :account
-
-- form_for :account, :url => accounts_path do |account|
- %fieldset#signup
- %h3 Contact Information
-
- %div
- %label{:for => 'account_first_name'} First Name
- = account.text_field :first_name
- %p.caption What is your first name?
-
- %div
- %label{:for => 'account_last_name'} Last Name
- = account.text_field :last_name
- %p.caption What is your last name?
-
- %div
- %label{:for => 'account_email_address'} Email Address
- = account.text_field :email_address
- %p.caption What is your email address? (not on a domain you plan on hosting with us)
-
- %div
- %label{:for => 'account_phone_number'} Phone Number
- = account.text_field :phone_number
- %p.caption What is a good phone number we can reach you at?
-
- %h3 Login Information
-
- %div
- %label{:for => 'account_login'} Login
- = account.text_field :login
- %p.caption What login do you want to use for your account?
-
- %div
- %label{:for => 'account_password'} Password
- = account.password_field :password
- %p.caption What password do you want to use? (It needs to be 4-40 letters or numbers)
-
- %div
- %label{:for => 'account_password_confirmation'} Password Again
- = account.password_field :password_confirmation
- %p.caption Can you confirm that password you just typed once more?
-
- #submit= submit_tag "Continue"
-
-
diff --git a/app/views/application/.svn/entries b/app/views/application/.svn/entries
deleted file mode 100644
index 47af9ec..0000000
--- a/app/views/application/.svn/entries
+++ /dev/null
@@ -1,112 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/application
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-services.haml
-file
-
-
-
-
-2008-03-12T23:22:04.000000Z
-4386d6d8f5d120cf62ac13433e70926e
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
-error.html.erb
-file
-
-
-
-
-2008-03-13T00:07:21.000000Z
-8e96bf294ebd7f79591542293f67d0e0
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
-eula.haml
-file
-
-
-
-
-2008-03-12T23:22:04.000000Z
-b08800817191c564a150b671a664085f
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
-index.haml
-file
-
-
-
-
-2008-03-13T00:07:22.000000Z
-ebe6b709ce7dd851806550313ee2c33a
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
-about.haml
-file
-
-
-
-
-2008-03-12T23:22:05.000000Z
-25b337dc3e3a6ba1c74d2016dda3c0c4
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
-contact.haml
-file
-
-
-
-
-2008-03-12T23:22:05.000000Z
-8bbc496aa8013f5b75439c7679efc987
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
-support.haml
-file
-
-
-
-
-2008-03-12T23:22:06.000000Z
-ab64ace7e5b40fe6efbf9f4780b922d5
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
diff --git a/app/views/application/.svn/format b/app/views/application/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/application/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/application/.svn/text-base/about.haml.svn-base b/app/views/application/.svn/text-base/about.haml.svn-base
deleted file mode 100644
index 34d375b..0000000
--- a/app/views/application/.svn/text-base/about.haml.svn-base
+++ /dev/null
@@ -1 +0,0 @@
-%h2 About Us
\ No newline at end of file
diff --git a/app/views/application/.svn/text-base/contact.haml.svn-base b/app/views/application/.svn/text-base/contact.haml.svn-base
deleted file mode 100644
index 8c9c4eb..0000000
--- a/app/views/application/.svn/text-base/contact.haml.svn-base
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Contact Us
\ No newline at end of file
diff --git a/app/views/application/.svn/text-base/error.html.erb.svn-base b/app/views/application/.svn/text-base/error.html.erb.svn-base
deleted file mode 100644
index 9bf1ca7..0000000
--- a/app/views/application/.svn/text-base/error.html.erb.svn-base
+++ /dev/null
@@ -1 +0,0 @@
-<%= html_error %>
\ No newline at end of file
diff --git a/app/views/application/.svn/text-base/eula.haml.svn-base b/app/views/application/.svn/text-base/eula.haml.svn-base
deleted file mode 100644
index dc4a1b4..0000000
--- a/app/views/application/.svn/text-base/eula.haml.svn-base
+++ /dev/null
@@ -1,51 +0,0 @@
-%h2 Acceptable Usage Policy
-
-%p This Acceptable Usage Policy (the "Policy") governs, in addition to the Infernal Hosting "Web Hosting General Terms and Conditions Agreement", the terms of use by the ("Customer"), which is defined as any individual, web designer, or third-party consultant granted permissible access by Customer to Customer's account or Infernal Hosting's ("Provider") servers or services.
-
-%p Customer agrees when using, or accessing Infernal Hosting's services that the following terms and conditions of this policy will be met:
-
-%h4 Overview
-
-%p In order to provide a high class, professional service, we have a few conditions for Customers of our service. Some of these conditions may seem strict, but they insure a safe, functional, and trusted environment for our customers to publish their information on the World Wide Web.
-
-%p Some example scenarios that may warrant a service suspension:
-
-%ul
- %li Copyrighted media such as music or videos are found to be distributed without the copyright owner's consent.
- %li Illegal or un-licensed software or 'warez' download sites.
- %li A site set up to function as an open http proxy.
- %li Large amounts of unsoclicited email (SPAM) are sent using a customer's SMTP service or mail script.
- %li An unusual spike in resource usage is detected by our systems resulting in an account far outstripping the allotted resources. To protect the customer, a site may be suspended in order to verify that this resource spike is legitimate.
- %li A hacked script or otherwise compromised site is discovered. This condition usually results in one or more of the above conditions.
-
-
-%p Some of our competitors do not require their customers to comply with such conditions. If any of our existing or potential customers are unwilling or unable to comply with these conditions, we respectfully invite them to visit one of our competitors.
-
-%h4 Web, FTP, Publishing Content Policies
-
-%p Provider does not allow any of the following content, or links to such content, to be published on Infernal Hosting systems:
-
-%ul
- %li Content of an illegal nature (including stolen copyrighted material).
- %li Pirated software sites.
-
-
-%p Customers posting any of the above content on their sites will be notified using Customer's current email address on file, and may be suspended or given a time frame to take corrective actions. If no corrective actions are taken, Provider will suspend the services of the hosting account until a resolution is met between Provider and Customer. A repeated violation of this Policy may cause cancellation of service without refund of any fees.
-
-%p Provider offers generous amounts of disk space, and network bandwidth. Customer is not permitted to knowingly allow another website or hosting server to link to content files stored on Provider's servers. Customer may not use hosting account as a remote storage server only. 75% of customer's content files stored on Provider's server must have associated HTML, or PHP files inside the account linking to the content stored on that account.
-
-%h4 Email Usage Policies
-
-%p Infernal Hosting does not support unsolicited email messages sent by Customers of our system (also known as junk email or SPAM). Customers sending unsolicited email messages from our system, or through other systems with messages referencing their website, will have all of their services temporarily suspended. They will then be contacted by Infernal Hosting and informed of the suspension before having their services reinstated. A repeated violation may cause cancellation of service without refund of any fees.
-
-%h4 Excessive hosting service striping
-
-%p Referred to herein as "excessive striping". This describes the condition where a customer attempts to use 2 or more hosting services, stored with duplicate content, in order to collect an excessive allocation of overall bandwidth, disk space, GPUs, or other resources for the purpose of avoiding overage fees on a single service plan. An excessive striping condition may also be achieved by closing services before their resource limits are reached then opening a new service with nearly identical content to use its bundled resources. Content and resource striping is generally permitted only on load-balancer enabled products and products which feature consolidated bandwidth billing. Any other form of content striping will be considered excessive and may result in a service suspension.
-
-%h4 Illegal Activities
-
-%p Customers found using our system for illegal activities, including but not limited to breaking in to remote systems, credit card fraud, theft, vandalism, threats, or violence, will have their accounts immediately canceled without refund of any fees.
-
-%h4 Hostnames, IP Addresses
-
-%p Provider will remain the sole owner of all IP network addresses within the Provider's network. Customer shall not knowingly modify any TCP/IP configuration that will conflict, or otherwise disrupt network service by using configurations not allocated to Customer by Provider. Best effort will be taken to maintain permanency of customer's allocated IP address, however Provider reserves the right to change customer's underlying IP network address during upgrades, security provisioning, or any other network migration service.
diff --git a/app/views/application/.svn/text-base/index.haml.svn-base b/app/views/application/.svn/text-base/index.haml.svn-base
deleted file mode 100644
index d4f76ad..0000000
--- a/app/views/application/.svn/text-base/index.haml.svn-base
+++ /dev/null
@@ -1,6 +0,0 @@
-%h2 Current News
-
-%h6 Wednesday March 12, 2008
-%p
- We're working furiously to finally unveil our new hosting platform and management console. 2008 is going to prove to be a very productive year for infernalhosting, we swear. In the meantime, please bear with us as we work the kinks out and set up shop officially.
-%img{:src => '/img/splash-jan08.jpg', :alt => 'infernalhosting : spring 2008'}
\ No newline at end of file
diff --git a/app/views/application/.svn/text-base/services.haml.svn-base b/app/views/application/.svn/text-base/services.haml.svn-base
deleted file mode 100644
index bb6a9fc..0000000
--- a/app/views/application/.svn/text-base/services.haml.svn-base
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Services
\ No newline at end of file
diff --git a/app/views/application/.svn/text-base/support.haml.svn-base b/app/views/application/.svn/text-base/support.haml.svn-base
deleted file mode 100644
index 0e41d51..0000000
--- a/app/views/application/.svn/text-base/support.haml.svn-base
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Support
\ No newline at end of file
diff --git a/app/views/application/about.haml b/app/views/application/about.haml
deleted file mode 100644
index 34d375b..0000000
--- a/app/views/application/about.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h2 About Us
\ No newline at end of file
diff --git a/app/views/application/contact.haml b/app/views/application/contact.haml
deleted file mode 100644
index 8b61ea8..0000000
--- a/app/views/application/contact.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Contact Us
diff --git a/app/views/application/error.html.erb b/app/views/application/error.html.erb
deleted file mode 100644
index 9bf1ca7..0000000
--- a/app/views/application/error.html.erb
+++ /dev/null
@@ -1 +0,0 @@
-<%= html_error %>
\ No newline at end of file
diff --git a/app/views/application/eula.haml b/app/views/application/eula.haml
deleted file mode 100644
index dc4a1b4..0000000
--- a/app/views/application/eula.haml
+++ /dev/null
@@ -1,51 +0,0 @@
-%h2 Acceptable Usage Policy
-
-%p This Acceptable Usage Policy (the "Policy") governs, in addition to the Infernal Hosting "Web Hosting General Terms and Conditions Agreement", the terms of use by the ("Customer"), which is defined as any individual, web designer, or third-party consultant granted permissible access by Customer to Customer's account or Infernal Hosting's ("Provider") servers or services.
-
-%p Customer agrees when using, or accessing Infernal Hosting's services that the following terms and conditions of this policy will be met:
-
-%h4 Overview
-
-%p In order to provide a high class, professional service, we have a few conditions for Customers of our service. Some of these conditions may seem strict, but they insure a safe, functional, and trusted environment for our customers to publish their information on the World Wide Web.
-
-%p Some example scenarios that may warrant a service suspension:
-
-%ul
- %li Copyrighted media such as music or videos are found to be distributed without the copyright owner's consent.
- %li Illegal or un-licensed software or 'warez' download sites.
- %li A site set up to function as an open http proxy.
- %li Large amounts of unsoclicited email (SPAM) are sent using a customer's SMTP service or mail script.
- %li An unusual spike in resource usage is detected by our systems resulting in an account far outstripping the allotted resources. To protect the customer, a site may be suspended in order to verify that this resource spike is legitimate.
- %li A hacked script or otherwise compromised site is discovered. This condition usually results in one or more of the above conditions.
-
-
-%p Some of our competitors do not require their customers to comply with such conditions. If any of our existing or potential customers are unwilling or unable to comply with these conditions, we respectfully invite them to visit one of our competitors.
-
-%h4 Web, FTP, Publishing Content Policies
-
-%p Provider does not allow any of the following content, or links to such content, to be published on Infernal Hosting systems:
-
-%ul
- %li Content of an illegal nature (including stolen copyrighted material).
- %li Pirated software sites.
-
-
-%p Customers posting any of the above content on their sites will be notified using Customer's current email address on file, and may be suspended or given a time frame to take corrective actions. If no corrective actions are taken, Provider will suspend the services of the hosting account until a resolution is met between Provider and Customer. A repeated violation of this Policy may cause cancellation of service without refund of any fees.
-
-%p Provider offers generous amounts of disk space, and network bandwidth. Customer is not permitted to knowingly allow another website or hosting server to link to content files stored on Provider's servers. Customer may not use hosting account as a remote storage server only. 75% of customer's content files stored on Provider's server must have associated HTML, or PHP files inside the account linking to the content stored on that account.
-
-%h4 Email Usage Policies
-
-%p Infernal Hosting does not support unsolicited email messages sent by Customers of our system (also known as junk email or SPAM). Customers sending unsolicited email messages from our system, or through other systems with messages referencing their website, will have all of their services temporarily suspended. They will then be contacted by Infernal Hosting and informed of the suspension before having their services reinstated. A repeated violation may cause cancellation of service without refund of any fees.
-
-%h4 Excessive hosting service striping
-
-%p Referred to herein as "excessive striping". This describes the condition where a customer attempts to use 2 or more hosting services, stored with duplicate content, in order to collect an excessive allocation of overall bandwidth, disk space, GPUs, or other resources for the purpose of avoiding overage fees on a single service plan. An excessive striping condition may also be achieved by closing services before their resource limits are reached then opening a new service with nearly identical content to use its bundled resources. Content and resource striping is generally permitted only on load-balancer enabled products and products which feature consolidated bandwidth billing. Any other form of content striping will be considered excessive and may result in a service suspension.
-
-%h4 Illegal Activities
-
-%p Customers found using our system for illegal activities, including but not limited to breaking in to remote systems, credit card fraud, theft, vandalism, threats, or violence, will have their accounts immediately canceled without refund of any fees.
-
-%h4 Hostnames, IP Addresses
-
-%p Provider will remain the sole owner of all IP network addresses within the Provider's network. Customer shall not knowingly modify any TCP/IP configuration that will conflict, or otherwise disrupt network service by using configurations not allocated to Customer by Provider. Best effort will be taken to maintain permanency of customer's allocated IP address, however Provider reserves the right to change customer's underlying IP network address during upgrades, security provisioning, or any other network migration service.
diff --git a/app/views/application/index.haml b/app/views/application/index.haml
deleted file mode 100644
index d4f76ad..0000000
--- a/app/views/application/index.haml
+++ /dev/null
@@ -1,6 +0,0 @@
-%h2 Current News
-
-%h6 Wednesday March 12, 2008
-%p
- We're working furiously to finally unveil our new hosting platform and management console. 2008 is going to prove to be a very productive year for infernalhosting, we swear. In the meantime, please bear with us as we work the kinks out and set up shop officially.
-%img{:src => '/img/splash-jan08.jpg', :alt => 'infernalhosting : spring 2008'}
\ No newline at end of file
diff --git a/app/views/application/services.haml b/app/views/application/services.haml
deleted file mode 100644
index bb6a9fc..0000000
--- a/app/views/application/services.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Services
\ No newline at end of file
diff --git a/app/views/application/splash.rhtml b/app/views/application/splash.rhtml
new file mode 100644
index 0000000..e824d8e
--- /dev/null
+++ b/app/views/application/splash.rhtml
@@ -0,0 +1 @@
+
diff --git a/app/views/application/support.haml b/app/views/application/support.haml
deleted file mode 100644
index 0e41d51..0000000
--- a/app/views/application/support.haml
+++ /dev/null
@@ -1 +0,0 @@
-%h2 Support
\ No newline at end of file
diff --git a/app/views/contact/index.rhtml b/app/views/contact/index.rhtml
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/app/views/contact/index.rhtml
@@ -0,0 +1 @@
+
diff --git a/app/views/dashboard/.svn/entries b/app/views/dashboard/.svn/entries
deleted file mode 100644
index 7dd0795..0000000
--- a/app/views/dashboard/.svn/entries
+++ /dev/null
@@ -1,40 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/dashboard
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-11T19:50:19.318568Z
-971
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-index.haml
-file
-
-
-
-
-2008-03-12T23:22:16.000000Z
-05538f32af4cd04d9ece0866d0cbf798
-2008-03-11T19:50:19.318568Z
-971
-ryan
-
diff --git a/app/views/dashboard/.svn/format b/app/views/dashboard/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/dashboard/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/dashboard/.svn/text-base/index.haml.svn-base b/app/views/dashboard/.svn/text-base/index.haml.svn-base
deleted file mode 100644
index 8b188c2..0000000
--- a/app/views/dashboard/.svn/text-base/index.haml.svn-base
+++ /dev/null
@@ -1,7 +0,0 @@
-%h2 Account Dashboard
-%p
- Hi,
- = current_account.first_name
- ! Welcome to your infernalhosting dashboard. From here, you can completely manage all aspects of your account. To get started, select a section of your account to manage:
-
-= dashboard_menu
\ No newline at end of file
diff --git a/app/views/dashboard/index.haml b/app/views/dashboard/index.haml
deleted file mode 100644
index 8b188c2..0000000
--- a/app/views/dashboard/index.haml
+++ /dev/null
@@ -1,7 +0,0 @@
-%h2 Account Dashboard
-%p
- Hi,
- = current_account.first_name
- ! Welcome to your infernalhosting dashboard. From here, you can completely manage all aspects of your account. To get started, select a section of your account to manage:
-
-= dashboard_menu
\ No newline at end of file
diff --git a/app/views/dns/_form_rr.rhtml b/app/views/dns/_form_rr.rhtml
new file mode 100644
index 0000000..26afdad
--- /dev/null
+++ b/app/views/dns/_form_rr.rhtml
@@ -0,0 +1,44 @@
+<%= error_messages_for 'domain' %>
+
+
+
+
+ Name
+ Type
+ Data
+ TTL
+ AUX
+ Delete
+
+
+
+
+<% counter = 1 %>
+<% for record in @domain.records %>
+ ">
+ <%= hidden_field_tag "updates[#{record.id}][id]", record.id %>
+ <%= text_field_tag "updates[#{record.id}][name]", record.name, {:id => nil, :class => 'rr-name'} %>
+ <%= select_tag "updates[#{record.id}][type]", ["A", "AAAA", "CNAME", "HINFO", "MX", "NS", "PTR", "SRV", "TXT"].collect {|o| o == record.type ? "" : ""} %>
+ <%= text_field_tag "updates[#{record.id}][data]", record.data, {:id => nil, :class => 'rr-data'} %>
+ <%= text_field_tag "updates[#{record.id}][ttl]", record.ttl, {:id => nil, :size => 5, :class => 'rr-ttl'} %>
+ <%= text_field_tag "updates[#{record.id}][aux]", record.aux, {:id => nil, :size => 2 , :class => 'rr-aux'} %>
+ <%= check_box_tag "updates[#{record.id}][delete]" %>
+
+<% counter += 1 %>
+<% end %>
+
+
+
+
+ <%= @domain.records.length %> Records Found
Create New Record:
+
+
+ <%= text_field_tag "new[name]", nil, {:id => nil, :class => 'rr-name'} %>
+ <%= select_tag "new[type]", ["A", "AAAA", "CNAME", "HINFO", "MX", "NS", "PTR", "SRV", "TXT"].collect {|o| ""} %>
+ <%= text_field_tag "new[data]", nil, {:id => nil, :class => 'rr-data'} %>
+ <%= text_field_tag "new[ttl]", nil, {:id => nil, :size => 5, :class => 'rr-ttl'} %>
+ <%= text_field_tag "new[aux]", nil, {:id => nil, :size => 2 , :class => 'rr-aux'} %>
+
+
+
+
diff --git a/app/views/dns/_form_soa.rhtml b/app/views/dns/_form_soa.rhtml
new file mode 100644
index 0000000..312533a
--- /dev/null
+++ b/app/views/dns/_form_soa.rhtml
@@ -0,0 +1,52 @@
+<%= error_messages_for 'domain' %>
+
+
+
+
+<%= text_field :domain, :origin, :disabled => true %>
+This is the name of the zone. You can't change this.
+
+
+
+
+<%= text_field :domain, :ns %>
+The name of the nameserver that is the primary source of data for this zone.
+
+
+
+
+<%= text_field :domain, :mbox %>
+A name which specifies the mailbox of the person responsible for this zone. The should be specified in the mailbox-at-domain-name format where the '@' character is replaced with a '.'
+
+
+
+
+<%= text_field :domain, :refresh %>
+This specifies the number of seconds after slave nameservers should check to see if this zone has been changed.
+
+
+
+
+<%= text_field :domain, :retry %>
+This specifies the number of seconds a slave nameserver should wait before retrying if it attempts to transfer this zone but fails.
+
+
+
+
+<%= text_field :domain, :expire %>
+The number of seconds the primary nameserver expires its authority over the zone.
+
+
+
+
+<%= text_field :domain, :minimum %>
+The minimun time to live value in seconds; if a resource record has a lower TTL value, it will default to this value.
+
+
+
+
+<%= text_field :domain, :ttl %>
+The number of seconds that this zone may be cached before the source of the information should again be consulted. Zero values are interpreted to mean that the zone should not be cached.
+
+
+
diff --git a/app/views/dns/_rr.rhtml b/app/views/dns/_rr.rhtml
new file mode 100644
index 0000000..4b10169
--- /dev/null
+++ b/app/views/dns/_rr.rhtml
@@ -0,0 +1,13 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= form_remote_tag( :update => 'rr-form', :url => { :action => :rr } ) %>
+
+<%= end_form_tag %>
diff --git a/app/views/dns/_soa.rhtml b/app/views/dns/_soa.rhtml
new file mode 100644
index 0000000..53719b1
--- /dev/null
+++ b/app/views/dns/_soa.rhtml
@@ -0,0 +1,13 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= form_remote_tag( :update => 'soa-form', :url => { :action => :soa } ) %>
+
+<%= end_form_tag %>
diff --git a/app/views/dns/edit.rhtml b/app/views/dns/edit.rhtml
new file mode 100644
index 0000000..cf2ae5f
--- /dev/null
+++ b/app/views/dns/edit.rhtml
@@ -0,0 +1,13 @@
+The DNS Editor will allow you to make changes to the DNS records we have for your domain name. There are two modes for editing your DNS, basic and advanced. The basic editor will take care of all the super-technical details about dns management. This is the default editor mode. The advanced editor will allow you to manage all aspects of your DNS zone. You can manage all values of your SOA record as well as each resource record attached to the zone. Only use this option if you really know what you're doing.
+
+
+ <%= render :partial => 'soa' %>
+ <%= render :partial => 'rr' %>
+
+
+
diff --git a/app/views/dns/list_domains.rhtml b/app/views/dns/list_domains.rhtml
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/dns/update_soa.rhtml b/app/views/dns/update_soa.rhtml
new file mode 100644
index 0000000..e69de29
diff --git a/app/views/domain/_domain_list.rhtml b/app/views/domain/_domain_list.rhtml
new file mode 100644
index 0000000..9b8a0c5
--- /dev/null
+++ b/app/views/domain/_domain_list.rhtml
@@ -0,0 +1,25 @@
+Domain OverviewThese are the domains you currently have hosted with us. Please select a domain to review the services attached to it.
+<% for domain in @user.domains %>
+
+<%= link_to domain.name, "/panel/#{domain.name}" %>
+
+<% if params[:controller] == 'domain' %>
+
+<% end %>
+
+
+<%= link_to "Add a domain", :controller => 'domain', :action => 'add' %>Host another domain with us!
+
diff --git a/app/views/domain/_form.rhtml b/app/views/domain/_form.rhtml
new file mode 100644
index 0000000..33dc4b7
--- /dev/null
+++ b/app/views/domain/_form.rhtml
@@ -0,0 +1,30 @@
+<%= error_messages_for 'domain' %>
+
+
+
+
+<%= text_field :domain, :origin %>
+The name of the domain you wish to host (just the TLD, please. No need for 'www.').
+
+
+
+
+<%= check_box_tag :defaults %>
+Check this if you want to create the zone with a populated list of standard infernalhosting values.
+
+
+Domain Options
+
+
+<%= check_box_tag :register %>
+Register this domain (.com, .org or .net only) with us and point it at our nameservers. <%= @domain.prices[:register] %>
+
+
+
+
+<%= check_box_tag :transfer %>
+Transfer this domain (.com, .org or .net only) to us and point it at our nameservers. <%= @domain.prices[:transfer] %>
+
+
+
+
diff --git a/app/views/domain/add.rhtml b/app/views/domain/add.rhtml
new file mode 100644
index 0000000..042dd08
--- /dev/null
+++ b/app/views/domain/add.rhtml
@@ -0,0 +1,18 @@
+Add A Domain
+Before you can begin enabling hosting services, you must first add a domain to our servers.
+Currently we only offer hosting for already registered domain names, so you must have access to your domain's registrar to complete the hosting process.
+
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= start_form_tag :action => 'create' %>
+
+<%= end_form_tag %>
+
diff --git a/app/views/domain/index.rhtml b/app/views/domain/index.rhtml
new file mode 100644
index 0000000..9056648
--- /dev/null
+++ b/app/views/domain/index.rhtml
@@ -0,0 +1 @@
+<%= params.inspect %>
diff --git a/app/views/domain/list.rhtml b/app/views/domain/list.rhtml
new file mode 100644
index 0000000..b5d6414
--- /dev/null
+++ b/app/views/domain/list.rhtml
@@ -0,0 +1,8 @@
+Hosted Domains
+
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+
+<%= render :partial => 'domain_list' %>
diff --git a/app/views/domain/overview.rhtml b/app/views/domain/overview.rhtml
new file mode 100644
index 0000000..d011677
--- /dev/null
+++ b/app/views/domain/overview.rhtml
@@ -0,0 +1,24 @@
+<%= @domain.name %>
+Below are the services you have enabled for your hosted domain. Make a selection below to review the options for each service.
+
+
+
+
+
+
diff --git a/app/views/error/error_404.rhtml b/app/views/error/error_404.rhtml
new file mode 100644
index 0000000..85bc03f
--- /dev/null
+++ b/app/views/error/error_404.rhtml
@@ -0,0 +1,3 @@
+Error 404
+File Not Found
+The request you have made cannot be found on this server.
diff --git a/app/views/error/error_503.rhtml b/app/views/error/error_503.rhtml
new file mode 100644
index 0000000..d516c7d
--- /dev/null
+++ b/app/views/error/error_503.rhtml
@@ -0,0 +1,3 @@
+Error 503
+Service Temporarily Unavailable
+The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
diff --git a/app/views/layouts/.svn/entries b/app/views/layouts/.svn/entries
deleted file mode 100644
index 0bff643..0000000
--- a/app/views/layouts/.svn/entries
+++ /dev/null
@@ -1,40 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/layouts
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-xhtml.haml
-file
-
-
-
-
-2008-03-12T23:22:00.000000Z
-3836afae9d83d2c02d44e8bd302bdd24
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
diff --git a/app/views/layouts/.svn/format b/app/views/layouts/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/layouts/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/layouts/.svn/text-base/xhtml.haml.svn-base b/app/views/layouts/.svn/text-base/xhtml.haml.svn-base
deleted file mode 100644
index a338e45..0000000
--- a/app/views/layouts/.svn/text-base/xhtml.haml.svn-base
+++ /dev/null
@@ -1,18 +0,0 @@
-!!! 1.1
-%html{html_attrs}
- %head
- %title= header_text
- %meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
- = stylesheet_link_tag "screen"
- = javascript_include_tag :defaults
-
- %body
- %div#wrapper
- %div#header
- %h1 infernalhosting
- = navigation_list
- %div#content
- = flash_notice
- = yield
-
- = footer
\ No newline at end of file
diff --git a/app/views/layouts/ajax.rhtml b/app/views/layouts/ajax.rhtml
new file mode 100644
index 0000000..3790b89
--- /dev/null
+++ b/app/views/layouts/ajax.rhtml
@@ -0,0 +1,14 @@
+
+
+
+
+ infernalhosting.net<%= " :: " + @title.downcase if @title %>
+
+
+
+
+ <%= javascript_include_tag "prototype", "yui-utilities", "ext-yui-adapter", "ext-all", "application" %>
+
+
+ <%= yield %>
+
diff --git a/app/views/layouts/mailusers.rhtml b/app/views/layouts/mailusers.rhtml
new file mode 100644
index 0000000..b31965b
--- /dev/null
+++ b/app/views/layouts/mailusers.rhtml
@@ -0,0 +1,13 @@
+
+
+ Scaffold::Mailusers: <%= controller.action_name %>
+ <%= stylesheet_link_tag 'scaffold' %>
+
+
+
+<%= flash[:notice] %>
+
+<%= yield %>
+
+
+
diff --git a/app/views/layouts/splash.rhtml b/app/views/layouts/splash.rhtml
new file mode 100644
index 0000000..4585a90
--- /dev/null
+++ b/app/views/layouts/splash.rhtml
@@ -0,0 +1,16 @@
+
+
+
+
+ infernalhosting.net
+
+
+
+
+ <%= stylesheet_link_tag "base", "splash" %>
+
+
+
+ <%= yield %>
+
+
diff --git a/app/views/layouts/xhtml.haml b/app/views/layouts/xhtml.haml
deleted file mode 100644
index 6685c7a..0000000
--- a/app/views/layouts/xhtml.haml
+++ /dev/null
@@ -1,18 +0,0 @@
-!!! 1.1
-%html{html_attrs}
- %head
- %title= header_text
- %meta{'http-equiv' => 'content-type', :content => 'text/html; charset=utf-8'}
- = stylesheet_link_tag "screen"
- = javascript_include_tag :defaults
-
- %body
- %div#wrapper
- %div#header
- %h1 infernalhosting
- = navigation_list
- %div#content
- = flash_notice
- = yield
-
- = footer
diff --git a/app/views/layouts/xhtml.rhtml b/app/views/layouts/xhtml.rhtml
new file mode 100644
index 0000000..2981ea9
--- /dev/null
+++ b/app/views/layouts/xhtml.rhtml
@@ -0,0 +1,28 @@
+
+
+
+
+ infernalhosting.net<%= " :: " + @title.downcase if @title %>
+
+
+
+
+ <%= stylesheet_link_tag "base", "layout", "classes", "header", "form", "table", "tabs" %>
+ <%= javascript_include_tag "application" %>
+
+
+
+ <%= render :partial => "shared/loader" %>
+
+
+ infernalhosting
+ <%= render :partial => "shared/navigation" %>
+
+
+ <%= yield %>
+
+
+ <%= render :partial => "shared/footer" %>
+
+
+
diff --git a/app/views/login/login.rhtml b/app/views/login/login.rhtml
new file mode 100644
index 0000000..ba839ae
--- /dev/null
+++ b/app/views/login/login.rhtml
@@ -0,0 +1,29 @@
+Login
+Please enter you login credentials below.
+
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= start_form_tag :action => "login" %>
+
+<% end_form_tag %>
+
diff --git a/app/views/mail/_alias_detail.rhtml b/app/views/mail/_alias_detail.rhtml
new file mode 100644
index 0000000..08fc630
--- /dev/null
+++ b/app/views/mail/_alias_detail.rhtml
@@ -0,0 +1,5 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+To edit an alias, select one from the left.
diff --git a/app/views/mail/_form_alias.rhtml b/app/views/mail/_form_alias.rhtml
new file mode 100644
index 0000000..7ade0c3
--- /dev/null
+++ b/app/views/mail/_form_alias.rhtml
@@ -0,0 +1,13 @@
+
+
+
+<%= text_field :alias, :username, :length => 20, :style => 'width: 100px' %>@<%= select :alias, :dns_resource_id, DnsResource.find(:all, :include => ['dns_zone'], :order => 'dns_resources.id, dns_resources.name', :conditions => ["dns_resources.dns_zone_id = ? and (dns_resources.type = 'A' or dns_resources.type = 'CNAME')", @domain.id]).collect {|r| [ sprintf("%s%s%s",r.name, !r.name.empty? ? '.' : '', r.dns_zone.origin), r.id]} %>
+The origin address, this is what you want to have as your alias. The domains listed are only the viable options for your domain.
+
+
+
+
+<%= text_field :alias, :destination %>
+This is the destination address for this alias.
+
+
diff --git a/app/views/mail/_form_mailbox.rhtml b/app/views/mail/_form_mailbox.rhtml
new file mode 100644
index 0000000..e077232
--- /dev/null
+++ b/app/views/mail/_form_mailbox.rhtml
@@ -0,0 +1,26 @@
+<%= error_messages_for 'mailbox' %>
+
+
+
+
+<%= text_field :mailbox, :name %>
+This is the name of the owner of the mailbox, ie: "John C. Doe".
+
+
+
+
+<%= text_field :mailbox, :username, :length => 20, :style => 'width: 100px' %>@<%= select :mailbox, :dns_resource_id, @domain.service_records %>
+The mailbox address. The domains listed are only the viable options for your domain.
+
+
+
+
+<% if @mailbox.password.nil? %>
+<%= text_field :mailbox, :password %>
+The password of the mailbox. It must be 4-40 characters long.
+<% else %>
+<%= text_field_tag "mailbox[password]" %>
+Change your password here. Leave it blank to keep it the same.
+<% end %>
+
+
diff --git a/app/views/mail/_list_aliases.rhtml b/app/views/mail/_list_aliases.rhtml
new file mode 100644
index 0000000..6901a40
--- /dev/null
+++ b/app/views/mail/_list_aliases.rhtml
@@ -0,0 +1,18 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+Alias Accounts
+
+
+
+ - <%= link_to_remote "Add Alias", :url=>{ :controller => "/panel/#{@domain.name}/mail", :action=>"new_alias"}, :update=>"alias-detail" %>
+<% for mailalias in @domain.mailaliases %>
+ - <%= link_to_remote mailalias.address, :url=>{ :controller => "/panel/#{@domain.name}/mail", :action=>"edit_alias", :id=> mailalias.id}, :update=>"alias-detail" %>
+<% end %>
+
+
+
+<%= render :partial => 'alias_detail' %>
+
+
diff --git a/app/views/mail/_list_mailboxes.rhtml b/app/views/mail/_list_mailboxes.rhtml
new file mode 100644
index 0000000..7a6280c
--- /dev/null
+++ b/app/views/mail/_list_mailboxes.rhtml
@@ -0,0 +1,26 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+
+
+Mailbox Accounts
+
+
+
+ - <%= link_to_remote "Add Mailbox", :url=>{ :controller => "/panel/#{@domain.name}/mail", :action=>"new_mailbox"}, :update=>"mailbox-detail" %>
+<% for mailbox in @domain.mailboxes %>
+ - <%= link_to_remote mailbox.address, :url=>{ :controller => "/panel/#{@domain.name}/mail", :action=>"edit_mailbox", :id=> mailbox.id}, :update=>"mailbox-detail" %>
+<% end %>
+
+
+
+<%= render :partial => 'mailbox_detail' %>
+
+
diff --git a/app/views/mail/_mailbox_detail.rhtml b/app/views/mail/_mailbox_detail.rhtml
new file mode 100644
index 0000000..485518e
--- /dev/null
+++ b/app/views/mail/_mailbox_detail.rhtml
@@ -0,0 +1,5 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+To edit a mailbox, select one from the left.
diff --git a/app/views/mail/edit_alias.rhtml b/app/views/mail/edit_alias.rhtml
new file mode 100644
index 0000000..af6bd65
--- /dev/null
+++ b/app/views/mail/edit_alias.rhtml
@@ -0,0 +1,21 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= form_remote_tag( :update => 'alias-overview', :url => { :action => :update_alias, :origin => @domain.name }) %>
+
+<%= end_form_tag %>
diff --git a/app/views/mail/edit_mailbox.rhtml b/app/views/mail/edit_mailbox.rhtml
new file mode 100644
index 0000000..7d67e54
--- /dev/null
+++ b/app/views/mail/edit_mailbox.rhtml
@@ -0,0 +1,21 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= form_remote_tag( :update => 'mailbox-overview', :url => { :action => :update_mailbox, :origin => @domain.name }) %>
+
+<%= end_form_tag %>
diff --git a/app/views/mail/list.rhtml b/app/views/mail/list.rhtml
new file mode 100644
index 0000000..1df2939
--- /dev/null
+++ b/app/views/mail/list.rhtml
@@ -0,0 +1,20 @@
+Manage Mail :: <%= @domain.name %>
+
+For the email attached to your domain, there are two kinds of accounts. A Mailbox account will create a new email address, delivered locally to our mail systems. An Alias account will create an email address that will forward all mail to that address to another email address, including remote accounts (addresses you don't have hosted with us) or mailboxes you have hosted here.
+
+
+ <%= render :partial => 'list_mailboxes' %>
+ <%= render :partial => 'list_aliases' %>
+
+
+
diff --git a/app/views/mail/new_alias.rhtml b/app/views/mail/new_alias.rhtml
new file mode 100644
index 0000000..2e5d080
--- /dev/null
+++ b/app/views/mail/new_alias.rhtml
@@ -0,0 +1,9 @@
+<%= form_remote_tag( :update => 'alias-overview', :url => { :action => :create_alias } ) %>
+
+<%= end_form_tag %>
diff --git a/app/views/mail/new_mailbox.rhtml b/app/views/mail/new_mailbox.rhtml
new file mode 100644
index 0000000..4fb863d
--- /dev/null
+++ b/app/views/mail/new_mailbox.rhtml
@@ -0,0 +1,9 @@
+<%= form_remote_tag( :update => 'mailbox-overview', :url => { :action => :create_mailbox }, :complete => :mailbox_detail ) %>
+
+<%= end_form_tag %>
diff --git a/app/views/main/index.rhtml b/app/views/main/index.rhtml
new file mode 100644
index 0000000..442341d
--- /dev/null
+++ b/app/views/main/index.rhtml
@@ -0,0 +1,4 @@
+Current News
+Saturday January 6, 2007
+We're working furiously to finally unveil our new hosting platform and management console. 2007 is going to prove to be a very productive year for infernalhosting, we swear. In the meantime, please bear with us as we work the kinks out and set up shop officially.
+
diff --git a/app/views/panel/index.rhtml b/app/views/panel/index.rhtml
new file mode 100644
index 0000000..418f9cc
--- /dev/null
+++ b/app/views/panel/index.rhtml
@@ -0,0 +1,5 @@
+Account Overview
+From this control panel, you can manage all aspects of your domains hosted with infernalhosting.
+
+
+<%= render :partial => 'domain/domain_list' %>
diff --git a/app/views/services/index.rhtml b/app/views/services/index.rhtml
new file mode 100644
index 0000000..7168c16
--- /dev/null
+++ b/app/views/services/index.rhtml
@@ -0,0 +1,29 @@
+Services
+unlimited websites
+unlimited email addresses
+unlimited email aliases
+unlimited databases
+unlimited domains
+The trend should be clear, and we hope that it is one
+you can take stock in. Unlike other hosting providers, we
+have no arbitrary account limits or obtuse marketing
+gimmicks. We take pride in providing an exceptional service
+with ample capacity for a single low price.
+
+Pricing
+Just $24.95 per month, or only $19.95 per month when
+you pay for a full year
+
+Limits
+5 gigabytes of storage
+100 gigabytes of bandwidth
+
+Overages
+Even though our base limits on storage and network
+bandwidth transfer are more than sufficient for nearly all
+websites, if you find yourself running an exceptionally
+popular site it is easy and economical to add storage
+and additional network capacity to your account.
+$0.25 per gigabyte of bandwidth
+$1.00 per each 5 gigabytes of additional storage
+
diff --git a/app/views/sessions/.svn/entries b/app/views/sessions/.svn/entries
deleted file mode 100644
index 4961c3b..0000000
--- a/app/views/sessions/.svn/entries
+++ /dev/null
@@ -1,40 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/sessions
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-new.html.erb
-file
-
-
-
-
-2008-03-12T23:22:12.000000Z
-8922040544431aa223c77861874ce4ce
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
diff --git a/app/views/sessions/.svn/format b/app/views/sessions/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/sessions/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/sessions/new.html.erb b/app/views/sessions/new.html.erb
deleted file mode 100644
index 3f333eb..0000000
--- a/app/views/sessions/new.html.erb
+++ /dev/null
@@ -1,14 +0,0 @@
-<% form_tag session_path do -%>
-
-<%= text_field_tag 'login' %>
-
-
-<%= password_field_tag 'password' %>
-
-
-
-<%= submit_tag 'Log in' %>
-<% end -%>
diff --git a/app/views/shared/.svn/entries b/app/views/shared/.svn/entries
deleted file mode 100644
index ba7bc5b..0000000
--- a/app/views/shared/.svn/entries
+++ /dev/null
@@ -1,28 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/shared
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
diff --git a/app/views/shared/.svn/format b/app/views/shared/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/shared/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/shared/_footer.rhtml b/app/views/shared/_footer.rhtml
new file mode 100644
index 0000000..ff2bf6e
--- /dev/null
+++ b/app/views/shared/_footer.rhtml
@@ -0,0 +1 @@
+
diff --git a/app/views/shared/_loader.rhtml b/app/views/shared/_loader.rhtml
new file mode 100644
index 0000000..f425374
--- /dev/null
+++ b/app/views/shared/_loader.rhtml
@@ -0,0 +1 @@
+Loading...
diff --git a/app/views/shared/_navigation.rhtml b/app/views/shared/_navigation.rhtml
new file mode 100644
index 0000000..1d05f15
--- /dev/null
+++ b/app/views/shared/_navigation.rhtml
@@ -0,0 +1,15 @@
+
diff --git a/app/views/shared/_notice.rhtml b/app/views/shared/_notice.rhtml
new file mode 100644
index 0000000..536b220
--- /dev/null
+++ b/app/views/shared/_notice.rhtml
@@ -0,0 +1,4 @@
+
+<% flash[:notice] = nil %>
diff --git a/app/views/shared/_tabs.rhtml b/app/views/shared/_tabs.rhtml
new file mode 100644
index 0000000..2f33b3d
--- /dev/null
+++ b/app/views/shared/_tabs.rhtml
@@ -0,0 +1,7 @@
+
diff --git a/app/views/support/index.rhtml b/app/views/support/index.rhtml
new file mode 100644
index 0000000..8b13789
--- /dev/null
+++ b/app/views/support/index.rhtml
@@ -0,0 +1 @@
+
diff --git a/app/views/suspended/_index.rhtml b/app/views/suspended/_index.rhtml
new file mode 100644
index 0000000..5ce706f
--- /dev/null
+++ b/app/views/suspended/_index.rhtml
@@ -0,0 +1,22 @@
+
+
+
+
+ infernalhosting.net :: account suspended
+
+
+
+
+ <%= stylesheet_link_tag "suspended" %>
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/views/web/_form_site.rhtml b/app/views/web/_form_site.rhtml
new file mode 100644
index 0000000..981343b
--- /dev/null
+++ b/app/views/web/_form_site.rhtml
@@ -0,0 +1,20 @@
+
+
+
+<%= select :site, :dns_resource_id, @domain.service_records_with_omit(['^www.*']) %>
+Only valid A or CNAME records may be used to attach a web service.
+
+
+
+
+<%= text_field :site, :serveradmin %>
+This is the email of the owner of the site, ie: "webmaster@domain.com".
+
+
+
+
+<%= check_box_tag 'aliases', true, true %>
+Checking this box will automatically create a 'www.' alias for this domain
+
+
+
diff --git a/app/views/web/_list_sites.rhtml b/app/views/web/_list_sites.rhtml
new file mode 100644
index 0000000..0b6903f
--- /dev/null
+++ b/app/views/web/_list_sites.rhtml
@@ -0,0 +1,18 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+Web Sites
+
+
+
+ - <%= link_to_remote "Add Site", :url=>{ :controller => "/panel/#{@domain.name}/web", :action=>"new_site"}, :update=>"site-detail" %>
+<% for site in @domain.sites %>
+ - <%= link_to_remote site.domain, :url=>{ :controller => "/panel/#{@domain.name}/site", :action=>"edit_site", :id=> site.id}, :update=>"site-detail" %>
+<% end %>
+
+
+
+<%= render :partial => 'site_detail' %>
+
+
diff --git a/app/views/web/_site_detail.rhtml b/app/views/web/_site_detail.rhtml
new file mode 100644
index 0000000..1027d91
--- /dev/null
+++ b/app/views/web/_site_detail.rhtml
@@ -0,0 +1,5 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+To edit a site, select one from the left.
diff --git a/app/views/web/edit_site.rhtml b/app/views/web/edit_site.rhtml
new file mode 100644
index 0000000..8d415bf
--- /dev/null
+++ b/app/views/web/edit_site.rhtml
@@ -0,0 +1,21 @@
+<% if flash[:notice] %>
+<%= render :partial => 'shared/notice' %>
+<% end %>
+
+<%= form_remote_tag( :update => 'sites-overview', :url => { :action => :update_site, :origin => @domain.name }) %>
+
+<%= end_form_tag %>
diff --git a/app/views/web/list.rhtml b/app/views/web/list.rhtml
new file mode 100644
index 0000000..e980378
--- /dev/null
+++ b/app/views/web/list.rhtml
@@ -0,0 +1,10 @@
+Manage Sites :: <%= @domain.name %>
+
+For the sites attached to your domain, there are many different configuration options. To review the settings of a particular site, use the list and form below.
+
+<%= render :partial => 'list_sites' %>
diff --git a/app/views/web/new_site.rhtml b/app/views/web/new_site.rhtml
new file mode 100644
index 0000000..dcd7868
--- /dev/null
+++ b/app/views/web/new_site.rhtml
@@ -0,0 +1,9 @@
+<%= form_remote_tag( :update => 'sites-overview', :url => { :action => :create_site }) %>
+
+<%= end_form_tag %>
diff --git a/app/views/zones/.svn/entries b/app/views/zones/.svn/entries
deleted file mode 100644
index 03e1b52..0000000
--- a/app/views/zones/.svn/entries
+++ /dev/null
@@ -1,100 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/app/views/zones
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-edit.html.erb
-file
-
-
-
-
-2008-03-13T06:41:58.000000Z
-da92988ba7b01eb626cf719e56b83168
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
-new.html.erb
-file
-
-
-
-
-2008-03-13T06:41:58.000000Z
-9433204bb5cd164ccdb27b1d4b0e23eb
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
-list.html.erb
-file
-
-
-
-
-2008-03-13T06:41:58.000000Z
-bd9dfcb15156a9c716532bdb2d4539c3
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
-show.txt.erb
-file
-
-
-
-
-2008-03-12T23:22:20.000000Z
-b0189ed538c8780096ae734aa991db0a
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-show.html.erb
-file
-
-
-
-
-2008-03-13T06:41:58.000000Z
-80ca052653838ad77c5295d660f42c05
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
-_form.html.erb
-file
-
-
-
-
-2008-03-13T06:41:59.000000Z
-c561b9ec9f16db32a6179e1e6053051a
-2008-03-13T06:35:53.795148Z
-984
-ryan
-
diff --git a/app/views/zones/.svn/format b/app/views/zones/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/app/views/zones/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/app/views/zones/.svn/text-base/_form.html.erb.svn-base b/app/views/zones/.svn/text-base/_form.html.erb.svn-base
deleted file mode 100644
index fc00334..0000000
--- a/app/views/zones/.svn/text-base/_form.html.erb.svn-base
+++ /dev/null
@@ -1,101 +0,0 @@
-<%= all_error_messages_for :zone %>
-
-<%= hider_toggle('SOA Information', 'soa_information') %>
-
-
-
-<%= form.text_field :origin, :disabled => params[:action] =~ /new|create/ ? false : true %>
-This is the name of the zone. You can't change this.
-
-
-
-
-<%= form.text_field :ns %>
-The name of the nameserver that is the primary source of data for this zone.
-
-
-
-
-<%= form.text_field :mbox %>
-A name which specifies the mailbox of the person responsible for this zone. The should be specified in the mailbox-at-domain-name format where the '@' character is replaced with a '.'
-
-
-
-
-<%= form.text_field :refresh %>
-This specifies the number of seconds after slave nameservers should check to see if this zone has been changed.
-
-
-
-
-<%= form.text_field :retry %>
-This specifies the number of seconds a slave nameserver should wait before retrying if it attempts to transfer this zone but fails.
-
-
-
-
-<%= form.text_field :expire %>
-The number of seconds the primary nameserver expires its authority over the zone.
-
-
-
-
-<%= form.text_field :ttl %>
-The number of seconds that this zone may be cached before the source of the information should again be consulted. Zero values are interpreted to mean that the zone should not be cached.
-
-
-
-<%= hider_toggle('Resource Records', 'resource_records') %>
-
-<% if resources %>
-
-
-
- Name
- TTL
- Type
- AUX
- Data
- Delete
-
-
-
-
-<% counter = 1 %>
-<% @zone.resources.each do |record| %>
- ">
- <%= hidden_field_tag "dns_resources[#{record.id}][id]", record.id %>
- <%= text_field_tag "dns_resources[#{record.id}][name]", record.name, :class => 'rr-name' %>
- <%= text_field_tag "dns_resources[#{record.id}][ttl]", record.ttl, :size => 5, :class => 'rr-ttl' %>
- <%= select_tag "dns_resources[#{record.id}][dns_resource_type_id]", collect_dns_resource_types( record.dns_resource_type ) %>
- <%= text_field_tag "dns_resources[#{record.id}][aux]", record.aux, :size => 2 , :class => 'rr-aux' %>
- <%= text_field_tag "dns_resources[#{record.id}][data]", record.data, :class => 'rr-data' %>
- <%= check_box_tag "dns_resources[#{record.id}][delete]" %>
-
-<% counter += 1 %>
-<% end %>
-
-
-
-
- <%= @zone.resources.length %> Records Found
Create New Record:
-
-
- <%= text_field_tag "dns_resources[new][name]", nil, :class => 'rr-name' %>
- <%= text_field_tag "dns_resources[new][ttl]", nil, :size => 5, :class => 'rr-ttl' %>
- <%= select_tag "dns_resources[new][dns_resource_type_id]", collect_dns_resource_types %>
- <%= text_field_tag "dns_resources[new][aux]", nil, :size => 2 , :class => 'rr-aux' %>
- <%= text_field_tag "dns_resources[new][data]", nil, :class => 'rr-data' %>
-
-
-
-
-<% else %>
-
-
-<%= check_box_tag "dns_resources[default]", true, true %>
-When creating this new zone, also populate it with default values to get things started (you can edit these later).
-
-<% end %>
-
-
diff --git a/app/views/zones/.svn/text-base/edit.html.erb.svn-base b/app/views/zones/.svn/text-base/edit.html.erb.svn-base
deleted file mode 100644
index d74a48a..0000000
--- a/app/views/zones/.svn/text-base/edit.html.erb.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= @zone.origin %> :: Edit Zone
-
-<% form_for(:zone, :url => zone_path, :html => { :method => :put }) do |f| %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/zones/.svn/text-base/list.html.erb.svn-base b/app/views/zones/.svn/text-base/list.html.erb.svn-base
deleted file mode 100644
index 3828fd9..0000000
--- a/app/views/zones/.svn/text-base/list.html.erb.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-Zones
-Here are the domains that you currently have hosted with us. From here, you're able to add or delete domains as well as manipulate the DNS records for existing zones.
-
-<%= domain_list %>
-
-
-<%= link_to "Add a domain", new_zone_path %>Host another domain with us!
-
\ No newline at end of file
diff --git a/app/views/zones/.svn/text-base/new.html.erb.svn-base b/app/views/zones/.svn/text-base/new.html.erb.svn-base
deleted file mode 100644
index 9bc335d..0000000
--- a/app/views/zones/.svn/text-base/new.html.erb.svn-base
+++ /dev/null
@@ -1,8 +0,0 @@
-Create Zone
-
-<% form_for(:zone, :url => zones_path, :html => { :method => :post }) do |f| %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/zones/.svn/text-base/show.html.erb.svn-base b/app/views/zones/.svn/text-base/show.html.erb.svn-base
deleted file mode 100644
index f96035a..0000000
--- a/app/views/zones/.svn/text-base/show.html.erb.svn-base
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= @zone.origin %>
-
-<%= content_tag(:p, link_to('Edit Zone', edit_zone_path(@zone))) %>
-<%= content_tag(:p, link_to('Delete Zone', zone_path(@zone), :method => 'delete', :confirm => 'Are you sure?')) %>
\ No newline at end of file
diff --git a/app/views/zones/.svn/text-base/show.txt.erb.svn-base b/app/views/zones/.svn/text-base/show.txt.erb.svn-base
deleted file mode 100644
index c3d718c..0000000
--- a/app/views/zones/.svn/text-base/show.txt.erb.svn-base
+++ /dev/null
@@ -1,12 +0,0 @@
-$TTL <%= @zone.ttl %>
-@ IN SOA <%= @zone.formatted_ns %> <%= @zone.formatted_mbox %> (
- <%= @zone.serial %>
- <%= @zone.refresh %>
- <%= @zone.retry %>
- <%= @zone.expire %>
- 300
- )
-
-$ORIGIN <%= @zone.formatted_origin %>
-<% @zone.resources.each do |record| %>
-<%= record.to_txt %><% end %>
\ No newline at end of file
diff --git a/app/views/zones/_form.html.erb b/app/views/zones/_form.html.erb
deleted file mode 100644
index fc00334..0000000
--- a/app/views/zones/_form.html.erb
+++ /dev/null
@@ -1,101 +0,0 @@
-<%= all_error_messages_for :zone %>
-
-<%= hider_toggle('SOA Information', 'soa_information') %>
-
-
-
-<%= form.text_field :origin, :disabled => params[:action] =~ /new|create/ ? false : true %>
-This is the name of the zone. You can't change this.
-
-
-
-
-<%= form.text_field :ns %>
-The name of the nameserver that is the primary source of data for this zone.
-
-
-
-
-<%= form.text_field :mbox %>
-A name which specifies the mailbox of the person responsible for this zone. The should be specified in the mailbox-at-domain-name format where the '@' character is replaced with a '.'
-
-
-
-
-<%= form.text_field :refresh %>
-This specifies the number of seconds after slave nameservers should check to see if this zone has been changed.
-
-
-
-
-<%= form.text_field :retry %>
-This specifies the number of seconds a slave nameserver should wait before retrying if it attempts to transfer this zone but fails.
-
-
-
-
-<%= form.text_field :expire %>
-The number of seconds the primary nameserver expires its authority over the zone.
-
-
-
-
-<%= form.text_field :ttl %>
-The number of seconds that this zone may be cached before the source of the information should again be consulted. Zero values are interpreted to mean that the zone should not be cached.
-
-
-
-<%= hider_toggle('Resource Records', 'resource_records') %>
-
-<% if resources %>
-
-
-
- Name
- TTL
- Type
- AUX
- Data
- Delete
-
-
-
-
-<% counter = 1 %>
-<% @zone.resources.each do |record| %>
- ">
- <%= hidden_field_tag "dns_resources[#{record.id}][id]", record.id %>
- <%= text_field_tag "dns_resources[#{record.id}][name]", record.name, :class => 'rr-name' %>
- <%= text_field_tag "dns_resources[#{record.id}][ttl]", record.ttl, :size => 5, :class => 'rr-ttl' %>
- <%= select_tag "dns_resources[#{record.id}][dns_resource_type_id]", collect_dns_resource_types( record.dns_resource_type ) %>
- <%= text_field_tag "dns_resources[#{record.id}][aux]", record.aux, :size => 2 , :class => 'rr-aux' %>
- <%= text_field_tag "dns_resources[#{record.id}][data]", record.data, :class => 'rr-data' %>
- <%= check_box_tag "dns_resources[#{record.id}][delete]" %>
-
-<% counter += 1 %>
-<% end %>
-
-
-
-
- <%= @zone.resources.length %> Records Found
Create New Record:
-
-
- <%= text_field_tag "dns_resources[new][name]", nil, :class => 'rr-name' %>
- <%= text_field_tag "dns_resources[new][ttl]", nil, :size => 5, :class => 'rr-ttl' %>
- <%= select_tag "dns_resources[new][dns_resource_type_id]", collect_dns_resource_types %>
- <%= text_field_tag "dns_resources[new][aux]", nil, :size => 2 , :class => 'rr-aux' %>
- <%= text_field_tag "dns_resources[new][data]", nil, :class => 'rr-data' %>
-
-
-
-
-<% else %>
-
-
-<%= check_box_tag "dns_resources[default]", true, true %>
-When creating this new zone, also populate it with default values to get things started (you can edit these later).
-
-<% end %>
-
-
diff --git a/app/views/zones/edit.html.erb b/app/views/zones/edit.html.erb
deleted file mode 100644
index d74a48a..0000000
--- a/app/views/zones/edit.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-<%= @zone.origin %> :: Edit Zone
-
-<% form_for(:zone, :url => zone_path, :html => { :method => :put }) do |f| %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/zones/list.html.erb b/app/views/zones/list.html.erb
deleted file mode 100644
index 3828fd9..0000000
--- a/app/views/zones/list.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-Zones
-Here are the domains that you currently have hosted with us. From here, you're able to add or delete domains as well as manipulate the DNS records for existing zones.
-
-<%= domain_list %>
-
-
-<%= link_to "Add a domain", new_zone_path %>Host another domain with us!
-
\ No newline at end of file
diff --git a/app/views/zones/new.html.erb b/app/views/zones/new.html.erb
deleted file mode 100644
index 9bc335d..0000000
--- a/app/views/zones/new.html.erb
+++ /dev/null
@@ -1,8 +0,0 @@
-Create Zone
-
-<% form_for(:zone, :url => zones_path, :html => { :method => :post }) do |f| %>
-
-<% end %>
\ No newline at end of file
diff --git a/app/views/zones/show.html.erb b/app/views/zones/show.html.erb
deleted file mode 100644
index f96035a..0000000
--- a/app/views/zones/show.html.erb
+++ /dev/null
@@ -1,4 +0,0 @@
-<%= @zone.origin %>
-
-<%= content_tag(:p, link_to('Edit Zone', edit_zone_path(@zone))) %>
-<%= content_tag(:p, link_to('Delete Zone', zone_path(@zone), :method => 'delete', :confirm => 'Are you sure?')) %>
\ No newline at end of file
diff --git a/app/views/zones/show.txt.erb b/app/views/zones/show.txt.erb
deleted file mode 100644
index c3d718c..0000000
--- a/app/views/zones/show.txt.erb
+++ /dev/null
@@ -1,12 +0,0 @@
-$TTL <%= @zone.ttl %>
-@ IN SOA <%= @zone.formatted_ns %> <%= @zone.formatted_mbox %> (
- <%= @zone.serial %>
- <%= @zone.refresh %>
- <%= @zone.retry %>
- <%= @zone.expire %>
- 300
- )
-
-$ORIGIN <%= @zone.formatted_origin %>
-<% @zone.resources.each do |record| %>
-<%= record.to_txt %><% end %>
\ No newline at end of file
diff --git a/config/.svn/dir-prop-base b/config/.svn/dir-prop-base
deleted file mode 100644
index f0c77dc..0000000
--- a/config/.svn/dir-prop-base
+++ /dev/null
@@ -1,6 +0,0 @@
-K 10
-svn:ignore
-V 13
-database.yml
-
-END
diff --git a/config/.svn/entries b/config/.svn/entries
deleted file mode 100644
index 8704035..0000000
--- a/config/.svn/entries
+++ /dev/null
@@ -1,106 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/config
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-13T06:45:33.582273Z
-987
-ryan
-has-props
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-development-mongrel.yml
-file
-
-
-
-
-2008-03-12T23:22:56.000000Z
-a0cb97255cb4b76ca9647e7f16d71fee
-2008-03-11T22:29:32.815167Z
-976
-ryan
-
-routes.rb
-file
-
-
-
-
-2008-03-13T00:07:29.000000Z
-1f127e038a6cac028a829dc7449639f3
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
-database.yml
-file
-
-
-
-
-2008-03-13T06:52:37.000000Z
-3f7392627349d475d0c5bfc8d8a1347c
-2008-03-13T06:45:33.582273Z
-987
-ryan
-
-boot.rb
-file
-
-
-
-
-2008-03-12T23:22:57.000000Z
-62fe46fd028f9df081e4ec9eb85968c0
-2008-03-11T22:21:38.954120Z
-973
-ryan
-
-initializers
-dir
-
-environment.rb
-file
-
-
-
-
-2008-03-12T23:22:57.000000Z
-93a422f73f4465bd392064ced9c75b47
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-environments
-dir
-
-production-mongrel.yml
-file
-
-
-
-
-2008-03-12T23:22:57.000000Z
-7fca499ec838b1b4d46fd8e34e35af27
-2008-03-11T22:29:32.815167Z
-976
-ryan
-
diff --git a/config/.svn/format b/config/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/config/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/config/.svn/text-base/boot.rb.svn-base b/config/.svn/text-base/boot.rb.svn-base
deleted file mode 100644
index 5697cc1..0000000
--- a/config/.svn/text-base/boot.rb.svn-base
+++ /dev/null
@@ -1,109 +0,0 @@
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
-
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
-
-module Rails
- class << self
- def boot!
- unless booted?
- preinitialize
- pick_boot.run
- end
- end
-
- def booted?
- defined? Rails::Initializer
- end
-
- def pick_boot
- (vendor_rails? ? VendorBoot : GemBoot).new
- end
-
- def vendor_rails?
- File.exist?("#{RAILS_ROOT}/vendor/rails")
- end
-
- # FIXME : Ruby 1.9
- def preinitialize
- load(preinitializer_path) if File.exists?(preinitializer_path)
- end
-
- def preinitializer_path
- "#{RAILS_ROOT}/config/preinitializer.rb"
- end
- end
-
- class Boot
- def run
- load_initializer
- Rails::Initializer.run(:set_load_path)
- end
- end
-
- class VendorBoot < Boot
- def load_initializer
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
- end
- end
-
- class GemBoot < Boot
- def load_initializer
- self.class.load_rubygems
- load_rails_gem
- require 'initializer'
- end
-
- def load_rails_gem
- if version = self.class.gem_version
- gem 'rails', version
- else
- gem 'rails'
- end
- rescue Gem::LoadError => load_error
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
- exit 1
- end
-
- class << self
- def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
- end
-
- def gem_version
- if defined? RAILS_GEM_VERSION
- RAILS_GEM_VERSION
- elsif ENV.include?('RAILS_GEM_VERSION')
- ENV['RAILS_GEM_VERSION']
- else
- parse_gem_version(read_environment_rb)
- end
- end
-
- def load_rubygems
- require 'rubygems'
-
- unless rubygems_version >= '0.9.4'
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
- exit 1
- end
-
- rescue LoadError
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
- exit 1
- end
-
- def parse_gem_version(text)
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
- end
-
- private
- def read_environment_rb
- File.read("#{RAILS_ROOT}/config/environment.rb")
- end
- end
- end
-end
-
-# All that for this:
-Rails.boot!
diff --git a/config/.svn/text-base/database.yml.svn-base b/config/.svn/text-base/database.yml.svn-base
deleted file mode 100644
index 3cf7b4f..0000000
--- a/config/.svn/text-base/database.yml.svn-base
+++ /dev/null
@@ -1,19 +0,0 @@
-login: &login
- adapter: postgresql
- username: evilserve
- password: Iitwitm.338
-
-development:
- database: evilserve_dev
- host: localhost
- <<: *login
-
-test:
- database: evilserve_test
- host: localhost
- <<: *login
-
-production:
- database: evilserve
- host: mdb01.infernalhosting.net
- <<: *login
diff --git a/config/.svn/text-base/environment.rb.svn-base b/config/.svn/text-base/environment.rb.svn-base
deleted file mode 100644
index 4333a97..0000000
--- a/config/.svn/text-base/environment.rb.svn-base
+++ /dev/null
@@ -1,12 +0,0 @@
-RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
-
-require File.join(File.dirname(__FILE__), 'boot')
-
-Rails::Initializer.run do |config|
- config.active_record.observers = :account_observer
- config.active_record.colorize_logging = false
- config.action_controller.session = { :session_key => "_infernalhosting.net_session_id", :secret => "aba64755b2ba68801a71d0734840b69169c45c4ffc55908401820315886bbcbea159535c643b95991360e38b3686a982ead7851092daf6f22a60dfc377d5f3f4" }
-end
-
-require 'active_merchant'
-require 'money'
\ No newline at end of file
diff --git a/config/.svn/text-base/routes.rb.svn-base b/config/.svn/text-base/routes.rb.svn-base
deleted file mode 100644
index 3e1a221..0000000
--- a/config/.svn/text-base/routes.rb.svn-base
+++ /dev/null
@@ -1,32 +0,0 @@
-ActionController::Routing::Routes.draw do |map|
-
- # named routes
- map.login 'login', :controller => 'sessions', :action => 'login'
- map.logout 'logout', :controller => 'sessions', :action => 'logout'
- map.signup 'signup', :controller => 'accounts', :action => 'signup'
- map.activation 'activate/:activation_code', :controller => 'accounts', :action => 'activate'
- map.services 'services', :controller => 'application', :action => 'show_services'
- map.about 'about', :controller => 'application', :action => 'show_about'
- map.support 'support', :controller => 'application', :action => 'show_support'
- map.contact 'contact', :controller => 'application', :action => 'show_contact'
- map.eula 'agreement', :controller => 'application', :action => 'show_eula'
- map.dashboard 'dashboard', :controller => 'dashboard', :action => 'index'
- map.error 'error/:code', :controller => 'application', :action => 'error'
-
- # specific named restful routes
- map.formatted_zone_detail 'zones/:origin.:format', :controller => 'zones', :action => 'show_by_origin', :conditions => { :method => :get }, :requirements => { :origin => /([a-z0-9-]+)\.[a-z.]+/ }
- map.zone_detail 'zones/:origin', :controller => 'zones', :action => 'show_by_origin', :conditions => { :method => :get }, :requirements => { :origin => /([a-z0-9-]+)\.[a-z.]+/ }
-
- # restful routes
- map.resources :accounts
- map.resources :zones
- map.resource :session
-
- # root route
- map.root :controller => 'application'
-
- # default routes
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
-
-end
diff --git a/config/.svn/tmp/tempfile.tmp b/config/.svn/tmp/tempfile.tmp
deleted file mode 100644
index fb9b759..0000000
--- a/config/.svn/tmp/tempfile.tmp
+++ /dev/null
@@ -1,24 +0,0 @@
-login: &login
- adapter: postgresql
- username: evilserve
- password: Iitwitm.338
-
-development:
- database: evilserve_dev
- host: localhost
- <<: *login
-
-test:
- database: evilserve_test
- host: localhost
- <<: *login
-
-production:
-<<<<<<< .mine
- database: evilserve_temp
-=======
- #database: evilserve
- database: evilserve_temp
->>>>>>> .r982
- host: mdb01.infernalhosting.net
- <<: *login
diff --git a/config/boot.rb b/config/boot.rb
index 5697cc1..d57f68a 100644
--- a/config/boot.rb
+++ b/config/boot.rb
@@ -1,109 +1,44 @@
-# Don't change this file!
-# Configure your app in config/environment.rb and config/environments/*.rb
+# Don't change this file. Configuration is done in config/environment.rb and config/environments/*.rb
-RAILS_ROOT = "#{File.dirname(__FILE__)}/.." unless defined?(RAILS_ROOT)
+unless defined?(RAILS_ROOT)
+ root_path = File.join(File.dirname(__FILE__), '..')
-module Rails
- class << self
- def boot!
- unless booted?
- preinitialize
- pick_boot.run
- end
- end
-
- def booted?
- defined? Rails::Initializer
- end
-
- def pick_boot
- (vendor_rails? ? VendorBoot : GemBoot).new
- end
-
- def vendor_rails?
- File.exist?("#{RAILS_ROOT}/vendor/rails")
- end
-
- # FIXME : Ruby 1.9
- def preinitialize
- load(preinitializer_path) if File.exists?(preinitializer_path)
- end
-
- def preinitializer_path
- "#{RAILS_ROOT}/config/preinitializer.rb"
- end
- end
-
- class Boot
- def run
- load_initializer
- Rails::Initializer.run(:set_load_path)
- end
- end
-
- class VendorBoot < Boot
- def load_initializer
- require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
- end
+ unless RUBY_PLATFORM =~ /mswin32/
+ require 'pathname'
+ root_path = Pathname.new(root_path).cleanpath(true).to_s
end
- class GemBoot < Boot
- def load_initializer
- self.class.load_rubygems
- load_rails_gem
- require 'initializer'
- end
-
- def load_rails_gem
- if version = self.class.gem_version
- gem 'rails', version
- else
- gem 'rails'
- end
- rescue Gem::LoadError => load_error
- $stderr.puts %(Missing the Rails #{version} gem. Please `gem install -v=#{version} rails`, update your RAILS_GEM_VERSION setting in config/environment.rb for the Rails version you do have installed, or comment out RAILS_GEM_VERSION to use the latest version installed.)
- exit 1
- end
+ RAILS_ROOT = root_path
+end
- class << self
- def rubygems_version
- Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion
- end
+unless defined?(Rails::Initializer)
+ if File.directory?("#{RAILS_ROOT}/vendor/rails")
+ require "#{RAILS_ROOT}/vendor/rails/railties/lib/initializer"
+ else
+ require 'rubygems'
- def gem_version
- if defined? RAILS_GEM_VERSION
- RAILS_GEM_VERSION
- elsif ENV.include?('RAILS_GEM_VERSION')
- ENV['RAILS_GEM_VERSION']
- else
- parse_gem_version(read_environment_rb)
- end
- end
+ environment_without_comments = IO.readlines(File.dirname(__FILE__) + '/environment.rb').reject { |l| l =~ /^#/ }.join
+ environment_without_comments =~ /[^#]RAILS_GEM_VERSION = '([\d.]+)'/
+ rails_gem_version = $1
- def load_rubygems
- require 'rubygems'
+ if version = defined?(RAILS_GEM_VERSION) ? RAILS_GEM_VERSION : rails_gem_version
+ rails_gem = Gem.cache.search('rails', "=#{version}").first
- unless rubygems_version >= '0.9.4'
- $stderr.puts %(Rails requires RubyGems >= 0.9.4 (you have #{rubygems_version}). Please `gem update --system` and try again.)
- exit 1
- end
-
- rescue LoadError
- $stderr.puts %(Rails requires RubyGems >= 0.9.4. Please install RubyGems and try again: http://rubygems.rubyforge.org)
+ if rails_gem
+ gem "rails", "=#{version}"
+ require rails_gem.full_gem_path + '/lib/initializer'
+ else
+ STDERR.puts %(Cannot find gem for Rails =#{version}:
+ Install the missing gem with 'gem install -v=#{version} rails', or
+ change environment.rb to define RAILS_GEM_VERSION with your desired version.
+ )
exit 1
end
-
- def parse_gem_version(text)
- $1 if text =~ /^[^#]*RAILS_GEM_VERSION\s*=\s*["']([!~<>=]*\s*[\d.]+)["']/
- end
-
- private
- def read_environment_rb
- File.read("#{RAILS_ROOT}/config/environment.rb")
- end
+ else
+ gem "rails"
+ require 'initializer'
end
end
-end
-# All that for this:
-Rails.boot!
+ Rails::Initializer.run(:set_load_path)
+end
diff --git a/config/database.yml b/config/database.yml
index 3cf7b4f..1a329b7 100644
--- a/config/database.yml
+++ b/config/database.yml
@@ -2,18 +2,16 @@ login: &login
adapter: postgresql
username: evilserve
password: Iitwitm.338
+ host: mdb01.infernalhosting.net
development:
- database: evilserve_dev
- host: localhost
+ database: evilserve
<<: *login
test:
database: evilserve_test
- host: localhost
<<: *login
production:
database: evilserve
- host: mdb01.infernalhosting.net
<<: *login
diff --git a/config/deploy.rb b/config/deploy.rb
new file mode 100644
index 0000000..610b144
--- /dev/null
+++ b/config/deploy.rb
@@ -0,0 +1,14 @@
+require 'mongrel_cluster/recipes'
+
+set :application, "infernalhosting.net"
+set :repository, "svn://svn.evilcode.net/sites/#{application}/trunk"
+
+role :web, "web001.evilcode.net"
+role :app, "web001.evilcode.net"
+
+set :deploy_to, "/www/infernalhosting.net" # defaults to "/u/apps/#{application}"
+set :user, "ryan" # defaults to the currently logged in user
+set :svn_user, "ryan"
+set :svn_password, "svnpass4u"
+
+set :mongrel_conf, "#{current_path}/config/mongrel_production.yml"
diff --git a/config/development-mongrel.yml b/config/development-mongrel.yml
deleted file mode 100644
index c0e3f83..0000000
--- a/config/development-mongrel.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-cwd: /www/infernalhosting.net
-port: "1669"
-environment: development
-address: 127.0.0.1
-pid_file: log/mongrel.pid
-servers: 1
diff --git a/config/environment.rb b/config/environment.rb
index bd0c67b..371ed02 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -1,13 +1,12 @@
-RAILS_GEM_VERSION = '2.0.2' unless defined? RAILS_GEM_VERSION
+ENV['RAILS_ENV'] = 'development'
require File.join(File.dirname(__FILE__), 'boot')
Rails::Initializer.run do |config|
- config.active_record.observers = :account_observer
- config.active_record.colorize_logging = false
- config.action_controller.session = { :session_key => "_infernalhosting.net_session_id", :secret => "aba64755b2ba68801a71d0734840b69169c45c4ffc55908401820315886bbcbea159535c643b95991360e38b3686a982ead7851092daf6f22a60dfc377d5f3f4" }
+ config.load_paths += %W( #{RAILS_ROOT}/lib )
+ config.action_controller.session_store = :active_record_store
end
-require 'haml'
-#require 'active_merchant'
-#require 'money'
+#CGI::Session::ActiveRecordStore::Session.set_table_name "evilserve.sessions"
+
+require 'facets/crypt'
diff --git a/config/environments/.svn/entries b/config/environments/.svn/entries
deleted file mode 100644
index 9ca096e..0000000
--- a/config/environments/.svn/entries
+++ /dev/null
@@ -1,64 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/config/environments
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-test.rb
-file
-
-
-
-
-2008-03-12T23:22:53.000000Z
-52f12e5741b46cf6d66424dd814ed0c7
-2008-03-11T22:21:38.954120Z
-973
-ryan
-
-development.rb
-file
-
-
-
-
-2008-03-12T23:22:54.000000Z
-8c5ce2dc3f5746c5e77ae09d958390b1
-2008-03-11T22:21:38.954120Z
-973
-ryan
-
-production.rb
-file
-
-
-
-
-2008-03-12T23:22:54.000000Z
-b90cc442c4c80d98a96bd72b61141814
-2008-03-13T00:06:49.113433Z
-982
-ryan
-
diff --git a/config/environments/.svn/format b/config/environments/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/config/environments/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/config/environments/.svn/text-base/development.rb.svn-base b/config/environments/.svn/text-base/development.rb.svn-base
deleted file mode 100644
index 09a451f..0000000
--- a/config/environments/.svn/text-base/development.rb.svn-base
+++ /dev/null
@@ -1,18 +0,0 @@
-# Settings specified here will take precedence over those in config/environment.rb
-
-# In the development environment your application's code is reloaded on
-# every request. This slows down response time but is perfect for development
-# since you don't have to restart the webserver when you make code changes.
-config.cache_classes = false
-
-# Log error messages when you accidentally call methods on nil.
-config.whiny_nils = true
-
-# Show full error reports and disable caching
-config.action_controller.consider_all_requests_local = true
-config.action_view.debug_rjs = true
-config.action_controller.perform_caching = false
-config.action_view.cache_template_extensions = false
-
-# Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = false
\ No newline at end of file
diff --git a/config/environments/.svn/text-base/production.rb.svn-base b/config/environments/.svn/text-base/production.rb.svn-base
deleted file mode 100644
index 17a0392..0000000
--- a/config/environments/.svn/text-base/production.rb.svn-base
+++ /dev/null
@@ -1,18 +0,0 @@
-# Settings specified here will take precedence over those in config/environment.rb
-
-# The production environment is meant for finished, "live" apps.
-# Code is not reloaded between requests
-config.cache_classes = true
-
-# Use a different logger for distributed setups
-# config.logger = SyslogLogger.new
-
-# Full error reports are disabled and caching is turned on
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching = true
-config.action_view.cache_template_loading = true
-
-# Enable serving of images, stylesheets, and javascripts from an asset server
-#config.action_controller.asset_host = "http://assets.infernalhosting.net"
-
-# config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/.svn/text-base/test.rb.svn-base b/config/environments/.svn/text-base/test.rb.svn-base
deleted file mode 100644
index 58850a7..0000000
--- a/config/environments/.svn/text-base/test.rb.svn-base
+++ /dev/null
@@ -1,22 +0,0 @@
-# Settings specified here will take precedence over those in config/environment.rb
-
-# The test environment is used exclusively to run your application's
-# test suite. You never need to work with it otherwise. Remember that
-# your test database is "scratch space" for the test suite and is wiped
-# and recreated between test runs. Don't rely on the data there!
-config.cache_classes = true
-
-# Log error messages when you accidentally call methods on nil.
-config.whiny_nils = true
-
-# Show full error reports and disable caching
-config.action_controller.consider_all_requests_local = true
-config.action_controller.perform_caching = false
-
-# Disable request forgery protection in test environment
-config.action_controller.allow_forgery_protection = false
-
-# Tell ActionMailer not to deliver emails to the real world.
-# The :test delivery method accumulates sent emails in the
-# ActionMailer::Base.deliveries array.
-config.action_mailer.delivery_method = :test
diff --git a/config/environments/.svn/tmp/tempfile.tmp b/config/environments/.svn/tmp/tempfile.tmp
deleted file mode 100644
index 17a0392..0000000
--- a/config/environments/.svn/tmp/tempfile.tmp
+++ /dev/null
@@ -1,18 +0,0 @@
-# Settings specified here will take precedence over those in config/environment.rb
-
-# The production environment is meant for finished, "live" apps.
-# Code is not reloaded between requests
-config.cache_classes = true
-
-# Use a different logger for distributed setups
-# config.logger = SyslogLogger.new
-
-# Full error reports are disabled and caching is turned on
-config.action_controller.consider_all_requests_local = false
-config.action_controller.perform_caching = true
-config.action_view.cache_template_loading = true
-
-# Enable serving of images, stylesheets, and javascripts from an asset server
-#config.action_controller.asset_host = "http://assets.infernalhosting.net"
-
-# config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/development.rb b/config/environments/development.rb
index 09a451f..0589aa9 100644
--- a/config/environments/development.rb
+++ b/config/environments/development.rb
@@ -8,11 +8,14 @@
# Log error messages when you accidentally call methods on nil.
config.whiny_nils = true
+# Enable the breakpoint server that script/breakpointer connects to
+config.breakpoint_server = true
+
# Show full error reports and disable caching
config.action_controller.consider_all_requests_local = true
-config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_view.cache_template_extensions = false
+config.action_view.debug_rjs = true
# Don't care if the mailer can't send
-config.action_mailer.raise_delivery_errors = false
\ No newline at end of file
+config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/production.rb b/config/environments/production.rb
index 17a0392..5a4e2b1 100644
--- a/config/environments/production.rb
+++ b/config/environments/production.rb
@@ -10,9 +10,9 @@
# Full error reports are disabled and caching is turned on
config.action_controller.consider_all_requests_local = false
config.action_controller.perform_caching = true
-config.action_view.cache_template_loading = true
# Enable serving of images, stylesheets, and javascripts from an asset server
-#config.action_controller.asset_host = "http://assets.infernalhosting.net"
+# config.action_controller.asset_host = "http://assets.example.com"
+# Disable delivery errors if you bad email addresses should just be ignored
# config.action_mailer.raise_delivery_errors = false
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 58850a7..f0689b9 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -13,10 +13,7 @@
config.action_controller.consider_all_requests_local = true
config.action_controller.perform_caching = false
-# Disable request forgery protection in test environment
-config.action_controller.allow_forgery_protection = false
-
# Tell ActionMailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
-config.action_mailer.delivery_method = :test
+config.action_mailer.delivery_method = :test
\ No newline at end of file
diff --git a/config/infernalhosting.net.god b/config/infernalhosting.net.god
new file mode 100644
index 0000000..798eec4
--- /dev/null
+++ b/config/infernalhosting.net.god
@@ -0,0 +1,46 @@
+# file: infernalhosting.net.god
+# run with: god start -c /www/infernalhosting.net/current/config/infernalhosting.net.god
+
+RAILS_ROOT = "/www/infernalhosting.net/current"
+
+God.meddle do |god|
+ %w{1666 1667 1668}.each do |port|
+ god.watch do |w|
+ w.name = "infernalhosting.net-mongrel-#{port}"
+ w.interval = 30 # seconds default
+ w.start = "mongrel_rails cluster::start --only #{port} \
+ -C #{RAILS_ROOT}/config/mongrel_production.yml"
+ w.stop = "mongrel_rails cluster::stop --only #{port} \
+ -C #{RAILS_ROOT}/config/mongrel_production.yml"
+ w.grace = 10 # seconds
+
+ pid_file = File.join(RAILS_ROOT, "log/mongrel.#{port}.pid")
+
+ w.behavior(:clean_pid_file) do |b|
+ b.pid_file = pid_file
+ end
+
+ w.start_if do |start|
+ start.condition(:process_running) do |c|
+ c.interval = 5 # seconds
+ c.running = false
+ c.pid_file = pid_file
+ end
+ end
+
+ w.restart_if do |restart|
+ restart.condition(:memory_usage) do |c|
+ c.pid_file = pid_file
+ c.above = (150 * 1024) # 150mb
+ c.times = [3, 5] # 3 out of 5 intervals
+ end
+
+ restart.condition(:cpu_usage) do |c|
+ c.pid_file = pid_file
+ c.above = 50 # percent
+ c.times = 5
+ end
+ end
+ end
+ end
+end
diff --git a/config/initializers/.svn/entries b/config/initializers/.svn/entries
deleted file mode 100644
index 070e467..0000000
--- a/config/initializers/.svn/entries
+++ /dev/null
@@ -1,52 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/config/initializers
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T07:58:44.630596Z
-980
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-inflections.rb
-file
-
-
-
-
-2008-03-12T23:22:51.000000Z
-ca9985c5489295b14bcbedde9f271e49
-2008-03-11T22:21:38.954120Z
-973
-ryan
-
-mime_types.rb
-file
-
-
-
-
-2008-03-12T23:22:51.000000Z
-a4bd33bd14fc88ea7bc9bb97bb57a719
-2008-03-12T07:58:44.630596Z
-980
-ryan
-
diff --git a/config/initializers/.svn/format b/config/initializers/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/config/initializers/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/config/initializers/.svn/text-base/inflections.rb.svn-base b/config/initializers/.svn/text-base/inflections.rb.svn-base
deleted file mode 100644
index a86a8d4..0000000
--- a/config/initializers/.svn/text-base/inflections.rb.svn-base
+++ /dev/null
@@ -1,6 +0,0 @@
-# Inflector.inflections do |inflect|
-# inflect.plural /^(ox)$/i, '\1en'
-# inflect.singular /^(ox)en/i, '\1'
-# inflect.irregular 'person', 'people'
-# inflect.uncountable %w( fish sheep )
-# end
diff --git a/config/initializers/.svn/text-base/mime_types.rb.svn-base b/config/initializers/.svn/text-base/mime_types.rb.svn-base
deleted file mode 100644
index 820e8c9..0000000
--- a/config/initializers/.svn/text-base/mime_types.rb.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-Mime::Type.register 'image/gif', :gif
-Mime::Type.register 'image/jpeg', :jpeg
-Mime::Type.register 'image/jpg', :jpg
-Mime::Type.register 'image/png', :png
-Mime::Type.register 'text/plain', :txt
\ No newline at end of file
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb
deleted file mode 100644
index a86a8d4..0000000
--- a/config/initializers/inflections.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-# Inflector.inflections do |inflect|
-# inflect.plural /^(ox)$/i, '\1en'
-# inflect.singular /^(ox)en/i, '\1'
-# inflect.irregular 'person', 'people'
-# inflect.uncountable %w( fish sheep )
-# end
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb
deleted file mode 100644
index 820e8c9..0000000
--- a/config/initializers/mime_types.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-Mime::Type.register 'image/gif', :gif
-Mime::Type.register 'image/jpeg', :jpeg
-Mime::Type.register 'image/jpg', :jpg
-Mime::Type.register 'image/png', :png
-Mime::Type.register 'text/plain', :txt
\ No newline at end of file
diff --git a/config/.svn/text-base/development-mongrel.yml.svn-base b/config/mongrel_development.yml
similarity index 74%
rename from config/.svn/text-base/development-mongrel.yml.svn-base
rename to config/mongrel_development.yml
index c0e3f83..b3e0d3c 100644
--- a/config/.svn/text-base/development-mongrel.yml.svn-base
+++ b/config/mongrel_development.yml
@@ -1,5 +1,5 @@
---
-cwd: /www/infernalhosting.net
+cwd: /www/dev.infernalhosting.net
port: "1669"
environment: development
address: 127.0.0.1
diff --git a/config/.svn/text-base/production-mongrel.yml.svn-base b/config/mongrel_production.yml
similarity index 100%
rename from config/.svn/text-base/production-mongrel.yml.svn-base
rename to config/mongrel_production.yml
diff --git a/config/production-mongrel.yml b/config/production-mongrel.yml
deleted file mode 100644
index 1af8057..0000000
--- a/config/production-mongrel.yml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-cwd: /www/infernalhosting.net/current
-port: "1666"
-environment: production
-address: 127.0.0.1
-pid_file: log/mongrel.pid
-servers: 3
diff --git a/config/routes.rb b/config/routes.rb
index 3e1a221..ca7c137 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -1,32 +1,27 @@
ActionController::Routing::Routes.draw do |map|
+ map.splash 'splash', :controller => 'application', :action => 'show_splash'
- # named routes
- map.login 'login', :controller => 'sessions', :action => 'login'
- map.logout 'logout', :controller => 'sessions', :action => 'logout'
- map.signup 'signup', :controller => 'accounts', :action => 'signup'
- map.activation 'activate/:activation_code', :controller => 'accounts', :action => 'activate'
- map.services 'services', :controller => 'application', :action => 'show_services'
- map.about 'about', :controller => 'application', :action => 'show_about'
- map.support 'support', :controller => 'application', :action => 'show_support'
- map.contact 'contact', :controller => 'application', :action => 'show_contact'
- map.eula 'agreement', :controller => 'application', :action => 'show_eula'
- map.dashboard 'dashboard', :controller => 'dashboard', :action => 'index'
- map.error 'error/:code', :controller => 'application', :action => 'error'
+ # panel routes
+ map.connect 'domain/:action', :controller => 'domain'
- # specific named restful routes
- map.formatted_zone_detail 'zones/:origin.:format', :controller => 'zones', :action => 'show_by_origin', :conditions => { :method => :get }, :requirements => { :origin => /([a-z0-9-]+)\.[a-z.]+/ }
- map.zone_detail 'zones/:origin', :controller => 'zones', :action => 'show_by_origin', :conditions => { :method => :get }, :requirements => { :origin => /([a-z0-9-]+)\.[a-z.]+/ }
+ map.connect 'panel/', :controller => 'panel'
+ map.connect 'panel/:origin/dns/:action', :controller => 'dns', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
+ map.connect 'panel/:origin/site/:action/:id', :controller => 'web', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
+ map.connect 'panel/:origin/web/:action/:id', :controller => 'web', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
+ map.connect 'panel/:origin/db/:action/:id', :controller => 'web', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
+ map.connect 'panel/:origin/mail/:action/:id', :controller => 'mail', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
+ map.connect 'panel/:origin/:action', :controller => 'domain', :requirements => { :origin => /[-\w]+(\.[-\w]*)+/ }
- # restful routes
- map.resources :accounts
- map.resources :zones
- map.resource :session
+ # login routes
+ map.logout 'logout', :controller => 'login', :action => 'logout'
- # root route
- map.root :controller => 'application'
+ # error routes
+ map.error_404 'error/404', :controller => 'error', :action => 'error_404'
+ map.error_503 'error/503', :controller => 'error', :action => 'error_503'
- # default routes
- map.connect ':controller/:action/:id'
- map.connect ':controller/:action/:id.:format'
+ map.splash '', :controller => 'application', :action => 'show_splash'
+ # default routes
+ map.home ':controller/:action/:id', :controller => 'main'
+ map.connect ':controller/:action/:id'
end
diff --git a/db/.svn/entries b/db/.svn/entries
deleted file mode 100644
index 05c0871..0000000
--- a/db/.svn/entries
+++ /dev/null
@@ -1,67 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/db
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-13T04:14:42.024206Z
-983
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-evilserve.tmp.sql
-file
-
-
-
-
-2008-03-13T06:44:41.000000Z
-a5652cdda314de397791b211c96bd71a
-2008-03-13T04:14:42.024206Z
-983
-ryan
-
-schema.rb
-file
-
-
-
-
-2008-03-13T06:44:41.000000Z
-a6df8b4e4a10dc91ae5923d28590c652
-2008-03-13T04:14:42.024206Z
-983
-ryan
-
-1-ddl_main.txt
-file
-
-
-
-
-2008-03-13T06:44:41.000000Z
-a1b7c4548a694478ab1b16bf7db739b7
-2008-03-13T04:14:42.024206Z
-983
-ryan
-
-migrate
-dir
-
diff --git a/db/.svn/format b/db/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/db/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/db/.svn/text-base/1-ddl_main.txt.svn-base b/db/.svn/text-base/1-ddl_main.txt.svn-base
deleted file mode 100644
index 20a9c2a..0000000
--- a/db/.svn/text-base/1-ddl_main.txt.svn-base
+++ /dev/null
@@ -1,206 +0,0 @@
-CREATE TABLE dns_zones (
- id SERIAL8 PRIMARY KEY,
- origin VARCHAR(255) UNIQUE NOT NULL,
- ns VARCHAR(255) NOT NULL,
- mbox VARCHAR(255) NOT NULL,
- serial INT8 NOT NULL DEFAULT '1',
- refresh INT4 NOT NULL DEFAULT '10800', -- 3 hours
- retry INT4 NOT NULL DEFAULT '3600', -- 1 hour
- expire INT4 NOT NULL DEFAULT '604800', -- 1 week
- ttl INT4 NOT NULL DEFAULT '3600'); -- 1 hour
-
-CREATE TABLE dns_resource_types (
- id SERIAL8 PRIMARY KEY,
- name VARCHAR(255) NOT NULL,
- description TEXT
-);
-INSERT INTO dns_resource_types (name, description) VALUES ('A', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('AAAA', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('CNAME', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('HINFO', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('MX', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('NS', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('PTR', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('SRV', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('TXT', '');
-
-CREATE TABLE dns_resources (
- id SERIAL8 PRIMARY KEY,
- dns_zone_id INT8 NOT NULL REFERENCES dns_zones ON DELETE CASCADE ON UPDATE CASCADE,
- dns_resource_type_id INT8 NOT NULL REFERENCES dns_resource_types,
- name VARCHAR(64) NOT NULL,
- data VARCHAR(255) NOT NULL,
- aux INT4 NULL DEFAULT NULL,
- ttl INT4 NULL DEFAULT NULL);
-
-COPY dns_zones (id, origin, ns, mbox, serial, refresh, retry, expire, ttl) FROM stdin;
-2 thesjg.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-3 thesjg.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-4 thesjg.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-12 ftmeaderemount.com ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600
-5 mindlessracing.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-6 mindlessracing.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-7 mindlessracing.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-8 bitbum.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-9 bitbum.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-10 bitbum.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-1 evilcode.net ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600
-13 evilprojects.net ns.evilcode.net dns.evilcode.net 13 300 300 1200 300
-11 flixn.com ns.evilcode.net dns.evilcode.net 39 300 300 1200 300
-30 randallcreasey.com ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600
-29 randallbattlesdirk.com ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600
-28 k-osh.com ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600
-25 infernalhosting.net ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600
-27 durandall.org ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-26 developink.com ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600
-14 kaneda.net ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-\.
-
-COPY dns_resources (id, dns_zone_id, dns_resource_type_id, name, data, aux, ttl) FROM stdin;
-3 1 1 ns0 72.232.239.131 \N \N
-4 1 1 ns1 72.232.228.26 \N \N
-6 1 5 mail.evilcode.net 1 \N
-7 1 6 ns0.evilcode.net \N \N
-8 1 6 ns1.evilcode.net \N \N
-10 2 1 72.232.239.133 \N \N
-11 2 1 * 72.232.239.133 \N \N
-12 2 6 ns0.evilcode.net \N \N
-13 2 6 ns1.evilcode.net \N \N
-14 3 1 72.232.239.133 \N \N
-15 3 1 * 72.232.239.133 \N \N
-16 3 6 ns0.evilcode.net \N \N
-17 3 6 ns1.evilcode.net \N \N
-18 4 1 72.232.239.133 \N \N
-19 4 1 * 72.232.239.133 \N \N
-20 4 6 ns0.evilcode.net \N \N
-21 4 6 ns1.evilcode.net \N \N
-22 5 1 72.232.239.133 \N \N
-23 5 1 * 72.232.239.133 \N \N
-24 5 6 ns0.evilcode.net \N \N
-25 5 6 ns1.evilcode.net \N \N
-26 6 1 72.232.239.133 \N \N
-27 6 1 * 72.232.239.133 \N \N
-28 6 6 ns0.evilcode.net \N \N
-29 6 6 ns1.evilcode.net \N \N
-30 7 1 72.232.239.133 \N \N
-31 7 1 * 72.232.239.133 \N \N
-32 7 6 ns0.evilcode.net \N \N
-33 7 6 ns1.evilcode.net \N \N
-34 8 1 72.232.239.133 \N \N
-35 8 1 * 72.232.239.133 \N \N
-36 8 6 ns0.evilcode.net \N \N
-37 8 6 ns1.evilcode.net \N \N
-38 9 1 72.232.239.133 \N \N
-39 9 1 * 72.232.239.133 \N \N
-40 9 6 ns0.evilcode.net \N \N
-41 9 6 ns1.evilcode.net \N \N
-42 10 1 72.232.239.133 \N \N
-43 10 1 * 72.232.239.133 \N \N
-44 10 6 ns0.evilcode.net \N \N
-45 10 6 ns1.evilcode.net \N \N
-48 11 1 fms01 72.232.239.130 \N \N
-49 11 1 fms02 72.232.228.26 \N \N
-50 11 1 media 72.232.228.26 \N \N
-51 11 6 ns0.evilcode.net \N \N
-52 11 6 ns1.evilcode.net \N \N
-53 11 5 smtp15.msoutlookonline.net 1 \N
-54 12 1 72.232.239.133 \N \N
-55 12 1 * 72.232.239.133 \N \N
-58 11 1 mint 72.232.239.133 \N \N
-1 1 1 72.232.239.133 \N \N
-2 1 1 * 72.232.239.133 \N \N
-56 12 6 ns0.evilcode.net \N \N
-57 12 6 ns1.evilcode.net \N \N
-76 30 1 72.232.239.133 0 300
-82 29 1 72.232.239.133 0 300
-59 1 1 aurora 67.15.197.7 \N \N
-60 1 1 hawthorne 72.232.228.26 \N \N
-61 1 1 brio 209.40.201.62 \N \N
-62 1 1 catalyst 72.232.239.130 \N \N
-63 13 1 72.232.239.132 0 300
-64 13 1 * 72.232.239.132 0 300
-65 13 6 ns0.evilcode.net 0 300
-66 13 6 ns1.evilcode.net 0 300
-67 13 3 mail mail.evilcode.net 0 300
-68 13 5 mail.evilcode.net 0 300
-69 1 1 svn 72.232.239.130 \N \N
-70 13 1 www 72.232.239.133 0 300
-74 11 1 ecard 72.232.239.133 \N 300
-75 11 1 ecards 72.232.239.133 \N 300
-77 30 6 ns0.evilcode.net. 0 300
-78 30 6 ns1.evilcode.net. 0 300
-79 30 5 mail.infernalhosting.net. 0 300
-80 30 3 mail mail.infernalhosting.net. 0 300
-81 30 3 www randallcreasey.com. 0 300
-83 29 5 mail.randallbattlesdirk.com. 0 300
-46 11 1 72.232.239.133 \N 300
-47 11 1 * 72.232.239.133 \N 300
-84 29 3 www randallbattlesdirk.com. 0 300
-85 29 1 db 67.15.197.7 0 300
-71 11 1 admin 72.232.239.133 \N 300
-72 11 1 widgets 72.232.239.133 \N 300
-73 13 1 flixn 72.232.239.133 \N 300
-5 1 1 mail 72.232.239.131 \N \N
-86 29 3 mail mail.infernalhosting.net. 0 300
-87 28 6 ns0.evilcode.net. 0 300
-88 28 6 ns1.evilcode.net. 0 300
-89 28 5 mail.infernalhosting.net. 0 300
-90 28 3 mail mail.infernalhosting.net. 0 300
-92 28 3 www k-osh.com. 0 300
-93 27 5 mail.infernalhosting.net. 0 300
-94 27 3 mail mail.infernalhosting.net. 0 300
-95 27 3 www durandall.org. 0 300
-96 27 3 dev durandall.org. 0 300
-99 27 6 ns1.evilcode.net. 0 300
-100 27 6 ns0.evilcode.net. 0 300
-101 26 3 www developink.myshopify.com. 0 300
-91 28 1 72.232.239.133 0 300
-97 27 1 72.232.239.133 0 300
-98 27 1 mysql 72.232.239.133 0 300
-102 26 5 mail.infernalhosting.net. 0 300
-103 26 3 mail mail.infernalhosting.net. 0 300
-105 26 6 ns1.evilcode.net. 0 300
-107 26 6 ns0.evilcode.net. 0 300
-108 26 3 shop developink.myshopify.com. 0 300
-109 26 3 dev developink.com. 0 300
-110 26 1 sql 67.15.197.7 0 300
-111 14 5 mail.kaneda.net. 0 300
-112 14 3 stats web01.infernalhosting.net. 0 300
-113 14 3 mail mail.infernalhosting.net. 0 300
-114 14 3 ns ns1.infernalhosting.net. 0 300
-115 14 1 72.232.239.132 0 300
-116 14 6 ns0.evilcode.net. 0 300
-117 14 3 www kaneda.net. 0 300
-118 14 3 db db01.infernalhosting.net. 0 300
-119 14 3 xml kaneda.net. 0 300
-120 14 3 feed kaneda.net. 0 300
-121 25 5 mail.infernalhosting.net. 0 300
-122 25 3 media infernalhosting.net. 0 300
-123 25 1 rails01 72.232.239.132 0 300
-124 25 1 web01 72.232.239.133 0 300
-125 25 1 db01 10.0.3.1 0 300
-126 25 1 mdb01 10.0.0.2 0 300
-127 25 1 72.232.239.132 0 300
-131 25 3 irc irc.evilcode.net. 0 300
-134 25 3 ns ns1.infernalhosting.net. 0 300
-137 25 3 old infernalhosting.net. 0 300
-138 25 1 services.irc 70.168.96.168 0 300
-139 25 1 sql 67.15.197.7 0 300
-140 25 3 www infernalhosting.net. 0 300
-141 25 3 dev.admin infernalhosting.net. 0 300
-142 25 3 dev rails01.infernalhosting.net. 0 300
-143 25 3 cacti web01.infernalhosting.net. 0 300
-104 26 1 mysql 72.232.239.133 0 300
-106 26 1 72.232.239.133 0 300
-130 25 1 webmail 72.232.239.133 0 300
-133 25 1 mysql 72.232.239.133 0 300
-132 25 1 mail 72.232.239.131 0 300
-144 25 5 mail.infernalhosting.net. 0 300
-150 25 1 72.232.239.132 0 300
-173 13 1 flixnsvn 72.232.239.132 \N 300
-174 13 1 hacks 72.232.239.132 \N 300
-175 25 1 ns0 72.232.239.131 0 300
-135 25 1 ns1 72.232.228.26 0 300
-128 25 6 ns0.infernalhosting.net 0 300
-129 25 6 ns1.infernalhosting.net 0 300
-\.
diff --git a/db/.svn/text-base/evilserve.tmp.sql.svn-base b/db/.svn/text-base/evilserve.tmp.sql.svn-base
deleted file mode 100644
index 4096730..0000000
--- a/db/.svn/text-base/evilserve.tmp.sql.svn-base
+++ /dev/null
@@ -1,1087 +0,0 @@
---
--- PostgreSQL database dump
---
-
-SET client_encoding = 'UTF8';
-SET standard_conforming_strings = off;
-SET check_function_bodies = false;
-SET client_min_messages = warning;
-SET escape_string_warning = off;
-
---
--- Name: powerdns; Type: SCHEMA; Schema: -; Owner: evilserve
---
-
-CREATE SCHEMA powerdns;
-
-
-ALTER SCHEMA powerdns OWNER TO evilserve;
-
---
--- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pgsql
---
-
-COMMENT ON SCHEMA public IS 'standard public schema';
-
-
---
--- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: pgsql
---
-
-CREATE PROCEDURAL LANGUAGE plpgsql;
-
-
-ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO pgsql;
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domain_type; Type: TYPE; Schema: powerdns; Owner: evilserve
---
-
-CREATE TYPE domain_type AS ENUM (
- 'NATIVE',
- 'MASTER',
- 'SLAVE',
- 'SUPERSLAVE'
-);
-
-
-ALTER TYPE powerdns.domain_type OWNER TO evilserve;
-
-SET default_tablespace = '';
-
-SET default_with_oids = false;
-
---
--- Name: domains; Type: TABLE; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE domains (
- id bigint NOT NULL,
- name character varying(255) NOT NULL,
- master character varying(255) DEFAULT NULL::character varying,
- last_check integer,
- type domain_type NOT NULL,
- notified_serial integer,
- account character varying(40) DEFAULT NULL::character varying
-);
-
-
-ALTER TABLE powerdns.domains OWNER TO evilserve;
-
---
--- Name: record_type; Type: TYPE; Schema: powerdns; Owner: evilserve
---
-
-CREATE TYPE record_type AS ENUM (
- 'A',
- 'AAAA',
- 'AFSDB',
- 'CERT',
- 'CNAME',
- 'DNSKEY',
- 'DS',
- 'HINFO',
- 'KEY',
- 'LOC',
- 'MX',
- 'NAPTR',
- 'NS',
- 'NSEC',
- 'PTR',
- 'RP',
- 'RRSIG',
- 'SOA',
- 'SPF',
- 'SSHFP',
- 'SRV',
- 'TXT'
-);
-
-
-ALTER TYPE powerdns.record_type OWNER TO evilserve;
-
---
--- Name: records; Type: TABLE; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE records (
- id bigint NOT NULL,
- domain_id bigint NOT NULL,
- name character varying(255) NOT NULL,
- type record_type NOT NULL,
- content character varying(255) NOT NULL,
- ttl integer,
- prio integer,
- change_date integer,
- ref_id bigint
-);
-
-
-ALTER TABLE powerdns.records OWNER TO evilserve;
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_resource_types (
- id bigint NOT NULL,
- name character varying(255) NOT NULL,
- description text
-);
-
-
-ALTER TABLE public.dns_resource_types OWNER TO evilserve;
-
---
--- Name: dns_resources; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_resources (
- id bigint NOT NULL,
- dns_zone_id bigint NOT NULL,
- dns_resource_type_id bigint NOT NULL,
- name character varying(64) NOT NULL,
- data character varying(255) NOT NULL,
- aux integer,
- ttl integer
-);
-
-
-ALTER TABLE public.dns_resources OWNER TO evilserve;
-
---
--- Name: dns_zones; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_zones (
- id bigint NOT NULL,
- origin character varying(255) NOT NULL,
- ns character varying(255) NOT NULL,
- mbox character varying(255) NOT NULL,
- serial bigint DEFAULT 1::bigint NOT NULL,
- refresh integer DEFAULT 10800 NOT NULL,
- retry integer DEFAULT 3600 NOT NULL,
- expire integer DEFAULT 604800 NOT NULL,
- ttl integer DEFAULT 3600 NOT NULL
-);
-
-
-ALTER TABLE public.dns_zones OWNER TO evilserve;
-
---
--- Name: concat_hosts_func(text, text); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION concat_hosts_func(text, text) RETURNS text
- AS $_$
- DECLARE
- BEGIN
- IF ($1 = '' OR $1 IS NULL) THEN
- RETURN $2;
- END IF;
- RETURN ($1 || '.' || $2);
- END;
-$_$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.concat_hosts_func(text, text) OWNER TO evilserve;
-
---
--- Name: dns_resources_increment_dns_zones_serial_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_resources_increment_dns_zones_serial_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
- UPDATE dns_zones SET serial=serial+1 WHERE id=NEW.dns_zone_id;
- RETURN NEW;
- ELSIF (TG_OP = 'DELETE') THEN
- UPDATE dns_zones SET serial=serial+1 WHERE id=OLD.dns_zone_id;
- RETURN OLD;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_resources_increment_dns_zones_serial_func() OWNER TO evilserve;
-
---
--- Name: dns_resources_powerdns_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_resources_powerdns_func() RETURNS trigger
- AS $$
- DECLARE
- origin_l VARCHAR(255);
--- PostgreSQL 8.3
- type_l powerdns.RECORD_TYPE;
--- PostgreSQL 8.2
--- type_l VARCHAR(5);
- ttl_l INT4;
- BEGIN
- IF (TG_OP = 'DELETE') THEN
- DELETE FROM powerdns.records WHERE ref_id=OLD.id;
- RETURN OLD;
- END IF;
-
- IF (NEW.ttl IS NULL) THEN
- SELECT ttl INTO ttl_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- ELSE
- ttl_l := NEW.ttl;
- END IF;
-
- IF (TG_OP = 'INSERT') THEN
- SELECT origin INTO origin_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- SELECT name INTO type_l FROM dns_resource_types WHERE id=NEW.dns_resource_type_id;
- INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, ref_id) VALUES
- (NEW.dns_zone_id, concat_hosts_func(NEW.name, origin_l), type_l,
- NEW.data, ttl_l, NEW.aux, NEW.id);
- RETURN NEW;
- ELSIF (TG_OP = 'UPDATE') THEN
- SELECT origin INTO origin_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- SELECT name INTO type_l FROM dns_resource_types WHERE id=NEW.dns_resource_type_id;
- UPDATE powerdns.records SET domain_id=NEW.dns_zone_id,
- name=concat_hosts_func(NEW.name, origin_l), type=type_l,
- content=NEW.data, ttl=ttl_l, prio=NEW.aux WHERE ref_id=NEW.id;
- RETURN NEW;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_resources_powerdns_func() OWNER TO evilserve;
-
---
--- Name: dns_zones_powerdns_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_zones_powerdns_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (TG_OP = 'INSERT') THEN
- INSERT INTO powerdns.domains (id, name, type) VALUES (NEW.id, NEW.origin, 'MASTER');
- INSERT INTO powerdns.records (domain_id, name, type, content, ttl) VALUES (NEW.id, NEW.origin, 'SOA',
- (NEW.ns || ' ' || NEW.mbox || ' ' || NEW.serial || ' ' || NEW.refresh || ' ' ||
- NEW.retry || ' ' || NEW.expire || ' ' || NEW.ttl), NEW.ttl);
- RETURN NEW;
- ELSIF (TG_OP = 'UPDATE') THEN
- IF (NEW.origin <> OLD.origin) THEN
- UPDATE powerdns.domains SET name=NEW.origin WHERE id=NEW.id;
- UPDATE powerdns.records SET name=NEW.origin WHERE domain_id=NEW.id AND type='SOA';
- END IF;
-
- IF (NEW.ns <> OLD.ns OR
- NEW.mbox <> OLD.mbox OR
- NEW.serial <> OLD.serial OR
- NEW.refresh <> OLD.refresh OR
- NEW.retry <> OLD.retry OR
- NEW.expire <> OLD.expire OR
- NEW.ttl <> OLD.ttl) THEN
- UPDATE powerdns.records SET content=(NEW.ns || ' ' ||
- NEW.mbox || ' ' || NEW.serial || ' ' || NEW.refresh || ' ' ||
- NEW.retry || ' ' || NEW.expire || ' ' || NEW.ttl),
- ttl=NEW.ttl
- WHERE domain_id=NEW.id AND type='SOA';
- END IF;
- RETURN NEW;
- ELSIF (TG_OP = 'DELETE') THEN
- DELETE FROM powerdns.domains WHERE id=OLD.id;
- RETURN OLD;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_zones_powerdns_func() OWNER TO evilserve;
-
---
--- Name: dns_zones_update_increment_serial_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_zones_update_increment_serial_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (NEW.serial <= OLD.serial) THEN
- NEW.serial := OLD.serial + 1;
- END IF;
- RETURN NEW;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_zones_update_increment_serial_func() OWNER TO evilserve;
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_id_seq; Type: SEQUENCE; Schema: powerdns; Owner: evilserve
---
-
-CREATE SEQUENCE records_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE powerdns.records_id_seq OWNER TO evilserve;
-
---
--- Name: records_id_seq; Type: SEQUENCE OWNED BY; Schema: powerdns; Owner: evilserve
---
-
-ALTER SEQUENCE records_id_seq OWNED BY records.id;
-
-
---
--- Name: records_id_seq; Type: SEQUENCE SET; Schema: powerdns; Owner: evilserve
---
-
-SELECT pg_catalog.setval('records_id_seq', 195, true);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_resource_types_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_resource_types_id_seq OWNER TO evilserve;
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_resource_types_id_seq OWNED BY dns_resource_types.id;
-
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_resource_types_id_seq', 9, true);
-
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_resources_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_resources_id_seq OWNER TO evilserve;
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_resources_id_seq OWNED BY dns_resources.id;
-
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_resources_id_seq', 175, true);
-
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_zones_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_zones_id_seq OWNER TO evilserve;
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_zones_id_seq OWNED BY dns_zones.id;
-
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_zones_id_seq', 39, true);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: id; Type: DEFAULT; Schema: powerdns; Owner: evilserve
---
-
-ALTER TABLE records ALTER COLUMN id SET DEFAULT nextval('records_id_seq'::regclass);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_resource_types ALTER COLUMN id SET DEFAULT nextval('dns_resource_types_id_seq'::regclass);
-
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_resources ALTER COLUMN id SET DEFAULT nextval('dns_resources_id_seq'::regclass);
-
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_zones ALTER COLUMN id SET DEFAULT nextval('dns_zones_id_seq'::regclass);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Data for Name: domains; Type: TABLE DATA; Schema: powerdns; Owner: evilserve
---
-
-COPY domains (id, name, master, last_check, type, notified_serial, account) FROM stdin;
-2 thesjg.com \N \N MASTER 6 \N
-3 thesjg.net \N \N MASTER 6 \N
-4 thesjg.org \N \N MASTER 6 \N
-5 mindlessracing.com \N \N MASTER 6 \N
-6 mindlessracing.net \N \N MASTER 6 \N
-7 mindlessracing.org \N \N MASTER 6 \N
-8 bitbum.com \N \N MASTER 6 \N
-9 bitbum.net \N \N MASTER 6 \N
-10 bitbum.org \N \N MASTER 6 \N
-12 ftmeaderemount.com \N \N MASTER 7 \N
-1 evilcode.net \N \N MASTER 23 \N
-11 flixn.com \N \N MASTER 39 \N
-14 kaneda.net \N \N MASTER 11 \N
-27 durandall.org \N \N MASTER 11 \N
-28 k-osh.com \N \N MASTER 8 \N
-29 randallbattlesdirk.com \N \N MASTER 7 \N
-26 developink.com \N \N MASTER 13 \N
-13 evilprojects.net \N \N MASTER 13 \N
-30 randallcreasey.com \N \N MASTER 21 \N
-25 infernalhosting.net \N \N MASTER 78 \N
-\.
-
-
---
--- Data for Name: records; Type: TABLE DATA; Schema: powerdns; Owner: evilserve
---
-
-COPY records (id, domain_id, name, type, content, ttl, prio, change_date, ref_id) FROM stdin;
-37 7 mindlessracing.org A 72.232.239.133 3600 \N \N 30
-54 10 bitbum.org NS ns0.evilcode.net 3600 \N \N 44
-4 1 ns0.evilcode.net A 72.232.239.131 3600 \N \N 3
-38 7 *.mindlessracing.org A 72.232.239.133 3600 \N \N 31
-5 1 ns1.evilcode.net A 72.232.228.26 3600 \N \N 4
-75 13 evilprojects.net SOA ns.evilcode.net dns.evilcode.net 13 300 300 1200 300 300 \N \N \N
-39 7 mindlessracing.org NS ns0.evilcode.net 3600 \N \N 32
-7 1 evilcode.net MX mail.evilcode.net 3600 1 \N 6
-8 1 evilcode.net NS ns0.evilcode.net 3600 \N \N 7
-40 7 mindlessracing.org NS ns1.evilcode.net 3600 \N \N 33
-9 1 evilcode.net NS ns1.evilcode.net 3600 \N \N 8
-12 2 thesjg.com A 72.232.239.133 3600 \N \N 10
-55 10 bitbum.org NS ns1.evilcode.net 3600 \N \N 45
-13 2 *.thesjg.com A 72.232.239.133 3600 \N \N 11
-42 8 bitbum.com A 72.232.239.133 3600 \N \N 34
-14 2 thesjg.com NS ns0.evilcode.net 3600 \N \N 12
-15 2 thesjg.com NS ns1.evilcode.net 3600 \N \N 13
-17 3 thesjg.net A 72.232.239.133 3600 \N \N 14
-43 8 *.bitbum.com A 72.232.239.133 3600 \N \N 35
-18 3 *.thesjg.net A 72.232.239.133 3600 \N \N 15
-63 11 flixn.com NS ns1.evilcode.net 3600 \N \N 52
-19 3 thesjg.net NS ns0.evilcode.net 3600 \N \N 16
-20 3 thesjg.net NS ns1.evilcode.net 3600 \N \N 17
-44 8 bitbum.com NS ns0.evilcode.net 3600 \N \N 36
-22 4 thesjg.org A 72.232.239.133 3600 \N \N 18
-23 4 *.thesjg.org A 72.232.239.133 3600 \N \N 19
-45 8 bitbum.com NS ns1.evilcode.net 3600 \N \N 37
-24 4 thesjg.org NS ns0.evilcode.net 3600 \N \N 20
-25 4 thesjg.org NS ns1.evilcode.net 3600 \N \N 21
-27 5 mindlessracing.com A 72.232.239.133 3600 \N \N 22
-28 5 *.mindlessracing.com A 72.232.239.133 3600 \N \N 23
-47 9 bitbum.net A 72.232.239.133 3600 \N \N 38
-29 5 mindlessracing.com NS ns0.evilcode.net 3600 \N \N 24
-30 5 mindlessracing.com NS ns1.evilcode.net 3600 \N \N 25
-11 2 thesjg.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-32 6 mindlessracing.net A 72.232.239.133 3600 \N \N 26
-48 9 *.bitbum.net A 72.232.239.133 3600 \N \N 39
-33 6 *.mindlessracing.net A 72.232.239.133 3600 \N \N 27
-34 6 mindlessracing.net NS ns0.evilcode.net 3600 \N \N 28
-68 12 ftmeaderemount.com NS ns0.evilcode.net 3600 \N \N 56
-35 6 mindlessracing.net NS ns1.evilcode.net 3600 \N \N 29
-49 9 bitbum.net NS ns0.evilcode.net 3600 \N \N 40
-50 9 bitbum.net NS ns1.evilcode.net 3600 \N \N 41
-64 11 flixn.com MX smtp15.msoutlookonline.net 3600 1 \N 53
-52 10 bitbum.org A 72.232.239.133 3600 \N \N 42
-53 10 *.bitbum.org A 72.232.239.133 3600 \N \N 43
-59 11 fms01.flixn.com A 72.232.239.130 3600 \N \N 48
-16 3 thesjg.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-60 11 fms02.flixn.com A 72.232.228.26 3600 \N \N 49
-58 11 *.flixn.com A 72.232.239.133 300 \N \N 47
-61 11 media.flixn.com A 72.232.228.26 3600 \N \N 50
-69 12 ftmeaderemount.com NS ns1.evilcode.net 3600 \N \N 57
-62 11 flixn.com NS ns0.evilcode.net 3600 \N \N 51
-21 4 thesjg.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-26 5 mindlessracing.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-31 6 mindlessracing.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-36 7 mindlessracing.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-41 8 bitbum.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-46 9 bitbum.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-51 10 bitbum.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-71 1 aurora.evilcode.net A 67.15.197.7 3600 \N \N 59
-72 1 hawthorne.evilcode.net A 72.232.228.26 3600 \N \N 60
-73 1 brio.evilcode.net A 209.40.201.62 3600 \N \N 61
-74 1 catalyst.evilcode.net A 72.232.239.130 3600 \N \N 62
-66 12 ftmeaderemount.com A 72.232.239.133 3600 \N \N 54
-76 13 evilprojects.net A 72.232.239.132 300 0 \N 63
-6 1 mail.evilcode.net A 72.232.239.131 3600 \N \N 5
-77 13 *.evilprojects.net A 72.232.239.132 300 0 \N 64
-78 13 evilprojects.net NS ns0.evilcode.net 300 0 \N 65
-79 13 evilprojects.net NS ns1.evilcode.net 300 0 \N 66
-80 13 mail.evilprojects.net CNAME mail.evilcode.net 300 0 \N 67
-81 13 evilprojects.net MX mail.evilcode.net 300 0 \N 68
-82 1 svn.evilcode.net A 72.232.239.130 3600 \N \N 69
-83 13 www.evilprojects.net A 72.232.239.133 300 0 \N 70
-95 30 randallcreasey.com SOA ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600 3600 \N \N \N
-107 28 k-osh.com NS ns0.evilcode.net. 300 0 \N 87
-119 27 durandall.org NS ns1.evilcode.net. 300 0 \N 99
-108 28 k-osh.com NS ns1.evilcode.net. 300 0 \N 88
-57 11 flixn.com A 72.232.239.133 300 \N \N 46
-109 28 k-osh.com MX mail.infernalhosting.net. 300 0 \N 89
-120 27 durandall.org NS ns0.evilcode.net. 300 0 \N 100
-84 11 admin.flixn.com A 72.232.239.133 300 \N \N 71
-85 11 widgets.flixn.com A 72.232.239.133 300 \N \N 72
-86 13 flixn.evilprojects.net A 72.232.239.133 300 \N \N 73
-65 12 ftmeaderemount.com SOA ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600 3600 \N \N \N
-67 12 *.ftmeaderemount.com A 72.232.239.133 3600 \N \N 55
-70 11 mint.flixn.com A 72.232.239.133 300 \N \N 58
-2 1 evilcode.net A 72.232.239.133 3600 \N \N 1
-1 1 evilcode.net SOA ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600 3600 \N \N \N
-3 1 *.evilcode.net A 72.232.239.133 3600 \N \N 2
-110 28 mail.k-osh.com CNAME mail.infernalhosting.net. 300 0 \N 90
-87 11 ecard.flixn.com A 72.232.239.133 300 \N \N 74
-56 11 flixn.com SOA ns.evilcode.net dns.evilcode.net 39 300 300 1200 300 300 \N \N \N
-88 11 ecards.flixn.com A 72.232.239.133 300 \N \N 75
-97 30 randallcreasey.com NS ns0.evilcode.net. 300 0 \N 77
-98 30 randallcreasey.com NS ns1.evilcode.net. 300 0 \N 78
-112 28 www.k-osh.com CNAME k-osh.com. 300 0 \N 92
-99 30 randallcreasey.com MX mail.infernalhosting.net. 300 0 \N 79
-121 26 www.developink.com CNAME developink.myshopify.com. 300 0 \N 101
-100 30 mail.randallcreasey.com CNAME mail.infernalhosting.net. 300 0 \N 80
-101 30 www.randallcreasey.com CNAME randallcreasey.com. 300 0 \N 81
-113 27 durandall.org MX mail.infernalhosting.net. 300 0 \N 93
-130 26 sql.developink.com A 67.15.197.7 300 0 \N 110
-103 29 randallbattlesdirk.com MX mail.randallbattlesdirk.com. 300 0 \N 83
-114 27 mail.durandall.org CNAME mail.infernalhosting.net. 300 0 \N 94
-104 29 www.randallbattlesdirk.com CNAME randallbattlesdirk.com. 300 0 \N 84
-122 26 developink.com MX mail.infernalhosting.net. 300 0 \N 102
-105 29 db.randallbattlesdirk.com A 67.15.197.7 300 0 \N 85
-106 29 mail.randallbattlesdirk.com CNAME mail.infernalhosting.net. 300 0 \N 86
-115 27 www.durandall.org CNAME durandall.org. 300 0 \N 95
-127 26 developink.com NS ns0.evilcode.net. 300 0 \N 107
-116 27 dev.durandall.org CNAME durandall.org. 300 0 \N 96
-123 26 mail.developink.com CNAME mail.infernalhosting.net. 300 0 \N 103
-128 26 shop.developink.com CNAME developink.myshopify.com. 300 0 \N 108
-131 14 kaneda.net MX mail.kaneda.net. 300 0 \N 111
-125 26 developink.com NS ns1.evilcode.net. 300 0 \N 105
-133 14 mail.kaneda.net CNAME mail.infernalhosting.net. 300 0 \N 113
-129 26 dev.developink.com CNAME developink.com. 300 0 \N 109
-89 14 kaneda.net SOA ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600 3600 \N \N \N
-132 14 stats.kaneda.net CNAME web01.infernalhosting.net. 300 0 \N 112
-134 14 ns.kaneda.net CNAME ns1.infernalhosting.net. 300 0 \N 114
-135 14 kaneda.net A 72.232.239.132 300 0 \N 115
-136 14 kaneda.net NS ns0.evilcode.net. 300 0 \N 116
-137 14 www.kaneda.net CNAME kaneda.net. 300 0 \N 117
-138 14 db.kaneda.net CNAME db01.infernalhosting.net. 300 0 \N 118
-139 14 xml.kaneda.net CNAME kaneda.net. 300 0 \N 119
-140 14 feed.kaneda.net CNAME kaneda.net. 300 0 \N 120
-141 25 infernalhosting.net MX mail.infernalhosting.net. 300 0 \N 121
-142 25 media.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 122
-143 25 rails01.infernalhosting.net A 72.232.239.132 300 0 \N 123
-144 25 web01.infernalhosting.net A 72.232.239.133 300 0 \N 124
-145 25 db01.infernalhosting.net A 10.0.3.1 300 0 \N 125
-146 25 mdb01.infernalhosting.net A 10.0.0.2 300 0 \N 126
-147 25 infernalhosting.net A 72.232.239.132 300 0 \N 127
-151 25 irc.infernalhosting.net CNAME irc.evilcode.net. 300 0 \N 131
-154 25 ns.infernalhosting.net CNAME ns1.infernalhosting.net. 300 0 \N 134
-157 25 old.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 137
-158 25 services.irc.infernalhosting.net A 70.168.96.168 300 0 \N 138
-159 25 sql.infernalhosting.net A 67.15.197.7 300 0 \N 139
-160 25 www.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 140
-161 25 dev.admin.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 141
-162 25 dev.infernalhosting.net CNAME rails01.infernalhosting.net. 300 0 \N 142
-163 25 cacti.infernalhosting.net CNAME web01.infernalhosting.net. 300 0 \N 143
-96 30 randallcreasey.com A 72.232.239.133 300 0 \N 76
-94 29 randallbattlesdirk.com SOA ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600 3600 \N \N \N
-102 29 randallbattlesdirk.com A 72.232.239.133 300 0 \N 82
-93 28 k-osh.com SOA ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600 3600 \N \N \N
-111 28 k-osh.com A 72.232.239.133 300 0 \N 91
-117 27 durandall.org A 72.232.239.133 300 0 \N 97
-92 27 durandall.org SOA ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600 3600 \N \N \N
-118 27 mysql.durandall.org A 72.232.239.133 300 0 \N 98
-124 26 mysql.developink.com A 72.232.239.133 300 0 \N 104
-91 26 developink.com SOA ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600 3600 \N \N \N
-126 26 developink.com A 72.232.239.133 300 0 \N 106
-150 25 webmail.infernalhosting.net A 72.232.239.133 300 0 \N 130
-153 25 mysql.infernalhosting.net A 72.232.239.133 300 0 \N 133
-152 25 mail.infernalhosting.net A 72.232.239.131 300 0 \N 132
-164 25 infernalhosting.net MX mail.infernalhosting.net. 300 0 \N 144
-170 25 infernalhosting.net A 72.232.239.132 300 0 \N 150
-155 25 ns1.infernalhosting.net A 72.232.228.26 300 0 \N 135
-148 25 infernalhosting.net NS ns0.infernalhosting.net 300 0 \N 128
-149 25 infernalhosting.net NS ns1.infernalhosting.net 300 0 \N 129
-193 13 flixnsvn.evilprojects.net A 72.232.239.132 300 \N \N 173
-194 13 hacks.evilprojects.net A 72.232.239.132 300 \N \N 174
-195 25 ns0.infernalhosting.net A 72.232.239.131 300 0 \N 175
-90 25 infernalhosting.net SOA ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600 3600 \N \N \N
-\.
-
-
-SET search_path = public, pg_catalog;
-
---
--- Data for Name: dns_resource_types; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_resource_types (id, name, description) FROM stdin;
-1 A
-2 AAAA
-3 CNAME
-4 HINFO
-5 MX
-6 NS
-7 PTR
-8 SRV
-9 TXT
-\.
-
-
---
--- Data for Name: dns_resources; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_resources (id, dns_zone_id, dns_resource_type_id, name, data, aux, ttl) FROM stdin;
-3 1 1 ns0 72.232.239.131 \N \N
-4 1 1 ns1 72.232.228.26 \N \N
-6 1 5 mail.evilcode.net 1 \N
-7 1 6 ns0.evilcode.net \N \N
-8 1 6 ns1.evilcode.net \N \N
-10 2 1 72.232.239.133 \N \N
-11 2 1 * 72.232.239.133 \N \N
-12 2 6 ns0.evilcode.net \N \N
-13 2 6 ns1.evilcode.net \N \N
-14 3 1 72.232.239.133 \N \N
-15 3 1 * 72.232.239.133 \N \N
-16 3 6 ns0.evilcode.net \N \N
-17 3 6 ns1.evilcode.net \N \N
-18 4 1 72.232.239.133 \N \N
-19 4 1 * 72.232.239.133 \N \N
-20 4 6 ns0.evilcode.net \N \N
-21 4 6 ns1.evilcode.net \N \N
-22 5 1 72.232.239.133 \N \N
-23 5 1 * 72.232.239.133 \N \N
-24 5 6 ns0.evilcode.net \N \N
-25 5 6 ns1.evilcode.net \N \N
-26 6 1 72.232.239.133 \N \N
-27 6 1 * 72.232.239.133 \N \N
-28 6 6 ns0.evilcode.net \N \N
-29 6 6 ns1.evilcode.net \N \N
-30 7 1 72.232.239.133 \N \N
-31 7 1 * 72.232.239.133 \N \N
-32 7 6 ns0.evilcode.net \N \N
-33 7 6 ns1.evilcode.net \N \N
-34 8 1 72.232.239.133 \N \N
-35 8 1 * 72.232.239.133 \N \N
-36 8 6 ns0.evilcode.net \N \N
-37 8 6 ns1.evilcode.net \N \N
-38 9 1 72.232.239.133 \N \N
-39 9 1 * 72.232.239.133 \N \N
-40 9 6 ns0.evilcode.net \N \N
-41 9 6 ns1.evilcode.net \N \N
-42 10 1 72.232.239.133 \N \N
-43 10 1 * 72.232.239.133 \N \N
-44 10 6 ns0.evilcode.net \N \N
-45 10 6 ns1.evilcode.net \N \N
-48 11 1 fms01 72.232.239.130 \N \N
-49 11 1 fms02 72.232.228.26 \N \N
-50 11 1 media 72.232.228.26 \N \N
-51 11 6 ns0.evilcode.net \N \N
-52 11 6 ns1.evilcode.net \N \N
-53 11 5 smtp15.msoutlookonline.net 1 \N
-54 12 1 72.232.239.133 \N \N
-55 12 1 * 72.232.239.133 \N \N
-58 11 1 mint 72.232.239.133 \N \N
-1 1 1 72.232.239.133 \N \N
-2 1 1 * 72.232.239.133 \N \N
-56 12 6 ns0.evilcode.net \N \N
-57 12 6 ns1.evilcode.net \N \N
-76 30 1 72.232.239.133 0 300
-82 29 1 72.232.239.133 0 300
-59 1 1 aurora 67.15.197.7 \N \N
-60 1 1 hawthorne 72.232.228.26 \N \N
-61 1 1 brio 209.40.201.62 \N \N
-62 1 1 catalyst 72.232.239.130 \N \N
-63 13 1 72.232.239.132 0 300
-64 13 1 * 72.232.239.132 0 300
-65 13 6 ns0.evilcode.net 0 300
-66 13 6 ns1.evilcode.net 0 300
-67 13 3 mail mail.evilcode.net 0 300
-68 13 5 mail.evilcode.net 0 300
-69 1 1 svn 72.232.239.130 \N \N
-70 13 1 www 72.232.239.133 0 300
-74 11 1 ecard 72.232.239.133 \N 300
-75 11 1 ecards 72.232.239.133 \N 300
-77 30 6 ns0.evilcode.net. 0 300
-78 30 6 ns1.evilcode.net. 0 300
-79 30 5 mail.infernalhosting.net. 0 300
-80 30 3 mail mail.infernalhosting.net. 0 300
-81 30 3 www randallcreasey.com. 0 300
-83 29 5 mail.randallbattlesdirk.com. 0 300
-46 11 1 72.232.239.133 \N 300
-47 11 1 * 72.232.239.133 \N 300
-84 29 3 www randallbattlesdirk.com. 0 300
-85 29 1 db 67.15.197.7 0 300
-71 11 1 admin 72.232.239.133 \N 300
-72 11 1 widgets 72.232.239.133 \N 300
-73 13 1 flixn 72.232.239.133 \N 300
-5 1 1 mail 72.232.239.131 \N \N
-86 29 3 mail mail.infernalhosting.net. 0 300
-87 28 6 ns0.evilcode.net. 0 300
-88 28 6 ns1.evilcode.net. 0 300
-89 28 5 mail.infernalhosting.net. 0 300
-90 28 3 mail mail.infernalhosting.net. 0 300
-92 28 3 www k-osh.com. 0 300
-93 27 5 mail.infernalhosting.net. 0 300
-94 27 3 mail mail.infernalhosting.net. 0 300
-95 27 3 www durandall.org. 0 300
-96 27 3 dev durandall.org. 0 300
-99 27 6 ns1.evilcode.net. 0 300
-100 27 6 ns0.evilcode.net. 0 300
-101 26 3 www developink.myshopify.com. 0 300
-91 28 1 72.232.239.133 0 300
-97 27 1 72.232.239.133 0 300
-98 27 1 mysql 72.232.239.133 0 300
-102 26 5 mail.infernalhosting.net. 0 300
-103 26 3 mail mail.infernalhosting.net. 0 300
-105 26 6 ns1.evilcode.net. 0 300
-107 26 6 ns0.evilcode.net. 0 300
-108 26 3 shop developink.myshopify.com. 0 300
-109 26 3 dev developink.com. 0 300
-110 26 1 sql 67.15.197.7 0 300
-111 14 5 mail.kaneda.net. 0 300
-112 14 3 stats web01.infernalhosting.net. 0 300
-113 14 3 mail mail.infernalhosting.net. 0 300
-114 14 3 ns ns1.infernalhosting.net. 0 300
-115 14 1 72.232.239.132 0 300
-116 14 6 ns0.evilcode.net. 0 300
-117 14 3 www kaneda.net. 0 300
-118 14 3 db db01.infernalhosting.net. 0 300
-119 14 3 xml kaneda.net. 0 300
-120 14 3 feed kaneda.net. 0 300
-121 25 5 mail.infernalhosting.net. 0 300
-122 25 3 media infernalhosting.net. 0 300
-123 25 1 rails01 72.232.239.132 0 300
-124 25 1 web01 72.232.239.133 0 300
-125 25 1 db01 10.0.3.1 0 300
-126 25 1 mdb01 10.0.0.2 0 300
-127 25 1 72.232.239.132 0 300
-131 25 3 irc irc.evilcode.net. 0 300
-134 25 3 ns ns1.infernalhosting.net. 0 300
-137 25 3 old infernalhosting.net. 0 300
-138 25 1 services.irc 70.168.96.168 0 300
-139 25 1 sql 67.15.197.7 0 300
-140 25 3 www infernalhosting.net. 0 300
-141 25 3 dev.admin infernalhosting.net. 0 300
-142 25 3 dev rails01.infernalhosting.net. 0 300
-143 25 3 cacti web01.infernalhosting.net. 0 300
-104 26 1 mysql 72.232.239.133 0 300
-106 26 1 72.232.239.133 0 300
-130 25 1 webmail 72.232.239.133 0 300
-133 25 1 mysql 72.232.239.133 0 300
-132 25 1 mail 72.232.239.131 0 300
-144 25 5 mail.infernalhosting.net. 0 300
-150 25 1 72.232.239.132 0 300
-173 13 1 flixnsvn 72.232.239.132 \N 300
-174 13 1 hacks 72.232.239.132 \N 300
-175 25 1 ns0 72.232.239.131 0 300
-135 25 1 ns1 72.232.228.26 0 300
-128 25 6 ns0.infernalhosting.net 0 300
-129 25 6 ns1.infernalhosting.net 0 300
-\.
-
-
---
--- Data for Name: dns_zones; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_zones (id, origin, ns, mbox, serial, refresh, retry, expire, ttl) FROM stdin;
-2 thesjg.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-3 thesjg.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-4 thesjg.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-12 ftmeaderemount.com ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600
-5 mindlessracing.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-6 mindlessracing.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-7 mindlessracing.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-8 bitbum.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-9 bitbum.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-10 bitbum.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-1 evilcode.net ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600
-13 evilprojects.net ns.evilcode.net dns.evilcode.net 13 300 300 1200 300
-11 flixn.com ns.evilcode.net dns.evilcode.net 39 300 300 1200 300
-30 randallcreasey.com ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600
-29 randallbattlesdirk.com ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600
-28 k-osh.com ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600
-25 infernalhosting.net ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600
-27 durandall.org ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-26 developink.com ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600
-14 kaneda.net ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-\.
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domains_name_key; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY domains
- ADD CONSTRAINT domains_name_key UNIQUE (name);
-
-
---
--- Name: domains_pkey; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY domains
- ADD CONSTRAINT domains_pkey PRIMARY KEY (id);
-
-
---
--- Name: records_pkey; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY records
- ADD CONSTRAINT records_pkey PRIMARY KEY (id);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_resource_types
- ADD CONSTRAINT dns_resource_types_pkey PRIMARY KEY (id);
-
-
---
--- Name: dns_resources_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_pkey PRIMARY KEY (id);
-
-
---
--- Name: dns_zones_origin_key; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_zones
- ADD CONSTRAINT dns_zones_origin_key UNIQUE (origin);
-
-
---
--- Name: dns_zones_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_zones
- ADD CONSTRAINT dns_zones_pkey PRIMARY KEY (id);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_domain_id_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_domain_id_index ON records USING btree (domain_id);
-
-
---
--- Name: records_name_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_name_index ON records USING btree (name);
-
-
---
--- Name: records_name_type_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_name_type_index ON records USING btree (name, type);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resources_increment_dns_zones_serial_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_resources_increment_dns_zones_serial_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_resources
- FOR EACH ROW
- EXECUTE PROCEDURE dns_resources_increment_dns_zones_serial_func();
-
-
---
--- Name: dns_resources_powerdns_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_resources_powerdns_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_resources
- FOR EACH ROW
- EXECUTE PROCEDURE dns_resources_powerdns_func();
-
-
---
--- Name: dns_zones_powerdns_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_zones_powerdns_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_zones
- FOR EACH ROW
- EXECUTE PROCEDURE dns_zones_powerdns_func();
-
-
---
--- Name: dns_zones_update_increment_serial_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_zones_update_increment_serial_trigger
- BEFORE UPDATE ON dns_zones
- FOR EACH ROW
- EXECUTE PROCEDURE dns_zones_update_increment_serial_func();
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_domain_id_fkey; Type: FK CONSTRAINT; Schema: powerdns; Owner: evilserve
---
-
-ALTER TABLE ONLY records
- ADD CONSTRAINT records_domain_id_fkey FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resources_dns_resource_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_dns_resource_type_id_fkey FOREIGN KEY (dns_resource_type_id) REFERENCES dns_resource_types(id);
-
-
---
--- Name: dns_resources_dns_zone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_dns_zone_id_fkey FOREIGN KEY (dns_zone_id) REFERENCES dns_zones(id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- Name: powerdns; Type: ACL; Schema: -; Owner: evilserve
---
-
-REVOKE ALL ON SCHEMA powerdns FROM PUBLIC;
-REVOKE ALL ON SCHEMA powerdns FROM evilserve;
-GRANT ALL ON SCHEMA powerdns TO evilserve;
-GRANT ALL ON SCHEMA powerdns TO powerdns;
-
-
---
--- Name: public; Type: ACL; Schema: -; Owner: pgsql
---
-
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
-REVOKE ALL ON SCHEMA public FROM pgsql;
-GRANT ALL ON SCHEMA public TO pgsql;
-GRANT ALL ON SCHEMA public TO PUBLIC;
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domains; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON TABLE domains FROM PUBLIC;
-REVOKE ALL ON TABLE domains FROM evilserve;
-GRANT ALL ON TABLE domains TO evilserve;
-GRANT ALL ON TABLE domains TO powerdns;
-
-
---
--- Name: records; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON TABLE records FROM PUBLIC;
-REVOKE ALL ON TABLE records FROM evilserve;
-GRANT ALL ON TABLE records TO evilserve;
-GRANT ALL ON TABLE records TO powerdns;
-
-
---
--- Name: records_id_seq; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON SEQUENCE records_id_seq FROM PUBLIC;
-REVOKE ALL ON SEQUENCE records_id_seq FROM evilserve;
-GRANT ALL ON SEQUENCE records_id_seq TO evilserve;
-GRANT ALL ON SEQUENCE records_id_seq TO powerdns;
-
-
---
--- PostgreSQL database dump complete
---
-
diff --git a/db/.svn/text-base/schema.rb.svn-base b/db/.svn/text-base/schema.rb.svn-base
deleted file mode 100644
index fe596de..0000000
--- a/db/.svn/text-base/schema.rb.svn-base
+++ /dev/null
@@ -1,59 +0,0 @@
-# This file is auto-generated from the current state of the database. Instead of editing this file,
-# please use the migrations feature of ActiveRecord to incrementally modify your database, and
-# then regenerate this schema definition.
-#
-# Note that this schema.rb definition is the authoritative source for your database schema. If you need
-# to create the application database on another system, you should be using db:schema:load, not running
-# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
-# you'll amass, the slower it'll run and the greater likelihood for issues).
-#
-# It's strongly recommended to check this file into your version control system.
-
-ActiveRecord::Schema.define(:version => 1) do
-
- create_table "accounts", :force => true do |t|
- t.string "first_name"
- t.string "last_name"
- t.string "email_address"
- t.string "phone_number", :limit => 15
- t.string "login"
- t.string "crypted_password", :limit => 40
- t.string "salt", :limit => 40
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "remember_token"
- t.datetime "remember_token_expires_at"
- t.string "activation_code", :limit => 40
- t.datetime "activated_at"
- t.string "state", :default => "passive"
- t.datetime "deleted_at"
- end
-
- create_table "dns_resource_types", :force => true do |t|
- t.string "type", :null => false
- t.text "description"
- end
-
- create_table "dns_resources", :force => true do |t|
- t.integer "dns_zone_id", :null => false
- t.integer "dns_resource_type_id", :null => false
- t.string "name", :limit => 64, :null => false
- t.string "data", :null => false
- t.integer "aux"
- t.integer "ttl"
- end
-
- create_table "dns_zones", :force => true do |t|
- t.string "origin", :null => false
- t.string "ns", :null => false
- t.string "mbox", :null => false
- t.integer "serial", :null => false
- t.integer "refresh", :default => 10800, :null => false
- t.integer "retry", :default => 3600, :null => false
- t.integer "expire", :default => 604800, :null => false
- t.integer "ttl", :default => 3600, :null => false
- end
-
- add_index "dns_zones", ["origin"], :name => "dns_zones_origin_key", :unique => true
-
-end
diff --git a/db/1-ddl_main.txt b/db/1-ddl_main.txt
deleted file mode 100644
index 20a9c2a..0000000
--- a/db/1-ddl_main.txt
+++ /dev/null
@@ -1,206 +0,0 @@
-CREATE TABLE dns_zones (
- id SERIAL8 PRIMARY KEY,
- origin VARCHAR(255) UNIQUE NOT NULL,
- ns VARCHAR(255) NOT NULL,
- mbox VARCHAR(255) NOT NULL,
- serial INT8 NOT NULL DEFAULT '1',
- refresh INT4 NOT NULL DEFAULT '10800', -- 3 hours
- retry INT4 NOT NULL DEFAULT '3600', -- 1 hour
- expire INT4 NOT NULL DEFAULT '604800', -- 1 week
- ttl INT4 NOT NULL DEFAULT '3600'); -- 1 hour
-
-CREATE TABLE dns_resource_types (
- id SERIAL8 PRIMARY KEY,
- name VARCHAR(255) NOT NULL,
- description TEXT
-);
-INSERT INTO dns_resource_types (name, description) VALUES ('A', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('AAAA', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('CNAME', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('HINFO', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('MX', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('NS', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('PTR', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('SRV', '');
-INSERT INTO dns_resource_types (name, description) VALUES ('TXT', '');
-
-CREATE TABLE dns_resources (
- id SERIAL8 PRIMARY KEY,
- dns_zone_id INT8 NOT NULL REFERENCES dns_zones ON DELETE CASCADE ON UPDATE CASCADE,
- dns_resource_type_id INT8 NOT NULL REFERENCES dns_resource_types,
- name VARCHAR(64) NOT NULL,
- data VARCHAR(255) NOT NULL,
- aux INT4 NULL DEFAULT NULL,
- ttl INT4 NULL DEFAULT NULL);
-
-COPY dns_zones (id, origin, ns, mbox, serial, refresh, retry, expire, ttl) FROM stdin;
-2 thesjg.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-3 thesjg.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-4 thesjg.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-12 ftmeaderemount.com ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600
-5 mindlessracing.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-6 mindlessracing.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-7 mindlessracing.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-8 bitbum.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-9 bitbum.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-10 bitbum.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-1 evilcode.net ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600
-13 evilprojects.net ns.evilcode.net dns.evilcode.net 13 300 300 1200 300
-11 flixn.com ns.evilcode.net dns.evilcode.net 39 300 300 1200 300
-30 randallcreasey.com ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600
-29 randallbattlesdirk.com ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600
-28 k-osh.com ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600
-25 infernalhosting.net ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600
-27 durandall.org ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-26 developink.com ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600
-14 kaneda.net ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-\.
-
-COPY dns_resources (id, dns_zone_id, dns_resource_type_id, name, data, aux, ttl) FROM stdin;
-3 1 1 ns0 72.232.239.131 \N \N
-4 1 1 ns1 72.232.228.26 \N \N
-6 1 5 mail.evilcode.net 1 \N
-7 1 6 ns0.evilcode.net \N \N
-8 1 6 ns1.evilcode.net \N \N
-10 2 1 72.232.239.133 \N \N
-11 2 1 * 72.232.239.133 \N \N
-12 2 6 ns0.evilcode.net \N \N
-13 2 6 ns1.evilcode.net \N \N
-14 3 1 72.232.239.133 \N \N
-15 3 1 * 72.232.239.133 \N \N
-16 3 6 ns0.evilcode.net \N \N
-17 3 6 ns1.evilcode.net \N \N
-18 4 1 72.232.239.133 \N \N
-19 4 1 * 72.232.239.133 \N \N
-20 4 6 ns0.evilcode.net \N \N
-21 4 6 ns1.evilcode.net \N \N
-22 5 1 72.232.239.133 \N \N
-23 5 1 * 72.232.239.133 \N \N
-24 5 6 ns0.evilcode.net \N \N
-25 5 6 ns1.evilcode.net \N \N
-26 6 1 72.232.239.133 \N \N
-27 6 1 * 72.232.239.133 \N \N
-28 6 6 ns0.evilcode.net \N \N
-29 6 6 ns1.evilcode.net \N \N
-30 7 1 72.232.239.133 \N \N
-31 7 1 * 72.232.239.133 \N \N
-32 7 6 ns0.evilcode.net \N \N
-33 7 6 ns1.evilcode.net \N \N
-34 8 1 72.232.239.133 \N \N
-35 8 1 * 72.232.239.133 \N \N
-36 8 6 ns0.evilcode.net \N \N
-37 8 6 ns1.evilcode.net \N \N
-38 9 1 72.232.239.133 \N \N
-39 9 1 * 72.232.239.133 \N \N
-40 9 6 ns0.evilcode.net \N \N
-41 9 6 ns1.evilcode.net \N \N
-42 10 1 72.232.239.133 \N \N
-43 10 1 * 72.232.239.133 \N \N
-44 10 6 ns0.evilcode.net \N \N
-45 10 6 ns1.evilcode.net \N \N
-48 11 1 fms01 72.232.239.130 \N \N
-49 11 1 fms02 72.232.228.26 \N \N
-50 11 1 media 72.232.228.26 \N \N
-51 11 6 ns0.evilcode.net \N \N
-52 11 6 ns1.evilcode.net \N \N
-53 11 5 smtp15.msoutlookonline.net 1 \N
-54 12 1 72.232.239.133 \N \N
-55 12 1 * 72.232.239.133 \N \N
-58 11 1 mint 72.232.239.133 \N \N
-1 1 1 72.232.239.133 \N \N
-2 1 1 * 72.232.239.133 \N \N
-56 12 6 ns0.evilcode.net \N \N
-57 12 6 ns1.evilcode.net \N \N
-76 30 1 72.232.239.133 0 300
-82 29 1 72.232.239.133 0 300
-59 1 1 aurora 67.15.197.7 \N \N
-60 1 1 hawthorne 72.232.228.26 \N \N
-61 1 1 brio 209.40.201.62 \N \N
-62 1 1 catalyst 72.232.239.130 \N \N
-63 13 1 72.232.239.132 0 300
-64 13 1 * 72.232.239.132 0 300
-65 13 6 ns0.evilcode.net 0 300
-66 13 6 ns1.evilcode.net 0 300
-67 13 3 mail mail.evilcode.net 0 300
-68 13 5 mail.evilcode.net 0 300
-69 1 1 svn 72.232.239.130 \N \N
-70 13 1 www 72.232.239.133 0 300
-74 11 1 ecard 72.232.239.133 \N 300
-75 11 1 ecards 72.232.239.133 \N 300
-77 30 6 ns0.evilcode.net. 0 300
-78 30 6 ns1.evilcode.net. 0 300
-79 30 5 mail.infernalhosting.net. 0 300
-80 30 3 mail mail.infernalhosting.net. 0 300
-81 30 3 www randallcreasey.com. 0 300
-83 29 5 mail.randallbattlesdirk.com. 0 300
-46 11 1 72.232.239.133 \N 300
-47 11 1 * 72.232.239.133 \N 300
-84 29 3 www randallbattlesdirk.com. 0 300
-85 29 1 db 67.15.197.7 0 300
-71 11 1 admin 72.232.239.133 \N 300
-72 11 1 widgets 72.232.239.133 \N 300
-73 13 1 flixn 72.232.239.133 \N 300
-5 1 1 mail 72.232.239.131 \N \N
-86 29 3 mail mail.infernalhosting.net. 0 300
-87 28 6 ns0.evilcode.net. 0 300
-88 28 6 ns1.evilcode.net. 0 300
-89 28 5 mail.infernalhosting.net. 0 300
-90 28 3 mail mail.infernalhosting.net. 0 300
-92 28 3 www k-osh.com. 0 300
-93 27 5 mail.infernalhosting.net. 0 300
-94 27 3 mail mail.infernalhosting.net. 0 300
-95 27 3 www durandall.org. 0 300
-96 27 3 dev durandall.org. 0 300
-99 27 6 ns1.evilcode.net. 0 300
-100 27 6 ns0.evilcode.net. 0 300
-101 26 3 www developink.myshopify.com. 0 300
-91 28 1 72.232.239.133 0 300
-97 27 1 72.232.239.133 0 300
-98 27 1 mysql 72.232.239.133 0 300
-102 26 5 mail.infernalhosting.net. 0 300
-103 26 3 mail mail.infernalhosting.net. 0 300
-105 26 6 ns1.evilcode.net. 0 300
-107 26 6 ns0.evilcode.net. 0 300
-108 26 3 shop developink.myshopify.com. 0 300
-109 26 3 dev developink.com. 0 300
-110 26 1 sql 67.15.197.7 0 300
-111 14 5 mail.kaneda.net. 0 300
-112 14 3 stats web01.infernalhosting.net. 0 300
-113 14 3 mail mail.infernalhosting.net. 0 300
-114 14 3 ns ns1.infernalhosting.net. 0 300
-115 14 1 72.232.239.132 0 300
-116 14 6 ns0.evilcode.net. 0 300
-117 14 3 www kaneda.net. 0 300
-118 14 3 db db01.infernalhosting.net. 0 300
-119 14 3 xml kaneda.net. 0 300
-120 14 3 feed kaneda.net. 0 300
-121 25 5 mail.infernalhosting.net. 0 300
-122 25 3 media infernalhosting.net. 0 300
-123 25 1 rails01 72.232.239.132 0 300
-124 25 1 web01 72.232.239.133 0 300
-125 25 1 db01 10.0.3.1 0 300
-126 25 1 mdb01 10.0.0.2 0 300
-127 25 1 72.232.239.132 0 300
-131 25 3 irc irc.evilcode.net. 0 300
-134 25 3 ns ns1.infernalhosting.net. 0 300
-137 25 3 old infernalhosting.net. 0 300
-138 25 1 services.irc 70.168.96.168 0 300
-139 25 1 sql 67.15.197.7 0 300
-140 25 3 www infernalhosting.net. 0 300
-141 25 3 dev.admin infernalhosting.net. 0 300
-142 25 3 dev rails01.infernalhosting.net. 0 300
-143 25 3 cacti web01.infernalhosting.net. 0 300
-104 26 1 mysql 72.232.239.133 0 300
-106 26 1 72.232.239.133 0 300
-130 25 1 webmail 72.232.239.133 0 300
-133 25 1 mysql 72.232.239.133 0 300
-132 25 1 mail 72.232.239.131 0 300
-144 25 5 mail.infernalhosting.net. 0 300
-150 25 1 72.232.239.132 0 300
-173 13 1 flixnsvn 72.232.239.132 \N 300
-174 13 1 hacks 72.232.239.132 \N 300
-175 25 1 ns0 72.232.239.131 0 300
-135 25 1 ns1 72.232.228.26 0 300
-128 25 6 ns0.infernalhosting.net 0 300
-129 25 6 ns1.infernalhosting.net 0 300
-\.
diff --git a/db/evilserve.tmp.sql b/db/evilserve.tmp.sql
deleted file mode 100644
index 4096730..0000000
--- a/db/evilserve.tmp.sql
+++ /dev/null
@@ -1,1087 +0,0 @@
---
--- PostgreSQL database dump
---
-
-SET client_encoding = 'UTF8';
-SET standard_conforming_strings = off;
-SET check_function_bodies = false;
-SET client_min_messages = warning;
-SET escape_string_warning = off;
-
---
--- Name: powerdns; Type: SCHEMA; Schema: -; Owner: evilserve
---
-
-CREATE SCHEMA powerdns;
-
-
-ALTER SCHEMA powerdns OWNER TO evilserve;
-
---
--- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: pgsql
---
-
-COMMENT ON SCHEMA public IS 'standard public schema';
-
-
---
--- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: pgsql
---
-
-CREATE PROCEDURAL LANGUAGE plpgsql;
-
-
-ALTER PROCEDURAL LANGUAGE plpgsql OWNER TO pgsql;
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domain_type; Type: TYPE; Schema: powerdns; Owner: evilserve
---
-
-CREATE TYPE domain_type AS ENUM (
- 'NATIVE',
- 'MASTER',
- 'SLAVE',
- 'SUPERSLAVE'
-);
-
-
-ALTER TYPE powerdns.domain_type OWNER TO evilserve;
-
-SET default_tablespace = '';
-
-SET default_with_oids = false;
-
---
--- Name: domains; Type: TABLE; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE domains (
- id bigint NOT NULL,
- name character varying(255) NOT NULL,
- master character varying(255) DEFAULT NULL::character varying,
- last_check integer,
- type domain_type NOT NULL,
- notified_serial integer,
- account character varying(40) DEFAULT NULL::character varying
-);
-
-
-ALTER TABLE powerdns.domains OWNER TO evilserve;
-
---
--- Name: record_type; Type: TYPE; Schema: powerdns; Owner: evilserve
---
-
-CREATE TYPE record_type AS ENUM (
- 'A',
- 'AAAA',
- 'AFSDB',
- 'CERT',
- 'CNAME',
- 'DNSKEY',
- 'DS',
- 'HINFO',
- 'KEY',
- 'LOC',
- 'MX',
- 'NAPTR',
- 'NS',
- 'NSEC',
- 'PTR',
- 'RP',
- 'RRSIG',
- 'SOA',
- 'SPF',
- 'SSHFP',
- 'SRV',
- 'TXT'
-);
-
-
-ALTER TYPE powerdns.record_type OWNER TO evilserve;
-
---
--- Name: records; Type: TABLE; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE records (
- id bigint NOT NULL,
- domain_id bigint NOT NULL,
- name character varying(255) NOT NULL,
- type record_type NOT NULL,
- content character varying(255) NOT NULL,
- ttl integer,
- prio integer,
- change_date integer,
- ref_id bigint
-);
-
-
-ALTER TABLE powerdns.records OWNER TO evilserve;
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_resource_types (
- id bigint NOT NULL,
- name character varying(255) NOT NULL,
- description text
-);
-
-
-ALTER TABLE public.dns_resource_types OWNER TO evilserve;
-
---
--- Name: dns_resources; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_resources (
- id bigint NOT NULL,
- dns_zone_id bigint NOT NULL,
- dns_resource_type_id bigint NOT NULL,
- name character varying(64) NOT NULL,
- data character varying(255) NOT NULL,
- aux integer,
- ttl integer
-);
-
-
-ALTER TABLE public.dns_resources OWNER TO evilserve;
-
---
--- Name: dns_zones; Type: TABLE; Schema: public; Owner: evilserve; Tablespace:
---
-
-CREATE TABLE dns_zones (
- id bigint NOT NULL,
- origin character varying(255) NOT NULL,
- ns character varying(255) NOT NULL,
- mbox character varying(255) NOT NULL,
- serial bigint DEFAULT 1::bigint NOT NULL,
- refresh integer DEFAULT 10800 NOT NULL,
- retry integer DEFAULT 3600 NOT NULL,
- expire integer DEFAULT 604800 NOT NULL,
- ttl integer DEFAULT 3600 NOT NULL
-);
-
-
-ALTER TABLE public.dns_zones OWNER TO evilserve;
-
---
--- Name: concat_hosts_func(text, text); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION concat_hosts_func(text, text) RETURNS text
- AS $_$
- DECLARE
- BEGIN
- IF ($1 = '' OR $1 IS NULL) THEN
- RETURN $2;
- END IF;
- RETURN ($1 || '.' || $2);
- END;
-$_$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.concat_hosts_func(text, text) OWNER TO evilserve;
-
---
--- Name: dns_resources_increment_dns_zones_serial_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_resources_increment_dns_zones_serial_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (TG_OP = 'INSERT' OR TG_OP = 'UPDATE') THEN
- UPDATE dns_zones SET serial=serial+1 WHERE id=NEW.dns_zone_id;
- RETURN NEW;
- ELSIF (TG_OP = 'DELETE') THEN
- UPDATE dns_zones SET serial=serial+1 WHERE id=OLD.dns_zone_id;
- RETURN OLD;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_resources_increment_dns_zones_serial_func() OWNER TO evilserve;
-
---
--- Name: dns_resources_powerdns_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_resources_powerdns_func() RETURNS trigger
- AS $$
- DECLARE
- origin_l VARCHAR(255);
--- PostgreSQL 8.3
- type_l powerdns.RECORD_TYPE;
--- PostgreSQL 8.2
--- type_l VARCHAR(5);
- ttl_l INT4;
- BEGIN
- IF (TG_OP = 'DELETE') THEN
- DELETE FROM powerdns.records WHERE ref_id=OLD.id;
- RETURN OLD;
- END IF;
-
- IF (NEW.ttl IS NULL) THEN
- SELECT ttl INTO ttl_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- ELSE
- ttl_l := NEW.ttl;
- END IF;
-
- IF (TG_OP = 'INSERT') THEN
- SELECT origin INTO origin_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- SELECT name INTO type_l FROM dns_resource_types WHERE id=NEW.dns_resource_type_id;
- INSERT INTO powerdns.records (domain_id, name, type, content, ttl, prio, ref_id) VALUES
- (NEW.dns_zone_id, concat_hosts_func(NEW.name, origin_l), type_l,
- NEW.data, ttl_l, NEW.aux, NEW.id);
- RETURN NEW;
- ELSIF (TG_OP = 'UPDATE') THEN
- SELECT origin INTO origin_l FROM dns_zones WHERE id=NEW.dns_zone_id;
- SELECT name INTO type_l FROM dns_resource_types WHERE id=NEW.dns_resource_type_id;
- UPDATE powerdns.records SET domain_id=NEW.dns_zone_id,
- name=concat_hosts_func(NEW.name, origin_l), type=type_l,
- content=NEW.data, ttl=ttl_l, prio=NEW.aux WHERE ref_id=NEW.id;
- RETURN NEW;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_resources_powerdns_func() OWNER TO evilserve;
-
---
--- Name: dns_zones_powerdns_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_zones_powerdns_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (TG_OP = 'INSERT') THEN
- INSERT INTO powerdns.domains (id, name, type) VALUES (NEW.id, NEW.origin, 'MASTER');
- INSERT INTO powerdns.records (domain_id, name, type, content, ttl) VALUES (NEW.id, NEW.origin, 'SOA',
- (NEW.ns || ' ' || NEW.mbox || ' ' || NEW.serial || ' ' || NEW.refresh || ' ' ||
- NEW.retry || ' ' || NEW.expire || ' ' || NEW.ttl), NEW.ttl);
- RETURN NEW;
- ELSIF (TG_OP = 'UPDATE') THEN
- IF (NEW.origin <> OLD.origin) THEN
- UPDATE powerdns.domains SET name=NEW.origin WHERE id=NEW.id;
- UPDATE powerdns.records SET name=NEW.origin WHERE domain_id=NEW.id AND type='SOA';
- END IF;
-
- IF (NEW.ns <> OLD.ns OR
- NEW.mbox <> OLD.mbox OR
- NEW.serial <> OLD.serial OR
- NEW.refresh <> OLD.refresh OR
- NEW.retry <> OLD.retry OR
- NEW.expire <> OLD.expire OR
- NEW.ttl <> OLD.ttl) THEN
- UPDATE powerdns.records SET content=(NEW.ns || ' ' ||
- NEW.mbox || ' ' || NEW.serial || ' ' || NEW.refresh || ' ' ||
- NEW.retry || ' ' || NEW.expire || ' ' || NEW.ttl),
- ttl=NEW.ttl
- WHERE domain_id=NEW.id AND type='SOA';
- END IF;
- RETURN NEW;
- ELSIF (TG_OP = 'DELETE') THEN
- DELETE FROM powerdns.domains WHERE id=OLD.id;
- RETURN OLD;
- END IF;
- RETURN NULL;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_zones_powerdns_func() OWNER TO evilserve;
-
---
--- Name: dns_zones_update_increment_serial_func(); Type: FUNCTION; Schema: public; Owner: evilserve
---
-
-CREATE FUNCTION dns_zones_update_increment_serial_func() RETURNS trigger
- AS $$
- DECLARE
- BEGIN
- IF (NEW.serial <= OLD.serial) THEN
- NEW.serial := OLD.serial + 1;
- END IF;
- RETURN NEW;
- END
-$$
- LANGUAGE plpgsql;
-
-
-ALTER FUNCTION public.dns_zones_update_increment_serial_func() OWNER TO evilserve;
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_id_seq; Type: SEQUENCE; Schema: powerdns; Owner: evilserve
---
-
-CREATE SEQUENCE records_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE powerdns.records_id_seq OWNER TO evilserve;
-
---
--- Name: records_id_seq; Type: SEQUENCE OWNED BY; Schema: powerdns; Owner: evilserve
---
-
-ALTER SEQUENCE records_id_seq OWNED BY records.id;
-
-
---
--- Name: records_id_seq; Type: SEQUENCE SET; Schema: powerdns; Owner: evilserve
---
-
-SELECT pg_catalog.setval('records_id_seq', 195, true);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_resource_types_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_resource_types_id_seq OWNER TO evilserve;
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_resource_types_id_seq OWNED BY dns_resource_types.id;
-
-
---
--- Name: dns_resource_types_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_resource_types_id_seq', 9, true);
-
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_resources_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_resources_id_seq OWNER TO evilserve;
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_resources_id_seq OWNED BY dns_resources.id;
-
-
---
--- Name: dns_resources_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_resources_id_seq', 175, true);
-
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE; Schema: public; Owner: evilserve
---
-
-CREATE SEQUENCE dns_zones_id_seq
- INCREMENT BY 1
- NO MAXVALUE
- NO MINVALUE
- CACHE 1;
-
-
-ALTER TABLE public.dns_zones_id_seq OWNER TO evilserve;
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: evilserve
---
-
-ALTER SEQUENCE dns_zones_id_seq OWNED BY dns_zones.id;
-
-
---
--- Name: dns_zones_id_seq; Type: SEQUENCE SET; Schema: public; Owner: evilserve
---
-
-SELECT pg_catalog.setval('dns_zones_id_seq', 39, true);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: id; Type: DEFAULT; Schema: powerdns; Owner: evilserve
---
-
-ALTER TABLE records ALTER COLUMN id SET DEFAULT nextval('records_id_seq'::regclass);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_resource_types ALTER COLUMN id SET DEFAULT nextval('dns_resource_types_id_seq'::regclass);
-
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_resources ALTER COLUMN id SET DEFAULT nextval('dns_resources_id_seq'::regclass);
-
-
---
--- Name: id; Type: DEFAULT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE dns_zones ALTER COLUMN id SET DEFAULT nextval('dns_zones_id_seq'::regclass);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Data for Name: domains; Type: TABLE DATA; Schema: powerdns; Owner: evilserve
---
-
-COPY domains (id, name, master, last_check, type, notified_serial, account) FROM stdin;
-2 thesjg.com \N \N MASTER 6 \N
-3 thesjg.net \N \N MASTER 6 \N
-4 thesjg.org \N \N MASTER 6 \N
-5 mindlessracing.com \N \N MASTER 6 \N
-6 mindlessracing.net \N \N MASTER 6 \N
-7 mindlessracing.org \N \N MASTER 6 \N
-8 bitbum.com \N \N MASTER 6 \N
-9 bitbum.net \N \N MASTER 6 \N
-10 bitbum.org \N \N MASTER 6 \N
-12 ftmeaderemount.com \N \N MASTER 7 \N
-1 evilcode.net \N \N MASTER 23 \N
-11 flixn.com \N \N MASTER 39 \N
-14 kaneda.net \N \N MASTER 11 \N
-27 durandall.org \N \N MASTER 11 \N
-28 k-osh.com \N \N MASTER 8 \N
-29 randallbattlesdirk.com \N \N MASTER 7 \N
-26 developink.com \N \N MASTER 13 \N
-13 evilprojects.net \N \N MASTER 13 \N
-30 randallcreasey.com \N \N MASTER 21 \N
-25 infernalhosting.net \N \N MASTER 78 \N
-\.
-
-
---
--- Data for Name: records; Type: TABLE DATA; Schema: powerdns; Owner: evilserve
---
-
-COPY records (id, domain_id, name, type, content, ttl, prio, change_date, ref_id) FROM stdin;
-37 7 mindlessracing.org A 72.232.239.133 3600 \N \N 30
-54 10 bitbum.org NS ns0.evilcode.net 3600 \N \N 44
-4 1 ns0.evilcode.net A 72.232.239.131 3600 \N \N 3
-38 7 *.mindlessracing.org A 72.232.239.133 3600 \N \N 31
-5 1 ns1.evilcode.net A 72.232.228.26 3600 \N \N 4
-75 13 evilprojects.net SOA ns.evilcode.net dns.evilcode.net 13 300 300 1200 300 300 \N \N \N
-39 7 mindlessracing.org NS ns0.evilcode.net 3600 \N \N 32
-7 1 evilcode.net MX mail.evilcode.net 3600 1 \N 6
-8 1 evilcode.net NS ns0.evilcode.net 3600 \N \N 7
-40 7 mindlessracing.org NS ns1.evilcode.net 3600 \N \N 33
-9 1 evilcode.net NS ns1.evilcode.net 3600 \N \N 8
-12 2 thesjg.com A 72.232.239.133 3600 \N \N 10
-55 10 bitbum.org NS ns1.evilcode.net 3600 \N \N 45
-13 2 *.thesjg.com A 72.232.239.133 3600 \N \N 11
-42 8 bitbum.com A 72.232.239.133 3600 \N \N 34
-14 2 thesjg.com NS ns0.evilcode.net 3600 \N \N 12
-15 2 thesjg.com NS ns1.evilcode.net 3600 \N \N 13
-17 3 thesjg.net A 72.232.239.133 3600 \N \N 14
-43 8 *.bitbum.com A 72.232.239.133 3600 \N \N 35
-18 3 *.thesjg.net A 72.232.239.133 3600 \N \N 15
-63 11 flixn.com NS ns1.evilcode.net 3600 \N \N 52
-19 3 thesjg.net NS ns0.evilcode.net 3600 \N \N 16
-20 3 thesjg.net NS ns1.evilcode.net 3600 \N \N 17
-44 8 bitbum.com NS ns0.evilcode.net 3600 \N \N 36
-22 4 thesjg.org A 72.232.239.133 3600 \N \N 18
-23 4 *.thesjg.org A 72.232.239.133 3600 \N \N 19
-45 8 bitbum.com NS ns1.evilcode.net 3600 \N \N 37
-24 4 thesjg.org NS ns0.evilcode.net 3600 \N \N 20
-25 4 thesjg.org NS ns1.evilcode.net 3600 \N \N 21
-27 5 mindlessracing.com A 72.232.239.133 3600 \N \N 22
-28 5 *.mindlessracing.com A 72.232.239.133 3600 \N \N 23
-47 9 bitbum.net A 72.232.239.133 3600 \N \N 38
-29 5 mindlessracing.com NS ns0.evilcode.net 3600 \N \N 24
-30 5 mindlessracing.com NS ns1.evilcode.net 3600 \N \N 25
-11 2 thesjg.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-32 6 mindlessracing.net A 72.232.239.133 3600 \N \N 26
-48 9 *.bitbum.net A 72.232.239.133 3600 \N \N 39
-33 6 *.mindlessracing.net A 72.232.239.133 3600 \N \N 27
-34 6 mindlessracing.net NS ns0.evilcode.net 3600 \N \N 28
-68 12 ftmeaderemount.com NS ns0.evilcode.net 3600 \N \N 56
-35 6 mindlessracing.net NS ns1.evilcode.net 3600 \N \N 29
-49 9 bitbum.net NS ns0.evilcode.net 3600 \N \N 40
-50 9 bitbum.net NS ns1.evilcode.net 3600 \N \N 41
-64 11 flixn.com MX smtp15.msoutlookonline.net 3600 1 \N 53
-52 10 bitbum.org A 72.232.239.133 3600 \N \N 42
-53 10 *.bitbum.org A 72.232.239.133 3600 \N \N 43
-59 11 fms01.flixn.com A 72.232.239.130 3600 \N \N 48
-16 3 thesjg.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-60 11 fms02.flixn.com A 72.232.228.26 3600 \N \N 49
-58 11 *.flixn.com A 72.232.239.133 300 \N \N 47
-61 11 media.flixn.com A 72.232.228.26 3600 \N \N 50
-69 12 ftmeaderemount.com NS ns1.evilcode.net 3600 \N \N 57
-62 11 flixn.com NS ns0.evilcode.net 3600 \N \N 51
-21 4 thesjg.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-26 5 mindlessracing.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-31 6 mindlessracing.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-36 7 mindlessracing.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-41 8 bitbum.com SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-46 9 bitbum.net SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-51 10 bitbum.org SOA ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600 3600 \N \N \N
-71 1 aurora.evilcode.net A 67.15.197.7 3600 \N \N 59
-72 1 hawthorne.evilcode.net A 72.232.228.26 3600 \N \N 60
-73 1 brio.evilcode.net A 209.40.201.62 3600 \N \N 61
-74 1 catalyst.evilcode.net A 72.232.239.130 3600 \N \N 62
-66 12 ftmeaderemount.com A 72.232.239.133 3600 \N \N 54
-76 13 evilprojects.net A 72.232.239.132 300 0 \N 63
-6 1 mail.evilcode.net A 72.232.239.131 3600 \N \N 5
-77 13 *.evilprojects.net A 72.232.239.132 300 0 \N 64
-78 13 evilprojects.net NS ns0.evilcode.net 300 0 \N 65
-79 13 evilprojects.net NS ns1.evilcode.net 300 0 \N 66
-80 13 mail.evilprojects.net CNAME mail.evilcode.net 300 0 \N 67
-81 13 evilprojects.net MX mail.evilcode.net 300 0 \N 68
-82 1 svn.evilcode.net A 72.232.239.130 3600 \N \N 69
-83 13 www.evilprojects.net A 72.232.239.133 300 0 \N 70
-95 30 randallcreasey.com SOA ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600 3600 \N \N \N
-107 28 k-osh.com NS ns0.evilcode.net. 300 0 \N 87
-119 27 durandall.org NS ns1.evilcode.net. 300 0 \N 99
-108 28 k-osh.com NS ns1.evilcode.net. 300 0 \N 88
-57 11 flixn.com A 72.232.239.133 300 \N \N 46
-109 28 k-osh.com MX mail.infernalhosting.net. 300 0 \N 89
-120 27 durandall.org NS ns0.evilcode.net. 300 0 \N 100
-84 11 admin.flixn.com A 72.232.239.133 300 \N \N 71
-85 11 widgets.flixn.com A 72.232.239.133 300 \N \N 72
-86 13 flixn.evilprojects.net A 72.232.239.133 300 \N \N 73
-65 12 ftmeaderemount.com SOA ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600 3600 \N \N \N
-67 12 *.ftmeaderemount.com A 72.232.239.133 3600 \N \N 55
-70 11 mint.flixn.com A 72.232.239.133 300 \N \N 58
-2 1 evilcode.net A 72.232.239.133 3600 \N \N 1
-1 1 evilcode.net SOA ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600 3600 \N \N \N
-3 1 *.evilcode.net A 72.232.239.133 3600 \N \N 2
-110 28 mail.k-osh.com CNAME mail.infernalhosting.net. 300 0 \N 90
-87 11 ecard.flixn.com A 72.232.239.133 300 \N \N 74
-56 11 flixn.com SOA ns.evilcode.net dns.evilcode.net 39 300 300 1200 300 300 \N \N \N
-88 11 ecards.flixn.com A 72.232.239.133 300 \N \N 75
-97 30 randallcreasey.com NS ns0.evilcode.net. 300 0 \N 77
-98 30 randallcreasey.com NS ns1.evilcode.net. 300 0 \N 78
-112 28 www.k-osh.com CNAME k-osh.com. 300 0 \N 92
-99 30 randallcreasey.com MX mail.infernalhosting.net. 300 0 \N 79
-121 26 www.developink.com CNAME developink.myshopify.com. 300 0 \N 101
-100 30 mail.randallcreasey.com CNAME mail.infernalhosting.net. 300 0 \N 80
-101 30 www.randallcreasey.com CNAME randallcreasey.com. 300 0 \N 81
-113 27 durandall.org MX mail.infernalhosting.net. 300 0 \N 93
-130 26 sql.developink.com A 67.15.197.7 300 0 \N 110
-103 29 randallbattlesdirk.com MX mail.randallbattlesdirk.com. 300 0 \N 83
-114 27 mail.durandall.org CNAME mail.infernalhosting.net. 300 0 \N 94
-104 29 www.randallbattlesdirk.com CNAME randallbattlesdirk.com. 300 0 \N 84
-122 26 developink.com MX mail.infernalhosting.net. 300 0 \N 102
-105 29 db.randallbattlesdirk.com A 67.15.197.7 300 0 \N 85
-106 29 mail.randallbattlesdirk.com CNAME mail.infernalhosting.net. 300 0 \N 86
-115 27 www.durandall.org CNAME durandall.org. 300 0 \N 95
-127 26 developink.com NS ns0.evilcode.net. 300 0 \N 107
-116 27 dev.durandall.org CNAME durandall.org. 300 0 \N 96
-123 26 mail.developink.com CNAME mail.infernalhosting.net. 300 0 \N 103
-128 26 shop.developink.com CNAME developink.myshopify.com. 300 0 \N 108
-131 14 kaneda.net MX mail.kaneda.net. 300 0 \N 111
-125 26 developink.com NS ns1.evilcode.net. 300 0 \N 105
-133 14 mail.kaneda.net CNAME mail.infernalhosting.net. 300 0 \N 113
-129 26 dev.developink.com CNAME developink.com. 300 0 \N 109
-89 14 kaneda.net SOA ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600 3600 \N \N \N
-132 14 stats.kaneda.net CNAME web01.infernalhosting.net. 300 0 \N 112
-134 14 ns.kaneda.net CNAME ns1.infernalhosting.net. 300 0 \N 114
-135 14 kaneda.net A 72.232.239.132 300 0 \N 115
-136 14 kaneda.net NS ns0.evilcode.net. 300 0 \N 116
-137 14 www.kaneda.net CNAME kaneda.net. 300 0 \N 117
-138 14 db.kaneda.net CNAME db01.infernalhosting.net. 300 0 \N 118
-139 14 xml.kaneda.net CNAME kaneda.net. 300 0 \N 119
-140 14 feed.kaneda.net CNAME kaneda.net. 300 0 \N 120
-141 25 infernalhosting.net MX mail.infernalhosting.net. 300 0 \N 121
-142 25 media.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 122
-143 25 rails01.infernalhosting.net A 72.232.239.132 300 0 \N 123
-144 25 web01.infernalhosting.net A 72.232.239.133 300 0 \N 124
-145 25 db01.infernalhosting.net A 10.0.3.1 300 0 \N 125
-146 25 mdb01.infernalhosting.net A 10.0.0.2 300 0 \N 126
-147 25 infernalhosting.net A 72.232.239.132 300 0 \N 127
-151 25 irc.infernalhosting.net CNAME irc.evilcode.net. 300 0 \N 131
-154 25 ns.infernalhosting.net CNAME ns1.infernalhosting.net. 300 0 \N 134
-157 25 old.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 137
-158 25 services.irc.infernalhosting.net A 70.168.96.168 300 0 \N 138
-159 25 sql.infernalhosting.net A 67.15.197.7 300 0 \N 139
-160 25 www.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 140
-161 25 dev.admin.infernalhosting.net CNAME infernalhosting.net. 300 0 \N 141
-162 25 dev.infernalhosting.net CNAME rails01.infernalhosting.net. 300 0 \N 142
-163 25 cacti.infernalhosting.net CNAME web01.infernalhosting.net. 300 0 \N 143
-96 30 randallcreasey.com A 72.232.239.133 300 0 \N 76
-94 29 randallbattlesdirk.com SOA ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600 3600 \N \N \N
-102 29 randallbattlesdirk.com A 72.232.239.133 300 0 \N 82
-93 28 k-osh.com SOA ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600 3600 \N \N \N
-111 28 k-osh.com A 72.232.239.133 300 0 \N 91
-117 27 durandall.org A 72.232.239.133 300 0 \N 97
-92 27 durandall.org SOA ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600 3600 \N \N \N
-118 27 mysql.durandall.org A 72.232.239.133 300 0 \N 98
-124 26 mysql.developink.com A 72.232.239.133 300 0 \N 104
-91 26 developink.com SOA ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600 3600 \N \N \N
-126 26 developink.com A 72.232.239.133 300 0 \N 106
-150 25 webmail.infernalhosting.net A 72.232.239.133 300 0 \N 130
-153 25 mysql.infernalhosting.net A 72.232.239.133 300 0 \N 133
-152 25 mail.infernalhosting.net A 72.232.239.131 300 0 \N 132
-164 25 infernalhosting.net MX mail.infernalhosting.net. 300 0 \N 144
-170 25 infernalhosting.net A 72.232.239.132 300 0 \N 150
-155 25 ns1.infernalhosting.net A 72.232.228.26 300 0 \N 135
-148 25 infernalhosting.net NS ns0.infernalhosting.net 300 0 \N 128
-149 25 infernalhosting.net NS ns1.infernalhosting.net 300 0 \N 129
-193 13 flixnsvn.evilprojects.net A 72.232.239.132 300 \N \N 173
-194 13 hacks.evilprojects.net A 72.232.239.132 300 \N \N 174
-195 25 ns0.infernalhosting.net A 72.232.239.131 300 0 \N 175
-90 25 infernalhosting.net SOA ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600 3600 \N \N \N
-\.
-
-
-SET search_path = public, pg_catalog;
-
---
--- Data for Name: dns_resource_types; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_resource_types (id, name, description) FROM stdin;
-1 A
-2 AAAA
-3 CNAME
-4 HINFO
-5 MX
-6 NS
-7 PTR
-8 SRV
-9 TXT
-\.
-
-
---
--- Data for Name: dns_resources; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_resources (id, dns_zone_id, dns_resource_type_id, name, data, aux, ttl) FROM stdin;
-3 1 1 ns0 72.232.239.131 \N \N
-4 1 1 ns1 72.232.228.26 \N \N
-6 1 5 mail.evilcode.net 1 \N
-7 1 6 ns0.evilcode.net \N \N
-8 1 6 ns1.evilcode.net \N \N
-10 2 1 72.232.239.133 \N \N
-11 2 1 * 72.232.239.133 \N \N
-12 2 6 ns0.evilcode.net \N \N
-13 2 6 ns1.evilcode.net \N \N
-14 3 1 72.232.239.133 \N \N
-15 3 1 * 72.232.239.133 \N \N
-16 3 6 ns0.evilcode.net \N \N
-17 3 6 ns1.evilcode.net \N \N
-18 4 1 72.232.239.133 \N \N
-19 4 1 * 72.232.239.133 \N \N
-20 4 6 ns0.evilcode.net \N \N
-21 4 6 ns1.evilcode.net \N \N
-22 5 1 72.232.239.133 \N \N
-23 5 1 * 72.232.239.133 \N \N
-24 5 6 ns0.evilcode.net \N \N
-25 5 6 ns1.evilcode.net \N \N
-26 6 1 72.232.239.133 \N \N
-27 6 1 * 72.232.239.133 \N \N
-28 6 6 ns0.evilcode.net \N \N
-29 6 6 ns1.evilcode.net \N \N
-30 7 1 72.232.239.133 \N \N
-31 7 1 * 72.232.239.133 \N \N
-32 7 6 ns0.evilcode.net \N \N
-33 7 6 ns1.evilcode.net \N \N
-34 8 1 72.232.239.133 \N \N
-35 8 1 * 72.232.239.133 \N \N
-36 8 6 ns0.evilcode.net \N \N
-37 8 6 ns1.evilcode.net \N \N
-38 9 1 72.232.239.133 \N \N
-39 9 1 * 72.232.239.133 \N \N
-40 9 6 ns0.evilcode.net \N \N
-41 9 6 ns1.evilcode.net \N \N
-42 10 1 72.232.239.133 \N \N
-43 10 1 * 72.232.239.133 \N \N
-44 10 6 ns0.evilcode.net \N \N
-45 10 6 ns1.evilcode.net \N \N
-48 11 1 fms01 72.232.239.130 \N \N
-49 11 1 fms02 72.232.228.26 \N \N
-50 11 1 media 72.232.228.26 \N \N
-51 11 6 ns0.evilcode.net \N \N
-52 11 6 ns1.evilcode.net \N \N
-53 11 5 smtp15.msoutlookonline.net 1 \N
-54 12 1 72.232.239.133 \N \N
-55 12 1 * 72.232.239.133 \N \N
-58 11 1 mint 72.232.239.133 \N \N
-1 1 1 72.232.239.133 \N \N
-2 1 1 * 72.232.239.133 \N \N
-56 12 6 ns0.evilcode.net \N \N
-57 12 6 ns1.evilcode.net \N \N
-76 30 1 72.232.239.133 0 300
-82 29 1 72.232.239.133 0 300
-59 1 1 aurora 67.15.197.7 \N \N
-60 1 1 hawthorne 72.232.228.26 \N \N
-61 1 1 brio 209.40.201.62 \N \N
-62 1 1 catalyst 72.232.239.130 \N \N
-63 13 1 72.232.239.132 0 300
-64 13 1 * 72.232.239.132 0 300
-65 13 6 ns0.evilcode.net 0 300
-66 13 6 ns1.evilcode.net 0 300
-67 13 3 mail mail.evilcode.net 0 300
-68 13 5 mail.evilcode.net 0 300
-69 1 1 svn 72.232.239.130 \N \N
-70 13 1 www 72.232.239.133 0 300
-74 11 1 ecard 72.232.239.133 \N 300
-75 11 1 ecards 72.232.239.133 \N 300
-77 30 6 ns0.evilcode.net. 0 300
-78 30 6 ns1.evilcode.net. 0 300
-79 30 5 mail.infernalhosting.net. 0 300
-80 30 3 mail mail.infernalhosting.net. 0 300
-81 30 3 www randallcreasey.com. 0 300
-83 29 5 mail.randallbattlesdirk.com. 0 300
-46 11 1 72.232.239.133 \N 300
-47 11 1 * 72.232.239.133 \N 300
-84 29 3 www randallbattlesdirk.com. 0 300
-85 29 1 db 67.15.197.7 0 300
-71 11 1 admin 72.232.239.133 \N 300
-72 11 1 widgets 72.232.239.133 \N 300
-73 13 1 flixn 72.232.239.133 \N 300
-5 1 1 mail 72.232.239.131 \N \N
-86 29 3 mail mail.infernalhosting.net. 0 300
-87 28 6 ns0.evilcode.net. 0 300
-88 28 6 ns1.evilcode.net. 0 300
-89 28 5 mail.infernalhosting.net. 0 300
-90 28 3 mail mail.infernalhosting.net. 0 300
-92 28 3 www k-osh.com. 0 300
-93 27 5 mail.infernalhosting.net. 0 300
-94 27 3 mail mail.infernalhosting.net. 0 300
-95 27 3 www durandall.org. 0 300
-96 27 3 dev durandall.org. 0 300
-99 27 6 ns1.evilcode.net. 0 300
-100 27 6 ns0.evilcode.net. 0 300
-101 26 3 www developink.myshopify.com. 0 300
-91 28 1 72.232.239.133 0 300
-97 27 1 72.232.239.133 0 300
-98 27 1 mysql 72.232.239.133 0 300
-102 26 5 mail.infernalhosting.net. 0 300
-103 26 3 mail mail.infernalhosting.net. 0 300
-105 26 6 ns1.evilcode.net. 0 300
-107 26 6 ns0.evilcode.net. 0 300
-108 26 3 shop developink.myshopify.com. 0 300
-109 26 3 dev developink.com. 0 300
-110 26 1 sql 67.15.197.7 0 300
-111 14 5 mail.kaneda.net. 0 300
-112 14 3 stats web01.infernalhosting.net. 0 300
-113 14 3 mail mail.infernalhosting.net. 0 300
-114 14 3 ns ns1.infernalhosting.net. 0 300
-115 14 1 72.232.239.132 0 300
-116 14 6 ns0.evilcode.net. 0 300
-117 14 3 www kaneda.net. 0 300
-118 14 3 db db01.infernalhosting.net. 0 300
-119 14 3 xml kaneda.net. 0 300
-120 14 3 feed kaneda.net. 0 300
-121 25 5 mail.infernalhosting.net. 0 300
-122 25 3 media infernalhosting.net. 0 300
-123 25 1 rails01 72.232.239.132 0 300
-124 25 1 web01 72.232.239.133 0 300
-125 25 1 db01 10.0.3.1 0 300
-126 25 1 mdb01 10.0.0.2 0 300
-127 25 1 72.232.239.132 0 300
-131 25 3 irc irc.evilcode.net. 0 300
-134 25 3 ns ns1.infernalhosting.net. 0 300
-137 25 3 old infernalhosting.net. 0 300
-138 25 1 services.irc 70.168.96.168 0 300
-139 25 1 sql 67.15.197.7 0 300
-140 25 3 www infernalhosting.net. 0 300
-141 25 3 dev.admin infernalhosting.net. 0 300
-142 25 3 dev rails01.infernalhosting.net. 0 300
-143 25 3 cacti web01.infernalhosting.net. 0 300
-104 26 1 mysql 72.232.239.133 0 300
-106 26 1 72.232.239.133 0 300
-130 25 1 webmail 72.232.239.133 0 300
-133 25 1 mysql 72.232.239.133 0 300
-132 25 1 mail 72.232.239.131 0 300
-144 25 5 mail.infernalhosting.net. 0 300
-150 25 1 72.232.239.132 0 300
-173 13 1 flixnsvn 72.232.239.132 \N 300
-174 13 1 hacks 72.232.239.132 \N 300
-175 25 1 ns0 72.232.239.131 0 300
-135 25 1 ns1 72.232.228.26 0 300
-128 25 6 ns0.infernalhosting.net 0 300
-129 25 6 ns1.infernalhosting.net 0 300
-\.
-
-
---
--- Data for Name: dns_zones; Type: TABLE DATA; Schema: public; Owner: evilserve
---
-
-COPY dns_zones (id, origin, ns, mbox, serial, refresh, retry, expire, ttl) FROM stdin;
-2 thesjg.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-3 thesjg.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-4 thesjg.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-12 ftmeaderemount.com ns.evilcode.net dns.evilcode.net 7 10800 3600 604800 3600
-5 mindlessracing.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-6 mindlessracing.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-7 mindlessracing.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-8 bitbum.com ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-9 bitbum.net ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-10 bitbum.org ns.evilcode.net dns.evilcode.net 6 10800 3600 604800 3600
-1 evilcode.net ns.evilcode.net dns.evilcode.net 23 10800 3600 604800 3600
-13 evilprojects.net ns.evilcode.net dns.evilcode.net 13 300 300 1200 300
-11 flixn.com ns.evilcode.net dns.evilcode.net 39 300 300 1200 300
-30 randallcreasey.com ns1.infernalhosting.net dns.infernalhosting.net 21 10800 3600 604800 3600
-29 randallbattlesdirk.com ns1.infernalhosting.net dns.infernalhosting.net 7 10800 3600 604800 3600
-28 k-osh.com ns1.infernalhosting.net dns.infernalhosting.net 8 10800 3600 604800 3600
-25 infernalhosting.net ns1.infernalhosting.net dns.infernalhosting.net 78 10800 3600 604800 3600
-27 durandall.org ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-26 developink.com ns1.infernalhosting.net dns.infernalhosting.net 13 10800 3600 604800 3600
-14 kaneda.net ns1.infernalhosting.net dns.infernalhosting.net 11 10800 3600 604800 3600
-\.
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domains_name_key; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY domains
- ADD CONSTRAINT domains_name_key UNIQUE (name);
-
-
---
--- Name: domains_pkey; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY domains
- ADD CONSTRAINT domains_pkey PRIMARY KEY (id);
-
-
---
--- Name: records_pkey; Type: CONSTRAINT; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY records
- ADD CONSTRAINT records_pkey PRIMARY KEY (id);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resource_types_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_resource_types
- ADD CONSTRAINT dns_resource_types_pkey PRIMARY KEY (id);
-
-
---
--- Name: dns_resources_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_pkey PRIMARY KEY (id);
-
-
---
--- Name: dns_zones_origin_key; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_zones
- ADD CONSTRAINT dns_zones_origin_key UNIQUE (origin);
-
-
---
--- Name: dns_zones_pkey; Type: CONSTRAINT; Schema: public; Owner: evilserve; Tablespace:
---
-
-ALTER TABLE ONLY dns_zones
- ADD CONSTRAINT dns_zones_pkey PRIMARY KEY (id);
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_domain_id_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_domain_id_index ON records USING btree (domain_id);
-
-
---
--- Name: records_name_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_name_index ON records USING btree (name);
-
-
---
--- Name: records_name_type_index; Type: INDEX; Schema: powerdns; Owner: evilserve; Tablespace:
---
-
-CREATE INDEX records_name_type_index ON records USING btree (name, type);
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resources_increment_dns_zones_serial_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_resources_increment_dns_zones_serial_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_resources
- FOR EACH ROW
- EXECUTE PROCEDURE dns_resources_increment_dns_zones_serial_func();
-
-
---
--- Name: dns_resources_powerdns_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_resources_powerdns_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_resources
- FOR EACH ROW
- EXECUTE PROCEDURE dns_resources_powerdns_func();
-
-
---
--- Name: dns_zones_powerdns_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_zones_powerdns_trigger
- AFTER INSERT OR DELETE OR UPDATE ON dns_zones
- FOR EACH ROW
- EXECUTE PROCEDURE dns_zones_powerdns_func();
-
-
---
--- Name: dns_zones_update_increment_serial_trigger; Type: TRIGGER; Schema: public; Owner: evilserve
---
-
-CREATE TRIGGER dns_zones_update_increment_serial_trigger
- BEFORE UPDATE ON dns_zones
- FOR EACH ROW
- EXECUTE PROCEDURE dns_zones_update_increment_serial_func();
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: records_domain_id_fkey; Type: FK CONSTRAINT; Schema: powerdns; Owner: evilserve
---
-
-ALTER TABLE ONLY records
- ADD CONSTRAINT records_domain_id_fkey FOREIGN KEY (domain_id) REFERENCES domains(id) ON DELETE CASCADE;
-
-
-SET search_path = public, pg_catalog;
-
---
--- Name: dns_resources_dns_resource_type_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_dns_resource_type_id_fkey FOREIGN KEY (dns_resource_type_id) REFERENCES dns_resource_types(id);
-
-
---
--- Name: dns_resources_dns_zone_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: evilserve
---
-
-ALTER TABLE ONLY dns_resources
- ADD CONSTRAINT dns_resources_dns_zone_id_fkey FOREIGN KEY (dns_zone_id) REFERENCES dns_zones(id) ON UPDATE CASCADE ON DELETE CASCADE;
-
-
---
--- Name: powerdns; Type: ACL; Schema: -; Owner: evilserve
---
-
-REVOKE ALL ON SCHEMA powerdns FROM PUBLIC;
-REVOKE ALL ON SCHEMA powerdns FROM evilserve;
-GRANT ALL ON SCHEMA powerdns TO evilserve;
-GRANT ALL ON SCHEMA powerdns TO powerdns;
-
-
---
--- Name: public; Type: ACL; Schema: -; Owner: pgsql
---
-
-REVOKE ALL ON SCHEMA public FROM PUBLIC;
-REVOKE ALL ON SCHEMA public FROM pgsql;
-GRANT ALL ON SCHEMA public TO pgsql;
-GRANT ALL ON SCHEMA public TO PUBLIC;
-
-
-SET search_path = powerdns, pg_catalog;
-
---
--- Name: domains; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON TABLE domains FROM PUBLIC;
-REVOKE ALL ON TABLE domains FROM evilserve;
-GRANT ALL ON TABLE domains TO evilserve;
-GRANT ALL ON TABLE domains TO powerdns;
-
-
---
--- Name: records; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON TABLE records FROM PUBLIC;
-REVOKE ALL ON TABLE records FROM evilserve;
-GRANT ALL ON TABLE records TO evilserve;
-GRANT ALL ON TABLE records TO powerdns;
-
-
---
--- Name: records_id_seq; Type: ACL; Schema: powerdns; Owner: evilserve
---
-
-REVOKE ALL ON SEQUENCE records_id_seq FROM PUBLIC;
-REVOKE ALL ON SEQUENCE records_id_seq FROM evilserve;
-GRANT ALL ON SEQUENCE records_id_seq TO evilserve;
-GRANT ALL ON SEQUENCE records_id_seq TO powerdns;
-
-
---
--- PostgreSQL database dump complete
---
-
diff --git a/db/migrate/.svn/entries b/db/migrate/.svn/entries
deleted file mode 100644
index 07f77a3..0000000
--- a/db/migrate/.svn/entries
+++ /dev/null
@@ -1,40 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/db/migrate
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-001_create_accounts.rb
-file
-
-
-
-
-2008-03-12T23:23:02.000000Z
-487b899960197739fd5b5134af47c685
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
diff --git a/db/migrate/.svn/format b/db/migrate/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/db/migrate/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/db/migrate/.svn/text-base/001_create_accounts.rb.svn-base b/db/migrate/.svn/text-base/001_create_accounts.rb.svn-base
deleted file mode 100644
index c61d651..0000000
--- a/db/migrate/.svn/text-base/001_create_accounts.rb.svn-base
+++ /dev/null
@@ -1,26 +0,0 @@
-class CreateAccounts < ActiveRecord::Migration
- def self.up
- create_table :accounts, :force => true do |t|
- t.column :first_name, :string
- t.column :last_name, :string
- t.column :email_address, :string
- t.column :phone_number, :string, :limit => 15
- t.column :login, :string
-
- t.column :crypted_password, :string, :limit => 40
- t.column :salt, :string, :limit => 40
- t.column :created_at, :datetime
- t.column :updated_at, :datetime
- t.column :remember_token, :string
- t.column :remember_token_expires_at, :datetime
- t.column :activation_code, :string, :limit => 40
- t.column :activated_at, :datetime
- t.column :state, :string, :null => :no, :default => 'passive'
- t.column :deleted_at, :datetime
- end
- end
-
- def self.down
- drop_table :accounts
- end
-end
diff --git a/db/migrate/001_create_accounts.rb b/db/migrate/001_create_accounts.rb
deleted file mode 100644
index c61d651..0000000
--- a/db/migrate/001_create_accounts.rb
+++ /dev/null
@@ -1,26 +0,0 @@
-class CreateAccounts < ActiveRecord::Migration
- def self.up
- create_table :accounts, :force => true do |t|
- t.column :first_name, :string
- t.column :last_name, :string
- t.column :email_address, :string
- t.column :phone_number, :string, :limit => 15
- t.column :login, :string
-
- t.column :crypted_password, :string, :limit => 40
- t.column :salt, :string, :limit => 40
- t.column :created_at, :datetime
- t.column :updated_at, :datetime
- t.column :remember_token, :string
- t.column :remember_token_expires_at, :datetime
- t.column :activation_code, :string, :limit => 40
- t.column :activated_at, :datetime
- t.column :state, :string, :null => :no, :default => 'passive'
- t.column :deleted_at, :datetime
- end
- end
-
- def self.down
- drop_table :accounts
- end
-end
diff --git a/db/migrate/001_create_users.rb b/db/migrate/001_create_users.rb
new file mode 100644
index 0000000..c71fb9b
--- /dev/null
+++ b/db/migrate/001_create_users.rb
@@ -0,0 +1,14 @@
+class CreateUsers < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE users (
+ id SERIAL8 PRIMARY KEY,
+ name VARCHAR(255) NOT NULL,
+ username VARCHAR(255) NOT NULL UNIQUE,
+ password VARCHAR(255) NOT NULL,
+ created_on TIMESTAMP NOT NULL DEFAULT NOW())"
+ end
+
+ def self.down
+ drop_table :users
+ end
+end
diff --git a/db/migrate/002_create_dns_zones.rb b/db/migrate/002_create_dns_zones.rb
new file mode 100644
index 0000000..a9c85bc
--- /dev/null
+++ b/db/migrate/002_create_dns_zones.rb
@@ -0,0 +1,20 @@
+class CreateDnsZones < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE dns_zones (
+ id SERIAL8 PRIMARY KEY,
+ user_id INT8 NOT NULL REFERENCES users,
+ origin VARCHAR(255) NOT NULL UNIQUE,
+ ns VARCHAR(255) NOT NULL,
+ mbox VARCHAR(255) NOT NULL,
+ serial INT8 NOT NULL DEFAULT '1',
+ refresh INT4 NOT NULL DEFAULT '28800',
+ retry INT4 NOT NULL DEFAULT '7200',
+ expire INT4 NOT NULL DEFAULT '604800',
+ minimum INT4 NOT NULL DEFAULT '86400',
+ ttl INT4 NOT NULL DEFAULT '86400')"
+ end
+
+ def self.down
+ drop_table :dns_zones
+ end
+end
diff --git a/db/migrate/003_create_dns_resources.rb b/db/migrate/003_create_dns_resources.rb
new file mode 100644
index 0000000..e7e585b
--- /dev/null
+++ b/db/migrate/003_create_dns_resources.rb
@@ -0,0 +1,20 @@
+class CreateDnsResources < ActiveRecord::Migration
+ def self.up
+ execute "CREATE DOMAIN dns_resource_type AS VARCHAR(5) CHECK (VALUE IN
+ ('A', 'AAAA', 'CNAME', 'HINFO', 'MX', 'NS', 'PTR', 'SRV', 'TXT'))"
+
+ execute "CREATE TABLE dns_resources (
+ id SERIAL8 PRIMARY KEY,
+ dns_zone_id INT8 NOT NULL REFERENCES dns_zones,
+ name VARCHAR(64) NOT NULL,
+ type DNS_RESOURCE_TYPE NOT NULL,
+ data VARCHAR(255) NOT NULL,
+ aux INT4 NULL DEFAULT NULL,
+ ttl INT4 NULL DEFAULT NULL)"
+ end
+
+ def self.down
+ drop_table :dns_resources
+ execute "DROP DOMAIN dns_resource_type"
+ end
+end
diff --git a/db/migrate/004_create_mail_users.rb b/db/migrate/004_create_mail_users.rb
new file mode 100644
index 0000000..955d9d2
--- /dev/null
+++ b/db/migrate/004_create_mail_users.rb
@@ -0,0 +1,17 @@
+class CreateMailUsers < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE mail_users (
+ id SERIAL8 PRIMARY KEY,
+ user_id INT8 NOT NULL REFERENCES users,
+ dns_resource_id INT8 NOT NULL REFERENCES dns_resources,
+ name VARCHAR(255) NOT NULL,
+ username VARCHAR(255) NOT NULL,
+ password VARCHAR(255) NOT NULL,
+ quota_bytes INT8 NOT NULL,
+ spam_thrsh INT4 NOT NULL DEFAULT '5' CHECK (spam_thrsh >= 0 AND spam_thrsh <= 10))"
+ end
+
+ def self.down
+ drop_table :mail_users
+ end
+end
diff --git a/db/migrate/005_create_mail_aliases.rb b/db/migrate/005_create_mail_aliases.rb
new file mode 100644
index 0000000..f375ffd
--- /dev/null
+++ b/db/migrate/005_create_mail_aliases.rb
@@ -0,0 +1,14 @@
+class CreateMailAliases < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE mail_aliases (
+ id SERIAL8 PRIMARY KEY,
+ user_id INT8 NOT NULL REFERENCES users,
+ dns_resource_id INT8 NOT NULL REFERENCES dns_resources,
+ username VARCHAR(255) NOT NULL,
+ destination VARCHAR(255) NOT NULL)"
+ end
+
+ def self.down
+ drop_table :mail_aliases
+ end
+end
diff --git a/db/migrate/006_create_web_sites.rb b/db/migrate/006_create_web_sites.rb
new file mode 100644
index 0000000..1afd2ef
--- /dev/null
+++ b/db/migrate/006_create_web_sites.rb
@@ -0,0 +1,14 @@
+class CreateWebSites < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE web_sites (
+ id SERIAL8 PRIMARY KEY,
+ user_id INT8 NOT NULL REFERENCES users,
+ dns_resource_id INT8 NOT NULL REFERENCES dns_resources,
+ serveradmin VARCHAR(255) NOT NULL,
+ quota_bytes INT8 NOT NULL)"
+ end
+
+ def self.down
+ drop_table :web_sites
+ end
+end
diff --git a/db/migrate/007_create_web_aliases.rb b/db/migrate/007_create_web_aliases.rb
new file mode 100644
index 0000000..593e441
--- /dev/null
+++ b/db/migrate/007_create_web_aliases.rb
@@ -0,0 +1,12 @@
+class CreateWebAliases < ActiveRecord::Migration
+ def self.up
+ execute "CREATE TABLE web_aliases (
+ id SERIAL8 PRIMARY KEY,
+ web_site_id INT8 NOT NULL REFERENCES web_sites,
+ dns_resource_id INT8 NOT NULL REFERENCES dns_resources)"
+ end
+
+ def self.down
+ drop_table :web_aliases
+ end
+end
diff --git a/db/migrate/008_add_sessions.rb b/db/migrate/008_add_sessions.rb
new file mode 100644
index 0000000..22b4a00
--- /dev/null
+++ b/db/migrate/008_add_sessions.rb
@@ -0,0 +1,16 @@
+class AddSessions < ActiveRecord::Migration
+ def self.up
+ create_table :sessions do |t|
+ t.column :session_id, :string
+ t.column :data, :text
+ t.column :updated_at, :datetime
+ end
+
+ add_index :sessions, :session_id
+ add_index :sessions, :updated_at
+ end
+
+ def self.down
+ drop_table :sessions
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index fe596de..5cc93a1 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1,59 +1,72 @@
-# This file is auto-generated from the current state of the database. Instead of editing this file,
-# please use the migrations feature of ActiveRecord to incrementally modify your database, and
+# This file is autogenerated. Instead of editing this file, please use the
+# migrations feature of ActiveRecord to incrementally modify your database, and
# then regenerate this schema definition.
-#
-# Note that this schema.rb definition is the authoritative source for your database schema. If you need
-# to create the application database on another system, you should be using db:schema:load, not running
-# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
-# you'll amass, the slower it'll run and the greater likelihood for issues).
-#
-# It's strongly recommended to check this file into your version control system.
-
-ActiveRecord::Schema.define(:version => 1) do
-
- create_table "accounts", :force => true do |t|
- t.string "first_name"
- t.string "last_name"
- t.string "email_address"
- t.string "phone_number", :limit => 15
- t.string "login"
- t.string "crypted_password", :limit => 40
- t.string "salt", :limit => 40
- t.datetime "created_at"
- t.datetime "updated_at"
- t.string "remember_token"
- t.datetime "remember_token_expires_at"
- t.string "activation_code", :limit => 40
- t.datetime "activated_at"
- t.string "state", :default => "passive"
- t.datetime "deleted_at"
+
+ActiveRecord::Schema.define(:version => 8) do
+
+# Could not dump table "dns_resources" because of following StandardError
+# Unknown type 'dns_resource_type' for column 'type'
+
+ create_table "dns_zones", :force => true do |t|
+ t.column "user_id", :integer, :null => false
+ t.column "origin", :string, :null => false
+ t.column "ns", :string, :null => false
+ t.column "mbox", :string, :null => false
+ t.column "serial", :integer, :default => 1, :null => false
+ t.column "refresh", :integer, :default => 28800, :null => false
+ t.column "retry", :integer, :default => 7200, :null => false
+ t.column "expire", :integer, :default => 604800, :null => false
+ t.column "minimum", :integer, :default => 86400, :null => false
+ t.column "ttl", :integer, :default => 86400, :null => false
end
- create_table "dns_resource_types", :force => true do |t|
- t.string "type", :null => false
- t.text "description"
+ add_index "dns_zones", ["origin"], :name => "dns_zones_origin_key", :unique => true
+
+ create_table "mail_aliases", :force => true do |t|
+ t.column "user_id", :integer, :null => false
+ t.column "dns_resource_id", :integer, :null => false
+ t.column "username", :string, :null => false
+ t.column "destination", :string, :null => false
end
- create_table "dns_resources", :force => true do |t|
- t.integer "dns_zone_id", :null => false
- t.integer "dns_resource_type_id", :null => false
- t.string "name", :limit => 64, :null => false
- t.string "data", :null => false
- t.integer "aux"
- t.integer "ttl"
+ create_table "mail_users", :force => true do |t|
+ t.column "user_id", :integer, :null => false
+ t.column "dns_resource_id", :integer, :null => false
+ t.column "name", :string, :null => false
+ t.column "username", :string, :null => false
+ t.column "password", :string, :null => false
+ t.column "quota_bytes", :integer, :null => false
+ t.column "spam_thrsh", :integer, :default => 5, :null => false
end
- create_table "dns_zones", :force => true do |t|
- t.string "origin", :null => false
- t.string "ns", :null => false
- t.string "mbox", :null => false
- t.integer "serial", :null => false
- t.integer "refresh", :default => 10800, :null => false
- t.integer "retry", :default => 3600, :null => false
- t.integer "expire", :default => 604800, :null => false
- t.integer "ttl", :default => 3600, :null => false
+ create_table "sessions", :force => true do |t|
+ t.column "session_id", :string
+ t.column "data", :text
+ t.column "updated_at", :datetime
end
- add_index "dns_zones", ["origin"], :name => "dns_zones_origin_key", :unique => true
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
+
+ create_table "users", :force => true do |t|
+ t.column "name", :string, :null => false
+ t.column "username", :string, :null => false
+ t.column "password", :string, :null => false
+ t.column "created_on", :datetime, :null => false
+ end
+
+ add_index "users", ["username"], :name => "users_username_key", :unique => true
+
+ create_table "web_aliases", :force => true do |t|
+ t.column "web_site_id", :integer, :null => false
+ t.column "dns_resource_id", :integer, :null => false
+ end
+
+ create_table "web_sites", :force => true do |t|
+ t.column "user_id", :integer, :null => false
+ t.column "dns_resource_id", :integer, :null => false
+ t.column "serveradmin", :string, :null => false
+ t.column "quota_bytes", :integer, :null => false
+ end
end
diff --git a/db/schema.xml b/db/schema.xml
new file mode 100644
index 0000000..6a93b66
--- /dev/null
+++ b/db/schema.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+ RubyOnRails.UML_dumper
+ 1.0
+
+
+
+
+
+
+
+
+
diff --git a/doc/.svn/entries b/doc/.svn/entries
deleted file mode 100644
index 4b8e73c..0000000
--- a/doc/.svn/entries
+++ /dev/null
@@ -1,28 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/doc
-svn://svn.evilcode.net/sites
-
-
-
-2007-10-24T18:36:33.855979Z
-948
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
diff --git a/doc/.svn/format b/doc/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/doc/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/doc/README_FOR_APP b/doc/README_FOR_APP
new file mode 100644
index 0000000..ac6c149
--- /dev/null
+++ b/doc/README_FOR_APP
@@ -0,0 +1,2 @@
+Use this README file to introduce your application and point to useful places in the API for learning more.
+Run "rake appdoc" to generate API documentation for your models and controllers.
\ No newline at end of file
diff --git a/lib/.svn/entries b/lib/.svn/entries
deleted file mode 100644
index 5d07ee9..0000000
--- a/lib/.svn/entries
+++ /dev/null
@@ -1,67 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/lib
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-authenticated_test_helper.rb
-file
-
-
-
-
-2008-03-12T23:23:09.000000Z
-04b8198fb11424f313496e8c4f983365
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-tasks
-dir
-
-authenticated_system.rb
-file
-
-
-
-
-2008-03-12T23:23:10.000000Z
-b795fc1129d27d65c779a019b5e94fbc
-2008-03-12T00:18:13.520046Z
-979
-ryan
-
-exclusion.rb
-file
-
-
-
-
-2008-03-12T23:23:11.000000Z
-2d5a309b5ff0489423d12a352e8e56ef
-2007-10-26T00:25:53.597530Z
-959
-ryan
-
diff --git a/lib/.svn/format b/lib/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/lib/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/lib/.svn/text-base/authenticated_system.rb.svn-base b/lib/.svn/text-base/authenticated_system.rb.svn-base
deleted file mode 100644
index eab8081..0000000
--- a/lib/.svn/text-base/authenticated_system.rb.svn-base
+++ /dev/null
@@ -1,116 +0,0 @@
-module AuthenticatedSystem
- protected
- # Returns true or false if the account is logged in.
- # Preloads @current_account with the account model if they're logged in.
- def logged_in?
- current_account != :false
- end
-
- # Accesses the current account from the session. Set it to :false if login fails
- # so that future calls do not hit the database.
- def current_account
- @current_account ||= (login_from_session || login_from_basic_auth || login_from_cookie || :false)
- end
-
- # Store the given account id in the session.
- def current_account=(new_account)
- session[:account_id] = (new_account.nil? || new_account.is_a?(Symbol)) ? nil : new_account.id
- @current_account = new_account || :false
- end
-
- # Check if the account is authorized
- #
- # Override this method in your controllers if you want to restrict access
- # to only a few actions or if you want to check if the account
- # has the correct rights.
- #
- # Example:
- #
- # # only allow nonbobs
- # def authorized?
- # current_account.login != "bob"
- # end
- def authorized?
- logged_in?
- end
-
- # Filter method to enforce a login requirement.
- #
- # To require logins for all actions, use this in your controllers:
- #
- # before_filter :login_required
- #
- # To require logins for specific actions, use this in your controllers:
- #
- # before_filter :login_required, :only => [ :edit, :update ]
- #
- # To skip this in a subclassed controller:
- #
- # skip_before_filter :login_required
- #
- def login_required
- authorized? || access_denied
- end
-
- # Redirect as appropriate when an access request fails.
- #
- # The default action is to redirect to the login screen.
- #
- # Override this method in your controllers if you want to have special
- # behavior in case the account is not authorized
- # to access the requested action. For example, a popup window might
- # simply close itself.
- def access_denied
- respond_to do |format|
- format.html do
- store_location
- redirect_to new_session_path
- end
- format.any do
- request_http_basic_authentication 'Web Password'
- end
- end
- end
-
- # Store the URI of the current request in the session.
- #
- # We can return to this location by calling #redirect_back_or_default.
- def store_location
- session[:return_to] = request.request_uri
- end
-
- # Redirect to the URI stored by the most recent store_location call or
- # to the passed default.
- def redirect_back_or_default(default)
- redirect_to(session[:return_to] || default)
- session[:return_to] = nil
- end
-
- # Inclusion hook to make #current_account and #logged_in?
- # available as ActionView helper methods.
- def self.included(base)
- base.send :helper_method, :current_account, :logged_in?
- end
-
- # Called from #current_account. First attempt to login by the account id stored in the session.
- def login_from_session
- self.current_account = Account.find_by_id(session[:account_id]) if session[:account_id]
- end
-
- # Called from #current_account. Now, attempt to login by basic authentication information.
- def login_from_basic_auth
- authenticate_with_http_basic do |username, password|
- self.current_account = Account.authenticate(username, password)
- end
- end
-
- # Called from #current_account. Finaly, attempt to login by an expiring token in the cookie.
- def login_from_cookie
- account = cookies[:auth_token] && Account.find_by_remember_token(cookies[:auth_token])
- if account && account.remember_token?
- account.remember_me
- cookies[:auth_token] = { :value => account.remember_token, :expires => account.remember_token_expires_at }
- self.current_account = account
- end
- end
-end
diff --git a/lib/.svn/text-base/authenticated_test_helper.rb.svn-base b/lib/.svn/text-base/authenticated_test_helper.rb.svn-base
deleted file mode 100644
index 39877ae..0000000
--- a/lib/.svn/text-base/authenticated_test_helper.rb.svn-base
+++ /dev/null
@@ -1,10 +0,0 @@
-module AuthenticatedTestHelper
- # Sets the current account in the session from the account fixtures.
- def login_as(account)
- @request.session[:account_id] = account ? accounts(account).id : nil
- end
-
- def authorize_as(user)
- @request.env["HTTP_AUTHORIZATION"] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'test') : nil
- end
-end
diff --git a/lib/.svn/text-base/exclusion.rb.svn-base b/lib/.svn/text-base/exclusion.rb.svn-base
deleted file mode 100644
index 3544195..0000000
--- a/lib/.svn/text-base/exclusion.rb.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-module Exclusion
- COMMON_WORDS = %w(add delete destroy edit save search tag tags random rating update)
-end
diff --git a/lib/authenticated_system.rb b/lib/authenticated_system.rb
index eab8081..57e92ad 100644
--- a/lib/authenticated_system.rb
+++ b/lib/authenticated_system.rb
@@ -1,37 +1,36 @@
module AuthenticatedSystem
protected
- # Returns true or false if the account is logged in.
- # Preloads @current_account with the account model if they're logged in.
+ # Returns true or false if the user is logged in.
+ # Preloads @current_user with the user model if they're logged in.
def logged_in?
- current_account != :false
+ current_user != :false
end
- # Accesses the current account from the session. Set it to :false if login fails
- # so that future calls do not hit the database.
- def current_account
- @current_account ||= (login_from_session || login_from_basic_auth || login_from_cookie || :false)
+ # Accesses the current user from the session.
+ def current_user
+ @current_user ||= (session[:user] && User.find_by_id(session[:user])) || :false
end
-
- # Store the given account id in the session.
- def current_account=(new_account)
- session[:account_id] = (new_account.nil? || new_account.is_a?(Symbol)) ? nil : new_account.id
- @current_account = new_account || :false
+
+ # Store the given user in the session.
+ def current_user=(new_user)
+ session[:user] = (new_user.nil? || new_user.is_a?(Symbol)) ? nil : new_user.id
+ @current_user = new_user
end
- # Check if the account is authorized
+ # Check if the user is authorized.
#
# Override this method in your controllers if you want to restrict access
- # to only a few actions or if you want to check if the account
+ # to only a few actions or if you want to check if the user
# has the correct rights.
#
# Example:
#
# # only allow nonbobs
- # def authorized?
- # current_account.login != "bob"
+ # def authorize?
+ # current_user.login != "bob"
# end
def authorized?
- logged_in?
+ true
end
# Filter method to enforce a login requirement.
@@ -49,68 +48,73 @@ def authorized?
# skip_before_filter :login_required
#
def login_required
- authorized? || access_denied
+ username, passwd = get_auth_data
+ self.current_user ||= User.authenticate(username, passwd) || :false if username && passwd
+ logged_in? && authorized? ? true : access_denied
end
-
+
# Redirect as appropriate when an access request fails.
#
# The default action is to redirect to the login screen.
#
# Override this method in your controllers if you want to have special
- # behavior in case the account is not authorized
+ # behavior in case the user is not authorized
# to access the requested action. For example, a popup window might
# simply close itself.
def access_denied
- respond_to do |format|
- format.html do
+ respond_to do |accepts|
+ accepts.html do
store_location
- redirect_to new_session_path
+ redirect_to :controller => '/login'
end
- format.any do
- request_http_basic_authentication 'Web Password'
+ accepts.xml do
+ headers["Status"] = "Unauthorized"
+ headers["WWW-Authenticate"] = %(Basic realm="Web Password")
+ render :text => "Could't authenticate you", :status => '401 Unauthorized'
end
end
- end
-
+ false
+ end
+
# Store the URI of the current request in the session.
#
# We can return to this location by calling #redirect_back_or_default.
def store_location
session[:return_to] = request.request_uri
end
-
+
# Redirect to the URI stored by the most recent store_location call or
# to the passed default.
def redirect_back_or_default(default)
- redirect_to(session[:return_to] || default)
+ session[:return_to] ? redirect_to_url(session[:return_to]) : redirect_to(default)
session[:return_to] = nil
end
-
- # Inclusion hook to make #current_account and #logged_in?
+
+ # Inclusion hook to make #current_user and #logged_in?
# available as ActionView helper methods.
def self.included(base)
- base.send :helper_method, :current_account, :logged_in?
+ base.send :helper_method, :current_user, :logged_in?
end
- # Called from #current_account. First attempt to login by the account id stored in the session.
- def login_from_session
- self.current_account = Account.find_by_id(session[:account_id]) if session[:account_id]
- end
-
- # Called from #current_account. Now, attempt to login by basic authentication information.
- def login_from_basic_auth
- authenticate_with_http_basic do |username, password|
- self.current_account = Account.authenticate(username, password)
+ # When called with before_filter :login_from_cookie will check for an :auth_token
+ # cookie and log the user back in if apropriate
+ def login_from_cookie
+ return unless cookies[:auth_token] && !logged_in?
+ user = User.find_by_remember_token(cookies[:auth_token])
+ if user && user.remember_token?
+ user.remember_me
+ self.current_user = user
+ cookies[:auth_token] = { :value => self.current_user.remember_token , :expires => self.current_user.remember_token_expires_at }
+ flash[:notice] = "Logged in successfully"
end
end
- # Called from #current_account. Finaly, attempt to login by an expiring token in the cookie.
- def login_from_cookie
- account = cookies[:auth_token] && Account.find_by_remember_token(cookies[:auth_token])
- if account && account.remember_token?
- account.remember_me
- cookies[:auth_token] = { :value => account.remember_token, :expires => account.remember_token_expires_at }
- self.current_account = account
- end
+ private
+ @@http_auth_headers = %w(X-HTTP_AUTHORIZATION HTTP_AUTHORIZATION Authorization)
+ # gets BASIC auth info
+ def get_auth_data
+ auth_key = @@http_auth_headers.detect { |h| request.env.has_key?(h) }
+ auth_data = request.env[auth_key].to_s.split unless auth_key.blank?
+ return auth_data && auth_data[0] == 'Basic' ? Base64.decode64(auth_data[1]).split(':')[0..1] : [nil, nil]
end
end
diff --git a/lib/authenticated_test_helper.rb b/lib/authenticated_test_helper.rb
index 39877ae..a704035 100644
--- a/lib/authenticated_test_helper.rb
+++ b/lib/authenticated_test_helper.rb
@@ -1,10 +1,113 @@
module AuthenticatedTestHelper
- # Sets the current account in the session from the account fixtures.
- def login_as(account)
- @request.session[:account_id] = account ? accounts(account).id : nil
+ # Sets the current user in the session from the user fixtures.
+ def login_as(user)
+ @request.session[:user] = user ? users(user).id : nil
+ end
+
+ def content_type(type)
+ @request.env['Content-Type'] = type
+ end
+
+ def accept(accept)
+ @request.env["HTTP_ACCEPT"] = accept
end
def authorize_as(user)
- @request.env["HTTP_AUTHORIZATION"] = user ? ActionController::HttpAuthentication::Basic.encode_credentials(users(user).login, 'test') : nil
+ if user
+ @request.env["HTTP_AUTHORIZATION"] = "Basic #{Base64.encode64("#{users(user).login}:test")}"
+ accept 'application/xml'
+ content_type 'application/xml'
+ else
+ @request.env["HTTP_AUTHORIZATION"] = nil
+ accept nil
+ content_type nil
+ end
+ end
+
+ # http://project.ioni.st/post/217#post-217
+ #
+ # def test_new_publication
+ # assert_difference(Publication, :count) do
+ # post :create, :publication => {...}
+ # # ...
+ # end
+ # end
+ #
+ def assert_difference(object, method = nil, difference = 1)
+ initial_value = object.send(method)
+ yield
+ assert_equal initial_value + difference, object.send(method), "#{object}##{method}"
end
+
+ def assert_no_difference(object, method, &block)
+ assert_difference object, method, 0, &block
+ end
+
+ # Assert the block redirects to the login
+ #
+ # assert_requires_login(:bob) { |c| c.get :edit, :id => 1 }
+ #
+ def assert_requires_login(login = nil)
+ yield HttpLoginProxy.new(self, login)
+ end
+
+ def assert_http_authentication_required(login = nil)
+ yield XmlLoginProxy.new(self, login)
+ end
+
+ def reset!(*instance_vars)
+ instance_vars = [:controller, :request, :response] unless instance_vars.any?
+ instance_vars.collect! { |v| "@#{v}".to_sym }
+ instance_vars.each do |var|
+ instance_variable_set(var, instance_variable_get(var).class.new)
+ end
+ end
+end
+
+class BaseLoginProxy
+ attr_reader :controller
+ attr_reader :options
+ def initialize(controller, login)
+ @controller = controller
+ @login = login
+ end
+
+ private
+ def authenticated
+ raise NotImplementedError
+ end
+
+ def check
+ raise NotImplementedError
+ end
+
+ def method_missing(method, *args)
+ @controller.reset!
+ authenticate
+ @controller.send(method, *args)
+ check
+ end
end
+
+class HttpLoginProxy < BaseLoginProxy
+ protected
+ def authenticate
+ @controller.login_as @login if @login
+ end
+
+ def check
+ @controller.assert_redirected_to :controller => 'account', :action => 'login'
+ end
+end
+
+class XmlLoginProxy < BaseLoginProxy
+ protected
+ def authenticate
+ @controller.accept 'application/xml'
+ @controller.authorize_as @login if @login
+ end
+
+ def check
+ @controller.assert_response 401
+ end
+end
\ No newline at end of file
diff --git a/lib/exclusion.rb b/lib/exclusion.rb
deleted file mode 100644
index 3544195..0000000
--- a/lib/exclusion.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-# $Id$
-
-module Exclusion
- COMMON_WORDS = %w(add delete destroy edit save search tag tags random rating update)
-end
diff --git a/lib/tasks/.svn/entries b/lib/tasks/.svn/entries
deleted file mode 100644
index 6cd3697..0000000
--- a/lib/tasks/.svn/entries
+++ /dev/null
@@ -1,40 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/lib/tasks
-svn://svn.evilcode.net/sites
-
-
-
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-infernal.rake
-file
-
-
-
-
-2008-03-12T23:23:08.000000Z
-ec7e73ed5db53169a88d7db375c269fa
-2007-11-07T08:37:19.358428Z
-964
-ryan
-
diff --git a/lib/tasks/.svn/format b/lib/tasks/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/lib/tasks/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/lib/tasks/.svn/text-base/infernal.rake.svn-base b/lib/tasks/.svn/text-base/infernal.rake.svn-base
deleted file mode 100644
index 627857e..0000000
--- a/lib/tasks/.svn/text-base/infernal.rake.svn-base
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace :infernal do
- namespace :pgsql do
- desc "Starts the pgsql database."
- task :start do
- `sudo -u pgsql /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start`
- end
-
- end
-
- namespace :mongrel do
- desc "Starts mongrel worker."
- task :start do
- `mongrel_rails cluster::start --clean -C config/mongrel_development.yml`
- end
- end
-end
diff --git a/lib/tasks/capistrano.rake b/lib/tasks/capistrano.rake
new file mode 100644
index 0000000..4dcd353
--- /dev/null
+++ b/lib/tasks/capistrano.rake
@@ -0,0 +1,96 @@
+# =============================================================================
+# A set of rake tasks for invoking the Capistrano automation utility.
+# =============================================================================
+
+# Invoke the given actions via Capistrano
+def cap(*parameters)
+ begin
+ require 'rubygems'
+ rescue LoadError
+ # no rubygems to load, so we fail silently
+ end
+
+ require 'capistrano/cli'
+
+ Capistrano::CLI.new(parameters.map { |param| param.to_s }).execute!
+end
+
+namespace :remote do
+ desc "Removes unused releases from the releases directory."
+ task(:cleanup) { cap :cleanup }
+
+ desc "Used only for deploying when the spinner isn't running."
+ task(:cold_deploy) { cap :cold_deploy }
+
+ desc "A macro-task that updates the code, fixes the symlink, and restarts the application servers."
+ task(:deploy) { cap :deploy }
+
+ desc "Similar to deploy, but it runs the migrate task on the new release before updating the symlink."
+ task(:deploy_with_migrations) { cap :deploy_with_migrations }
+
+ desc "Displays the diff between HEAD and what was last deployed."
+ task(:diff_from_last_deploy) { cap :diff_from_last_deploy }
+
+ desc "Disable the web server by writing a \"maintenance.html\" file to the web servers."
+ task(:disable_web) { cap :disable_web }
+
+ desc "Re-enable the web server by deleting any \"maintenance.html\" file."
+ task(:enable_web) { cap :enable_web }
+
+ desc "A simple task for performing one-off commands that may not require a full task to be written for them."
+ task(:invoke) { cap :invoke }
+
+ desc "Run the migrate rake task."
+ task(:migrate) { cap :migrate }
+
+ desc "Restart the FCGI processes on the app server."
+ task(:restart) { cap :restart }
+
+ desc "A macro-task that rolls back the code and restarts the application servers."
+ task(:rollback) { cap :rollback }
+
+ desc "Rollback the latest checked-out version to the previous one by fixing the symlinks and deleting the current release from all servers."
+ task(:rollback_code) { cap :rollback_code }
+
+ desc "Set up the expected application directory structure on all boxes"
+ task(:setup) { cap :setup }
+
+ desc "Begin an interactive Capistrano session."
+ task(:shell) { cap :shell }
+
+ desc "Enumerate and describe every available task."
+ task(:show_tasks) { cap :show_tasks, '-q' }
+
+ desc "Start the spinner daemon for the application (requires script/spin)."
+ task(:spinner) { cap :spinner }
+
+ desc "Update the 'current' symlink to point to the latest version of the application's code."
+ task(:symlink) { cap :symlink }
+
+ desc "Updates the code and fixes the symlink under a transaction"
+ task(:update) { cap :update }
+
+ desc "Update all servers with the latest release of the source code."
+ task(:update_code) { cap :update_code }
+
+ desc "Update the currently released version of the software directly via an SCM update operation"
+ task(:update_current) { cap :update_current }
+
+ desc "Execute a specific action using capistrano"
+ task :exec do
+ unless ENV['ACTION']
+ raise "Please specify an action (or comma separated list of actions) via the ACTION environment variable"
+ end
+
+ actions = ENV['ACTION'].split(",")
+ actions.concat(ENV['PARAMS'].split(" ")) if ENV['PARAMS']
+
+ cap(*actions)
+ end
+end
+
+desc "Push the latest revision into production (delegates to remote:deploy)"
+task :deploy => "remote:deploy"
+
+desc "Rollback to the release before the current release in production (delegates to remote:rollback)"
+task :rollback => "remote:rollback"
diff --git a/lib/tasks/infernal.rake b/lib/tasks/infernal.rake
deleted file mode 100644
index 627857e..0000000
--- a/lib/tasks/infernal.rake
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace :infernal do
- namespace :pgsql do
- desc "Starts the pgsql database."
- task :start do
- `sudo -u pgsql /usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start`
- end
-
- end
-
- namespace :mongrel do
- desc "Starts mongrel worker."
- task :start do
- `mongrel_rails cluster::start --clean -C config/mongrel_development.yml`
- end
- end
-end
diff --git a/public/.DS_Store b/public/.DS_Store
deleted file mode 100644
index f10092a..0000000
Binary files a/public/.DS_Store and /dev/null differ
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 0000000..a36e949
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,13 @@
+AddHandler fastcgi-script .fcgi
+Options +FollowSymLinks +ExecCGI
+
+RewriteEngine On
+
+RewriteBase /
+RewriteRule ^$ index.html [QSA]
+RewriteRule ^([^.]+)$ $1.html [QSA]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
+
+ErrorDocument 500 /500.html
+ErrorDocument 404 /404.html
diff --git a/public/.svn/entries b/public/.svn/entries
deleted file mode 100644
index a7586f3..0000000
--- a/public/.svn/entries
+++ /dev/null
@@ -1,37 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-javascripts
-dir
-
-img
-dir
-
-stylesheets
-dir
-
diff --git a/public/.svn/format b/public/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/404.html b/public/404.html
new file mode 100644
index 0000000..0e18456
--- /dev/null
+++ b/public/404.html
@@ -0,0 +1,8 @@
+
+
+
+ File not found
+ Change this error message for pages not found in public/404.html
+
+
\ No newline at end of file
diff --git a/public/500.html b/public/500.html
new file mode 100644
index 0000000..ab95f74
--- /dev/null
+++ b/public/500.html
@@ -0,0 +1,8 @@
+
+
+
+ Application error
+ Change this error message for exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code) in public/500.html
+
+
\ No newline at end of file
diff --git a/public/dispatch.fcgi b/public/dispatch.fcgi
new file mode 100755
index 0000000..585c332
--- /dev/null
+++ b/public/dispatch.fcgi
@@ -0,0 +1,7 @@
+#!/usr/local/bin/ruby
+require File.dirname(__FILE__) + "/../config/environment"
+require_gem 'fcgi'
+require 'fcgi_handler'
+
+RailsFCGIHandler.process! nil, 50
+
diff --git a/public/favicon.ico b/public/favicon.ico
new file mode 100644
index 0000000..e69de29
diff --git a/public/img/.svn/entries b/public/img/.svn/entries
deleted file mode 100644
index a275983..0000000
--- a/public/img/.svn/entries
+++ /dev/null
@@ -1,57 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public/img
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-11T19:50:19.318568Z
-971
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-interface
-dir
-
-rails.png
-file
-
-
-
-
-2008-03-12T23:24:06.000000Z
-450fc241fab7867e96536903244087f4
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-splash.png
-file
-
-
-
-
-2008-03-12T23:24:06.000000Z
-eab5e69d28d65af2e716d65007182f89
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
diff --git a/public/img/.svn/format b/public/img/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/img/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/img/.svn/prop-base/rails.png.svn-base b/public/img/.svn/prop-base/rails.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/.svn/prop-base/rails.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/.svn/prop-base/splash.png.svn-base b/public/img/.svn/prop-base/splash.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/.svn/prop-base/splash.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/.svn/text-base/rails.png.svn-base b/public/img/.svn/text-base/rails.png.svn-base
deleted file mode 100644
index b8441f1..0000000
Binary files a/public/img/.svn/text-base/rails.png.svn-base and /dev/null differ
diff --git a/public/img/.svn/text-base/splash.png.svn-base b/public/img/.svn/text-base/splash.png.svn-base
deleted file mode 100644
index 359cbc0..0000000
Binary files a/public/img/.svn/text-base/splash.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/entries b/public/img/interface/.svn/entries
deleted file mode 100644
index 04b767f..0000000
--- a/public/img/interface/.svn/entries
+++ /dev/null
@@ -1,294 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public/img/interface
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-11T19:50:19.318568Z
-971
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-bg-h1-2.png
-file
-
-
-
-
-2008-03-12T23:23:53.000000Z
-ef64d7205ff1dddf0fa1374dedebc148
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-h1.png
-file
-
-
-
-
-2008-03-12T23:23:54.000000Z
-ef756350e13e835ec89f8aeabfd962f5
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-leftcol.gif
-file
-
-
-
-
-2008-03-12T23:23:54.000000Z
-a502f454dec15cde99ae5ed6a3e0b762
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-h1-infernalhosting.png
-file
-
-
-
-
-2008-03-12T23:23:55.000000Z
-bc7eda057ddd403c3c1835d34a90cf5f
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-content.png
-file
-
-
-
-
-2008-03-12T23:23:54.000000Z
-49abbb8b9f633c0ce26009bc5ad28575
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-button.png
-file
-
-
-
-
-2008-03-12T23:23:55.000000Z
-bfe11a6dc77bf7bfd856342f9839f83e
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-input_focus.gif
-file
-
-
-
-
-2008-03-12T23:23:55.000000Z
-36b6e1eb4893826256e08115af82cbac
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-navigation.gif
-file
-
-
-
-
-2008-03-12T23:23:56.000000Z
-b38ee39bcb22fdcc6712e03d90a0fd9f
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-body-24.png
-file
-
-
-
-
-2008-03-12T23:23:56.000000Z
-5ea340e84bc0604a220ec2bfc6b156e2
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-input.gif
-file
-
-
-
-
-2008-03-12T23:23:56.000000Z
-c727c397363db82e6c395cdb89f439c0
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-form-submit.gif
-file
-
-
-
-
-2008-03-12T23:23:57.000000Z
-aff8b1d588ceb447e715734fc726687a
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-panel
-dir
-
-bg-corner.png
-file
-
-
-
-
-2008-03-12T23:23:58.000000Z
-8a7a23aecba890442688b78282dcac88
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-header.png
-file
-
-
-
-
-2008-03-12T23:23:57.000000Z
-a5074fa2d3c8b5a7620af64e54f8aacd
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-content.gif
-file
-
-
-
-
-2008-03-12T23:23:58.000000Z
-5eadfb24f1c33c2c58bd23e714a10a85
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-body-2.png
-file
-
-
-
-
-2008-03-12T23:23:59.000000Z
-83b5678a22371c6853c2161ac6e87309
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-body.png
-file
-
-
-
-
-2008-03-12T23:23:59.000000Z
-77ec79bc3d74087a87cecfc575ddd131
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-footer.png
-file
-
-
-
-
-2008-03-12T23:24:00.000000Z
-70ae8b7b2bb61497c72ff254f24dec38
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-icons
-dir
-
-bg-body-8.png
-file
-
-
-
-
-2008-03-12T23:24:00.000000Z
-e664bb0ff57069bfa546e00f76093387
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-suspended.png
-file
-
-
-
-
-2008-03-12T23:24:01.000000Z
-609abcce6dcd1244569fe9a82f12edc8
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-bg-warning.png
-file
-
-
-
-
-2008-03-12T23:24:02.000000Z
-f7b5c4a93e7c47ff17cde566fa2af942
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
diff --git a/public/img/interface/.svn/format b/public/img/interface/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/img/interface/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/img/interface/.svn/prop-base/bg-body-2.png.svn-base b/public/img/interface/.svn/prop-base/bg-body-2.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-body-2.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-body-24.png.svn-base b/public/img/interface/.svn/prop-base/bg-body-24.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-body-24.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-body-8.png.svn-base b/public/img/interface/.svn/prop-base/bg-body-8.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-body-8.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-body.png.svn-base b/public/img/interface/.svn/prop-base/bg-body.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-body.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-button.png.svn-base b/public/img/interface/.svn/prop-base/bg-button.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-button.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-content.gif.svn-base b/public/img/interface/.svn/prop-base/bg-content.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-content.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-content.png.svn-base b/public/img/interface/.svn/prop-base/bg-content.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-content.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-corner.png.svn-base b/public/img/interface/.svn/prop-base/bg-corner.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-corner.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-footer.png.svn-base b/public/img/interface/.svn/prop-base/bg-footer.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-footer.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-form-submit.gif.svn-base b/public/img/interface/.svn/prop-base/bg-form-submit.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-form-submit.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-h1-2.png.svn-base b/public/img/interface/.svn/prop-base/bg-h1-2.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-h1-2.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-h1.png.svn-base b/public/img/interface/.svn/prop-base/bg-h1.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-h1.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-header.png.svn-base b/public/img/interface/.svn/prop-base/bg-header.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-header.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-input.gif.svn-base b/public/img/interface/.svn/prop-base/bg-input.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-input.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-input_focus.gif.svn-base b/public/img/interface/.svn/prop-base/bg-input_focus.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-input_focus.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-leftcol.gif.svn-base b/public/img/interface/.svn/prop-base/bg-leftcol.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-leftcol.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-navigation.gif.svn-base b/public/img/interface/.svn/prop-base/bg-navigation.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-navigation.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/bg-warning.png.svn-base b/public/img/interface/.svn/prop-base/bg-warning.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/bg-warning.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/h1-infernalhosting.png.svn-base b/public/img/interface/.svn/prop-base/h1-infernalhosting.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/h1-infernalhosting.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/prop-base/suspended.png.svn-base b/public/img/interface/.svn/prop-base/suspended.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/.svn/prop-base/suspended.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/.svn/text-base/bg-body-2.png.svn-base b/public/img/interface/.svn/text-base/bg-body-2.png.svn-base
deleted file mode 100644
index 713c1aa..0000000
Binary files a/public/img/interface/.svn/text-base/bg-body-2.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-body-24.png.svn-base b/public/img/interface/.svn/text-base/bg-body-24.png.svn-base
deleted file mode 100644
index 2419308..0000000
Binary files a/public/img/interface/.svn/text-base/bg-body-24.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-body-8.png.svn-base b/public/img/interface/.svn/text-base/bg-body-8.png.svn-base
deleted file mode 100644
index ac2b91c..0000000
Binary files a/public/img/interface/.svn/text-base/bg-body-8.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-body.png.svn-base b/public/img/interface/.svn/text-base/bg-body.png.svn-base
deleted file mode 100644
index 6d03027..0000000
Binary files a/public/img/interface/.svn/text-base/bg-body.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-button.png.svn-base b/public/img/interface/.svn/text-base/bg-button.png.svn-base
deleted file mode 100644
index 9dc1bb8..0000000
Binary files a/public/img/interface/.svn/text-base/bg-button.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-content.gif.svn-base b/public/img/interface/.svn/text-base/bg-content.gif.svn-base
deleted file mode 100644
index 1e17d9c..0000000
Binary files a/public/img/interface/.svn/text-base/bg-content.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-content.png.svn-base b/public/img/interface/.svn/text-base/bg-content.png.svn-base
deleted file mode 100644
index a6038e9..0000000
Binary files a/public/img/interface/.svn/text-base/bg-content.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-corner.png.svn-base b/public/img/interface/.svn/text-base/bg-corner.png.svn-base
deleted file mode 100644
index 407126e..0000000
Binary files a/public/img/interface/.svn/text-base/bg-corner.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-footer.png.svn-base b/public/img/interface/.svn/text-base/bg-footer.png.svn-base
deleted file mode 100644
index 2a4d79c..0000000
Binary files a/public/img/interface/.svn/text-base/bg-footer.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-form-submit.gif.svn-base b/public/img/interface/.svn/text-base/bg-form-submit.gif.svn-base
deleted file mode 100644
index 2d4eef6..0000000
Binary files a/public/img/interface/.svn/text-base/bg-form-submit.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-h1-2.png.svn-base b/public/img/interface/.svn/text-base/bg-h1-2.png.svn-base
deleted file mode 100644
index 87339e9..0000000
Binary files a/public/img/interface/.svn/text-base/bg-h1-2.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-h1.png.svn-base b/public/img/interface/.svn/text-base/bg-h1.png.svn-base
deleted file mode 100644
index 9c4a7ca..0000000
Binary files a/public/img/interface/.svn/text-base/bg-h1.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-header.png.svn-base b/public/img/interface/.svn/text-base/bg-header.png.svn-base
deleted file mode 100644
index c4d306b..0000000
Binary files a/public/img/interface/.svn/text-base/bg-header.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-input.gif.svn-base b/public/img/interface/.svn/text-base/bg-input.gif.svn-base
deleted file mode 100644
index c089682..0000000
Binary files a/public/img/interface/.svn/text-base/bg-input.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-input_focus.gif.svn-base b/public/img/interface/.svn/text-base/bg-input_focus.gif.svn-base
deleted file mode 100644
index 42cc3b9..0000000
Binary files a/public/img/interface/.svn/text-base/bg-input_focus.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-leftcol.gif.svn-base b/public/img/interface/.svn/text-base/bg-leftcol.gif.svn-base
deleted file mode 100644
index 05e3e07..0000000
Binary files a/public/img/interface/.svn/text-base/bg-leftcol.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-navigation.gif.svn-base b/public/img/interface/.svn/text-base/bg-navigation.gif.svn-base
deleted file mode 100644
index 3f495c7..0000000
Binary files a/public/img/interface/.svn/text-base/bg-navigation.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/bg-warning.png.svn-base b/public/img/interface/.svn/text-base/bg-warning.png.svn-base
deleted file mode 100644
index 9565ba7..0000000
Binary files a/public/img/interface/.svn/text-base/bg-warning.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/h1-infernalhosting.png.svn-base b/public/img/interface/.svn/text-base/h1-infernalhosting.png.svn-base
deleted file mode 100644
index 57cb8bc..0000000
Binary files a/public/img/interface/.svn/text-base/h1-infernalhosting.png.svn-base and /dev/null differ
diff --git a/public/img/interface/.svn/text-base/suspended.png.svn-base b/public/img/interface/.svn/text-base/suspended.png.svn-base
deleted file mode 100644
index 112910b..0000000
Binary files a/public/img/interface/.svn/text-base/suspended.png.svn-base and /dev/null differ
diff --git a/public/img/interface/bg-body-splash.gif b/public/img/interface/bg-body-splash.gif
new file mode 100644
index 0000000..8c177d0
Binary files /dev/null and b/public/img/interface/bg-body-splash.gif differ
diff --git a/public/img/interface/bg-body-splash.png b/public/img/interface/bg-body-splash.png
new file mode 100644
index 0000000..b9fbb03
Binary files /dev/null and b/public/img/interface/bg-body-splash.png differ
diff --git a/public/img/interface/icons/.svn/entries b/public/img/interface/icons/.svn/entries
deleted file mode 100644
index 84485fc..0000000
--- a/public/img/interface/icons/.svn/entries
+++ /dev/null
@@ -1,249 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public/img/interface/icons
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-11T19:50:19.318568Z
-971
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-add_dns.png
-file
-
-
-
-
-2008-03-12T23:23:44.000000Z
-0ee32bd917b017fd2bc421e70cd8b23d
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-sort_asc.gif
-file
-
-
-
-
-2008-03-12T23:23:45.000000Z
-5a241ba91ef4e13060f90fbf224bceba
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-back.png
-file
-
-
-
-
-2008-03-12T23:23:45.000000Z
-6aef38ae019c833797eb579cb9b23b96
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-users.png
-file
-
-
-
-
-2008-03-12T23:23:46.000000Z
-84f194cf34cf395ee94181596f42a513
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-delete.png
-file
-
-
-
-
-2008-03-12T23:23:46.000000Z
-8c2991b857d223fda62db3fba73234e7
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-visa.png
-file
-
-
-
-
-2008-03-12T23:23:46.000000Z
-d7aa1697d06e9b1fb1117ceaad641112
-2008-03-11T19:50:19.318568Z
-971
-ryan
-has-props
-
-paypal-32x32.png
-file
-
-
-
-
-2008-03-12T23:23:47.000000Z
-5e82b835beabf76da54fabf6e32d5032
-2008-03-11T19:50:19.318568Z
-971
-ryan
-has-props
-
-sort_desc.gif
-file
-
-
-
-
-2008-03-12T23:23:47.000000Z
-7bf9470729c0aab0bdc7baa5ae25a5e8
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-web.png
-file
-
-
-
-
-2008-03-12T23:23:47.000000Z
-ef67a4e9689efda71625a2ef894fb700
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-discover.png
-file
-
-
-
-
-2008-03-12T23:23:48.000000Z
-6824c4041aee0d0b97c789a01df90119
-2008-03-11T19:50:19.318568Z
-971
-ryan
-has-props
-
-next.png
-file
-
-
-
-
-2008-03-12T23:23:48.000000Z
-ac05f4c7851ec343133822944de78637
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-dns.png
-file
-
-
-
-
-2008-03-12T23:23:48.000000Z
-114bd4126e3fb98776109a772c981d95
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-edit.png
-file
-
-
-
-
-2008-03-12T23:23:49.000000Z
-97e5dbd9f52e9a29a4515c6af3fb266e
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-mastercard.png
-file
-
-
-
-
-2008-03-12T23:23:49.000000Z
-127e98eabe2e4df56ba434dc9465c9de
-2008-03-11T19:50:19.318568Z
-971
-ryan
-has-props
-
-add_user.png
-file
-
-
-
-
-2008-03-12T23:23:50.000000Z
-7e2a9760c0e8954c02b65594663d5753
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-help.png
-file
-
-
-
-
-2008-03-12T23:23:50.000000Z
-3ad5e6083e5cd71d2e3e895488aa1153
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-alert.gif
-file
-
-
-
-
-2008-03-12T23:23:51.000000Z
-29953f02392cec75099f9432869726e8
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
diff --git a/public/img/interface/icons/.svn/format b/public/img/interface/icons/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/img/interface/icons/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/img/interface/icons/.svn/prop-base/add_dns.png.svn-base b/public/img/interface/icons/.svn/prop-base/add_dns.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/add_dns.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/add_user.png.svn-base b/public/img/interface/icons/.svn/prop-base/add_user.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/add_user.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/alert.gif.svn-base b/public/img/interface/icons/.svn/prop-base/alert.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/alert.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/back.png.svn-base b/public/img/interface/icons/.svn/prop-base/back.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/back.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/delete.png.svn-base b/public/img/interface/icons/.svn/prop-base/delete.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/delete.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/discover.png.svn-base b/public/img/interface/icons/.svn/prop-base/discover.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/discover.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/dns.png.svn-base b/public/img/interface/icons/.svn/prop-base/dns.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/dns.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/edit.png.svn-base b/public/img/interface/icons/.svn/prop-base/edit.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/edit.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/help.png.svn-base b/public/img/interface/icons/.svn/prop-base/help.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/help.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/mastercard.png.svn-base b/public/img/interface/icons/.svn/prop-base/mastercard.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/mastercard.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/next.png.svn-base b/public/img/interface/icons/.svn/prop-base/next.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/next.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/paypal-32x32.png.svn-base b/public/img/interface/icons/.svn/prop-base/paypal-32x32.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/paypal-32x32.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/sort_asc.gif.svn-base b/public/img/interface/icons/.svn/prop-base/sort_asc.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/sort_asc.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/sort_desc.gif.svn-base b/public/img/interface/icons/.svn/prop-base/sort_desc.gif.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/sort_desc.gif.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/users.png.svn-base b/public/img/interface/icons/.svn/prop-base/users.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/users.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/visa.png.svn-base b/public/img/interface/icons/.svn/prop-base/visa.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/visa.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/prop-base/web.png.svn-base b/public/img/interface/icons/.svn/prop-base/web.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/icons/.svn/prop-base/web.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/icons/.svn/text-base/add_dns.png.svn-base b/public/img/interface/icons/.svn/text-base/add_dns.png.svn-base
deleted file mode 100644
index 7c36b2b..0000000
Binary files a/public/img/interface/icons/.svn/text-base/add_dns.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/add_user.png.svn-base b/public/img/interface/icons/.svn/text-base/add_user.png.svn-base
deleted file mode 100644
index a252293..0000000
Binary files a/public/img/interface/icons/.svn/text-base/add_user.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/alert.gif.svn-base b/public/img/interface/icons/.svn/text-base/alert.gif.svn-base
deleted file mode 100644
index 3f40fb9..0000000
Binary files a/public/img/interface/icons/.svn/text-base/alert.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/back.png.svn-base b/public/img/interface/icons/.svn/text-base/back.png.svn-base
deleted file mode 100644
index 4d43d2b..0000000
Binary files a/public/img/interface/icons/.svn/text-base/back.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/delete.png.svn-base b/public/img/interface/icons/.svn/text-base/delete.png.svn-base
deleted file mode 100644
index ab6808f..0000000
Binary files a/public/img/interface/icons/.svn/text-base/delete.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/discover.png.svn-base b/public/img/interface/icons/.svn/text-base/discover.png.svn-base
deleted file mode 100644
index 46b5c31..0000000
Binary files a/public/img/interface/icons/.svn/text-base/discover.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/dns.png.svn-base b/public/img/interface/icons/.svn/text-base/dns.png.svn-base
deleted file mode 100644
index 18a0149..0000000
Binary files a/public/img/interface/icons/.svn/text-base/dns.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/edit.png.svn-base b/public/img/interface/icons/.svn/text-base/edit.png.svn-base
deleted file mode 100644
index 9460dfc..0000000
Binary files a/public/img/interface/icons/.svn/text-base/edit.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/help.png.svn-base b/public/img/interface/icons/.svn/text-base/help.png.svn-base
deleted file mode 100644
index f25fc3f..0000000
Binary files a/public/img/interface/icons/.svn/text-base/help.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/mastercard.png.svn-base b/public/img/interface/icons/.svn/text-base/mastercard.png.svn-base
deleted file mode 100644
index b39dc13..0000000
Binary files a/public/img/interface/icons/.svn/text-base/mastercard.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/next.png.svn-base b/public/img/interface/icons/.svn/text-base/next.png.svn-base
deleted file mode 100644
index b99a57e..0000000
Binary files a/public/img/interface/icons/.svn/text-base/next.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/paypal-32x32.png.svn-base b/public/img/interface/icons/.svn/text-base/paypal-32x32.png.svn-base
deleted file mode 100644
index 74ed3ce..0000000
Binary files a/public/img/interface/icons/.svn/text-base/paypal-32x32.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/sort_asc.gif.svn-base b/public/img/interface/icons/.svn/text-base/sort_asc.gif.svn-base
deleted file mode 100644
index 6330232..0000000
Binary files a/public/img/interface/icons/.svn/text-base/sort_asc.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/sort_desc.gif.svn-base b/public/img/interface/icons/.svn/text-base/sort_desc.gif.svn-base
deleted file mode 100644
index b3a681c..0000000
Binary files a/public/img/interface/icons/.svn/text-base/sort_desc.gif.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/users.png.svn-base b/public/img/interface/icons/.svn/text-base/users.png.svn-base
deleted file mode 100644
index 9d2d500..0000000
Binary files a/public/img/interface/icons/.svn/text-base/users.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/visa.png.svn-base b/public/img/interface/icons/.svn/text-base/visa.png.svn-base
deleted file mode 100644
index 330ace2..0000000
Binary files a/public/img/interface/icons/.svn/text-base/visa.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/.svn/text-base/web.png.svn-base b/public/img/interface/icons/.svn/text-base/web.png.svn-base
deleted file mode 100644
index ac5957a..0000000
Binary files a/public/img/interface/icons/.svn/text-base/web.png.svn-base and /dev/null differ
diff --git a/public/img/interface/icons/discover.png b/public/img/interface/icons/discover.png
deleted file mode 100644
index 46b5c31..0000000
Binary files a/public/img/interface/icons/discover.png and /dev/null differ
diff --git a/public/img/interface/icons/mastercard.png b/public/img/interface/icons/mastercard.png
deleted file mode 100644
index b39dc13..0000000
Binary files a/public/img/interface/icons/mastercard.png and /dev/null differ
diff --git a/public/img/interface/icons/paypal-32x32.png b/public/img/interface/icons/paypal-32x32.png
deleted file mode 100644
index 74ed3ce..0000000
Binary files a/public/img/interface/icons/paypal-32x32.png and /dev/null differ
diff --git a/public/img/interface/icons/visa.png b/public/img/interface/icons/visa.png
deleted file mode 100644
index 330ace2..0000000
Binary files a/public/img/interface/icons/visa.png and /dev/null differ
diff --git a/public/img/interface/panel/.svn/entries b/public/img/interface/panel/.svn/entries
deleted file mode 100644
index 4d2d62a..0000000
--- a/public/img/interface/panel/.svn/entries
+++ /dev/null
@@ -1,145 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public/img/interface/panel
-svn://svn.evilcode.net/sites
-
-
-
-2007-10-24T18:46:39.292425Z
-949
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-account.png
-file
-
-
-
-
-2008-03-12T23:23:32.000000Z
-84f194cf34cf395ee94181596f42a513
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-web.png
-file
-
-
-
-
-2008-03-12T23:23:32.000000Z
-ef67a4e9689efda71625a2ef894fb700
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-billing.png
-file
-
-
-
-
-2008-03-12T23:23:33.000000Z
-59456b78a8d0a450e71b91f6e9a69c68
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-users.png
-file
-
-
-
-
-2008-03-12T23:23:33.000000Z
-84f194cf34cf395ee94181596f42a513
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-mail.png
-file
-
-
-
-
-2008-03-12T23:23:34.000000Z
-2fe888f851a6b9080d0794e4aaa5e96a
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-status.png
-file
-
-
-
-
-2008-03-12T23:23:34.000000Z
-4f61223f420766fd9343eecff559f3f4
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-database.png
-file
-
-
-
-
-2008-03-12T23:23:34.000000Z
-556b9ebe7fa3e49f183a2d4c1b567433
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-dns.png
-file
-
-
-
-
-2008-03-12T23:23:35.000000Z
-114bd4126e3fb98776109a772c981d95
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
-email.png
-file
-
-
-
-
-2008-03-12T23:23:35.000000Z
-2fe888f851a6b9080d0794e4aaa5e96a
-2007-10-24T18:46:39.292425Z
-949
-ryan
-has-props
-
diff --git a/public/img/interface/panel/.svn/format b/public/img/interface/panel/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/img/interface/panel/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/img/interface/panel/.svn/prop-base/account.png.svn-base b/public/img/interface/panel/.svn/prop-base/account.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/account.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/billing.png.svn-base b/public/img/interface/panel/.svn/prop-base/billing.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/billing.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/database.png.svn-base b/public/img/interface/panel/.svn/prop-base/database.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/database.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/dns.png.svn-base b/public/img/interface/panel/.svn/prop-base/dns.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/dns.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/email.png.svn-base b/public/img/interface/panel/.svn/prop-base/email.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/email.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/mail.png.svn-base b/public/img/interface/panel/.svn/prop-base/mail.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/mail.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/status.png.svn-base b/public/img/interface/panel/.svn/prop-base/status.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/status.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/users.png.svn-base b/public/img/interface/panel/.svn/prop-base/users.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/users.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/prop-base/web.png.svn-base b/public/img/interface/panel/.svn/prop-base/web.png.svn-base
deleted file mode 100644
index 5e9587e..0000000
--- a/public/img/interface/panel/.svn/prop-base/web.png.svn-base
+++ /dev/null
@@ -1,5 +0,0 @@
-K 13
-svn:mime-type
-V 24
-application/octet-stream
-END
diff --git a/public/img/interface/panel/.svn/text-base/account.png.svn-base b/public/img/interface/panel/.svn/text-base/account.png.svn-base
deleted file mode 100644
index 9d2d500..0000000
Binary files a/public/img/interface/panel/.svn/text-base/account.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/billing.png.svn-base b/public/img/interface/panel/.svn/text-base/billing.png.svn-base
deleted file mode 100644
index 9248971..0000000
Binary files a/public/img/interface/panel/.svn/text-base/billing.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/database.png.svn-base b/public/img/interface/panel/.svn/text-base/database.png.svn-base
deleted file mode 100644
index 068ffeb..0000000
Binary files a/public/img/interface/panel/.svn/text-base/database.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/dns.png.svn-base b/public/img/interface/panel/.svn/text-base/dns.png.svn-base
deleted file mode 100644
index 18a0149..0000000
Binary files a/public/img/interface/panel/.svn/text-base/dns.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/email.png.svn-base b/public/img/interface/panel/.svn/text-base/email.png.svn-base
deleted file mode 100644
index 859251f..0000000
Binary files a/public/img/interface/panel/.svn/text-base/email.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/mail.png.svn-base b/public/img/interface/panel/.svn/text-base/mail.png.svn-base
deleted file mode 100644
index 859251f..0000000
Binary files a/public/img/interface/panel/.svn/text-base/mail.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/status.png.svn-base b/public/img/interface/panel/.svn/text-base/status.png.svn-base
deleted file mode 100644
index a9850ee..0000000
Binary files a/public/img/interface/panel/.svn/text-base/status.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/users.png.svn-base b/public/img/interface/panel/.svn/text-base/users.png.svn-base
deleted file mode 100644
index 9d2d500..0000000
Binary files a/public/img/interface/panel/.svn/text-base/users.png.svn-base and /dev/null differ
diff --git a/public/img/interface/panel/.svn/text-base/web.png.svn-base b/public/img/interface/panel/.svn/text-base/web.png.svn-base
deleted file mode 100644
index ac5957a..0000000
Binary files a/public/img/interface/panel/.svn/text-base/web.png.svn-base and /dev/null differ
diff --git a/public/img/splash-nov07.jpg b/public/img/splash-nov07.jpg
new file mode 100644
index 0000000..d5329d1
Binary files /dev/null and b/public/img/splash-nov07.jpg differ
diff --git a/public/javascripts/.svn/entries b/public/javascripts/.svn/entries
deleted file mode 100644
index 9bc5e9c..0000000
--- a/public/javascripts/.svn/entries
+++ /dev/null
@@ -1,88 +0,0 @@
-8
-
-dir
-988
-svn://svn.evilcode.net/sites/infernalhosting.net/trunk/public/javascripts
-svn://svn.evilcode.net/sites
-
-
-
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-
-svn:special svn:externals svn:needs-lock
-
-
-
-
-
-
-
-
-
-
-
-b1206cc1-2106-0410-84da-53eeff8bd16c
-
-prototype.js
-file
-
-
-
-
-2008-03-12T23:23:20.000000Z
-02610b10c8604855e35f30a19013b9bc
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-effects.js
-file
-
-
-
-
-2008-03-12T23:23:20.000000Z
-4f4c0003381c7b581c1cd4e65cfb7b7a
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-dragdrop.js
-file
-
-
-
-
-2008-03-12T23:23:21.000000Z
-59bc3aee2cf322c08aee9364305d38df
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-application.js
-file
-
-
-
-
-2008-03-12T23:23:21.000000Z
-8a750594360b0bd302e15147eacadc9a
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
-controls.js
-file
-
-
-
-
-2008-03-12T23:23:22.000000Z
-a4e3a77e069f728659c99404290d2ca9
-2008-03-12T23:19:06.376507Z
-981
-ryan
-
diff --git a/public/javascripts/.svn/format b/public/javascripts/.svn/format
deleted file mode 100644
index 45a4fb7..0000000
--- a/public/javascripts/.svn/format
+++ /dev/null
@@ -1 +0,0 @@
-8
diff --git a/public/javascripts/.svn/text-base/application.js.svn-base b/public/javascripts/.svn/text-base/application.js.svn-base
deleted file mode 100644
index fe45776..0000000
--- a/public/javascripts/.svn/text-base/application.js.svn-base
+++ /dev/null
@@ -1,2 +0,0 @@
-// Place your application-specific JavaScript functions and classes here
-// This file is automatically included by javascript_include_tag :defaults
diff --git a/public/javascripts/.svn/text-base/controls.js.svn-base b/public/javascripts/.svn/text-base/controls.js.svn-base
deleted file mode 100644
index fbc4418..0000000
--- a/public/javascripts/.svn/text-base/controls.js.svn-base
+++ /dev/null
@@ -1,963 +0,0 @@
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005-2007 Ivan Krstic (http://blogs.law.harvard.edu/ivan)
-// (c) 2005-2007 Jon Tirsen (http://www.tirsen.com)
-// Contributors:
-// Richard Livsey
-// Rahul Bhargava
-// Rob Wills
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-// Autocompleter.Base handles all the autocompletion functionality
-// that's independent of the data source for autocompletion. This
-// includes drawing the autocompletion menu, observing keyboard
-// and mouse events, and similar.
-//
-// Specific autocompleters need to provide, at the very least,
-// a getUpdatedChoices function that will be invoked every time
-// the text inside the monitored textbox changes. This method
-// should get the text for which to provide autocompletion by
-// invoking this.getToken(), NOT by directly accessing
-// this.element.value. This is to allow incremental tokenized
-// autocompletion. Specific auto-completion logic (AJAX, etc)
-// belongs in getUpdatedChoices.
-//
-// Tokenized incremental autocompletion is enabled automatically
-// when an autocompleter is instantiated with the 'tokens' option
-// in the options parameter, e.g.:
-// new Ajax.Autocompleter('id','upd', '/url/', { tokens: ',' });
-// will incrementally autocomplete with a comma as the token.
-// Additionally, ',' in the above example can be replaced with
-// a token array, e.g. { tokens: [',', '\n'] } which
-// enables autocompletion on multiple tokens. This is most
-// useful when one of the tokens is \n (a newline), as it
-// allows smart autocompletion after linebreaks.
-
-if(typeof Effect == 'undefined')
- throw("controls.js requires including script.aculo.us' effects.js library");
-
-var Autocompleter = { }
-Autocompleter.Base = Class.create({
- baseInitialize: function(element, update, options) {
- element = $(element)
- this.element = element;
- this.update = $(update);
- this.hasFocus = false;
- this.changed = false;
- this.active = false;
- this.index = 0;
- this.entryCount = 0;
- this.oldElementValue = this.element.value;
-
- if(this.setOptions)
- this.setOptions(options);
- else
- this.options = options || { };
-
- this.options.paramName = this.options.paramName || this.element.name;
- this.options.tokens = this.options.tokens || [];
- this.options.frequency = this.options.frequency || 0.4;
- this.options.minChars = this.options.minChars || 1;
- this.options.onShow = this.options.onShow ||
- function(element, update){
- if(!update.style.position || update.style.position=='absolute') {
- update.style.position = 'absolute';
- Position.clone(element, update, {
- setHeight: false,
- offsetTop: element.offsetHeight
- });
- }
- Effect.Appear(update,{duration:0.15});
- };
- this.options.onHide = this.options.onHide ||
- function(element, update){ new Effect.Fade(update,{duration:0.15}) };
-
- if(typeof(this.options.tokens) == 'string')
- this.options.tokens = new Array(this.options.tokens);
- // Force carriage returns as token delimiters anyway
- if (!this.options.tokens.include('\n'))
- this.options.tokens.push('\n');
-
- this.observer = null;
-
- this.element.setAttribute('autocomplete','off');
-
- Element.hide(this.update);
-
- Event.observe(this.element, 'blur', this.onBlur.bindAsEventListener(this));
- Event.observe(this.element, 'keydown', this.onKeyPress.bindAsEventListener(this));
- },
-
- show: function() {
- if(Element.getStyle(this.update, 'display')=='none') this.options.onShow(this.element, this.update);
- if(!this.iefix &&
- (Prototype.Browser.IE) &&
- (Element.getStyle(this.update, 'position')=='absolute')) {
- new Insertion.After(this.update,
- '');
- this.iefix = $(this.update.id+'_iefix');
- }
- if(this.iefix) setTimeout(this.fixIEOverlapping.bind(this), 50);
- },
-
- fixIEOverlapping: function() {
- Position.clone(this.update, this.iefix, {setTop:(!this.update.style.height)});
- this.iefix.style.zIndex = 1;
- this.update.style.zIndex = 2;
- Element.show(this.iefix);
- },
-
- hide: function() {
- this.stopIndicator();
- if(Element.getStyle(this.update, 'display')!='none') this.options.onHide(this.element, this.update);
- if(this.iefix) Element.hide(this.iefix);
- },
-
- startIndicator: function() {
- if(this.options.indicator) Element.show(this.options.indicator);
- },
-
- stopIndicator: function() {
- if(this.options.indicator) Element.hide(this.options.indicator);
- },
-
- onKeyPress: function(event) {
- if(this.active)
- switch(event.keyCode) {
- case Event.KEY_TAB:
- case Event.KEY_RETURN:
- this.selectEntry();
- Event.stop(event);
- case Event.KEY_ESC:
- this.hide();
- this.active = false;
- Event.stop(event);
- return;
- case Event.KEY_LEFT:
- case Event.KEY_RIGHT:
- return;
- case Event.KEY_UP:
- this.markPrevious();
- this.render();
- Event.stop(event);
- return;
- case Event.KEY_DOWN:
- this.markNext();
- this.render();
- Event.stop(event);
- return;
- }
- else
- if(event.keyCode==Event.KEY_TAB || event.keyCode==Event.KEY_RETURN ||
- (Prototype.Browser.WebKit > 0 && event.keyCode == 0)) return;
-
- this.changed = true;
- this.hasFocus = true;
-
- if(this.observer) clearTimeout(this.observer);
- this.observer =
- setTimeout(this.onObserverEvent.bind(this), this.options.frequency*1000);
- },
-
- activate: function() {
- this.changed = false;
- this.hasFocus = true;
- this.getUpdatedChoices();
- },
-
- onHover: function(event) {
- var element = Event.findElement(event, 'LI');
- if(this.index != element.autocompleteIndex)
- {
- this.index = element.autocompleteIndex;
- this.render();
- }
- Event.stop(event);
- },
-
- onClick: function(event) {
- var element = Event.findElement(event, 'LI');
- this.index = element.autocompleteIndex;
- this.selectEntry();
- this.hide();
- },
-
- onBlur: function(event) {
- // needed to make click events working
- setTimeout(this.hide.bind(this), 250);
- this.hasFocus = false;
- this.active = false;
- },
-
- render: function() {
- if(this.entryCount > 0) {
- for (var i = 0; i < this.entryCount; i++)
- this.index==i ?
- Element.addClassName(this.getEntry(i),"selected") :
- Element.removeClassName(this.getEntry(i),"selected");
- if(this.hasFocus) {
- this.show();
- this.active = true;
- }
- } else {
- this.active = false;
- this.hide();
- }
- },
-
- markPrevious: function() {
- if(this.index > 0) this.index--
- else this.index = this.entryCount-1;
- this.getEntry(this.index).scrollIntoView(true);
- },
-
- markNext: function() {
- if(this.index < this.entryCount-1) this.index++
- else this.index = 0;
- this.getEntry(this.index).scrollIntoView(false);
- },
-
- getEntry: function(index) {
- return this.update.firstChild.childNodes[index];
- },
-
- getCurrentEntry: function() {
- return this.getEntry(this.index);
- },
-
- selectEntry: function() {
- this.active = false;
- this.updateElement(this.getCurrentEntry());
- },
-
- updateElement: function(selectedElement) {
- if (this.options.updateElement) {
- this.options.updateElement(selectedElement);
- return;
- }
- var value = '';
- if (this.options.select) {
- var nodes = $(selectedElement).select('.' + this.options.select) || [];
- if(nodes.length>0) value = Element.collectTextNodes(nodes[0], this.options.select);
- } else
- value = Element.collectTextNodesIgnoreClass(selectedElement, 'informal');
-
- var bounds = this.getTokenBounds();
- if (bounds[0] != -1) {
- var newValue = this.element.value.substr(0, bounds[0]);
- var whitespace = this.element.value.substr(bounds[0]).match(/^\s+/);
- if (whitespace)
- newValue += whitespace[0];
- this.element.value = newValue + value + this.element.value.substr(bounds[1]);
- } else {
- this.element.value = value;
- }
- this.oldElementValue = this.element.value;
- this.element.focus();
-
- if (this.options.afterUpdateElement)
- this.options.afterUpdateElement(this.element, selectedElement);
- },
-
- updateChoices: function(choices) {
- if(!this.changed && this.hasFocus) {
- this.update.innerHTML = choices;
- Element.cleanWhitespace(this.update);
- Element.cleanWhitespace(this.update.down());
-
- if(this.update.firstChild && this.update.down().childNodes) {
- this.entryCount =
- this.update.down().childNodes.length;
- for (var i = 0; i < this.entryCount; i++) {
- var entry = this.getEntry(i);
- entry.autocompleteIndex = i;
- this.addObservers(entry);
- }
- } else {
- this.entryCount = 0;
- }
-
- this.stopIndicator();
- this.index = 0;
-
- if(this.entryCount==1 && this.options.autoSelect) {
- this.selectEntry();
- this.hide();
- } else {
- this.render();
- }
- }
- },
-
- addObservers: function(element) {
- Event.observe(element, "mouseover", this.onHover.bindAsEventListener(this));
- Event.observe(element, "click", this.onClick.bindAsEventListener(this));
- },
-
- onObserverEvent: function() {
- this.changed = false;
- this.tokenBounds = null;
- if(this.getToken().length>=this.options.minChars) {
- this.getUpdatedChoices();
- } else {
- this.active = false;
- this.hide();
- }
- this.oldElementValue = this.element.value;
- },
-
- getToken: function() {
- var bounds = this.getTokenBounds();
- return this.element.value.substring(bounds[0], bounds[1]).strip();
- },
-
- getTokenBounds: function() {
- if (null != this.tokenBounds) return this.tokenBounds;
- var value = this.element.value;
- if (value.strip().empty()) return [-1, 0];
- var diff = arguments.callee.getFirstDifferencePos(value, this.oldElementValue);
- var offset = (diff == this.oldElementValue.length ? 1 : 0);
- var prevTokenPos = -1, nextTokenPos = value.length;
- var tp;
- for (var index = 0, l = this.options.tokens.length; index < l; ++index) {
- tp = value.lastIndexOf(this.options.tokens[index], diff + offset - 1);
- if (tp > prevTokenPos) prevTokenPos = tp;
- tp = value.indexOf(this.options.tokens[index], diff + offset);
- if (-1 != tp && tp < nextTokenPos) nextTokenPos = tp;
- }
- return (this.tokenBounds = [prevTokenPos + 1, nextTokenPos]);
- }
-});
-
-Autocompleter.Base.prototype.getTokenBounds.getFirstDifferencePos = function(newS, oldS) {
- var boundary = Math.min(newS.length, oldS.length);
- for (var index = 0; index < boundary; ++index)
- if (newS[index] != oldS[index])
- return index;
- return boundary;
-};
-
-Ajax.Autocompleter = Class.create(Autocompleter.Base, {
- initialize: function(element, update, url, options) {
- this.baseInitialize(element, update, options);
- this.options.asynchronous = true;
- this.options.onComplete = this.onComplete.bind(this);
- this.options.defaultParams = this.options.parameters || null;
- this.url = url;
- },
-
- getUpdatedChoices: function() {
- this.startIndicator();
-
- var entry = encodeURIComponent(this.options.paramName) + '=' +
- encodeURIComponent(this.getToken());
-
- this.options.parameters = this.options.callback ?
- this.options.callback(this.element, entry) : entry;
-
- if(this.options.defaultParams)
- this.options.parameters += '&' + this.options.defaultParams;
-
- new Ajax.Request(this.url, this.options);
- },
-
- onComplete: function(request) {
- this.updateChoices(request.responseText);
- }
-});
-
-// The local array autocompleter. Used when you'd prefer to
-// inject an array of autocompletion options into the page, rather
-// than sending out Ajax queries, which can be quite slow sometimes.
-//
-// The constructor takes four parameters. The first two are, as usual,
-// the id of the monitored textbox, and id of the autocompletion menu.
-// The third is the array you want to autocomplete from, and the fourth
-// is the options block.
-//
-// Extra local autocompletion options:
-// - choices - How many autocompletion choices to offer
-//
-// - partialSearch - If false, the autocompleter will match entered
-// text only at the beginning of strings in the
-// autocomplete array. Defaults to true, which will
-// match text at the beginning of any *word* in the
-// strings in the autocomplete array. If you want to
-// search anywhere in the string, additionally set
-// the option fullSearch to true (default: off).
-//
-// - fullSsearch - Search anywhere in autocomplete array strings.
-//
-// - partialChars - How many characters to enter before triggering
-// a partial match (unlike minChars, which defines
-// how many characters are required to do any match
-// at all). Defaults to 2.
-//
-// - ignoreCase - Whether to ignore case when autocompleting.
-// Defaults to true.
-//
-// It's possible to pass in a custom function as the 'selector'
-// option, if you prefer to write your own autocompletion logic.
-// In that case, the other options above will not apply unless
-// you support them.
-
-Autocompleter.Local = Class.create(Autocompleter.Base, {
- initialize: function(element, update, array, options) {
- this.baseInitialize(element, update, options);
- this.options.array = array;
- },
-
- getUpdatedChoices: function() {
- this.updateChoices(this.options.selector(this));
- },
-
- setOptions: function(options) {
- this.options = Object.extend({
- choices: 10,
- partialSearch: true,
- partialChars: 2,
- ignoreCase: true,
- fullSearch: false,
- selector: function(instance) {
- var ret = []; // Beginning matches
- var partial = []; // Inside matches
- var entry = instance.getToken();
- var count = 0;
-
- for (var i = 0; i < instance.options.array.length &&
- ret.length < instance.options.choices ; i++) {
-
- var elem = instance.options.array[i];
- var foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase()) :
- elem.indexOf(entry);
-
- while (foundPos != -1) {
- if (foundPos == 0 && elem.length != entry.length) {
- ret.push("" + elem.substr(0, entry.length) + "" +
- elem.substr(entry.length) + " ");
- break;
- } else if (entry.length >= instance.options.partialChars &&
- instance.options.partialSearch && foundPos != -1) {
- if (instance.options.fullSearch || /\s/.test(elem.substr(foundPos-1,1))) {
- partial.push("" + elem.substr(0, foundPos) + "" +
- elem.substr(foundPos, entry.length) + "" + elem.substr(
- foundPos + entry.length) + " ");
- break;
- }
- }
-
- foundPos = instance.options.ignoreCase ?
- elem.toLowerCase().indexOf(entry.toLowerCase(), foundPos + 1) :
- elem.indexOf(entry, foundPos + 1);
-
- }
- }
- if (partial.length)
- ret = ret.concat(partial.slice(0, instance.options.choices - ret.length))
- return "" + ret.join('') + "
";
- }
- }, options || { });
- }
-});
-
-// AJAX in-place editor and collection editor
-// Full rewrite by Christophe Porteneuve (April 2007).
-
-// Use this if you notice weird scrolling problems on some browsers,
-// the DOM might be a bit confused when this gets called so do this
-// waits 1 ms (with setTimeout) until it does the activation
-Field.scrollFreeActivate = function(field) {
- setTimeout(function() {
- Field.activate(field);
- }, 1);
-}
-
-Ajax.InPlaceEditor = Class.create({
- initialize: function(element, url, options) {
- this.url = url;
- this.element = element = $(element);
- this.prepareOptions();
- this._controls = { };
- arguments.callee.dealWithDeprecatedOptions(options); // DEPRECATION LAYER!!!
- Object.extend(this.options, options || { });
- if (!this.options.formId && this.element.id) {
- this.options.formId = this.element.id + '-inplaceeditor';
- if ($(this.options.formId))
- this.options.formId = '';
- }
- if (this.options.externalControl)
- this.options.externalControl = $(this.options.externalControl);
- if (!this.options.externalControl)
- this.options.externalControlOnly = false;
- this._originalBackground = this.element.getStyle('background-color') || 'transparent';
- this.element.title = this.options.clickToEditText;
- this._boundCancelHandler = this.handleFormCancellation.bind(this);
- this._boundComplete = (this.options.onComplete || Prototype.emptyFunction).bind(this);
- this._boundFailureHandler = this.handleAJAXFailure.bind(this);
- this._boundSubmitHandler = this.handleFormSubmission.bind(this);
- this._boundWrapperHandler = this.wrapUp.bind(this);
- this.registerListeners();
- },
- checkForEscapeOrReturn: function(e) {
- if (!this._editing || e.ctrlKey || e.altKey || e.shiftKey) return;
- if (Event.KEY_ESC == e.keyCode)
- this.handleFormCancellation(e);
- else if (Event.KEY_RETURN == e.keyCode)
- this.handleFormSubmission(e);
- },
- createControl: function(mode, handler, extraClasses) {
- var control = this.options[mode + 'Control'];
- var text = this.options[mode + 'Text'];
- if ('button' == control) {
- var btn = document.createElement('input');
- btn.type = 'submit';
- btn.value = text;
- btn.className = 'editor_' + mode + '_button';
- if ('cancel' == mode)
- btn.onclick = this._boundCancelHandler;
- this._form.appendChild(btn);
- this._controls[mode] = btn;
- } else if ('link' == control) {
- var link = document.createElement('a');
- link.href = '#';
- link.appendChild(document.createTextNode(text));
- link.onclick = 'cancel' == mode ? this._boundCancelHandler : this._boundSubmitHandler;
- link.className = 'editor_' + mode + '_link';
- if (extraClasses)
- link.className += ' ' + extraClasses;
- this._form.appendChild(link);
- this._controls[mode] = link;
- }
- },
- createEditField: function() {
- var text = (this.options.loadTextURL ? this.options.loadingText : this.getText());
- var fld;
- if (1 >= this.options.rows && !/\r|\n/.test(this.getText())) {
- fld = document.createElement('input');
- fld.type = 'text';
- var size = this.options.size || this.options.cols || 0;
- if (0 < size) fld.size = size;
- } else {
- fld = document.createElement('textarea');
- fld.rows = (1 >= this.options.rows ? this.options.autoRows : this.options.rows);
- fld.cols = this.options.cols || 40;
- }
- fld.name = this.options.paramName;
- fld.value = text; // No HTML breaks conversion anymore
- fld.className = 'editor_field';
- if (this.options.submitOnBlur)
- fld.onblur = this._boundSubmitHandler;
- this._controls.editor = fld;
- if (this.options.loadTextURL)
- this.loadExternalText();
- this._form.appendChild(this._controls.editor);
- },
- createForm: function() {
- var ipe = this;
- function addText(mode, condition) {
- var text = ipe.options['text' + mode + 'Controls'];
- if (!text || condition === false) return;
- ipe._form.appendChild(document.createTextNode(text));
- };
- this._form = $(document.createElement('form'));
- this._form.id = this.options.formId;
- this._form.addClassName(this.options.formClassName);
- this._form.onsubmit = this._boundSubmitHandler;
- this.createEditField();
- if ('textarea' == this._controls.editor.tagName.toLowerCase())
- this._form.appendChild(document.createElement('br'));
- if (this.options.onFormCustomization)
- this.options.onFormCustomization(this, this._form);
- addText('Before', this.options.okControl || this.options.cancelControl);
- this.createControl('ok', this._boundSubmitHandler);
- addText('Between', this.options.okControl && this.options.cancelControl);
- this.createControl('cancel', this._boundCancelHandler, 'editor_cancel');
- addText('After', this.options.okControl || this.options.cancelControl);
- },
- destroy: function() {
- if (this._oldInnerHTML)
- this.element.innerHTML = this._oldInnerHTML;
- this.leaveEditMode();
- this.unregisterListeners();
- },
- enterEditMode: function(e) {
- if (this._saving || this._editing) return;
- this._editing = true;
- this.triggerCallback('onEnterEditMode');
- if (this.options.externalControl)
- this.options.externalControl.hide();
- this.element.hide();
- this.createForm();
- this.element.parentNode.insertBefore(this._form, this.element);
- if (!this.options.loadTextURL)
- this.postProcessEditField();
- if (e) Event.stop(e);
- },
- enterHover: function(e) {
- if (this.options.hoverClassName)
- this.element.addClassName(this.options.hoverClassName);
- if (this._saving) return;
- this.triggerCallback('onEnterHover');
- },
- getText: function() {
- return this.element.innerHTML;
- },
- handleAJAXFailure: function(transport) {
- this.triggerCallback('onFailure', transport);
- if (this._oldInnerHTML) {
- this.element.innerHTML = this._oldInnerHTML;
- this._oldInnerHTML = null;
- }
- },
- handleFormCancellation: function(e) {
- this.wrapUp();
- if (e) Event.stop(e);
- },
- handleFormSubmission: function(e) {
- var form = this._form;
- var value = $F(this._controls.editor);
- this.prepareSubmission();
- var params = this.options.callback(form, value) || '';
- if (Object.isString(params))
- params = params.toQueryParams();
- params.editorId = this.element.id;
- if (this.options.htmlResponse) {
- var options = Object.extend({ evalScripts: true }, this.options.ajaxOptions);
- Object.extend(options, {
- parameters: params,
- onComplete: this._boundWrapperHandler,
- onFailure: this._boundFailureHandler
- });
- new Ajax.Updater({ success: this.element }, this.url, options);
- } else {
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
- Object.extend(options, {
- parameters: params,
- onComplete: this._boundWrapperHandler,
- onFailure: this._boundFailureHandler
- });
- new Ajax.Request(this.url, options);
- }
- if (e) Event.stop(e);
- },
- leaveEditMode: function() {
- this.element.removeClassName(this.options.savingClassName);
- this.removeForm();
- this.leaveHover();
- this.element.style.backgroundColor = this._originalBackground;
- this.element.show();
- if (this.options.externalControl)
- this.options.externalControl.show();
- this._saving = false;
- this._editing = false;
- this._oldInnerHTML = null;
- this.triggerCallback('onLeaveEditMode');
- },
- leaveHover: function(e) {
- if (this.options.hoverClassName)
- this.element.removeClassName(this.options.hoverClassName);
- if (this._saving) return;
- this.triggerCallback('onLeaveHover');
- },
- loadExternalText: function() {
- this._form.addClassName(this.options.loadingClassName);
- this._controls.editor.disabled = true;
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
- Object.extend(options, {
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
- onComplete: Prototype.emptyFunction,
- onSuccess: function(transport) {
- this._form.removeClassName(this.options.loadingClassName);
- var text = transport.responseText;
- if (this.options.stripLoadedTextTags)
- text = text.stripTags();
- this._controls.editor.value = text;
- this._controls.editor.disabled = false;
- this.postProcessEditField();
- }.bind(this),
- onFailure: this._boundFailureHandler
- });
- new Ajax.Request(this.options.loadTextURL, options);
- },
- postProcessEditField: function() {
- var fpc = this.options.fieldPostCreation;
- if (fpc)
- $(this._controls.editor)['focus' == fpc ? 'focus' : 'activate']();
- },
- prepareOptions: function() {
- this.options = Object.clone(Ajax.InPlaceEditor.DefaultOptions);
- Object.extend(this.options, Ajax.InPlaceEditor.DefaultCallbacks);
- [this._extraDefaultOptions].flatten().compact().each(function(defs) {
- Object.extend(this.options, defs);
- }.bind(this));
- },
- prepareSubmission: function() {
- this._saving = true;
- this.removeForm();
- this.leaveHover();
- this.showSaving();
- },
- registerListeners: function() {
- this._listeners = { };
- var listener;
- $H(Ajax.InPlaceEditor.Listeners).each(function(pair) {
- listener = this[pair.value].bind(this);
- this._listeners[pair.key] = listener;
- if (!this.options.externalControlOnly)
- this.element.observe(pair.key, listener);
- if (this.options.externalControl)
- this.options.externalControl.observe(pair.key, listener);
- }.bind(this));
- },
- removeForm: function() {
- if (!this._form) return;
- this._form.remove();
- this._form = null;
- this._controls = { };
- },
- showSaving: function() {
- this._oldInnerHTML = this.element.innerHTML;
- this.element.innerHTML = this.options.savingText;
- this.element.addClassName(this.options.savingClassName);
- this.element.style.backgroundColor = this._originalBackground;
- this.element.show();
- },
- triggerCallback: function(cbName, arg) {
- if ('function' == typeof this.options[cbName]) {
- this.options[cbName](this, arg);
- }
- },
- unregisterListeners: function() {
- $H(this._listeners).each(function(pair) {
- if (!this.options.externalControlOnly)
- this.element.stopObserving(pair.key, pair.value);
- if (this.options.externalControl)
- this.options.externalControl.stopObserving(pair.key, pair.value);
- }.bind(this));
- },
- wrapUp: function(transport) {
- this.leaveEditMode();
- // Can't use triggerCallback due to backward compatibility: requires
- // binding + direct element
- this._boundComplete(transport, this.element);
- }
-});
-
-Object.extend(Ajax.InPlaceEditor.prototype, {
- dispose: Ajax.InPlaceEditor.prototype.destroy
-});
-
-Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, {
- initialize: function($super, element, url, options) {
- this._extraDefaultOptions = Ajax.InPlaceCollectionEditor.DefaultOptions;
- $super(element, url, options);
- },
-
- createEditField: function() {
- var list = document.createElement('select');
- list.name = this.options.paramName;
- list.size = 1;
- this._controls.editor = list;
- this._collection = this.options.collection || [];
- if (this.options.loadCollectionURL)
- this.loadCollection();
- else
- this.checkForExternalText();
- this._form.appendChild(this._controls.editor);
- },
-
- loadCollection: function() {
- this._form.addClassName(this.options.loadingClassName);
- this.showLoadingText(this.options.loadingCollectionText);
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
- Object.extend(options, {
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
- onComplete: Prototype.emptyFunction,
- onSuccess: function(transport) {
- var js = transport.responseText.strip();
- if (!/^\[.*\]$/.test(js)) // TODO: improve sanity check
- throw 'Server returned an invalid collection representation.';
- this._collection = eval(js);
- this.checkForExternalText();
- }.bind(this),
- onFailure: this.onFailure
- });
- new Ajax.Request(this.options.loadCollectionURL, options);
- },
-
- showLoadingText: function(text) {
- this._controls.editor.disabled = true;
- var tempOption = this._controls.editor.firstChild;
- if (!tempOption) {
- tempOption = document.createElement('option');
- tempOption.value = '';
- this._controls.editor.appendChild(tempOption);
- tempOption.selected = true;
- }
- tempOption.update((text || '').stripScripts().stripTags());
- },
-
- checkForExternalText: function() {
- this._text = this.getText();
- if (this.options.loadTextURL)
- this.loadExternalText();
- else
- this.buildOptionList();
- },
-
- loadExternalText: function() {
- this.showLoadingText(this.options.loadingText);
- var options = Object.extend({ method: 'get' }, this.options.ajaxOptions);
- Object.extend(options, {
- parameters: 'editorId=' + encodeURIComponent(this.element.id),
- onComplete: Prototype.emptyFunction,
- onSuccess: function(transport) {
- this._text = transport.responseText.strip();
- this.buildOptionList();
- }.bind(this),
- onFailure: this.onFailure
- });
- new Ajax.Request(this.options.loadTextURL, options);
- },
-
- buildOptionList: function() {
- this._form.removeClassName(this.options.loadingClassName);
- this._collection = this._collection.map(function(entry) {
- return 2 === entry.length ? entry : [entry, entry].flatten();
- });
- var marker = ('value' in this.options) ? this.options.value : this._text;
- var textFound = this._collection.any(function(entry) {
- return entry[0] == marker;
- }.bind(this));
- this._controls.editor.update('');
- var option;
- this._collection.each(function(entry, index) {
- option = document.createElement('option');
- option.value = entry[0];
- option.selected = textFound ? entry[0] == marker : 0 == index;
- option.appendChild(document.createTextNode(entry[1]));
- this._controls.editor.appendChild(option);
- }.bind(this));
- this._controls.editor.disabled = false;
- Field.scrollFreeActivate(this._controls.editor);
- }
-});
-
-//**** DEPRECATION LAYER FOR InPlace[Collection]Editor! ****
-//**** This only exists for a while, in order to let ****
-//**** users adapt to the new API. Read up on the new ****
-//**** API and convert your code to it ASAP! ****
-
-Ajax.InPlaceEditor.prototype.initialize.dealWithDeprecatedOptions = function(options) {
- if (!options) return;
- function fallback(name, expr) {
- if (name in options || expr === undefined) return;
- options[name] = expr;
- };
- fallback('cancelControl', (options.cancelLink ? 'link' : (options.cancelButton ? 'button' :
- options.cancelLink == options.cancelButton == false ? false : undefined)));
- fallback('okControl', (options.okLink ? 'link' : (options.okButton ? 'button' :
- options.okLink == options.okButton == false ? false : undefined)));
- fallback('highlightColor', options.highlightcolor);
- fallback('highlightEndColor', options.highlightendcolor);
-};
-
-Object.extend(Ajax.InPlaceEditor, {
- DefaultOptions: {
- ajaxOptions: { },
- autoRows: 3, // Use when multi-line w/ rows == 1
- cancelControl: 'link', // 'link'|'button'|false
- cancelText: 'cancel',
- clickToEditText: 'Click to edit',
- externalControl: null, // id|elt
- externalControlOnly: false,
- fieldPostCreation: 'activate', // 'activate'|'focus'|false
- formClassName: 'inplaceeditor-form',
- formId: null, // id|elt
- highlightColor: '#ffff99',
- highlightEndColor: '#ffffff',
- hoverClassName: '',
- htmlResponse: true,
- loadingClassName: 'inplaceeditor-loading',
- loadingText: 'Loading...',
- okControl: 'button', // 'link'|'button'|false
- okText: 'ok',
- paramName: 'value',
- rows: 1, // If 1 and multi-line, uses autoRows
- savingClassName: 'inplaceeditor-saving',
- savingText: 'Saving...',
- size: 0,
- stripLoadedTextTags: false,
- submitOnBlur: false,
- textAfterControls: '',
- textBeforeControls: '',
- textBetweenControls: ''
- },
- DefaultCallbacks: {
- callback: function(form) {
- return Form.serialize(form);
- },
- onComplete: function(transport, element) {
- // For backward compatibility, this one is bound to the IPE, and passes
- // the element directly. It was too often customized, so we don't break it.
- new Effect.Highlight(element, {
- startcolor: this.options.highlightColor, keepBackgroundImage: true });
- },
- onEnterEditMode: null,
- onEnterHover: function(ipe) {
- ipe.element.style.backgroundColor = ipe.options.highlightColor;
- if (ipe._effect)
- ipe._effect.cancel();
- },
- onFailure: function(transport, ipe) {
- alert('Error communication with the server: ' + transport.responseText.stripTags());
- },
- onFormCustomization: null, // Takes the IPE and its generated form, after editor, before controls.
- onLeaveEditMode: null,
- onLeaveHover: function(ipe) {
- ipe._effect = new Effect.Highlight(ipe.element, {
- startcolor: ipe.options.highlightColor, endcolor: ipe.options.highlightEndColor,
- restorecolor: ipe._originalBackground, keepBackgroundImage: true
- });
- }
- },
- Listeners: {
- click: 'enterEditMode',
- keydown: 'checkForEscapeOrReturn',
- mouseover: 'enterHover',
- mouseout: 'leaveHover'
- }
-});
-
-Ajax.InPlaceCollectionEditor.DefaultOptions = {
- loadingCollectionText: 'Loading options...'
-};
-
-// Delayed observer, like Form.Element.Observer,
-// but waits for delay after last key input
-// Ideal for live-search fields
-
-Form.Element.DelayedObserver = Class.create({
- initialize: function(element, delay, callback) {
- this.delay = delay || 0.5;
- this.element = $(element);
- this.callback = callback;
- this.timer = null;
- this.lastValue = $F(this.element);
- Event.observe(this.element,'keyup',this.delayedListener.bindAsEventListener(this));
- },
- delayedListener: function(event) {
- if(this.lastValue == $F(this.element)) return;
- if(this.timer) clearTimeout(this.timer);
- this.timer = setTimeout(this.onTimerEvent.bind(this), this.delay * 1000);
- this.lastValue = $F(this.element);
- },
- onTimerEvent: function() {
- this.timer = null;
- this.callback(this.element, $F(this.element));
- }
-});
diff --git a/public/javascripts/.svn/text-base/dragdrop.js.svn-base b/public/javascripts/.svn/text-base/dragdrop.js.svn-base
deleted file mode 100644
index ccf4a1e..0000000
--- a/public/javascripts/.svn/text-base/dragdrop.js.svn-base
+++ /dev/null
@@ -1,972 +0,0 @@
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// (c) 2005-2007 Sammi Williams (http://www.oriontransfer.co.nz, sammi@oriontransfer.co.nz)
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-if(Object.isUndefined(Effect))
- throw("dragdrop.js requires including script.aculo.us' effects.js library");
-
-var Droppables = {
- drops: [],
-
- remove: function(element) {
- this.drops = this.drops.reject(function(d) { return d.element==$(element) });
- },
-
- add: function(element) {
- element = $(element);
- var options = Object.extend({
- greedy: true,
- hoverclass: null,
- tree: false
- }, arguments[1] || { });
-
- // cache containers
- if(options.containment) {
- options._containers = [];
- var containment = options.containment;
- if(Object.isArray(containment)) {
- containment.each( function(c) { options._containers.push($(c)) });
- } else {
- options._containers.push($(containment));
- }
- }
-
- if(options.accept) options.accept = [options.accept].flatten();
-
- Element.makePositioned(element); // fix IE
- options.element = element;
-
- this.drops.push(options);
- },
-
- findDeepestChild: function(drops) {
- deepest = drops[0];
-
- for (i = 1; i < drops.length; ++i)
- if (Element.isParent(drops[i].element, deepest.element))
- deepest = drops[i];
-
- return deepest;
- },
-
- isContained: function(element, drop) {
- var containmentNode;
- if(drop.tree) {
- containmentNode = element.treeNode;
- } else {
- containmentNode = element.parentNode;
- }
- return drop._containers.detect(function(c) { return containmentNode == c });
- },
-
- isAffected: function(point, element, drop) {
- return (
- (drop.element!=element) &&
- ((!drop._containers) ||
- this.isContained(element, drop)) &&
- ((!drop.accept) ||
- (Element.classNames(element).detect(
- function(v) { return drop.accept.include(v) } ) )) &&
- Position.within(drop.element, point[0], point[1]) );
- },
-
- deactivate: function(drop) {
- if(drop.hoverclass)
- Element.removeClassName(drop.element, drop.hoverclass);
- this.last_active = null;
- },
-
- activate: function(drop) {
- if(drop.hoverclass)
- Element.addClassName(drop.element, drop.hoverclass);
- this.last_active = drop;
- },
-
- show: function(point, element) {
- if(!this.drops.length) return;
- var drop, affected = [];
-
- this.drops.each( function(drop) {
- if(Droppables.isAffected(point, element, drop))
- affected.push(drop);
- });
-
- if(affected.length>0)
- drop = Droppables.findDeepestChild(affected);
-
- if(this.last_active && this.last_active != drop) this.deactivate(this.last_active);
- if (drop) {
- Position.within(drop.element, point[0], point[1]);
- if(drop.onHover)
- drop.onHover(element, drop.element, Position.overlap(drop.overlap, drop.element));
-
- if (drop != this.last_active) Droppables.activate(drop);
- }
- },
-
- fire: function(event, element) {
- if(!this.last_active) return;
- Position.prepare();
-
- if (this.isAffected([Event.pointerX(event), Event.pointerY(event)], element, this.last_active))
- if (this.last_active.onDrop) {
- this.last_active.onDrop(element, this.last_active.element, event);
- return true;
- }
- },
-
- reset: function() {
- if(this.last_active)
- this.deactivate(this.last_active);
- }
-}
-
-var Draggables = {
- drags: [],
- observers: [],
-
- register: function(draggable) {
- if(this.drags.length == 0) {
- this.eventMouseUp = this.endDrag.bindAsEventListener(this);
- this.eventMouseMove = this.updateDrag.bindAsEventListener(this);
- this.eventKeypress = this.keyPress.bindAsEventListener(this);
-
- Event.observe(document, "mouseup", this.eventMouseUp);
- Event.observe(document, "mousemove", this.eventMouseMove);
- Event.observe(document, "keypress", this.eventKeypress);
- }
- this.drags.push(draggable);
- },
-
- unregister: function(draggable) {
- this.drags = this.drags.reject(function(d) { return d==draggable });
- if(this.drags.length == 0) {
- Event.stopObserving(document, "mouseup", this.eventMouseUp);
- Event.stopObserving(document, "mousemove", this.eventMouseMove);
- Event.stopObserving(document, "keypress", this.eventKeypress);
- }
- },
-
- activate: function(draggable) {
- if(draggable.options.delay) {
- this._timeout = setTimeout(function() {
- Draggables._timeout = null;
- window.focus();
- Draggables.activeDraggable = draggable;
- }.bind(this), draggable.options.delay);
- } else {
- window.focus(); // allows keypress events if window isn't currently focused, fails for Safari
- this.activeDraggable = draggable;
- }
- },
-
- deactivate: function() {
- this.activeDraggable = null;
- },
-
- updateDrag: function(event) {
- if(!this.activeDraggable) return;
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
- // Mozilla-based browsers fire successive mousemove events with
- // the same coordinates, prevent needless redrawing (moz bug?)
- if(this._lastPointer && (this._lastPointer.inspect() == pointer.inspect())) return;
- this._lastPointer = pointer;
-
- this.activeDraggable.updateDrag(event, pointer);
- },
-
- endDrag: function(event) {
- if(this._timeout) {
- clearTimeout(this._timeout);
- this._timeout = null;
- }
- if(!this.activeDraggable) return;
- this._lastPointer = null;
- this.activeDraggable.endDrag(event);
- this.activeDraggable = null;
- },
-
- keyPress: function(event) {
- if(this.activeDraggable)
- this.activeDraggable.keyPress(event);
- },
-
- addObserver: function(observer) {
- this.observers.push(observer);
- this._cacheObserverCallbacks();
- },
-
- removeObserver: function(element) { // element instead of observer fixes mem leaks
- this.observers = this.observers.reject( function(o) { return o.element==element });
- this._cacheObserverCallbacks();
- },
-
- notify: function(eventName, draggable, event) { // 'onStart', 'onEnd', 'onDrag'
- if(this[eventName+'Count'] > 0)
- this.observers.each( function(o) {
- if(o[eventName]) o[eventName](eventName, draggable, event);
- });
- if(draggable.options[eventName]) draggable.options[eventName](draggable, event);
- },
-
- _cacheObserverCallbacks: function() {
- ['onStart','onEnd','onDrag'].each( function(eventName) {
- Draggables[eventName+'Count'] = Draggables.observers.select(
- function(o) { return o[eventName]; }
- ).length;
- });
- }
-}
-
-/*--------------------------------------------------------------------------*/
-
-var Draggable = Class.create({
- initialize: function(element) {
- var defaults = {
- handle: false,
- reverteffect: function(element, top_offset, left_offset) {
- var dur = Math.sqrt(Math.abs(top_offset^2)+Math.abs(left_offset^2))*0.02;
- new Effect.Move(element, { x: -left_offset, y: -top_offset, duration: dur,
- queue: {scope:'_draggable', position:'end'}
- });
- },
- endeffect: function(element) {
- var toOpacity = Object.isNumber(element._opacity) ? element._opacity : 1.0;
- new Effect.Opacity(element, {duration:0.2, from:0.7, to:toOpacity,
- queue: {scope:'_draggable', position:'end'},
- afterFinish: function(){
- Draggable._dragging[element] = false
- }
- });
- },
- zindex: 1000,
- revert: false,
- quiet: false,
- scroll: false,
- scrollSensitivity: 20,
- scrollSpeed: 15,
- snap: false, // false, or xy or [x,y] or function(x,y){ return [x,y] }
- delay: 0
- };
-
- if(!arguments[1] || Object.isUndefined(arguments[1].endeffect))
- Object.extend(defaults, {
- starteffect: function(element) {
- element._opacity = Element.getOpacity(element);
- Draggable._dragging[element] = true;
- new Effect.Opacity(element, {duration:0.2, from:element._opacity, to:0.7});
- }
- });
-
- var options = Object.extend(defaults, arguments[1] || { });
-
- this.element = $(element);
-
- if(options.handle && Object.isString(options.handle))
- this.handle = this.element.down('.'+options.handle, 0);
-
- if(!this.handle) this.handle = $(options.handle);
- if(!this.handle) this.handle = this.element;
-
- if(options.scroll && !options.scroll.scrollTo && !options.scroll.outerHTML) {
- options.scroll = $(options.scroll);
- this._isScrollChild = Element.childOf(this.element, options.scroll);
- }
-
- Element.makePositioned(this.element); // fix IE
-
- this.options = options;
- this.dragging = false;
-
- this.eventMouseDown = this.initDrag.bindAsEventListener(this);
- Event.observe(this.handle, "mousedown", this.eventMouseDown);
-
- Draggables.register(this);
- },
-
- destroy: function() {
- Event.stopObserving(this.handle, "mousedown", this.eventMouseDown);
- Draggables.unregister(this);
- },
-
- currentDelta: function() {
- return([
- parseInt(Element.getStyle(this.element,'left') || '0'),
- parseInt(Element.getStyle(this.element,'top') || '0')]);
- },
-
- initDrag: function(event) {
- if(!Object.isUndefined(Draggable._dragging[this.element]) &&
- Draggable._dragging[this.element]) return;
- if(Event.isLeftClick(event)) {
- // abort on form elements, fixes a Firefox issue
- var src = Event.element(event);
- if((tag_name = src.tagName.toUpperCase()) && (
- tag_name=='INPUT' ||
- tag_name=='SELECT' ||
- tag_name=='OPTION' ||
- tag_name=='BUTTON' ||
- tag_name=='TEXTAREA')) return;
-
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
- var pos = Position.cumulativeOffset(this.element);
- this.offset = [0,1].map( function(i) { return (pointer[i] - pos[i]) });
-
- Draggables.activate(this);
- Event.stop(event);
- }
- },
-
- startDrag: function(event) {
- this.dragging = true;
- if(!this.delta)
- this.delta = this.currentDelta();
-
- if(this.options.zindex) {
- this.originalZ = parseInt(Element.getStyle(this.element,'z-index') || 0);
- this.element.style.zIndex = this.options.zindex;
- }
-
- if(this.options.ghosting) {
- this._clone = this.element.cloneNode(true);
- this.element._originallyAbsolute = (this.element.getStyle('position') == 'absolute');
- if (!this.element._originallyAbsolute)
- Position.absolutize(this.element);
- this.element.parentNode.insertBefore(this._clone, this.element);
- }
-
- if(this.options.scroll) {
- if (this.options.scroll == window) {
- var where = this._getWindowScroll(this.options.scroll);
- this.originalScrollLeft = where.left;
- this.originalScrollTop = where.top;
- } else {
- this.originalScrollLeft = this.options.scroll.scrollLeft;
- this.originalScrollTop = this.options.scroll.scrollTop;
- }
- }
-
- Draggables.notify('onStart', this, event);
-
- if(this.options.starteffect) this.options.starteffect(this.element);
- },
-
- updateDrag: function(event, pointer) {
- if(!this.dragging) this.startDrag(event);
-
- if(!this.options.quiet){
- Position.prepare();
- Droppables.show(pointer, this.element);
- }
-
- Draggables.notify('onDrag', this, event);
-
- this.draw(pointer);
- if(this.options.change) this.options.change(this);
-
- if(this.options.scroll) {
- this.stopScrolling();
-
- var p;
- if (this.options.scroll == window) {
- with(this._getWindowScroll(this.options.scroll)) { p = [ left, top, left+width, top+height ]; }
- } else {
- p = Position.page(this.options.scroll);
- p[0] += this.options.scroll.scrollLeft + Position.deltaX;
- p[1] += this.options.scroll.scrollTop + Position.deltaY;
- p.push(p[0]+this.options.scroll.offsetWidth);
- p.push(p[1]+this.options.scroll.offsetHeight);
- }
- var speed = [0,0];
- if(pointer[0] < (p[0]+this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[0]+this.options.scrollSensitivity);
- if(pointer[1] < (p[1]+this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[1]+this.options.scrollSensitivity);
- if(pointer[0] > (p[2]-this.options.scrollSensitivity)) speed[0] = pointer[0]-(p[2]-this.options.scrollSensitivity);
- if(pointer[1] > (p[3]-this.options.scrollSensitivity)) speed[1] = pointer[1]-(p[3]-this.options.scrollSensitivity);
- this.startScrolling(speed);
- }
-
- // fix AppleWebKit rendering
- if(Prototype.Browser.WebKit) window.scrollBy(0,0);
-
- Event.stop(event);
- },
-
- finishDrag: function(event, success) {
- this.dragging = false;
-
- if(this.options.quiet){
- Position.prepare();
- var pointer = [Event.pointerX(event), Event.pointerY(event)];
- Droppables.show(pointer, this.element);
- }
-
- if(this.options.ghosting) {
- if (!this.element._originallyAbsolute)
- Position.relativize(this.element);
- delete this.element._originallyAbsolute;
- Element.remove(this._clone);
- this._clone = null;
- }
-
- var dropped = false;
- if(success) {
- dropped = Droppables.fire(event, this.element);
- if (!dropped) dropped = false;
- }
- if(dropped && this.options.onDropped) this.options.onDropped(this.element);
- Draggables.notify('onEnd', this, event);
-
- var revert = this.options.revert;
- if(revert && Object.isFunction(revert)) revert = revert(this.element);
-
- var d = this.currentDelta();
- if(revert && this.options.reverteffect) {
- if (dropped == 0 || revert != 'failure')
- this.options.reverteffect(this.element,
- d[1]-this.delta[1], d[0]-this.delta[0]);
- } else {
- this.delta = d;
- }
-
- if(this.options.zindex)
- this.element.style.zIndex = this.originalZ;
-
- if(this.options.endeffect)
- this.options.endeffect(this.element);
-
- Draggables.deactivate(this);
- Droppables.reset();
- },
-
- keyPress: function(event) {
- if(event.keyCode!=Event.KEY_ESC) return;
- this.finishDrag(event, false);
- Event.stop(event);
- },
-
- endDrag: function(event) {
- if(!this.dragging) return;
- this.stopScrolling();
- this.finishDrag(event, true);
- Event.stop(event);
- },
-
- draw: function(point) {
- var pos = Position.cumulativeOffset(this.element);
- if(this.options.ghosting) {
- var r = Position.realOffset(this.element);
- pos[0] += r[0] - Position.deltaX; pos[1] += r[1] - Position.deltaY;
- }
-
- var d = this.currentDelta();
- pos[0] -= d[0]; pos[1] -= d[1];
-
- if(this.options.scroll && (this.options.scroll != window && this._isScrollChild)) {
- pos[0] -= this.options.scroll.scrollLeft-this.originalScrollLeft;
- pos[1] -= this.options.scroll.scrollTop-this.originalScrollTop;
- }
-
- var p = [0,1].map(function(i){
- return (point[i]-pos[i]-this.offset[i])
- }.bind(this));
-
- if(this.options.snap) {
- if(Object.isFunction(this.options.snap)) {
- p = this.options.snap(p[0],p[1],this);
- } else {
- if(Object.isArray(this.options.snap)) {
- p = p.map( function(v, i) {
- return (v/this.options.snap[i]).round()*this.options.snap[i] }.bind(this))
- } else {
- p = p.map( function(v) {
- return (v/this.options.snap).round()*this.options.snap }.bind(this))
- }
- }}
-
- var style = this.element.style;
- if((!this.options.constraint) || (this.options.constraint=='horizontal'))
- style.left = p[0] + "px";
- if((!this.options.constraint) || (this.options.constraint=='vertical'))
- style.top = p[1] + "px";
-
- if(style.visibility=="hidden") style.visibility = ""; // fix gecko rendering
- },
-
- stopScrolling: function() {
- if(this.scrollInterval) {
- clearInterval(this.scrollInterval);
- this.scrollInterval = null;
- Draggables._lastScrollPointer = null;
- }
- },
-
- startScrolling: function(speed) {
- if(!(speed[0] || speed[1])) return;
- this.scrollSpeed = [speed[0]*this.options.scrollSpeed,speed[1]*this.options.scrollSpeed];
- this.lastScrolled = new Date();
- this.scrollInterval = setInterval(this.scroll.bind(this), 10);
- },
-
- scroll: function() {
- var current = new Date();
- var delta = current - this.lastScrolled;
- this.lastScrolled = current;
- if(this.options.scroll == window) {
- with (this._getWindowScroll(this.options.scroll)) {
- if (this.scrollSpeed[0] || this.scrollSpeed[1]) {
- var d = delta / 1000;
- this.options.scroll.scrollTo( left + d*this.scrollSpeed[0], top + d*this.scrollSpeed[1] );
- }
- }
- } else {
- this.options.scroll.scrollLeft += this.scrollSpeed[0] * delta / 1000;
- this.options.scroll.scrollTop += this.scrollSpeed[1] * delta / 1000;
- }
-
- Position.prepare();
- Droppables.show(Draggables._lastPointer, this.element);
- Draggables.notify('onDrag', this);
- if (this._isScrollChild) {
- Draggables._lastScrollPointer = Draggables._lastScrollPointer || $A(Draggables._lastPointer);
- Draggables._lastScrollPointer[0] += this.scrollSpeed[0] * delta / 1000;
- Draggables._lastScrollPointer[1] += this.scrollSpeed[1] * delta / 1000;
- if (Draggables._lastScrollPointer[0] < 0)
- Draggables._lastScrollPointer[0] = 0;
- if (Draggables._lastScrollPointer[1] < 0)
- Draggables._lastScrollPointer[1] = 0;
- this.draw(Draggables._lastScrollPointer);
- }
-
- if(this.options.change) this.options.change(this);
- },
-
- _getWindowScroll: function(w) {
- var T, L, W, H;
- with (w.document) {
- if (w.document.documentElement && documentElement.scrollTop) {
- T = documentElement.scrollTop;
- L = documentElement.scrollLeft;
- } else if (w.document.body) {
- T = body.scrollTop;
- L = body.scrollLeft;
- }
- if (w.innerWidth) {
- W = w.innerWidth;
- H = w.innerHeight;
- } else if (w.document.documentElement && documentElement.clientWidth) {
- W = documentElement.clientWidth;
- H = documentElement.clientHeight;
- } else {
- W = body.offsetWidth;
- H = body.offsetHeight
- }
- }
- return { top: T, left: L, width: W, height: H };
- }
-});
-
-Draggable._dragging = { };
-
-/*--------------------------------------------------------------------------*/
-
-var SortableObserver = Class.create({
- initialize: function(element, observer) {
- this.element = $(element);
- this.observer = observer;
- this.lastValue = Sortable.serialize(this.element);
- },
-
- onStart: function() {
- this.lastValue = Sortable.serialize(this.element);
- },
-
- onEnd: function() {
- Sortable.unmark();
- if(this.lastValue != Sortable.serialize(this.element))
- this.observer(this.element)
- }
-});
-
-var Sortable = {
- SERIALIZE_RULE: /^[^_\-](?:[A-Za-z0-9\-\_]*)[_](.*)$/,
-
- sortables: { },
-
- _findRootElement: function(element) {
- while (element.tagName.toUpperCase() != "BODY") {
- if(element.id && Sortable.sortables[element.id]) return element;
- element = element.parentNode;
- }
- },
-
- options: function(element) {
- element = Sortable._findRootElement($(element));
- if(!element) return;
- return Sortable.sortables[element.id];
- },
-
- destroy: function(element){
- var s = Sortable.options(element);
-
- if(s) {
- Draggables.removeObserver(s.element);
- s.droppables.each(function(d){ Droppables.remove(d) });
- s.draggables.invoke('destroy');
-
- delete Sortable.sortables[s.element.id];
- }
- },
-
- create: function(element) {
- element = $(element);
- var options = Object.extend({
- element: element,
- tag: 'li', // assumes li children, override with tag: 'tagname'
- dropOnEmpty: false,
- tree: false,
- treeTag: 'ul',
- overlap: 'vertical', // one of 'vertical', 'horizontal'
- constraint: 'vertical', // one of 'vertical', 'horizontal', false
- containment: element, // also takes array of elements (or id's); or false
- handle: false, // or a CSS class
- only: false,
- delay: 0,
- hoverclass: null,
- ghosting: false,
- quiet: false,
- scroll: false,
- scrollSensitivity: 20,
- scrollSpeed: 15,
- format: this.SERIALIZE_RULE,
-
- // these take arrays of elements or ids and can be
- // used for better initialization performance
- elements: false,
- handles: false,
-
- onChange: Prototype.emptyFunction,
- onUpdate: Prototype.emptyFunction
- }, arguments[1] || { });
-
- // clear any old sortable with same element
- this.destroy(element);
-
- // build options for the draggables
- var options_for_draggable = {
- revert: true,
- quiet: options.quiet,
- scroll: options.scroll,
- scrollSpeed: options.scrollSpeed,
- scrollSensitivity: options.scrollSensitivity,
- delay: options.delay,
- ghosting: options.ghosting,
- constraint: options.constraint,
- handle: options.handle };
-
- if(options.starteffect)
- options_for_draggable.starteffect = options.starteffect;
-
- if(options.reverteffect)
- options_for_draggable.reverteffect = options.reverteffect;
- else
- if(options.ghosting) options_for_draggable.reverteffect = function(element) {
- element.style.top = 0;
- element.style.left = 0;
- };
-
- if(options.endeffect)
- options_for_draggable.endeffect = options.endeffect;
-
- if(options.zindex)
- options_for_draggable.zindex = options.zindex;
-
- // build options for the droppables
- var options_for_droppable = {
- overlap: options.overlap,
- containment: options.containment,
- tree: options.tree,
- hoverclass: options.hoverclass,
- onHover: Sortable.onHover
- }
-
- var options_for_tree = {
- onHover: Sortable.onEmptyHover,
- overlap: options.overlap,
- containment: options.containment,
- hoverclass: options.hoverclass
- }
-
- // fix for gecko engine
- Element.cleanWhitespace(element);
-
- options.draggables = [];
- options.droppables = [];
-
- // drop on empty handling
- if(options.dropOnEmpty || options.tree) {
- Droppables.add(element, options_for_tree);
- options.droppables.push(element);
- }
-
- (options.elements || this.findElements(element, options) || []).each( function(e,i) {
- var handle = options.handles ? $(options.handles[i]) :
- (options.handle ? $(e).select('.' + options.handle)[0] : e);
- options.draggables.push(
- new Draggable(e, Object.extend(options_for_draggable, { handle: handle })));
- Droppables.add(e, options_for_droppable);
- if(options.tree) e.treeNode = element;
- options.droppables.push(e);
- });
-
- if(options.tree) {
- (Sortable.findTreeElements(element, options) || []).each( function(e) {
- Droppables.add(e, options_for_tree);
- e.treeNode = element;
- options.droppables.push(e);
- });
- }
-
- // keep reference
- this.sortables[element.id] = options;
-
- // for onupdate
- Draggables.addObserver(new SortableObserver(element, options.onUpdate));
-
- },
-
- // return all suitable-for-sortable elements in a guaranteed order
- findElements: function(element, options) {
- return Element.findChildren(
- element, options.only, options.tree ? true : false, options.tag);
- },
-
- findTreeElements: function(element, options) {
- return Element.findChildren(
- element, options.only, options.tree ? true : false, options.treeTag);
- },
-
- onHover: function(element, dropon, overlap) {
- if(Element.isParent(dropon, element)) return;
-
- if(overlap > .33 && overlap < .66 && Sortable.options(dropon).tree) {
- return;
- } else if(overlap>0.5) {
- Sortable.mark(dropon, 'before');
- if(dropon.previousSibling != element) {
- var oldParentNode = element.parentNode;
- element.style.visibility = "hidden"; // fix gecko rendering
- dropon.parentNode.insertBefore(element, dropon);
- if(dropon.parentNode!=oldParentNode)
- Sortable.options(oldParentNode).onChange(element);
- Sortable.options(dropon.parentNode).onChange(element);
- }
- } else {
- Sortable.mark(dropon, 'after');
- var nextElement = dropon.nextSibling || null;
- if(nextElement != element) {
- var oldParentNode = element.parentNode;
- element.style.visibility = "hidden"; // fix gecko rendering
- dropon.parentNode.insertBefore(element, nextElement);
- if(dropon.parentNode!=oldParentNode)
- Sortable.options(oldParentNode).onChange(element);
- Sortable.options(dropon.parentNode).onChange(element);
- }
- }
- },
-
- onEmptyHover: function(element, dropon, overlap) {
- var oldParentNode = element.parentNode;
- var droponOptions = Sortable.options(dropon);
-
- if(!Element.isParent(dropon, element)) {
- var index;
-
- var children = Sortable.findElements(dropon, {tag: droponOptions.tag, only: droponOptions.only});
- var child = null;
-
- if(children) {
- var offset = Element.offsetSize(dropon, droponOptions.overlap) * (1.0 - overlap);
-
- for (index = 0; index < children.length; index += 1) {
- if (offset - Element.offsetSize (children[index], droponOptions.overlap) >= 0) {
- offset -= Element.offsetSize (children[index], droponOptions.overlap);
- } else if (offset - (Element.offsetSize (children[index], droponOptions.overlap) / 2) >= 0) {
- child = index + 1 < children.length ? children[index + 1] : null;
- break;
- } else {
- child = children[index];
- break;
- }
- }
- }
-
- dropon.insertBefore(element, child);
-
- Sortable.options(oldParentNode).onChange(element);
- droponOptions.onChange(element);
- }
- },
-
- unmark: function() {
- if(Sortable._marker) Sortable._marker.hide();
- },
-
- mark: function(dropon, position) {
- // mark on ghosting only
- var sortable = Sortable.options(dropon.parentNode);
- if(sortable && !sortable.ghosting) return;
-
- if(!Sortable._marker) {
- Sortable._marker =
- ($('dropmarker') || Element.extend(document.createElement('DIV'))).
- hide().addClassName('dropmarker').setStyle({position:'absolute'});
- document.getElementsByTagName("body").item(0).appendChild(Sortable._marker);
- }
- var offsets = Position.cumulativeOffset(dropon);
- Sortable._marker.setStyle({left: offsets[0]+'px', top: offsets[1] + 'px'});
-
- if(position=='after')
- if(sortable.overlap == 'horizontal')
- Sortable._marker.setStyle({left: (offsets[0]+dropon.clientWidth) + 'px'});
- else
- Sortable._marker.setStyle({top: (offsets[1]+dropon.clientHeight) + 'px'});
-
- Sortable._marker.show();
- },
-
- _tree: function(element, options, parent) {
- var children = Sortable.findElements(element, options) || [];
-
- for (var i = 0; i < children.length; ++i) {
- var match = children[i].id.match(options.format);
-
- if (!match) continue;
-
- var child = {
- id: encodeURIComponent(match ? match[1] : null),
- element: element,
- parent: parent,
- children: [],
- position: parent.children.length,
- container: $(children[i]).down(options.treeTag)
- }
-
- /* Get the element containing the children and recurse over it */
- if (child.container)
- this._tree(child.container, options, child)
-
- parent.children.push (child);
- }
-
- return parent;
- },
-
- tree: function(element) {
- element = $(element);
- var sortableOptions = this.options(element);
- var options = Object.extend({
- tag: sortableOptions.tag,
- treeTag: sortableOptions.treeTag,
- only: sortableOptions.only,
- name: element.id,
- format: sortableOptions.format
- }, arguments[1] || { });
-
- var root = {
- id: null,
- parent: null,
- children: [],
- container: element,
- position: 0
- }
-
- return Sortable._tree(element, options, root);
- },
-
- /* Construct a [i] index for a particular node */
- _constructIndex: function(node) {
- var index = '';
- do {
- if (node.id) index = '[' + node.position + ']' + index;
- } while ((node = node.parent) != null);
- return index;
- },
-
- sequence: function(element) {
- element = $(element);
- var options = Object.extend(this.options(element), arguments[1] || { });
-
- return $(this.findElements(element, options) || []).map( function(item) {
- return item.id.match(options.format) ? item.id.match(options.format)[1] : '';
- });
- },
-
- setSequence: function(element, new_sequence) {
- element = $(element);
- var options = Object.extend(this.options(element), arguments[2] || { });
-
- var nodeMap = { };
- this.findElements(element, options).each( function(n) {
- if (n.id.match(options.format))
- nodeMap[n.id.match(options.format)[1]] = [n, n.parentNode];
- n.parentNode.removeChild(n);
- });
-
- new_sequence.each(function(ident) {
- var n = nodeMap[ident];
- if (n) {
- n[1].appendChild(n[0]);
- delete nodeMap[ident];
- }
- });
- },
-
- serialize: function(element) {
- element = $(element);
- var options = Object.extend(Sortable.options(element), arguments[1] || { });
- var name = encodeURIComponent(
- (arguments[1] && arguments[1].name) ? arguments[1].name : element.id);
-
- if (options.tree) {
- return Sortable.tree(element, arguments[1]).children.map( function (item) {
- return [name + Sortable._constructIndex(item) + "[id]=" +
- encodeURIComponent(item.id)].concat(item.children.map(arguments.callee));
- }).flatten().join('&');
- } else {
- return Sortable.sequence(element, arguments[1]).map( function(item) {
- return name + "[]=" + encodeURIComponent(item);
- }).join('&');
- }
- }
-}
-
-// Returns true if child is contained within element
-Element.isParent = function(child, element) {
- if (!child.parentNode || child == element) return false;
- if (child.parentNode == element) return true;
- return Element.isParent(child.parentNode, element);
-}
-
-Element.findChildren = function(element, only, recursive, tagName) {
- if(!element.hasChildNodes()) return null;
- tagName = tagName.toUpperCase();
- if(only) only = [only].flatten();
- var elements = [];
- $A(element.childNodes).each( function(e) {
- if(e.tagName && e.tagName.toUpperCase()==tagName &&
- (!only || (Element.classNames(e).detect(function(v) { return only.include(v) }))))
- elements.push(e);
- if(recursive) {
- var grandchildren = Element.findChildren(e, only, recursive, tagName);
- if(grandchildren) elements.push(grandchildren);
- }
- });
-
- return (elements.length>0 ? elements.flatten() : []);
-}
-
-Element.offsetSize = function (element, type) {
- return element['offset' + ((type=='vertical' || type=='height') ? 'Height' : 'Width')];
-}
diff --git a/public/javascripts/.svn/text-base/effects.js.svn-base b/public/javascripts/.svn/text-base/effects.js.svn-base
deleted file mode 100644
index 65aed23..0000000
--- a/public/javascripts/.svn/text-base/effects.js.svn-base
+++ /dev/null
@@ -1,1120 +0,0 @@
-// Copyright (c) 2005-2007 Thomas Fuchs (http://script.aculo.us, http://mir.aculo.us)
-// Contributors:
-// Justin Palmer (http://encytemedia.com/)
-// Mark Pilgrim (http://diveintomark.org/)
-// Martin Bialasinki
-//
-// script.aculo.us is freely distributable under the terms of an MIT-style license.
-// For details, see the script.aculo.us web site: http://script.aculo.us/
-
-// converts rgb() and #xxx to #xxxxxx format,
-// returns self (or first argument) if not convertable
-String.prototype.parseColor = function() {
- var color = '#';
- if (this.slice(0,4) == 'rgb(') {
- var cols = this.slice(4,this.length-1).split(',');
- var i=0; do { color += parseInt(cols[i]).toColorPart() } while (++i<3);
- } else {
- if (this.slice(0,1) == '#') {
- if (this.length==4) for(var i=1;i<4;i++) color += (this.charAt(i) + this.charAt(i)).toLowerCase();
- if (this.length==7) color = this.toLowerCase();
- }
- }
- return (color.length==7 ? color : (arguments[0] || this));
-};
-
-/*--------------------------------------------------------------------------*/
-
-Element.collectTextNodes = function(element) {
- return $A($(element).childNodes).collect( function(node) {
- return (node.nodeType==3 ? node.nodeValue :
- (node.hasChildNodes() ? Element.collectTextNodes(node) : ''));
- }).flatten().join('');
-};
-
-Element.collectTextNodesIgnoreClass = function(element, className) {
- return $A($(element).childNodes).collect( function(node) {
- return (node.nodeType==3 ? node.nodeValue :
- ((node.hasChildNodes() && !Element.hasClassName(node,className)) ?
- Element.collectTextNodesIgnoreClass(node, className) : ''));
- }).flatten().join('');
-};
-
-Element.setContentZoom = function(element, percent) {
- element = $(element);
- element.setStyle({fontSize: (percent/100) + 'em'});
- if (Prototype.Browser.WebKit) window.scrollBy(0,0);
- return element;
-};
-
-Element.getInlineOpacity = function(element){
- return $(element).style.opacity || '';
-};
-
-Element.forceRerendering = function(element) {
- try {
- element = $(element);
- var n = document.createTextNode(' ');
- element.appendChild(n);
- element.removeChild(n);
- } catch(e) { }
-};
-
-/*--------------------------------------------------------------------------*/
-
-var Effect = {
- _elementDoesNotExistError: {
- name: 'ElementDoesNotExistError',
- message: 'The specified DOM element does not exist, but is required for this effect to operate'
- },
- Transitions: {
- linear: Prototype.K,
- sinoidal: function(pos) {
- return (-Math.cos(pos*Math.PI)/2) + 0.5;
- },
- reverse: function(pos) {
- return 1-pos;
- },
- flicker: function(pos) {
- var pos = ((-Math.cos(pos*Math.PI)/4) + 0.75) + Math.random()/4;
- return pos > 1 ? 1 : pos;
- },
- wobble: function(pos) {
- return (-Math.cos(pos*Math.PI*(9*pos))/2) + 0.5;
- },
- pulse: function(pos, pulses) {
- pulses = pulses || 5;
- return (
- ((pos % (1/pulses)) * pulses).round() == 0 ?
- ((pos * pulses * 2) - (pos * pulses * 2).floor()) :
- 1 - ((pos * pulses * 2) - (pos * pulses * 2).floor())
- );
- },
- spring: function(pos) {
- return 1 - (Math.cos(pos * 4.5 * Math.PI) * Math.exp(-pos * 6));
- },
- none: function(pos) {
- return 0;
- },
- full: function(pos) {
- return 1;
- }
- },
- DefaultOptions: {
- duration: 1.0, // seconds
- fps: 100, // 100= assume 66fps max.
- sync: false, // true for combining
- from: 0.0,
- to: 1.0,
- delay: 0.0,
- queue: 'parallel'
- },
- tagifyText: function(element) {
- var tagifyStyle = 'position:relative';
- if (Prototype.Browser.IE) tagifyStyle += ';zoom:1';
-
- element = $(element);
- $A(element.childNodes).each( function(child) {
- if (child.nodeType==3) {
- child.nodeValue.toArray().each( function(character) {
- element.insertBefore(
- new Element('span', {style: tagifyStyle}).update(
- character == ' ' ? String.fromCharCode(160) : character),
- child);
- });
- Element.remove(child);
- }
- });
- },
- multiple: function(element, effect) {
- var elements;
- if (((typeof element == 'object') ||
- Object.isFunction(element)) &&
- (element.length))
- elements = element;
- else
- elements = $(element).childNodes;
-
- var options = Object.extend({
- speed: 0.1,
- delay: 0.0
- }, arguments[2] || { });
- var masterDelay = options.delay;
-
- $A(elements).each( function(element, index) {
- new effect(element, Object.extend(options, { delay: index * options.speed + masterDelay }));
- });
- },
- PAIRS: {
- 'slide': ['SlideDown','SlideUp'],
- 'blind': ['BlindDown','BlindUp'],
- 'appear': ['Appear','Fade']
- },
- toggle: function(element, effect) {
- element = $(element);
- effect = (effect || 'appear').toLowerCase();
- var options = Object.extend({
- queue: { position:'end', scope:(element.id || 'global'), limit: 1 }
- }, arguments[2] || { });
- Effect[element.visible() ?
- Effect.PAIRS[effect][1] : Effect.PAIRS[effect][0]](element, options);
- }
-};
-
-Effect.DefaultOptions.transition = Effect.Transitions.sinoidal;
-
-/* ------------- core effects ------------- */
-
-Effect.ScopedQueue = Class.create(Enumerable, {
- initialize: function() {
- this.effects = [];
- this.interval = null;
- },
- _each: function(iterator) {
- this.effects._each(iterator);
- },
- add: function(effect) {
- var timestamp = new Date().getTime();
-
- var position = Object.isString(effect.options.queue) ?
- effect.options.queue : effect.options.queue.position;
-
- switch(position) {
- case 'front':
- // move unstarted effects after this effect
- this.effects.findAll(function(e){ return e.state=='idle' }).each( function(e) {
- e.startOn += effect.finishOn;
- e.finishOn += effect.finishOn;
- });
- break;
- case 'with-last':
- timestamp = this.effects.pluck('startOn').max() || timestamp;
- break;
- case 'end':
- // start effect after last queued effect has finished
- timestamp = this.effects.pluck('finishOn').max() || timestamp;
- break;
- }
-
- effect.startOn += timestamp;
- effect.finishOn += timestamp;
-
- if (!effect.options.queue.limit || (this.effects.length < effect.options.queue.limit))
- this.effects.push(effect);
-
- if (!this.interval)
- this.interval = setInterval(this.loop.bind(this), 15);
- },
- remove: function(effect) {
- this.effects = this.effects.reject(function(e) { return e==effect });
- if (this.effects.length == 0) {
- clearInterval(this.interval);
- this.interval = null;
- }
- },
- loop: function() {
- var timePos = new Date().getTime();
- for(var i=0, len=this.effects.length;i= this.startOn) {
- if (timePos >= this.finishOn) {
- this.render(1.0);
- this.cancel();
- this.event('beforeFinish');
- if (this.finish) this.finish();
- this.event('afterFinish');
- return;
- }
- var pos = (timePos - this.startOn) / this.totalTime,
- frame = (pos * this.totalFrames).round();
- if (frame > this.currentFrame) {
- this.render(pos);
- this.currentFrame = frame;
- }
- }
- },
- cancel: function() {
- if (!this.options.sync)
- Effect.Queues.get(Object.isString(this.options.queue) ?
- 'global' : this.options.queue.scope).remove(this);
- this.state = 'finished';
- },
- event: function(eventName) {
- if (this.options[eventName + 'Internal']) this.options[eventName + 'Internal'](this);
- if (this.options[eventName]) this.options[eventName](this);
- },
- inspect: function() {
- var data = $H();
- for(property in this)
- if (!Object.isFunction(this[property])) data.set(property, this[property]);
- return '#';
- }
-});
-
-Effect.Parallel = Class.create(Effect.Base, {
- initialize: function(effects) {
- this.effects = effects || [];
- this.start(arguments[1]);
- },
- update: function(position) {
- this.effects.invoke('render', position);
- },
- finish: function(position) {
- this.effects.each( function(effect) {
- effect.render(1.0);
- effect.cancel();
- effect.event('beforeFinish');
- if (effect.finish) effect.finish(position);
- effect.event('afterFinish');
- });
- }
-});
-
-Effect.Tween = Class.create(Effect.Base, {
- initialize: function(object, from, to) {
- object = Object.isString(object) ? $(object) : object;
- var args = $A(arguments), method = args.last(),
- options = args.length == 5 ? args[3] : null;
- this.method = Object.isFunction(method) ? method.bind(object) :
- Object.isFunction(object[method]) ? object[method].bind(object) :
- function(value) { object[method] = value };
- this.start(Object.extend({ from: from, to: to }, options || { }));
- },
- update: function(position) {
- this.method(position);
- }
-});
-
-Effect.Event = Class.create(Effect.Base, {
- initialize: function() {
- this.start(Object.extend({ duration: 0 }, arguments[0] || { }));
- },
- update: Prototype.emptyFunction
-});
-
-Effect.Opacity = Class.create(Effect.Base, {
- initialize: function(element) {
- this.element = $(element);
- if (!this.element) throw(Effect._elementDoesNotExistError);
- // make this work on IE on elements without 'layout'
- if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
- this.element.setStyle({zoom: 1});
- var options = Object.extend({
- from: this.element.getOpacity() || 0.0,
- to: 1.0
- }, arguments[1] || { });
- this.start(options);
- },
- update: function(position) {
- this.element.setOpacity(position);
- }
-});
-
-Effect.Move = Class.create(Effect.Base, {
- initialize: function(element) {
- this.element = $(element);
- if (!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- x: 0,
- y: 0,
- mode: 'relative'
- }, arguments[1] || { });
- this.start(options);
- },
- setup: function() {
- this.element.makePositioned();
- this.originalLeft = parseFloat(this.element.getStyle('left') || '0');
- this.originalTop = parseFloat(this.element.getStyle('top') || '0');
- if (this.options.mode == 'absolute') {
- this.options.x = this.options.x - this.originalLeft;
- this.options.y = this.options.y - this.originalTop;
- }
- },
- update: function(position) {
- this.element.setStyle({
- left: (this.options.x * position + this.originalLeft).round() + 'px',
- top: (this.options.y * position + this.originalTop).round() + 'px'
- });
- }
-});
-
-// for backwards compatibility
-Effect.MoveBy = function(element, toTop, toLeft) {
- return new Effect.Move(element,
- Object.extend({ x: toLeft, y: toTop }, arguments[3] || { }));
-};
-
-Effect.Scale = Class.create(Effect.Base, {
- initialize: function(element, percent) {
- this.element = $(element);
- if (!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- scaleX: true,
- scaleY: true,
- scaleContent: true,
- scaleFromCenter: false,
- scaleMode: 'box', // 'box' or 'contents' or { } with provided values
- scaleFrom: 100.0,
- scaleTo: percent
- }, arguments[2] || { });
- this.start(options);
- },
- setup: function() {
- this.restoreAfterFinish = this.options.restoreAfterFinish || false;
- this.elementPositioning = this.element.getStyle('position');
-
- this.originalStyle = { };
- ['top','left','width','height','fontSize'].each( function(k) {
- this.originalStyle[k] = this.element.style[k];
- }.bind(this));
-
- this.originalTop = this.element.offsetTop;
- this.originalLeft = this.element.offsetLeft;
-
- var fontSize = this.element.getStyle('font-size') || '100%';
- ['em','px','%','pt'].each( function(fontSizeType) {
- if (fontSize.indexOf(fontSizeType)>0) {
- this.fontSize = parseFloat(fontSize);
- this.fontSizeType = fontSizeType;
- }
- }.bind(this));
-
- this.factor = (this.options.scaleTo - this.options.scaleFrom)/100;
-
- this.dims = null;
- if (this.options.scaleMode=='box')
- this.dims = [this.element.offsetHeight, this.element.offsetWidth];
- if (/^content/.test(this.options.scaleMode))
- this.dims = [this.element.scrollHeight, this.element.scrollWidth];
- if (!this.dims)
- this.dims = [this.options.scaleMode.originalHeight,
- this.options.scaleMode.originalWidth];
- },
- update: function(position) {
- var currentScale = (this.options.scaleFrom/100.0) + (this.factor * position);
- if (this.options.scaleContent && this.fontSize)
- this.element.setStyle({fontSize: this.fontSize * currentScale + this.fontSizeType });
- this.setDimensions(this.dims[0] * currentScale, this.dims[1] * currentScale);
- },
- finish: function(position) {
- if (this.restoreAfterFinish) this.element.setStyle(this.originalStyle);
- },
- setDimensions: function(height, width) {
- var d = { };
- if (this.options.scaleX) d.width = width.round() + 'px';
- if (this.options.scaleY) d.height = height.round() + 'px';
- if (this.options.scaleFromCenter) {
- var topd = (height - this.dims[0])/2;
- var leftd = (width - this.dims[1])/2;
- if (this.elementPositioning == 'absolute') {
- if (this.options.scaleY) d.top = this.originalTop-topd + 'px';
- if (this.options.scaleX) d.left = this.originalLeft-leftd + 'px';
- } else {
- if (this.options.scaleY) d.top = -topd + 'px';
- if (this.options.scaleX) d.left = -leftd + 'px';
- }
- }
- this.element.setStyle(d);
- }
-});
-
-Effect.Highlight = Class.create(Effect.Base, {
- initialize: function(element) {
- this.element = $(element);
- if (!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({ startcolor: '#ffff99' }, arguments[1] || { });
- this.start(options);
- },
- setup: function() {
- // Prevent executing on elements not in the layout flow
- if (this.element.getStyle('display')=='none') { this.cancel(); return; }
- // Disable background image during the effect
- this.oldStyle = { };
- if (!this.options.keepBackgroundImage) {
- this.oldStyle.backgroundImage = this.element.getStyle('background-image');
- this.element.setStyle({backgroundImage: 'none'});
- }
- if (!this.options.endcolor)
- this.options.endcolor = this.element.getStyle('background-color').parseColor('#ffffff');
- if (!this.options.restorecolor)
- this.options.restorecolor = this.element.getStyle('background-color');
- // init color calculations
- this._base = $R(0,2).map(function(i){ return parseInt(this.options.startcolor.slice(i*2+1,i*2+3),16) }.bind(this));
- this._delta = $R(0,2).map(function(i){ return parseInt(this.options.endcolor.slice(i*2+1,i*2+3),16)-this._base[i] }.bind(this));
- },
- update: function(position) {
- this.element.setStyle({backgroundColor: $R(0,2).inject('#',function(m,v,i){
- return m+((this._base[i]+(this._delta[i]*position)).round().toColorPart()); }.bind(this)) });
- },
- finish: function() {
- this.element.setStyle(Object.extend(this.oldStyle, {
- backgroundColor: this.options.restorecolor
- }));
- }
-});
-
-Effect.ScrollTo = function(element) {
- var options = arguments[1] || { },
- scrollOffsets = document.viewport.getScrollOffsets(),
- elementOffsets = $(element).cumulativeOffset(),
- max = (window.height || document.body.scrollHeight) - document.viewport.getHeight();
-
- if (options.offset) elementOffsets[1] += options.offset;
-
- return new Effect.Tween(null,
- scrollOffsets.top,
- elementOffsets[1] > max ? max : elementOffsets[1],
- options,
- function(p){ scrollTo(scrollOffsets.left, p.round()) }
- );
-};
-
-/* ------------- combination effects ------------- */
-
-Effect.Fade = function(element) {
- element = $(element);
- var oldOpacity = element.getInlineOpacity();
- var options = Object.extend({
- from: element.getOpacity() || 1.0,
- to: 0.0,
- afterFinishInternal: function(effect) {
- if (effect.options.to!=0) return;
- effect.element.hide().setStyle({opacity: oldOpacity});
- }
- }, arguments[1] || { });
- return new Effect.Opacity(element,options);
-};
-
-Effect.Appear = function(element) {
- element = $(element);
- var options = Object.extend({
- from: (element.getStyle('display') == 'none' ? 0.0 : element.getOpacity() || 0.0),
- to: 1.0,
- // force Safari to render floated elements properly
- afterFinishInternal: function(effect) {
- effect.element.forceRerendering();
- },
- beforeSetup: function(effect) {
- effect.element.setOpacity(effect.options.from).show();
- }}, arguments[1] || { });
- return new Effect.Opacity(element,options);
-};
-
-Effect.Puff = function(element) {
- element = $(element);
- var oldStyle = {
- opacity: element.getInlineOpacity(),
- position: element.getStyle('position'),
- top: element.style.top,
- left: element.style.left,
- width: element.style.width,
- height: element.style.height
- };
- return new Effect.Parallel(
- [ new Effect.Scale(element, 200,
- { sync: true, scaleFromCenter: true, scaleContent: true, restoreAfterFinish: true }),
- new Effect.Opacity(element, { sync: true, to: 0.0 } ) ],
- Object.extend({ duration: 1.0,
- beforeSetupInternal: function(effect) {
- Position.absolutize(effect.effects[0].element)
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().setStyle(oldStyle); }
- }, arguments[1] || { })
- );
-};
-
-Effect.BlindUp = function(element) {
- element = $(element);
- element.makeClipping();
- return new Effect.Scale(element, 0,
- Object.extend({ scaleContent: false,
- scaleX: false,
- restoreAfterFinish: true,
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping();
- }
- }, arguments[1] || { })
- );
-};
-
-Effect.BlindDown = function(element) {
- element = $(element);
- var elementDimensions = element.getDimensions();
- return new Effect.Scale(element, 100, Object.extend({
- scaleContent: false,
- scaleX: false,
- scaleFrom: 0,
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
- restoreAfterFinish: true,
- afterSetup: function(effect) {
- effect.element.makeClipping().setStyle({height: '0px'}).show();
- },
- afterFinishInternal: function(effect) {
- effect.element.undoClipping();
- }
- }, arguments[1] || { }));
-};
-
-Effect.SwitchOff = function(element) {
- element = $(element);
- var oldOpacity = element.getInlineOpacity();
- return new Effect.Appear(element, Object.extend({
- duration: 0.4,
- from: 0,
- transition: Effect.Transitions.flicker,
- afterFinishInternal: function(effect) {
- new Effect.Scale(effect.element, 1, {
- duration: 0.3, scaleFromCenter: true,
- scaleX: false, scaleContent: false, restoreAfterFinish: true,
- beforeSetup: function(effect) {
- effect.element.makePositioned().makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().undoPositioned().setStyle({opacity: oldOpacity});
- }
- })
- }
- }, arguments[1] || { }));
-};
-
-Effect.DropOut = function(element) {
- element = $(element);
- var oldStyle = {
- top: element.getStyle('top'),
- left: element.getStyle('left'),
- opacity: element.getInlineOpacity() };
- return new Effect.Parallel(
- [ new Effect.Move(element, {x: 0, y: 100, sync: true }),
- new Effect.Opacity(element, { sync: true, to: 0.0 }) ],
- Object.extend(
- { duration: 0.5,
- beforeSetup: function(effect) {
- effect.effects[0].element.makePositioned();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().undoPositioned().setStyle(oldStyle);
- }
- }, arguments[1] || { }));
-};
-
-Effect.Shake = function(element) {
- element = $(element);
- var options = Object.extend({
- distance: 20,
- duration: 0.5
- }, arguments[1] || {});
- var distance = parseFloat(options.distance);
- var split = parseFloat(options.duration) / 10.0;
- var oldStyle = {
- top: element.getStyle('top'),
- left: element.getStyle('left') };
- return new Effect.Move(element,
- { x: distance, y: 0, duration: split, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: distance*2, y: 0, duration: split*2, afterFinishInternal: function(effect) {
- new Effect.Move(effect.element,
- { x: -distance, y: 0, duration: split, afterFinishInternal: function(effect) {
- effect.element.undoPositioned().setStyle(oldStyle);
- }}) }}) }}) }}) }}) }});
-};
-
-Effect.SlideDown = function(element) {
- element = $(element).cleanWhitespace();
- // SlideDown need to have the content of the element wrapped in a container element with fixed height!
- var oldInnerBottom = element.down().getStyle('bottom');
- var elementDimensions = element.getDimensions();
- return new Effect.Scale(element, 100, Object.extend({
- scaleContent: false,
- scaleX: false,
- scaleFrom: window.opera ? 0 : 1,
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
- restoreAfterFinish: true,
- afterSetup: function(effect) {
- effect.element.makePositioned();
- effect.element.down().makePositioned();
- if (window.opera) effect.element.setStyle({top: ''});
- effect.element.makeClipping().setStyle({height: '0px'}).show();
- },
- afterUpdateInternal: function(effect) {
- effect.element.down().setStyle({bottom:
- (effect.dims[0] - effect.element.clientHeight) + 'px' });
- },
- afterFinishInternal: function(effect) {
- effect.element.undoClipping().undoPositioned();
- effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom}); }
- }, arguments[1] || { })
- );
-};
-
-Effect.SlideUp = function(element) {
- element = $(element).cleanWhitespace();
- var oldInnerBottom = element.down().getStyle('bottom');
- var elementDimensions = element.getDimensions();
- return new Effect.Scale(element, window.opera ? 0 : 1,
- Object.extend({ scaleContent: false,
- scaleX: false,
- scaleMode: 'box',
- scaleFrom: 100,
- scaleMode: {originalHeight: elementDimensions.height, originalWidth: elementDimensions.width},
- restoreAfterFinish: true,
- afterSetup: function(effect) {
- effect.element.makePositioned();
- effect.element.down().makePositioned();
- if (window.opera) effect.element.setStyle({top: ''});
- effect.element.makeClipping().show();
- },
- afterUpdateInternal: function(effect) {
- effect.element.down().setStyle({bottom:
- (effect.dims[0] - effect.element.clientHeight) + 'px' });
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().undoPositioned();
- effect.element.down().undoPositioned().setStyle({bottom: oldInnerBottom});
- }
- }, arguments[1] || { })
- );
-};
-
-// Bug in opera makes the TD containing this element expand for a instance after finish
-Effect.Squish = function(element) {
- return new Effect.Scale(element, window.opera ? 1 : 0, {
- restoreAfterFinish: true,
- beforeSetup: function(effect) {
- effect.element.makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping();
- }
- });
-};
-
-Effect.Grow = function(element) {
- element = $(element);
- var options = Object.extend({
- direction: 'center',
- moveTransition: Effect.Transitions.sinoidal,
- scaleTransition: Effect.Transitions.sinoidal,
- opacityTransition: Effect.Transitions.full
- }, arguments[1] || { });
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- height: element.style.height,
- width: element.style.width,
- opacity: element.getInlineOpacity() };
-
- var dims = element.getDimensions();
- var initialMoveX, initialMoveY;
- var moveX, moveY;
-
- switch (options.direction) {
- case 'top-left':
- initialMoveX = initialMoveY = moveX = moveY = 0;
- break;
- case 'top-right':
- initialMoveX = dims.width;
- initialMoveY = moveY = 0;
- moveX = -dims.width;
- break;
- case 'bottom-left':
- initialMoveX = moveX = 0;
- initialMoveY = dims.height;
- moveY = -dims.height;
- break;
- case 'bottom-right':
- initialMoveX = dims.width;
- initialMoveY = dims.height;
- moveX = -dims.width;
- moveY = -dims.height;
- break;
- case 'center':
- initialMoveX = dims.width / 2;
- initialMoveY = dims.height / 2;
- moveX = -dims.width / 2;
- moveY = -dims.height / 2;
- break;
- }
-
- return new Effect.Move(element, {
- x: initialMoveX,
- y: initialMoveY,
- duration: 0.01,
- beforeSetup: function(effect) {
- effect.element.hide().makeClipping().makePositioned();
- },
- afterFinishInternal: function(effect) {
- new Effect.Parallel(
- [ new Effect.Opacity(effect.element, { sync: true, to: 1.0, from: 0.0, transition: options.opacityTransition }),
- new Effect.Move(effect.element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition }),
- new Effect.Scale(effect.element, 100, {
- scaleMode: { originalHeight: dims.height, originalWidth: dims.width },
- sync: true, scaleFrom: window.opera ? 1 : 0, transition: options.scaleTransition, restoreAfterFinish: true})
- ], Object.extend({
- beforeSetup: function(effect) {
- effect.effects[0].element.setStyle({height: '0px'}).show();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.undoClipping().undoPositioned().setStyle(oldStyle);
- }
- }, options)
- )
- }
- });
-};
-
-Effect.Shrink = function(element) {
- element = $(element);
- var options = Object.extend({
- direction: 'center',
- moveTransition: Effect.Transitions.sinoidal,
- scaleTransition: Effect.Transitions.sinoidal,
- opacityTransition: Effect.Transitions.none
- }, arguments[1] || { });
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- height: element.style.height,
- width: element.style.width,
- opacity: element.getInlineOpacity() };
-
- var dims = element.getDimensions();
- var moveX, moveY;
-
- switch (options.direction) {
- case 'top-left':
- moveX = moveY = 0;
- break;
- case 'top-right':
- moveX = dims.width;
- moveY = 0;
- break;
- case 'bottom-left':
- moveX = 0;
- moveY = dims.height;
- break;
- case 'bottom-right':
- moveX = dims.width;
- moveY = dims.height;
- break;
- case 'center':
- moveX = dims.width / 2;
- moveY = dims.height / 2;
- break;
- }
-
- return new Effect.Parallel(
- [ new Effect.Opacity(element, { sync: true, to: 0.0, from: 1.0, transition: options.opacityTransition }),
- new Effect.Scale(element, window.opera ? 1 : 0, { sync: true, transition: options.scaleTransition, restoreAfterFinish: true}),
- new Effect.Move(element, { x: moveX, y: moveY, sync: true, transition: options.moveTransition })
- ], Object.extend({
- beforeStartInternal: function(effect) {
- effect.effects[0].element.makePositioned().makeClipping();
- },
- afterFinishInternal: function(effect) {
- effect.effects[0].element.hide().undoClipping().undoPositioned().setStyle(oldStyle); }
- }, options)
- );
-};
-
-Effect.Pulsate = function(element) {
- element = $(element);
- var options = arguments[1] || { };
- var oldOpacity = element.getInlineOpacity();
- var transition = options.transition || Effect.Transitions.sinoidal;
- var reverser = function(pos){ return transition(1-Effect.Transitions.pulse(pos, options.pulses)) };
- reverser.bind(transition);
- return new Effect.Opacity(element,
- Object.extend(Object.extend({ duration: 2.0, from: 0,
- afterFinishInternal: function(effect) { effect.element.setStyle({opacity: oldOpacity}); }
- }, options), {transition: reverser}));
-};
-
-Effect.Fold = function(element) {
- element = $(element);
- var oldStyle = {
- top: element.style.top,
- left: element.style.left,
- width: element.style.width,
- height: element.style.height };
- element.makeClipping();
- return new Effect.Scale(element, 5, Object.extend({
- scaleContent: false,
- scaleX: false,
- afterFinishInternal: function(effect) {
- new Effect.Scale(element, 1, {
- scaleContent: false,
- scaleY: false,
- afterFinishInternal: function(effect) {
- effect.element.hide().undoClipping().setStyle(oldStyle);
- } });
- }}, arguments[1] || { }));
-};
-
-Effect.Morph = Class.create(Effect.Base, {
- initialize: function(element) {
- this.element = $(element);
- if (!this.element) throw(Effect._elementDoesNotExistError);
- var options = Object.extend({
- style: { }
- }, arguments[1] || { });
-
- if (!Object.isString(options.style)) this.style = $H(options.style);
- else {
- if (options.style.include(':'))
- this.style = options.style.parseStyle();
- else {
- this.element.addClassName(options.style);
- this.style = $H(this.element.getStyles());
- this.element.removeClassName(options.style);
- var css = this.element.getStyles();
- this.style = this.style.reject(function(style) {
- return style.value == css[style.key];
- });
- options.afterFinishInternal = function(effect) {
- effect.element.addClassName(effect.options.style);
- effect.transforms.each(function(transform) {
- effect.element.style[transform.style] = '';
- });
- }
- }
- }
- this.start(options);
- },
-
- setup: function(){
- function parseColor(color){
- if (!color || ['rgba(0, 0, 0, 0)','transparent'].include(color)) color = '#ffffff';
- color = color.parseColor();
- return $R(0,2).map(function(i){
- return parseInt( color.slice(i*2+1,i*2+3), 16 )
- });
- }
- this.transforms = this.style.map(function(pair){
- var property = pair[0], value = pair[1], unit = null;
-
- if (value.parseColor('#zzzzzz') != '#zzzzzz') {
- value = value.parseColor();
- unit = 'color';
- } else if (property == 'opacity') {
- value = parseFloat(value);
- if (Prototype.Browser.IE && (!this.element.currentStyle.hasLayout))
- this.element.setStyle({zoom: 1});
- } else if (Element.CSS_LENGTH.test(value)) {
- var components = value.match(/^([\+\-]?[0-9\.]+)(.*)$/);
- value = parseFloat(components[1]);
- unit = (components.length == 3) ? components[2] : null;
- }
-
- var originalValue = this.element.getStyle(property);
- return {
- style: property.camelize(),
- originalValue: unit=='color' ? parseColor(originalValue) : parseFloat(originalValue || 0),
- targetValue: unit=='color' ? parseColor(value) : value,
- unit: unit
- };
- }.bind(this)).reject(function(transform){
- return (
- (transform.originalValue == transform.targetValue) ||
- (
- transform.unit != 'color' &&
- (isNaN(transform.originalValue) || isNaN(transform.targetValue))
- )
- )
- });
- },
- update: function(position) {
- var style = { }, transform, i = this.transforms.length;
- while(i--)
- style[(transform = this.transforms[i]).style] =
- transform.unit=='color' ? '#'+
- (Math.round(transform.originalValue[0]+
- (transform.targetValue[0]-transform.originalValue[0])*position)).toColorPart() +
- (Math.round(transform.originalValue[1]+
- (transform.targetValue[1]-transform.originalValue[1])*position)).toColorPart() +
- (Math.round(transform.originalValue[2]+
- (transform.targetValue[2]-transform.originalValue[2])*position)).toColorPart() :
- (transform.originalValue +
- (transform.targetValue - transform.originalValue) * position).toFixed(3) +
- (transform.unit === null ? '' : transform.unit);
- this.element.setStyle(style, true);
- }
-});
-
-Effect.Transform = Class.create({
- initialize: function(tracks){
- this.tracks = [];
- this.options = arguments[1] || { };
- this.addTracks(tracks);
- },
- addTracks: function(tracks){
- tracks.each(function(track){
- track = $H(track);
- var data = track.values().first();
- this.tracks.push($H({
- ids: track.keys().first(),
- effect: Effect.Morph,
- options: { style: data }
- }));
- }.bind(this));
- return this;
- },
- play: function(){
- return new Effect.Parallel(
- this.tracks.map(function(track){
- var ids = track.get('ids'), effect = track.get('effect'), options = track.get('options');
- var elements = [$(ids) || $$(ids)].flatten();
- return elements.map(function(e){ return new effect(e, Object.extend({ sync:true }, options)) });
- }).flatten(),
- this.options
- );
- }
-});
-
-Element.CSS_PROPERTIES = $w(
- 'backgroundColor backgroundPosition borderBottomColor borderBottomStyle ' +
- 'borderBottomWidth borderLeftColor borderLeftStyle borderLeftWidth ' +
- 'borderRightColor borderRightStyle borderRightWidth borderSpacing ' +
- 'borderTopColor borderTopStyle borderTopWidth bottom clip color ' +
- 'fontSize fontWeight height left letterSpacing lineHeight ' +
- 'marginBottom marginLeft marginRight marginTop markerOffset maxHeight '+
- 'maxWidth minHeight minWidth opacity outlineColor outlineOffset ' +
- 'outlineWidth paddingBottom paddingLeft paddingRight paddingTop ' +
- 'right textIndent top width wordSpacing zIndex');
-
-Element.CSS_LENGTH = /^(([\+\-]?[0-9\.]+)(em|ex|px|in|cm|mm|pt|pc|\%))|0$/;
-
-String.__parseStyleElement = document.createElement('div');
-String.prototype.parseStyle = function(){
- var style, styleRules = $H();
- if (Prototype.Browser.WebKit)
- style = new Element('div',{style:this}).style;
- else {
- String.__parseStyleElement.innerHTML = '';
- style = String.__parseStyleElement.childNodes[0].style;
- }
-
- Element.CSS_PROPERTIES.each(function(property){
- if (style[property]) styleRules.set(property, style[property]);
- });
-
- if (Prototype.Browser.IE && this.include('opacity'))
- styleRules.set('opacity', this.match(/opacity:\s*((?:0|1)?(?:\.\d*)?)/)[1]);
-
- return styleRules;
-};
-
-if (document.defaultView && document.defaultView.getComputedStyle) {
- Element.getStyles = function(element) {
- var css = document.defaultView.getComputedStyle($(element), null);
- return Element.CSS_PROPERTIES.inject({ }, function(styles, property) {
- styles[property] = css[property];
- return styles;
- });
- };
-} else {
- Element.getStyles = function(element) {
- element = $(element);
- var css = element.currentStyle, styles;
- styles = Element.CSS_PROPERTIES.inject({ }, function(hash, property) {
- hash.set(property, css[property]);
- return hash;
- });
- if (!styles.opacity) styles.set('opacity', element.getOpacity());
- return styles;
- };
-};
-
-Effect.Methods = {
- morph: function(element, style) {
- element = $(element);
- new Effect.Morph(element, Object.extend({ style: style }, arguments[2] || { }));
- return element;
- },
- visualEffect: function(element, effect, options) {
- element = $(element)
- var s = effect.dasherize().camelize(), klass = s.charAt(0).toUpperCase() + s.substring(1);
- new Effect[klass](element, options);
- return element;
- },
- highlight: function(element, options) {
- element = $(element);
- new Effect.Highlight(element, options);
- return element;
- }
-};
-
-$w('fade appear grow shrink fold blindUp blindDown slideUp slideDown '+
- 'pulsate shake puff squish switchOff dropOut').each(
- function(effect) {
- Effect.Methods[effect] = function(element, options){
- element = $(element);
- Effect[effect.charAt(0).toUpperCase() + effect.substring(1)](element, options);
- return element;
- }
- }
-);
-
-$w('getInlineOpacity forceRerendering setContentZoom collectTextNodes collectTextNodesIgnoreClass getStyles').each(
- function(f) { Effect.Methods[f] = Element[f]; }
-);
-
-Element.addMethods(Effect.Methods);
diff --git a/public/javascripts/.svn/text-base/prototype.js.svn-base b/public/javascripts/.svn/text-base/prototype.js.svn-base
deleted file mode 100644
index 546f9fe..0000000
--- a/public/javascripts/.svn/text-base/prototype.js.svn-base
+++ /dev/null
@@ -1,4225 +0,0 @@
-/* Prototype JavaScript framework, version 1.6.0.1
- * (c) 2005-2007 Sam Stephenson
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://www.prototypejs.org/
- *
- *--------------------------------------------------------------------------*/
-
-var Prototype = {
- Version: '1.6.0.1',
-
- Browser: {
- IE: !!(window.attachEvent && !window.opera),
- Opera: !!window.opera,
- WebKit: navigator.userAgent.indexOf('AppleWebKit/') > -1,
- Gecko: navigator.userAgent.indexOf('Gecko') > -1 && navigator.userAgent.indexOf('KHTML') == -1,
- MobileSafari: !!navigator.userAgent.match(/Apple.*Mobile.*Safari/)
- },
-
- BrowserFeatures: {
- XPath: !!document.evaluate,
- ElementExtensions: !!window.HTMLElement,
- SpecificElementExtensions:
- document.createElement('div').__proto__ &&
- document.createElement('div').__proto__ !==
- document.createElement('form').__proto__
- },
-
- ScriptFragment: '