• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP get_input_value函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: password_save

 function password_save()
 {
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->add_texts('localization/');
     $this->register_handler('plugin.body', array($this, 'password_form'));
     $rcmail->output->set_pagetitle($this->gettext('changepasswd'));
     if (!isset($_POST['_confpasswd']) || !isset($_POST['_newpasswd'])) {
         $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');
     } elseif ($_POST['_confpasswd'] != $_POST['_newpasswd']) {
         $rcmail->output->command('display_message', $this->gettext('passwordinconsistency'), 'error');
     } elseif (strlen($_POST['_newpasswd']) < $rcmail->config->get('password_length')) {
         $rcmail->output->command('display_message', $this->gettext('passwordlenght') . $rcmail->config->get('password_length'), 'error');
     } else {
         $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST);
         if (!($res = $this->_save($newpwd))) {
             $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
             $_SESSION['password'] = $rcmail->encrypt($newpwd);
         } else {
             $rcmail->output->command('display_message', $res, 'error');
         }
     }
     rcmail_overwrite_action('plugin.imscp_pw_changer');
     $rcmail->output->send('plugin');
 }
开发者ID:stopkadr,项目名称:plugins,代码行数:25,代码来源:imscp_pw_changer.php


示例2: authenticate

 function authenticate($args)
 {
     if (isset($_POST['_user']) && isset($_POST['_pass'])) {
         $args['host'] = $this->getHost(get_input_value('_user', RCUBE_INPUT_POST));
     }
     return $args;
 }
开发者ID:jdsn,项目名称:w2c--ispconfig3_roundcube,代码行数:7,代码来源:ispconfig3_autoselect.php


示例3: save

 function save()
 {
     $policy_id = get_input_value('_spampolicy_name', RCUBE_INPUT_POST);
     $move_junk = get_input_value('_spammove', RCUBE_INPUT_POST);
     if (!$move_junk) {
         $move_junk = 'n';
     } else {
         $move_junk = 'y';
     }
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $spam_user = $this->soap->mail_spamfilter_user_get($session_id, array('email' => $mail_user[0]['email']));
         $uid = $this->soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
         if ($spam_user[0]['id'] == '') {
             $params = array('server_id' => $mail_user[0]['server_id'], 'priority' => '5', 'policy_id' => $policy_id, 'email' => $mail_user[0]['email'], 'fullname' => $mail_user[0]['email'], 'local' => 'Y');
             $add = $this->soap->mail_spamfilter_user_add($session_id, $uid, $params);
         } else {
             $params = $spam_user[0];
             $params['policy_id'] = $policy_id;
             $update = $this->soap->mail_spamfilter_user_update($session_id, $uid, $spam_user[0]['id'], $params);
         }
         $params = $mail_user[0];
         unset($params['password']);
         unset($params['autoresponder_start_date']);
         unset($params['autoresponder_end_date']);
         $params['move_junk'] = $move_junk;
         $update = $this->soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
         $this->soap->logout($session_id);
         $this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $this->init_html();
 }
开发者ID:ircf,项目名称:roundcubemail,代码行数:35,代码来源:ispconfig3_spam.php


示例4: save_vcard

 /**
  * Handler for request action
  */
 function save_vcard()
 {
     $this->add_texts('localization', true);
     $uid = get_input_value('_uid', RCUBE_INPUT_POST);
     $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
     $mime_id = get_input_value('_part', RCUBE_INPUT_POST);
     $rcmail = rcmail::get_instance();
     $part = $uid && $mime_id ? $rcmail->imap->get_message_part($uid, $mime_id) : null;
     $error_msg = $this->gettext('vcardsavefailed');
     if ($part && ($vcard = new rcube_vcard($part)) && $vcard->displayname && $vcard->email) {
         $contacts = $rcmail->get_address_book(null, true);
         // check for existing contacts
         $existing = $contacts->search('email', $vcard->email[0], true, false);
         if ($done = $existing->count) {
             $rcmail->output->command('display_message', $this->gettext('contactexists'), 'warning');
         } else {
             // add contact
             $success = $contacts->insert(array('name' => $vcard->displayname, 'firstname' => $vcard->firstname, 'surname' => $vcard->surname, 'email' => $vcard->email[0], 'vcard' => $vcard->export()));
             if ($success) {
                 $rcmail->output->command('display_message', $this->gettext('addedsuccessfully'), 'confirmation');
             } else {
                 $rcmail->output->command('display_message', $error_msg, 'error');
             }
         }
     } else {
         $rcmail->output->command('display_message', $error_msg, 'error');
     }
     $rcmail->output->send();
 }
开发者ID:DavidGarciaCat,项目名称:eyeos,代码行数:32,代码来源:vcard_attachments.php


示例5: password_save

 function password_save()
 {
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->add_texts('localization/');
     $this->register_handler('plugin.body', array($this, 'password_form'));
     $rcmail->output->set_pagetitle($this->gettext('changepasswd'));
     $confirm = $rcmail->config->get('password_confirm_current');
     if ($confirm && !isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
         $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');
     } else {
         $curpwd = get_input_value('_curpasswd', RCUBE_INPUT_POST);
         $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST);
         if ($confirm && $rcmail->decrypt($_SESSION['password']) != $curpwd) {
             $rcmail->output->command('display_message', $this->gettext('passwordincorrect'), 'error');
         } else {
             if (!($res = $this->_save($curpwd, $newpwd))) {
                 $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
                 $_SESSION['password'] = $rcmail->encrypt($newpwd);
             } else {
                 $rcmail->output->command('display_message', $res, 'error');
             }
         }
     }
     rcmail_overwrite_action('plugin.password');
     $rcmail->output->send('plugin');
 }
开发者ID:adrenlinerush,项目名称:Roundcube-Plugin-OpenLDAP-Passwd,代码行数:27,代码来源:password.php


示例6: save_prefs

 function save_prefs($args)
 {
     if ($args['section'] == 'mailview') {
         $args['prefs']['hide_blockquote_limit'] = (int) get_input_value('_hide_blockquote_limit', RCUBE_INPUT_POST);
     }
     return $args;
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:7,代码来源:hide_blockquote.php


示例7: password_save

 function password_save()
 {
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->add_texts('localization/');
     $this->register_handler('plugin.body', array($this, 'password_form'));
     $rcmail->output->set_pagetitle($this->gettext('changepasswd'));
     $confirm = $rcmail->config->get('password_confirm_current');
     $required_length = intval($rcmail->config->get('password_minimum_length'));
     $check_strength = $rcmail->config->get('password_require_nonalpha');
     if ($confirm && !isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
         $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');
     } else {
         $charset = strtoupper($rcmail->config->get('password_charset', 'ISO-8859-1'));
         $rc_charset = strtoupper($rcmail->output->get_charset());
         $curpwd = get_input_value('_curpasswd', RCUBE_INPUT_POST, true, $charset);
         $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST, true);
         $conpwd = get_input_value('_confpasswd', RCUBE_INPUT_POST, true);
         // check allowed characters according to the configured 'password_charset' option
         // by converting the password entered by the user to this charset and back to UTF-8
         $orig_pwd = $newpwd;
         $chk_pwd = rcube_charset_convert($orig_pwd, $rc_charset, $charset);
         $chk_pwd = rcube_charset_convert($chk_pwd, $charset, $rc_charset);
         // WARNING: Default password_charset is ISO-8859-1, so conversion will
         // change national characters. This may disable possibility of using
         // the same password in other MUA's.
         // We're doing this for consistence with Roundcube core
         $newpwd = rcube_charset_convert($newpwd, $rc_charset, $charset);
         $conpwd = rcube_charset_convert($conpwd, $rc_charset, $charset);
         if ($chk_pwd != $orig_pwd) {
             $rcmail->output->command('display_message', $this->gettext('passwordforbidden'), 'error');
         } else {
             if ($conpwd != $newpwd) {
                 $rcmail->output->command('display_message', $this->gettext('passwordinconsistency'), 'error');
             } else {
                 if ($confirm && $rcmail->decrypt($_SESSION['password']) != $curpwd) {
                     $rcmail->output->command('display_message', $this->gettext('passwordincorrect'), 'error');
                 } else {
                     if ($required_length && strlen($newpwd) < $required_length) {
                         $rcmail->output->command('display_message', $this->gettext(array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
                     } else {
                         if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
                             $rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
                         } else {
                             if (!($res = $this->_save($curpwd, $newpwd))) {
                                 $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
                                 $_SESSION['password'] = $rcmail->encrypt($newpwd);
                             } else {
                                 $rcmail->output->command('display_message', $res, 'error');
                             }
                         }
                     }
                 }
             }
         }
     }
     rcmail_overwrite_action('plugin.password');
     $rcmail->output->send('plugin');
 }
开发者ID:shishenkov,项目名称:zpanel,代码行数:59,代码来源:password.php


示例8: preferences_save

 function preferences_save($p)
 {
     try {
         $this->saveData(array('ar_enabled' => get_input_value('_ar_enabled', RCUBE_INPUT_POST), 'ar_subject' => get_input_value('_ar_subject', RCUBE_INPUT_POST), 'ar_body' => get_input_value('_ar_body', RCUBE_INPUT_POST), 'ar_ae_enabled' => get_input_value('_ar_ae_enabled', RCUBE_INPUT_POST), 'ar_ae_date' => get_input_value('_ar_ae_date', RCUBE_INPUT_POST), 'fw_enabled' => get_input_value('_fw_enabled', RCUBE_INPUT_POST), 'fw_address' => get_input_value('_fw_address', RCUBE_INPUT_POST), 'fw_keeporiginal' => get_input_value('_fw_keeporiginal', RCUBE_INPUT_POST)));
     } catch (Exception $e) {
         $p['abort'] = true;
         $p['result'] = false;
         $p['message'] = $e->getMessage();
     }
     return $p;
 }
开发者ID:hazarkarabay,项目名称:hmsfromrc,代码行数:11,代码来源:hmsfromrc.php


示例9: save

 function save()
 {
     $id = rcube_utils::get_input_value('_id', RCUBE_INPUT_POST);
     $name = rcube_utils::get_input_value('_filtername', RCUBE_INPUT_POST);
     $source = rcube_utils::get_input_value('_filtersource', RCUBE_INPUT_POST);
     $op = rcube_utils::get_input_value('_filterop', RCUBE_INPUT_POST);
     $searchterm = rcube_utils::get_input_value('_filtersearchterm', RCUBE_INPUT_POST);
     $action = rcube_utils::get_input_value('_filteraction', RCUBE_INPUT_POST);
     $target = mb_convert_encoding(get_input_value('_filtertarget', RCUBE_INPUT_POST), 'UTF-8', 'UTF7-IMAP');
     $enabled = rcube_utils::get_input_value('_filterenabled', RCUBE_INPUT_POST);
     if (!$enabled) {
         $enabled = 'n';
     } else {
         $enabled = 'y';
     }
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $mail_server = $this->soap->server_get($session_id, $mail_user[0]['server_id'], 'mail');
         $uid = $this->soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
         if ($mail_server['mail_filter_syntax'] == 'maildrop') {
             $target = str_replace("INBOX.", "", $target);
         }
         if ($id == 0 || $id == '') {
             $filter = $this->soap->mail_user_filter_get($session_id, array('mailuser_id' => $mail_user[0]['mailuser_id']));
             $limit = $this->rcmail_inst->config->get('filter_limit');
             if (count($filter) < $limit) {
                 $params = array('mailuser_id' => $mail_user[0]['mailuser_id'], 'rulename' => $name, 'source' => $source, 'searchterm' => $searchterm, 'op' => $op, 'action' => $action, 'target' => $target, 'active' => $enabled);
                 $add = $this->soap->mail_user_filter_add($session_id, $uid, $params);
                 $this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
             } else {
                 $this->rcmail_inst->output->command('display_message', 'Error: ' . $this->gettext('filterlimitreached'), 'error');
             }
         } else {
             $filter = $this->soap->mail_user_filter_get($session_id, $id);
             if ($filter['mailuser_id'] == $mail_user[0]['mailuser_id']) {
                 $params = array('mailuser_id' => $mail_user[0]['mailuser_id'], 'rulename' => $name, 'source' => $source, 'searchterm' => $searchterm, 'op' => $op, 'action' => $action, 'target' => $target, 'active' => $enabled);
                 $update = $this->soap->mail_user_filter_update($session_id, $uid, $id, $params);
             } else {
                 $this->rcmail_inst->output->command('display_message', 'Error: ' . $this->gettext('opnotpermitted'), 'error');
             }
         }
         $this->soap->logout($session_id);
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $this->init_html();
 }
开发者ID:rickygestalt,项目名称:ispconfig3_roundcube,代码行数:48,代码来源:ispconfig3_filter.php


示例10: readfolder

 public function readfolder()
 {
     $imap = rcmail::get_instance()->imap;
     $cbox = get_input_value('_cur', RCUBE_INPUT_GET);
     $mbox = get_input_value('_mbox', RCUBE_INPUT_GET);
     $uids = $imap->search_once($mbox, 'ALL UNSEEN', true);
     if (!is_array($uids)) {
         return false;
     }
     $imap->set_flag($uids, 'SEEN', $mbox);
     if ($cbox == $mbox) {
         $this->api->output->command('toggle_read_status', 'read', $uids);
     }
     rcmail_send_unread_count($mbox, true);
     $this->api->output->send();
 }
开发者ID:BillTheBest,项目名称:1.6.x,代码行数:16,代码来源:contextmenu.php


示例11: request_action

 function request_action()
 {
     $this->add_texts('localization');
     $GLOBALS['IMAP_FLAGS']['JUNK'] = 'Junk';
     $GLOBALS['IMAP_FLAGS']['NONJUNK'] = 'NonJunk';
     $uids = get_input_value('_uid', RCUBE_INPUT_POST);
     $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
     $rcmail = rcmail::get_instance();
     $rcmail->imap->unset_flag($uids, 'NONJUNK');
     $rcmail->imap->set_flag($uids, 'JUNK');
     if (($junk_mbox = $rcmail->config->get('junk_mbox')) && $mbox != $junk_mbox) {
         $rcmail->output->command('move_messages', $junk_mbox);
     }
     $rcmail->output->command('display_message', $this->gettext('reportedasjunk'), 'confirmation');
     $rcmail->output->send();
 }
开发者ID:ehmedov,项目名称:www,代码行数:16,代码来源:markasjunk.php


示例12: change_charset

 function change_charset($args)
 {
     if ($msg_uid = get_input_value('_uid', RCUBE_INPUT_GET)) {
         $rcmail = rcmail::get_instance();
         $alter_charset = (array) $rcmail->config->get('alter_charset', array());
         $headers = $rcmail->imap->get_headers($msg_uid);
         if ($alias_charset = get_input_value('_alter_charset', RCUBE_INPUT_GET)) {
             $output_charset = $alter_charset[$alias_charset];
         }
         $input_charset = $rcmail->output->get_charset();
         $charset = $this->charset($msg_uid);
         $msg_body = rcube_charset_convert($args[body], $input_charset, $charset);
         $args['body'] = rcube_charset_convert($msg_body, $output_charset);
         return $args;
     }
 }
开发者ID:umount,项目名称:rcplugin_altercharset,代码行数:16,代码来源:alter_charset.php


示例13: saveSmtpSettings

 function saveSmtpSettings($args)
 {
     $identities = rcmail::get_instance()->config->get('identity_smtp');
     $id = intval($args['id']);
     if (!isset($identities)) {
         $identities = array();
     }
     $smtp_standard = get_input_value('_smtp_standard', RCUBE_INPUT_POST);
     $password = get_input_value('_smtp_pass', RCUBE_INPUT_POST);
     if ($password != $identities[$id]['smtp_pass']) {
         $password = rcmail::get_instance()->encrypt($password);
     }
     $smtpSettingsRecord = array('smtp_standard' => isset($smtp_standard), 'smtp_server' => get_input_value('_smtp_server', RCUBE_INPUT_POST), 'smtp_port' => get_input_value('_smtp_port', RCUBE_INPUT_POST), 'smtp_user' => get_input_value('_smtp_user', RCUBE_INPUT_POST), 'smtp_pass' => $password);
     unset($identities[$id]);
     $identities += array($id => $smtpSettingsRecord);
     rcmail::get_instance()->user->save_prefs(array('identity_smtp' => $identities));
 }
开发者ID:Bergdahls,项目名称:YetiForceCRM,代码行数:17,代码来源:identity_smtp.php


示例14: save_data

 /**
  * Handler for submitted form
  *
  * Check fields and save to default identity if valid.
  * Afterwards the session flag is removed and we're done.
  */
 function save_data()
 {
     $rcmail = rcmail::get_instance();
     $identity = $rcmail->user->get_identity();
     $identities_level = intval($rcmail->config->get('identities_level', 0));
     $save_data = array('name' => get_input_value('_name', RCUBE_INPUT_POST), 'email' => get_input_value('_email', RCUBE_INPUT_POST));
     // don't let the user alter the e-mail address if disabled by config
     if ($identities_level == 1 || $identities_level == 3) {
         $save_data['email'] = $identity['email'];
     }
     // save data if not empty
     if (!empty($save_data['name']) && !empty($save_data['email'])) {
         $rcmail->user->update_identity($identity['identity_id'], $save_data);
         $rcmail->session->remove('plugin.newuserdialog');
     }
     $rcmail->output->redirect('');
 }
开发者ID:DavidGarciaCat,项目名称:eyeos,代码行数:23,代码来源:new_user_dialog.php


示例15: pfadmin_autoresponder_save

 function pfadmin_autoresponder_save()
 {
     $rcmail = rcmail::get_instance();
     $user = $rcmail->user->data['username'];
     $enabled = get_input_value('_autoresponderenabled', RCUBE_INPUT_POST);
     if (!$enabled) {
         $enabled = 0;
     }
     if (isset($_SESSION['dnsblacklisted']) && $_SESSION['dnsblacklisted'] != 'pass') {
         $enabled = 0;
     }
     $subject = get_input_value('_autorespondersubject', RCUBE_INPUT_POST);
     $body = get_input_value('_autoresponderbody', RCUBE_INPUT_POST);
     $date = get_input_value('_autoresponderdate', RCUBE_INPUT_POST);
     $datefrom = get_input_value('_autoresponderdatefrom', RCUBE_INPUT_POST);
     // check $datefrom
     if (preg_match("/^\\s*\$/", $datefrom) or !preg_match($this->date_format_regexp, $datefrom)) {
         $datefrom = "now()";
     }
     if (preg_match("/^\\s*\$/", $date) or !preg_match($this->date_format_regexp, $date)) {
         $date = "NULL";
     }
     if (!$enabled) {
         $date = $datefrom = "NULL";
     }
     if (!($res = $this->_save($user, $enabled, $subject, $body, $date, $datefrom))) {
         if (isset($_SESSION['dnsblacklisted']) && $_SESSION['dnsblacklisted'] != 'pass') {
             $this->add_texts('../dnsbl/localization/');
             $rcmail->output->command('display_message', sprintf(rcube_label('dnsblacklisted', 'pfadmin_autoresponder'), $_SESSION['clientip']), 'error');
         } else {
             $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
         }
     } else {
         $rcmail->output->command('display_message', "DUPA." . $res, 'error');
     }
     if (!$rcmail->config->get('db_persistent')) {
         if ($dsn = $rcmail->config->get('db_dsnw')) {
             $rcmail->db = rcube_db::factory($dsn, '', false);
         }
     }
     $this->pfadmin_autoresponder_init();
 }
开发者ID:Greybrow,项目名称:rcb-pfa-autoresponder,代码行数:42,代码来源:pfadmin_autoresponder.php


示例16: save

 function save()
 {
     $enabled = get_input_value('_autoreplyenabled', RCUBE_INPUT_POST);
     $body = get_input_value('_autoreplybody', RCUBE_INPUT_POST);
     $subject = get_input_value('_autoreplysubject', RCUBE_INPUT_POST);
     $startdate = get_input_value('_autoreplystarton', RCUBE_INPUT_POST);
     $enddate = get_input_value('_autoreplyendby', RCUBE_INPUT_POST);
     $server_tz = new DateTimeZone(date_default_timezone_get());
     $server_offset = $server_tz->getOffset(new DateTime());
     $user_tz = new DateTimeZone($this->rcmail_inst->config->get('timezone'));
     $user_offset = $user_tz->getOffset(new DateTime());
     $startdate = strtotime($startdate) - ($user_offset - $server_offset);
     $enddate = strtotime($enddate) - ($user_offset - $server_offset);
     if ($enddate < $startdate) {
         $enddate = $startdate + 86400;
     }
     $startdate = array('year' => date("Y", $startdate), 'month' => date("m", $startdate), 'day' => date("d", $startdate), 'hour' => date("H", $startdate), 'minute' => date("i", $startdate));
     $enddate = array('year' => date("Y", $enddate), 'month' => date("m", $enddate), 'day' => date("d", $enddate), 'hour' => date("H", $enddate), 'minute' => date("i", $enddate));
     if (!$enabled) {
         $enabled = 'n';
     } else {
         $enabled = 'y';
     }
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $uid = $this->soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
         $params = $mail_user[0];
         unset($params['password']);
         $params['autoresponder'] = $enabled;
         $params['autoresponder_text'] = $body;
         $params['autoresponder_subject'] = $subject;
         $params['autoresponder_start_date'] = $startdate;
         $params['autoresponder_end_date'] = $enddate;
         $update = $this->soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
         $this->soap->logout($session_id);
         $this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $this->init_html();
 }
开发者ID:jdsn,项目名称:w2c--ispconfig3_roundcube,代码行数:42,代码来源:ispconfig3_autoreply.php


示例17: password_save

 function password_save()
 {
     $rcmail = rcmail::get_instance();
     $this->load_config();
     $this->add_texts('localization/');
     $this->register_handler('plugin.body', array($this, 'password_form'));
     $rcmail->output->set_pagetitle($this->gettext('changepasswd'));
     $confirm = $rcmail->config->get('password_confirm_current');
     $required_length = intval($rcmail->config->get('password_minimum_length'));
     $check_strength = $rcmail->config->get('password_require_nonalpha');
     if ($confirm && !isset($_POST['_curpasswd']) || !isset($_POST['_newpasswd'])) {
         $rcmail->output->command('display_message', $this->gettext('nopassword'), 'error');
     } else {
         $curpwd = get_input_value('_curpasswd', RCUBE_INPUT_POST);
         $newpwd = get_input_value('_newpasswd', RCUBE_INPUT_POST);
         $conpwd = get_input_value('_confpasswd', RCUBE_INPUT_POST);
         if ($conpwd != $newpwd) {
             $rcmail->output->command('display_message', $this->gettext('passwordinconsistency'), 'error');
         } else {
             if ($confirm && $rcmail->decrypt($_SESSION['password']) != $curpwd) {
                 $rcmail->output->command('display_message', $this->gettext('passwordincorrect'), 'error');
             } else {
                 if ($required_length && strlen($newpwd) < $required_length) {
                     $rcmail->output->command('display_message', $this->gettext(array('name' => 'passwordshort', 'vars' => array('length' => $required_length))), 'error');
                 } else {
                     if ($check_strength && (!preg_match("/[0-9]/", $newpwd) || !preg_match("/[^A-Za-z0-9]/", $newpwd))) {
                         $rcmail->output->command('display_message', $this->gettext('passwordweak'), 'error');
                     } else {
                         if (!($res = $this->_save($curpwd, $newpwd))) {
                             $rcmail->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
                             $_SESSION['password'] = $rcmail->encrypt($newpwd);
                         } else {
                             $rcmail->output->command('display_message', $res, 'error');
                         }
                     }
                 }
             }
         }
     }
     rcmail_overwrite_action('plugin.password');
     $rcmail->output->send('plugin');
 }
开发者ID:ehmedov,项目名称:www,代码行数:42,代码来源:password.php


示例18: login_after

 function login_after($args)
 {
     if (!$this->is_enabled() || !$this->is_required()) {
         return $args;
     }
     $otp = get_input_value('_yubikey', RCUBE_INPUT_POST);
     $id = $this->get('yubikey_id');
     $id2 = $this->get('yubikey_id2');
     $id3 = $this->get('yubikey_id3');
     $url = $this->get('yubikey_api_url');
     $https = true;
     if (!empty($url) && ($_url = parse_url($url))) {
         if ($_url['scheme'] == "http") {
             $https = false;
         }
         $urlpart = $_url['host'];
         if (!empty($_url['port'])) {
             $urlpart .= ':' . $_url['port'];
         }
         $urlpart .= $_url['path'];
     }
     // make sure that there is a YubiKey ID in the user's prefs
     // and that it matches the first 12 characters of the OTP
     if (empty($id) && empty($id2) && empty($id3)) {
         $this->fail();
     }
     if (substr($otp, 0, 12) !== $id && substr($otp, 0, 12) !== $id2 && substr($otp, 0, 12) !== $id3) {
         $this->fail();
     } else {
         try {
             $yubi = new Auth_Yubico($this->get('yubikey_api_id'), $this->get('yubikey_api_key'), $https, true);
             if (!empty($urlpart)) {
                 $yubi->addURLpart($urlpart);
             }
             $yubi->verify($otp);
         } catch (Exception $e) {
             $this->fail();
         }
     }
     return $args;
 }
开发者ID:northox,项目名称:roundcube-yubikey-plugin,代码行数:41,代码来源:yubikey_authentication.php


示例19: init

 /**
  * Plugin initialization.
  */
 function init()
 {
     $rcmail = rcmail::get_instance();
     $this->rc = $rcmail;
     if ($this->rc->task == 'mail') {
         // message parse/display hooks
         $this->add_hook('message_part_structure', array($this, 'parse_structure'));
         $this->add_hook('message_body_prefix', array($this, 'status_message'));
         // message displaying
         if ($rcmail->action == 'show' || $rcmail->action == 'preview') {
             $this->add_hook('message_load', array($this, 'message_load'));
             $this->add_hook('template_object_messagebody', array($this, 'message_output'));
             $this->register_action('plugin.enigmaimport', array($this, 'import_file'));
         } else {
             if ($rcmail->action == 'compose') {
                 $this->load_ui();
                 $this->ui->init($section);
             } else {
                 if ($rcmail->action == 'sendmail') {
                     //$this->add_hook('outgoing_message_body', array($this, 'msg_encode'));
                     //$this->add_hook('outgoing_message_body', array($this, 'msg_sign'));
                 }
             }
         }
     } else {
         if ($this->rc->task == 'settings') {
             // add hooks for Enigma settings
             $this->add_hook('preferences_sections_list', array($this, 'preferences_section'));
             $this->add_hook('preferences_list', array($this, 'preferences_list'));
             $this->add_hook('preferences_save', array($this, 'preferences_save'));
             // register handler for keys/certs management
             $this->register_action('plugin.enigma', array($this, 'preferences_ui'));
             // grab keys/certs management iframe requests
             $section = get_input_value('_section', RCUBE_INPUT_GET);
             if ($this->rc->action == 'edit-prefs' && preg_match('/^enigma(certs|keys)/', $section)) {
                 $this->load_ui();
                 $this->ui->init($section);
             }
         }
     }
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:44,代码来源:enigma.php


示例20: save

 function save()
 {
     $enabled = get_input_value('_autoreplyenabled', RCUBE_INPUT_POST);
     $body = get_input_value('_autoreplybody', RCUBE_INPUT_POST);
     $subject = get_input_value('_autoreplysubject', RCUBE_INPUT_POST);
     $startdate = get_input_value('_autoreplystarton', RCUBE_INPUT_POST);
     $enddate = get_input_value('_autoreplyendby', RCUBE_INPUT_POST);
     if (strtotime($enddate) < strtotime($startdate)) {
         $enddate = $startdate;
     }
     $startdate = gmdate("Y-m-d H:i", strtotime($startdate));
     $enddate = gmdate("Y-m-d H:i", strtotime($enddate));
     $startdate = array('year' => substr($startdate, 0, 4), 'month' => substr($startdate, 5, 2), 'day' => substr($startdate, 8, 2), 'hour' => substr($startdate, 11, 2), 'minute' => substr($startdate, 14, 2));
     $enddate = array('year' => substr($enddate, 0, 4), 'month' => substr($enddate, 5, 2), 'day' => substr($enddate, 8, 2), 'hour' => substr($enddate, 11, 2), 'minute' => substr($enddate, 14, 2));
     if (!$enabled) {
         $enabled = 'n';
     } else {
         $enabled = 'y';
     }
     try {
         $session_id = $this->soap->login($this->rcmail_inst->config->get('remote_soap_user'), $this->rcmail_inst->config->get('remote_soap_pass'));
         $mail_user = $this->soap->mail_user_get($session_id, array('login' => $this->rcmail_inst->user->data['username']));
         $uid = $this->soap->client_get_id($session_id, $mail_user[0]['sys_userid']);
         $params = $mail_user[0];
         unset($params['password']);
         $params['autoresponder'] = $enabled;
         $params['autoresponder_text'] = $body;
         $params['autoresponder_subject'] = $subject;
         $params['autoresponder_start_date'] = $startdate;
         $params['autoresponder_end_date'] = $enddate;
         $update = $this->soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params);
         $this->soap->logout($session_id);
         $this->rcmail_inst->output->command('display_message', $this->gettext('successfullysaved'), 'confirmation');
     } catch (SoapFault $e) {
         $this->rcmail_inst->output->command('display_message', 'Soap Error: ' . $e->getMessage(), 'error');
     }
     $this->init_html();
 }
开发者ID:ircf,项目名称:roundcubemail,代码行数:38,代码来源:ispconfig3_autoreply.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_input_vars函数代码示例发布时间:2022-05-15
下一篇:
PHP get_input函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap