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


PHP input_tag函数代码示例

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


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

示例1: input_asset_tag

function input_asset_tag($name, $value, $options = array())
{
    use_helper('Javascript', 'I18N');
    $type = 'all';
    if (isset($options['images_only'])) {
        $type = 'image';
        unset($options['images_only']);
    }
    $form_name = 'this.previousSibling.previousSibling.form.name';
    if (isset($options['form_name'])) {
        $form_name = '\'' . $options['form_name'] . '\'';
        unset($options['form_name']);
    }
    $html = '';
    if (is_file(sfConfig::get('sf_web_dir') . $value)) {
        $ext = substr($value, strpos($value, '.') - strlen($value) + 1);
        if (in_array($ext, array('png', 'jpg', 'gif'))) {
            $image_path = $value;
        } else {
            if (!is_file(sfConfig::get('sf_plugins_dir') . '/sfMediaLibraryPlugin/web/images/' . $ext . '.png')) {
                $ext = 'unknown';
            }
            $image_path = '/sfMediaLibraryPlugin/images/' . $ext;
        }
        $html .= link_to_function(image_tag($image_path, array('alt' => 'File', 'height' => '64')), "window.open('{$value}')");
        $html .= '<br />';
    }
    $html .= input_tag($name, $value, $options);
    $html .= '&nbsp;' . image_tag('/sfMediaLibraryPlugin/images/folder_open', array('alt' => __('Insert Image'), 'style' => 'cursor: pointer; vertical-align: middle', 'onclick' => 'sfMediaLibrary.openWindow({ form_name: ' . $form_name . ', field_name: \'' . $name . '\', type: \'' . $type . '\', scrollbars: \'yes\' })'));
    $html .= init_media_library();
    return $html;
}
开发者ID:valerio-bozzolan,项目名称:openparlamento,代码行数:32,代码来源:sfMediaLibraryHelper.php

示例2: render

 public function render()
 {
     $metaTitle = $this->metatag != null ? $this->metatag->getMetaTitle() : '';
     $metaKeywords = $this->metatag != null ? $this->metatag->getMetaKeywords() : '';
     $metaDescription = $this->metatag != null ? $this->metatag->getMetaDescription() : '';
     return sprintf($this->skeleton, label_for('meta_title', __('Title:')), input_tag('w3s_meta_title', $metaTitle, 'size=34'), label_for('meta_meta_keywords', __('Keywords:')), textarea_tag('w3s_meta_keywords', $metaKeywords, 'size=31x10'), label_for('meta_meta_description', __('Description:')), textarea_tag('w3s_meta_description', $metaDescription, 'size=31x10'), link_to_function(__('Store metatags'), 'currentTab.save()', 'class="link_button"'));
 }
开发者ID:jmp0207,项目名称:w3studiocms,代码行数:7,代码来源:w3sMetatagsManager.class.php

示例3: geocode_auto_complete

function geocode_auto_complete($name, $service)
{
    $mobile_version = c2cTools::mobileVersion();
    $service_class = $service === 'nominatim' ? ' nominatim' : ' geonames';
    $out = input_tag($name, '', array('class' => 'geocode_auto_complete' . $service_class, 'placeholder' => __('enter place name'), 'data-noresult' => __('no results')));
    if ($mobile_version) {
        $out .= content_tag('span', '<br />' . __('autocomplete_help'), array('class' => 'mobile_auto_complete_background'));
        $out .= content_tag('span', 'X', array('class' => 'mobile_auto_complete_escape'));
    }
    // following script will automatically intanciate geocode autocompleter
    $out .= javascript_queue('$.ajax({
      url: "' . minify_get_combined_files_url('/static/js/geocode_autocompleter.js') . '",
      dataType: "script",
      cache: true});');
    return $out;
}
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:16,代码来源:AutoCompleteHelper.php

示例4: render

 /**
  * Renders the editor
  * 
  * @return string
  *
  */
 public function render()
 {
     $idLanguage = 0;
     $isMain = 0;
     $languageName = '';
     if ($this->language != null) {
         $idLanguage = $this->language->getId();
         $isMain = $this->language->getMainLanguage();
         $languageName = $this->language->getLanguage();
     }
     $setEnabled = $idLanguage == 0 || $idLanguage != 0 && $isMain == 0 ? '' : 'DISABLED';
     $function = $idLanguage == 0 ? link_to_function(__('Add Language'), 'W3sLanguage.add()', 'class="link_button"') : link_to_function(__('Edit Language'), 'W3sLanguage.edit()', 'class="link_button"');
     $additionalInfo = $idLanguage == 0 ? '<div id="w3s_message"><p class="error_message">' . __('PAY ATTENTION: This operation will also insert all contents for the new language. These contents will be copied from the main language of your website.') . '</p></div>' : '';
     $checked = $isMain == 1 ? 'CHECKED' : '';
     return sprintf($this->editorSkeleton, label_for('language_name', __('Language name:')), input_tag('w3s_language_name', $languageName), label_for('main_language', __('Main language:')), sprintf('<input name="w3s_main_language" id="w3s_main_language" %s type="checkbox" %s />', $setEnabled, $checked), $function, $additionalInfo);
 }
开发者ID:jmp0207,项目名称:w3studiocms,代码行数:22,代码来源:w3sLanguagesEditor.class.php

示例5: backend_input

function backend_input($name, $input = null, $options = array(), $methode = null)
{
    $code = getDivLabel($options, $name);
    if ($options['validate']) {
        $errSpan = "<span id='" . $name . "Error'></span>";
    }
    if ($options['password']) {
        $code .= input_password_tag($name, getVal($input, $methode, $name), clearOptions($options));
    } else {
        $code .= input_tag($name, getVal($input, $methode, $name), clearOptions($options));
    }
    if ($name == "attrRewriteUrl") {
        $code .= ' <img align="absbottom" src="/images/btn_generate.gif" onClick="generateUrl(\'attrRewriteUrl\', \'attrLabel\');"/>';
    }
    $code .= $errSpan;
    return $code;
}
开发者ID:kotow,项目名称:work,代码行数:17,代码来源:BackendFormHelper.php

示例6: input_sf_asset_tag

function input_sf_asset_tag($name, $value, $options = array())
{
    use_helper('Form', 'I18N');
    use_javascript('/sfDoctrineAssetsLibraryPlugin/js/main', 'last');
    $options = _convert_options($options);
    $type = 'all';
    if (isset($options['images_only'])) {
        $type = 'image';
        unset($options['images_only']);
    }
    if (!isset($options['id'])) {
        $options['id'] = get_id_from_name($name);
    }
    $form_name = 'this.previousSibling.previousSibling.form.name';
    if (isset($options['form_name'])) {
        $form_name = "'" . $options['form_name'] . "'";
        unset($options['form_name']);
    }
    // The popup should open in the currently selected subdirectory
    $html = input_tag($name, $value, $options) . '&nbsp;';
    $html .= image_tag('/sfDoctrineAssetsLibraryPlugin/images/folder_open', array('alt' => __('Insert Image'), 'style' => 'cursor: pointer; vertical-align: middle', 'onclick' => "\n      initialDir = document.getElementById('" . $options['id'] . "').value.replace(/\\/[^\\/]*\$/, '');\n      if(!initialDir) initialDir = '" . sfConfig::get('app_sfDoctrineAssetsLibrary_upload_dir', 'media') . "';\n      sfAssetsLibrary.openWindow({\n        form_name: " . $form_name . ",\n        field_name: '" . $name . "',\n        type: '" . $type . "',\n        url: '" . url_for('sfAsset/list?dir=PLACEHOLDER') . "?popup=2'.replace('PLACEHOLDER', initialDir),\n        scrollbars: 'yes'\n      });"));
    return $html;
}
开发者ID:vjousse,项目名称:sfDoctrineAssetsLibraryPlugin,代码行数:23,代码来源:sfAssetHelper.php

示例7: input_tag

?>
</td>
                    		<td class='filter_first'><?php 
echo input_tag('filters[CODE]', isset($filters['CODE']) ? $filters['CODE'] : null, array('size' => 12));
?>
</td>
		 		<td class='filter'><?php 
echo input_tag('filters[NAME]', isset($filters['NAME']) ? $filters['NAME'] : null, array('size' => 20));
?>
</td>
				<td class='filter'><?php 
echo input_tag('filters[index]', isset($filters['index']) ? $filters['index'] : null, array('size' => 15));
?>
</td>
				<td class='filter'><?php 
echo input_tag('filters[TITLE]', isset($filters['TITLE']) ? $filters['index'] : null, array('size' => 35));
?>
</td>

				<td class='filter'>
				<?php 
echo object_select_tag(isset($filters['department_id']) ? $filters['department_id'] : null, null, array('include_blank' => true, 'related_class' => 'VDepartment', 'text_method' => '__toString', 'peer_method' => 'doSelectFiltered', 'control_name' => 'filters[department_id]', 'style' => "width: 80px;"));
?>
</td>

				<td class='filter'>
				<?php 
echo input_date_range_tag('filters[ORDER_DATE]', isset($filters['ORDER_DATE']) ? $filters['ORDER_DATE'] : null, array('rich' => true, 'withtime' => false, 'calendar_button_img' => '/images/calendar.gif', 'middle' => '<br/>'));
?>
</td>
开发者ID:taryono,项目名称:school,代码行数:30,代码来源:listLateSuccess.php

示例8: form_remote_tag

?>
    <?php 
if ($sf_user->isAuthenticated() && $project->hasPermission('create-task')) {
    ?>
    
    <div id="task-new-holder">
      <div>
        <?php 
    echo form_remote_tag(array('update' => 'edit-tasks-holder', 'url' => 'project/ajaxAddTask'));
    ?>
          <div id="task-details" class="float-left" style="vertical-align:top;">
            <?php 
    echo input_hidden_tag('project', $project->getUuid(), array());
    ?>
            <?php 
    echo input_tag('task_name', 'Task Name');
    ?>
            <?php 
    echo textarea_tag('task_description', 'Task Description', array('rows' => '3'));
    ?>
            <?php 
    echo textarea_tag('task_tags', '', array('rows' => '3'));
    ?>
          </div>
          <div id="task-dates" class="float-right" style="text-align:right;">
            <label for="task_begin">Task Starts: <?php 
    echo input_date_tag('task_begin', '', array('rich' => 'true'));
    ?>
</label><br />
            <label for="task_finish">Task Due: <?php 
    echo input_date_tag('task_finish', '', array('rich' => 'true'));
开发者ID:sgrove,项目名称:cothinker,代码行数:31,代码来源:_edit_project_tasklist.php

示例9: input_tag

?>
 
<br />
<br />
<input type="checkbox" value="1" name="model[Reference]"> Reference&nbsp;&nbsp;
<input type="checkbox" value="1" name="model[Entity]">Entity&nbsp;&nbsp;
<input type="checkbox" value="1" name="model[Relationship]">Relationship&nbsp;&nbsp;
<input type="checkbox" value="1" name="model[Address]"> Address&nbsp;&nbsp;
<input type="checkbox" value="1" name="model[Image]"> Image&nbsp;&nbsp;
<br />
<br />
<input type="checkbox" value="1" name="is_delete"> Is delete?&nbsp;&nbsp;
<input type="checkbox" value="1" name="is_create"> Is create?&nbsp;&nbsp;
<input type="checkbox" value="1" name="distinct"> Distinct user&nbsp;&nbsp;
Users matching <?php 
echo input_tag('user', $sf_request->getParameter('user'));
?>
&nbsp;
<?php 
echo submit_tag('Go', 'class=button_small');
?>
</form>


<br />
<br />


<?php 
//echo link_to('show users only', 'modification/list?users_only=1')
?>
开发者ID:silky,项目名称:littlesis,代码行数:31,代码来源:listSuccess.php

示例10: object_select_tag

?>
</td>
                                            <td class='filter_first'><?php 
echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectSpecial', 'style' => 'width: 100px;'));
?>
</td>
                                            <td class='filter'><?php 
echo input_tag('filters[EMP_NO]', isset($filters['EMP_NO']) ? $filters['EMP_NO'] : null, array('size' => 7));
?>
</td>
                                            <td class='filter'><?php 
echo input_tag('filters[EXTRA_CODE]', isset($filters['EXTRA_CODE']) ? $filters['EXTRA_CODE'] : null, array('size' => 7));
?>
</td>
                                            <td class='filter'><?php 
echo input_tag('filters[EMP_NAME]', isset($filters['EMP_NAME']) ? $filters['EMP_NAME'] : null, array('size' => 10));
?>
</td>
                                    </tr>
                            </thead>
                            <tbody>
                            <?php 
if ($pager->getNbResults() < 1) {
    ?>
                                    <tr class="list"><td colspan="100"><div class="no_record"><?php 
    echo __('No record found');
    ?>
</div></td></tr>
                            <?php 
} else {
    ?>
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listSuccess.php

示例11: end_fieldset_tag

echo end_fieldset_tag();
echo fieldset_tag('Manage your email');
echo object_group_tag($user_private_data, 'email', array('class' => 'medium_input', 'type' => 'email'));
echo end_fieldset_tag();
?>
    <div class="form-row">
    <?php 
echo fieldset_tag('Manage your private data');
?>
    <ul>
      <li><?php 
echo label_for('edit_topo_name', __('topoName_desc'), array('class' => 'fieldname', 'id' => '_topo_name')) . ' ' . input_tag('edit_topo_name', $user_private_data->get('topo_name'), array('class' => 'medium_input'));
?>
</li>
      <li><?php 
echo label_for('edit_nickname', __('nickName_desc'), array('class' => 'fieldname', 'id' => '_nick_name')) . ' ' . input_tag('edit_nickname', $user_private_data->get('username'), array('class' => 'medium_input'));
?>
</li>
      <li><?php 
echo label_for('login_name', __('LoginName_desc'), array('class' => 'fieldname', 'id' => '_login_name')) . '<strong>' . $user_private_data->getLoginName() . '</strong>';
?>
</li>
    </ul>
    <?php 
echo end_fieldset_tag();
echo fieldset_tag('Manage your profile page');
echo object_group_tag($user_private_data, 'is_profile_public', array('callback' => 'object_checkbox_tag'));
echo end_fieldset_tag();
?>
    
    <ul class="action_buttons">
开发者ID:snouhaud,项目名称:camptocamp.org,代码行数:31,代码来源:editPrivateDataSuccess.php

示例12: cryptographp_picture

}
?>
    <?php 
if (!$sf_params->get('id')) {
    ?>
    <div class="row right_col">
        <?php 
    echo cryptographp_picture();
    echo cryptographp_reload();
    ?>
    </div>
    <div class="row">
        <?php 
    echo label_for('captcha', __('Type the code shown') . required());
    ?>
        <?php 
    echo input_tag('captcha', $sf_params->get('captcha'));
    ?>
        <?php 
    echo form_error('captcha');
    ?>
    </div>
    <?php 
}
?>
    <div class="row right_col">
        <?php 
echo submit_tag(__('Save'));
?>
    </div>
</form>
开发者ID:hoydaa,项目名称:snippets.hoydaa.org,代码行数:31,代码来源:editSuccess.php

示例13: input_tag

	<?php 
if ($_request->hasErrors()) {
    ?>
	<p>Oops! There are some validation errors.</p>
	<?php 
}
?>

<?php 
if ($_params->has('reset')) {
    ?>

	<p>This uiAjaxPanel uses loading indicator, but no shading.

	<p><?php 
    echo input_tag('txtName', 'Default value');
    ?>
 <input type="submit" name="commit" value="Submit" class="JsAction-post" />

<?php 
} else {
    ?>

<?php 
    echo input_hidden_tag('i', 1);
    echo input_hidden_tag('love', 1);
    echo input_hidden_tag('summer', 1);
    ?>

	<p><strong>You typed in "<?php 
    echo $_request->getParameter('txtName');
开发者ID:kc5nra,项目名称:RevTK,代码行数:31,代码来源:_demo1panelView.php

示例14: input_tag

        echo input_tag($name, $cs_setting->getValue(), 'size=55');
        break;
    case 'textarea':
        echo textarea_tag($name, $cs_setting->getValue());
        break;
    case 'yesno':
        echo 'Yes: ' . radiobutton_tag($name, 1, $cs_setting->getValue());
        echo 'No: ' . radiobutton_tag($name, 0, $cs_setting->getValue() ? false : true);
        break;
    case 'select':
        $options = _parse_attributes($cs_setting->getOptions());
        echo select_tag($name, options_for_select($options, $cs_setting->getValue(), 'include_blank=true'));
        break;
    case 'model':
        $config = _parse_attributes($cs_setting->getOptions());
        $method = $cs_setting->getOption('table_method');
        $method = $method ? $method : 'findAll';
        $options = Doctrine::getTable($cs_setting->getOption('model', true))->{$method}();
        echo select_tag($name, objects_for_select($options, 'getId', '__toString', $cs_setting->getValue()), 'include_blank=true');
        break;
    case 'wysiwyg':
        echo textarea_tag($name, $cs_setting->getvalue(), 'rich=true ' . $cs_setting->getOptions());
        break;
    case 'upload':
        echo $cs_setting->getValue() ? link_to($cs_setting->getValue(), public_path('uploads/setting/' . $cs_setting->getValue())) . '<br />' : '';
        echo input_file_tag($name, $cs_setting->getValue(), $cs_setting->getOptions());
        break;
    default:
        echo input_tag($name, $cs_setting->getValue(), 'size=55');
        break;
}
开发者ID:googlecode-mirror,项目名称:copisim,代码行数:31,代码来源:_value.php

示例15: submit_image_tag

>
					<td class='filter' style="vertical-align: middle;">
					<?php 
echo submit_image_tag('/images/magnifier.png', array('class' => 'sort', 'onclick' => "blur();"));
?>
</td>
					
					<td class='filter_first' style="vertical-align:middle;">
					<?php 
echo object_select_tag(isset($filters['ACADEMIC_CALENDAR_ID']) ? $filters['ACADEMIC_CALENDAR_ID'] : null, null, array('include_blank' => true, 'related_class' => 'AcademicCalendar', 'text_method' => '__toString', 'control_name' => 'filters[ACADEMIC_CALENDAR_ID]', 'peer_method' => 'doSelectFiltered', 'style' => 'width: 100px;'));
?>
</td>
                                  
                    			<td class='filter' style="vertical-align: middle;">
					<?php 
echo input_tag('filters[CODE_CLASS]', isset($filters['CODE_CLASS']) ? $filters['CODE_CLASS'] : null, array('size' => 7));
?>
</td>
                    
                    			<!-- UTS -->
                    			<td class="filter" style="text-align: center; font-weight: bold; vertical-align: middle;"><?php 
echo __('Semester 1');
?>
</td>
                    			<td class="filter" style="text-align: center; font-weight: bold; vertical-align: middle;"><?php 
echo __('Semester 2');
?>
</td>
                    
                    			<!-- UAS -->
                    			<td class="filter" style="text-align: center; font-weight: bold; vertical-align: middle;"><?php 
开发者ID:taryono,项目名称:school,代码行数:31,代码来源:listLedgerSuccess.php


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