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/ajax-html.phtml
<!--<script src="<?php //echo $this->baseUrl('public/countrycode/script.js?rv=1144');     ?>"></script>-->
<?php
$vars = $this->getVars();
if (isset($vars['id']) && !empty($vars['id']) && isset($vars['mid']) && !empty($vars['mid']) && $vars['type'] == 'viewCustomerMember') {
//echo "<pre>";print_r($this->getCustomerMemberVisaDetail);die;
    $id = base64_decode($vars['id']);
    $mid = base64_decode($vars['mid']);
    $AgencySysId = base64_decode($vars['AgencySysId']);
    $memberDetails = $vars['memberDetails'];
    $countryshortcode = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->countryshortcode((isset($memberDetails[0]['countrycode']) && $memberDetails[0]['countrycode'] != null) ? str_replace('+', '', trim($memberDetails[0]['countrycode'])) : '91');
    ?>				
    <div class="modal-content" id="main-container">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">Edit Member Info </h4>            
            <p class="text-center alert-success successMsg" style="display:none;">Record updated</p>
        </div>
        <div class="modal-body">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group custrelationDropdown <?php echo (isset($memberDetails[0]['Relation']) && !empty(trim($memberDetails[0]['Relation']))) ? 'active' : ''; ?>">
                        <label>Relation</label>

                        <?php $relationArray = $vars['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
                                    if ($memberDetails[0]['Relation'] == $key) {
                                        echo "selected";
                                    }
                                    ?>><?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 select-titleDropdown <?php echo (isset($memberDetails[0]['Title']) && !empty(trim($memberDetails[0]['Title']))) ? 'active' : ''; ?>">
                        <label>Salutation</label>
                        <?php $ARR_SALUTION = $vars['ARR_SALUTION']; ?>
                        <select id="select-title" name="title" class="demo-default select-country">
                            <?php
                            foreach ($ARR_SALUTION as $key => $value) {
                                if ($key > 0) {
                                    ?>
                                    <option value="<?php echo $key; ?>"  <?php
                                    if ($memberDetails[0]['Title'] == $key) {
                                        echo "selected";
                                    }
                                    ?>><?php echo $value; ?></option>
                                            <?php
                                        }
                                    }
                                    ?>
                        </select>                       
                    </div>
                </div>

                <div class="col-md-4">
                    <div class="form-group <?php echo (isset($memberDetails[0]['FirstName']) && !empty(trim($memberDetails[0]['FirstName']))) ? 'active' : ''; ?>">
                        <label>First Name</label>
                        <input type="text" name="mmbrfname" class="form-control whbg" value="<?php echo $memberDetails[0]['FirstName'] ? trim(stripslashes($memberDetails[0]['FirstName'])) : ''; ?>">                       
                    </div>
                </div>

                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['LastName']) && !empty(trim($memberDetails[0]['LastName']))) ? 'active' : ''; ?>">
                        <label>Last Name</label>
                        <input type="text" name="mmbrlname" class="form-control whbg" value="<?php echo $memberDetails[0]['LastName'] ? trim(stripslashes($memberDetails[0]['LastName'])) : ''; ?>">                        </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['EmailId']) && !empty(trim($memberDetails[0]['EmailId']))) ? 'active' : ''; ?>">
                        <label>Email</label>
                        <input type="text" name="mmbremail" class="form-control whbg" value="<?php echo $memberDetails[0]['EmailId'] ? trim($memberDetails[0]['EmailId']) : ''; ?>">                        </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['SecondaryEmail']) && !empty(trim($memberDetails[0]['SecondaryEmail']))) ? 'active' : ''; ?>">
                        <label>Alternate Email </label>
                        <input type="text" name = "SecondaryEmail" id="membereSecondaryEmail" class="form-control whbg" value="<?php echo $memberDetails[0]['SecondaryEmail'] ? trim($memberDetails[0]['SecondaryEmail']) : ''; ?>">                       
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="no-margin">
                        <div class="txtfieldMain textfieldMain_mobile form-group <?php echo (isset($memberDetails[0]['Contacts']) && !empty(trim($memberDetails[0]['Contacts']))) ? 'active' : ''; ?>" 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 <?= ($countryshortcode != null) ? $countryshortcode : 'in' ?>"></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="mobile_code" name="countrycode" value="<?php echo $memberDetails[0]['countrycode'] ? trim($memberDetails[0]['countrycode']) : '+91'; ?>" >
                            <input type="text" name="mmbrmobile" id="mobile_number" maxlength="10" value="<?php echo $memberDetails[0]['Contacts'] ? trim($memberDetails[0]['Contacts']) : ''; ?>" class="form-control whbg codeborder" style="width: 160px !important; float: right; border:#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 <?php echo (isset($memberDetails[0]['CountrySysId']) && !empty(trim($memberDetails[0]['CountrySysId']))) ? 'active' : ''; ?>">
                        <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'] == $memberDetails[0]['CountrySysId']) {
                                        echo "selected";
                                    }
                                    ?>><?php echo stripslashes($country['Title']); ?></option>
                                            <?php
                                        }
                                    }
                                    ?>
                        </select>                     
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['StateOrZoneSysId']) && !empty(trim($memberDetails[0]['StateOrZoneSysId']))) ? 'active' : ''; ?>">
                        <label> State</label>
                        <input name="member_state" id="member_state_update" class="form-control" type="text" placeholder="State Name" value="<?php echo @$memberDetails[0]['stateTitle']; ?>" onkeyup="get_state_autosuggest_country('member_state_update', 'hidden_selected_member_update_stateid', 'membercountry', '');" autocomplete="off">
                        <input type="hidden" id="hidden_selected_member_update_stateid" name="hidden_selected_member_stateid" value="<?php echo @$memberDetails[0]['StateOrZoneSysId']; ?>__<?php echo @$memberDetails[0]['stateTitle']; ?>"/>      
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group cityDiv <?php echo (isset($memberDetails[0]['cityTitle']) && !empty(trim($memberDetails[0]['cityTitle']))) ? 'active' : ''; ?>">
                        <label>City</label>
                        <input name="member_city" id="member_update_city" class="form-control" type="text" placeholder="City Name" value="<?php echo @$memberDetails[0]['cityTitle']; ?>" onkeyup="get_city_autosuggest_country('member_update_city', 'hidden_selected_member_update_cityid', 'membercountry', 'hidden_selected_member_update_contid');" autocomplete="off">
                        <input type="hidden" id="hidden_selected_member_update_cityid" name="hidden_selected_member_cityid" value="<?php echo @$memberDetails[0]['CitySysId']; ?>__<?php echo @$memberDetails[0]['cityTitle']; ?>"/>      
                        <input type="hidden" id="hidden_selected_member_update_contid" name="memberContSysId" value=""/>   
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group cityDiv <?php echo (isset($memberDetails[0]['PinCode']) && !empty(trim($memberDetails[0]['PinCode']))) ? 'active' : ''; ?>">
                        <label>Pin/Zip Code</label>
                        <input type="text" class="form-control pincodes" maxlength="10" autocomplete="off" value="<?php echo $memberDetails[0]['PinCode'] ? trim(stripslashes($memberDetails[0]['PinCode'])) : ''; ?>" autocomplete="off" id="PinCode" name="PinCode" /> 
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['Address']) && !empty(trim($memberDetails[0]['Address']))) ? 'active' : ''; ?>">
                        <label>Address</label>
                        <textarea class="form-control whbg" name = "memberaddress" id = "memberaddress"><?php echo trim(stripslashes(@$memberDetails[0]['Address'])); ?></textarea>                       
                    </div>
                </div>
                <?php $dob = $memberDetails[0]['DOB'];
                ?>
                <div class="col-md-6">
                    <!-- <div class=""> -->

                    <div class="fromgroup_height1 input-group1 ls-group-input form-group <?php echo (isset($dob) && ($dob->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? 'active' : ''; ?>">
                        <label>Date of Birth</label>
                        <input type="name" class="form-control whbg" name = "custdobedit" id = "custdobedit" value="<?php echo (isset($dob) && ($dob->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? trim($dob->format('d/m/Y')) : ''; ?>">                       
                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#custdobedit').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                    </div>
                    <!-- </div> -->
                </div>
                <div class="col-md-6">
                    <div class="form-group <?php echo (isset($memberDetails[0]['PassportNo']) && !empty(trim($memberDetails[0]['PassportNo']))) ? 'active' : ''; ?>">
                        <label>Paassport Number</label>
                        <input type="name" class="form-control whbg" name = "passnumber" id = "passnumber" value="<?php echo $memberDetails[0]['PassportNo'] ? trim($memberDetails[0]['PassportNo']) : ''; ?>">                       
                    </div>
                </div>

                <?php $passwordexpiry = $memberDetails[0]['PassportExpiry']; ?>
                <div class="col-md-6">
                    <!-- <div class=""> -->

                    <div class="fromgroup_height_ input-group1 ls-group-input form-group <?php echo (isset($passwordexpiry) && ($passwordexpiry->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? 'active' : ''; ?>">
                        <label>Passport Expiry</label>
                        <input type="name" class="form-control whbg" name = "passexpiryedit" id = "passexpiryedit" value="<?php echo (isset($passwordexpiry) && ($passwordexpiry->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? $passwordexpiry->format('d/m/Y') : ''; ?>">                       
                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#passexpiryedit').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                    </div>
                    <!-- </div> -->
                </div>
                <div class="col-md-6">
                    <div class="form-group membermaritalStatusDropdown <?php echo (isset($memberDetails[0]['IsMarried']) && !empty(trim($memberDetails[0]['IsMarried']))) ? 'active' : ''; ?>">
                        <label>Marital Status</label>
                        <select id="membermaritalStatus" name="IsMarried" class="demo-default select-country">
                            <option value="2" <?php
                            if ($memberDetails[0]['IsMarried'] == 2) {
                                echo "selected";
                            }
                            ?>>NA</option>
                            <option value="1" <?php
                            if ($memberDetails[0]['IsMarried'] == 1) {
                                echo "selected";
                            }
                            ?>>Married</option>
                            <option value="0" <?php
                            if ($memberDetails[0]['IsMarried'] == 0) {
                                echo "selected";
                            }
                            ?>>Unmarried</option>
                        </select>
                    </div>
                </div>

                <?php $marriageanniversary = $memberDetails[0]['MarriageAnniversary']; ?>
                <div class="col-md-6">
                    <!-- <div class="form-group"> -->

                    <div class="fromgroup_height1 input-group1 form-group ls-group-input <?php echo (isset($marriageanniversary) && ($marriageanniversary->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? 'active' : ''; ?>">
                        <label> Marriage Anniversay</label>
                        <input type="name" class="form-control whbg" name = "custanniversaryedit" id = "custanniversaryedit" value="<?php echo (isset($marriageanniversary) && ($marriageanniversary->format('Y-m-d h:i:s') != '1900-01-01 12:00:00')) ? trim($marriageanniversary->format('d/m/Y')) : ''; ?>">                       
                        <!--<a style="padding-top: 0px;padding-bottom: 0px;" class="input-group-addon" href="javascript://" onclick="$('#custanniversaryedit').val('')"><i style="font-size:30px;color:red">×</i></a>-->
                    </div>
                    <!-- </div> -->
                </div>


                <div class="col-md-6">
                    <div class="form-group cityDiv <?php echo (isset($memberDetails[0]['Noofkids']) && !empty(trim($memberDetails[0]['Noofkids']))) ? 'active' : ''; ?>">
                        <label>No. of Kids</label>
                        <input type="number" class="form-control"  value="<?php echo!empty($memberDetails[0]['Noofkids']) ? trim($memberDetails[0]['Noofkids']) : ''; ?>" autocomplete="off" id="memberNoofkids" name="Noofkids" /> 
                    </div>
                </div>  

                <div class="col-md-6">
                    <div class="form-group cityDiv memberFoodPreferenceDropdown <?php echo (isset($memberDetails[0]['FoodPreference']) && !empty(trim($memberDetails[0]['FoodPreference']))) ? 'active' : ''; ?>">
                        <label>Food Preference</label>
                        <select id="memberFoodPreference" name="FoodPreference[]" multiple class="demo-default select-theme">
                            <?php
                            $FoodPreference = (trim($memberDetails[0]['FoodPreference']) != '') ? explode(',', $memberDetails[0]['FoodPreference']) : array();

                            echo '<option value="">Select</option>';
                            for ($i = 0; $i < count($this->foodPreferenceList); $i++) {
                                ?>
                                <option value="<?php echo $i; ?>" <?php echo (in_array($i, $FoodPreference)) ? 'selected' : ''; ?>><?php echo $this->foodPreferenceList[$i]['Title'] ?></option>
                            <?php } ?>    
                        </select>  
                    </div>
                </div>  
                <div>
                    <div class="col-md-6">
                        <div class="form-group cityDiv <?php echo (isset($memberDetails[0]['CustomerCompanyName']) && !empty(trim($memberDetails[0]['CustomerCompanyName']))) ? 'active' : ''; ?>">
                            <label>Company Name</label>
                            <input type="text" class="form-control"  value="<?php echo!empty($memberDetails[0]['CustomerCompanyName']) ? trim($memberDetails[0]['CustomerCompanyName']) : ''; ?>" autocomplete="off" id="memberCompanyName" name="CustomerCompanyName" /> 
                        </div>
                    </div>
                    <div class="clear"></div>
                </div>
                <?php
                if (!empty($this->getCustomerMemberVisaDetail)) {
                    foreach ($this->getCustomerMemberVisaDetail as $vKey => $vVal) {
                        ?>
                        <div class="removeMoreCountryVisaDiv<?php echo ($vKey + 1) ?>"> 
                            <div class="col-md-6">
                                <div class="form-group cityDiv ">
                                    <label>Visa Country</label>
                                    <input type="text" class="form-control"  value="<?php echo isset($vVal['CountryName']) ? $vVal['CountryName'] : ''; ?>" autocomplete="off" id="memberVisaCountryEdit<?php echo ($vKey + 1) ?>" name="VisaCountry[]" onkeyup="memberVisaCountrySearchEdit(1)" placeholder="Select"/> 
                                    <input type="hidden" name="VisaCountryId[]" id="memberVisaCountryIdEdit<?php echo ($vKey + 1) ?>" value="<?php echo (isset($vVal['VisaCountry']) && !empty($vVal['VisaCountry'])) ? trim($vVal['VisaCountry']) : ''; ?>">
                                </div>
                            </div> 

                            <div class="col-md-5">
                                <div class="form-group <?php echo (isset($vVal['VisaExpiryDate']) && ($vVal['VisaExpiryDate']->format('Y-m-d') != '1900-01-01')) ? 'active' : ''; ?>">
                                    <label>Visa Expiry date</label>
                                    <input type="name" class="form-control whbg commonDatepicker" name = "VisaExpiryDate[]" id = "memberVisaExpiryDateEdit<?php echo ($vKey + 1) ?>" value="<?php echo (isset($vVal['VisaExpiryDate']) && ($vVal['VisaExpiryDate']->format('Y-m-d') != '1900-01-01')) ? $vVal['VisaExpiryDate']->format('d/m/Y') : ''; ?>" onclick="runDatePickerCust(<?php echo ($vKey + 1) ?>)" 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="removeMoreVisaCountry(<?php echo ($vKey + 1) ?>);"><i class="fa fa-minus-circle"></i></a>

                                </div>
                            </div>
                        </div>
                        <input type="hidden" name="" id="countVisaCountryEdit" value="<?php echo count($this->getCustomerMemberVisaDetail) + 1 ?>">
                        <?php
                    }
                } else {
                    ?>

                    <div class="removeMoreCountryVisaDiv1"> 
                        <div class="col-md-6">
                            <div class="form-group cityDiv">
                                <label>Visa Country</label>
                                <input type="text" class="form-control"  value="" autocomplete="off" id="memberVisaCountryEdit1" name="VisaCountry[]" onkeyup="memberVisaCountrySearchEdit(1)" placeholder="Select Country"/> 
                                <input type="hidden" name="VisaCountryId[]" id="VisaCountryIdEdit1" 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 = "memberVisaExpiryDateEdit1" 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="removeMoreVisaCountry(1);"><i class="fa fa-trash-o"></i></a>

                            </div>
                        </div>
                    </div>
                    <input type="hidden" name="" id="countVisaCountryEdit" value="2">
                <?php } ?>
                <div class="appendMoreCountryVisaDivMember"></div>
                <div class="clearfix"></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 <?php echo (isset($memberDetails[0]['CustomerCategory']) && !empty(trim($memberDetails[0]['CustomerCategory']))) ? 'active' : ''; ?>">
                        <label>Customer Category</label>
                        <select id="memberCustomerCategory" name="CustomerCategory" class="demo-default select-country">
                            <option value="">Select</option>
                            <option value="Platinum" <?php echo (isset($memberDetails[0]['CustomerCategory']) && trim($memberDetails[0]['CustomerCategory']) == 'Platinum') ? 'selected' : ''; ?>>Platinum</option>
                            <option value="Gold" <?php echo (isset($memberDetails[0]['CustomerCategory']) && trim($memberDetails[0]['CustomerCategory']) == 'Gold') ? 'selected' : ''; ?>>Gold</option>
                            <option value="Silver" <?php echo (isset($memberDetails[0]['CustomerCategory']) && trim($memberDetails[0]['CustomerCategory']) == 'Silver') ? 'selected' : ''; ?>>Silver</option>
                        </select>                       
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group memberSeatPreferenceDropdown <?php echo (isset($memberDetails[0]['SeatPreference']) && !empty(trim($memberDetails[0]['SeatPreference']))) ? 'active' : ''; ?>">
                        <label>Seat Preference</label>
                        <select id="memberSeatPreference" name="SeatPreference" class="demo-default select-country">
                            <option value="">Select</option>
                            <option value="Window"<?php echo (isset($memberDetails[0]['SeatPreference']) && trim($memberDetails[0]['SeatPreference']) == 'Window') ? 'selected' : ''; ?>>Window </option>
                            <option value="Aisle" <?php echo (isset($memberDetails[0]['SeatPreference']) && trim($memberDetails[0]['SeatPreference']) == 'Aisle') ? 'selected' : ''; ?>>Aisle</option>
                            <option value="Any" <?php echo (isset($memberDetails[0]['SeatPreference']) && trim($memberDetails[0]['SeatPreference']) == 'Any') ? 'selected' : ''; ?>>Any</option>
                        </select>                       
                    </div>
                </div>    

                <div class="col-md-12">
                    <div class="form-group <?php echo (isset($memberDetails[0]['Remarks']) && !empty(trim($memberDetails[0]['Remarks']))) ? 'active' : ''; ?>">
                        <label>Remarks</label>
                        <textarea type="name" class="form-control whbg" name = "Remarks" id = "memberRemarks" value=""> <?php echo (isset($memberDetails[0]['Remarks']) && ($memberDetails[0]['Remarks'] != '')) ? $memberDetails[0]['Remarks'] : ''; ?></textarea>                  
                    </div>
                </div>
            </div>
            <div class="clear"></div></div>
        <div class="modal-footer">
            <button type="submit" class="btn btn-warning btn-sm pull-right successMsg">Submit </button>
            <input type="hidden" name="mid" value="<?php echo $vars['mid']; ?>" id="mid" />
            <input type="hidden" name="id" value="<?php echo base64_encode($memberDetails[0]['CustomerSysId']); ?>" id="id" />
            <input type="hidden" name="agencyId" value="<?php echo $vars['AgencySysId']; ?>" id="agencyId" />
            <button type="button" class="btn btn-primarygray btn-sm pull-left" data-dismiss="modal">Cancel</button>
        </div>

    </div>
    <?php //include_once 'application/views/scripts/newfooter.phtml';   ?>
    <script src="<?php echo $this->baseUrl('public/assets/js/pages/selectTag.js'); ?>"></script>
    <script src="<?php echo $this->baseUrl('public/countrycode/script.js?rv=1144'); ?>"></script>
    <script>
                        $(document).ready(function () {
                            $("#custdobedit,#custanniversaryedit").datetimepicker({
                                format: 'd/m/Y',
                                timepicker: false,
                                maxDate: 0
                            });
                            $("#passexpiryedit").datetimepicker({
                                format: 'd/m/Y',
                                timepicker: false,
                                minDate: 0
                            });

                        })
    </script>
    <?php
}
if (isset($vars['id']) && !empty($vars['id']) && isset($vars['cid']) && !empty($vars['cid']) && $vars['type'] == 'viewCustomerChatHistory') {
    $data = $vars['data'];
    ?>
    <script>
        $(document).ready(function () {
            $("#sendagentsms").focus();
        });
        function sendReplyToCustomer() {
            var customerId = $("#msgcustomerId").val();
            var agentid = $("#msgagentid").val();
            var message = $.trim($("#sendagentsms").val());
            //alert(message);
            if (message == '') {
                alert('You can not be sent blank message.');
                $("#sendagentsms").focus();
                return false;
            }
            var planid = $("#msgplanid").val();
            var agencyId = $("#msgagencyid").val();
            $.ajax({
                url: '/proposal/send-email-to-agent',
                type: 'POST',
                data: {'planId': planid, 'agencyId': agencyId, 'senderId': agentid, 'recieverId': customerId, 'message': message, 'emailid': '', 'isAgent': 1},
                dataType: 'json',
                beforeSend: function () {
                    $(".successResponse").hide();
                    $('.pleaseWait').attr('disabled', true);
                    $('.pleaseWait').html('Wait...');
                },
                success: function (result) {
                    if (result.response == 'success') {
                        $(".successResponse").show();
                        $('.pleaseWait').html(' Message Sent ');
                        $("#viewquotesupplier .modal-content").load("<?php echo $this->baseUrl('/customer/customer-chat-history/id'); ?>/" + planid + "/cid/" + customerId + "", function () {
                            $("#sendagentsms").focus();
                            //alert( "Load was performed." );
                        });
                        //$('.pleaseWait').removeAttr('disabled');
                    } else {
                        $(".successResponse").html('Please try after some time.');
                        $('.pleaseWait').removeAttr('disabled');
                    }
                    $("#sendagentsms").focus();
                }, error: function () {
                    $(".successResponse").show();
                    $(".successResponse").html('Please try after some time.');
                    $('.pleaseWait').removeAttr('disabled');
                    $('.pleaseWait').html(' Send Message ');
                }
            });
            $("#sendagentsms").focus();
            return false;
        }
    </script>
    <div class="modal-body">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <div class="col-md-12">
            <div class="ls-timeline">
                <div class="panel-body">      
                    <form method="post" action="" id="sendsmstocustomer" onsubmit="return sendReplyToCustomer();">
                        <div class="col-md-12 panel-footer text-right">
                            <div class="col-md-10"><?php
                                if (!empty($data)) {
                                    echo "Total Message Count(" . count($data) . ")";
                                }
                                ?>
                                <div class="form-group1">
                                    <label class="pull-left">Reply to customer<?php echo MANDATORY_SIGN; ?></label>
                                    <input type="text" name="sendagentsms" value="" class="form-control whbg" id="sendagentsms" />
                                </div>             
                            </div> 
                            <div class="col-md-2" style="padding-top:25px;">
                                <input type="hidden" name="msgcustomerId" id="msgcustomerId" value="<?php echo base64_encode($vars['cid']); ?>" />
                                <input type="hidden" name="msgplanid" id="msgplanid" value="<?php echo base64_encode($vars['id']); ?>" />
                                <input type="hidden" name="msgagencyid" id="msgagencyid" value="<?php echo base64_encode($vars['AgencySysId']); ?>" />
                                <input type="hidden" name="msgagentid" id="msgagentid" value="<?php echo base64_encode($vars['AgentSysId']); ?>" />
                                <button type="button" class="pleaseWait submit btn btn-success" name="sendreplytocustomer" onclick="return sendReplyToCustomer();" >Reply</button>                  
                            </div>  
                        </div>
                    </form>
                </div>
                <?php
                $s = 1;
                if (!empty($data)) {
                    ?>
                    <ul class="ls_tmtimeline">
                        <?php
                        for ($i = 0; $i < count($data); $i++) {
                            ?>

                            <li>
                                <div class="ls-timeline-user">
                                    <div class="media">
                                        <a class="pull-left" href="#">
                                            <img class="media-object img-circle" src="<?php echo $this->baseUrl('public/assets/images/demo/avatar-80.png'); ?>" alt="user">
                                        </a>

                                        <div class="media-body ">
                                            <time class="ls_tmtime" datetime="2013-04-10 18:30">
                                                <span style="width: 65px;"><?php echo $data[$i]['UpdateDate']->format('d-M-y'); ?></span> <span><?php echo $data[$i]['UpdateDate']->format('H:i'); ?></span>
                                            </time>
                                        </div>
                                    </div>
                                </div>
                                <?php if ($data[$i]['IsAgent'] == 1) { ?>
                                    <div class="ls_tmlabel">
                                        <h2><?php echo stripslashes($data[$i]['AgentFirstName']) . "&nbsp;" . stripslashes($data[$i]['AgentLastName']); ?></h2>
                                        <?php echo stripslashes($data[$i]['Message']); ?>
                                    </div>
                                    <div class="ls_tmicon"><i class="fa fa-share"></i></div>
                                <?php } else { ?>
                                    <div class="ls_tmlabel ls_tmlabelUser">
                                        <h2><?php echo stripslashes($data[$i]['FirstName']) . "&nbsp;" . stripslashes($data[$i]['LastName']); ?></h2>
                                        <p><?php echo stripslashes($data[$i]['Message']); ?></p>
                                    </div>
                                    <div class="ls_tmicon ls_tmiconUser"><i class="fa fa-reply"></i></div>
                                <?php } ?>

                            </li>
                        <?php }
                        ?>
                    </ul>
                <?php } else {
                    ?>
                    <div class="ls-timeline-user alert-danger" style="padding:5px;">
                        No record Found   
                    </div>
                    <?php
                }
                ?>

            </div>
        </div>

        <div class="clear"></div></div>
    <?php
}
if (isset($vars['id']) && !empty($vars['id']) && $vars['type'] == 'updateCustomerToDo') {
    $id = base64_decode($vars['id']);
    $cid = base64_decode($vars['cid']);
    $AgencySysId = base64_decode($vars['AgencySysId']);
    $todoDetails = $vars['data'];
    if (!empty($todoDetails)) {
//        echo"<pre>";print_r($todoDetails);die('data');
        $customHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
        $travelPlanStatusNameForLead = $customHelper->GetTravelPlanStatusArray('3', '');
        $lostArray = array(78 => "Lost - Wrong No.", 28 => "Lost - Not Interested", 31 => "Lost - Plan Cancelled", 76 => "Lost - Plan Cancelled", 30 => "Lost - Budget Issue", 63 => "Lost - Language Issue", 32 => "Lost - Booked Elsewhere", 76 => "Lost - Plan Postponed", 127 => "Lost - Duplicate Lead", 77 => "Lost - Destination Changed", 33 => "Lost - Different Trip Booked");
        $AgentFirstName = trim($todoDetails['AgentFirstName']);
        $AgentLastName = trim($todoDetails['AgentLastName']) != '' ? " " . trim($todoDetails['AgentLastName']) : '';
        $FirstName = trim($todoDetails['FirstName']);
        $LastName = trim($todoDetails['LastName']) != '' ? " " . trim($todoDetails['LastName']) : '';
        $mobile = trim($todoDetails['Contacts']) != '' ? " " . trim($todoDetails['Contacts']) : '';
        $RemindDuration = $todoDetails['RemindDuration'];
        $StartDateTime = $todoDetails['StartDateTime'];
        $type = $todoDetails['Type'];
        $duration = 0;
        $durationTxt = '';
        if ($RemindDuration >= 60) {
            if ($RemindDuration >= 1440) {
                $duration = $RemindDuration / 60 / 24;
                $durationTxt = ($duration > 1) ? 'Days' : 'Day';
            } else {
                $duration = $RemindDuration / 60;
                $durationTxt = ($duration > 1) ? 'Hours' : 'Hour';
            }
        } else {
            $duration = $RemindDuration;
            $durationTxt = ($duration > 1) ? 'Minutes' : 'Minute';
        }
        $differenceIndays = Zend_Controller_Action_HelperBroker::getStaticHelper('DateFormat')->calculateNoOfDays(date('Y-m-d'), $StartDateTime->format('Y-m-d'));
        ?>
        <script>
            $(".updatetodostart").datetimepicker({
                minDate: ($('.updatetodostart').val() != '' && $('.updatetodostart').val() != '__/__/____') ? $('.updatetodostart').val() : false,
                formatDate: 'd/m/Y H:00:00',
                format: 'd/m/Y H:00:00',
                onShow: function (ct) {
                    this.setOptions({
                        minDate: ($('.updatetodoend').val() != '' && $('.updatetodoend').val() != '__/__/____') ? $('.updatetodoend').val() : false,
                    });
                },
                onClose: function () {
                    $('.updatetodoend').val($('.updatetodostart').val());
                }
            });
            $(".updatetodoend").datetimepicker({
                formatDate: 'd/m/Y H:00:00',
                format: 'd/m/Y H:00:00',
                minDate: 0,
                maxDate: ($(".updatetodostart").val() != '') ? $(".updatetodostart").val() : false,
                onShow: function (ct) {
                    this.setOptions({
                        maxDate: ($('.updatetodostart').val() != '') ? $('.updatetodostart').val() : false,
                    });
                }
            });
            $("#todostartdateu1").datetimepicker({
                formatDate: 'd/m/Y',
                format: 'd/m/Y',
                minDate: 0,
                timepicker: false,
                /*maxDate:($("#todoenddate").val()!='')?$("#todoenddate").val():false,
                 onShow:function(ct){
                 this.setOptions({
                 maxDate:($('#todoenddate').val()!='')?$('#todoenddate').val():false,
                 });
                 },*/
                onClose: function () {
                    $('#todoenddate').val($('#todostartdate').val());
                }
            });

            $("#todostartdatetime1").datetimepicker({

                timepicker: true,
                datepicker: false,
                //                            formatDate: 'd/m/Y H:00:00',
                format: 'H:i',
                minuteStep: 15,
                //                            minDate: 0,
                /*maxDate:($("#todoenddate").val()!='')?$("#todoenddate").val():false,
                 onShow:function(ct){
                 this.setOptions({
                 maxDate:($('#todoenddate').val()!='')?$('#todoenddate').val():false,
                 });
                 },*/
                //                            onClose: function () {
                //                                $('#todoenddate').val($('#todostartdate').val());
                //                            }
            });
            function showReminInDiv() {
                $('.ReminInDiv').toggleClass('hide-remind-form');
            }
            function hideReminInDiv() {
                $('.ReminInDiv').toggleClass('hide-remind-form');
                var reminderintype = $('#reminderintype').val();
                var reminderinvalue = $('#reminderinvalue').val();
                reminderintype = reminderinvalue > 1 ? reminderintype + 's' : reminderintype;
                $('.reminder_in_html').html(reminderinvalue + ' ' + reminderintype);
            }
            function showReminInDiv1() {
                $('.ReminInDiv').toggleClass('hide-remind-form');
            }
            function hideReminInDiv1() {
                $('.ReminInDiv').toggleClass('hide-remind-form');
                var reminderintype = $('#reminderintype1').val();
                var reminderinvalue = $('#reminderinvalue1').val();
                reminderintype = reminderinvalue > 1 ? reminderintype + 's' : reminderintype;
                $('.reminder_in_html').html(reminderinvalue + ' ' + reminderintype);
            }
            $('.reminderday').on('click', function () {
                $('#todostartdate').val('');
                if ($(this).attr('id') == 'reminderday4') {
                    $('.reminderday_customDiv').show();
                } else {
                    $('.reminderday_customDiv').hide();
                }
            })
        </script>		
        <style>
            .followup-mobile {
                display: flex;
            }
            .followup-mobile .country_code {
                margin-right: 5px;
                border-bottom-left-radius: 0;
                border-top-left-radius: 0;
                min-width: 42px;
            }
            .followup-mobile-number {

            }
            .followup-mobile-number #mobilenumLead {
                width: 100% !important;
            }
            .followup-popup #main-container .form-group select {
                height: 38px;
            }
            #main-container .form-group label:not(.check) {
                position: absolute;
                transition: all 0.5s;
                background: #fff;
                z-index: 9;
                top: -12px;
            }

            .mobilenumber_labelshow {
                top: -12px;
                transition: all 0.5s;
                color: #0076CA !important;
                padding: 2px 5px;
                font-size: 12px;
                font-weight: 500;
                /* left: 6px; */
                z-index: 9;
            }
            .modal-footer {
                border-top: 0;
            }
        </style>		
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">Update To Do</h4>
            </div>
            <div class="alert alert-success" id="succmsg" style="display:none;">
                <strong>Success!</strong>Todo has been Updated.
            </div>
            <form name="mSubmitToDoUpdateForm" class="mSubmitToDoUpdateForm" id="mSubmitToDoUpdateForm" action="javascript://" method="post">
                <div class="modal-body followup-popup">
                    <div class="row">
                        <div class="col-md-8">
                            <div class="todo-radio-btn">
                                <input class="RadioDisId titleTabClassupdate todo-radio-input" type="radio" name="todosubject" id="titleTabu1" value="Call" <?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Call') ? 'checked' : ''; ?>>
                                <label for="titleTabu1" class="hotelshow leftsidearea todo-radio-label">Call </label>
                            </div>
                            <!--                            <div class="todo-radio-btn">
                                                            <input class="RadioDisId titleTabClassupdate todo-radio-input" type="radio" name="todosubject" id="titleTabu2" value="Meeting" <?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Meeting') ? 'checked' : ''; ?>>
                                                            <label for="titleTabu2" class="hotelshow leftsidearea todo-radio-label">Meeting </label>
                                                        </div>-->
                            <div class="todo-radio-btn">
                                <input class="RadioDisId titleTabClassupdate todo-radio-input" type="radio" name="todosubject" id="titleTabu3" value="To Do"  <?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) != 'Call' && trim($todoDetails['Subject']) != 'Meeting') ? 'checked' : ''; ?>>
                                <label for="titleTabu3" class="hotelshow leftsidearea todo-radio-label">To Do </label>
                            </div>

                            <div class="clearfix"></div>
                        </div>
                        <div class="col-md-4 no-padding-left">
                            <div class="reminfin">
                                remind in <a href="javascript://" onclick="showReminInDiv1()" style="" class="reminder_in_html"><?php echo $duration . ' ' . $durationTxt; ?> </a>
                            </div>

                            <div class="ReminInDiv remindin-div hide-remind-form">
                                <div class="remind-form" style="">
                                    Remind in<br>
                                    <div class="col-md-6 no-padding-left"><input type="number" class="form-control" name="reminderinvalue" id="reminderinvalue1" value="<?php echo $duration; ?>"></div>
                                    <div class="col-md-6 no-padding">
                                        <select class="form-control" name="reminderintype" id="reminderintype1">
                                            <option value="minute" <?php echo ($durationTxt == 'Minutes' || $durationTxt == 'Minute') ? 'selected' : ''; ?>>minutes</option>
                                            <option value="hour" <?php echo ($durationTxt == 'Hours' || $durationTxt == 'Hour') ? 'selected' : ''; ?>>hours</option>
                                            <option value="day" <?php echo ($durationTxt == 'Days' || $durationTxt == 'Day') ? 'selected' : ''; ?>>days</option>
                                        </select>
                                    </div>
                                    <div class="col-md-12 no-padding">
                                        <a href="javascript://" onclick="hideReminInDiv1()" class="btn btn-primarygray pull-right" style="margin-top: 10px;">submit</a></div>
                                    <div class="clear"></div>
                                </div>


                            </div>
                        </div>
                        <div class="col-md-12 Callupdate"  style="display:<?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Call') ? 'block' : 'none'; ?>">
                            <div class="todo-radio-btn">
                                <input class="RadioDisId remindercallstatus todo-radio-input" type="radio" name="calltype" id="remindercallstatusu0" value="1" <?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Call') ? 'checked' : ''; ?>>
                                <label for="remindercallstatusu0" class="hotelshow leftsidearea todo-radio-label">Out Going </label>
                            </div>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId remindercallstatus todo-radio-input" type="radio" name="calltype" id="remindercallstatusu1" value="2">
                                <label for="remindercallstatusu1" class="hotelshow leftsidearea todo-radio-label">Incoming </label>
                            </div>
                        </div>
                        <div class="clear" style="clear:both; display:block;"></div>

                        <div class="col-md-12 remindercallbackdiv" style="<?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Call') ? 'block' : 'none'; ?>">
                            <h4 class="outcome">Out Come</h4>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallbacku0" value="1" <?php echo (isset($todoDetails['Subject']) && trim($todoDetails['Subject']) == 'Call') ? 'checked' : ''; ?>>
                                <label for="remindercallbacku0" class="hotelshow leftsidearea todo-radio-label">Answered </label>
                            </div>
                            <div class="callbackradio" style="display: inline-block">
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallbacku1" value="2">
                                    <label for="remindercallbacku1" class="hotelshow leftsidearea todo-radio-label">Unanswered </label>
                                </div>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId remindercallback todo-radio-input" type="radio" name="callstatus" id="remindercallbacku2" value="3">
                                    <label for="remindercallbacku2" class="hotelshow leftsidearea todo-radio-label">Not Reachable </label>
                                </div>
                            </div>
                        </div>
                        <div class="clear" style="clear:both; display:block;"></div>


                        <div class="col-md-12 nextstepcalldiv" style="display:<?php echo (trim($todoDetails['Subject']) == 'Call') ? 'block' : 'none'; ?>;">
                            <div class="todo-radio-btn">
                                <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu0" value="1" <?php echo (trim($todoDetails['Subject']) == 'Call') ? 'checked' : ''; ?>>
                                <label for="nextstepcallu0" class="hotelshow leftsidearea todo-radio-label">Call Back </label>
                            </div>
                            <div class="todo-radio-btn nextstepcalldiv2">
                                <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu1" value="2">
                                <label for="nextstepcallu1" class="hotelshow leftsidearea todo-radio-label">To Do </label>
                            </div>
                            <div class="todo-radio-btn nextstepcalldiv2" >
                                <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu2" value="3">
                                <label for="nextstepcallu2" class="hotelshow leftsidearea todo-radio-label">Meeting </label>
                            </div>
                            <?php if ($type == 1) { ?>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu3" value="4">
                                    <label for="nextstepcallu3" class="hotelshow leftsidearea todo-radio-label">Lead </label>
                                </div>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu4" value="5">
                                    <label for="nextstepcallu4" class="hotelshow leftsidearea todo-radio-label">Discard </label>
                                </div>
                            <?php } elseif ($type == 2) { ?>
                                <div class="todo-radio-btn nextstepcalldiv2">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu3" value="4">
                                    <label for="nextstepcallu3" class="hotelshow leftsidearea todo-radio-label">Create Query</label>
                                </div>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu4" value="5">
                                    <label for="nextstepcallu4" class="hotelshow leftsidearea todo-radio-label">Lost </label>
                                </div>
                                <div class="form-group1 qstagehide" style="margin-bottom: 10px; display: none;">
                                    <select class="form-control todo-select" name="LeadStage" id="LeadStage">
                                        <option value="">Lead Stages</option>
                                        <?php
                                        $notexist = array(48, 50, 53, 52);
                                        foreach ($travelPlanStatusNameForLead as $key => $stage) {
                                            if (!in_array($key, $notexist)) {
                                                ?>
                                                <option value="<?php echo $key ?>"><?php echo $stage['TPStatus'] ?></option>
                                                <?php
                                            }
                                        }
                                        ?>
                                    </select>
                                </div>

                                <?php
                            } elseif ($type == 3) {
                                $TPSysId = $todoDetails['ActionId'];
                                $_crmcusttravelplan = new Travel_Model_CRM_CustomerTravelPlan();
                                $countPropsal = 0;
                                if (!empty($TPSysId)) {
                                    $proposal = $_crmcusttravelplan->GetProposalLastUpdateInfo($TPSysId);
                                    $countPropsal = !empty($proposal) && ($proposal > 0) ? 1 : 0;
                                }
                                ?>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu3" value="4">
                                    <label for="nextstepcallu3" class="hotelshow leftsidearea todo-radio-label">Confirm</label>
                                </div>
                                <div class="todo-radio-btn">
                                    <input class="RadioDisId nextstepcall todo-radio-input" type="radio" name="nextstepcall" id="nextstepcallu4" value="5">
                                    <label for="nextstepcallu4" class="hotelshow leftsidearea todo-radio-label">Lost</label>
                                </div>
                                <div class="form-group1 qstagehide" style="display:none">
                                    <select class="form-control todo-select" name="QueryStage" id="QueryStage">
                                        <option value="">Query Stages</option>
                                        <?php foreach ($lostArray as $key => $stage) { ?>
                                            <option value="<?php echo $key ?>"><?php echo $stage; ?></option>
                                        <?php }
                                        ?>,
                                    </select>
                                </div>
                                <input type="hidden" name="totalproposal" value="<?php echo $countPropsal; ?>">
                            <?php } ?>

                        </div>
                        <div class="clear" style="clear:both; display:block;"></div>
                        <div class="col-md-12 no-padding-right reminderdaydiv" style="margin-bottom:8px;display:<?php echo (trim($todoDetails['Subject']) == 'Call') ? 'block' : 'none'; ?>">
                            <div class="todo-radio-btn">
                                <input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderdayu0" value="0" <?php echo (($differenceIndays == 0) || (trim($todoDetails['Subject']) == 'Call')) ? 'checked' : ''; ?>>
                                <label for="reminderdayu0" class="hotelshow leftsidearea todo-radio-label">Today </label>
                            </div>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderdayu1" value="1" <?php echo ($differenceIndays == 1) ? 'checked' : ''; ?>>
                                <label for="reminderdayu1" class="hotelshow leftsidearea todo-radio-label">Tomorrow </label>
                            </div>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderdayu2" value="2" <?php echo ($differenceIndays == 2) ? 'checked' : ''; ?>>
                                <label for="reminderdayu2" class="hotelshow leftsidearea todo-radio-label">In 2 days </label>
                            </div>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderdayu3" value="3" <?php echo ($differenceIndays == 3) ? 'checked' : ''; ?>>
                                <label for="reminderdayu3" class="hotelshow leftsidearea todo-radio-label">In 3 days </label>
                            </div>
                            <div class="todo-radio-btn">
                                <input class="RadioDisId reminderday todo-radio-input" type="radio" name="reminderday" id="reminderdayu4" value="4" <?php echo ($differenceIndays > 3) ? 'checked' : ''; ?>>
                                <label for="reminderdayu4" class="hotelshow leftsidearea todo-radio-label">Custom </label>
                            </div>
                        </div>

                        <div class="clear" style="clear:both; display:block;"></div>
                        <div class="col-md-4 reminderday_customDiv" style="display:none;margin-top: 10px;">
                            <div class="form-group active">
                                <label for="reminderday4" class=" hotelshow leftsidearea ">Custom Date </label>
                                <input class="form-control commonDatepicker" type="text" name="todostartdate" id="todostartdateu1" value="<?php echo $StartDateTime->format('d/m/Y'); ?>">
                            </div>
                        </div>

                        <div class="col-md-2 timediv" style="margin-top: 10px;display:<?php echo (trim($todoDetails['Subject']) == 'Call') ? 'block' : 'none'; ?>">
                            <div class="form-group active">
                                <label for="reminderday4" class=" hotelshow leftsidearea ">Time </label>
                                <input class="form-control mytimepickeronly" type="text" name="todostartdatetime" id="todostartdatetime1" value="<?php echo $StartDateTime->format('H:i'); ?>">
                            </div>
                        </div>
                    </div>
                    <div class="clear" style="clear:both; display:block;"></div>
                    <div class="row" style="margin-top:10px;">
                        <div class="col-md-6">
                            <div class="form-group active">
                                <label>Assigned To<?php echo MANDATORY_SIGN; ?></label>
                                <input class="form-control whbg" type="text" disabled="disabled" value="<?php echo $AgentFirstName . $AgentLastName . "(" . trim($todoDetails['AgentEmailId']) . ")"; ?>"> 
                                <input class="form-control whbg" type="hidden"  name="assignedtoId" value="<?php echo $todoDetails['AssignToSysId']; ?>">                       
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group active">
                                <label>Select Customer<?php echo MANDATORY_SIGN; ?></label>
                                <?php if ($type == 1 && $todoDetails['CustSysId'] == 0) { ?>
                                    <input class="form-control" disabled="disabled" autocomplete="off" value="<?php echo (!empty($todoDetails['RelatedTo'])) ? $todoDetails['RelatedTo'] : ''; ?>"> 
                                    <input type="hidden" name="RelatedTo" id="RelatedTo" value="<?php echo (!empty($todoDetails['RelatedTo'])) ? $todoDetails['RelatedTo'] : ''; ?>">
                                <?php } else { ?>
                                    <input class="form-control" disabled="disabled" autocomplete="off" value="<?php echo (!empty($todoDetails['EmailId'])) ? $FirstName . ' ' . $LastName . "(" . trim($todoDetails['EmailId']) . ")" : ''; ?>">       
                                    <span style="font-size:12px"><?php echo trim($mobile); ?></span>  
                                <?php } ?>

                                <input type="hidden" name="custsysID_update" id="custsysID_update" value="<?php echo (isset($todoDetails['CustSysId'])) ? $todoDetails['CustSysId'] : ''; ?>">
                            </div>
                        </div>



                        <div class="col-md-6" style="display:none;">
                            <div class="form-group">
                                <label><input type="checkbox" class="icheck-red" name="followup_update" value="1" id="followup_update" <?php
                                    if ($todoDetails['Type'] == 1) {
                                        echo "checked";
                                    }
                                    ?> />Follow Up</label>  
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="form-group cityDiv active">
                                <label>Details</label>
                                <textarea class="form-control whbg" name="details" id="details_update"  maxlength="150" type="text" rows="2" cols="10"><?php echo stripslashes($todoDetails['Description']); ?></textarea>                   
                            </div>
                        </div>
                        <div class="col-md-2">
                            <div class="cityDiv">
                                <label class="checkbox_popup leftsidearea checkbox_width_auto align_margin_8">
                                    <input type="checkbox" name="markasdone" value="1" id="markasdone_update" <?php
                                    if ($todoDetails['IsCompleted'] == 1) {
                                        echo "checked";
                                    }
                                    ?> />      
                                    Completed
                                    <span class="checkmark"></span>
                                </label>

                            </div>
                        </div>

                        <div class="clear"></div>
                    </div>
                </div>
                <?php if ($type == 1) { ?>
                    <!-- lead form  -->
                    <div class="col-md-12 leadformdiv" style="display:none">
                        <div class="row">
                            <?php if (empty($todoDetails['CustSysId'])) { ?>
                                <div class="col-md-6 no-padding-right" style="">
                                    <div class="form-group active">
                                        <label for="emailID">Email ID <span class="red">*</span></label>
                                        <input type="text" class="form-control whbg" name="emailID" id="emailIDLead" value="" onblur="return ChkDuplicateEmailLead();">
                                    </div>
                                    <span id="emailexistLead" class="error_msgtext" style="display:none;color:red;">Email id already exists <a href="#" class="emailViewDetailsLead">view</a></span>
                                </div>
                            <?php } ?>
                            <div class="col-md-6">
                                <div class="txtfieldMain textfieldMain_mobile form-group followup-mobile" style="border: #0069ff 0px solid;">

                                    <div class="country_details country_box_wrap1">
                                        <div id="iti-flag_leadq" class="iti-flag in"></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 country_box_wrap2" readonly="readonly" id="CountryCode" name="countrycode" value="<?php echo (isset($DefaultCountryCode) && $DefaultCountryCode != '') ? trim($DefaultCountryCode) : '+91'; ?>">
                                    <div class="followup-mobile-number">
                                        <label for="mobilenum" class="mobilenumber_labelshow">Mobile Number <span class="red">*</span></label>
                                        <input type="tel" name="mobilenum" id="mobilenumLead" maxlength="10" value="<?php echo (!empty($todoDetails['RelatedTo'])) ? $todoDetails['RelatedTo'] : ''; ?>" class="form-control whbg mobilenum_width MobilevalMaxMin" style="width: 186px; float: right; border:#0069ff 1px solid !important; ">
                                    </div>
                                </div>
                            </div>
                            <?php if (!empty($todoDetails['CustSysId'])) { ?>
                                <span class="error_msgtext mobileexistLead" style="color:red;">Mobile number already exist <a href="/customer/customer-profile-desc/id/<?php echo base64_encode($todoDetails['CustSysId']); ?>" target="_blank" class="mobileViewDetailsLead">view</a></span>
                            <?php } ?>
                        </div>
                        <?php if (empty($todoDetails['CustSysId'])) { ?>
                            <div class="row">
                                <div class="col-md-2 no-padding-right">
                                    <div class="form-group active full">
                                        <label for="customerSalutionAdd">Salutation</label>
                                        <?php $ARR_SALUTION = unserialize(ARR_SALUTION); ?>
                                        <select id="customerSalutionAdd" name="salution">
                                            <?php foreach ($ARR_SALUTION as $key => $value) { ?>
                                                <option value="<?php echo $key; ?>"><?php echo trim($value); ?></option>
                                            <?php } ?>
                                        </select>
                                    </div>
                                </div>
                                <div class="col-md-5 no-padding-right">
                                    <div class="form-group active">
                                        <label for="customernameLead">First Name <span class="red">*</span></label>
                                        <input type="text" class="form-control whbg" name="customername" id="customernameLead" value="">
                                    </div>
                                </div>
                                <div class="col-md-5">
                                    <div class="form-group active">
                                        <label for="customerlastnameLead">Last Name</label>
                                        <input type="text" class="form-control whbg" name="customerlastname" id="customerlastnameLead" value="">
                                    </div>
                                </div>
                            </div>
                            <div class="row">
                                <div class="col-md-6">
                                    <div class="form-group active full">
                                        <label for="leadsource">Lead Source</label>
                                        <select class="form-control whbg" name="leadsource" id="leadsource">
                                            <?php foreach ($this->leadSource as $key => $value) { ?>
                                                <option value="<?php echo $value['LeadSourceSysId'] ?>"><?php echo $value['Title'] ?>
                                                </option>
                                            <?php } ?>
                                        </select>

                                    </div>
                                </div>
                            </div>
                        <?php } ?>
                    </div>
                    <!-- lead form -->
                    <div class="clear"></div>
                    <div class="col-md-12">
                        <div class="col-md-4 pull-right text-right no-padding">
                            <span class="existing"><a href="javascript:void(0);" id="existingRemarksLink" title="See Last Follow Up" onclick="getQueryLastfollowup();">See Last Follow Up</a></span>
                        </div>
                        <div class="existingRemark"></div>
                    </div>
                    <div class="clear"></div>
                    <script>
                        function getQueryLastfollowup() {
                            var existingRemarkHidden = $('#existingRemarkHidden').val();
                            if (existingRemarkHidden == 1) {
                                $('#existingRemarksLink').html('See Last Follow Up');
                                $(".existingRemark").html('');
                                return false;
                            }
                            var TPSysId = $("#ActionId").val();
                            var type = $("#type").val();
                            var tpid = btoa(TPSysId);
                            $.ajax({
                                url: '/leaddetail/getquery-last-followup',
                                data: {
                                    tpid: tpid,
                                    type: type
                                },
                                dataType: 'html',
                                type: 'POST',
                                beforeSend: function () {
                                    $(".existingRemark").html('Please Wait...');
                                },
                                success: function (response) {
                                    $(".existingRemark").html(response);
                                    $('#existingRemarksLink').html('Hide Last Follow Up');
                                }
                            });
                        }
                    </script>
                <?php } ?>
                <?php if ($type == 3) { ?>
                    <div class="col-md-12">
                        <div class="col-md-4 pull-right text-right no-padding">
                            <span class="existing"><a href="javascript:void(0);" id="existingRemarksLink" title="See Last Follow Up" onclick="getQueryLastfollowup();">See Last Follow Up</a></span>
                        </div>
                        <div class="existingRemark"></div>
                    </div>
                    <div class="clear"></div>
                    <script>
                        function getQueryLastfollowup() {
                            var existingRemarkHidden = $('#existingRemarkHidden').val();
                            if (existingRemarkHidden == 1) {
                                $('#existingRemarksLink').html('See Last Follow Up');
                                $(".existingRemark").html('');
                                return false;
                            }
                            var TPSysId = $("#ActionId").val();
                            var type = $("#type").val();
                            var tpid = btoa(TPSysId);
                            $.ajax({
                                url: '/leaddetail/getquery-last-followup',
                                data: {
                                    tpid: tpid,
                                    type: type
                                },
                                dataType: 'html',
                                type: 'POST',
                                beforeSend: function () {
                                    $(".existingRemark").html('Please Wait...');
                                },
                                success: function (response) {
                                    $(".existingRemark").html(response);
                                    $('#existingRemarksLink').html('Hide Last Follow Up');
                                }
                            });
                        }
                    </script>
                <?php } else if ($type == 2) { ?>
                    <div class="col-md-12">
                        <div class="col-md-4 pull-right text-right no-padding">
                            <span class="existing"><a href="javascript:void(0);" id="existingRemarksLink" title="See Last Follow Up" onclick="getQueryLastfollowup();">See Last Follow Up</a></span>
                        </div>
                        <div class="existingRemark"></div>
                    </div>
                    <div class="clear"></div>
                    <script>
                        function getQueryLastfollowup() {
                            var existingRemarkHidden = $('#existingRemarkHidden').val();
                            if (existingRemarkHidden == 1) {
                                $('#existingRemarksLink').html('See Last Follow Up');
                                $(".existingRemark").html('');
                                return false;
                            }
                            var TPSysId = $("#ActionId").val();
                            var type = $("#type").val();
                            var tpid = btoa(TPSysId);
                            $.ajax({
                                url: '/leaddetail/getquery-last-followup',
                                data: {
                                    tpid: tpid,
                                    type: type
                                },
                                dataType: 'html',
                                type: 'POST',
                                beforeSend: function () {
                                    $(".existingRemark").html('Please Wait...');
                                },
                                success: function (response) {
                                    $(".existingRemark").html(response);
                                    $('#existingRemarksLink').html('Hide Last Follow Up');
                                }
                            });
                        }
                    </script>
                <?php } ?>
                <input type="hidden" name="ActionId" id="ActionId" value="<?php echo $todoDetails['ActionId']; ?>">
                <input type="hidden" name="type" id="type" value="<?php echo $type; ?>">
                <div class="modal-footer ft-pd-15">
                    <button type="button" class="btn btn-primary btn-sm pull-right updatetodo" onclick="UpdateTODO();" <?php
                    if ($todoDetails['IsCompleted'] == 1) {
                        echo "disabled";
                    }
                    ?>>Submit</button>
                    <input type="hidden" name="editId" id="todoeditId" value="<?php echo base64_encode($vars['id']); ?>">
                    <button type="button" class="btn btn-primarygray btn-sm pull-left mt_left_mgt0" data-dismiss="modal">Cancel</button>
                </div>
            </form>
            <script type="text/javascript">
                $('.titleTabClassupdate').on('click', function () {
                    $('.remindercallstatus').prop("checked", false);
                    $('.remindercallback').prop("checked", false);
                    $('.nextstepcall').prop("checked", false);
                    $('.reminderdaydiv').hide();
                    $('.reminderday_customDiv').hide();
                    $('.Call').hide();
                    $('.qstagehide').hide();
                    $('.nextstepcalldiv').hide();
                    $('.timediv').hide();
                    $('#titleTabu1').prop("checked", false);
                    if ($(this).attr('id') == 'titleTabu1') {
                        $('.Callupdate').show();
                        $('#remindercallstatusu0').prop('checked', true);
                        $('.remindercallbackdiv').show();
                        $('#remindercallbacku0').prop('checked', true);
                        $('.nextstepcalldiv').show();
                        $('#nextstepcallu0').click();
                    } else {
                        $('.Callupdate').hide();
                        $('#remindercallstatus0').prop('checked', false);
                        $('.remindercallbackdiv').hide();
                        $('#remindercallback0').prop('checked', false);
                        $('.nextstepcalldiv').hide();
                    }
                    if ($(this).attr('id') != 'titleTabu1') {
                        $('.remindercallbackdiv').hide();
                        $('.nextstepcalldiv').show();
                        $('.Call').hide();
                        $('#titleTabu1').prop("checked", false);
                        if ($(this).attr('id') == 'titleTabu2') {
                            $('#titleTabu2').prop("checked", true);
                            $('#titleTabu3').prop("checked", false);
                            $('.nextstepcalldiv').show();
                        } else if ($(this).attr('id') == 'titleTabu3') {
                            $('#titleTabu2').prop("checked", false);
                            $('#titleTabu3').prop("checked", true);
                            $('.nextstepcalldiv').hide();
                            $('.reminderdaydiv').show();
//                            $('#nextstepcallu0').click();
                            $('#reminderdayu0').click();
                        }
                    } else {
                        $('#titleTabu1').prop("checked", true);
                        $('#titleTabu2').prop("checked", false);
                        $('#titleTabu3').prop("checked", false);
                    }
                });

                $('.reminderday').on('click', function () {
                    $('#todostartdateu1').val('');
                    $('.timediv').show();
                    if ($(this).attr('id') == 'reminderdayu4') {
                        $('.reminderday_customDiv').show();
                    } else {
                        $('.reminderday_customDiv').hide();
                    }
                });


                $('.remindercallstatus').on('click', function () {
                    $('.remindercallback').prop("checked", false);
                    $('.nextstepcall').prop("checked", false);
                    $('.reminderday').prop("checked", false);
                    $('.nextstepcalldiv').hide();
                    $('.reminderdaydiv').hide();
                    $('.reminderday_customDiv').hide();
                    $('.timediv').hide();
                    $('.nextstepcalldiv').show();
                    $('#remindercallbacku0').prop('checked', true);
                    $('#nextstepcallu0').click();
                    if ($(this).attr('id') == 'remindercallstatusu0') {
                        $('.remindercallbackdiv').show();
                        $('.callbackradio').show();
                    } else if ($(this).attr('id') == 'remindercallstatusu1') {
                        $('.remindercallbackdiv').show();
                        $('.callbackradio').hide();
                        $('#remindercallstatusu1').prop('checked', true);
                    } else {
                        $('.remindercallbackdiv').show();
                    }
                });

                $('.nextstepcall').on('click', function () {
                    $('.reminderday').prop("checked", false);
                    $('.reminderdaydiv').hide();
                    $('.timediv').hide();
                    $('.leadformdiv').hide();
                    $('.qstagehide').hide();
                    $('.nextstepcalldiv').show();
                    $('.reminderday_customDiv').hide();
                    if ($(this).attr('id') == 'nextstepcallu4') {
                        $('.qstagehide').css('display', 'inline-flex');
                    } else if ($(this).attr('id') == 'nextstepcallu3') {
                        $('.leadformdiv').show();
                        $('.reminderdaydiv').hide();
                        $('.timediv').hide();
                        $('.qstagehide').hide();
                    } else {
                        $('.reminderdaydiv').show();
                        $('.qstagehide').hide();
                        $('#reminderdayu0').click();
                    }
                });

                $('.remindercallback').on('click', function () {
                    $('.nextstepcall').prop("checked", false);
                    $('.reminderday').prop("checked", false);
                    $('.reminderdaydiv').hide();
                    $('.timediv').hide();
                    $('.nextstepcalldiv').show();
                     $('#nextstepcallu0').click();
                    if ($(this).attr('id') == 'remindercallbacku0') {
                        $('.nextstepcalldiv2').show();
                    } else {
                        $('.nextstepcalldiv2').hide();
                    }
                });

                $('#myModalviewToDoDetail').on('hidden.bs.modal', function () {
                    location.reload();
                });

            </script>
        </div>
        <?php
    }
}
if (isset($vars['id']) && !empty($vars['id']) && $vars['type'] == 'viewCustomerToDo') {
    $id = base64_decode($vars['id']);
    $todoDetails = $vars['data'];
    if (!empty($todoDetails)) {
        ?>				
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">View To Do</h4>
            </div>
            <div class="alert alert-success" id="succmsg" style="display:none;">
                <strong>Success!</strong>Todo has been Updated.
            </div>
            <div class="modal-body">
                <div class="col-md-10">
                    <div class="form-group cityDiv">
                        <label>Details</label>
                        <?php echo stripslashes($todoDetails['Description']); ?>                  
                    </div>
                </div>
                <div class="clear"></div></div>
        </div>
        <?php
    }
}
if ($vars['type'] == 'getCustomerTravelHistoryHaveBeelTo') {
    $data = $vars['data'];
    ?>				
    <table class="table tablestyle">
        <tbody>
            <tr  class="alert alert-graylight">
                <th class="small smallbold">Last Visited</th>
                <th class="small smallbold">Country</th>
                <th class="small smallbold">City</th>
                <th class="small smallbold">Type</th>
                <th class="small smallbold">Action</th>
            </tr>
            <?php
            $planTypeArray = array(1 => 'Flight', 2 => 'Hotel', 5 => 'Package');
            if (!empty($data)) {
                foreach ($data as $key => $value) {
                    ?>	 
                    <tr class="hiderow_<?php echo $value['HaveBeenToSysId']; ?>"> 
                        <td title="<?php echo ($value['TravelDate']->format('d/m/Y') != '01/01/1900') ? $value['TravelDate']->format('d/m/Y') : 'NA'; ?>"><?php echo ($value['TravelDate']->format('d/m/Y') != '01/01/1900') ? $value['TravelDate']->format('Y') : 'NA'; ?></td>
                        <td><?php echo (isset($value['CountryName']) && !empty(trim($value['CountryName']))) ? trim($value['CountryName']) : 'NA'; ?></td>
                        <td><?php echo (isset($value['CityName']) && !empty(trim($value['CityName']))) ? trim($value['CityName']) : 'NA'; ?></td>
                        <td><?php echo @$value['Star'] ? $value['Star'] : '0', " Star"; ?></td>
                        <td class="small">
                            <a href="" onclick="if (confirm('Are you sure want to delete it?')) {
                                                    deleteRecord('<?php echo base64_encode($value['HaveBeenToSysId']); ?>', '<?php echo base64_encode('PROFILEHISTORY'); ?>');
                                                }" class="view_text1 tooltipLink" data-placement="top" title="Delete"><i class="fa fa-minus-circle"></i></a>
                        </td>

                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr><td colspan="6" class="text-danger" align="center"><strong>No record found</strong></td></tr>
                <?php
            }
            //echo $numberOdChildrens;
            ?>
        </tbody>
    </table>
    <?php
}
if ($vars['type'] == 'getCustomerAllRemarks') {
    $data = $vars['data'];
    ?>				
    <table class="table tablestyle">
        <tbody>
            <tr class="alert alert-graylight">
                <th width="5%" class="small smallbold">#</th>
                <th width="20%" class="small smallbold">Create Date</th>
                <th class="small smallbold">Remark Type</th>
                <th class="small smallbold">Remark</th>
                <th width="5%" class="small smallbold">Action</th>
            </tr>
            <?php
            if (!empty($data)):
                $s = 1;
                foreach ($data as $getAllCustomerRemark) { //echo '<pre>'; print_r($roles); die;
                    ?>
                    <tr class="remarkshow_<?php echo $getAllCustomerRemark['RemarkSysId']; ?>">
                        <td><?php echo $s; ?></td>
                        <td><?php echo $getAllCustomerRemark['CreatedDate']->format('d-M-y'); ?></td>
                        <td><?php echo (isset($getAllCustomerRemark['TPSysId']) && !empty($getAllCustomerRemark['TPSysId'])) ? 'Lead' : 'Customer'; ?></td>
                        <td><?php echo stripslashes($getAllCustomerRemark['Remarks']); ?></td>
                        <td class="small">
                            <a onclick="if (confirm('Are you sure want to delete it?')) {
                                                    deleteRemark('<?php echo base64_encode($getAllCustomerRemark['RemarkSysId']); ?>', '<?php echo base64_encode($this->customerId); ?>');
                                                }" class="view_text1 tooltipLink" data-placement="top" title="Delete"><i class="fa fa-minus-circle"></i></a>
                        </td>
                    </tr>
                    <?php
                    $s++;
                }
            else:
                ?>
                <tr>
                    <td align="center" class="text-danger" colspan="5"><strong>No record found</strong></td>
                </tr>
            <?php endif; ?>
        </tbody>
    </table>
    <?php
} if ($vars['type'] == 'getExistingFollowup') {
    $ToDoCount = $vars['ToDoCount'];
    $CallCount = $vars['CallCount'];
    $MeetingCount = $vars['MeetingCount'];
    $FollowupsArray = $vars['FollowupsArray'];
    ?>
    <style>
        .txtoverdue{
            color:red;
        }
        .txtpending{
            color:#0076CA;
        }
        .txtgreen{
            color: green;
        }
    </style>
    <input type="hidden" name="existingFollowupHidden" id="existingFollowupHidden" value="1">
    <table class="table tablestyle">
        <tbody>
        <!-- <tr class="alert alert-graylight">
                <th class="small smallbold" colspan="1">Total Call</th>
                <th class="small smallbold" colspan="2">Total Meeting</th>
                <th class="small smallbold" colspan="1">Total ToDo</th>
            </tr> -->
            <!-- <tr class="">
            <td colspan="1"><?php echo $CallCount['TotalTodo']; ?></td>
            <td colspan="2"><?php echo $MeetingCount['TotalTodo']; ?></td>
            <td colspan="1"><?php echo $ToDoCount['TotalTodo']; ?></td>
            </tr> -->
        <div class="clear"></div>
        <tr class="alert alert-graylight">
            <th class="small smallbold">Action</th>
            <th class="small smallbold">Description</th>
            <th class="small smallbold">Start Date/End Date</th>
            <th class="small smallbold">Status</th>
        </tr>
        <?php
        if (!empty($FollowupsArray)):
            foreach ($FollowupsArray as $followup) {
                $cureentDate_Str = strtotime(date('d-m-Y H:i:s'));
                $startdate_Str = strtotime($followup['StartDateTime']->format('d-m-Y H:i:s'));
                ?>
                <tr>
                    <td><?php if ($followup['IsCompleted'] == 0) { ?><a href="<?php echo $this->baseUrl('/customer/customer-view-to-do/tid/' . base64_encode($followup['ToDoSysId']) . '/cid/' . base64_encode($followup['CustSysId'])); ?>" title="Update To do" data-target="#myModalviewToDoDetail" data-toggle="modal" data-dismiss="modal" class="tooltipLink"><?php echo $followup['Subject']; ?></a></td> <?php
                    } else {
                        if ($followup['CallType'] != Null && $followup['CallType'] != 0) {
                            $callType = ($followup['CallType'] == 1) ? ' (Outgoing' : '(Incoming';
                            $callStatus = $callStatus = ($followup['CallStatus'] == 1) ? ', Answered)' : (($followup['CallStatus'] == 2) ? ', Unanswered)' : ', Not Reachable)');
                            echo $followup['Subject'] . $callType . $callStatus;
                        } else {
                            echo $followup['Subject'];
                        }
                    }
                    ?></td>
                    <td><p class="more"><?php echo $followup['Description'] ? stripslashes($followup['Description']) : 'NA'; ?></p></td>
                    <td><?php echo $followup['StartDateTime']->format('d/m/Y H:i:s') . " /<br/> " . $followup['EndDateTime']->format('d/m/Y H:i:s'); ?></td>
                    <td><?php
                        if ($followup['IsCompleted'] == 1) {
                            echo '<span class="txtgreen">Completed</span>';
                        } else {
                            if ($cureentDate_Str > $startdate_Str) {
                                ?>
                                <a href="<?php echo $this->baseUrl('/customer/customer-view-to-do/tid/' . base64_encode($followup['ToDoSysId']) . '/cid/' . base64_encode($followup['CustSysId'])); ?>" title="Update To do" data-target="#myModalviewToDoDetail" data-toggle="modal" data-dismiss="modal" class="tooltipLink"><span class="txtoverdue">Overdue</span></a> 
                            <?php } else { ?>
                                <a href="<?php echo $this->baseUrl('/customer/customer-view-to-do/tid/' . base64_encode($followup['ToDoSysId']) . '/cid/' . base64_encode($followup['CustSysId'])); ?>" title="Update To do" data-target="#myModalviewToDoDetail" data-toggle="modal" data-dismiss="modal" class="tooltipLink"><span class="txtpending">In-complete</span></a> <?php
                            }
                        }
                        ?></td>
                </tr> <?php
            }
        else:
            ?>
            <tr>
                <td align="center" class="text-danger" colspan="5"><strong>No record found</strong></td>
            </tr>
        <?php endif; ?>
    </tbody>
    </table>
    <script type="text/javascript">
        function trimcontent(showChar, moreclassname)
        {
            var moretext = "+More";
            var lesstext = "-Less";

            $('.' + moreclassname).each(function () {
                var content = $(this).html();
                if (content.length > showChar) {
                    var c = content.substr(0, showChar);
                    var h = content.substr(showChar, content.length - showChar);

                    var html = '<span class="more-defaultcontent" >' + c + '</span><span class="more-content">' + h + '</span>\n\
                        <a href="javascript:void();" class="more-link btn-link btnmore">' + moretext + '</a>';
                    $(this).html(html);
                }
            });

            $(".more-link").click(function () {
                if ($(this).hasClass("less")) {
                    $(this).removeClass("less").html(moretext);
                } else {
                    $(this).addClass("less").html(lesstext);
                }
                $(this).prev().toggle();
                return false;
            });
            $('span.more-content').hide();
            $('.defaultcontent , .more-content').css({'font-size': '12px', 'text-transform': 'none', 'font-weight': 'normal'});
        }

        trimcontent(20, 'more');

    </script>
    <?php
}
if ($vars['type'] == 'getCustomerRecentQuery') {
    $data = $vars['data'];
    $customhelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
    $travelPlanStatusName = $customhelper->GetTravelPlanStatusArray(1, '');
    ?>				
    <table class="table tablestyle">
        <tbody>
            <tr class="alert alert-graylight">
                <th class="small smallbold">Date</th>
                <th class="small smallbold">Destination</th>
                <th class="small smallbold">Plan Type</th>
                <th class="small smallbold">Status</th>
            </tr>	
            <?php
            if (!empty($data)) {
                $customHelper = Zend_Controller_Action_HelperBroker::getStaticHelper('Custom');
                $travelPlanStatusName = $customHelper->GetTravelPlanStatusArray(1, '');

                $l = 1;
                foreach ($data as $leadlist) {
                    $paxTOtalArr = isset($leadlist['RoomInfoJson']) && $leadlist['RoomInfoJson'] != "" ? json_decode($leadlist['RoomInfoJson']) : '';
                    // echo "<pre>";print_r($paxTOtalArr);die;
                    $adultPax = 0;
                    $childPax = 0;
                    $infantPax = 0;
                    $returndate = '';
                    $departuredate = '';
                    if (is_object($paxTOtalArr)) {
                        foreach ($paxTOtalArr as $PaxTotal) {
                            $departuredate = (trim($PaxTotal->departuredate) != '') ? DateTime::createFromFormat('d/m/Y', @$PaxTotal->departuredate) : '';
                            $returndate = (trim($PaxTotal->returndate) != '') ? DateTime::createFromFormat('d/m/Y', @$PaxTotal->returndate) : '';
                            $adultPax += isset($PaxTotal->Adult) ? (int) $PaxTotal->Adult : 0;
                            $childPax += isset($PaxTotal->Child) ? (int) $PaxTotal->Child : 0;
                            $infantPax += isset($PaxTotal->Infant) ? (int) $PaxTotal->Infant : 0;
                            $departuredate = (isset($departuredate) && is_object($departuredate)) ? $departuredate->format('d-M-y') : '';
                            $returndate = (isset($returndate) && is_object($returndate)) ? $returndate->format('d-M-y') : '';
                        }
                    }
                    $ValidTillDate = ($leadlist['ValidTill']->format('Y') != '1900') ? " - " . $leadlist['ValidTill']->format('d-M-y') : '';
                    ?>
                    <tr> 
                        <td><?php
                            if (trim($departuredate) == '') {
                                echo ($leadlist['StartDate']->format('d/m/Y') != '01/01/1900') ? $leadlist['StartDate']->format('d-M-y') . $ValidTillDate : 'NA';
                            } else {
                                echo $departuredate;
                                echo trim($returndate) ? " - " . $returndate : '';
                            }
                            ?></td>
                        <td><?php echo (isset($leadlist['DestinationPlaces']) && !empty(trim($leadlist['DestinationPlaces']))) ? trim($leadlist['DestinationPlaces']) : trim($leadlist['Cities']); ?></td>
                        <td><?php echo $customHelper->getPlanTypeName($leadlist['PlanType']); //echo $leadlist['Rating'];     ?></td>
                        <?php if ($leadlist['IsActive'] == "1") { ?>
                            <td><?php echo $travelPlanStatusName[$leadlist['StatusType']]['TPStatus']; ?></td>
                        <?php } else { ?>
                            <td>Draft Stage</td>
                        <?php } ?>
                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr>
                    <td align="center" class="text-danger" colspan="4"><strong>No record found</strong></td>
                </tr>
            <?php } ?>
        </tbody>
    </table>
    <?php
}
if ($vars['type'] == 'getCustomerAllToDo') {
    $data = $vars['data'];
    ?>				
    <table class="table tablestyle">
        <thead>
            <tr class="alert alert-graylight">
                <th class="small smallbold" style="width:5%;"><?php if (!empty($data)) { ?>
                        <button class="btn btn-sm btn-danger tooltipLink" id="markasdoneButton" onclick="return markToDoAsDone();"  data-placement="top" title="Mark as Done">Update</button>
                        <?php
                    } else {
                        echo "#";
                    }
                    ?></th> 

                <th class="small smallbold">Subject(Details)</th>
                <th class="small smallbold" style="width:25%;">Due Date</th>
            </tr>
        </thead>
        <tbody class="todobody">
            <?php
            if (!empty($data)) {
                $s = 1;
                foreach ($data as $getAllCustomerTODO) {
                    ?>
                    <tr class="markasdonerows_<?php echo $getAllCustomerTODO['ToDoSysId']; ?>">
                        <td>

                            <label class="checkbox_popup">
                                <input class="markasdoneCheckbox" name="marktodo[]" id="marktodo<?php echo $s; ?>" type="checkbox" value="<?php echo $getAllCustomerTODO['ToDoSysId']; ?>" />
                                <span class="checkmark todo_checkbox_align"></span>
                            </label>
                        </td>
                        <td>
                            <a class="tooltipLink" href="<?php echo $this->baseUrl('/customer/customer-view-to-do/tid/' . base64_encode($getAllCustomerTODO['ToDoSysId']) . '/cid/' . base64_encode($getAllCustomerTODO['CustSysId'])); ?>" title="view details" data-target="#myModalupdateToDoCustomer" data-toggle="modal" data-dismiss="modal"><label  style="cursor:pointer;"><?php echo $getAllCustomerTODO['Subject'] ?></label></a>    
                            <?php echo (trim(stripslashes($getAllCustomerTODO['Description'])) != '') ? ' (' . stripslashes($getAllCustomerTODO['Description']) . ' )' : ''; ?></td>
                        <td><?php echo $getAllCustomerTODO['StartDateTime']->format('d-M-y H:i:s'); //$getAllCustomerTODO['EndDateTime']->format('d/m/Y');    ?></td>
                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr><td colspan="3" align="center" class="text-danger"><strong>No Record found</strong></td></tr>
            <?php } ?>
        </tbody>
    </table>
    <?php
}
if ($vars['type'] == 'getVisaApplicantDetail') {
    ?>
    <style>
        .redtxt {
            color:red;
        }
        .visainput{
            display:block;
            width:100%;
            height:34px;
            padding:6px 12px;
            font-size:14px;
            line-height:1.42857143;
            color:#444;
            background-color:#fff;
            background-image:none;
            border:1px solid #ccc;
            border-radius:4px;
            -webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
            box-shadow:inset 0 1px 1px rgba(0, 0, 0, .075);
            -webkit-transition:border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s;
            -o-transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s;
            transition:border-color ease-in-out .15s, box-shadow ease-in-out .15s
        }

        .visainput:focus{
            border:1px solid #0069ff;
            outline: none;
        }
    </style>
    <?php
    $getVisaPaxType = Zend_Controller_Action_HelperBroker::getStaticHelper('General')->getVisaPaxType();
    $ARR_CUSTOMER_RELATION = unserialize(ARR_CUSTOMER_RELATION);
    
    
    $getData = $vars['getData'];
    $rowsCount = isset($getData['rowsCount']) ? (int)$getData['rowsCount'] : 0;
    $visa_adult = isset($getData['visa_adult']) ? (int)$getData['visa_adult'] : 0;
    $visa_child = isset($getData['visa_child']) ? (int)$getData['visa_child'] : 0;
    $visa_child_withfamily = isset($getData['visa_child_withfamily']) ? (int)$getData['visa_child_withfamily'] : 0;
    $visa_infant = isset($getData['visa_infant']) ? $getData['visa_infant'] : 0;
    $IsB2bAgent = $getData['IsB2bAgent'];
    //echo "<pre>";print_r($getData);
    $o = 0;
    for ($i = 1; $i <= $rowsCount; $i++) {
        $relation = isset($getData['visaRelationArray'][$o]) ? $getData['visaRelationArray'][$o] : 9;
        $firstname = isset($getData['visaFirstNameArray'][$o]) ? $getData['visaFirstNameArray'][$o] : 'Pax ' . $i;
        $lastname = isset($getData['visaLastNameArray'][$o]) ? $getData['visaLastNameArray'][$o] : '';
        $paxType = 0;
        //echo $visa_adult.'-'.$visa_child.'-'.$visa_child_withfamily.'-'.$visa_infant;
        if($visa_adult > 0){
            $paxType = 1;
            $visa_adult--;
        }else if($visa_child > 0){
            $paxType = 2;
            $visa_child--; 
        }else if($visa_child_withfamily > 0){
            $paxType = 4;
            $visa_child_withfamily--; 
        }else if($visa_infant > 0){
            $paxType = 3;
            $visa_infant--;
        }
        //$paxType = isset($getData['visaPaxTypeArray'][$o]) ? $getData['visaPaxTypeArray'][$o] : '';
        
         
        ?>				
        <div class="travelerIn travelerInVisa" id="Row_<?php echo $i; ?>">
            <div class="col-md-12 travellers_padding_0">
                <div class="row">
                    <div class="col-md-2 no-padding-right mbl_trav_left_pd">
                        <div class="pull-left traveller_text_align">Traveller <span class="removeCount" id="removeCount_<?php echo $i; ?>"><?php echo $i; ?></span><span class="redtxt">*</span></div>
                    </div>

                    <div class="col-md-2 no-padding-left" style="display:none1;">
                        <select class="form-control no-padding vis_selct_mgt" name="relation[]">
                            <option value="">Select Relation</option>
                            <?php
                            if (empty($relation)) {
                                $relation = ($i == 1) ? 0 : '';
                            }
                            foreach ($ARR_CUSTOMER_RELATION as $rkey => $rvalue) {
                                if ($rkey == 0 && $i > 1) {
                                    continue;
                                }
                                ?>

                                <option value="<?php echo $rkey; ?>" <?php echo ($relation == $rkey) ? 'selected' : ''; ?>><?php echo $rvalue; ?></option>
                            <?php } ?>
                        </select>
                    </div>


                    <div class="col-md-3 no-padding-left">
                        <input class="visainput" placeholder="First Name" type="text" name="visa_firstname[]" value="<?php echo trim(stripslashes($firstname)); ?>" id="visa_firstname"/>
                    </div>
                    <div class="col-md-3 no-padding-left">
                        <input class="visainput" placeholder="Last Name" type="text" name="visa_lastname[]" value="<?php echo trim(stripslashes($lastname)); ?>" id="visa_lastname"/>
                    </div>
                    <div class="col-md-2 no-padding-left">
                        <select id="pax_type" name="visa_pax_type[]" class="visainput no-padding" placeholder="Select">
                            <?php
                            foreach ($getVisaPaxType as $paxKey => $paxVal) {
                                if(isset($paxType) && ($paxType == $paxKey)){
                                    echo "<option value='$paxKey' $selected >$paxVal</option>";
                                }
                            }
                            ?>
                        </select>
                        <?php if ($i > 1) { ?>
                        <a style="display:none;" class="closepax_1" href="javascript:void(0);" onclick="removeRow('Row_',<?php echo $i; ?>)">X</a>
                        <?php } ?>
                        <div class="clear"></div>
                    </div>
                </div>
            </div>
            <div class="clear"></div>
        </div>
        <?php
         
        $o++;
    }
    ?>
    <input type="hidden" name="rowsCount" class="rowsCount" value="<?php echo $rowsCount; ?>" />
    <?php
}
if ($vars['type'] == 'getCustomerTravelHistoryWantToGo') {
    $data = $vars['data'];
    ?>				
    <table class="table tablestyle">
        <tbody>
            <tr class="alert alert-graylight">
    <!--        <th><strong>Country</strong></th>-->
                <th class="small smallbold" width="90%">Destination</th>
                <th class="small smallbold" width="10%">Action</th>
            </tr>
            <?php
            if (!empty($data)) {
                foreach ($data as $key => $value) {
                    ?>	 
                    <tr  class="hiderow_<?php echo $value['HaveBeenToSysId']; ?>"> 

                        <td><?php echo (isset($value['CityName']) && !empty(trim($value['CityName']))) ? trim($value['CityName']) : ''; ?><?php echo (isset($value['CountryName']) && !empty(trim($value['CountryName']))) ? ' (' . trim($value['CountryName']) . ')' : ''; ?></td>
                        <td class="small">
                            <a href="" onclick="if (confirm('Are you sure want to delete it?')) {
                                                    deleteRecord('<?php echo base64_encode($value['HaveBeenToSysId']); ?>', '<?php echo base64_encode('PROFILEHISTORY'); ?>');
                                                }" class="view_text1 tooltipLink" data-placement="top" title="Delete"><i class="fa fa-minus-circle"></i></a>
                        </td>
                    </tr>
                    <?php
                }
            } else {
                ?>
                <tr><td colspan="3" class="text-danger" align="center"><strong>No record found</strong></td></tr>
                <?php
            }
            //echo $numberOdChildrens;
            ?>
        </tbody>
    </table>
    <?php
}
if ($vars['type'] == 'customerAllTodoReminderListAction') {
    $todoreminderDetail = $vars['todoreminderDetail'];
    //print_r($todoreminderDetail);
    ?>
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 class="modal-title" id="myModalLabel">To-Do/Follow-Up Reminder List</h4>
        </div>

        <div class="modal-body">
            <?php
            if ($todoreminderDetail > 0) {
                foreach ($todoreminderDetail as $result) {
                    ?>
                    <div class="col-md-12 alert-success">
                        <label>
                            <strong style="font-weight:600 !important;">
                                <a href="<?php echo $this->baseUrl('/customer/customer-todo/id/' . base64_encode($result['CustSysId'])); ?>">
                                    <span class="label label-white">
                                        <i class="fa fa-inbox red"></i>
                                    </span>
                                    You have recieved to-do reminder(<?php echo stripslashes($result['Subject']); ?>)
                                    <?php echo $result['StartDateTime'] . @$result['EndDateTime']; ?>
                                    <span class="date">=>Remaining Time<?php echo $result['ToDoReminderNotificationTime']; ?></span>
                                </a>
                            </strong>
                        </label>  
                    </div>
                    <div class="clear"></div>
                    <div class="col-md-12" style="border-bottom:1px solid #e5e5e5; padding:10px 0;">

                    </div>
                    <div class="clear"></div>
                    <?php
                }
            } else {
                ?>
                <div class="col-md-12">
                    <span class="alert-danger"><label>No Record Found</label></span>
                </div>
            <?php } ?>
            <div class="clear"></div></div>
        <div class="modal-footer">
            <button type="button" class="btn btn-primarygray btn-sm pull-left" data-dismiss="modal">Cancel</button>
        </div>
    </div>
    <?php
}

if ($vars['type'] == 'CustomerToDoDescription') {
    $data = $vars['data'];
    ?>
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h4 class="modal-title" id="myModalLabel">Details</h4>
        </div>
        <div class="modal-body">
            <div class="col-md-12">
                <p><?php echo $data['Description']; ?></p>
            </div>
            <div class="clear"></div>
        </div>
    <?php } ?>


Youez - 2016 - github.com/yon3zu
LinuXploit