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

📄 sms_send_submit.php

📁 时代互联短信接口,smsapimode_php_2_3
💻 PHP
字号:
<?
session_start();
include "api/sms.inc.php";
$newclient=new SMS();
if($newclient->ConfNull=="1"){
	$mobile = $_POST[PhoneNum];
	$message = $_POST[Msg];
	$time = $_POST[dtTime];
	$apitype = $_POST[apitype];; // $apitype 通道选择 0:默认通道; 1:通道1; 2:通道2; 3:即时通道; 4:营销通道
	$respxml=$newclient->sendSMS($mobile, $message, $time, $apitype);
	
	//print_r($newclient->sendXML);die();
	
	$_SESSION["xml"]=$newclient->sendXML;
	$_SESSION["respxml"]=$respxml;
	$code=$newclient->getCode();
	$respArr=$newclient->toArray();
	$mess=$respArr["msg"];
	$smsid=$respArr["idmessage"][0];
	$succnum=$respArr["successnum"][0];
	$succphone=$respArr["successphone"][0];
	$failephone=$respArr["failephone"][0];
}
else {
	$code = "<font color='red'>失败</font>";
	$ermess = "<font color='red'>你还没有配置文件smsdemo/api/config.inc.php</font>";
	$error = "<font color='red'>失败</font>";
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>接口模式演示程序</title>
<link href="../share/api_style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-bottom: 0px;
	background-color: #CCCCCC;
}
-->
</style>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td align="left" bgcolor="#00314F"><img src="../images/api_01.jpg" width="713" height="87" /></td>
    <td align="left" bgcolor="#00314F"><table width="100%" height="80" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td align="right" style="padding-right:20px;"><a href="#"><font color="#ffffff">中文版</font></a>&nbsp;&nbsp;&nbsp;<a href="#"><font color="#ffffff">English</font></a></td>
      </tr>
      <tr>
        <td>&nbsp;</td>
      </tr>
      <tr>
        <td style="color:#FFFFFF;padding-right:20px;" align="right"><strong>时代互联接口模式源程序 Version 2.0</strong></td>
      </tr>
    </table></td>
  </tr>  
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="25" background="../images/api_03.jpg"></td>
    <td bgcolor="#000000">&nbsp;</td>
  </tr>
  <tr>
    <td width="186" rowspan="2" valign="top" bgcolor="#787878"><? include "left.inc.php";?>
  </td>
    <td valign="top" bgcolor="#FFFFFF" style="padding:1px 0px 1px 1px;">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
		  <tr>
			<td align="left" bgcolor="#030504"><img src="../images/api_07.jpg" width="819" height="183" /></td>
		  </tr>
		  <tr>
			<td align="left"><img src="../images/api_08.jpg" width="819" height="12" /></td>
		  </tr>
		</table>
	</td>
  </tr>
  <tr>
    <td valign="top" style="padding:5px 5px 10px 10px;" bgcolor="#FFFFFF">
	<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0">
	  <tr>
			<td bgcolor="#ECF4F8" class="text_blue14" align="center" ><strong> = 接口模式演示程序使用说明  -SMS发送短信- =</strong></td>
	  </tr>
	</table>
	 <table width="90%"  border="1" align="center" cellpadding="1" cellspacing="0" bordercolorlight="#FFFFFF" bordercolor="#F5EEE8">
		  <tr>
			<td width="16%" height="75" rowspan="4" bgcolor="#FFFFFF" scope="row"><font color="#000000"><img src="../images/pic_1.jpg" width="66" height="66" hspace="10" vspace="10"><br>
			</font></td>
			<td width="84%" height="24" bgcolor="#FFFFFF" scope="row"> 返回结果说明:<font color="#000000">&nbsp;                </font></td>
		  </tr>
		  <tr>
			<td height="23" bgcolor="#FFFFFF" scope="row"><font color="#000000"> 状态:
			<?=$code?>
			 </font></td>
		  </tr>
		  <tr>
			<td height="24" bgcolor="#FFFFFF" scope="row"> 信息:<font color="#000000"><? for($i=0;$i<count($mess);$i++)  echo iconv("utf8","gbk",$mess[$i])."<br>"; ?><? if($ermess) echo $ermess;?></td>
		  </tr>
		  <tr>
			<td height="24" bgcolor="#FFFFFF" scope="row"><font color="#000000"> 是否成功: 
			  <?=iconv("utf8","gbk",$mess[0])?><? if($error) echo $error;?><br>
				短信通道: <?=$apitype?><br>
			  短信发送成功数:<?=$succnum?><br>
				短信发送成功号码:<?=$succphone?><br>
			</font></td>
		  </tr>
		</table>
	  	<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0">
			<tr>
			  <th height="29" align="left" scope="row">
			  发送的XML信息如下:
			  </th>
			</tr>
			<tr>
			  <th height="17" align="center" scope="row">
				<iframe name="sendXML" src='xmldisplay.php?flag=0&create=1' class="formstyle" width="100%" height="250"></iframe>
			  </th>
			</tr>
			<tr>
			  <th height="27" align="left" scope="row">返回的XML信息如下:</th>
			</tr>
			<tr>
			  <th align="center" scope="row">
				<iframe name="respXML" src='xmldisplay.php?flag=1' class="formstyle" width="100%" height="250"></iframe>
			  </th>
			</tr>
		</table>
		<table width="90%" align="center" border="0" cellspacing="0" cellpadding="0">
			<tr>
			  <td height="29" align="center">
			  <input name="return" type="button" value="继续发送" class="buttonback" onClick="location.href='javascript:history.go(-1)'">
			  &nbsp;&nbsp;&nbsp;
			 <input name="next" type="button" value="下一步,用户余额查询" onClick="location.href='sms_account.php'" class="button_orange">	
			 &nbsp;&nbsp;&nbsp;
			 <input name="next" type="button" value="重新配置文件" onClick="location.href='sms_conf.php'" class="buttonback">	
			  </td>
			</tr>
		</table>
		<table width="100%"  border="1" align="center" cellpadding="1" cellspacing="0" bordercolorlight="#FFFFFF" bordercolor="#ECF4F8" style="margin-top:15px;">
		  <tr>
			<td scope="row">  </td>
		  </tr>
		</table>
	</td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td height="30" align="center" bgcolor="#00314F" style="color:#FFFFFF">时代互联 版权所有</td>
  </tr>
</table>
</body>
</html>


⌨️ 快捷键说明

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