<%@LANGUAGE="VBSCRIPT"%> Forestry Administration: Community Forestry Banteay Mean Chey Battambang Kampong Cham Kampong Speu Kampong Chhnang Kampong Thom Koh Kong Kratie Mondul Kiri Phnom Penh Preah Vihear Prey Veng Pursat Ratanak Kiri Siem Reap Krong Preah Sihanook Stung Treng Svay Rieng Takeo Otdar Mean Chey Krong Kep Krong Pailin Kandal Kampot <% Dim QCF dim ProID Set QCF = Server.CreateObject("ADODB.Recordset") QCF.ActiveConnection = MM_CFonWEB_STRING QCF.Source = "SELECT Query2.ProvinceID as ProvinceID, Query2.Province as Province, Query2.ProvinceKH as ProvinceKH, Query2.CountOfCFID AS CountOfCF, Query3.CountOfVillage AS CountOfVillage, Query3.SumOfPopulation AS SumOfPopulation, Query3.SumOfCF_member AS SumOfCFmember FROM Query2 INNER JOIN Query3 ON Query2.ProvinceID = Query3.ProvinceID ORDER BY Int(Query2.ProvinceID);" QCF.CursorType = 2 QCF.CursorLocation = 2 QCF.LockType = 3 QCF.Open() '--------------------------->>>>>>>>>>> Data Record set <<<<<<<<<<<--------------------------- %>
?subject=CF by provice English?&body=List down your Name and position before your comment." onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image10','','/Pic/MenuKh/Eng-CFCommentOver.gif',1)">

 

<% response.write("

") response.write("") response.write("Community Forestry in Cambodia") response.write("

") %>

<% dim i i=0 while (Not QCF.EOF) IF QCF.Fields.Item("ProvinceID").Value <> 0 THEN if i mod 2 then response.write("") else response.write("") end if response.write("" ) response.write("") CountOfCF=CountOfCF + QCF.Fields.Item("CountOfCF").Value response.write("") CountOfVillage = CountOfVillage + QCF.Fields.Item("CountOfVillage").Value if isnull((QCF.Fields.Item("SumOfPopulation").Value))=true then response.write("") else response.write("") SumOfPopulation = SumOfPopulation + QCF.Fields.Item("SumOfPopulation").Value end if if isnull(QCF.Fields.Item("SumOfCFmember").Value)=true then response.write("") else response.write("") SumOfCFmember = SumOfCFmember + QCF.Fields.Item("SumOfCFmember").Value end if response.write("") QCF.movenext i=i+1 ELSE qcf.movenext END IF Wend %>
  Province Community Village Population CF member
" & QCF.Fields.Item("ProvinceID").Value) response.write("" & (QCF.Fields.Item("Province").Value) & "" & (setcama(QCF.Fields.Item("CountOfCF").Value,False)) & "" & setcama(QCF.Fields.Item("CountOfVillage").Value,False) & "" & "0" & "" & setcama(QCF.Fields.Item("SumOfPopulation").Value,False) & "" & "0" & "" & setcama(QCF.Fields.Item("SumOfCFmember").Value,False) & "
  Total <% response.write(setcama(CountOfCF,False))%> <%=setcama(CountOfVillage,False)%> <%=setcama(SumOfPopulation,False)%> <%=setcama(SumOfCFmember,False)%> 
<% QCF.Close() Set QCF = Nothing function SetCama(Numbers,DecimalPointYesNo) ThousandDevideString = "," DecimalPoint="." If Numbers > 0 Then dot = False For K = 1 To Len(Numbers) If Mid(Numbers, K, 1) = "." Then strright = Mid(Numbers, K, 3) If strright = "." Or strright = "" Then strright = DecimalPoint & "00" Else strright = Mid(Numbers, K + 1, 2) If Len(strright) = 1 Then strright = strright & "0" End If End If StrLeft = Mid(Numbers, 1, K - 1) If StrLeft = "" Then StrLeft = "0" End If dot = True Exit For End If Next If dot = True Then lenght = Len(StrLeft) If lenght > 3 Then j = 0 For K = 1 To lenght Step 3 j = j + 1 If K = 1 Then SetCama = Right(StrLeft, 3) Else SetCama = Right(StrLeft, 3) & ThousandDevideString & SetCama End If If Len(StrLeft) > 3 Then StrLeft = Left(StrLeft, Len(StrLeft) - 3) End If Next SetCama = SetCama & DecimalPoint & strright Else SetCama = StrLeft & DecimalPoint & strright End If Else If DecimalPointYesNo = True Then strright = DecimalPoint & "00" Else strright = "" End If StrLeft = Numbers lenght = Len(StrLeft) If lenght > 3 Then j = 0 For K = 1 To lenght Step 3 j = j + 1 If K = 1 Then SetCama = Right(StrLeft, 3) Else SetCama = Right(StrLeft, 3) & ThousandDevideString & SetCama End If If Len(StrLeft) > 3 Then StrLeft = Left(StrLeft, Len(StrLeft) - 3) End If Next SetCama = SetCama & strright Else SetCama = StrLeft & strright End If End If Else If DecimalPointYesNo = True Then SetCama = "0" & DecimalPoint & "00" Else SetCama = "0" End If End If end function %>