%@ Language = 'VbScript' LCID=1049 CodePage=1251 EnableSessionState=True%>
<% Option Explicit %>
<%
Response.CharSet = "windows-1251"
%>
<%
cnn.Open Application("ConnectionString")
Randomize
'defining the global variables
dim site_id, page_id, strSQL
site_id=50
page_id=262
Dim QP_IsInStageMode
QP_IsInStageMode = False
'define response properties
Response.AddHeader "publisher", "Quantum Art's Q-Publishing 7.6 Wed, 16 Sep 2009 11:24:03 GMT"
Response.Expires = -1000
Response.CacheControl = "Private"
Response.AddHeader "Pragma", "no-cache"
Response.AddHeader "cache-control", "no-cache, no-store, must-revalidate"
dim upload_url, base_upload_url, published_status_type_id, object_call_depth
Dim AbsUploadURL, UploadURLPrefix, PublishedStatusName
Dim QP_IsInFrontend
QP_IsInFrontend = True
dim object_call_stack(20)
upload_url = "/upload/images"
site_url = "/live/"
base_upload_url = "/upload/"
object_call_depth = 0
published_status_type_id=GetMaximumWeightStatusTypeId(50)
PublishedStatusName=GetMaximumWeightStatusTypeName(50)
FillValues
Private Sub object1177O()
err.clear
%>Результаты опроса<%
If Err.Number <> 0 Then
Response.write("Unable to display object 'заголовок' correctly! Details: " & err.description)
End If
End Sub
Private Sub object914O()
err.clear
%><%
If Err.Number <> 0 Then
Response.write("Unable to display object 'css' correctly! Details: " & err.description)
End If
End Sub
Private Sub object1175O()
err.clear
%>
<%
if NumValue("login_action") = 1 then
if (StrValue("login") = "admin") and (StrValue("password") = "akdal.ru") then
%>
Добро пожаловать!
<%Object("InsResult")%>
<%
else
Response.Write("Неверный логин или пароль
назад")
end if
else
%>
Пожалуйста, введите Логин и Пароль
<%
end if
%>
<%
If Err.Number <> 0 Then
Response.write("Unable to display object 'центральная часть' correctly! Details: " & err.description)
End If
End Sub
Private Sub object1176O()
err.clear
Dim FieldValuesDictionaryLocal, FieldNamesDictionaryLocal, ContainerInfoLocal
Dim FieldValuesDictionaryBackup, FieldNamesDictionaryBackup, ContainerInfoBackup
Set FieldValuesDictionaryLocal = CreateObject("Scripting.Dictionary")
Set FieldNamesDictionaryLocal = CreateObject("Scripting.Dictionary")
Set ContainerInfoLocal = New ContainerInfoClass
If IsObject(FieldValuesDictionary) Then Set FieldValuesDictionaryBackup = FieldValuesDictionary
If IsObject(FieldNamesDictionary) Then Set FieldNamesDictionaryBackup = FieldNamesDictionary
If IsObject(ContainerInfo) Then Set ContainerInfoBackup = ContainerInfo
Set FieldValuesDictionary = FieldValuesDictionaryLocal
Set FieldNamesDictionary = FieldNamesDictionaryLocal
Set ContainerInfo = ContainerInfoLocal
ContainerInfo.ContentID = 419
ContainerInfo.ContentName = "_J_Опрос Ответы_Вопросы"
AddValue "dynamicContentNameSource", "CONTENT_419 AS c WITH (NOLOCK)"
Dim cmd
Set cmd = GetContainerCommand(cnn, "c.*" & "" , Value("dynamicContentNameSource") & "" , "c.visible = 1 " & "AND c.status_type_id = 131 " &" and c.archive = 0" & GetContainerFilterExpression(""), GetContainerOrderExpressionNew("[Question.Order] asc,[Question] asc,[Order] asc",""), 1, 0,0)
Set ContainerInfo.RecordSet = Server.CreateObject("ADODB.Recordset")
With ContainerInfo.RecordSet
.CursorLocation = adUseClient
.Open cmd,, adOpenForwardOnly, adLockReadOnly
If .State <> adStateClosed Then
If Not .EOF Then
End If
ContainerInfo.Init cmd, 50, 419, 1, 0
While Not .EOF
ContainerInfo.Adjust
InitFieldValues ContainerInfo.RecordSet
ContainerInfo.AdjustUploadUrl
%>
<%
dim qid, aCount, qCount, res
aCount = Field("Count")
qCount = Field("Question.Count")
if qCount > 0 then
res = Cint(100*aCount/qCount)
else
res = 0
end if
if qid <> Field("Question") then
%>
<%
.MoveNext
Wend
.Close
End If
End With
Set ContainerInfo.RecordSet = Nothing
Set cmd = Nothing
DisposeContainer
If IsObject(FieldValuesDictionaryBackup) Then Set FieldValuesDictionary = FieldValuesDictionaryBackup
If IsObject(FieldNamesDictionaryBackup) Then Set FieldNamesDictionary = FieldNamesDictionaryBackup
If IsObject(ContainerInfoBackup) Then Set ContainerInfo = ContainerInfoBackup
Set FieldValuesDictionaryLocal = Nothing
Set FieldNamesDictionaryLocal = Nothing
Set ContainerInfoLocal = Nothing
If Err.Number <> 0 Then
Response.write("Unable to display object 'insresult' correctly! Details: " & err.description)
End If
End Sub
Private Sub CallStackOverflow()
Response.Write "Object Call Stack Overflow Call Stack: "
dim i
for i=1 to 20
Response.Write object_call_stack(i)&" "
next
Response.End
End Sub
Private Function ObjectNS(name)
Object(name)
End Function
Private Function Object(name)
object_call_depth = object_call_depth + 1
if object_call_depth > 20 then CallStackOverflow
object_call_stack(object_call_depth) = name
Select Case Trim(lCase(name))
Case Trim("заголовок")
object1177O
Case Trim("css")
object914O
Case Trim("центральная часть")
object1175O
Case Trim("insresult")
object1176O
Case Else
Response.Write "Object " & name & " not found. "
End Select
object_call_depth = object_call_depth - 1
End Function
Function LangObject (objectName)
Dim lang
lang = Value ("lang")
if ( lang = "en" or lang = "am" ) then
Object (objectName & "_" & lang)
else
Object (objectName)
end if
End Function
%>
<%Object("Заголовок")%>
<%Object("CSS")%>
<%Object("Центральная часть")%>
<%
DisposeValues
cnn.Close
%>