<%
'/////////////////////////////////////////////////////////////////
' WEB Partner
' HomePage:http://dome.ruru.ne.jp/hidaka21/
' E-Mail:hidaka21@dome.ruru.ne.jp
'
' WEB Partner 掲示板システム Ver 1.02
' Release 2000/02/29
'
' OS:Windows95/98/NT + IIS3.0以上 PWS3.0以上で動作します
' 推奨ブラウザ:Internet Explorer4.0
'/////////////////////////////////////////////////////////////////
'メイン処理
'-----------------------------------------------------------------
Call Get_Post 'ポストデータの取得
'データベース処理指定
Select case mode2
Case "add"
call DB_Open
in_rs="'" & f_name & "','" & _
CRLFChangeBR(Now_Date()) & "','" & _
f_password & "','" & f_homepage & "','" & _
f_mail & "','" & f_subject & "','" & f_naiyou & "'"
call rs_insert(This_TableName)
call DB_Close
Case "password_chk"
call DB_Open
call Rs_Serch(This_TableName,"id",Edit_No,"all")
If f_EditPassword=rs("password") or f_EditPassword=Kanri_Password Then
mode="syusei"
Else
Disp_mode="home"
mode=""
Disp_flg="1"
End if
call DB_Close
Case "edit"
call DB_Open
If f_delete="on" then
'削除の場合
call Rs_Update(This_TableName,"name","SomeOne","id",Edit_No)
call Rs_Update(This_TableName,"password",Kanri_Password,"id",Edit_No)
call Rs_Update(This_TableName,"homepage","","id",Edit_No)
call Rs_Update(This_TableName,"mail","","id",Edit_No)
call Rs_Update(This_TableName,"subject","
削除されました!","id",Edit_No)
call Rs_Update(This_TableName,"comment","","id",Edit_No)
Else
'修正の場合
call Rs_Update(This_TableName,"name",f_name,"id",Edit_No)
call Rs_Update(This_TableName,"homepage",f_homepage,"id",Edit_No)
call Rs_Update(This_TableName,"mail",f_mail,"id",Edit_No)
call Rs_Update(This_TableName,"subject",f_subject,"id",Edit_No)
call Rs_Update(This_TableName,"comment",f_naiyou,"id",Edit_No)
End If
call DB_Close
Case Else
End Select
'全レコード数の取得
call DB_Open
call rs_all_count(This_TableName)
Rs_Su=modoriti
call DB_Close
'出力指定
Select case Disp_mode
case "home"
If rs_su>10 then
wari=fix(rs_su / 10)
Disp_min=wari * 10
Disp_max=Disp_min + 10
Else
Disp_min=0
Disp_max=10
End If
case "next"
If rs_su>10 then
If (Disp_max + 10) < rs_su + 10 then
Disp_min=Disp_min + 10
Disp_max=Disp_max + 10
Else
End If
Else
Disp_min=0
Disp_max=10
End If
case "back"
If rs_su>10 then
If (Disp_max - 10) > 0 then
Disp_min=Disp_min - 10
Disp_max=Disp_max - 10
Else
End If
Else
Disp_min=0
Disp_max=10
End If
case ""
If rs_su>10 then
wari=fix(rs_su / 10)
Disp_min=wari * 10
Disp_max=Disp_min + 10
Else
Disp_min=0
Disp_max=10
End If
End Select
'ページ値の取得
page_su = fix(rs_su / 10) + 1
now_page = Disp_max / 10
'最大登録削除処理
call DB_Open
call rs_all_count(This_TableName)
Rs_Su=modoriti
If Rs_Su > Max_Su Then
Call rs_min(This_TableName,"id")
Call rs_delete(This_TableName,"id",modoriti)
sql="ALTER TABLE " & This_TableName & " DROP COLUMN id"
Set rs=conn.Execute(sql)
sql="ALTER TABLE " & This_TableName & " ADD COLUMN id COUNTER"
Set rs=conn.Execute(sql)
End If
call DB_Close
'表示処理指定
Select case mode
case ""
call DB_Open
call Rs_Max(This_TableName,"id")
saidai_id=modoriti
call Rs_Serch(This_TableName,"id",saidai_id,"all")
saisin_toki=rs("toki")
call header_output
If Rs_Su<>0 then
call all_brock_output(This_TableName)
End If
call hooter_output
call DB_Close
case "touroku"
call touroku_output
case "pwdchk"
call Password_chk_output
case "syusei"
call DB_Open
call Rs_Serch(This_TableName,"id",Edit_No,"all")
call syusei_output
call DB_Close
case "kensaku"
call Serch_output
If f_serch_flg<>"" then
call DB_Open
sql="select count(id) as co from " & This_TableName & _
" where " & f_s_koumoku & " like'%" & f_s_moji & "%'"
Set rs=conn.Execute(sql)
Rs_Su=rs("co")
Dim kensaku_msg
Select case f_s_koumoku
case "name"
kensaku_msg="発言者"
case "subject"
kensaku_msg="タイトル"
case "comment"
kensaku_msg="内容"
End Select
If Rs_Su=0 then
Response.Write "
■一致する発言は、ありませんでした!"
Response.Write "
" & vbCRLF
Else
Response.Write "
■" & kensaku_msg & "欄で検索文字「" & f_s_moji & _
"」に一致する発言は、" & Rs_Su & " 件あります!"
Response.Write "
" & vbCRLF
End if
sql="SELECT*FROM " & This_TableName & " WHERE " & _
f_s_koumoku & " Like'%" & f_s_moji & "%'" & " ORDER BY id DESC"
Set rs=conn.Execute(sql)
'レコードの最後までループ
Do Until rs.EOF
'ブロック出力
call brock_output
'次のレコードへ移動
rs.MoveNext
Loop
call DB_Close
End if
Response.Write "
" & vbCRLF
Response.Write "
WEB Partner 掲示板 Ver." & P_Version & "" & vbCRLF
case else
End Select
%>