PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Vinay Yadav   vinSMS   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: vinSMS
SMS Class
Author: By
Last change:
Date: 21 years ago
Size: 4,798 bytes
 

Contents

Class file image Download
<?php
  
// NOTE: Length of SMS message is 160 Characters
  
error_reporting(E_ALL);
?>
<HTML>
 <HEAD><TITLE>Send me an SMS message.</TITLE>
<STYLE type=text/css>.button {
        FONT-SIZE: 12px; BORDER-LEFT-COLOR: #306898; BORDER-BOTTOM-COLOR: #306898; WIDTH: 60px; COLOR: #336699; BORDER-TOP-STYLE: solid; BORDER-TOP-COLOR: #336699; FONT-FAMILY: Geneva, Arial, Helvetica, san-serif; BORDER-RIGHT-STYLE: solid; BORDER-LEFT-STYLE: solid; HEIGHT: 20px; BACKGROUND-COLOR: #ffffff; BORDER-RIGHT-COLOR: #306898; BORDER-BOTTOM-STYLE: solid
}
.forms {
        BORDER-RIGHT: #3868a0 1px ridge; BORDER-TOP: #336699 1px ridge; FONT-SIZE: 12px; BORDER-LEFT: #3868a0 1px ridge; COLOR: #336699; BORDER-BOTTOM: #3868a0 1px ridge; FONT-FAMILY: Geneva, Arial, Helvetica, san-serif; BACKGROUND-COLOR: #ffffff
}
</STYLE>

<SCRIPT language=JavaScript><!--
if ((navigator.appVersion.indexOf("Mac") != -1) && (navigator.appVersion.indexOf("MSIE") == -1)) {
     document.write("<link rel=stylesheet href=\"/int/css/m.css\" type=\"text/css\">");
} else {
     document.write("<link rel=stylesheet href=\"/int/css/w.css\" type=\"text/css\">");
}

function goB() {
         h=window.name.split("_");
         h[0]=parseInt(h[0])-1;
         window.name=h.join("_");
         history.back();
}

function goF() {
         h=window.name.split("_");
         h[0]=parseInt(h[0])+1;
         window.name=h.join("_");
         history.forward();
}

function goL(s) {
         h=window.name.split("_");
         if(parseInt(h[0])<parseInt(h[1])) {
            h[1]=h[0];
         }
         h[0]=parseInt(h[0])+1;h[1]=parseInt(h[1])+1;
         window.name=h.join("_");location.href="/u/"+s;
}

function initcharsleft() {
         charsleft(document.forms["frm"].text);
         }

function charsleft(feld) {
                 var anz = feld.value.length;
         var TotalSize = 350;
         if (anz > TotalSize ) {
             feld.value = feld.value.substring(0,TotalSize);
             frei = 0;
         } else {
             frei = TotalSize -anz;
         }
         //document.forms["frm"].num.value = frei;
         document.forms["frm"].num.value = frei;
}
// -->
</SCRIPT>

</HEAD>
<BODY text=#000000 bgColor=#ffffff>
<h2 align=center> vinSMS </h2>
<p align=center>
 This is a simple script that tries to send SMS message via <b>'lama2.minick.de'</b>
</p>
<?php
 
require("smsFunc.inc");

  if(isset(
$submit)) {
    
$sms = new vinSMS;
     if(!(
$sms->smsConnect())) {
        echo
"Cannot Connect to server:'".$sms->smsHostname."' at port '".$sms->smsPort."'";
     }

    
$fp = $sms->smsLogin();
     if(!
$fp) {
         echo
"<br>Cannot Connect to server,<a href='index.php'>Try Again</a>";
         exit;
     }
    
$sms->smsSend($fp, $smsnumber, $smsmsg, $name);
  } else {
?>
<form name=frm method="post" action="index.php">
<INPUT type=hidden value=Sms name=page>
<INPUT type=hidden value=send_sms name=action>
<INPUT type=hidden value=Robouk name=nickname>

<TABLE cellSpacing=0 cellPadding=0 border=0 >
   <TR>
    <TD></TD>
    <TD>&nbsp;</TD>
    <TD></TD></TR>
  <TR>
    <TD align=right valign=top><STRONG><FONT face=Verdana color=#336699
    size=2>SMS Number:</FONT></STRONG></TD>
    <TD>&nbsp;</TD>
    <TD><INPUT class=forms name=smsnumber></TD></TR>
  <TR>
  <TR>
    <TD align=right valign=top><STRONG><FONT face=Verdana color=#336699
    size=2>From:</FONT></STRONG></TD>
    <TD>&nbsp;</TD>
    <TD><INPUT class=forms name=name></TD></TR>
    <!--
  <TR>
    <TD vAlign=top>
      <P align=right><STRONG><FONT face=Verdana color=#336699
      size=2>Service:</FONT></STRONG></P></TD>
    <TD></TD>
    <TD><SELECT class=forms name=service> <OPTION value=bpl selected>BPL
      Mobile</OPTION></SELECT></TD></TR>
    -->
  <TR>
    <TD align=right valign=top><STRONG><FONT color=#336699><FONT face=Verdana size=2>Message:</FONT>
      </FONT></STRONG></TD>
    <TD>&nbsp;</TD>
    <TD><TEXTAREA class=forms onkeypress=charsleft(this); onkeydown=charsleft(this); onblur=charsleft(this); onkeyup=charsleft(this); style="LEFT: 0px; WIDTH: 397px; TOP: 1px; HEIGHT: 119px" onfocus=charsleft(this); name=smsmsg rows=7 wrap=VIRTUAL cols=66 onchange=charsleft(this);></TEXTAREA>
                </TD></TR>
  <TR>
    <TD></TD>
    <TD>&nbsp;</TD>
    <TD align=right><FONT face=Verdana color=#336699 size=2>Characters
      Left&nbsp;</FONT><INPUT class=forms style="LEFT: 1px; TOP: 1px"
      onfocus=this.blur size=4 value=250 name=num></TD>
    </TR>
  <TR>
    <TD> </TD>
    <TD>&nbsp; </TD>
    <TD><INPUT class=button type=submit value="Send " border=0 name=submit width="10" height="5"> </TD>
    </TR>
    </TABLE>
</form>
<?php } ?>
</BODY>
</HTML>