Sedang Disiapkan

PHP CodeIgniter Work

I want to have someone assist me in changing/amending some PHP codes which got my head cracking, it is pretty simple for advanced PHP users, the code we will be looking at is as follows;

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

<?php if (!defined('BASEPATH')) exit('No direct script access allowed');

function calculate_price($quote, $school_id)

{

$_weeks = array(1,2,3,4,6,8,10,12,14,16,18,20,24,36);

$CI = &get_instance();

$CI->load->model('schools_model');

$school = $CI->schools_model->get($school_id);

$school = $school[0];

$prices = json_decode($school['course_prices'], true);

//prices for selected course

//$prices = $prices[$quote['course']];

//base price

$price = $prices[$quote['course']]['price'];

//airport transfer

if ($quote['airport_transfer']) {

if (isset($quote['airport']) && !empty($quote['airport']))

$airport_fees = $CI->schools_model->getAirportFees($school_id, $quote['airport']);

else

$airport_fees = $CI->schools_model->getAirportFees($school_id);

foreach($airport_fees AS $val)

$price += (int)$val['fees'];

}

//add the price for course/week

foreach ($_weeks AS $val) {

if ((int)$val > (int)$quote['weeks']) break;

$price += (int)$prices[$quote['course']]["course_{$val}"];

}

//add the price for accommodation/week

foreach ($_weeks AS $val) {

if ((int)$val > (int)$quote['weeks']) break;

$price += (int)$prices[1]["acc_{$quote['accommodation']}"]["week_{$val}"];

}

//add the price for medical insurance/week

$medi_prices = json_decode($school['medical_fee'], true);

foreach ($_weeks AS $val) {

if ((int)$val > (int)$quote['weeks']) break;

$price += (int)$medi_prices["{$val}"];

}

//surcharges

if ( dateBetween($prices[$quote['course']]['surcharge_from_1'], $prices[$quote['course']]['surcharge_to_1'], $quote['start_date']) ) $price += (int)$prices[$quote['course']]['surcharge_1'] * $quote['weeks'];

if ( dateBetween($prices[$quote['course']]['surcharge_from_2'], $prices[$quote['course']]['surcharge_to_2'], $quote['start_date']) ) $price += (int)$prices[$quote['course']]['surcharge_2'] * $quote['weeks'];

if ( dateBetween($prices[$quote['course']]['surcharge_from_3'], $prices[$quote['course']]['surcharge_to_3'], $quote['start_date']) ) $price += (int)$prices[$quote['course']]['surcharge_3'] * $quote['weeks'];

return $prices[$quote['course']]['currency'] . $price;

}

function dateBetween( $startdate, $enddate, $checkDate )

{

if ( empty($startdate) || empty($enddate) ) return false;

$startdate = strtotime( $startdate );

$enddate = strtotime( $enddate );

$checkDate = strtotime( $checkDate );

if ( $checkDate >= $startdate && $checkDate <= $enddate )

return true;

else

return false;

}

?>

|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||

Currently the code calculates the $_weeks = array(1,2,3,4,6,8,10,12,14,16,18,20,24,36); as a SUM, what I want is to have the value entered in one of the fields to be selected, so primarily the scenario is not to add the values of 1 + 2 + 3, but to select either 1 or 2 or 3.

The whole work can be completed in less than 1 hour if the programmer knows PHP very well, I will show you exactly what the view looks like, and it will be great if you have a Team Viewer so that we can have a look together and a skype so that we can talk. I will award this project and start working immediately.

Kemahiran: Codeigniter, HTML, MySQL, PHP, Reka Bentuk Laman Web

Lihat lebih lanjut: quote codeigniter, work view, view work, select medical, school website price, price php programmer, php script school, php school script, php programmer prices, php codes website design, medical team, direct viewer, codeigniter 2, airport website design, php ci, val , team viewer, school work, php codes website, php codeigniter, php codeigniter website, medical insurance, load php, head model, codeigniter php

Tentang Majikan:
( 18 ulasan ) Ras Al Khaimah, United Arab Emirates

ID Projek: #1525319

Dianugerahkan kepada:

odmoriSe

Hi, check PM for more details

$40 USD dalam 0 hari
(39 Ulasan)
6.5

7 pekerja bebas membida secara purata $44 untuk pekerjaan ini

khush1984

Hi amteclinks, Lets talk about it and get it completed right away. thanks

$50 USD dalam 0 hari
(73 Ulasan)
6.9
webmagics

Please see PMB for details. Thanks

$60 USD dalam sehari
(40 Ulasan)
5.9
Tharawen

hello, please check PMB

$50 USD dalam 0 hari
(42 Ulasan)
5.1
SSYES

Hi Please refer the inbox for further details. Thank you.

$50 USD dalam 0 hari
(12 Ulasan)
4.8
muthumuni

...........#####... "KINDLY FOLLOW MY MASSAGE & FEEL REAL DIFFERENT HERE" ...##### ............

$30 USD dalam 0 hari
(7 Ulasan)
4.2
naveedramzan

Hi, please check my message

$30 USD dalam sehari
(1 Ulasan)
2.0