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


PHP _u函数代码示例

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


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

示例1: post_options

 /**
  * Handles POST requests from the options admin page
  */
 public function post_options()
 {
     $option_items = array();
     $timezones = DateTimeZone::listIdentifiers();
     $timezones = array_merge(array('' => ''), array_combine(array_values($timezones), array_values($timezones)));
     $option_items[_t('Name & Tagline')] = array('title' => array('label' => _t('Site Name'), 'type' => 'text', 'helptext' => ''), 'tagline' => array('label' => _t('Site Tagline'), 'type' => 'text', 'helptext' => ''), 'about' => array('label' => _t('About'), 'type' => 'textarea', 'helptext' => ''));
     $option_items[_t('Publishing')] = array('pagination' => array('label' => _t('Items per Page'), 'type' => 'text', 'helptext' => ''), 'atom_entries' => array('label' => _t('Entries to show in Atom feed'), 'type' => 'text', 'helptext' => ''), 'comments_require_id' => array('label' => _t('Require Comment Author Info'), 'type' => 'checkbox', 'helptext' => ''), 'spam_percentage' => array('label' => _t('Comment SPAM Threshold'), 'type' => 'text', 'helptext' => _t('The likelihood a comment is considered SPAM, in percent.')));
     $option_items[_t('Time & Date')] = array('timezone' => array('label' => _t('Time Zone'), 'type' => 'select', 'selectarray' => $timezones, 'helptext' => _t('Current Date Time: %s', array(HabariDateTime::date_create()->format()))), 'dateformat' => array('label' => _t('Date Format'), 'type' => 'text', 'helptext' => _t('Current Date: %s', array(HabariDateTime::date_create()->date))), 'timeformat' => array('label' => _t('Time Format'), 'type' => 'text', 'helptext' => _t('Current Time: %s', array(HabariDateTime::date_create()->time))));
     $option_items[_t('Language')] = array('locale' => array('label' => _t('Locale'), 'type' => 'select', 'selectarray' => array_merge(array('' => 'default'), array_combine(HabariLocale::list_all(), HabariLocale::list_all())), 'helptext' => _t('International language code')), 'system_locale' => array('label' => _t('System Locale'), 'type' => 'text', 'helptext' => _t('The appropriate locale code for your server')));
     $option_items[_t('Troubleshooting')] = array('log_min_severity' => array('label' => _t('Minimum Severity'), 'type' => 'select', 'selectarray' => LogEntry::list_severities(), 'helptext' => _t('Only log entries with a this or higher severity.')), 'log_backtraces' => array('label' => _t('Log Backtraces'), 'type' => 'checkbox', 'helptext' => _t('Logs error backtraces to the log table\'s data column. Can drastically increase log size!')));
     /*$option_items[_t('Presentation')] = array(
     		'encoding' => array(
     			'label' => _t('Encoding'),
     			'type' => 'select',
     			'selectarray' => array(
     				'UTF-8' => 'UTF-8'
     				),
     			'helptext' => '',
     			),
     		);*/
     $option_items = Plugins::filter('admin_option_items', $option_items);
     $form = new FormUI('Admin Options');
     $tab_index = 3;
     foreach ($option_items as $name => $option_fields) {
         $fieldset = $form->append('wrapper', Utils::slugify(_u($name)), $name);
         $fieldset->class = 'container settings';
         $fieldset->append('static', $name, '<h2>' . htmlentities($name, ENT_COMPAT, 'UTF-8') . '</h2>');
         foreach ($option_fields as $option_name => $option) {
             $field = $fieldset->append($option['type'], $option_name, $option_name, $option['label']);
             $field->template = 'optionscontrol_' . $option['type'];
             $field->class = 'item clear';
             if ($option['type'] == 'select' && isset($option['selectarray'])) {
                 $field->options = $option['selectarray'];
             }
             $field->tabindex = $tab_index;
             $tab_index++;
             if (isset($option['helptext'])) {
                 $field->helptext = $option['helptext'];
             } else {
                 $field->helptext = '';
             }
         }
     }
     /* @todo: filter for additional options from plugins
      * We could either use existing config forms and simply extract
      * the form controls, or we could create something different
      */
     $submit = $form->append('submit', 'apply', _t('Apply'), 'admincontrol_submit');
     $submit->tabindex = $tab_index;
     $form->on_success(array($this, 'form_options_success'));
     $this->theme->form = $form->get();
     $this->theme->option_names = array_keys($option_items);
     $this->theme->display('options');
 }
开发者ID:ringmaster,项目名称:system,代码行数:57,代码来源:adminoptionshandler.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     // Let's register the options page form so we can use it with ajax
     $self = $this;
     FormUI::register('admin_options', function ($form, $name, $extra_data) use($self) {
         $option_items = array();
         $timezones = \DateTimeZone::listIdentifiers();
         $timezones = array_merge(array('' => ''), array_combine(array_values($timezones), array_values($timezones)));
         $option_items[_t('Name & Tagline')] = array('title' => array('label' => _t('Site Name'), 'type' => 'text', 'helptext' => ''), 'tagline' => array('label' => _t('Site Tagline'), 'type' => 'text', 'helptext' => ''), 'about' => array('label' => _t('About'), 'type' => 'textarea', 'helptext' => ''));
         $option_items[_t('Publishing')] = array('pagination' => array('label' => _t('Items per Page'), 'type' => 'text', 'helptext' => ''), 'atom_entries' => array('label' => _t('Entries to show in Atom feed'), 'type' => 'text', 'helptext' => ''), 'comments_require_id' => array('label' => _t('Require Comment Author Email'), 'type' => 'checkbox', 'helptext' => ''), 'spam_percentage' => array('label' => _t('Comment SPAM Threshold'), 'type' => 'text', 'helptext' => _t('The likelihood a comment is considered SPAM, in percent.')));
         $option_items[_t('Time & Date')] = array('timezone' => array('label' => _t('Time Zone'), 'type' => 'select', 'selectarray' => $timezones, 'helptext' => _t('Current Date Time: %s', array(DateTime::create()->format()))), 'dateformat' => array('label' => _t('Date Format'), 'type' => 'text', 'helptext' => _t('Current Date: %s', array(DateTime::create()->date))), 'timeformat' => array('label' => _t('Time Format'), 'type' => 'text', 'helptext' => _t('Current Time: %s', array(DateTime::create()->time))));
         $option_items[_t('Language')] = array('locale' => array('label' => _t('Locale'), 'type' => 'select', 'selectarray' => array_merge(array('' => 'default'), array_combine(Locale::list_all(), Locale::list_all())), 'helptext' => Config::exists('locale') ? _t('International language code : This value is set in your config.php file, and cannot be changed here.') : _t('International language code'), 'disabled' => Config::exists('locale'), 'value' => Config::get('locale', Options::get('locale', 'en-us'))), 'system_locale' => array('label' => _t('System Locale'), 'type' => 'text', 'helptext' => _t('The appropriate locale code for your server')));
         $option_items[_t('Troubleshooting')] = array('log_min_severity' => array('label' => _t('Minimum Severity'), 'type' => 'select', 'selectarray' => LogEntry::list_severities(), 'helptext' => _t('Only log entries with a this or higher severity.')), 'log_backtraces' => array('label' => _t('Log Backtraces'), 'type' => 'checkbox', 'helptext' => _t('Logs error backtraces to the log table\'s data column. Can drastically increase log size!')));
         $option_items = Plugins::filter('admin_option_items', $option_items);
         $tab_index = 3;
         foreach ($option_items as $name => $option_fields) {
             /** @var FormControlFieldset $fieldset  */
             $fieldset = $form->append(FormControlWrapper::create(Utils::slugify(_u($name)))->set_properties(array('class' => 'container main settings')));
             $fieldset->append(FormControlStatic::create($name)->set_static('<h2 class="lead">' . htmlentities($name, ENT_COMPAT, 'UTF-8') . '</h2>'));
             $fieldset->set_wrap_each('<div>%s</div>');
             foreach ($option_fields as $option_name => $option) {
                 /** @var FormControlLabel $label */
                 $label = $fieldset->append(FormControlLabel::create('label_for_' . $option_name, null)->set_label($option['label']));
                 /** @var FormControl $field */
                 $field = $label->append($option['type'], $option_name, $option_name);
                 $label->set_for($field);
                 if (isset($option['value'])) {
                     $field->set_value($option['value']);
                 }
                 if (isset($option['disabled']) && $option['disabled'] == true) {
                     $field->set_properties(array('disabled' => 'disabled'));
                 }
                 if ($option['type'] == 'select' && isset($option['selectarray'])) {
                     $field->set_options($option['selectarray']);
                 }
                 $field->tabindex = $tab_index;
                 $tab_index++;
                 if (isset($option['helptext'])) {
                     $field->set_helptext($option['helptext']);
                 }
             }
         }
         $buttons = $form->append(new FormControlWrapper('buttons', null, array('class' => 'container')));
         $buttons->append(FormControlSubmit::create('apply', null, array('tabindex' => $tab_index))->set_caption(_t('Apply')));
         $form->on_success(array($self, 'form_options_success'));
         $form = Plugins::filter('admin_options_form', $form);
     });
 }
开发者ID:habari,项目名称:system,代码行数:49,代码来源:adminoptionshandler.php

示例3: defined

<?php

defined('_SECURE_') or die('Forbidden');
if (!auth_isadmin()) {
    auth_block();
}
include $core_config['apps_path']['plug'] . "/gateway/template/config.php";
switch (_OP_) {
    case "manage":
        if ($err = TRUE) {
            $content = _dialog();
        }
        $content .= "\n\t    <h2>" . _('Manage template') . "</h2>\n\t    <p>\n\t    <form action=index.php?app=main&inc=gateway_template&op=manage_save method=post>\n\t    " . _CSRF_FORM_ . "\n\t    <table class=playsms-table cellpadding=1 cellspacing=2 border=0>\n\t\t<tr>\n\t\t    <td class=label-sizer>" . _('Gateway name') . "</td><td>template</td>\n\t\t</tr>\n\t\t<tr>\n\t\t    <td>" . _('Template installation path') . "</td><td><input type=text maxlength=250 name=up_path value=\"" . $template_param['path'] . "\"> (" . _('No trailing slash') . " \"/\")</td>\n\t\t</tr>\n\t    </table>\n\t    <p><input type=submit class=button value=\"" . _('Save') . "\">\n\t    </form>";
        _p($content);
        break;
    case "manage_save":
        $up_path = $_POST['up_path'];
        $_SESSION['dialog']['info'][] = _('No changes have been made');
        if ($up_path) {
            $db_query = "\n\t\tUPDATE " . _DB_PREF_ . "_gatewayTemplate_config\n\t\tSET c_timestamp='" . mktime() . "',cfg_path='{$up_path}'\n\t    ";
            if (@dba_affected_rows($db_query)) {
                $_SESSION['dialog']['info'][] = _('Gateway module configurations has been saved');
            }
        }
        header("Location: " . _u('index.php?app=main&inc=gateway_template&op=manage'));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:28,代码来源:template.php

示例4:

 */
$app->get(_u('/users/{id}'), 'res.User:get');
$app->get(_u('/users'), 'res.Users:get');
$app->post(_u('/users'), 'res.Users:post');
$app->get(_u('/courses'), 'res.Courses:get');
$app->get(_u('/lessons'), 'res.Lessons:get');
$app->get(_u('/threads'), 'res.Threads:get');
$app->get(_u('/chaos_threads'), 'res.ChaosThreads:get');
$app->get(_u('/articles'), 'res.Articles:get');
$app->get(_u('/articles/{id}'), 'res.Article:get');
$app->get(_u('/article_categories'), 'res.ArticleCategories:get');
$app->get(_u('/courses/{courseId}/members'), 'res.CourseMembers:get');
$app->get(_u('/classrooms'), 'res.Classrooms:get');
$app->post(_u('/classrooms'), 'res.Classrooms:post');
$app->get(_u('/classrooms/{id}'), 'res.Classroom:get');
$app->post(_u('/classrooms/{id}'), 'res.Classroom:post');
$app->get(_u('/classrooms/{classroomId}/members'), 'res.ClassroomMembers:get');
$app->get(_u('/classrooms/{classroomId}/members/{memberId}'), 'res.ClassroomMember:get');
$app->get(_u('/exercise/{id}'), 'res.Exercise:get');
$app->get(_u('/exercise/{id}/result'), 'res.Exercise:result');
$app->post(_u('/exercise_results/{exerciseId}'), 'res.ExerciseResult:post');
$app->get(_u('/exercise_results/{lessonId}'), 'res.ExerciseResult:get');
$app->get(_u('/me/chatrooms'), 'res.MeChatroomes:get');
$app->get(_u('/mobileschools/apps'), 'res.Apps:get');
$app->get(_u('/mobileschools/app/{id}'), 'res.App:get');
$app->get(_u('/homework/{id}'), 'res.Homework:get');
$app->get(_u('/homework/{id}/result'), 'res.Homework:result');
$app->post(_u('/homework_results/{homeworkId}'), 'res.HomeworkResult:post');
$app->get(_u('/homework_results/{lessonId}'), 'res.HomeworkResult:get');
$app->post(_u('/upload/{group}'), 'res.Upload:post');
开发者ID:fujianguo,项目名称:EduSoho,代码行数:30,代码来源:routing.php

示例5: __

                                                                    <span class="glyphicon glyphicon-edit"></span>
                                                                    <?php 
                __('Edit');
                ?>
                                                                </a>
                                                            </li>
                                                        <?php 
            }
            ?>
                                                        <?php 
            if (have_permission('contents/remove_language')) {
                ?>
                                                            <li>

                                                                <a href="<?php 
                _u('admin/contents/remove_language/' . $language->id);
                ?>
" class="remove-box">
                                                                    <span class="glyphicon glyphicon-trash"></span>
                                                                    <?php 
                __('Remove');
                ?>
                                                                </a>
                                                            </li>
                                                        <?php 
            }
            ?>
                                                    </ul>

                                                </div>
                                                <?php 
开发者ID:NaszvadiG,项目名称:bootigniter,代码行数:31,代码来源:languages.php

示例6: _options

        // credit unicodes messages as single message
        $option_enable_credit_unicode = _options(array(_('yes') => 1, _('no') => 0), $data['core']['user_config']['enable_credit_unicode']);
        if (auth_isadmin()) {
            $option_enable_credit_unicode = "<select name='edit_enable_credit_unicode'>" . $option_enable_credit_unicode . "</select>";
        } else {
            $option_enable_credit_unicode = $user_config['opt']['enable_credit_unicode'] ? _('yes') : _('no');
        }
        // error string
        if ($err = TRUE) {
            $error_content = _dialog();
        }
        $tpl = array('name' => 'user_config', 'vars' => array('Application options' => _('Application options'), 'Username' => _('Username'), 'Access Control List' => _('Access Control List'), 'Effective SMS sender ID' => _('Effective SMS sender ID'), 'Default sender ID' => _('Default sender ID'), 'Default message footer' => _('Default message footer'), 'Webservices username' => _('Webservices username'), 'Webservices token' => _('Webservices token'), 'Renew webservices token' => _('Renew webservices token'), 'Enable webservices' => _('Enable webservices'), 'Webservices IP range' => _('Webservices IP range'), 'Active language' => _('Active language'), 'Timezone' => _('Timezone'), 'Credit' => _('Credit'), 'Enable credit unicode SMS as normal SMS' => _('Enable credit unicode SMS as normal SMS'), 'Forward message to inbox' => _('Forward message to inbox'), 'Forward message to email' => _('Forward message to email'), 'Forward message to mobile' => _('Forward message to mobile'), 'Local number length' => _('Local number length'), 'Prefix or country code' => _('Prefix or country code'), 'Always choose to send as unicode' => _('Always choose to send as unicode'), 'Save' => _('Save'), 'DIALOG_DISPLAY' => $error_content, 'FORM_TITLE' => $form_title, 'BUTTON_DELETE' => $button_delete, 'BUTTON_BACK' => $button_back, 'URL_UNAME' => $url_uname, 'VIEW' => $view, 'HINT_MAX_CHARS' => _hint(_('Max. 16 numeric or 11 alphanumeric characters')), 'HINT_MAX_ALPHANUMERIC' => _hint(_('Max. 30 alphanumeric characters')), 'HINT_COMMA_SEPARATED' => _hint(_('Comma separated')), 'HINT_TIMEZONE' => _hint(_('Eg: +0700 for Jakarta/Bangkok timezone')), 'HINT_LOCAL_LENGTH' => _hint(_('Min length to detect missing country code')), 'HINT_REPLACE_ZERO' => _hint(_('Replace prefix 0 or padding local numbers')), 'HINT_MANAGE_CREDIT' => _hint(_('Add or reduce credit from manage credit menu')), 'HINT_ACL' => _hint(_('ACL DEFAULT will not restrict access to menus')), 'option_new_token' => $option_new_token, 'option_enable_webservices' => $option_enable_webservices, 'option_language_module' => $option_language_module, 'option_fwd_to_inbox' => $option_fwd_to_inbox, 'option_fwd_to_email' => $option_fwd_to_email, 'option_fwd_to_mobile' => $option_fwd_to_mobile, 'option_acl' => $option_acl, 'option_sender_id' => $option_sender_id, 'c_username' => $c_username, 'effective_sender_id' => sendsms_get_sender($c_username), 'sender' => $sender, 'footer' => $footer, 'token' => $token, 'webservices_ip' => $webservices_ip, 'datetime_timezone' => $datetime_timezone, 'local_length' => $local_length, 'replace_zero' => $replace_zero, 'credit' => $credit, 'option_enable_credit_unicode' => $option_enable_credit_unicode));
        _p(tpl_apply($tpl));
        break;
    case "user_config_save":
        $fields = array('footer', 'datetime_timezone', 'language_module', 'fwd_to_inbox', 'fwd_to_email', 'fwd_to_mobile', 'local_length', 'replace_zero', 'new_token', 'enable_webservices', 'webservices_ip', 'sender', 'acl_id');
        $up = array();
        foreach ($fields as $field) {
            if (strlen($_POST['up_' . $field])) {
                $up[$field] = trim($_POST['up_' . $field]);
            }
        }
        $ret = user_edit_conf($c_uid, $up);
        $items['enable_credit_unicode'] = (int) $_POST['edit_enable_credit_unicode'];
        registry_update($c_uid, 'core', 'user_config', $items);
        $_SESSION['dialog']['info'][] = $ret['error_string'];
        _log('saving username:' . $c_username . ' error_string:[' . $ret['error_string'] . ']', 2, 'user_config');
        header("Location: " . _u('index.php?app=main&inc=core_user&route=user_config&op=user_config' . $url_uname . '&view=' . $view));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:user_config.php

示例7: _u

            <a title="r" data-shortcut="r" href="<?php 
_u($f, 'replace');
?>
" class="btn btn-with-icon">
              <?php 
i('cloud-upload', 'left');
?>
              <?php 
_l('files.show.replace');
?>
            </a>
          </li>

          <li>
            <a title="#" data-shortcut="#" href="<?php 
_u($f, 'delete');
?>
" class="btn btn-with-icon">
              <?php 
i('trash-o', 'left');
?>
              <?php 
_l('files.show.delete');
?>
            </a>
          </li>
        </ul>
      </nav>

    </form>
开发者ID:kompuser,项目名称:panel,代码行数:30,代码来源:show.php

示例8: inboxgroup_getdatabyid

        $data = inboxgroup_getdatabyid($rid);
        $in_receiver = $data['in_receiver'];
        if ($rid && $in_receiver) {
            if (inboxgroup_dataenable($rid)) {
                $_SESSION['dialog']['info'][] = _('Group inbox has been enabled') . " (" . _('Number') . ": " . $in_receiver . ")";
            } else {
                $_SESSION['dialog']['info'][] = _('Fail to enable group inbox') . " (" . _('Number') . ": " . $in_receiver . ")";
            }
        } else {
            $_SESSION['dialog']['info'][] = _('Receiver number does not exist');
        }
        header("Location: " . _u('index.php?app=main&inc=feature_inboxgroup&op=list&rid=' . $rid));
        exit;
        break;
    case 'disable':
        $rid = $_REQUEST['rid'];
        $data = inboxgroup_getdatabyid($rid);
        $in_receiver = $data['in_receiver'];
        if ($rid && $in_receiver) {
            if (inboxgroup_datadisable($rid)) {
                $_SESSION['dialog']['info'][] = _('Group inbox has been disabled') . " (" . _('Number') . ": " . $in_receiver . ")";
            } else {
                $_SESSION['dialog']['info'][] = _('Fail to disable group inbox') . " (" . _('Number') . ": " . $in_receiver . ")";
            }
        } else {
            $_SESSION['dialog']['info'][] = _('Receiver number does not exist');
        }
        header("Location: " . _u('index.php?app=main&inc=feature_inboxgroup&op=list&rid=' . $rid));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:inboxgroup.php

示例9: trim

        $add_service_name = trim($_POST['add_service_name']);
        $add_sms_receiver = trim($_POST['add_sms_receiver']);
        $add_custom_return_as_reply = $_POST['add_custom_return_as_reply'] == 'on' ? '1' : '0';
        $add_custom_url = $_POST['add_custom_url'];
        $add_custom_keyword = strtoupper($_POST['add_custom_keyword']);
        $c_keywords = explode(' ', $add_custom_keyword);
        foreach ($c_keywords as $keyword) {
            if ($keyword) {
                if (keyword_isavail($keyword, $add_sms_receiver)) {
                    $keywords .= core_sanitize_alphanumeric($keyword) . ' ';
                } else {
                    $_SESSION['dialog']['danger'][] = sprintf(_('Keyword %s is not available'), $keyword);
                }
            }
        }
        $keywords = trim($keywords);
        if ($add_service_name && $keywords && $add_custom_url) {
            $db_query = "INSERT INTO " . _DB_PREF_ . "_featureCustom (uid,service_name,custom_keyword,sms_receiver,custom_url,custom_return_as_reply) VALUES ('" . $user_config['uid'] . "','{$add_service_name}','{$keywords}','{$add_sms_receiver}','{$add_custom_url}','{$add_custom_return_as_reply}')";
            if ($new_uid = @dba_insert_id($db_query)) {
                $_SESSION['dialog']['info'][] = sprintf(_('SMS custom with keyword %s has been added'), $keywords);
                _lastpost_empty();
            } else {
                $_SESSION['dialog']['danger'][] = _('Fail to add SMS custom');
            }
        } else {
            $_SESSION['dialog']['danger'][] = _('All mandatory fields must be filled');
        }
        header("Location: " . _u('index.php?app=main&inc=feature_sms_custom&op=sms_custom_add'));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:sms_custom.php

示例10: defined

/**
 * This file is part of playSMS.
 *
 * playSMS 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.
 *
 * 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 (_OP_ == 'block') {
    if (auth_isvalid()) {
        $_SESSION['dialog']['danger'][] = _('You have no access to this page');
        logger_print("WARNING: no access or blocked. sid:" . $_SESSION['sid'] . " ip:" . $_SERVER['REMOTE_ADDR'] . " uid:" . $user_config['uid'] . " app:" . _APP_ . " inc:" . _INC_ . " op:" . _OP_ . " route:" . _ROUTE_, 2, "auth_block");
        header("Location: " . _u('index.php?app=main&inc=core_auth&route=block'));
    } else {
        header("Location: " . _u('index.php?app=main&inc=core_auth&route=login'));
    }
    exit;
} else {
    unset($tpl);
    $tpl = array('name' => 'auth_block', 'vars' => array('DIALOG_DISPLAY' => _dialog(), 'HTTP_PATH_BASE' => $core_config['http_path']['base'], 'Home' => _('Home')));
    _p(tpl_apply($tpl));
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:block.php

示例11: foreach

        }
        break;
    case "import_yes":
        @set_time_limit(0);
        $num = $_POST['number_of_row'];
        $session_import = $_POST['session_import'];
        $data = $_SESSION['tmp'][$session_import];
        foreach ($data as $d) {
            $name = trim($d[0]);
            $destination = trim($d[1]);
            $schedule = trim($d[2]);
            if ($name && $destination && $schedule) {
                $schedule = core_adjust_datetime($schedule);
                // add destiantions, replace existing entry with the same name
                if (dba_isexists(_DB_PREF_ . '_featureSchedule_dst', array('schedule_id' => $schedule_id, 'name' => $name), 'AND')) {
                    // update
                    $items = array('c_timestamp' => mktime(), 'schedule' => $schedule, 'scheduled' => '0000-00-00 00:00:00');
                    $conditions = array('schedule_id' => $schedule_id, 'name' => $name, 'destination' => $destination);
                    dba_update(_DB_PREF_ . '_featureSchedule_dst', $items, $conditions);
                } else {
                    // insert
                    $items = array('schedule_id' => $schedule_id, 'schedule' => $schedule, 'scheduled' => '0000-00-00 00:00:00', 'name' => $name, 'destination' => $destination);
                    dba_add(_DB_PREF_ . '_featureSchedule_dst', $items);
                }
            }
        }
        $_SESSION['dialog']['info'][] = _('Entries in CSV file have been imported');
        header("Location: " . _u('index.php?app=main&inc=feature_schedule&route=import&op=list&schedule_id=' . $schedule_id));
        exit;
        break;
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:import.php

示例12: _

                    $_SESSION['dialog']['danger'][] = _('Fail to recover password');
                }
            } else {
                $_SESSION['dialog']['danger'][] = _('Recover password disabled');
            }
        } else {
            $_SESSION['dialog']['danger'][] = _('Please type the displayed captcha phrase correctly');
        }
    }
    if ($ok) {
        header("Location: " . _u($core_config['http_path']['base']));
    } else {
        header("Location: " . _u('index.php?app=main&inc=core_auth&route=forgot'));
    }
    exit;
} else {
    $enable_logo = FALSE;
    $show_web_title = TRUE;
    if ($core_config['main']['enable_logo'] && $core_config['main']['logo_url']) {
        $enable_logo = TRUE;
        if ($core_config['main']['logo_replace_title']) {
            $show_web_title = FALSE;
        }
    }
    // captcha
    $captcha = new CaptchaBuilder();
    $captcha->build();
    $_SESSION['tmp']['captcha'] = $captcha->getPhrase();
    $tpl = array('name' => 'auth_forgot', 'vars' => array('HTTP_PATH_BASE' => $core_config['http_path']['base'], 'WEB_TITLE' => $core_config['main']['web_title'], 'DIALOG_DISPLAY' => _dialog(), 'URL_ACTION' => _u('index.php?app=main&inc=core_auth&route=forgot&op=forgot'), 'URL_REGISTER' => _u('index.php?app=main&inc=core_auth&route=register'), 'URL_LOGIN' => _u('index.php?app=main&inc=core_auth&route=login'), 'CAPTCHA_IMAGE' => $captcha->inline(), 'HINT_CAPTCHA' => _hint(_('Read and type the captcha phrase on verify captcha field. If you cannot read them please contact administrator.')), 'Username' => _('Username'), 'Email' => _('Email'), 'Recover password' => _('Recover password'), 'Login' => _('Login'), 'Submit' => _('Submit'), 'Register an account' => _('Register an account'), 'Verify captcha' => _('Verify captcha'), 'logo_url' => $core_config['main']['logo_url']), 'ifs' => array('enable_register' => $core_config['main']['enable_register'], 'enable_logo' => $enable_logo, 'show_web_title' => $show_web_title));
    _p(tpl_apply($tpl));
}
开发者ID:RobinKarlsen,项目名称:playSMS,代码行数:31,代码来源:forgot.php

示例13: 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

示例14: _u

      <?php 
if ($user->avatar()) {
    ?>
      <figure class="avatar avatar-full avatar-centered"><img src="<?php 
    echo $user->avatar()->url() . '?' . $user->avatar()->modified();
    ?>
"></figure>
      <?php 
}
?>

    </div>

    <div class="buttons buttons-centered cf">
      <a class="btn btn-rounded btn-cancel" href="<?php 
_u($user, 'edit');
?>
"><?php 
_l('cancel');
?>
</a>
      <input class="btn btn-rounded btn-submit btn-negative" type="submit" value="<?php 
_l('delete');
?>
" autofocus>
    </div>

  </form>
</div>
开发者ID:aoimedia,项目名称:kosmonautensofa,代码行数:29,代码来源:delete-avatar.php

示例15: mktime

                    $db_query = "UPDATE " . _DB_PREF_ . "_featureMsgtemplate SET c_timestamp='" . mktime() . "',t_title='{$t_title}', t_text='{$t_text}' WHERE tid='{$tid}'";
                    $db_result = dba_affected_rows($db_query);
                    if ($db_result > 0) {
                        $_SESSION['dialog']['info'][] = _('Message template has been edited');
                    } else {
                        $_SESSION['dialog']['info'][] = _('Fail to edit message template');
                    }
                } else {
                    $_SESSION['dialog']['info'][] = _('You must fill all fields');
                }
                header("Location: " . _u('index.php?app=main&inc=feature_msgtemplate&op=list'));
                exit;
                break;
            case "delete":
                $item_count = $_POST['item_count'];
                for ($i = 1; $i <= $item_count; $i++) {
                    $chkid[$i] = $_POST['chkid' . $i];
                    $chkid_value[$i] = $_POST['chkid_value' . $i];
                }
                for ($i = 1; $i <= $item_count; $i++) {
                    if ($chkid[$i] == 'on' && $chkid_value[$i]) {
                        $db_query = "DELETE FROM " . _DB_PREF_ . "_featureMsgtemplate WHERE tid='" . $chkid_value[$i] . "'";
                        $db_result = dba_affected_rows($db_query);
                    }
                }
                $_SESSION['dialog']['info'][] = _('Selected message template has been deleted');
                header("Location: " . _u('index.php?app=main&inc=feature_msgtemplate&op=list'));
                exit;
                break;
        }
}
开发者ID:10corp,项目名称:playSMS,代码行数:31,代码来源:msgtemplate.php


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