Created
February 8, 2017 06:56
-
-
Save vitqst/5e7ac1fdfb161798792cbfe79c86335d to your computer and use it in GitHub Desktop.
gui cho vi trinh
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
<html> | |
<head> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
</head> | |
<body> | |
<table class="pricing" summary="BotDetect CAPTCHA Enterprise License information table"> | |
<tbody><tr id="price_table_header" class="pricing"> | |
<td id="price_table_header" class="license" style="vertical-align:middle;width:96px" rowspan="2">License<br>Type</td> | |
<td id="price_table_header" class="license" colspan="4">Technologies<br>(select one or more)</td> | |
<td id="price_table_header" class="license" colspan="4" style="vertical-align:middle;">Annual License Subscription<br>(including Support & Maintenance)</td> | |
</tr> | |
<tr id="price_table_header" class="pricing"> | |
<td id="price_table_header" class="license">.NET</td> | |
<td id="price_table_header" class="license">PHP<br></td> | |
<td id="price_table_header" class="license">Java<br></td> | |
<td id="price_table_header" class="license">ASP</td> | |
<td id="price_table_header" class="license" style="vertical-align:middle;width:130px">First Year</td> | |
<td id="price_table_header" class="license" style="vertical-align:middle;width:130px">Following Years</td> | |
</tr> | |
<style type="text/css"> | |
td.separatorRow { | |
background-color:#F8F8F8; | |
} | |
</style> | |
<tr class="pricing" > | |
<td id="price_table_header" class="separatorRow" colspan="7"> | |
</td></tr> | |
<tr class="pricing" > | |
<td class="license" id="td_website_price_name"><a href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670153]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" style="display: block; width: 100%; text-decoration: none;" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="website_price_name">Website</a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_website" value="ASPNET"></td> | |
<td class="license"><input type="checkbox" id="PHP_website" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_website" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_website" value="ASP"></td> | |
<td class="price" style="text-align:right;" id="td_website_price"><a id="website_price" style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670153]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$99</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="website_renewal">$99 /yr</label></td> | |
</tr> | |
<tr class="pricing" > | |
<td class="license" id="td_domain_price_name"><a style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670154]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="domain_price_name">Domain</a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_domain" value="ASPNET"></td> | |
<td class="license"><input type="checkbox" id="PHP_domain" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_domain" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_domain" value="ASP"></td> | |
<td class="price" id="td_domain_price" style="text-align:right;"><a id="domain_price" style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670154]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$199</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="domain_renewal">$99 /yr</label></td> | |
</tr> | |
<tr class="pricing" style=""> | |
<td class="license" id="td_enterprise_price_name"><a style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670155]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="enterprise_price_name">Enterprise</a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_enterprise" value="ASPNET"></td> | |
<td class="license"><input type="checkbox" id="PHP_enterprise" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_enterprise" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_enterprise" value="ASP"></td> | |
<td class="price" id="td_enterprise_price" style="text-align:right;"><a id="enterprise_price" style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670155]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$499</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="enterprise_renewal">$99 /yr</label></td> | |
</tr> | |
<tr class="pricing" style=""> | |
<td class="license" id="td_blueprint_price_name"><a style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670158]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="blueprint_price_name">Blueprint</a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_blueprint" value="ASPNET" style="border-bottom-width:3px; important!"></td> | |
<td class="license"><input type="checkbox" id="PHP_blueprint" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_blueprint" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_blueprint" value="ASP"></td> | |
<td class="price" id="td_blueprint_price" style="text-align:right;"><a id="blueprint_price" style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670158]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$999</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="blueprint_renewal">$99 /yr</label></td> | |
</tr> | |
<tr class="pricing" style=""> | |
<td id="price_table_header" class="separatorRow" colspan="7"> | |
</td></tr> | |
<tr class="pricing" title="Unless you are an Independent Software Vendor wishing to distribute | |
BotDetect within your application(s), or in need to host BotDetect | |
for third-parties on websites or domains you do not own, you DO NOT | |
NEED the Developer License. | |
For almost everybody else, it is almost certain that the Blueprint | |
License will be sufficient. | |
Before purchasing the Developer License, please consult your tech | |
department one more time in order to be sure if you really need it." style=""> | |
<td class="license" id="td_developer_price_name"><a style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670156]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="developer_price_name">Developer <span style="color:red;">*</span></a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_developer" value="ASPNET"></td> | |
<td class="license"><input type="checkbox" id="PHP_developer" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_developer" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_developer" value="ASP"></td> | |
<td class="license" id="td_developer_price" style="text-align:right;"><a id="developer_price" style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670156]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$999</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="developer_renewal">$999 /yr</label></td> | |
</tr> | |
<tr class="pricing" title="Distribution and / or hosting of the Derivative Works? And it cannot be | |
done any other way? Indeed? | |
Before Purchasing the OEM License, please consult your tech department | |
one more time in order to check the following two things: | |
- Will the Derivative Works be used in application(s) on your own | |
websites / domains only -- in which case you DO NOT NEED the OEM | |
License at all -- and the Blueprint License will be sufficient. | |
- If it is distributed indeed, or hosted for third parties on the | |
websites / domains you do not own, is there a way to use the standard | |
Enterprise Version instead of the Derivative Works -- in which case you | |
DO NOT NEED the OEM License at all -- and the Developer License will | |
be sufficient." style=""> | |
<td class="license" id="td_oem_price_name"><a style="display: block; width: 100%; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670157]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }" id="oem_price_name">OEM <span style="color:red;">**</span></a></td> | |
<td class="license"><input type="checkbox" id="ASPNET_oem" value="ASPNET"></td> | |
<td class="license"><input type="checkbox" id="PHP_oem" value="PHP"></td> | |
<td class="license"><input type="checkbox" id="JAVA_oem" value="JAVA"></td> | |
<td class="license"><input type="checkbox" id="ASP_oem" value="ASP"></td> | |
<td class="license" id="td_oem_price" style="text-align:right;"><a id="oem_price" style="display: block; width: 100%; margin-right: 15px; text-decoration: none;" href="https://secure.shareit.com/shareit/cart.html?PRODUCT[300670157]=1&backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1" onclick="if('undefined' != typeof(_gat)){ pageTracker._link(this.href); }"><span style="margin-right:50px;">$4999</span></a></td> | |
<td class="license" style="text-align:right;"><label style="margin-right:45px;" id="oem_renewal">$999 /yr</label></td> | |
</tr> | |
</tbody></table> | |
</body> | |
<script type="text/javascript"> | |
var tech_options = ["ASPNET", "PHP", "JAVA", "ASP"]; | |
function getShareitProductId(product, license) { | |
var shareit_product_ids = []; | |
shareit_product_ids["ASP_website"] = "300669781"; | |
shareit_product_ids["ASPNET_website"] = "300669789"; | |
shareit_product_ids["PHP_website"] = "300670153"; | |
shareit_product_ids["JAVA_website"] = "300670159"; | |
shareit_product_ids["ASP_domain"] = "300669840"; | |
shareit_product_ids["ASPNET_domain"] = "300669849"; | |
shareit_product_ids["PHP_domain"] = "300670154"; | |
shareit_product_ids["JAVA_domain"] = "300670160"; | |
shareit_product_ids["ASP_enterprise"] = "300669854"; | |
shareit_product_ids["ASPNET_enterprise"] = "300669862"; | |
shareit_product_ids["PHP_enterprise"] = "300670155"; | |
shareit_product_ids["JAVA_enterprise"] = "300670161"; | |
shareit_product_ids["ASP_blueprint"] = "300669206"; | |
shareit_product_ids["ASPNET_blueprint"] = "300669213"; | |
shareit_product_ids["PHP_blueprint"] = "300670158"; | |
shareit_product_ids["JAVA_blueprint"] = "300670164"; | |
shareit_product_ids["ASP_developer"] = "300669867"; | |
shareit_product_ids["ASPNET_developer"] = "300669875"; | |
shareit_product_ids["PHP_developer"] = "300670156"; | |
shareit_product_ids["JAVA_developer"] = "300670162"; | |
shareit_product_ids["ASP_oem"] = "300669217"; | |
shareit_product_ids["ASPNET_oem"] = "300669226"; | |
shareit_product_ids["PHP_oem"] = "300670157"; | |
shareit_product_ids["JAVA_oem"] = "300670163"; | |
shareit_product_ids["ASP_hvt"] = "300671219"; | |
shareit_product_ids["ASPNET_hvt"] = "300671218"; | |
shareit_product_ids["PHP_hvt"] = "300671220"; | |
shareit_product_ids["JAVA_hvt"] = "300671222"; | |
return shareit_product_ids[product + "_" + license]; | |
} | |
function getShareitBundleId(checkedItems, license) { | |
var shareit_bundle_ids = []; | |
shareit_bundle_ids["ASP_PHP_website"] = "300669784"; | |
shareit_bundle_ids["ASP_PHP_domain"] = "300669843"; | |
shareit_bundle_ids["ASP_PHP_enterprise"] = "300669857"; | |
shareit_bundle_ids["ASP_PHP_blueprint"] = "300669209"; | |
shareit_bundle_ids["ASP_PHP_developer"] = "300669870"; | |
shareit_bundle_ids["ASP_PHP_oem"] = "300669221"; | |
shareit_bundle_ids["ASP_PHP_hvt"] = "300671224"; | |
shareit_bundle_ids["ASP_JAVA_website"] = "300669783"; | |
shareit_bundle_ids["ASP_JAVA_domain"] = "300669842"; | |
shareit_bundle_ids["ASP_JAVA_enterprise"] = "300669856"; | |
shareit_bundle_ids["ASP_JAVA_blueprint"] = "300669208"; | |
shareit_bundle_ids["ASP_JAVA_developer"] = "300669869"; | |
shareit_bundle_ids["ASP_JAVA_oem"] = "300669220"; | |
shareit_bundle_ids["ASP_JAVA_hvt"] = "300671225"; | |
shareit_bundle_ids["ASP_ASPNET_website"] = "300669782"; | |
shareit_bundle_ids["ASP_ASPNET_domain"] = "300669841"; | |
shareit_bundle_ids["ASP_ASPNET_enterprise"] = "300669855"; | |
shareit_bundle_ids["ASP_ASPNET_blueprint"] = "300669207"; | |
shareit_bundle_ids["ASP_ASPNET_developer"] = "300669868"; | |
shareit_bundle_ids["ASP_ASPNET_oem"] = "300669218"; | |
shareit_bundle_ids["ASP_ASPNET_hvt"] = "300671226"; | |
shareit_bundle_ids["ASPNET_PHP_website"] = "300669791"; | |
shareit_bundle_ids["ASPNET_PHP_domain"] = "300669851"; | |
shareit_bundle_ids["ASPNET_PHP_enterprise"] = "300669864"; | |
shareit_bundle_ids["ASPNET_PHP_blueprint"] = "300669215"; | |
shareit_bundle_ids["ASPNET_PHP_developer"] = "300669877"; | |
shareit_bundle_ids["ASPNET_PHP_oem"] = "300669228"; | |
shareit_bundle_ids["ASPNET_PHP_hvt"] = "300671227"; | |
shareit_bundle_ids["ASPNET_JAVA_website"] = "300669790"; | |
shareit_bundle_ids["ASPNET_JAVA_domain"] = "300669850"; | |
shareit_bundle_ids["ASPNET_JAVA_enterprise"] = "300669863"; | |
shareit_bundle_ids["ASPNET_JAVA_blueprint"] = "300669214"; | |
shareit_bundle_ids["ASPNET_JAVA_developer"] = "300669876"; | |
shareit_bundle_ids["ASPNET_JAVA_oem"] = "300669227"; | |
shareit_bundle_ids["ASPNET_JAVA_hvt"] = "300671228"; | |
shareit_bundle_ids["PHP_JAVA_website"] = "300669793"; | |
shareit_bundle_ids["PHP_JAVA_domain"] = "300669853"; | |
shareit_bundle_ids["PHP_JAVA_enterprise"] = "300669866"; | |
shareit_bundle_ids["PHP_JAVA_blueprint"] = "300669219"; | |
shareit_bundle_ids["PHP_JAVA_developer"] = "300669879"; | |
shareit_bundle_ids["PHP_JAVA_oem"] = "300669230"; | |
shareit_bundle_ids["PHP_JAVA_hvt"] = "300671229"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_website"] = "300669786"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_domain"] = "300669845"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_enterprise"] = "300669859"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_blueprint"] = "300669210"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_developer"] = "300669872"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_oem"] = "300669223"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_hvt"] = "300671230"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_website"] = "300669792"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_domain"] = "300669852"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_enterprise"] = "300669865"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_blueprint"] = "300669216"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_developer"] = "300669878"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_oem"] = "300669229"; | |
shareit_bundle_ids["ASPNET_PHP_JAVA_hvt"] = "300671233"; | |
shareit_bundle_ids["ASP_PHP_JAVA_website"] = "300669787"; | |
shareit_bundle_ids["ASP_PHP_JAVA_domain"] = "300669847"; | |
shareit_bundle_ids["ASP_PHP_JAVA_enterprise"] = "300669860"; | |
shareit_bundle_ids["ASP_PHP_JAVA_blueprint"] = "300669211"; | |
shareit_bundle_ids["ASP_PHP_JAVA_developer"] = "300669873"; | |
shareit_bundle_ids["ASP_PHP_JAVA_oem"] = "300669224"; | |
shareit_bundle_ids["ASP_PHP_JAVA_hvt"] = "300671231"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_website"] = "300669785"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_domain"] = "300669844"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_enterprise"] = "300669858"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_blueprint"] = "300669022"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_developer"] = "300669871"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_oem"] = "300669222"; | |
shareit_bundle_ids["ASP_ASPNET_JAVA_hvt"] = "300671234"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_website"] = "300669788"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_domain"] = "300669848"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_enterprise"] = "300669861"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_blueprint"] = "300669212"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_developer"] = "300669874"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_oem"] = "300669225"; | |
shareit_bundle_ids["ASP_ASPNET_PHP_JAVA_hvt"] = "300671235"; | |
bundle_id = checkedItems[0]; | |
for (var i = 1; i < checkedItems.length; i++) { | |
bundle_id += "_" + checkedItems[i]; | |
} | |
bundle_id += "_" + license; | |
return shareit_bundle_ids[bundle_id]; | |
} | |
function adjustPurchaseLink(checkedItems, license) { | |
product_template = "PRODUCT[#SHAREIT_PRODUCT_ID#]="; | |
purchase_link_template = "https://secure.shareit.com/shareit/cart.html?#PRODUCTS_PLACEHOLDER#backlink=http%3A%2F%2Fcaptcha.com%2Fshop.html&cookies=1"; | |
products = ""; | |
license_price_link_item = "#" + license + "_price"; | |
license_price_name_link_item = "#" + license + "_price_name"; | |
if ( checkedItems.length == 0 ) { | |
$(license_price_link_item).prop("href", "#"); | |
$(license_price_name_link_item).prop("href", "#"); | |
return; | |
} | |
if ( checkedItems.length > 1 ) { | |
products += product_template.replace("#SHAREIT_PRODUCT_ID#", getShareitBundleId(checkedItems, license)); | |
products += "1&"; | |
} else { | |
products += product_template.replace("#SHAREIT_PRODUCT_ID#", getShareitProductId(checkedItems[0], license)); | |
products += "1&"; | |
} | |
purchase_link = purchase_link_template.replace("#PRODUCTS_PLACEHOLDER#", products); | |
$(license_price_link_item).prop("href", purchase_link); | |
$(license_price_name_link_item).prop("href", purchase_link); | |
} | |
function calculateAndSetWebsitePrice(checkedItems) { | |
price = 99*checkedItems.length; | |
renewalPrice = 99*checkedItems.length; | |
$('#website_price').empty(); | |
$('#website_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#website_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetDomainPrice(checkedItems) { | |
price = 99*checkedItems.length; | |
if (price != 0) price += 100; | |
renewalPrice = 99*checkedItems.length; | |
$('#domain_price').empty(); | |
$('#domain_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#domain_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetEnterprisePrice(checkedItems) { | |
price = 99*checkedItems.length; | |
if (price != 0) price += 400; | |
renewalPrice = 99*checkedItems.length; | |
$('#enterprise_price').empty(); | |
$('#enterprise_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#enterprise_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetBlueprintPrice(checkedItems) { | |
price = 99*checkedItems.length; | |
if (price != 0) price += 900; | |
renewalPrice = 99*checkedItems.length; | |
$('#blueprint_price').empty(); | |
$('#blueprint_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#blueprint_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetDeveloperPrice(checkedItems) { | |
price = 999*checkedItems.length; | |
renewalPrice = 999*checkedItems.length; | |
$('#developer_price').empty(); | |
$('#developer_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#developer_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetOEMPrice(checkedItems) { | |
price = 999*checkedItems.length; | |
if (price != 0) price += 4000; | |
renewalPrice = 999*checkedItems.length; | |
$('#oem_price').empty(); | |
$('#oem_price').append('<span style="margin-right:50px;">$'+price+'</span>'); | |
$('#oem_renewal').text("$" + renewalPrice + " /yr"); | |
} | |
function calculateAndSetHVTPrice(checkedItems) { | |
price = 999*checkedItems.length; | |
if (price != 0) price += 4000; | |
renewalPrice = 999*checkedItems.length; | |
$('#hvt_price').empty(); | |
$('#hvt_price').append('$'+price); | |
} | |
function collectCheckedItems(products, suffix) { | |
var checked_products = []; | |
for (var i = 0; i < products.length; i++) { | |
checkbox_item = "#" + products[i] + "_" + suffix; | |
if($(checkbox_item).is(':checked')) checked_products.push(products[i]); | |
} | |
return checked_products; | |
} | |
function collectSelectedTechsInRow(cell) { | |
var cellArray = cell.split("_") | |
var tech = cellArray[0]; | |
var license = cellArray[1]; | |
for (var i = 0; i < tech_options.length; i++ ) { | |
testing_checkbox_idselector = "#" + tech_options[i] + "_" + license; | |
PropagateSelectionToOtherRows (tech_options[i], $(testing_checkbox_idselector).is(':checked')) | |
} | |
} | |
function PropagateSelectionToOtherRows(tech, checked) { | |
$('input:checkbox[value="' + tech + '"]').prop("checked", checked); | |
} | |
function preSelectTechnology() { | |
favored_tech = 'aspnet'; | |
if (!favored_tech || favored_tech == 'undefined') favored_tech = 'aspnet'; | |
$('input:checkbox[value="JAVA"]').prop("checked", favored_tech == 'java'); | |
$('input:checkbox[value="ASPNET"]').prop("checked", favored_tech == 'aspnet'); | |
$('input:checkbox[value="ASP"]').prop("checked", favored_tech == 'asp'); | |
$('input:checkbox[value="PHP"]').prop("checked", favored_tech == 'php'); | |
} | |
function calculatePrices() { | |
var products = ["ASP", "ASPNET", "PHP", "JAVA"]; | |
checkedItems = collectCheckedItems(products, "website"); | |
calculateAndSetWebsitePrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "website"); | |
checkedItems = collectCheckedItems(products, "domain"); | |
calculateAndSetDomainPrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "domain"); | |
checkedItems = collectCheckedItems(products, "enterprise"); | |
calculateAndSetEnterprisePrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "enterprise"); | |
checkedItems = collectCheckedItems(products, "blueprint"); | |
calculateAndSetBlueprintPrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "blueprint"); | |
checkedItems = collectCheckedItems(products, "developer"); | |
calculateAndSetDeveloperPrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "developer"); | |
checkedItems = collectCheckedItems(products, "oem"); | |
calculateAndSetOEMPrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "oem"); | |
checkedItems = collectCheckedItems(products, "hvt"); | |
calculateAndSetHVTPrice(checkedItems); | |
adjustPurchaseLink(checkedItems, "hvt"); | |
} | |
window.addEventListener('load', function() { | |
preSelectTechnology(); | |
calculatePrices(); | |
$(":checkbox").change(function() { | |
collectSelectedTechsInRow($(this).attr('id')); | |
calculatePrices(); | |
}); | |
$("tr").not('#price_table_header').hover( | |
function () { | |
$(this).css("background", "#F8F8F8"); | |
}, | |
function () { | |
$(this).css("background", ""); | |
} | |
); | |
$("td").not('#price_table_header').hover( | |
function () { | |
if ($(this).attr('id') == 'td_website_price_name') { | |
$("#website_price").css('textDecoration','underline'); | |
$("#website_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_website_price') { | |
$("#website_price").css('textDecoration','underline'); | |
$("#website_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_domain_price_name') { | |
$("#domain_price").css('textDecoration','underline'); | |
$("#domain_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_domain_price') { | |
$("#domain_price").css('textDecoration','underline'); | |
$("#domain_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_enterprise_price_name') { | |
$("#enterprise_price").css('textDecoration','underline'); | |
$("#enterprise_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_enterprise_price') { | |
$("#enterprise_price").css('textDecoration','underline'); | |
$("#enterprise_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_blueprint_price_name') { | |
$("#blueprint_price").css('textDecoration','underline'); | |
$("#blueprint_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_blueprint_price') { | |
$("#blueprint_price").css('textDecoration','underline'); | |
$("#blueprint_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_developer_price_name') { | |
$("#developer_price").css('textDecoration','underline'); | |
$("#developer_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_developer_price') { | |
$("#developer_price").css('textDecoration','underline'); | |
$("#developer_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_oem_price_name') { | |
$("#oem_price").css('textDecoration','underline'); | |
$("#oem_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_oem_price') { | |
$("#oem_price").css('textDecoration','underline'); | |
$("#oem_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_hvt_price_name') { | |
$("#hvt_price").css('textDecoration','underline'); | |
$("#hvt_price_name").css('textDecoration','underline'); | |
} | |
if ($(this).attr('id') == 'td_hvt_price') { | |
$("#hvt_price").css('textDecoration','underline'); | |
$("#hvt_price_name").css('textDecoration','underline'); | |
} | |
}, | |
function () { | |
if ($(this).attr('id') == 'td_website_price_name') { | |
$("#website_price").css('textDecoration','none'); | |
$("#website_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_website_price') { | |
$("#website_price").css('textDecoration','none'); | |
$("#website_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_domain_price_name') { | |
$("#domain_price").css('textDecoration','none'); | |
$("#domain_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_domain_price') { | |
$("#domain_price").css('textDecoration','none'); | |
$("#domain_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_enterprise_price_name') { | |
$("#enterprise_price").css('textDecoration','none'); | |
$("#enterprise_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_enterprise_price') { | |
$("#enterprise_price").css('textDecoration','none'); | |
$("#enterprise_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_blueprint_price_name') { | |
$("#blueprint_price").css('textDecoration','none'); | |
$("#blueprint_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_blueprint_price') { | |
$("#blueprint_price").css('textDecoration','none'); | |
$("#blueprint_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_developer_price_name') { | |
$("#developer_price").css('textDecoration','none'); | |
$("#developer_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_developer_price') { | |
$("#developer_price").css('textDecoration','none'); | |
$("#developer_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_oem_price_name') { | |
$("#oem_price").css('textDecoration','none'); | |
$("#oem_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_oem_price') { | |
$("#oem_price").css('textDecoration','none'); | |
$("#oem_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_hvt_price_name') { | |
$("#hvt_price").css('textDecoration','none'); | |
$("#hvt_price_name").css('textDecoration','none'); | |
} | |
if ($(this).attr('id') == 'td_hvt_price') { | |
$("#hvt_price").css('textDecoration','none'); | |
$("#hvt_price_name").css('textDecoration','none'); | |
} | |
} | |
); | |
}); | |
</script> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment