本文整理匯總了PHP中smn_draw_form函數的典型用法代碼示例。如果您正苦於以下問題:PHP smn_draw_form函數的具體用法?PHP smn_draw_form怎麽用?PHP smn_draw_form使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了smn_draw_form函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: display_links
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
{
global $PHP_SELF;
if (smn_not_null($parameters) && substr($parameters, -1) != '&') {
$parameters .= '&';
}
// calculate number of pages needing links
$num_pages = ceil($query_numrows / $max_rows_per_page);
$pages_array = array();
for ($i = 1; $i <= $num_pages; $i++) {
$pages_array[] = array('id' => $i, 'text' => $i);
}
if ($num_pages > 1) {
$display_links = smn_draw_form('pages', basename($PHP_SELF), '', 'get');
if ($current_page_number > 1) {
$display_links .= '<a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number - 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, smn_draw_pull_down_menu($page_name, $pages_array, $current_page_number, 'onChange="this.form.submit();"'), $num_pages);
if ($current_page_number < $num_pages && $num_pages != 1) {
$display_links .= ' <a href="' . smn_href_link(basename($PHP_SELF), $parameters . $page_name . '=' . ($current_page_number + 1), 'NONSSL') . '" class="splitPageLink">' . PREVNEXT_BUTTON_NEXT . '</a>';
} else {
$display_links .= ' ' . PREVNEXT_BUTTON_NEXT;
}
if ($parameters != '') {
if (substr($parameters, -1) == '&') {
$parameters = substr($parameters, 0, -1);
}
$pairs = explode('&', $parameters);
while (list(, $pair) = each($pairs)) {
list($key, $value) = explode('=', $pair);
$display_links .= smn_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
$display_links .= smn_hide_session_id() . '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
return $display_links;
}
示例2: smn_draw_form
<tr>
<td align="right" colspan="8"><table border="0" cellspacing="0" cellpadding="2">
<?php
for ($i = 0, $n = sizeof($order->totals); $i < $n; $i++) {
echo ' <tr>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['title'] . '</td>' . "\n" .
' <td align="right" class="smallText">' . $order->totals[$i]['text'] . '</td>' . "\n" .
' </tr>' . "\n";
}
?>
</table></td>
</tr>
</table></td>
</tr>
<tr class="infoBoxContents"><td><?=ORDER_DELETE_DESCRIPTION?></td></tr>
<tr class="infoBoxContents"><?php echo smn_draw_form('order_delete', smn_href_link(FILENAME_STORE_ORDER_EDIT, smn_get_all_get_params(array('action')) . 'action=deleteconfirm&ID='.$store_id,'NONSSL'),'POST'); ?>
<td><?php echo smn_draw_checkbox_field('restock') . ' ' . TEXT_INFO_RESTOCK_PRODUCT_QUANTITY; ?></td>
</tr>
<tr>
<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
<td><?php echo '<a href="' . smn_href_link(FILENAME_STORE_ORDER_TOOL, 'ID='.$store_id, 'NONSSL') . '">' . smn_image_button('small_back.gif', IMAGE_small_back) . '</a>'; ?></td>
<td valign="top"><?php echo smn_image_submit('button_delete.gif', IMAGE_DELETE); ?></td>
<td width="10"><?php echo smn_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
</tr>
</table></td>
</tr>
示例3: Copyright
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<?php
/*Added the store id as hidden field by Cimi on June 12,2007*/
echo smn_draw_form('checkout_address', smn_href_link(FILENAME_CHECKOUT_SHIPPING_ADDRESS, '', 'NONSSL'), 'post', 'onSubmit="return check_form_optional(checkout_address);"') . smn_draw_hidden_field('ID', $_REQUEST['ID']);
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo HEADING_TITLE;
?>
</td>
<td class="pageHeading" align="right"><?php
echo smn_image(DIR_WS_IMAGES . 'table_background_delivery.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
</tr>
</table></td>
示例4: array
</td>
<td class="smallText" align="right"><?php
echo $reviews_split->display_links($reviews_query_numrows, MAX_DISPLAY_SEARCH_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page']);
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
<?php
$heading = array();
$contents = array();
switch ($action) {
case 'delete':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_REVIEW . '</b>');
$contents = array('form' => smn_draw_form('reviews', FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_REVIEW_INTRO);
$contents[] = array('text' => '<br><b>' . $rInfo->products_name . '</b>');
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if (isset($rInfo) && is_object($rInfo)) {
$heading[] = array('text' => '<b>' . $rInfo->products_name . '</b>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_REVIEWS, 'page=' . $_GET['page'] . '&rID=' . $rInfo->reviews_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
$contents[] = array('text' => '<br>' . TEXT_INFO_DATE_ADDED . ' ' . smn_date_short($rInfo->date_added));
if (smn_not_null($rInfo->last_modified)) {
$contents[] = array('text' => TEXT_INFO_LAST_MODIFIED . ' ' . smn_date_short($rInfo->last_modified));
}
$contents[] = array('text' => '<br>' . smn_info_image($rInfo->products_image, $rInfo->products_name, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT));
$contents[] = array('text' => '<br>' . TEXT_INFO_REVIEW_AUTHOR . ' ' . $rInfo->customers_name);
$contents[] = array('text' => TEXT_INFO_REVIEW_RATING . ' ' . smn_image(HTTP_CATALOG_SERVER . DIR_WS_CATALOG_IMAGES . 'stars_' . $rInfo->reviews_rating . '.gif'));
示例5: Copyright
/*
Copyright (c) 2002 - 2006 SystemsManager.Net
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
$boxHeading = "";
$box_base_name = 'search2';
$box_id = $box_base_name . 'Box';
$boxContent = smn_draw_form('quick_find', smn_href_link(FILENAME_ADVANCED_SEARCH_RESULT, 'ID=1', 'NONSSL', false), 'post');
$boxContent .= '<table HEIGHT="40" CELLSPACING="0" CELLPADDING="0" align="left"><tr><td HEIGHT="40" class="search_css">' . 'SEARCH: ';
$boxContent .= smn_draw_pull_down_menu('categories_id', smn_get_categories_extended(array(array('id' => '', 'text' => 'All Stores'))), '0', '') . ' ';
$boxContent .= smn_draw_hidden_field('search_in_description', '1');
$boxContent .= '<br/>FOR: ' . smn_draw_input_field('keywords', '', 'size="20" maxlength="30" ') . ' ' . smn_hide_session_id() . smn_image_submit('button_quick_find.gif', 'Go Search', 'align="absmiddle"');
$boxContent .= ' <a href="' . smn_href_link(FILENAME_ADVANCED_SEARCH) . '"><b>' . BOX_SEARCH_ADVANCED_SEARCH . '</b></a>';
$boxContent .= '</td></tr></table></form>';
if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) {
require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php';
} else {
require DEFAULT_TEMPLATENAME_BOX;
}
$boxContent_attributes = '';
示例6: smn_draw_form
} else {
$file = DIR_FS_CATALOG_LANGUAGES . $_GET['lngdir'] . '/' . $_GET['filename'];
}
if (file_exists($file)) {
$file_array = @file($file);
$file_contents = @implode('', $file_array);
$file_writeable = true;
if (!is_writeable($file)) {
$file_writeable = false;
$messageStack->reset();
$messageStack->add(sprintf(ERROR_FILE_NOT_WRITEABLE, $file), 'error');
echo $messageStack->output();
}
?>
<tr><?php
echo smn_draw_form('language', FILENAME_DEFINE_MAINPAGE, 'lngdir=' . $_GET['lngdir'] . '&filename=' . $_GET['filename'] . '&action=save');
?>
<td><table border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="main"><b><?php
echo $_GET['filename'];
?>
</b></td>
</tr>
<tr>
<td class="main"><?php
echo smn_draw_textarea_field('file_contents', 'soft', '80', '20', $file_contents, $file_writeable ? '' : 'readonly');
?>
</td>
</tr>
<tr>
示例7: Copyright
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<?php
echo smn_draw_form('create_account', smn_href_link(FILENAME_CREATE_ACCOUNT, '', 'NONSSL'), 'post', 'onSubmit="return check_form(create_account);"') . smn_draw_hidden_field('action', 'process');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo HEADING_TITLE;
?>
</td>
<td class="pageHeading" align="right"><?php
echo smn_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
</tr>
</table></td>
示例8: Copyright
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<?php
echo smn_draw_form('a_password', smn_href_link(FILENAME_AFFILIATE_PASSWORD, '', 'NONSSL'), 'post', 'onSubmit="return check_form(a_password);"') . smn_draw_hidden_field('action', 'process');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo HEADING_TITLE;
?>
</td>
<td class="pageHeading" align="right"><?php
echo smn_image(DIR_WS_IMAGES . 'table_background_account.gif', HEADING_TITLE, HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT);
?>
</td>
</tr>
</table></td>
示例9: smn_href_link
?>
</td>
<td align="right"><?php
echo '<a href="' . smn_href_link(FILENAME_MAIL) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a> ' . smn_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL);
?>
</td>
</tr>
</table></td>
</tr>
</table></td>
</form></tr>
<?php
} else {
?>
<tr><?php
echo smn_draw_form('mail', FILENAME_MAIL, 'action=preview');
?>
<td><table border="0" cellpadding="0" cellspacing="2">
<tr>
<td colspan="2"><?php
echo smn_draw_separator('pixel_trans.gif', '1', '10');
?>
</td>
</tr>
<?php
$customers = array();
$customers[] = array('id' => '', 'text' => TEXT_SELECT_CUSTOMER);
$customers[] = array('id' => '***', 'text' => TEXT_ALL_CUSTOMERS);
$customers[] = array('id' => '**D', 'text' => TEXT_NEWSLETTER_CUSTOMERS);
$mail_query = smn_db_query("select distinct(customers.customers_email_address), customers_firstname, customers_lastname from " . TABLE_CUSTOMERS . ", " . TABLE_ORDERS . " where customers.customers_id = orders.customers_id and orders.store_id = " . $store_id . " group by customers.customers_id order by customers_lastname");
while ($customers_values = smn_db_fetch_array($mail_query)) {
示例10: str_replace
url: '<?php
echo str_replace('&', '&', smn_href_link(basename($_SERVER['PHP_SELF']), 'action=getZones'));
?>
&country_id=' + $(this).val(),
dataType: 'html',
success: function (html){
$('#stateInput').html(html);
}
});
});
});
</script>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%" valign="top"><?php
echo smn_draw_form('create_store_account', smn_href_link(FILENAME_CREATE_STORE_ACCOUNT, '', 'NONSSL'), 'post', 'enctype="multipart/form-data" onSubmit="return check_form(create_store_account);"') . smn_draw_hidden_field('action', 'process');
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
echo smn_draw_hidden_field('store_type', $_POST['store_type']);
?>
<?php
echo smn_draw_hidden_field('conditions', $_POST['conditions']);
?>
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo HEADING_TITLE;
?>
</td>
示例11: Copyright
Copyright (c) 2002 - 2006 SystemsManager.Net
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<?php
echo smn_draw_form('order', smn_href_link(FILENAME_CHECKOUT_SUCCESS, 'action=update', 'NONSSL'));
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0" class="infoBox">
<tr class="infoBoxContents">
<td><table border="0" width="100%" cellspacing="0" cellpadding="2">
<tr>
<td width="10"><?php
echo smn_draw_separator('pixel_trans.gif', '10', '1');
?>
</td>
<td valign="top"><?php
echo smn_image(DIR_WS_IMAGES . 'table_background_man_on_board.gif', HEADING_TITLE);
示例12: substr
}
$product_categories_string = substr($product_categories_string, 0, -4);
$contents[] = array('text' => '<br>' . $product_categories_string);
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'move_product':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_MOVE_PRODUCT . '</b>');
$contents = array('form' => smn_draw_form('products', FILENAME_CATEGORIES, 'action=move_product_confirm&cPath=' . $cPath) . smn_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => sprintf(TEXT_MOVE_PRODUCTS_INTRO, $pInfo->products_name));
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . smn_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br>' . sprintf(TEXT_MOVE, $pInfo->products_name) . '<br>' . smn_draw_pull_down_menu('move_to_category_id', smn_get_category_tree(), $current_category_id));
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_move.gif', IMAGE_MOVE) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'copy_to':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_COPY_TO . '</b>');
$contents = array('form' => smn_draw_form('copy_to', FILENAME_CATEGORIES, 'action=copy_to_confirm&cPath=' . $cPath) . smn_draw_hidden_field('products_id', $pInfo->products_id));
$contents[] = array('text' => TEXT_INFO_COPY_TO_INTRO);
$contents[] = array('text' => '<br>' . TEXT_INFO_CURRENT_CATEGORIES . '<br><b>' . smn_output_generated_category_path($pInfo->products_id, 'product') . '</b>');
$contents[] = array('text' => '<br>' . TEXT_CATEGORIES . '<br>' . smn_draw_pull_down_menu('categories_id', smn_get_category_tree(), $current_category_id));
$contents[] = array('text' => '<br>' . TEXT_HOW_TO_COPY . '<br>' . smn_draw_radio_field('copy_as', 'link', true) . ' ' . TEXT_COPY_AS_LINK . '<br>' . smn_draw_radio_field('copy_as', 'duplicate') . ' ' . TEXT_COPY_AS_DUPLICATE);
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_copy.gif', IMAGE_COPY) . ' <a href="' . smn_href_link(FILENAME_CATEGORIES, 'cPath=' . $cPath . '&pID=' . $pInfo->products_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if ($rows > 0) {
if (isset($cInfo) && is_object($cInfo)) {
// category info box contents
$category_path_string = '';
$category_path = smn_generate_category_path($cInfo->categories_id);
for ($i = sizeof($category_path[0]) - 1; $i > 0; $i--) {
$category_path_string .= $category_path[0][$i]['id'] . '_';
}
示例13: Copyright
Copyright (c) 2002 - 2006 SystemsManager.Net
SystemsManager Technologies
oscMall System Version 4
http://www.systemsmanager.net
Portions Copyright (c) 2002 osCommerce
This source file is subject to version 2.0 of the GPL license,
that is bundled with this package in the file LICENSE. If you
did not receive a copy of the oscMall System license and are unable
to obtain it through the world-wide-web, please send a note to
license@systemsmanager.net so we can mail you a copy immediately.
*/
?>
<?php
echo smn_draw_form('contact_us', smn_href_link(FILENAME_CONTACT_US, 'action=send'));
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td class="pageHeading"><?php
echo HEADING_TITLE;
?>
</td>
</tr>
<tr>
<td><?php
echo smn_draw_separator('pixel_trans.gif', '100%', '10');
?>
</td>
示例14: array
$contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . smn_draw_input_field('zone_code'));
$contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries()));
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_insert.gif', IMAGE_INSERT) . ' <a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page']) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'edit':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>');
$contents = array('form' => smn_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save'));
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
$contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . smn_draw_input_field('zone_name', $cInfo->zone_name));
$contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_CODE . '<br>' . smn_draw_input_field('zone_code', $cInfo->zone_code));
$contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . '<br>' . smn_draw_pull_down_menu('zone_country_id', smn_get_countries(), $cInfo->countries_id));
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_update.gif', IMAGE_UPDATE) . ' <a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
case 'delete':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>');
$contents = array('form' => smn_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO);
$contents[] = array('text' => '<br><b>' . $cInfo->zone_name . '</b>');
$contents[] = array('align' => 'center', 'text' => '<br>' . smn_image_submit('button_delete.gif', IMAGE_DELETE) . ' <a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '">' . smn_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a>');
break;
default:
if (isset($cInfo) && is_object($cInfo)) {
$heading[] = array('text' => '<b>' . $cInfo->zone_name . '</b>');
$contents[] = array('align' => 'center', 'text' => '<a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=edit') . '">' . smn_image_button('button_edit.gif', IMAGE_EDIT) . '</a> <a href="' . smn_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=delete') . '">' . smn_image_button('button_delete.gif', IMAGE_DELETE) . '</a>');
$contents[] = array('text' => '<br>' . TEXT_INFO_ZONES_NAME . '<br>' . $cInfo->zone_name . ' (' . $cInfo->zone_code . ')');
$contents[] = array('text' => '<br>' . TEXT_INFO_COUNTRY_NAME . ' ' . $cInfo->countries_name);
}
break;
}
if (smn_not_null($heading) && smn_not_null($contents)) {
echo ' <td width="25%" valign="top">' . "\n";
示例15: smn_href_link
}
$boxContent .= '<a href="' . smn_href_link(FILENAME_DEFAULT, 'ID=1&manufacturers_id=' . $manufacturers['manufacturers_id']) . '">' . $manufacturers_name . '</a><br>';
}
$boxContent = substr($boxContent, 0, -4);
} else {
// Display a drop-down
$manufacturers_array = array();
if (MAX_MANUFACTURERS_LIST < 2) {
$manufacturers_array[] = array('id' => '', 'text' => PULL_DOWN_DEFAULT);
}
while ($manufacturers = smn_db_fetch_array($manufacturers_query)) {
$manufacturers_name = strlen($manufacturers['manufacturers_name']) > MAX_DISPLAY_MANUFACTURER_NAME_LEN ? substr($manufacturers['manufacturers_name'], 0, MAX_DISPLAY_MANUFACTURER_NAME_LEN) . '..' : $manufacturers['manufacturers_name'];
$manufacturers_array[] = array('id' => $manufacturers['manufacturers_id'], 'text' => $manufacturers_name);
}
if ($session_started == true && smn_not_null($SID)) {
$link = 'ID=1&' . smn_session_name() . '=' . smn_session_id();
} else {
$link = 'ID=1';
}
$boxContent = smn_draw_form('manufacturers', smn_href_link(FILENAME_DEFAULT, $link, 'NONSSL', false), 'get');
$boxContent .= smn_draw_pull_down_menu('manufacturers_id', $manufacturers_array, isset($_GET['manufacturers_id']) ? $_GET['manufacturers_id'] : '', 'onChange="this.form.submit();" size="' . MAX_MANUFACTURERS_LIST . '" style="width: 100%"');
$boxContent .= '</form>';
}
$boxContent .= smn_hide_session_id();
if (file_exists(DIR_WS_BOX_TEMPLATES . $box_base_name . '.php')) {
require DIR_WS_BOX_TEMPLATES . $box_base_name . '.php';
} else {
require DEFAULT_TEMPLATENAME_BOX;
}
$boxContent_attributes = '';
}