|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/www/shopsite-images/en-US/javascript/ |
Upload File : |
function setup_facebook_store(url, name, storeid, sb_url, sb_secure_url) {
var fb_tab_name = document.forms[0].fb_tab_name.value;
if (sb_url[sb_url.length-1] != '/')
sb_url = sb_url + '/';
if (sb_secure_url[sb_secure_url.length-1] != '/')
sb_secure_url = sb_secure_url + '/';
var redirect =
"https://apps.facebook.com/shopsite_creator/index.php?mode=create"
+ "&canvas_page=shopsite_" + random_string()
+ "&tab_name=" + encodeURIComponent(fb_tab_name)
+ "&application_name=" + encodeURIComponent(name)
+ "&storeid=" + encodeURIComponent(storeid)
+ "&sb_url=" + encodeURIComponent(sb_url)
+ "&sb_secure_url=" + encodeURIComponent(sb_secure_url)
+ "&funnel=1";
window.open(redirect,"","");
document.getElementById('button_save').click();
}
function random_string()
{
var text = "";
var possible = "abcdefghijklmnopqrstuvwxyz";
for( var i=0; i < 5; i++ )
text += possible.charAt(Math.floor(Math.random() * possible.length));
return text;
}