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


PHP h_radio函数代码示例

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


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

示例1: allow_sfs

 public function allow_sfs($key, $value)
 {
     global $user, $config;
     $radio_ary = array(1 => 'YES', 0 => 'NO');
     // Determine if cURL is enabled on the server
     $curl = false;
     if (function_exists('curl_init')) {
         $curl = true;
     }
     // if false...display a message
     $message = $curl === false ? 'LOG_SFS_NEED_CURL' : false;
     return h_radio('config[allow_sfs]', $radio_ary, $key) . ($message !== false ? '<br /><span class="error">' . $user->lang($message) . '</span>' : '');
 }
开发者ID:TimoMF,项目名称:phpBB-3.1-stopforumspam,代码行数:13,代码来源:acp_listener.php

示例2: allow_email_login

 static function allow_email_login($value, $key)
 {
     global $db, $config, $user, $phpbb_container;
     $not_allowed = false;
     if (!$config['allow_emailreuse']) {
         $sql = 'SELECT count(user_email_hash) as cnt FROM ' . USERS_TABLE . ' WHERE user_email_hash > 0 GROUP BY user_email_hash HAVING cnt > 1';
         $result = $db->sql_query($sql);
         $row = $db->sql_fetchrow($result);
         $not_allowed = $row;
         $helper = $phpbb_container->get('controller.helper');
         $message = $row ? $user->lang('DUP_RECORDS', $helper->route('forumhulp_loginwithemail_controller')) : '';
     } else {
         $not_allowed = true;
         $message = $user->lang['ALLOW_EMAIL_LOGIN'];
     }
     $radio_ary = array(1 => 'YES', 0 => 'NO');
     return str_replace('value="1"', 'value="1"' . ($not_allowed ? 'disabled' : ''), h_radio('config[allow_email_login]', $radio_ary, $not_allowed ? 0 : $value) . ($not_allowed ? $message : ''));
 }
开发者ID:ForumHulp,项目名称:loginwithemail,代码行数:18,代码来源:listener.php

示例3: test_h_radio

 /**
  * @dataProvider h_radio_data
  */
 public function test_h_radio($name, $input_ary, $input_default, $id, $key, $expected)
 {
     $this->assertEquals($expected, h_radio($name, $input_ary, $input_default, $id, $key));
 }
开发者ID:MrAdder,项目名称:phpbb,代码行数:7,代码来源:h_radio_test.php

示例4: display_left_right

 /**
  * Display radio buttons for left/right choice
  *
  * @param int $value Selected value
  * @param string $key Key of config variable
  *
  * @return string
  */
 public function display_left_right($value, $key)
 {
     $radio_ary = array(0 => 'PORTAL_SHOW_ALL_LEFT', 1 => 'PORTAL_SHOW_ALL_RIGHT');
     return h_radio($key, $radio_ary, $value, $key);
 }
开发者ID:alhitary,项目名称:Board3-Portal,代码行数:13,代码来源:modules_helper.php

示例5: select_allow_deny

 /**
  * Write secure_allow_deny config field
  */
 function select_allow_deny($value, $key = '')
 {
     $radio_ary = array(1 => 'ORDER_ALLOW_DENY', 0 => 'ORDER_DENY_ALLOW');
     return h_radio('config[' . $key . ']', $radio_ary, $value, $key);
 }
开发者ID:jvinhit,项目名称:php,代码行数:8,代码来源:acp_attachments.php

示例6: quick_reply

 /**
  * Global quick reply enable/disable setting and button to enable in all forums
  */
 function quick_reply($value, $key)
 {
     global $user;
     $radio_ary = array(1 => 'YES', 0 => 'NO');
     return h_radio('config[allow_quick_reply]', $radio_ary, $value) . '<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang['ALLOW_QUICK_REPLY_BUTTON'] . '" />';
 }
开发者ID:corycubbage,项目名称:ShadoWorld,代码行数:9,代码来源:acp_board.php

示例7: enable_mod_rewrite

 /**
  * Option to enable/disable removal of 'app.php' from URLs
  *
  * Note that if mod_rewrite is on, URLs without app.php will still work,
  * but any paths generated by the controller helper url() method will not
  * contain app.php.
  *
  * @param int $value The current config value
  * @param string $key The config key
  * @return string The HTML for the form field
  */
 function enable_mod_rewrite($value, $key)
 {
     global $user, $config;
     // Determine whether mod_rewrite is enabled on the server
     // NOTE: This only works on Apache servers on which PHP is NOT
     // installed as CGI. In that case, there is no way for PHP to
     // determine whether or not the Apache module is enabled.
     //
     // To be clear on the value of $mod_rewite:
     // null = Cannot determine whether or not the server has mod_rewrite
     //        enabled
     // false = Can determine that the server does NOT have mod_rewrite
     //         enabled
     // true = Can determine that the server DOES have mod_rewrite_enabled
     $mod_rewrite = null;
     if (function_exists('apache_get_modules')) {
         $mod_rewrite = (bool) in_array('mod_rewrite', apache_get_modules());
     }
     // If $message is false, mod_rewrite is enabled.
     // Otherwise, it is not and we need to:
     // 1) disable the form field
     // 2) make sure the config value is set to 0
     // 3) append the message to the return
     $value = $mod_rewrite === false ? 0 : $value;
     $message = $mod_rewrite === null ? 'MOD_REWRITE_INFORMATION_UNAVAILABLE' : ($mod_rewrite === false ? 'MOD_REWRITE_DISABLED' : false);
     // Let's do some friendly HTML injection if we want to disable the
     // form field because h_radio() has no pretty way of doing so
     $field_name = 'config[enable_mod_rewrite]' . ($message === 'MOD_REWRITE_DISABLED' ? '" disabled="disabled' : '');
     return h_radio($field_name, array(1 => 'YES', 0 => 'NO'), $value) . ($message !== false ? '<br /><span>' . $user->lang($message) . '</span>' : '');
 }
开发者ID:hgchen,项目名称:phpbb,代码行数:41,代码来源:acp_board.php

示例8: board_disable

 /**
  * Board disable option and message
  */
 function board_disable($value, $key)
 {
     global $user;
     $radio_ary = array(1 => 'YES', 0 => 'NO');
     return h_radio('config[board_disable]', $radio_ary, $value) . '<br /><input id="' . $key . '" type="text" name="config[board_disable_msg]" maxlength="255" size="40" value="' . $this->new_config['board_disable_msg'] . '" />';
 }
开发者ID:puring0815,项目名称:OpenKore,代码行数:9,代码来源:acp_board.php

示例9: select_add_button_pos

 /**
  * Select add item button placement method
  */
 function select_add_button_pos($value, $key = '')
 {
     global $user, $config;
     $radio_ary = array(1 => 'ADD_BUTTON_BEFORE', 2 => 'ADD_BUTTON_AFTER', 3 => 'ADD_BUTTON_COL');
     return h_radio('config[favorites_add_button_pos]', $radio_ary, $value, $key);
 }
开发者ID:arrakis,项目名称:Forum-Favorites,代码行数:9,代码来源:acp_favorites.php

示例10: quickedit_settings

 /**
  * Global quick edit enable/disable setting and button to enable in all forums
  *
  * @param bool $value Value of quickedit settings. 1 if enabled, 0 if disabled
  * @param string $key The key of the setting
  * @return string HTML for quickedit settings
  * @access public
  */
 public static function quickedit_settings($value, $key)
 {
     // Called statically so can't use $this->user
     global $user;
     $user->add_lang_ext('marc/quickedit', 'quickedit_acp');
     $radio_ary = array(1 => 'YES', 0 => 'NO');
     return h_radio('config[allow_quick_edit]', $radio_ary, $value) . '<br /><br /><input class="button2" type="submit" id="' . $key . '_enable" name="' . $key . '_enable" value="' . $user->lang('ALLOW_QUICK_EDIT_BUTTON') . '" />';
 }
开发者ID:OfficeForum,项目名称:phpbb3-ext-quickedit,代码行数:16,代码来源:listener.php

示例11: select_featured_vehicle

 /**
  * 
  */
 function select_featured_vehicle($value, $key = '')
 {
     global $user, $config;
     $radio_ary = array('0' => 'DISABLED', '1' => 'BY_VEHICLE_ID', '2' => 'RANDOM', '4' => 'FROM_BLOCK');
     return h_radio('config[enable_featured_vehicle]', $radio_ary, $value, $key);
 }
开发者ID:Phatboy82,项目名称:phpbbgarage,代码行数:9,代码来源:acp_garage_setting.php

示例12: select_eveapi_portrait_size

 function select_eveapi_portrait_size($value, $key = '')
 {
     global $user, $config;
     $radio_ary = array(64 => 'EVEAPI_PORTRAIT_SMALL', 128 => 'EVEAPI_PORTRAIT_MEDIUM', 256 => 'EVEAPI_PORTRAIT_LARGE');
     return h_radio('config[eveapi_portrait_size]', $radio_ary, $value, $key);
 }
开发者ID:Covert-Inferno,项目名称:eve_api_phpbb,代码行数:6,代码来源:eveapi.php

示例13: select_ip_check

 /**
  * Select ip validation
  * duplicated from includes/acp/acp_board.php
  */
 function select_ip_check($value, $key = '')
 {
     $radio_ary = array(4 => 'ALL', 3 => 'CLASS_C', 2 => 'CLASS_B', 0 => 'NO_IP_VALIDATION');
     return h_radio('config[ip_check]', $radio_ary, $value, $key);
 }
开发者ID:codegooglecom,项目名称:proxy-revealer,代码行数:9,代码来源:acp_proxy_revealer.php

示例14: toplist_direction

 /**
  * Select toplist direction
  */
 function toplist_direction($value, $key)
 {
     $radio_ary = array(0 => 'RS_TL_HORIZONTAL', 1 => 'RS_TL_VERTICAL');
     $radio_text = h_radio('config[rs_toplist_direction]', $radio_ary, $value, 'rs_toplist_direction', $key);
     return $radio_text;
 }
开发者ID:rampmaster,项目名称:phpBB-Reputation-System,代码行数:9,代码来源:acp_controller.php

示例15: select_syndication_default

 /**
  * Select default syndication method
  */
 function select_syndication_default($value, $key = '')
 {
     global $user, $config;
     $radio_ary = array(SYNDICATION_ATOM => 'SYNDICATION_ATOM', SYNDICATION_RSS2 => 'SYNDICATION_RSS2');
     return h_radio('config[syndication_default]', $radio_ary, $value, $key);
 }
开发者ID:sietf,项目名称:sietf.org,代码行数:9,代码来源:acp_syndication.php


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