<?php defined('_SECURE_') or die('Forbidden'); if (!auth_isvalid()) { auth_block(); } $gpid = $_REQUEST['gpid']; $pid = $_REQUEST['pid']; $tid = $_REQUEST['tid']; if ($tid = $_REQUEST['tid']) { if (!($tid = dba_valid(_DB_PREF_ . '_featureMsgtemplate', 'tid', $tid))) { auth_block(); } } switch (_OP_) { case "list": $fm_name = "fm_smstemp"; $content = "\n\t\t\t<h2>" . _('Message template') . "</h2>\n\t\t\t<form id={$fm_name} name={$fm_name} action='index.php?app=main&inc=feature_msgtemplate&op=actions' method=POST>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=go value=delete>\n\t\t\t<div class=actions_box>\n\t\t\t<div class=pull-left><a href='" . _u('index.php?app=main&inc=feature_msgtemplate&op=add') . "'>" . $icon_config['add'] . "</a></div>\n\t\t\t<div class=pull-right>\n\t\t\t\t<a href='#' onClick=\"return SubmitConfirm('" . _('Are you sure you want to delete these items ?') . "', '" . $fm_name . "');\">" . $icon_config['delete'] . "</a>\n\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead><tr>\n\t\t\t\t<th width=30%>" . _('Name') . "</th>\n\t\t\t\t<th width=65%>" . _('Content') . "</th>\n\t\t\t\t<th width=5%><input type=checkbox onclick=CheckUncheckAll(document." . $fm_name . ")></th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>"; $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureMsgtemplate WHERE uid='" . $user_config['uid'] . "' ORDER BY t_title"; $db_result = dba_query($db_query); $i = 0; while ($db_row = dba_fetch_array($db_result)) { $tid = $db_row['tid']; $temp_title = $db_row['t_title']; $temp_text = $db_row['t_text']; $i++; $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td><a href='" . _u('index.php?app=main&inc=feature_msgtemplate&op=edit&tid=' . $tid) . "'>" . $temp_title . "</a></td>\n\t\t\t\t\t<td>{$temp_text}</td>\n\t\t\t\t\t<td><input type=checkbox name=chkid" . $i . "></td>\n\t\t\t\t\t<input type=hidden name=chkid_value" . $i . " value='" . $db_row['tid'] . "'>\n\t\t\t\t</tr>"; } $content .= "\n\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t<input type='hidden' name='item_count' value='{$i}'>\n\t\t\t</form>\n\t\t\t<div class=text-info>\n\t\t\t\t<p>" . _('Notes') . "</p>\n\t\t\t\t<ul>\n\t\t\t\t\t<li>#NAME# " . _('will be replaced with the name listed in phonebook') . "</li>\n\t\t\t\t\t<li>#NUM# " . _('will be replaced with the phone number listed in phonebook') . "</li>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t"; if ($err = TRUE) { _p(_dialog());
* (at your option) any later version. * * playSMS 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 playSMS. If not, see <http://www.gnu.org/licenses/>. */ defined('_SECURE_') or die('Forbidden'); if (!auth_isvalid()) { auth_block(); } if ($custom_id = $_REQUEST['custom_id']) { if (!($custom_id = dba_valid(_DB_PREF_ . '_featureCustom', 'custom_id', $custom_id))) { auth_block(); } } switch (_OP_) { case "sms_custom_list": $content .= _dialog() . "\n\t\t\t<h2>" . _('Manage custom') . "</h2>\n\t\t\t" . _button('index.php?app=main&inc=feature_sms_custom&op=sms_custom_add', _('Add SMS custom')); if (!auth_isadmin()) { $query_user_only = "WHERE uid='" . $user_config['uid'] . "'"; } $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureCustom " . $query_user_only . " ORDER BY service_name, custom_keyword, sms_receiver"; $db_result = dba_query($db_query); $content .= "\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>"; if (auth_isadmin()) { $content .= "\n\t\t\t\t<thead><tr>\n\t\t\t\t\t<th width=20%>" . _('Service name') . "</th>\n\t\t\t\t\t<th width=50%>" . _('Service data') . "</th>\n\t\t\t\t\t<th width=20%>" . _('User') . "</th>\n\t\t\t\t\t<th width=10%>" . _('Action') . "</th>\n\t\t\t\t</tr></thead>"; } else {
* (at your option) any later version. * * playSMS 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 playSMS. If not, see <http://www.gnu.org/licenses/>. */ defined('_SECURE_') or die('Forbidden'); if (!auth_isvalid()) { auth_block(); } if ($id = $_REQUEST['id']) { if (!($id = dba_valid(_DB_PREF_ . '_featureAutorespond', 'id', $id))) { auth_block(); } } switch (_OP_) { case "autorespond_list": $content = _dialog() . "\n\t\t\t<h2>" . _('Manage autorespond') . "</h2>\n\t\t\t"; if (auth_isadmin()) { $content .= _button('index.php?app=main&inc=feature_autorespond&op=autorespond_add', _('Add SMS autorespond')); } else { $query_user_only = "AND uid='" . $user_config['uid'] . "'"; } $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureAutorespond WHERE flag_deleted='0' " . $query_user_only . " ORDER BY service_name, regex, sms_receiver"; $db_result = dba_query($db_query); $content .= "\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>"; if (auth_isadmin()) {
* (at your option) any later version. * * playSMS 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 playSMS. If not, see <http://www.gnu.org/licenses/>. */ defined('_SECURE_') or die('Forbidden'); if (!auth_isvalid()) { auth_block(); } if ($board_id = $_REQUEST['board_id']) { if (!($board_id = dba_valid(_DB_PREF_ . '_featureBoard', 'board_id', $board_id))) { auth_block(); } } switch (_OP_) { case "sms_board_list": $content = _err_display() . "\n\t\t\t<h2>" . _('Manage board') . "</h2>\n\t\t\t<p>" . _button('index.php?app=main&inc=feature_sms_board&op=sms_board_add', _('Add SMS board')) . "\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>\n\t\t\t<thead><tr>"; if (auth_isadmin()) { $content .= "\n\t\t\t\t<th width=20%>" . _('Keyword') . "</th>\n\t\t\t\t<th width=50%>" . _('Forward') . "</th>\n\t\t\t\t<th width=20%>" . _('User') . "</th>\n\t\t\t\t<th width=10%>" . _('Action') . "</th>"; } else { $content .= "\n\t\t\t\t<th width=20%>" . _('Keyword') . "</th>\n\t\t\t\t<th width=70%>" . _('Forward') . "</th>\n\t\t\t\t<th width=10%>" . _('Action') . "</th>"; } $content .= "\n\t\t\t</tr></thead>\n\t\t\t<tbody>"; if (!auth_isadmin()) { $query_user_only = "WHERE uid='" . $user_config['uid'] . "'"; }
<?php defined('_SECURE_') or die('Forbidden'); if (!valid()) { forcenoaccess(); } if ($collect_id = $_REQUEST['collect_id']) { if (!($collect_id = dba_valid(_DB_PREF_ . '_featureCollect', 'collect_id', $collect_id))) { forcenoaccess(); } } if ($route = $_REQUEST['route']) { $fn = $apps_path['plug'] . '/feature/sms_collect/' . $route . '.php'; if (file_exists($fn)) { include $fn; exit; } } switch ($op) { case "sms_collect_list": if ($err = $_SESSION['error_string']) { $content = "<div class=error_string>{$err}</div>"; } $content .= "\n\t\t\t<h2>" . _('Manage collect') . "</h2>\n\t\t\t<p>" . _button('index.php?app=menu&inc=feature_sms_collect&op=sms_collect_add', _('Add SMS collect')) . "\n\t\t\t<table width=100% class=sortable>\n\t\t\t<thead><tr>\n\t\t\t\t<th width=20%>" . _('Keyword') . "</th>\n\t\t\t\t<th width=20%>" . _('Total Requests') . "</th>\n\t\t\t\t<th width=40%>" . _('User') . "</th>\n\t\t\t\t<th width=10%>" . _('Status') . "</th>\n\t\t\t\t<th width=10%>" . _('Action') . "</th>\n\t\t\t</tr></thead>"; if (!isadmin()) { $query_user_only = "WHERE uid='{$uid}'"; } $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureCollect {$query_user_only} ORDER BY collect_id"; $db_result = dba_query($db_query); $i = 0; while ($db_row = dba_fetch_array($db_result)) {
<?php defined('_SECURE_') or die('Forbidden'); if ($plugin_config['sms_command']['allow_user_access']) { if (!auth_isvalid()) { auth_block(); } } else { if (!auth_isadmin()) { auth_block(); } } if ($command_id = $_REQUEST['command_id']) { if (!($command_id = dba_valid(_DB_PREF_ . '_featureCommand', 'command_id', $command_id))) { auth_block(); } } $sms_command_bin = $plugin_config['sms_command']['bin']; switch (_OP_) { case "sms_command_list": if ($err = TRUE) { $content = _dialog(); } $content .= "\n\t\t\t<h2>" . _('Manage command') . "</h2>\n\t\t\t" . _button('index.php?app=main&inc=feature_sms_command&op=sms_command_add', _('Add SMS command')); if (!auth_isadmin()) { $query_user_only = "WHERE uid='" . $user_config['uid'] . "'"; } $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureCommand " . $query_user_only . " ORDER BY command_keyword"; $db_result = dba_query($db_query); $content .= "\n\t\t\t<div class=table-responsive>\n\t\t\t<table class=playsms-table-list>"; if (auth_isadmin()) {
case 'delete': foreach ($items as $item) { if (dba_remove(_DB_PREF_ . '_featurePhonebook', array('uid' => $user_config['uid'], 'id' => $item))) { dba_remove(_DB_PREF_ . '_featurePhonebook_group_contacts', array('pid' => $item)); $_SESSION['dialog']['info'][] = _('Selected contact has been deleted'); } } break; } $gpid = 0; $ops = explode('_', _OP_); if ($ops[0] == 'move' && $ops[1]) { $gpid = $ops[1]; } if ($gpid && dba_valid(_DB_PREF_ . '_featurePhonebook_group', 'id', $gpid)) { foreach ($items as $item) { if (dba_valid(_DB_PREF_ . '_featurePhonebook', 'id', $item)) { if (dba_remove(_DB_PREF_ . '_featurePhonebook_group_contacts', array('pid' => $item)) or dba_isavail(_DB_PREF_ . '_featurePhonebook_group_contacts', array('pid' => $item))) { $data = array('pid' => $item, 'gpid' => $gpid); if (dba_add(_DB_PREF_ . '_featurePhonebook_group_contacts', $data)) { $_SESSION['dialog']['info'][] = _('Selected contact moved to new group'); } } } } } $search = themes_search_session(); $nav = themes_nav_session(); $ref = $search['url'] . '&search_keyword=' . $search['keyword'] . '&search_category=' . $search['category'] . '&page=' . $nav['page'] . '&nav=' . $nav['nav']; header("Location: " . _u($ref)); exit;