Example #1
0
if (vmIsJoomla('1.5')) {
    require_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_users' . DS . 'users.class.php';
    $user =& JUser::getInstance($user_id);
    $params = $user->getParameters(true);
} elseif (file_exists($mosConfig_absolute_path . '/administrator/components/com_users/users.class.php')) {
    require_once $mosConfig_absolute_path . '/administrator/components/com_users/users.class.php';
    $file = $mainframe->getPath('com_xml', 'com_users');
    $params = new mosUserParameters($row->params, $file, 'component');
}
// Set the last visit date
$lvisit = $row->lastvisitDate;
if ($lvisit == "0000-00-00 00:00:00") {
    $lvisit = '***' . $VM_LANG->_('VM_USER_FORM_LASTVISIT_NEVER');
}
//First create the object and let it print a form heading
$formObj = new formFactory(vmCommonHTML::imageTag(VM_THEMEURL . 'images/administration/header/icon-48-user.png', 'User Icon', 'absmiddle') . '   ' . $VM_LANG->_('PHPSHOP_USER_FORM_LBL'));
//Then Start the form
$formObj->startForm();
$tabs = new vmTabPanel(0, 1, "userform");
$tabs->startPane("userform-pane");
$tabs->startTab($VM_LANG->_('VM_USER_FORM_TAB_GENERALINFO'), "userform-page");
?>
<script language="javascript" type="text/javascript">
function gotocontact( id ) {
	var form = document.adminForm;
	form.target = "_parent";
	form.contact_id.value = id;
	form.option.value = 'com_users';
	submitform( 'contact' );
}
</script>
Example #2
0
 /**
  * Returns the img tag for the given product image
  *
  * @param string $image The name of the imahe OR the full URL to the image
  * @param string $args Additional attributes for the img tag
  * @param int $resize 
  * (1 = resize the image by using height and width attributes, 
  * 0 = do not resize the image)
  * @param string $path_appendix The path to be appended to IMAGEURL / IMAGEPATH
  * @return The HTML code of the img tag
  */
 function image_tag($image, $args = "", $resize = 1, $path_appendix = 'product', $thumb_width = 0, $thumb_height = 0)
 {
     global $mosConfig_live_site, $mosConfig_absolute_path;
     require_once CLASSPATH . 'imageTools.class.php';
     $border = "";
     if (strpos($args, "border=") === false) {
         $border = 'border="0"';
     }
     $height = $width = 0;
     if ($image != "") {
         // URL
         if (substr($image, 0, 4) == "http") {
             $url = $image;
         } else {
             if (PSHOP_IMG_RESIZE_ENABLE == '1' && $resize == 1) {
                 $url = $mosConfig_live_site . "/components/com_virtuemart/show_image_in_imgtag.php?filename=" . urlencode($image) . "&amp;newxsize=" . PSHOP_IMG_WIDTH . "&amp;newysize=" . PSHOP_IMG_HEIGHT . "&amp;fileout=";
                 if (!strpos($args, "height=")) {
                     $arr = @getimagesize(vmImageTools::getresizedfilename($image, $path_appendix, '', $thumb_height, $thumb_width));
                     $width = $arr[0];
                     $height = $arr[1];
                 }
             } else {
                 $url = IMAGEURL . $path_appendix . '/' . $image;
                 $using_resized_image = false;
                 if ($resize) {
                     $image = vmImageTools::getresizedfilename($image, $path_appendix, '', $thumb_height, $thumb_width);
                     if (file_exists($image)) {
                         $using_resized_image = true;
                     }
                 }
                 if ($resize && !$using_resized_image) {
                     if ($height < $width) {
                         $width = @round($width / ($height / PSHOP_IMG_HEIGHT));
                         $height = PSHOP_IMG_HEIGHT;
                     } else {
                         $height = @round($height / ($width / PSHOP_IMG_WIDTH));
                         $width = PSHOP_IMG_WIDTH;
                     }
                 }
                 if (file_exists($image)) {
                     $url = str_replace($mosConfig_absolute_path, $mosConfig_live_site, $image);
                 } elseif (file_exists($mosConfig_absolute_path . '/' . $image)) {
                     $url = $mosConfig_live_site . '/' . $image;
                 }
                 $url = str_replace('//', '/', $url);
                 $url = str_replace(':/', '://', $url);
                 if (!strpos($args, "height=")) {
                     $f = str_replace(IMAGEURL, IMAGEPATH, $url);
                     if (file_exists($f)) {
                         $arr = getimagesize($f);
                         $width = $arr[0];
                         $height = $arr[1];
                     } else {
                         $width = 100;
                         $height = 100;
                     }
                 }
             }
             $url = str_replace(basename($url), $GLOBALS['VM_LANG']->convert(basename($url)), $url);
         }
     } else {
         $url = VM_THEMEURL . 'images/' . NO_IMAGE;
     }
     return vmCommonHTML::imageTag($url, '', '', $height, $width, '', '', $args . ' ' . $border);
 }
* 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__);
global $VM_LANG;
?>

<h3><?php 
echo $VM_LANG->_('PHPSHOP_THANKYOU');
?>
</h3>
<p>
 	<?php 
echo vmCommonHTML::imageTag(VM_THEMEURL . 'images/button_ok.png', 'Success', 'center', '48', '48');
?>
   	<?php 
echo $VM_LANG->_('PHPSHOP_THANKYOU_SUCCESS');
?>
  
	<br /><br />
	<?php 
echo $VM_LANG->_('PHPSHOP_EMAIL_SENDTO') . ": <strong>" . $user->user_email . '</strong>';
?>
<br />
</p>
  
<!-- Begin Payment Information -->
<?php 
if (empty($auth['user_id'])) {
Example #4
0
 /**
  * Builds the "more images" link
  *
  * @param array $images
  */
 function vmMoreImagesLink($images)
 {
     global $mosConfig_live_site, $VM_LANG, $sess;
     /* Build the JavaScript Link */
     $url = $sess->url("index2.php?page=shop.view_images&amp;flypage=" . @$_REQUEST['flypage'] . "&amp;product_id=" . @$_REQUEST['product_id'] . "&amp;category_id=" . @$_REQUEST['category_id'] . "&amp;pop=1");
     $text = $VM_LANG->_('PHPSHOP_MORE_IMAGES') . '(' . count($images) . ')';
     $image = vmCommonHTML::imageTag(VM_THEMEURL . 'images/more_images.png', $text, '', '16', '16');
     return vmPopupLink($url, $image . '<br />' . $text, 640, 550, '_blank', '', 'screenX=100,screenY=100');
 }
		  <?php
	}

	// Delivery time!
	// Ships in 24hrs, 48hrs, ....
	if( $product_availability ) { ?>
		<span style="font-weight:bold;">
			<?php echo $VM_LANG->_('PHPSHOP_DELIVERY_TIME') ?>: 
		</span>
		<br /><br />
		<?php
		if( CHECK_STOCK == '1' && !$product_in_stock ) {
			$product_availability = 'not_available.gif';
		}
		if( is_file( VM_THEMEPATH."images/availability/".$product_availability)) {
			echo vmCommonHTML::imageTag( VM_THEMEURL."images/availability/".$product_availability, $product_availability );
		}
		else {
			echo $product_availability;
		}
	}
	$avail = ob_get_contents();
	ob_end_clean();
	if( !empty( $avail ) ) { 
		?>
		<div class="availabilityHeader"><?php echo $VM_LANG->_('PHPSHOP_AVAILABILITY') ?></div>
		<br />
		<?php
		echo $avail;
	}
?>
Example #6
0
/**
 * Utility function to provide ToolTips
 *
 * @param string $tooltip ToolTip text
 * @param string $title The Box title
 * @param string $image
 * @param int $width
 * @param string $text
 * @param string $href
 * @param string $link
 * @return string HTML code for ToolTip
 */
function vmToolTip($tooltip, $title = 'Tip!', $image = "{mosConfig_live_site}/images/M_images/con_info.png", $width = '350', $text = '', $href = '#', $link = false)
{
    global $mosConfig_live_site, $database;
    defined('vmToolTipCalled') or define('vmToolTipCalled', 1);
    $tooltip = str_replace('"', '&quot;', $tooltip);
    $tooltip = $database->getEscaped($tooltip);
    $tooltip = str_replace("&#039;", "\\&#039;", $tooltip);
    if (!empty($width)) {
        $width = ',WIDTH, -' . $width;
    }
    if ($title) {
        $title = ',TITLE,\'' . $title . '\'';
    }
    $image = str_replace("{mosConfig_live_site}", $mosConfig_live_site, $image);
    if ($image != '') {
        $text = vmCommonHTML::imageTag($image, '', 'top') . '&nbsp;' . $text;
    }
    $style = 'style="text-decoration: none; color: #333;"';
    if ($href) {
        $style = '';
    }
    if ($link) {
        $tip = vmCommonHTML::hyperLink($href, $text, '', '', "onmouseover=\"Tip( '{$tooltip}' );\" onmouseout=\"UnTip()\" " . $style);
    } else {
        $tip = "<span onmouseover=\"Tip( '{$tooltip}' {$width} {$title} );\" onmouseout=\"UnTip()\" " . $style . ">" . $text . "</span>";
    }
    return $tip;
}