本文整理汇总了PHP中shopMakeHtmlSafe函数的典型用法代码示例。如果您正苦于以下问题:PHP shopMakeHtmlSafe函数的具体用法?PHP shopMakeHtmlSafe怎么用?PHP shopMakeHtmlSafe使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了shopMakeHtmlSafe函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: selectList
/**
* Prints an HTML dropdown box named $name using $arr to
* load the drop down. If $value is in $arr, then $value
* will be the selected option in the dropdown.
* @author gday
* @author soeren
*
* @param string $name The name of the select element
* @param string $value The pre-selected value
* @param array $arr The array containting $key and $val
* @param int $size The size of the select element
* @param string $multiple use "multiple=\"multiple\" to have a multiple choice select list
* @param string $extra More attributes when needed
* @return string HTML drop-down list
*/
function selectList($name, $value, &$arr, $size = 1, $multiple = "", $extra = "")
{
$html = '';
if (empty($arr)) {
$arr = array();
}
$html = "<select class=\"inputbox\" name=\"{$name}\" size=\"{$size}\" {$multiple} {$extra}>\n";
foreach ($arr as $key => $val) {
$selected = "";
if (is_array($value)) {
if (in_array($key, $value)) {
$selected = "selected=\"selected\"";
}
} else {
if (strtolower($value) == strtolower($key)) {
$selected = "selected=\"selected\"";
}
}
$html .= "<option value=\"{$key}\" {$selected}>" . shopMakeHtmlSafe($val);
$html .= "</option>\n";
}
$html .= "</select>\n";
return $html;
}
示例2: vmToolTip
<td class="iconcell"><?php
echo vmToolTip($VM_LANG->_('VM_ADMIN_ENCRYPTION_FUNCTION_TIP'));
?>
</td>
</tr>
<?php
}
?>
<tr>
<td class="labelcell"><?php
echo $VM_LANG->_('VM_ADMIN_ENCRYPTION_KEY');
?>
</td>
<td>
<input type="text" name="conf_ENCODE_KEY" class="inputbox" value="<?php
echo shopMakeHtmlSafe(ENCODE_KEY);
?>
" />
</td>
<td class="iconcell"><?php
echo vmToolTip($VM_LANG->_('VM_ADMIN_ENCRYPTION_KEY_TIP'));
?>
</td>
</tr>
<tr>
<td class="labelcell">
<input type="checkbox" name="conf_VM_STORE_CREDITCARD_DATA" id="conf_VM_STORE_CREDITCARD_DATA" class="inputbox" <?php
if (@VM_STORE_CREDITCARD_DATA == '1') {
echo "checked=\"checked\"";
}
?>
示例3: PrintIcon
function PrintIcon($link = '', $use_icon = true, $add_text = '')
{
global $VM_LANG, $mosConfig_live_site, $mosConfig_absolute_path, $cur_template, $Itemid;
if (@VM_SHOW_PRINTICON == '1') {
if (!$link) {
$query_string = str_replace('only_page=1', 'only_page=0', vmAmpReplace(vmGet($_SERVER, 'QUERY_STRING')));
$link = 'index2.php?' . $query_string . '&pop=1' . (vmIsJoomla('1.5') ? '&tmpl=component' : '');
}
// checks template image directory for image, if non found default are loaded
if ($use_icon) {
$text = vmCommonHTML::ImageCheck('printButton.png', '/images/M_images/', NULL, NULL, $VM_LANG->_('CMN_PRINT'), $VM_LANG->_('CMN_PRINT'));
$text .= shopMakeHtmlSafe($add_text);
} else {
$text = '| ' . $VM_LANG->_('CMN_PRINT') . ' |';
}
$isPopup = vmGet($_GET, 'pop');
if ($isPopup) {
// Print Preview button - used when viewing page
$html = '<span class="vmNoPrint">
<a href="javascript:void(0)" onclick="javascript:window.print(); return false;" title="' . $VM_LANG->_('CMN_PRINT') . '">
' . $text . '
</a></span>';
return $html;
} else {
// Print Button - used in pop-up window
return vmPopupLink($link, $text, 640, 480, '_blank', $VM_LANG->_('CMN_PRINT'));
}
}
}
示例4: array
$columns = array("#" => "width=\"20\"", "<input type=\"checkbox\" name=\"toggle\" value=\"\" onclick=\"checkAll(" . $pageNav->limit . ")\" />" => "width=\"20\"", $VM_LANG->_('PHPSHOP_CATEGORY_FORM_NAME') => 'width="25%"', $VM_LANG->_('PHPSHOP_CATEGORY_FORM_DESCRIPTION') => 'width="30%"', $VM_LANG->_('PHPSHOP_PRODUCTS_LBL') => 'width="10%"', $VM_LANG->_('PHPSHOP_PRODUCT_LIST_PUBLISH') => 'width="5%"', $VM_LANG->_('PHPSHOP_MODULE_LIST_ORDER') => 'width="7%"', vmCommonHTML::getSaveOrderButton(min($nrows - $pageNav->limitstart, $pageNav->limit)) => 'width="8%"', $VM_LANG->_('E_REMOVE') => "width=\"5%\"", 'Id' => '');
$listObj->writeTableHeader($columns);
$ibg = 0;
if ($pageNav->limit < $nrows) {
if ($pageNav->limitstart + $pageNav->limit < $nrows) {
$nrows = $pageNav->limitstart + $pageNav->limit;
}
}
for ($n = $pageNav->limitstart; $n < $nrows; $n++) {
if (!isset($row_list[$n])) {
$row_list[$n] = $n;
}
if (!isset($depth_list[$n])) {
$depth_list[$n] = 0;
}
$catname = shopMakeHtmlSafe($categories[$row_list[$n]]["category_name"]);
$listObj->newRow();
// The row number
$listObj->addCell($pageNav->rowNumber($ibg));
// The Checkbox
$listObj->addCell(vmCommonHTML::idBox($ibg, $categories[$row_list[$n]]["category_child_id"], false, "category_id"));
// Which category depth level we are in?
$repeat = $depth_list[$n] + 1;
$tmp_cell = str_repeat(" ", $repeat) . "__|" . $repeat . "| " . "<a href=\"" . $_SERVER['PHP_SELF'] . "?option=com_virtuemart&page=product.product_category_form&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&category_parent_id=" . $categories[$row_list[$n]]["category_parent_id"] . "\">" . $catname . "</a>";
$listObj->addCell($tmp_cell);
$desc = strlen($categories[$row_list[$n]]["category_description"]) > 255 ? mm_ToolTip($categories[$row_list[$n]]["category_description"], $VM_LANG->_('PHPSHOP_CATEGORY_FORM_DESCRIPTION')) : $categories[$row_list[$n]]["category_description"];
$listObj->addCell(" " . $desc);
$listObj->addCell(ps_product_category::product_count($categories[$row_list[$n]]["category_child_id"]) . " <a href=\"" . $_SERVER['PHP_SELF'] . "?page=product.product_list&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&option=com_virtuemart" . "\">[ " . $VM_LANG->_('PHPSHOP_SHOW') . " ]</a>");
// Publish / Unpublish
$tmp_cell = "<a href=\"" . $sess->url($_SERVER['PHP_SELF'] . "?page=product.product_category_list&category_id=" . $categories[$row_list[$n]]["category_child_id"] . "&func=changePublishState");
if ($categories[$row_list[$n]]["category_publish"] == 'N') {
示例5: explode
), true );
echo "</td></tr>";
}
// Print out the Selected Shipping Method
if(!ps_checkout::noShippingMethodNecessary()) {
echo '<tr><td valign="top"><strong>'.$VM_LANG->_('PHPSHOP_INFO_MSG_SHIPPING_METHOD') . ":</strong></td>";
$rate_details = explode( "|", urldecode(urldecode(vmGet($_REQUEST,'shipping_rate_id'))) );
echo '<td>';
foreach( $rate_details as $k => $v ) {
// thepisu: old sample data cointaned ">" instead of ">"...
// so we don't have to make safe if ">" is found
if (strpos($v,">")===false) {
$v = shopMakeHtmlSafe($v);
}
if( $k == 3 ) {
echo $CURRENCY_DISPLAY->getFullValue( $v )."; ";
} elseif( $k > 0 && $k < 4) {
echo $v.'; ';
}
}
echo "</td></tr>";
}
unset( $row );
if( !isset($order_total) || $order_total > 0.00 ) {
$payment_method_id = vmRequest::getInt( 'payment_method_id' );
$db->query("SELECT payment_method_id, payment_method_name FROM #__{vm}_payment_method WHERE payment_method_id='$payment_method_id'");
示例6: utf8_decode
<br />
<a class="button" href="<?php echo $product_link ?>"><?php echo $VM_LANG->_('VM_RETURN_TO_PRODUCT') ?></a>
<br /><br />
<form action="<?php echo $mm_action_url ?>index.php" method="post" name="emailForm" id="emailForm">
<label for="contact_name"><?php echo $VM_LANG->_('NAME_PROMPT') ?></label>
<br /><input type="text" name="name" id="contact_name" size="80" class="inputbox" value="<?php echo $name ?>"><br /><br />
<label for="contact_mail"><?php echo $VM_LANG->_('EMAIL_PROMPT') ?></label>
<br /><input type="text" id="contact_mail" name="email" size="80" label="Your email" class="inputbox" value="<?php echo $email ?>"><br /><br />
<label for="contact_text"><?php echo $VM_LANG->_('MESSAGE_PROMPT') ?></label><br />
<textarea rows="10" cols="60" name="text" id="contact_text" class="inputbox"><?php echo utf8_decode($subject) ?></textarea><br />
<input type="button" name="send" value="<?php echo $VM_LANG->_('SEND_BUTTON') ?>" class="button" onclick="validateEnquiryForm()" />
<input type="hidden" name="product_id" value="<?php echo $db_product->f("product_id") ?>" />
<input type="hidden" name="product_sku" value="<?php echo shopMakeHtmlSafe($db_product->f("product_sku")) ?>" />
<input type="hidden" name="set" value="1" />
<input type="hidden" name="func" value="productAsk" />
<input type="hidden" name="page" value="shop.ask" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="flypage" value="<?php echo $flypage ?>" />
<input type="hidden" name="Itemid" value="<?php echo $Itemid ?>" />
<input type="hidden" name="<?php echo $validate ?>" value="1" />
</form>
<script type="text/javascript"><!--
function validateEnquiryForm() {
if ( ( document.emailForm.text.value == "" ) || ( document.emailForm.email.value.search("@") == -1 ) || ( document.emailForm.email.value.search("[.*]" ) == -1 ) ) {
alert( "<?php echo $VM_LANG->_('CONTACT_FORM_NC',false); ?>" );
} else if ( ( document.emailForm.email.value.search(";") != -1 ) || ( document.emailForm.email.value.search(",") != -1 ) || ( document.emailForm.email.value.search(" ") != -1 ) ) {
alert( "You cannot enter more than one email address" );
示例7: creditcard_lists
/**
* Build a Credit Card list for each CreditCard Payment Method
* Uses JavsScript from mambojavascript: changeDynaList()
*
* @param ps_DB $db_cc
* @return string
*/
function creditcard_lists(&$db_cc)
{
global $mainframe;
if (vmIsJoomla('1.5')) {
$document = JFactory::getDocument();
$document->addScript('includes/js/joomla.javascript.js');
}
$db = new ps_DB();
$db_cc->next_record();
// Build the Credit Card lists for each CreditCard Payment Method
$script = "<script language=\"javascript\" type=\"text/javascript\">\n";
$script .= "<!--\n";
$script .= "var originalOrder = '1';\n";
$script .= "var originalPos = '" . $db_cc->f("payment_method_name") . "';\n";
$script .= "var orders = new Array();\t// array in the format [key,value,text]\n";
$i = 0;
$db_cc->reset();
while ($db_cc->next_record()) {
$accepted_creditcards = explode(",", $db_cc->f("accepted_creditcards"));
$cards = array();
foreach ($accepted_creditcards as $value) {
if (!empty($value)) {
$q = 'SELECT creditcard_code,creditcard_name FROM #__{vm}_creditcard WHERE creditcard_id=' . (int) $value;
$db->query($q);
$db->next_record();
$cards[$db->f('creditcard_code')] = shopMakeHtmlSafe($db->f('creditcard_name'));
}
}
foreach ($cards as $code => $name) {
$script .= "orders[" . $i++ . "] = new Array( '" . addslashes($db_cc->f("payment_method_name")) . "','{$code}','{$name}' );\n";
}
}
$script .= "function changeCreditCardList() { \n";
$script .= "var selected_payment = null;\n for (var i=0; i<document.adminForm.payment_method_id.length; i++)\n if (document.adminForm.payment_method_id[i].checked)\n selected_payment = document.adminForm.payment_method_id[i].id;\n";
$script .= "changeDynaList('creditcard_code',orders,selected_payment, originalPos, originalOrder);\n";
$script .= "}\n";
$script .= "//-->\n";
$script .= "</script>\n";
$script .= '<noscript>' . ps_html::selectList('creditcard_code', key($cards), $cards) . '</noscript>';
return $script;
}
示例8: utf8_decode
<textarea rows="10" cols="60" name="text" id="contact_text" class="inputbox"><?php
echo utf8_decode($subject);
?>
</textarea><br />
<input type="button" name="send" value="<?php
echo $VM_LANG->_('SEND_BUTTON');
?>
" class="button" onclick="validateEnquiryForm()" />
<input type="hidden" name="product_id" value="<?php
echo $db_product->f("product_id");
?>
" />
<input type="hidden" name="product_sku" value="<?php
echo shopMakeHtmlSafe($db_product->f("product_sku"));
?>
" />
<input type="hidden" name="set" value="1" />
<input type="hidden" name="func" value="productAsk" />
<input type="hidden" name="page" value="shop.ask" />
<input type="hidden" name="option" value="com_virtuemart" />
<input type="hidden" name="flypage" value="<?php
echo $flypage;
?>
" />
<input type="hidden" name="Itemid" value="<?php
echo $Itemid;
?>
" />
示例9: get_object_vars
*
* Example: If you run
* $tpl->set( "product_name", $product_name );
* The variable "product_name" will be available in the template under this name
* with the value of $product_name
*
* */
// This part allows us to copy ALL properties from the product table
// into the template
$productData = $db_product->get_row();
$productArray = get_object_vars($productData);
$productArray["product_id"] = $product_id;
$productArray["product_full_image"] = $product_full_image;
// to display the full image on flypage
$productArray["product_thumb_image"] = $product_thumb_image;
$productArray["product_name"] = shopMakeHtmlSafe($productArray["product_name"]);
$tpl->set('productArray', $productArray);
foreach ($productArray as $property => $value) {
$tpl->set($property, $value);
}
// Assemble the thumbnail image as a link to the full image
// This function is defined in the theme (theme.php)
$product_image = $tpl->vmBuildFullImageLink($productArray);
$tpl->set("product_id", $product_id);
$tpl->set("product_name", $product_name);
$tpl->set("product_image", $product_image);
$tpl->set("more_images", $more_images);
$tpl->set("images", $files['images']);
$tpl->set("files", $files['files']);
$tpl->set("file_list", $file_list);
$tpl->set("edit_link", $edit_link);
示例10: shopMakeHtmlSafe
<input type="text" class="inputbox" name="product_sku" value="<?php
$db->sp("product_sku");
?>
" size="32" maxlength="64" />
</td>
</tr>
<tr class="row0">
<td width="21%"><div style="text-align:right;font-weight:bold;">
<?php
echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_NAME');
?>
:</div>
</td>
<td width="79%">
<input type="text" class="inputbox" name="product_name" value="<?php
echo shopMakeHtmlSafe($db->sf("product_name"));
?>
" size="32" maxlength="255" />
</td>
</tr>
<tr class="row1">
<td width="21%"><div style="text-align:right;font-weight:bold;">
<?php
echo $VM_LANG->_('PHPSHOP_PRODUCT_FORM_URL');
?>
:</div>
</td>
<td width="79%">
<input type="text" class="inputbox" name="product_url" value="<?php
$db->sp("product_url");
?>
示例11: mm_showMyFileName
* @subpackage html
* @copyright Copyright (C) 2006-2007 soeren - All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See /administrator/components/com_virtuemart/COPYRIGHT.php for copyright notices and details.
*
* http://virtuemart.net
*/
mm_showMyFileName(__FILE__);
$theme = vmGet($_REQUEST, 'theme', 'default');
$themepath = $mosConfig_absolute_path . '/components/com_virtuemart/themes/' . basename($theme);
if (!file_exists($themepath)) {
echo '<script type="text/javascript">alert(\'' . str_replace('{theme}', basename(shopMakeHtmlSafe($theme)), $VM_LANG->_('VM_ADMIN_THEME_NOT_EXISTS')) . '\');history.back();</script>';
exit;
}
if (!file_exists($themepath . '/theme.config.php')) {
if (!fopen($themepath . '/theme.config.php', 'w')) {
echo vmCommonHTML::getErrorField($VM_LANG->_('VM_ADMIN_THEME_CFG_NOT_EXISTS'));
return;
}
}
$current_config = file_get_contents($themepath . '/theme.config.php');
$parameter_xml_file = $themepath . '/theme.xml';
// get params definitions
$params = new vmParameters($current_config, $parameter_xml_file, 'theme');
$title = ' <img src="' . VM_THEMEURL . 'images/administration/header/icon-48-config.png" align="middle" border="0" alt="' . $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS') . '" /> ';
$title .= $VM_LANG->_('VM_ADMIN_CFG_THEME_SETTINGS');
//First create the object and let it print a form heading
示例12: shopMakeHtmlSafe
if ($auth['user_id'] > 0) {
$db->query('SELECT `vendor_id` FROM `#__{vm}_auth_user_vendor` WHERE `user_id` =' . $auth['user_id']);
$db->next_record();
if ($db->f('vendor_id')) {
$default_vendor = $db->f('vendor_id');
}
}
$_SESSION["ps_vendor_id"] = $ps_vendor_id = $default_vendor;
$db = ps_vendor::get_vendor_details($ps_vendor_id);
$_SESSION['minimum_pov'] = $db->f("vendor_min_pov");
$vendor_name = $db->f("vendor_name");
$vendor_store_name = $db->f("vendor_store_name");
$vendor_mail = $db->f("contact_email");
$vendor_url = $db->f("vendor_url");
$vendor_freeshipping = $db->f("vendor_freeshipping");
$vendor_image = "<img border=\"0\" src=\"" . IMAGEURL . "vendor/" . $db->f("vendor_full_image") . "\" alt=\"" . shopMakeHtmlSafe($vendor_name) . "\" />";
$vendor_full_image = $db->f("vendor_full_image");
$vendor_image_url = IMAGEURL . "vendor/" . $db->f("vendor_full_image");
$vendor_address = $db->f("vendor_address_1");
$vendor_address_2 = $db->f("vendor_address_2");
$vendor_city = $db->f("vendor_city");
$vendor_state = $db->f("vendor_state");
$vendor_state_name = $db->f("state_name");
$vendor_state = empty($vendor_state) ? "" : $db->f("vendor_state");
$vendor_country = $db->f("vendor_country");
$vendor_country_2_code = $db->f("country_2_code");
$vendor_country_3_code = $db->f("country_3_code");
$vendor_zip = $db->f("vendor_zip");
$vendor_phone = $db->f("vendor_phone");
$vendor_store_desc = $db->f("vendor_store_desc");
$vendor_currency = $db->f("vendor_currency");
示例13: writeFooter
/**
* This creates a list footer (page navigation)
* @param The core module name (e.g. "product")
* @param The page name (e.g. "product_list" )
* @param The Keyword from a search by keyword
* @param Additional varaibles to include as hidden input fields
*/
function writeFooter($keyword, $extra = "")
{
$footer = "";
if ($this->pageNav !== null) {
if ($this->_resultsToShowPageNav <= $this->pageNav->total) {
$footer = $this->pageNav->getListFooter();
}
} else {
$footer = "";
}
if (!empty($extra)) {
$extrafields = explode("&", $extra);
array_shift($extrafields);
foreach ($extrafields as $key => $value) {
$field = explode("=", $value);
$footer .= '<input type="hidden" name="' . $field[0] . '" value="' . @shopMakeHtmlSafe($field[1]) . '" />' . "\n";
}
}
$footer .= '</form>';
echo $footer;
}
示例14: shopMakeHtmlSafe
echo "<input type=\"checkbox\" name=\"category_publish\" value=\"Y\" checked=\"checked\" />";
} else {
echo "<input type=\"checkbox\" name=\"category_publish\" value=\"Y\" />";
}
?>
</td>
</tr>
<tr>
<td width="21%" nowrap><div align="right"><?php
echo $VM_LANG->_('PHPSHOP_CATEGORY_FORM_NAME');
?>
:</div></td>
<td width="79%">
<input type="text" class="inputbox" name="category_name" size="60" value="<?php
echo shopMakeHtmlSafe($db->sf('category_name'));
?>
" />
</td>
</tr>
<tr>
<td width="21%" valign="top" nowrap><div align="right"><?php
echo $VM_LANG->_('PHPSHOP_CATEGORY_FORM_DESCRIPTION');
?>
:</div></td>
<td width="79%" valign="top"><?php
editorArea('editor1', $db->f("category_description"), 'category_description', '800', '300', '110', '40');
?>
</td>
</tr>
<tr>
示例15: if
<?php if( !defined( '_VALID_MOS' ) && !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not allowed.' );
mm_showMyFileName(__FILE__);
?>
<?php echo $buttons_header // The PDF, Email and Print buttons ?>
<?php
if( $this->get_cfg( 'showPathway' )) {
echo "<div class=\"pathway\">$navigation_pathway</div>";
}
if( $this->get_cfg( 'product_navigation', 1 )) {
if( !empty( $previous_product )) {
echo '<a class="previous_page" href="'.$previous_product_url.'">'.shopMakeHtmlSafe($previous_product['product_name']).'</a>';
}
if( !empty( $next_product )) {
echo '<a class="next_page" href="'.$next_product_url.'">'.shopMakeHtmlSafe($next_product['product_name']).'</a>';
}
}
?>
<br style="clear:both;" />
<table border="0" align="center" style="width: 100%;" >
<tr>
<td rowspan="1" colspan="2">
<h2 class="product_name"><?php echo $product_name; echo ' ' . $edit_link; ?></h2>
</td>
<td>
</td>
</tr>
<tr>
<td class="product_separator" colspan="2">
<?php echo $product_s_desc ?>