"; echo ""; if ($action == "") { echo "Please choose an option from the list below:

"; echo "
  • Send SMS message"; echo "
  • Send MMS message"; echo "

    "; } elseif ($action == "sms") { echo "Please fill in the form below to send your message:

    "; echo "
    "; echo ""; echo "Full International Format Mobile/Cell Phone Number (i.e. 447700912345):
    "; echo ""; echo "

    Message:
    "; echo ""; echo "

    "; echo "  |  "; echo "
    "; } elseif ($action == "sendsms") { $message = stripslashes($message); $message = ascii_convert($message); $sending = http_post("www.csoft.co.uk", 80, "/webservices/http/sendsms", array("Username" => $uname, "PIN" => $pin, "SendTo" => $phone, "Message" => $message)); // $sending = http_post("www2.csoft.co.uk", 80, "/webservices/http/sendsms", array("Username" => $uname, "PIN" => $pin, "SendTo" => $phone, "Message" => $message)); } elseif ($action == "mms") { echo "Please fill in the form below to send your message:

    "; echo "
    "; echo ""; echo "Full International Format Mobile/Cell Phone Number (i.e 447700912345):
    "; echo ""; echo "

    Image: "; echo "

    Message:
    "; echo ""; echo "


    "; echo "  |  "; } elseif ($action == "sendmms") { if (is_uploaded_file($userfile)) { if ($userfile_size > $max_size) { echo "The file is too big. Please click back to try again with a smaller image.

    "; exit; } if (($userfile_type == "image/gif") || ($userfile_type == "image/jpeg") || ($userfile_type == "image/jpg") || ($userfile_type == "image/pjpeg")) { if (file_exists($path.$userfile_name)) { echo "Sorry. An image with that name already exists. Please rename the image and click back to try again.

    "; exit; } $res = copy($userfile, $path.$userfile_name); if (!$res) { echo "Sorry. The upload failed. Please click back to try again.

    "; exit; } else { echo "File $userfile_name uploaded successfully. Thank you.

    "; $success = "yes"; } } else { echo "Sorry. Your file needs to be either a .gif or .jpg file. Please click back to try again.
    \n"; exit; } } if ($success == "yes") { $filetoattach = $path.$userfile_name; $filehandle = fopen("$filetoattach", "r"); $data = fread($filehandle, filesize($filetoattach)); fclose ($filehandle); $data = bin2hex($data); $message = stripslashes($message); $message = ascii_convert($message); $sending = http_post("www.csoft.co.uk", 80, "/webservices/http/sendmms", array("Username" => $uname, "PIN" => $pin, "SendTo" => $phone, "Message" => $message, "WAPPushFileName1" => $userfile_name, "WAPPushFileData1" => $data)); // $sending = http_post("www2.csoft.co.uk", 80, "/webservices/http/sendmms", array("Username" => $uname, "PIN" => $pin, "SendTo" => $phone, "Message" => $message, "WAPPushFileName1" => $userfile_name, "WAPPushFileData1" => $data)); $delete = @unlink($filetoattach); echo "

    Result: $sending

    "; } }