Ejemplo n.º 1
0
 public function view($user_id, $id_type = NULL, $membershipsuccess = FALSE)
 {
     $this->load->helper('form');
     $this->load->model("members/membermodel", "", true);
     $data = $this->membermodel->viewProfile($user_id, $id_type);
     $billing["billing_info"] = $data["member"]->billing_info;
     $billing["member"] = $data["member"];
     if (isset($data["member"]->billing_info)) {
         $billing["countries_dropdown"] = form_countries("billing_info[country]", $billing["billing_info"]->country, array("id" => "billing_info_country"));
     } else {
         $billing["countries_dropdown"] = form_countries("billing_info[country]", 'US', array("id" => "billing_info_country"));
     }
     $data["membershipsuccess"] = $membershipsuccess;
     $data["billing_form"] = $this->load->view("members/billing_form", $billing, true);
     $this->load->model("locationmodel", "", true);
     $accesspricing = $this->locationmodel->getAccessPricing();
     $data["allow_monthly"] = $accesspricing->allow_monthly_memberships;
     //#213 - Waitlist
     $data["waitlist"] = get_user_meta($data['member']->wp_users_id, 'waitlist', true);
     $this->load->view("members/profile", $data);
 }
Ejemplo n.º 2
0
            <option value="VA">Virginia</option> 
            <option value="WA">Washington</option> 
            <option value="WV">West Virginia</option> 
            <option value="WI">Wisconsin</option> 
            <option value="WY">Wyoming</option>
        </select>        

      </li>
      <li>
        <label for="billing_zip_code">Zip Code</label>
        <input type="text" id="billing_zip_code" class="required" name="billing_zip_code" value="" />
      </li>
      <li>
        <label for="billing_info_country">Country</label><br />
       <?php 
echo form_countries("billing_info_country", 'US', array("name" => "billing_info[country]", "id" => "billing_country"));
?>
        
      </li>
    </ul>
  </fieldset>
  
  <div class="clearfix" style="clear:both">
    <br><br>
    <input type="submit" value="Submit" class="btn" /> &nbsp;&nbsp; <div class="loader" style="display: none"></div>
  </div>
  
</form>

<script type="text/javascript">
    $(function() {
        } else {
            $CI =& get_instance();
            $CI->load->helper('date');
            setlocale(LC_MONETARY, 'en_US');
            $CI->load->helper("url");
            $CI->load->helper("form");
            $CI->load->helper("html");
            $CI->load->helper('form');
            $CI->load->model("members/membermodel", "", true);
            $data = $CI->membermodel->viewProfile($user_ID, UserIdType::WORDPRESSID);
            $billing["billing_info"] = $data["member"]->billing_info;
            $billing["member"] = $data["member"];
            if (isset($data["member"]->billing_info)) {
                $billing["countries_dropdown"] = form_countries("billing_info[country]", $billing["billing_info"]->country, array("id" => "billing_info_country"));
            } else {
                $billing["countries_dropdown"] = form_countries("billing_info[country]", 'US', array("id" => "billing_info_country"));
            }
            $data["membershipsuccess"] = isset($_SESSION['membershipsuccess']);
            $data["billing_form"] = $CI->load->view("members/billing_form", $billing, true);
            $CI->load->model("locationmodel", "", true);
            $accesspricing = $CI->locationmodel->getAccessPricing();
            $data["allow_monthly"] = $accesspricing[0]->allow_monthly_memberships;
            //#213 - Waitlist
            $data["waitlist"] = get_user_meta($data['member']->wp_users_id, 'waitlist', true);
            echo $CI->load->view("members/profile", $data, true);
            //M+M We've moved the code above in from a CI controller which was access as shown below.
            //$content = file_get_contents(site_url("/ci/members/profile/view/".$user_ID."/".UserIdType::WORDPRESSID)."/".isset($_SESSION['membershipsuccess']));
            //echo $content;
        }
        ?>
			
?>
" /></dd>
                                        <dt>Hometown</dt>
                                        <dd><input type="text" name="strHometown" id="strHometown" value="<?php 
echo $this->input->post('strHometown');
?>
" /></dd>
                                        <dt>Province</dt>
                                        <dd><input type="text" name="strProvince" id="strProvince" value="<?php 
echo $this->input->post('strProvince');
?>
" /></dd>
                                        <dt>Country</dt>
                                        <dd>
                                            <?php 
echo form_countries('country');
?>
                                        </dd>
                                    </dl>
                                    <dl class="dl-horizontal dl-header">
                                        <dt><h5><i class="icon-tint"></i> Owner Contact</h5></dt>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dt>Mobile Phone</dt>
                                        <dd><input type="text" name="strMobile" id="strMobile" value="<?php 
echo $this->input->post('strMobile');
?>
" /></dd>
                                        <dt>Landline No.</dt>
                                        <dd><input type="text" name="strLandline" id="strLandline" value="<?php 
echo $this->input->post('strLandline');
        ?>
" /></dd>
                                    <dt>Hometown</dt>
                                    <dd><input type="text" name="strHometown" id="strHometown" value="<?php 
        echo $strEditUserHometown;
        ?>
" /></dd>
                                    <dt>Province</dt>
                                    <dd><input type="text" name="strProvince" id="strProvince" value="<?php 
        echo $strEditUserProvince;
        ?>
" /></dd>
                                    <dt>Country</dt>
                                    <dd>
                                    	<?php 
        echo form_countries('country', $strEditUserCountry);
        ?>
                                    </dd>
                                </dl>
                                <dl class="dl-horizontal dl-header">
                                    <dt><h5><i class="icon-tint"></i> Contact Information</h5></dt>
                                </dl>
                                <dl class="dl-horizontal">
                                    <dt>Mobile Phone</dt>
                                    <dd><input type="text" name="strMobile" id="strMobile" value="<?php 
        echo $strEditUserMobile;
        ?>
" /></dd>
                                    <dt>Landline No.</dt>
                                    <dd><input type="text" name="strLandline" id="strLandline" value="<?php 
        echo $strEditUserLandline;
 public function viewprofile($user_id, $id_type = NULL)
 {
     $this->load->model("locationmodel");
     $this->load->model("members/membermodel", "", true);
     $this->load->model("billing/planmodel", "", true);
     $this->load->helper('form');
     if ($user_id != "") {
         $data = $this->membermodel->viewProfile($user_id, $id_type);
     }
     $name = $data["member"]->first_name . " " . $data["member"]->last_name;
     $title = isset($data["member"]) ? "Profile of " . $name : "Create New Profile";
     $chooserdata["plans"] = $data["plans"];
     $chooserdata["selectName"] = "plan_code";
     $chooserdata["allplans"] = true;
     $chooserdata["accesspricing"] = $this->locationmodel->getAccessPricing();
     $data["membershipChooser"] = $this->load->view('billing/membership_chooser', $chooserdata, true);
     $billing["billing_info"] = $data["member"]->billing_info;
     $billing["member"] = $data["member"];
     if (isset($data["member"]->billing_info)) {
         $billing["countries_dropdown"] = form_countries("billing_info_country", $billing["billing_info"]->country, array("name" => "billing_info[country]"));
     } else {
         $billing["countries_dropdown"] = form_countries("billing_info_country", 'US', array("name" => "billing_info[country]"));
     }
     $data["billing_form"] = $this->load->view("members/billing_form", $billing, true);
     // -----------------ACCOUNT -----------------------------------------------
     $this->load->model('billing/accountmodel', '', true);
     $am = $this->accountmodel->init($data["member"]->id);
     $data["activity"] = $am->get_activity();
     $data["invoices"] = $am->listInvoices();
     $data["balance"] = $am->account->balance;
     $data["acct_activity"] = $this->load->view('billing/account_activity.php', $data, true);
     // -----------------CHECKINS -----------------------------------------------
     $checkins["checkins"] = $this->membermodel->getCheckins();
     $data["checkins"] = $this->load->view('members/checkin_activity.php', $checkins, true);
     $data["admin_only"] = true;
     $data["show_member_subnav"] = true;
     $data["member_subnav_current"] = "Member Listing";
     display('members/admin-profile', $data, $title);
 }
?>
" /></dd><br />
                                        <dt>Address</dt>
                                        <dd><input type="text" name="strAddress" value="<?php 
echo $theRestoDetails['strRestoAddress'];
?>
" /></dd>
                                        <dt>City</dt>
                                        <dd><input type="text" name="strCity" value="<?php 
echo $theRestoDetails['strRestoCity'];
?>
" /></dd>
                                        <dt>Country</dt>
                                        <dd>
                                            <?php 
echo form_countries('country', $theRestoDetails['strRestoCountry']);
?>
                                        </dd>
                                    </dl>
                                    <dl class="dl-horizontal dl-header">
                                        <dt><h5><i class="icon-tint"></i> Restaurant Contacts</h5></dt>
                                    </dl>
                                    <dl class="dl-horizontal">
                                        <dt>Mobile Phone</dt>
                                        <dd><input type="text" name="strMobile" id="strMobile" value="<?php 
echo $theRestoDetails['strRestoMobile'];
?>
" /></dd>
                                        <dt>Landline No.</dt>
                                        <dd><input type="text" name="strLandline" id="strLandline" value="<?php 
echo $theRestoDetails['strRestoLandline'];