Upfront I am not a programmer. I have takend a simple course in php4 so I understand how it's used and the basics of it but I am not good at putting all the little ;'s in in the right places and that. I was hoping someone could give me a hand. I'll describe what I want and I'll write up some sudo code and maybe someone with a free 20 mins could help me format it right?
i need a script that acts as a calculator of sorts.
for instnace
I have customers whom when something goes wrong I have xx amount of hours to respond to their problem. so lets say i have 4 hours to respond to their problem.
i want a page that my reps can use where they select (drop down menu) a code. like "AB" which means the site in question is located in BC (3 hours behind local time here Ontario) and its a 4 hours response time. and code AC would be site locatec in BC with an 8 hour response time... etc...
they enter current time. Hit "calculate" and the result shows the time that they have to have a technician on site. both in the provinces/states local time as well as our local time.
only other variable is that the sites are only open from time x to time y. Meaning if the site has a problem at 8pm and they close at 9pm... that still leave 3 hours response time from 9 am when they open the next day....so the response time only counts during open hours
I have about 1000 sites that I can categorize into roughly 10 - 15 codes (AB AC AD etc)
here's my stabb at it.
$TimeZone (local time of site)
$SiteClose
$SiteOpen
$ResponseTime
$ResponseTimeZoneDifference
ResponseTime = GetRTZDifference
if (localtime+response time> store close)
"temp time" = store close - local time
response time = store open + (response time - temp time)
Else
newResponseTime = Localtime + Responsetime
nnrt =nrt+TZone Difference
i worke dthis out at a bar after some drinks.. does this seem like it would work for what i want here?
thx