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


PHP radio_field函数代码示例

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


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

示例1: smarty_function_with_successive_milestones

/**
 * with_successive_milestones helper
 *
 * @param array $params
 * @param Smarty $smarty
 * @return string
 */
function smarty_function_with_successive_milestones($params, &$smarty)
{
    static $counter = 1;
    $name = array_var($params, 'name');
    if (empty($name)) {
        return new InvalidParamError('name', $name, '$name value is required', true);
    }
    // if
    $milestone = array_var($params, 'milestone');
    if (!instance_of($milestone, 'Milestone')) {
        return new InvalidParamError('milestone', $milestone, '$milestone value is expected to be an instance of Milestone class', true);
    }
    // if
    $id = array_var($params, 'id');
    if (empty($id)) {
        $id = 'with_successive_milestones_' . $counter;
        $counter++;
    }
    // if
    $value = array_var($params, 'value');
    $action = array_var($value, 'action', 'dont_move');
    $milestones = array_var($value, 'milestones');
    if (!is_array($milestones)) {
        $milestones = array();
    }
    // if
    $logged_user = $smarty->get_template_vars('logged_user');
    $successive_milestones = Milestones::findSuccessiveByMilestone($milestone, STATE_VISIBLE, $logged_user->getVisibility());
    if (!is_foreachable($successive_milestones)) {
        return '<p class="details">' . lang('This milestone does not have any successive milestones') . '</p>';
    }
    // if
    $result = "<div class=\"with_successive_milestones\">\n<div class=\"options\">\n";
    $options = array('dont_move' => lang("Don't change anything"), 'move_all' => lang('Adjust all successive milestone by the same number of days'), 'move_selected' => lang('Adjust only selected successive milestones by the same number of days'));
    foreach ($options as $k => $v) {
        $radio = radio_field($name . '[action]', $k == $action, array('value' => $k, 'id' => $id . '_' . $k));
        $label = label_tag($v, $id . '_' . $k, false, array('class' => 'inline'), '');
        $result .= '<span class="block">' . $radio . ' ' . $label . "</span>\n";
    }
    // if
    $result .= "</div>\n<div class=\"successive_milestones\">";
    foreach ($successive_milestones as $successive_milestone) {
        $input_attributes = array('name' => $name . '[milestones][]', 'id' => $id . '_milestones_' . $successive_milestone->getId(), 'type' => 'checkbox', 'value' => $successive_milestone->getId(), 'class' => 'auto');
        if (in_array($successive_milestone->getId(), $milestones)) {
            $input_attributes['checked'] = true;
        }
        // if
        $input = open_html_tag('input', $input_attributes, true);
        $label = label_tag($successive_milestone->getName(), $id . '_milestones_' . $successive_milestone->getId(), false, array('class' => 'inline'), '');
        $result .= '<span class="block">' . $input . ' ' . $label . "</span>\n";
    }
    // foreach
    $result .= "</div>\n</div>\n";
    return $result;
}
开发者ID:NaszvadiG,项目名称:activecollab_loc,代码行数:62,代码来源:function.with_successive_milestones.php

示例2: radio_field

					</tr>
					<tr>
						<td colspan="2" style="vertical-align:middle; height: 22px;">
							<label><?php 
echo radio_field('file[default_subject_sel]', true, array('value' => 'default')) . "&nbsp;" . lang('use default subject');
?>
</label>
						</td>
					</tr>
					<tr>
						<td colspan="2" style="vertical-align:middle; height: 22px;"><?php 
$sel = false;
if (array_var($file_data, 'default_subject') != "") {
    $sel = true;
}
echo radio_field('file[default_subject_sel]', $sel, array('value' => 'subject'));
echo "&nbsp;" . text_field('file[default_subject_text]', array_var($file_data, 'default_subject'), array('style' => 'width:300px', 'placeholder' => lang('enter a custom subject')));
?>
</td>
					</tr>
				</table>
			</div>
		
		</div>

	<?php 
if ($object->isNew() || $object->canLinkObject(logged_user())) {
    ?>
		<div id="<?php 
    echo $genid;
    ?>
开发者ID:abhinay100,项目名称:feng_app,代码行数:31,代码来源:add_file.php

示例3: lang

  <fieldset>
    <legend><?php 
    echo lang('password');
    ?>
</legend>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword', 'onclick' => 'App.modules.addUserForm.generateRandomPasswordClick()', 'tabindex' => '700'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword', 'onclick' => 'App.modules.addUserForm.generateSpecifyPasswordClick()', 'tabindex' => '800'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
        <?php 
    echo password_field('user[password]', null, array('id' => 'userFormPassword', 'tabindex' => '900'));
    ?>
      </div>
      
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:30,代码来源:add_user.php

示例4: text_field

      <?php echo text_field('contact[location_details]', array_var($contact_data, 'location_details'), array('id' => 'contactFormLocationDetails')) ?>
    </div>
    
  </fieldset>



<?php if (is_array($im_types) && count($im_types)) { ?>
  <fieldset>
    <legend><?php echo lang('instant messengers') ?></legend>
    <table id="im" class="blank">
      <tr>
        <th colspan="2"><?php echo lang('im service') ?></th>
        <th><?php echo lang('value') ?></th>
        <th><?php echo lang('primary im service') ?></th>
      </tr>
<?php foreach ($im_types as $im_type) { ?>
      <tr>
        <td><img src="<?php echo $im_type->getIconUrl() ?>" alt="<?php echo $im_type->getName() ?> icon" /></td>
        <td><label class="checkbox" for="<?php echo 'profileFormIm' . $im_type->getId() ?>"><?php echo $im_type->getName() ?></label></td>
        <td><?php echo text_field('contact[im_' . $im_type->getId() . ']', array_var($contact_data, 'im_' . $im_type->getId()), array('id' => 'profileFormIm' . $im_type->getId())) ?></td>
        <td><?php echo radio_field('contact[default_im]', array_var($contact_data, 'default_im') == $im_type->getId(), array('value' => $im_type->getId())) ?></td>
      </tr>
<?php } // foreach ?>
    </table>
    <p class="desc"><?php echo lang('primary im description') ?></p>
  </fieldset>
<?php } // if ?>

  <?php echo submit_button($contact->isNew() ? lang('add contact') : lang('edit contact')) ?>
</form>
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:31,代码来源:add_contact.php

示例5: if

				}
			};
			</script>
		</div>
	</fieldset>
 </div>

  
<?php if($user->isNew() || logged_user()->isAdministrator()) { ?>
  <fieldset>
    <legend><?php echo lang('password') ?></legend>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword', 'onclick' => 'App.modules.addUserForm.generateRandomPasswordClick()', 'tabindex' => '700')) ?> <?php echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div>
      <?php echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword', 'onclick' => 'App.modules.addUserForm.generateSpecifyPasswordClick()', 'tabindex' => '800')) ?> <?php echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '') ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php echo label_tag(lang('password'), 'userFormPassword', true) ?>
        <?php echo password_field('user[password]', null, array('id' => 'userFormPassword', 'tabindex' => '900')) ?>
      </div>
      
      <div>
        <?php echo label_tag(lang('password again'), 'userFormPasswordA', true) ?>
        <?php echo password_field('user[password_a]', null, array('id' => 'userFormPasswordA', 'tabindex' => '1000')) ?>
      </div>
    </div>
    <div style="margin-top:10px">
    <label class="checkbox">
    <?php echo checkbox_field('user[send_email_notification]', array_var($user, 'send_email_notification', 1), array('id' => $genid . 'notif', 'tabindex' => '1050')) ?>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:31,代码来源:add_user.php

示例6: lang

  <fieldset>
    <legend><?php 
    echo lang('password');
    ?>
</legend>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div>
      <?php 
    echo radio_field('user[password_generator]', array_var($user_data, 'password_generator') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
    </div>
    <div id="userFormPasswordInputs">
      <div>
        <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
        <?php 
    echo password_field('user[password]', null, array('id' => 'userFormPassword'));
    ?>
      </div>
      
开发者ID:noxstyle,项目名称:Project-Pier,代码行数:30,代码来源:add_user.php

示例7: render_select_mail_account

echo render_select_mail_account('mail[account_id]', $mail_accounts, isset($mail_data['account_id']) ? $mail_data['account_id'] : (isset($default_account) ? $default_account : (count($mail_accounts) > 0 ? $mail_accounts[0]->getId() : 0)), array('id' => $genid . 'mailAccount', 'tabindex' => '44', 'onchange' => "og.changeSignature('{$genid}', this.value);"));
?>
	</div>
  
	<div id="add_mail_options" style="display:none;">
		<fieldset>
	    <legend><?php 
echo lang('mail format options');
?>
</legend>
	    <label><?php 
echo radio_field('mail[format]', $type == 'html', array('id' => $genid . 'format_html', 'value' => 'html', 'tabindex' => '45', 'onchange' => "og.mailAlertFormat('{$genid}','html')")) . " " . lang('format html');
?>
</label>
	    <label><?php 
echo radio_field('mail[format]', $type == 'plain', array('id' => $genid . 'format_plain', 'value' => 'plain', 'tabindex' => '46', 'onchange' => "og.mailAlertFormat('{$genid}','plain')")) . " " . lang('format plain');
?>
</label>
		</fieldset>
	</div>
	
	<div id="add_mail_attachments" style="display:none;">
 	<fieldset>
 	    <legend><?php 
echo lang('mail attachments');
?>
</legend>
 	    <div id="<?php 
echo $genid;
?>
attachments"></div>
开发者ID:rorteg,项目名称:fengoffice,代码行数:31,代码来源:add_mail.php

示例8: yes_no_widget

/**
 * Render yes no widget
 *
 * @access public
 * @param string $name
 * @param $id_base
 * @param boolean $value If true YES will be selected, otherwise NO will be selected
 * @param string $yes_lang
 * @param string $no_lang
 * @return null
 */
function yes_no_widget($name, $id_base, $value, $yes_lang, $no_lang)
{
    $yes_input = radio_field($name, $value, array('id' => $id_base . 'Yes', 'class' => 'yes_no', 'value' => 1));
    $no_input = radio_field($name, !$value, array('id' => $id_base . 'No', 'class' => 'yes_no', 'value' => 0));
    $yes_label = label_tag($yes_lang, $id_base . 'Yes', false, array('class' => 'yes_no'), '');
    $no_label = label_tag($no_lang, $id_base . 'No', false, array('class' => 'yes_no'), '');
    return $yes_input . ' ' . $yes_label . ' ' . $no_input . ' ' . $no_label;
}
开发者ID:bahmany,项目名称:PythonPurePaperless,代码行数:19,代码来源:form.php

示例9: lang

  
  <div id="linkFormExistingObjectControls">
    <fieldset>
      <legend><?php 
echo lang('select object');
?>
</legend>
      <?php 
echo select_project_object('link[object_id]', active_project(), array_var($object_data, 'object_id'), $already_linked_objects_ids, array('id' => 'linkFormSelectObject', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('link[what]', array_var($link_data, 'what') != 'existing_object', array('value' => 'new_object', 'id' => 'linkFormNewObject', 'onclick' => 'App.modules.linkToObjectForm.toggleLinkForms()'));
?>
 <label for="linkFormNewObject" class="checkbox"><?php 
echo lang('upload and link');
?>
</label>
  </div>
  
  <div id="linkFormNewObjectControls">
    <?php 
echo render_linked_objects();
?>
  </div>
  
  <script>
    App.modules.linkToObjectForm.toggleLinkForms();
开发者ID:pnagaraju25,项目名称:fengoffice,代码行数:30,代码来源:link_to_object.php

示例10: label_tag

?>
 <?php 
echo label_tag(lang('project form action add comment'), 'projectFormActionAddComment', false, array('class' => 'checkbox'), '');
?>
</td>
          <td><?php 
echo lang('add comment to message short');
?>
: <?php 
echo select_message('project_form[message_id]', active_project(), array_var($project_form_data, 'message_id'), array('id' => 'projectFormActionSelectMessage'));
?>
</td>
        </tr>
        <tr>
          <td><?php 
echo radio_field('project_form[action]', array_var($project_form_data, 'action') == ProjectForm::ADD_TASK_ACTION, array('value' => ProjectForm::ADD_TASK_ACTION, 'id' => 'projectFormActionAddTask'));
?>
 <?php 
echo label_tag(lang('project form action add task'), 'projectFormActionAddTask', false, array('class' => 'checkbox'), '');
?>
</td>
          <td><?php 
echo lang('add task to list short');
?>
: <?php 
echo select_task_list('project_form[task_list_id]', active_project(), array_var($project_form_data, 'task_list_id'), false, array('id' => 'projectFormActionSelectTaskList'));
?>
</td>
        </tr>
      </table>
    </fieldset>
开发者ID:bklein01,项目名称:Project-Pier,代码行数:31,代码来源:add_project_form.php

示例11: lang

		  	<td align=center style="padding:0 10px;width:100px;"><a href="#" class="internalLink radio-title-1" onclick="og.userPermissions.ogPermSetLevel('<?php echo $genid ?>', 1);return false;"><?php echo lang('read only') ?></a></td>
		  	<td align=center style="padding:0 10px;width:100px;"><a href="#" class="internalLink radio-title-0" onclick="og.userPermissions.ogPermSetLevel('<?php echo $genid ?>', 0);return false;"><?php echo lang('none no bars') ?></a></td></tr>
		  	
		<?php 
			$row_cls = "";
			foreach ($allowed_object_types as $ot) {
				$row_cls = $row_cls == "" ? "altRow" : "";
				$id_suffix = $ot->getId();
				$change_parameters = '\'' . $genid . '\', ' . $ot->getId();
		?>
		  	<tr class="<?php echo $row_cls?>">
		  		<td style="padding-right:20px"><span id="<?php echo $genid.'obj_type_label'.$id_suffix?>"><?php echo lang($ot->getName()) ?></span></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '3', 'style' => 'width:16px', 'id' => $genid . 'rg_3_'.$id_suffix, 'class' => "radio_3")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '2', 'style' => 'width:16px', 'id' => $genid . 'rg_2_'.$id_suffix, 'class' => "radio_2")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '1', 'style' => 'width:16px', 'id' => $genid . 'rg_1_'.$id_suffix, 'class' => "radio_1")) ?></td>
		  		<td align=center><?php echo radio_field($genid .'rg_'.$id_suffix, false, array('onchange' => 'og.userPermissions.ogPermValueChanged('. $change_parameters .')', 'value' => '0', 'style' => 'width:16px', 'id' => $genid . 'rg_0_'.$id_suffix, 'class' => "radio_0")) ?></td>
		    </tr>
		<?php }?>
		    
		    </table>
		<!-- 
		    <br/><?php echo checkbox_field($genid . 'chk_0', false, array('id' => $genid . 'chk_0', 'onclick' => 'og.userPermissions.ogPermValueChanged("' . $genid . '")')) ?> <label style="font-weight:normal" for="<?php echo $genid ?>chk_0" class="checkbox"><?php echo lang('can assign to owners') ?></label>
		    <br/><?php echo checkbox_field($genid . 'chk_1', false, array('id' => $genid . 'chk_1', 'onclick' => 'og.userPermissions.ogPermValueChanged("' . $genid . '")')) ?> <label style="font-weight:normal" for="<?php echo $genid ?>chk_1" class="checkbox"><?php echo lang('can assign to other') ?></label>
		 -->
	  	
	  </div>
	</td></tr></table>


<script>
开发者ID:Jtgadbois,项目名称:Pedadida,代码行数:30,代码来源:member_permissions_control.php

示例12: lang

          <fieldset>
            <legend><?php 
    echo lang('password');
    ?>
</legend>
            <div>
              <?php 
    echo radio_field('contact[new][user][password_generator]', array_var($user_data, 'password_generator', 'random') == 'random', array('value' => 'random', 'class' => 'checkbox', 'id' => 'userFormRandomPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password generate'), 'userFormRandomPassword', false, array('class' => 'checkbox'), '');
    ?>
            </div>
            <div>
              <?php 
    echo radio_field('contact[new][user][password_generator]', array_var($user_data, 'password_generator', 'random') == 'specify', array('value' => 'specify', 'class' => 'checkbox', 'id' => 'userFormSpecifyPassword'));
    ?>
 <?php 
    echo label_tag(lang('user password specify'), 'userFormSpecifyPassword', false, array('class' => 'checkbox'), '');
    ?>
            </div>
            <div id="userFormPasswordInputs">
              <div>
                <?php 
    echo label_tag(lang('password'), 'userFormPassword', true);
    ?>
                <?php 
    echo password_field('contact[new][user][password]', null, array('id' => 'userFormPassword'));
    ?>
              </div>
开发者ID:bklein01,项目名称:Project-Pier,代码行数:30,代码来源:add_contact.php

示例13: lang

  
  <div id="attachFormExistingFileControls">
    <fieldset>
      <legend><?php 
echo lang('select file');
?>
</legend>
      <?php 
echo select_project_file('attach[file_id]', active_project(), array_var($attach_data, 'file_id'), $already_attached_file_ids, array('id' => 'attachFormSelectFile', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('attach[what]', array_var($attach_data, 'what') != 'existing_file', array('value' => 'new_file', 'id' => 'attachFormNewFile'));
?>
 <label for="attachFormNewFile" class="checkbox"><?php 
echo lang('upload and attach');
?>
</label>
  </div>
  
  <div id="attachFormNewFileControls">
    <?php 
echo render_attach_files();
?>
  </div>

  <?php 
echo submit_button(lang('attach files'));
开发者ID:bklein01,项目名称:Project-Pier,代码行数:30,代码来源:attach_to_object.php

示例14: radio_field

							</script>
							
								<tr><td colspan="2" style="vertical-align:middle; height: 22px;">
									<?php 
echo radio_field('event[repeat_option]', $rsel1, array('id' => $genid . 'repeat_opt_forever', 'value' => '1', 'onclick' => 'og.viewDays(false)')) . "&nbsp;" . lang('CAL_REPEAT_FOREVER');
?>
								</td></tr>
								<tr><td colspan="2" style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel2, array('id' => $genid . 'repeat_opt_times', 'value' => '2', 'onclick' => 'og.viewDays(true)')) . "&nbsp;" . lang('CAL_REPEAT');
echo "&nbsp;" . text_field('event[repeat_num]', $rnum, array('size' => '3', 'id' => 'repeat_num', 'maxlength' => '3', 'style' => 'width:25px', 'onchange' => 'og.selectRepeatMode(2);')) . "&nbsp;" . lang('CAL_TIMES');
?>
								</td></tr>
								<tr><td style="vertical-align:middle">
									<?php 
echo radio_field('event[repeat_option]', $rsel3, array('id' => $genid . 'repeat_opt_until', 'value' => '3', 'onclick' => 'og.viewDays(false)')) . "&nbsp;" . lang('CAL_REPEAT_UNTIL');
?>
								</td><td style="padding-left:8px;">
									<?php 
echo pick_date_widget2('event[repeat_end]', $rend, $genid, 95);
?>
								</td></tr>
							</table>
						</div>
						<div id="cal_extra3" style="width: 400px; align: center; text-align: left; <?php 
echo $hide2;
?>
'">
							<?php 
echo lang('CAL_REPEAT') . "&nbsp;";
$options = array(option_tag(lang('1st'), 1, array_var($event_data, 'repeat_wnum') == 1 ? array("selected" => "selected") : null), option_tag(lang('2nd'), 2, array_var($event_data, 'repeat_wnum') == 2 ? array("selected" => "selected") : null), option_tag(lang('3rd'), 3, array_var($event_data, 'repeat_wnum') == 3 ? array("selected" => "selected") : null), option_tag(lang('4th'), 4, array_var($event_data, 'repeat_wnum') == 4 ? array("selected" => "selected") : null));
开发者ID:abhinay100,项目名称:fengoffice_app,代码行数:31,代码来源:event.php

示例15: lang

  
  <div id="attachFormExistingFileControls">
    <fieldset>
      <legend><?php 
echo lang('select file');
?>
</legend>
      <?php 
echo select_project_file('attach[file_id]', active_project(), array_var($attach_data, 'file_id'), $already_attached_file_ids, array('id' => 'attachFormSelectFile', 'style' => 'width: 300px'));
?>
    </fieldset>
  </div>
  
  <div>
    <?php 
echo radio_field('attach[what]', array_var($attach_data, 'what') != 'existing_file', array('value' => 'new_file', 'id' => 'attachFormNewFile', 'onclick' => 'App.modules.attachToObjectForm.toggleAttachForms()'));
?>
 <label for="attachFormNewFile" class="checkbox"><?php 
echo lang('upload and attach');
?>
</label>
  </div>
  
  <div id="attachFormNewFileControls">
    <?php 
echo render_attach_files();
?>
  </div>

  <?php 
echo submit_button(lang('attach files'));
开发者ID:469306621,项目名称:Languages,代码行数:30,代码来源:attach_to_object.php


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