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


PHP get_input_value函数代码示例

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


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


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