Skip to content

Instantly share code, notes, and snippets.

View tmking's full-sized avatar

Timothy M. King tmking

  • Bonterra
  • DC
  • 12:33 (UTC -05:00)
View GitHub Profile
<?
if($_SESSION[q8_answer] == "A" && $_SESSION[qANDa][9] == 41){
$qanda_result = "Decorator Vertical 3 price points\n";
$qanda_result .= "DAP Vertical 3 price points";
$result_location = "/find/decor_dap_vert_pianos.php?dap=1";
}else if($_SESSION[q8_answer] == "A" && $_SESSION[qANDa][9] == 42){
$qanda_result = "Decorator Vertical 3 price points\n";
class PianofinderController < ApplicationController
def index
@questions = Question.find_questions
# render :text => @questions['answer']
# @answers = Question.find_answers
end
def results
show_artcase && render(:text => 'yes it is artcase')
def locate
# @map = GMap.new("map_div")
# @map.control_init(:large_map => false, :map_type => true)
# @map.center_zoom_init([lat,lng],4)
@target_zip = params[:locate][:zip]
@store_list = Store.find(
:all, :origin => @target_zip,
:order => 'distance',
:conditions => 'distance < 70')
%h1 The Brands We Offer!
%table{ :cellpadding => 0, :cellspacing => 0, :style => 'display: inline;' }
%tr
%td{ :align => 'center' }
- if @brand == 'yamaha' then
= image_tag "/images/brands/artists1.gif", :class => 'yamaha'
%td{ :align => 'center' }
= image_tag "/images/brands/logos/#{@brand}.png">
%br/
%h2= @taglines[@brand]
ActionController::Routing::Routes.draw do |map|
map.resources :events
map.resources :contacts
map.connect 'pianofinder/:action', :controller => 'pianofinder'
map.connect 'stores/:action', :controller => 'store'
map.connect 'events', :controller => 'events'
map.connect 'institutional', :controller => 'institutional'
map.connect 'contact/', :controller => 'contact'
def set_title(page_title)
content_for(:title) { "- #{page_title}" }
content_for(:h1) { page_title }
end
def list_old
@brand = params[:brand]
@group = params[:group]
@title = "#{@brand.capitalize} #{@group.capitalize}"
case @brand
when 'usedsteinway':
@title = "Pre-Owned & Refurbished Steinway #{@group.capitalize}"
@products = Product.stats.brand('steinway').group(@group).used.price
when 'cristofori':
SQL (0.1ms) SET SQL_AUTO_IS_NULL=0
Processing MapController#category_type_region_geolocation (for 127.0.0.1 at 2009-09-26 19:52:21) [GET]
Session ID: 9bd29bbf299c97265f855ca39770f91a
Parameters: {"category"=>"political-news", "type"=>"all"}
define_map_cookies
Cache miss: ads:category=1&news_type=all&type=landing ({:using=>{"category"=>1, "news_type"=>"all", "type"=>"landing"}, :expires_in=>900 seconds})
GoogleAd Load (3.4ms) SELECT SQL_NO_CACHE * FROM `google_ads` WHERE (enabled=1 and page_type='landing' and category_id=1 and news_type='all')
GoogleAd Columns (1.1ms) SHOW FIELDS FROM `google_ads`
<html>
<head>
<title>Feed Test</title>
</head>
<body>
blah blah
<div id="av-news-widget"></div>
<script type="text/javascript">
WIDGET_TITLE = 'Allvoices News';
themePreview: function() {
$('themePreview').empty
var script = new Element('script', { src: $F('embed_code').gsub(/<script\ src=\"/, '').gsub(/\"><\/script>/, '') });
$('themePreview').insert(script);
},