function editAccountInfo() { $userdataobj = getAccountUserDataObject(true); if (!$this->phpvalidator->is_email($this->input->post('email'))) { echo json_encode(array('result' => 'ERROR', 'message' => 'Email is not valid format')); exit; } if (!checkRealEmail($this->input->post('email'))) { echo json_encode(array('result' => 'ERROR', 'message' => 'Email is not real')); exit; } $usercheckobj = $this->user_io_m->init('email', $this->input->post('email')); if ($usercheckobj and $userdataobj->id_user != $usercheckobj->id_user) { echo json_encode(array('result' => 'ERROR', 'message' => 'Email is used by other account.')); exit; } $new_email = $this->input->post('email'); $country_id = $this->input->post('country_id', 0); $state_id = $this->input->post('state_id', 0); $city_id = $this->input->post('city_id', 0); if ($country_id > 0) { $update['id_country'] = $country_id; $update['country'] = getValueOfArray(countryOptionData_ioc($country_id)); if ($state_id > 0) { $update['id_state'] = $state_id; $update['state'] = getValueOfArray(stateOptionData_ioc($country_id, $state_id)); if ($city_id > 0) { $update['id_city'] = $city_id; $update['city'] = getValueOfArray(cityOptionData_ioc($country_id, $state_id, $city_id)); $geo = $this->geo_lib->getCoordinatesFromAddress($update['city']); $update['longitude'] = $geo['longitude']; $update['latitude'] = $geo['latitude']; } else { $update['id_city'] = 0; $update['city'] = null; $geo = $this->geo_lib->getCoordinatesFromAddress($update['state']); $update['longitude'] = $geo['longitude']; $update['latitude'] = $geo['latitude']; } } else { $update['id_state'] = 0; $update['state'] = null; $update['id_city'] = 0; $update['city'] = null; $geo = $this->geo_lib->getCoordinatesFromAddress($update['country']); $update['longitude'] = $geo['longitude']; $update['latitude'] = $geo['latitude']; } } /* else{ $update['id_country'] = 0; $update['country'] = null; $update['id_state'] = 0; $update['state'] = null; $update['id_city'] = 0; $update['city'] = null; $update['longitude'] = null; $update['latitude'] = null; }*/ $update['first_name'] = $this->input->post('first_name'); $update['last_name'] = $this->input->post('last_name'); //$update['email'] = $this->input->post('email'); $update['cell_no'] = $this->input->post('cell_no'); $update['address'] = $this->input->post('address'); $update['postal_code'] = $this->input->post('postal_code'); $update['timezone'] = $this->input->post('timezone'); $update['dob'] = dbDay($this->input->post('birthday')); $this->user_io_m->update_map($update, $userdataobj->id_user); if ($new_email != $userdataobj->email) { $checkemail = "<br/>You have changed email account, please go to your email inbox and click on the link to active new email."; $this->email_sender->juzonSendEmail_JUZ_ACCOUNT_CHANGED_EMAIL($userdataobj->id_user, $new_email); } else { $checkemail = ''; } echo json_encode(array('result' => 'ok', 'message' => 'Update successfully.' . $checkemail)); exit; }
<?php } else { ?> <div class="filter-split"> <strong>Show:</strong> <?php echo form_dropdown($name = 'gender', genderOptionData_ioc(), array($userdataobj->chat_gender), $extra = " id='gender' size='1' onchange='callFuncChangeFilter(this.value,\"gender\");' "); ?> <strong>Age from:</strong> <?php echo form_dropdown($name = 'age_from', ageOptionData_ioc(), array($userdataobj->chat_age_from), $extra = " id='age_from' size='1' onchange='callFuncChangeFilter(this.value,\"age_from\");'"); ?> <strong>To:</strong> <?php echo form_dropdown($name = 'age_to', ageOptionData_ioc(), array($userdataobj->chat_age_to), $extra = " id='age_to' size='1' onchange='callFuncChangeFilter(this.value,\"age_to\");'"); ?> <strong>Location:</strong> <?php echo form_dropdown($name = 'country_id', countryOptionData_ioc(), array($userdataobj->id_country), $extra = " id='country_id' size='1' onchange='callFuncChangeFilter(this.value,\"country\");'"); ?> <a class="button" href="javascript:void(0);" onclick="callFuncShowDialogChangeFilterWall();">Change</a> <?php echo loader_image_s("id=\"changeFilterContextLoader\" class='hidden'"); ?> </div> <?php }
<input class="account-profile" type="text" name="cell_no" value="<?php if ($userdataobj->cell_no != 0) { echo $userdataobj->cell_no; } ?> " maxlength="15" /> </div> <div class="clear"></div> <label><?php echo language_translate('contact_info_label_country'); ?> </label> <div class="inputcls"> <?php echo form_dropdown($name = 'country_id', countryOptionData_ioc(), array($userdataobj->id_country), $extra = " id='country_id' class='account-profile' "); ?> <?php echo loader_image_s("id='country_loader' class='hidden'"); ?> </div> <div class="clear"></div> <label><?php echo language_translate('contact_info_label_state'); ?> </label> <div class="inputcls"> <?php echo form_dropdown($name = 'state_id', stateOptionData_ioc($country_id = $userdataobj->id_country), array($userdataobj->id_state), $extra = " id='state_id' class='account-profile' "); ?>
<div class="row-item"> <label>Email</label> <div class="input"> <input type="text" name="email" value="<?php echo $email; ?> " /> </div> </div> <div class="row-item"> <label>Country</label> <div class="input"> <?php echo form_dropdown('country', countryOptionData_ioc(), array($country)); ?> </div> </div> <div class="row-item"> <label>Age</label> <div class="input"> From <?php echo form_dropdown('age_from', ageOptionData_ioc(), array($age_from)); ?> To <?php
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } ?> <div class="filter-split"> <strong>Show:</strong> <?php echo form_dropdown($name = 'gender', genderOptionData_ioc(), array($userdataobj->chat_gender), $extra = " id='gender' size='1' "); ?> <strong>Age from:</strong> <?php echo form_dropdown($name = 'age_from', ageOptionData_ioc(), array($userdataobj->chat_age_from), $extra = " id='age_from' size='1' "); ?> <strong>To:</strong> <?php echo form_dropdown($name = 'age_to', ageOptionData_ioc(), array($userdataobj->chat_age_to), $extra = " id='age_to' size='1' "); ?> <strong>Location:</strong> <?php echo form_dropdown($name = 'country_id', countryOptionData_ioc(), array($userdataobj->id_country), $extra = " id='country_id' size='1' "); ?> <a class="button" href="javascript:void(0);" onclick="callFuncShowDialogChangeFilterWall_MYPROFILE();">Change</a> </div>
<div class="row-item"> <label>To users</label> <div class="input"> <textarea style="width:250px;height:100px;" name="to_users" id="to_users"><?php echo isset($_SESSION['var_store']['to_users']) ? $_SESSION['var_store']['to_users'] : ''; ?> </textarea> (optional) </div> </div> <div class="row-item"> <label>Users Country</label> <div class="input"> <?php echo form_multiselect("countries[]", countryOptionData_ioc(), isset($_SESSION['var_store']['countries']) ? array_values($_SESSION['var_store']['countries']) : array()); ?> (optional) </div> </div> <div class="row-item"> <label>Age</label> <div class="input"> From <?php echo form_dropdown("age_from", ageOptionData_ioc(), array(isset($_SESSION['var_store']['age_from']) ? $_SESSION['var_store']['age_from'] : 18)); ?> To <?php echo form_dropdown("age_to", ageOptionData_ioc(), array(isset($_SESSION['var_store']['age_to']) ? $_SESSION['var_store']['age_to'] : 45)); ?> </div>
function quickEditUserFilter($data) { if ($data['country']) { $array['id_country'] = $data['country']; $array['country'] = getValueOfArray(countryOptionData_ioc($data['country'])); $geo = $this->geo_lib->getCoordinatesFromAddress($array['country']); $array['id_state'] = 0; $array['state'] = NULL; $array['id_city'] = 0; $array['city'] = NULL; $array['longitude'] = $geo['longitude']; $array['latitude'] = $geo['latitude']; $array['address'] = NULL; $array['postal_code'] = NULL; } if ($data['gender']) { $array['chat_gender'] = $data['gender']; } if ($data['age_from']) { $array['chat_age_from'] = intval($data['age_from']); } if ($data['age_to']) { $array['chat_age_to'] = intval($data['age_to']); } if (!isset($array['longitude']) or !isset($array['latitude']) or !$array['longitude'] or !$array['latitude']) { $infoArray = $this->geo_lib->getLocationInfoFromIP(); $array['longitude'] = $infoArray['longitude']; $array['latitude'] = $infoArray['latitude']; } if ($id = getAccountUserId()) { $this->user_io_m->update_map($array, $id); } return; }
function countrySearchPetOptionData_ioc() { $arr['0'] = 'Don\'t Care'; foreach (countryOptionData_ioc() as $k => $v) { $arr[$v] = $v; } return $arr; }