- Joined
- Jan 24, 2009
- Messages
- 785
- Reaction score
- 484
Така това е СМС ранкинг ,който показва и от кой ГСМ оператор е изпратен смс-а ,също така скрива последните 3 цифри от номера! Пригоден е за този СМС Скрипт!
sms_log.php
На мястото на
Напишете
Кода за Query Analyzer
sms_log.php
PHP:
<?
echo '<table align="center" width="450" cellpadding="0" cellspacing="1" border="0" bgcolor="#000000">
<tr>
<td width=5 align="center" bgcolor="#009900"><strong>#</strong></td>
<td width=76 align="center" bgcolor="#009900"><strong>Акаунт</strong></td>
<td width=50 align="center" bgcolor="#009900"><strong>Оператор</strong></td>
<td width=100 align="center" bgcolor="#009900"><strong>Телефонен номер</strong></td>
<td width=100 align="center" bgcolor="#009900"><strong>СМС-и</strong></td>
</tr>';
include('connect.php');
$query = mssql_query("Select acc,gsm,SMS_nomer from SMS_Log order by SMS_nomer desc");
for($i=0;$i<mssql_num_rows($query);++$i){
$row=mssql_fetch_row($query);
if ($row[2] == "0") {
$row[2] ="0" ;}
if ($row[2] == "NULL") {
$row[2] ="0" ;}
$nr=$i+1;
//Operatori------------------------------------------------------
$operator = "".substr($row['1'], 0,3)."";
if($operator == '087'){ $operator = 'Вивател';}
if($operator == '088'){ $operator = 'М-Тел';}
if($operator == '089'){ $operator = 'Глобул';}
//---------------------------------------------------------------
//Nomera---------------------------------------------------------
$row[1] = "".substr($row['1'], 0,6)."****";
//---------------------------------------------------------------
echo "<tr>
<td width=20 align=center bgcolor=#009900><strong>$nr</strong></td>
<td width=90 align=center bgcolor=#009900><strong>$row[0]</strong></td>
<td width=150 align=center bgcolor=#009900><strong>$operator</strong></td>
<td width=150 align=center bgcolor=#009900><strong>$row[1]</strong></td>
<td width=80 align=center bgcolor=#009900><strong>$row[2]</strong></td>
</tr>";
}
?>
</table>
PHP:
include('connect.php');
PHP:
include('config.php');
Code:
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SMS_LOG]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[SMS_LOG]
GO
CREATE TABLE [dbo].[SMS_LOG] (
[acc] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[gsm] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
[SMS_nomer] [int] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[SMS_LOG] WITH NOCHECK ADD
CONSTRAINT [DF_SMS_LOG_SMS_nomer] DEFAULT (0) FOR [SMS_nomer]
GO
Last edited: