Advertisement
Guest User

New

a guest
Apr 8th, 2014
479
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 42.69 KB | None | 0 0
  1. <?php
  2. /*
  3. Template Name: [My Account]
  4. */
  5. /* =============================================================================
  6.    THIS FILE SHOULD NOT BE EDITED
  7.    ========================================================================== */
  8.  
  9. global  $userdata, $CORE; get_currentuserinfo();
  10.  
  11. $CORE->Authorize();
  12.  
  13. $GLOBALS['flag-myaccount'] = 1;
  14.  
  15. /* =============================================================================
  16.    USER ACTIONS
  17.    ========================================================================== */
  18.  
  19. if(isset($_POST['action']) && $_POST['action'] !=""){
  20.  
  21.     switch($_POST['action']){
  22.    
  23.     case "renewalfree": {
  24.    
  25.     // 1. GET PACKAGE DATA
  26.     $packagefields = get_option("packagefields");
  27.    
  28.     // 2. FIND OUT EXISTING PACKAGE ID
  29.     $packageID =  get_post_meta($_POST['pid'],'packageID',true);   
  30.     $renewal_days   = 30;
  31.    
  32.     // 3. GET PRICE AND DATE
  33.     if(isset($packagefields[$packageID]['expires']) && is_numeric($packagefields[$packageID]['expires']) ){
  34.     $renewal_days = $packagefields[$packageID]['expires']; 
  35.     }
  36.                    
  37.     // 3. UPDATE LISTING
  38.     update_post_meta( $_POST['pid'], 'listing_expiry_date', date("Y-m-d H:i:s", strtotime(date("Y-m-d H:i:s") . " +".$renewal_days." days")) );
  39.    
  40.     // 4. LEAVE A MESSAGE
  41.     $GLOBALS['error_message']   = $CORE->_e(array('account','74'));
  42.    
  43.     } break;   
  44.     case "withdraw": {
  45.    
  46.         if($_POST['amount'] > 0){
  47.          
  48.         $subject  = $CORE->_e(array('account','62'));
  49.         $msg     .= "Username: ".$userdata->display_name."\r\n";
  50.         $msg     .= "User ID: ".$userdata->ID."\r\n";
  51.         $msg     .= "Email: ".$userdata->user_email."\r\n";
  52.         $msg     .= "Amount: ".hook_price($_POST['amount'])."\r\n";
  53.         $msg     .= "Preferences: ".$_POST['message']."\r\n";
  54.          
  55.         // SEND EMAIL TO ADMIN
  56.         $CORE->SENDEMAIL('admin','custom',$subject,$msg);
  57.        
  58.         $GLOBALS['error_message']   = $CORE->_e(array('account','63'));
  59.         }  
  60.    
  61.     } break;
  62.    
  63.     case "subscrption": {
  64.        
  65.         $selstring = "";
  66.        
  67.         // LOOP THROUGH AND SAVE DATA
  68.         if(isset($_POST['selsubs'])){
  69.        
  70.             foreach($_POST['selsubs'] as $val){
  71.            
  72.             $selstring .= "*".$val."*";
  73.            
  74.             }
  75.         }
  76.          
  77.         update_user_meta($userdata->ID,'email_subscriptions',$selstring);
  78.        
  79.         $GLOBALS['error_message']   = $CORE->_e(array('account','42'));
  80.    
  81.     } break;
  82.    
  83.     case "deletemsg": {
  84.  
  85.         update_post_meta($_POST['messageID'],'status','delete');
  86.        
  87.         $GLOBALS['error_message']   = $CORE->_e(array('account','16'));
  88.      
  89.     } break;
  90.    
  91.     case "sendmsg":
  92.        
  93.     $dd = get_userdatabylogin( $_POST['username'] );
  94.    
  95.     // ADDED TO FIX HYPEN USERNAMES
  96.     if($dd == ""){
  97.     $dd = get_userdatabylogin( str_replace("-"," ",$_POST['username']) );  
  98.     }
  99.  
  100.     if(isset($dd->ID)){
  101.    
  102.         // CHECK HOW MANY MESSAGES HAVE BEEN SENT ALREADY FROM THIS USER
  103.         $SQL = "SELECT count(*) AS total FROM $wpdb->posts WHERE post_type = 'wlt_message' AND post_author = '".$userdata->ID."' AND post_date LIKE ('".date("Y-m-d")."%')";   
  104.         $found = (array)$wpdb->get_results($SQL);
  105.  
  106.         if($found[0]->total < 10){ // LIMIT 10 PER DAY
  107.      
  108.             $my_post = array();
  109.             $my_post['post_title']      = strip_tags(strip_tags($_POST['subject']));
  110.             $my_post['post_content']    = strip_tags(strip_tags($_POST['message']));
  111.             $my_post['post_excerpt']    = "";
  112.             $my_post['post_status']     = "publish";
  113.             $my_post['post_type']       = "wlt_message";
  114.             $my_post['post_author']     = $userdata->ID;
  115.             $POSTID                     = wp_insert_post( $my_post );
  116.            
  117.             add_post_meta($POSTID, "username", $dd->user_login);   
  118.             add_post_meta($POSTID, "userID", $dd->ID);
  119.             add_post_meta($POSTID, "status", "unread");
  120.          
  121.             $GLOBALS['error_type']      = "success"; //ok,warn,error,info
  122.             $GLOBALS['error_message']   = $CORE->_e(array('account','17'));
  123.            
  124.             // SEND EMAIL
  125.             $_POST['username'] = $dd->user_nicename;
  126.             $_POST['from_username'] = $userdata->user_nicename;
  127.              
  128.             $CORE->SENDEMAIL($dd->ID,'msg_new');
  129.            
  130.             // CLEAR MESSSAGE VALUES
  131.             $_POST['subject'] = "";
  132.             $_POST['message'] = "";
  133.            
  134.         }else{
  135.      
  136.             $GLOBALS['error_type']      = "error"; //ok,warn,error,info
  137.             $GLOBALS['error_message']   = $CORE->_e(array('account','18'));        
  138.         }      
  139.        
  140.        
  141.         } break;
  142.    
  143.         case "update": {
  144.  
  145.             // SAVE THE CUSTOM PROFILE DATA
  146.             if(isset($_POST['custom']) && is_array($_POST['custom'])){       
  147.                 foreach($_POST['custom'] as $key=>$val){
  148.                     // SAVE DATA
  149.                     if(is_array($val)){
  150.                         update_user_meta($userdata->ID, strip_tags($key), $val);
  151.                     }else{
  152.                         update_user_meta($userdata->ID, strip_tags($key), esc_html(strip_tags($val)));
  153.                     }
  154.                 }
  155.             }
  156.            
  157.             $data = array();
  158.             $data['ID']             = $userdata->ID;
  159.             // CHECK IF WE ARE CHANGING PASSWORDS  
  160.             if(!defined('WLT_DEMOMODE')){    
  161.                 if( ( $_POST['password'] == $_POST['password_r'] ) && $_POST['password'] !=""){
  162.                
  163.                     $data['user_pass']      = $_POST['password'];  
  164.                     // ERROR MESSAGE
  165.                     $GLOBALS['error_message'] = $CORE->_e(array('account','19'));
  166.                    
  167.                 } elseif(isset($_POST['password']) && strlen($_POST['password']) > 1){ 
  168.                        
  169.                     // PASSWORD CHECK ERROR
  170.                     $GLOBALS['error_message'] = $CORE->_e(array('account','20'));
  171.                    
  172.                 }else{
  173.                     // ERROR MESSAGE
  174.                     $GLOBALS['error_message'] = $CORE->_e(array('account','21'));
  175.                 }
  176.             }
  177.            
  178.             // CHECK EMAIL IS VALID        
  179.             update_user_meta($userdata->ID, 'url', strip_tags($_POST['url']));
  180.             update_user_meta($userdata->ID, 'phone', strip_tags($_POST['phone']));
  181.            
  182.             $data['first_name']                 = strip_tags($_POST['fname']);
  183.             $data['last_name']              = strip_tags($_POST['lname']);
  184.             $data['description']        = strip_tags($_POST['description']);       
  185.             wp_update_user( $data );           
  186.            
  187.             // FUNCTION FOR PLUGINS
  188.             //do_action('profile_update');
  189.        
  190.         } break;
  191.        
  192.         default: {
  193.        
  194.         hook_account_save();
  195.        
  196.         } break;
  197.    
  198.     }
  199.  
  200. }
  201. if(isset($_GET['did']) && is_numeric($_GET['did']) ){
  202.  
  203.     $my_post = array();
  204.     $my_post['ID']                  = $_GET['did'];
  205.     $my_post['post_status']         = "trash";
  206.     wp_update_post( $my_post  );
  207.     // ADD LOG ENTRY
  208.     $CORE->ADDLOG("<a href='(ulink)'>".$userdata->user_nicename.'</a> deleted listing <b>['.get_the_title($_GET['did']).']</b>', $userdata->ID,$_GET['did'],'label-important');
  209.     // ERROR MESSAGE
  210.     $GLOBALS['error_message'] = $CORE->_e(array('account','22'));  
  211. }
  212.  
  213. if(isset($_GET['claime']) && is_numeric($_GET['claime']) ){
  214.  
  215.     // CHECK IF THE USER HAS CLAIMED ANY LISTINGS BEFORE
  216.     if(get_user_meta($userdata->ID, "claimed_listing",true) == ""){
  217.         // ALLOW CLAIM
  218.         $my_post = array();
  219.         $my_post['ID']                  = $_GET['claime'];
  220.         $my_post['post_status']         = "pending";
  221.         $my_post['post_author']         = $userdata->ID;   
  222.         wp_update_post( $my_post  );
  223.         // ADD CUSTOM FIELD SO WE KNOW IT WAS CLAIMED
  224.         $_POST['title'] = get_the_title($_GET['claime']);
  225.         // SET USER FLAG
  226.         update_user_meta($userdata->ID, "claimed_listing", $_GET['claime']);
  227.         // REMOVE CLAIM
  228.         $CORE->SENDEMAIL('admin','admin_newclaim');
  229.         // ADD LOG ENTRY
  230.         $CORE->ADDLOG("<a href='(ulink)'>".$userdata->user_nicename.'</a> claimed listing <b>['.get_the_title($_GET['claime']).']</b>', $userdate->ID,$_GET['claime'],'label-important');
  231.        
  232.     // ERROR MESSAGE
  233.     $GLOBALS['error_message'] = $CORE->_e(array('account','23'));
  234.     }else{
  235.    
  236.     // ADD LOG ENTRY
  237.     $CORE->ADDLOG("<a href='(ulink)'>".$userdata->user_nicename.'</a> tried to claim listing <b>['.get_the_title($_GET['claime']).']</b> but was denied! (too many claims)', $userdate->ID,$_GET['claime'],'label-info');
  238.        
  239.     $GLOBALS['error_message'] = $CORE->_e(array('account','24'));
  240.     $GLOBALS['error_type'] = "alert-error";
  241.     }  
  242.    
  243. }
  244.  
  245. if(isset($_GET['submissionlimit'])){
  246.  
  247.     $GLOBALS['error_message'] = $CORE->_e(array('account','25'));
  248.     $GLOBALS['error_type'] = "alert-error";
  249. }
  250.  
  251. /* =============================================================================
  252.    LOAD PAGE TEMPLATE
  253.    ========================================================================== */
  254.  
  255.     $GLOBALS['flag-account'] = 1;
  256.    
  257.     // CHECK FOR MEMBERSHIP ON REGISTRATION
  258.     if($GLOBALS['CORE_THEME']['show_mem_registraion'] == '1'){
  259.     $TEMPMEMID = get_user_meta($userdata->ID,'new_memID',true);
  260.     }
  261.     // MEMBERSHIP DATA
  262.     $membershipfields = get_option("membershipfields");
  263.     $GLOBALS['current_membership']          = get_user_meta($userdata->ID,'wlt_membership',true);
  264.     $GLOBALS['current_membership_expires']  = get_user_meta($userdata->ID,'wlt_membership_expires',true);
  265.     $GLOBALS['customtext']                  = stripslashes(get_user_meta($userdata->ID,'wlt_customtext',true));
  266.     $GLOBALS['usercredit']                  = get_user_meta($userdata->ID,'wlt_usercredit',true);
  267.     $_POST['expired'] = $GLOBALS['current_membership_expires'];
  268.     // CHECK IF MEMBERSHIP HAS EXPIRED
  269.     $CORE->EXPIRED(0,'membership'); // uses global $post->ID
  270.     // DISABLE REG FIELD IF USER HAS ALREADY UPGRADED/PAID 
  271.     if($GLOBALS['current_membership'] != ""){ unset($TEMPMEMID); update_user_meta($userdata->ID,'new_memID',''); }
  272.  
  273.    
  274.     // LOAD IN CHILD THEME TEMPATE FILES
  275.     if(defined('CHILD_THEME_NAME') && file_exists(WP_CONTENT_DIR."/themes/".CHILD_THEME_NAME."/_account.php") ){
  276.    
  277.         include(WP_CONTENT_DIR."/themes/".CHILD_THEME_NAME."/_account.php");
  278.        
  279.     }elseif(file_exists(str_replace("functions/","",THEME_PATH)."/templates/".$GLOBALS['CORE_THEME']['template']."/_account.php") ){
  280.        
  281.         include(str_replace("functions/","",THEME_PATH)."/templates/".$GLOBALS['CORE_THEME']['template'].'/_account.php');
  282.        
  283.     }else{
  284.      
  285. /* =============================================================================
  286.     -- LOAD IN FALLBACK TEMPLATE
  287.     ========================================================================== */  
  288.  
  289.         get_header();
  290.        
  291.         hook_account_before(); ?>
  292.        
  293.         <!-- START COMMENT BLOCK -->
  294.         <div class="block" id="MyAccountBlock" <?php if(isset($_GET['tab'])){ echo "style='display:none;'"; } ?>>
  295.          
  296.          <div class="block-title">
  297.        
  298.          <h3> <span style="float:right;margin-right:10px;"><?php echo $userdata->user_nicename; ?></span> <span><?php the_title(); ?></span></h3></div>
  299.          
  300.          <div class="block-content">
  301.        
  302.            
  303.             <!-- START MEMBERSHIP DISPLAY -->
  304.            
  305.             <?php if($GLOBALS['current_membership'] != "" && is_numeric($GLOBALS['current_membership']) && is_array($membershipfields) ){ ?>
  306.            
  307.             <div class="alert alert-success">
  308.                <b><span class="label label-success"><?php echo $CORE->_e(array('account','43')); ?></span></b>
  309.                <span class="right"><b><?php echo $membershipfields[$GLOBALS['current_membership']]['name']; ?></b></small> </span>
  310.                <br /><small><?php echo $CORE->_e(array('single','20')); ?>: <?php echo hook_date($GLOBALS['current_membership_expires']); ?></small>
  311.                <div class="clearfix"></div>
  312.             </div>
  313.            
  314.             <?php } ?>
  315.            
  316.             <?php if(is_numeric($GLOBALS['usercredit']) && $GLOBALS['usercredit'] < 0){ $current_price = str_replace("-","",$GLOBALS['usercredit']); ?>
  317.            
  318.              <div class="alert alert-error">
  319.                <b><span class="label label-important">Negative Amount Balance</span></b>
  320.                <span class="right"><button style="margin-top:5px;" href="#myPaymentOptions" role="button" class="btn btn-danger" data-toggle="modal">Pay Now</button></span>
  321.                <br /><small>Amount due <?php echo hook_price($current_price); ?>. Please make payment as soon as possible.</small>
  322.                
  323.                <div class="clearfix"></div>
  324.             </div>          
  325.             <?php
  326.            
  327.             $STRING = '
  328.                 <!-- Modal -->
  329.                 <div id="myPaymentOptions" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  330.                   <div class="modal-header">
  331.                     <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
  332.                     <h4 id="myModalLabel">'.$CORE->_e(array('single','13')).' ('.hook_price($current_price).')</h4>
  333.                   </div>
  334.                   <div class="modal-body">'.$CORE->PAYMENTS($current_price, "PAY-".$post->ID."-".date("Ymd"), $post->post_title, $post->ID, $subscription = false).'</div>
  335.                   <div class="modal-footer">
  336.                   '.$CORE->admin_test_checkout().'
  337.                   <button class="btn" data-dismiss="modal" aria-hidden="true">'.$CORE->_e(array('single','14')).'</button></div></div>
  338.                 <!-- End Modal -->';
  339.                
  340.                 echo $STRING;
  341.            
  342.             } ?>
  343.            
  344.             <!-- START CUSTOM TEXT DISPLAY -->            
  345.             <?php if(strlen($GLOBALS['customtext']) > 1){ echo $GLOBALS['customtext']; } ?>      
  346.        
  347.           <div class="row-fluid">          
  348.            
  349.             <?php if($GLOBALS['CORE_THEME']['show_account_edit'] == '1'){ ?>
  350.             <!---------- DISPLAY BLOCK -------------->
  351.             <hr />
  352.             <div class="media">
  353.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyDetailsBlock').show();">
  354.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/1.png">
  355.                 </a>
  356.                  <div class="media-body">
  357.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyDetailsBlock').show();"><?php echo $CORE->_e(array('account','2')); ?></a></h4>
  358.                    <p class="clearfix"><?php echo $CORE->_e(array('account','3')); ?></p>
  359.                  </div>
  360.              </div>
  361.              <!-- end display block --->
  362.              <?php } ?>
  363.              
  364.              
  365.            <!-- START USER CREDIT DISPLAY -->
  366.            <?php if(is_numeric($GLOBALS['usercredit']) && is_numeric($GLOBALS['usercredit']) && $GLOBALS['usercredit'] > 0){ ?>
  367.             <!---------- DISPLAY BLOCK -------------->
  368.             <hr />
  369.             <div class="media">
  370.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyWidthdrawlBlock').show();">
  371.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/9.png">
  372.                 </a>
  373.                  <div class="media-body">
  374.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyWidthdrawlBlock').show();"><?php echo $CORE->_e(array('account','54')); ?></a> (<?php echo hook_price($GLOBALS['usercredit']); ?>)</h4>
  375.                    <p class="clearfix"><?php echo $CORE->_e(array('account','55')); ?></p>
  376.                  </div>
  377.              </div>
  378.              <!-- end display block --->            
  379.            <?php } ?>
  380.              
  381.              <?php if($GLOBALS['CORE_THEME']['show_account_create'] == '1'){
  382.              
  383.              if(isset($membershipfields[$GLOBALS['current_membership']]['submissionamount']) && $membershipfields[$GLOBALS['current_membership']]['submissionamount']  == "0"){ }else{
  384.              ?>
  385.                 <!---------- DISPLAY BLOCK -------------->
  386.                 <hr />
  387.                 <div class="media">
  388.                   <a class="pull-left hidden-phone" href="<?php echo $GLOBALS['CORE_THEME']['links']['add']; ?>">
  389.                                 <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/2.png">
  390.                   </a>
  391.                      <div class="media-body">
  392.                         <h4 class="media-heading"><a href="<?php echo $GLOBALS['CORE_THEME']['links']['add']; ?>"><?php echo $CORE->_e(array('account','4')); ?></a></h4>
  393.                         <p class="clearfix"><?php echo $CORE->_e(array('account','5')); ?></p>
  394.                      </div>
  395.                  </div>
  396.                  <!-- end display block --->
  397.                <?php } } ?>
  398.            
  399.                 <?php if($GLOBALS['CORE_THEME']['show_account_viewing'] == '1'){ ?>
  400.                 <!---------- DISPLAY BLOCK -------------->
  401.                 <hr />
  402.                 <div class="media">
  403.                   <a class="pull-left hidden-phone" href="<?php echo get_home_url(); ?>/?s=&uid=<?php echo $userdata->ID; ?>">
  404.                                 <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/3.png">
  405.                   </a>
  406.                      <div class="media-body">
  407.                         <h4 class="media-heading"><a href="<?php echo get_home_url(); ?>/?s=&uid=<?php echo $userdata->ID; ?>"><?php echo $CORE->_e(array('account','6')); ?></a></h4>
  408.                         <p class="clearfix"><?php echo $CORE->_e(array('account','7')); ?></p>
  409.                      </div>
  410.                  </div>    
  411.                 <!-- end display block --->
  412.                 <?php } ?>
  413.                    
  414.             <?php if($GLOBALS['CORE_THEME']['message_system'] == '1'){ ?>
  415.             <!---------- DISPLAY BLOCK -------------->
  416.             <hr />
  417.             <div class="media">
  418.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyMsgBlock').show();">
  419.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/4.png">
  420.               </a>
  421.                  <div class="media-body">
  422.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyMsgBlock').show();"><?php echo $CORE->_e(array('account','26')); ?></a>
  423.                     <?php $mc = $CORE->MESSAGECOUNT($userdata->user_login); if($mc > 0){  ?><span class="label label-important"><?php echo str_replace("%a",$mc,$CORE->_e(array('account','28'))); ?></span><?php } ?>
  424.                     </h4>
  425.                     <p class="clearfix"><?php echo $CORE->_e(array('account','27')); ?></p>
  426.                  </div>
  427.              </div>    
  428.             <!-- end display block --->
  429.              
  430.             <?php } ?>
  431.            
  432.             <?php if($GLOBALS['CORE_THEME']['show_account_subscriptions'] == '1'){ ?>
  433.             <!---------- DISPLAY BLOCK -------------->
  434.             <hr />
  435.             <div class="media">
  436.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MySubscriptionBlock').show();">
  437.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/6.png">
  438.               </a>
  439.                  <div class="media-body">
  440.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MySubscriptionBlock').show();"><?php echo $CORE->_e(array('account','44')); ?></a></h4>
  441.                     <p class="clearfix"><?php echo $CORE->_e(array('account','45')); ?></p>
  442.                  </div>
  443.              </div>    
  444.              <!-- end display block --->
  445.              <?php } ?>
  446.            
  447.            
  448.             <?php if($GLOBALS['CORE_THEME']['show_account_favs'] == '1'){ ?>
  449.             <!---------- DISPLAY BLOCK -------------->         
  450.              <hr />            
  451.              <div class="media">
  452.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyFavsBlock').show();">
  453.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/7.png">
  454.               </a>
  455.                  <div class="media-body">
  456.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyFavsBlock').show();"><?php echo $CORE->_e(array('account','46')); ?></a></h4>
  457.                     <p class="clearfix"><?php echo $CORE->_e(array('account','47')); ?></p>
  458.                  </div>
  459.              </div>    
  460.             <?php } ?>
  461.            
  462.            
  463.             <?php if($GLOBALS['CORE_THEME']['show_account_friends'] == '1'){ ?>
  464.             <!---------- DISPLAY BLOCK -------------->         
  465.              <hr />            
  466.              <div class="media">
  467.               <a class="pull-left hidden-phone" href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyFriendsBlock').show();">
  468.                             <img class="media-object" src="<?php echo FRAMREWORK_URI.'/img/'; ?>account/8.png">
  469.               </a>
  470.                  <div class="media-body">
  471.                     <h4 class="media-heading"><a href="javascript:void(0);" onclick="jQuery('#MyAccountBlock').hide();jQuery('#MyFriendsBlock').show();"><?php echo $CORE->_e(array('account','70')); ?></a></h4>
  472.                     <p class="clearfix"><?php echo $CORE->_e(array('account','71')); ?></p>
  473.                  </div>
  474.              </div>    
  475.             <?php } ?>
  476.            
  477.            
  478.            
  479.              <hr />
  480.            
  481.             <?php echo hook_account_menu(); ?>         
  482.                  
  483.              <a class="btn right" href="<?php echo wp_logout_url(); ?>"><?php echo $CORE->_e(array('account','8')); ?></a>
  484.                
  485.             </div><!-- end row -->
  486.        
  487.             </div><!-- end block-content -->
  488.          
  489.         </div>
  490.         <!-- END COMMENT BLOCK -->
  491.        
  492.          
  493.         <!-- START ACCOUNT WIDTHDRAWAL  -->
  494.         <div class="block" id="MyWidthdrawlBlock" style="display:none;">
  495.        
  496.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','55')); ?></span></h3></div>
  497.          
  498.         <div class="block-content">
  499.        
  500.         <p><?php echo $CORE->_e(array('account','56')); ?></p>
  501.         <p><b><?php echo $CORE->_e(array('account','57')); ?> <?php echo hook_price($GLOBALS['usercredit']); ?></b></p>
  502.         <?php if(strlen($GLOBALS['CORE_THEME']['auction_house_percentage']) > 0){ ?>
  503.         <p><?php echo str_replace("%a",$GLOBALS['CORE_THEME']['auction_house_percentage'],$CORE->_e(array('account','58'))); ?></p>
  504.         <?php } ?>
  505.         <hr />
  506.          
  507.         <form class="form-horizontal" method="post">
  508.         <input type="hidden" name="action" value="withdraw" />
  509.        
  510.           <div class="control-group">
  511.             <label class="control-label" for="inputEmail"><?php echo $CORE->_e(array('account','59')); ?></label>
  512.             <div class="controls">
  513.              
  514.             <div class="input-prepend clearfix">
  515.             <span class="add-on"><?php echo $GLOBALS['CORE_THEME']['currency']['symbol']; ?></span>
  516.             <input type="text" name="amount" class="span8" />
  517.             </div>
  518.              
  519.             </div>
  520.           </div>
  521.           <div class="control-group">
  522.             <label class="control-label" for="inputPassword"><?php echo $CORE->_e(array('account','60')); ?></label>
  523.             <div class="controls">
  524.               <textarea name="message"></textarea>
  525.             </div>
  526.           </div>
  527.           <div class="control-group">
  528.             <div class="controls">
  529.               <label class="checkbox">
  530.                
  531.               </label>
  532.               <button type="submit" class="btn btn-primary"><?php echo $CORE->_e(array('account','61')); ?></button>
  533.             </div>
  534.           </div>
  535.         </form>
  536.        
  537.         <hr />
  538.                  
  539.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MyWidthdrawlBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  540.        
  541.         <div class="clearfix"></div>
  542.        
  543.         </div>
  544.        
  545.         </div>
  546.         <!-- END WIDTHDRAWAL  -->
  547.        
  548.        
  549.        
  550.        
  551.         <?php if($GLOBALS['CORE_THEME']['show_account_friends'] == '1'){ ?>
  552.          <!-- START FRIENDS LIST  -->
  553.         <div class="block" id="MyFriendsBlock" style="display:none;">
  554.        
  555.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','70')); ?></span></h3></div>
  556.          
  557.         <div class="block-content">
  558.        
  559.         <?php $my_list = get_user_meta($userdata->ID, 'friends_list',true); ?>
  560.        
  561.         <h4><?php echo $CORE->_e(array('account','72')); ?></h4>
  562.         <hr />
  563.         <?php if(is_array($my_list) && !empty($my_list) ){ ?>
  564.         <table class="table table-bordered table-striped">
  565.             <thead>
  566.               <tr>
  567.                <th><?php echo $CORE->_e(array('account','68')); ?></th>
  568.                 <th><?php echo $CORE->_e(array('login','10')); ?></th>
  569.                 <th><?php echo $CORE->_e(array('account','50')); ?></th>
  570.               </tr>
  571.             </thead>
  572.             <tbody>
  573.             <?php foreach($my_list as $key=>$val){
  574.             // BUILD USER ID
  575.             $userid = str_replace("ID:","",$key);
  576.             if($userid < 1){ continue; }
  577.             $user_info = get_userdata($userid);
  578.             $listings = $CORE->count_user_posts_by_type( $userid, THEME_TAXONOMY."_type" );            
  579.              ?>
  580.               <tr id="rem_u_<?php echo $userid; ?>">
  581.               <td><?php echo  str_replace('avatar-50','avatar-50 img-circle',get_avatar( $userid, 50 )); ?></td>
  582.               <td><a href="<?php echo get_author_posts_url( $userid ); ?>"><b><?php echo $user_info->display_name; ?></b></a> <p><?php echo str_replace("%a", $listings, $CORE->_e(array('author','1'))); ?></p></td>
  583.                 <td>                
  584.                   <code><?php echo '<i class="icon-remove-sign"></i> <a href="javascript:void(0);" onclick="jQuery(\'#rem_u_'.$userid.'\').hide();WLTAddF(\''.str_replace("http://","",get_home_url()).'\', \'friends\', '.str_replace("ID:","",$key).', \'core_ajax_callback\');">'.$CORE->_e(array('account','69')).'</a>'; ?></code>
  585.                 </td>                
  586.               </tr>
  587.              <?php } ?>
  588.             </tbody>
  589.           </table>
  590.          <?php } ?>
  591.          
  592.          <?php $my_list = get_user_meta($userdata->ID, 'blocked_list',true); ?>
  593.         <h4><?php echo $CORE->_e(array('account','73')); ?></h4>
  594.         <hr />
  595.         <?php if(is_array($my_list) && !empty($my_list) ){ ?>
  596.         <table class="table table-bordered table-striped">
  597.             <thead>
  598.               <tr>
  599.                <th><?php echo $CORE->_e(array('account','68')); ?></th>
  600.                 <th><?php echo $CORE->_e(array('login','10')); ?></th>
  601.                 <th><?php echo $CORE->_e(array('account','50')); ?></th>
  602.               </tr>
  603.             </thead>
  604.             <tbody>
  605.             <?php foreach($my_list as $key=>$val){
  606.             // BUILD USER ID
  607.             $userid = str_replace("ID:","",$key);
  608.             if($userid < 1){ continue; }
  609.             $user_info = get_userdata($userid);
  610.             $listings = $CORE->count_user_posts_by_type( $userid, THEME_TAXONOMY."_type" );            
  611.              ?>
  612.               <tr id="rem_b_<?php echo $userid; ?>">
  613.               <td><?php echo  str_replace('avatar-50','avatar-50 img-circle',get_avatar( $userid, 50 )); ?></td>
  614.               <td><a href="<?php echo get_author_posts_url( $userid ); ?>"><b><?php echo $user_info->display_name; ?></b></a> <p><?php echo str_replace("%a", $listings, $CORE->_e(array('author','1'))); ?></p></td>
  615.                 <td>                
  616.                   <code><?php echo '<i class="icon-remove-sign"></i> <a href="javascript:void(0);" onclick="jQuery(\'#rem_b_'.$userid.'\').hide();WLTAddF(\''.str_replace("http://","",get_home_url()).'\', \'blocked\', '.str_replace("ID:","",$key).', \'core_ajax_callback\');">'.$CORE->_e(array('account','69')).'</a>'; ?></code>
  617.                 </td>                
  618.               </tr>
  619.              <?php } ?>
  620.             </tbody>
  621.           </table>
  622.          <?php } ?>        
  623.          
  624.        
  625.         <hr />       
  626.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MyFriendsBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  627.        
  628.         <div class="clearfix"></div>
  629.          
  630.         </div>      
  631.        
  632.         </div>
  633.         <!--- END FRIENDS LIST --->
  634.         <?php } ?>
  635.        
  636.        
  637.        
  638.        
  639.         <?php if($GLOBALS['CORE_THEME']['show_account_favs'] == '1'){ ?>
  640.         <!-- START FAVORITES   -->
  641.         <div class="block" id="MyFavsBlock" style="display:none;">
  642.        
  643.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','46')); ?></span></h3></div>
  644.          
  645.         <div class="block-content">
  646.        
  647.        
  648.         <?php $my_list = get_user_meta($userdata->ID, 'favorite_list',true); ?>
  649.      <?php if(is_array($my_list) && !empty($my_list) ){ ?>
  650.         <table class="table table-bordered table-striped">
  651.             <thead>
  652.               <tr>
  653.                 <th><?php echo $CORE->_e(array('account','50')); ?></th>
  654.                 <th><?php echo $CORE->_e(array('account','51')); ?></th>
  655.               </tr>
  656.             </thead>
  657.             <tbody>
  658.             <?php foreach($my_list as $key=>$val){ $title = get_the_title(str_replace("ID:","",$key));
  659.            
  660.             $post_7 = get_post(str_replace("ID:","",$key));
  661.             if($post_7->post_type != THEME_TAXONOMY."_type"){ continue; }
  662.            
  663.               ?>
  664.               <tr id="rem_<?php echo str_replace("ID:","",$key); ?>">
  665.                 <td>
  666.                   <code><?php echo '<i class="icon-remove-sign"></i> <a href="javascript:void(0);" onclick="jQuery(\'#rem_'.str_replace("ID:","",$key).'\').hide();WLTAddF(\''.str_replace("http://","",get_home_url()).'\', \'favorite\', '.str_replace("ID:","",$key).', \'core_ajax_callback\');">'.$CORE->_e(array('account','52')).'</a>'; ?></code>
  667.                 </td>
  668.                 <td><a href="<?php echo get_permalink(str_replace("ID:","",$key)); ?>"><?php echo $title; ?></a></td>
  669.               </tr>
  670.              <?php } ?>
  671.             </tbody>
  672.           </table>
  673.          <?php }else{ ?>
  674.          <div class="alert">
  675.             <button type="button" class="close" data-dismiss="alert">&times;</button>
  676.               <?php echo $CORE->_e(array('account','53')); ?>
  677.             </div>
  678.          <?php } ?>
  679.        
  680.         <hr />       
  681.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MyFavsBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  682.        
  683.         <div class="clearfix"></div>
  684.          
  685.         </div>      
  686.        
  687.         </div>
  688.         <!--- END FAVORITES --->
  689.         <?php } ?>
  690.        
  691.        
  692.        
  693.        
  694.         <!-- START SUBSCRIPTIONS   -->
  695.         <div class="block" id="MySubscriptionBlock" style="display:none;">
  696.        
  697.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','44')); ?></span></h3></div>
  698.          
  699.         <div class="block-content">
  700.          
  701.          <form method="post">
  702.          <input type="hidden" name="action" value="subscrption" />
  703.          <p><?php echo $CORE->_e(array('account','49')); ?></p>
  704.          
  705.          <select class="span12" name="selsubs[]" multiple="multiple" style="height:200px;">
  706.          <?php
  707.          
  708.          $user_subscriptions = get_user_meta($userdata->ID,'email_subscriptions',true);
  709.          $user_subscriptions = str_replace("**","*",$user_subscriptions);
  710.          $us = explode("*",$user_subscriptions);
  711.          echo $CORE->CategoryList(array($us,false,0,THEME_TAXONOMY)); ?>
  712.          </select>
  713.          <hr />
  714.          
  715.         <button class="btn btn-primary" type="submit"><?php echo $CORE->_e(array('button','6')); ?></button>
  716.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MySubscriptionBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  717.        
  718.          
  719.          </form>
  720.          
  721.         </div>
  722.        
  723.        
  724.        
  725.         </div>
  726.         <!--- END SUBSCRIPTIONS --->
  727.        
  728.        
  729.      
  730.         <!-- START ACCOUNT DETAILS BLOCK -->
  731.         <div class="block" id="MyDetailsBlock" style="display:none;">
  732.          
  733.          <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','2')); ?></span></h3></div>
  734.          
  735.          <div class="block-content">
  736.          
  737.         <div class="row-fluid">
  738.        
  739.         <form action="" method="post" onsubmit="return ValidateCoreRegFields();" enctype="multipart/form-data">
  740.         <input type="hidden" name="action" value="update" />
  741.        
  742.         <legend><?php echo $CORE->_e(array('account','2')); ?></legend>
  743.        
  744.         <div class="row-fluid">
  745.        
  746.             <div class="span6" style="padding-right:30px;">
  747.            
  748.                 <div class="control-group">
  749.                     <label class="control-label"><i class="icon-user"></i> <?php echo $CORE->_e(array('checkout','35')); ?></label>
  750.                     <div class="controls">
  751.                         <input type="text" name="fname" class="row-fluid" value="<?php echo $userdata->first_name ?>">                        
  752.                     </div>
  753.                 </div> 
  754.            
  755.                 <div class="control-group">
  756.                     <label class="control-label"><i class="icon-envelope"></i> <?php echo $CORE->_e(array('account','9')); ?></label>
  757.                     <div class="controls">
  758.                         <input type="text" name="email" class="row-fluid" value="<?php echo $userdata->user_email; ?>" disabled="disabled">                        
  759.                     </div>
  760.                 </div>       
  761.                
  762.                 <div class="control-group">
  763.                     <label class="control-label"><i class="icon-globe"></i> <?php echo $CORE->_e(array('account','14')); ?></label>
  764.                     <div class="controls">
  765.                         <input type="text" name="url" class="row-fluid" value="<?php echo get_user_meta($userdata->ID,'url',true); ?>">                      
  766.                     </div>
  767.                 </div>
  768.                
  769.                 <div class="control-group">
  770.                     <label class="control-label"><i class="icon-bell"></i> <?php echo $CORE->_e(array('account','41')); ?></label>
  771.                     <div class="controls">
  772.                         <input type="text" name="phone" class="row-fluid" value="<?php echo get_user_meta($userdata->ID,'phone',true); ?>">                        
  773.                     </div>
  774.                 </div>
  775.                
  776.                
  777.                
  778.                 <?php // USER PHOTO INTEGRATION
  779.                 if(function_exists('userphoto')){ ?>
  780.                 <style>#userphoto th { display:none; } .field-hint { font-size:11px; }</style>
  781.                 <?php
  782.                 userphoto_display_selector_fieldset();
  783.                 userphoto_thumbnail($userdata->ID);
  784.                 echo '<p><label><input type="checkbox" name="userphoto_delete" id="userphoto_delete" onclick="userphoto_onclick()"> Delete photo?</label></p>';
  785.                 }
  786.                 ?>
  787.                        
  788.             </div>
  789.            
  790.             <div class="span6">
  791.            
  792.            
  793.                <div class="control-group">
  794.                     <label class="control-label"> <?php echo $CORE->_e(array('checkout','36')); ?></label>
  795.                     <div class="controls">
  796.                         <input type="text" name="lname"  value="<?php echo $userdata->last_name ?>" >                        
  797.                     </div>
  798.                 </div>
  799.            
  800.                 <div class="alert">
  801.                
  802.                 <div class="control-group">
  803.                     <label class="control-label"><i class="icon-lock"></i> <?php echo $CORE->_e(array('account','10')); ?></label>
  804.                     <div class="controls">
  805.                         <input type="password" name="password" class="row-fluid">
  806.                        
  807.                     </div>
  808.                 </div>
  809.                
  810.                 <div class="control-group">
  811.                     <label class="control-label"><i class="icon-lock"></i> <?php echo $CORE->_e(array('account','11')); ?></label>
  812.                     <div class="controls">
  813.                         <input type="password" name="password_r" class="row-fluid">                        
  814.                     </div>
  815.                 </div>
  816.                
  817.                 </div>
  818.                
  819.                 <?php echo str_replace("form-row row-fluid customfield","control-group", str_replace("control-label span3","control-label", str_replace("field_wrapper span9","controls",  $CORE->CORE_FIELDS(true)))); ?>
  820.            
  821.            
  822.             </div>
  823.            
  824.             <div class="clearfix"></div>
  825.              
  826.               <div class="control-group">
  827.                     <label class="control-label"><i class="icon-comment"></i> <?php echo $CORE->_e(array('account','13')); ?></label>
  828.                    <textarea style="height:120px;" class="span12" name="description"><?php echo stripslashes($userdata->description); ?></textarea>
  829.                      
  830.                 </div>
  831.                
  832.         </div>
  833.        
  834.         <?php echo hook_account_mydetails_after(); ?>  
  835.          
  836.         <div class="clearfix"></div>
  837.         <hr />
  838.        
  839.         <button class="btn btn-primary" type="submit"><?php echo $CORE->_e(array('button','6')); ?></button>
  840.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MyDetailsBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  841.            
  842.         </form>
  843.         </div>
  844.            
  845.          </div><!-- end block-content -->
  846.          
  847.         </div>
  848.         <!-- END ACCOUNT DETAILS BLOCK -->
  849.        
  850.        
  851.        
  852.         <!-- START MESSAGE SYSTEM BLOCK -->
  853.         <?php if(isset($GLOBALS['CORE_THEME']['message_system']) && $GLOBALS['CORE_THEME']['message_system'] != '0'){ ?>
  854.         <div class="block" id="MyMsgBlock" <?php if(isset($_GET['tab']) && $_GET['tab'] == "msg"){ }else{ ?>style="display:none;"<?php } ?>>
  855.                  
  856.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('account','26')); ?></span></h3></div>
  857.          
  858.             <div class="block-content">
  859.            
  860.                 <div class="row-fluid">
  861.                
  862.               <div id="msgAjax"></div>
  863.               <form id="sendmsgform" name="sendmsgform" method="post" action="" class="alert" <?php if(isset($_GET['tab']) && $_GET['tab'] == "msg" && isset($_GET['show'])){ }else{ ?>style="display:none;"<?php } ?>>
  864.               <input type="hidden" name="action" value="sendmsg" />
  865.              
  866.               <a href="javascript:void(0);" class="label label-warning" style="float:right;margin-top:30px;" onclick="jQuery('#sendmsgform').hide();"><?php echo $CORE->_e(array('account','48')); ?></a>
  867.              
  868.               <h3><?php echo $CORE->_e(array('account','29')); ?></h3>
  869.              
  870.               <p><?php echo $CORE->_e(array('account','30')); ?></p>
  871.              
  872.               <hr />
  873.              
  874.               <div class="input-prepend">
  875.                   <span class="add-on" id="ajaxMsgUser">@</span>
  876.                   <input class="span12" name="username" id="usernamefield" type="text" placeholder="<?php echo $CORE->_e(array('account','31')); ?>"  value="<?php if(isset($_GET['u'])){ echo strip_tags($_GET['u']); } ?>">
  877.               </div>
  878.               <script type="application/javascript">
  879.                     jQuery('#usernamefield').change(function() { WLTValidateUsername('<?php echo str_replace("http://","",get_home_url()); ?>', this.value, 'ajaxMsgUser')  } );                   
  880.               </script>
  881.               <hr />
  882.               <p><?php echo $CORE->_e(array('account','32')); ?></p>
  883.               <input type="text" name="subject" style="width:98%;" id="subjectfield" value="<?php if(isset($_POST['subject'])){ echo strip_tags(strip_tags($_POST['subject'])); } ?>" >
  884.               <p><?php echo $CORE->_e(array('account','33')); ?></p>
  885.               <textarea id="sendMsgContent" rows="3" style="width:98%;height:80px;" name="message"><?php if(isset($_POST['message'])){ echo strip_tags(strip_tags($_POST['message'])); } ?></textarea>              
  886.               <button class="btn btn-warning"><?php echo $CORE->_e(array('account','34')); ?></button>
  887.               </form>
  888.                
  889.                
  890.               <form method="post" action="" id="messageDel" name="messageDel">
  891.               <input type="hidden" name="action" value="deletemsg" />
  892.               <input type="hidden" name="messageID" id="messageID" value="" />
  893.               </form>
  894.                
  895.                 <table class="table table-bordered table-striped">
  896.          
  897.                 <thead>
  898.                   <tr>
  899.                     <th style="width:80px;"><?php echo $CORE->_e(array('account','35')); ?></th>
  900.                     <th style="width:380px;"><?php echo $CORE->_e(array('account','36')); ?></th>
  901.                     <th><?php echo $CORE->_e(array('account','37')); ?></th>
  902.                   </tr>
  903.                 </thead>
  904.                 <tbody>
  905.                 <?php echo $CORE->MESSAGELIST($userdata->user_login); ?>
  906.                  
  907.                 </tbody>
  908.               </table>
  909.              
  910.               <hr />
  911.              
  912.               <a href="javascript:void(0);" class="btn btn-primary" onclick="jQuery('#sendmsgform').show();"><?php echo $CORE->_e(array('account','38')); ?></a>
  913.              
  914.                  
  915.         <button class="btn right" type="button" onclick="jQuery('#MyAccountBlock').show();jQuery('#MyMsgBlock').hide();"><?php echo $CORE->_e(array('button','7')); ?></button>
  916.        
  917.                 </div>
  918.            
  919.             </div>
  920.        
  921.       </div>
  922.       <!-- end message system -->
  923.       <?php } ?>
  924.      
  925.       <?php do_action('hook_account_after'); ?>
  926.      
  927.         <?php if($GLOBALS['CORE_THEME']['show_account_membership'] == '1'){  ?>
  928.         <!-- START MEMBERSHIP PACKAGES   -->
  929.         <?php if(is_array($membershipfields) && count($membershipfields) > 0){ ?>
  930.         <div class="block" id="MyMembershipPackages">
  931.        
  932.         <div class="block-title"><h3><span><?php echo $CORE->_e(array('add','24')); ?></span></h3></div>
  933.          
  934.         <div class="block-content">
  935.         <p><?php echo $CORE->_e(array('add','25')); ?> </p>
  936.         <ul class="packagelistitems"><?php echo $CORE->packageblock(2,'membershipfields',10); ?></ul>        
  937.         </div>
  938.         </div>
  939.         <!-- memberships form -->
  940.         <form method="post" name="MEMBERSHIPFORM" action="<?php echo $GLOBALS['CORE_THEME']['links']['add']; ?>" id="MEMBERSHIPFORM" style="margin:0px;padding:0px;">
  941.         <input type="hidden" name="membershipID" id="membershipID" value="-1" />
  942.         </form>
  943.         <?php } ?>
  944.         <?php } ?>
  945.            
  946.        
  947.         <!-- START MY ORDERS BLOCK  -->
  948.         <?php $order_string = $CORE->MYORDERS(); if(strlen($order_string) > 1){ ?>
  949.         <div class="block" id="MyOrders">
  950.        
  951.          <div class="block-title"><h3><span><?php echo $CORE->_e(array('order_status','title0')); ?></span></h3></div>
  952.          
  953.          <div class="block-content">
  954.          <table class="table table-striped">
  955.               <thead>
  956.                 <tr>
  957.                   <th>#</th>
  958.                   <th><?php echo $CORE->_e(array('order_status','title1')); ?></th>
  959.                   <th><?php echo $CORE->_e(array('order_status','title2')); ?></th>
  960.                   <th><?php echo $CORE->_e(array('order_status','title3')); ?></th>
  961.                   <th><?php echo $CORE->_e(array('order_status','title4')); ?></th>
  962.                   <th> </th>
  963.                 </tr>
  964.               </thead>
  965.               <tbody>
  966.               <?php echo $order_string; ?>              
  967.               </tbody>
  968.             </table>
  969.          
  970.          <?php do_action('hook_account_orders_after'); ?>
  971.          
  972.          </div>        
  973.        
  974.         </div>        
  975.         <!-- END MY ORDERS BLOCK -->
  976.         <?php } ?>
  977.        
  978.        
  979.        
  980.         <?php      
  981.         // AUTO SUBMIT MEMBERSHIP FORM FOR MEMBERSHIPS ON REGISTRATION PAGE  
  982.         if(isset($TEMPMEMID) && is_numeric($TEMPMEMID) && isset($membershipfields[$TEMPMEMID]['price']) && $membershipfields[$TEMPMEMID]['price'] > 0){
  983.         ?>
  984.         <form method="post" name="MEMBERSHIPFORM1" action="<?php echo $GLOBALS['CORE_THEME']['links']['add']; ?>" id="MEMBERSHIPFORM1" style="margin:0px;padding:0px;">
  985.         <input type="hidden" name="membershipID" id="membershipID" value="<?php echo $TEMPMEMID; ?>">
  986.         </form>
  987.         <script>jQuery(document).ready(function(){ jQuery('#MEMBERSHIPFORM1').submit(); });</script>
  988.         <?php } ?>
  989.        
  990.         <?php get_footer();
  991.  
  992.  
  993.    
  994.     }
  995.    
  996.     // THAT'S ALL FOLKS!
  997.  
  998. /* =============================================================================
  999.    -- END FILE
  1000.    ========================================================================== */
  1001. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement