本文整理汇总了PHP中xos_draw_pull_down_menu函数的典型用法代码示例。如果您正苦于以下问题:PHP xos_draw_pull_down_menu函数的具体用法?PHP xos_draw_pull_down_menu怎么用?PHP xos_draw_pull_down_menu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了xos_draw_pull_down_menu函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: display_links
function display_links($query_numrows, $max_rows_per_page, $max_page_links, $current_page_number, $parameters = '', $page_name = 'page')
{
if (xos_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 = xos_draw_form('pages', basename($_SERVER['PHP_SELF']), '', 'get');
if ($current_page_number > 1) {
$display_links .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number - 1)) . '" class="splitPageLink">' . PREVNEXT_BUTTON_PREV . '</a> ';
} else {
$display_links .= PREVNEXT_BUTTON_PREV . ' ';
}
$display_links .= sprintf(TEXT_RESULT_PAGE, xos_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="' . xos_href_link(basename($_SERVER['PHP_SELF']), $parameters . $page_name . '=' . ($current_page_number + 1)) . '" 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 .= xos_draw_hidden_field(rawurldecode($key), rawurldecode($value));
}
}
if (SESSID) {
$display_links .= xos_draw_hidden_field(xos_session_name(), xos_session_id());
}
$display_links .= '</form>';
} else {
$display_links = sprintf(TEXT_RESULT_PAGE, $num_pages, $num_pages);
}
return $display_links;
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:43,代码来源:split_page_results.php
示例2: confirm
function confirm()
{
$mail_addresses_query = xos_db_query("select s.subscriber_id, s.subscriber_email_address, c.customers_firstname, c.customers_lastname from " . TABLE_NEWSLETTER_SUBSCRIBERS . " s left join " . TABLE_CUSTOMERS . " c on s.customers_id = c.customers_id where s.newsletter_status = '1' " . ($this->language_id > 0 ? 'and s.subscriber_language_id = ' . $this->language_id : '') . " order by s.customers_id");
$count = 0;
$costomers_array = array();
while ($mail_addresses = xos_db_fetch_array($mail_addresses_query)) {
$count++;
$costomers_array[] = array('id' => $mail_addresses['subscriber_id'], 'text' => '<' . $mail_addresses['subscriber_email_address'] . '> ' . $mail_addresses['customers_firstname'] . ' ' . $mail_addresses['customers_lastname']);
}
$cancel_button = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;" onclick="document.location=\\\'' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '\\\'" />\');' . "\n" . '/* ]]> */' . "\n" . '</script>';
$confirm_string = "\n" . '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function mover(move) {' . "\n" . ' if (move == \'remove\') {' . "\n" . ' for (x=0; x<(document.notifications.costomers.length); x++) {' . "\n" . ' if (document.notifications.costomers.options[x].selected) {' . "\n" . ' with(document.notifications.elements[\'customers_chosen[]\']) {' . "\n" . ' options[options.length] = new Option(document.notifications.costomers.options[x].text,document.notifications.costomers.options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.costomers.options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' if (move == \'add\') {' . "\n" . ' for (x=0; x<(document.notifications.elements[\'customers_chosen[]\'].length); x++) {' . "\n" . ' if (document.notifications.elements[\'customers_chosen[]\'].options[x].selected) {' . "\n" . ' with(document.notifications.costomers) {' . "\n" . ' options[options.length] = new Option(document.notifications.elements[\'customers_chosen[]\'].options[x].text,document.notifications.elements[\'customers_chosen[]\'].options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.elements[\'customers_chosen[]\'].options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' return true;' . "\n" . '}' . "\n\n" . 'function selectAll(FormName, SelectBox) {' . "\n" . ' temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";' . "\n" . ' Source = eval(temp);' . "\n\n" . ' for (x=0; x<(Source.length); x++) {' . "\n" . ' Source.options[x].selected = "true";' . "\n" . ' }' . "\n\n" . ' if (x<1) {' . "\n" . ' alert(\'' . JS_PLEASE_SELECT_CUSTOMERS . '\');' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
$confirm_string .= '<table width="100%" border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td class="main"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $count) . '</b></td>' . "\n" . ' </tr>' . "\n" . ($count > 0 ? ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . ' <form name="notifications" action="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '" method="post" onsubmit="return selectAll(\'notifications\', \'customers_chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('costomers', $costomers_array, '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' <td align="center" class="main"><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onclick="mover(\'remove\');" /><br /><br /><input type="button" value="' . htmlspecialchars(BUTTON_UNSELECT) . '" style="width: 8em;" onclick="mover(\'add\');" /><br /><br /><br /><br /><input type="submit" value="' . BUTTON_SEND . '" style="width: 8em;" /><br /><br />' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_SELECTED_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('customers_chosen[]', array(), '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' </tr>' . "\n" . ' </table></form>' . ' </td>' . ' </tr>' . "\n" : ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . ' <form name="notifications" action="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '" method="post" onsubmit="return selectAll(\'notifications\', \'customers_chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('costomers', $costomers_array, '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' <td align="center" class="main">' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_SELECTED_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('customers_chosen[]', array(), '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' </tr>' . "\n" . ' </table></form>' . ' </td>' . ' </tr>' . "\n") . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td class="main"><b>' . $this->title . '</b></td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n";
if ($this->content_text_htlm != '' && EMAIL_USE_HTML == 'true') {
$confirm_string .= ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_TEXT . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><pre>' . wordwrap($this->content_text_plain, 100) . '</pre></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_HTML . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . $this->content_text_htlm . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n";
} else {
$confirm_string .= ' <tr class="dataHeadingRow">' . "\n" . ' <td class="dataHeadingContent" valign="top">' . TEXT_TEXT . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td class="main"><pre>' . wordwrap($this->content_text_plain, 100) . '</pre></td>' . "\n" . ' </tr>' . "\n" . ' <tr>' . "\n" . ' <td>' . xos_draw_separator('pixel_black.gif', '100%', '1') . '</td>' . "\n" . ' </tr>' . "\n";
}
$confirm_string .= '</table>';
return $confirm_string;
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:20,代码来源:newsletter.php
示例3: array
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XOS-Shop. If not, see <http://www.gnu.org/licenses/>.
//------------------------------------------------------------------------------
// this file is based on:
// osCommerce, Open Source E-Commerce Solutions
// http://www.oscommerce.com
// Copyright (c) 2003 osCommerce
// filename: currencies.php
//
// Released under the GNU General Public License
////////////////////////////////////////////////////////////////////////////////
if (!(@(include DIR_FS_SMARTY . 'catalog/templates/' . SELECTED_TPL . '/php/includes/boxes/template_changer.php') == 'overwrite_all')) {
$registered_tpls = array();
$registered_tpls = explode(',', REGISTERED_TPLS);
if (sizeof($registered_tpls) > 1) {
for ($i = 0; $i < sizeof($registered_tpls); $i++) {
$tpl_array[] = array('id' => xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('tpl')) . 'tpl=' . $registered_tpls[$i], $request_type, true, true, false, false, false), 'text' => $registered_tpls[$i]);
$template_changer_content_noscript .= '<a href="' . xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('tpl')) . 'tpl=' . $registered_tpls[$i], $request_type, true, true, false, false, false) . '">' . ' ' . (SELECTED_TPL == $registered_tpls[$i] ? '<b>' . $registered_tpls[$i] . '</b>' : $registered_tpls[$i]) . '</a><br />';
}
$template_changer_content_noscript = substr($template_changer_content_noscript, 0, -6);
$template_changer_content = xos_draw_form('templates', xos_href_link(basename($_SERVER['PHP_SELF']), '', $request_type, false, true, false, false, false), 'get');
$template_changer_content .= xos_draw_pull_down_menu('tpl', $tpl_array, xos_href_link(basename($_SERVER['PHP_SELF']), xos_get_all_get_params(array('tpl')) . 'tpl=' . SELECTED_TPL, $request_type, true, true, false, false, false), 'class="form-control" onchange="location = form.tpl.options[form.tpl.selectedIndex].value;"');
$template_changer_content .= '</form>';
$smarty->assign(array('box_template_changer_content' => $template_changer_content, 'box_template_changer_content_noscript' => $template_changer_content_noscript));
$output_template_changer = $smarty->fetch(SELECTED_TPL . '/includes/boxes/template_changer.tpl');
$smarty->assign('box_template_changer', $output_template_changer);
}
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:template_changer.php
示例4: xos_db_query
case 'edit':
$check_query = xos_db_query("select ab.entry_zone_id, zgz.zone_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_ZONES_TO_GEO_ZONES . " zgz where ab.entry_zone_id = '" . (int) $cInfo->zone_id . "' or zgz.zone_id = '" . (int) $cInfo->zone_id . "' LIMIT 1");
$heading_title = '<b>' . TEXT_INFO_HEADING_EDIT_ZONE . '</b>';
$form_tag = xos_draw_form('zones', FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id . '&action=save');
$contents[] = array('text' => TEXT_INFO_EDIT_INTRO);
if (isset($_GET['error_name'])) {
if (empty($_GET['error_name'])) {
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME_ERROR_EMPTY . '<br />');
} else {
$contents[] = array('text' => '<br />' . sprintf(TEXT_INFO_ZONES_NAME_ERROR, $_GET['error_name']) . '<br />');
}
}
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_NAME . '<br />' . xos_draw_input_field('zone_name', isset($_GET['zone_name']) ? $_GET['zone_name'] : $cInfo->zone_name) . xos_draw_hidden_field('actual_zone_name', $cInfo->zone_name));
$contents[] = array('text' => '<br />' . TEXT_INFO_ZONES_CODE . '<br />' . xos_draw_input_field('zone_code', isset($_GET['zone_code']) ? $_GET['zone_code'] : $cInfo->zone_code));
if (!xos_db_num_rows($check_query) && STORE_ZONE != $cInfo->zone_id) {
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br />' . xos_draw_pull_down_menu('zone_country_id', xos_get_countries(), isset($_GET['zone_country_id']) ? $_GET['zone_country_id'] : $cInfo->countries_id, 'style="font-size:9px"') . xos_draw_hidden_field('actual_zone_country_id', $cInfo->countries_id));
} else {
$contents[] = array('text' => '<br />' . TEXT_INFO_COUNTRY_NAME . '<br /><b>' . $cInfo->countries_name . '</b>' . xos_draw_hidden_field('zone_country_id', $cInfo->countries_id) . xos_draw_hidden_field('actual_zone_country_id', $cInfo->countries_id));
}
$contents[] = array('text' => '<br /><a href="" onclick="zones.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_UPDATE . ' "><span>' . BUTTON_TEXT_UPDATE . '</span></a><a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
break;
case 'delete':
$check_query = xos_db_query("select ab.entry_zone_id, zgz.zone_id from " . TABLE_ADDRESS_BOOK . " ab, " . TABLE_ZONES_TO_GEO_ZONES . " zgz where ab.entry_zone_id = '" . (int) $cInfo->zone_id . "' or zgz.zone_id = '" . (int) $cInfo->zone_id . "' LIMIT 1");
$heading_title = '<b>' . TEXT_INFO_HEADING_DELETE_ZONE . '</b>';
if (!xos_db_num_rows($check_query) && STORE_ZONE != $cInfo->zone_id) {
$form_tag = xos_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('text' => '<br /><a href="" onclick="zones.submit(); return false" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_DELETE . ' "><span>' . BUTTON_TEXT_DELETE . '</span></a><a href="' . xos_href_link(FILENAME_ZONES, 'page=' . $_GET['page'] . '&cID=' . $cInfo->zone_id) . '" class="button-default" style="margin-right: 5px; float: left" title=" ' . BUTTON_TITLE_CANCEL . ' "><span>' . BUTTON_TEXT_CANCEL . '</span></a><br /> ');
} else {
$contents[] = array('text' => TEXT_INFO_DELETE_NOT_ALLOWED . '<br /><br />');
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:infobox_zones.php
示例5: xos_draw_radio_field
$male = $account['customers_gender'] == 'm' ? true : false;
}
$female = !$male;
$smarty->assign(array('account_gender' => true, 'input_gender' => xos_draw_radio_field('gender', 'm', $male, 'id="gender_m"') . '<label class="control-label" for="gender_m"> ' . MALE . ' </label>' . xos_draw_radio_field('gender', 'f', $female, 'id="gender_f"') . '<label class="control-label" for="gender_f"> ' . FEMALE . ' </label>' . (xos_not_null(ENTRY_GENDER_TEXT) ? '<span class="input-requirement">' . ENTRY_GENDER_TEXT . '</span>' : '')));
}
if (ACCOUNT_DOB == 'true') {
$smarty->assign(array('account_dob' => true, 'input_dob' => xos_draw_input_field('dob', xos_date_short($account['customers_dob']), 'class="form-control" id="dob"') . ' ' . (xos_not_null(ENTRY_DATE_OF_BIRTH_TEXT) ? '<span class="input-requirement">' . ENTRY_DATE_OF_BIRTH_TEXT . '</span>' : '')));
}
reset($lng->catalog_languages);
if (sizeof($lng->catalog_languages) > 1) {
$lang_array = array();
$languages_selected = '';
while (list($key, $value) = each($lng->catalog_languages)) {
$lang_array[] = array('id' => $value['id'], 'text' => $value['name']);
if (!empty($language_id)) {
$languages_selected = $language_id;
} elseif ($value['id'] == $account['customers_language_id']) {
$languages_selected = $account['customers_language_id'];
}
}
$smarty->assign(array('languages' => true, 'pull_down_menu_languages' => xos_draw_pull_down_menu('languages', $lang_array, $languages_selected, 'class="form-control" id="languages"')));
} else {
$smarty->assign('hidden_field_languages', xos_draw_hidden_field('languages', $account['customers_language_id']));
}
$smarty->assign(array('form_begin' => xos_draw_form('account_edit', xos_href_link(FILENAME_ACCOUNT_EDIT, '', 'SSL'), 'post', 'onsubmit="return true;"', true), 'hidden_field' => xos_draw_hidden_field('action', 'process'), 'link_filename_account' => xos_href_link(FILENAME_ACCOUNT, '', 'SSL'), 'c_id' => $account['customers_c_id'], 'input_firstname' => xos_draw_input_field('firstname', $account['customers_firstname'], 'class="form-control" id="firstname"') . ' ' . (xos_not_null(ENTRY_FIRST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_FIRST_NAME_TEXT . '</span>' : ''), 'input_lastname' => xos_draw_input_field('lastname', $account['customers_lastname'], 'class="form-control" id="lastname"') . ' ' . (xos_not_null(ENTRY_LAST_NAME_TEXT) ? '<span class="input-requirement">' . ENTRY_LAST_NAME_TEXT . '</span>' : ''), 'input_email_address' => xos_draw_input_field('email_address', $account['customers_email_address'], 'class="form-control" id="email_address"') . ' ' . (xos_not_null(ENTRY_EMAIL_ADDRESS_TEXT) ? '<span class="input-requirement">' . ENTRY_EMAIL_ADDRESS_TEXT . '</span>' : ''), 'input_telephone' => xos_draw_input_field('telephone', $account['customers_telephone'], 'class="form-control" id="telephone"') . ' ' . (xos_not_null(ENTRY_TELEPHONE_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_TELEPHONE_NUMBER_TEXT . '</span>' : ''), 'input_fax' => xos_draw_input_field('fax', $account['customers_fax'], 'class="form-control" id="fax"') . ' ' . (xos_not_null(ENTRY_FAX_NUMBER_TEXT) ? '<span class="input-requirement">' . ENTRY_FAX_NUMBER_TEXT . '</span>' : ''), 'form_end' => '</form>'));
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'account_edit');
$output_account_edit = $smarty->fetch(SELECTED_TPL . '/account_edit.tpl');
$smarty->assign('central_contents', $output_account_edit);
$smarty->display(SELECTED_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:account_edit.php
示例6: while
while ($orders = xos_db_fetch_array($orders_query)) {
$oder_total_query = xos_db_query("select text from " . TABLE_ORDERS_TOTAL . " where orders_id = '" . (int) $orders['orders_id'] . "' and class = 'ot_total' order by orders_total_id DESC limit 1");
$oder_total = xos_db_fetch_array($oder_total_query);
if ((!isset($_GET['oID']) || isset($_GET['oID']) && $_GET['oID'] == $orders['orders_id']) && !isset($oInfo)) {
$oInfo = new objectInfo($orders);
}
$selected = false;
if (isset($oInfo) && is_object($oInfo) && $orders['orders_id'] == $oInfo->orders_id) {
$selected = true;
$link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit');
} else {
$link_filename_orders = xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID')) . 'oID=' . $orders['orders_id']);
}
$orders_array[] = array('selected' => $selected, 'link_filename_orders' => $link_filename_orders, 'link_filename_orders_action_edit' => xos_href_link(FILENAME_ORDERS, xos_get_all_get_params(array('oID', 'action')) . 'oID=' . $orders['orders_id'] . '&action=edit'), 'customers_name' => $orders['customers_name'], 'order_total' => strip_tags($oder_total['text']), 'date_purchased' => xos_datetime_short($orders['date_purchased']), 'order_status_name' => $orders['orders_status_name']);
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_orders' => xos_draw_form('orders', FILENAME_ORDERS, '', 'get'), 'input_oid' => xos_draw_input_field('oID', '', 'size="12"'), 'hidden_action' => xos_draw_hidden_field('action', 'edit'), 'form_begin_status' => xos_draw_form('new_status', FILENAME_ORDERS, '', 'get'), 'pull_down_status' => xos_draw_pull_down_menu('status', array_merge(array(array('id' => '', 'text' => TEXT_ALL_ORDERS)), (array) $orders_statuses), '', 'onchange="this.form.submit();"'), 'form_end' => '</form>', 'orders' => $orders_array, 'nav_bar_number' => $orders_split->display_count($orders_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_ORDERS), 'nav_bar_result' => $orders_split->display_links($orders_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], xos_get_all_get_params(array('page', 'oID', 'action')))));
require DIR_WS_BOXES . 'infobox_orders.php';
}
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'orders');
$language_directory_query = xos_db_query("select directory from " . TABLE_LANGUAGES . " where use_in_id > '1' and directory = '" . $order->info['language_directory'] . "'");
if (xos_db_num_rows($language_directory_query)) {
$smarty->configLoad(DIR_FS_SMARTY . 'catalog/languages/' . $order->info['language_directory'] . '.conf', 'order_info');
}
$output_orders = $smarty->fetch(ADMIN_TPL . '/orders.tpl');
$smarty->assign('central_contents', $output_orders);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:orders.php
示例7: elseif
} elseif (EMAIL_USE_HTML == 'true') {
$smarty->assign(array('use_html' => true, 'textarea_content_text_htlm' => xos_draw_textarea_field('content_text_htlm', '130', '25', $nInfo->content_text_htlm)));
}
$smarty->assign('textarea_content_text_plain', xos_draw_textarea_field('content_text_plain', '130', '25', $nInfo->content_text_plain));
$languages = xos_get_languages();
if (sizeof($languages) > 1) {
$languages_id_selected = '';
$lang_array = array(array('id' => '0', 'text' => TEXT_ALL_LANGUAGES));
for ($i = 0, $n = sizeof($languages); $i < $n; $i++) {
$lang_array[] = array('id' => $languages[$i]['id'], 'text' => $languages[$i]['name']);
}
$smarty->assign(array('languages' => true, 'pull_down_languages' => xos_draw_pull_down_menu('language_id', $lang_array, $nInfo->language_id)));
} else {
$smarty->assign('hidden_field_language_id', xos_draw_hidden_field('language_id', $languages[0]['id']));
}
$smarty->assign(array('action' => 'new', 'form_begin_new' => xos_draw_form('newsletter', FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . 'action=' . $form_action, 'post', 'onsubmit="return confirm(\'' . ($form_action == 'insert' ? JS_CONFIRM_INSERT : JS_CONFIRM_UPDATE) . '\')" enctype="multipart/form-data"'), 'pull_down_module' => xos_draw_pull_down_menu('module', $modules_array, $nInfo->module), 'input_title' => xos_draw_input_field('title', $nInfo->title, '', true), 'link_filename_newsletters_cancel' => xos_href_link(FILENAME_NEWSLETTERS, (isset($_GET['page']) ? 'page=' . $_GET['page'] . '&' : '') . (isset($_GET['nID']) ? 'nID=' . $_GET['nID'] : ''))));
} elseif ($action == 'preview') {
$nID = xos_db_prepare_input($_GET['nID']);
$newsletter_query = xos_db_query("select title, content_text_plain, content_text_htlm, module from " . TABLE_NEWSLETTERS . " where newsletters_id = '" . (int) $nID . "'");
$newsletter = xos_db_fetch_array($newsletter_query);
$nInfo = new objectInfo($newsletter);
if ($nInfo->content_text_htlm != '' && EMAIL_USE_HTML == 'true') {
$smarty->assign(array('content_text_plain' => wordwrap($nInfo->content_text_plain, 100), 'content_text_htlm' => $nInfo->content_text_htlm));
} else {
$smarty->assign('content_text_plain', wordwrap($nInfo->content_text_plain, 100));
}
$smarty->assign(array('action' => 'preview', 'link_filename_newsletters_back' => xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'])));
} elseif ($action == 'send') {
$nID = xos_db_prepare_input($_GET['nID']);
$newsletter_query = xos_db_query("select ns.title, ns.language_id, ns.content_text_plain, ns.content_text_htlm, ns.module, ls.code as language_code, ls.directory as language_directory from " . TABLE_NEWSLETTERS . " ns left join " . TABLE_LANGUAGES . " ls on ns.language_id = ls.languages_id where newsletters_id = '" . (int) $nID . "'");
$newsletter = xos_db_fetch_array($newsletter_query);
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:newsletters.php
示例8: xos_draw_pull_down_menu
$smarty->assign('newsletter_in_out_values', xos_draw_pull_down_menu('newsletter_status', $newsletter_array, $cInfo->newsletter_status == '1' ? '1' : '0'));
}
}
if ($processed != true) {
$index = 0;
while ($existing_customers = xos_db_fetch_array($existing_customers_query)) {
$existing_customers_array[] = array("id" => $existing_customers['customers_group_id'], "text" => ' ' . $existing_customers['customers_group_name'] . ' ');
++$index;
}
}
if ($processed == true) {
$customer_group_name_query = xos_db_query("select customers_group_name as name from " . TABLE_CUSTOMERS_GROUPS . " where customers_group_id = '" . $cInfo->customers_group_id . "'");
$customer_group_name = xos_db_fetch_array($customer_group_name_query);
$smarty->assign('customers_group_id_in_out_values', $customer_group_name['name'] . xos_draw_hidden_field('customers_group_id'));
} else {
$smarty->assign('customers_group_id_in_out_values', xos_draw_pull_down_menu('customers_group_id', $existing_customers_array, $cInfo->customers_group_id));
}
if ($processed == true) {
$smarty->assign(array('several_lng_in_admin' => false, 'comments_in_out_values' => nl2br($cInfo->customers_comments) . xos_draw_hidden_field('customers_comments')));
} else {
$lng_query = xos_db_query("select languages_id from " . TABLE_LANGUAGES . " where use_in_id <> '2'");
$smarty->assign(array('several_lng_in_admin' => xos_db_num_rows($lng_query) > 1 ? true : false, 'comments_in_out_values' => xos_draw_textarea_field('customers_comments', '80', '10', $cInfo->customers_comments)));
}
$smarty->assign(array('edit_or_update' => true, 'form_begin_customers' => xos_draw_form('customers', FILENAME_CUSTOMERS, xos_get_all_get_params(array('action')) . 'action=update', 'post', 'onsubmit="return check_form();"'), 'hidden_default_address_id' => xos_draw_hidden_field('default_address_id', $cInfo->customers_default_address_id), 'link_filename_customers' => xos_href_link(FILENAME_CUSTOMERS, xos_get_all_get_params(array('action'))), 'form_end' => '</form>'));
} else {
switch ($_GET['listing']) {
case "id-asc":
$order = "c.customers_id";
break;
case "cg_name":
$order = "cg.customers_group_name, c.customers_lastname";
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:customers.php
示例9: xos_db_num_rows
$redemptions = xos_db_num_rows($redeem_query);
$coupon_status = false;
if ($cc_list['coupon_active'] == 'Y') {
$coupon_status = true;
}
$cc_list_array[] = array('selected' => $selected, 'status' => $coupon_status, 'name' => $coupon_desc['coupon_name'], 'amount' => $coupon_amount, 'code' => $cc_list['coupon_code'], 'redemptions' => $redemptions, 'icon_status_green' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green.gif', ICON_TITLE_STATUS_GREEN), 'icon_status_red' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red.gif', ICON_TITLE_STATUS_RED), 'icon_status_green_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_green_light.gif', ICON_TITLE_STATUS_GREEN_LIGHT), 'icon_status_red_light' => xos_image(DIR_WS_ADMIN_IMAGES . ADMIN_TPL . '/icon_status_red_light.gif', ICON_TITLE_STATUS_RED_LIGHT), 'link_filename_coupon_admin_action_setflag_N' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=N&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_action_setflag_Y' => xos_href_link(FILENAME_COUPON_ADMIN, 'action=setflag&flag=Y&cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin' => xos_href_link(FILENAME_COUPON_ADMIN, xos_get_all_get_params(array('cid', 'action')) . 'cid=' . $cc_list['coupon_id']), 'link_filename_coupon_admin_edit' => $link_filename_coupon_admin_edit);
}
$smarty->assign('cc_list', $cc_list_array);
$status_array[] = array('id' => 'Y', 'text' => TEXT_COUPON_ACTIVE);
$status_array[] = array('id' => 'N', 'text' => TEXT_COUPON_INACTIVE);
$status_array[] = array('id' => 'R', 'text' => TEXT_COUPON_REDEEMED);
$status_array[] = array('id' => '*', 'text' => TEXT_COUPON_ALL);
if ($_GET['status']) {
$status = xos_db_prepare_input($_GET['status']);
} else {
// Changed from "Y" to "*" to see the Red Active and the Green Inactive status
$status = '*';
}
if (SESSID) {
$smarty->assign('hidden_field_session', xos_draw_hidden_field(xos_session_name(), xos_session_id()));
}
$smarty->assign(array('form_begin_status' => xos_draw_form('status', FILENAME_COUPON_ADMIN, '', 'get'), 'pull_down_status' => xos_draw_pull_down_menu('status', $status_array, $status, 'onchange="this.form.submit();"'), 'form_end' => '</form>'));
$smarty->assign(array('nav_bar_number' => $cc_split->display_count($cc_query_numrows, MAX_DISPLAY_RESULTS, $_GET['page'], TEXT_DISPLAY_NUMBER_OF_COUPONS), 'nav_bar_result' => $cc_split->display_links($cc_query_numrows, MAX_DISPLAY_RESULTS, MAX_DISPLAY_PAGE_LINKS, $_GET['page'], 'status=' . $_GET['status']), 'link_filename_coupon_admin_new' => xos_href_link(FILENAME_COUPON_ADMIN, 'page=' . $_GET['page'] . '&cID=' . $cInfo->coupon_id . '&action=new')));
require DIR_WS_BOXES . 'infobox_coupon_admin.php';
}
$smarty->configLoad('languages/' . $_SESSION['language'] . '.conf', 'coupon_admin');
$output_coupon_admin = $smarty->fetch(ADMIN_TPL . '/coupon_admin.tpl');
$smarty->assign('central_contents', $output_coupon_admin);
$smarty->display(ADMIN_TPL . '/frame.tpl');
require DIR_WS_INCLUDES . 'application_bottom.php';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:31,代码来源:coupon_admin.php
示例10: xos_cfg_pull_down_order_statuses
function xos_cfg_pull_down_order_statuses($order_status_id, $key = '')
{
$name = $key ? 'configuration[' . $key . ']' : 'configuration_value';
$statuses_array = array(array('id' => '0', 'text' => TEXT_DEFAULT));
$statuses_query = xos_db_query("select orders_status_id, orders_status_name from " . TABLE_ORDERS_STATUS . " where orders_status_code = '' and language_id = '" . (int) $_SESSION['used_lng_id'] . "' order by orders_status_name");
while ($statuses = xos_db_fetch_array($statuses_query)) {
$statuses_array[] = array('id' => $statuses['orders_status_id'], 'text' => $statuses['orders_status_name']);
}
return '<div class="form-group">' . xos_draw_pull_down_menu($name, $statuses_array, $order_status_id, 'class="form-control"') . '</div>';
}
开发者ID:bamper,项目名称:xos_shop_system,代码行数:10,代码来源:general.php
示例11: confirm
function confirm()
{
$audience = array();
if (isset($_GET['global']) && $_GET['global'] == 'true') {
$products_query = xos_db_query("select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id " . ($this->language_id > 0 ? 'and c.customers_language_id = ' . $this->language_id : '') . "");
while ($products = xos_db_fetch_array($products_query)) {
$audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
}
$customers_query = xos_db_query("select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id and ci.global_product_notifications = '1' " . ($this->language_id > 0 ? 'and c.customers_language_id = ' . $this->language_id : '') . "");
while ($customers = xos_db_fetch_array($customers_query)) {
$audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
}
} else {
$chosen = $_POST['chosen'];
$ids = implode(',', $chosen);
$products_query = xos_db_query("select distinct pn.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_PRODUCTS_NOTIFICATIONS . " pn where c.customers_id = pn.customers_id " . ($this->language_id > 0 ? 'and c.customers_language_id = ' . $this->language_id : '') . " and pn.products_id in (" . $ids . ")");
while ($products = xos_db_fetch_array($products_query)) {
$audience[$products['customers_id']] = array('firstname' => $products['customers_firstname'], 'lastname' => $products['customers_lastname'], 'email_address' => $products['customers_email_address']);
}
$customers_query = xos_db_query("select c.customers_id, c.customers_firstname, c.customers_lastname, c.customers_email_address from " . TABLE_CUSTOMERS . " c, " . TABLE_CUSTOMERS_INFO . " ci where c.customers_id = ci.customers_info_id and ci.global_product_notifications = '1' " . ($this->language_id > 0 ? 'and c.customers_language_id = ' . $this->language_id : '') . "");
while ($customers = xos_db_fetch_array($customers_query)) {
$audience[$customers['customers_id']] = array('firstname' => $customers['customers_firstname'], 'lastname' => $customers['customers_lastname'], 'email_address' => $customers['customers_email_address']);
}
}
$count = 0;
$costomers_array = array();
reset($audience);
while (list($key, $value) = each($audience)) {
$count++;
$costomers_array[] = array('id' => $key, 'text' => $value['firstname'] . ' ' . $value['lastname'] . ' <' . $value['email_address'] . '>');
}
$cancel_button = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_CANCEL . '" style="width: 8em;" onclick="document.location=\\\'' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '\\\'" />\');' . "\n" . '/* ]]> */' . "\n" . '</script>';
$return_button = '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'document.write(\'<input type="button" value="' . BUTTON_BACK . '" style="width: 8em;" onclick="document.location=\\\'' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID']) . '&action=send \\\'" />\');' . "\n" . '/* ]]> */' . "\n" . '</script>';
$confirm_string = "\n" . '<script type="text/javascript">' . "\n" . '/* <![CDATA[ */' . "\n" . 'function mover(move) {' . "\n" . ' if (move == \'remove\') {' . "\n" . ' for (x=0; x<(document.notifications.costomers.length); x++) {' . "\n" . ' if (document.notifications.costomers.options[x].selected) {' . "\n" . ' with(document.notifications.elements[\'customers_chosen[]\']) {' . "\n" . ' options[options.length] = new Option(document.notifications.costomers.options[x].text,document.notifications.costomers.options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.costomers.options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' if (move == \'add\') {' . "\n" . ' for (x=0; x<(document.notifications.elements[\'customers_chosen[]\'].length); x++) {' . "\n" . ' if (document.notifications.elements[\'customers_chosen[]\'].options[x].selected) {' . "\n" . ' with(document.notifications.costomers) {' . "\n" . ' options[options.length] = new Option(document.notifications.elements[\'customers_chosen[]\'].options[x].text,document.notifications.elements[\'customers_chosen[]\'].options[x].value);' . "\n" . ' }' . "\n" . ' document.notifications.elements[\'customers_chosen[]\'].options[x] = null;' . "\n" . ' x = -1;' . "\n" . ' }' . "\n" . ' }' . "\n" . ' }' . "\n" . ' return true;' . "\n" . '}' . "\n\n" . 'function selectAll(FormName, SelectBox) {' . "\n" . ' temp = "document." + FormName + ".elements[\'" + SelectBox + "\']";' . "\n" . ' Source = eval(temp);' . "\n\n" . ' for (x=0; x<(Source.length); x++) {' . "\n" . ' Source.options[x].selected = "true";' . "\n" . ' }' . "\n\n" . ' if (x<1) {' . "\n" . ' alert(\'' . JS_PLEASE_SELECT_CUSTOMERS . '\');' . "\n" . ' return false;' . "\n" . ' } else {' . "\n" . ' return true;' . "\n" . ' }' . "\n" . '}' . "\n" . '/* ]]> */' . "\n" . '</script>' . "\n";
$confirm_string .= '<table width="100%" border="0" cellspacing="0" cellpadding="2">' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td class="main"><b>' . sprintf(TEXT_COUNT_CUSTOMERS, $count) . '</b></td>' . "\n" . ' </tr>' . "\n" . ($count > 0 ? ' <tr class="dataTableRow">' . "\n" . ' <td>' . xos_draw_separator('pixel_trans.gif', '1', '10') . '</td>' . "\n" . ' </tr>' . "\n" . ' <tr class="dataTableRow">' . "\n" . ' <td>' . ' <form name="notifications" action="' . xos_href_link(FILENAME_NEWSLETTERS, 'page=' . $_GET['page'] . '&nID=' . $_GET['nID'] . '&action=confirm_send') . '" method="post" onsubmit="return selectAll(\'notifications\', \'customers_chosen[]\')"><table border="0" width="100%" cellspacing="0" cellpadding="2">' . "\n" . ' <tr>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_CUSTOMERS . '</b><br />' . xos_draw_pull_down_menu('costomers', $costomers_array, '', 'size="30" style="width: 30em; font-size:9px" multiple="multiple"') . '</td>' . "\n" . ' <td align="center" class="main"><input type="button" value="' . BUTTON_SELECT . '" style="width: 8em;" onclick="mover(\'remove\');" /><br /><br /><input type="button" value="' . htmlspecialchars(BUTTON_UNSELECT) . '" style="width: 8em;" onclick="mover(\'add\');" /><br /><br /><br /><br /><input type="submit" value="' . BUTTON_SEND . '" style="width: 8em;" /><br /><br />' . $return_button . '<br /><br />' . $cancel_button . '</td>' . "\n" . ' <td align="center" class="main"><b>' . TEXT_SELECTED_CUSTOME
|
请发表评论