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


PHP zen_output_string_protected函数代码示例

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


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

示例1: zen_customer_greeting_for_smartphone

function zen_customer_greeting_for_smartphone()
{
    if (isset($_SESSION['customer_id']) && $_SESSION['customer_first_name']) {
        $greeting_string = sprintf(TEXT_GREETING_FOR_SMARTPHONE_PERSONAL, zen_href_link(FILENAME_ACCOUNT), zen_output_string_protected($_SESSION['customer_first_name']), zen_href_link(FILENAME_LOGOFF));
    } else {
        $greeting_string = sprintf(TEXT_GREETING_FOR_SMARTPHONE_GUEST, zen_href_link(FILENAME_LOGIN, '', 'SSL'), zen_href_link(FILENAME_CREATE_ACCOUNT, '', 'SSL'));
    }
    return $greeting_string;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:9,代码来源:functions.php

示例2: un_get_fullname

function un_get_fullname($firstname = '', $lastname = '', $default = '')
{
    if (zen_not_null($firstname) && zen_not_null($lastname)) {
        $name = $firstname . " " . $lastname;
    } elseif (zen_not_null($firstname)) {
        $name = $firstname;
    } elseif (zen_not_null($lastname)) {
        $name = $lastname;
    } else {
        $name = $default;
    }
    return zen_output_string_protected($name);
}
开发者ID:quangn92,项目名称:visualyou,代码行数:13,代码来源:wishlist_general.php

示例3: zen_draw_pull_down_menu_SBAmod

function zen_draw_pull_down_menu_SBAmod($name, $values, $default = '', $parameters = '', $required = false, $disable = null, $options_menu_images = null)
{
    global $template_dir;
    $tmp_attribID = trim($name, 'id[]');
    //used to get the select ID reference to be used in jquery
    $field = '<script type="text/javascript">
	  			$(function(){
					$("#attrib-' . $tmp_attribID . '").on("click", function(){
						$("#SBA_ProductImage").attr("src", $(this).find(":selected").attr("data-src"));
					});
				});
			</script>';
    $field .= '<select name="' . zen_output_string($name) . '" onclick=""';
    if (zen_not_null($parameters)) {
        $field .= ' ' . $parameters;
    }
    $field .= '>' . "\n";
    if (empty($default) && isset($GLOBALS[$name]) && is_string($GLOBALS[$name])) {
        $default = stripslashes($GLOBALS[$name]);
    }
    for ($i = 0, $n = sizeof($values); $i < $n; $i++) {
        $field .= '  <option value="' . zen_output_string($values[$i]['id']) . '"';
        if ($default == $values[$i]['id']) {
            $field .= ' selected="selected"';
        }
        //"Stock by Attributes" // Need to determine this being disabled by a
        // numerical method rather than a text possessing method.  If PWA_OUTOF_STOCK is not present then the item may not be disabled... :/
        if ($disable && strpos($values[$i]['text'], trim(PWA_OUT_OF_STOCK))) {
            $field .= $disable;
        }
        //add image link if available
        if (!empty($options_menu_images[$i]['src'])) {
            $field .= ' data-src="' . $options_menu_images[$i]['src'] . '"';
        }
        //close tag and display text
        //      $field .= '>' . zen_output_string($values[$i]['text'], array('"' => '&quot;', '\'' => '&#039;', '<' => '&lt;', '>' => '&gt;')) . '</option>' . "\n";
        $field .= '>' . zen_output_string_protected($values[$i]['text']) . '</option>' . "\n";
    }
    $field .= '</select>' . "\n";
    if ($required == true) {
        $field .= TEXT_FIELD_REQUIRED;
    }
    return $field;
}
开发者ID:badarac,项目名称:stock_by_attribute_1.5.4,代码行数:44,代码来源:products_with_attributes.php

示例4: nl2br

echo TABLE_HEADING_TOTAL_INCLUDING_TAX;
?>
</td>
      </tr>
<?php 
$decimals = $currencies->get_decimal_places($order->info['currency']);
for ($i = 0, $n = sizeof($order->products); $i < $n; $i++) {
    if (DISPLAY_PRICE_WITH_TAX_ADMIN == 'true') {
        $priceIncTax = $currencies->format(zen_round(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    } else {
        $priceIncTax = $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']);
    }
    echo '      <tr class="dataTableRow">' . "\n" . '        <td class="dataTableContent" valign="top" align="right">' . $order->products[$i]['qty'] . '&nbsp;x</td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['name'];
    if (isset($order->products[$i]['attributes']) && ($k = sizeof($order->products[$i]['attributes'])) > 0) {
        for ($j = 0; $j < $k; $j++) {
            echo '<br><nobr><small>&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value']));
            if ($order->products[$i]['attributes'][$j]['price'] != '0') {
                echo ' (' . $order->products[$i]['attributes'][$j]['prefix'] . $currencies->format($order->products[$i]['attributes'][$j]['price'] * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ')';
            }
            if ($order->products[$i]['attributes'][$j]['product_attribute_is_free'] == '1' and $order->products[$i]['product_is_free'] == '1') {
                echo TEXT_INFO_ATTRIBUTE_FREE;
            }
            echo '</i></small></nobr>';
        }
    }
    echo '        </td>' . "\n" . '        <td class="dataTableContent" valign="top">' . $order->products[$i]['model'] . '</td>' . "\n";
    echo '        <td class="dataTableContent" align="right" valign="top">' . zen_display_tax_value($order->products[$i]['tax']) . '%</td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format($order->products[$i]['final_price'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(zen_add_tax($order->products[$i]['final_price'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $currencies->format(zen_round($order->products[$i]['final_price'], $decimals) * $order->products[$i]['qty'], true, $order->info['currency'], $order->info['currency_value']) . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format($order->products[$i]['onetime_charges'], true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n" . '        <td class="dataTableContent" align="right" valign="top"><b>' . $priceIncTax . ($order->products[$i]['onetime_charges'] != 0 ? '<br />' . $currencies->format(zen_add_tax($order->products[$i]['onetime_charges'], $order->products[$i]['tax']), true, $order->info['currency'], $order->info['currency_value']) : '') . '</b></td>' . "\n";
    echo '      </tr>' . "\n";
}
?>
      <tr>
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:invoice.php

示例5: htmlspecialchars

     $exporter_output .= "  <row>\n";
     $exporter_output .= "    <access_date>" . $result->fields['access_date'] . "</access_date>\n";
     $exporter_output .= "    <admin_id>" . $result->fields['admin_id'] . "</admin_id>\n";
     $exporter_output .= "    <admin_name>" . htmlspecialchars($result->fields['admin_name'], ENT_COMPAT, CHARSET, TRUE) . "</admin_name>\n";
     $exporter_output .= "    <ip_address>" . $result->fields['ip_address'] . "</ip_address>\n";
     $exporter_output .= "    <page_accessed>" . $result->fields['page_accessed'] . "</page_accessed>\n";
     $exporter_output .= "    <page_parameters>" . htmlspecialchars($result->fields['page_parameters'], ENT_COMPAT, CHARSET, TRUE) . "</page_parameters>\n";
     $exporter_output .= "    <flagged>" . htmlspecialchars($result->fields['flagged'], ENT_COMPAT, CHARSET, TRUE) . "</flagged>\n";
     $exporter_output .= "    <attention>" . htmlspecialchars($result->fields['attention'], ENT_COMPAT, CHARSET, TRUE) . "</attention>\n";
     $exporter_output .= "    <postdata>" . $postoutput . "</postdata>\n";
     $exporter_output .= "  </row>\n";
 } else {
     // output non-XML data-format
     $postoutput = print_r(json_decode(@gzinflate($result->fields['gzpost'])), true);
     if ($format == 'HTML') {
         $postoutput = nl2br(zen_output_string_protected($postoutput));
     } else {
         $postoutput = nl2br($postoutput);
     }
     $exporter_output .= $LINESTART;
     $exporter_output .= $FIELDSTART . $result->fields['access_date'] . $FIELDEND;
     $exporter_output .= $FIELDSEPARATOR;
     $exporter_output .= $FIELDSTART . $result->fields['admin_id'] . ' ' . $result->fields['admin_name'] . $FIELDEND;
     $exporter_output .= $FIELDSEPARATOR;
     $exporter_output .= $FIELDSTART . $result->fields['ip_address'] . $FIELDEND;
     $exporter_output .= $FIELDSEPARATOR;
     $exporter_output .= $FIELDSTART . $result->fields['page_accessed'] . $FIELDEND;
     $exporter_output .= $FIELDSEPARATOR;
     $exporter_output .= $FIELDSTART . $result->fields['page_parameters'] . $FIELDEND;
     $exporter_output .= $FIELDSEPARATOR;
     $exporter_output .= $FIELDSTART . $result->fields['flagged'] . $FIELDEND;
开发者ID:zenmagick,项目名称:zencart,代码行数:31,代码来源:admin_activity.php

示例6: actionMultipleAddProduct

 /**
  * Method to handle cart Action - multiple add products
  *
  * @param string forward destination
  * @param url parameters
  * @todo change while loop to a foreach
  */
 function actionMultipleAddProduct($goto, $parameters)
 {
     global $messageStack;
     if ($this->display_debug_messages) {
         $messageStack->add_session('header', 'FUNCTION ' . __FUNCTION__, 'caution');
     }
     $addCount = 0;
     if (is_array($_POST['products_id']) && sizeof($_POST['products_id']) > 0) {
         //echo '<pre>'; echo var_dump($_POST['products_id']); echo '</pre>';
         while (list($key, $val) = each($_POST['products_id'])) {
             $prodId = preg_replace('/[^0-9a-f:.]/', '', $key);
             if (is_numeric($val) && $val > 0) {
                 $adjust_max = false;
                 $qty = $val;
                 $add_max = zen_get_products_quantity_order_max($prodId);
                 $cart_qty = $this->in_cart_mixed($prodId);
                 $new_qty = $this->adjust_quantity($qty, $prodId, 'shopping_cart');
                 // bof: adjust new quantity to be same as current in stock
                 $chk_current_qty = zen_get_products_stock($prodId);
                 if (STOCK_ALLOW_CHECKOUT == 'false' && $new_qty > $chk_current_qty) {
                     $new_qty = $chk_current_qty;
                     $messageStack->add_session('shopping_cart', ($this->display_debug_messages ? 'FUNCTION ' . __FUNCTION__ . ': ' : '') . WARNING_PRODUCT_QUANTITY_ADJUSTED . zen_get_products_name($prodId), 'caution');
                 }
                 // eof: adjust new quantity to be same as current in stock
                 if ($add_max == 1 and $cart_qty == 1) {
                     // do not add
                     $adjust_max = 'true';
                 } else {
                     // bof: adjust new quantity to be same as current in stock
                     if (STOCK_ALLOW_CHECKOUT == 'false' && $new_qty + $cart_qty > $chk_current_qty) {
                         $adjust_new_qty = 'true';
                         $alter_qty = $chk_current_qty - $cart_qty;
                         $new_qty = $alter_qty > 0 ? $alter_qty : 0;
                         $messageStack->add_session('shopping_cart', ($this->display_debug_messages ? 'FUNCTION ' . __FUNCTION__ . ': ' : '') . WARNING_PRODUCT_QUANTITY_ADJUSTED . zen_get_products_name($prodId), 'caution');
                     }
                     // eof: adjust new quantity to be same as current in stock
                     // adjust quantity if needed
                     if ($new_qty + $cart_qty > $add_max and $add_max != 0) {
                         $adjust_max = 'true';
                         $new_qty = $add_max - $cart_qty;
                     }
                     $this->add_cart($prodId, $this->get_quantity($prodId) + $new_qty);
                     $addCount++;
                 }
                 if ($adjust_max == 'true') {
                     if ($this->display_debug_messages) {
                         $messageStack->add_session('header', 'FUNCTION ' . __FUNCTION__ . '<br>' . ERROR_MAXIMUM_QTY . zen_get_products_name($prodId), 'caution');
                     }
                     $messageStack->add_session('shopping_cart', ERROR_MAXIMUM_QTY . zen_get_products_name($prodId), 'caution');
                 }
             }
             if (!is_numeric($val) || $val < 0) {
                 // adjust quantity when not a value
                 $chk_link = '<a href="' . zen_href_link(zen_get_info_page($prodId), 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($prodId)) . '&products_id=' . $prodId) . '">' . zen_get_products_name($prodId) . '</a>';
                 $messageStack->add_session('header', ERROR_CORRECTIONS_HEADING . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . $chk_link . ' ' . PRODUCTS_ORDER_QTY_TEXT . zen_output_string_protected($val), 'caution');
                 $val = 0;
             }
         }
         // display message if all is good and not on shopping_cart page
         if ($addCount && DISPLAY_CART == 'false' && $_GET['main_page'] != FILENAME_SHOPPING_CART && $messageStack->size('shopping_cart') == 0) {
             $messageStack->add_session('header', ($this->display_debug_messages ? 'FUNCTION ' . __FUNCTION__ . ': ' : '') . SUCCESS_ADDED_TO_CART_PRODUCTS, 'success');
         } else {
             if (DISPLAY_CART == 'false') {
                 zen_redirect(zen_href_link(FILENAME_SHOPPING_CART));
             }
         }
         zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters)));
     }
 }
开发者ID:jeking928,项目名称:Dual-Pricing-2.1.6,代码行数:76,代码来源:shopping_cart.php

示例7: while

}
echo $orders_contents;
?>
  </div>
</div>
<div id="coltwo">
<div class="reportBox">
<div class="header"><?php 
echo BOX_ENTRY_NEW_CUSTOMERS;
?>
 </div>
  <?php 
$customers = $db->Execute("select c.customers_id as customers_id, c.customers_firstname as customers_firstname, c.customers_lastname as customers_lastname, a.customers_info_date_account_created as customers_info_date_account_created, a.customers_info_id from " . TABLE_CUSTOMERS . " c left join " . TABLE_CUSTOMERS_INFO . " a on c.customers_id = a.customers_info_id order by a.customers_info_date_account_created DESC limit 5");
while (!$customers->EOF) {
    $customers->fields['customers_firstname'] = zen_output_string_protected($customers->fields['customers_firstname']);
    $customers->fields['customers_lastname'] = zen_output_string_protected($customers->fields['customers_lastname']);
    echo '              <div class="row"><span class="left"><a href="' . zen_href_link(FILENAME_CUSTOMERS, 'search=' . $customers->fields['customers_lastname'] . '&origin=' . FILENAME_DEFAULT, 'NONSSL') . '" class="contentlink">' . $customers->fields['customers_firstname'] . ' ' . $customers->fields['customers_lastname'] . '</a></span><span class="rigth">' . "\n";
    echo zen_date_short($customers->fields['customers_info_date_account_created']);
    echo '              </span></div>' . "\n";
    $customers->MoveNext();
}
?>
</div>

 <div class="reportBox">
<?php 
$counter_query = "select startdate, counter, session_counter from " . TABLE_COUNTER_HISTORY . " order by startdate DESC limit 10";
$counter = $db->Execute($counter_query);
?>
   <div class="header"><?php 
echo sprintf(LAST_10_DAYS, $counter->RecordCount());
开发者ID:happyxlq,项目名称:zencart_svn,代码行数:31,代码来源:index.php

示例8: sprintf

        }
        $email_body .= sprintf(EMAIL_TEXT_LINK, zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']), '', false) . "\n\n" . sprintf(EMAIL_TEXT_SIGNATURE, STORE_NAME . "\n" . HTTP_SERVER . DIR_WS_CATALOG . "\n");
        $html_msg['EMAIL_TEXT_HEADER'] = EMAIL_TEXT_HEADER;
        $html_msg['EMAIL_PRODUCT_LINK'] = sprintf(str_replace('\\n\\n', '<br />', EMAIL_TEXT_LINK), '<a href="' . zen_href_link(FILENAME_PRODUCT_INFO, 'products_id=' . $_GET['products_id']) . '">' . $product_info->fields['products_name'] . '</a>', '', false);
        $html_msg['EMAIL_TEXT_SIGNATURE'] = sprintf(str_replace('\\n', '', EMAIL_TEXT_SIGNATURE), '');
        // include disclaimer
        $email_body .= "\n\n" . EMAIL_ADVISORY . "\n\n";
        //send the email
        zen_mail($to_name, $to_email_address, $email_subject, $email_body, $from_name, $from_email_address, $html_msg, 'tell_a_friend');
        // send additional emails
        if (SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_STATUS == '1' and SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO != '') {
            if ($_SESSION['customer_id']) {
                $account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n                          FROM " . TABLE_CUSTOMERS . "\n                          WHERE customers_id = :customersID";
                $account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
                $account = $db->Execute($account_query);
            }
            $extra_info = email_collect_extra_info($from_name, $from_email_address, $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'], $account->fields['customers_email_address']);
            $html_msg['EXTRA_INFO'] = $extra_info['HTML'];
            zen_mail('', SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO, SEND_EXTRA_TELL_A_FRIEND_EMAILS_TO_SUBJECT . ' ' . $email_subject, $email_body . $extra_info['TEXT'], STORE_NAME, EMAIL_FROM, $html_msg, 'tell_a_friend_extra');
        }
        $messageStack->add_session('header', sprintf(TEXT_EMAIL_SUCCESSFUL_SENT, $product_info->fields['products_name'], zen_output_string_protected($to_name)), 'success');
        zen_redirect(zen_href_link(zen_get_info_page($_GET['products_id']), 'products_id=' . $_GET['products_id']));
    }
} elseif ($_SESSION['customer_id']) {
    $account_query = "SELECT customers_firstname, customers_lastname, customers_email_address\n                    FROM " . TABLE_CUSTOMERS . "\n                    WHERE customers_id = :customersID";
    $account_query = $db->bindVars($account_query, ':customersID', $_SESSION['customer_id'], 'integer');
    $account = $db->Execute($account_query);
    $from_name = $account->fields['customers_firstname'] . ' ' . $account->fields['customers_lastname'];
    $from_email_address = $account->fields['customers_email_address'];
}
$breadcrumb->add(NAVBAR_TITLE);
开发者ID:andychang88,项目名称:daddy-store.com,代码行数:31,代码来源:header_php.php

示例9: _draw_js_stock_array

 function _draw_js_stock_array($combinations)
 {
     if (!(isset($combinations) && is_array($combinations) && sizeof($combinations) > 0)) {
         return '{}';
     }
     $out = '';
     foreach ($combinations[0]['comb'] as $oid => $ovid) {
         $out .= '{' . zen_output_string_protected($ovid) . ':';
         $opts[] = $oid;
     }
     $out .= '1';
     for ($combindex = 1; $combindex < sizeof($combinations); $combindex++) {
         $comb = $combinations[$combindex]['comb'];
         for ($i = 0; $i < sizeof($opts) - 1; $i++) {
             if ($comb[$opts[$i]] != $combinations[$combindex - 1]['comb'][$opts[$i]]) {
                 break;
             }
         }
         $out .= str_repeat('}', sizeof($opts) - 1 - $i) . ',';
         if ($i < sizeof($opts) - 1) {
             for ($j = $i; $j < sizeof($opts) - 1; $j++) {
                 $out .= zen_output_string_protected($comb[$opts[$j]]) . ':{';
             }
         }
         $out .= zen_output_string_protected($comb[$opts[sizeof($opts) - 1]]) . ':1';
     }
     $out .= str_repeat('}', sizeof($opts));
     return $out;
 }
开发者ID:badarac,项目名称:stock_by_attribute_1.5.4,代码行数:29,代码来源:pad_base.php

示例10: zen_image

                    echo zen_image(DIR_WS_ICONS . 'tick.gif', TEXT_YES) . "</td>\n";
                } else {
                    if ($orders_history_query->fields['customer_notified'] == '-1') {
                        echo zen_image(DIR_WS_ICONS . 'locked.gif', TEXT_HIDDEN) . "</td>\n";
                    } else {
                        echo zen_image(DIR_WS_ICONS . 'unlocked.gif', TEXT_VISIBLE) . "</td>\n";
                    }
                }
                echo '            <td class="smallText" valign="top">' . $orders_status_array[$orders_history_query->fields['orders_status_id']] . '</td>' . "\n";
                // TY TRACKER 5 BEGIN, DEFINE TRACKING INFORMATION ON SUPER_ORDERS.PHP FILE ----------------
                $display_track_id = '&nbsp;';
                $display_track_id .= empty($orders_history_query->fields['track_id1']) ? '' : CARRIER_NAME_1 . ": <a href=" . CARRIER_LINK_1 . nl2br(zen_output_string_protected($orders_history_query->fields['track_id1'])) . ' target="_blank">' . nl2br(zen_output_string_protected($orders_history_query->fields['track_id1'])) . "</a>&nbsp;";
                $display_track_id .= empty($orders_history_query->fields['track_id2']) ? '' : CARRIER_NAME_2 . ": <a href=" . CARRIER_LINK_2 . nl2br(zen_output_string_protected($orders_history_query->fields['track_id2'])) . ' target="_blank">' . nl2br(zen_output_string_protected($orders_history_query->fields['track_id2'])) . "</a>&nbsp;";
                $display_track_id .= empty($orders_history_query->fields['track_id3']) ? '' : CARRIER_NAME_3 . ": <a href=" . CARRIER_LINK_3 . nl2br(zen_output_string_protected($orders_history_query->fields['track_id3'])) . ' target="_blank">' . nl2br(zen_output_string_protected($orders_history_query->fields['track_id3'])) . "</a>&nbsp;";
                $display_track_id .= empty($orders_history_query->fields['track_id4']) ? '' : CARRIER_NAME_4 . ": <a href=" . CARRIER_LINK_4 . nl2br(zen_output_string_protected($orders_history_query->fields['track_id4'])) . ' target="_blank">' . nl2br(zen_output_string_protected($orders_history_query->fields['track_id4'])) . "</a>&nbsp;";
                $display_track_id .= empty($orders_history_query->fields['track_id5']) ? '' : CARRIER_NAME_5 . ": <a href=" . CARRIER_LINK_5 . nl2br(zen_output_string_protected($orders_history_query->fields['track_id5'])) . ' target="_blank">' . nl2br(zen_output_string_protected($orders_history_query->fields['track_id5'])) . "</a>&nbsp;";
                echo '            <td class="smallText">' . $display_track_id . '</td>' . "\n";
                // END TY TRACKER 5 -------------------------------------------------------------------
                echo '            <td class="smallText" valign="top">' . nl2br(zen_db_scrub_out($orders_history_query->fields['comments'])) . '&nbsp;</td>' . "\n" . '          </tr>' . "\n";
                $orders_history_query->MoveNext();
                $current_status = $orders_status_array[$orders_history_query->fields['orders_status_id']];
            }
        } else {
            echo '          <tr>' . "\n" . '            <td class="smallText" colspan="5">' . TEXT_NO_ORDER_HISTORY . '</td>' . "\n" . '          </tr>' . "\n";
        }
    } else {
        ?>

          <tr class="dataTableHeadingRow">
            <td class="smallText dataTableHeadingContent" width="20%"><strong><?php 
        echo TABLE_HEADING_DATE_ADDED;
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:31,代码来源:edit_orders.php

示例11: while

<?php

/**
 * Side Box Template
 *
 * @package templateSystem
 * @copyright Copyright 2003-2010 Zen Cart Development Team
 * @copyright Portions Copyright 2003 osCommerce
 * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
 * @version $Id: tpl_reviews_random.php 16044 2010-04-23 01:15:45Z drbyte $
 */
$content = "";
$review_box_counter = 0;
while (!$random_review_sidebox_product->EOF) {
    $review_box_counter++;
    $content .= '<div id="' . str_replace('_', '-', $box_id . 'Content') . '" class="sideBoxContent centeredContent">';
    $content .= '<a href="' . zen_href_link(FILENAME_PRODUCT_REVIEWS_INFO, 'products_id=' . $random_review_sidebox_product->fields['products_id'] . '&reviews_id=' . $random_review_sidebox_product->fields['reviews_id']) . '">' . zen_image(DIR_WS_IMAGES . $random_review_sidebox_product->fields['products_image'], $random_review_sidebox_product->fields['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br />' . zen_trunc_string(nl2br(zen_output_string_protected(stripslashes($random_review_sidebox_product->fields['reviews_text']))), 60) . '</a><br /><br />' . zen_image(DIR_WS_TEMPLATE_IMAGES . 'stars_' . $random_review_sidebox_product->fields['reviews_rating'] . '.gif', sprintf(BOX_REVIEWS_TEXT_OF_5_STARS, $random_review_sidebox_product->fields['reviews_rating']));
    $content .= '</div>';
    $random_review_sidebox_product->MoveNextRandom();
}
开发者ID:ygeneration666,项目名称:ec,代码行数:20,代码来源:tpl_reviews_random.php

示例12: array

                 $contents[] = array('align' => 'center', 'text' => $goto_gv);
             }
         }
         // indicate if comments exist
         $orders_history_query = $db->Execute("select orders_status_id, date_added, customer_notified, comments from " . TABLE_ORDERS_STATUS_HISTORY . " where orders_id = '" . $oInfo->orders_id . "' and comments !='" . "'");
         if ($orders_history_query->RecordCount() > 0) {
             $contents[] = array('align' => 'left', 'text' => '<br />' . TABLE_HEADING_COMMENTS);
         }
         $contents[] = array('text' => '<br />' . zen_image(DIR_WS_IMAGES . 'pixel_black.gif', '', '100%', '3'));
         $order = new order($oInfo->orders_id);
         $contents[] = array('text' => 'Products Ordered: ' . sizeof($order->products));
         for ($i = 0; $i < sizeof($order->products); $i++) {
             $contents[] = array('text' => $order->products[$i]['qty'] . '&nbsp;x&nbsp;' . $order->products[$i]['name']);
             if (sizeof($order->products[$i]['attributes']) > 0) {
                 for ($j = 0; $j < sizeof($order->products[$i]['attributes']); $j++) {
                     $contents[] = array('text' => '&nbsp;<i> - ' . $order->products[$i]['attributes'][$j]['option'] . ': ' . nl2br(zen_output_string_protected($order->products[$i]['attributes'][$j]['value'])) . '</i></nobr>');
                 }
             }
             if ($i > MAX_DISPLAY_RESULTS_ORDERS_DETAILS_LISTING and MAX_DISPLAY_RESULTS_ORDERS_DETAILS_LISTING != 0) {
                 $contents[] = array('align' => 'left', 'text' => TEXT_MORE);
                 break;
             }
         }
         if (sizeof($order->products) > 0) {
             $contents[] = array('align' => 'center', 'text' => '<a href="' . zen_href_link(FILENAME_ORDERS, zen_get_all_get_params(array('oID', 'action')) . 'oID=' . $oInfo->orders_id . '&action=edit', 'NONSSL') . '">' . zen_image_button('button_edit.gif', IMAGE_EDIT) . '</a>');
         }
         break;
 }
 if (zen_not_null($heading) && zen_not_null($contents)) {
     echo '            <td width="25%" valign="top">' . "\n";
     $box = new box();
开发者ID:TrinityComputers,项目名称:PhreeBooksERP,代码行数:31,代码来源:orders_mod_phreebooks.php

示例13: zen_address_format

function zen_address_format($address_format_id, $address, $html, $boln, $eoln)
{
    global $db;
    $address_format = $db->Execute("select address_format as format\n                             from " . TABLE_ADDRESS_FORMAT . "\n                             where address_format_id = '" . (int) $address_format_id . "'");
    $company = zen_output_string_protected($address['company']);
    if (isset($address['firstname']) && zen_not_null($address['firstname'])) {
        $firstname = zen_output_string_protected($address['firstname']);
        $lastname = zen_output_string_protected($address['lastname']);
    } elseif (isset($address['name']) && zen_not_null($address['name'])) {
        $firstname = zen_output_string_protected($address['name']);
        $lastname = '';
    } else {
        $firstname = '';
        $lastname = '';
    }
    $street = zen_output_string_protected($address['street_address']);
    $suburb = zen_output_string_protected($address['suburb']);
    $city = zen_output_string_protected($address['city']);
    $state = zen_output_string_protected($address['state']);
    $telephone = zen_output_string_protected($address['telephone']);
    $fax = zen_output_string_protected($address['fax']);
    if (isset($address['country_id']) && zen_not_null($address['country_id'])) {
        $country = zen_get_country_name($address['country_id']);
        if (isset($address['zone_id']) && zen_not_null($address['zone_id'])) {
            $state = zen_get_zone_code($address['country_id'], $address['zone_id'], $state);
        }
    } elseif (isset($address['country']) && zen_not_null($address['country'])) {
        $country = zen_output_string_protected($address['country']);
    } else {
        $country = '';
    }
    $postcode = zen_output_string_protected($address['postcode']);
    $zip = $postcode;
    if ($html) {
        // HTML Mode
        $HR = '<hr>';
        $hr = '<hr>';
        if ($boln == '' && $eoln == "\n") {
            // Values not specified, use rational defaults
            $CR = '<br>';
            $cr = '<br>';
            $eoln = $cr;
        } else {
            // Use values supplied
            $CR = $eoln . $boln;
            $cr = $CR;
        }
    } else {
        // Text Mode
        $CR = $eoln;
        $cr = $CR;
        $HR = '----------------------------------------';
        $hr = '----------------------------------------';
    }
    $statecomma = '';
    $streets = $street;
    $state = zen_convert_to_zone_name_m17n($state) . ' ';
    if ($suburb != '') {
        $streets = $street . $cr . $suburb;
    }
    if ($country == '') {
        $country = zen_output_string_protected($address['country']);
    }
    if ($state != '') {
        $statecomma = $state . ', ';
    }
    if ($telephone != '') {
        $telephone = ENTRY_TELEPHONE_NUMBER . $telephone;
    }
    if ($fax != '') {
        $fax = ENTRY_FAX_NUMBER . $fax;
    }
    $fmt = $address_format->fields['format'];
    eval("\$address = \"{$fmt}\";");
    if (ACCOUNT_COMPANY == 'true' && zen_not_null($company)) {
        $address = $company . $cr . $address;
    }
    return $address;
}
开发者ID:homework-bazaar,项目名称:zencart-sugu,代码行数:79,代码来源:general.php

示例14: actionUpdateProduct

 /**
  * Method to handle cart Action - update product
  *
  * @param string forward destination
  * @param url parameters
  */
 public function actionUpdateProduct($goto, $parameters)
 {
     $products_id = $this->getRequest()->request->get('products_id');
     for ($i = 0, $n = sizeof($products_id); $i < $n; $i++) {
         $adjust_max = 'false';
         if ($_POST['cart_quantity'][$i] == '') {
             $_POST['cart_quantity'][$i] = 0;
         }
         if (!is_numeric($_POST['cart_quantity'][$i]) || $_POST['cart_quantity'][$i] < 0) {
             $this->getMessageStack()->add_session('header', ERROR_CORRECTIONS_HEADING . ERROR_PRODUCT_QUANTITY_UNITS_SHOPPING_CART . zen_get_products_name($products_id[$i]) . ' ' . PRODUCTS_ORDER_QTY_TEXT . zen_output_string_protected($_POST['cart_quantity'][$i]), 'error');
             continue;
         }
         if (in_array($products_id[$i], isset($_POST['cart_delete']) && is_array($_POST['cart_delete']) ? $_POST['cart_delete'] : array()) or $_POST['cart_quantity'][$i] == 0) {
             $this->remove($products_id[$i]);
         } else {
             $add_max = zen_get_products_quantity_order_max($products_id[$i]);
             // maximum allowed
             $cart_qty = $this->in_cart_mixed($products_id[$i]);
             // total currently in cart
             $new_qty = $_POST['cart_quantity'][$i];
             // new quantity
             $current_qty = $this->get_quantity($products_id[$i]);
             // how many currently in cart for attribute
             $chk_mixed = zen_get_products_quantity_mixed($products_id[$i]);
             // use mixed
             $new_qty = $this->adjust_quantity($new_qty, $products_id[$i], 'shopping_cart');
             if (($add_max == 1 and $cart_qty == 1) && $new_qty != $cart_qty) {
                 // do not add
                 $adjust_max = 'true';
             } else {
                 if ($add_max != 0) {
                     // adjust quantity if needed
                     switch (true) {
                         case $new_qty == $current_qty:
                             // no change
                             $adjust_max = 'false';
                             $new_qty = $current_qty;
                             break;
                         case $new_qty > $add_max && $chk_mixed == false:
                             $adjust_max = 'true';
                             $new_qty = $add_max;
                             break;
                         case $add_max - $cart_qty + $new_qty >= $add_max && $new_qty > $add_max && $chk_mixed == true:
                             $adjust_max = 'true';
                             $requested_qty = $new_qty;
                             $new_qty = $current_qty;
                             break;
                         case $cart_qty + $new_qty - $current_qty > $add_max && $chk_mixed == true:
                             $adjust_max = 'true';
                             $requested_qty = $new_qty;
                             $new_qty = $current_qty;
                             break;
                         default:
                             $adjust_max = 'false';
                     }
                 }
                 // adjust minimum and units
                 $attributes = '';
                 if (isset($_POST['id'][$products_id[$i]])) {
                     $attributes = $_POST['id'][$products_id[$i]];
                 }
                 $this->add_cart($products_id[$i], $new_qty, $attributes, false);
             }
             if ($adjust_max == 'true') {
                 $this->getMessageStack()->add_session('shopping_cart', ERROR_MAXIMUM_QTY . zen_get_products_name($products_id[$i]), 'caution');
             } else {
                 // display message if all is good and not on shopping_cart page
                 if (DISPLAY_CART == 'false' && $this->getMainPage() != 'shopping_cart') {
                     $this->getMessageStack()->add_session('header', SUCCESS_ADDED_TO_CART_PRODUCT, 'success');
                 }
             }
         }
     }
     zen_redirect(zen_href_link($goto, zen_get_all_get_params($parameters)));
 }
开发者ID:zenmagick,项目名称:zenmagick,代码行数:81,代码来源:ShoppingCart.php

示例15: zen_href_link

    ?>
</td>
                    <td align="right"><?php 
    echo '<a href="' . zen_href_link(FILENAME_MAIL, 'cID=' . zen_db_prepare_input($_GET['cID']) . (isset($_GET['customer']) ? '&customer=' . zen_output_string_protected($_GET['customer']) : '') . (isset($_GET['origin']) ? '&origin=' . zen_output_string_protected($_GET['origin']) : '')) . '">' . zen_image_button('button_cancel.gif', IMAGE_CANCEL) . '</a> ' . zen_image_submit('button_send_mail.gif', IMAGE_SEND_EMAIL);
    ?>
</td>
                  </tr>
                </table></td>
              </tr>
              </table></td>
            </form></tr>
<?php 
} else {
    ?>
            <tr><?php 
    echo zen_draw_form('mail', FILENAME_MAIL, 'action=preview' . (isset($_GET['cID']) ? '&cID=' . (int) $_GET['cID'] : '') . (isset($_GET['customer']) ? '&customer=' . zen_output_string_protected($_GET['customer']) : '') . (isset($_GET['origin']) ? '&origin=' . zen_output_string_protected($_GET['origin']) : ''), 'post', 'onsubmit="return check_form(mail);" enctype="multipart/form-data"');
    ?>
              <td><table border="0" cellpadding="0" cellspacing="2">
            <tr>
              <td colspan="2"><?php 
    echo zen_draw_separator('pixel_trans.gif', '1', '10');
    ?>
</td>
            </tr>
<?php 
    $customers = get_audiences_list('email', '', isset($_GET['customer']) ? $_GET['customer'] : '');
    ?>
            <tr>
              <td class="main"><?php 
    echo TEXT_CUSTOMER;
    ?>
开发者ID:R-Future,项目名称:zencart,代码行数:31,代码来源:mail.php


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