<%
Function RemoveAcentos(ByVal Texto)
Dim ComAcentos
Dim SemAcentos
Dim Resultado
Dim Cont
'Conjunto de Caracteres com acentos
ComAcentos = "ÁÍÓÚÉÄÏÖÜËÀÌÒÙÈÃÕÂÎÔÛÊáíóúéäïöüëàìòùèãõâîôûêÇç"
'Conjunto de Caracteres sem acentos
SemAcentos = "AIOUEAIOUEAIOUEAOAIOUEaioueaioueaioueaoaioueCc"
Cont = 0
Resultado = Texto
Do While Cont < Len(ComAcentos)
Cont = Cont + 1
Resultado = Replace(Resultado, Mid(ComAcentos, Cont, 1), Mid(SemAcentos, Cont, 1))
Loop
RemoveAcentos = Resultado
End Function
Function Max(aNumberArray)
Dim I
Dim dblHighestSoFar
dblHighestSoFar = Null
For I = LBound(aNumberArray) to UBound(aNumberArray)
If IsNumeric(aNumberArray(I)) Then
If CDbl(aNumberArray(I)) > dblHighestSoFar Or IsNull(dblHighestSoFar) Then
dblHighestSoFar = CDbl(aNumberArray(I))
End If
End If
Next
Max = dblHighestSoFar
End Function
Function Min(aNumberArray)
Dim I
Dim dblLowestSoFar
dblLowestSoFar = Null
For I = LBound(aNumberArray) to UBound(aNumberArray)
If IsNumeric(aNumberArray(I)) Then
If CDbl(aNumberArray(I)) < dblLowestSoFar Or IsNull(dblLowestSoFar) Then
dblLowestSoFar = CDbl(aNumberArray(I))
End If
End If
Next
Min = dblLowestSoFar
End Function
Function Cloud()
Dim strSQL,Conn,rs,Maior,Total,strCon
strCon = "File Name=C:\CempUDL\Solr.udl"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open strCon
strSQL = "Select x.t as Count,x.tag as Tag from (Select top 30 Count(1) as t,"
strSQL = strSQL & "searches.query as Tag from searches where searches.query <> '' and searches.found <> 0"
strSQL = strSQL & "group by searches.query order by t DESC) as x order by newID()"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open strSQL,Conn
if not rs.EOF and not rs.BOF Then
while not rs.EOF
Total= Total & rs.fields("Count").Value & ","
rs.MoveNext
wend
End If
arrTotal=Split(Total, ",", -1, 1)
rs.Close
rs.Open strSQL,Conn
Maior = Max(arrTotal)
if not rs.EOF and not rs.BOF Then
Response.Write "
"
while not rs.EOF
percent = (CDbl(rs.fields("Count")) / CDbl(Maior)) * 100
weight = 0
if percent >= 99 Then
weight = 1
else
if percent >= 70 Then
weight = 2
else
if percent >= 40 Then
weight = 3
else
if percent >= 20 Then
weight = 4
else
if percent >= 3 Then
weight = 5
else
weight = 0
End If
End If
End If
End If
End If
if weight>0 Then
if Session("gInt_CodigoCandidato") = Empty Then
Response.Write "
"& Replace(rs.fields("Tag").Value,chr(34),"") &""
Else
Response.Write "
"& Replace(rs.fields("Tag").Value,chr(34),"") &""
End If
End If
rs.MoveNext
wend
Response.Write "
"
End If
rs.Close
Conn.Close
End Function
%>
Cargos mais buscados:
<%Cloud%>