<%if session("username") = "" then response.Redirect("login.asp") End if set r=Server.CreateObject("ADODB.RECORDSET") r.open "select * from stock where ipo=true",conn,3,2 while not r.eof set rr = Server.CreateObject("adodb.recordset") rr.open "select sum(purchaseprice) as sumofpurchase,sum(totalshares) as totalshare,count(purchaseprice) as countofpurchase from sharestable where stockid="&r("stockid"),conn av = cdbl(rr("sumofpurchase")) / cdbl(rr("totalshare")) r("currentprice") = av r.update r.movenext wend %> IPO Setup
 
<% chkmenu=11 %>
<%set rsb = Server.CreateObject("ADODB.RECORDSET") rsb.open "SELECT UserPetTable.userpetname,UserPetTable.Companyname, userBusinessTable.*, businesstable.BusinessName, businesstable.business_path FROM businesstable INNER JOIN (UserPetTable INNER JOIN userBusinessTable ON UserPetTable.userPetId = userBusinessTable.userpetID) ON businesstable.businessID = userBusinessTable.BID WHERE (((userBusinessTable.userpetID)="&session("petshare") &")) order by userbusinesstable.ubid;",conn %>
  IPO Setup
<%=rsb("companyName")%>
   
Total shares available
Shares available to public
shares own by CEO
Price per share .00
Company Description  
   
<% if not session("petitemid")="" then set rsp =Server.CreateObject("adodb.recordset") rsp.open "SELECT UserPetTable.userpetName, PetTable.petName, UserPetTable.energylevel, PetTable.smallimg FROM PetTable INNER JOIN UserPetTable ON PetTable.petId = UserPetTable.petId WHERE (((UserPetTable.userPetId)=" & session("petitemid") & "));",conn if not rsp.eof then %>
" width="34" height="34">
Pet Name <%=rsp("userpetname")%>
Pet Type <%=rsp("petname")%>
Energy Level <%=rsp("energylevel")%>
 
<%end if end if %>
<%set rsi = Server.CreateObject("adodb.recordset") rsi.open "SELECT sharestable.*, UserPetTable.Companyname FROM UserPetTable INNER JOIN sharestable ON UserPetTable.userPetId = sharestable.userpetid WHERE (((UserPetTable.userpetid)=" & session("petitemid")&"));",conn ,adOpenStatic, adLockReadOnly if not rsi.eof then rsi.move clng(request("total"))+0,1 %> 0 <%else%> <%=request("total")%> <%end if%> " > <%for i=0 to 4 if not rsi.eof then %> <% rsi.movenext end if next%>
Company Name Shares qty
<% set rsstockcompany = Server.CreateObject("ADODB.RECORDSET") rsstockcompany.open "SELECT UserPetTable.Companyname FROM UserPetTable INNER JOIN stock ON UserPetTable.userPetId = stock.userpetid WHERE (((stock.Stockid)="&rsi("stockid")&"));",conn if not rsstockcompany.eof then Response.Write(rsstockcompany("Companyname")) end if %> <%=rsi("totalshares")%>
<%=total %>
<%if rsi.recordcount > 5 then%> Back Next <%end if%> <%end if%>