Changeset 1052715
- Timestamp:
- 12/23/2014 03:27:08 PM (11 years ago)
- Location:
- subscriptiondna/trunk
- Files:
-
- 8 edited
-
dna.js (modified) (4 diffs)
-
dna.php (modified) (4 diffs)
-
login.php (modified) (1 diff)
-
myprofile.php (modified) (1 diff)
-
mysubs.php (modified) (15 diffs)
-
readme.txt (modified) (1 diff)
-
register.php (modified) (15 diffs)
-
styles.css (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
subscriptiondna/trunk/dna.js
r952299 r1052715 1 1 focused=0; 2 2 function countryChanged(country) { 3 if(country=="223") { 4 document.getElementById('stateList').style.display='block'; 3 if(country=="223") 4 { 5 document.getElementById('stateList').style.display=''; 5 6 document.getElementById('state').style.display='none'; 6 } else { 7 document.getElementById('stateListCa').style.display='none'; 8 } 9 else if(country=="38") 10 { 7 11 document.getElementById('stateList').style.display='none'; 8 document.getElementById('state').style.display='block'; 12 document.getElementById('stateListCa').style.display=''; 13 document.getElementById('state').style.display='none'; 14 } 15 else { 16 document.getElementById('stateList').style.display='none'; 17 document.getElementById('stateListCa').style.display='none'; 18 document.getElementById('state').style.display=''; 9 19 document.getElementById('state').value=""; 10 20 } … … 222 232 if(!xGetElementById("check_mo_1").checked && !xGetElementById("check_mo").checked) 223 233 ValidateField(false,"check_mo","Please select payment method."); 224 225 if(xGetElementById("check_mo_1").checked) 234 else 235 ValidateField(true,"check_mo","Please select payment method."); 236 if(xGetElementById("check_mo_1").checked && xGetElementById("payment_info_not_required").value!="1") 226 237 { 227 238 checkEmpty("cc_name","Please enter Name on Card."); … … 236 247 checkEmpty("address1","Please enter Address."); 237 248 checkEmpty("city","Please enter City."); 249 if(document.getElementById('country').value=="223" && document.getElementById('stateList').value!="") 250 { 251 document.getElementById('state').value=document.getElementById('stateList').value; 252 } 238 253 checkEmpty("state","Please select State."); 239 254 checkEmpty("zipcode","Please enter Zip."); … … 250 265 } 251 266 else 252 return true; 253 } 267 { 268 xGetElementById("x_submit").disabled=true; 269 return true; 270 } 271 } -
subscriptiondna/trunk/dna.php
r952299 r1052715 111 111 { 112 112 113 $newcost=$_REQUEST["selected_package_cost"]; 114 $newcostmsg="$".$_REQUEST["selected_package_cost"]; 115 $payment_info_not_required=0; 113 116 $blocked_codes=array("blk1","blk2"); 114 117 if(!in_array($_REQUEST["promo_code"],$blocked_codes)) 115 118 { 116 list($service_id,$billing_routine)=split(";",$_REQUEST["packages"][0]);117 $data=array("promo_code"=>$_REQUEST["promo_code"],"services"=>$service_id,"billing_routine_id"=>$billing_routine);119 list($service_id,$billing_routine)=split(";",$_REQUEST["selected_package"]); 120 $data=array("promo_code"=>$_REQUEST["promo_code"],"services"=>$service_id,"billing_routine_id"=>$billing_routine); 118 121 $promocode = SubscriptionDNA_ProcessRequest($data,"subscription/validate_promocode",true); 119 122 if($promocode["errCode"]<0) … … 124 127 else 125 128 { 126 if($promocode["discount_mod"]=="%") 127 $msg='You save '.$promocode["discount"].$promocode["discount_mod"].''; 128 elseif($promocode["discount_mod"]=="$") 129 $msg='You save $'.$promocode["discount"].''; 130 elseif($promocode["discount_mod"]=="b") 131 $msg='Your code is valid. '.$promocode["billing"]; 132 $validCode="t"; 129 if($promocode["discount_mod"]=="%") 130 { 131 $msg='You save '.$promocode["discount"].$promocode["discount_mod"].''; 132 $discount=$_REQUEST["selected_package_cost"]*($promocode["discount"]/100); 133 $newcost=$_REQUEST["selected_package_cost"]-$discount; 134 $newcost=number_format($newcost, 2); 135 $discount=number_format($discount, 2); 136 if($newcost<0) 137 $newcost=0; 138 $newcostmsg="<strike style='color:#b90000;'>$".$_REQUEST["selected_package_cost"]."</strike> - $".$discount." (".$promocode["discount"]."% discount) = $".$newcost; 139 } 140 elseif($promocode["discount_mod"]=="$") 141 { 142 $msg='You save $'.$promocode["discount"].''; 143 $newcost=$_REQUEST["selected_package_cost"]-$promocode["discount"]; 144 if($newcost<0) 145 $newcost=0; 146 $promocode["discount"]=number_format($promocode["discount"], 2); 147 $newcostmsg="<strike style='color:#b90000;'>$".$_REQUEST["selected_package_cost"]."</strike> - $".$promocode["discount"]." ($".$promocode["discount"]." discount) = $".$newcost; 148 } 149 elseif($promocode["discount_mod"]=="b") 150 { 151 $msg='<br>'.$promocode["billing"]; 152 $newcost=$promocode["first_period_cost"]; 153 $discount=$_REQUEST["selected_package_cost"]-$newcost; 154 $discount=number_format($discount, 2); 155 $newcostmsg="<strike style='color:#b90000;'>$".$_REQUEST["selected_package_cost"]."</strike> - $".$discount." ($".$discount." discount) = $".$newcost; 156 $payment_info_not_required=$promocode["payment_info_not_required"]; 157 } 158 $validCode="t"; 133 159 } 134 160 … … 146 172 $msg=" Invalid discount code: ".$_REQUEST["promo_code"]; 147 173 } 174 $msg= json_encode(array("msg"=>$msg,"newcost"=>$newcost,"newcostmsg"=>$newcostmsg,"payment_info_not_required"=>$payment_info_not_required)); 148 175 } 149 176 die($msg); … … 1128 1155 */ 1129 1156 1157 function SubscriptionDNA_GetProvinces() 1158 { 1159 $canada_provinces=array("Alberta"=>"AB","British Columbia"=>"BC","Manitoba"=>"MB","New Brunswick"=>"NB","Newfoundland and Labrador"=>"NL","Northwest Territories"=>"NT","Nova Scotia"=>"NS","Nunavut"=>"NU","Ontario"=>"ON","Prince Edward Island"=>"PE","Quebec"=>"QC","Saskatchewan"=>"SK","Yukon"=>"YT"); 1160 return($canada_provinces); 1161 } 1162 1130 1163 1131 1164 if ( function_exists ( 'add_action' ) ) -
subscriptiondna/trunk/login.php
r952299 r1052715 23 23 { 24 24 $_SESSION['user_session_id'] = $result->user_session_id; 25 $_SESSION['login_name'] = $ _POST['login_name'];25 $_SESSION['login_name'] = $result->login_name; 26 26 $_SESSION['password'] = $_POST['password']; 27 27 -
subscriptiondna/trunk/myprofile.php
r969112 r1052715 1 1 <? 2 @session_start(); 3 include_once ('lib/common.php'); 4 include ('../header.php'); 2 5 3 6 if($_POST['send']){ -
subscriptiondna/trunk/mysubs.php
r981519 r1052715 20 20 <?php 21 21 22 $msg='<font color="#009933">'.$_REQUEST["msg"].'</font>';22 echo(urldecode($_REQUEST["msg"])); 23 23 $login_name = $_SESSION['login_name']; 24 24 $alreadySigned=array(); 25 if(isset($_REQUEST["Subscribe _API"]))25 if(isset($_REQUEST["SubscribeAPI"])) 26 26 { 27 27 $paid_by_credit_card=1; … … 64 64 //print_r($requestData);die(); 65 65 $result = SubscriptionDNA_ProcessRequest($requestData,"service/subscribe",true); 66 if($_REQUEST["stop_auto_bill"]=="1" && $result["sub_id"]!="") 67 { 68 $data=array("login_name"=>$login_name,"sub_id"=>$result["sub_id"], "status"=>"Discontinued"); 69 SubscriptionDNA_ProcessRequest($data,"subscription/change_status"); 70 } 66 71 //print_r($result); 67 72 $msg='<font color="#00FF00">'.$result["errDesc"].'</font>'; 73 74 ?> 75 <script> 76 location.href='<?php echo(get_permalink($GLOBALS['SubscriptionDNA']['Settings']["dna_pages"]['manage-subscriptions'])); ?>?msg=<?php echo(urlencode($msg)); ?>'; 77 </script> 78 <?php 79 die(); 80 68 81 } 69 82 if($_REQUEST['status']){ … … 72 85 ?> 73 86 <script> 74 location.href='<?php echo(get_permalink($GLOBALS['SubscriptionDNA']['Settings']["dna_pages"]['manage-subscriptions'])); ?>?msg=<?php echo( $result->errDesc); ?>';87 location.href='<?php echo(get_permalink($GLOBALS['SubscriptionDNA']['Settings']["dna_pages"]['manage-subscriptions'])); ?>?msg=<?php echo(urlencode($result->errDesc)); ?>'; 75 88 </script> 76 89 <?php … … 85 98 $data=array("sub_id"=>$_REQUEST['subId'], "confirmation_page"=>$_REQUEST['confirmation_page'], "login_name"=>$login_name); 86 99 $result = SubscriptionDNA_ProcessRequest($data,"subscription/renew"); 87 100 //print_r($result); 88 101 89 102 $ccList = SubscriptionDNA_ProcessRequest(array("login_name"=>$login_name),"creditcard/list"); … … 101 114 102 115 <script type="text/javascript" src="<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/wp-content/plugins/subscriptiondna/ccinfo.js"></script> 103 <form method="post" action="?&subId=<?=$_REQUEST['subId']?>&renew=renew &confirmation_page=0">116 <form method="post" action="?&subId=<?=$_REQUEST['subId']?>&renew=renew"> 104 117 <input type="hidden" name="card_id" value="<?php echo($_REQUEST["card_id"]); ?>"> 118 <input type="hidden" name="confirmation_page" value="<?php if ($_REQUEST["confirmation_page"] == "21"){echo("2");}else{echo("0");} ?>"> 105 119 <h2><?php if ($_REQUEST["confirmation_page"] == "21"){echo("Extend Your ");}else{echo("Renew Your Expired ");} ?>Subscription</h2> 106 120 … … 128 142 <td valign="top"> 129 143 <b>Subscription:</b><br /> 130 <?=$result->services ?> <br />131 <?=$result->billing_routine ?> 144 <?=$result->services ?> 145 <?=$result->billing_routine ?><br> 132 146 <br> 133 147 Subscription Date: <?php echo($result->start_date); ?><br /> … … 212 226 $result=array(); 213 227 include 'cc_info.php'; 214 ?> 228 ?> 229 <tr valign=top id="tr_no_auto_bill" > 230 <td nowrap>Disable Auto-Renewal: </td> 231 <td> </td> 232 <td > 233 <input type="checkbox" name="stop_auto_bill" id="stop_auto_bill" value="1" <?php if($_REQUEST["stop_auto_bill"]=="1")echo("checked"); ?>> 234 </td> 235 </tr> 236 215 237 </table> 216 238 </td> 217 239 218 240 </tr> 219 241 220 242 <tr><td><br> 221 <input type="submit" value="<?php if ($_REQUEST["confirmation_page"] == "21"){echo("Extend");}else{echo("Renew");} ?> Subscription" /></td></tr> 243 <h3 id="msgProgress" style="display:none">Processing your request, Please wait..</h3> 244 <input type="submit" onclick="this.style.display='none';document.getElementById('msgProgress').style.display='';" value="<?php if ($_REQUEST["confirmation_page"] == "21"){echo("Extend");}else{echo("Renew");} ?> Subscription" /></td></tr> 222 245 </table> 223 246 </form> … … 227 250 else 228 251 { 252 if(isset($_POST["confirmation_page"])) 253 { 229 254 if($_REQUEST["payment_method"]=="2") 230 255 $_REQUEST["paid_by_new_card"]=1; … … 251 276 252 277 if($result["errCode"]!=10){ 253 $msg='<font color="#FF0000">'.$result["errDesc"].', Please try again</font>'; 254 }else{ 255 $msg='<font color="#009933">'.$result["errDesc"].'</font>'; 278 $msg='<font color="#063">'.$result["errDesc"].', Please try again</font>'; 256 279 } 280 else 281 { 282 if($_REQUEST["stop_auto_bill"]=="1") 283 { 284 $data=array("login_name"=>$login_name,"sub_id"=>$_REQUEST['subId'], "status"=>"Discontinued"); 285 SubscriptionDNA_ProcessRequest($data,"subscription/change_status"); 286 } 287 $msg='<font color="#009933">'.$result["errDesc"].'</font>'; 288 } 289 ?> 290 <script> 291 location.href='<?php echo(get_permalink($GLOBALS['SubscriptionDNA']['Settings']["dna_pages"]['manage-subscriptions'])); ?>?msg=<?php echo(urlencode($msg)); ?>'; 292 </script> 293 <?php 294 die(); 295 } 296 257 297 } 258 298 } … … 291 331 else 292 332 { 333 334 293 335 ?> 294 336 … … 335 377 336 378 <?php 337 if(trim($subscription->status)=='Discontinued' || $subscription->recurring!="1" )379 if(trim($subscription->status)=='Discontinued' || $subscription->recurring!="1" || !$ccinfo) 338 380 { 339 381 echo "<a href='?&subId=" . $subscription->sub_id ."&card_id=".$subscription->ccid."&renew=renew&confirmation_page=21'>Extend</a> | "; … … 342 384 { 343 385 344 echo "<a href='?&change=" . $subscription->sub_id . "'>Change</a> | <a onClick=\"dnaAskConfimation('Yes','No','Are you sure you want to Unsubscribe?','?&subId=" . $subscription->sub_id . "&status=Unsubscribed')\" href='#'>Unsubscribe</a> | <a onClick=\"dnaAskConfimation('Yes','No','Please confirm you want to Stop Auto-Billing.','?&subId=" . $subscription->sub_id . "&status=Discontinued')\" href='#'>Stop Auto-Billing</a><br>"; 386 echo "<a href='?&change=" . $subscription->sub_id . "'>Change</a> | <a onClick=\"dnaAskConfimation('Yes','No','Are you sure you want to Unsubscribe?','?&subId=" . $subscription->sub_id . "&status=Unsubscribed')\" href='#'>Unsubscribe</a>"; 387 if($subscription->recurring=="1") 388 { 389 if($subscription->rebilling=="1") 390 echo(" | <a onClick=\"dnaAskConfimation('Yes','No','Please confirm you want to Stop Auto-Billing.','?&subId=" . $subscription->sub_id . "&status=Discontinued')\" href='#'>Stop Auto-Billing</a><br>"); 391 else 392 echo(" | <a onClick=\"dnaAskConfimation('Yes','No','Please confirm you want to Start Auto-Billing.','?&subId=" . $subscription->sub_id . "&status=Active')\" href='#'>Start Auto-Billing</a><br>"); 393 } 345 394 } 346 395 else if($subscription->status=='Discontinued') 347 396 { 348 echo "<a onClick=\"dnaAskConfimation('Yes','No','Are you sure you want to Unsubscribe?','?&subId=" . $subscription->sub_id . "&status=Unsubscribed')\" href='#'>Unsubscribe</a> | <a onClick=\"dnaAskConfimation('Yes','No','Please confirm you want to Start Auto-Billing.','?&subId=" . $subscription->sub_id . "&status=Active')\" href='#'>Start Auto-Billing</a><br>"; 397 echo "<a onClick=\"dnaAskConfimation('Yes','No','Are you sure you want to Unsubscribe?','?&subId=" . $subscription->sub_id . "&status=Unsubscribed')\" href='#'>Unsubscribe</a>"; 398 if($subscription->recurring=="1") 399 echo(" | <a onClick=\"dnaAskConfimation('Yes','No','Please confirm you want to Start Auto-Billing.','?&subId=" . $subscription->sub_id . "&status=Active')\" href='#'>Start Auto-Billing</a><br>"); 349 400 } 350 401 ?> … … 353 404 </td> 354 405 </tr></table> 355 356 <p> 357 <small><b>Please note that UNSUBSCRIBE will immediately terminate your subscription. Therefore, please only UNSUBSCRIBE if you have decided for sure to permanently cancel the service. If you would like to cancel your subscription at the expiration of the current billing period (allowing you to finish your current subscription term), please click on DISCONTINUE. When you do so, you can change your mind until the expiration date by clicking on REACTIVATE to restore your subscription.</b></small> 358 </p> 359 <?php 406 <?php 407 /* 408 ?> 409 <p> 410 <small><b>Please note that UNSUBSCRIBE will immediately terminate your subscription. Therefore, please only UNSUBSCRIBE if you have decided for sure to permanently cancel the service. If you would like to cancel your subscription at the expiration of the current billing period (allowing you to finish your current subscription term), please click on DISCONTINUE. When you do so, you can change your mind until the expiration date by clicking on REACTIVATE to restore your subscription.</b></small> 411 </p> 412 <?php 413 */ 360 414 } 361 415 … … 470 524 <div id="DNAFormFields"> 471 525 <form name='customSubscribeForm' action='' method='POST'> 526 <input type='hidden' name='SubscribeAPI' id="SubscribeAPI" value='Submit'> 472 527 <table id="packagesList" cellpadding="3" width="100%"> 473 528 … … 575 630 include 'cc_info.php'; 576 631 ?> 632 <tr valign=top id="tr_no_auto_bill"> 633 <td nowrap>Disable Auto-Renewal: </td> 634 <td> </td> 635 <td > 636 <input type="checkbox" name="stop_auto_bill" id="stop_auto_bill" value="1" <?php if($_REQUEST["stop_auto_bill"]=="1")echo("checked"); ?>> 637 </td> 638 </tr> 577 639 <tr> 578 <td colspan="3">< input type='submit' name='Subscribe_API'id="Subscribe_API" value='Submit'> </td>640 <td colspan="3"><h3 id="msgProgress" style="display:none">Processing your request, Please wait..</h3><input type='submit' name='Subscribe_API' onclick="this.style.display='none';document.getElementById('msgProgress').style.display='';" id="Subscribe_API" value='Submit'> </td> 579 641 </tr> 580 642 </table> -
subscriptiondna/trunk/readme.txt
r981561 r1052715 5 5 Tags: saas, invoice, enroll, paywall, registration, subscribe, ordering, signup, protect, subscription, member, membership, billing, payments, authentication, pay per view, premium content, credit card, login 6 6 Requires at least: 2.8 7 Tested up to: 4. 07 Tested up to: 4.1 8 8 Stable tag: trunk 9 9 -
subscriptiondna/trunk/register.php
r969111 r1052715 1 1 <?php 2 $canada_provinces=SubscriptionDNA_GetProvinces(); 3 2 4 if(isset($_REQUEST["x_submit"])) 3 5 { … … 17 19 } 18 20 } 19 if($_REQUEST["check_mo"]=="1" )21 if($_REQUEST["check_mo"]=="1" || $_REQUEST["payment_info_not_required"]=="1") 20 22 $_REQUEST["paid_by_credit_card"]=""; 21 23 else … … 88 90 $customFields=SubscriptionDNA_ProcessRequest("","list/custom_fields"); 89 91 92 $categories=array(); 93 foreach($packages as $package) 94 { 95 $categories[$package->category]=$package->category; 96 } 90 97 91 98 … … 95 102 <script type="text/javascript"> 96 103 <!-- 104 function showPackage(c){ 105 106 for(i=0;i<<?php echo(count($categories)); ?>;i++) 107 { 108 jQuery("#divPackageType"+i).hide(); 109 } 110 111 jQuery( "#divPackageType"+c).slideDown( "slow" ); 112 113 } 97 114 function paymentMethodChanged(method) 98 115 { … … 108 125 } 109 126 } 110 function packageChanged(packob,package_id )127 function packageChanged(packob,package_id,payment_info_not_required) 111 128 { 112 129 jQuery("#selected_package").val(package_id); … … 123 140 jQuery(packob).addClass("package-box-active") 124 141 } 125 } 126 142 pcode=jQuery('#promo_code'); 143 if(pcode.val()!="") 144 { 145 pcode.blur(); 146 } 147 showHidePaymentInfo(payment_info_not_required); 148 } 149 function showHidePaymentInfo(payment_info_not_required) 150 { 151 if(payment_info_not_required=="1") 152 { 153 for(i=2;i<=7;i++) 154 jQuery("#paymentinfo"+i).hide(); 155 } 156 else 157 { 158 for(i=2;i<=7;i++) 159 jQuery("#paymentinfo"+i).show(); 160 } 161 jQuery("#payment_info_not_required").val(payment_info_not_required); 162 } 163 function displayTotal(total) 164 { 165 jQuery('#selected_package_cost').val(total); 166 document.getElementById('displayTaxInfo').innerHTML="$"+total; 167 } 127 168 jQuery(document).ready(function () { 128 169 var validateUsername = jQuery('#login_name_lbl_error'); … … 138 179 this.timer = setTimeout(function () { 139 180 jQuery.ajax({ 140 url: ' /?dna_validate=login_name',181 url: '<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/?dna_validate=login_name', 141 182 data: 'login_name=' + t.value, 142 183 dataType: 'html', … … 171 212 this.timer = setTimeout(function () { 172 213 jQuery.ajax({ 173 url: ' /?dna_validate=email' ,214 url: '<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/?dna_validate=email' , 174 215 data: 'email='+ t.value, 175 216 dataType: 'html', … … 194 235 195 236 var validatePromo = jQuery('#promo_code_lbl_error'); 196 jQuery('#promo_code').blur(function () { 197 var t = this; 198 if (this.value != this.lastValue && this.value!="") { 199 if (this.timer) clearTimeout(this.timer); 200 validatePromo.removeClass('error').html('<img src="<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/wp-content/plugins/subscriptiondna//images/loader.gif" height="16" width="16" />'); 201 this.timer = setTimeout(function () { 202 jQuery.ajax({ 203 url: '/?dna_validate=promo_code', 204 data: 'promo_code=' + t.value, 205 dataType: 'html', 206 type: 'post', 207 success: function (j) { 208 validatePromo.html(j); 209 hidePaymentInfo(); 210 } 211 }); 212 }, 200); 213 this.lastValue = this.value; 214 } 215 }); 216 237 if(selected_package=="") 238 { 239 validatePromo.html("Please select a package to validate promocode."); 240 } 241 else 242 { 243 jQuery('#promo_code').blur(function () { 244 var t = this; 245 246 var selected_package = jQuery('#selected_package').val(); 247 var selected_package_cost = jQuery('#selected_package_cost').val(); 248 249 if (this.timer) clearTimeout(this.timer); 250 validatePromo.removeClass('error').html('<img src="<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/wp-content/plugins/subscriptiondna//images/loader.gif" height="16" width="16" />'); 251 this.timer = setTimeout(function () { 252 jQuery.ajax({ 253 url: '<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/?dna_validate=promo_code', 254 data: 'promo_code=' + t.value+"&selected_package_cost="+selected_package_cost+"&selected_package="+selected_package, 255 dataType: 'json', 256 type: 'post', 257 success: function (j) { 258 validatePromo.html(j.msg); 259 document.getElementById('displayTaxInfo').innerHTML=j.newcostmsg; 260 showHidePaymentInfo(j.payment_info_not_required); 261 } 262 }); 263 }, 200); 264 this.lastValue = this.value; 265 266 }); 267 } 217 268 }); 218 269 //--> 219 270 </script> 220 <script type="text/javascript" src="<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/wp-content/plugins/subscriptiondna/dna.js "></script>271 <script type="text/javascript" src="<?php echo($GLOBALS['SubscriptionDNA']["siteurl"]); ?>/wp-content/plugins/subscriptiondna/dna.js?cache=1"></script> 221 272 222 273 <div align="center" id="DNAFormFields"> … … 229 280 <form method="post" name="customSubscribeForm" action="" > 230 281 282 <input type='hidden' name='payment_info_not_required' id="payment_info_not_required" value='<?php echo($_REQUEST["payment_info_not_required"]); ?>'> 231 283 <input type='hidden' name='x_confirmurl' value='<?php echo(get_permalink($GLOBALS['SubscriptionDNA']['Settings']["dna_pages"]['login'])); ?>'> 232 284 … … 241 293 <table border="0" width="100%"> 242 294 <tr valign=top> 243 <td colspan="2"><h3>Subscription Plans:</h3></td> 295 <td colspan="2"><h3>Please select a subscription plan:</h3></td> 296 </tr> 297 <tr> 298 <td colspan="2" style="border-bottom: 0px;background: none;"> 299 <?php 300 $catcount=0; 301 $package_types=array(); 302 foreach($categories as $category) 303 { 304 $package_types[$catcount]=array(); 305 foreach($packages as $package) 306 { 307 if($package->category==$category) 308 { 309 $package_types[$catcount][]=$package; 310 } 311 } 312 313 ?> 314 <div class="choice" onclick="showPackage(<?php echo($catcount); ?>);" style="float: left; margin-right: 15px;"> 315 <a href="javascript:;"><?php echo($category); ?></a> 316 317 </div> 318 <?php 319 $catcount++; 320 } 321 ?> 322 323 </td> 324 </tr> 244 325 <tr valign=top> 245 <td colspan="2"> 326 <td colspan="2" style="border-bottom: 0px;background: none;"> 327 <div style="height: 8px;"></div> 246 328 <?php 247 329 $count=0; 248 foreach($package s as $package)330 foreach($package_types as $key=>$package_type) 249 331 { 250 if(in_array($package->service_id.";".$package->billing_routine_id,$_POST["packages"]) || ($package->defaultval=="Yes" && !$selected)) 332 $packages=$package_type; 333 ?> 334 <div id="divPackageType<?php echo($key); ?>" style="<?php if($key!=1 || true)echo("display: none"); ?>"> 335 <?php 336 $count=0; 337 foreach($packages as $package) 251 338 { 252 $selected=$package->uid; 253 $selected_billing=$package->billing_routine_id; 254 $selected_package=$package->service_id.";".$package->billing_routine_id; 339 if(in_array($package->service_id.";".$package->billing_routine_id,$_POST["packages"]) || ($package->defaultval=="Yes" && !$selected)) 340 { 341 $selected=$package->uid; 342 $selected_billing=$package->billing_routine_id; 343 $selected_package=$package->service_id.";".$package->billing_routine_id; 344 $sel_payment_info_not_required=$package->payment_info_not_required; 345 $sel_cost=$package->cost; 346 } 347 ?> 348 <div title="Click to select your subscription plan." id="innerDiv_<?php echo($package->uid); ?>" class='package-box package-box-main' onclick='packageChanged(this,"<?php echo($package->service_id); ?>;<?php echo($package->billing_routine_id); ?>","<?php echo($package->payment_info_not_required); ?>");displayTotal("<?php echo($package->cost); ?>");'> 349 <strong><?php echo($package->package_name); ?></strong> 350 <div ><?php echo($package->package_description); ?></div> 351 </div> 352 <?php 353 $count++; 255 354 } 256 355 ?> 257 <div title="Click to select your subscription plan." id="innerDiv_<?php echo($package->uid); ?>" class='package-box package-box-main' onclick='packageChanged(this,"<?php echo($package->service_id); ?>;<?php echo($package->billing_routine_id); ?>");'> 258 <strong><?php echo($package->package_name); ?></strong> 259 <div ><?php echo($package->package_description); ?></div> 260 </div> 261 <?php 262 $count++; 356 </div> 357 <?php 263 358 } 264 359 ?> 360 <br> 265 361 <span id="package_lbl_error" class="lblErr"></span> 266 362 <input type="hidden" name="package" value="" id="package" /> 267 363 <input type="hidden" name="packages[]" id='selected_package' value="<?php echo($selected_package); ?>" /> 364 <input type='hidden' name='selected_package_cost' id="selected_package_cost" value='<?php echo($sel_cost); ?>'> 365 268 366 </td> 269 367 </tr> … … 365 463 <h3>Payment Information</h3></td></tr> 366 464 <tr> 465 <td style="vertical-align: top;" align="left" width='200'><b>Your Total Today:</b></td> 466 <td> 467 <b><div id='displayTaxInfo'><?php echo($sel_cost==""?"Please select a package.":"$".$sel_cost); ?></div></b><br /> 468 </td> 469 </tr> 470 471 <tr id='paymentinfo7'> 367 472 <td align="left" valign="top"><span id="check_mo_lbl" class="lbl">Payment Method</span></td> 368 473 <td> 369 <input type='radio' name='check_mo' id='check_mo_1' value='0' onclick='paymentMethodChanged("0");'> Credit Card<input type='radio' name='check_mo' id='check_mo' value='1' onclick='paymentMethodChanged("1");'> Check/Mo474 <input type='radio' name='check_mo' id='check_mo_1' value='0' onclick='paymentMethodChanged("0");'> Credit Card <input type='radio' name='check_mo' id='check_mo' value='1' onclick='paymentMethodChanged("1");'> Check/Mo 370 475 <br><span id="check_mo_lbl_error" class="lblErr"></span> 371 476 </td> … … 529 634 <option value="WY">Wyoming</option> 530 635 <option value="XX">Other</option> 531 </select> <input name="state" value="<?php echo($_REQUEST["state"]); ?>" style="display:none" size="30" type="text" id="state" /> 636 </select> 637 <input name="state" value="<?php echo($_REQUEST["state"]); ?>" style="display:none" size="30" type="text" id="state" /> 638 <select name="stateListCa" id="stateListCa" style="display:none" onchange="stateChanged(this.value);" > 639 <option value=""></option> 640 <?php 641 foreach($canada_provinces as $key=>$province) 642 { 643 ?> 644 <option value="<?php echo($province); ?>"><?php echo($key); ?></option> 645 <?php 646 } 647 ?> 648 </select> 532 649 <br><span id="state_lbl_error" class="lblErr"></span> 533 650 </td> … … 744 861 <td></td> 745 862 <td ><br><br> 746 <input TYPE="submit" name="x_submit" VALUE="Click here to submit form" onclick="return checkForm(this.form);" style="font-size: 13pt;"></td>863 <input TYPE="submit" name="x_submit" id="x_submit" VALUE="Click here to submit form" onclick="return checkForm(this.form);" style="font-size: 13pt;"></td> 747 864 </tr> 748 865 </table> … … 754 871 } 755 872 if("<?php echo($selected_package); ?>"!="") 756 packageChanged(document.getElementById("innerDiv_<?php echo($selected); ?>") ,"<?php echo($selected_package); ?>" );873 packageChanged(document.getElementById("innerDiv_<?php echo($selected); ?>") ,"<?php echo($selected_package); ?>","<?php echo($sel_payment_info_not_required); ?>"); 757 874 </script> 758 875 <?php -
subscriptiondna/trunk/styles.css
r981519 r1052715 33 33 #dna-register .lblErr {color: #ed2f60; } 34 34 35 .choice { 36 background-color: #f8f8f8; 37 border: 1px solid #cccccc; 38 border-radius: 8px; 39 box-shadow: 3px 3px 3px #b3b3b3; 40 color: #525252; 41 cursor: pointer; 42 font-size: 17pt; 43 padding: 10px; 44 } 45 .choice a { 46 color: #313131; 47 text-decoration: none; 48 } 49 .choice:hover { 50 background-color: #ffffff; 51 } 52 .packageDiv { 53 background-color: #efefef; 54 border: 1px solid #cccccc; 55 border-radius: 8px; 56 box-shadow: 3px 3px 3px #b3b3b3; 57 margin-bottom: 10px; 58 padding: 10px; 59 } 60 .packageDiv:hover { background-color: #E8F9FF; } 61 .package-sticky{ background-color: #E8F9FF; } 62 .package-selection { float: left; width: 3%; } 63 .package-info { float: left; width: 97%; } 64 .package-title { color:#069; font-size: 20px; } 65 .package-description { margin-top: 8px; } 35 66 36 67
Note: See TracChangeset
for help on using the changeset viewer.