Commit 192f4333 by Tobin

mobile api changes

parent 5db25219
...@@ -3,33 +3,109 @@ ...@@ -3,33 +3,109 @@
class Validation_app_model extends CI_Model { class Validation_app_model extends CI_Model {
public $validation_array = array( public $validation_array = array(
'login'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'login'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')),
), 'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),)),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),
)
),
'check_email_availability'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'check_email_availability'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
), ),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'), 'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'),
'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no') 'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no')
), ),
), ),
'registration'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'), 'registration'=> array('email'=>array('required'=>array('code'=>'ER02', 'message'=>'Email id is null or empty'),
'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id') 'email'=>array('code'=>'ER03', 'message'=>'Invalid Email id')
), ),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'), 'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone no is null or empty'),
'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no'), 'phone'=>array('code'=>'ER08', 'message'=>'Invalid Phone no'),
), ),
'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'), 'password'=>array('required'=>array('code'=>'ER04', 'message'=>'Password is null or empty'),
)
),
'get_events_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'filters'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'events_details'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
) )
), ),
'get_places_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'), 'get_category_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
) )
), ),
'place_details'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
'get_last_booking'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
) )
), ),
'add_favorites'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER16', 'message'=>'Event id is null or empty')),
'is_favorite'=>array('required'=>array('code'=>'ER21', 'message'=>'Is favorate is null or empty')),),
'get_cities_list'=>array('auth_token'=>array('required'=>array('code'=>'ER19', 'message'=>'User Id is null or empty'),
)
),
'update_city'=>array('auth_token'=>array('required'=>array('code'=>'ER19', 'message'=>'User Id is null or empty'),
)
),
'booking_summary'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'payment'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'booking_id'=>array('required'=>array('code'=>'ER34', 'message'=>'Booking id is null or empty'))),
'event_rating'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'rating'=>array('required'=>array('code'=>'ER26', 'message'=>'Rating is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER27', 'message'=>'Event id is null or empty')),
'description'=>array('required'=>array('code'=>'ER28', 'message'=>'description id is null or empty')),),
'update_notification_email_status'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'notification_status'=>array('required'=>array('code'=>'ER24', 'message'=>'Notification Status is null or empty')),
'email_status'=>array('required'=>array('code'=>'ER25', 'message'=>'Email status id is null or empty')),),
'profile_details'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),)),
'profile_edit'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),),
'booking'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'event_id'=>array('required'=>array('code'=>'ER20', 'message'=>'Event id is null or empty')),
'customer_id'=>array('required'=>array('code'=>'ER29', 'message'=>'Customer id is null or empty')),
'event_date_id'=>array('required'=>array('code'=>'ER30', 'message'=>'Event date id is null or empty')),
'no_of_ticket'=>array('required'=>array('code'=>'ER31', 'message'=>'Number of ticket is null or empty')),
'ticket_details'=>array('required'=>array('code'=>'ER32', 'message'=>'Ticket details is null or empty')),
'amount'=>array('required'=>array('code'=>'ER33', 'message'=>'Amount is null or empty')),),
'cancel_booking'=> array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty')),
'booking_id'=>array('required'=>array('code'=>'ER34', 'message'=>'Booking Id is null or empty')),),
'get_favorites_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'get_booking_list'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'settings'=>array('auth_token'=>array('required'=>array('code'=>'ER17', 'message'=>'User Id is null or empty'),
)
),
'forgot_password'=> array('new_password'=>array('required'=>array('code'=>'ER35', 'message'=>'New password is null or empty')),
'phone'=>array('required'=>array('code'=>'ER07', 'message'=>'Phone is null or empty')),),
); );
public function validation_check($method_name, $parms) { public function validation_check($method_name, $parms) {
...@@ -54,10 +130,10 @@ class Validation_app_model extends CI_Model { ...@@ -54,10 +130,10 @@ class Validation_app_model extends CI_Model {
case 'phone': case 'phone':
if(isset($parms[$key])){ if(isset($parms[$key])){
$phone = preg_replace('/[^0-9]/', '', $parms[$key]); $phone = preg_replace('/[^0-9]/', '', $parms[$key]);
if (strlen($phone) !== 10) { /*if (strlen($phone) !== 10) {
$state = 1; $state = 1;
$error_key = $values; $error_key = $values;
} } */
} }
break; break;
...@@ -77,4 +153,5 @@ class Validation_app_model extends CI_Model { ...@@ -77,4 +153,5 @@ class Validation_app_model extends CI_Model {
} }
return array('state'=>$state,'response'=>$error_key); return array('state'=>$state,'response'=>$error_key);
} }
} }
\ No newline at end of file ?>
\ No newline at end of file
...@@ -29,42 +29,42 @@ ...@@ -29,42 +29,42 @@
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>FAQ English</label> <label>FAQ (English)</label>
<textarea id="rich_editor" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ English" name="faq_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_en ?></textarea> <textarea id="rich_editor" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ English" name="faq_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_en ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>FAQ Arabic</label> <label>FAQ (Arabic)</label>
<textarea id="rich_editor_3" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ Arabic" name="faq_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_ar ?></textarea> <textarea id="rich_editor_3" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="FAQ Arabic" name="faq_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->faq_ar ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Privacy Policy English</label> <label>Privacy Policy (English)</label>
<textarea id="rich_editor_1" type="text" placeholder="Privacy Policy English" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_en" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_en ?></textarea> <textarea id="rich_editor_1" type="text" placeholder="Privacy Policy English" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_en" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_en ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Privacy Policy Arabic</label> <label>Privacy Policy (Arabic)</label>
<textarea id="rich_editor_4" type="text" placeholder="Privacy Policy Arabic" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_ar" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_ar ?></textarea> <textarea id="rich_editor_4" type="text" placeholder="Privacy Policy Arabic" class="ip_reg_form_input form-control reset-form-custom" name="privacy_policy_ar" style="height:108px;" data-parsley-minlength="2" data-parsley-trigger="change"><?= $cmsData->privacy_policy_ar ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Terms and Condition English</label> <label>Terms and Condition (English)</label>
<textarea id="rich_editor_2" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition English" name="terms_and_conditions_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_en ?></textarea> <textarea id="rich_editor_2" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition English" name="terms_and_conditions_en" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_en ?></textarea>
</div> </div>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6">
<div class="form-group"> <div class="form-group">
<label>Terms and Condition Arabic</label> <label>Terms and Condition (Arabic)</label>
<textarea id="rich_editor_5" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition Arabic" name="terms_and_conditions_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_ar ?></textarea> <textarea id="rich_editor_5" type="text" class="ip_reg_form_input form-control reset-form-custom" placeholder="Terms and Condition Arabic" name="terms_and_conditions_ar" style="height:108px;" data-parsley-trigger="change" data-parsley-minlength="2"><?= $cmsData->terms_and_conditions_ar ?></textarea>
</div> </div>
</div> </div>
......
...@@ -25,12 +25,20 @@ ...@@ -25,12 +25,20 @@
<script> <script>
jQuery('.clockpicker').clockpicker(); jQuery('.clockpicker').clockpicker();
jQuery( document ).ready(function() { jQuery( document ).ready(function() {
if(jQuery('#rich_editor').length == 1) { CKEDITOR.replace('rich_editor'); } if(jQuery('#rich_editor').length==1){ CKEDITOR.replace('rich_editor'); }
if(jQuery('#rich_editor_1').length == 1) { CKEDITOR.replace('rich_editor_1'); } if(jQuery('#rich_editor_1').length==1){CKEDITOR.replace('rich_editor_1'); }
if(jQuery('#rich_editor_2').length == 1) { CKEDITOR.replace('rich_editor_2'); } if(jQuery('#rich_editor_2').length==1){CKEDITOR.replace('rich_editor_2'); }
if(jQuery('#rich_editor_3').length == 1) { CKEDITOR.replace('rich_editor_3'); }
if(jQuery('#rich_editor_4').length == 1) { CKEDITOR.replace('rich_editor_4'); } if(jQuery('#rich_editor_3').length==1){CKEDITOR.replace('rich_editor_3',{language:'ar'});}
if(jQuery('#rich_editor_5').length == 1) { CKEDITOR.replace('rich_editor_5'); } if(jQuery('#rich_editor_4').length==1){CKEDITOR.replace('rich_editor_4',{language:'ar'});}
if(jQuery('#rich_editor_5').length==1){CKEDITOR.replace('rich_editor_5',{language:'ar'});}
});
CKEDITOR.replace('editor2', {
extraPlugins: 'language',
// Customizing list of languages available in the Language drop-down.
language_list: ['ar:Arabic:rtl', 'fr:French', 'he:Hebrew:rtl', 'es:Spanish'],
height: 270
}); });
function doconfirm(){ function doconfirm(){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment