עבר עריכה לאחרונה בתאריך 19.10.06 בשעה 20:31 על-ידי FireAngel (מנהל הפורום)
אבל משהו לא היה ברור.הקוד של MAIN.ASP נקראה כך:
<!-- #INCLUDE FILE="../funcs/top.asp" --> <!-- #INCLUDE FILE="session.asp" --> <!-- #INCLUDE FILE="header.asp" --> <% sql="SELECT t.id, t.xdate AS tdate, t.xtime AS ttime, r.xdate AS rdate, r.xtime AS rtime FROM requests t, responses r WHERE r.request=t.id ORDER BY r.xdate ASC, r.xtime ASC" sql1="SELECT COUNT(*)-1 AS totusers FROM users" sql2="SELECT COUNT(*)-1 AS totstaff FROM staff" sql3="SELECT status, COUNT(status) AS totstatus FROM requests GROUP BY status" sql4="SELECT origin, COUNT(origin) AS totorigin FROM requests GROUP BY origin"Set rs = cn.execute(sql) totmin=0 totreq=0 do while not rs.eof id=rs("id") if id<>pid then elapsedmin=datediff("n", rs("tdate") & " " & rs("ttime"), rs("rdate") & " " & rs("rtime")) pid=id totmin=totmin+elapsedmin totreq=totreq+1 end if rs.movenext loop rs.close response.write "<div align='center'><br><table width='500' border='0' cellpadding='0' cellspacing='0'><tr><td height='20' bgcolor='#999999' class='section'> " response.write lg_average_response_time response.write "</td></tr><tr><td height='30' align='center' bgcolor='#f2f2f2' class='title'>" if totreq=0 then avgmin=0 else avgmin=totmin/totreq end if response.write splittime(avgmin) response.write "</td></tr><tr><td align='center'> </td></tr><tr><td align='center' bgcolor='#f2f2f2'>" Set rs = cn.execute(sql1) Set rs1 = cn.execute(sql2) if rs.eof then totusers=0 else totusers=rs("totusers") end if if rs1.eof then totstaff=0 else totstaff=rs1("totstaff") end if response.write "<table width='100%' border='0' cellpadding='2' cellspacing='0'><tr><td colspan='3' bgcolor='#999999' class='section'> " response.write lg_accounts response.write "</td></tr><tr class='text'><td>" response.write lg_users response.write "</td><td width='50' align='right'>" response.write totusers response.write "</td><td width='50' align='right'>" if totusers>0 then response.write cint(totusers*100/(totusers+totstaff)) response.write "%" response.write "</td></tr><tr class='text'><td>" response.write lg_staff response.write "</td><td align='right'>" response.write totstaff response.write "</td><td align='right'>" if totstaff>0 then response.write cint(totstaff*100/(totusers+totstaff)) response.write "%" response.write "</td></tr><tr class='text'><td><b>" response.write lg_total response.write "</b></td><td align='right'><b>" response.write totusers+totstaff response.write "</b></td><td align='right'> </td></tr></table>" response.write "</td></tr><tr><td align='center'> </td></tr><tr><td align='center' bgcolor='#f2f2f2'>" rs.close rs1.close Set rs = cn.execute(sql3) Set rs1 = cn.execute(sql4) response.write "<table width='100%' border='0' cellpadding='2' cellspacing='0'><tr><td colspan='3' bgcolor='#999999' class='section'> " response.write ucase(lg_requests) statustot=0 do while not rs.eof statustot=statustot+rs("totstatus") rs.movenext loop if not rs.eof and not rs.bof then rs.movefirst do while not rs.eof response.write "</td></tr><tr class='text'><td>" select case rs("status") case "open" response.write lg_requeststatusopen case "closed" response.write lg_requeststatusclosed case "hold" response.write lg_requeststatushold end select response.write "</td><td align='right' width=50>" & rs("totstatus") response.write "</td><td align='right' width=50>" & cint(rs("totstatus")*100/(statustot)) & "%" rs.movenext loop response.write "</td></tr><tr class='text'><td><b>" response.write lg_total response.write "</b></td><td align='right'><b>" response.write statustot response.write "</b></td><td align='right'> </td></tr></table>" response.write "</td></tr><tr><td align='center'> </td></tr><tr><td align='center' bgcolor='#f2f2f2'>" response.write "<table width='100%' border='0' cellpadding='2' cellspacing='0'><tr><td colspan='3' bgcolor='#999999' class='section'> " response.write lg_submission_methods submittot=0 do while not rs1.eof submittot=submittot+rs1("totorigin") rs1.movenext loop if not rs.eof and not rs.bof then rs1.movefirst do while not rs1.eof response.write "</td></tr><tr class='text'><td>" select case rs1("origin") case "web" response.write lg_webdesk case "email" response.write lg_email case "call" response.write lg_stafflogging end select response.write "</td><td align='right' width=50>" & rs1("totorigin") response.write "</td><td align='right' width=50>" & cint(rs1("totorigin")*100/(submittot)) & "%" rs1.movenext loop response.write "</td></tr><tr class='text'><td><b>" response.write lg_total response.write "</b></td><td align='right'><b>" response.write submittot response.write "</b></td><td align='right'> </td></tr></table>" response.write "</td></tr></table></div>" rs.close rs1.close %> <!-- #INCLUDE FILE="../funcs/footer.asp" -->
|
מושיקו.