This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function show_pic() | |
{ | |
var viewport = document.getElementById('viewport'); | |
viewport.style.display = ""; | |
var backdrop = document.getElementById('backdrop'); | |
backdrop.style.display = "none"; | |
// | |
// This brings up the Camera App and gets the picture, and calls dump_pic() | |
// with the picture data as a Base64-encoded string | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function post_pic_data(user,pass,storagevariable) { | |
data = localStorage.getItem(storagevariable); | |
if (data == null) { | |
alert("No picture selected"); | |
} | |
alert("About to send data"); | |
var dis = this; | |
var url = "http://example.com/newmobile.php"; | |
var boundary = "----WebKitFormBoundary"; | |
var datastr = boundary + "\n" + 'Content-Disposition: form-data; name="activity[photo_attributes][pic]"; filename="image.jpg"' + |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// if this is the iframe | |
// reload the parent | |
Event.observe(window, 'load', | |
function() { | |
try | |
{ | |
if (self.parent.frames.length != 0) | |
self.parent.location=document.location; | |
} | |
catch (Exception) {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xml.instruct! :xml, :version=>"1.0", :encoding=> "UTF-8" | |
xml.urlset :xmlns=>"http://www.sitemaps.org/schemas/sitemap/0.9" do | |
xml.url do | |
xml.loc "http://ob.gd/" | |
xml.lastmod Time.now.strftime("%Y-%m-%dT%H:%M:%S%z") | |
xml.changefreq "weekly" | |
xml.priority 0.5 | |
end | |
@guides.each do |guide| | |
xml.url do |