⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 index.jsp

📁 学生选课系统 赶快来下载啊啊好东西 呵呵啊啊 啊啊啊啊啊
💻 JSP
字号:
<%@ page contentType="text/html;charset=GBK" %>
<%@ page import="com.osacc.common.dbtools.*" %>
<%@ page import="com.osacc.common.web.*" %>
<%@ page import="epod.util.ApplicationConfig" %>
<%@ page import="epod.system.load.IniLoader" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>OSPod.Forum 安装向导</TITLE>
<HTML>
 <HEAD>
  <TITLE> OSPOD开发平台 </TITLE>
  <META NAME="Generator" CONTENT="EditPlus">
  <META NAME="Author" CONTENT="">
  <META NAME="Keywords" CONTENT="">
  <META NAME="Description" CONTENT="">
<link href="<%= request.getContextPath()%>/bbsadmin/epod/skins/m_default/lib/homepage.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
#main{float:left;margin-top:100px;width:100%;}
.commentInfo{color:#888;padding-left:10px;font-size:12px;}
.tdName{color:#08495a;font-size:12px;height:25px;}
.tdValue{padding-left:10px;height:25px;}
.buttonTd{text-align:right;padding-right:150px;padding-top:10px;}
#nextButton{margin-left:50px;}
.errMessageInfo{color:red;}
.sucMessageInfo{}
.otherMessageInfo{padding-left:300px;text-align:left;}
.otherInfo{font-weight:normal;}
.loadLabel{width:100%;font-weight:bold;}
#messageBox{color:#08495A;margin-bottom:10px;line-height:1.5;text-align:center;font-size:12px;font-weight:bold;}
#messageBox a{color:#08495A;}
#formBox{text-align:left;padding-left:300px;}
-->
</style>
<%

  int haveInstalled = 0;
	DBConfigManager cm = new DBConfigManager();
	String installStatus = cm.getProperty("epod.installStatus", "0");
	String isInstalled = ApplicationConfig.getConfig("epod.installStatus");
	if(isInstalled.equals("1")){
		//已经安装完毕
		haveInstalled = 1;
	}else if(isInstalled.equals("0") && installStatus.equals("2")){
		//正在安装中
		haveInstalled = 2;
	}else{
		cm.setProperty("epod.installStatus", "0");
		cm.storeDbConfig();
	}

  String dbtype = "";
  String host = "";
  String dbname = "";
  String user = "";
  String passwd = "";
  if(haveInstalled == 0){
    ContextWrapper _context = new ContextWrapper(request, response); 
    dbtype = _context.getStringParameter("dbtype",cm.getProperty("epod.dbtype","MYSQL5"));
    host = _context.getStringParameter("host", cm.getProperty("epod.host","localhost"));
    dbname = _context.getStringParameter("dbname", cm.getProperty("epod.dbname",""));
    user = _context.getStringParameter("user", cm.getProperty("epod.user",""));
    passwd = _context.getStringParameter("passwd", cm.getProperty("epod.password",""));
  }
%>
<script type="text/javascript">
<!--
function testConnection(){
	document.getElementById("action").value = "testConnection";
	dbconfig.submit();
}

function nextStep(){
  document.getElementById("loadLabel").style.display = "block";
  document.getElementById("messageInfo").innerHTML = "正在安装,请稍候。。。";
  document.getElementById("messageInfo").className = "sucMessageInfo";
  document.getElementById("contentTable").style.display = "none";
	document.getElementById("action").value = "nextStep";
	dbconfig.submit();
}
//-->
</script>

</HEAD>
<body id="ospod">

<div id="wrap">

  <div id="header" style="width:100%;">
    <div id="subhead">
    <span>Enterprise Platform On Demand</span>
    </div><!-- end subhead-->
  </div><!--end header-->


  <div id="content">

    <div id="logoBanner">
    <img id="logo" src="<%= request.getContextPath()%>/bbsadmin/epod/skins/m_default/image/homepage/ospod_logo.jpg">
    </div> <!--end logoBannar-->

    <div id="main">
      <div id="messageBox">
        <div id="messageInfo"></div>
        <div id="loadLabel" class="loadLabel" style="display:none;"><img src="<%= request.getContextPath()%>/bbsadmin/epod/skins/m_default/image/homepage/loading.gif"></div>
      </div>
      <div id="formBox">
      <form id="dbconfig" name="dbconfig" method="post" action="importscript.jsp" method="post" target="loadPhoto">
      <input type="hidden" id="action" name="action" value="nextStep" />
			<input type="hidden" id="port" name="port" value="" />
      <table id="contentTable" border="0" cellpadding="0" cellspacing="0" style="display:none;">
		<tr>
		  <td class="tdName" colspan=2><span style="color:red;">- 以下内容请根据空间商提供的账号信息进行填写。如有疑问,请联系空间商 -</span>
		  </td>
		</tr>
        <tr>
          <td class="tdName">数据库类型:</td>
          <td class="tdValue">
          <select id="dbtype" name="dbtype">
            <option value="MYSQL5" <%if(dbtype.equals("MYSQL5")){%>selected<%}%> >MYSQL5</option>
			<option value="MYSQL4" <%if(dbtype.equals("MYSQL4")){%>selected<%}%> >MYSQL4</option>
          </select><span class="commentInfo">* 当前版本支持MYSQL5、MYSQL4</span>
          </td>
        </tr>
        <tr>
          <td class="tdName">数据库服务器:</td>
          <td class="tdValue"><input type="text" id="host" name="host" value="<%=host%>"/><span class="commentInfo">* 一般为 localhost</span></td>
        </tr>
        <tr>
          <td class="tdName">数据库名称:</td>
          <td class="tdValue"><input type="text" id="dbname" name="dbname" value="<%=dbname%>"/><span class="commentInfo">* </span></td>
        </tr>
        <tr>
          <td class="tdName">用户名:</td>
          <td class="tdValue"><input type="text" id="user" name="user" value="<%=user%>"/><span class="commentInfo">* </span></td>
        </tr>
        <tr>
          <td class="tdName">口令:</td>
          <td class="tdValue"><input type="text" id="passwd" name="passwd" value="<%=passwd%>"/><span class="commentInfo">* </span></td>
        </tr>
        <tr>
          <td colspan="2" class="buttonTd"><input id="testButton" type="button" value="测试数据库" onclick="testConnection()"/><input id="nextButton" type="button" value="开始安装" onclick="nextStep();" /></td>
        </tr>
      </table>
      </form>
      </div><!-- end formBox -->
    </div><!--end main-->
  </div><!--end content-->
</div><!--end wrap -->
<iframe id="loadPhoto" name="loadPhoto" src="importscript.jsp" style="display:none;"></iframe>
</BODY>
</HTML>
<%
  if(haveInstalled == 1){
  %>
  <SCRIPT LANGUAGE="JavaScript">
  <!--
    document.getElementById("messageInfo").innerHTML = "<span id='gotoForum'><a href='<%= request.getContextPath()%>/index.do'>立即进入论坛首页</a></span><span class='otherInfo'><br>如果您需要重新安装,请按如下步骤进行:<br>1、修改 ../WEB-INF/classes/epod.properties 文件中的 epod.installStatus 参数为 0<br>2、重启 tomcat 后,重新进入此页面</span>";
    document.getElementById("messageInfo").className = "otherMessageInfo";
    document.getElementById("loadLabel").style.display = "none";
    document.getElementById("contentTable").style.display = "none";
	function gotoForum(){
	  window.location="<%= request.getContextPath()%>/index.do";
	}

  //-->
  </SCRIPT>
  <%
  }else if(haveInstalled == 2){
    %>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
      document.getElementById("messageInfo").innerHTML = "正在安装,请稍候。。。";
      document.getElementById("messageInfo").className = "sucMessageInfo";
      document.getElementById("loadLabel").style.display = "block";
      document.getElementById("contentTable").style.display = "none";

      function  refershWin(){  
			  window.location.reload();  
      }
      window.setInterval("refershWin()",5000);
    //-->
    </SCRIPT>
    <%
  } else {
    %>
	<SCRIPT LANGUAGE="JavaScript">
    <!--
      document.getElementById("contentTable").style.display = "block";
    //-->
    </SCRIPT>
    <%
  }
%>

<SCRIPT LANGUAGE="JavaScript">
<!--

//-->
</SCRIPT>
<%

%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -