// This file is part of Moodle - http://moodle.org/ // // Moodle is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Moodle is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with Moodle. If not, see <http://www.gnu.org/licenses/>. /* SMS Notifier Block * SMS notifier is a one way SMS messaging block that allows managers, teachers and administrators to * send text messages to their student and teacher. * @package blocks * @author: Azmat Ullah, Talha Noor * @date: 06-Jun-2013 */ $msg = addslashes((string) $_REQUEST['msg']); require_once '../../config.php'; require_once 'sms_form.php'; require_once "lib.php"; $c_id = required_param('c_id', PARAM_INT); $r_id = required_param('r_id', PARAM_INT); $form = new sms_send(); $table = $form->display_report($c_id, $r_id); $a = html_writer::table($table); echo $a . "<input type='hidden' value=\"'{$msg}'\" name='msg' />";
<?php /** * [Discuz!] (C)2001-2099 Comsenz Inc. * This is NOT a freeware, use is subject to license terms * * $Id: member_register.php 23897 2011-08-15 09:21:07Z zhengqingpeng $ */ if (!defined('IN_DISCUZ')) { exit('Access Denied'); } define('NOROBOT', TRUE); $ctl_obj = new sms_send(); $ctl_obj->setting = $_G['setting']; $ctl_obj->template = 'member/vertify'; $ctl_obj->on_sms();
echo "<form action='#' method='GET' name='tests'>" . $a . "<input type='submit' name='submit' value='submit'/><input type='hidden'\n name='viewpage' id='viewpage' value='{$viewpage}'/></form>"; if (isset($_GET['submit'])) { $user = $_GET['user']; if (empty($user)) { echo "You didn't select any user."; } else { $N = count($user); } for ($i = 0; $i <= $N; $i++) { send_sms($user[$i], "SMS sent successfully"); } } } } else { if ($viewpage == 2) { $form = new sms_send(); $form->display(); $table = $form->display_report(); $a = html_writer::table($table); echo "<form action='' method='post' name='tests'><div id='table-change'>" . $a . "</div><input type='submit' style='margin-left:700px;'\n name='submit' id='smssend' value='Send SMS'/><input type='hidden' name='viewpage' id='viewpage' value='{$viewpage}'/></form>"; if (isset($_REQUEST['submit'])) { $msg = $_REQUEST['msg']; // SMS Meassage. $user = $_REQUEST['user']; // User ID. if (empty($user)) { echo "You didn't select any user."; } else { $N = count($user); } global $DB, $CFG;