Example #1
0
<?php

include $DOCUMENT_ROOT . '/phplib/prepend.php';
include $DOCUMENT_ROOT . '/phplib/smsapi.php';
page_open(array("sess" => "whatsup_Session", "auth" => "whatsup_Auth", "perm" => "whatsup_Perm"));
echo "<script language=JavaScript src=currency.js></script>\n";
echo "<script language=JavaScript src=datefunc.js>\n//Parts taken from ts_picker.js\n//Script by Denis Gritcyuk: tspicker@yahoo.com\n//Submitted to JavaScript Kit (http://javascriptkit.com)\n//Visit http://javascriptkit.com for this script\n</script>\n<script language=JavaScript>\nfunction DoCustomChecks(form) {\n  return true;\n}\nfunction SmsFormValidator(form,max) {\n var total = 0;\n for (var idx = 1; idx <= max; idx++) {\n   if (eval('document.SmsForm.SendTo' + idx + '.checked') == true) {\n    total += 1;\n   }\n }\n if (total==0) {\n        alert('You have not selected any recipients.');\n        return false;\n }\n if (form.Message.value.length==0) {\n        alert('You have not typed in your message.');\n        form.Message.focus();\n        return false;\n }else{\n        return true;\n }\n}\n\n<!-- Original:  Ronnie T. Moore -->\n<!-- Web Site:  The JavaScript Source -->\n<!-- Dynamic 'fix' by: Nannette Thacker -->\n<!-- Web Site: http://www.shiningstar.net -->\n<!-- This script and many more are available free online at -->\n<!-- The JavaScript Source!! http://javascript.internet.com -->\n<!-- Begin\nfunction textCounter(field, countfield, maxlimit) {\nif (field.value.length > maxlimit) // if too long...trim it!\nfield.value = field.value.substring(0, maxlimit);\n// otherwise, update 'characters left' counter\nelse \ncountfield.value = maxlimit - field.value.length;\n}\n// End -->\n</script> \n";
class my_SmsAddressBookform extends SmsAddressBookform
{
    var $classname = "my_SmsAddressBookform";
}
$f = new my_SmsAddressBookform();
$db = new DB_whatsup();
if ($submit) {
    switch ($submit) {
        case "Save":
            if ($id) {
                $submit = "Edit";
            } else {
                $submit = "Add";
            }
        case "Add":
        case "Edit":
            $Charge = 4;
            if (isset($auth)) {
                if (!$f->validate($result)) {
                    $cmd = $submit;
                    echo "<font class=bigTextBold>{$cmd} Sms Address Book</font>\n";
                    $f->display();
                    page_close();
                    exit;
Example #2
0
}
switch ($cmd) {
    case "View":
    case "Delete":
        $f->freeze();
    case "Add":
    case "Edit":
        echo "<font class=bigTextBold>{$cmd} Sms Log</font>\n";
        $f->display();
        break;
    default:
        $cmd = "Query";
        $t = new SmsLogTable();
        $t->heading = 'on';
        $t->add_extra = 'on';
        $db = new DB_whatsup();
        echo "&nbsp<a href=\"" . $sess->self_url() . $sess->add_query(array("cmd" => "Add")) . "\">Add Sms Log</a>&nbsp\n";
        echo "&nbsp<a href=\"" . $sess->url("/index.php") . "\">Home</a>&nbsp\n";
        echo "<font class=bigTextBold>{$cmd} Sms Log</font>\n";
        // These fields will be searchable and displayed in results.
        // Format is "RealFieldName"=>"Field Name Formatted For Display",
        $t->fields = array("UserName", "Result", "RecipientName", "RecipientNumber", "SenderNumber", "MsgType", "DateTime", "Tracking");
        $t->map_cols = array("UserName" => "User Name", "Result" => "Result", "RecipientName" => "Recipient Name", "RecipientNumber" => "Recipient Number", "SenderNumber" => "Sender Number", "MsgType" => "Msg Type", "DateTime" => "Date Time", "Tracking" => "Tracking");
        // When we hit this page the first time,
        // there is no .
        if (!isset($q)) {
            $q = new SmsLog_Sql_Query();
            // We make one
            $q->conditions = 1;
            // ... with a single condition (at first)
            $q->translate = "on";
Example #3
0
<?php

include $DOCUMENT_ROOT . '/phplib/prepend.php';
include $DOCUMENT_ROOT . '/phplib/smsapi.php';
page_open(array("sess" => "whatsup_Session", "auth" => "whatsup_Auth", "perm" => "whatsup_Perm"));
echo "<script language=JavaScript src=currency.js></script>\n";
echo "<script language=JavaScript src=datefunc.js>\n//Parts taken from ts_picker.js\n//Script by Denis Gritcyuk: tspicker@yahoo.com\n//Submitted to JavaScript Kit (http://javascriptkit.com)\n//Visit http://javascriptkit.com for this script\n</script>\n<script language=JavaScript>\nfunction DoCustomChecks(form) {\n  return true;\n}\nfunction SmsFormValidator(form,max) {\n var total = 0;\n for (var idx = 1; idx <= max; idx++) {\n   if (eval('document.SmsForm.SendTo' + idx + '.checked') == true) {\n    total += 1;\n   }\n }\n if (total==0) {\n\talert('You have not selected any recipients.');\n\treturn false;\n }\n if (form.Message.value.length==0) {\n\talert('You have not typed in your message.');\n\tform.Message.focus();\n\treturn false;\n }else{\n        return true;\n }\n}\n\n<!-- Original:  Ronnie T. Moore -->\n<!-- Web Site:  The JavaScript Source -->\n<!-- Dynamic 'fix' by: Nannette Thacker -->\n<!-- Web Site: http://www.shiningstar.net -->\n<!-- This script and many more are available free online at -->\n<!-- The JavaScript Source!! http://javascript.internet.com -->\n<!-- Begin\nfunction textCounter(field, countfield, maxlimit) {\nif (field.value.length > maxlimit) // if too long...trim it!\nfield.value = field.value.substring(0, maxlimit);\n// otherwise, update 'characters left' counter\nelse \ncountfield.value = maxlimit - field.value.length;\n}\n// End -->\n</script> \n";
class my_SmsAddressBookform extends SmsAddressBookform
{
    var $classname = "my_SmsAddressBookform";
}
$f = new my_SmsAddressBookform();
$db = new DB_whatsup();
if ($submit) {
    switch ($submit) {
        case "Save":
            if ($id) {
                $submit = "Edit";
            } else {
                $submit = "Add";
            }
        case "Add":
        case "Edit":
            $Charge = 4;
            if (isset($auth)) {
                if (!$f->validate($result)) {
                    $cmd = $submit;
                    echo "<font class=bigTextBold>{$cmd} Sms Address Book</font>\n";
                    $f->display();
                    page_close();
                    exit;