getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/libraries/classes/jce.class.php' ); require_once( $mainframe->getCfg('absolute_path') . '/mambots/editors/jce/jscripts/tiny_mce/libraries/classes/jce.utils.class.php' ); if( file_exists( $mainframe->getCfg('absolute_path') . '/components/com_phpshop/phpshop_parser.php' )) { require_once( $mainframe->getCfg('absolute_path') . '/components/com_phpshop/phpshop_parser.php' ); } elseif( file_exists( $mainframe->getCfg('absolute_path') . '/components/com_virtuemart/virtuemart_parser.php' )) { require_once($mainframe->getCfg('absolute_path') . '/components/com_virtuemart/virtuemart_parser.php' ); } if( !$perm->check('admin,storeadmin')) { return false; } $prefix = class_exists('vmlanguage') ? '{vm}' : 'pshop'; $jce = new JCE(); $jce->setPlugin('productsnap'); require_once( $jce->getPluginPath() . '/classes/manager.class.php' ); //Setup languages include_once( $jce->getLibPath() . '/langs/' . $jce->getLanguage() . '.php' ); include_once( $jce->getPluginPath() . '/langs/' . $jce->getPluginLanguage() . '.php' ); //Load Plugin Parameters $params = $jce->getPluginParams(); /*Get variables *param $curr_category The relative path passed *param $ret_file The relative file returned from the editor */ $curr_category = mosGetParam( $_REQUEST, 'category', mosGetParam( $_COOKIE, 'jce_productsnap_category', '') ); $ret_product = (int)mosGetParam( $_REQUEST, 'ret_product', 0 ); if( $ret_product > 0 ) { $db = new ps_DB(); $db->query('SELECT c.category_id FROM #__'.$prefix.'_category c, #__'.$prefix.'_product_category_xref cx WHERE c.category_id=cx.category_id AND cx.product_id='.$ret_product ); $db->next_record(); $curr_category = $db->f('category_id'); } //End User Directory Restrictions $manager = new productSnapshotManager( IMAGEPATH, IMAGEURL ); /* //If a returned file exists, create the path to the current dir if( $ret_file ){ $ret_file = JPath::makePath( $curr_category, $ret_file ); }*/ //Upload action //End File Actions $product_list = $manager->getProducts( $curr_category ); $category_list = $manager->getCategories( $curr_category ); /** * Draw the products. */ function drawProducts( $product_list, &$manager ) { global $jce; $f = 0; foreach( $product_list as $product ) { $id = intval( $product['id'] ); $name = $product['name']; $shortname = $product['short_name']; $icon = $GLOBALS['mosConfig_live_site'].'/mambots/editors/jce/jscripts/tiny_mce/plugins/productsnap/images/package.png' ?>
'. $jce->translate('no_products'). ''; } ?>