403Webshell
Server IP : 103.234.187.230  /  Your IP : 216.73.216.216
Web Server : Apache
System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/html/b2bzend/application/views/scripts/customer/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/html/b2bzend/application/views/scripts/customer/customer-contact.phtml
<?php
$customerDetail = $this->customerDetail;
$crmcustID = $customerDetail['CRMCustSysId'];
$crmagencycustID = $customerDetail['CustomerSysId'];
$encodecrmcustID = base64_encode($customerDetail['CRMCustSysId']);
$encodeagencycrmcustID = base64_encode($customerDetail['CustomerSysId']);
$AgencySysId = $this->AgencySysId;
$sourceCity = $this->sourceCity;
//echo "<pre>";
//print_r($customerDetail);
$sessionLogin_user = new Zend_Session_Namespace('sessionLogin_user');
$DefaultCountryCode = $sessionLogin_user->agencyDetails['DefaultCountryCode'];
$Salutation = isset($customerDetail['Salutation']) ? Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getSalutation(trim($customerDetail['Salutation'])) : '';

?>
<!--Page main section start-->
<link rel="stylesheet" href="<?php echo $this->baseUrl('public/assets/css/plugins/summernote.css'); ?>">
<section id="min-wrapper" class="active">
    <div id="main-content">
        <div class="container-fluid">
            <div class="row">
                <div class="col-md-12">
                    <!--Top header start-->
                    <h3 class="ls-top-header">Lead Detail</h3>
                    <!--Top header end -->

                    <!--Top breadcrumb start -->
                    <?php if ($this->customerDetail['IsB2BAgent'] == 1) {
                        echo $this->partial('customer/nav_b2b_customer.phtml', array('pageName' => 'Profile'));
                    } else {
                        echo $this->partial('customer/nav_customer.phtml', array('pageName' => 'Profile'));
                    }
                    ?>
                    <!--Top breadcrumb start -->
                </div>
            </div>
            <!-- Main Content Element  Start-->
            <div class="row">


                <?php echo $this->partial('customer/customerpartial.phtml', array('customerDetail' => $this->customerDetail, 'packageThemeList' => $this->packageThemeList, 'foodPreferenceList' => $this->foodPreferenceList, 'packageInclusionList' => $this->packageInclusionList, 'sourceCity' => $sourceCity, 'customerId' => $this->customerId)); ?>


                <div class="col-md-12">
                    <div class="query_listing_bg query_listing_bg_padding_20">

                        <div class="align_margin_bottom alignright mobile_right_aligntext">
                            <div class="form-group form-group1">
                                <button data-toggle="modal" data-target="#myModaladdContact" class="btn btn-primarygray btn-group-xs"><i class="fa fa-plus"></i> Add Contacts</button>

                            </div>
                        </div>
                        <div class="panel panel-primary align_margin_bottom_0">
                            <div class="panel-heading">
                                <h3 class="panel-title">Contacts</h3>
                            </div>
                            <div class="panel-body table-responsive no-padding">
                                <table class="table tablestyle sortable-theme-bootstrap leadeBorder2" data-sortable>
                                    <thead>
                                        <tr class="alert alert-graylight">
                                            <th class="small smallbold" style="vertical-align:middle;">Customer Name</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Email</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Mobile</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Relation</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Passport Number</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Documents</th>
                                            <th class="small smallbold" style="vertical-align:middle;">Status</th>
                                            <th class="small smallbold" style="vertical-align:middle; width:85px;">Action</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php //if (count($this->paginator) == 0): 
                                        ?>
                                        <tr>
                                            <td class="small">
                                                <?php echo $customerDetail['FullName'] ? $Salutation . ' ' . stripslashes($customerDetail['FullName']) : $Salutation . ' ' . stripslashes($customerDetail['FirstName']) . "&nbsp;" . stripslashes($customerDetail['LastName']); ?>
                                            </td>
                                            <td class="small">
                                                <?php echo $customerDetail['EmailId'] ? stripslashes($customerDetail['EmailId']) : ''; ?>
                                            </td>
                                            <td class="small">
                                                <?php echo $customerDetail['Contacts'] ? stripslashes($customerDetail['Contacts']) : ''; ?>
                                            </td>
                                            <td class="small">
                                                <?php echo (isset($customerDetail['Relation']) && trim($customerDetail['Relation']) != '') ? $this->ARR_CUSTOMER_RELATION[$customerDetail['Relation']] : 'NA'; ?>
                                            </td>
                                            <td class="small">
                                                <?php echo $customerDetail['PassportNo'] ? stripslashes($customerDetail['PassportNo']) : ''; ?>
                                            </td>
                                            <td class="small">
                                                <?php
                                                $checkcustomerdocument =  Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getcustomerdocument(trim($customerDetail['CustomerSysId']), $AgencySysId);
                                                ?>
                                                <a href="<?php echo $this->baseUrl('/customer/member-document-upload/id/' . base64_encode($customerDetail['CustomerSysId']) . '/mid/'); ?>" class="tooltipLink openMemberDocModal" title="View"><?= ($checkcustomerdocument > 0) ? 'Manage' : 'Add'; ?></a>
                                            </td>
                                            <td class="small">
                                                <?php echo ($customerDetail['IsActive'] == 1) ? 'Active' : 'Deactive'; ?>
                                            </td>
                                            <td class="small">
                                                <?php if ($customerDetail['IsB2BAgent'] == 1) { ?>
                                                    <a class="view_text1 tooltipLink " data-toggle="modal" data-target="#myModaleditB2BCustomer"><i class="fa fa-pencil"></i></a>
                                                <?php } else { ?>
                                                    <a class="view_text1 tooltipLink " data-toggle="modal" data-target="#myModaladdCustomer"><i class="fa fa-pencil"></i></a>
                                                <?php } ?>
                                            </td>
                                        </tr>

                                        <?php //endif;
                                        if (!empty($this->paginator)) :
                                            $s = 1;
                                            foreach ($this->paginator as $customerMemberDetail) { //echo '<pre>'; print_r($customerMemberDetail); die;
                                                $firstname = $customerMemberDetail['FirstName'] ? stripslashes($customerMemberDetail['FirstName']) : '';
                                                $lastname = isset($customerMemberDetail['LastName']) && !empty($customerMemberDetail['LastName']) ? " " . stripslashes($customerMemberDetail['LastName']) : '';
                                                $fullname = $firstname . $lastname;

                                                $Salutation = isset($customerMemberDetail['Title']) ? Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getSalutation(trim($customerMemberDetail['Title'])) : '';
                                                $fullname = $Salutation . ' ' . trim($fullname);
                                                $checkmemberdoc =  Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getmemberdocument(trim($customerMemberDetail['MemberSysId']), $AgencySysId);
                                        ?>
                                                <tr class="hideMemberRow_<?php echo $customerMemberDetail['CustomerSysId'] . $customerMemberDetail['MemberSysId']; ?>">

                                                    <td class="small"><?php echo !empty($fullname) ? $fullname : 'NA'; ?></td>
                                                    <td class="small">
                                                        <?php echo trim($customerMemberDetail['EmailId']) ? stripslashes($customerMemberDetail['EmailId']) : 'NA'; ?>
                                                    </td>
                                                    <td class="small">
                                                        <?php echo trim($customerMemberDetail['Contacts']) ? stripslashes($customerMemberDetail['Contacts']) : 'NA'; ?>
                                                    </td>
                                                    <td class="small">
                                                        <?php echo (isset($customerMemberDetail['Relation']) && trim($customerMemberDetail['Relation']) != '') ? $this->ARR_CUSTOMER_RELATION[$customerMemberDetail['Relation']] : 'NA'; ?>
                                                    </td>
                                                    <td class="small">
                                                        <?php echo trim($customerMemberDetail['PassportNo']) ? stripslashes($customerMemberDetail['PassportNo']) : 'NA'; ?>
                                                    </td>
                                                    <td class="small">
                                                        <a href="<?php echo $this->baseUrl('/customer/member-document-upload/id/' . base64_encode($customerMemberDetail['CustomerSysId']) . '/mid/' . base64_encode($customerMemberDetail['MemberSysId'])); ?>" class="tooltipLink openMemberDocModal" title="View"><?= ($checkmemberdoc > 0) ? 'Manage' : 'Add'; ?></a>
                                                    </td>
                                                    <td class="small">
                                                        <?php echo ($customerMemberDetail['IsActive'] == 1) ? 'Active' : 'Deactive'; ?>
                                                    </td>
                                                    <td class="small">
                                                        <a href="<?php echo $this->baseUrl('/customer/view-customer-member/id/' . base64_encode($customerMemberDetail['CustomerSysId']) . '/mid/' . base64_encode($customerMemberDetail['MemberSysId'])); ?>" class="view_text1 tooltipLink memberModal" data-placement="top" title="View"><i class="fa fa-eye"></i></a>
                                                        <a href="javascript:void(0);" data-placement="top" title="Archive" class="tooltipLink fa fa-minus-circle view_text1" onclick="deleteCustomerMember(<?php echo $customerMemberDetail['CustomerSysId']; ?>,<?php echo $customerMemberDetail['MemberSysId']; ?>)"></a>
                                                    </td>
                                                </tr>
                                            <?php $s++;
                                            }
                                        else :
                                            if (count($customerDetail) == 0) {
                                            ?>
                                                <tr>
                                                    <td class="small" align="center" colspan="7"><strong>No record found, Create new
                                                            by clicking <a data-toggle="modal" data-target="#myModaladdContact" href="javascript:void(0);">here</a></strong></td>
                                                </tr>
                                        <?php }
                                        endif; ?>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                        <div class="panel-box clearfix pagination_margintop">
                            <?php if (!empty($this->paginator)) { ?>
                                <?php echo $this->paginationControl($this->paginator, 'Sliding', 'pagination.phtml'); ?>
                            <?php } ?>
                        </div>
                    </div>
                </div>
            </div>
            <!-- Main Content Element  End-->

            <div class="modal fade" id="myModaladdContact" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h4 class="modal-title" id="myModalLabel">Add Customer Contact </h4>
                        </div>
                        <div class="alert alert-success" id="succmsg" style="display:none;">
                            <strong>Success!</strong>Customer has been Added.
                        </div>
                        <div class="modal-body">
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group custrelationDropdown">
                                        <label>Relation <?php echo MANDATORY_SIGN; ?></label>
                                        <?php $relationArray = $this->ARR_CUSTOMER_RELATION; ?>
                                        <select id="custrelation" name="custrelation" class="demo-default select-country">
                                            <?php foreach ($relationArray as $key => $value) {
                                                if ($key > 0) { ?>
                                                    <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
                                            <?php }
                                            } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-12 clearfix"></div>
                                <div class="col-md-2 no-padding-right">
                                    <div class="form-group customerSalutationDropdown">
                                        <label>Salutation <?php echo MANDATORY_SIGN; ?></label>
                                        <?php $ARR_SALUTION = $this->ARR_SALUTION; ?>
                                        <select id="customerSalutation" name="salution" class="demo-default select-country">
                                            <?php foreach ($ARR_SALUTION as $key => $value) { ?>
                                                <option value="<?php echo $key; ?>"><?php echo $value; ?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>

                                <div class="col-md-4">
                                    <div class="form-group">
                                        <label>First Name <?php echo MANDATORY_SIGN; ?></label>
                                        <input type="name" class="form-control whbg" name="customerfname" id="customerfname">
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Last Name</label>
                                        <input type="name" class="form-control whbg" name="customerlname" id="customerlname">
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Email </label>
                                        <input type="name" class="form-control whbg" name="customerconEmail" id="customerconEmail">
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Alternate Email </label>
                                        <input type="text" name="SecondaryEmail" id="membereSecondaryEmail" class="form-control whbg" value="">
                                    </div>
                                </div>

                                <div class="col-md-6">

                                    <div class="no-margin">
                                        <div class="txtfieldMain textfieldMain_mobile form-group " style="border: #0069ff 0px solid;">
                                            <label for="mobilenum" class="mobilenumber_labelshow" style="color: #000; z-index: 99999;">Mobile Number <span class="red">*</span></label>
                                            <div class="country_details country_box_wrap1">
                                                <div id="iti-flag" class="iti-flag "></div>
                                                <div class="iti-arrow"></div>
                                            </div>
                                            <div class="country_dropdown">
                                                <div class="search_country">
                                                    <input type="text" name="" class="txtfield form-control" placeholder="Search countries" id="countries_list">
                                                    <div class="search_icon"></div>
                                                </div>
                                                <ul class="allcountries"></ul>
                                            </div>
                                            <input type="text" class="txtfield country_code stdcode_padding country_box_wrap2" readonly="readonly" id="CountryCode" name="countrycode" value="<?php echo (isset($DefaultCountryCode) && $DefaultCountryCode != '') ? trim($DefaultCountryCode) : '+91'; ?>">
                                            <input type="text" name="custmobilenumber" id="mobile_number" maxlength="15" value="" class="form-control whbg" style="width: 165px !important; float: right; border-bottom:#0069ff 1px solid !important; ">

                                        </div>

                                        <!--<input type="text" name = "mobilenum"  id = "mobilenum" maxlength = "13" class="form-control whbg" value="<?php //echo trim($this->customerDetail['Contacts']);
                                                                                                                                                        ?>"> -->
                                    </div>
                                </div>
                                <div class="col-md-12 clearfix"></div>
                                <div class="col-md-6">
                                    <div class="form-group membercountryDropdown">
                                        <label>Country</label>
                                        <select id="membercountry" name="membercountry" class="demo-default select-country country" placeholder="Select Country" onchange="enableCityInput('typeaheadCity','hidden_typeahead_cityid');">
                                            <option value=""></option>
                                            <?php

                                            if (!empty($this->countryList)) {
                                                foreach ($this->countryList as $country) { ?>
                                                    <option value="<?php echo $country['ContId']; ?>" <?php if ($country['ContId'] == $this->customerDetail['CountrySysId'] or $country['ContId'] == 101) {
                                                                                                            echo "selected";
                                                                                                        } ?>>
                                                        <?php echo stripslashes($country['Title']); ?></option>
                                            <?php
                                                }
                                            }
                                            ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group member_stateDropdown">
                                        <label> State</label>
                                        <input name="member_state" id="member_state" class="form-control" type="text" placeholder="State Name" value="" onkeyup="get_state_autosuggest_country('member_state','hidden_selected_member_stateid','membercountry','');" autocomplete="off">
                                        <input type="hidden" id="hidden_selected_member_stateid" name="hidden_selected_member_stateid" value="<?php //echo @$searchResult['search_going_to']; 
                                                                                                                                                ?>" />
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group cityDiv member_cityDropdown">
                                        <label>City</label>
                                        <input name="member_city" id="member_city" class="form-control" type="text" placeholder="City Name" value="" onkeyup="get_city_autosuggest_country('member_city','hidden_selected_member_cityid','membercountry','hidden_selected_member_contid');" autocomplete="off">
                                        <input type="hidden" id="hidden_selected_member_cityid" name="hidden_selected_member_cityid" value="<?php //echo @$searchResult['search_going_to']; 
                                                                                                                                            ?>" />
                                        <input type="hidden" id="hidden_selected_member_contid" name="memberContSysId" value="" />
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group cityDiv">
                                        <label>Pin/Zip Code</label>
                                        <input type="text" class="form-control pincodes" maxlength="10" autocomplete="off" value="" autocomplete="off" id="PinCode" name="PinCode" />
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Address</label>
                                        <textarea class="form-control whbg" name="memberaddress" rows="1" id="memberaddress"></textarea>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="input-group1 ls-group-input form-group">
                                        <label>Date of Birth</label>
                                        <input type="name" class="form-control whbg" name="custdob" id="custdob">
                                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#custdob').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group">
                                        <label>Passport Number</label>
                                        <input type="name" class="form-control whbg" name="passnumber" id="passnumber">
                                    </div>
                                </div>
                                <div class="col-md-6">

                                    <div class="input-group1 ls-group-input form-group">
                                        <label>Passport Expiry</label>
                                        <input type="name" class="form-control whbg" name="passexpiry" id="passexpiry">
                                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#passexpiry').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                                    </div>

                                </div>
                                <div class="col-md-6">
                                    <div class="form-group membermaritalStatusDropdown">
                                        <label>Marital Status</label>
                                        <select id="membermaritalStatus" name="maritalStatus" class="demo-default select-country">
                                            <option value="2">NA</option>
                                            <option value="1">Married</option>
                                            <option value="0">Unmarried</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">

                                    <div class="input-group1 ls-group-input form-group">
                                        <label> Marriage Anniversay</label>
                                        <input type="name" class="form-control whbg" name="custanniversary" id="custanniversary">
                                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#custanniversary').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                                    </div>

                                </div>

                                <div class="col-md-6">
                                    <div class="form-group cityDiv">
                                        <label>No. of Kids</label>
                                        <input type="number" class="form-control" value="" autocomplete="off" id="memberNoofkids" name="Noofkids" />
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group cityDiv memberFoodPreferenceDropdown">
                                        <label>Food Preference</label>
                                        <select id="memberFoodPreference" name="FoodPreference[]" multiple class="demo-default select-theme">
                                            <?php

                                            echo '<option value="">Select</option>';
                                            for ($i = 0; $i < count($this->foodPreferenceList); $i++) {
                                            ?>
                                                <option value="<?php echo $i; ?>"><?php echo $this->foodPreferenceList[$i]['Title'] ?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <div class="form-group cityDiv">
                                        <label>Company Name</label>
                                        <input type="text" class="form-control" value="" autocomplete="off" id="memberCompanyName" name="CompanyName" />
                                    </div>
                                </div>

                                <div class="clear"></div>



                                <div class="removeMoreCountryVisaDivMember1">
                                    <div class="col-md-6">
                                        <div class="form-group cityDiv">
                                            <label>Visa Country</label>
                                            <input type="text" class="form-control" value="" autocomplete="off" id="memberVisaCountry1" name="VisaCountry[]" onkeyup="memberVisaCountrySearch(1)" placeholder="Select" />
                                            <input type="hidden" name="VisaCountryId[]" id="memberVisaCountryId1" value="">
                                        </div>
                                    </div>

                                    <div class="col-md-5">
                                        <div class="form-group">
                                            <label>Visa Expiry date</label>
                                            <input type="name" class="form-control whbg commonDatepicker" name="VisaExpiryDate[]" id="memberVisaExpiryDate1" value="" autocomplete="off" placeholder="Select Date">
                                        </div>
                                    </div>
                                    <div class="col-md-1" style="padding-left: 0px;">
                                        <div class="form-group cityDiv">

                                            <a class="btn view_text1 tooltipLink" data-original-title="Remove" href="javascript:void(0);" onclick="removeMoreVisaCountryMember(1);"><i class="fa fa-minus-circle"></i></a>

                                        </div>
                                    </div>
                                </div>
                                <input type="hidden" name="" id="countVisaCountryMember" value="2">

                                <div class="appendMoreCountryVisaDivMember"></div>
                                <div class="col-md-12 ">
                                    <a class="btn btn-warning add_visacountry_text pull-right" data-original-title="Add" href="javascript:void(0);" onclick="addMoreVisaCountryMember();"><i class="fa fa-fw fa-arrows"></i> Add Visa Country</a>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group memberCustomerCategoryDropdown">
                                        <label>Customer Category</label>
                                        <select id="memberCustomerCategory" name="CustomerCategory" class="demo-default select-country">
                                            <option value="">Select</option>
                                            <option value="Platinum">Platinum</option>
                                            <option value="Gold">Gold</option>
                                            <option value="Silver">Silver</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-6">
                                    <div class="form-group memberSeatPreferenceDropdown">
                                        <label>Seat Preference</label>
                                        <select id="memberSeatPreference" name="SeatPreference" class="demo-default select-country">
                                            <option value="">Select</option>
                                            <option value="Window">Window </option>
                                            <option value="Aisle">Aisle</option>
                                            <option value="Any">Any</option>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-12">
                                    <div class="form-group">
                                        <label>Remarks</label>
                                        <textarea type="name" class="form-control whbg" name="Remarks" id="memberRemarks" value=""> </textarea>
                                    </div>
                                </div>
                            </div>



                            <div class="modal-footer">
                                <a href="#"><button type="button" id="addcontacttype" class="btn btn-warning btn-sm pull-right" onclick="SubmitContactData();">Submit</button></a>
                                <button type="button" class="btn btn-primarygray btn-sm pull-left" data-dismiss="modal">Cancel</button>
                            </div>

                        </div>
                    </div>
                </div>


            </div>
        </div>
        <?php echo $this->render('copyrightfooter.phtml'); ?>
        <?php include_once 'application/views/scripts/newfooter.phtml'; ?>
        <!--Page main section end -->
        <?php echo $this->partial('customer/edit-customer-info.phtml', array('customerDetail' => $customerDetail, 'ARR_SALUTION' => $this->ARR_SALUTION, 'ARR_CUSTOMER_RELATION' => $this->ARR_CUSTOMER_RELATION, 'countryList' => $this->countryList, 'stateList' => $this->stateList)); ?>


</section>
<div class="modal fade" id="myModalupdateMembers" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <form method="post" id="memberDetailsForm" name="memberDetailsForm">
            <div class="modal-content">
                <div class="center">
                    <img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
                </div>
            </div>
        </form>
    </div>
</div>
<div class="modal fade" id="myModalupdateMembersdoc" data-backdrop="static" data-keyboard="false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="center">
                <img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" />
            </div>
        </div>
    </div>
</div>
<?php include_once 'application/views/scripts/newfooter.phtml'; ?>
<?php echo $this->render('customer/customer-todo-header.phtml'); ?>
<script src="<?php echo $this->baseUrl('public/countrycode/script.js?rv=1144'); ?>"></script>
<script src="<?php echo $this->baseUrl('public/assets/js/summernote.min.js'); ?>"></script>
<script>
    $(document).ready(function() {
        $('.openMemberDocModal').on('click', function(e) {
            e.preventDefault();
            var $targetModal = $('#myModalupdateMembersdoc');
            $targetModal.find('.modal-content').empty();
            $.ajax({
                url: $(this).attr('href'),
                type: 'GET',
                beforeSend: function(data) {
                    $targetModal.modal('show');
                    $targetModal.find('.modal-content').html('<div class="center"><img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>"></div>');
                },
                success: function(data) {
                    $targetModal.find('.modal-content').html(data);
                }
            });
        });

        $('#EmailContent').summernote({
            height: "300px",
            toolbar: [
                ['style', ['bold', 'italic', 'underline', 'clear']],
                ['color', ['color']],
                ['para', ['ul', 'ol']]
            ]
        });
    });
    $('#myModalupdateMembers').on('hidden.bs.modal', function() {
        $(this).removeData('bs.modal');
    });

    $(document).ready(function() {
        $('#myModalupdateMembers').on('hidden.bs.modal', function() {
            $(this).removeData('bs.modal');
            $('#myModalupdateMembers').find('.modal-content').html('<div class="center"> <img class="loaderimg" id="loaderimg" src="<?php echo $this->baseUrl('/public/tinymce/skins/lightgray/img/loader.gif'); ?>" /></div>');
        });
        $('.memberModal').on('click', function(e) {
            e.preventDefault();
            $('#myModalupdateMembers').modal('show').find('.modal-content').load($(this).attr('href'));

        });

//        $(document).on('keypress', '.pincodes', function() {
//            if (event.which != 8 && isNaN(String.fromCharCode(event.which))) {
//                event.preventDefault();
//            }
//        });
        $("#memberDetailsForm").validate({
            highlight: function(error, element) {
                var name = $(element).attr("name");
                $("input[name=" + name + "]").removeClass('error');

            },
            rules: {
                'title': {
                    required: true,
                },
                'mmbrfname': {
                    required: true,
                },
                /*'mmbrlname':{
                	required:true,
                },*/
                //            'mmbremail': {
                //                required: true,
                //                email: true,
                //            },
                //            'mmbrmobile': {
                //                required: true,
                //                minlength: 10,
                //                maxlength: 10,
                //                number: true,
                //            },
            },
            submitHandler: function() {
                var data = $('#memberDetailsForm').serialize();

                $.ajax({
                    url: '/customer/update-customer-member',
                    data: data,
                    dataType: 'json',
                    type: 'POST',
                    dataType: 'json',
                    beforeSend: function(data) {
                        $(".successMsg").show();
                        $(".successMsg").attr('disabled', true);
                        $(".successMsg").html('Please wait...');
                    },
                    success: function(response) {
                        //console.log(response);
                        if (response.status == 'success') {
                            $(".successMsg").html('Record updated');
                            $(".successMsg").removeAttr('disabled');
                            location.reload();
                            $("#myModalupdateMembers").modal('hide');
                        } else {
                            alert('Something went wrong.');
                        }
                        //window.location.replace("/buyhotel/send-data-for-search");
                    },
                    error: function() {
                        alert("fail : Please try after some time");
                    }
                });

            }
        });
    });

    function SubmitContactData() {
        var salutation = $("#customerSalutation").val();
        var customerfname = $("#customerfname").val();
        var customerlname = $("#customerlname").val();
        var emailID = $("#customerconEmail").val();
        var mobilenum = $("#mobile_number").val();
        var countrycode = $("#CountryCode").val();
        var custrelation = $("#custrelation").val();
        var custdob = $("#custdob").val();
        var custanniversary = $("#custanniversary").val();
        var passnumber = $.trim($("#passnumber").val());
        var countryId = $.trim($("#membercountry").val());
        var stateId = $.trim($("#hidden_selected_member_stateid").val());
        var cityId = $.trim($("#hidden_selected_member_cityid").val());
        var address = $.trim($("#memberaddress").val());
        var PinCode = $.trim($("#PinCode").val());
        var passexpiry = $("#passexpiry").val();
        var crmcustID = '<?php echo $crmcustID; ?>';
        var encodecrmcustID = '<?php echo $encodecrmcustID; ?>';
        var crmagencycustID = '<?php echo $crmagencycustID; ?>';
        var encodecrmagencycustID = '<?php echo $encodeagencycrmcustID; ?>';
        var phoneReg = /^\d+$/;
        var emailReg =
            /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
        var passportReg = /^([A-Z]{1})([0-9]{7})$/;
        if (customerfname == '') {
            alert('First Name Can not be empty');
            $("#customerfname").focus();
            return false;
        }
        /* if(customerlname == ''){
                 alert('Last Name Can not be empty');
                 $("#customerlname").focus();
                 return false;
         }*/
        //    if (emailID == '') {
        //        alert('Email id Can not be empty');
        //        $("#emailID").focus();
        //        return false;
        //    }
        //    if (mobilenum == '') {
        //        alert('Mobile Number Can not be empty');
        //        $("#mobilenum").focus();
        //        return false;
        //    }
        //
        //    if (!emailReg.test(emailID)) {
        //        alert("Please enter valid email address");
        //        $("#emailID").focus();
        //        return false;
        //    }
        //    if (!phoneReg.test(mobilenum)) {
        //        alert("phone number should only in digit");
        //        $("#mobilenum").focus();
        //        return false;
        //    }
        //    if (passnumber != '' && !passportReg.test(passnumber)) {
        //        alert("Please enter valid passport.");
        //        $("#passnumber").focus();
        //        return false;
        //    }

        var SecondaryEmail = $("#membereSecondaryEmail").val();
        var maritalStatus = $("#membermaritalStatus").val();
        var Noofkids = $("#memberNoofkids").val();
        var FoodPreference = $("#memberFoodPreference").val();
        var CompanyName = $("#memberCompanyName").val();

        var Remarks = $("#memberRemarks").val();

        var CustomerCategory = $("#memberCustomerCategory").val();
        var SeatPreference = $("#memberSeatPreference").val();
        var memberVisaCountryId = [];
        $("input[id^='memberVisaCountryId']").each(function(i) {
            memberVisaCountryId.push(this.value);
        });
        var memberVisaExpiryDate = [];

        $("input[id^='memberVisaExpiryDate']").each(function(i) {
            memberVisaExpiryDate.push(this.value);
        });
        jQuery.ajax({
            url: '/customer/savecustomercontact',
            type: 'POST',
            dataType: 'json',
            data: {
                salutation: salutation,
                crmcustID: crmagencycustID,
                customerfname: customerfname,
                customerlname: customerlname,
                emailID: emailID,
                mobilenum: mobilenum,
                countrycode: countrycode,
                custrelation: custrelation,
                custdob: custdob,
                custanniversary: custanniversary,
                passnumber: passnumber,
                passexpiry: passexpiry,
                countryId: countryId,
                stateId: stateId,
                cityId: cityId,
                address: address,
                PinCode: PinCode,
                SecondaryEmail: SecondaryEmail,
                maritalStatus: maritalStatus,
                Noofkids: Noofkids,
                FoodPreference: FoodPreference,
                CompanyName: CompanyName,
                Remarks: Remarks,
                CustomerCategory: CustomerCategory,
                SeatPreference: SeatPreference,
                VisaCountryId: memberVisaCountryId,
                VisaExpiryDate: memberVisaExpiryDate,
            },
            success: function(result) {
                $("#addcontacttype").addClass("disabled");
                $("#mobilenumber").val(mobilenum);
                $("#customerfname").val(customerfname);
                $("#customerEmail").val(emailID);
                $("#myModaladdContact").modal('hide');
                if (result.status == 'success') {
                    setTimeout(function() {
                        window.parent.location.href =
                            "<?php echo $this->baseUrl('/customer/customer-contact/id/'); ?>" +
                            encodecrmagencycustID;
                    }, 1000);
                } else {
                    alert('Some thing went wrong');
                }
            }


            //location.reload(true);
        });

        // setTimeout(function(){ window.parent.location.href="<?php echo $this->baseUrl('/customer/customer-contact/id/'); ?>"+encodecrmagencycustID;},1000); 

    }

    function addMoreVisaCountryMember() {
        var count = $('#countVisaCountryMember').val();
        var html = '<div class="removeMoreCountryVisaDivMember' + parseInt(count) + '"><div class="col-md-6"><div class="form-group cityDiv">' +
            '<input type="text" class="form-control"  value="" autocomplete="off" id="memberVisaCountry' + parseInt(count) + '" name="VisaCountry[]" onkeyup="memberVisaCountrySearch(' + parseInt(count) + ')" placeholder="Select Country"/>' +
            '<input type="hidden" name="VisaCountryId[]" id="memberVisaCountryId' + parseInt(count) + '" value=""></div></div>' +
            '<div class="col-md-5"><div class="form-group">' +
            '<input type="name" class="form-control whbg commonDatepicker" name = "VisaExpiryDate[]" id = "memberVisaExpiryDate' + parseInt(count) + '" value="" onclick="runDatePickerCustMember(' + parseInt(count) + ')" autocomplete="off" placeholder="Select Date"></div></div>' +
            '<div class="col-md-1" style="padding-left: 0px;"><div class="form-group cityDiv">' +
            '<a class="btn view_text1 tooltipLink" data-original-title="Add" href="javascript:void(0);" onclick="removeMoreVisaCountryMember(' + parseInt(count) + ');"><i class="fa fa-minus-circle"></i></a></div></div></div>';

        $('.appendMoreCountryVisaDivMember').append(html);
        $('#countVisaCountryMember').val(parseInt(count) + 1);

    }

    function removeMoreVisaCountryMember(id) {
        var count = $('#countVisaCountryMember').val();
        $('.removeMoreCountryVisaDivMember' + parseInt(id)).remove();
        //$('#countVisaCountry').val(parseInt(count)-1);
    }

    function runDatePickerCustMember(id) {
        $("#memberVisaExpiryDate" + parseInt(id)).datetimepicker({
            format: "d/m/Y",
            timepicker: false,
            minDate: 0
        }).focus();
    }

    function runDatePickerCustEdit(id) {
        $("#memberVisaExpiryDateEdit" + parseInt(id)).datetimepicker({
            format: "d/m/Y",
            timepicker: false,
            minDate: 0
        }).focus();
    }

    function addMoreVisaCountryEdit() {
        var count = $('#countVisaCountryEdit').val();
        var html = '<div class="removeMoreCountryVisaDivEdit' + parseInt(count) + '"><div class="col-md-6"><div class="form-group cityDiv"><label>Visa Country</label>' +
            '<input type="text" class="form-control"  value="" autocomplete="off" id="memberVisaCountryEdit' + parseInt(count) + '" name="VisaCountry[]" onkeyup="memberVisaCountrySearchEdit(' + parseInt(count) + ')" placeholder="Select Country"/>' +
            '<input type="hidden" name="VisaCountryId[]" id="memberVisaCountryIdEdit' + parseInt(count) + '" value=""></div></div>' +
            '<div class="col-md-5"><div class="form-group"><label>Visa Expiry date</label>' +
            '<input type="name" class="form-control whbg commonDatepicker" name = "VisaExpiryDate[]" id = "memberVisaExpiryDateEdit' + parseInt(count) + '" value="" onclick="runDatePickerCustEdit(' + parseInt(count) + ')" autocomplete="off" placeholder="Select Date"></div></div>' +
            '<div class="col-md-1" style="padding-left: 0px;"><div class="form-group cityDiv">' +
            '<a class="btn view_text1 tooltipLink" data-original-title="Add" href="javascript:void(0);" onclick="removeMoreVisaCountry(' + parseInt(count) + ');"><i class="fa fa-minus-circle"></i></a></div></div></div>';

        $('.appendMoreCountryVisaDivEdit').append(html);
        $('#countVisaCountryEdit').val(parseInt(count) + 1);

    }

    function removeMoreVisaCountryEdit(id) {
        var count = $('#countVisaCountryEdit').val();
        $('.removeMoreCountryVisaDivEdit' + parseInt(id)).remove();
        //$('#countVisaCountry').val(parseInt(count)-1);
    }

    function deleteCustomerMember(CustomerSysId, MemberSysId) {
        if (!confirm('Are you sure, you want to delete.')) {
            return false;
        }
        $.ajax({
            url: '/customer/delete-customer-member',
            data: 'CustomerSysId=' + CustomerSysId + '&MemberSysId=' + MemberSysId,
            dataType: 'json',
            type: 'POST',
            dataType: 'json',
            beforeSend: function(data) {

            },
            success: function(response) {
                //console.log(response);
                if (response.status == true) {
                    $('.hideMemberRow_' + parseInt(CustomerSysId) + parseInt(MemberSysId)).hide();
                } else {
                    alert('Something went wrong.');
                }
            },
            error: function() {
                alert("fail : Please try after some time");
            }
        });
    }
</script>

Youez - 2016 - github.com/yon3zu
LinuXploit