dcsimg
Need sum help in making mass sms system
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   hyde_dorifto
Posted On:   Monday, June 13, 2005 03:39 AM

NATAS SMS System i m using kvanttisms to make the program, can someone help mi to c wat is wrong with this codes? thank you for any help given n,n <%@ page import = "java.sql.*" %> <%@ page import = "java.io.*" %> <%@ page import = "java.util.*" %> <%@ page import = "fi.kvanttisofta.sms.*" %> <%@ page import = "javax.comm.*" %> <%@ page import = "java.lang.*" %> NATAS SMS System <% String msg = null; String hp = null; Connection con = null; String url = "jdbc:mysql://localhost:3306/natas"; Class.f   More>>
NATAS SMS System

i m using kvanttisms to make the program, can someone help mi to c wat is wrong with this codes?


thank you for any help given n,n


<%@ page import = "java.sql.*" %>
<%@ page import = "java.io.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "fi.kvanttisofta.sms.*" %>
<%@ page import = "javax.comm.*" %>
<%@ page import = "java.lang.*" %>



NATAS SMS System



<%

String msg = null;
String hp = null;
Connection con = null;
String url = "jdbc:mysql://localhost:3306/natas";

Class.forName("org.gjt.mm.mysql.Driver");
con = DriverManager.getConnection (url, "", "");
Statement statement = con.createStatement();

msg = request.getParameter("message");
%>

Your Promotion Message:


<%=msg%>



<%
String sql = "SELECT * FROM user";

ResultSet rs = statement.executeQuery(sql);

if (rs.next())
{
String name = rs.getString("name");
hp = rs.getString("hp");

%>

<%=name%>


<%=hp%>



<%
}

SampleSmsApp myApp = new SampleSmsApp();
SmsTerminal term = null;

String confFileName = "C:\samplesmsapp.conf";
Properties conf = null;
FileInputStream confIn = null;

File confFile = new File(confFileName);
confIn = new FileInputStream(confFile);
conf = new Properties();
conf.load(confIn);

String smsTerminalPort = conf.getProperty("smsTerminalPort");
int smsTerminalBitRate = Integer.parseInt(conf.getProperty("smsTerminalBitRate"));
boolean includeSmscInfoLen = new Boolean(conf.getProperty("includeSmscInfoLen")).booleanValue();
String smscAddress = conf.getProperty("smscAddress");

term = new SmsTerminal(smsTerminalPort, smsTerminalBitRate, myApp);
term.initialize();
if(includeSmscInfoLen) {
term.setMsgOutIncludeSmscAddrLen(includeSmscInfoLen);
if(smscAddress != null)
term.setMsgOutSmscAddr(smscAddress);
}

String strHp = "+65"+hp;
term.sendMessage(strHp, msg);

statement.close();
con.close();

%>


   <<Less
About | Sitemap | Contact