本文整理汇总了PHP中vam_image函数的典型用法代码示例。如果您正苦于以下问题:PHP vam_image函数的具体用法?PHP vam_image怎么用?PHP vam_image使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了vam_image函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: quote
function quote($method = '')
{
global $order, $shipping_weight, $shipping_num_boxes, $vamPrice;
if (MODULE_SHIPPING_NEWPOST_MODE == 'price') {
$order_total = $vamPrice->RemoveCurr($_SESSION['cart']->show_total());
} else {
$order_total = $shipping_weight;
}
$table_cost = preg_split("/[:,]/", MODULE_SHIPPING_NEWPOST_COST);
$size = sizeof($table_cost);
for ($i = 0, $n = $size; $i < $n; $i += 2) {
if ($order_total <= $table_cost[$i]) {
$shipping = $table_cost[$i + 1];
break;
}
}
if (MODULE_SHIPPING_NEWPOST_MODE == 'weight') {
$shipping = $shipping * $shipping_num_boxes;
}
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_NEWPOST_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_NEWPOST_TEXT_WAY, 'cost' => $shipping + MODULE_SHIPPING_NEWPOST_HANDLING)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (vam_not_null($this->icon)) {
$this->quotes['icon'] = vam_image($this->icon, $this->title);
}
return $this->quotes;
}
示例2: vam_display_banner
function vam_display_banner($action, $identifier)
{
if ($action == 'dynamic') {
$banners_query = vam_db_query("select count(*) as count from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
$banners = vam_db_fetch_array($banners_query);
if ($banners['count'] > 0) {
$banner = vam_random_select("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_group = '" . $identifier . "'");
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> No banners with group \'' . $identifier . '\' found!</b>';
}
} elseif ($action == 'static') {
if (is_array($identifier)) {
$banner = $identifier;
} else {
$banner_query = vam_db_query("select banners_id, banners_title, banners_image, banners_html_text from " . TABLE_BANNERS . " where status = '1' and banners_id = '" . $identifier . "'");
if (vam_db_num_rows($banner_query)) {
$banner = vam_db_fetch_array($banner_query);
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Banner with ID \'' . $identifier . '\' not found, or status inactive</b>';
}
}
} else {
return '<b>VaM Shop ERROR! (vam_display_banner(' . $action . ', ' . $identifier . ') -> Unknown $action parameter value - it must be either \'dynamic\' or \'static\'</b>';
}
if (vam_not_null($banner['banners_html_text'])) {
$banner_string = $banner['banners_html_text'];
} else {
$banner_string = '<a href="' . vam_href_link(FILENAME_REDIRECT, 'action=banner&goto=' . $banner['banners_id']) . '" onclick="window.open(this.href); return false;">' . vam_image(DIR_WS_IMAGES . 'banner/' . $banner['banners_image'], $banner['banners_title']) . '</a>';
}
vam_update_banner_display_count($banner['banners_id']);
return $banner_string;
}
示例3: vam_image_button
function vam_image_button($image, $alt = '', $parameters = '')
{
if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {
$content = '<span>' . vam_image(DIR_WS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image, $alt, '', '', 'width="12" height="12" ' . $parameters) . ' ' . $alt . '</span>';
} else {
$content = '<span>' . $alt . '</span>';
}
return $content;
}
示例4: selection
function selection()
{
global $order;
if (vam_not_null($this->icon)) {
$icon = vam_image($this->icon, $this->title);
}
//$person_query = vam_db_query("select * from ".TABLE_PERSONS." where customers_id = '" . (int)$order->customer['id'] . "'");
//$person_data = vam_db_fetch_array($payment_query);
$selection = array('id' => $this->code, 'module' => $this->title, 'icon' => $icon, 'description' => $this->info, 'fields' => array(array('title' => '<div id="kvitancia">' . MODULE_PAYMENT_KVITANCIA_NAME_TITLE, 'field' => MODULE_PAYMENT_KVITANCIA_NAME_DESC), array('title' => MODULE_PAYMENT_KVITANCIA_NAME, 'field' => vam_draw_input_field('kvit_name', $order->customer['firstname'] . ' ' . $order->customer['lastname'])), array('title' => MODULE_PAYMENT_KVITANCIA_ADDRESS, 'field' => vam_draw_input_field('kvit_address', $order->customer['city'] . ' ' . $order->customer['street_address']) . MODULE_PAYMENT_KVITANCIA_ADDRESS_HELP . '</div>')));
return $selection;
}
示例5: add
function add($message, $type = 'error')
{
if ($message) {
$this->size++;
switch ($type) {
case 'log':
$this->add_log($message);
break;
case 'notice':
$this->errors[] = array('params' => 'class="messageNotice"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'wink.gif') . ' ', '', $message));
}
break;
case 'removed':
$this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'sad.gif') . ' ', '', $message));
}
break;
case 'installed':
$this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'biggrin.gif') . ' ', '', $message));
}
break;
case 'warning':
$this->errors[] = array('params' => 'class="messageWarning"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif', ICON_WARNING) . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif', ICON_WARNING) . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'tongue.gif') . ' ', '', $message));
}
break;
case 'success':
$this->errors[] = array('params' => 'class="messageSuccess"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif', ICON_SUCCESS) . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif', ICON_SUCCESS) . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'smile.gif') . ' ', '', $message));
}
break;
case 'error':
default:
$this->count_errors++;
$this->errors[] = array('params' => 'class="messageError"', 'text' => vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif', ICON_ERROR) . ' ' . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif', ICON_ERROR) . ' ', '', $message), 'type' => $type);
if (USE_LOG_SYSTEM == 'true') {
$this->add_log($type . ": " . str_replace(vam_image(DIR_WS_ADMIN_ICONS . 'shocked.gif') . ' ', '', $message));
}
//break;
return true;
//We recieved an error and main script should finish your work when this func return true.
}
}
return false;
// No message and no error! Cool!
}
示例6: quote
function quote($method = '')
{
global $order, $total_count;
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_ITEM_TEXT_TITLE, 'methods' => array(array('id' => $this->code, 'title' => MODULE_SHIPPING_ITEM_TEXT_WAY, 'cost' => MODULE_SHIPPING_ITEM_COST * $total_count + MODULE_SHIPPING_ITEM_HANDLING)));
if ($this->tax_class > 0) {
$this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (vam_not_null($this->icon)) {
$this->quotes['icon'] = vam_image($this->icon, $this->title);
}
return $this->quotes;
}
示例7: quote
function quote($method = '')
{
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_SOGL_TEXT_TITLE);
$this->quotes['methods'] = array(array('id' => $this->code, 'title' => MODULE_SHIPPING_SOGL_TEXT_WAY, 'cost' => 0));
if ($this->tax_class > 0) {
$this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (vam_not_null($this->icon)) {
$this->quotes['icon'] = vam_image($this->icon, $this->title);
}
return $this->quotes;
}
示例8: add
function add($message, $type = 'error')
{
if ($type == 'error') {
$this->errors[] = array('params' => 'class="messageStackError"', 'text' => vam_image(DIR_WS_ICONS . 'error.gif', ICON_ERROR) . ' ' . $message);
} elseif ($type == 'warning') {
$this->errors[] = array('params' => 'class="messageStackWarning"', 'text' => vam_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $message);
} elseif ($type == 'success') {
$this->errors[] = array('params' => 'class="messageStackSuccess"', 'text' => vam_image(DIR_WS_ICONS . 'success.gif', ICON_SUCCESS) . ' ' . $message);
} else {
$this->errors[] = array('params' => 'class="messageStackError"', 'text' => $message);
}
$this->size++;
}
示例9: vam_image_submit
function vam_image_submit($image, $alt = '', $parameters = '')
{
if (!empty($image) && file_exists(DIR_FS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image)) {
$image_submit = '<span class="button"><button type="submit"';
if (vam_not_null($parameters)) {
$image_submit .= ' ' . $parameters;
}
$image_submit .= '>' . vam_image(DIR_WS_CATALOG . DIR_WS_ICONS . 'buttons/' . $image, $alt, '', '', 'width="12" height="12"') . ' ' . $alt . '</button></span>';
} else {
$image_submit = '<span class="button"><button type="submit"';
if (vam_not_null($parameters)) {
$image_submit .= ' ' . $parameters;
}
$image_submit .= '>' . $alt . '</button></span>';
}
return $image_submit;
}
示例10: selection
function selection()
{
if (isset($_SESSION['cart_yandex_id'])) {
$order_id = substr($_SESSION['cart_yandex_id'], strpos($_SESSION['cart_yandex_id'], '-') + 1);
$check_query = vam_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '" limit 1');
if (vam_db_num_rows($check_query) < 1) {
vam_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $order_id . '"');
unset($_SESSION['cart_yandex_id']);
}
}
if (vam_not_null($this->icon)) {
$icon = vam_image($this->icon, $this->title);
}
return array('id' => $this->code, 'icon' => $icon, 'module' => $this->public_title);
}
示例11: selection
function selection()
{
if (isset($_SESSION['cart_aviso_id'])) {
$order_id = substr($_SESSION['cart_aviso_id'], strpos($_SESSION['cart_aviso_id'], '-') + 1);
$check_query = vam_db_query('select orders_id from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '" limit 1');
if (vam_db_num_rows($check_query) < 1) {
vam_db_query('delete from ' . TABLE_ORDERS . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_TOTAL . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_STATUS_HISTORY . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_ATTRIBUTES . ' where orders_id = "' . (int) $order_id . '"');
vam_db_query('delete from ' . TABLE_ORDERS_PRODUCTS_DOWNLOAD . ' where orders_id = "' . (int) $order_id . '"');
unset($_SESSION['cart_aviso_id']);
}
}
if (vam_not_null($this->icon)) {
$icon = vam_image($this->icon, $this->title);
}
return array('id' => $this->code, 'module' => $this->title, 'icon' => $icon, 'description' => $this->info, 'fields' => array(array('title' => '<div id="aviso">' . MODULE_PAYMENT_AVISO_NAME_TITLE, 'field' => MODULE_PAYMENT_AVISO_NAME_DESC), array('title' => MODULE_PAYMENT_AVISO_TELEPHONE, 'field' => vam_draw_input_field('aviso_telephone', $order->customer['telephone']) . MODULE_PAYMENT_AVISO_TELEPHONE_HELP . '</div>')));
}
示例12: quote
function quote($method = '')
{
global $vamPrice;
if ($vamPrice->RemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT && MODULE_SHIPPING_FREEAMOUNT_DISPLAY == 'False') {
return;
}
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_FREEAMOUNT_TEXT_TITLE);
if ($vamPrice->RemoveCurr($_SESSION['cart']->show_total()) < MODULE_SHIPPING_FREEAMOUNT_AMOUNT) {
$this->quotes['error'] = sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $vamPrice->Format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true));
} else {
$this->quotes['methods'] = array(array('id' => $this->code, 'title' => sprintf(MODULE_SHIPPING_FREEAMOUNT_TEXT_WAY, $vamPrice->Format(MODULE_SHIPPING_FREEAMOUNT_AMOUNT, true, 0, true)), 'cost' => 0));
}
if ($this->tax_class > 0) {
$this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
if (vam_not_null($this->icon)) {
$this->quotes['icon'] = vam_image($this->icon, $this->title);
}
return $this->quotes;
}
示例13: quote
function quote()
{
global $order, $shipping_weight;
$this->quotes = array('id' => $this->code, 'module' => MODULE_SHIPPING_CHRONOPOST_TEXT_TITLE, 'methods' => array());
if (vam_not_null($this->icon)) {
$this->quotes['icon'] = vam_image($this->icon, $this->title);
}
if ($this->tax_class > 0) {
$this->quotes['tax'] = vam_get_tax_rate($this->tax_class, $order->delivery['country']['id'], $order->delivery['zone_id']);
}
$dest_country = $order->delivery['country']['iso_code_2'];
$dest_zone = 0;
for ($i = 1; $i <= $this->num_chronopost; $i++) {
$countries_table = constant('MODULE_SHIPPING_CHRONOPOST_COUNTRIES_' . $i);
$country = preg_split("/[,]/", $countries_table);
if (in_array($dest_country, $country)) {
$dest_zone = $i;
break;
}
}
if ($dest_zone == 0) {
$this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_INVALID_ZONE;
return $this->quotes;
}
$table = preg_split("/[:,]/", constant('MODULE_SHIPPING_CHRONOPOST_COST_' . $dest_zone));
$cost = -1;
for ($i = 0, $n = sizeof($table); $i < $n; $i += 2) {
if ($shipping_weight <= $table[$i]) {
$cost = $table[$i + 1] + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING;
break;
}
}
if ($cost == -1) {
$this->quotes['error'] = MODULE_SHIPPING_CHRONOPOST_UNDEFINED_RATE;
return $this->quotes;
}
$this->quotes['methods'][] = array('id' => $this->code, 'title' => MODULE_SHIPPING_CHRONOPOST_TEXT_WAY . ' ' . $order->delivery['country']['title'], 'cost' => $cost + MODULE_SHIPPING_CHRONOPOST_HANDLING + SHIPPING_HANDLING);
return $this->quotes;
}
示例14: array
</table></td>
<?php
$heading = array();
$contents = array();
switch ($_GET['action']) {
case 'delete':
$heading[] = array('text' => '<b>' . TEXT_INFO_HEADING_DELETE_PAYMENT . '</b>');
$contents = array('form' => vam_draw_form('payment', FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=deleteconfirm'));
$contents[] = array('text' => TEXT_INFO_DELETE_INTRO . '<br>');
$contents[] = array('align' => 'center', 'text' => '<br><span class="button"><button type="submit" value="' . BUTTON_DELETE . '">' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . ' ' . BUTTON_DELETE . '</button></span><a class="button" href="' . vam_href_link(AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id) . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/cancel.png', '', '12', '12') . ' ' . BUTTON_CANCEL . '</span></a>');
break;
default:
if (is_object($pInfo)) {
$heading[] = array('text' => '<b>[' . $pInfo->affiliate_payment_id . '] ' . vam_datetime_short($pInfo->affiliate_payment_date) . '</b>');
$contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=edit') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/edit.png', '', '12', '12') . ' ' . BUTTON_EDIT . '</span></a> <a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_PAYMENT, vam_get_all_get_params(array('pID', 'action')) . 'pID=' . $pInfo->affiliate_payment_id . '&action=delete') . '"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/delete.png', '', '12', '12') . ' ' . BUTTON_DELETE . '</span></a>');
$contents[] = array('align' => 'center', 'text' => '<a class="button" href="' . vam_href_link(FILENAME_AFFILIATE_INVOICE, 'pID=' . $pInfo->affiliate_payment_id) . '" TARGET="_blank"><span>' . vam_image(DIR_WS_IMAGES . 'icons/buttons/payment.png', '', '12', '12') . ' ' . BUTTON_INVOICE . '</span></a> ');
}
break;
}
if (vam_not_null($heading) && vam_not_null($contents)) {
echo ' <td width="25%" valign="top">' . "\n";
$box = new box();
echo $box->infoBox($heading, $contents);
echo ' </td>' . "\n";
}
?>
</tr>
</table></td>
</tr>
<?php
}
示例15: nextcommerce
(c) 2003 nextcommerce (header.php,v 1.17 2003/08/24); www.nextcommerce.org
(c) 2004 xt:Commerce (header.php,v 1.17 2003/08/24); xt-commerce.com
Released under the GNU General Public License
--------------------------------------------------------------*/
if ($messageStack->size > 0) {
echo $messageStack->output();
}
?>
<!-- шапка -->
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" align="left" class="header">
<a href="start.php"><?php
echo vam_image(DIR_WS_IMAGES . 'logo.png', 'VamShop');
?>
</a>
</td>
<td width="370" align="center" class="header">
</td>
<td width="300" class="header">
</td>
</tr>
</table>
<?php
if (ADMIN_DROP_DOWN_NAVIGATION == 'true') {
?>