\n";
}
/**
* This creates a header above the list table, containing a search box
* @param The Label for the list (will be used as list heading!)
* @param The core module name (e.g. "product")
* @param The page name (e.g. "product_list" )
* @param Additional varaibles to include as hidden input fields
*/
function writeSearchHeader( $title, $image="", $modulename, $pagename) {
global $sess, $keyword, $VM_LANG, $option;
if( !empty( $keyword )) {
$keyword = urldecode( $keyword );
}
else {
$keyword = "";
}
$category_id = mosGetParam( $_REQUEST, 'category_id', null);
$search_date = mosGetParam( $_REQUEST, 'search_date', null);
$show = mosGetParam( $_REQUEST, "show", "" );
$header = "";
echo $footer;
}
}
/**
* This is the class for creating regular forms used in SupaCart
*
* Usage:
* //First create the object and let it print a form heading
* $formObj = &new formFactory( "My Form" );
* //Then Start the form
* $formObj->startForm();
* // Add necessary hidden fields
* $formObj->hiddenField( 'country_id', $country_id );
*
* // Write your form with mixed tags and text fields
* // and finally close the form:
* $formObj->finishForm( $funcname, $modulename.'.country_list', $option );
*
* @package supacart
* @subpackage Core
* @author soeren
*/
class formFactory {
/**
* Constructor
* Prints the Form Heading if provided
*/
function formFactory( $title = '' ) {
if( $title != "" ) {
echo "
$title
";
}
}
/**
* Writes the form start tag
*/
function startForm( $formname = 'adminForm', $extra = "" ) {
echo '
';
echo $html;
}
}
/**
* Tab Creation handler
* @package SupaCart
* @subpackage core
* @author Phil Taylor
* @author Soeren Eberhardt
* Modified to use Panel-in-Panel functionality
*/
class mShopTabs {
/** @var int Use cookies */
var $useCookies = 0;
/** @var string Panel ID */
var $panel_id;
/**
* Constructor
* Includes files needed for displaying tabs and sets cookie options
* @param int useCookies, if set to 1 cookie will hold last used tab between page refreshes
* @param int show_js, if set to 1 the Javascript Link and Stylesheet will not be printed
*/
function mShopTabs($useCookies, $show_js, $panel_id) {
global $mosConfig_live_site;
if( $show_js == 1 ) {
echo "";
echo "";
}
$this->useCookies = $useCookies;
$this->panel_id = $panel_id;
}
/**
* creates a tab pane and creates JS obj
* @param string The Tab Pane Name
*/
function startPane($id){
echo "
";
}
/*
* Creates a tab with title text and starts that tabs page
* @param tabText - This is what is displayed on the tab
* @param paneid - This is the parent pane to build this tab on
*/
function startTab( $tabText, $paneid ) {
echo "
";
echo "
".$tabText."
";
echo "";
}
/*
* Ends a tab page
*/
function endTab() {
echo "
";
}
}
class vmCommonHTML {
/**
* Writes a "Save Ordering" Button
* @param int the number of rows
*/
function getSaveOrderButton( $num_rows, $funcname='reorder') {
global $mosConfig_live_site;
$n = $num_rows-1;
return '';
}
function getOrderingField( $ordering ) {
return '';
}
function getYesNoIcon( $condition, $pos_alt = "Published", $neg_alt = "Unpublished" ) {
global $mosConfig_live_site;
if( $condition===true || strtoupper( $condition ) == "Y" )
return '';
else
return '';
}
/*
* Loads all necessary files for JS Overlib tooltips
*/
function loadOverlib() {
global $mosConfig_live_site;
if( !defined( "_OVERLIB_LOADED" )) {
?>
'.$msg.'';
return $html;
}
/**
* Returns a div element of the class "shop_error"
* containing $msg to print out an error
*
* @param string $msg
* @return string HTML code
*/
function getInfoField( $msg ) {
$html = '
'.$msg.'
';
return $html;
}
/**
* Prints a JS function to validate all fields
* given in the array $required_fields
* Does only test if non-empty (or if no options are selected)
* Includes a check for a valid email-address
*
* @param array $required_fields The list of form elements that are to be validated
* @param string $formname The name for the form element
* @param string $div_id_postfix The ID postfix to identify the label for the field
*/
function printJS_formvalidation( $required_fields, $formname = 'adminForm', $functioname='submitregistration', $div_id_postfix = '_div' ) {
global $VM_LANG;
echo '
';
}
}
/**
* Utility function to provide ToolTips
* @param string ToolTip text
* @param string Box title
* @returns HTML code for ToolTip
*/
function mm_ToolTip( $tooltip, $title='Tip!', $image = "{mosConfig_live_site}/images/M_images/con_info.png", $width='', $text='', $href='#', $link=false ) {
global $mosConfig_live_site, $database;
defined( 'vmToolTipCalled') or define('vmToolTipCalled', 1);
$tooltip = @htmlentities( $database->getEscaped($tooltip), ENT_QUOTES, vmGetCharset() );
if ( !empty($width) ) {
$width = 'this.T_WIDTH=\''.$width .'\';';
}
if ( $title ) {
$title = 'this.T_TITLE=\''.$title .'\';';
}
$image = str_replace( "{mosConfig_live_site}", $mosConfig_live_site, $image);
$text = ' '.$text;
$style = 'style="text-decoration: none; color: #333;"';
if ( $href ) {
$style = '';
}
if ( $link ) {
$tip = "". $text ."";
} else {
$tip = "". $text ."";
}
return $tip;
}
// borrowed from mambo.php
function shopMakeHtmlSafe( $string, $quote_style=ENT_QUOTES, $exclude_keys='' ) {
$string = htmlspecialchars( $string, $quote_style );
return $string;
}
function mm_showMyFileName( $filename ) {
if (DEBUG == '1' ) {
echo mm_ToolTip( '
Begin of File: '. $filename.'
');
}
}
/**
* Wraps HTML Code or simple Text into Javascript
* and uses the noscript Tag to support browsers with JavaScript disabled
**/
function mm_writeWithJS( $textToWrap, $noscriptText ) {
$text = "";
if( !empty( $textToWrap )) {
$text = "\n";
}
if( !empty( $noscriptText )) {
$text .= "\n";
}
return $text;
}
/**
* A function to create a XHTML compliant and JS-disabled-safe pop-up link
*/
function vmPopupLink( $link, $text, $popupWidth=640, $popupHeight=480, $target='_blank', $title='' ) {
$jslink = "$text";
$noscriptlink = "$text";
return mm_writeWithJS( $jslink, $noscriptlink );
}
?>