【无标题】

后端配置
在这里插入图片描述

前端

Main - 1
Dim gg1(100001) As Integer
Dim ppp1(1001) As String
Dim yes1(1001) As Boolean
Dim apeople As Integer
Dim people As Integer
Dim haveselected As Integer
Dim result As String
Dim name1 As String
Dim number1 As Integer
Private Sub Command1_Click()
Dim ok As Boolean
Dim selected As Integer
While ok = False
Randomize
selected = Int(people * Rnd() + 1)
If haveselected = 64 Then
Text1.Text = ppp1(gg1(selected))
ok = True
Else
If yes1(gg1(selected)) = False Then
Text1.Text = ppp1(gg1(selected))
yes1(gg1(selected)) = True
haveselected = haveselected + 1
ok = True
End If
End If
Wend
End Sub
Private Sub Command2_Click()
If MsgBox("你确定重置已点列表?" + vbCrLf + "Are you sure?", vbQuestion + vbYesNo, "警告") = vbNo Then
Exit Sub
End If
For i = 1 To apeople
yes1(i) = False
Next i
haveselected = 0
Text1.Text = ""
If MsgBox("重置成功!", vbInformation, "信息") = vbYes Then
End If
End Sub
Private Sub Form_Load()
Timer1.Enabled = True
End Sub
Function BytesToBstr(Body, Cset)
On Error Resume Next
'"GB2312"
'"GBK"
'"UTF-8"
Dim Objstream
Set Objstream = CreateObject("adodb.stream")
Objstream.Type = 1
Objstream.Mode = 3
Objstream.open
Objstream.Write Body
Objstream.Position = 0
Objstream.Type = 2
Objstream.Charset = Cset
BytesToBstr = Objstream.ReadText
Objstream.Close
Set Objstream = Nothing
End Function
Private Sub Timer1_Timer()
ProgressBar1.Value = ProgressBar1.Value + 1
apeople = 0
ProgressBar1.Value = ProgressBar1.Value + 1
people = 0
ProgressBar1.Value = ProgressBar1.Value + 1
haveselected = 0
ProgressBar1.Value = ProgressBar1.Value + 5
Set xmlhttp = CreateObject("WinHttp.WinHttpRequest.5.1") 'Createobject("MSXML2.xmlhttp.6.0")
ProgressBar1.Value = ProgressBar1.Value + 1
xmlhttp.open "GET", "url"
ProgressBar1.Value = ProgressBar1.Value + 1
Main - 2
xmlhttp.setRequestHeader "Pragma", "no-cache"
ProgressBar1.Value = ProgressBar1.Value + 1
xmlhttp.setRequestHeader "Cache-Control", "no-cache"
ProgressBar1.Value = ProgressBar1.Value + 20
On Error GoTo err1
xmlhttp.send
ProgressBar1.Value = ProgressBar1.Value + 1
xmlhttp.WaitForResponse
ProgressBar1.Value = ProgressBar1.Value + 10
result = BytesToBstr(xmlhttp.ResponseBody, "gb2312")
err1:
ProgressBar1.Value = ProgressBar1.Value + 1
If result = "" Then
result = "{'再抽一次:20';'老师回答:20';}" '此处请按照示例格式输入默认人名传
End If
ProgressBar1.Value = ProgressBar1.Value + 1
Dim type1 As Integer
ProgressBar1.Value = ProgressBar1.Value + 1
type1 = 0
ProgressBar1.Value = ProgressBar1.Value + 1
Dim long1 As Integer
ProgressBar1.Value = ProgressBar1.Value + 1
long1 = Len(result)
ProgressBar1.Value = ProgressBar1.Value + 1
ProgressBar1.Max = 78 + long1 - 2
ProgressBar1.Value = ProgressBar1.Value + 1
For i = 1 To long1 - 1
If type1 = 0 And Mid(result, i, 1) = "'" Then
type1 = 1
name1 = ""
ElseIf type1 = 1 And Mid(result, i, 1) <> ":" Then
name1 = name1 + Mid(result, i, 1)
ElseIf type1 = 1 And Mid(result, i, 1) = ":" Then
type1 = 2
number1 = 0
ElseIf type1 = 2 And Mid(result, i, 1) <> "'" Then
number1 = number1 * 10 + CInt(Mid(result, i, 1))
Else
type1 = 0
If number1 <> 0 Then
apeople = apeople + 1
For j = people To number1 + people
gg1(j) = apeople
Next j
people = people + number1
ppp1(apeople) = name1
End If
End If
ProgressBar1.Value = ProgressBar1.Value + 1
Next i
ProgressBar1.Value = ProgressBar1.Value + 21
Label2.Visible = True
ProgressBar1.Value = ProgressBar1.Value + 1
Label3.Visible = True
ProgressBar1.Value = ProgressBar1.Value + 1
Label1.Visible = False
ProgressBar1.Value = ProgressBar1.Value + 1
Text1.Visible = True
ProgressBar1.Value = ProgressBar1.Value + 1
Command1.Visible = True
ProgressBar1.Value = ProgressBar1.Value + 1
Command2.Visible = True
ProgressBar1.Value = ProgressBar1.Value + 1
ProgressBar1.Visible = False
Timer1.Enabled = False
End Sub
Main - 1
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Begin VB.Form Main
BorderStyle = 1 'Fixed Single
Caption = "主页"
ClientHeight = 2070
ClientLeft = 45
ClientTop = 390
ClientWidth = 4335
Icon = (Icon)
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2070
ScaleWidth = 4335
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "重置"
Height = 495
Left = 2040
TabIndex = 6
Top = 1320
Visible = 0 'False
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "开始"
Default = -1 'True
Height = 495
Left = 840
TabIndex = 5
Top = 1320
Visible = 0 'False
Width = 1095
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 420
Left = 1440
Locked = -1 'True
TabIndex = 4
Top = 720
Visible = 0 'False
Width = 1815
End
Begin MSComctlLib.ProgressBar ProgressBar1
Height = 375
Left = 120
TabIndex = 1
Top = 720
Width = 4095
_ExtentX = 7223
_ExtentY = 661
_Version = 393216
Appearance = 1
Max = 687
Scrolling = 1
End
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 1
Left = 1080
Top = 240
End
Begin VB.Label Label3
Caption = "点到"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Main - 2
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 720
TabIndex = 3
Top = 840
Visible = 0 'False
Width = 975
End
Begin VB.Label Label2
Caption = "点名器"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1680
TabIndex = 2
Top = 120
Visible = 0 'False
Width = 975
End
Begin VB.Label Label1
Caption = "加载中"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 1560
TabIndex = 0
Top = 360
Width

后端

<?php

//常量设置
$con = mysql_connect("localhost","sfydb_6273437",Qq746974559);
if (!$con)
{
  die('Could not connect: ' . mysql_error());
}
mysql_select_db("sfydb_6273437", $con);
mysql_query("set names gb2312");
//主过程
echo "{";
$result = mysql_query("SELECT * FROM name");
$count=mysql_num_rows($result);
while($row = mysql_fetch_array($result))
{

  echo "'".$row['name'].":".$row['number']."';";
}
echo "}";
?>

数据库配置
图片

图片

运行
图片

点评
1、前后台效率高、速度快,运行流畅
2、后端响应迅速,编码问题良好
3、虚拟主机空间充足
4、基本功能实现良好

声明
原创资源,禁止用于其他商业用途

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

满命满精纳西妲

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值