当前位置: 首页>>代码示例>>PHP>>正文


PHP _back函数代码示例

本文整理汇总了PHP中_back函数的典型用法代码示例。如果您正苦于以下问题:PHP _back函数的具体用法?PHP _back怎么用?PHP _back使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了_back函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: _

     if ($plugin_config['kannel']['local_time']) {
         $selected1 = 'selected';
     } else {
         $selected2 = 'selected';
     }
     $option_local_time = "\n\t\t\t<option value=1 {$selected1}>" . _('Yes') . "</option>\n\t\t\t<option value=0 {$selected2}>" . _('No') . "</option>\n\t\t\t";
     $admin_port = $plugin_config['kannel']['admin_port'];
     $admin_host = $plugin_config['kannel']['sendsms_host'];
     $admin_host = $admin_port ? $admin_host . ':' . $admin_port : $admin_host;
     $admin_password = $plugin_config['kannel']['admin_password'];
     $url = 'http://' . $admin_host . '/status?password=' . urlencode($admin_password);
     $kannel_status = @file_get_contents($url);
     if (!$kannel_status) {
         $kannel_status = 'Unable to access Kannel admin commands';
     }
     $content .= _dialog() . "\n\t\t\t<h2>" . _('Manage kannel') . "</h2>\n\t\t\t<ul class='nav nav-tabs nav-justified' id='playsms-tab'>\n\t\t\t\t<li class=active><a href='#tabs-configuration' data-toggle=tab>" . _('Configuration') . "</a></li>\n\t\t\t\t<li><a href='#tabs-operational' data-toggle=tab>" . _('Operational') . "</a></li>\n\t\t\t</ul>\n\t\t\t<div class=tab-content>\n\t\t\t\t<div id='tabs-configuration' class='tab-pane fade in active'>\n\t\t\t\t\t<form action=index.php?app=main&inc=gateway_kannel&op=manage_save method=post>\n\t\t\t\t\t" . _CSRF_FORM_ . "\n\t\t\t\t\t<table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class=label-sizer>" . _('Gateway name') . "</td><td>kannel</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Username') . "</td><td><input type=text maxlength=30 name=up_username value=\"" . $plugin_config['kannel']['username'] . "\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Password') . "</td><td><input type=password maxlength=30 name=up_password value=\"\"> " . _hint(_('Fill to change the password')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Module sender ID') . "</td><td><input type=text maxlength=16 name=up_module_sender value=\"" . $plugin_config['kannel']['module_sender'] . "\"> " . _hint(_('Max. 16 numeric or 11 alphanumeric char. empty to disable')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Module timezone') . "</td><td><input type=text size=5 maxlength=5 name=up_module_timezone value=\"" . $plugin_config['kannel']['module_timezone'] . "\"> " . _hint(_('Eg: +0700 for Jakarta/Bangkok timezone')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Bearerbox hostname or IP') . "</td><td><input type=text maxlength=250 name=up_bearerbox_host value=\"" . $plugin_config['kannel']['bearerbox_host'] . "\"> " . _hint(_('Kannel specific')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Send SMS hostname or IP') . "</td><td><input type=text maxlength=250 name=up_sendsms_host value=\"" . $plugin_config['kannel']['sendsms_host'] . "\"> " . _hint(_('Kannel specific')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Send SMS port') . "</td><td><input type=text maxlength=10 name=up_sendsms_port value=\"" . $plugin_config['kannel']['sendsms_port'] . "\"> " . _hint(_('Kannel specific')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('DLR mask') . "</td><td><input type=text maxlength=2 name=up_dlr_mask value=\"" . $plugin_config['kannel']['dlr_mask'] . "\"> " . _hint(_('Kannel dlr-mask option')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Additional URL parameter') . "</td><td><input type=text maxlength=250 name=up_additional_param value=\"" . $plugin_config['kannel']['additional_param'] . "\"></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('playSMS web URL') . "</td><td><input type=text maxlength=250 name=up_playsms_web value=\"" . $plugin_config['kannel']['playsms_web'] . "\"> " . _hint(_('URL to playSMS, empty it to set it to base URL')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Incoming SMS time is in local time') . "</td><td><select name=up_local_time>" . $option_local_time . "</select> " . _hint(_('Select no if the incoming SMS time is in UTC')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<p><input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t\t</div>\n\t\t\t\t<div id='tabs-operational' class='tab-pane fade'>\n\t\t\t\t\t<table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Kannel admin host') . "</td><td><input type=text maxlength=250 name=up_admin_host value=\"" . $plugin_config['kannel']['admin_host'] . " \"> " . _hint(_('HTTP Kannel admin host')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Kannel admin port') . "</td><td><input type=text maxlength=250 name=up_admin_port value=\"" . $plugin_config['kannel']['admin_port'] . "\"> " . _hint(_('HTTP Kannel admin port')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Kannel admin password') . "</td><td><input type=password maxlength=250 name=up_admin_password value=\"\"> " . _hint(_('HTTP Kannel admin password')) . "</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td>" . _('Kannel status') . "</td><td><textarea rows='20' style='height: 25em; width: 100%' disabled>" . $kannel_status . "</textarea></td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</tbody>\n\t\t\t\t\t</table>\n\t\t\t\t\t<p>\n\t\t\t\t\t\t<input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t\t\t\t<input type='button' value=\"" . _('Update status') . "\" class='button' onClick=\"parent.location.href='index.php?app=main&inc=gateway_kannel&op=manage_update'\">\n\t\t\t\t\t\t<input type='button' value=\"" . _('Restart Kannel') . "\" class='button' onClick=\"parent.location.href='index.php?app=main&inc=gateway_kannel&op=manage_restart'\">\n\t\t\t\t\t</p>\n\t\t\t\t\t</form>\n\t\t\t\t</div>\n\t\t\t\t<script type=\"text/javascript\" src=\"" . $core_config['http_path']['plug'] . "/themes/common/jscss/jquery.cookie.js\"></script>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\t\$(document).ready(function() {\n\t\t\t\t\t\t\$('a[data-toggle=\"tab\"]').on('shown.bs.tab', function(e){\n\t\t\t\t\t\t\t//save the latest tab using a cookie:\n\t\t\t\t\t\t\t\$.cookie('gateway_kannel_last_tab', \$(e.target).attr('href'));\n\t\t\t\t\t\t});\n\t\t\t\t\t\t\n\t\t\t\t\t\t//activate latest tab, if it exists:\n\t\t\t\t\t\tvar lastTab = \$.cookie('gateway_kannel_last_tab');\n\t\t\t\t\t\tif (lastTab) {\n\t\t\t\t\t\t\t\$('ul.nav-tabs').children().removeClass('active');\n\t\t\t\t\t\t\t\$('a[href='+ lastTab +']').parents('li:first').addClass('active');\n\t\t\t\t\t\t\t\$('div.tab-content').children().removeClass('in active');\n\t\t\t\t\t\t\t\$(lastTab).addClass('in active');\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t</script>\n\t\t\t</div>" . _back('index.php?app=main&inc=core_gateway&op=gateway_list');
     _p($content);
     break;
 case "manage_save":
     $items = array('username' => $_POST['up_username'], 'module_sender' => $_POST['up_module_sender'], 'module_timezone' => $_POST['up_module_timezone'], 'bearerbox_host' => $_POST['up_bearerbox_host'], 'sendsms_host' => $_POST['up_sendsms_host'], 'sendsms_port' => $_POST['up_sendsms_port'], 'playsms_web' => $_POST['up_playsms_web'], 'additional_param' => $_POST['up_additional_param'], 'dlr_mask' => $_POST['up_dlr_mask'], 'admin_host' => $_POST['up_admin_host'], 'admin_port' => $_POST['up_admin_port'], 'local_time' => $_POST['up_local_time']);
     if ($_POST['up_password']) {
         $items['password'] = $_POST['up_password'];
     }
     if ($_POST['up_admin_password']) {
         $items['admin_password'] = $_POST['up_admin_password'];
     }
     registry_update(1, 'gateway', 'kannel', $items);
     $_SESSION['dialog']['info'][] = _('Changes have been made');
     header("Location: " . _u('index.php?app=main&inc=gateway_kannel&op=manage'));
     exit;
     break;
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:kannel.php

示例2: inboxgroup_getdatabyid

 case 'del':
     $rid = $_REQUEST['rid'];
     $data = inboxgroup_getdatabyid($rid);
     $in_receiver = $data['in_receiver'];
     $keywords = $data['keywords'];
     $description = $data['description'];
     $c_members = count(inboxgroup_getmembers($rid));
     $c_members = "<a href='" . _u('index.php?app=main&inc=feature_inboxgroup&route=members&op=members&rid=' . $rid) . "'>" . $c_members . "</a>";
     $c_catchall = count(inboxgroup_getcatchall($rid));
     $c_catchall = "<a href='" . _u('index.php?app=main&inc=feature_inboxgroup&route=catchall&op=catchall&rid=' . $rid) . "'>" . $c_catchall . "</a>";
     $c_status = $data['status'] ? "<span class=status_enabled />" : "<span class=status_disabled />";
     if ($error_content) {
         $content .= $error_content;
     }
     unset($tpl);
     $tpl = array('name' => 'inboxgroup_del', 'vars' => array('DIALOG_DISPLAY' => $error_content, 'Group inbox' => _('Group inbox'), 'Delete group inbox' => _('Delete group inbox'), 'RID' => $rid, 'Receiver number' => _('Receiver number'), 'Keywords' => _('Keywords'), 'Description' => _('Description'), 'Members' => _('Members'), 'Catch-all' => _('Catch-all'), 'Status' => _('Status'), 'IN_RECEIVER' => $in_receiver, 'KEYWORDS' => $keywords, 'DESCRIPTION' => $description, 'C_MEMBERS' => $c_members, 'C_CATCHALL' => $c_catchall, 'C_STATUS' => $c_status, 'ARE_YOU_SURE' => _('Are you sure you want to delete this group inbox ?'), 'Yes' => _('Yes'), 'BACK' => _back('index.php?app=main&inc=feature_inboxgroup&op=list')));
     _p(tpl_apply($tpl));
     break;
 case 'del_submit':
     $rid = $_REQUEST['rid'];
     $data = inboxgroup_getdatabyid($rid);
     $in_receiver = $data['in_receiver'];
     if ($rid && $in_receiver) {
         if (inboxgroup_datadel($rid)) {
             $_SESSION['dialog']['info'][] = _('Group inbox has been deleted') . " (" . _('Number') . ": " . $in_receiver . ")";
         } else {
             $_SESSION['dialog']['info'][] = _('Fail to delete group inbox') . " (" . _('Number') . ": " . $in_receiver . ")";
         }
     } else {
         $_SESSION['dialog']['info'][] = _('Receiver number does not exist');
     }
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:inboxgroup.php

示例3: _

     if (strtoupper($c_sms_from) == strtoupper($sender_id)) {
         $selected = 'selected';
     }
     $option_sender_id .= "<option value=\"" . $sender_id . "\" title=\"" . $sender_id . "\" " . $selected . ">" . $sender_id . "</option>";
 }
 // admin or users
 if ($uname && (auth_isadmin() || $is_parent)) {
     $form_title = _('Manage account');
     // fixme anton - now disabled since plugin/feature/credit exists
     // $option_credit = "<tr><td>" . _('Credit') . "</td><td><input type=text maxlength=14 name=up_credit value=\"$credit\"></td></tr>";
     if ($is_parent) {
         $button_delete = "<input type=button class=button value='" . _('Delete') . "' onClick=\"javascript: ConfirmURL('" . _('Are you sure you want to delete subuser ?') . " (" . _('username') . ": " . $c_username . ")','index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_del" . $url_uname . "')\">";
         $button_back = _back('index.php?app=main&inc=core_user&route=subuser_mgmnt&op=subuser_list');
     } else {
         $button_delete = "<input type=button class=button value='" . _('Delete') . "' onClick=\"javascript: ConfirmURL('" . _('Are you sure you want to delete user ?') . " (" . _('username') . ": " . $c_username . ")','index.php?app=main&inc=core_user&route=user_mgmnt&op=user_del" . $url_uname . "&view=" . $view . "')\">";
         $button_back = _back('index.php?app=main&inc=core_user&route=user_mgmnt&op=user_list&view=' . $view);
     }
 } else {
     $form_title = _('User configuration');
     // fixme anton - now disabled since plugin/feature/credit exists
     // $option_credit = "<tr><td>" . _('Credit') . "</td><td>$credit</td></tr>";
 }
 // get access control list
 $c_option_acl = array_flip(acl_getall());
 $option_acl = _input('text', '', acl_getname($acl_id), array('readonly'));
 if (auth_isadmin()) {
     $option_acl = _select('up_acl_id', $c_option_acl, $acl_id);
 }
 if ($user_edited['status'] == 4) {
     $parent_id = user_getparentbyuid($user_edited['uid']);
     if ($parent_id == $user_config['uid']) {
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:user_config.php

示例4: defined

 * 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_isadmin()) {
    auth_block();
}
include $core_config['apps_path']['plug'] . "/gateway/generic/config.php";
switch (_OP_) {
    case "manage":
        if ($err = TRUE) {
            $error_content = _dialog();
        }
        $tpl = array('name' => 'generic', 'vars' => array('DIALOG_DISPLAY' => $error_content, 'Manage generic' => _('Manage generic'), 'Gateway name' => _('Gateway name'), 'Generic send SMS URL' => _mandatory(_('Generic send SMS URL')), 'Callback URL' => _('Callback URL'), 'API username' => _mandatory(_('API username')), 'API password' => _('API password'), 'Module sender ID' => _('Module sender ID'), 'Module timezone' => _('Module timezone'), 'Save' => _('Save'), 'Notes' => _('Notes'), 'HINT_CALLBACK_URL' => _hint(_('Empty callback URL to set default')), 'HINT_FILL_PASSWORD' => _hint(_('Fill to change the API password')), 'HINT_MODULE_SENDER' => _hint(_('Max. 16 numeric or 11 alphanumeric char. empty to disable')), 'HINT_TIMEZONE' => _hint(_('Eg: +0700 for Jakarta/Bangkok timezone')), 'CALLBACK_URL_IS' => _('Your current callback URL is'), 'CALLBACK_URL_ACCESSIBLE' => _('Your callback URL should be accessible from Generic'), 'GENERIC_PUSH_DLR' => _('Generic will push DLR and incoming SMS to your callback URL'), 'BUTTON_BACK' => _back('index.php?app=main&inc=core_gateway&op=gateway_list'), 'status_active' => $status_active, 'generic_param_url' => $plugin_config['generic']['url'], 'generic_param_callback_url' => $plugin_config['generic']['callback_url'], 'generic_param_api_username' => $plugin_config['generic']['api_username'], 'generic_param_module_sender' => $plugin_config['generic']['module_sender'], 'generic_param_datetime_timezone' => $plugin_config['generic']['datetime_timezone']));
        _p(tpl_apply($tpl));
        break;
    case "manage_save":
        $up_url = $_REQUEST['up_url'] ? $_REQUEST['up_url'] : $plugin_config['generic']['default_url'];
        $up_callback_url = $_REQUEST['up_callback_url'] ? $_REQUEST['up_callback_url'] : $plugin_config['generic']['default_callback_url'];
        $up_api_username = $_REQUEST['up_api_username'];
        $up_api_password = $_REQUEST['up_api_password'];
        $up_module_sender = $_REQUEST['up_module_sender'];
        $up_datetime_timezone = $_REQUEST['up_datetime_timezone'];
        if ($up_url && $up_api_username) {
            $items = array('url' => $up_url, 'callback_url' => $up_callback_url, 'api_username' => $up_api_username, 'module_sender' => $up_module_sender, 'datetime_timezone' => $up_datetime_timezone);
            if ($up_api_password) {
                $items['api_password'] = $up_api_password;
            }
            if (registry_update(0, 'gateway', 'generic', $items)) {
开发者ID:vasrush,项目名称:playSMS,代码行数:31,代码来源:generic.php

示例5: defined

 * along with playSMS. If not, see <http://www.gnu.org/licenses/>.
 */
defined('_SECURE_') or die('Forbidden');
if (!auth_isadmin()) {
    auth_block();
}
@set_time_limit(0);
switch (_OP_) {
    case "all_outgoing":
        $search_category = array(_('User') => 'username', _('Gateway') => 'p_gateway', _('SMSC') => 'p_smsc', _('Time') => 'p_datetime', _('To') => 'p_dst', _('Message') => 'p_msg', _('Footer') => 'p_footer');
        $base_url = 'index.php?app=main&inc=feature_report&route=all_outgoing&op=all_outgoing';
        $queue_label = "";
        $queue_home_link = "";
        if ($queue_code = trim($_REQUEST['queue_code'])) {
            $queue_label = "<h4>" . sprintf(_('List of queue %s'), $queue_code) . "</h4>";
            $queue_home_link = _back($base_url);
            $base_url .= '&queue_code=' . $queue_code;
            $search = themes_search($search_category, $base_url);
            $conditions = array('A.queue_code' => $queue_code, 'A.flag_deleted' => 0);
            $keywords = $search['dba_keywords'];
            $table = _DB_PREF_ . '_tblSMSOutgoing';
            $join = "INNER JOIN " . _DB_PREF_ . "_tblUser AS B ON B.flag_deleted='0' AND A.uid=B.uid";
            $count = dba_count($table . ' AS A', $conditions, $keywords, '', $join);
            $nav = themes_nav($count, $search['url']);
            $extras = array('ORDER BY' => 'A.smslog_id DESC', 'LIMIT' => $nav['limit'], 'OFFSET' => $nav['offset']);
            $list = dba_search($table . ' AS A', 'B.username, A.p_gateway, A.p_smsc, A.smslog_id, A.p_dst, A.p_sms_type, A.p_msg, A.p_footer, A.p_datetime, A.p_update, A.p_status, A.uid, A.queue_code', $conditions, $keywords, $extras, $join);
        } else {
            $search = themes_search($search_category, $base_url);
            $conditions = array('A.flag_deleted' => 0);
            $keywords = $search['dba_keywords'];
            $table = _DB_PREF_ . '_tblSMSOutgoing';
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:all_outgoing.php

示例6: defined

 *
 * 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_isadmin()) {
    auth_block();
}
include $core_config['apps_path']['plug'] . "/gateway/openvox/config.php";
$callback_url = $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/plugin/gateway/openvox/callback.php";
$callback_url = str_replace("//", "/", $callback_url);
$callback_url = "http://" . $callback_url;
switch (_OP_) {
    case "manage":
        if ($err = TRUE) {
            $error_content = _dialog();
        }
        $tpl = array('name' => 'openvox', 'vars' => array('DIALOG_DISPLAY' => $error_content, 'Manage OpenVox' => _('Manage OpenVox'), 'Gateway name' => _('Gateway name'), 'Gateway host' => _('Gateway host'), 'Gateway port' => _('Gateway port'), 'Username' => _('Username'), 'Password' => _('Password'), 'Module sender ID' => _('Module sender ID'), 'Module timezone' => _('Module timezone'), 'Save' => _('Save'), 'Notes' => _('Notes'), 'HINT_FILL_SECRET' => _hint(_('Fill to change the password')), 'CALLBACK_URL_IS' => _('Your callback URL is'), 'CALLBACK_URL_ACCESSIBLE' => _('Your callback URL should be accessible from OpenVox'), 'BUTTON_BACK' => _back('index.php?app=main&inc=core_gateway&op=gateway_list'), 'openvox_param_gateway_host' => $plugin_config['openvox']['gateway_host'], 'openvox_param_gateway_port' => $plugin_config['openvox']['gateway_port'], 'openvox_param_username' => $plugin_config['openvox']['username'], 'callback_url' => $callback_url));
        _p(tpl_apply($tpl));
        break;
    case "manage_save":
        $_SESSION['dialog']['info'][] = _('Changes have been made');
        $items = array('gateway_host' => $_POST['up_gateway_host'], 'gateway_port' => $_POST['up_gateway_port'], 'username' => $_POST['up_username'], 'password' => $_POST['up_password']);
        if ($_POST['up_password']) {
            $items['password'] = $_POST['up_password'];
        }
        registry_update(1, 'gateway', 'openvox', $items);
        header("Location: " . _u('index.php?app=main&inc=gateway_openvox&op=manage'));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:openvox.php

示例7: sender_id_description

     if ($nav['url']) {
         $ref = $nav['url'] . '&search_keyword=' . $search['keyword'] . '&page=' . $nav['page'] . '&nav=' . $nav['nav'];
     } else {
         $ref = 'index.php?app=main&inc=core_sender_id&op=sender_id_list';
     }
     $items['id'] = $_REQUEST['id'];
     $items['uid'] = $uid;
     $items['sender_id'] = $data_sender_id[0]['registry_key'];
     $items['description'] = sender_id_description($uid, $data_sender_id[0]['registry_key']);
     if (auth_isadmin()) {
         $select_approve = _yesno('approved', $data_sender_id[0]['registry_value']);
         $select_users = user_getfieldbyuid($uid, 'name') . ' (' . user_uid2username($uid) . ')';
     }
     $default_sender_id = sender_id_default_get($uid);
     $select_default = _yesno('default', strtoupper($data_sender_id[0]['registry_key']) == strtoupper($default_sender_id) ? 1 : 0);
     $tpl = array('name' => 'sender_id_add', 'vars' => array('DIALOG_DISPLAY' => _dialog(), 'FORM_TITLE' => _('Manage sender ID'), 'FORM_SUBTITLE' => _('Edit sender ID'), 'ACTION_URL' => _u('index.php?app=main&inc=core_sender_id&op=sender_id_edit_yes'), 'BUTTON_BACK' => _back($ref), 'HTTP_PATH_THEMES' => _HTTP_PATH_THEMES_, 'HINT_DEFAULT' => _hint(_('Only when the sender ID is approved')), 'input_tag' => 'readonly', 'Sender ID' => _mandatory(_('Sender ID')), 'Description' => _('Description'), 'User' => _('User'), 'Approve sender ID' => _('Approve sender ID'), 'Set as default' => _('Set as default')), 'ifs' => array('isadmin' => auth_isadmin()), 'injects' => array('select_default', 'select_approve', 'select_users', 'items', 'icon_config', 'core_config'));
     _p(tpl_apply($tpl));
     break;
 case "sender_id_edit_yes":
     if (sender_id_update($uid, $c_sender_id, $c_sender_id_description, $_REQUEST['default'], $_REQUEST['approved'])) {
         $_SESSION['dialog']['info'][] = _('Sender ID description has been updated') . ' (' . _('Sender ID') . ': ' . $c_sender_id . ')';
     } else {
         $_SESSION['dialog']['info'][] = _('Fail to update due to invalid sender ID') . ' (' . _('Sender ID') . ': ' . $c_sender_id . ')';
     }
     header("Location: " . _u('index.php?app=main&inc=core_sender_id&op=sender_id_edit&id=' . $_REQUEST['id']));
     exit;
     break;
 case "toggle_status":
     $search = array('id' => $_REQUEST['id'], 'registry_family' => 'sender_id');
     foreach (registry_search_record($search) as $row) {
         $status = $row['registry_value'] == 0 ? 1 : 0;
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:sender_id.php

示例8: _

     if ($err = $_SESSION['error_string']) {
         $content = "<div class=error_string>{$err}</div>";
     }
     $content .= "\n\t\t\t<h2>" . _('Manage poll') . "</h2>\n\t\t\t<h3>" . _('Edit SMS poll') . "</h3>\n\t\t\t<form action=index.php?app=main&inc=feature_sms_poll&op=sms_poll_edit_yes method=post>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=poll_id value=\"{$poll_id}\">\n\t\t\t<input type=hidden name=edit_poll_keyword value=\"{$edit_poll_keyword}\">\n\t\t\t<table class=playsms-table>\n\t\t\t<tr>\n\t\t\t\t<td class=label-sizer>" . _('SMS poll keyword') . "</td><td>{$edit_poll_keyword}</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('SMS poll title') . "</td><td><input type=text maxlength=100 name=edit_poll_title value=\"{$edit_poll_title}\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('SMS poll access code') . "</td><td><input type=text maxlength=100 name=edit_poll_access_code value=\"{$edit_poll_access_code}\"> " . _hint(_('SMS poll access code used mainly by webservices')) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Vote option') . "</td><td>" . _select('edit_poll_option_vote', $option_vote, $edit_poll_option_vote) . "</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Reply message on out of vote option') . "</td><td><textarea maxlength=160 name=\"edit_poll_message_option\">{$edit_poll_message_option}</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Reply message on valid vote') . "</td><td><textarea maxlength=160 name=\"edit_poll_message_valid\">{$edit_poll_message_valid}</textarea></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Reply message on invalid vote') . "</td><td><textarea maxlength=160 name=\"edit_poll_message_invalid\">{$edit_poll_message_invalid}</textarea></td>\n\t\t\t</tr>\n\t\t\t" . $select_reply_smsc . "\n\t\t\t</table>\n\t\t\t<p><input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t</form>\n\t\t\t<br />\n\t\t\t<h3>" . _('Edit SMS poll choices') . "</h3>";
     $db_query = "SELECT choice_id,choice_title,choice_keyword FROM " . _DB_PREF_ . "_featurePoll_choice WHERE poll_id='{$poll_id}' ORDER BY choice_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>\n\t\t\t<thead><tr>\n\t\t\t\t<th width=20%>" . _('Choice keyword') . "</th>\n\t\t\t\t<th width=70%>" . _('Description') . "</th>\n\t\t\t\t<th width=10%>" . _('Action') . "</th>\n\t\t\t</tr></thead>\n\t\t\t<tbody>";
     $i = 0;
     while ($db_row = dba_fetch_array($db_result)) {
         $choice_id = $db_row['choice_id'];
         $choice_keyword = $db_row['choice_keyword'];
         $choice_title = $db_row['choice_title'];
         $i++;
         $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>{$choice_keyword}</td>\n\t\t\t\t\t<td>{$choice_title}</td>\n\t\t\t\t\t<td><a href=\"javascript:ConfirmURL('" . _('Are you sure you want to delete choice ?') . " (" . _('title') . ": " . addslashes($choice_title) . ", " . _('keyword') . ": " . $choice_keyword . ")','" . _u('index.php?app=main&inc=feature_sms_poll&op=sms_poll_choice_del&poll_id=' . $poll_id . '&choice_id=' . $choice_id) . "');\">" . $icon_config['delete'] . "</a></td>\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<br />\n\t\t\t<p>" . _('Add choice to this poll') . "\n\t\t\t<form action=\"index.php?app=main&inc=feature_sms_poll&op=sms_poll_choice_add\" method=post>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<input type=hidden name=poll_id value=\"{$poll_id}\">\n\t\t\t<table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t\t<tr>\n\t\t\t\t<td class=label-sizer>" . _('Choice keyword') . "</td><td><input type=text size=3 maxlength=10 name=add_choice_keyword></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Choice description') . "</td><td><input type=text maxlength=250 name=add_choice_title></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p><input type=submit class=button value=\"" . _('Add') . "\">\n\t\t\t</form>\n\t\t\t" . _back('index.php?app=main&inc=feature_sms_poll&op=sms_poll_list');
     _p($content);
     break;
 case "sms_poll_edit_yes":
     $edit_poll_keyword = strtoupper($_POST['edit_poll_keyword']);
     $edit_poll_title = $_POST['edit_poll_title'];
     $edit_poll_access_code = $_POST['edit_poll_access_code'];
     $edit_poll_option_vote = (int) $_POST['edit_poll_option_vote'];
     $edit_poll_message_option = $_POST['edit_poll_message_option'];
     $edit_poll_message_valid = $_POST['edit_poll_message_valid'];
     $edit_poll_message_invalid = $_POST['edit_poll_message_invalid'];
     if (auth_isadmin()) {
         $edit_smsc = $_POST['edit_smsc'];
         $query_smsc = ",smsc='{$edit_smsc}'";
     }
     if ($poll_id && $edit_poll_title && $edit_poll_keyword && $edit_poll_message_valid && $edit_poll_message_invalid) {
开发者ID:yrahman,项目名称:playSMS,代码行数:31,代码来源:sms_poll.php

示例9: phonebook_groupcode2id

                 $c_gid = phonebook_groupcode2id($uid, $contact[3]);
                 if (!$c_gid) {
                     $contact[3] = '';
                 }
                 $contact[1] = sendsms_getvalidnumber($contact[1]);
                 $contact[4] = phonebook_tags_clean($contact[4]);
                 if ($contact[0] && $contact[1]) {
                     $i++;
                     $content .= "\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td>{$i}.</td>\n\t\t\t\t\t\t\t<td>{$contact['0']}</td>\n\t\t\t\t\t\t\t<td>{$contact['1']}</td>\n\t\t\t\t\t\t\t<td>{$contact['2']}</td>\n\t\t\t\t\t\t\t<td>{$contact['3']}</td>\n\t\t\t\t\t\t\t<td>{$contact['4']}</td>\n\t\t\t\t\t\t\t</tr>";
                     $k = $i - 1;
                     $_SESSION['tmp'][$session_import][$k] = $contact;
                 }
             }
         }
         ini_set('auto_detect_line_endings', FALSE);
         $content .= "\n\t\t\t\t</tbody></table>\n\t\t\t\t</div>\n\t\t\t\t<p>" . _('Import above phonebook entries ?') . "</p>\n\t\t\t\t<form action=\"index.php?app=main&inc=feature_phonebook&route=import&op=import_yes\" method=POST>\n\t\t\t\t" . _CSRF_FORM_ . "\n\t\t\t\t<input type=\"hidden\" name=\"number_of_row\" value=\"{$j}\">\n\t\t\t\t<input type=\"hidden\" name=\"session_import\" value=\"" . $session_import . "\">\n\t\t\t\t<p><input type=\"submit\" class=\"button\" value=\"" . _('Import') . "\"></p>\n\t\t\t\t</form>\n\t\t\t\t" . _back('index.php?app=main&inc=feature_phonebook&route=import&op=list');
         _p($content);
     } else {
         $_SESSION['dialog']['danger'][] = _('Fail to upload CSV file for phonebook');
         header("Location: " . _u('index.php?app=main&inc=feature_phonebook&route=import&op=list'));
         exit;
     }
     break;
 case "import_yes":
     @set_time_limit(0);
     $num = $_POST['number_of_row'];
     $session_import = $_POST['session_import'];
     $data = $_SESSION['tmp'][$session_import];
     // $i = 0;
     foreach ($data as $d) {
         $name = trim($d[0]);
开发者ID:RobinKarlsen,项目名称:playSMS,代码行数:31,代码来源:import.php

示例10: defined

 */
defined('_SECURE_') or die('Forbidden');
if (!auth_isadmin()) {
    auth_block();
}
include $core_config['apps_path']['plug'] . "/gateway/uplink/config.php";
switch (_OP_) {
    case "manage":
        if ($plugin_config['uplink']['try_disable_footer']) {
            $selected['yes'] = 'selected';
        } else {
            $selected['no'] = 'selected';
        }
        $option_try_disable_footer = "<option value=\"1\" " . $selected['yes'] . ">" . _('yes') . "</option>";
        $option_try_disable_footer .= "<option value=\"0\" " . $selected['no'] . ">" . _('no') . "</option>";
        $content = _dialog() . "\n\t\t\t<h2>" . _('Manage uplink') . "</h2>\n\t\t\t<form action=index.php?app=main&inc=gateway_uplink&op=manage_save method=post>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<table class=playsms-table>\n\t\t\t\t<tbody>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=label-sizer>" . _('Gateway name') . "</td><td>uplink</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _mandatory(_('Master URL')) . "</td><td><input type=text maxlength=250 name=up_master value=\"" . $plugin_config['uplink']['master'] . "\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _('Additional URL parameter') . "</td><td><input type=text maxlength=250 name=up_additional_param value=\"" . $plugin_config['uplink']['additional_param'] . "\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _mandatory(_('Webservice username')) . "</td><td><input type=text maxlength=30 name=up_username value=\"" . $plugin_config['uplink']['username'] . "\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _mandatory(_('Webservice token')) . "</td><td><input type=text maxlength=32 name=up_token value=\"" . $plugin_config['uplink']['token'] . "\"></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _('Try to disable SMS footer on master') . "</td><td><select name=up_try_disable_footer>" . $option_try_disable_footer . "</select></td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _('Module sender ID') . "</td><td><input type=text maxlength=16 name=up_module_sender value=\"" . $plugin_config['uplink']['module_sender'] . "\"> " . _hint(_('Max. 16 numeric or 11 alphanumeric char. empty to disable')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . _('Module timezone') . "</td><td><input type=text size=5 maxlength=5 name=up_datetime_timezone value=\"" . $plugin_config['uplink']['datetime_timezone'] . "\"> " . _hint(_('Eg: +0700 for Jakarta/Bangkok timezone')) . "</td>\n\t\t\t\t</tr>\n\t\t\t\t</tbody>\n\t\t\t</table>\n\t\t\t<p><input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t</form>" . _back('index.php?app=main&inc=core_gateway&op=gateway_list');
        _p($content);
        break;
    case "manage_save":
        $up_master = $_POST['up_master'];
        $up_additional_param = $_POST['up_additional_param'];
        $up_username = $_POST['up_username'];
        $up_token = $_POST['up_token'];
        $up_module_sender = $_POST['up_module_sender'];
        $up_datetime_timezone = $_POST['up_datetime_timezone'];
        $up_try_disable_footer = $_POST['up_try_disable_footer'];
        if ($up_master && $up_username && $up_token) {
            $db_query = "\n\t\t\t\tUPDATE " . _DB_PREF_ . "_gatewayUplink_config\n\t\t\t\tSET c_timestamp='" . mktime() . "',\n\t\t\t\tcfg_master='{$up_master}',\n\t\t\t\tcfg_additional_param='{$up_additional_param}',\n\t\t\t\tcfg_username='{$up_username}',\n\t\t\t\tcfg_token='{$up_token}',\n\t\t\t\tcfg_module_sender='{$up_module_sender}',\n\t\t\t\tcfg_datetime_timezone='{$up_datetime_timezone}',\n\t\t\t\tcfg_try_disable_footer='{$up_try_disable_footer}'";
            if (@dba_affected_rows($db_query)) {
                $_SESSION['dialog']['info'][] = _('Gateway module configurations has been saved');
            } else {
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:uplink.php

示例11: header

         }
     }
     header('Location: ' . _u('index.php?app=main&inc=core_gateway&op=add_smsc&gateway=' . $c_gateway));
     exit;
     break;
 case 'edit_smsc':
     $c_id = $_REQUEST['id'];
     $smsc = gateway_get_smscbyid($c_id);
     $c_name = $smsc['name'];
     $c_gateway = gateway_valid_name($smsc['gateway']);
     $c_data = json_decode($smsc['data']);
     $dv = $plugin_config[$c_gateway]['_smsc_config_'] ? $plugin_config[$c_gateway]['_smsc_config_'] : array();
     foreach ($dv as $key => $val) {
         $dynamic_variables[] = array('key' => $key, 'title' => $val, 'value' => $c_data->{$key});
     }
     $tpl = array('name' => 'gateway_edit_smsc', 'vars' => array('FORM_TITLE' => _('Edit SMSC'), 'ACTION_URL' => 'index.php?app=main&inc=core_gateway&op=edit_smsc_save', 'ID' => $c_id, 'NAME' => $c_name, 'GATEWAY' => $c_gateway, 'BACK' => _back('index.php?app=main&inc=core_gateway&op=gateway_list'), 'Gateway' => _('Gateway'), 'SMSC name' => _('SMSC name'), 'Save' => _('Save')), 'loops' => array('dynamic_variables' => $dynamic_variables));
     $content = tpl_apply($tpl);
     break;
 case 'edit_smsc_save':
     $c_id = (int) $_REQUEST['id'];
     $smsc = gateway_get_smscbyid($c_id);
     // do not edit dev and blocked
     $continue = FALSE;
     if (!($smsc['gateway'] == 'dev' || $smsc['gateway'] == 'blocked')) {
         $continue = TRUE;
     }
     $c_gateway = gateway_valid_name($_REQUEST['gateway']);
     if ($continue && $c_id && $c_gateway && $c_gateway == $smsc['gateway']) {
         $dv = $plugin_config[$c_gateway]['_smsc_config_'] ? $plugin_config[$c_gateway]['_smsc_config_'] : array();
         $dynamic_variables = array();
         foreach ($dv as $key => $val) {
开发者ID:yrahman,项目名称:playSMS,代码行数:31,代码来源:gateway.php

示例12: _

     $content .= "\n\t\t\t<h2>" . _('Manage quiz') . "</h2>\n\t\t\t<h3>" . _('Received answer list for keyword') . " " . $db_answer_row['quiz_keyword'] . "</h3>";
     $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureQuiz_log WHERE quiz_id='{$quiz_id}' ORDER BY in_datetime DESC";
     $db_result = dba_query($db_query);
     $content .= "\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%>" . _('Datetime') . "</th>\n\t\t\t\t<th width=20%>" . _('Sender') . "</th>\n\t\t\t\t<th width=30%>" . _('Answer') . "</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>\n\t\t\t<tbody>";
     $i = 0;
     while ($db_row = dba_fetch_array($db_result)) {
         if ($db_row['quiz_answer'] == $db_answer_row['quiz_answer']) {
             $iscorrect = "<font color=green>" . _('correct') . "</font>";
         } else {
             $iscorrect = "<font color=red>" . _('incorrect') . "</font>";
         }
         $action = "<a href=\"javascript: ConfirmURL('" . _('Are you sure you want to delete this answer ?') . "','" . _u('index.php?app=main&inc=feature_sms_quiz&op=sms_answer_del&quiz_id=' . $quiz_id . '&answer_id=' . $db_row['answer_id']) . "')\">" . $icon_config['delete'] . "</a>";
         $i++;
         $content .= "\n\t\t\t\t<tr>\n\t\t\t\t\t<td>" . $db_row['in_datetime'] . "</td>\n\t\t\t\t\t<td>" . $db_row['quiz_sender'] . "</td>\n\t\t\t\t\t<td>" . $db_row['quiz_answer'] . "</td>\n\t\t\t\t\t<td>{$iscorrect}</td>\n\t\t\t\t\t<td>{$action}</td>\n\t\t\t\t</tr>";
     }
     $content .= "</tbody>\n\t\t\t</table>\n\t\t\t</div>\n\t\t\t" . _back('index.php?app=main&inc=feature_sms_quiz&op=sms_quiz_list');
     _p($content);
     break;
 case "sms_answer_del":
     $answer_id = $_REQUEST['answer_id'];
     $db_query = "SELECT answer_id FROM " . _DB_PREF_ . "_featureQuiz_log WHERE answer_id='{$answer_id}'";
     $db_result = dba_query($db_query);
     $db_row = dba_fetch_array($db_result);
     if ($answer_id = $db_row['answer_id']) {
         $db_query = "DELETE FROM " . _DB_PREF_ . "_featureQuiz_log WHERE answer_id='{$answer_id}'";
         if (@dba_affected_rows($db_query)) {
             $_SESSION['dialog']['info'][] = _('SMS quiz answer messages have been deleted');
         }
     }
     header("Location: " . _u('index.php?app=main&inc=feature_sms_quiz&op=sms_answer_view&quiz_id=' . $quiz_id));
     exit;
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:sms_quiz.php

示例13: while

     $i = 0;
     while ($db_row = dba_fetch_array($db_result)) {
         $status_active = "<a href=\"" . _u('index.php?app=main&inc=feature_schedule&op=status&id=' . $db_row['id'] . '&status=0') . "\"><span class=status_enabled /></a>";
         $status_inactive = "<a href=\"" . _u('index.php?app=main&inc=feature_schedule&op=status&id=' . $db_row['id'] . '&status=1') . "\"><span class=status_disabled /></a>";
         $status = $db_row['flag_active'] == 1 ? $status_active : $status_inactive;
         $action = "<a href=\"" . _u('index.php?app=main&inc=feature_schedule&route=manage&op=list&id=' . $db_row['id']) . "\">" . $icon_config['manage'] . "</a>&nbsp;";
         $action .= "<a href=\"" . _u('index.php?app=main&inc=feature_schedule&route=edit&op=list&id=' . $db_row['id']) . "\">" . $icon_config['edit'] . "</a>&nbsp;";
         $action .= "<a href=\"javascript: ConfirmURL('" . _('Are you sure you want to delete SMS schedule ?') . " (" . _('Schedule ID') . ": " . $db_row['id'] . ")','" . _u('index.php?app=main&inc=feature_schedule&op=del&id=' . $db_row['id']) . "')\">" . $icon_config['delete'] . "</a>";
         $i++;
         $content .= "\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>" . $db_row['id'] . "</td>\n\t\t\t\t\t\t<td>" . $db_row['name'] . "</td>\n\t\t\t\t\t\t<td>" . $db_row['message'] . "</td>\n\t\t\t\t\t\t<td>" . $status . "</td>\n\t\t\t\t\t\t<td>" . $action . "</td>\n\t\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" . _button('index.php?app=main&inc=feature_schedule&op=add', _('Add SMS schedule'));
     _p($content);
     break;
 case "add":
     $content = _dialog() . "\n\t\t\t<h2>" . _('Schedule messages') . "</h2>\n\t\t\t<h3>" . _('Add SMS schedule') . "</h3>\n\t\t\t<form action=index.php?app=main&inc=feature_schedule&op=add_yes method=post>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t\t<tr>\n\t\t\t\t<td class=label-sizer>" . _mandatory(_('Schedule name')) . "</td><td><input type=text maxlength=100 name=name></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _mandatory(_('Scheduled message')) . "</td><td><input type=text name=message></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Schedule rule') . "</td><td>" . _select('schedule_rule', $plugin_config['schedule']['rules']) . "</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p><input type=submit class=button value=\"" . _('Save') . "\">\n\t\t\t</form>\n\t\t\t" . _back('index.php?app=main&inc=feature_schedule&op=list');
     _p($content);
     break;
 case "add_yes":
     $name = $_POST['name'];
     $message = $_POST['message'];
     $schedule_rule = (int) $_POST['schedule_rule'];
     if ($name && $message) {
         // flag_active  : 1 active, 2 inactive, 0 considered inactive
         // flag_deleted : 1 deleted, other values considered non-deleted
         $db_query = "\n\t\t\t\tINSERT INTO " . _DB_PREF_ . "_featureSchedule (c_timestamp,uid,name,message,schedule_rule,flag_active,flag_deleted)\n\t\t\t\tVALUES (" . mktime() . ",'" . $user_config['uid'] . "','{$name}','{$message}','{$schedule_rule}','2','0')";
         if ($new_uid = @dba_insert_id($db_query)) {
             $_SESSION['dialog']['info'][] = _('New SMS schedule been added');
         } else {
             $_SESSION['dialog']['info'][] = _('Fail to add new SMS schedule');
         }
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:schedule.php

示例14: _

         if (@dba_affected_rows($db_query)) {
             $_SESSION['error_string'] = _('Rate has been saved') . " (" . _('destination') . ": {$up_dst}, " . _('prefix') . ": {$up_prefix})";
         } else {
             $_SESSION['error_string'] = _('Fail to save rate') . " (" . _('destination') . ": {$up_dst}, " . _('prefix') . ": {$up_prefix})";
         }
     } else {
         $_SESSION['error_string'] = _('You must fill all fields');
     }
     header("Location: " . _u('index.php?app=main&inc=feature_simplerate&op=simplerate_edit&rateid=' . $rateid));
     exit;
     break;
 case "simplerate_add":
     if ($err = $_SESSION['error_string']) {
         $content = "<div class=error_string>{$err}</div>";
     }
     $content .= "\n\t\t\t<h2>" . _('Manage SMS rate') . "</h2>\n\t\t\t<h3>" . _('Add rate') . "</h3>\n\t\t\t<form action='index.php?app=main&inc=feature_simplerate&op=simplerate_add_yes' method='post'>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<table class=playsms-table>\n\t\t\t<tr>\n\t\t\t\t<td class=label-sizer>" . _('Destination') . "</td><td><input type='text' maxlength='30' name='add_dst' value=\"{$add_dst}\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Prefix') . "</td><td><input type='text' maxlength=10 name='add_prefix' value=\"{$add_prefix}\"></td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t\t<td>" . _('Rate') . "</td><td><input type='text' maxlength=14 name='add_rate' value=\"{$add_rate}\"></td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<input type='submit' class='button' value='" . _('Save') . "'>\n\t\t\t</form>\n\t\t\t" . _back('index.php?app=main&inc=feature_simplerate&op=simplerate_list');
     _p($content);
     break;
 case "simplerate_add_yes":
     $add_dst = $_POST['add_dst'];
     $add_prefix = $_POST['add_prefix'];
     $add_prefix = preg_replace('/[^0-9.]*/', '', $add_prefix);
     $add_rate = $_POST['add_rate'];
     if ($add_dst && $add_prefix >= 0 && $add_rate >= 0) {
         $db_query = "SELECT * FROM " . _DB_PREF_ . "_featureSimplerate WHERE prefix='{$add_prefix}'";
         $db_result = dba_query($db_query);
         if ($db_row = dba_fetch_array($db_result)) {
             $_SESSION['error_string'] = _('Rate already exists') . " (" . _('destination') . ": " . $db_row['dst'] . ", " . _('prefix') . ": " . $db_row['prefix'] . ")";
         } else {
             $db_query = "\n\t\t\t\t\tINSERT INTO " . _DB_PREF_ . "_featureSimplerate (dst,prefix,rate)\n\t\t\t\t\tVALUES ('{$add_dst}','{$add_prefix}','{$add_rate}')";
             if ($new_uid = @dba_insert_id($db_query)) {
开发者ID:yrahman,项目名称:playSMS,代码行数:31,代码来源:simplerate.php

示例15: themes_search_session

                     $removed = TRUE;
                 }
             }
             break;
     }
     $search = themes_search_session();
     $nav = themes_nav_session();
     if ($removed) {
         $_SESSION['dialog']['info'][] = _('Mobile numbers have been deleted');
     }
     $ref = $search['url'] . '&search_keyword=' . $search['keyword'] . '&search_category=' . $search['category'] . '&page=' . $nav['page'] . '&nav=' . $nav['nav'];
     header("Location: " . _u($ref));
     exit;
     break;
 case "stoplist_add":
     $content = _dialog() . "\n\t\t\t<h2>" . _('Manage stoplist') . "</h2>\n\t\t\t<h3>" . _('Add blocked mobile numbers') . " " . _hint(_('Multiple mobile numbers must be comma-separated')) . "</h3>\n\t\t\t<form action='index.php?app=main&inc=feature_stoplist&op=stoplist_add_yes' method='post'>\n\t\t\t" . _CSRF_FORM_ . "\n\t\t\t<table class=playsms-table>\n\t\t\t<tr>\n\t\t\t\t<td class=label-sizer>" . _mandatory(_('Mobile numbers')) . "</td>\n\t\t\t\t<td><input type=text name='add_mobile' required> " . _hint(_('Comma separated values for multiple mobile numbers')) . "\n\t\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>\n\t\t\t<p><input type='submit' class='button' value='" . _('Save') . "'></p>\n\t\t\t</form>\n\t\t\t" . _back('index.php?app=main&inc=feature_stoplist&op=stoplist_list');
     _p($content);
     break;
 case "stoplist_add_yes":
     $add_mobile = $_POST['add_mobile'];
     if ($add_mobile) {
         $mobiles = explode(',', str_replace(' ', '', $add_mobile));
         foreach ($mobiles as $mobile) {
             blacklist_mobile_add($user_config['uid'], $mobile);
         }
         $_SESSION['dialog']['info'][] = _('Mobile numbers have been blocked');
     } else {
         $_SESSION['dialog']['danger'][] = _('You must fill all fields');
     }
     header("Location: " . _u('index.php?app=main&inc=feature_stoplist&op=stoplist_add'));
     exit;
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:stoplist.php


注:本文中的_back函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。