本文整理汇总了PHP中osc_draw_radio_field函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_draw_radio_field函数的具体用法?PHP osc_draw_radio_field怎么用?PHP osc_draw_radio_field使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_draw_radio_field函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse
public static function parse($data)
{
$default_value = null;
foreach ($data['data'] as $variant) {
if ($variant['default'] === true) {
$default_value = (string) $variant['id'];
break;
}
}
$string = '<table border="0" cellspacing="0" cellpadding="2">' . ' <tr>' . ' <td width="100">' . $data['title'] . ':</td>' . ' <td>' . osc_draw_radio_field('variants[' . $data['group_id'] . ']', $data['data'], $default_value, 'onchange="refreshVariants();" id="variants_' . $data['group_id'] . '"') . '</td>' . ' </tr>' . '</table>';
return $string;
}
示例2: initialize
function initialize()
{
global $osC_Database, $osC_Language, $osC_Template;
$Qpoll = $osC_Database->query('select p.polls_id, p.polls_type, pd.polls_title from :table_polls p, :table_polls_description pd where p.polls_status = 1 and p.polls_id = pd.polls_id and pd.languages_id = :languages_id');
$Qpoll->bindTable(':table_polls', TABLE_POLLS);
$Qpoll->bindTable(':table_polls_description', TABLE_POLLS_DESCRIPTION);
$Qpoll->bindInt(':languages_id', $osC_Language->getID());
$Qpoll->executeRandomMulti();
$this->_content = '<div id="polls"><form name="frmPolls" id="frmPolls" action="' . osc_href_link(FILENAME_JSON) . '" method="get">' . osc_draw_hidden_field('polls_id', $Qpoll->valueInt('polls_id'));
if ($Qpoll->numberOfRows() > 0) {
$this->_content .= '<h6>' . $Qpoll->value('polls_title') . '</h6>';
$Qanswers = $osC_Database->query('select pa.polls_id, pa.polls_answers_id, pa.votes_count, pa.sort_order, pad.answers_title from :table_polls_answers pa, :table_polls_answers_description pad where pa.polls_id = :polls_id and pa.polls_answers_id = pad.polls_answers_id and pad.languages_id = :languages_id order by pa.sort_order desc');
$Qanswers->bindTable(':table_polls_answers', TABLE_POLLS_ANSWERS);
$Qanswers->bindTable(':table_polls_answers_description', TABLE_POLLS_ANSWERS_DESCRIPTION);
$Qanswers->bindInt(':polls_id', $Qpoll->valueInt('polls_id'));
$Qanswers->bindInt(':languages_id', $osC_Language->getID());
$Qanswers->execute();
if ($Qanswers->numberOfRows() > 0) {
$this->_content .= '<ul>';
while ($Qanswers->next()) {
if ($Qpoll->valueInt('polls_type')) {
$this->_content .= '<li>' . osc_draw_checkbox_field('vote[]', $Qanswers->valueInt('polls_answers_id'), null, 'class="poll_votes"') . ' ' . $Qanswers->value('answers_title') . '</li>';
} else {
$this->_content .= '<li>' . osc_draw_radio_field('vote[]', $Qanswers->valueInt('polls_answers_id'), null, 'class="poll_votes"') . ' ' . $Qanswers->value('answers_title') . '</li>';
}
}
$this->_content .= '</ul>';
$this->_content .= '<span style="float: right;">' . osc_draw_image_button('button_vote.png', $osC_Language->get('button_vote'), 'class="button" id="btnPollVote"') . '</span>';
$this->_content .= osc_draw_image_button('button_result.png', $osC_Language->get('button_result'), 'class="button" id="btnPollResult"');
$Qanswers->freeResult();
}
}
$Qpoll->freeResult();
$this->_content .= '</form></div>';
$osC_Template->addJavascriptFilename('includes/javascript/polls.js');
$js .= '<script type="text/javascript">
window.addEvent(\'domready\',function(){
var polls = new Polls();
});
</script>';
$this->_content .= $js . "\n";
}
示例3: array
</div>
<div class="content">
<table border="0" cellspacing="2" cellpadding="2">
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => MALE), array('id' => 'f', 'text' => FEMALE));
?>
<tr>
<td><?php
echo ENTRY_GENDER;
?>
</td>
<td><?php
echo osc_draw_radio_field('gender', $gender_array, $Qaccount->value('customers_gender'), '', ACCOUNT_GENDER > 0);
?>
</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<?php
}
?>
<tr>
<td><?php
echo ENTRY_FIRST_NAME;
?>
</td>
示例4: array
defaults: {anchor: '97%'},
labelWidth: 160,
items: [
{
border: false,
html: '<?php
$compression_array = array(array("id" => "none", "text" => $osC_Language->get("field_compression_none")));
if (!osc_empty(CFG_APP_GZIP) && file_exists(CFG_APP_GZIP)) {
$compression_array[] = array("id" => "gzip", "text" => $osC_Language->get("field_compression_gzip"));
}
if (!osc_empty(CFG_APP_ZIP) && file_exists(CFG_APP_ZIP)) {
$compression_array[] = array("id" => "zip", "text" => $osC_Language->get("field_compression_zip"));
}
echo '<p class="form-info">' . $osC_Language->get("introduction_new_backup") . '</p>';
echo '<p>' . osc_draw_radio_field("compression", $compression_array, "none", null, "<br />") . '</p>';
?>
'
}
]
});
return this.frmBackup;
},
submitForm: function () {
this.frmBackup.form.submit({
waitMsg: TocLanguage.formSubmitWaitMsg,
success: function (form, action) {
this.fireEvent('saveSuccess', action.result.feedback);
this.close();
示例5: array
if (file_exists(LOCAL_EXE_GZIP)) {
$compress_array[] = array('id' => 'gzip', 'text' => TEXT_INFO_USE_GZIP);
}
if (file_exists(LOCAL_EXE_ZIP)) {
$compress_array[] = array('id' => 'zip', 'text' => TEXT_INFO_USE_ZIP);
}
echo osc_draw_radio_field('compress', $compress_array, 'no', '', false, '<br>');
?>
</p>
<p>
<?php
if ($dir_ok === true) {
echo osc_draw_checkbox_field('download', array(array('id' => 'yes', 'text' => TEXT_INFO_DOWNLOAD_ONLY))) . '*<br><br>*' . TEXT_INFO_BEST_THROUGH_HTTPS;
} else {
echo osc_draw_radio_field('download', array(array('id' => 'yes', 'text' => TEXT_INFO_DOWNLOAD_ONLY)), true) . '*<br><br>*' . TEXT_INFO_BEST_THROUGH_HTTPS;
}
?>
</p>
<p align="center"><?php
echo '<input type="submit" value="' . IMAGE_BACKUP . '" class="operationButton"> <input type="button" value="' . IMAGE_CANCEL . '" onClick="toggleInfoBox(\'bDefault\');" class="operationButton">';
?>
</p>
</form>
</div>
</div>
<div id="infoBox_bRestoreLocal" <?php
if ($action != 'bRestoreLocal') {
示例6: array
<h6><?php
echo $osC_Language->get('my_account_title');
?>
</h6>
<div class="content">
<ol>
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => $osC_Language->get('gender_male')), array('id' => 'f', 'text' => $osC_Language->get('gender_female')));
?>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_gender'), 'fake', null, ACCOUNT_GENDER > 0) . osc_draw_radio_field('gender', $gender_array, $Qaccount->value('customers_gender'));
?>
</li>
<?php
}
?>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_first_name'), 'firstname', null, true) . ' ' . osc_draw_input_field('firstname', $Qaccount->value('customers_firstname'));
?>
</li>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_last_name'), 'lastname', null, true) . ' ' . osc_draw_input_field('lastname', $Qaccount->value('customers_lastname'));
?>
</li>
示例7: osc_draw_radio_field
<?php
if ($Qaddresses->valueInt('address_book_id') == $osC_ShoppingCart->getBillingAddress('id')) {
echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
<td width="10"> </td>
<td colspan="2"><b><?php
echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname');
?>
</b></td>
<td align="right"><?php
echo osc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $osC_ShoppingCart->getBillingAddress('id'));
?>
</td>
<td width="10"> </td>
</tr>
<tr>
<td width="10"> </td>
<td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="10"> </td>
<td><?php
echo osC_Address::format($Qaddresses->toArray(), ', ');
?>
</td>
<td width="10"> </td>
</tr>
示例8: osc_draw_radio_field
?>
</td>
<td><?php
echo osc_draw_radio_field('rating_' . $key, 2, null, ' title="radio' . $i . '" ');
?>
</td>
<td><?php
echo osc_draw_radio_field('rating_' . $key, 3, null, ' title="radio' . $i . '" ');
?>
</td>
<td><?php
echo osc_draw_radio_field('rating_' . $key, 4, null, ' title="radio' . $i . '" ');
?>
</td>
<td><?php
echo osc_draw_radio_field('rating_' . $key, 5, null, ' title="radio' . $i . '" ');
?>
</td>
</tr>
<?php
$i++;
}
?>
</tbody>
</table>
<?php
}
?>
<h6><?php
echo $osC_Language->get('field_review');
示例9: implode
$Qproducts->bindRaw(':products_id', implode('", "', array_unique(array_filter(array_slice($_POST['batch'], 0, MAX_DISPLAY_SEARCH_RESULTS), 'is_numeric'))));
$Qproducts->bindInt(':language_id', $osC_Language->getID());
$Qproducts->execute();
$names_string = '';
while ($Qproducts->next()) {
$names_string .= osc_draw_hidden_field('batch[]', $Qproducts->valueInt('products_id')) . '<b>' . $Qproducts->value('products_name') . '</b>, ';
}
if (!empty($names_string)) {
$names_string = substr($names_string, 0, -2) . osc_draw_hidden_field('subaction', 'confirm');
}
echo '<p>' . $names_string . '</p>';
?>
<p><?php
echo '<b>' . $osC_Language->get('field_categories') . '</b><br />' . osc_draw_pull_down_menu('new_category_id', $categories_array);
?>
</p>
<p><?php
echo '<b>' . $osC_Language->get('field_copy_method') . '</b><br />' . osc_draw_radio_field('copy_as', array(array('id' => 'link', 'text' => $osC_Language->get('copy_method_link')), array('id' => 'duplicate', 'text' => $osC_Language->get('copy_method_duplicate'))), 'link', null, '<br />');
?>
</p>
<p align="center"><?php
echo '<input type="submit" value="' . $osC_Language->get('button_copy') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule() . '&cID=' . $_GET['cID']) . '\';" class="operationButton" />';
?>
</p>
</form>
</div>
示例10: tep_draw_separator
if ($n == 1 || $selection[$i]['id'] == $osC_Session->value('payment')) {
echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td class="main" colspan="3"><b><?php
echo $selection[$i]['module'];
?>
</b></td>
<td class="main" align="right"><?php
echo osc_draw_radio_field('payment', $selection[$i]['id'], $osC_Session->value('payment'));
?>
</td>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
<?php
if (isset($selection[$i]['error'])) {
?>
<tr>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
示例11: tep_draw_separator
if ($Qaddresses->valueInt('address_book_id') == $osC_Session->value('billto')) {
echo ' <tr id="defaultSelected" class="moduleRowSelected" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
} else {
echo ' <tr class="moduleRow" onmouseover="rowOverEffect(this)" onmouseout="rowOutEffect(this)" onclick="selectRowEffect(this, ' . $radio_buttons . ')">' . "\n";
}
?>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td class="main" colspan="2"><b><?php
echo $Qaddresses->valueProtected('firstname') . ' ' . $Qaddresses->valueProtected('lastname');
?>
</b></td>
<td class="main" align="right"><?php
echo osc_draw_radio_field('address', $Qaddresses->valueInt('address_book_id'), $osC_Session->value('billto'));
?>
</td>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
</tr>
<tr>
<td width="10"><?php
echo tep_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td colspan="3"><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php
示例12: array
" method="post">
<table border="0" width="100%" cellspacing="0" cellpadding="2">
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => $osC_Language->get('gender_male')), array('id' => 'f', 'text' => $osC_Language->get('gender_female')));
?>
<tr>
<td width="30%"><?php
echo $osC_Language->get('field_gender');
?>
</td>
<td width="70%"><?php
echo osc_draw_radio_field('ab_gender', $gender_array, $osC_ObjectInfo->get('customers_gender'));
?>
</td>
</tr>
<?php
}
?>
<tr>
<td width="30%"><?php
echo $osC_Language->get('field_first_name');
?>
</td>
<td width="70%"><?php
echo osc_draw_input_field('ab_firstname', $osC_ObjectInfo->get('customers_firstname'));
示例13: osc_draw_radio_field
echo CATEGORY_ADDRESS;
?>
</p>
<div class="formArea">
<table border="0" width="100%" cellspacing="2" cellpadding="2">
<?php
if (ACCOUNT_GENDER > -1) {
?>
<tr>
<td class="main" width="30%"><?php
echo ENTRY_GENDER;
?>
</td>
<td class="main" width="70%"><?php
echo osc_draw_radio_field('ab_gender', $gender_array, isset($Qab) ? $Qab->value('entry_gender') : '', '', ACCOUNT_GENDER > 0);
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="main" width="30%"><?php
echo ENTRY_FIRST_NAME;
?>
</td>
<td class="main" width="70%"><?php
echo osc_draw_input_field('ab_firstname', isset($Qab) ? $Qab->value('entry_firstname') : '', '', true);
?>
</td>
示例14: osc_draw_pull_down_menu
<p><?php
echo $osC_Language->get('introduction_import_language');
?>
</p>
<fieldset>
<div><label for="language_import"><?php
echo $osC_Language->get('field_language_selection');
?>
</label><?php
echo osc_draw_pull_down_menu('language_import', $languages_array);
?>
</div>
<div><label for="import_type"><?php
echo $osC_Language->get('field_import_type');
?>
</label><?php
echo osc_draw_radio_field('import_type', array(array('id' => 'add', 'text' => $osC_Language->get('only_add_new_records')), array('id' => 'update', 'text' => $osC_Language->get('only_update_existing_records')), array('id' => 'replace', 'text' => $osC_Language->get('replace_all'))), 'add', null, '<br />');
?>
</div>
</fieldset>
<p align="center"><?php
echo osc_draw_hidden_field('subaction', 'confirm') . '<input type="submit" value="' . $osC_Language->get('button_import') . '" class="operationButton" /> <input type="button" value="' . $osC_Language->get('button_cancel') . '" onclick="document.location.href=\'' . osc_href_link_admin(FILENAME_DEFAULT, $osC_Template->getModule()) . '\';" class="operationButton" />';
?>
</p>
</form>
</div>
示例15: array
?>
</li>
<?php
}
?>
<div id="billingAddressDetails" style="display: <?php
echo $osC_Customer->isLoggedOn() & $create_billing_address == false ? 'none' : '';
?>
">
<?php
if (ACCOUNT_GENDER > -1) {
$gender_array = array(array('id' => 'm', 'text' => $osC_Language->get('gender_male')), array('id' => 'f', 'text' => $osC_Language->get('gender_female')));
?>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_gender'), null, 'fake', ACCOUNT_GENDER > 0) . osc_draw_radio_field('billing_gender', $gender_array, $gender);
?>
</li>
<?php
}
?>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_first_name'), null, 'billing_firstname', true) . osc_draw_input_field('billing_firstname', $firstname);
?>
</li>
<li><?php
echo osc_draw_label($osC_Language->get('field_customer_last_name'), null, 'billing_lastname', true) . osc_draw_input_field('billing_lastname', $lastname);
?>
</li>