AAAAPK>\Y\@@helpers/file.phpnuW+Ainput; // Load the necessary libraries jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.archive'); $this->_unpackpath = CSVIPATH_TMP; $this->_supported_fields = $jinput->get('avfields', array(), null); // Load some basic settings $this->_fileSettings(); } /** * Set up the basic settings * * @copyright * @author RolandD * @todo * @see $suffixes * @see $mimetypes * @see $data * @access private * @param * @return * @since 3.0 */ private function _fileSettings() { $this->suffixes = array('txt','csv','xls','xml','ods'); $this->mimetypes = array('text/html', 'text/plain', 'text/csv', 'application/octet-stream', 'application/x-octet-stream', 'application/vnd.ms-excel', 'application/excel', 'application/ms-excel', 'application/x-excel', 'application/x-msexcel', 'application/force-download', 'text/comma-separated-values', 'text/x-csv', 'text/x-comma-separated-values', 'application/vnd.oasis.opendocument.spreadsheet'); $this->archives = array('zip', 'tgz'); $this->data->sheets[0] = array(); } /** * Process the file to import * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ abstract public function processFile(); /** * Validate the file * * Validate the file is of the supported type * Types supported are csv, txt, xls, ods, xml * * @copyright * @author RolandD * @todo See if this code can be optimized * @see * @access public * @param * @return bool true if all OK | false if not OK * @since 3.0 */ public function validateFile() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Workaround as it is always true //if ($jinput->get('filepos', 0, 'int') >= 0) { // $csv_file = $template->get('local_csv_file', 'general', false); // if (!$csv_file) { // $csv_file = urldecode($jinput->get('csv_file')); // $jinput->set('local_csv_file', $csv_file); // } // $this->folder = dirname($csv_file); // $jinput->set('csv_file', $csv_file); //} $loadfrom = $template->get('source', 'general'); switch (strtolower($loadfrom)) { // Uploaded file case 'fromupload': $upload['name'] = $_FILES['jform']['name']['general']['import_file']; $upload['type'] = $_FILES['jform']['type']['general']['import_file']; $upload['tmp_name'] = $_FILES['jform']['tmp_name']['general']['import_file']; $upload['error'] = $_FILES['jform']['error']['general']['import_file']; // Check if the file upload has an error if (empty($upload)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_UPLOADED_FILE_PROVIDED')); return false; } else if ($upload['error'] == 0) { if (is_uploaded_file($upload['tmp_name'])) { // Get some basic info $folder = $this->_unpackpath.'/'.time(); $upload_parts = pathinfo($upload['name']); // Create the temp folder if (JFolder::create($folder)) { $this->folder = $folder; // Move the uploaded file to its temp location if (JFile::upload($upload['tmp_name'], $folder.'/'.$upload['name'])) { $this->_uploaded = true; // Let's see if the uploaded file is an archive if (in_array($upload_parts['extension'], $this->archives)) { // It is an archive, unpack first if (JArchive::extract($folder.'/'.$upload['name'], $folder)) { // File is unpacked, let's get the filename $foundfiles = scandir($folder); foreach ($foundfiles as $ffkey => $filename) { $ff_parts = pathinfo($filename); if (in_array(strtolower($ff_parts['extension']), $this->suffixes)) { $jinput->set('csv_file', $folder.'/'.$filename); $jinput->set('upload_file_error', false); $this->extension = strtolower($ff_parts["extension"]); end($foundfiles); } else $found = false; } if (!$found) $jinput->set('upload_file_error', true); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_UNPACK_UPLOADED_FILE')); return false; } } // Just a regular file else { $jinput->set('csv_file', $folder.'/'.$upload['name']); $this->extension = strtolower($upload_parts['extension']); } } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_UNPACK_FOLDER', $folder)); return false; } } // Error warning cannot save uploaded file else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_UPLOADED_FILE_PROVIDED', $upload['tmp_name'])); return false; } } else { // There was a problem uploading the file switch($upload['error']) { case '1': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_THE_UPLOADED_FILE_EXCEEDS_THE_MAXIMUM_UPLOADED_FILE_SIZE')); break; case '2': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_THE_UPLOADED_FILE_EXCEEDS_THE_MAXIMUM_UPLOADED_FILE_SIZE')); break; case '3': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_THE_UPLOADED_FILE_WAS_ONLY_PARTIALLY_UPLOADED')); break; case '4': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_FILE_WAS_UPLOADED')); break; case '6': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MISSING_A_TEMPORARY_FOLDER')); break; case '7': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_FAILED_TO_WRITE_FILE_TO_DISK')); break; case '8': $csvilog->AddStats('incorrect', JText::_('COM_CSVI_FILE_UPLOAD_STOPPED_BY_EXTENSION')); break; default: $csvilog->AddStats('incorrect', JText::_('COM_CSVI_THERE_WAS_A_PROBLEM_UPLOADING_THE_FILE')); break; } return false; } break; // Local file case 'fromserver': $csv_file = JPath::clean($template->get('local_csv_file', 'general'), '/'); // Set the file name to use $jinput->set('csv_file', $csv_file); if (!JFile::exists($csv_file)) { $csvilog->addDebug('[VALIDATEFILE] '.JText::sprintf('COM_CSVI_LOCAL_FILE_DOESNT_EXIST', $csv_file)); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_LOCAL_FILE_DOESNT_EXIST', $csv_file)); return false; } else $jinput->set('upload_file_error', false); $fileinfo = pathinfo($csv_file); if (isset($fileinfo["extension"])) { $this->extension = strtolower($fileinfo["extension"]); if ($this->extension == 'txt') $this->extension = 'csv'; } break; case 'fromurl': // The temporary folder $folder = $this->_unpackpath.'/'.time(); $urlfile = $template->get('urlfile', 'general', false); $tempfile = basename($urlfile); // Check if the remote file exists if ($urlfile) { if (CsviHelper::fileExistsRemote($urlfile)) { // Copy the remote file to a local location if (JFolder::create($folder)) { if (touch($folder.'/'.$tempfile)) { if (JFile::write($folder.'/'.$tempfile, JFile::read($urlfile))) { $csvilog->addDebug(JText::sprintf('COM_CSVI_RETRIEVE_FROM_URL', $urlfile)); $jinput->set('csv_file', $folder.'/'.$tempfile); $jinput->set('upload_file_error', false); $this->extension = JFile::getExt($tempfile); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_READ_FROM_URL')); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_TEMP_FILE', $folder.'/'.$tempfile)); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_TEMP_FOLDER', $folder)); return false; } } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_READ_FROM_URL')); return false; } } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_FILENAME_GIVEN')); return false; } break; case 'fromftp': // The temporary folder $folder = $this->_unpackpath.'/'.time(); $ftpfile = $template->get('ftpfile', 'general', false); if ($ftpfile) { // Create the output file if (JFolder::create($folder)) { if (touch($folder.'/'.$ftpfile)) { // Start the FTP jimport('joomla.client.ftp'); $ftp = JFTP::getInstance($template->get('ftphost', 'general'), $template->get('ftpport', 'general'), null, $template->get('ftpusername', 'general'), $template->get('ftppass', 'general')); if ($ftp->get($folder.'/'.$ftpfile, $template->get('ftproot', 'general', '/').$ftpfile)) { $csvilog->addDebug(JText::sprintf('COM_CSVI_RETRIEVE_FROM_FTP', $template->get('ftproot', 'general', '/').$ftpfile)); $jinput->set('csv_file', $folder.'/'.$ftpfile); $jinput->set('upload_file_error', false); $this->extension = JFile::getExt($ftpfile); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_READ_FROM_FTP')); return false; } $ftp->quit(); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_TEMP_FILE', $folder.'/'.$ftpfile)); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_TEMP_FOLDER', $folder)); return false; } } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_FILENAME_GIVEN')); return false; } break; // No file given default: $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_FILE_PROVIDED')); return false; break; } // Make sure txt files are not ignored if ($this->extension == 'txt') $this->extension = 'csv'; // Set the filename $csv_file = $jinput->get('csv_file', '', 'string'); if (JFile::exists($csv_file)) { $this->filename = JPath::clean($csv_file, '/'); // Store the users filename for display purposes $csvilog->setFilename(basename($this->filename)); } else { $csvilog->addDebug(JText::sprintf('COM_CSVI_LOCAL_FILE_DOESNT_EXIST', $jinput->get('csv_file'))); return false; } if (in_array($this->extension, $this->suffixes)) $this->valid_extension = true; else { // Test the mime type if (!in_array($this->extension, $this->mimetypes) ) { $csvilog->AddStats('information', JText::sprintf('COM_CSVI_EXTENSION_NOT_ACCEPTED', $this->extension)); return false; } } // Debug message to know what filetype the user is uploading $csvilog->addDebug(JText::sprintf('COM_CSVI_IMPORT_FILETYPE', $this->extension)); // All is fine return true; } /** * Read the next line in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array with the line of data read | false if data cannot be read * @since 3.0 */ abstract public function ReadNextLine(); /** * Close the file * * @copyright * @author RolandD * @todo * @see processFile() * @access * @param * @return * @since */ public function closeFile($removefolder=true) { // Delete the uploaded folder if ($removefolder) $this->removeFolder(); } /** * Remove the temporary folder * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function removeFolder() { $jinput = JFactory::getApplication()->input; if (!$jinput->get('cron', false, 'bool')) { $folder = JPath::clean(dirname($this->filename), '/'); $pos = strpos($folder, CSVIPATH_TMP); if ($pos !== false) if (JFolder::exists($folder)) JFolder::delete($folder); } } /** * Get the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int current position in the file * @since 3.0 */ abstract public function getFilePos(); /** * Set the current position in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param int $pos the position to move to * @return * @since 3.0 */ abstract public function setFilePos($pos); /** * Get the size of the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int the size of the file being read * @since 3.0 */ public function getFileSize() { return filesize($this->filename); } /** * Load the column headers from a file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true * @since 3.0 */ abstract public function loadColumnHeaders(); /** * Advances the file pointer 1 forward * * @copyright * @author RolandD * @todo * @see * @access public * @param bool $preview True if called from the preview * @return * @since 3.0 */ public function next($preview=false) { $discard = $this->readNextLine(); } /** * Sets the file pointer back to the beginning of the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ abstract function rewind(); /** * Empties the data * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true * @since 3.0 */ public function clearData() { $this->data = null; return true; } } ?>PK>\f(,llhelpers/images.phpnuW+AloadMimeTypes(); $this->loadImageTypes(); } /** * Check if the given file is an image * * @copyright * @author RolandD * @todo add support for external files * @see * @access public * @param string $file full path to file to check * @param bool $remote true if the file to check is a remote file * @return bool true if file is image, false if file is not an image * @since 3.0 */ public function isImage($file, $remote=false) { $mime_type = $this->findMimeType($file, $remote); if ($mime_type) { foreach ($this->_image_types as $key => $type) { if ($type['mime_type'] == $mime_type) return true; } } // If we get here, no image type has been found return false; } /** * Check a file for its mime type * * @copyright * @author RolandD * @todo * @see * @access public * @param string $filename the full location of the file to check * @param bool $remote true if the file to check is a remote file * @return string|bool return mime type if found | return false if no type found * @since 3.0 */ public function findMimeType($filename, $remote=false) { jimport('joomla.filesystem.file'); if (JFile::exists($filename) || $remote) { $handle = @fopen($filename, "r"); if ($handle) { $string = fread($handle, 20); $max_length_found = 0; foreach ($this->_mime_types as $key => $type) { if (stripos(bin2hex($string), $type['signature'], 0) !== false) { if (strlen($type['signature']) > $max_length_found) { $max_length_found = strlen($type['signature']); if (isset($type['mime_type'])) $this->_found_mime_type['mime_type'] = $type['mime_type']; } } } fclose($handle); if (isset($this->_found_mime_type['mime_type'])) return $this->_found_mime_type['mime_type']; else return false; } else { // Cannot open the image file, do a simple check switch (JFile::getExt($filename)) { case 'jpg': case 'jpeg': return 'image/jpeg'; break; case 'png': return 'image/png'; break; case 'gif': return 'image/gif'; break; case 'bmp': return 'image/bmp'; break; default: return false; break; } } } else return false; } /** * Load mime type signatures * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return void * @since 3.0 */ private function LoadMimeTypes() { $this->_mime_types[0]['signature'] = '474946383761'; $this->_mime_types[1]['signature'] = '424D'; $this->_mime_types[2]['signature'] = '4D5A'; $this->_mime_types[3]['signature'] = '504B0304'; $this->_mime_types[4]['signature'] = 'D0CF11E0A1B11AE1'; $this->_mime_types[5]['signature'] = '0100000058000000'; $this->_mime_types[6]['signature'] = '03000000C466C456'; $this->_mime_types[7]['signature'] = '3F5F0300'; $this->_mime_types[8]['signature'] = '1F8B08'; $this->_mime_types[9]['signature'] = '28546869732066696C65'; $this->_mime_types[10]['signature'] = '0000010000'; $this->_mime_types[11]['signature'] = '4C000000011402'; $this->_mime_types[12]['signature'] = '25504446'; $this->_mime_types[13]['signature'] = '5245474544495434'; $this->_mime_types[14]['signature'] = '7B5C727466'; $this->_mime_types[15]['signature'] = 'lh'; $this->_mime_types[16]['signature'] = 'MThd'; $this->_mime_types[17]['signature'] = '0A050108'; $this->_mime_types[18]['signature'] = '25215053'; $this->_mime_types[19]['signature'] = '2112'; $this->_mime_types[20]['signature'] = '1A02'; $this->_mime_types[21]['signature'] = '1A03'; $this->_mime_types[22]['signature'] = '1A04'; $this->_mime_types[23]['signature'] = '1A08'; $this->_mime_types[24]['signature'] = '1A09'; $this->_mime_types[25]['signature'] = '60EA'; $this->_mime_types[26]['signature'] = '41564920'; $this->_mime_types[27]['signature'] = '425A68'; $this->_mime_types[28]['signature'] = '49536328'; $this->_mime_types[29]['signature'] = '4C01'; $this->_mime_types[30]['signature'] = '303730373037'; $this->_mime_types[31]['signature'] = '4352555348'; $this->_mime_types[32]['signature'] = '3ADE68B1'; $this->_mime_types[33]['signature'] = '1F8B'; $this->_mime_types[34]['signature'] = '91334846'; $this->_mime_types[35]['signature'] = '3C68746D6C3E'; $this->_mime_types[36]['signature'] = '3C48544D4C3E'; $this->_mime_types[37]['signature'] = '3C21444F4354'; $this->_mime_types[38]['signature'] = '100'; $this->_mime_types[39]['signature'] = '5F27A889'; $this->_mime_types[40]['signature'] = '2D6C68352D'; $this->_mime_types[41]['signature'] = '20006040600'; $this->_mime_types[42]['signature'] = '00001A0007800100'; $this->_mime_types[43]['signature'] = '00001A0000100400'; $this->_mime_types[44]['signature'] = '20006800200'; $this->_mime_types[45]['signature'] = '00001A0002100400'; $this->_mime_types[46]['signature'] = '5B7665725D'; $this->_mime_types[47]['signature'] = '300000041505052'; $this->_mime_types[48]['signature'] = '1A0000030000'; $this->_mime_types[49]['signature'] = '4D47582069747064'; $this->_mime_types[50]['signature'] = '4D534346'; $this->_mime_types[51]['signature'] = '4D546864'; $this->_mime_types[52]['signature'] = '000001B3'; $this->_mime_types[53]['signature'] = '0902060000001000B9045C00'; $this->_mime_types[54]['signature'] = '0904060000001000F6055C00'; $this->_mime_types[55]['signature'] = '7FFE340A'; $this->_mime_types[56]['signature'] = '1234567890FF'; $this->_mime_types[57]['signature'] = '31BE000000AB0000'; $this->_mime_types[58]['signature'] = '1A00000300001100'; $this->_mime_types[59]['signature'] = '7E424B00'; $this->_mime_types[60]['signature'] = '504B0304'; $this->_mime_types[61]['signature'] = '89504E470D0A'; $this->_mime_types[62]['signature'] = '6D646174'; $this->_mime_types[63]['signature'] = '6D646174'; $this->_mime_types[64]['signature'] = '52617221'; $this->_mime_types[65]['signature'] = '2E7261FD'; $this->_mime_types[66]['signature'] = 'EDABEEDB'; $this->_mime_types[67]['signature'] = '2E736E64'; $this->_mime_types[68]['signature'] = '53495421'; $this->_mime_types[69]['signature'] = '53747566664974'; $this->_mime_types[70]['signature'] = '1F9D'; $this->_mime_types[71]['signature'] = '49492A'; $this->_mime_types[72]['signature'] = '4D4D2A'; $this->_mime_types[73]['signature'] = '554641'; $this->_mime_types[74]['signature'] = '57415645666D74'; $this->_mime_types[75]['signature'] = 'D7CDC69A'; $this->_mime_types[76]['signature'] = '4C000000'; $this->_mime_types[77]['signature'] = '504B3030504B0304'; $this->_mime_types[78]['signature'] = 'FF575047'; $this->_mime_types[79]['signature'] = 'FF575043'; $this->_mime_types[80]['signature'] = '3C3F786D6C'; $this->_mime_types[81]['signature'] = 'FFFE3C0052004F004F0054005300540055004200'; $this->_mime_types[82]['signature'] = '3C21454E54495459'; $this->_mime_types[83]['signature'] = '5A4F4F20'; $this->_mime_types[84]['signature'] = 'FFD8FFFE'; $this->_mime_types[85]['signature'] = 'FFD8FFE0'; $this->_mime_types[86]['signature'] = 'FFD8FFE1'; $this->_mime_types[87]['signature'] = 'FFD8FFDB'; $this->_mime_types[88]['signature'] = '474946383961'; // Extensions $this->_mime_types[0]['extension'] = '.gif'; $this->_mime_types[1]['extension'] = '.bmp'; $this->_mime_types[2]['extension'] = '.exe;.com;.386;.ax;.acm;.sys;.dll;.drv;.flt;.fon;.ocx;.scr;.lrc;.vxd;.cpl;.x32'; $this->_mime_types[3]['extension'] = '.zip'; $this->_mime_types[4]['extension'] = '.doc;.xls;.xlt;.ppt;.apr'; $this->_mime_types[5]['extension'] = '.emf'; $this->_mime_types[6]['extension'] = '.evt'; $this->_mime_types[7]['extension'] = '.gid;.hlp;.lhp'; $this->_mime_types[8]['extension'] = '.gz'; $this->_mime_types[9]['extension'] = '.hqx'; $this->_mime_types[10]['extension'] = '.ico'; $this->_mime_types[11]['extension'] = '.lnk'; $this->_mime_types[12]['extension'] = '.pdf'; $this->_mime_types[13]['extension'] = '.reg'; $this->_mime_types[14]['extension'] = '.rtf'; $this->_mime_types[15]['extension'] = '.lzh'; $this->_mime_types[16]['extension'] = '.mid'; $this->_mime_types[17]['extension'] = '.pcx'; $this->_mime_types[18]['extension'] = '.eps'; $this->_mime_types[19]['extension'] = '.ain'; $this->_mime_types[20]['extension'] = '.arc'; $this->_mime_types[21]['extension'] = '.arc'; $this->_mime_types[22]['extension'] = '.arc'; $this->_mime_types[23]['extension'] = '.arc'; $this->_mime_types[24]['extension'] = '.arc'; $this->_mime_types[25]['extension'] = '.arj'; $this->_mime_types[26]['extension'] = '.avi'; $this->_mime_types[27]['extension'] = '.bz;.bz2'; $this->_mime_types[28]['extension'] = '.cab'; $this->_mime_types[29]['extension'] = '.obj'; $this->_mime_types[30]['extension'] = '.tar;.cpio'; $this->_mime_types[31]['extension'] = '.cru;.crush'; $this->_mime_types[32]['extension'] = '.dcx'; $this->_mime_types[33]['extension'] = '.gz;.tar;.tgz'; $this->_mime_types[34]['extension'] = '.hap'; $this->_mime_types[35]['extension'] = '.htm;.html'; $this->_mime_types[36]['extension'] = '.htm;.html'; $this->_mime_types[37]['extension'] = '.htm;.html'; $this->_mime_types[38]['extension'] = '.ico'; $this->_mime_types[39]['extension'] = '.jar'; $this->_mime_types[40]['extension'] = '.lha'; $this->_mime_types[41]['extension'] = '.wk1;.wks'; $this->_mime_types[42]['extension'] = '.fm3'; $this->_mime_types[43]['extension'] = '.wk3'; $this->_mime_types[44]['extension'] = '.fmt'; $this->_mime_types[45]['extension'] = '.wk4'; $this->_mime_types[46]['extension'] = '.ami'; $this->_mime_types[47]['extension'] = '.adx'; $this->_mime_types[48]['extension'] = '.nsf;.ntf'; $this->_mime_types[49]['extension'] = '.ds4'; $this->_mime_types[50]['extension'] = '.cab'; $this->_mime_types[51]['extension'] = '.mid'; $this->_mime_types[52]['extension'] = '.mpg;.mpeg'; $this->_mime_types[53]['extension'] = '.xls'; $this->_mime_types[54]['extension'] = '.xls'; $this->_mime_types[55]['extension'] = '.doc'; $this->_mime_types[56]['extension'] = '.doc'; $this->_mime_types[57]['extension'] = '.doc'; $this->_mime_types[58]['extension'] = '.nsf'; $this->_mime_types[59]['extension'] = '.psp'; $this->_mime_types[60]['extension'] = '.zip'; $this->_mime_types[61]['extension'] = '.png'; $this->_mime_types[62]['extension'] = '.mov'; $this->_mime_types[63]['extension'] = '.qt'; $this->_mime_types[64]['extension'] = '.rar'; $this->_mime_types[65]['extension'] = '.ra;.ram'; $this->_mime_types[66]['extension'] = '.rpm'; $this->_mime_types[67]['extension'] = '.au'; $this->_mime_types[68]['extension'] = '.sit'; $this->_mime_types[69]['extension'] = '.sit'; $this->_mime_types[70]['extension'] = '.z'; $this->_mime_types[71]['extension'] = '.tif;.tiff'; $this->_mime_types[72]['extension'] = '.tif;.tiff'; $this->_mime_types[73]['extension'] = '.ufa'; $this->_mime_types[74]['extension'] = '.wav'; $this->_mime_types[75]['extension'] = '.wmf'; $this->_mime_types[76]['extension'] = '.lnk'; $this->_mime_types[77]['extension'] = '.zip'; $this->_mime_types[78]['extension'] = '.wpg'; $this->_mime_types[79]['extension'] = '.wp'; $this->_mime_types[80]['extension'] = '.xml'; $this->_mime_types[81]['extension'] = '.xml'; $this->_mime_types[82]['extension'] = '.dtd'; $this->_mime_types[83]['extension'] = '.zoo'; $this->_mime_types[84]['extension'] = '.jpeg;.jpe;.jpg'; $this->_mime_types[85]['extension'] = '.jpeg;.jpe;.jpg'; $this->_mime_types[86]['extension'] = '.jpeg;.jpe;.jpg'; $this->_mime_types[87]['extension'] = '.jpeg;.jpe;.jpg'; $this->_mime_types[88]['extension'] = '.gif'; // Descriptions $this->_mime_types[0]['description'] = 'GIF 87A'; $this->_mime_types[1]['description'] = 'Windows Bitmap'; $this->_mime_types[2]['description'] = 'Executable File '; $this->_mime_types[3]['description'] = 'Zip Compressed'; $this->_mime_types[4]['description'] = 'MS Compound Document v1 or Lotus Approach APR file'; $this->_mime_types[5]['description'] = 'xtended (Enhanced) Windows Metafile Format'; $this->_mime_types[6]['description'] = 'Windows NT/2000 Event Viewer Log File'; $this->_mime_types[7]['description'] = 'Windows Help File'; $this->_mime_types[8]['description'] = 'GZ Compressed File'; $this->_mime_types[9]['description'] = 'Macintosh BinHex 4 Compressed Archive'; $this->_mime_types[10]['description'] = 'Icon File'; $this->_mime_types[11]['description'] = 'Windows Link File'; $this->_mime_types[12]['description'] = 'Adobe PDF File'; $this->_mime_types[13]['description'] = 'Registry Data File'; $this->_mime_types[14]['description'] = 'Rich Text Format File'; $this->_mime_types[15]['description'] = 'Lzh compression file'; $this->_mime_types[16]['description'] = 'Musical Instrument Digital Interface MIDI-sequention Sound'; $this->_mime_types[17]['description'] = 'PC Paintbrush Bitmap Graphic'; $this->_mime_types[18]['description'] = 'Adobe EPS File'; $this->_mime_types[19]['description'] = 'AIN Archive File'; $this->_mime_types[20]['description'] = 'ARC/PKPAK Compressed 1'; $this->_mime_types[21]['description'] = 'ARC/PKPAK Compressed 2'; $this->_mime_types[22]['description'] = 'ARC/PKPAK Compressed 3'; $this->_mime_types[23]['description'] = 'ARC/PKPAK Compressed 4'; $this->_mime_types[24]['description'] = 'ARC/PKPAK Compressed 5'; $this->_mime_types[25]['description'] = 'ARJ Compressed'; $this->_mime_types[26]['description'] = 'Audio Video Interleave (AVI)'; $this->_mime_types[27]['description'] = 'Bzip Archive'; $this->_mime_types[28]['description'] = 'Cabinet File'; $this->_mime_types[29]['description'] = 'Compiled Object Module'; $this->_mime_types[30]['description'] = 'CPIO Archive File'; $this->_mime_types[31]['description'] = 'CRUSH Archive File'; $this->_mime_types[32]['description'] = 'DCX Graphic File'; $this->_mime_types[33]['description'] = 'Gzip Archive File'; $this->_mime_types[34]['description'] = 'HAP Archive File'; $this->_mime_types[35]['description'] = 'HyperText Markup Language 1'; $this->_mime_types[36]['description'] = 'HyperText Markup Language 2'; $this->_mime_types[37]['description'] = 'HyperText Markup Language 3'; $this->_mime_types[38]['description'] = 'ICON File'; $this->_mime_types[39]['description'] = 'JAR Archive File'; $this->_mime_types[40]['description'] = 'LHA Compressed'; $this->_mime_types[41]['description'] = 'Lotus 123 v1 Worksheet'; $this->_mime_types[42]['description'] = 'Lotus 123 v3 FMT file'; $this->_mime_types[43]['description'] = 'Lotus 123 v3 Worksheet'; $this->_mime_types[44]['description'] = 'Lotus 123 v4 FMT file'; $this->_mime_types[45]['description'] = 'Lotus 123 v5'; $this->_mime_types[46]['description'] = 'Lotus Ami Pro'; $this->_mime_types[47]['description'] = 'Lotus Approach ADX file'; $this->_mime_types[48]['description'] = 'Lotus Notes Database/Template'; $this->_mime_types[49]['description'] = 'Micrografix Designer 4'; $this->_mime_types[50]['description'] = 'Microsoft CAB File Format'; $this->_mime_types[51]['description'] = 'Midi Audio File'; $this->_mime_types[52]['description'] = 'MPEG Movie'; $this->_mime_types[53]['description'] = 'MS Excel v2'; $this->_mime_types[54]['description'] = 'MS Excel v4'; $this->_mime_types[55]['description'] = 'MS Word'; $this->_mime_types[56]['description'] = 'MS Word 6.0'; $this->_mime_types[57]['description'] = 'MS Word for DOS 6.0'; $this->_mime_types[58]['description'] = 'Notes Database'; $this->_mime_types[59]['description'] = 'PaintShop Pro Image File'; $this->_mime_types[60]['description'] = 'PKZIP Compressed'; $this->_mime_types[61]['description'] = 'PNG Image File'; $this->_mime_types[62]['description'] = 'QuickTime Movie'; $this->_mime_types[63]['description'] = 'Quicktime Movie File'; $this->_mime_types[64]['description'] = 'RAR Archive File'; $this->_mime_types[65]['description'] = 'Real Audio File'; $this->_mime_types[66]['description'] = 'RPM Archive File'; $this->_mime_types[67]['description'] = 'SoundMachine Audio File'; $this->_mime_types[68]['description'] = 'Stuffit v1 Archive File'; $this->_mime_types[69]['description'] = 'Stuffit v5 Archive File'; $this->_mime_types[70]['description'] = 'TAR Compressed Archive File'; $this->_mime_types[71]['description'] = 'TIFF (Intel)'; $this->_mime_types[72]['description'] = 'TIFF (Motorola)'; $this->_mime_types[73]['description'] = 'UFA Archive File'; $this->_mime_types[74]['description'] = 'Wave Files'; $this->_mime_types[75]['description'] = 'Windows Meta File'; $this->_mime_types[76]['description'] = 'Windows Shortcut (Link File)'; $this->_mime_types[77]['description'] = 'WINZIP Compressed'; $this->_mime_types[78]['description'] = 'WordPerfect Graphics'; $this->_mime_types[79]['description'] = 'WordPerfect v5 or v6'; $this->_mime_types[80]['description'] = 'XML Document'; $this->_mime_types[81]['description'] = 'XML Document (ROOTSTUB)'; $this->_mime_types[82]['description'] = 'XML DTD'; $this->_mime_types[83]['description'] = 'ZOO Archive File'; $this->_mime_types[84]['description'] = 'JPG Graphic File'; $this->_mime_types[85]['description'] = 'JPG Graphic File'; $this->_mime_types[86]['description'] = 'JPG Graphic File'; $this->_mime_types[87]['description'] = 'JPG Graphic File'; $this->_mime_types[88]['description'] = 'GIF 89A'; // Mime descriptions $this->_mime_types[0]['mime_type'] = 'image/gif'; $this->_mime_types[1]['mime_type'] = 'image/bmp'; $this->_mime_types[2]['mime_type'] = ''; $this->_mime_types[3]['mime_type'] = ''; $this->_mime_types[4]['mime_type'] = ''; $this->_mime_types[5]['mime_type'] = ''; $this->_mime_types[6]['mime_type'] = ''; $this->_mime_types[7]['mime_type'] = ''; $this->_mime_types[8]['mime_type'] = ''; $this->_mime_types[9]['mime_type'] = ''; $this->_mime_types[10]['mime_type'] = ''; $this->_mime_types[11]['mime_type'] = ''; $this->_mime_types[12]['mime_type'] = 'application/pdf'; $this->_mime_types[13]['mime_type'] = ''; $this->_mime_types[14]['mime_type'] = ''; $this->_mime_types[15]['mime_type'] = ''; $this->_mime_types[16]['mime_type'] = ''; $this->_mime_types[17]['mime_type'] = ''; $this->_mime_types[18]['mime_type'] = ''; $this->_mime_types[19]['mime_type'] = ''; $this->_mime_types[20]['mime_type'] = ''; $this->_mime_types[21]['mime_type'] = ''; $this->_mime_types[22]['mime_type'] = ''; $this->_mime_types[23]['mime_type'] = ''; $this->_mime_types[24]['mime_type'] = ''; $this->_mime_types[25]['mime_type'] = ''; $this->_mime_types[26]['mime_type'] = ''; $this->_mime_types[27]['mime_type'] = ''; $this->_mime_types[28]['mime_type'] = ''; $this->_mime_types[29]['mime_type'] = ''; $this->_mime_types[30]['mime_type'] = ''; $this->_mime_types[31]['mime_type'] = ''; $this->_mime_types[32]['mime_type'] = ''; $this->_mime_types[33]['mime_type'] = ''; $this->_mime_types[34]['mime_type'] = ''; $this->_mime_types[35]['mime_type'] = ''; $this->_mime_types[36]['mime_type'] = ''; $this->_mime_types[37]['mime_type'] = ''; $this->_mime_types[38]['mime_type'] = ''; $this->_mime_types[39]['mime_type'] = ''; $this->_mime_types[40]['mime_type'] = ''; $this->_mime_types[41]['mime_type'] = ''; $this->_mime_types[42]['mime_type'] = ''; $this->_mime_types[43]['mime_type'] = ''; $this->_mime_types[44]['mime_type'] = ''; $this->_mime_types[45]['mime_type'] = ''; $this->_mime_types[46]['mime_type'] = ''; $this->_mime_types[47]['mime_type'] = ''; $this->_mime_types[48]['mime_type'] = ''; $this->_mime_types[49]['mime_type'] = ''; $this->_mime_types[50]['mime_type'] = ''; $this->_mime_types[51]['mime_type'] = ''; $this->_mime_types[52]['mime_type'] = ''; $this->_mime_types[53]['mime_type'] = ''; $this->_mime_types[54]['mime_type'] = ''; $this->_mime_types[55]['mime_type'] = ''; $this->_mime_types[56]['mime_type'] = ''; $this->_mime_types[57]['mime_type'] = ''; $this->_mime_types[58]['mime_type'] = ''; $this->_mime_types[59]['mime_type'] = ''; $this->_mime_types[60]['mime_type'] = ''; $this->_mime_types[61]['mime_type'] = 'image/png'; $this->_mime_types[62]['mime_type'] = ''; $this->_mime_types[63]['mime_type'] = ''; $this->_mime_types[64]['mime_type'] = ''; $this->_mime_types[65]['mime_type'] = ''; $this->_mime_types[66]['mime_type'] = ''; $this->_mime_types[67]['mime_type'] = ''; $this->_mime_types[68]['mime_type'] = ''; $this->_mime_types[69]['mime_type'] = ''; $this->_mime_types[70]['mime_type'] = ''; $this->_mime_types[81]['mime_type'] = ''; $this->_mime_types[82]['mime_type'] = ''; $this->_mime_types[83]['mime_type'] = ''; $this->_mime_types[84]['mime_type'] = 'image/jpeg'; $this->_mime_types[85]['mime_type'] = 'image/jpeg'; $this->_mime_types[86]['mime_type'] = 'image/jpeg'; $this->_mime_types[87]['mime_type'] = 'image/jpeg'; $this->_mime_types[88]['mime_type'] = 'image/gif'; } /** * Load known image types * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return void * @since 3.0 */ private function loadImageTypes() { $this->_image_types[0]['mime_type'] = 'image/gif'; $this->_image_types[1]['mime_type'] = 'image/bmp'; $this->_image_types[2]['mime_type'] = 'image/png'; $this->_image_types[3]['mime_type'] = 'image/jpeg'; $this->_image_types[4]['mime_type'] = 'image/jpeg'; $this->_image_types[5]['mime_type'] = 'image/gif'; } /** * Convert/Resize an image * * @copyright * @author RolandD * @todo * @see * @access public * @param array $thumb_file_details contains all the variables for creating a new image * @return mixed filename of created file if file has been created / false if file has not been created * @since 3.0 */ public function convertImage($file_details) { // Set all details foreach ($file_details as $type => $value) { switch ($type) { case 'maxsize': if ($value) $this->maxSize = true; else $this->maxSize = false; break; case 'bgred': if ($file_details['bgred'] >= 0 || $file_details['bgred'] <= 255) $this->bg_red = $file_details['bgred']; else $this->bg_red = 0; break; case 'bggreen': if($file_details['bggreen'] >= 0 || $file_details['bggreen'] <= 255) $this->bg_green = $file_details['bggreen']; else $this->bg_green = 0; break; case 'bgblue': if($file_details['bgblue'] >= 0 || $file_details['bgblue'] <= 255) $this->bg_blue = $file_details['bgblue']; else $this->bg_blue = 0; break; default: $this->$type = $value; break; } } if ($this->newImgCreate()) { return $this->file_out; } else return false; } /** * Start creating the new image * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return boolean true on success | false on failure * @since 3.0 */ private function newImgCreate() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Clear the cache clearstatcache(); switch(strtolower($this->mime_type)) { case 'image/gif': if( function_exists('imagecreatefromgif') ) { $orig_img = @imagecreatefromgif($this->file); break; } else return false; case 'image/jpg': case 'image/jpeg': if (function_exists('imagecreatefromjpeg')) { $orig_img = @imagecreatefromjpeg($this->file); break; } else { return false; } break; case 'image/png': if( function_exists('imagecreatefrompng') ) { $orig_img = @imagecreatefrompng($this->file); break; } else return false; break; default: return false; break; } if ($orig_img) { $csvilog->addDebug(JText::_('COM_CSVI_SAVING_NEW_IMAGE')); // Save the new image $img_resize = $this->NewImgSave($this->NewImgResize($orig_img)); // Clean up old image ImageDestroy($orig_img); } else { $csvilog->addDebug(JText::_('COM_CSVI_CANNOT_READ_ORIGINAL_IMAGE')); $img_resize = false; } if ($img_resize) return true; else return false; } /** * Resize the image * * Includes function ImageCreateTrueColor and ImageCopyResampled which are available only under GD 2.0.1 or higher ! * * @copyright * @author RolandD * @todo Fix docbloc * @see * @access private * @param $orig_img * @return * @since 3.0 */ private function NewImgResize($orig_img) { $orig_size = getimagesize($this->file); $maxX = $this->file_out_width; $maxY = $this->file_out_height; if ($orig_size[0] < $orig_size[1]) { $this->file_out_width = $this->file_out_height* ($orig_size[0]/$orig_size[1]); $adjustX = ($maxX - $this->file_out_width)/2; $adjustY = 0; } else { $this->file_out_height = $this->file_out_width / ($orig_size[0]/$orig_size[1]); $adjustX = 0; $adjustY = ($maxY - $this->file_out_height)/2; } while ($this->file_out_width < 1 || $this->file_out_height < 1) { $this->file_out_width*= 2; $this->file_out_height*= 2; } // See if we need to create an image at maximum size if ($this->maxSize) { if (function_exists("imagecreatetruecolor")) $im_out = imagecreatetruecolor($maxX,$maxY); else $im_out = imagecreate($maxX,$maxY); if ($im_out) { // Need to image fill just in case image is transparent, don't always want black background $bgfill = imagecolorallocate( $im_out, $this->bg_red, $this->bg_green, $this->bg_blue ); if (function_exists("imageAntiAlias")) imageAntiAlias($im_out,true); imagealphablending($im_out, false); if (function_exists("imagesavealpha")) imagesavealpha($im_out,true); if (function_exists( "imagecolorallocatealpha")) $transparent = imagecolorallocatealpha($im_out, 255, 255, 255, 127); if (function_exists("imagecopyresampled")) ImageCopyResampled($im_out, $orig_img, $adjustX, $adjustY, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]); else ImageCopyResized($im_out, $orig_img, $adjustX, $adjustY, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]); } else return false; } else { if (function_exists("imagecreatetruecolor")) $im_out = ImageCreateTrueColor($this->file_out_width,$this->file_out_height); else $im_out = imagecreate($this->file_out_width,$this->file_out_height); if ($im_out) { if (function_exists("imageAntiAlias")) imageAntiAlias($im_out,true); imagealphablending($im_out, false); if (function_exists("imagesavealpha")) imagesavealpha($im_out,true); if (function_exists("imagecolorallocatealpha")) $transparent = imagecolorallocatealpha($im_out, 255, 255, 255, 127); if (function_exists("imagecopyresampled")) ImageCopyResampled($im_out, $orig_img, 0, 0, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]); else ImageCopyResized($im_out, $orig_img, 0, 0, 0, 0, $this->file_out_width, $this->file_out_height,$orig_size[0], $orig_size[1]); } else return false; } return $im_out; } /** * Save the new image * * @copyright * @author RolandD * @todo Add check if destination folder exists * @todo Fix docbloc * @see * @access private * @param $new_img * @return * @since 3.0 */ private function NewImgSave($new_img) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Lets see if we need to rename the output file since we know the sizes switch(strtolower($this->file_out_extension)) { case "gif": if (strtolower(substr($this->file_out,strlen($this->file_out)-4,4)) != ".gif") $this->file_out .= ".gif"; return @imagegif($new_img, $this->file_out); break; case "jpg": if (strtolower(substr($this->file_out,strlen($this->file_out)-4,4)) != ".jpg") $this->file_out .= ".jpg"; return @imagejpeg($new_img, $this->file_out, 100); break; case "jpeg": if (strtolower(substr($this->file_out,strlen($this->file_out)-5,5)) != ".jpeg") $this->file_out .= ".jpeg"; return @imagejpeg($new_img, $this->file_out, 100); break; case "png": if (strtolower(substr($this->file_out,strlen($this->file_out)-4,4)) != ".png") $this->file_out .= ".png"; return @imagepng($new_img,$this->file_out); break; default: $csvilog->addDebug(JText::_('COM_CSVI_NO_FILE_EXTENSION')); return false; break; } } /** * Process an image * * @copyright * @author RolandD * @todo * @see * @access public * @param string $name full path and name of the image * @param string $path the destination location of the image * @param string $output_name name of the output image * @return * @since 3.0 */ public function processImage($name, $output_path, $output_name=null) { // Set up variables $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); // Cleanup $base = JPath::clean(JPATH_SITE, '/'); if (!empty($output_path)) $output_path = JPath::clean($output_path, '/'); $this->_imagedata = array(); $this->_imagedata['base'] = $base; if ($this->isRemote($name)) { $this->_imagedata['name'] = $name; $this->_imagedata['isremote'] = true; } else { $this->_imagedata['name'] = $base.'/'.JPath::clean($name, '/'); $this->_imagedata['isremote'] = false; } $this->_imagedata['output_path'] = $output_path; $this->_imagedata['output_name'] = (empty($output_name)) ? basename($name) : $output_name; $this->_imagedata['extension'] = JFile::getExt($name); $this->_imagedata['exists'] = false; $this->_imagedata['isimage'] = false; $this->_imagedata['mime_type'] = null; // Load externals jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); // See if we need to handle a remote file if ($this->_imagedata['isremote']) { $csvilog->addDebug('Process remote file: '.$this->_imagedata['name']); if (CsviHelper::fileExistsRemote($this->_imagedata['name'])) { $this->_imagedata['exists'] = true; // Check if this is an image or not if ($this->isImage($this->_imagedata['name'], true)) { $this->_imagedata['isimage'] = true; } } else { $csvilog->addDebug('Remote file does not exist: '.$this->_imagedata['name']); $this->_imagedata['exists'] = false; } } else if (JFile::exists($this->_imagedata['name'])) { $csvilog->addDebug('Process file: '.$this->_imagedata['name']); $this->_imagedata['exists'] = true; // Check if this is an image or not if ($this->isImage($this->_imagedata['name'])) { $this->_imagedata['isimage'] = true; } } else { // File does not exist $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_FILE_NOT_FOUND', $this->_imagedata['name'])); return $this->_imagedata; } // Process if it is an image if ($this->_imagedata['isimage']) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PROCESS_IMAGE')); // Clean up the images first $this->_cleanupImage(); // Convert the full image if ($this->_imagedata['convert']) $this->_convertImage(); // Save the remote images on the server if ($this->_imagedata['isremote'] && $template->get('save_images_on_server', 'image')) { // Sanitize filename $this->_imagedata['output_name'] = $this->_cleanFilename($this->_imagedata['output_name']); $from = $this->_imagedata['name']; $to = $this->_imagedata['base'].'/'.$this->_imagedata['output_path'].$this->_imagedata['output_name']; $csvilog->addDebug('Store remote file on server '.$from.' --> '.$to); if (JFile::exists($to)) JFile::delete($to); JFile::move($from, $to); } // Remove temporary file else if ($this->_imagedata['isremote']) { JFile::delete($this->_imagedata['name']); } // Check if any images need to be renamed $this->_renameImage(); // Check if the full image needs to be resized $this->_resizeFullimage(); // Convert images $this->_imageTypeCheck(); } else { if ($this->_imagedata['exists']) { $csvilog->addDebug('COM_CSVI_DEBUG_FILE_IS_NOT_IMAGE'.' '.$name); // Non image details $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PROCESS_NON_IMAGE')); $this->collectFileDetails(); } } return $this->_imagedata; } /** * Check if a file is a remote file or not * * Remote images can be located on an HTTP location or an FTP location * * @copyright * @author RolandD * @todo * @see processImage() * @access private * @param $path string the full path to check * @return bool true if file is remote | false if file is not remote * @since 3.0 */ public function isRemote($path) { if (substr(strtolower($path), 0, 4) == 'http') return true; else if (substr(strtolower($path), 0, 3) == 'ftp') return true; else return false; } /** * Collect file details for non-image files * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 2.3.10 */ public function collectFileDetails() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_imagedata['mime_type'] = $this->findMimeType($this->_imagedata['name']); $this->_imagedata['isimage'] = 0; } /** * Create a thumbnail image * * @copyright * @author RolandD * @todo * @see * @access public * @param string $original the full path and name of the large image * @param string $output_path the path to store the thumbnail * @param string $output_name the name of the thumbnail * @return * @since 4.0 */ public function createThumbnail($original, $output_path, $output_name) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $base = JPath::clean(JPATH_SITE, '/'); // Make sure the thumbnail is the same file type as the full image if ($template->get('thumb_check_filetype', 'image') && JFile::getExt($original) != JFile::getExt($output_name)) { $output_name = JFile::stripExt($output_name).'.'.JFile::getExt($original); } $output_name = $this->_setCase($output_name); // Check if the original is an external image if (!$this->isRemote($original)) { $original = $base.'/'.$original; $file_exists = JFile::exists($original); $remote = false; } else { $file_exists = CsviHelper::fileExistsRemote($original); $remote = true; } // Check if thumbsize is greater than 0 if ($template->get('thumb_width', 'image') >= 1 && $template->get('thumb_height', 'image') >= 1) { // Check if the image folders exists $thumb_folder = JPATH_SITE.'/'.$output_path.dirname($output_name); if (!JFolder::exists($thumb_folder)) { $csvilog->addDebug(JText::sprintf('COM_CSVI_CREATE_THUMB_FOLDER', $thumb_folder)); JFolder::create($thumb_folder); } // Check if the target thumb exists, if yes delete it if (JFile::exists($base.'/'.$output_path.$output_name)) JFile::delete($base.'/'.$output_path.$output_name); // Check if the original file exists $csvilog->addDebug(JText::sprintf('COM_CSVI_CHECK_ORIGINAL', $original)); if ($file_exists) { // Collect all thumbnail details $thumb_file_details = array(); $thumb_file_details['file'] = $original; $thumb_file_details['file_extension'] = JFile::getExt($original); $thumb_file_details['file_out'] = $base.'/'.$output_path.$output_name; $thumb_file_details['maxsize'] = 0; $thumb_file_details['bgred'] = 255; $thumb_file_details['bggreen'] = 255; $thumb_file_details['bgblue'] = 255; $thumb_file_details['file_out_width'] = $template->get('thumb_width', 'image'); $thumb_file_details['file_out_height'] = $template->get('thumb_height', 'image'); $thumb_file_details['file_out_extension'] = JFile::getExt($output_name); $thumb_file_details['mime_type'] = $this->findMimeType($original, $remote); // We need to resize the image and Save the new one (all done in the constructor) $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_CREATING_A_THUMBNAIL', $original, $thumb_file_details['file_out'])); $new_img = $this->convertImage($thumb_file_details); // Check if an image was created if ($new_img) { // Get the details of the thumb image if (JFile::exists($new_img)) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_THUMB_CREATED')); return $output_path.$output_name; } else { $csvilog->addDebug(JText::_('COM_CSVI_THUMBNAIL_NOT_CREATED')); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_THUMBNAIL_NOT_CREATED')); return false; } } else { $csvilog->addDebug(JText::sprintf('COM_CSVI_FILE_DOES_NOT_EXIST_NOTHING_TO_DO', $original)); $csvilog->AddStats('nofiles', JText::sprintf('COM_CSVI_FILE_DOES_NOT_EXIST_NOTHING_TO_DO', $original)); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_THUMBNAIL_SIZE_TOO_SMALL')); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_THUMBNAIL_SIZE_TOO_SMALL')); return false; } } /** * Clean up the full image * * Clean up the image from any incorrect paths * * Minimum requirement is PHP 5.2.0 * * [full_image] => Array * ( * [isremote] => 1 * [exists] => 1 * [isimage] => 1 * [name] => R05-01 -- R05-01 (700).jpg * [filename] => R05-01 -- R05-01 (700) * [extension] => jpg * [folder] => http://csvi3 * [output_name] => R05-01 -- R05-01 (700).jpg * [output_filename] => R05-01 -- R05-01 (700) * [output_extension] => jpg * [output_folder] => http://csvi3 * [mime_type] => image/jpeg * ) * * @copyright * @author RolandD * @todo handle image paths included in the image name * @todo not delete the old image, it might be referenced by another product * @see http://www.php.net/pathinfo * @access private * @param * @return * @since 3.0 */ private function _cleanupImage() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); if ($this->_imagedata['isremote'] && $template->get('save_images_on_server', 'image')) { // Collect remote file information $local_image = CSVIPATH_TMP.'/'.$this->_cleanFilename(basename($this->_imagedata['name'])); // Store the remote image if ($this->_storeRemoteImage($this->_imagedata['name'], $local_image)) { $csvilog->addDebug('Remote file stored: '.$this->_imagedata['name'].' --> '.$local_image); // Update full image information $this->_imagedata['name'] = $local_image; // Get the mime type $mime_type = $this->findMimeType($local_image); } else { $csvilog->AddStats('nofiles', JText::sprintf('COM_CSVI_REMOTE_FILE_NOT_FOUND', $this->_imagedata['name'])); $csvilog->addDebug(JText::sprintf('COM_CSVI_REMOTE_FILE_NOT_FOUND', $this->_imagedata['name'])); } } else if ($this->_imagedata['isremote']) { $mime_type = $this->findMimeType($this->_imagedata['name'], true); $this->_imagedata['output_path'] = dirname($this->_imagedata['name']).'/'; } else if (!$this->_imagedata['isremote']) { $mime_type = $this->findMimeType($this->_imagedata['name']); } // Set the mime type $csvilog->addDebug('Mime type found: '.$mime_type); $this->_imagedata['mime_type'] = $mime_type; // Validate extension against mime type $type = ''; $ext = ''; list($type, $ext) = explode('/', $mime_type); if ($ext == 'jpeg') $ext = 'jpg'; // Get the extension of the target image name $output_ext = JFile::getExt($this->_imagedata['output_name']); if ($ext != strtolower($output_ext)) { // Fix up the new names $basename = basename($this->_imagedata['name'], $this->_imagedata['extension']); $to = dirname($this->_imagedata['name']).'/'.$basename.$ext; // Set the new output name //$this->_imagedata['output_name'] = JFile::stripExt($this->_imagedata['name']).$ext; $csvilog->addDebug('Renaming full image because bad extension: '.$this->_imagedata['name'].' --> '.$to); // Rename the file if (JFile::exists($this->_imagedata['name'])) { if (!JFile::move($this->_imagedata['name'], $to)) return false; else { $this->_imagedata['name'] = $to; } } } // Check for a valid extenion if (empty($this->_imagedata['extension']) && $type == 'image') { $this->_imagedata['extension'] = $ext; } // Set a new extension if the image needs to be converted $convert_type = $template->get('convert_type', 'image'); if ($convert_type != 'none' && $convert_type != $this->_imagedata['extension']) { $this->_imagedata['output_name'] = JFile::stripExt(basename($this->_imagedata['name'])).'.'.$convert_type; $this->_imagedata['convert'] = true; } else $this->_imagedata['convert'] = false; // Set the file case $this->_imagedata['output_name'] = $this->_setCase($this->_imagedata['output_name']); // Add some debug info $csvilog->addDebug('Full name original: '.$this->_imagedata['name']); $csvilog->addDebug('Full name target: '.$this->_imagedata['output_path'].$this->_imagedata['output_name']); } /** * Store a remote image on the local server * * @copyright * @author RolandD * @todo * @see * @access private * @param $remote_image string the url of the remote image * @param $local_image string the full path and file name of the image to store * @return bool true if remote file was locally written | false if remote file was not locally written * @since */ private function _storeRemoteImage($remote_image, $local_image) { return JFile::write($local_image, JFile::read($remote_image)); } /** * Convert the full image to another type * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _convertImage() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Let's see if the extensions are the same if ($this->_imagedata['convert'] && !$this->_imagedata['isremote']) { // Collect the image details $file_details = array(); $file_details['file'] = $this->_imagedata['name']; $file_details['file_extension'] = JFile::getExt($this->_imagedata['name']); $file_details['file_out'] = $this->_imagedata['base'].$this->_imagedata['output_path'].'/'.$this->_imagedata['output_name']; $file_details['maxsize'] = 0; $file_details['bgred'] = 255; $file_details['bggreen'] = 255; $file_details['bgblue'] = 255; $new_sizes = getimagesize($this->_imagedata['name']); $file_details['file_out_width'] = $new_sizes[0]; $file_details['file_out_height'] = $new_sizes[1]; $file_details['file_out_extension'] = JFile::getExt($this->_imagedata['output_name']); $file_details['mime_type'] = $this->_imagedata['mime_type']; // We need to resize the image and Save the new one (all done in the constructor) $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_CONVERT_IMAGE', $file_details['file'], $file_details['file_out'])); $new_img = $this->convertImage($file_details); if ($new_img) { $csvilog->addDebug(JText::sprintf('COM_CSVI_IMAGE_CONVERTED', $file_details['file'])); // See if we need to keep the old image if (!$template->get('keep_original', 'image') && JFile::exists($file_details['file'])) JFile::delete($file_details['file']); // We have a new name, so refresh the info $this->_imagedata['name'] = dirname($this->_imagedata['name']).'/'.$this->_imagedata['output_name']; $this->_imagedata['mime_type'] = $this->findMimeType($this->_imagedata['base'].$this->_imagedata['output_path'].'/'.$this->_imagedata['output_name']); return true; } else { $csvilog->addDebug(JText::_('COM_CSVI_IMAGE_NOT_CONVERTED')); return false; } } } /** * Rename image * * Rename an image, any existing file will be deleted * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _renameImage() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); if (!$this->_imagedata['isremote'] && $template->get('auto_generate_image_name', 'image') && (basename($this->_imagedata['name']) != $this->_imagedata['output_name']) && $template->get('convert_type', 'image') == 'none') { $from = $this->_imagedata['name']; if (JFile::exists($from)) { $to = $this->_imagedata['base'].'/'.$this->_imagedata['output_path'].$this->_imagedata['output_name']; $csvilog->addDebug(JText::sprintf('COM_CSVI_RENAME_FULL_FILE', $from, $to)); // Delete existing target image if (JFile::exists($to)) JFile::delete($to); // Check if the user wants to keep the original if ($template->get('keep_original', 'image')) { // Rename the image JFile::copy($from, $to); } else { // Rename the image JFile::move($from, $to); } } else { $csvilog->addDebug(JText::sprintf('COM_CSVI_RENAME_FULL_FILE_NOT_FOUND', $from)); } } } /** * Check if we need to convert the final image based on mime type * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 2.3.7 */ private function _imageTypeCheck() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Get the output mime-type $output_ext = JFile::getExt($this->_imagedata['output_name']); // Check if the mime-type is different and if so, convert image if (!$this->_imagedata['isremote'] && JFile::exists($this->_imagedata['name']) && !stristr($this->_imagedata['mime_type'], $output_ext)) { $file_details = array(); $file_details['file'] = $this->_imagedata['name']; $file_details['file_extension'] = JFile::getExt($this->_imagedata['name']); $file_details['maxsize'] = 0; $file_details['bgred'] = 255; $file_details['bggreen'] = 255; $file_details['bgblue'] = 255; $file_details['file_out'] = $this->_imagedata['base'].'/'.$this->_imagedata['output_path'].$this->_imagedata['output_name']; $new_sizes = getimagesize($this->_imagedata['name']); $file_details['file_out_width'] = $new_sizes[0]; $file_details['file_out_height'] = $new_sizes[1]; $file_details['file_out_extension'] = $output_ext; $file_details['mime_type'] = $this->_imagedata['mime_type']; /* We need to resize the image and Save the new one (all done in the constructor) */ $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_CONVERT_TYPE_CHECK', $file_details['file'], $file_details['file_out'])); $new_img = $this->convertImage($file_details); if ($new_img) $csvilog->addDebug(JText::sprintf('COM_CSVI_IMAGE_CONVERTED', $file_details['file'])); else $csvilog->addDebug(JText::sprintf('COM_CSVI_IMAGE_NOT_CONVERTED', $file_details['file'])); } // We have a remote image, update the mime type since we can't convert images on remote servers else if ($this->_imagedata['isremote']) { $mime_type = $this->findMimeType($this->_imagedata['output_path'].$this->_imagedata['output_name'], true); if ($mime_type) $this->_imagedata['mime_type'] = $mime_type; else $csvilog->addDebug(JText::_('COM_CSVI_CANNOT_FIND_REMOTE_MIMETYPE')); } } /** * Clean filename * * Cleans up a filename and replaces non-supported characters with an underscore * * @copyright * @author RolandD * @todo * @see * @access private * @param $value string the value to clean * @return string the cleaned up value * @since 3.0 */ private function _cleanFilename($value) { return (string) preg_replace('/[^A-Z0-9_\.-\s]/i', '_', $value); } /** * Change the case of any given string * * @copyright * @author RolandD * @todo * @see * @access private * @param string $name the string to be case changed * @return string the case changed string * @since 3.0 */ private function _setCase($name) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Set the case if needed switch ($template->get('change_case', 'image')) { case 'lcase': return strtolower($name); break; case 'ucase': return strtoupper($name); break; case 'ucfirst': return ucfirst($name); break; case 'ucwords': return ucwords($name); break; default: return $name; break; } } /** * Resize a large image * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _resizeFullImage() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); // Check if we need to resize the full image if ($template->get('full_resize', 'image')) { // Get the current size $checkfile = $this->_imagedata['base'].'/'.$this->_imagedata['output_path'].$this->_imagedata['output_name']; if (JFile::exists($checkfile)) { $cur_size = getimagesize($checkfile); if ($cur_size[0] > $template->get('full_width', 'image') || $cur_size[1] > $template->get('full_height', 'image')) { // Resize the image $file_details = array(); $file_details['file'] = $checkfile; $file_details['file_extension'] = JFile::getExt($checkfile); $file_details['rename'] = 0; $file_details['file_out'] = $checkfile; $file_details['maxsize'] = 0; $file_details['bgred'] = 255; $file_details['bggreen'] = 255; $file_details['bgblue'] = 255; $file_details['file_out_width'] = $template->get('full_width', 'image'); $file_details['file_out_height'] = $template->get('full_height', 'image'); $file_details['file_out_extension'] = JFile::getExt($checkfile); $file_details['mime_type'] = $this->_imagedata['mime_type']; // We need to resize the image and Save the new one (all done in the constructor) $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_RESIZE_IMAGE', $file_details['file'], $cur_size[1].'x'.$cur_size[0], $template->get('full_height', 'image').'x'.$template->get('full_width', 'image'))); $new_img = $this->convertImage($file_details); if ($new_img) $csvilog->addDebug(JText::_('COM_CSVI_FULL_IMAGE_RESIZED')); } } } } } ?> PK>\ }--helpers/log.phpnuW+Ainput; $settings = $jinput->get('settings', null, null); $this->_log_line_start = $settings->get('debuglog.log_line_start', 1); $this->_log_line_end = $settings->get('debuglog.log_line_end', 5); } /** * Clean up old log entries * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function cleanUpLogs() { // Load the settings $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); $max = $settings->get('log.log_max', 25); $cid = array(); // Check if there are any logs to remove $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('run_id'); $query->from('#__csvi_logs'); $query->order('id'); $db->setQuery($query); $dblogs = $db->loadResultArray(); $this->addDebug(JText::sprintf('COM_CSVI_CLEAN_OLD_LOGS', count($dblogs), $max), false, 'DEBUG', true); if (count($dblogs) > $max) { $jinput->set('cid', array_slice($dblogs, 0, (count($dblogs)-$max))); // Load the log model require_once(JPATH_COMPONENT_ADMINISTRATOR.'/models/log.php'); $log_model = new CsviModelLog(); $log_model->getDelete(); } } /** * Invoke the Joomla logger * * @copyright * @author RolandD * @todo * @see * @access public * @param string $comment The comment to log * @param int $linenr The linenumber concerned * @param string $action The type of action * @return void * @since 3.0 */ public function simpleLog($comment, $linenr, $action) { // Include the library dependancies jimport('joomla.log.log'); // Set the logfile $this->getLogName(); // Create the instance of the log file in case we use it later $options = array('text_entry_format' => "{DATE}\t{TIME}\t{LINE_NR}\t{ACTION}\t{COMMENT}", 'text_file' => $this->logfile, 'text_file_path' => $this->logpath); JLog::addLogger($options); $entry = new JLogEntry($comment); $entry->comment = $comment; $entry->line_nr = $linenr; $entry->action = $action; JLog::add($entry); } /** * Return the name of the logfile * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string The name of the logfile * @since 3.0 */ public function getLogName() { $this->logfile = 'com_csvi.log.'.$this->getId().'.php'; $this->logpath = CSVIPATH_DEBUG; return $this->logpath.'/'.$this->logfile; } /** * Set the current line number * * @copyright * @author RolandD * @todo * @see * @access public * @param int $linenumber The current linenumber * @return bool true * @since 3.0 */ public function setLinenumber($linenumber) { $this->_linenumber = $linenumber; return true; } /** * Set the import/export ID * * @copyright * @author RolandD * @todo * @see * @access public * @param int $id The ID to set * @return int the ID * @since 3.0 */ public function setId($id=false) { if ($id) $this->_id = $id; else $this->_id = time(); return $this->_id; } /** * Get the import/export ID * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int the ID * @since 3.0 */ public function getId() { return $this->_id; } /** * Set the filename used for import/export * * @copyright * @author RolandD * @todo * @see * @access public * @param string $filename the full path and filename of the import/export file * @return void * @since */ public function setFilename($filename) { $this->_filename = $filename; } /** * Get the import filename * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string the full path and filename of the logfile * @since */ public function getFilename() { return $this->_filename; } /** * Set the log ID * * @copyright * @author RolandD * @todo * @see * @access public * @param int $id The log ID to set * @return void * @since 3.0 */ public function setLogid($id) { $this->_logid = $id; } /** * Get the log ID * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int The current log ID * @since 3.0 */ public function getLogid() { return $this->_logid; } /** * Enable the debugger * * @copyright * @author RolandD * @todo * @see * @access public * @param bool $val Set the logging on or off * @return void * @since 3.0 */ public function setDebug($val) { $this->_debug = $val; } /** * Adds a message to the log file * * @copyright * @author RolandD * @todo * @see * @access public * @param string $message message to add to the debug log * @param string $sql if true adds the sql statement * @param string $action the kind of action to qualify the message for * @param boolean $override sets if the line check should be overridden * @return * @since 3.0 */ public function addDebug($message, $sql=false, $action='DEBUG', $override=false) { // Check if we should add the log line if ($this->_debug) { if ($override || $this->_linenumber == 0 || ($this->_linenumber >= $this->_log_line_start && $this->_linenumber <= $this->_log_line_end)) { $this->simpleLog(JText::_($message), $this->_linenumber, '['.$action.']'); if ($sql) { $db = JFactory::getDbo(); $qmsg = ''; if ($db->getErrorNum() > 0) { $qmsg .= $db->getErrorMsg(); $qaction = 'SQL ERROR'; } else { $qmsg .= $db->getQuery(); $qaction = 'QUERY'; } $qmsg = str_replace(array("\r\n", "\n", "\r", "\t"), ' ', $qmsg); $this->simpleLog($qmsg, $this->_linenumber, '['.$qaction.']'); } } } } /** * Adds a message to the statistics stack * *

* Types: * --> Products * updated * deleted * added * skipped * incorrect * --> DB tables * empty * --> Fields * nosupport * --> No files found multiple images * nofiles * --> General information * information *

* * @param string $type type of message * @param string $message message to add to the stack */ function AddStats($type, $message) { // Load the settings $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); $message = JText::_($message); switch ($type) { case 'updated': case 'deleted': case 'added': case 'empty': if ($settings->get('log.log_type', 'all') == 'all') $this->_addMessage($type, $message); break; case 'incorrect': case 'nosupport': if ($settings->get('log.log_type', 'all') == 'all' || $settings->get('log.log_type') == 'failure' || $settings->get('log.log_type') == 'failure_notice') $this->_addMessage($type, $message); break; case 'information': case 'nofiles': case 'skipped': if ($settings->get('log.log_type', 'all') == 'all' || $settings->get('log.log_type') == 'notice' || $settings->get('log.log_type') == 'failure_notice') $this->_addMessage($type, $message); break; case 'nosupport': $this->stats['nosupport'] = true; break; } } /** * Add a message to the statistics stack * * @copyright * @author RolandD * @todo * @see * @access private * @param string $type The type to add * @param string $message The message to add * @return void * @since 3.0 */ private function _addMessage($type, $message) { // Set the result $success = array('updated', 'deleted', 'added', 'empty'); $failure = array('incorrect', 'nosupport'); $notice = array('information', 'nofiles','skipped'); if (in_array($type, $success)) $result = JText::_('COM_CSVI_SUCCESS'); else if (in_array($type, $failure)) $result = JText::_('COM_CSVI_FAILURE'); else if (in_array($type, $notice)) $result = JText::_('COM_CSVI_NOTICE'); else $result = ''; if (!isset($this->stats[$this->_linenumber]['status'][$type])) { $this->stats[$this->_linenumber]['status'][$type]['message'] = $message."
\n"; } else { $this->stats[$this->_linenumber]['status'][$type]['message'] .= $message."
\n"; } $this->stats[$this->_linenumber]['status'][$type]['result'] = $result; } /** * Retrieves the log message * @return string returns the log message */ function GetLogMessage() { return $this->logmessage; } /** * Retrieves the debug message * @return string returns the debug message */ function GetDebugMessage() { return $this->debug_message; } /** * Retrieves the line number * @return string returns the debug message */ function GetLineNumber() { return $this->_linenumber; } /** * Retrieves the statistics array * @return array returns the statistics array */ public function getStats() { return $this->stats; } /** * Retrieves the statistics array * @return array returns the statistics array */ public function cleanStats() { $runstats['action'] = $this->stats['action']; $runstats['action_type'] = $this->stats['action_type']; $runstats['action_template'] = $this->stats['action_template']; $this->stats = array(); $this->stats = $runstats; } /** * Set the type of action the log is for */ public function SetAction($action) { $this->stats['action'] = strtolower($action); } /** * Set the type of action the log is for */ public function SetActionType($action, $template_name='') { $this->stats['action_type'] = strtolower($action); $this->stats['action_template'] = $template_name; } } ?> PK>\77helpers/icecat.phpnuW+Ainput; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); // Find the ICEcat ID $q = "SELECT product_id FROM ".$db->quoteName('#__csvi_icecat_index')." AS i LEFT JOIN ".$db->quoteName('#__csvi_icecat_suppliers')." AS s ON s.supplier_id = i.supplier_id WHERE i.".$db->quoteName('prod_id')." = ".$db->Quote($mpn)." AND s.".$db->quoteName('supplier_name')." = ".$db->Quote($mf_name); $db->setQuery($q); $csvilog->addDebug(JText::_('COM_CSVI_FIND_ICECAT_ID'), true); $icecat_id = $db->loadResult(); // See if we have a match, otherwise try to search more liberal if (!$icecat_id) { $q = "SELECT product_id FROM ".$db->quoteName('#__csvi_icecat_index')." AS i LEFT JOIN ".$db->quoteName('#__csvi_icecat_suppliers')." AS s ON s.supplier_id = i.supplier_id WHERE i.".$db->quoteName('prod_id')." LIKE ".$db->Quote($mpn.'%')." AND s.".$db->quoteName('supplier_name')." = ".$db->Quote($mf_name); $db->setQuery($q); $csvilog->addDebug(JText::_('COM_CSVI_FIND_ICECAT_ID'), true); $icecat_id = $db->loadResult(); } // See if we have an ICEcat ID if ($icecat_id) { // Setup the XML parser if ($this->_setupXmlParser()) { // Call ICEcat to get the data $this->_callIcecat($icecat_id); // See if we have any valid data if ($this->_data) { // Clean some data $this->_csvi_data = array(); // Parse the XML data if (!xml_parse($this->_xml_parser, $this->_data, true)) { die(sprintf("XML error: %s at line %d\n", xml_error_string(xml_get_error_code($this->_xml_parser)), xml_get_current_line_number($this->_xml_parser))); } xml_parser_free($this->_xml_parser); return $this->_csvi_data; } } else return false; } else return false; } /** * Process start elements * * @copyright * @author RolandD * @todo optimize building for specific imports * @see * @access private * @param * @return * @since 3.0 */ private function _startElement($parser, $tagname, $attribs) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $tagname = strtolower($tagname); if (count($this->_open_tags) >= 1) { $parent_tag = $this->_open_tags[(count($this->_open_tags) - 1)]; } else $parent_tag = ''; switch ($tagname) { case 'product': switch ($parent_tag) { case 'productrelated': // Related products if (!array_key_exists('related_products', $this->_csvi_data)) $this->_csvi_data['related_products'] = ''; $this->_csvi_data['related_products'] .= $attribs['PROD_ID'].'|'; break; default: // See if we have an error if (array_key_exists('CODE', $attribs) && $attribs['CODE'] == '-1') { $csvilog->addDebug(JText::sprintf('COM_CSVI_ICECAT_ERROR_XML', $attribs['ERRORMESSAGE'])); } else { // Process the attributes // SKU $this->_csvi_data['product_sku'] = $attribs['PROD_ID']; // Name $this->_csvi_data['product_name'] = $attribs['NAME']; // Images $this->_csvi_data['file_url'] = $attribs['HIGHPIC']; $this->_csvi_data['file_url_thumb'] = $attribs['THUMBPIC']; // Release date comes int he form YYYY-MM-DD if (strpos($attribs['RELEASEDATE'], '-')) { list($year, $month, $day) = explode('-', $attribs['RELEASEDATE']); $this->_csvi_data['product_available_date'] = $day.'/'.$month.'/'.$year; } } break; } break; case 'productfeature': switch ($parent_tag) { default: $this->_csvi_data['pf'] = $attribs['PRESENTATION_VALUE']; break; } break; case 'name': switch ($parent_tag) { case 'category': // Category $this->_csvi_data['category_path'] = $attribs['VALUE']; break; case 'feature': $find = array(' ', '/'); $feature = strtolower(str_replace($find, '_', $attribs['VALUE'])); $csvilog->addDebug(JText::sprintf('COM_CSVI_ICECAT_FOUND_FEATURE', $feature)); $this->_csvi_data[$feature] = $this->_csvi_data['pf']; $this->_csvi_data['pf'] = null; break; } break; case 'productpicture': if (!empty($attribs)) { // Process the attribs // $this->_csvi_data['product_files_file_name'][] = $attribs['THUMBPIC']; $this->_csvi_data['product_files_file_url'][] = $attribs['PIC']; $this->_csvi_data['product_files_file_title'][] = basename($attribs['THUMBPIC']); $this->_csvi_data['product_files_file_published'] = 'Y'; } break; case 'productdescription': if (isset($attribs['LONGDESC'])) $this->_csvi_data['product_desc'] = str_ireplace('\n', '
', $attribs['LONGDESC']); else $this->_csvi_data['product_desc'] = ''; if (isset($attribs['SHORTDESC'])) $this->_csvi_data['product_s_desc'] = $attribs['SHORTDESC']; else $this->_csvi_data['product_s_desc'] = ''; break; case 'shortsummarydescription': // $this->_csvi_data['product_s_desc'] = ''; break; case 'longsummarydescription': // $this->_csvi_data['product_desc'] = ''; break; case 'supplier': $this->_csvi_data['manufacturer_name'] = $attribs['NAME']; break; case 'productdescription': // if (!empty($attribs['MANUALPDFURL'])) { $this->_csvi_data['product_files_file_name'][] = $attribs['MANUALPDFURL']; $this->_csvi_data['product_files_file_url'][] = $attribs['MANUALPDFURL']; $this->_csvi_data['product_files_file_title'][] = basename($attribs['MANUALPDFURL']); } if (!empty($attribs['PDFURL'])) { $this->_csvi_data['product_files_file_name'][] = $attribs['PDFURL']; $this->_csvi_data['product_files_file_url'][] = $attribs['PDFURL']; $this->_csvi_data['product_files_file_title'][] = basename($attribs['PDFURL']); } break; default: break; } // Add the tagname of the list of processing tags $this->_open_tags[] = $tagname; } /** * Process end elements * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _endElement($parser, $tagname) { // Remove the current tag as we are done with it array_pop($this->_open_tags); } /** * Process the inner data * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _characterData($parser, $data) { $current_tag = end($this->_open_tags); switch ($current_tag) { case 'shortsummarydescription': // $this->_csvi_data['product_s_desc'] .= $data; break; case 'longsummarydescription': // $this->_csvi_data['product_desc'] .= $data; break; } } /** * Set up the XML parser * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _setupXmlParser() { $this->_xml_parser = xml_parser_create("UTF-8"); xml_parser_set_option($this->_xml_parser, XML_OPTION_CASE_FOLDING, 1); xml_set_object($this->_xml_parser, $this); xml_set_element_handler($this->_xml_parser, "_startElement", "_endElement"); xml_set_character_data_handler($this->_xml_parser, "_characterData"); if ($this->_xml_parser) return true; else return false; } /** * Request the data from ICEcat * * There are different URLs to get the data from: * * Open ICEcat users have access to: * http://data.icecat.biz/export/freexml.int/INT/ for access to the standardized data files (QUALITY=ICECAT). * The language-specific data-files are found here: * http://data.icecat.biz/export/freexml.int/[code]/[product_id].xml, where [code] stands e.g. for NL, EN, FR, DE, IT, ES, DK etc. * * For the Full ICEcat subscribers, a separate directory structure is in place. The standardized files are located at: * http://data.icecat.biz/export/level4/INT * and the language dependent versions are found here: * http://data.icecat.biz/export/level4/[code]/[product_id].xml, where [code] stands e.g. for NL, EN, FR, DE, IT, ES, DK, etc. For * * Products need to be matched to a product file found at http://data.icecat.biz/export/freexml/EN/ * * an index file with references to all product data-sheets in ICEcat or Open ICEcat, also historical/obsolete products * files.index.csv|xml or files.index.csv.gz|xml.gz * a smaller index file with only references to the new or changed product data-sheets of the respective day * daily.index.csv|xml or daily.index.csv.gz|xml.gz * an index file with only the products that are currently on the market, as far as we can see that based on 100s of distributor and reseller price files * on_market.index.csv|xml or on_market.index.csv.gz|xml.gz) * an index file with the products that are or were on the market for which we only have basic market data, but no complete data-sheet * nobody.index.csv|xml or nobody.index.csv.gz|xml.gz * * @copyright * @author RolandD * @todo Check for gzip functionality to reduce filesize * @see * @access private * @param string $icecat_id the ICEcat ID to retrieve * @return * @since 3.0 */ private function _callIcecat($icecat_id) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $settings = new CsviSettings(); // Construct the URL $url = ($settings->get('icecat.ice_advanced')) ? 'http://data.icecat.biz/export/level4/' : 'http://data.icecat.biz/export/freexml.int/'; // The language to use $url .= $settings->get('icecat.ice_lang').'/'; // The ID to retrieve $url .= $icecat_id.'.xml'; $csvilog->addDebug(JText::sprintf('COM_CSVI_CALL_ICECAT_URL', $url)); // Initialise the curl call $curl = curl_init(); // set URL and other appropriate options curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, $settings->get('icecat.ice_username').":".$settings->get('icecat.ice_password')); // grab URL and pass it to the browser $this->_data = curl_exec($curl); // close cURL resource, and free up system resources curl_close($curl); } /** * Supported ICEcat languages * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function supportdLanguages() { $codes = array(); $codes[] = 'INT'; // - International standardized version of a data-sheet. When QUALITY = ICEcat language independent values. $codes[] = 'EN'; // Standard or UK English $codes[] = 'US'; // US English $codes[] = 'NL'; // Dutch $codes[] = 'FR'; // French $codes[] = 'DE'; // German $codes[] = 'IT'; // Italian $codes[] = 'ES'; // Spanish $codes[] = 'DK'; // Danish $codes[] = 'RU'; // Russian $codes[] = 'PT'; // Portuguese $codes[] = 'ZH'; // Chinese (simplified) $codes[] = 'SE'; // Swedish $codes[] = 'PL'; // Polish $codes[] = 'CZ'; // Czech $codes[] = 'HU'; // Hungarian $codes[] = 'FI'; // Finnish $codes[] = 'NO'; // Norwegian $codes[] = 'TR'; // Turkish $codes[] = 'BG'; // Bulgarian $codes[] = 'KA'; // Georgian $codes[] = 'RO'; // Romanian $codes[] = 'SR'; // Serbian $codes[] = 'JA'; // Japanese $codes[] = 'UK'; // Ukrainian $codes[] = 'CA'; // Catalan $codes[] = 'HR'; // Croatian return $codes; } } ?> PK>\ӧ<`<`helpers/com_virtuemart.phpnuW+Ainput; $this->_csvidata = $jinput->get('csvi_data', null, null); } /** * Get the product id, this is necessary for updating existing products * * @copyright * @author RolandD * @todo Reduce number of calls to this function * @see * @access protected * @param * @return integer product_id is returned * @since 3.0 */ public function getProductId() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $update_based_on = $template->get('update_based_on', 'product', 'product_sku'); switch ($update_based_on) { case 'product_sku': $product_id = $this->_csvidata->get('product_id'); if ($product_id) { return $product_id; } else { $product_sku = $this->_csvidata->get('product_sku'); if ($product_sku) { $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($product_sku)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_FIND_PRODUCT_SKU'), true); return $db->loadResult(); } else return false; } break; case 'product_mpn': $mpn_column = $template->get('mpn_column_name', 'product', false); $product_mpn = $this->_csvidata->get($mpn_column); if ($product_mpn) { $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where($db->quoteName($mpn_column)." = ".$db->Quote($product_mpn)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_FIND_PRODUCT_MPN'), true); return $db->loadResult(); } else return false; break; case 'product_child_sku': $product_sku = $this->_csvidata->get('product_sku'); $product_parent_sku = $this->_csvidata->get('product_parent_sku'); if ($product_sku && $product_parent_sku) { // Load the product parent ID $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($product_parent_sku)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_FIND_PRODUCT_CHILD_PARENT_SKU'), true); $product_parent_id = $db->loadResult(); // Load the product ID of the child $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($product_sku)); $query->where('product_parent_id = '.$product_parent_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_FIND_PRODUCT_CHILD_SKU'), true); return $db->loadResult(); } else if ($product_sku) { $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($product_sku)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_FIND_PRODUCT_SKU_BASED_CHILD'), true); return $db->loadResult(); } else { $csvilog->addDebug(JText::_('COM_CSVI_NO_CHILD_NO_PARENT')); return false; } break; default: return false; break; } } /** * Determine vendor ID * * Determine for which vendor we are importing product details. * * The default vendor is the one with the lowest vendor_id value * * @copyright * @author RolandD * @todo Add full vendor support when VirtueMart supports it * @see * @access protected * @param * @return integer the vendor database ID * @since 3.0 */ public function getVendorId() { if (!$this->_vendor_id) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); // Get some values $vendor_id = $this->_csvidata->get('virtuemart_vendor_id'); $product_sku = $this->_csvidata->get('product_sku', false); // User is uploading vendor_id if ($vendor_id) return $vendor_id; // User is not uploading vendor_id // First get the vendor with the lowest ID $query = $db->getQuery(true); $query->select('MIN(virtuemart_vendor_id) AS vendor_id'); $query->from('#__virtuemart_vendors'); $db->setQuery($query); $min_vendor_id = $db->loadResult(); if ($min_vendor_id) { if ($product_sku) { $query = $db->getQuery(true); $query->select('IF (COUNT(virtuemart_vendor_id) = 0, '.$min_vendor_id.', virtuemart_vendor_id) AS vendor_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($product_sku)); $db->setQuery($query); // Existing vendor_id $vendor_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_VENDOR_EXISTS'), true); $this->_vendor_id = $vendor_id; return $vendor_id; } // No product_sku uploaded else { $this->_vendor_id = $min_vendor_id; return $min_vendor_id; } } else { // No vendor found, so lets default to 1 $this->_vendor_id = 1; } } return $this->_vendor_id; } /** * Get the shopper group id * * Only get the shopper group id when the shopper_group_name is set * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $shopper_group_name the name of the shopper group to find * @return integer the database ID of the shopper group * @since 3.0 */ public function getShopperGroupId($shopper_group_name) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $query = $db->getQuery(true); $csvilog = $jinput->get('csvilog', null, null); $query->select('virtuemart_shoppergroup_id'); $query->from('#__virtuemart_shoppergroups'); $query->where('shopper_group_name = '.$db->q($shopper_group_name)); $db->setQuery($query); $shopper_group_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_SHOPPER_GROUP_NAME'), true); return $shopper_group_id; } /** * Get the currency ID of the specified vendor * * @copyright * @author RolandD * @todo * @see * @access public * @param int $vendor_id the ID of the vendor * @return * @since 4.0 */ public function getVendorCurrency($vendor_id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('vendor_currency')); $query->from($db->quoteName('#__virtuemart_vendors')); $query->where($db->quoteName('vendor_currency').' = '.$db->quote($vendor_id)); $db->setQuery($query); return $db->loadResult(); } /** * Gets the default Shopper Group ID * * @copyright * @author RolandD * @todo add error checking * @see * @access protected * @param * @return integer the database shopper ID * @since 4.0 */ public function getDefaultShopperGroupID() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $vendor_id = $this->getVendorId(); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_shoppergroup_id'); $query->from('#__virtuemart_shoppergroups'); $query->where($db->quoteName('default').' = 1'); $query->where($db->quoteName('virtuemart_vendor_id').' = '.$vendor_id); $db->setQuery($query); $default = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_DEFAULT_SHOPPER_GROUP'), true); return $default; } /** * Create a slug * * @copyright * @author RolandD * @todo * @see * @access public * @param string $name the string to turn into a slug * @return string the slug for the product * @since 4.0 */ public function createSlug($name) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Transliterate $lang = new JLanguage($template->get('language', 'general', '', null, 0, false)); $str = $lang->transliterate($name); // Trim white spaces at beginning and end of alias and make lowercase $str = trim(JString::strtolower($str)); // Remove any duplicate whitespace, and ensure all characters are alphanumeric $str = preg_replace('/(\s|[^A-Za-z0-9\-])+/', '-', $str); // Trim dashes at beginning and end of alias $str = trim($str, '-'); // If we are left with an empty string, make a date with random number if (trim(str_replace('-', '', $str)) == '') { $jdate = JFactory::getDate(); $str = $jdate->format("Y-m-d-h-i-s").mt_rand(); } return $str; } /** * Get the custom related field ID * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getRelatedId() { if (!$this->_related_id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_custom_id'); $query->from('#__virtuemart_customs'); $query->where('virtuemart_vendor_id = '.$this->getVendorId()); $query->where('field_type = '.$db->Quote('R')); $db->setQuery($query); $this->_related_id = $db->loadResult(); } return $this->_related_id; } /** * Load the order status code * * @copyright * @author RolandD * @todo * @see * @access public * @param string $order_status_name the name of the order status * @return string the order status code * @since 2.3.11 */ public function getOrderStatus($order_status_name) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('order_status_code'); $query->from('#__virtuemart_orderstates'); $query->where('order_status_name = '.$db->Quote($order_status_name)); $db->setQuery($query); return $db->loadResult(); } /** * Get the currency ID * * @copyright * @author RolandD * @todo * @see * @access public * @param string $currency_name the name of the currency * @param int $vendor_id the ID of the vendor * @return * @since 4.0 */ public function getCurrencyId($currency_name, $vendor_id) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_currency_id'); $query->from('#__virtuemart_currencies'); $query->where('currency_code_3 = '.$db->Quote($currency_name)); $query->where('virtuemart_vendor_id = '.$vendor_id); $db->setQuery($query); $currency_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_CURRENCY_ID'), true); return $currency_id; } /** * Get the country ID * * @copyright * @author RolandD * @todo * @see * @access public * @param string $country_name the name of the country * @param string $country_2_code the 2 letter notification * @param string $country_3_code the 3 letter notification * @return * @since 4.0 */ public function getCountryId($country_name=null, $country_2_code=null, $country_3_code=null) { $country_id = null; if (isset($country_name) || isset($country_2_code) || isset($country_3_code)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_country_id'); $query->from('#__virtuemart_countries'); if (isset($country_name)) $query->where('country_name = '.$db->Quote($country_name)); else if (isset($country_2_code)) $query->where('country_2_code = '.$db->Quote($country_2_code)); else if (isset($country_3_code)) $query->where('country_3_code = '.$db->Quote($country_3_code)); $db->setQuery($query); $country_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_COUNTRY_ID'), true); } return $country_id; } /** * Get the state ID * * @copyright * @author RolandD * @todo * @see * @access public * @param string $state_name the name of the state * @param string $state_2_code the 2 letter notification * @param string $state_3_code the 3 letter notification * @return * @since 4.0 */ public function getStateId($state_name=null, $state_2_code=null, $state_3_code=null) { $state_id = null; if (isset($state_name) || isset($state_2_code) || isset($state_3_code)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_state_id'); $query->from('#__virtuemart_states'); if (isset($state_name)) $query->where('state_name = '.$db->Quote($state_name)); else if (isset($state_2_code)) $query->where('state_2_code = '.$db->Quote($state_2_code)); else if (isset($state_3_code)) $query->where('state_3_code = '.$db->Quote($state_3_code)); $db->setQuery($query); $state_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_STATE_ID'), true); } return $state_id; } /** * Get category list * * @copyright * @author RolandD * @todo * @see * @access public * @param string $language the language code for the category names * @return * @since 4.0 */ public function getCategoryTree($language) { // Clean up the language if needed $language = strtolower(str_replace('-', '_', $language)); $db = JFactory::getDbo(); $query = $db->getQuery(true); // 1. Get all categories $query->select('x.category_parent_id AS parent_id, x.category_child_id AS id, l.category_name AS catname'); $query->from('#__virtuemart_categories c'); $query->leftJoin('#__virtuemart_category_categories x ON c.virtuemart_category_id = x.category_child_id'); $query->leftJoin('#__virtuemart_categories_'.$language.' l ON l.virtuemart_category_id = c.virtuemart_category_id'); $db->setQuery($query); $rawcats = $db->loadObjectList(); if (!empty($rawcats)) { // 2. Group categories based on their parent_id $categories = array(); foreach ($rawcats as $key => $rawcat) { $categories[$rawcat->parent_id][$rawcat->id]['pid'] = $rawcat->parent_id; $categories[$rawcat->parent_id][$rawcat->id]['cid'] = $rawcat->id; $categories[$rawcat->parent_id][$rawcat->id]['catname'] = $rawcat->catname; } if (count($rawcats) > 10) $categorysize = 10; else $categorysize = count($rawcats)+1; } $this->_options = array(); // Add a don't use option $this->_options[] = JHtml::_('select.option', '', JText::_('COM_CSVI_EXPORT_DONT_USE')); if (isset($categories)) { if (count($categories) > 0) { // Take the toplevels first foreach ($categories[0] as $key => $category) { $this->_options[] = JHtml::_('select.option', $category['cid'], $category['catname']); // Write the subcategories $suboptions = $this->buildCategory($categories, $category['cid'], array()); } } } return $this->_options; } /** * Create the subcategory layout * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return array select options for the category tree * @since 3.0 */ private function buildCategory($cattree, $catfilter, $subcats, $loop=1) { if (isset($cattree[$catfilter])) { foreach ($cattree[$catfilter] as $subcatid => $category) { $this->_options[] = JHtml::_('select.option', $category['cid'], str_repeat('>', $loop).' '.$category['catname']); $subcats = $this->buildCategory($cattree, $subcatid, $subcats, $loop+1); } } } /** * Construct the category path * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function constructCategoryPath($catids) { $catpaths = array(); if (is_array($catids)) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); // Load the category separator if (is_null($this->_catsep)) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_catsep = $template->get('category_separator', 'general', '/'); } // Get the paths foreach ($catids as $category_id) { // Create the path $paths = array(); while ($category_id > 0) { $query = $db->getQuery(true); $query->select('category_parent_id, l.category_name'); $query->from('#__virtuemart_category_categories x'); $query->leftJoin('#__virtuemart_categories c ON x.category_child_id = c.virtuemart_category_id'); $query->leftJoin('#__virtuemart_categories_'.$template->get('language', 'general').' l ON x.category_child_id = l.virtuemart_category_id'); $query->where('category_child_id = '.$category_id); $db->setQuery($query); $path = $db->loadObject(); $csvilog->addDebug('Get cat ID'.$category_id, true); // $catpaths[] = $this->_getJoomFishCategory($category_id, trim($path->category_name)); if (is_object($path)) { $paths[] = $path->category_name; $category_id = $path->category_parent_id; } else { $csvilog->addDebug('COM_CSVI_CANNOT_GET_CATEGORY_ID'); $csvilog->AddStats('incorrect', 'COM_CSVI_CANNOT_GET_CATEGORY_ID'); return ''; } } // Create the path $paths = array_reverse($paths); $catpaths[] = implode($this->_catsep, $paths); } } return $catpaths; } /** * Creates the category path based on a category ID * * @copyright * @author RolandD * @todo * @see * @access protected * @param int $category_id the ID to create the category path from * @return string the category path * @since 3.0 */ public function createCategoryPath($product_id, $id=false) { $db = JFactory::getDbo(); // Get the category paths $query = $db->getQuery(true); $query->select($db->quoteName('virtuemart_category_id')); $query->from($db->quoteName('#__virtuemart_product_categories')); $query->where($db->quoteName('virtuemart_product_id').' = '.$db->quote($product_id)); $db->setQuery($query); $catids = $db->loadColumn(); if (!empty($catids)) { // Return the paths if ($id) { $result = $db->loadResultArray(); if (is_array($result)) return implode('|', $result); else return null; } else { $catpaths = $this->constructCategoryPath($catids); if (is_array($catpaths)) return implode('|', $catpaths); else return null; } } else return null; } /** * Create a category path based on ID * * @copyright * @author RolandD * @todo * @see * @access public * @param $catids array list of IDs to generate category path for * @return * @since 4.0 */ public function createCategoryPathById($catids) { if (!is_array($catids)) $catids = (array)$catids; $paths = $this->constructCategoryPath($catids); if (is_array($paths)) return implode('|', $paths); else return ''; } /** * Get the category ID for a product * * @copyright * @author RolandD * @todo * @see * @access protected * @param int $product_id the product ID to get the category for * @return int the category ID the product is linked to limited to 1 * @since 3.0 */ public function getCategoryId($product_id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_category_id'); $query->from('#__virtuemart_product_categories'); $query->where('virtuemart_product_id = '.$product_id); $db->setQuery($query, 0, 1); return $db->loadResult(); } /** * Determine the shipping cost * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function shippingCost($product_price) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $prices = $template->get('shopper_shipping_export_fields', '', array()); $fee = null; if (!empty($prices)) { foreach ($prices['_price_from'] as $kfrom => $price_from) { // Check if we have an end price $price_from = str_replace(',', '.', $price_from); $price_to = str_replace(',', '.', $prices['_price_to'][$kfrom]); if (!empty($price_to)) { if ($product_price >= $price_from && $product_price < $price_to) { $fee = $kfrom; break; } } else { if ($product_price >= $price_from) { $fee = $kfrom; break; } } } } if (!is_null($fee)) return $prices['_fee'][$fee]; else return false; } /** * Get the list of order users * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of objects * @since 4.0 */ public function getOrderUser() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $query = $db->getQuery(true); $filter = $jinput->get('filter'); $q = "SELECT DISTINCT virtuemart_user_id AS user_id, IF (LENGTH(TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name))) = 0, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', IF (TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name)) is NULL, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', CONCAT(first_name, ' ', middle_name, ' ', last_name))) AS user_name FROM #__virtuemart_order_userinfos WHERE (first_name LIKE ".$db->Quote('%'.$filter.'%')." OR middle_name LIKE ".$db->Quote('%'.$filter.'%')." OR last_name LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY user_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order products * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of objects * @since 4.0 */ public function getOrderProduct() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $query = $db->getQuery(true); $filter = $jinput->get('filter'); $q = "SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name FROM #__virtuemart_order_items o WHERE (order_item_sku LIKE ".$db->Quote('%'.$filter.'%')." OR order_item_name LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY order_item_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order item products * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of objects * @since 4.0 */ public function getOrderItemProduct() { $db = JFactory::getDBO(); $filter = JRequest::getVar('filter'); $q = "SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name FROM #__virtuemart_order_items o WHERE (o.order_item_sku LIKE ".$db->Quote('%'.$filter.'%')." OR o.order_item_name LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY order_item_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } } ?>PK>\Ai$$helpers/file/import/csv.phpnuW+Ainput; // Column headers are always the first line of the file // 1. Store current position $curpos = $this->getFilePos(); if ($curpos > 0) { // 2. Go to the beginning of the file $this->setFilePos(0); } // 3. Read the line $jinput->set('columnheaders', $this->ReadNextLine()); if ($curpos > 0) { // 4. Set the position back $this->setFilePos($curpos); } $this->linepointer++; return true; } /** * Get the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int current position in the file * @since 3.0 */ public function getFilePos() { return ftell($this->fp); } /** * Set the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param int $pos the position to move to * @return int 0 if success | -1 if not success * @since 3.0 */ public function setFilePos($pos) { return fseek($this->fp, $pos); } /** * Close the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function closeFile($removefolder=true) { fclose($this->fp); $this->_closed = true; parent::closeFile($removefolder); } /** * Read the next line in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array with the line of data read | false if data cannot be read * @since 3.0 */ public function readNextLine() { // Check if the file is still open if ($this->_closed) return; // Make sure we have delimiters if (is_null($this->_field_delimiter)) return false; // Load some settings $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $newdata = array(); // Ignore empty records $csvdata = array(0=>''); while (is_array($csvdata) && count($csvdata)==1 && $csvdata[0]=='') { if (!is_null($this->_text_enclosure)) $csvdata = fgetcsv($this->fp, 0, $this->_field_delimiter, $this->_text_enclosure); else $csvdata = fgetcsv($this->fp, 0, $this->_field_delimiter); } // Check if we can read the line correctly if (count($csvdata) == 1 && !$this->_checked_delimiter) { $current_field = $this->_field_delimiter; $current_text = $this->_text_enclosure; $this->_findDelimiters(true); if ($template->show_preview) { if ($current_field != $this->_field_delimiter) JError::raiseNotice(0, JText::sprintf('COM_CSVI_UNEQUAL_FIELD_DELIMITER', $current_field, $this->_field_delimiter)); if ($current_text != $this->_text_enclosure) JError::raiseNotice(0, JText::sprintf('COM_CSVI_UNEQUAL_TEXT_ENCLOSURE', $current_text, $this->_text_enclosure)); } else { if ($current_field != $this->_field_delimiter) $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_UNEQUAL_FIELD_DELIMITER', $current_field, $this->_field_delimiter)); if ($current_text != $this->_text_enclosure) $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_UNEQUAL_FIELD_DELIMITER', $current_field, $this->_field_delimiter)); } $this->_field_delimiter = $current_field; $this->_text_enclosure = $current_text; } if ($csvdata) { // Do BOM check if ($jinput->get('currentline', 0, 'int') == 1 || is_null($jinput->get('currentline', null, null))) { // Remove text delimiters as they are not recognized by fgetcsv $csvdata[0] = $this->_removeTextDelimiters($this->_checkBom($csvdata[0])); } $this->linepointer++; return $csvdata; } else return false; } /** * Process the file to import * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function processFile() { // Open the csv file $this->fp = fopen($this->filename, "r"); $this->_closed = false; // Load the delimiters $this->_findDelimiters(); return true; } /** * Find the delimiters used * * @copyright * @author RolandD * @todo * @see * @access private * @param bool $force Force to read the delimiters from the imported file * @return bool true if delimiters found | false if delimiters not found * @since 3.0 */ private function _findDelimiters($force=false) { $jinput = JFactory::getApplication()->input; if (!$this->_checked_delimiter) { $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); if (!$template->get('auto_detect_delimiters', 'general', true) && !$force) { // Set the field delimiter if (strtolower($template->get('field_delimiter', 'general')) == 't') $this->_field_delimiter = "\t"; else $this->_field_delimiter = $template->get('field_delimiter', 'general'); // Set the text enclosure $this->_text_enclosure = ($template->get('text_enclosure', 'general', '')) ? $template->get('text_enclosure', 'general') : null; } else { // Read the first line rewind($this->fp); $line = fgets($this->fp); // 1. Is the user using text enclosures $first_char = substr($line, 0, 1); $pattern = '/[a-zA-Z0-9_]/'; $matches = array(); preg_match($pattern, $first_char, $matches); if (count($matches) == 0) { // User is using text delimiter $this->_text_enclosure = $first_char; $csvilog->addDebug(JText::sprintf('COM_CSVI_FOUND_TEXT_ENCLOSURE', $first_char)); // 2. What field delimiter is being used $match_next_char = strpos($line, $this->_text_enclosure, 1); $second_char = substr($line, $match_next_char+1, 1); if ($first_char == $second_char) { $jinput->set('error_found', true); JError::raiseWarning(0, JText::_('COM_CSVI_CANNOT_FIND_TEXT_DELIMITER')); return false; } else { $this->_field_delimiter = $second_char; } } else { $totalchars = strlen($line); // 2. What field delimiter is being used for ($i = 0;$i <= $totalchars; $i++) { $current_char = substr($line, $i, 1); preg_match($pattern, $current_char, $matches); if (count($matches) == 0) { $this->_field_delimiter = $current_char; $i = $totalchars; } } } $csvilog->addDebug(JText::sprintf('COM_CSVI_FOUND_FIELD_DELIMITER', $this->_field_delimiter)); rewind($this->fp); } $this->_checked_delimiter = true; } return true; } /** * Checks if the uploaded file has a BOM * * If the uploaded file has a BOM, remove it since it only causes * problems on import. * * @copyright * @author RolandD * @todo * @see ReadNextLine() * @access private * @param string $data the string to check for a BOM * @return string return the cleaned string * @since 3.0 */ private function _checkBom($data) { // Check the first three characters if (strlen($data) > 3) { if (ord($data{0}) == 239 && ord($data{1}) == 187 && ord($data{2}) == 191) { return substr($data, 3, strlen($data)); } else return $data; } else return $data; } /** * Removes the text delimiters when fgetcsv() has failed to do so because the file contains a BOM. * This allows for the possibility that the data value contains embedded text enclosure characters * (which should be doubled up for correct csv file format). * The string [32" TV] (ignore brackets) should be encoded as ["32"" TV"] * This function correctly decodes ["32"" TV"] back to [32" TV] * * @copyright * @author doorknob * @todo * @see * @access private * @param string $data the string to clean * @return string the cleaned string * @since */ private function _removeTextDelimiters($data) { if( substr($data, 0, 1) == $this->_text_enclosure && substr($data, -1, 1) == $this->_text_enclosure ) { return str_replace($this->_text_enclosure.$this->_text_enclosure, $this->_text_enclosure, substr($data, 1, -1)); } else { return $data; } } /** * Sets the file pointer back to beginning * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function rewind() { $this->setFilePos(0); } } ?> PK>\ helpers/file/import/xls.phpnuW+Adata[0]['numRows']; } /** * Load the column headers from a file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true * @since 3.0 */ public function loadColumnHeaders() { $jinput = JFactory::getApplication()->input; // Make sure we include the empty fields for ($i=1; $i<=$this->data[0]['numCols']; $i++) { if (!isset($this->data[0]['cells'][1])) $this->data[0]['cells'][1][$i] = ''; } $headers = array_values($this->data[0]['cells'][1]); $jinput->set('columnheaders', $headers); $this->linepointer++; return true; } /** * Get the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int current position in the file * @since 3.0 */ public function getFilePos() { return $this->linepointer; } /** * Set the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param int $pos the position to move to * @return int current position in the file * @since 3.0 */ public function setFilePos($pos) { $this->linepointer = $pos; return $this->linepointer; } /** * Read the next line in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array with the line of data read | false if data cannot be read * @since 3.0 */ public function readNextLine() { if ($this->data[0]['numRows'] >= $this->linepointer) { $newdata = array(); // Make sure we include the empty fields for ($i=1; $i <= $this->data[0]['numCols']; $i++) { if (!isset($this->data[0]['cells'][$this->linepointer][$i])) $newdata[] = ''; else $newdata[] = $this->data[0]['cells'][$this->linepointer][$i]; } $this->linepointer++; return $newdata; } else return false; } /** * Process the file to import * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function processFile() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->fp = true; $this->data = new Spreadsheet_Excel_Reader($this->filename, false); $this->data = $this->data->sheets; return true; } /** * Sets the file pointer back to beginning * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function rewind() { $this->setFilePos(1); } } ?> PK>\҂helpers/file/import/ods.phpnuW+Adata->rows; } /** * Load the column headers from a file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true * @since 3.0 */ public function loadColumnHeaders() { $jinput = JFactory::getApplication()->input; $jinput->set('columnheaders', $this->data->_data[1]); $this->linepointer++; return true; } /** * Get the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int current position in the file * @since 3.0 */ public function getFilePos() { return $this->linepointer; } /** * Set the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param int $pos the position to move to * @return int current position in the file * @since 3.0 */ public function setFilePos($pos) { $this->linepointer = $pos; return $this->linepointer; } /** * Read the next line in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array with the line of data read | false if data cannot be read * @since 3.0 */ public function readNextLine() { if ($this->data->rows >= $this->linepointer) { $newdata = array(); $newdata = $this->data->_data[$this->linepointer]; $this->linepointer++; return $newdata; } else return false; } /** * Process the file to import * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function processFile() { if (!$this->_unpacked) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); jimport('joomla.filesystem.file'); jimport('joomla.filesystem.archive'); $this->fp = true; $this->linepointer = 1; $this->data = new ODSParser(); // First we need to unpack the zipfile $unpackfile = $this->_unpackpath.'/ods/'.basename($this->filename).'.zip'; $importfile = $this->_unpackpath.'/ods/content.xml'; // Check the unpack folder JFolder::create($this->_unpackpath.'/ods'); // Delete the destination file if it already exists if (JFile::exists($unpackfile)) JFile::delete($unpackfile); if (JFile::exists($importfile)) JFile::delete($importfile); // Now copy the file to the folder JFile::copy($this->filename, $unpackfile); // Extract the files in the folder if (!JArchive::extract($unpackfile, $this->_unpackpath.'/ods')) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_UNPACK_ODS_FILE')); return false; } // File is always called content.xml else $this->filename = $importfile; // Read the data to process if (!$this->data->read($this->filename)) return false; // Set the unpacked to true as we have unpacked the file $this->_unpacked = true; } // All good return true return true; } /** * Sets the file pointer back to beginning * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function rewind() { // Set the line pointer to 1 as that is the first entry in the data array $this->setFilePos(1); } } ?> PK>\AA%helpers/file/import/excel_reader2.phpnuW+A * Maintained at http://code.google.com/p/php-excel-reader/ * * Format parsing and MUCH more contributed by: * Matt Roxburgh < http://www.roxburgh.me.uk > * * DOCUMENTATION * ============= * http://code.google.com/p/php-excel-reader/wiki/Documentation * * CHANGE LOG * ========== * http://code.google.com/p/php-excel-reader/wiki/ChangeHistory * * DISCUSSION/SUPPORT * ================== * http://groups.google.com/group/php-excel-reader-discuss/topics * * -------------------------------------------------------------------------- * * Originally developed by Vadim Tkachenko under the name PHPExcelReader. * (http://sourceforge.net/projects/phpexcelreader) * Based on the Java version by Andy Khan (http://www.andykhan.com). Now * maintained by David Sanders. Reads only Biff 7 and Biff 8 formats. * * PHP versions 4 and 5 * * LICENSE: This source file is subject to version 3.0 of the PHP license * that is available through the world-wide-web at the following URI: * http://www.php.net/license/3_0.txt. If you did not receive a copy of * the PHP License and are unable to obtain it through the web, please * send a note to license@php.net so we can mail you a copy immediately. * * @category Spreadsheet * @package Spreadsheet_Excel_Reader * @author Vadim Tkachenko * @license http://www.php.net/license/3_0.txt PHP License 3.0 * @version CVS: $Id: excel_reader2.php 1456 2010-12-05 11:31:17Z RolandD $ * @link http://pear.php.net/package/Spreadsheet_Excel_Reader * @see OLE, Spreadsheet_Excel_Writer * -------------------------------------------------------------------------- */ define('NUM_BIG_BLOCK_DEPOT_BLOCKS_POS', 0x2c); define('SMALL_BLOCK_DEPOT_BLOCK_POS', 0x3c); define('ROOT_START_BLOCK_POS', 0x30); define('BIG_BLOCK_SIZE', 0x200); define('SMALL_BLOCK_SIZE', 0x40); define('EXTENSION_BLOCK_POS', 0x44); define('NUM_EXTENSION_BLOCK_POS', 0x48); define('PROPERTY_STORAGE_BLOCK_SIZE', 0x80); define('BIG_BLOCK_DEPOT_BLOCKS_POS', 0x4c); define('SMALL_BLOCK_THRESHOLD', 0x1000); // property storage offsets define('SIZE_OF_NAME_POS', 0x40); define('TYPE_POS', 0x42); define('START_BLOCK_POS', 0x74); define('SIZE_POS', 0x78); define('IDENTIFIER_OLE', pack("CCCCCCCC",0xd0,0xcf,0x11,0xe0,0xa1,0xb1,0x1a,0xe1)); function GetInt4d($data, $pos) { $value = ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); if ($value>=4294967294) { $value=-2; } return $value; } // http://uk.php.net/manual/en/function.getdate.php function gmgetdate($ts = null){ $k = array('seconds','minutes','hours','mday','wday','mon','year','yday','weekday','month',0); return(array_combine($k,explode(":",gmdate('s:i:G:j:w:n:Y:z:l:F:U',is_null($ts)?time():$ts)))); } function v($data,$pos) { return ord($data[$pos]) | ord($data[$pos+1])<<8; } class OLERead { var $data = ''; function OLERead(){ } function read($sFileName){ // check if file exist and is readable (Darko Miljanovic) if(!is_readable($sFileName)) { $this->error = 1; return false; } $this->data = @file_get_contents($sFileName); if (!$this->data) { $this->error = 1; return false; } if (substr($this->data, 0, 8) != IDENTIFIER_OLE) { $this->error = 1; return false; } $this->numBigBlockDepotBlocks = GetInt4d($this->data, NUM_BIG_BLOCK_DEPOT_BLOCKS_POS); $this->sbdStartBlock = GetInt4d($this->data, SMALL_BLOCK_DEPOT_BLOCK_POS); $this->rootStartBlock = GetInt4d($this->data, ROOT_START_BLOCK_POS); $this->extensionBlock = GetInt4d($this->data, EXTENSION_BLOCK_POS); $this->numExtensionBlocks = GetInt4d($this->data, NUM_EXTENSION_BLOCK_POS); $bigBlockDepotBlocks = array(); $pos = BIG_BLOCK_DEPOT_BLOCKS_POS; $bbdBlocks = $this->numBigBlockDepotBlocks; if ($this->numExtensionBlocks != 0) { $bbdBlocks = (BIG_BLOCK_SIZE - BIG_BLOCK_DEPOT_BLOCKS_POS)/4; } for ($i = 0; $i < $bbdBlocks; $i++) { $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); $pos += 4; } for ($j = 0; $j < $this->numExtensionBlocks; $j++) { $pos = ($this->extensionBlock + 1)* BIG_BLOCK_SIZE; $blocksToRead = min($this->numBigBlockDepotBlocks - $bbdBlocks, BIG_BLOCK_SIZE / 4 - 1); for ($i = $bbdBlocks; $i < $bbdBlocks + $blocksToRead; $i++) { $bigBlockDepotBlocks[$i] = GetInt4d($this->data, $pos); $pos += 4; } $bbdBlocks += $blocksToRead; if ($bbdBlocks < $this->numBigBlockDepotBlocks) { $this->extensionBlock = GetInt4d($this->data, $pos); } } // readBigBlockDepot $pos = 0; $index = 0; $this->bigBlockChain = array(); for ($i = 0; $i < $this->numBigBlockDepotBlocks; $i++) { $pos = ($bigBlockDepotBlocks[$i] + 1)* BIG_BLOCK_SIZE; //echo "pos = $pos"; for ($j = 0 ; $j < BIG_BLOCK_SIZE / 4; $j++) { $this->bigBlockChain[$index] = GetInt4d($this->data, $pos); $pos += 4 ; $index++; } } // readSmallBlockDepot(); $pos = 0; $index = 0; $sbdBlock = $this->sbdStartBlock; $this->smallBlockChain = array(); while ($sbdBlock != -2) { $pos = ($sbdBlock + 1)* BIG_BLOCK_SIZE; for ($j = 0; $j < BIG_BLOCK_SIZE / 4; $j++) { $this->smallBlockChain[$index] = GetInt4d($this->data, $pos); $pos += 4; $index++; } $sbdBlock = $this->bigBlockChain[$sbdBlock]; } // readData(rootStartBlock) $block = $this->rootStartBlock; $pos = 0; $this->entry = $this->__readData($block); $this->__readPropertySets(); } function __readData($bl) { $block = $bl; $pos = 0; $data = ''; while ($block != -2) { $pos = ($block + 1)* BIG_BLOCK_SIZE; $data = $data.substr($this->data, $pos, BIG_BLOCK_SIZE); $block = $this->bigBlockChain[$block]; } return $data; } function __readPropertySets(){ $offset = 0; while ($offset < strlen($this->entry)) { $d = substr($this->entry, $offset, PROPERTY_STORAGE_BLOCK_SIZE); $nameSize = ord($d[SIZE_OF_NAME_POS]) | (ord($d[SIZE_OF_NAME_POS+1]) << 8); $type = ord($d[TYPE_POS]); $startBlock = GetInt4d($d, START_BLOCK_POS); $size = GetInt4d($d, SIZE_POS); $name = ''; for ($i = 0; $i < $nameSize ; $i++) { $name .= $d[$i]; } $name = str_replace("\x00", "", $name); $this->props[] = array ( 'name' => $name, 'type' => $type, 'startBlock' => $startBlock, 'size' => $size); if ((strtolower($name) == "workbook") || ( strtolower($name) == "book")) { $this->wrkbook = count($this->props) - 1; } if ($name == "Root Entry") { $this->rootentry = count($this->props) - 1; } $offset += PROPERTY_STORAGE_BLOCK_SIZE; } } function getWorkBook(){ if ($this->props[$this->wrkbook]['size'] < SMALL_BLOCK_THRESHOLD){ $rootdata = $this->__readData($this->props[$this->rootentry]['startBlock']); $streamData = ''; $block = $this->props[$this->wrkbook]['startBlock']; $pos = 0; while ($block != -2) { $pos = $block* SMALL_BLOCK_SIZE; $streamData .= substr($rootdata, $pos, SMALL_BLOCK_SIZE); $block = $this->smallBlockChain[$block]; } return $streamData; }else{ $numBlocks = $this->props[$this->wrkbook]['size'] / BIG_BLOCK_SIZE; if ($this->props[$this->wrkbook]['size'] % BIG_BLOCK_SIZE != 0) { $numBlocks++; } if ($numBlocks == 0) return ''; $streamData = ''; $block = $this->props[$this->wrkbook]['startBlock']; $pos = 0; while ($block != -2) { $pos = ($block + 1)* BIG_BLOCK_SIZE; $streamData .= substr($this->data, $pos, BIG_BLOCK_SIZE); $block = $this->bigBlockChain[$block]; } return $streamData; } } } define('SPREADSHEET_EXCEL_READER_BIFF8', 0x600); define('SPREADSHEET_EXCEL_READER_BIFF7', 0x500); define('SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS', 0x5); define('SPREADSHEET_EXCEL_READER_WORKSHEET', 0x10); define('SPREADSHEET_EXCEL_READER_TYPE_BOF', 0x809); define('SPREADSHEET_EXCEL_READER_TYPE_EOF', 0x0a); define('SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET', 0x85); define('SPREADSHEET_EXCEL_READER_TYPE_DIMENSION', 0x200); define('SPREADSHEET_EXCEL_READER_TYPE_ROW', 0x208); define('SPREADSHEET_EXCEL_READER_TYPE_DBCELL', 0xd7); define('SPREADSHEET_EXCEL_READER_TYPE_FILEPASS', 0x2f); define('SPREADSHEET_EXCEL_READER_TYPE_NOTE', 0x1c); define('SPREADSHEET_EXCEL_READER_TYPE_TXO', 0x1b6); define('SPREADSHEET_EXCEL_READER_TYPE_RK', 0x7e); define('SPREADSHEET_EXCEL_READER_TYPE_RK2', 0x27e); define('SPREADSHEET_EXCEL_READER_TYPE_MULRK', 0xbd); define('SPREADSHEET_EXCEL_READER_TYPE_MULBLANK', 0xbe); define('SPREADSHEET_EXCEL_READER_TYPE_INDEX', 0x20b); define('SPREADSHEET_EXCEL_READER_TYPE_SST', 0xfc); define('SPREADSHEET_EXCEL_READER_TYPE_EXTSST', 0xff); define('SPREADSHEET_EXCEL_READER_TYPE_CONTINUE', 0x3c); define('SPREADSHEET_EXCEL_READER_TYPE_LABEL', 0x204); define('SPREADSHEET_EXCEL_READER_TYPE_LABELSST', 0xfd); define('SPREADSHEET_EXCEL_READER_TYPE_NUMBER', 0x203); define('SPREADSHEET_EXCEL_READER_TYPE_NAME', 0x18); define('SPREADSHEET_EXCEL_READER_TYPE_ARRAY', 0x221); define('SPREADSHEET_EXCEL_READER_TYPE_STRING', 0x207); define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA', 0x406); define('SPREADSHEET_EXCEL_READER_TYPE_FORMULA2', 0x6); define('SPREADSHEET_EXCEL_READER_TYPE_FORMAT', 0x41e); define('SPREADSHEET_EXCEL_READER_TYPE_XF', 0xe0); define('SPREADSHEET_EXCEL_READER_TYPE_BOOLERR', 0x205); define('SPREADSHEET_EXCEL_READER_TYPE_FONT', 0x0031); define('SPREADSHEET_EXCEL_READER_TYPE_PALETTE', 0x0092); define('SPREADSHEET_EXCEL_READER_TYPE_UNKNOWN', 0xffff); define('SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR', 0x22); define('SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS', 0xE5); define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS' , 25569); define('SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904', 24107); define('SPREADSHEET_EXCEL_READER_MSINADAY', 86400); define('SPREADSHEET_EXCEL_READER_TYPE_HYPER', 0x01b8); define('SPREADSHEET_EXCEL_READER_TYPE_COLINFO', 0x7d); define('SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH', 0x55); define('SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH', 0x99); define('SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT', "%s"); /* * Main Class */ class Spreadsheet_Excel_Reader { // MK: Added to make data retrieval easier var $colnames = array(); var $colindexes = array(); var $standardColWidth = 0; var $defaultColWidth = 0; function myHex($d) { if ($d < 16) return "0" . dechex($d); return dechex($d); } function dumpHexData($data, $pos, $length) { $info = ""; for ($i = 0; $i <= $length; $i++) { $info .= ($i==0?"":" ") . $this->myHex(ord($data[$pos + $i])) . (ord($data[$pos + $i])>31? "[" . $data[$pos + $i] . "]":''); } return $info; } function getCol($col) { if (is_string($col)) { $col = strtolower($col); if (array_key_exists($col,$this->colnames)) { $col = $this->colnames[$col]; } } return $col; } // PUBLIC API FUNCTIONS // -------------------- function val($row,$col,$sheet=0) { $col = $this->getCol($col); if (array_key_exists($row,$this->sheets[$sheet]['cells']) && array_key_exists($col,$this->sheets[$sheet]['cells'][$row])) { return $this->sheets[$sheet]['cells'][$row][$col]; } return ""; } function value($row,$col,$sheet=0) { return $this->val($row,$col,$sheet); } function info($row,$col,$type='',$sheet=0) { $col = $this->getCol($col); if (array_key_exists('cellsInfo',$this->sheets[$sheet]) && array_key_exists($row,$this->sheets[$sheet]['cellsInfo']) && array_key_exists($col,$this->sheets[$sheet]['cellsInfo'][$row]) && array_key_exists($type,$this->sheets[$sheet]['cellsInfo'][$row][$col])) { return $this->sheets[$sheet]['cellsInfo'][$row][$col][$type]; } return ""; } function type($row,$col,$sheet=0) { return $this->info($row,$col,'type',$sheet); } function raw($row,$col,$sheet=0) { return $this->info($row,$col,'raw',$sheet); } function rowspan($row,$col,$sheet=0) { $val = $this->info($row,$col,'rowspan',$sheet); if ($val=="") { return 1; } return $val; } function colspan($row,$col,$sheet=0) { $val = $this->info($row,$col,'colspan',$sheet); if ($val=="") { return 1; } return $val; } function hyperlink($row,$col,$sheet=0) { $link = $this->sheets[$sheet]['cellsInfo'][$row][$col]['hyperlink']; if ($link) { return $link['link']; } return ''; } function rowcount($sheet=0) { return $this->sheets[$sheet]['numRows']; } function colcount($sheet=0) { return $this->sheets[$sheet]['numCols']; } function colwidth($col,$sheet=0) { // Col width is actually the width of the number 0. So we have to estimate and come close return $this->colInfo[$sheet][$col]['width']/9142*200; } function colhidden($col,$sheet=0) { return !!$this->colInfo[$sheet][$col]['hidden']; } function rowheight($row,$sheet=0) { return $this->rowInfo[$sheet][$row]['height']; } function rowhidden($row,$sheet=0) { return !!$this->rowInfo[$sheet][$row]['hidden']; } // GET THE CSS FOR FORMATTING // ========================== function style($row,$col,$sheet=0,$properties='') { $css = ""; $font=$this->font($row,$col,$sheet); if ($font!="") { $css .= "font-family:$font;"; } $align=$this->align($row,$col,$sheet); if ($align!="") { $css .= "text-align:$align;"; } $height=$this->height($row,$col,$sheet); if ($height!="") { $css .= "font-size:$height"."px;"; } $bgcolor=$this->bgColor($row,$col,$sheet); if ($bgcolor!="") { $bgcolor = $this->colors[$bgcolor]; $css .= "background-color:$bgcolor;"; } $color=$this->color($row,$col,$sheet); if ($color!="") { $css .= "color:$color;"; } $bold=$this->bold($row,$col,$sheet); if ($bold) { $css .= "font-weight:bold;"; } $italic=$this->italic($row,$col,$sheet); if ($italic) { $css .= "font-style:italic;"; } $underline=$this->underline($row,$col,$sheet); if ($underline) { $css .= "text-decoration:underline;"; } // Borders $bLeft = $this->borderLeft($row,$col,$sheet); $bRight = $this->borderRight($row,$col,$sheet); $bTop = $this->borderTop($row,$col,$sheet); $bBottom = $this->borderBottom($row,$col,$sheet); $bLeftCol = $this->borderLeftColor($row,$col,$sheet); $bRightCol = $this->borderRightColor($row,$col,$sheet); $bTopCol = $this->borderTopColor($row,$col,$sheet); $bBottomCol = $this->borderBottomColor($row,$col,$sheet); // Try to output the minimal required style if ($bLeft!="" && $bLeft==$bRight && $bRight==$bTop && $bTop==$bBottom) { $css .= "border:" . $this->lineStylesCss[$bLeft] .";"; } else { if ($bLeft!="") { $css .= "border-left:" . $this->lineStylesCss[$bLeft] .";"; } if ($bRight!="") { $css .= "border-right:" . $this->lineStylesCss[$bRight] .";"; } if ($bTop!="") { $css .= "border-top:" . $this->lineStylesCss[$bTop] .";"; } if ($bBottom!="") { $css .= "border-bottom:" . $this->lineStylesCss[$bBottom] .";"; } } // Only output border colors if there is an actual border specified if ($bLeft!="" && $bLeftCol!="") { $css .= "border-left-color:" . $bLeftCol .";"; } if ($bRight!="" && $bRightCol!="") { $css .= "border-right-color:" . $bRightCol .";"; } if ($bTop!="" && $bTopCol!="") { $css .= "border-top-color:" . $bTopCol . ";"; } if ($bBottom!="" && $bBottomCol!="") { $css .= "border-bottom-color:" . $bBottomCol .";"; } return $css; } // FORMAT PROPERTIES // ================= function format($row,$col,$sheet=0) { return $this->info($row,$col,'format',$sheet); } function formatIndex($row,$col,$sheet=0) { return $this->info($row,$col,'formatIndex',$sheet); } function formatColor($row,$col,$sheet=0) { return $this->info($row,$col,'formatColor',$sheet); } // CELL (XF) PROPERTIES // ==================== function xfRecord($row,$col,$sheet=0) { $xfIndex = $this->info($row,$col,'xfIndex',$sheet); if ($xfIndex!="") { return $this->xfRecords[$xfIndex]; } return null; } function xfProperty($row,$col,$sheet,$prop) { $xfRecord = $this->xfRecord($row,$col,$sheet); if ($xfRecord!=null) { return $xfRecord[$prop]; } return ""; } function align($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'align'); } function bgColor($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'bgColor'); } function borderLeft($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'borderLeft'); } function borderRight($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'borderRight'); } function borderTop($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'borderTop'); } function borderBottom($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'borderBottom'); } function borderLeftColor($row,$col,$sheet=0) { return $this->colors[$this->xfProperty($row,$col,$sheet,'borderLeftColor')]; } function borderRightColor($row,$col,$sheet=0) { return $this->colors[$this->xfProperty($row,$col,$sheet,'borderRightColor')]; } function borderTopColor($row,$col,$sheet=0) { return $this->colors[$this->xfProperty($row,$col,$sheet,'borderTopColor')]; } function borderBottomColor($row,$col,$sheet=0) { return $this->colors[$this->xfProperty($row,$col,$sheet,'borderBottomColor')]; } // FONT PROPERTIES // =============== function fontRecord($row,$col,$sheet=0) { $xfRecord = $this->xfRecord($row,$col,$sheet); if ($xfRecord!=null) { $font = $xfRecord['fontIndex']; if ($font!=null) { return $this->fontRecords[$font]; } } return null; } function fontProperty($row,$col,$sheet=0,$prop) { $font = $this->fontRecord($row,$col,$sheet); if ($font!=null) { return $font[$prop]; } return false; } function fontIndex($row,$col,$sheet=0) { return $this->xfProperty($row,$col,$sheet,'fontIndex'); } function color($row,$col,$sheet=0) { $formatColor = $this->formatColor($row,$col,$sheet); if ($formatColor!="") { return $formatColor; } $ci = $this->fontProperty($row,$col,$sheet,'color'); return $this->rawColor($ci); } function rawColor($ci) { if (($ci <> 0x7FFF) && ($ci <> '')) { return $this->colors[$ci]; } return ""; } function bold($row,$col,$sheet=0) { return $this->fontProperty($row,$col,$sheet,'bold'); } function italic($row,$col,$sheet=0) { return $this->fontProperty($row,$col,$sheet,'italic'); } function underline($row,$col,$sheet=0) { return $this->fontProperty($row,$col,$sheet,'under'); } function height($row,$col,$sheet=0) { return $this->fontProperty($row,$col,$sheet,'height'); } function font($row,$col,$sheet=0) { return $this->fontProperty($row,$col,$sheet,'font'); } // DUMP AN HTML TABLE OF THE ENTIRE XLS DATA // ========================================= function dump($row_numbers=false,$col_letters=false,$sheet=0,$table_class='excel') { $out = ""; if ($col_letters) { $out .= "\n\t"; if ($row_numbers) { $out .= "\n\t\t"; } for($i=1;$i<=$this->colcount($sheet);$i++) { $style = "width:" . ($this->colwidth($i,$sheet)*1) . "px;"; if ($this->colhidden($i,$sheet)) { $style .= "display:none;"; } $out .= "\n\t\t"; } $out .= "\n"; } $out .= "\n"; for($row=1;$row<=$this->rowcount($sheet);$row++) { $rowheight = $this->rowheight($row,$sheet); $style = "height:" . ($rowheight*(4/3)) . "px;"; if ($this->rowhidden($row,$sheet)) { $style .= "display:none;"; } $out .= "\n\t"; if ($row_numbers) { $out .= "\n\t\t"; } for($col=1;$col<=$this->colcount($sheet);$col++) { // Account for Rowspans/Colspans $rowspan = $this->rowspan($row,$col,$sheet); $colspan = $this->colspan($row,$col,$sheet); for($i=0;$i<$rowspan;$i++) { for($j=0;$j<$colspan;$j++) { if ($i>0 || $j>0) { $this->sheets[$sheet]['cellsInfo'][$row+$i][$col+$j]['dontprint']=1; } } } if(!$this->sheets[$sheet]['cellsInfo'][$row][$col]['dontprint']) { $style = $this->style($row,$col,$sheet); if ($this->colhidden($col,$sheet)) { $style .= "display:none;"; } $out .= "\n\t\t"; } } $out .= "\n"; } $out .= "
 " . strtoupper($this->colindexes[$i]) . "
$row 1?" colspan=$colspan":"") . ($rowspan > 1?" rowspan=$rowspan":"") . ">"; $val = $this->val($row,$col,$sheet); if ($val=='') { $val=" "; } else { $val = htmlentities($val); $link = $this->hyperlink($row,$col,$sheet); if ($link!='') { $val = "$val"; } } $out .= "".nl2br($val).""; $out .= "
"; return $out; } // -------------- // END PUBLIC API var $boundsheets = array(); var $formatRecords = array(); var $fontRecords = array(); var $xfRecords = array(); var $colInfo = array(); var $rowInfo = array(); var $sst = array(); var $sheets = array(); var $data; var $_ole; var $_defaultEncoding = "UTF-8"; var $_defaultFormat = SPREADSHEET_EXCEL_READER_DEF_NUM_FORMAT; var $_columnsFormat = array(); var $_rowoffset = 1; var $_coloffset = 1; /** * List of default date formats used by Excel */ var $dateFormats = array ( 0xe => "m/d/Y", 0xf => "M-d-Y", 0x10 => "d-M", 0x11 => "M-Y", 0x12 => "h:i a", 0x13 => "h:i:s a", 0x14 => "H:i", 0x15 => "H:i:s", 0x16 => "d/m/Y H:i", 0x2d => "i:s", 0x2e => "H:i:s", 0x2f => "i:s.S" ); /** * Default number formats used by Excel */ var $numberFormats = array( 0x1 => "0", 0x2 => "0.00", 0x3 => "#,##0", 0x4 => "#,##0.00", 0x5 => "\$#,##0;(\$#,##0)", 0x6 => "\$#,##0;[Red](\$#,##0)", 0x7 => "\$#,##0.00;(\$#,##0.00)", 0x8 => "\$#,##0.00;[Red](\$#,##0.00)", 0x9 => "0%", 0xa => "0.00%", 0xb => "0.00E+00", 0x25 => "#,##0;(#,##0)", 0x26 => "#,##0;[Red](#,##0)", 0x27 => "#,##0.00;(#,##0.00)", 0x28 => "#,##0.00;[Red](#,##0.00)", 0x29 => "#,##0;(#,##0)", // Not exactly 0x2a => "\$#,##0;(\$#,##0)", // Not exactly 0x2b => "#,##0.00;(#,##0.00)", // Not exactly 0x2c => "\$#,##0.00;(\$#,##0.00)", // Not exactly 0x30 => "##0.0E+0" ); var $colors = Array( 0x00 => "#000000", 0x01 => "#FFFFFF", 0x02 => "#FF0000", 0x03 => "#00FF00", 0x04 => "#0000FF", 0x05 => "#FFFF00", 0x06 => "#FF00FF", 0x07 => "#00FFFF", 0x08 => "#000000", 0x09 => "#FFFFFF", 0x0A => "#FF0000", 0x0B => "#00FF00", 0x0C => "#0000FF", 0x0D => "#FFFF00", 0x0E => "#FF00FF", 0x0F => "#00FFFF", 0x10 => "#800000", 0x11 => "#008000", 0x12 => "#000080", 0x13 => "#808000", 0x14 => "#800080", 0x15 => "#008080", 0x16 => "#C0C0C0", 0x17 => "#808080", 0x18 => "#9999FF", 0x19 => "#993366", 0x1A => "#FFFFCC", 0x1B => "#CCFFFF", 0x1C => "#660066", 0x1D => "#FF8080", 0x1E => "#0066CC", 0x1F => "#CCCCFF", 0x20 => "#000080", 0x21 => "#FF00FF", 0x22 => "#FFFF00", 0x23 => "#00FFFF", 0x24 => "#800080", 0x25 => "#800000", 0x26 => "#008080", 0x27 => "#0000FF", 0x28 => "#00CCFF", 0x29 => "#CCFFFF", 0x2A => "#CCFFCC", 0x2B => "#FFFF99", 0x2C => "#99CCFF", 0x2D => "#FF99CC", 0x2E => "#CC99FF", 0x2F => "#FFCC99", 0x30 => "#3366FF", 0x31 => "#33CCCC", 0x32 => "#99CC00", 0x33 => "#FFCC00", 0x34 => "#FF9900", 0x35 => "#FF6600", 0x36 => "#666699", 0x37 => "#969696", 0x38 => "#003366", 0x39 => "#339966", 0x3A => "#003300", 0x3B => "#333300", 0x3C => "#993300", 0x3D => "#993366", 0x3E => "#333399", 0x3F => "#333333", 0x40 => "#000000", 0x41 => "#FFFFFF", 0x43 => "#000000", 0x4D => "#000000", 0x4E => "#FFFFFF", 0x4F => "#000000", 0x50 => "#FFFFFF", 0x51 => "#000000", 0x7FFF => "#000000" ); var $lineStyles = array( 0x00 => "", 0x01 => "Thin", 0x02 => "Medium", 0x03 => "Dashed", 0x04 => "Dotted", 0x05 => "Thick", 0x06 => "Double", 0x07 => "Hair", 0x08 => "Medium dashed", 0x09 => "Thin dash-dotted", 0x0A => "Medium dash-dotted", 0x0B => "Thin dash-dot-dotted", 0x0C => "Medium dash-dot-dotted", 0x0D => "Slanted medium dash-dotted" ); var $lineStylesCss = array( "Thin" => "1px solid", "Medium" => "2px solid", "Dashed" => "1px dashed", "Dotted" => "1px dotted", "Thick" => "3px solid", "Double" => "double", "Hair" => "1px solid", "Medium dashed" => "2px dashed", "Thin dash-dotted" => "1px dashed", "Medium dash-dotted" => "2px dashed", "Thin dash-dot-dotted" => "1px dashed", "Medium dash-dot-dotted" => "2px dashed", "Slanted medium dash-dotte" => "2px dashed" ); function read16bitstring($data, $start) { $len = 0; while (ord($data[$start + $len]) + ord($data[$start + $len + 1]) > 0) $len++; return substr($data, $start, $len); } // ADDED by Matt Kruse for better formatting function _format_value($format,$num,$f) { // 49==TEXT format // http://code.google.com/p/php-excel-reader/issues/detail?id=7 if ( (!$f && $format=="%s") || ($f==49) || ($format=="GENERAL") ) { return array('string'=>$num, 'formatColor'=>null); } // Custom pattern can be POSITIVE;NEGATIVE;ZERO // The "text" option as 4th parameter is not handled $parts = explode(";",$format); $pattern = $parts[0]; // Negative pattern if (count($parts)>2 && $num==0) { $pattern = $parts[2]; } // Zero pattern if (count($parts)>1 && $num<0) { $pattern = $parts[1]; $num = abs($num); } $color = ""; $matches = array(); $color_regex = "/^\[(BLACK|BLUE|CYAN|GREEN|MAGENTA|RED|WHITE|YELLOW)\]/i"; if (preg_match($color_regex,$pattern,$matches)) { $color = strtolower($matches[1]); $pattern = preg_replace($color_regex,"",$pattern); } // In Excel formats, "_" is used to add spacing, which we can't do in HTML $pattern = preg_replace("/_./","",$pattern); // Some non-number characters are escaped with \, which we don't need $pattern = preg_replace("/\\\/","",$pattern); // Some non-number strings are quoted, so we'll get rid of the quotes $pattern = preg_replace("/\"/","",$pattern); // TEMPORARY - Convert # to 0 $pattern = preg_replace("/\#/","0",$pattern); // Find out if we need comma formatting $has_commas = preg_match("/,/",$pattern); if ($has_commas) { $pattern = preg_replace("/,/","",$pattern); } // Handle Percentages if (preg_match("/\d(\%)([^\%]|$)/",$pattern,$matches)) { $num = $num* 100; $pattern = preg_replace("/(\d)(\%)([^\%]|$)/","$1%$3",$pattern); } // Handle the number itself $number_regex = "/(\d+)(\.?)(\d*)/"; if (preg_match($number_regex,$pattern,$matches)) { $left = $matches[1]; $dec = $matches[2]; $right = $matches[3]; if ($has_commas) { $formatted = number_format($num,strlen($right)); } else { $sprintf_pattern = "%1.".strlen($right)."f"; $formatted = sprintf($sprintf_pattern, $num); } $pattern = preg_replace($number_regex, $formatted, $pattern); } return array( 'string'=>$pattern, 'formatColor'=>$color ); } /** * Constructor * * Some basic initialisation */ function Spreadsheet_Excel_Reader($file='',$store_extended_info=true,$outputEncoding='') { $this->_ole = new OLERead(); $this->setUTFEncoder('iconv'); if ($outputEncoding != '') { $this->setOutputEncoding($outputEncoding); } for ($i=1; $i<245; $i++) { $name = strtolower(( (($i-1)/26>=1)?chr(($i-1)/26+64):'') . chr(($i-1)%26+65)); $this->colnames[$name] = $i; $this->colindexes[$i] = $name; } $this->store_extended_info = $store_extended_info; if ($file!="") { $this->read($file); } } /** * Set the encoding method */ function setOutputEncoding($encoding) { $this->_defaultEncoding = $encoding; } /** * $encoder = 'iconv' or 'mb' * set iconv if you would like use 'iconv' for encode UTF-16LE to your encoding * set mb if you would like use 'mb_convert_encoding' for encode UTF-16LE to your encoding */ function setUTFEncoder($encoder = 'iconv') { $this->_encoderFunction = ''; if ($encoder == 'iconv') { $this->_encoderFunction = function_exists('iconv') ? 'iconv' : ''; } elseif ($encoder == 'mb') { $this->_encoderFunction = function_exists('mb_convert_encoding') ? 'mb_convert_encoding' : ''; } } function setRowColOffset($iOffset) { $this->_rowoffset = $iOffset; $this->_coloffset = $iOffset; } /** * Set the default number format */ function setDefaultFormat($sFormat) { $this->_defaultFormat = $sFormat; } /** * Force a column to use a certain format */ function setColumnFormat($column, $sFormat) { $this->_columnsFormat[$column] = $sFormat; } /** * Read the spreadsheet file using OLE, then parse */ function read($sFileName) { $res = $this->_ole->read($sFileName); // oops, something goes wrong (Darko Miljanovic) if($res === false) { // check error code if($this->_ole->error == 1) { // bad file die('The filename ' . $sFileName . ' is not readable'); } // check other error codes here (eg bad fileformat, etc...) } $this->data = $this->_ole->getWorkBook(); $this->_parse(); } /** * Parse a workbook * * @access private * @return bool */ function _parse() { $pos = 0; $data = $this->data; $code = v($data,$pos); $length = v($data,$pos+2); $version = v($data,$pos+4); $substreamType = v($data,$pos+6); $this->version = $version; if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { return false; } if ($substreamType != SPREADSHEET_EXCEL_READER_WORKBOOKGLOBALS){ return false; } $pos += $length + 4; $code = v($data,$pos); $length = v($data,$pos+2); while ($code != SPREADSHEET_EXCEL_READER_TYPE_EOF) { switch ($code) { case SPREADSHEET_EXCEL_READER_TYPE_SST: $spos = $pos + 4; $limitpos = $spos + $length; $uniqueStrings = $this->_GetInt4d($data, $spos+4); $spos += 8; for ($i = 0; $i < $uniqueStrings; $i++) { // Read in the number of characters if ($spos == $limitpos) { $opcode = v($data,$spos); $conlength = v($data,$spos+2); if ($opcode != 0x3c) { return -1; } $spos += 4; $limitpos = $spos + $conlength; } $numChars = ord($data[$spos]) | (ord($data[$spos+1]) << 8); $spos += 2; $optionFlags = ord($data[$spos]); $spos++; $asciiEncoding = (($optionFlags & 0x01) == 0) ; $extendedString = ( ($optionFlags & 0x04) != 0); // See if string contains formatting information $richString = ( ($optionFlags & 0x08) != 0); if ($richString) { // Read in the crun $formattingRuns = v($data,$spos); $spos += 2; } if ($extendedString) { // Read in cchExtRst $extendedRunLength = $this->_GetInt4d($data, $spos); $spos += 4; } $len = ($asciiEncoding)? $numChars : $numChars*2; if ($spos + $len < $limitpos) { $retstr = substr($data, $spos, $len); $spos += $len; } else{ // found countinue $retstr = substr($data, $spos, $limitpos - $spos); $bytesRead = $limitpos - $spos; $charsLeft = $numChars - (($asciiEncoding) ? $bytesRead : ($bytesRead / 2)); $spos = $limitpos; while ($charsLeft > 0){ $opcode = v($data,$spos); $conlength = v($data,$spos+2); if ($opcode != 0x3c) { return -1; } $spos += 4; $limitpos = $spos + $conlength; $option = ord($data[$spos]); $spos += 1; if ($asciiEncoding && ($option == 0)) { $len = min($charsLeft, $limitpos - $spos); // min($charsLeft, $conlength); $retstr .= substr($data, $spos, $len); $charsLeft -= $len; $asciiEncoding = true; } elseif (!$asciiEncoding && ($option != 0)) { $len = min($charsLeft* 2, $limitpos - $spos); // min($charsLeft, $conlength); $retstr .= substr($data, $spos, $len); $charsLeft -= $len/2; $asciiEncoding = false; } elseif (!$asciiEncoding && ($option == 0)) { // Bummer - the string starts off as Unicode, but after the // continuation it is in straightforward ASCII encoding $len = min($charsLeft, $limitpos - $spos); // min($charsLeft, $conlength); for ($j = 0; $j < $len; $j++) { $retstr .= $data[$spos + $j].chr(0); } $charsLeft -= $len; $asciiEncoding = false; } else{ $newstr = ''; for ($j = 0; $j < strlen($retstr); $j++) { $newstr = $retstr[$j].chr(0); } $retstr = $newstr; $len = min($charsLeft* 2, $limitpos - $spos); // min($charsLeft, $conlength); $retstr .= substr($data, $spos, $len); $charsLeft -= $len/2; $asciiEncoding = false; } $spos += $len; } } //$retstr = ($asciiEncoding) ? $retstr : $this->_encodeUTF16($retstr); $retstr = ($asciiEncoding) ? iconv('iso-8859-1', $this->_defaultEncoding, $retstr) : $this->_encodeUTF16($retstr); if ($richString){ $spos += 4* $formattingRuns; } // For extended strings, skip over the extended string data if ($extendedString) { $spos += $extendedRunLength; } $this->sst[]=$retstr; } break; case SPREADSHEET_EXCEL_READER_TYPE_FILEPASS: return false; break; case SPREADSHEET_EXCEL_READER_TYPE_NAME: break; case SPREADSHEET_EXCEL_READER_TYPE_FORMAT: $indexCode = v($data,$pos+4); if ($version == SPREADSHEET_EXCEL_READER_BIFF8) { $numchars = v($data,$pos+6); if (ord($data[$pos+8]) == 0){ $formatString = substr($data, $pos+9, $numchars); } else { $formatString = substr($data, $pos+9, $numchars*2); } } else { $numchars = ord($data[$pos+6]); $formatString = substr($data, $pos+7, $numchars*2); } $this->formatRecords[$indexCode] = $formatString; break; case SPREADSHEET_EXCEL_READER_TYPE_FONT: $height = v($data,$pos+4); $option = v($data,$pos+6); $color = v($data,$pos+8); $weight = v($data,$pos+10); $under = ord($data[$pos+14]); $font = ""; // Font name $numchars = ord($data[$pos+18]); if ((ord($data[$pos+19]) & 1) == 0){ $font = substr($data, $pos+20, $numchars); } else { $font = substr($data, $pos+20, $numchars*2); $font = $this->_encodeUTF16($font); } $this->fontRecords[] = array( 'height' => $height / 20, 'italic' => !!($option & 2), 'color' => $color, 'under' => !($under==0), 'bold' => ($weight==700), 'font' => $font, 'raw' => $this->dumpHexData($data, $pos+3, $length) ); break; case SPREADSHEET_EXCEL_READER_TYPE_PALETTE: $colors = ord($data[$pos+4]) | ord($data[$pos+5]) << 8; for ($coli = 0; $coli < $colors; $coli++) { $colOff = $pos + 2 + ($coli* 4); $colr = ord($data[$colOff]); $colg = ord($data[$colOff+1]); $colb = ord($data[$colOff+2]); $this->colors[0x07 + $coli] = '#' . $this->myhex($colr) . $this->myhex($colg) . $this->myhex($colb); } break; case SPREADSHEET_EXCEL_READER_TYPE_XF: $fontIndexCode = (ord($data[$pos+4]) | ord($data[$pos+5]) << 8) - 1; $fontIndexCode = max(0,$fontIndexCode); $indexCode = ord($data[$pos+6]) | ord($data[$pos+7]) << 8; $alignbit = ord($data[$pos+10]) & 3; $bgi = (ord($data[$pos+22]) | ord($data[$pos+23]) << 8) & 0x3FFF; $bgcolor = ($bgi & 0x7F); // $bgcolor = ($bgi & 0x3f80) >> 7; $align = ""; if ($alignbit==3) { $align="right"; } if ($alignbit==2) { $align="center"; } $fillPattern = (ord($data[$pos+21]) & 0xFC) >> 2; if ($fillPattern == 0) { $bgcolor = ""; } $xf = array(); $xf['formatIndex'] = $indexCode; $xf['align'] = $align; $xf['fontIndex'] = $fontIndexCode; $xf['bgColor'] = $bgcolor; $xf['fillPattern'] = $fillPattern; $border = ord($data[$pos+14]) | (ord($data[$pos+15]) << 8) | (ord($data[$pos+16]) << 16) | (ord($data[$pos+17]) << 24); $xf['borderLeft'] = $this->lineStyles[($border & 0xF)]; $xf['borderRight'] = $this->lineStyles[($border & 0xF0) >> 4]; $xf['borderTop'] = $this->lineStyles[($border & 0xF00) >> 8]; $xf['borderBottom'] = $this->lineStyles[($border & 0xF000) >> 12]; $xf['borderLeftColor'] = ($border & 0x7F0000) >> 16; $xf['borderRightColor'] = ($border & 0x3F800000) >> 23; $border = (ord($data[$pos+18]) | ord($data[$pos+19]) << 8); $xf['borderTopColor'] = ($border & 0x7F); $xf['borderBottomColor'] = ($border & 0x3F80) >> 7; if (array_key_exists($indexCode, $this->dateFormats)) { $xf['type'] = 'date'; $xf['format'] = $this->dateFormats[$indexCode]; if ($align=='') { $xf['align'] = 'right'; } }elseif (array_key_exists($indexCode, $this->numberFormats)) { $xf['type'] = 'number'; $xf['format'] = $this->numberFormats[$indexCode]; if ($align=='') { $xf['align'] = 'right'; } }else{ $isdate = FALSE; $formatstr = ''; if ($indexCode > 0){ if (isset($this->formatRecords[$indexCode])) $formatstr = $this->formatRecords[$indexCode]; if ($formatstr!="") { $tmp = preg_replace("/\;.*/","",$formatstr); $tmp = preg_replace("/^\[[^\]]*\]/","",$tmp); if (preg_match("/[^hmsday\/\-:\s\\\,AMP]/i", $tmp) == 0) { // found day and time format $isdate = TRUE; $formatstr = $tmp; $formatstr = str_replace(array('AM/PM','mmmm','mmm'), array('a','F','M'), $formatstr); // m/mm are used for both minutes and months - oh SNAP! // This mess tries to fix for that. // 'm' == minutes only if following h/hh or preceding s/ss $formatstr = preg_replace("/(h:?)mm?/","$1i", $formatstr); $formatstr = preg_replace("/mm?(:?s)/","i$1", $formatstr); // A single 'm' = n in PHP $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); $formatstr = preg_replace("/(^|[^m])m([^m]|$)/", '$1n$2', $formatstr); // else it's months $formatstr = str_replace('mm', 'm', $formatstr); // Convert single 'd' to 'j' $formatstr = preg_replace("/(^|[^d])d([^d]|$)/", '$1j$2', $formatstr); $formatstr = str_replace(array('dddd','ddd','dd','yyyy','yy','hh','h'), array('l','D','d','Y','y','H','g'), $formatstr); $formatstr = preg_replace("/ss?/", 's', $formatstr); } } } if ($isdate){ $xf['type'] = 'date'; $xf['format'] = $formatstr; if ($align=='') { $xf['align'] = 'right'; } }else{ // If the format string has a 0 or # in it, we'll assume it's a number if (preg_match("/[0#]/", $formatstr)) { $xf['type'] = 'number'; if ($align=='') { $xf['align']='right'; } } else { $xf['type'] = 'other'; } $xf['format'] = $formatstr; $xf['code'] = $indexCode; } } $this->xfRecords[] = $xf; break; case SPREADSHEET_EXCEL_READER_TYPE_NINETEENFOUR: $this->nineteenFour = (ord($data[$pos+4]) == 1); break; case SPREADSHEET_EXCEL_READER_TYPE_BOUNDSHEET: $rec_offset = $this->_GetInt4d($data, $pos+4); $rec_typeFlag = ord($data[$pos+8]); $rec_visibilityFlag = ord($data[$pos+9]); $rec_length = ord($data[$pos+10]); if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ $chartype = ord($data[$pos+11]); if ($chartype == 0){ $rec_name = substr($data, $pos+12, $rec_length); } else { $rec_name = $this->_encodeUTF16(substr($data, $pos+12, $rec_length*2)); } }elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ $rec_name = substr($data, $pos+11, $rec_length); } $this->boundsheets[] = array('name'=>$rec_name,'offset'=>$rec_offset); break; } $pos += $length + 4; $code = ord($data[$pos]) | ord($data[$pos+1])<<8; $length = ord($data[$pos+2]) | ord($data[$pos+3])<<8; } foreach ($this->boundsheets as $key=>$val){ $this->sn = $key; $this->_parsesheet($val['offset']); } return true; } /** * Parse a worksheet */ function _parsesheet($spos) { $cont = true; $data = $this->data; // read BOF $code = ord($data[$spos]) | ord($data[$spos+1])<<8; $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $version = ord($data[$spos + 4]) | ord($data[$spos + 5])<<8; $substreamType = ord($data[$spos + 6]) | ord($data[$spos + 7])<<8; if (($version != SPREADSHEET_EXCEL_READER_BIFF8) && ($version != SPREADSHEET_EXCEL_READER_BIFF7)) { return -1; } if ($substreamType != SPREADSHEET_EXCEL_READER_WORKSHEET){ return -2; } $spos += $length + 4; while($cont) { $lowcode = ord($data[$spos]); if ($lowcode == SPREADSHEET_EXCEL_READER_TYPE_EOF) break; $code = $lowcode | ord($data[$spos+1])<<8; $length = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $spos += 4; $this->sheets[$this->sn]['maxrow'] = $this->_rowoffset - 1; $this->sheets[$this->sn]['maxcol'] = $this->_coloffset - 1; unset($this->rectype); switch ($code) { case SPREADSHEET_EXCEL_READER_TYPE_DIMENSION: if (!isset($this->numRows)) { if (($length == 10) || ($version == SPREADSHEET_EXCEL_READER_BIFF7)){ $this->sheets[$this->sn]['numRows'] = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; $this->sheets[$this->sn]['numCols'] = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; } else { $this->sheets[$this->sn]['numRows'] = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; $this->sheets[$this->sn]['numCols'] = ord($data[$spos+10]) | ord($data[$spos+11]) << 8; } } break; case SPREADSHEET_EXCEL_READER_TYPE_MERGEDCELLS: $cellRanges = ord($data[$spos]) | ord($data[$spos+1])<<8; for ($i = 0; $i < $cellRanges; $i++) { $fr = ord($data[$spos + 8*$i + 2]) | ord($data[$spos + 8*$i + 3])<<8; $lr = ord($data[$spos + 8*$i + 4]) | ord($data[$spos + 8*$i + 5])<<8; $fc = ord($data[$spos + 8*$i + 6]) | ord($data[$spos + 8*$i + 7])<<8; $lc = ord($data[$spos + 8*$i + 8]) | ord($data[$spos + 8*$i + 9])<<8; if ($lr - $fr > 0) { $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['rowspan'] = $lr - $fr + 1; } if ($lc - $fc > 0) { $this->sheets[$this->sn]['cellsInfo'][$fr+1][$fc+1]['colspan'] = $lc - $fc + 1; } } break; case SPREADSHEET_EXCEL_READER_TYPE_RK: case SPREADSHEET_EXCEL_READER_TYPE_RK2: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $rknum = $this->_GetInt4d($data, $spos + 6); $numValue = $this->_GetIEEE754($rknum); $info = $this->_getCellDetails($spos,$numValue,$column); $this->addcell($row, $column, $info['string'],$info); break; case SPREADSHEET_EXCEL_READER_TYPE_LABELSST: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $xfindex = ord($data[$spos+4]) | ord($data[$spos+5])<<8; $index = $this->_GetInt4d($data, $spos + 6); $this->addcell($row, $column, $this->sst[$index], array('xfIndex'=>$xfindex) ); break; case SPREADSHEET_EXCEL_READER_TYPE_MULRK: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $colFirst = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $colLast = ord($data[$spos + $length - 2]) | ord($data[$spos + $length - 1])<<8; $columns = $colLast - $colFirst + 1; $tmppos = $spos+4; for ($i = 0; $i < $columns; $i++) { $numValue = $this->_GetIEEE754($this->_GetInt4d($data, $tmppos + 2)); $info = $this->_getCellDetails($tmppos-4,$numValue,$colFirst + $i + 1); $tmppos += 6; $this->addcell($row, $colFirst + $i, $info['string'], $info); } break; case SPREADSHEET_EXCEL_READER_TYPE_NUMBER: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); // It machine machine dependent if ($this->isDate($spos)) { $numValue = $tmp['double']; } else { $numValue = $this->createNumber($spos); } $info = $this->_getCellDetails($spos,$numValue,$column); $this->addcell($row, $column, $info['string'], $info); break; case SPREADSHEET_EXCEL_READER_TYPE_FORMULA: case SPREADSHEET_EXCEL_READER_TYPE_FORMULA2: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; if ((ord($data[$spos+6])==0) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { //String formula. Result follows in a STRING record // This row/col are stored to be referenced in that record // http://code.google.com/p/php-excel-reader/issues/detail?id=4 $previousRow = $row; $previousCol = $column; } elseif ((ord($data[$spos+6])==1) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { //Boolean formula. Result is in +2; 0=false,1=true // http://code.google.com/p/php-excel-reader/issues/detail?id=4 if (ord($this->data[$spos+8])==1) { $this->addcell($row, $column, "TRUE"); } else { $this->addcell($row, $column, "FALSE"); } } elseif ((ord($data[$spos+6])==2) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { //Error formula. Error code is in +2; } elseif ((ord($data[$spos+6])==3) && (ord($data[$spos+12])==255) && (ord($data[$spos+13])==255)) { //Formula result is a null string. $this->addcell($row, $column, ''); } else { // result is a number, so first 14 bytes are just like a _NUMBER record $tmp = unpack("ddouble", substr($data, $spos + 6, 8)); // It machine machine dependent if ($this->isDate($spos)) { $numValue = $tmp['double']; } else { $numValue = $this->createNumber($spos); } $info = $this->_getCellDetails($spos,$numValue,$column); $this->addcell($row, $column, $info['string'], $info); } break; case SPREADSHEET_EXCEL_READER_TYPE_BOOLERR: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $string = ord($data[$spos+6]); $this->addcell($row, $column, $string); break; case SPREADSHEET_EXCEL_READER_TYPE_STRING: // http://code.google.com/p/php-excel-reader/issues/detail?id=4 if ($version == SPREADSHEET_EXCEL_READER_BIFF8){ // Unicode 16 string, like an SST record $xpos = $spos; $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); $xpos += 2; $optionFlags =ord($data[$xpos]); $xpos++; $asciiEncoding = (($optionFlags &0x01) == 0) ; $extendedString = (($optionFlags & 0x04) != 0); // See if string contains formatting information $richString = (($optionFlags & 0x08) != 0); if ($richString) { // Read in the crun $formattingRuns =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); $xpos += 2; } if ($extendedString) { // Read in cchExtRst $extendedRunLength =$this->_GetInt4d($this->data, $xpos); $xpos += 4; } $len = ($asciiEncoding)?$numChars : $numChars*2; $retstr =substr($data, $xpos, $len); $xpos += $len; $retstr = ($asciiEncoding)? $retstr : $this->_encodeUTF16($retstr); } elseif ($version == SPREADSHEET_EXCEL_READER_BIFF7){ // Simple byte string $xpos = $spos; $numChars =ord($data[$xpos]) | (ord($data[$xpos+1]) << 8); $xpos += 2; $retstr =substr($data, $xpos, $numChars); } $this->addcell($previousRow, $previousCol, $retstr); break; case SPREADSHEET_EXCEL_READER_TYPE_ROW: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $rowInfo = ord($data[$spos + 6]) | ((ord($data[$spos+7]) << 8) & 0x7FFF); if (($rowInfo & 0x8000) > 0) { $rowHeight = -1; } else { $rowHeight = $rowInfo & 0x7FFF; } $rowHidden = (ord($data[$spos + 12]) & 0x20) >> 5; $this->rowInfo[$this->sn][$row+1] = Array('height' => $rowHeight / 20, 'hidden'=>$rowHidden ); break; case SPREADSHEET_EXCEL_READER_TYPE_DBCELL: break; case SPREADSHEET_EXCEL_READER_TYPE_MULBLANK: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $cols = ($length / 2) - 3; for ($c = 0; $c < $cols; $c++) { $xfindex = ord($data[$spos + 4 + ($c* 2)]) | ord($data[$spos + 5 + ($c* 2)])<<8; $this->addcell($row, $column + $c, "", array('xfIndex'=>$xfindex)); } break; case SPREADSHEET_EXCEL_READER_TYPE_LABEL: $row = ord($data[$spos]) | ord($data[$spos+1])<<8; $column = ord($data[$spos+2]) | ord($data[$spos+3])<<8; $this->addcell($row, $column, substr($data, $spos + 8, ord($data[$spos + 6]) | ord($data[$spos + 7])<<8)); break; case SPREADSHEET_EXCEL_READER_TYPE_EOF: $cont = false; break; case SPREADSHEET_EXCEL_READER_TYPE_HYPER: // Only handle hyperlinks to a URL $row = ord($this->data[$spos]) | ord($this->data[$spos+1])<<8; $row2 = ord($this->data[$spos+2]) | ord($this->data[$spos+3])<<8; $column = ord($this->data[$spos+4]) | ord($this->data[$spos+5])<<8; $column2 = ord($this->data[$spos+6]) | ord($this->data[$spos+7])<<8; $linkdata = Array(); $flags = ord($this->data[$spos + 28]); $udesc = ""; $ulink = ""; $uloc = 32; $linkdata['flags'] = $flags; if (($flags & 1) > 0 ) { // is a type we understand // is there a description ? if (($flags & 0x14) == 0x14 ) { // has a description $uloc += 4; $descLen = ord($this->data[$spos + 32]) | ord($this->data[$spos + 33]) << 8; $udesc = substr($this->data, $spos + $uloc, $descLen* 2); $uloc += 2* $descLen; } $ulink = $this->read16bitstring($this->data, $spos + $uloc + 20); if ($udesc == "") { $udesc = $ulink; } } $linkdata['desc'] = $udesc; $linkdata['link'] = $this->_encodeUTF16($ulink); for ($r=$row; $r<=$row2; $r++) { for ($c=$column; $c<=$column2; $c++) { $this->sheets[$this->sn]['cellsInfo'][$r+1][$c+1]['hyperlink'] = $linkdata; } } break; case SPREADSHEET_EXCEL_READER_TYPE_DEFCOLWIDTH: $this->defaultColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; break; case SPREADSHEET_EXCEL_READER_TYPE_STANDARDWIDTH: $this->standardColWidth = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; break; case SPREADSHEET_EXCEL_READER_TYPE_COLINFO: $colfrom = ord($data[$spos+0]) | ord($data[$spos+1]) << 8; $colto = ord($data[$spos+2]) | ord($data[$spos+3]) << 8; $cw = ord($data[$spos+4]) | ord($data[$spos+5]) << 8; $cxf = ord($data[$spos+6]) | ord($data[$spos+7]) << 8; $co = ord($data[$spos+8]); for ($coli = $colfrom; $coli <= $colto; $coli++) { $this->colInfo[$this->sn][$coli+1] = Array('width' => $cw, 'xf' => $cxf, 'hidden' => ($co & 0x01), 'collapsed' => ($co & 0x1000) >> 12); } break; default: break; } $spos += $length; } if (!isset($this->sheets[$this->sn]['numRows'])) $this->sheets[$this->sn]['numRows'] = $this->sheets[$this->sn]['maxrow']; if (!isset($this->sheets[$this->sn]['numCols'])) $this->sheets[$this->sn]['numCols'] = $this->sheets[$this->sn]['maxcol']; } function isDate($spos) { $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; return ($this->xfRecords[$xfindex]['type'] == 'date'); } // Get the details for a particular cell function _getCellDetails($spos,$numValue,$column) { $xfindex = ord($this->data[$spos+4]) | ord($this->data[$spos+5]) << 8; $xfrecord = $this->xfRecords[$xfindex]; $type = $xfrecord['type']; $format = $xfrecord['format']; $formatIndex = $xfrecord['formatIndex']; $fontIndex = $xfrecord['fontIndex']; $formatColor = ""; $rectype = ''; $string = ''; $raw = ''; if (isset($this->_columnsFormat[$column + 1])){ $format = $this->_columnsFormat[$column + 1]; } if ($type == 'date') { // See http://groups.google.com/group/php-excel-reader-discuss/browse_frm/thread/9c3f9790d12d8e10/f2045c2369ac79de $rectype = 'date'; // Convert numeric value into a date $utcDays = floor($numValue - ($this->nineteenFour ? SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS1904 : SPREADSHEET_EXCEL_READER_UTCOFFSETDAYS)); $utcValue = ($utcDays)* SPREADSHEET_EXCEL_READER_MSINADAY; $dateinfo = gmgetdate($utcValue); $raw = $numValue; $fractionalDay = $numValue - floor($numValue) + .0000001; // The .0000001 is to fix for php/excel fractional diffs $totalseconds = floor(SPREADSHEET_EXCEL_READER_MSINADAY* $fractionalDay); $secs = $totalseconds % 60; $totalseconds -= $secs; $hours = floor($totalseconds / (60* 60)); $mins = floor($totalseconds / 60) % 60; $string = date ($format, mktime($hours, $mins, $secs, $dateinfo["mon"], $dateinfo["mday"], $dateinfo["year"])); } else if ($type == 'number') { $rectype = 'number'; $formatted = $this->_format_value($format, $numValue, $formatIndex); $string = $formatted['string']; $formatColor = $formatted['formatColor']; $raw = $numValue; } else{ if ($format=="") { $format = $this->_defaultFormat; } $rectype = 'unknown'; $formatted = $this->_format_value($format, $numValue, $formatIndex); $string = $formatted['string']; $formatColor = $formatted['formatColor']; $raw = $numValue; } return array( 'string'=>$string, 'raw'=>$raw, 'rectype'=>$rectype, 'format'=>$format, 'formatIndex'=>$formatIndex, 'fontIndex'=>$fontIndex, 'formatColor'=>$formatColor, 'xfIndex'=>$xfindex ); } function createNumber($spos) { $rknumhigh = $this->_GetInt4d($this->data, $spos + 10); $rknumlow = $this->_GetInt4d($this->data, $spos + 6); $sign = ($rknumhigh & 0x80000000) >> 31; $exp = ($rknumhigh & 0x7ff00000) >> 20; $mantissa = (0x100000 | ($rknumhigh & 0x000fffff)); $mantissalow1 = ($rknumlow & 0x80000000) >> 31; $mantissalow2 = ($rknumlow & 0x7fffffff); $value = $mantissa / pow( 2 , (20- ($exp - 1023))); if ($mantissalow1 != 0) $value += 1 / pow (2 , (21 - ($exp - 1023))); $value += $mantissalow2 / pow (2 , (52 - ($exp - 1023))); if ($sign) {$value = -1* $value;} return $value; } function addcell($row, $col, $string, $info=null) { $this->sheets[$this->sn]['maxrow'] = max($this->sheets[$this->sn]['maxrow'], $row + $this->_rowoffset); $this->sheets[$this->sn]['maxcol'] = max($this->sheets[$this->sn]['maxcol'], $col + $this->_coloffset); $this->sheets[$this->sn]['cells'][$row + $this->_rowoffset][$col + $this->_coloffset] = $string; if ($this->store_extended_info && $info) { foreach ($info as $key=>$val) { $this->sheets[$this->sn]['cellsInfo'][$row + $this->_rowoffset][$col + $this->_coloffset][$key] = $val; } } } function _GetIEEE754($rknum) { if (($rknum & 0x02) != 0) { $value = $rknum >> 2; } else { //mmp // I got my info on IEEE754 encoding from // http://research.microsoft.com/~hollasch/cgindex/coding/ieeefloat.html // The RK format calls for using only the most significant 30 bits of the // 64 bit floating point value. The other 34 bits are assumed to be 0 // So, we use the upper 30 bits of $rknum as follows... $sign = ($rknum & 0x80000000) >> 31; $exp = ($rknum & 0x7ff00000) >> 20; $mantissa = (0x100000 | ($rknum & 0x000ffffc)); $value = $mantissa / pow( 2 , (20- ($exp - 1023))); if ($sign) { $value = -1* $value; } //end of changes by mmp } if (($rknum & 0x01) != 0) { $value /= 100; } return $value; } function _encodeUTF16($string) { $result = $string; if ($this->_defaultEncoding){ switch ($this->_encoderFunction){ case 'iconv' : $result = @iconv('UTF-16LE', $this->_defaultEncoding, $string); break; case 'mb_convert_encoding' : $result = @mb_convert_encoding($string, $this->_defaultEncoding, 'UTF-16LE' ); break; } } return $result; } function _GetInt4d($data, $pos) { $value = ord($data[$pos]) | (ord($data[$pos+1]) << 8) | (ord($data[$pos+2]) << 16) | (ord($data[$pos+3]) << 24); if ($value>=4294967294) { $value=-2; } return $value; } } ?> PK>\oV!k!khelpers/file/import/xml.phpnuW+A_getXmlFields() == true) { $jinput = JFactory::getApplication()->input; $jinput->set('columnheaders', $this->_xml_fields); return true; } else { /** * Note: clearing the value when no fields found causes a problem when processing * XML files with the 'use headers' option set because the function is called after the * end of file has been reached. When an empty set of fields is returned, the program * fails to terminate properly and loops endlessly through the import continuation page. */ return false; } } /** * Get the file position * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return int current position in the file * @since 3.0 */ public function getFilePos() { return $this->linepointer; } /** * Set the file position * * To be able to set the file position correctly, the XML reader needs to be at the start of the file * * @copyright * @author RolandD * @todo * @see * @access public * @param int $pos the position to move to * @return int current position in the file * @since 3.0 */ public function setFilePos($pos) { // Close the XML reader $this->closeFile(false); // Open a new XML reader $this->processFile(); // Move the pointer to the specified position return $this->_skipXmlRecords($pos); } /** * Close the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function closeFile($removefolder=true) { $this->data->close(); $this->_xml_cache = false; $this->_closed = true; parent::closeFile($removefolder); } /** * Read the next line in the file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array with the line of data read | false if data cannot be read * @since 3.0 */ public function readNextLine() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug('Reading next line'); if ($this->_getXmlData() == true) { $this->linepointer++; return $this->_xml_data; } else { return false; } } /** * Process the file to import * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function processFile() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Use a streaming approach to support large files $this->data = new XMLReader(); $this->fp = $this->data->open($this->filename); if ($this->fp == false) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_ERROR_XML_READING_FILE')); return false; } // File opened successfully - Prepare the arrays needed to read data from the XML file $this->fp = $this->_getXmlSchema(); if ($this->fp == false) { $this->closeFile(); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_INVALID_TABLE')); return false; } return true; } /** * Searches an XML file for a series of nodes representing a complete record. The name(s) of the nodes representing records * must be supplied (via the 'xml_nodes_map' field) but the list of fields can be supplied in three ways: * 1 No fields defined in the 'xml_nodes_map' field and the 'use headers' option set to 'off'. Despite the 'use headers' being set * to 'off', the field nodes in the first record are used to configure the whole run. This requires that all fields be present in * every record, the node names match the field names and that all of the 'field' nodes are one level below the 'record' node in * the XML hierarchy. * 2 No fields defined in the 'xml_nodes_map' field and the 'use headers' option set to 'on'. This causes the 'headers to be read * from the XML nodes for every record. This is suitable if not all of the fields are populated for every record in the XML file * but is slower than option 1. * 3 Fields defined in the 'xml_nodes_map' field. The 'use headers' option is ignored. This gives the flexibility to set up a map * so that an XML hierarchy can be modelled, node names to be mapped to field names and also allows fields to be extracted from * node attributes. * * It is possible that the current node when the function is called is the start of the next record. * Valid 'record' node names are held in the $this->_xml_records array. * Valid 'field' node and attribute names are held in the $this->_xml_schema array. * The arrays $this->_xml_data and $this->_xml_fields are populated with data and field names respectively. To prevent SQL errors * when writing the data to the table, only fields found in the array $this->_supported_fields are included. This function could be * extended. * * @copyright * @author doorknob * @todo * @see * @access private * @param * @return bool - indicates whether the array $this->_xml_data was populated. * @since 3.0 */ private function _getXmlFieldsAndData() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Initialise the arrays that will receive the data and field list from the next record $this->_xml_data = array(); $this->_xml_fields = array(); // Validation checking disabled because a DTD (or RELAX NG) schema is required and is usually not available $validate_xml = false; if( $validate_xml == true ) { // Note: When the DTD is external, this must be done before the first read() $this->data->setParserProperty(XMLReader::VALIDATE, true); } /** * Search for the start of the next record but only read the file if the next record is not already current * Must be the correct element type (start of node) and in the list of valid record nodes. * Note: Self closing notes are accepted because they may contain data in the attributes */ if (!$this->_isXmlRecordNode($this->data->nodeType, $this->data->name)) { // Either no current node or the current node is not the start of a record while( $this->data->read() ) { if( $validate_xml == true ) { $this->fp = $this->data->isValid(); if( $this->fp == false ){ $this->closeFile(); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_FILE_INVALID')); return false; } } if( $this->_isXmlRecordNode( $this->data->nodeType, $this->data->name ) ) { // Record node found break; } } } // Check whether a record was found if ($this->_isXmlRecordNode($this->data->nodeType, $this->data->name)) { // Start of a valid record $self_closing = $this->data->isEmptyElement; $record_name = strtolower($this->data->name); // Extract any attributes, if defined if (isset($this->_xml_schema[$record_name]['attrs']) ) { // Record level attributes are defined as fields while( $this->data->moveToNextAttribute() ) { // Check each attribute to determine whether the value should be extracted if( isset($this->_xml_schema[$record_name]['attrs'][strtolower($this->data->name)]) ) { $this->_xml_fields[] = $this->_xml_schema[$record_name]['attrs'][strtolower($this->data->name)]; $this->_xml_data[] = $this->data->value; } } } if ($self_closing == false) { // Now search for group/field nodes $xml_path = array(); /** * Note: $this->data->next() is used rather than $this->data->read() when the readInnerXML() function has been used * to extract the contents of a node. Because the contect extracted may contain other nodes,$this->data->next() is * used to skip to the closing node. * readInnerXML() is used in case the data contains html tags but it doesn't move the file pointer. * Subsequently using $this->data->next() forces the pointer to skip past any HTML tags that have already been read. * The value does not need to be maintained between between calls to this function because readInnerXML() is * never used immediately before exiting the function. */ $use_read = true; while ($use_read == true ? $this->data->read() : $this->data->next() ) { // XML error detection if ($validate_xml == true) { $this->fp = $this->data->isValid(); if( $this->fp == false ){ $this->closeFile(); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_FILE_INVALID')); return false; } } // Default to a reading a single node in the next loop $use_read = true; // Searching for a group or field node if ($this->data->nodeType == XMLReader::ELEMENT) { // New node found $self_closing = $this->data->isEmptyElement; if (empty($this->_xml_schema)) { // Template fields being used to control the data extraction if ($this->_isXmlFieldNameValid($this->data->name)) { // Node corresponding to a supported field found - extract the data $this->_xml_fields[] = strtolower($this->data->name); $xmldata = $this->data->readInnerXML(); $xmldata = str_ireplace(array(''), '', $xmldata); $this->_xml_data[] = $xmldata; // At the next read, skip to the next node at this level $use_read = false; } else { // A node has been found that does not match the available fields list $csvilog->addDebug(JText::sprintf('COM_CSVI_XML_NODE_NOT_MATCH_FIELD', $this->data->name)); } } else { // The user defined map is being used to control the data extraction $current_path = $this->_getXmlNodePath($xml_path, strtolower($this->data->name)); // The node may have attributes that map to fields, regardless of the type of node if (isset($this->_xml_schema[$record_name]['nodes'][$current_path]['attrs'])) { // Node has attributes that are defined as fields while ($this->data->moveToNextAttribute()) { // Check each attribute to determine whether the value should be extracted if( isset($this->_xml_schema[$record_name]['nodes'][$current_path]['attrs'][strtolower($this->data->name)]) ) { $this->_xml_fields[] = $this->_xml_schema[$record_name]['nodes'][$current_path]['attrs'][strtolower($this->data->name)]; $xmldata = $this->data->readInnerXML(); $xmldata = str_ireplace(array(''), '', $xmldata); $this->_xml_data[] = $xmldata; // At the next read, skip to the next node at this level $use_read = false; } } } if (empty($this->_xml_schema[$record_name]['nodes'][$current_path]['field'])) { // This node is not defined as a field if (isset($this->_xml_schema[$record_name]['nodes'][$current_path]['field'])) { // This is a 'group' node - add it to the path unless it is self closing if( $self_closing == false ) { $this->_pushXmlNodePath( $xml_path, $this->data->name ); } } else { // Unknown node found - The file is not mapped correctly and the run cannot continue $csvilog->addDebug(JText::sprintf('COM_CSVI_XML_UNMAPPED_NODE', $this->data->name)); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_XML_UNDEFINED_NODE', $this->data->name)); return false; } } else { // This node is defined as a field - extract the data $this->_xml_fields[] = $this->_xml_schema[$record_name]['nodes'][$current_path]['field']; $xmldata = $this->data->readInnerXML(); $xmldata = str_ireplace(array(''), '', $xmldata); $this->_xml_data[] = $xmldata; // At the next read, skip to the next node at this level $use_read = false; } } } else if ($this->data->nodeType == XMLReader::END_ELEMENT) { // Searching for the end of the record or the end of a group node if( strtolower($this->data->name) == $record_name ) { // End of record found break; } else { // End of node - Only valid case is the end of a group node if( !empty($this->_xml_schema) && !empty($xml_path) && $xml_path[count($xml_path)-1] == strtolower($this->data->name) ) { // End of group node found - pop it from the stack $this->_popXmlNodePath( $xml_path ); } else { // Unknown end of node - error $csvilog->addDebug(JText::sprintf('COM_CSVI_XML_UNEXPECTED_END_NODE', $this->data->name)); } } } } } } $this->_xml_cache = !empty($this->_xml_data); return $this->_xml_cache; } /** * Returns a boolean value to indicate whether the specified node is a new XML record type. * * @copyright * @author doorknob * @todo * @see * @access private * @param * @return bool true if record is a node | false if record is not a node * @since 3.0 */ private function _isXmlRecordNode( $node_type, $node_name ) { return ($node_type == XMLReader::ELEMENT && in_array(strtolower($node_name), $this->_xml_records)); } /** * Returns the list of data values found in the most recently read XML record. If the getXmlFields() function has been * called since the last call of this function, the cache may be full and the data can be returned without reading the file. * * @return array - The list of data values from the most recently read XML record (empty when end of file is reached) */ private function _getXmlData() { $return = !empty($this->_xml_data); if( $this->_xml_cache == false ) { $return = $this->_getXmlFieldsAndData(); } // Indicate that a new record will be required the next time this function is called $this->_xml_cache = false; return $return; } /** * Returns the list of fields found in the most recently read XML record. If the cache is empty, the next record is * read from the input file to ensure that the headers correspond with the data (in XML files, each record can have a * different set of 'headers'). Checking the status of the cache indicator also prevents records being skipped if this * function is called multiple times between records. * * @return array - The list of fields from the most recently read XML record (empty when end of file is reached) */ private function _getXmlFields() { $return = !empty($this->_xml_fields); if ($this->_xml_cache == false) { $return = $this->_getXmlFieldsAndData(); } return $return; } /** * Skips through the XML file until the the required number 'record' nodes has been read * Assume the file pointer is at the start of file * * @copyright * @author doorknob, RolandD * @todo * @see * @access private * @param * @return boolean true if records are skipped | false if records are not skipped * @since 3.0 */ private function _skipXmlRecords($pos) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check whether the pointer needs to be moved if ($pos <= 0) return true; $count = 0; /** * Note: When the DTD is external, this must be done before the first read() * Validation not used because invalid files generate php errors when validated */ $validate_xml = false; if( $validate_xml == true ) { $this->data->setParserProperty(XMLReader::VALIDATE, true); } while ($this->data->read()) { // Validation checking disabled because a DTD (or RELAX NG) schema is required and is usually not available if( $validate_xml == true ) { $this->fp = $this->data->isValid(); if( $this->fp == false ){ $this->closeFile(); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_INVALID')); return false; } } // Searching for a valid record - must be the start of a node and in the list of valid record types if( !$this->_isXmlRecordNode( $this->data->nodeType, $this->data->name ) ) { // Not found - try again continue; } else { // Found a valid record while( $this->_isXmlRecordNode( $this->data->nodeType, $this->data->name ) ) { // Node is a valid record type - skip to the end of the record $this->data->next(); $count++; if( $count == $pos) { return true; } } } } // Hit EOF before skipping the required number of records return false; } /** * Build an array of xml nodes from the user defined map: * * $this->_xml_schema[record_node]['attrs'][attr_name] => field name * $this->_xml_schema[record_node]['nodes'][field_node_path]['attrs'][attr_name] => field name * $this->_xml_schema[record_node]['nodes'][field_node_path]['field'] => field name * Note: field_node_path is a comma separated list of node names below the record node * * @return bool returns true if all fine else false */ private function _getXmlSchema() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $xml_nodes_map = $template->get('xml_nodes_map', 'general', '', 'string', JREQUEST_ALLOWRAW); $xml_node_path = array(); // Single copy of this array that is passed by reference only $current_record = ''; // Single copy of this variable that is passed by reference only return $this->_getXmlNode($xml_nodes_map, $current_record, $xml_node_path); } /** * Process a node from the XML Map * It is permitted for the XML to just define one or more tables without fields (when the 'use headers' option is used) * * Note: Calls itself recursively to process a tree * * @return bool returns true if all fine else false */ private function _getXmlNode($node_content, $current_record, $xml_path) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $current_node = ''; $xml_schema = new XMLReader(); /** * Add a wrapper to make the XML viable and ensure that self closing tags contain a space before the '/>' * The XML may still be invalid but that's down to what the user entered */ $node_content = "\n".$node_content.''; $xml_schema->XML($node_content); // XML file to table map is valid XML - construct the arrays used in file extraction $use_read = true; // The XML could only be validated against a DTD if the syntax of the XML used for the map is made more complex $validate_xml = false; if ($validate_xml == true) { // Note: When the DTD is external, the property value must be set before the first read() $xml_schema->setParserProperty(XMLReader::VALIDATE, true); } while($use_read ? $xml_schema->read() : $xml_schema->next()) { // Validation checking disabled because a DTD (or RELAX NG) schema is required. if ($validate_xml == true) { if( $xml_schema->isValid() == false ){ $xml_schema->close(); return false; } } // Default to a reading a single node in the next loop $use_read = true; // Ignore any node associated with the root if ($xml_schema->name == 'da_root' ) { continue; } // Process start elements if ($xml_schema->nodeType == XMLReader::ELEMENT) { $self_closing = $xml_schema->isEmptyElement; // Ready to add a new node - but only if the last node was closed if (!empty($current_node)) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_XML_NODE_UNCLOSED', $current_node)); return false; } // A new node was found - Check whether this is a new record type if (empty($current_record)) { // New record type // Check for a self-closing node $self_closing = $xml_schema->isEmptyElement; $current_record = strtolower($xml_schema->name); $this->_xml_records[] = strtolower($current_record); // Store any attributes while ($xml_schema->moveToNextAttribute()) { // Note1: $xml_schema->hasValue only indicates whether the element can have a value, not whether it does // Note2: empty($xml_schema->value) always return true, regardless of the actual value $value = $xml_schema->value; if( !empty($value) ) { if( $this->_isXmlFieldNameValid($xml_schema->value) ) { $this->_xml_schema[$current_record]['attrs'][strtolower($xml_schema->name)] = trim($xml_schema->value); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_XML_FILE_MAP_NO_REFERENCE', $xml_schema->value)); $xml_schema->close(); return false; } } } // Check for a self-closing node if( $self_closing == true ) { $current_record = ''; } } else { // New field type $current_node = strtolower($xml_schema->name); $current_path = $this->_getXmlNodePath($xml_path, $current_node); // Store any attributes while ($xml_schema->moveToNextAttribute()) { // Note1: $xml_schema->hasValue only indicates whether the element can have a value, not whether it does // Note2: empty($xml_schema->value) always return true, regardless of the actual value $value = $xml_schema->value; if( !empty($value) ) { if( $this->_isXmlFieldNameValid( $xml_schema->value ) ) { $this->_xml_schema[$current_record]['nodes'][$current_path]['attrs'][strtolower($xml_schema->name)] = trim($xml_schema->value); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_FILE_MAP_NO_REFERENCE', $xml_schema->value)); $xml_schema->close(); return false; } } } $sub_node_content = $xml_schema->readInnerXML(); // Check whether there are any lower level nodes if (strstr($sub_node_content, '<') === false) { /** * Content has no embedded nodes - Assume a field name * Note: An empty node gives a blank field name which indicates an unwanted node * that is being mapped to prevent errors when processing the file */ if ($this->_isXmlFieldNameValid($sub_node_content)) { $this->_xml_schema[$current_record]['nodes'][$current_path]['field'] = trim($sub_node_content); } else { $this->_xml_schema[$current_record]['nodes'][$current_path]['field'] = ''; } } else { // There are embedded nodes - go down another level // Indicate a 'group' node by storing an empty field name $this->_xml_schema[$current_record]['nodes'][$current_path]['field'] = ''; // Push the node name to the path stack $this->_pushXmlNodePath($xml_path, $current_node); if( $this->_getXmlNode($sub_node_content, $current_record, $xml_path) == false ) { $xml_schema->close(); return false; } // At the next read, skip to the next node at this level $use_read = false; // Close the node $current_node = ''; // Pop the last item off the path stack $this->_popXmlNodePath($xml_path); } // Check for a self-closing node if ($self_closing == true) { $current_node = ''; } } } // Process end elements else if( $xml_schema->nodeType == XMLReader::END_ELEMENT ) { // End of node found // Check for end of record if( !empty($current_record) && strtolower($xml_schema->name) == $current_record ) { // End of record detected $current_record = ''; } // Check that the expected node was closed else if( !empty($current_node) && strtolower($xml_schema->name) == $current_node ) { // End of current node detected $current_node = ''; } } } $xml_schema->close(); // Node not terminated if (!empty($current_node) ) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_XML_NODE_NOT_CLOSED', $current_node)); return false; } if (empty($this->_xml_records) ) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_XML_NO_RECORDS_DEFINED')); return false; } return true; } /** * Create a string to represent the XML node hierarchy from the 'record' node to a 'field' node * * @return string */ private function _getXmlNodePath($xml_path, $node_name) { return implode(',', $xml_path).(empty($xml_path) ? '' : ',').$node_name; } /** * Determines whether a specific field name is included in the list of * * @return boolean */ private function _isXmlFieldNameValid($field_name) { return in_array(strtolower($field_name), $this->_supported_fields); } /** * Add a new entry to the XML node stack */ private function _pushXmlNodePath($xml_path, $node_name) { /** * Note: The array index is made explicit because when a new row is added, the index value * assigned is one greater than that previously assigned. When enries are being continuously * added and removed, the automatically assigned index number becomes unpredictable */ $xml_path[count($xml_path)] = strtolower($node_name); } /** * Remove the last entry from the XML node stack * * @copyright * @author doorknob * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _popXmlNodePath($xml_path) { if( count($xml_path) > 1 ) { unset($xml_path[count($xml_path)-1]); } else { $xml_path = array(); } } /** * Sets the file pointer back to beginning * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function rewind() { $this->linepointer = 0; } /** * Advances the file pointer 1 forward * * @copyright * @author RolandD * @todo * @see * @access public * @param bool $preview True if called from the preview * @return * @since 3.0 */ public function next($preview=false) { if (!$preview) $discard = $this->readNextLine(); } } ?> PK>\helpers/file/import/index.htmlnuW+APK>\FXʖ"helpers/file/import/ods_reader.phpnuW+A */ public function read($filename) { $this->_file = $filename; list($this->_xml_parser, $fp) = $this->new_xml_parser($this->_file); if (!$this->_xml_parser) { die("could not open XML input"); } $data = ''; while (!feof($fp)) { $data .= fread($fp, 4096); } fclose($fp); if (!xml_parse($this->_xml_parser, $data, true)) { die(sprintf("XML error: %s at line %d\n", xml_error_string(xml_get_error_code($this->_xml_parser)), xml_get_current_line_number($this->_xml_parser))); } xml_parser_free($this->_xml_parser); $this->cols = count($this->_data[1]); $this->rows = count($this->_data); return true; } /** * Handle the opening element */ private function startElement($parser, $tagname, $attribs) { switch ($tagname) { case 'TABLE:TABLE-ROW': $this->_linecount++; break; case 'TABLE:TABLE-CELL': $styles = array_keys($attribs); if (empty($styles)) { $this->_data[$this->_linecount]['options']['repeat'] = 1; } else { foreach ($styles as $stylekey => $style) { switch ($style) { case 'TABLE:NUMBER-COLUMNS-REPEATED': $this->_data[$this->_linecount]['options']['repeat'] = $attribs[$style]; break; case 'OFFICE:VALUE-TYPE': $this->_data[$this->_linecount]['options']['type'] = $attribs[$style]; break; } } } break; case 'TEXT:P': $this->_data[$this->_linecount]; break; } } /** * Handle the closing element */ private function endElement($parser, $name) { if (array_key_exists($this->_linecount, $this->_data)) { if (!array_key_exists('data', $this->_data[$this->_linecount]) && array_key_exists('options', $this->_data[$this->_linecount])) { foreach ($this->_data[$this->_linecount]['options'] as $option => $value) { switch ($option) { case 'type': break; case 'repeat': for ($r=0; $r < $value; $r++) { $this->_data[$this->_linecount][] = ''; } break; } } } else unset($this->_data[$this->_linecount]['data']); if (array_key_exists('options', $this->_data[$this->_linecount])) unset($this->_data[$this->_linecount]['options']); } } /** * Handle the data * * @todo parse */ private function characterData($parser, $data) { foreach ($this->_data[$this->_linecount]['options'] as $option => $value) { switch ($option) { case 'type': break; case 'repeat': for ($r=1; $r < $value; $r++) { $this->_data[$this->_linecount][] = $data; } break; } } $this->_data[$this->_linecount][] = $data; unset($this->_data[$this->_linecount]['options']); $this->_data[$this->_linecount]['data'] = true; } private function new_xml_parser($file) { $this->_xml_parser = xml_parser_create("UTF-8"); xml_parser_set_option($this->_xml_parser, XML_OPTION_CASE_FOLDING, 1); xml_set_object($this->_xml_parser, $this); xml_set_element_handler($this->_xml_parser, "startElement", "endElement"); xml_set_character_data_handler($this->_xml_parser, "characterData"); $fp = fopen($file, "rb"); if (!$fp) return false; else return array($this->_xml_parser, $fp); } } ?> PK>\)helpers/file/import/.htaccessnuW+A Order allow,deny Deny from all PK>\helpers/file/index.htmlnuW+APK>\helpers/file/export/index.htmlnuW+APK>\#helpers/file/export/html/index.htmlnuW+APK>\)"helpers/file/export/html/.htaccessnuW+A Order allow,deny Deny from all PK>\F{E (helpers/file/export/html/csvimproved.phpnuW+Acontents = ''.chr(10); $this->contents .= ''.chr(10); return $this->contents; } /** * Start the table header * * @return string start table header */ function StartTableHeaderText() { return ''; } /** * End the table header * * @return string end table header */ function EndTableHeaderText() { return ''.chr(10); } /** * Creates the table header * * @return string th field */ public function TableHeaderText($headers) { return ''; } /** * Start the table body header * * @see $contents * @return string table body header */ public function BodyText() { return ''; } /** * Creates the HTML footer * * @see $contents * @return string HTML footer */ function FooterText() { $this->contents = '
'.$headers.'
'.chr(10); return $this->contents; } /** * Opens a table row * * @see $contents * @return string tr opening tag */ function NodeStart() { $this->contents = ''.chr(10); return $this->contents; } /** * Closes a table row * * @see $contents * @return string tr closing tag */ function NodeEnd() { $this->contents = ''.chr(10); return $this->contents; } /** * Adds a table td element * * @see $node * @return string td row */ function Element($column_header, $cdata=false) { $this->node = ''; $this->node .= $this->contents; $this->node .= ''; $this->node .= "\n"; return $this->node; } /** * Handles all content and modifies special cases * * @see $contents * @return string formatted table row */ function ContentText($content, $column_header, $fieldname, $cdata=false) { switch ($fieldname) { default: $this->contents = $content; break; } return $this->Element($column_header, $cdata); } } ?> PK>\"helpers/file/export/xml/index.htmlnuW+APK>\A, !helpers/file/export/xml/oodle.phpnuW+Acontents = ''.chr(10); $this->contents .= ''.chr(10); return $this->contents; } /** * Creates the XML footer * * @see $contents * @return string XML header */ function FooterText() { $this->contents = ''.chr(10); return $this->contents; } /** * Opens an XML item node * * @see $contents * @return string XML node data */ function NodeStart() { $this->contents = ''.chr(10); return $this->contents; } /** * Closes an XML item node * * @see $contents * @return string XML node data */ function NodeEnd() { $this->contents = ''.chr(10); return $this->contents; } /** * Adds an XML element * * @see $node * @return string XML element */ function Element($column_header, $cdata=false) { $this->node = '<'.$column_header.'>'; if ($cdata) $this->node .= 'node .= $this->contents; if ($cdata) $this->node .= ']]>'; $this->node .= ''; $this->node .= "\n"; return $this->node; } /** * Handles all content and modifies special cases * * @see $contents * @return string formatted XML element */ function ContentText($content, $column_header, $fieldname, $cdata=false) { switch ($fieldname) { case 'manufacturer_name': case 'product_url': $cdata = true; default: $this->contents = $content; break; } if (empty($column_header)) $column_header = $fieldname; return $this->Element($column_header, $cdata); } } ?> PK>\ 'helpers/file/export/xml/csvimproved.phpnuW+Acontents = ''.chr(10); $this->contents .= ''.chr(10); return $this->contents; } /** * Creates the XML footer * * @see $contents * @return string XML header */ public function FooterText() { $this->contents = ''.chr(10); return $this->contents; } /** * Opens an XML item node * * @see $contents * @return string XML node data */ public function NodeStart() { $this->contents = ''.chr(10); return $this->contents; } /** * Closes an XML item node * * @see $contents * @return string XML node data */ public function NodeEnd() { $this->contents = ''.chr(10); return $this->contents; } /** * Adds an XML element * * @see $node * @return string XML element */ private function Element($column_header, $cdata=false) { $this->node = '<'.$column_header.'>'; if ($cdata) $this->node .= 'node .= $this->contents; if ($cdata) $this->node .= ']]>'; $this->node .= ''; $this->node .= "\n"; return $this->node; } /** * Handles all content and modifies special cases * * @see $contents * @return string formatted XML element */ public function ContentText($content, $column_header, $fieldname, $cdata=false) { switch ($fieldname) { case 'field_default_value': case 'product_attribute': $cdata = true; default: $this->contents = $content; break; } if (empty($column_header)) $column_header = $fieldname; return $this->Element($column_header, $cdata); } } ?> PK>\&LL"helpers/file/export/xml/google.phpnuW+Acontents = ''.chr(10); $this->contents .= 'contents .= 'xmlns:c="http://base.google.com/cns/1.0">'.chr(10); $this->contents .= ''.chr(10); // Get the XML channel header $settings = JRequest::getVar('settings'); $this->contents .= ''.$settings->get('google_base.gb_title').''.chr(10); $this->contents .= ''.$settings->get('google_base.gb_link').''.chr(10); $this->contents .= ''.$settings->get('google_base.gb_description').''.chr(10); return $this->contents; } /** * Creates the XML footer * * @see $contents * @return string XML header */ function FooterText() { $this->contents = ''.chr(10); $this->contents .= ''.chr(10); return $this->contents; } /** * Opens an XML item node * * @see $contents * @return string XML node data */ function NodeStart() { $this->contents = ''.chr(10); return $this->contents; } /** * Closes an XML item node * * @see $contents * @return string XML node data */ function NodeEnd() { $this->contents = ''.chr(10); return $this->contents; } /** * Adds an XML element * * @see $node * @return string XML element */ function Element($column_header, $cdata=false) { if (stristr($column_header, 'c:')) { $this->node = '<'.$column_header.' type="string">'; } else $this->node = '<'.$column_header.'>'; if ($cdata) $this->node .= 'node .= $this->contents; if ($cdata) $this->node .= ']]>'; $this->node .= ''; $this->node .= "\n"; return $this->node; } /** * Handles all content and modifies special cases * * @see $contents * @return string formatted XML element */ function ContentText($content, $column_header, $fieldname, $cdata=false) { switch ($fieldname) { case 'custom_shipping': switch($column_header) { case 'g:shipping': if (strpos($content, ':')) { list($country, $service, $price) = explode(":", $content); $this->contents = ' '.$country.' '.$service.' '.$price.' '; } else $this->contents = ''; break; } break; case 'custom': switch($column_header) { case 'g:tech_spec_link': $cdate = true; $this->contents = $content; break; case 'g:tax': list($country, $region, $rate, $tax_ship) = explode(":", $content); $this->contents = ' '.$country.' '.$region.' '.$rate.' '.$tax_ship.' '; break; default: $this->contents = $content; break; } break; case 'category_path': $paths = explode("|", $content); $content = ''; foreach ($paths as $id => $path) { $this->contents = str_replace('/', '>', $path); $content .= $this->Element($column_header, $cdata); } return $content; break; case 'manufacturer_name': case 'product_url': $cdata = true; default: $this->contents = $content; break; } if (empty($column_header)) $column_header = $fieldname; return $this->Element($column_header, $cdata); } } ?> PK>\R^#helpers/file/export/xml/beslist.phpnuW+Acontents = ''.chr(10); $this->contents .= ''.chr(10); return $this->contents; } function FooterText() { $this->contents = ''.chr(10); return $this->contents; } function NodeStart() { $this->contents = ''.chr(10); return $this->contents; } function NodeEnd() { $this->contents = ''.chr(10); return $this->contents; } function Element($column_header, $cdata=false) { $this->node = '<'.$column_header.'>'; if ($cdata) $this->node .= 'node .= $this->contents; if ($cdata) $this->node .= ']]>'; $this->node .= ''; $this->node .= "\n"; return $this->node; } function ContentText($content, $column_header, $fieldname, $cdata=false) { switch ($fieldname) { case 'category_path': $this->CategoryPath($content); break; case 'manufacturer_name': case 'product_url': $cdata = true; default: $this->contents = $content; break; } if (empty($column_header)) $column_header = $fieldname; return $this->Element($column_header, $cdata); } function CategoryPath($category) { $this->contents = str_replace("/", " > ", trim($category)); } } ?> PK>\M~y+ "helpers/file/export/xml/custom.phpnuW+Ainput; $template = $jinput->get('template', null, null); return $template->get('header', 'layout', '', null, 2); } /** * Creates the XML footer * * @see $contents * @return string XML header */ public function FooterText() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); return $template->get('footer', 'layout', '', null, 2); } /** * Opens an XML item node * * @see $contents * @return string XML node data */ public function NodeStart() { $this->_node(); return; } /** * Closes an XML item node * * @see $contents * @return string XML node data */ public function NodeEnd() { return $this->_node; } /** * A full node template * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _node() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_node = $template->get('body', 'layout', '', null, 2); } /** * Adds an XML element * * @see $node * @return string XML element */ private function _element($content, $fieldname, $cdata=false) { $data = ''; if ($cdata) $data .= ''; $this->_node = str_ireplace('['.$fieldname.']', $data, $this->_node); return; } /** * Handles all content and modifies special cases * * @see $contents * @return string formatted XML element */ public function ContentText($content, $column_header, $fieldname, $cdata=false) { if (empty($column_header)) $column_header = $fieldname; return $this->_element($content, $column_header, $cdata); } } ?> PK>\)!helpers/file/export/xml/.htaccessnuW+A Order allow,deny Deny from all PK>\)helpers/file/export/.htaccessnuW+A Order allow,deny Deny from all PK>\)helpers/file/.htaccessnuW+A Order allow,deny Deny from all PK>\I‰helpers/settings.phpnuW+AgetQuery(true); $query->select('params'); $query->from('#__csvi_settings'); $query->where('id = 1'); $db->setQuery($query); $settings = $db->loadResult(); $registry = new JRegistry(); $registry->loadString($settings); $this->_params = $registry; } /** * Get a requested value * * @param string $setting the setting to get the value for * @param mixed $default the default value if no $setting is found */ public function get($setting, $default=false) { return $this->_params->get($setting, $default); } } ?>PK>\helpers/index.htmlnuW+APK>\xȌhelpers/panel.phpnuW+Ainput; // Check if we are running cron, no need to show the panel if (!$jinput->get('cron', false, 'bool')) { $helper = new CsviHelper(); $buttons = $helper->getButtons(); // Create the top slider $topmenu = '
'; $topmenu .= $buttons->process; $topmenu .= $buttons->replacements; $topmenu .= $buttons->log; $topmenu .= $buttons->maintenance; $topmenu .= $buttons->availablefields; $topmenu .= '
'; $topmenu = preg_replace("/(\s\s+)/", ' ', $topmenu); ?> PK>\)helpers/.htaccessnuW+A Order allow,deny Deny from all PK>\fU, , !helpers/com_virtuemart_config.phpnuW+A_vmcfgfile = JPATH_ADMINISTRATOR.'/components/com_virtuemart/virtuemart.cfg'; $this->_parse(); // Load the version information if (file_exists(JPATH_ADMINISTRATOR.'/components/com_virtuemart/version.php')) { require_once JPATH_ADMINISTRATOR.'/components/com_virtuemart/version.php'; $this->_vmcfg['release'] = vmVersion::$RELEASE; } else $this->_vncfg['release'] = null; } /** * Finds a given VirtueMart setting * * @copyright * @author RolandD * @todo * @see * @access * @param string $setting The config value to find * @return mixed value if found | false if not found * @since 4.0 */ public function get($setting) { if (isset($this->_vmcfg[$setting])) { return $this->_vmcfg[$setting]; } else return false; } /** * Parse the VirtueMart configuration * * Here is a PHP 5.3 requirement and work-around * * @copyright * @author RolandD * @todo * @see http://www.php.net/parse_ini_string * @access private * @param * @return * @since 4.0 */ private function _parse() { // Parse the configuration file if (file_exists($this->_vmcfgfile)) { $config = file_get_contents($this->_vmcfgfile); // Do some cleanup $config = str_replace('#', ';', $config); // Check if the command is available if (!function_exists('parse_ini_string') ) { $array = array(); $lines = explode("\n", $config ); foreach( $lines as $line ) { $statement = preg_match( "/^(?!;)(?P[\w+\.\-]+?)\s*=\s*(?P.+?)\s*$/", $line, $match ); if( $statement) { $key = $match[ 'key' ]; $value = $match[ 'value' ]; # Remove quote if( preg_match( "/^\".*\"$/", $value ) || preg_match( "/^'.*'$/", $value ) ) { $value = mb_substr( $value, 1, mb_strlen( $value ) - 2 ); } $array[ $key ] = $value; } } $this->_vmcfg = $array; } else $this->_vmcfg = parse_ini_string($config); } } }PK>\D(5&&helpers/csvidb.phpnuW+A_database = JFactory::getDbo(); } public function setQuery($sql, $offset = 0, $limit = 0) { $this->_database->setQuery($sql, $offset, $limit); if (!$this->cur = $this->_database->query()) { $this->_error = $this->_database->getErrorMsg(); } } public function getRow() { if (!is_object($this->cur)) $array = mysql_fetch_object($this->cur); else $array = $this->cur->fetch_object(); if ($array) { return $array; } else { if (!is_object($this->cur)) mysql_free_result( $this->cur ); else $this->cur->free_result(); return false; } } public function getErrorMsg() { return $this->_error; } public function getNumRows() { return $this->_database->getNumRows($this->cur); } public function getQuery() { return $this->_database->getQuery(); } }PK>\0**helpers/template.phpnuW+A_settings = $data; } } /** * Find a value in the template * * @copyright * @author RolandD * @todo JRequest::_cleanVar * @see JFilterInput * @access public * @param string $name the name of the parameter to find * @param string $group the group in which to find the parameter * @param string $default the default value to use when not found * @param string $filter the filter to apply * @param int $mask Filter bit mask. 1=no trim: If this flag is cleared and the * input is a string, the string will have leading and trailing whitespace * trimmed. 2=allow_raw: If set, no more filtering is performed, higher bits * are ignored. 4=allow_html: HTML is allowed, but passed through a safe * HTML filter first. If set, no more filtering is performed. If no bits * other than the 1 bit is set, a strict filter is applied. * @param bool $special if the field should require special processing * @return mixed the value found * @since 3.0 */ public function get($name, $group='', $default = '', $filter=null, $mask=0, $special=true) { // Set the initial value $value = ''; // Find the value if (empty($group)) { if (array_key_exists($name, $this->_settings)) $value = $this->_settings[$name]; } else { if (array_key_exists($group, $this->_settings)) { if (array_key_exists($name, $this->_settings[$group])) { $value = $this->_settings[$group][$name]; } } } // Return the found value if (is_array($value) && empty($value)) $value = $default; else if ('' === $value) $value = $default; // Special processing if ($special) { switch ($name) { case 'language': case 'target_language': $value = strtolower(str_replace('-', '_', $value)); break; case 'field_delimiter': if (strtolower($value) == 't') $value = "\t"; break; } } // Clean up and return if (is_null($filter) && $mask == 0) return $value; else return JRequest::_cleanVar($value, $mask, $filter); } /** * Set a value in the template * * @copyright * @author RolandD * @todo * @see * @access public * @param string $name the name of the parameter to find * @param string $group the group in which to find the parameter * @param string $value the value to set * @return void * @since 3.0 */ public function set($name, $group='', $value = '') { // Set the value if (empty($group)) { $this->_settings[$name] = $value; } else { $this->_settings[$group][$name] = $value; } } /** * Load a template * * @copyright * @author RolandD * @todo * @see * @access public * @param int $id the ID of the template to load * @return * @since 4.0 */ public function load($id) { if ($id > 0) { // Load the data $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('settings').', '.$db->quoteName('name')); $query->from($db->quoteName('#__csvi_template_settings')); $query->where($db->quoteName('id').' = '.$db->quote($id)); $db->setQuery($query); $data = $db->loadObject(); // Fill the settings $settings = json_decode($data->settings, true); if (!is_array($settings)) $settings = array(); $this->_settings = $settings; // Set the name if (!empty($data)) $this->setName($data->name); } } /** * Set the template name * * @copyright * @author RolandD * @todo * @see * @access public * @param string $name the name of the template * @return * @since 4.0 */ public function setName($name) { // Set the template name $this->_name = $name; } /** * Get the name of the template * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getName() { return $this->_name; } /** * Return all settings * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getSettings() { return $this->_settings; } } ?> PK>\helpers/com_akeebasubs.phpnuW+Ainput; $this->_csvidata = $jinput->get('csvi_data', null, null); } /** * Get a user ID * * @copyright * @author RolandD * @todo * @see * @access public * @param string $username the username to find the ID for * @return int the ID of the user * @since 4.0 */ public function getUser($username) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('id')); $query->from($db->quoteName('#__users')); $query->where($db->quoteName('username').' = '.$db->quote($username)); $db->setQuery($query); return $db->loadResult(); } /** * Get a subscription ID * * @copyright * @author RolandD * @todo * @see * @access public * @param string $subscription_title the name(s) of the subscription * @return * @since 4.0 */ public function getSubscription($subscription_title) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('akeebasubs_level_id')); $query->from($db->quoteName('#__akeebasubs_levels')); $titles = explode(',', $subscription_title); $newtitles = array(); foreach ($titles as $title) { $newtitles[] = $db->quote(trim($title)); } if (!empty($newtitles)) { $query->where($db->quoteName('title').' IN ('.implode(',', $newtitles).')'); $db->setQuery($query); $ids = $db->loadColumn(); if (!empty($ids)) { return implode(',', $ids); } } else return ''; } /** * Get the list of order users * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of objects * @since 4.0 */ public function getOrderUser() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $query = $db->getQuery(true); $filter = $jinput->get('filter'); $query->select($db->quoteName('user_id')); $query->select($db->quoteName('name', 'user_name')); $query->from($db->quoteName('#__akeebasubs_subscriptions', 's')); $query->leftJoin($db->quoteName('#__users', 'u').' ON '.$db->quoteName('s').'.'.$db->quoteName('user_id').' = '.$db->quoteName('u').'.'.$db->quoteName('id')); $query->where($db->quoteName('u').'.'.$db->quoteName('name').' LIKE '.$db->quote('%'.$filter.'%')); $query->order($db->quoteName('name')); $query->group($db->quoteName('user_id')); $db->setQuery($query, 0, 10); $users = $db->loadObjectList(); if ($users) return $users; else return array(); } /** * Get the list of order products * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of objects * @since 4.0 */ public function getOrderProduct() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $query = $db->getQuery(true); $filter = $jinput->get('filter'); $query->select($db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id', 'product_sku')); $query->select($db->quoteName('title', 'product_name')); $query->from($db->quoteName('#__akeebasubs_subscriptions', 's')); $query->leftJoin($db->quoteName('#__akeebasubs_levels', 'l').' ON '.$db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id').' = '.$db->quoteName('l').'.'.$db->quoteName('akeebasubs_level_id')); $query->where($db->quoteName('l').'.'.$db->quoteName('title').' LIKE '.$db->quote('%'.$filter.'%')); $query->order($db->quoteName('title')); $query->group($db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id')); $db->setQuery($query, 0, 10); $products = $db->loadObjectList(); if ($products) return $products; else return array(); } } ?>PK>\-,-,helpers/cron.phpnuW+Ainitialise(); // Load the language file $language = JFactory::getLanguage(); $language->load('com_csvi', JPATH_BASE.'/administrator'); // Load the plugin system JPluginHelper::importPlugin('system'); // trigger the onAfterInitialise events $mainframe->triggerEvent('onAfterInitialise'); // Run the cron job $csvicron->runCron(); /** * Handles all cron requests * * @package CSVI */ class CsviCron { /** @var $basepath string the base of the installation */ var $basepath = ''; /** @var $_variables array of user set variables to override template settins */ var $_variables = ''; /** * Initialise the cron * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function __construct() { // Merge the default translation with the current translation $jlang = JFactory::getLanguage(); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, 'en-GB', true); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, $jlang->getDefault(), true); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, null, true); // Get the domain name require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/settings.php'); $settings = new CsviSettings(); $domainname = $settings->get('site.hostname', 'www.example.com'); // Check for the trailing slash at the domain name if (substr($domainname, -1) == '/') $domainname = substr($domainname, 0, -1); // Load the posted variables $this->CollectVariables(); // Fill the server global with necessary information $_SERVER['REQUEST_METHOD'] = 'post'; $_SERVER['HTTP_HOST'] = $domainname; $_SERVER['REMOTE_ADDR'] = gethostbyname('localhost'); $_SERVER['SERVER_PORT'] = ''; $_SERVER['HTTP_USER_AGENT'] = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0) Gecko/20100101 Firefox/4.0'; $_SERVER['REQUEST_URI'] = '/administrator/index.php'; $_SERVER['QUERY_STRING'] = ''; $_SERVER['PHP_SELF'] = '/index.php'; $_SERVER['SCRIPT_NAME'] = '/index.php'; if (isset($this->_variables['adminpw'])) { $_SERVER['QUERY_STRING'] = $this->_variables['adminpw']; $_SERVER['REQUEST_URI'] .= '?'.$this->_variables['adminpw']; } } /** * Initialise some settings */ public function runCron() { // Buffer all output to prevent conflicts with external software ob_start(); // Start the clock $starttime = time(); $db = JFactory::getDbo(); // First check if we deal with a valid user if ($this->Login()) { // Set some global values $jinput = JFactory::getApplication()->input; $jfilter = new JFilterInput(); // Get the parameters require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/settings.php'); $settings = new CsviSettings(); // Check if we are running cron mode and set some necessary variables $_SERVER['SERVER_ADDR'] = $_SERVER['HTTP_HOST'] = $settings->get('site.hostname'); $_SERVER['SCRIPT_NAME'] = '/index.php'; $_SERVER['REQUEST_URI'] = '/'; $_SERVER['PHP_SELF'] = '/index.php'; // Get the task to do if (isset($this->_variables['task'])) $task = $jfilter->clean($this->_variables['task']); else $task = ''; // Perform the requested task switch ($task) { case 'maintenance': $jinput->set('task', 'maintenance.'.$this->_variables['operation']); // Fire CSVI VirtueMart $this->ExecuteJob(); break; default: // Second check if any template is set to process if (array_key_exists('template_id', $this->_variables)) $template_id = $jfilter->clean($this->_variables['template_id'], 'int'); else $template_id = false; if (array_key_exists('template_name', $this->_variables)) $template_name = $jfilter->clean($this->_variables['template_name']); else $template_name = false; if ($template_id || $template_name) { // There is a template_id or template name, get some details to streamline processing $where = empty($template_id) ? 'name='.$db->q($template_name) : 'id='.$template_id; // There is a template name, get some details to streamline processing $q = "SELECT id AS template_id, name AS template_name, settings FROM #__csvi_template_settings WHERE ".$where; $db->setQuery($q); $row = $db->loadObject(); if (is_object($row)) { echo JText::sprintf('COM_CSVI_PROCESSING_STARTED', date('jS F Y, g:i a'))."\n"; echo JText::sprintf('COM_CSVI_TEMPLATE', $row->template_name)."\n"; // Set the template ID $jinput->set('select_template', $row->template_id); $jinput->set('template_id', $row->template_id); $jinput->set('template_name', $row->template_name); // Set the settings if (array_key_exists('jform', $this->_variables)) $settings = CsviHelper::arrayExtend(json_decode($row->settings, true), $this->_variables['jform']); else $settings = json_decode($row->settings, true); // Set some export settings if ($settings['options']['action'] == 'export') { // Export settings $jinput->set('task', 'exportfile.process'); // Set export to if ($settings['general']['exportto'] == 'todownload') $settings['general']['exportto'] = 'tofile'; } // Set some import settings else if ($settings['options']['action'] == 'import') { // Import settings $jinput->set('task', 'importfile.doimport'); // Turn off preview $settings['general']['show_preview'] = 0; } // Set a view so VirtueMart is happy $jinput->set('view', 'products'); // Post the settings $jinput->set('jform', $settings, 'post'); // Fire CSVI $this->ExecuteJob(); } else { if ($template_name) echo JText::sprintf('COM_CSVI_NO_TEMPLATE_FOUND', $template_name)."\n"; else if ($template_id) echo JText::sprintf('COM_CSVI_NO_TEMPLATE_FOUND', $template_id)."\n"; } } else echo JText::_('COM_CSVI_NO_TEMPLATE_SPECIFIED')."\n"; break; } } else { $error = JError::getError(); echo $error->message."\n"; } echo sprintf(JText::_('COM_CSVI_PROCESSING_FINISHED'), date('jS F Y, g:i a'))."\n"; $duration = time() - $starttime; if ($duration < 60) echo sprintf(JText::_('COM_CSVI_PROCESSING_SECONDS'), $duration)."\n"; else echo sprintf(JText::_('COM_CSVI_PROCESSING_MINUTES'), (number_format($duration/60, 2)))."\n"; // Done, lets log the user out $this->UserLogout(); // Display any generated messages $messages = ob_get_contents(); @ob_end_clean(); echo $messages; } /** * Collect the variables * * Running from the command line, the variables are stored in $argc and $argv. * Here we put them in $_REQUEST so that they are available to the script */ private function CollectVariables() { $arguments = false; // Take the argument values and put them in $_REQUEST if (isset($_SERVER['argv'])) { foreach ($_SERVER['argv'] as $key => $argument) { if ($key > 0) { list($name, $value) = explode("=", $argument); if (strpos($value, '|')) $value = explode('|', $value); if (strpos($name, ':')) { $names = explode(':', $name); if (count($names) == 3 && $names[0] == 'jform') { $this->_variables['jform'][$names[1]][$names[2]] = $value; } } else $this->_variables[$name] = $value; } } $arguments = true; } // Get the _GET if (!empty($_GET)) { $this->_storeVariables($_GET); $arguments = true; } // Get the _POST if (!empty($_POST)) { $this->_storeVariables($_POST); $arguments = true; } if (!$arguments) echo JText::_('COM_CSVI_NO_ARGUMENTS')."\n"; } /** * Store the variables * * @copyright * @author RolandD * @todo * @see * @access private * @param $vars array the variables to store * @return * @since 3.2 */ private function _storeVariables($vars) { foreach ($vars as $name => $value) { if (!empty($value)) { if (strpos($value, '|')) $value = explode('|', $value); if (substr($name, 0, 5) == 'jform') { if (strpos($name, ':')) $names = explode(':', $name); else $names = explode('_', $name); if (count($names) == 3 && $names[0] == 'jform') { $this->_variables['jform'][$names[1]][$names[2]] = $value; } } else $this->_variables[$name] = $value; } } } /** * Check if the user exists */ private function Login() { $mainframe = JFactory::getApplication(); $jfilter = new JFilterInput(); $credentials['username'] = $jfilter->clean($this->_variables['username'], 'username'); $credentials['password'] = $jfilter->clean($this->_variables['passwd']); $result = $mainframe->login($credentials, array('entry_url' => '')); if (!JError::isError($result)) { return true; } else return false; } /** * Process the requested job */ function ExecuteJob() { $jinput = JFactory::getApplication()->input; $jinput->set('cron', true); require(JPATH_COMPONENT_ADMINISTRATOR.'/csvi.php'); } /** * Log the user out */ private function UserLogout() { global $mainframe; ob_start(); $error = $mainframe->logout(); if(JError::isError($error)) { ob_end_clean(); echo JText::_('COM_CSVI_PROBLEM_LOGOUT_USER')."\n"; } else { ob_end_clean(); echo JText::_('COM_CSVI_USER_LOGGED_OUT')."\n"; } } } ?>PK>\wwhelpers/csvisef.phpnuW+A_domainname = CsviHelper::getDomainName(); } /** * Create a SEF URL * * @copyright * @author RolandD * @todo Change exportsef to template * @see * @access private * @param string $url The url to change to SEF * @return string the new url * @since 3.0 */ public function getSiteRoute($url) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $parsed_url = null; // Check which SEF component is installed if (empty($this->_sef)) { if ($template->get('exportsef', 'product', false)) { // Joomla SEF if (JPluginHelper::isEnabled('system', 'sef')) $this->_sef = 'joomla'; // sh404SEF check if (JPluginHelper::isEnabled('system', 'shsef')) $this->_sef = 'sh404sef'; // JoomSEF check if (JPluginHelper::isEnabled('system', 'joomsef')) $this->_sef = 'joomsef'; // AceSEF check if (JPluginHelper::isEnabled('system', 'acesef')) $this->_sef = 'acesef'; // There is no SEF enabled if (empty($this->_sef)) $this->_sef = 'nosef'; } else $this->_sef = 'nosef'; } switch ($this->_sef) { case 'sh404sef': $parsed_url = $this->_sh404Sef($url); break; case 'joomsef': $parsed_url = $this->_joomSef($url); break; case 'joomla': $parsed_url = $this->_joomlaSef($url); break; case 'acesef': $parsed_url = $this->_aceSef($url); break; case 'nosef': default: // No SEF router found, returning regular URL return $this->_domainname.JRoute::_($url); break; } // Clean up the parsed SEF URL if (!empty($parsed_url)) { // Clean up the parsed SEF URL if (substr($parsed_url, 4) == 'http') return $parsed_url; else { // Check for administrator in the domain $adminpos = strpos($parsed_url,'/administrator/'); if ($adminpos !== false) $parsed_url = substr($parsed_url,$adminpos+15); // Check if we have a domain name in the URL if (!empty($this->_domainname)) { $check_domain = str_replace('https', 'http', $this->_domainname); $domain = strpos($parsed_url, $check_domain); if ($domain === false) { if (substr($parsed_url, 0, 1) == '/') $parsed_url = $this->_domainname.$parsed_url; else $parsed_url = $this->_domainname.'/'.$parsed_url; } return $parsed_url; } else { $csvilog->addDebug(JText::_('COM_CSVI_NO_DOMAINNAME_SET')); return $url; } } } } /** * Create sh404SEF URLs * * @copyright * @author RolandD * @todo * @see http://dev.anything-digital.com/sh404SEF/ * @see getSiteRoute() * @access private * @param string $url the original URL to turn into SEF * @return string SEF URL * @since 3.0 */ private function _sh404Sef($url) { // Load sh404SEF require_once(JPATH_ADMINISTRATOR.'/components/com_sh404sef/sh404sef.class.php'); $sefConfig = shRouter::shGetConfig(); // Turn off any security and flooding setting $sefConfig->shSecEnableSecurity = 0; $sefConfig->shSecActivateAntiFlood = 0; // Require some necessary files require_once(JPATH_ROOT.'/components/com_sh404sef/shCache.php'); require_once(JPATH_ROOT.'/components/com_sh404sef/shSec.php'); // Start the sh404sef Router if (class_exists('shRouter')) $shRouter = new shRouter(); else return $this->_domainname.'/'.$url; // Force the domain name $GLOBALS['shConfigLiveSite'] = $this->_domainname; // Initialize sh404sef include_once(JPATH_ROOT.'/components/com_sh404sef/shInit.php'); // Build the SEF URL $uri = $shRouter->build($url); $sefurl = $uri->toString(); if (strpos($sefurl, 'http://') === false) { $sefurl = str_ireplace('http:/', 'http://', $sefurl); } return $sefurl; } /** * Create JoomSEF URLs * * @copyright * @author RolandD * @todo * @see http://www.artio.net/joomla-extensions/joomsef * @see _getSiteRoute() * @access private * @param string $url the original URL to turn into SEF * @return string SEF URL * @since 3.0 */ private function _joomSef($url) { // Include Joomla files jimport('joomla.application.router'); require_once(JPATH_ROOT.'/includes/application.php'); // Include JoomSEF require_once(JPATH_ROOT.'/components/com_sef/sef.router.php'); $shRouter = new JRouterJoomSef(); // Build the SEF URL $uri = $shRouter->build($url); return $uri->toString(); } /** * Create Joomla SEF URLs * * @copyright * @author RolandD * @todo * @see http://www.joomla.org/ * @see _getSiteRoute() * @access private * @param string $url the original URL to turn into SEF * @return string SEF URL * @since 3.0 */ private function _joomlaSef($url) { // Load Joomla core files for SEF jimport('joomla.application.router'); require_once(JPATH_ROOT.'/includes/application.php'); require_once(JPATH_ROOT.'/includes/router.php'); $router = new JRouterSite(array('mode' => 1)); $uri = $router->build($url); return $uri->toString(); } /** * Create aceSEF URLs * * @copyright * @author RolandD * @todo * @see http://www.joomace.net/joomla-extensions/acesef * @see _getSiteRoute() * @access private * @param string $url the original URL to turn into SEF * @return string SEF URL * @since 3.0 */ private function _aceSef($url) { jimport('joomla.application.router'); require_once(JPATH_ROOT.'/includes/application.php'); require_once(JPATH_ADMINISTRATOR.'/components/com_acesef/library/router.php'); require_once(JPATH_ADMINISTRATOR.'/components/com_acesef/library/loader.php'); $router = new JRouterAcesef(); $uri = $router->build($url); return $uri->toString(); } } ?> PK>\c(,(,helpers/csvi.phpnuW+A$v) { if( is_array($v) ) { if( !isset($a[$k]) ) { $a[$k] = $v; } else { $a[$k] = self::arrayExtend($a[$k], $v); } } else { $a[$k] = $v; } } return $a; } /** * Recursive array diff * * @copyright * @author Amund, RolandD * @todo * @see http://www.php.net/manual/en/function.array-merge.php#91756 * @access private * @param array $aArray1 The array to update * @param array $aArray2 The array with new values * @return array with all new values * @since 3.0 */ public function recurseArrayDiff($aArray1, $aArray2) { $aReturn = array(); if (is_array($aArray1) && is_array($aArray2)) { foreach ($aArray1 as $mKey => $mValue) { if (array_key_exists($mKey, $aArray2)) { if (is_array($mValue)) { $aRecursiveDiff = self::recurseArrayDiff($mValue, $aArray2[$mKey]); if (count($aRecursiveDiff)) { $aReturn[$mKey] = $aRecursiveDiff; } } else { if ($mValue != $aArray2[$mKey]) $aReturn[$mKey] = $mValue; } } else { $aReturn[$mKey] = $mValue; } } } return $aReturn; } /** * Perform replacement on a value * * @copyright * @author RolandD * @todo * @see * @access public * @param int $id the id of the replacement rule * @param string $value the text to replace * @return string the replaced text * @since 3.0 */ public function replaceValue($id, $value) { static $replacements; if ($id > 0) { if (!isset($this->replacements[$id])) { // Get the replace details $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('findtext')); $query->select($db->quoteName('replacetext')); $query->select($db->quoteName('method')); $query->from('#__csvi_replacements'); $query->where('id = '.$db->Quote($id)); $db->setQuery($query); $replace = $db->loadObject(); $this->replacements[$id] = $replace; } else { $replace = $this->replacements[$id]; } // Perform the replacement if (empty($replace)) return $value; else { switch ($replace->method) { case 'text': $fieldvalue = str_ireplace($replace->findtext, $replace->replacetext, $value); break; case 'regex': $fieldvalue = preg_replace($replace->findtext, $replace->replacetext, $value); break; } } return $fieldvalue; } else return $value; } /** * Get the list of custom tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array list of order item product objects * @since 3.0 */ public function getCustomTables() { $db = JFactory::getDbo(); $q = "SELECT component_table FROM #__csvi_available_fields WHERE core = 0 GROUP BY component_table"; $db->setQuery($q); return $db->loadColumn(); } /** * Check whether a file referenced by a URL exists * * Note: The time taken to check a valid format url: 0.10 secs, regardless of whether the file exists * * @copyright * @author doorknob, RolandD * @todo * @see * @access public * @param string $file The URL to be checked * @return boolean true if file exists | false if file does not exist * @since 2.17 */ public function fileExistsRemote($file) { // If it is an SSL file we cannot validate its existence if (substr($file, 0, 5) == 'https') return true; $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $url_parts = @parse_url($file); $csvilog->addDebug('URL:'.$file); if (!isset($url_parts['host']) || empty($url_parts['host'])) { return false; } if (!isset($url_parts['path']) || empty($url_parts['path'])) { $documentpath = '/'; } else { $documentpath = $url_parts['path']; } if (isset($url_parts['query']) && !empty($url_parts['query'])) { $documentpath .= '?'.$url_parts['query']; } $host = $url_parts['host']; if (!isset($url_parts['port']) || empty($url_parts['port'])) { if ($url_parts['scheme'] == 'https') $port = '443'; else $port = '80'; } else { $port = $url_parts['port']; } if ($url_parts['scheme'] == 'https') { $sslhost = 'ssl://'.$host; } else $sslhost = $host; $errno = null; $errstr = null; $documentpath = str_replace(' ', '%20', $documentpath); $socket = @fsockopen($sslhost, $port, $errno, $errstr, 30); if ($socket) { fwrite($socket, "HEAD $documentpath HTTP/1.1\r\nUser-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11\r\nHost: $host\r\n\r\n"); $http_response = fgets($socket, 25); fclose($socket); // Parse the result $csvilog->addDebug('HTTP response:'.$http_response); if (stripos($http_response, '200 OK') === false && stripos($http_response, '302 Found') === false) { return false; } else return true; } return false; } /** * Find the primary key of a given table * * @copyright * @author RolandD * @todo * @see * @access public * @param $table string the name of the table to find the primary key * @return string the fieldname that is the primary key * @since 3.0 */ public function getPrimaryKey($tablename) { $db = JFactory::getDbo(); $q = "SHOW KEYS FROM ".$db->quoteName('#__'.$tablename)." WHERE ".$db->quoteName('Key_name')." = ".$db->quote('PRIMARY'); $db->setQuery($q); $key = $db->loadObject(); if (!is_object($key)) return ''; else return $key->Column_name; } /** * Get the domainname * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string domain name * @since 3.4 */ public function getDomainName() { $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); // Get the domainname $domainname = $settings->get('site.hostname'); // Check for the trailing slash at the domain name if (substr($domainname, -1) == '/') $domainname = substr($domainname, 0, -1); // Assign the domainname return $domainname; } /** * Get supported components * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of supported components * @since 4.0 */ public function getComponents() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('component AS value, component AS text'); $query->from($db->quoteName('#__csvi_template_types')); $query->leftJoin('#__extensions ON #__csvi_template_types.component = #__extensions.element'); $query->where($db->quoteName('#__extensions.type').' = '.$db->Quote('component')); $query->group('component'); $db->setQuery($query); return $db->loadObjectList(); } /** * Get the buttons for the control panel * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return object with the button HTML data * @since 3.0 */ public function getButtons() { // Get the Cpanel images $cpanel_images = new stdClass(); $cpanel_images->process = $this->CpanelButton('csvi_process_48.png', 'index.php?option=com_csvi&view=process', 'COM_CSVI_PROCESS'); $cpanel_images->replacements = $this->CpanelButton('csvi_replace_48.png', 'index.php?option=com_csvi&view=replacements', 'COM_CSVI_REPLACEMENTS'); $cpanel_images->maintenance = $this->CpanelButton('csvi_maintenance_48.png', 'index.php?option=com_csvi&view=maintenance', 'COM_CSVI_MAINTENANCE'); $cpanel_images->help = $this->CpanelButton('csvi_help_48.png', 'http://www.csvimproved.com/csv-improved-documentation/', 'COM_CSVI_HELP'); $cpanel_images->about = $this->CpanelButton('csvi_about_48.png', 'index.php?option=com_csvi&view=about', 'COM_CSVI_ABOUT'); $cpanel_images->log = $this->CpanelButton('csvi_log_48.png', 'index.php?option=com_csvi&view=log', 'COM_CSVI_LOG'); $cpanel_images->availablefields = $this->CpanelButton('csvi_av_fields_48.png', 'index.php?option=com_csvi&view=availablefields', 'COM_CSVI_AVAILABLE_FIELDS'); $cpanel_images->settings = $this->CpanelButton('csvi_settings_48.png', 'index.php?option=com_csvi&view=settings', 'COM_CSVI_SETTINGS'); $cpanel_images->install = $this->CpanelButton('csvi_install_48.png', 'index.php?option=com_csvi&view=install', 'COM_CSVI_INSTALL'); return $cpanel_images; } /** * Creates a button for the control panel * * @copyright * @author RolandD * @todo * @see * @access private * @param string $image contains the name of the image * @param string $link contains the target link for the image when clicked * @param string $title contains the title of the button * @return string returns a complete button for the control panel * @since 3.0 */ private function CpanelButton($image, $link, $title) { if (substr($link, 0, 4) == "http") $attribs = ' target="_new"'; else $attribs = ''; $cpanelbutton = '
'; $cpanelbutton .= '
'; $cpanelbutton .= JHTML::_('link', $link, JHTML::_('image', JURI::root().'administrator/components/com_csvi/assets/images/'.$image, JText::_($title)).''.JText::_($title).'', $attribs); $cpanelbutton .= '
'; $cpanelbutton .= '
'; return $cpanelbutton; } /** * Get a Yes/No dropdown list * * @copyright * @author RolandD * @todo * @see * @access public * @param string $name the name of the dropdown * @param string $selected pre-selected entry * @param string $attribs attributes to add to the dropdown * @param string $idtag the id to give to the dropdown * @return string that contains the dropdown with options * @since 4.0 */ public function getYesNo($name, $selected=null, $attribs=null, $idtag=null) { $options = array(); $options[] = JHtml::_('select.option', '0', JText::_('COM_CSVI_NO')); $options[] = JHtml::_('select.option', '1', JText::_('COM_CSVI_YES')); return JHtml::_('select.genericlist', $options, $name, $attribs, 'value', 'text', $selected, $idtag); } } ?> PK>\F]Ehelpers/com_redshop_config.phpnuW+A_redshopcfgfile = JPATH_ADMINISTRATOR.'/components/com_redshop/helpers/redshop.cfg.php'; $this->_redshopcfg = file($this->_redshopcfgfile); } /** * Finds a given redSHOP setting * @var string $setting The config value to find * @return string the value of the config setting */ public function get($setting) { $key = $this->array_find($setting, $this->_redshopcfg); if ($key) { $find_setting = explode('\', \'', $this->_redshopcfg[$key]); return substr(trim($find_setting[1]), 0, -3); } else return false; } /** * Searched the array for a partial value * @return mixed Array key if found otherwise false */ private function array_find($needle, $haystack) { foreach ($haystack as $key => $item) { if (stripos($item, $needle) !== FALSE) { return $key; break; } } // Nothing found return false return false; } } ?>PK>\=!naamodels/logdetails.phpnuW+AsetState('filter.action', $app->getUserStateFromRequest($this->_context.'.filter.action', 'filter_action', false, 'word')); $this->setState('filter.result', $app->getUserStateFromRequest($this->_context.'.filter.result', 'filter_result', false, 'word')); // List state information. // Controls the query ORDER BY parent::populateState('d.line', 'asc'); } /** * Build an SQL query to load the list data. * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return object the query to execute * @since 4.0 */ protected function getListQuery() { // Create a new query object. $jinput = JFactory::getApplication()->input; $db = $this->getDbo(); $query = $db->getQuery(true); // Get the Run ID $run_id = $jinput->get('run_id', 0, 'int'); // Select the required fields from the table. $query->select('d.line, d.description, d.status, d.log_id, d.result'); $query->from('#__csvi_log_details AS d'); // Add all the filters $filters = array(); if ($run_id) { $query->leftJoin('#__csvi_logs AS l ON l.id = d.log_id'); $query->where('l.run_id = '.$run_id); } if ($this->getState('filter.action')) $filters[] = $db->quoteName('status').' = '.$db->Quote($this->getState('filter.action')); if ($this->getState('filter.result')) $filters[] = $db->quoteName('result').' = '.$db->Quote($this->getState('filter.result')); if (!empty($filters)) { // Add the clauses to the query. $query->where('('.implode(' AND ', $filters).')'); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); $query->order($db->getEscaped($orderCol.' '.$orderDirn)); return $query; } /** * Get the actions available for the current log * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of available actions * @since 3.0 */ public function getActions() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $run_id = $jinput->get('run_id', 0, 'int'); $q = "SELECT CONCAT('COM_CSVI_', UPPER(".$db->quoteName('status').")) AS ".$db->Quote('text').", ".$db->quoteName('status')." as ".$db->Quote('value')." FROM ".$db->quoteName('#__csvi_log_details')." WHERE log_id IN (SELECT id FROM #__csvi_logs WHERE run_id = ".$run_id.") GROUP by ".$db->quoteName('value'); $db->setQuery($q); $actions = $db->loadObjectList(); $showall = JHtml::_('select.option', '', JText::_('COM_CSVI_SELECT_ACTION'), 'value', 'text'); array_unshift($actions, $showall); return JHtml::_('select.genericlist', $actions, 'filter_action', '', 'value', 'text', $jinput->get('filter_action'), false, true); } /** * Get the results available for the current log * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of available results * @since 3.0 */ public function getResults() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $run_id = $jinput->get('run_id', 0, 'int'); $q = "SELECT CONCAT('COM_CSVI_', UPPER(".$db->quoteName('result').")) AS ".$db->Quote('text').", ".$db->quoteName('result')." as ".$db->Quote('value')." FROM ".$db->quoteName('#__csvi_log_details')." WHERE log_id IN (SELECT id FROM #__csvi_logs WHERE run_id = ".$run_id.") GROUP by ".$db->quoteName('result'); $db->setQuery($q); $results = $db->loadObjectList(); $showall = JHtml::_('select.option', '', JText::_('COM_CSVI_SELECT_RESULT'), 'value', 'text'); array_unshift($results, $showall); return JHtml::_('select.genericlist', $results, 'filter_result', '', 'value', 'text', $jinput->get('filter_result'), false, true); } } ?>PK>\<9(models/replacement.phpnuW+AloadForm($this->context, 'replacement', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) return false; return $form; } /** * Method to get the data that should be injected in the form. * * @return mixed The data for the form. * @since 1.6 */ protected function loadFormData() { // Check the session for previously entered form data. $data = JFactory::getApplication()->getUserState('com_csvi.edit.replacement.data', array()); if (empty($data)) { $data = $this->getItem(); } return $data; } } ?> PK>\ models/process.phpnuW+Ainput; $jform = $jinput->get('jform', array(), 'array'); if (!isset($jform['options'])) $action = 'import'; else $action = $jform['options']['action']; // Construct the super XML $xml = '
'; // Add the main XML $xml .= JFile::read(JPATH_COMPONENT_ADMINISTRATOR.'/models/forms/'.$action.'.xml'); // Load additional XMLs if (!empty($jform) && isset($jform['options'])) { // Get the component name $component = $jform['options']['component']; if (!empty($options)) { foreach ($options as $option) { $readfile = false; // Check the component specific XML $filename = JPATH_COMPONENT_ADMINISTRATOR.'/models/forms/'.$component.'/'.$action.'/'.$option.'.xml'; if (JFile::exists($filename)) $readfile = $filename; else { // Check if there is a generic XML $filename = JPATH_COMPONENT_ADMINISTRATOR.'/models/forms/'.$action.'/'.$option.'.xml'; if (JFile::exists($filename)) $readfile = $filename; } // Read the file if ($readfile) { $subxml = JFile::read($readfile); if ($subxml) $xml .= $subxml; } } } } // Close the XML $xml .= '
'; // Load the form $form = $this->loadForm($this->context, $xml, array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) return false; return $form; } /** * Method to get the data that should be injected in the form. * * @copyright * @author RolandD * @todo * @see getForm() * @access protected * @param * @return mixed The data for the form * @since 4.0 */ protected function loadFormData() { $jinput = JFactory::getApplication()->input; $data = $jinput->get('jform', array(), 'array'); return $data; } /** * Load the option templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getOptions() { $jinput = JFactory::getApplication()->input; $jform = $jinput->get('jform', array(), 'array'); $options = array(); if (!empty($jform) && isset($jform['options']) && isset($jform['options']['component']) && isset($jform['options']['operation'])) { // Get the operation the user wants to perform $component = $jform['options']['component']; $operation = $jform['options']['operation']; // Get the option templates needed for the operation $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('options'); $query->from('#__csvi_template_types'); $query->where('template_type_name = '.$db->Quote($operation)); $query->where('component = '.$db->Quote($component)); $db->setQuery($query); $result = $db->loadResult(); $options = explode(',', $result); } return $options; } /** * Get the list of order statussen */ public function getOrderStatus() { $db = JFactory::getDBO(); $q = "SELECT order_status_code, order_status_name FROM #__virtuemart_orderstates ORDER BY ordering"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order products */ public function getOrderCurrency() { $db = JFactory::getDBO(); $q = "SELECT order_currency, currency_name FROM #__vm_orders o, #__vm_currency c WHERE o.order_currency = c.currency_code GROUP BY currency_name ORDER BY currency_name;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of exchange rate currencies */ public function getExchangeRateCurrency() { $db = JFactory::getDBO(); $q = "SELECT #__csvi_currency.currency_code AS currency_code, IF (#__vm_currency.currency_name IS NULL, #__csvi_currency.currency_code, #__vm_currency.currency_name) AS currency_name FROM #__csvi_currency LEFT JOIN #__vm_currency on #__vm_currency.currency_code = #__csvi_currency.currency_code;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Check if there are any templates with fields */ public function getCountTemplateFields() { $db = JFactory::getDBO(); $q = "SELECT field_template_id, COUNT(field_template_id) AS total FROM #__csvi_template_fields WHERE field_template_id in ( SELECT template_id FROM #__csvi_templates WHERE template_type LIKE '%export') GROUP BY field_template_id"; $db->setQuery($q); $nrfields = $db->loadResultArray(); if ($db->getErrorNum() > 0) { JError::raiseWarning(0, $db->getErrorMsg()); return false; } else { /* Check if there are any templates with more than 0 fields */ foreach ($nrfields as $key => $nr) { if ($nr > 0) return true; } } } /** * Get a list of possible VM Item IDs */ public function getVmItemids() { $db = JFactory::getDBO(); $q = "SELECT id AS value, name AS text FROM #__menu WHERE link LIKE '%com_virtuemart%'"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of selected order item products * * @copyright * @author RolandD * @todo Do not use INFORMATION_SCHEMA * @see * @access public * @param * @return array list of order item product objects * @since 3.0 */ public function getJoomFishLanguages() { $db = JFactory::getDBO(); $conf = JFactory::getConfig(); $q = "SELECT table_name FROM information_schema.tables WHERE table_schema = ".$db->Quote($conf->getValue('config.db'))." AND table_name = ".$db->Quote($conf->getValue('config.dbprefix').'languages'); $db->setQuery($q); $total = $db->loadResult(); if (!empty($total)) { $q = "SELECT ".$db->quoteName('name')." AS ".$db->quoteName('text').", ".$db->quoteName('id')." AS ".$db->quoteName('value')." FROM #__languages ORDER BY name"; $db->setQuery($q); return $db->loadObjectList(); } else return array(); } /** * Get a list of XML sites * * @copyright * @author RolandD * @todo * @see * @access public * @param string $type the type of files to find (XML or HTML) * @return array list of XML sites * @since 3.0 */ public function getExportSites($type) { jimport('joomla.filesystem.folder'); $files = array(); $path = JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/export/'.$type; if (JFolder::exists($path)) { $files = JFolder::files($path, '.php'); if (!empty($files)) { foreach ($files as $fkey => $file) { $files[$fkey] = basename($file, '.php'); } } else $files = array(); } return $files; } /** * Get a dropdown list of replacements * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of replacements * @since 4.0 */ public function getReplacements() { $replacements = array(); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('id AS value, name AS text'); $query->from('#__csvi_replacements'); $db->setQuery($query); $replacements = $db->loadObjectList(); // Add a make choice option $option = new StdClass(); $option->value = ''; $option->text = JText::_('COM_CSVI_NOT_USED'); if (!empty($replacements)) array_unshift($replacements, $option); else $replacements[] = $option; return $replacements; } } ?>PK>\{ { models/templatetypes.phpnuW+AgetDbo(); $query = $db->getQuery(true); // Select the required fields from the table. $query->select('*'); $query->from('#__csvi_template_types'); // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); $query->order($db->getEscaped($orderCol.' '.$orderDirn)); return $query; } /** * Load the template types for a given selection * * @copyright * @author RolandD * @todo * @see * @access public * @param $action the import or export option * @param $component the component * @return array of available template types * @since 3.5 */ public function loadTemplateTypes($action, $component) { $db = JFactory::getDbo(); $q = "SELECT t.template_type_name FROM `#__csvi_template_types` AS t WHERE t.template_type = ".$db->Quote($action)." AND t.component = ".$db->Quote($component); $db->setQuery($q); $types = $db->loadResultArray(); // Get translations $trans = array(); foreach ($types as $type) { $trans[$type] = JText::_('COM_CSVI_'.strtoupper($type)); } return $trans; } } ?>PK>\J;vvmodels/fields/csviform.phpnuW+A PK>\)models/fields/.htaccessnuW+A Order allow,deny Deny from all PK>\_  ,models/fields/csvivirtuemartorderproduct.phpnuW+Ainput; $template = $jinput->get('template', null, null); $db = JFactory::getDbo(); $products = $template->get('orderproduct', 'order', array(), null); $skus = implode(',', $products); if (!empty($skus)) { foreach ($products as $pkey => $product) { $products[$pkey] = $db->Quote($product); } $q = "SELECT DISTINCT product_sku, product_name FROM #__virtuemart_products p, #__virtuemart_order_items o WHERE p.virtuemart_product_id = o.virtuemart_product_id AND p.product_sku IN (".$skus.") ORDER BY product_name;"; $db->setQuery($q); $orderproducts = $db->loadObjectList(); if (empty($orderproducts)) $orderproducts = array(); return array_merge(parent::getOptions(), $orderproducts); } else return parent::getOptions(); } } ?> PK>\ 9qq)models/fields/csvivirtuemartorderuser.phpnuW+Ainput; $template = $jinput->get('template', null, null); $db = JFactory::getDbo(); $orderuser = $template->get('orderuser', 'order', array(), null); $userids = implode(',', $orderuser); if (!empty($userids)) { $q = "SELECT DISTINCT user_id, IF (LENGTH(TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name))) = 0, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', IF (TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name)) is NULL, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', CONCAT(first_name, ' ', middle_name, ' ', last_name))) AS user_name FROM #__virtuemart_order_userinfos WHERE user_id IN (".$userids.") ORDER BY user_name;"; $db->setQuery($q); $customers = $db->loadObjectList(); if (empty($customers)) $customers = array(); return array_merge(parent::getOptions(), $customers); } else return parent::getOptions(); } } ?> PK>\Ƹ,models/fields/csviakeebasubsorderpayment.phpnuW+AgetQuery(true); $query->select($db->quoteName('processor', 'value')); $query->select($db->quoteName('processor', 'text')); $query->from($db->quoteName('#__akeebasubs_subscriptions')); $query->group($db->quoteName('processor')); $db->setQuery($query); $methods = $db->loadObjectList(); if (empty($methods)) $methods = array(); return array_merge(parent::getOptions(), $methods); } } ?> PK>\%&models/fields/csvijoomfishlanguage.phpnuW+AgetQuery(true); $query->select('table_name'); $query->from('information_schema.tables'); $query->where('table_schema = '.$db->Quote($conf->getValue('config.db'))); $query->where('table_name = '.$db->Quote($conf->getValue('config.dbprefix').'languages')); $db->setQuery($query); $total = $db->loadResult(); if (!empty($total)) { $query = $db->getQuery(true); $query->select($db->quoteName('title')." AS ".$db->quoteName('text')); $query->select($db->quoteName('lang_id')." AS ".$db->quoteName('value')); $query->from('#__languages'); $query->order('title'); $db->setQuery($query); return $db->loadObjectList(); } else return array(JText::_('COM_CSVI_NO_LANGUAGES_FOUND')); } } ?> PK>\#o,,models/fields/index.htmlnuW+APK>\L:models/fields/csvitemplates.phpnuW+AgetQuery(true); $query->select($db->quoteName('id').' AS value ,'.$db->quoteName('name').' AS text'); $query->from($db->quoteName('#__csvi_template_settings')); $query->where($db->quoteName('settings').' LIKE '.$db->quote('%"action":"export"%')); $query->where($db->quoteName('settings').' LIKE '.$db->Quote('%"export_frontend":"1"%')); $query->order($db->quoteName('name')); $db->setQuery($query); $templates = $db->loadObjectList(); return $templates; } } ?> PK>\XEE0models/fields/csvivirtuemartorderitemproduct.phpnuW+Ainput; $template = $jinput->get('template', null, null); $db = JFactory::getDbo(); $products = $template->get('orderitemproduct', 'orderitem', array(), null); $skus = implode(',', $products); if (!empty($skus)) { foreach ($products as $pkey => $product) { $products[$pkey] = $db->Quote($product); } $q = "SELECT DISTINCT product_sku, product_name FROM #__virtuemart_products p, #__virtuemart_order_items o WHERE p.virtuemart_product_id = o.virtuemart_product_id AND p.product_sku IN (".skus.") ORDER BY product_name;"; $db->setQuery($q); $orderitemproducts = $db->loadObjectList(); if (empty($orderitemproducts)) $orderitemproducts = array(); return array_merge(parent::getOptions(), $orderitemproducts); } else return parent::getOptions(); } } ?> PK>\tH__,models/fields/csviakeebasubsorderproduct.phpnuW+Ainput; $template = $jinput->get('template', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $orderproduct = $template->get('orderproduct', 'order', array(), 'array'); if (!empty($orderproduct)) { $query->select($db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id', 'value')); $query->select($db->quoteName('title', 'text')); $query->from($db->quoteName('#__akeebasubs_subscriptions', 's')); $query->leftJoin($db->quoteName('#__akeebasubs_levels', 'l').' ON '.$db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id').' = '.$db->quoteName('l').'.'.$db->quoteName('akeebasubs_level_id')); $query->where($db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id').' IN ('.implode(',', $orderproduct).')'); $query->order($db->quoteName('title')); $query->group($db->quoteName('s').'.'.$db->quoteName('akeebasubs_level_id')); $db->setQuery($query); $products = $db->loadObjectList(); if (empty($products)) $products = array(); return array_merge(parent::getOptions(), $products); } else return parent::getOptions(); } } ?> PK>\ #!!1models/fields/csvivirtuemartproductcategories.phpnuW+Aoptions = array(); if (class_exists('com_virtuemart')) { $conf = JFactory::getConfig(); $lang = strtolower(str_replace('-', '_', $conf->get('language'))); $helper = new Com_VirtueMart(); $this->options = $helper->getCategoryTree($lang); } return $this->options; } } ?> PK>\)models/fields/csviakeebasubsorderuser.phpnuW+Ainput; $template = $jinput->get('template', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $orderuser = $template->get('orderuser', 'order', array(), 'array'); if (!empty($orderuser)) { $query->select($db->quoteName('user_id', 'value')); $query->select($db->quoteName('name', 'text')); $query->from($db->quoteName('#__akeebasubs_subscriptions', 's')); $query->leftJoin($db->quoteName('#__users', 'u').' ON '.$db->quoteName('s').'.'.$db->quoteName('user_id').' = '.$db->quoteName('u').'.'.$db->quoteName('id')); $query->where($db->quoteName('s').'.'.$db->quoteName('user_id').' IN ('.implode(',', $orderuser).')'); $query->order($db->quoteName('name')); $query->group($db->quoteName('user_id')); $db->setQuery($query); $customers = $db->loadObjectList(); if (empty($customers)) $customers = array(); return array_merge(parent::getOptions(), $customers); } else return parent::getOptions(); } } ?> PK>\ _=,models/fields/csvivirtuemartmanufacturer.phpnuW+Aget('language'))); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('virtuemart_manufacturer_id').' AS value,'.$db->quoteName('mf_name').' AS text'); $query->from($db->quoteName('#__virtuemart_manufacturers_'.$lang)); $db->setQuery($query); $options = $db->loadObjectList(); return array_merge(parent::getOptions(), $options); } } ?> PK>\AMB,models/fields/csvivirtuemartorderpayment.phpnuW+Aget('administrator'))); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_paymentmethod_id AS value, payment_name AS text'); $query->from('#__virtuemart_paymentmethods_'.$lang); $db->setQuery($query); $methods = $db->loadObjectList(); if (empty($methods)) $methods = array(); return array_merge(parent::getOptions(), $methods); } } ?> PK>\99 models/fields/csvioperations.phpnuW+Ainput; $jform = $jinput->get('jform', array(), 'array'); $trans = array(); if (!empty($jform) && isset($jform['options'])) { $db = JFactory::getDbo(); $q = "SELECT t.template_type_name FROM `#__csvi_template_types` AS t WHERE t.template_type = ".$db->Quote($jform['options']['action'])." AND t.component = ".$db->Quote($jform['options']['component']); $db->setQuery($q); $types = $db->loadResultArray(); // Get translations foreach ($types as $type) { $trans[$type] = JText::_('COM_CSVI_'.strtoupper($type)); } } else { $trans = parent::getOptions(); } return $trans; } } ?> PK>\f"-models/com_akeebasubs/export/couponexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'params': $userfields[] = $db->quoteName('#__akeebasubs_coupons').'.'.$db->quoteName($field->field_name); break; case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__akeebasubs_coupons'); $query->leftJoin('#__akeebasubs_users ON #__akeebasubs_users.user_id = #__akeebasubs_coupons.user'); $query->leftJoin('#__users ON #__users.id = #__akeebasubs_coupons.user'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__akeebasubs_coupons.enabled = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby'); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort'); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { while ($record = $csvidb->getRow()) { if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'value': $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'publish_up': case 'publish_down': case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\%#%#0models/com_akeebasubs/export/affiliateexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'user_id': case 'akeebasubs_affiliate_id': $userfields[] = $db->quoteName('#__akeebasubs_affiliates').'.'.$db->quoteName($field->field_name); break; case 'money_owed': case 'money_paid': case 'total_commission': $userfields[] = $db->quoteName('#__akeebasubs_affiliates').'.'.$db->quoteName('akeebasubs_affiliate_id'); break; case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__akeebasubs_affiliates'); $query->leftJoin('#__akeebasubs_affpayments ON #__akeebasubs_affpayments.akeebasubs_affiliate_id = #__akeebasubs_affiliates.akeebasubs_affiliate_id'); $query->leftJoin('#__users ON #__users.id = #__akeebasubs_affiliates.user_id'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__akeebasubs_affiliates.enabled = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ignore some custom fields $ignore = array('money_owed', 'money_paid', 'total_commission'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { while ($record = $csvidb->getRow()) { if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'money_owed': $query1 = $db->getQuery(true); $query1->select('akeebasubs_affiliate_id, SUM(affiliate_comission) AS money_owed'); $query1->from('#__akeebasubs_subscriptions'); $query1->where('state = '.$db->Quote('C')); $query1->where('akeebasubs_affiliate_id = '.$record->akeebasubs_affiliate_id); $query1->group('akeebasubs_affiliate_id'); $query2 = $db->getQuery(true); $query2->select('akeebasubs_affiliate_id, SUM(amount) AS money_paid'); $query2->from('#__akeebasubs_affpayments'); $query2->where('akeebasubs_affiliate_id = '.$record->akeebasubs_affiliate_id); $query2->group('akeebasubs_affiliate_id'); $query = $db->getQuery(true); $query->select('money_owed-money_paid AS balance'); $query->from('#__akeebasubs_affiliates'); $query->leftJoin('('.$query1.') AS o USING ('.$db->quoteName('akeebasubs_affiliate_id').')'); $query->leftJoin('('.$query2.') AS p USING ('.$db->quoteName('akeebasubs_affiliate_id').')'); $query->where('akeebasubs_affiliate_id = '.$record->akeebasubs_affiliate_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'money_paid': $query = $db->getQuery(true); $query->select('SUM(amount) AS money_paid'); $query->from('lwraz_akeebasubs_affpayments'); $query->where('akeebasubs_affiliate_id = '.$record->akeebasubs_affiliate_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'total_commission': $query = $db->getQuery(true); $query->select('SUM(affiliate_comission) AS total_commision'); $query->from('#__akeebasubs_subscriptions'); $query->where('state = '.$db->Quote('C')); $query->where('akeebasubs_affiliate_id = '.$record->akeebasubs_affiliate_id); $query->group('akeebasubs_affiliate_id'); $db->setQuery($query); $fieldvalue = $db->loadResult(); $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'created_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\#o,,'models/com_akeebasubs/export/index.htmlnuW+APK>\""3models/com_akeebasubs/export/subscriptionexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'notes': case 'params': case 'state': $userfields[] = $db->quoteName('#__akeebasubs_users').'.'.$db->quoteName($field->field_name); break; case 'user_id': $userfields[] = $db->quoteName('#__akeebasubs_subscriptions').'.'.$db->quoteName('user_id'); break; case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__akeebasubs_subscriptions'); $query->leftJoin('#__akeebasubs_users ON #__akeebasubs_users.user_id = #__akeebasubs_subscriptions.user_id'); $query->leftJoin('#__users ON #__users.id = #__akeebasubs_subscriptions.user_id'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__akeebasubs_subscriptions.enabled = '.$publish_state; } // Filter by order number start $ordernostart = $template->get('ordernostart', 'order', array(), 'int'); if ($ordernostart > 0) { $selectors[] = '#__akeebasubs_subscriptions.akeebasubs_subscription_id >= '.$ordernostart; } // Filter by order number end $ordernoend = $template->get('ordernoend', 'order', array(), 'int'); if ($ordernoend > 0) { $selectors[] = '#__akeebasubs_subscriptions.akeebasubs_subscription_id <= '.$ordernoend; } // Filter by list of order numbers $orderlist = $template->get('orderlist', 'order'); if ($orderlist) { $selectors[] = '#__akeebasubs_subscriptions.akeebasubs_subscription_id IN ('.$orderlist.')'; } // Filter by order date start $orderdatestart = $template->get('orderdatestart', 'order', false); if ($orderdatestart) { $orderdate = JFactory::getDate($orderdatestart); $selectors[] = $db->quoteName('#__akeebasubs_subscriptions').'.'.$db->quoteName('created_on').' >= '.$db->Quote($orderdate->toMySQL()); } // Filter by order date end $orderdateend = $template->get('orderdateend', 'order', false); if ($orderdateend) { $orderdate = JFactory::getDate($orderdateend); $selectors[] = $db->quoteName('#__akeebasubs_subscriptions').'.'.$db->quoteName('created_on').' <= '.$db->Quote($orderdate->toMySQL()); } // Filter by order status $orderstatus = $template->get('orderstatus', 'order', false); if ($orderstatus && $orderstatus[0] != '') { $selectors[] = '#__akeebasubs_subscriptions.state IN (\''.implode("','", $orderstatus).'\')'; } // Filter by payment method $orderpayment = $template->get('orderpayment', 'order', false); if ($orderpayment && $orderpayment[0] != '') { $selectors[] = '#__akeebasubs_subscriptions.processor IN (\''.implode("','", $orderpayment).'\')'; } // Filter by order price start $pricestart = $template->get('orderpricestart', 'order', false, 'float'); if ($pricestart) { $selectors[] = '#__akeebasubs_subscriptions.gross_amount >= '.$pricestart; } // Filter by order price end $priceend = $template->get('orderpriceend', 'order', false, 'float'); if ($priceend) { $selectors[] = '#__akeebasubs_subscriptions.gross_amount <= '.$priceend; } // Filter by order user id $orderuser = $template->get('orderuser', 'order', false); if ($orderuser && $orderuser[0] != '') { $selectors[] = '#__akeebasubs_subscriptions.user_id IN (\''.implode("','", $orderuser).'\')'; } // Filter by order product $orderproduct = $template->get('orderproduct', 'order', false); if ($orderproduct && $orderproduct[0] != '') { $selectors[] = '#__akeebasubs_subscriptions.akeebasubs_level_id IN (\''.implode("','", $orderproduct).'\')'; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby'); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort'); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { while ($record = $csvidb->getRow()) { if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'net_amount': case 'tax_amount': case 'gross_amount': case 'prediscount_amount': case 'discount_amount': case 'affiliate_comission': $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'publish_up': case 'publish_down': case 'created_on': case 'first_contact': case 'second_contact': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\)&models/com_akeebasubs/export/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,'models/com_akeebasubs/import/index.htmlnuW+APK>\?_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Load the helper $this->helper = new Com_Akeebasubs(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'enabled': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'subscription_delete': switch ($value) { case 'y': case 'Y': $this->$name = 'Y'; break; default: $this->$name = 'N'; break; } break; case 'net_amount': case 'tax_amount': case 'gross_amount': case 'affiliate_commision': case 'prediscount_amount': case 'discount_amount': $this->$name = $this->cleanPrice($value); break; case 'publish_up': case 'publish_down': $this->$name = $this->convertDate($value); break; case 'state': $this->_subscriptions->state = $value; break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // See if we need to delete a subscription if ($this->subscription_delete == 'Y' && $this->akeebasubs_subscription_id) { $this->_deleteSubscription(); } else { // Check if we have a user ID if (!isset($this->user_id) && isset($this->username)) { $this->user_id = $this->helper->getUser($this->username); } // Check if we have a subscription title if (!isset($this->akeebasubs_level_id) && isset($this->subscription_title)) { $this->akeebasubs_level_id = $this->helper->getSubscription($this->subscription_title); } // Add a creating date if there is no product_id if (empty($this->akeebasubs_subscription_id)) { $this->_subscriptions->created_on = $this->date->toMySQL(); } // Bind the data $this->_subscriptions->bind($this); // Check the data $this->_subscriptions->check(); // Store the data if ($this->_subscriptions->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_SUBSCRIPTION')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_SUBSCRIPTION')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_SUBSCRIPTION_NOT_ADDED', $this->_subscriptions->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_SUBSCRIPTION_QUERY'), true); } // Clean the tables $this->cleanTables(); } /** * Load the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_subscriptions = $this->getTable('subscriptions'); } /** * Cleaning the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_subscriptions->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Delete a subscription * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _deleteSubscription() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); if ($this->_subscriptions->delete($this->akeebasubs_subscription_id)) { $csvilog->AddStats('deleted', JText::sprintf('COM_CSVI_SUBSCRIPTION_DELETED', $this->akeebasubs_subscription_id)); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_SUBSCRIPTION_NOT_DELETED', $this->akeebasubs_subscription_id)); } } ?>PK>\qP-44-models/com_akeebasubs/import/couponimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->csviuser = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Load the helper $this->helper = new Com_Akeebasubs(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'enabled': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'value': $this->$name = $this->cleanPrice($value); break; case 'publish_up': case 'publish_down': $this->$name = $this->convertDate($value); break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check if we have a user ID if (!isset($this->user) && isset($this->username)) { $this->user = $this->helper->getUser($this->username); } // Check if we have a subscription title if (!isset($this->subscriptions) && isset($this->subscription_title)) { $this->subscriptions = $this->helper->getSubscription($this->subscription_title); } // Set some basic values if (!isset($this->modified_on)) { $this->_coupons->modified_on = $this->date->toMySQL(); $this->_coupons->modified_by = $this->csviuser->id; } // Add a creating date if there is no product_id if (empty($this->akeebasubs_coupon_id)) { $this->_coupons->created_on = $this->date->toMySQL(); $this->_coupons->created_by = $this->csviuser->id; } // Bind the data $this->_coupons->bind($this); // Check the data $this->_coupons->check(); // Store the data if ($this->_coupons->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_COUPON')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_COUPON')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_COUPON_NOT_ADDED', $this->_coupons->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_COUPON_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_coupons = $this->getTable('coupons'); } /** * Cleaning the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_coupons->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?>PK>\•@@0models/com_akeebasubs/import/affiliateimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->csviuser = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Load the helper $this->helper = new Com_Akeebasubs(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'enabled': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'commision': case 'amount': $this->$name = $this->cleanPrice($value); break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check if we have a user ID if (!isset($this->user_id) && isset($this->username)) { $this->user_id = $this->helper->getUser($this->username); } if (!empty($this->user_id)) { // Bind the data $this->_affiliates->bind($this); // Check if the affiliate needs to be deleted if ($this->affiliate_delete == 'Y') { $this->_deleteAffiliate(); } else { // Check the data $this->_affiliates->check(); // Store the data if ($this->_affiliates->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_AFFILIATE')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_AFFILIATE')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_AFFILIATE_NOT_ADDED', $this->_affiliates->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_AFFILIATE_QUERY'), true); // See if we have any affiliate payments to add if (isset($this->amount)) { if (!isset($this->created_on)) $this->created_on = $this->date->toMySQL(); // Bind the data $this->akeebasubs_affiliate_id = $this->_affiliates->akeebasubs_affiliate_id; $this->_affpayments->bind($this); // Check the data if ($this->_affpayments->check()) { // Store the data if ($this->_affpayments->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_AFFILIATEPAY')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_AFFILIATEPAY')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_AFFILIATEPAY_NOT_ADDED', $this->_affpayments->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_AFFILIATEPAY_QUERY'), true); } } } } // Clean the tables $this->cleanTables(); } /** * Load the affiliate related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_affiliates = $this->getTable('affiliates'); $this->_affpayments = $this->getTable('affpayments'); } /** * Cleaning the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_affiliates->reset(); $this->_affpayments->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Delete an affiliate * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _deleteAffiliate() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check the data if ($this->_affiliates->check()) { if ($this->_affiliates->delete()) { $csvilog->AddStats('deleted', JText::sprintf('COM_CSVI_AFFILIATES_DELETED', $this->_affiliates->akeebasubs_affiliate_id)); // Delete all payments if ($this->_affpayments->delete($this->user_id)) { $csvilog->AddStats('deleted', JText::sprintf('COM_CSVI_AFFILIATESPAY_DELETED', $this->user_id)); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_AFFILIATESPAY_NOT_DELETED', $this->user_id)); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_AFFILIATES_NOT_DELETED', $this->_affiliates->akeebasubs_affiliate_id)); } } } ?>PK>\)&models/com_akeebasubs/import/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,, models/com_akeebasubs/index.htmlnuW+APK>\)models/com_akeebasubs/.htaccessnuW+A Order allow,deny Deny from all PK>\RDk\\models/settings.phpnuW+AloadForm($this->context, 'settings', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) return false; return $form; } /** * Method to get the data that should be injected in the form. * * @copyright * @author RolandD * @todo * @see getForm() * @access protected * @param * @return mixed The data for the form * @since 1.0 */ protected function loadFormData() { // Check the session for previously entered form data. $data = JFactory::getApplication()->getUserState('com_csvi.settings.data', array()); if (empty($data)) { $data = $this->getItem(); } return $data; } /** * Method to get a single record. * * @copyright * @author RolandD * @todo Load the attributes * @see * @access public * @param integer The id of the primary key * @return mixed Object on success | false on failure * @since 1.0 */ public function getItem($pk = null) { if (!$this->_params) { $row = $this->getTable('settings'); $row->load(1); $registry = new JRegistry(); $registry->loadString($row->params); $this->_params = $registry->toArray(); } return $this->_params; } /** * Store the settings * * @copyright * @author RolandD * @todo * @see CsviModelAvailablefields::prepareAvailableFields * @access public * @param * @return bool true on success | false on failure * @since 4.0 */ public function save($data) { $row = $this->getTable('settings'); $registry = new JRegistry(); $registry->loadArray($data); // Set the values $row->id = 1; $row->params = $registry->toString(); if ($row->store()) { $this->_params = $registry; // Add the custom tables to the template tables table $db = JFactory::getDbo(); $tables = $registry->get('tables.tablelist'); $q = "INSERT IGNORE INTO ".$db->quoteName('#__csvi_template_tables')." (".$db->quoteName('template_type_name').", ".$db->quoteName('template_table').", ".$db->quoteName('component').") VALUES "; $fields = array(); foreach ($tables as $table) { $fields[] = "(".$db->quote('customimport').", ".$db->quote($table).", ".$db->quote('com_csvi').")"; $fields[] = "(".$db->quote('customexport').", ".$db->quote($table).", ".$db->quote('com_csvi').")"; } $q .= implode(',', $fields); $db->setQuery($q); $db->query(); return true; } else { $this->setError($row->getError()); return false; } } /** * Get a list of custom tables for import/export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of tables * @since 3.0 */ public function getTableList() { $db = JFactory::getDbo(); $tables = $db->getTableList(); $prefix = $db->getPrefix(); // Remove the table prefix foreach ($tables as $tkey => $table) { if (stristr($table, $prefix)) $tables[$tkey] = str_replace($prefix, '', $table); else unset($tables[$tkey]); } return $tables; } /** * Reset the settings * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true if settings reset | false if settings not reset * @since 3.1.1 */ public function getResetSettings() { $row = $this->getTable('settings'); $row->id = 1; $row->params = ''; return $row->store(); } } ?>PK>\j==models/export.phpnuW+AsetQuery($q); return $db->loadObjectList(); } /** * Get the list of order users */ public function getOrderUser() { $db = JFactory::getDBO(); $jinput = JFactory::getApplication()->input; $filter = $jinput->get('filter'); $q = "SELECT DISTINCT user_id, IF (LENGTH(TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name))) = 0, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', IF (TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name)) is NULL, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', CONCAT(first_name, ' ', middle_name, ' ', last_name))) AS user_name FROM #__vm_order_user_info WHERE (first_name LIKE ".$db->Quote('%'.$filter.'%')." OR middle_name LIKE ".$db->Quote('%'.$filter.'%')." OR last_name LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY user_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order products */ public function getOrderProduct() { $db = JFactory::getDBO(); $jinput = JFactory::getApplication()->input; $filter = $jinput->get('filter'); $q = "SELECT DISTINCT product_sku, product_name FROM #__vm_product p, #__vm_order_item o WHERE p.product_id = o.product_id AND (p.product_sku LIKE ".$db->Quote('%'.$filter.'%')." OR p.product_name LIKE ".$db->Quote('%'.$filter.'%')." OR p.product_s_desc LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY product_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order products */ public function getOrderItemProduct() { $db = JFactory::getDBO(); $jinput = JFactory::getApplication()->input; $filter = $jinput->get('filter'); $q = "SELECT DISTINCT order_item_sku AS product_sku, order_item_name AS product_name FROM #__vm_order_item o WHERE (o.order_item_sku LIKE ".$db->Quote('%'.$filter.'%')." OR o.order_item_name LIKE ".$db->Quote('%'.$filter.'%').") ORDER BY order_item_name LIMIT 10;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of order products */ public function getOrderCurrency() { $db = JFactory::getDBO(); $q = "SELECT order_currency, currency_name FROM #__vm_orders o, #__vm_currency c WHERE o.order_currency = c.currency_code GROUP BY currency_name ORDER BY currency_name;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of exchange rate currencies */ public function getExchangeRateCurrency() { $db = JFactory::getDBO(); $q = "SELECT #__csvi_currency.currency_code AS currency_code, IF (#__vm_currency.currency_name IS NULL, #__csvi_currency.currency_code, #__vm_currency.currency_name) AS currency_name FROM #__csvi_currency LEFT JOIN #__vm_currency on #__vm_currency.currency_code = #__csvi_currency.currency_code;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of vendors */ public function getVendors() { $db = JFactory::getDBO(); $q = "SELECT vendor_id, REPLACE(vendor_name, '\\\', '') AS vendor_name FROM #__vm_vendor ORDER BY vendor_name;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get the list of permissions */ public function getPermissions() { $db = JFactory::getDBO(); $q = "SELECT group_name AS group_id, group_name FROM #__vm_auth_group ORDER BY group_name;"; $db->setQuery($q); return $db->loadObjectList(); } /** * Check if there are any templates with fields */ public function getCountTemplateFields() { $db = JFactory::getDBO(); $q = "SELECT field_template_id, COUNT(field_template_id) AS total FROM #__csvi_template_fields WHERE field_template_id in ( SELECT template_id FROM #__csvi_templates WHERE template_type LIKE '%export') GROUP BY field_template_id"; $db->setQuery($q); $nrfields = $db->loadResultArray(); if ($db->getErrorNum() > 0) { JError::raiseWarning(0, $db->getErrorMsg()); return false; } else { /* Check if there are any templates with more than 0 fields */ foreach ($nrfields as $key => $nr) { if ($nr > 0) return true; } } } /** * Get a list of all categories and put them in a select list * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string HTML multi select list * @since 3.0 */ public function getProductCategories() { $db = JFactory::getDBO(); // 1. Get all categories $q = "SELECT category_parent_id AS parent_id, category_child_id AS id, category_name AS catname FROM #__vm_category c LEFT JOIN #__vm_category_xref x ON c.category_id = x.category_child_id"; $db->setQuery($q); $rawcats = $db->loadObjectList(); if (!empty($rawcats)) { // 2. Group categories based on their parent_id $categories = array(); foreach ($rawcats as $key => $rawcat) { $categories[$rawcat->parent_id][$rawcat->id]['pid'] = $rawcat->parent_id; $categories[$rawcat->parent_id][$rawcat->id]['cid'] = $rawcat->id; $categories[$rawcat->parent_id][$rawcat->id]['catname'] = $rawcat->catname; } if (count($rawcats) > 10) $categorysize = 10; else $categorysize = count($rawcats)+1; } $this->options = array(); // Add a don't use option $this->options[] = JHtml::_('select.option', '', JText::_('COM_CSVI_EXPORT_DONT_USE')); if (isset($categories)) { if (count($categories) > 0) { // Take the toplevels first foreach ($categories[0] as $key => $category) { $this->options[] = JHtml::_('select.option', $category['cid'], $category['catname']); // Write the subcategories $suboptions = $this->buildCategory($categories, $category['cid'], array()); } } } return $this->options; } /** * Create the subcategory layout * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return array select options for the category tree * @since 3.0 */ private function buildCategory($cattree, $catfilter, $subcats, $loop=1) { if (isset($cattree[$catfilter])) { foreach ($cattree[$catfilter] as $subcatid => $category) { $this->options[] = JHtml::_('select.option', $category['cid'], str_repeat('>', $loop).' '.$category['catname']); $subcats = $this->buildCategory($cattree, $subcatid, $subcats, $loop+1); } } } /** * Get product type names */ public function getProductTypeNames() { $db = JFactory::getDBO(); $q = "SELECT product_type_id, product_type_name FROM #__vm_product_type"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get payment methods */ public function getPaymentMethods() { $db = JFactory::getDBO(); $q = "SELECT payment_method_id, payment_method_name FROM #__vm_payment_method ORDER BY list_order"; $db->setQuery($q); return $db->loadObjectList(); } /** * Get a list of possible VM Item IDs */ public function getVmItemids() { $db = JFactory::getDBO(); $q = "SELECT id AS value, name AS text FROM #__menu WHERE link LIKE '%com_virtuemart%'"; $db->setQuery($q); return $db->loadObjectList(); } /** * Load all the shopper groups * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of shopper group objects * @since */ public function getShopperGroups() { $db = JFactory::getDBO(); $q = "SELECT shopper_group_id AS value, shopper_group_name AS text FROM #__vm_shopper_group"; $db->setQuery($q); $shoppergroups = $db->loadObjectList(); if (!empty($shoppergroups)) return $shoppergroups; else return array(); } /** * Load all the manufacturers * * @copyright * @author * @todo * @see * @access * @param * @return * @since */ function getManufacturers() { $db = JFactory::getDBO(); $q = "SELECT manufacturer_id AS value, mf_name AS text FROM #__vm_manufacturer ORDER BY mf_name"; $db->setQuery($q); $manufacturers = $db->loadObjectList(); if (!empty($manufacturers)) return $manufacturers; else return array(); } /** * Get the shipping address options * * @copyright * @author RolandD * @todo * @see * @access public * @param string $type for what type of export the shipping addresses should be generated * @return array of shipping address objects * @since 3.0 */ public function getShippingAddress($type) { // Get order shipping statusses $address = array(); // Add a dont use option $addressoption = new StdClass(); $addressoption->address_code = ''; $addressoption->address_name = JText::_('COM_CSVI_EXPORT_DONT_USE'); $address[] = $addressoption; $addressoption = new StdClass(); $addressoption->address_code = 'BT'; $addressoption->address_name = JText::_('COM_CSVI_BILLING_ADDRESS'); $address[] = $addressoption; $addressoption = new StdClass(); $addressoption->address_code = 'ST'; $addressoption->address_name = JText::_('COM_CSVI_SHIPPING_ADDRESS'); $address[] = $addressoption; if ($type == 'order') { $addressoption = new StdClass(); $addressoption->address_code = 'BTST'; $addressoption->address_name = JText::_('COM_CSVI_BILLING_SHIPPING_ADDRESS'); $address[] = $addressoption; } return $address; } /** * Get the list of selected order users * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array list of order user objects * @since 3.0 */ public function getSelectedOrderUser() { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $db = JFactory::getDBO(); $orderuser = $template->get('orderuser', 'order', array(), 'array'); if (!empty($orderuser)) { $q = "SELECT DISTINCT user_id, IF (LENGTH(TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name))) = 0, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', IF (TRIM(CONCAT(first_name, ' ', middle_name, ' ', last_name)) is NULL, '".JText::_('COM_CSVI_EXPORT_ORDER_USER_EMPTY')."', CONCAT(first_name, ' ', middle_name, ' ', last_name))) AS user_name FROM #__vm_order_user_info WHERE user_id IN (".implode(',', $orderuser).") ORDER BY user_name;"; $db->setQuery($q); return $db->loadObjectList(); } else return array(); } /** * Get the list of selected order products * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array list of order product objects * @since 3.0 */ public function getSelectedOrderProduct() { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $db = JFactory::getDBO(); $products = $template->get('orderproduct', 'order', array(), 'array'); if (!empty($products)) { foreach ($products as $pkey => $product) { $products[$pkey] = $db->Quote($product); } $q = "SELECT DISTINCT product_sku, product_name FROM #__vm_product p, #__vm_order_item o WHERE p.product_id = o.product_id AND p.product_sku IN (".implode(',', $products).") ORDER BY product_name;"; $db->setQuery($q); return $db->loadObjectList(); } else return array(); } /** * Get the list of selected order item products * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array list of order item product objects * @since 3.0 */ public function getSelectedOrderItemProduct() { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $db = JFactory::getDBO(); $products = $template->get('orderitemproduct', 'orderitem', array(), 'array'); if (!empty($products)) { foreach ($products as $pkey => $product) { $products[$pkey] = $db->Quote($product); } $q = "SELECT DISTINCT product_sku, product_name FROM #__vm_product p, #__vm_order_item o WHERE p.product_id = o.product_id AND p.product_sku IN (".implode(',', $products).") ORDER BY product_name;"; $db->setQuery($q); return $db->loadObjectList(); } else return array(); } /** * Get the list of selected order item products * * @copyright * @author RolandD * @todo INFORMATION_SCHEMA * @see * @access public * @param * @return array list of order item product objects * @since 3.0 */ public function getJoomFishLanguages() { $db = JFactory::getDBO(); $conf = JFactory::getConfig(); $q = "SELECT table_name FROM information_schema.tables WHERE table_schema = ".$db->Quote($conf->getValue('config.db'))." AND table_name = ".$db->Quote($conf->getValue('config.dbprefix').'languages'); $db->setQuery($q); $total = $db->loadResult(); if (!empty($total)) { $q = "SELECT ".$db->quoteName('name')." AS ".$db->quoteName('text').", ".$db->quoteName('id')." AS ".$db->quoteName('value')." FROM #__languages ORDER BY name"; $db->setQuery($q); return $db->loadObjectList(); } else return array(); } /** * Get a list of XML sites * * @copyright * @author RolandD * @todo * @see * @access public * @param string $type the type of files to find (XML or HTML) * @return array list of XML sites * @since 3.0 */ public function getExportSites($type) { jimport('joomla.filesystem.folder'); $files = array(); $path = JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/export/'.$type; if (JFolder::exists($path)) { $files = JFolder::files($path, '.php'); if (!empty($files)) { foreach ($files as $fkey => $file) { $files[$fkey] = basename($file, '.php'); } } else $files = array(); } return $files; } /** * Load the states to filter on * * @copyright * @author RolandD * @todo * @see * @access public * @param string $country the name of the country to filter on * @return array of available states to filter on * @since 3.1 */ public function getStates($country) { $db = JFactory::getDBO(); $q = "SELECT tax_state AS value, state_name AS text FROM `#__vm_tax_rate` LEFT JOIN `#__vm_state` ON `#__vm_tax_rate`.tax_state = `#__vm_state`.state_2_code LEFT JOIN `#__vm_country` ON `#__vm_state`.country_id = `#__vm_country`.country_id WHERE `#__vm_country`.country_3_code = ".$db->Quote($country)." GROUP BY state_name"; $db->setQuery($q); return $db->loadObjectList(); } /** * Load the countries to filter on * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of available countries to filter on * @since 3.1 */ public function getCountries() { $db = JFactory::getDBO(); $q = "SELECT country_3_code AS value, country_name AS text FROM `#__vm_tax_rate` LEFT JOIN `#__vm_country` ON `#__vm_tax_rate`.tax_country = `#__vm_country`.country_3_code GROUP BY country_name ORDER BY country_name"; $db->setQuery($q); $countries = $db->loadObjectList(); if (!empty($countries)) return $countries; else return array(); } } ?>PK>\UGMR00models/availablefields.phpnuW+Ainput; $app = JFactory::getApplication('administrator'); // Load the filter state $this->setState('filter.action', $app->getUserStateFromRequest($this->_context.'.filter.action', 'jform_options_action', 'import', 'word')); $this->setState('filter.component', $app->getUserStateFromRequest($this->_context.'.filter.component', 'jform_options_component', 'com_csvi', 'word')); $this->setState('filter.operation', $app->getUserStateFromRequest($this->_context.'.filter.operation', 'jform_options_operation', 'customimport', 'word')); $this->setState('filter.avfields', $app->getUserStateFromRequest($this->_context.'.filter.avfields', 'filter_avfields', false, 'word')); $this->setState('filter.idfields', $jinput->get('filter_idfields')); // List state information. // Controls the query ORDER BY parent::populateState('csvi_name', 'asc'); } /** * Build an SQL query to load the list data. * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return object the query to execute * @since 4.0 */ protected function getListQuery() { // Create a new query object. $db = $this->getDbo(); $query = $db->getQuery(true); // Select the required fields from the table. $query->select('csvi_name, component_name, component_table, isprimary'); $query->from('#__csvi_available_fields AS a'); // Join the template types $query->leftJoin('#__csvi_template_tables AS t ON t.template_table = a.component_table'); // Add all the filters $filters = array(); if ($this->getState('filter.action') != '') $filters[] = "SUBSTRING(t.template_type_name, -6) = ".$db->Quote($this->getState('filter.action')); if ($this->getState('filter.component') != '') { $filters[] = "a.component = ".$db->Quote($this->getState('filter.component')); $filters[] = "t.component = ".$db->Quote($this->getState('filter.component')); } if ($this->getState('filter.operation') != '') $filters[] = "t.template_type_name = ".$db->Quote($this->getState('filter.operation')); if ($this->getState('filter.avfields') != '') $filters[] = "(csvi_name LIKE ".$db->Quote('%'.$this->getState('filter.avfields').'%')." OR component_name LIKE ".$db->Quote('%'.$this->getState('filter.avfields').'%')." OR component_table LIKE ".$db->Quote('%'.$this->getState('filter.avfields').'%').")"; if (!$this->getState('filter.idfields')) $filters[] = "(csvi_name NOT LIKE '%\_id' AND csvi_name NOT LIKE 'id')"; // Add the filters to the query if (!empty($filters)) { $query->where('('.implode(' AND ', $filters).')'); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); $query->order($db->getEscaped($orderCol.' '.$orderDirn)); return $query; } /** * Fill the available fields table * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getFillAvailableFields() { // Load the session data $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $session = JFactory::getSession(); $option = $jinput->get('option'); $continue = true; while ($continue) { $continue = $this->getAvailableFieldsSingle(); } $csvilog = unserialize($session->get($option.'.csvilog')); $jinput->set('csvilog', $csvilog); return; } /** * Prepare for available fields importing. * * 1. Set all tables to be indexed * 2. Empty the available fields table * 3. Import the extra availablefields sql file * 4. Find what tables need to be imported and store them in the session * * @copyright * @author RolandD * @todo * @see CsviModelSettings::save * @access public * @param * @return * @since 3.5 */ public function prepareAvailableFields() { $db = JFactory::getDBO(); $jinput = JFactory::getApplication()->input; // Load the session data $session = JFactory::getSession(); $option = $jinput->get('option'); $csvilog = $jinput->get('csvilog', null, null); // Clean the session $session->set($option.'.csvilog', serialize('0')); // Set all tables to be indexed $query = $db->getQuery(true); $query->update('#__csvi_template_tables'); $query->set('indexed = 0'); $db->setQuery($query); $db->query(); // Empty the available fields first $q = "TRUNCATE TABLE `#__csvi_available_fields`"; $db->setQuery($q); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_AVAILABLE_FIELDS_TABLE_EMPTIED')); else $csvilog->AddStats('error', JText::_('COM_CSVI_AVAILABLE_FIELDS_TABLE_COULD_NOT_BE_EMPTIED')); // Add some extra fields jimport('joomla.filesystem.file'); if (JFile::exists(JPATH_COMPONENT_ADMINISTRATOR.'/install/availablefields_extra.sql')) { $q = JFile::read(JPATH_COMPONENT_ADMINISTRATOR.'/install/availablefields_extra.sql'); $db->setQuery($q); if ($db->query()) $csvilog->AddStats('added', JText::_('COM_CSVI_CUSTOM_AVAILABLE_FIELDS_HAVE_BEEN_ADDED')); else $csvilog->AddStats('error', JText::_('COM_CSVI_CUSTOM_AVAILABLE_FIELDS_HAVE_NOT_BEEN_ADDED')); } else $csvilog->AddStats('error', JText::sprintf('AVAILABLEFIELDS_EXTRA_NOT_FOUND', JPATH_COMPONENT_ADMINISTRATOR.'/install/availablefields_extra.sql')); // Add the log the session $session->set($option.'.csvilog', serialize($csvilog)); } /** * Import the available fields in steps * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function getAvailableFieldsSingle() { $db = JFactory::getDbo(); $jinput = JFactory::getApplication()->input; $queries = array(); // Load the session data $session = JFactory::getSession(); $option = $jinput->get('option'); $csvilog = unserialize($session->get($option.'.csvilog')); $lines = unserialize($session->get($option.'.linesprocessed')); if (empty($lines)) $lines = 0; $lines++; // Set the line number $csvilog->setLinenumber($lines); $errors = false; // Load a table to index $q = "SELECT template_table, component FROM #__csvi_template_tables WHERE `indexed` = 0 AND `template_table` != `template_type_name` GROUP BY `template_table` LIMIT 1"; $db->setQuery($q); $table = $db->loadObject(); if (is_object($table)) { // Set the table name $showtable = $table->template_table; // Check if the table exists $tables = $db->getTableList(); if (in_array($db->getPrefix().$showtable, $tables)) { // Get the primary key for the table $primarykey = CsviHelper::getPrimaryKey($showtable); $fields = $this->DbFields($showtable, true); if (is_array($fields)) { // Process all fields foreach ($fields as $name => $value) { // Check if the field is a primary field if ($primarykey == $name) $primary = 1; else $primary = 0; if ($name) { $q = "INSERT IGNORE INTO ".$db->quoteName('#__csvi_available_fields')." VALUES (" ."0," .$db->Quote($name)."," .$db->Quote($name)."," .$db->Quote($value)."," .$db->Quote($table->component)."," .$db->Quote($primary).")"; $db->setQuery($q); if (!$db->query()) $errors = true; } } // foreach // Check for any errors if (!$errors) { $jinput->set('updatetable', $showtable); $csvilog->AddStats('added', JText::sprintf('COM_CSVI_AVAILABLE_FIELDS_HAVE_BEEN_ADDED', $showtable)); } else { $csvilog->AddStats('error', JText::_('COM_CSVI_AVAILABLE_FIELDS_HAVE_NOT_BEEN_ADDED')); } } // is_array } // Set the table to indexed $q = "UPDATE #__csvi_template_tables SET indexed = 1 WHERE template_table = ".$db->Quote($showtable)." AND component = ".$db->Quote($table->component); $db->setQuery($q); $db->query(); // Assign the tables to the session $session->set($option.'.linesprocessed', serialize($lines)); $continue = true; } // empty else { $jinput->set('csvilog', $csvilog); // Clear the session $session->set($option.'.csvilog', serialize('0')); $session->set($option.'.linesprocessed', serialize('0')); // Set the run ID $jinput->set('run_id', $csvilog->getId()); $continue = false; } // Assign the log to the session $session->set($option.'.csvilog', serialize($csvilog)); return $continue; } /** * Creates an array of custom database fields the user can use for import/export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of custom database fields * @since 3.0 */ public function DbFields($table, $addname=false) { $db = JFactory::getDBO(); $customfields = array(); $q = "SHOW COLUMNS FROM ".$db->quoteName('#__'.$table); $db->setQuery($q); $fields = $db->loadObjectList(); if (count($fields) > 0) { foreach ($fields as $key => $field) { if ($addname) $customfields[$field->Field] = $table; else $customfields[$field->Field] = null; } } return $customfields; } /** * Get the fields belonging to a certain operation type * * @copyright * @author RolandD * @todo * @see * @access public * @param string $type the template type name * @return array list of tables or fields * @since 3.0 */ public function getAvailableFields($type, $component, $filter='array', $table_name=null) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('LOWER(csvi_name) AS value, LOWER(csvi_name) AS text'); $query->from('#__csvi_available_fields AS a'); $query->leftJoin('#__csvi_template_tables AS t ON t.template_table = a.component_table'); $query->where($db->quoteName('t.template_type_name').' = '.$db->quote($type)); $query->where($db->quoteName('t.component').' = '.$db->quote($component)); $query->where($db->quoteName('a.component').' = '.$db->quote($component)); if ($table_name) $query->where($db->quoteName('t.template_table').' = '.$db->quote($table_name)); $query->group('csvi_name'); $db->setQuery($query); // Get the results $fields = array(); if ($filter == 'array') $fields = $db->loadColumn(); else if ($filter == 'object') $fields = $db->loadObjectList(); // Return the array of fields return $fields; } /** * Check if there are enough fields in the database * * @author RolandD * @access public * @return bool true|false */ public function getFieldCheck() { $db = JFactory::getDBO(); $q = 'SELECT COUNT(id) FROM #__csvi_available_fields'; $db->setQuery($q); if ($db->loadResult() > 0) return true; else return false; } /** * Proxy for getModel * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return object of a database model * @since 4.0 */ public function getModel($name = 'AvailableFields', $prefix = 'CsviModel') { $model = JModel::getInstance($name, $prefix, array('ignore_request' => true)); return $model; } } ?>PK>\),models/forms/com_akeebasubs/export/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,-models/forms/com_akeebasubs/export/index.htmlnuW+APK>\-ްrf f 3models/forms/com_akeebasubs/export/subscription.xmlnuW+A PK>\)%models/forms/com_akeebasubs/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,&models/forms/com_akeebasubs/index.htmlnuW+APK>\]Mmodels/forms/replacement.xmlnuW+A
PK>\#o,,models/forms/index.htmlnuW+APK>\#o,,models/forms/import/index.htmlnuW+APK>\)models/forms/import/.htaccessnuW+A Order allow,deny Deny from all PK>\Dmodels/forms/import/limit.xmlnuW+A PK>\)models/forms/.htaccessnuW+A Order allow,deny Deny from all PK>\ 9models/forms/settings.xmlnuW+A
PK>\z+x,models/forms/import.xmlnuW+A PK>\#o,,models/forms/export/index.htmlnuW+APK>\Pmodels/forms/export/email.xmlnuW+A PK>\w models/forms/export/layout.xmlnuW+A PK>\0|uumodels/forms/export/limit.xmlnuW+A PK>\)models/forms/export/.htaccessnuW+A Order allow,deny Deny from all PK>\|YZZmodels/forms/templatetype.xmlnuW+A
PK>\)%models/forms/com_virtuemart/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,&models/forms/com_virtuemart/index.htmlnuW+APK>\YG.models/forms/com_virtuemart/export/product.xmlnuW+A PK>\XX+models/forms/com_virtuemart/export/calc.xmlnuW+A PK>\oo/models/forms/com_virtuemart/export/userinfo.xmlnuW+A PK>\),models/forms/com_virtuemart/export/.htaccessnuW+A Order allow,deny Deny from all PK>\XX/models/forms/com_virtuemart/export/category.xmlnuW+A PK>\#o,,-models/forms/com_virtuemart/export/index.htmlnuW+APK>\|*i 0models/forms/com_virtuemart/export/orderitem.xmlnuW+A PK>\'7TT,models/forms/com_virtuemart/export/order.xmlnuW+A PK>\^3models/forms/com_virtuemart/export/manufacturer.xmlnuW+A PK>\y-Q Q 5models/forms/com_virtuemart/import/category_image.xmlnuW+A PK>\XX<models/forms/com_virtuemart/import/manufacturer_category.xmlnuW+A PK>\GAf4models/forms/com_virtuemart/import/category_path.xmlnuW+A PK>\^1models/forms/com_virtuemart/import/order_item.xmlnuW+A PK>\e| $$,models/forms/com_virtuemart/import/media.xmlnuW+A PK>\ L.models/forms/com_virtuemart/import/product.xmlnuW+A PK>\VLL,models/forms/com_virtuemart/import/image.xmlnuW+A PK>\),models/forms/com_virtuemart/import/.htaccessnuW+A Order allow,deny Deny from all PK>\ 1models/forms/com_virtuemart/import/media_path.xmlnuW+A PK>\XX+models/forms/com_virtuemart/import/calc.xmlnuW+A PK>\#o,,-models/forms/com_virtuemart/import/index.htmlnuW+APK>\y-Q Q 2models/forms/com_virtuemart/import/media_image.xmlnuW+A PK>\^3models/forms/com_virtuemart/import/manufacturer.xmlnuW+A PK>\~3models/forms/com_virtuemart/import/product_path.xmlnuW+A PK>\Y[u/models/forms/com_virtuemart/import/category.xmlnuW+A PK>\{oomodels/forms/export.xmlnuW+A PK>\uOmmmodels/replacements.phpnuW+AgetDbo(); $query = $db->getQuery(true); // Select the required fields from the table. $query->select('r.*, u.name AS editor'); $query->from('#__csvi_replacements AS r'); // Join the user table $query->leftJoin('#__users AS u ON u.id = r.checked_out'); // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); $query->order($db->getEscaped($orderCol.' '.$orderDirn)); return $query; } } ?>PK>\kύ 'models/com_csvi/import/customimport.phpnuW+A_loadTables(); $this->loadSettings(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; // Get the imported values $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDBO(); // Clean the tables $this->cleanTables(); // Bind the data $this->_custom_table->bind($this); // Store the data if ($this->_custom_table->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_CUSTOM_FIELD')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_CUSTOM_FIELD')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CUSTOM_FIELD_NOT_ADDED', $this->_custom_table->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CUSTOM_FIELD_QUERY'), true); } /** * Load the custom related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_custom_table = $this->getTable('custom_table'); } /** * Cleaning the custom related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_custom_table->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?> PK>\) models/com_csvi/import/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,!models/com_csvi/import/index.htmlnuW+APK>\#o,,!models/com_csvi/export/index.htmlnuW+APK>\) models/com_csvi/export/.htaccessnuW+A Order allow,deny Deny from all PK>\vw>>'models/com_csvi/export/customexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { // Man made fields, do not export them case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } // Export SQL Query // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from($db->quoteName("#__".$template->get('custom_table'))); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby'); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort'); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { while ($record = $csvidb->getRow()) { if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; $fieldreplace = $field->field_name.$field->column_header; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\#o,,models/com_csvi/index.htmlnuW+APK>\)models/com_csvi/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,, models/com_virtuemart/index.htmlnuW+APK>\)models/com_virtuemart/.htaccessnuW+A Order allow,deny Deny from all PK>\Vw.GG3models/com_virtuemart/import/shopperfieldimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'name': $this->$name = strtolower(JFilterInput::clean($value, 'alnum')); break; default: $this->$name = $value; break; } } // Check if we have a field ID if (empty($this->virtuemart_userfield_id)) $this->_getFieldId(); // All is good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); // Check if a field needs to be deleted if ($this->shopperfield_delete == 'Y') { $this->_deleteShopperField(); } else { // Bind the data $this->_userfields->bind($this); // Check for modified data if (!isset($this->modified_on)) { $this->_userfields->modified_on = $this->date->toMySQL(); $this->_userfields->modified_by = $this->user->id; } // Add a creating date if there is no virtuemart_userfield_id if (empty($this->virtuemart_userfield_id)) { $this->_userfields->created_on = $this->date->toMySQL(); $this->_userfields->created_by = $this->user->id; } // Add the name field as Joomla doesn't bind it $this->_userfields->name = $this->name; // Store the data if ($this->_userfields->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_SHOPPERFIELD')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_SHOPPERFIELD')); // Create a field in the userinfos table if needed if ($this->type != 'delimiter') { switch($this->type) { case 'date': $fieldtype = 'DATE'; break; case 'editorta': case 'textarea': case 'multiselect': case 'multicheckbox': $fieldtype = 'MEDIUMTEXT'; break; case 'checkbox': $fieldtype = 'TINYINT'; break; default: $fieldtype = 'VARCHAR(255)'; break; } $query = "ALTER TABLE ".$db->quoteName('#__virtuemart_userinfos')." ADD COLUMN ".$db->quoteName($this->_userfields->name)." ".$fieldtype; $db->setQuery($query); $db->query(); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_USERINFO_TABLE_QUERY'), true); } } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_SHOPPERFIELD_NOT_ADDED', $this->_userfields->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_SHOPPERFIELD_QUERY'), true); } // Clean the tables $this->cleanTables(); } /** * Load the user field related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_userfields = $this->getTable('userfields'); } /** * Cleaning the user field related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_userfields->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Load the field ID for a fieldname * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _getFieldId() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_userfield_id'); $query->from('#__virtuemart_userfields'); $query->where($db->quoteName('name').' = '.$db->Quote($this->name)); $db->setQuery($query); $this->virtuemart_userfield_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_GET_FIELD_ID'), true); } /** * Delete a shopper field * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _deleteShopperField() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Delete the shopperfield if ($this->_userfields->delete($this->virtuemart_userfield_id)) { $db = JFactory::getDbo(); // Delete the userinfos field $query = "ALTER TABLE ".$db->quoteName('#__virtuemart_userinfos')." DROP COLUMN ".$db->quoteName($this->name); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_USERINFOS_FIELD'), true); $db->query(); $csvilog->AddStats('deleted', JText::sprintf('COM_CSVIVIRTUEMART_SHOPPERFIELD_DELETED', $this->name)); } } } ?> PK>\$$+models/com_virtuemart/import/calcimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'currency_code_3': $this->$name = strtoupper($value); break; default: $this->$name = $value; break; } } // All is good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); // Bind the data $this->_calcs->bind($this); // Check the currency if (isset($this->currency_code_3)) { $this->_calcs->calc_currency = $this->helper->getCurrencyId($this->currency_code_3, $this->virtuemart_vendor_id); } // Check the data $this->_calcs->check(); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_calcs->modified_on = $this->date->toMySQL(); $this->_calcs->modified_by = $this->user->id; } if (empty($this->_calcs->virtuemart_calc_id)) { $this->_calcs->calc_shopper_published = (isset($this->calc_shopper_published)) ? $this->calc_shopper_published : 1; $this->_calcs->calc_vendor_published = (isset($this->calc_vendor_published)) ? $this->calc_vendor_published : 1; $this->_calcs->calc_params = (isset($this->calc_params)) ? $this->calc_params : ''; $this->_calcs->created_on = $this->date->toMySQL(); $this->_calcs->created_by = $this->user->id; } // Store the data if ($this->_calcs->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_CALC')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_CALC')); // Process any categories if (isset($this->category_path)) { // Remove any existing categories for the calc rule $query = $db->getQuery(true); $query->delete('#__virtuemart_calc_categories'); $query->where('virtuemart_calc_id = '.$this->_calcs->virtuemart_calc_id); $db->setQuery($query); $db->query(); // Add any new categories if (is_null($this->_categorymodel)) $this->_categorymodel = new CsviModelCategory(); $this->_categorymodel->getStart(); $categories = explode('|', $this->category_path); $query = $db->getQuery(true); $query->insert('#__virtuemart_calc_categories'); foreach ($categories as $category) { $catid = $this->_categorymodel->getCategoryIdFromPath($category, $this->virtuemart_vendor_id); $query->values('null, '.$this->_calcs->virtuemart_calc_id.', '.$catid['category_id']); } $db->setQuery($query); $db->query(); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CALC_CATEGORY_QUERY'), true); } // Process any countries if (isset($this->country_name) || isset($this->country_2_code) || isset($this->country_3_code)) { // Remove any existing countries for the calc rule $query = $db->getQuery(true); $query->delete('#__virtuemart_calc_countries'); $query->where('virtuemart_calc_id = '.$this->_calcs->virtuemart_calc_id); $db->setQuery($query); $db->query(); // Add any new countries if (isset($this->country_name)) $countries = explode('|', $this->country_name); else if (isset($this->country_2_code)) $countries = explode('|', $this->country_2_code); else if (isset($this->country_3_code)) $countries = explode('|', $this->country_3_code); $query = $db->getQuery(true); $query->insert('#__virtuemart_calc_countries'); foreach ($countries as $country) { if (isset($this->country_name)) $cid = $this->helper->getCountryId($country); else if (isset($this->country_2_code)) $cid = $this->helper->getCountryId(null, $country); else if (isset($this->country_3_code)) $cid = $this->helper->getCountryId(null, null, $country); $query->values('null, '.$this->_calcs->virtuemart_calc_id.', '.$cid); } $db->setQuery($query); $db->query(); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CALC_COUNTRY_QUERY'), true); } // Process any shoppergroups if (isset($this->shopper_group_name)) { // Remove any existing countries for the calc rule $query = $db->getQuery(true); $query->delete('#__virtuemart_calc_shoppergroups'); $query->where('virtuemart_calc_id = '.$this->_calcs->virtuemart_calc_id); $db->setQuery($query); $db->query(); // Add any new shoppergroups $shoppergroups = explode('|', $this->shopper_group_name); $query = $db->getQuery(true); $query->insert('#__virtuemart_calc_shoppergroups'); foreach ($shoppergroups as $shoppergroup) { $sid = $this->helper->getShopperGroupId($shoppergroup); $query->values('null, '.$this->_calcs->virtuemart_calc_id.', '.$sid); } $db->setQuery($query); $db->query(); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CALC_SHOPPERGROUP_QUERY'), true); } // Process any states if (isset($this->country_name) || isset($this->country_2_code) || isset($this->country_3_code)) { // Remove any existing countries for the calc rule $query = $db->getQuery(true); $query->delete('#__virtuemart_calc_states'); $query->where('virtuemart_calc_id = '.$this->_calcs->virtuemart_calc_id); $db->setQuery($query); $db->query(); // Add any new countries if (isset($this->state_name)) $countries = explode('|', $this->state_name); else if (isset($this->state_2_code)) $countries = explode('|', $this->state_2_code); else if (isset($this->state_3_code)) $countries = explode('|', $this->state_3_code); $query = $db->getQuery(true); $query->insert('#__virtuemart_calc_states'); foreach ($countries as $state) { if (isset($this->state_name)) $sid = $this->helper->getstateId($state); else if (isset($this->state_2_code)) $sid = $this->helper->getstateId(null, $state); else if (isset($this->state_3_code)) $sid = $this->helper->getstateId(null, null, $state); $query->values('null, '.$this->_calcs->virtuemart_calc_id.', '.$sid); } $db->setQuery($query); $db->query(); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CALC_STATE_QUERY'), true); } } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CALC_NOT_ADDED', $this->_calcs->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CALC_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.01 */ private function _loadTables() { $this->_calcs = $this->getTable('calcs'); } /** * Cleaning the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.1 */ protected function cleanTables() { $this->_calcs->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?>PK>\O " ";models/com_virtuemart/import/manufacturercategoryimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Only continue if all tables exist if ($this->_tablesexist) { // Load the data $this->loadData(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'mf_category_delete': $this->$name = $this->mf_category_delete = strtoupper($this->_datafield); break; default: $this->$name = $value; break; } } // If we have no manufacturer category name we cannot continue if (empty($this->mf_category_name)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_MANUFACTURERCATEGORY_PATH_SET')); return false; } return true; } else { $template = $jinput->get('template', null, null); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_LANG_TABLE_NOT_EXIST', $template->get('language', 'general'))); return false; } } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Check if we have a manufacturer category ID, if not get it if (!isset($this->virtuemart_manufacturercategories_id)) $this->_getManufacturerCategoryId(); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_manufacturer_categories->modified_on = $this->date->toSql(); $this->_manufacturer_categories->modified_by = $this->user->id; } // Add a creating date if there is no product_id if (empty($this->virtuemart_manufacturercategories_id)) { $this->_manufacturer_categories->created_on = $this->date->toSql(); $this->_manufacturer_categories->created_by = $this->user->id; } // Bind the data $this->_manufacturer_categories->bind($this); // User wants to delete the manufacturer if ($this->virtuemart_manufacturercategories_id && $this->mf_category_delete == "Y") { if ($this->_manufacturer_categories->delete($this->virtuemart_manufacturercategories_id)) { $csvilog->addDebug(JText::_('COM_CSVI_DELETE_MANUFACTURER_CATEGORY'), true); $csvilog->AddStats('deleted', JText::_('COM_CSVI_MANUFACTURER_CAT_DELETED')); } else $csvilog->AddStats('error', JText::sprintf('COM_CSVI_MANUFACTURER_CAT_NOT_DELETED', $this->_manufacturer_categories->getError())); } else if (!$this->virtuemart_manufacturercategories_id && $template->get('ignore_non_exist', 'general')) { // Do nothing for new categories when user chooses to ignore new categories if (isset($this->mf_category_name)) $value = $this->mf_category_name; else $value = ''; $csvilog->AddStats('skipped', JText::sprintf('COM_CSVI_IGNORE_NON_EXIST_DATA', $value)); } // User wants to add or update the manufacturer category else { if ($this->_manufacturer_categories->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MANUFACTURER_CATEGORY')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MANUFACTURER_CATEGORY')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_CATEGORY_NOT_ADDED', $this->_manufacturer_categories->getError())); $this->virtuemart_manufacturercategories_id = $this->_manufacturer_categories->virtuemart_manufacturercategories_id; // Store the language fields $this->_manufacturer_categories_lang->load($this->virtuemart_manufacturercategories_id); $this->_manufacturer_categories_lang->bind($this); // Check and store the language data if ($this->_manufacturer_categories_lang->check()) { if ($this->_manufacturer_categories_lang->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MANUFACTURERCATEGORY_LANG')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MANUFACTURERCATEGORY_LANG')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURERCATEGORY_LANG_NOT_ADDED', $this->_manufacturer_categories_lang->getError())); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURERCATEGORY_LANG_NOT_ADDED', $this->_manufacturer_categories_lang->getError())); return false; } // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_MANUFACTURER_CATEGORY_QUERY'), true); } // Clean the tables $this->cleanTables(); } /** * Load the manufacturer category related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_manufacturer_categories = $this->getTable('manufacturer_categories'); // Check if the language tables exist $db = JFactory::getDbo(); $tables = $db->getTableList(); if (!in_array($db->getPrefix().'virtuemart_manufacturercategories_'.$template->get('language', 'general'), $tables)) { $this->_tablesexist = false; } else { $this->_tablesexist = true; $this->_manufacturer_categories_lang = $this->getTable('manufacturer_categories_lang'); } } /** * Cleaning the manufacturer related related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_manufacturer_categories->reset(); $this->_manufacturer_categories_lang->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Get the manufacturer category ID * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return mixed integer when category ID found | false when not found * @since 3.0 */ private function _getManufacturerCategoryId() { $this->_manufacturer_categories_lang->set('mf_category_name', $this->mf_category_name); if ($this->_manufacturer_categories_lang->check(false)) { $this->virtuemart_manufacturercategories_id = $this->_manufacturer_categories_lang->virtuemart_manufacturercategories_id; return true; } else return false; } } ?> PK>\1d < </models/com_virtuemart/import/categoryimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Only continue if all tables exist if ($this->_tablesexist) { // Load the data $this->loadData(); // Get the general category functions $this->_categoriesmodel = $this->getModel('category'); $this->_categoriesmodel->getStart(); // Load the helper $this->helper = new Com_VirtueMart(); // Check for vendor ID $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; default: $this->$name = $value; break; } } // If we have no category path we cannot continue if (empty($this->category_path)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_CATEGORY_PATH_SET')); return false; } return true; } else { $template = $jinput->get('template', null, null); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_LANG_TABLE_NOT_EXIST', $template->get('language', 'general'))); return false; } } /** * Load the tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_categories = $this->getTable('categories'); $this->_medias = $this->getTable('medias'); $this->_category_medias = $this->getTable('category_medias'); // Check if the language tables exist $db = JFactory::getDbo(); $tables = $db->getTableList(); if ($template->get('language', 'general') == $template->get('target_language', 'general')) $lang = $template->get('language', 'general'); else $lang = $template->get('target_language', 'general'); if (!in_array($db->getPrefix().'virtuemart_categories_'.$lang, $tables)) { $this->_tablesexist = false; } else { $this->_tablesexist = true; $this->_categories_lang = $this->getTable('categories_lang'); } } /** * Cleaning the tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_categories->reset(); $this->_medias->reset(); $this->_category_medias->reset(); $this->_categories_lang->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $translate = false; // Load the category separator if (is_null($this->_catsep)) { $this->_catsep = $template->get('category_separator', 'general', '/'); } // Loop through all categories if we are importing a translation if (isset($this->category_path_trans)) { $trans_paths = explode($this->_catsep, $this->category_path_trans); $paths = explode($this->_catsep, $this->category_path); if (!is_array($paths)) $paths = (array)$paths; $translate = true; } else if ($template->get('language', 'general') == $template->get('target_language', 'general')) { $trans_paths = array($this->category_path); $paths = array($this->category_path); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CATEGORY_LANGUAGE_UNKNOWN', $template->get('language', 'general'), $template->get('target_language', 'general'))); return false; } // Process the paths foreach ($paths as $key => $path) { // Construct the full path $fullpath = array(); for($i=0; $i<= $key; $i++) { $fullpath[] = $paths[$i]; } $path = implode($this->_catsep, $fullpath); // First get the category ID if (empty($this->virtuemart_category_id)) { // Check if we are importing a translation $categoryid = $this->_categoriesmodel->getCategoryIdFromPath($path); // If we can't get a category ID we cannot continue if (!$categoryid) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_COULD_NOT_FIND_A_CATEGORY_ID')); return false; } else $this->virtuemart_category_id = $categoryid['category_id']; } // We have the category ID, lets see if it should be deleted if ($this->category_delete == 'Y') { $this->_deleteCategory(); } else { // Handle the images $this->_processMedia(); // Set some basic values if (!isset($this->modified_on)) { $this->_categories->modified_on = $this->date->toMySQL(); $this->_categories->modified_by = $this->user->id; } // Add a creating date if there is no product_id if (empty($this->virtuemart_category_id)) { $this->_categories->created_on = $this->date->toMySQL(); $this->_categories->created_by = $this->user->id; } // Check if the category_name matches the last entry in the category_path if (isset($this->category_name)){ $catparts = explode($this->_catsep, $this->category_path); end($catparts); if (current($catparts) != $this->category_name) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CATEGORY_NAME_NO_MATCH_CATEGORY_PATH')); return false; } } // All fields have been processed, bind the data $this->_categories->bind($this); // Now store the data if ($this->_categories->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_CATEGORY_DETAILS')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_CATEGORY_DETAILS')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CATEGORY_DETAILS_NOT_ADDED', $this->_categories->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CATEGORY_DETAILS_QUERY'), true); // Set the product ID $this->virtuemart_category_id = $this->_categories->virtuemart_category_id; // Store the language fields $this->_categories_lang->load($this->virtuemart_category_id); $this->_categories_lang->bind($this); // Set the translated category name if ($translate) { $this->_categories_lang->category_name = $trans_paths[$key]; } // Check and store the language data if ($this->_categories_lang->check()) { if ($this->_categories_lang->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_CATEGORY_LANG')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_CATEGORY_LANG')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CATEGORY_LANG_NOT_ADDED', $this->_categories_lang->getError())); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CATEGORY_LANG_NOT_ADDED', $this->_categories_lang->getError())); return false; } // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CATEGORY_DETAILS_QUERY'), true); } // Clean the tables $this->cleanTables(); $this->virtuemart_category_id = null; } } /** * Delete a category and its references * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _deleteCategory() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Delete the product if ($this->_categories->delete($this->virtuemart_category_id)) { $csvilog->AddStats('deleted', JText::_('COM_CSVI_CATEGORY_DELETED')); $db = JFactory::getDbo(); // Delete category translations jimport('joomla.language.helper'); $languages = array_keys(JLanguageHelper::getLanguages('lang_code')); foreach ($languages as $language){ $query = $db->getQuery(true); $query->delete('#__virtuemart_categories_'.strtolower(str_replace('-', '_', $language))); $query->where('virtuemart_category_id = '.$this->virtuemart_category_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_CATEGORY_LANG_XREF'), true); $db->query(); } // Delete category reference $query = $db->getQuery(true); $query->delete('#__virtuemart_category_categories'); $query->where('category_child_id = '.$this->virtuemart_category_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_CATEGORY_XREF'), true); $db->query(); // Delete media $query = $db->getQuery(true); $query->delete('#__virtuemart_category_medias'); $query->where('virtuemart_category_id = '.$this->virtuemart_category_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_MEDIA_XREF'), true); $db->query(); // Reset the products that link to this category $query = $db->getQuery(true); $query->delete('#__virtuemart_product_categories'); $query->where('virtuemart_category_id = '.$this->virtuemart_category_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRODUCT_CATEGORY_XREF'), true); $db->query(); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CATEGORY_NOT_DELETED')); } } /** * Process media files * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _processMedia() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Check if any image handling needs to be done if ($template->get('process_image', 'image', false)) { if (!is_null($this->file_url)) { // Image handling $imagehelper = new ImageHelper; // Verify the original image if ($imagehelper->isRemote($this->file_url)) { $original = $this->file_url; $remote = true; } else { $original = $template->get('file_location_category_images', 'path').$this->file_url; $remote = false; } $file_details = $imagehelper->ProcessImage($original, $template->get('file_location_category_images', 'path')); // Process the file details if ($file_details['exists'] && $file_details['isimage']) { $media = array(); $media['virtuemart_vendor_id'] = $this->virtuemart_vendor_id; $media['file_title'] = $this->file_url; $media['file_description'] = $this->file_url; $media['file_meta'] = $this->file_url; $media['file_mimetype'] = $file_details['mime_type']; $media['file_type'] = 'category'; $media['file_is_product_image'] = 0; $media['file_is_downloadable'] = 0; $media['file_is_forSale'] = 0; $media['file_url'] = (empty($file_details['output_path'])) ? $file_details['output_name'] : $file_details['output_path'].$file_details['output_name']; $media['published'] = $this->published; // Create the thumbnail if ($template->get('thumb_create', 'image')) { if (empty($this->file_url_thumb)) $this->file_url_thumb = 'resized/'.basename($media['file_url']); if ($remote) $original = $this->file_url; else $original = $media['file_url']; $media['file_url_thumb'] = $imagehelper->createThumbnail($original, $template->get('file_location_category_images', 'path'), $this->file_url_thumb); } else $media['file_url_thumb'] = (empty($this->file_url_thumb)) ? $media['file_url'] : $this->file_url_thumb; // Bind the media data $this->_medias->bind($media); // Check if the media image already exists $this->_medias->check(); // Store the media data if ($this->_medias->store()) { // Store the product image relation $data = array(); $data['virtuemart_category_id'] = $this->virtuemart_category_id; $data['virtuemart_media_id'] = $this->_medias->virtuemart_media_id; $this->_category_medias->bind($data); if (!$this->_category_medias->check()) { $this->_category_medias->store(); } } } } } } } ?>PK>\)&models/com_virtuemart/import/.htaccessnuW+A Order allow,deny Deny from all PK>\L.models/com_virtuemart/import/productimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo test downloadable files * @todo add data read in case of incorrect columns. * @todo remove message about incorrect column count as import now ignores those??? * @todo Create a new convertdate function * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Only continue if all tables exist if ($this->_tablesexist) { // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); $this->vmconfig = new CsviCom_VirtueMart_Config(); $this->virtuemart_product_id = $this->helper->getProductId(); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Load the current product data $this->_products->load($this->virtuemart_product_id); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'product_available_date': $this->_products->$name = $this->convertDate($value); break; case 'product_discount_date_start': $this->$name = $this->convertDate($value); break; case 'product_discount_date_end': $this->$name = $this->convertDate($value); break; case 'product_price': case 'product_override_price': // Cannot clean price otherwise we lose calculations $this->$name = $this->toPeriod($value); break; case 'product_weight': case 'product_length': case 'product_width': case 'product_height': $this->_products->$name = $this->toPeriod($value); break; case 'related_products': if (substr($value, -1, 1) == "|") $this->related_products = substr($value, 0, -1); else $this->related_products = $value; break; case 'category_id': case 'category_path': if (strlen(trim($value)) > 0) { if (stripos($value, '|') > 0) $category_ids[$name] = explode("|", $value); else $category_ids[$name][] = $value; $this->category_ids = $category_ids; } $this->$name = $value; break; case 'manufacturer_name': $this->_manufacturers_lang->mf_name = $value; break; case 'manufacturer_id': $this->_manufacturers_lang->virtuemart_manufacturer_id = $value; break; case 'price_with_tax': $this->$name = $this->cleanPrice($value); break; case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->$name = $value; break; case 'override': case 'product_special': switch ($value) { case 'y': case 'Y': case '1': $value = 1; break; default: $value = 0; break; } $this->$name = $value; break; case 'product_currency': $this->$name = $this->helper->getCurrencyId(strtoupper($value), $this->virtuemart_vendor_id); break; case 'calc_value': case 'calc_value_mathop': $this->_calcs->$name = $value; break; case 'product_name': $this->_products_lang->$name = $value; break; case 'product_tax': $this->$name = $this->cleanPrice($value); break; default: $this->$name = $value; break; } } // Calculate product packaging if (version_compare($this->vmconfig->get('release'), '2.0.10', 'lt')) { if (!is_null($this->product_box) && !is_null($this->product_packaging)) $this->_productPackaging(); } // We need the currency if (is_null($this->product_currency) && (isset($this->product_price) || isset($this->price_with_tax))) { $this->_product_prices->product_currency = $this->productCurrency($this->virtuemart_vendor_id); } // Check for child product and get parent SKU if it is if (!is_null($this->product_parent_sku)) { $this->_productParentSku(); } // Set the record identifier $this->record_identity = (isset($this->product_sku)) ? $this->product_sku : $this->virtuemart_product_id; return true; } else { $template = $jinput->get('template', null, null); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_LANG_TABLE_NOT_EXIST', $template->get('language', 'general'))); return false; } } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); if ($this->virtuemart_product_id && !$template->get('overwrite_existing_data', 'general')) { $csvilog->addDebug(JText::sprintf('COM_CSVI_DATA_EXISTS_PRODUCT_SKU', $this->product_sku)); $csvilog->AddStats('skipped', JText::sprintf('COM_CSVI_DATA_EXISTS_PRODUCT_SKU', $this->product_sku)); } else { if (empty($this->product_sku) && empty($this->virtuemart_product_id)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_DEBUG_NO_SKU')); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_NO_SKU_OR_ID')); return false; } else { $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_PROCESS_SKU', $this->record_identity)); } // User wants to delete the product if (isset($this->virtuemart_product_id) && $this->product_delete == "Y") { $this->_deleteProduct(); } else if (!isset($this->virtuemart_product_id) && $this->product_delete == "Y") { $csvilog->AddStats('skipped', JText::sprintf('COM_CSVI_NO_PRODUCT_ID_NO_DELETE', $this->record_identity)); } else if (!isset($this->virtuemart_product_id) && $template->get('ignore_non_exist', 'general')) { // Do nothing for new products when user chooses to ignore new products $csvilog->AddStats('skipped', JText::sprintf('COM_CSVI_DATA_EXISTS_IGNORE_NEW', $this->record_identity)); } // User wants to add or update the product else { // Process order levels if (!isset($this->product_params) && (!is_null($this->min_order_level) || !is_null($this->max_order_level) || !is_null($this->product_box))) { $this->product_params = 'min_order_level="'; if (isset($this->min_order_level)) $this->product_params .= $this->min_order_level; else $this->product_params .= '0'; $this->product_params .= '"|max_order_level="'; if (isset($this->max_order_level)) $this->product_params .= $this->max_order_level; else $this->product_params .= '0'; if (version_compare($this->vmconfig->get('release'), '2.0.10', 'ge')) { $this->product_params .= '"|product_box="'; if (isset($this->product_box)) $this->product_params .= $this->product_box; else $this->product_params .= '0'; } $this->product_params .= '"|'; } // Process discount if (isset($this->product_discount)) $this->_processDiscount(); // Process tax $csvilog->addDebug('Product tax'.$this->product_tax); if (!empty($this->product_tax)) $this->_processTax(); // Process manufacturer $this->_manufacturerImport(); // Process product info if ($this->_productQuery()) { // Handle the shopper group(s) $this->_processShopperGroup(); // Handle the images $this->_processMedia(); // Check if the price is to be updated if (isset($this->product_price) || isset($this->price_with_tax)) $this->_priceQuery(); // Add a product <--> manufacturer cross reference if ((isset($this->_manufacturers_lang->virtuemart_manufacturer_id) && $this->_manufacturers_lang->virtuemart_manufacturer_id)) { $this->_manufacturerCrossReference(); } // Process custom fields if (isset($this->custom_title) && !empty($this->custom_title)) $this->_processCustomFields(); // Process related products // Related products are first input in the database as SKU // At the end of the import, this is converted to product ID if ($this->related_products) $this->_processRelatedProducts(); // Process category path if (isset($this->category_path) || isset($this->category_id)) { if ($this->category_ids || $this->category_id) { if (is_null($this->_categorymodel)) $this->_categorymodel = new CsviModelCategory(); $this->_categorymodel->getStart(); // Check the categories // Do we have IDs if (array_key_exists('category_id', $this->category_ids)) { $this->_categorymodel->CheckCategoryPath($this->virtuemart_product_id, false, $this->category_ids['category_id']); } else if (array_key_exists('category_path', $this->category_ids)) { $this->_categorymodel->CheckCategoryPath($this->virtuemart_product_id, $this->category_ids['category_path'], false); } } } } } // Now that all is done, we need to clean the table objects $this->cleanTables(); } } /** * Execute any processes to finalize the import * * @copyright * @author RolandD * @todo * @see * @access public * @param array $fields list of fields used for import * @return * @since 3.0 */ public function getPostProcessing($fields=array()) { // Related products if (in_array('related_products', $fields)) $this->_postProcessRelatedProducts(); } /** * Load the product related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Load the main tables $this->_products = $this->getTable('products'); $this->_medias = $this->getTable('medias'); $this->_product_medias = $this->getTable('product_medias'); $this->_product_prices = $this->getTable('product_prices'); $this->_calcs = $this->getTable('calcs'); $this->_product_customfields = $this->getTable('product_customfields'); $this->_manufacturers = $this->getTable('manufacturers'); $this->_product_manufacturers = $this->getTable('product_manufacturers'); $this->_product_shoppergroups = $this->getTable('product_shoppergroups'); // Check if the language tables exist $db = JFactory::getDbo(); $tables = $db->getTableList(); if (!in_array($db->getPrefix().'virtuemart_products_'.$template->get('language', 'general'), $tables)) { $this->_tablesexist = false; } else if (!in_array($db->getPrefix().'virtuemart_manufacturers_'.$template->get('language', 'general'), $tables)) { $this->_tablesexist = false; } else { $this->_tablesexist = true; // Load the language tables $this->_products_lang = $this->getTable('products_lang'); $this->_manufacturers_lang = $this->getTable('manufacturers_lang'); } } /** * Cleaning the product related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { // Clean the main tables $this->_products->reset(); $this->_medias->reset(); $this->_product_medias->reset(); $this->_product_prices->reset(); $this->_calcs->reset(); $this->_product_customfields->reset(); $this->_manufacturers->reset(); $this->_product_manufacturers->reset(); // Clean the language tables $this->_products_lang->reset(); $this->_manufacturers_lang->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Get the product packaging * * The number is calculated by hexnumbers * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _productPackaging() { $this->product_packaging = (($this->product_box<<16) | ($this->product_packaging & 0xFFFF)); } /** * Get the product parent sku if it is a child product * * The parent product MUST be imported before the child product * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _productParentSku() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PRODUCT_PARENT_SKU')); if (isset($this->product_sku)) { // Check if we are dealing with a child product if ($this->product_parent_sku !== $this->product_sku) { $this->child_product = true; // Get the parent id first $query = $db->getQuery(true); $query->select('virtuemart_product_id'); $query->from('#__virtuemart_products'); $query->where('product_sku = '.$db->Quote($this->product_parent_sku)); $db->setQuery($query); $this->product_parent_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PRODUCT_PARENT_SKU'), true); } else { $this->product_parent_id = 0; $this->child_product = false; } } } /** * Creates either an update or insert SQL query for a product. * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return bool true if the query executed successful|false if the query failed * @since 3.0 */ private function _productQuery() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check if we need to do a stock calculation if (!is_null($this->product_in_stock)) { // Split the modification $operation = substr($this->product_in_stock, 0, 1); $value = substr($this->product_in_stock, 1); // Get the database value $stock = $this->_products->product_in_stock; // Check what modification we need to do and apply it switch ($operation) { case '+': $stock += $value; break; case '-': $stock -= $value; break; case '/': $stock /= $value; break; case '*': $stock*= $value; break; default: // Assign the current price to prevent it being overwritten $stock = $this->product_in_stock; break; } $this->product_in_stock = $stock; } // Bind the initial data $this->_products->bind($this); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_products->modified_on = $this->date->toMySQL(); $this->_products->modified_by = $this->user->id; } // Add a creating date if there is no product_id if (empty($this->virtuemart_product_id)) { $this->_products->created_on = $this->date->toMySQL(); $this->_products->created_by = $this->user->id; } foreach ($this->_avfields as $id => $column) { // Only process the fields the user is uploading if (isset($this->$column)) { // Add a redirect for the product cdate if ($column == "product_cdate" && !empty($this->$column)) { $this->_products->created_on = $this->$column; } // Add a redirect for the product mdate if ($column == "product_mdate" && !empty($this->$column)) { $this->_products->modified_on = $this->$column; } } } // We have a succesful save, get the product_id if ($this->_products->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_PRODUCT_SKU')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_PRODUCT_SKU')); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_PRODUCT_QUERY'), true); // If this is a child product, check if we need to update the custom field if ($this->child_product) $this->_processParentValues(); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_NOT_ADDED', $this->_products->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_PRODUCT_QUERY'), true); return false; } // Set the product ID $this->virtuemart_product_id = $this->_products->virtuemart_product_id; // Store the language fields $this->_products_lang->bind($this); $this->_products_lang->virtuemart_product_id = $this->virtuemart_product_id; if ($this->_products_lang->check()) { if ($this->_products_lang->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_PRODUCT_LANG')); else if ($this->queryResult() == 'INSERT') $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_PRODUCT_LANG')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_LANG_NOT_ADDED', $this->_products_lang->getError())); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_LANG_NOT_ADDED', $this->_products_lang->getError())); return false; } // Store the debug message $csvilog->addDebug('COM_CSVI_PRODUCT_LANG_QUERY', true); // All good return true; } /** * Process Related Products * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _processRelatedProducts() { $db = JFactory::getDbo(); $relatedproducts = explode("|", $this->related_products); $query = $db->getQuery(true); $query = "INSERT IGNORE INTO `#__csvi_related_products` VALUES "; $entries = array(); foreach ($relatedproducts AS $key => $relatedproduct) { $entries[] = "(".$db->q($this->product_sku).", ".$db->q($relatedproduct).")"; } $query .= implode(',', $entries); $db->setQuery($query); $db->query(); // Remove any existing product relations $this->_product_customfields->deleteRelated($this->virtuemart_product_id, $this->virtuemart_vendor_id, $this->helper->getRelatedId()); } /** * Post Process Related Products * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _postProcessRelatedProducts() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $relations = array(); // Get the related products $query = $db->getQuery(true); $query->select('p1.virtuemart_product_id AS virtuemart_product_id, p2.virtuemart_product_id AS custom_value'); $query->from('#__csvi_related_products r'); $query->leftJoin('#__virtuemart_products p1 ON r.product_sku = p1.product_sku'); $query->leftJoin('#__virtuemart_products p2 ON r.related_sku = p2.product_sku'); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_PROCESS_RELATED_PRODUCTS'), true); $relations = $db->loadObjectList(); if (!empty($relations)) { // Store the new relations foreach ($relations as $key => $related) { // Build the object to store $fields = array(); $related->virtuemart_custom_id = $this->helper->getRelatedId(); $related->published = 0; $related->created_on = $this->date->toSql(); $related->created_by = $this->user->id; $related->modified_on = $this->date->toSql(); $related->modified_by = $this->user->id; // Bind the data $this->_product_customfields->bind($related); // Store the data if ($this->_product_customfields->store()) { $csvilog->addDebug(JText::_('COM_CSVI_PROCESS_RELATED_PRODUCTS'), true); } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_RELATED_PRODUCTS'), true); } // Clean the table object for next insert $this->_product_customfields->reset(); } // Empty the relations table $db->setQuery("TRUNCATE ".$db->qn('#__csvi_related_products')); $db->query(); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_RELATED_PRODUCTS_FOUND'), true); } } /** * Process media files * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _processMedia() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); // Check if any image handling needs to be done if ($template->get('process_image', 'image', false)) { if (!is_null($this->file_url) || $template->get('auto_generate_image_name', 'image', false)) { // Image handling $imagehelper = new ImageHelper; // Get the image path $imgpath = $template->get('file_location_product_images', 'path'); if ($template->get('auto_generate_image_name', 'image')) $this->_createImageName(); // Verify the original image if ($imagehelper->isRemote($this->file_url)) { $original = $this->file_url; $remote = true; $full_path = $imgpath; } else { $remote = false; // Check if the image contains the image path $dirname = dirname($this->file_url); if (strpos($imgpath, $dirname) !== false) { $image = basename($this->file_url); } $original = $imgpath.$this->file_url; $remote = false; // Get subfolders $path_parts = pathinfo($original); $full_path = $path_parts['dirname'].'/'; } // Generate image names if ($template->get('auto_generate_image_name', 'image')) { $file_details = $imagehelper->ProcessImage($original, $full_path, $this->product_full_image_output); } else { $file_details = $imagehelper->ProcessImage($original, $full_path); } // Process the file details if ($file_details['exists'] && $file_details['isimage']) { // Check if the image is an external image if (substr($file_details['name'], 0, 4) == 'http') { $csvilog->AddStats('incorrect', 'COM_CSVI_VM_NOSUPPORT_URL'); } else { $media = array(); $media['virtuemart_vendor_id'] = $this->virtuemart_vendor_id; $media['file_title'] = ($this->file_title) ? $this->file_title : $this->file_url; $media['file_description'] = $this->file_description; $media['file_meta'] = $this->file_meta; $media['file_mimetype'] = $file_details['mime_type']; $media['file_type'] = 'product'; $media['file_is_product_image'] = 1; $media['file_is_downloadable'] = 0; $media['file_is_forSale'] = 0; $media['file_url'] = (empty($file_details['output_path'])) ? $file_details['output_name'] : $file_details['output_path'].$file_details['output_name']; // Create the thumbnail if ($template->get('thumb_create', 'image')) { // Get the subfolder structure $thumb_path = str_ireplace($imgpath, '', $full_path); if (empty($this->file_url_thumb)) $this->file_url_thumb = 'resized/'.$thumb_path.basename($media['file_url']); if ($remote) $original = $this->file_url; else $original = $media['file_url']; $media['file_url_thumb'] = $imagehelper->createThumbnail($original, $imgpath, $this->file_url_thumb); } else { $media['file_url_thumb'] = (empty($this->file_url_thumb)) ? $media['file_url'] : $this->file_url_thumb; if (substr($media['file_url_thumb'], 0, 4) == 'http') { $csvilog->addDebug(JText::sprintf('COM_CSVI_RESET_THUMB_NOHTTP', $media['file_url_thumb'])); $media['file_url_thumb'] = ''; } } // Bind the media data $this->_medias->bind($media); // Check if the media image already exists $this->_medias->check(); // Store the media data if ($this->_medias->store()) { // Store the product image relation $data = array(); $data['virtuemart_product_id'] = $this->virtuemart_product_id; $data['virtuemart_media_id'] = $this->_medias->virtuemart_media_id; $this->_product_medias->bind($data); if (!$this->_product_medias->check()) { $this->_product_medias->store(); } } } } } } } /** * Manufacturer Importer * * Adds or updates a manufacturer and adds a reference to the product * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _manufacturerImport() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug('COM_CSVI_DEBUG_MANUFACTURER_IMPORT'); if (!isset($this->_manufacturers_lang->mf_name) && !isset($this->_manufacturers_lang->virtuemart_manufacturer_id)) { // User is not importing manufacturer data but we need a default manufacturer associated with the product $this->_getDefaultManufacturerID(); } // Check for existing manufacturer if ($this->_manufacturers_lang->check()) { // Store the manufacturers language details if ($this->_manufacturers_lang->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MANUFACTURER_LANG')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MANUFACTURER_LANG')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_LANG_NOT_ADDED', $this->_manufacturers_lang->getError())); return false; } // Store the debug message $csvilog->addDebug('COM_CSVI_MANUFACTURER_LANG_QUERY', true); // Set the manufacturer ID $this->_manufacturers->virtuemart_manufacturer_id = $this->_manufacturers_lang->virtuemart_manufacturer_id; // Check if a manufacturer exists if (!$this->_manufacturers->check()) { // Store the manufacturer data if ($this->_manufacturers->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MANUFACTURER')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MANUFACTURER')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_NOT_ADDED', $this->_manufacturers->getError())); return false; } // Store the debug message $csvilog->addDebug('COM_CSVI_MANUFACTURER_QUERY', true); } } } /** * Adds a reference between manufacturer and product * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _manufacturerCrossReference() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $this->_product_manufacturers->virtuemart_product_id = $this->virtuemart_product_id; $this->_product_manufacturers->virtuemart_manufacturer_id = $this->_manufacturers_lang->virtuemart_manufacturer_id; if (!$this->_product_manufacturers->check()) { $this->_product_manufacturers->store(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PROCESS_MANUFACTURER_PRODUCT'), true); } } /** * Creates either an update or insert SQL query for a product price. * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _priceQuery() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check if we have a child product with an empty price (will use parents price) if ($this->child_product && ($this->product_price == 0 && (is_null($this->price_with_tax) && is_null($this->product_tax)))) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_CHILD_NO_PRICE')); } else { // Check if we have an override price, this is always excluding tax if ($this->product_override_price) { if (is_null($this->override)) $this->override = 1; } // Check if the price is including or excluding tax if ($this->product_tax && $this->price_with_tax && is_null($this->product_price)) { if (strlen($this->price_with_tax) == 0) $this->product_price = null; else $this->product_price = $this->price_with_tax / (1+($this->product_tax/100)); } else if (strlen($this->product_price) == 0) $this->product_price = null; // Check if we need to assign a shopper group if (!is_null($this->shopper_group_name_price)) { if ($this->shopper_group_name_price == '*') $this->virtuemart_shoppergroup_id = 0; else $this->virtuemart_shoppergroup_id = $this->helper->getShopperGroupId($this->shopper_group_name_price); } // Bind the fields to check for an existing price $this->_product_prices->bind($this); // Check if the price already exists if (!$this->_product_prices->check()) { // Price doesn't exist if (!$this->_product_prices->get('price_quantity_start')) $this->_product_prices->price_quantity_start = 0; if (!$this->_product_prices->get('price_quantity_end')) $this->_product_prices->price_quantity_end = 0; if (!$this->_product_prices->get('override')) $this->_product_prices->override = 0; // Set the create date if the user has not done so and there is no product_price_id if (!$this->_product_prices->get('created_on')) { $this->_product_prices->created_on = $this->date->toSql(); $this->_product_prices->created_by = $this->user->id; } } // Bind the data $this->_product_prices->bind($this); // Check if we need to change the shopper group name if (!is_null($this->shopper_group_name_new)) { if ($this->shopper_group_name_new == '*') $this->_product_prices->virtuemart_shoppergroup_id = 0; else { $this->_product_prices->virtuemart_shoppergroup_id = $this->helper->getShopperGroupId($this->shopper_group_name_new); } } // Calculate the new price $this->_product_prices->CalculatePrice(); if (is_null($this->product_price) && is_null($this->product_override_price)) { // Delete the price $this->_product_prices->delete(); } else { // Store the price // Add some variables if needed // Set the modified date if the user has not done so if (!$this->_product_prices->get('modified_on')) { $this->_product_prices->set('modified_on', $this->date->toSql()); $this->_product_prices->set('modified_by', $this->user->id); } // Store the price $this->_product_prices->store(); } $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PRICE_QUERY'), true); } } /** * Stores the discount for a product * * @copyright * @author RolandD * @todo Add logging * @see * @access private * @param * @return * @since 3.0 */ private function _processDiscount() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PROCESSING_DISCOUNT')); // Clear the calcs from any data $this->_calcs->reset(); // Determine if the discount field is a percentage if ($this->product_discount) { if (substr($this->product_discount,-1,1) == "%") { $this->_calcs->calc_value_mathop = '-%'; $this->_calcs->calc_value = substr($this->toPeriod($this->product_discount), 0, -1); } else { $this->_calcs->calc_value_mathop = '-'; $this->_calcs->calc_value = $this->cleanPrice($this->product_discount); } } if (!is_null($this->_calcs->calc_value) && $this->_calcs->calc_value > 0) { // Add the discount fields $this->_calcs->publish_up = $this->product_discount_date_start; $this->_calcs->publish_down = $this->product_discount_date_end; // Add a description to the discount $this->_calcs->calc_name = $this->product_discount; $this->_calcs->calc_descr = $this->product_discount; $this->_calcs->calc_shopper_published = 1; $this->_calcs->calc_vendor_published = 1; $this->_calcs->calc_currency = $this->_product_prices->product_currency; if (empty($this->calc_kind)) $this->_calcs->calc_kind = 'DBTax'; else $this->_calcs->calc_kind = $this->calc_kind; // Check if a discount already exists $this->_calcs->check(); // Store the discount if (!$this->_calcs->store()) { $csvilog->addDebug('COM_CSVI_DEBUG_ADD_DISCOUNT', true); return false; } $csvilog->addDebug('COM_CSVI_DEBUG_ADD_DISCOUNT', true); // Fill the product information with the discount ID $this->product_discount_id = $this->_calcs->virtuemart_calc_id; } else $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_NO_DISCOUNT')); } /** * Process a tax rate * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _processTax() { if ($this->product_tax > 0) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PROCESSING_TAX')); // Clear the calcs from any data $this->_calcs->reset(); // Add some data $this->_calcs->calc_kind = 'Tax'; $this->_calcs->calc_value = $this->product_tax; $this->_calcs->calc_value_mathop = '+%'; // Check if the tax rate already exists if (!$this->_calcs->check()) { $this->_calcs->virtuemart_vendor_id = $this->virtuemart_vendor_id; $this->_calcs->calc_name = JText::_('COM_CSVI_AUTO_TAX_RATE'); $this->_calcs->calc_descr = JText::_('COM_CSVI_AUTO_TAX_RATE_DESC'); $this->_calcs->calc_currency = $this->helper->getVendorCurrency($this->virtuemart_vendor_id); $this->_calcs->calc_shopper_published = 1; $this->_calcs->calc_vendor_published = 1; $this->_calcs->publish_up = $this->date->toMySQL(); $this->_calcs->created_on = $this->date->toMySQL(); $this->_calcs->created_by = $this->user->id; $this->_calcs->modified_on = $this->date->toMySQL(); $this->_calcs->modified_by = $this->user->id; $this->_calcs->store(); $csvilog->addDebug(JText::_('COM_CSVI_ADD_TAX_RATE'), true); } $this->product_tax_id = $this->_calcs->virtuemart_calc_id; } } /** * Gets the default manufacturer ID * As there is no default manufacturer, we take the first one * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return integer database ID of the default manufacturer * @since 4.0 */ private function _getDefaultManufacturerID() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); // Check if product already has a manufacturer link if (isset($this->product_sku)) { $query = $db->getQuery(true); $query->select('virtuemart_manufacturer_id'); $query->from('#__virtuemart_product_manufacturers m'); $query->leftJoin('#__virtuemart_products p ON m.virtuemart_product_id = p.virtuemart_product_id'); $query->where('product_sku = '.$db->Quote($this->product_sku)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_MANUFACTURER_ID_SKU'), true); $mf_id = $db->loadResult(); } else if (isset($this->virtuemart_product_id)) { $query = $db->getQuery(true); $query->select('virtuemart_manufacturer_id'); $query->from('#__virtuemart_product_manufacturers m'); $query->where('virtuemart_product_id = '.$db->Quote($this->virtuemart_product_id)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_MANUFACTURER_ID_ID'), true); $mf_id = $db->loadResult(); } // Check if we have a result if (!$mf_id) { $query = $db->getQuery(true); $query->select('MIN(virtuemart_manufacturer_id)'); $query->from('#__virtuemart_manufacturers'); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_GET_DEFAULT_MANUFACTURER_ID'), true); $mf_id = $db->loadResult(); } $this->_manufacturers_lang->virtuemart_manufacturer_id = $mf_id; } /** * Create image name * * Check if the user wants to have CSVI VirtueMart create the image names if so * create the image names without path * * @copyright * @author RolandD * @todo * @see processImage() * @access private * @param * @return * @since 3.0 */ private function _createImageName() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $csvilog->addDebug(JText::_('COM_CSVI_GENERATE_IMAGE_NAME')); // Create extension $ext = $template->get('autogenerateext', 'image'); // Check if the user wants to convert the images to a different type switch ($template->get('type_generate_image_name', 'image')) { case 'product_sku': $csvilog->addDebug(JText::_('COM_CSVI_CREATE_PRODUCT_SKU_NAME')); if (!is_null($this->product_sku)) $name = $this->product_sku; else { $csvilog->AddStats('error', JText::_('COM_CSVI_CANNOT_FIND_PRODUCT_SKU')); return false; } break; case 'product_name': $csvilog->addDebug(JText::_('COM_CSVI_CREATE_PRODUCT_NAME_NAME')); if (!is_null($this->_products_lang->product_name)) $name = $this->_products_lang->product_name; else { $csvilog->AddStats('error', JText::_('COM_CSVI_CANNOT_FIND_PRODUCT_NAME')); return false; } break; case 'product_id': $csvilog->addDebug(JText::_('COM_CSVI_CREATE_PRODUCT_ID_NAME')); if (!is_null($this->virtuemart_product_id)) $name = $this->virtuemart_product_id; else { $csvilog->AddStats('error', JText::_('COM_CSVI_CANNOT_FIND_PRODUCT_ID')); return false; } break; case 'random': $csvilog->addDebug(JText::_('COM_CSVI_CREATE_RANDOM_NAME')); $name = mt_rand(); break; } $image_name = $name.'.'.$ext; $csvilog->addDebug(JText::sprintf('COM_CSVI_CREATED_IMAGE_NAME', $image_name)); $this->product_full_image_output = $image_name; // Check if the user is supplying image data if (is_null($this->file_url)) $this->file_url = $this->product_full_image_output; return true; } /** * Process custom fields * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _processCustomFields() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); // Get the values $values = explode('~', $this->custom_value); $prices = explode('~', $this->custom_price); $params = explode('~', $this->custom_param); $titles = explode('~', $this->custom_title); if (!empty($values)) { foreach ($values as $key => $value) { // Get the custom ID if (!isset($this->customtitles[$titles[$key]])) { $query = $db->getQuery(true); $query->select('virtuemart_custom_id'); $query->from('#__virtuemart_customs'); $query->where($db->quoteName('custom_title').' = '.$db->Quote($titles[$key])); $db->setQuery($query); $virtuemart_custom_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_CUSTOMFIELD_QUERY'), true); if ($virtuemart_custom_id) { $this->customtitles[$titles[$key]] = $virtuemart_custom_id; // Empty out any existing values $query = $db->getQuery(true); $query->delete($db->quoteName('#__virtuemart_product_customfields')); $query->where($db->quoteName('virtuemart_product_id').' = '.$db->quote($this->virtuemart_product_id)); $query->where($db->quoteName('virtuemart_custom_id').' = '.$virtuemart_custom_id); $db->setQuery($query); $db->query(); $csvilog->addDebug('COM_CSVI_REMOVE_EXISTING_CUSTOM_VALUES', true); } else { $csvilog->addDebug('COM_CSVI_NO_CUSTOM_ID_FOUND'); return false; } } else { $virtuemart_custom_id = $this->customtitles[$titles[$key]]; } // Set the product ID $this->_product_customfields->virtuemart_product_id = $this->virtuemart_product_id; $this->_product_customfields->virtuemart_custom_id = $virtuemart_custom_id; $this->_product_customfields->custom_value = $value; if (isset($prices[$key])) $this->_product_customfields->custom_price = $prices[$key]; if (isset($params[$key])) { // See if we are dealing with a stockable variant if ($value == 'stockable') { // We need to create a new object $param_value = new stdClass(); $param_value->child = new stdClass(); // Data is received in the format: // product_sku[option1#option2[price;product_sku[option1#option2[price // Get all the products $param_entries = explode(';', $params[$key]); foreach ($param_entries as $entry) { $param_sku = false; $entry_parts = explode('[', $entry); // Create the new class $sku = new stdClass(); $sku->is_variant = 1; if (isset($entry_parts[0]) && !empty($entry_parts[0])) { // Find the product ID $param_sku = $entry_parts[0]; $params_options = explode('#', $entry_parts[1]); foreach ($params_options as $pkey => $param_option) { $name = 'selectoptions'.($pkey+1); $sku->$name = $param_option; } if (isset($entry_parts[2]) && !empty($entry_parts[2])) $sku->custom_price = $entry_parts[2]; else $sku->custom_price = ''; } if ($param_sku) $param_value->child->$param_sku = $sku; } $this->_product_customfields->custom_param = json_encode($param_value); } else $this->_product_customfields->custom_param = $params[$key]; } // Check for an existing entry if (!$this->_product_customfields->check()) { $this->_product_customfields->created_on = $this->date->toSql(); $this->_product_customfields->created_by = $this->user->id; } // Set a modified date if (!isset($this->modified_on)) { $this->_product_customfields->modified_on = $this->date->toSql(); $this->_product_customfields->modified_by = $this->user->id; } else { $this->_product_customfields->modified_on = $this->modified_on; $this->_product_customfields->modified_by = $this->user->id; } // Store the custom field $this->_product_customfields->store(); $csvilog->addDebug('COM_CSVI_DEBUG_CUSTOMFIELD_QUERY', true); // Reset the field $this->_product_customfields->reset(); } } } /** * Delete a product and its references * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _deleteProduct() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Delete the product if ($this->_products->delete($this->virtuemart_product_id)) { $db = JFactory::getDbo(); // Delete product translations jimport('joomla.language.helper'); $languages = array_keys(JLanguageHelper::getLanguages('lang_code')); foreach ($languages as $language){ $query = $db->getQuery(true); $query->delete('#__virtuemart_products_'.strtolower(str_replace('-', '_', $language))); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRODUCT_LANG_XREF'), true); $db->query(); } // Delete category reference $query = $db->getQuery(true); $query->delete('#__virtuemart_product_categories'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_CATEGORY_XREF'), true); $db->query(); // Delete manufacturer reference $query = $db->getQuery(true); $query->delete('#__virtuemart_product_manufacturers'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_MANUFACTURER_XREF'), true); $db->query(); // Reset child parent reference $query = $db->getQuery(true); $query->update('#__virtuemart_products'); $query->set('product_parent_id = 0'); $query->where('product_parent_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRODUCT_PARENT'), true); $db->query(); // Delete prices $query = $db->getQuery(true); $query->delete('#__virtuemart_product_prices'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRICES_XREF'), true); $db->query(); // Delete shopper groups $query = $db->getQuery(true); $query->delete('#__virtuemart_product_shoppergroups'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_SHOPPERGROUP_XREF'), true); $db->query(); // Delete prices $query = $db->getQuery(true); $query->delete('#__virtuemart_product_prices'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRICES_XREF'), true); $db->query(); // Delete custom fields $query = $db->getQuery(true); $query->delete('#__virtuemart_product_customfields'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_CUSTOMFIELDS_XREF'), true); $db->query(); // Delete media $query = $db->getQuery(true); $query->delete('#__virtuemart_product_medias'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_MEDIA_XREF'), true); $db->query(); // Delete ratings $query = $db->getQuery(true); $query->delete('#__virtuemart_product_ratings'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_RATINGS_XREF'), true); $db->query(); // Delete rating reviews $query = $db->getQuery(true); $query->delete('#__virtuemart_product_rating_reviews'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_RATING_REVIEWS_XREF'), true); $db->query(); // Delete rating votes $query = $db->getQuery(true); $query->delete('#__virtuemart_product_rating_votes'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_RATING_VOTES_XREF'), true); $db->query(); $csvilog->AddStats('deleted', JText::sprintf('COM_CSVI_PRODUCT_DELETED', $this->record_identity)); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_NOT_DELETED', $this->record_identity)); } return true; } /** * Convert the product SKU to product ID in the parent properties * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 1.0 */ private function _processParentValues() { if (isset($this->product_sku) && !is_null($this->product_parent_id)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $param_sku = $this->_products->virtuemart_product_id; $sku = $this->product_sku; // Load the values $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('custom_param'); $query->from('#__virtuemart_product_customfields'); $query->where('virtuemart_product_id = '.$this->product_parent_id); $query->where('custom_value = '.$db->quote('stockable')); $db->setQuery($query); $params = $db->loadResult(); $values = json_decode($params); // Replace the key if it exists if (isset($values->child->$sku)) { $values->child->$param_sku = $values->child->$sku; unset($values->child->$sku); // Store the values $query = $db->getQuery(true); $query->update('#__virtuemart_product_customfields'); $query->set('custom_param = '.$db->quote(json_encode($values))); $query->where('virtuemart_product_id = '.$this->product_parent_id); $query->where('custom_value = '.$db->quote('stockable')); $db->setQuery($query); $db->query(); $csvilog->addDebug('COM_CSVI_DEBUG_STORE_PARENT_VALUE', true); } else { $csvilog->addDebug('COM_CSVI_DEBUG_NO_PARENT_VALUE_FOUND', true); } } } /** * Process the shopper groups * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.5.2 */ private function _processShopperGroup() { if (!empty($this->shopper_group_name)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Get the shopper group names $names = explode('|', $this->shopper_group_name); foreach ($names as $name) { $data = array(); $data['virtuemart_shoppergroup_id'] = $this->helper->getShopperGroupId($name); $data['virtuemart_product_id'] = $this->virtuemart_product_id; $this->_product_shoppergroups->bind($data); if(!$this->_product_shoppergroups->check()) { if ($this->_product_shoppergroups->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_PRODUCT_SHOPPERGROUP')); else if ($this->queryResult() == 'INSERT') $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_PRODUCT_SHOPPERGROUP')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_SHOPPERGROUP_NOT_ADDED', $this->_product_shoppergroups->getError())); return false; } } } } } }PK>\«x$;$;/models/com_virtuemart/import/userinfoimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo change cdate/mdate to use JDate * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'address_type': switch (strtolower($value)) { case 'shipping address': case 'st': $this->$name = 'ST'; break; case 'billing address': case 'bt': default: $this->$name = 'BT'; break; } break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo Add a beter text for MISSING_REQUIRED_FIELDS * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $userdata = array(); jimport('joomla.user.helper'); // See if we have a user_info_id if (empty($this->virtuemart_userinfo_id)) { // No user_info_id, maybe we have user_id, address_type and address_type_name if ((!isset($this->virtuemart_user_id) && (!isset($this->email))) || !isset($this->address_type) || !isset($this->address_type_name)) { // No way to identify what needs to be updated, set error and return $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MISSING_REQUIRED_FIELDS')); return false; } } // We have a virtuemart_userinfo_id, do we have a virtuemart_user_id else { $query = $db->getQuery(true); $query->select('virtuemart_user_id'); $query->from('#__virtuemart_userinfos'); $query->where('virtuemart_userinfo_id = '.$db->Quote($this->virtuemart_userinfo_id)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_FIND_USER_ID_FROM_VM'), true); $this->virtuemart_user_id = $db->loadResult(); } // Check for the user_info_id if (empty($this->virtuemart_userinfo_id)) { // See if we have a user_id or user_email if (!isset($this->virtuemart_user_id) && isset($this->email)) { // We have an e-mail address, find the user_id $query = $db->getQuery(true); $query->select('id'); $query->from('#__users'); $query->where('email = '.$db->Quote($this->email)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_FIND_USER_ID_FROM_JOOMLA'), true); $this->virtuemart_user_id = $db->loadResult(); } if ($this->virtuemart_user_id) { // if we have a user_id we can get the user_info_id $query = $db->getQuery(true); $query->select('virtuemart_userinfo_id'); $query->from('#__virtuemart_userinfos'); $query->where('virtuemart_user_id = '.$this->virtuemart_user_id); $query->where('address_type = '.$db->Quote($this->address_type)); $query->where('address_type_name = '.$db->Quote($this->address_type_name)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_FIND_USER_INFO_ID'), true); $this->virtuemart_userinfo_id = $db->loadResult(); } } // If it is a new Joomla user but no username is set, we must set one if ((!isset($this->virtuemart_user_id) || !$this->virtuemart_user_id) && !isset($this->username)) { $userdata['username'] = $this->email; } // Set the username else if (isset($this->username)) $userdata['username'] = $this->username; // Check if we have an encrypted password if (isset($this->password_crypt)) { $userdata['password'] = $this->password_crypt; } else if (isset($this->password)) { // Check if we have an encrypted password $salt = JUserHelper::genRandomPassword(32); $crypt = JUserHelper::getCryptedPassword($this->password, $salt); $password = $crypt.':'.$salt; $userdata['password'] = $password; } // No user id, need to create a user if possible if (!isset($this->virtuemart_user_id) && isset($this->email) && isset($this->password)) { // Set the creation date $date = JFactory::getDate(); $userdata['registerDate'] = $date->toMySQL(); } else if (!isset($this->virtuemart_user_id) && (!isset($this->email) || !isset($this->password))) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_NEW_USER_PASSWORD_EMAIL')); return false; } else { // Set the id $userdata['id'] = $this->virtuemart_user_id; } // Only store the Joomla user if there is an e-mail address supplied if (isset($this->email)) { // Set the name if (isset($this->name)) $userdata['name'] = $this->name; else { $fullname = false; if (isset($this->first_name)) $fullname .= $this->first_name.' '; if (isset($this->last_name)) $fullname .= $this->last_name; if (!$fullname) $fullname = $this->user_email; $userdata['name'] = trim($fullname); } // Set the email $userdata['email'] = $this->email; // Set if the user is blocked if (isset($this->block)) $userdata['block'] = $this->block; // Set the sendEmail if (isset($this->sendemail)) $userdata['sendEmail'] = $this->sendemail; // Set the registerDate if (isset($this->registerdate)) $userdata['registerDate'] = $this->registerdate; // Set the lastvisitDate if (isset($this->lastvisitdate)) $userdata['lastvisitDate'] = $this->lastvisitdate; // Set the activation if (isset($this->activation)) $userdata['activation'] = $this->activation; // Set the params if (isset($this->params)) $userdata['params'] = $this->params; // Check if we have a group ID if (!isset($this->group_id)) { $query = $db->getQuery(true); $query->select('id'); $query->from('#__usergroups'); $query->where($db->quoteName('title').' = '.$db->Quote($this->usergroup_name)); $db->setQuery($query); $this->group_id = $db->loadResult(); if (empty($this->group_id)) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_USERGROUP_FOUND', $this->usergroup_name)); return false; } } // Bind the data $this->_user->bind($userdata); // Store/update the user if ($this->_user->store()) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_JOOMLA_USER_STORED'), true); // Get the new user ID $this->virtuemart_user_id = $this->_user->id; // Empty the usergroup map table $query = $db->getQuery(true); $query->delete('#__user_usergroup_map'); $query->where('user_id = '.$this->virtuemart_user_id); $db->setQuery($query); $db->query(); // Store the user in the usergroup map table $query = $db->getQuery(true); $query->insert('#__user_usergroup_map'); $query->values($this->virtuemart_user_id.', '.$this->group_id); $db->setQuery($query); // Store the map if ($db->query()) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_JOOMLA_USER_MAP_STORED'), true); } else $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_JOOMLA_USER_MAP_NOT_STORED'), true); } else $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_JOOMLA_USER_NOT_STORED'), true); } else $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_JOOMLA_USER_SKIPPED')); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_userinfos->modified_on = $this->date->toMySQL(); $this->_userinfos->modified_by = $this->user->id; } // Bind the VirtueMart user data $this->_userinfos->bind($this); // Store the VirtueMart user info if ($this->_userinfos->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_USERINFO')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_USERINFO')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_USERINFO_NOT_ADDED', $this->_userinfos->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_USERINFO_QUERY'), true); // See if there is any shopper group information to be stored // user_id, vendor_id, shopper_group_id, customer number // Get the user_id if (!isset($this->virtuemart_user_id) && isset($this->_userinfos->virtuemart_userinfo_id)) { $this->virtuemart_user_id = $_userinfos->virtuemart_user_id; } // Get the vendor_id if (empty($this->virtuemart_vendor_id) && isset($this->vendor_name)) { $query = $db->getQuery(true); $query->select('virtuemart_vendor_id'); $query->from('#__virtuemart_vendors'); $query->where('vendor_name = '.$db->Quote($this->vendor_name)); $db->setQuery($query); $this->virtuemart_vendor_id = $db->loadResult(); if (empty($this->vendor_id)) $this->virtuemart_vendor_id = $this->helper->getVendorId(); } else $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Get the shopper_group_id if (empty($this->virtuemart_shoppergroup_id) && isset($this->shopper_group_name)) { $query = $db->getQuery(true); $query->select('virtuemart_shoppergroup_id'); $query->from('#__virtuemart_shoppergroups'); $query->where('shopper_group_name = '.$db->Quote($this->shopper_group_name)); $db->setQuery($query); $this->virtuemart_shoppergroup_id = $db->loadResult(); if (empty($this->virtuemart_shoppergroup_id)) $this->virtuemart_shoppergroup_id = $this->helper->getDefaultShopperGroupID(); } else if (!isset($this->virtuemart_shoppergroup_id) && !isset($this->shopper_group_name)) $this->virtuemart_shoppergroup_id = $this->helper->getDefaultShopperGroupID(); // Bind the shopper group data $this->_vmuser_shoppergroups->bind($this); $this->_vmuser_shoppergroups->check(); if ($this->_vmuser_shoppergroups->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_SHOPPER_GROUP')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_SHOPPER_GROUP')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_SHOPPER_GROUP_NOT_ADDED', $this->_vmuser_shoppergroups->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_SHOPPER_GROUP_QUERY'), true); // See if there is any vmusers entry $this->_vmusers->load($this->virtuemart_user_id); if (empty($this->_vmusers->virtuemart_user_id)) { if (!isset($this->user_is_vendor)) $this->user_is_vendor = 0; if (!isset($this->customer_number)) $this->customer_number = md5($userdata['username']); if (!isset($this->perms)) $this->perms = 'shopper'; if (!isset($this->virtuemart_paymentmethod_id)) $this->virtuemart_paymentmethod_id = null; if (!isset($this->virtuemart_shipmentmethod_id)) $this->virtuemart_shipmentmethod_id = null; if (!isset($this->agreed)) $this->agreed = 0; } // Bind the data $this->_vmusers->bind($this); // Check the vmusers table if ($this->_vmusers->check()) { // Update the dates if (!isset($this->modified_on)) { $this->_vmusers->modified_on = $this->date->toMySQL(); $this->_vmusers->modified_by = $this->user->id; } } else { $this->_vmusers->created_on = $this->date->toMySQL(); $this->_vmusers->created_by = $this->user->id; } // Store the vmusers data if ($this->_vmusers->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_VMUSERS')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_VMUSERS')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_VMUSERS_NOT_ADDED', $this->_vmusers->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_VMUSERS_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the user info related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_userinfos = $this->getTable('userinfos'); $this->_vmusers = $this->getTable('vmusers'); $this->_vmuser_shoppergroups = $this->getTable('vmuser_shoppergroups'); $this->_user = $this->getTable('users'); } /** * Cleaning the user info related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_userinfos->reset(); $this->_vmusers->reset(); $this->_vmuser_shoppergroups->reset(); $this->_user->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?>PK>\#o,,'models/com_virtuemart/import/index.htmlnuW+APK>\Хi2models/com_virtuemart/import/waitinglistimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_product_id = $this->helper->getProductId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { default: $this->$name = $value; break; } } // All is good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Get the user ID if (empty($this->virtuemart_user_id)) { $this->virtuemart_user_id = $this->_getUserId(); if (empty($this->virtuemart_user_id)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_WAITINGLIST_NO_USER_FOUND')); return false; } } if (empty($this->virtuemart_product_id)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_WAITINGLIST_NO_PRODUCT_FOUND')); return false; } if ($this->virtuemart_product_id && $this->virtuemart_user_id && $this->notify_email) { // Bind the data $this->_waitingusers->bind($this); // Check the data $this->_waitingusers->check(); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_waitingusers->modified_on = $this->date->toMySQL(); $this->_waitingusers->modified_by = $this->user->id; } if (empty($this->_waitingusers->virtuemart_waitinguser_id)) { $this->_waitingusers->created_on = $this->date->toMySQL(); $this->_waitingusers->created_by = $this->user->id; } // Store the data if ($this->_waitingusers->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_WAITINGLIST')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_WAITINGLIST')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_WAITINGLIST_NOT_ADDED', $this->_waitingusers->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_WAITINGLIST_QUERY'), true); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_WAITINGLIST_NO_USER_PRODUCT_ID')); } // Clean the tables $this->cleanTables(); } /** * Load the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.01 */ private function _loadTables() { $this->_waitingusers = $this->getTable('waitingusers'); } /** * Cleaning the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.1 */ protected function cleanTables() { $this->_waitingusers->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Get the user ID * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return mixed int when user ID found | false when not found * @since 3.1 */ private function _getUserId() { if (isset($this->username)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('id'); $query->from('#__users'); $query->where('username = '.$db->Quote($this->username)); $db->setQuery($query); $result = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_FIND_USER_ID'), true); if ($result) return $result; else return false; } else return false; } } ?>PK>\sRff0models/com_virtuemart/import/orderitemimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'product_price': $this->product_item_price = $this->cleanPrice($value); break; case 'product_final_price': $this->$name = $this->cleanPrice($value); break; case 'product_sku': $this->order_item_sku = $value; $this->product_sku = $value; break; case 'product_name': $this->order_item_name = $value; break; case 'created_on': $this->cdate = $this->convertDate($value); break; case 'modified_on': $this->mdate = $this->convertDate($value); break; case 'address_type': switch (strtolower($name)) { case 'shipping address': case 'st': $this->$name = 'ST'; break; case 'billing address': case 'bt': default: $this->$name = 'BT'; break; } break; case 'order_status_name': $this->order_status = $this->helper->getOrderStatus($value); break; default: $this->$name = $value; break; } } // Check if we have an order ID if (!isset($this->virtuemart_order_id)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_ORDER_ID_FOUND')); return false; } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Check for product ID if (!isset($this->virtuemart_product_id) && isset($this->product_sku)) { $this->virtuemart_product_id = $this->helper->getProductId(); if (empty($this->virtuemart_product_id)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_PRODUCT_ID_FOUND')); return false; } } else if (isset($this->virtuemart_product_id) && !isset($this->product_sku)) { $query = $db->getQuery(true); $query->select('product_sku'); $query->from('#__virtuemart_products'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $this->order_item_sku = $db->loadResult(); } else if (!isset($this->virtuemart_product_id) && !isset($this->product_sku)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_PRODUCT_ID_OR_SKU')); return false; } // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_order_items->modified_on = $this->date->toMySQL(); $this->_order_items->modified_by = $this->user->id; } // Check if there is an existing order item $query = $db->getQuery(true); $query->select('virtuemart_order_item_id'); $query->from('#__virtuemart_order_items'); $query->where('virtuemart_order_id = '.$this->virtuemart_order_id); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $query->where('virtuemart_vendor_id = '.$this->virtuemart_vendor_id); $db->setQuery($query); $this->virtuemart_order_item_id = $db->loadResult(); if (empty($this->virtuemart_order_item_id) && !isset($this->created_on)) { $this->_order_items->created_on = $this->date->toMySQL(); $this->_order_items->created_by = $this->user->id; } else { $this->_order_items->load($this->virtuemart_order_item_id); } // Bind the data $this->_order_items->bind($this); // Check if we have a product name if (empty($this->_order_items->order_item_name)) { $query = $db->getQuery(true); $query->select('product_name'); $query->from('#__virtuemart_products_'.$template->get('language', 'general')); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $this->_order_items->order_item_name = $db->loadResult(); } // Store the data if ($this->_order_items->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_ORDER_ITEM')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_ORDER_ITEM')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ORDER_ITEM_NOT_ADDED', $this->_order_items->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_ORDER_ITEM_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the order item related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_order_items = $this->getTable('order_items'); } /** * Cleaning the order item related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_order_items->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?> PK>\.((3models/com_virtuemart/import/manufacturerimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Only continue if all tables exist if ($this->_tablesexist) { // Load the data $this->loadData(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'mf_category_name': $this->_manufacturer_categories_lang->mf_category_name = $value; break; default: $this->$name = $value; break; } } return true; } else { $template = $jinput->get('template', null, null); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_LANG_TABLE_NOT_EXIST', $template->get('language', 'general'))); return false; } } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check if we need to get manufacturer category ID if (empty($this->virtuemart_manufacturercategories_id) && isset($this->_manufacturer_categories_lang->mf_category_name)) { if ($this->_manufacturer_categories_lang->check(false)) { $this->virtuemart_manufacturercategories_id = $this->_manufacturer_categories_lang->virtuemart_manufacturercategories_id; } } // Check for the manufacturer ID if (!isset($this->virtuemart_manufacturer_id)) $this->_getManufacturerId(); // Bind the data $this->_manufacturers->bind($this); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_manufacturers->modified_on = $this->date->toMySQL(); $this->_manufacturers->modified_by = $this->user->id; } // Add a creating date if there is no product_id if (empty($this->virtuemart_manufacturer_id)) { $this->_manufacturers->created_on = $this->date->toMySQL(); $this->_manufacturers->created_by = $this->user->id; } // Check if we need to delete the manufacturer if ($this->manufacturer_delete == 'Y') { $this->_deleteManufacturer(); } else { // Store the data if ($this->_manufacturers->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MANUFACTURER')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MANUFACTURER')); $this->virtuemart_manufacturer_id = $this->_manufacturers->get('virtuemart_manufacturer_id'); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_NOT_ADDED', $this->_manufacturers->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_MANUFACTURER_QUERY'), true); // Store the language fields $this->_manufacturers_lang->bind($this); $this->_manufacturers_lang->virtuemart_manufacturer_id = $this->virtuemart_manufacturer_id; if ($this->_manufacturers_lang->check()) { if ($this->_manufacturers_lang->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_PRODUCT_LANG')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_PRODUCT_LANG')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_LANG_NOT_ADDED', $this->_manufacturers_lang->getError())); return false; } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_LANG_NOT_ADDED', $this->_manufacturers_lang->getError())); return false; } // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_MANUFACTURER_LANG_QUERY'), true); } // Clean the tables $this->cleanTables(); } /** * Load the manufacturer related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->_manufacturers = $this->getTable('manufacturers'); // Check if the language tables exist $db = JFactory::getDbo(); $tables = $db->getTableList(); if (!in_array($db->getPrefix().'virtuemart_manufacturers_'.$template->get('language', 'general'), $tables)) { $this->_tablesexist = false; } else if (!in_array($db->getPrefix().'virtuemart_manufacturercategories_'.$template->get('language', 'general'), $tables)) { $this->_tablesexist = false; } else { $this->_tablesexist = true; $this->_manufacturers_lang = $this->getTable('manufacturers_lang'); $this->_manufacturer_categories_lang = $this->getTable('manufacturer_categories_lang'); } } /** * Cleaning the manufacturer related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_manufacturers->reset(); $this->_manufacturers_lang->reset(); $this->_manufacturer_categories_lang->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Delete a manufacturer and its references * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _deleteManufacturer() { if (!empty($this->virtuemart_manufacturer_id)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); // Delete product manufacturer xref $query = $db->getQuery(true); $query->delete('#__product_manufacturers'); $query->where('virtuemart_manufacturer_id = '.$this->virtuemart_manufacturer_id); $db->setQuery(); if ($db->query()) { $csvilog->addStats('deleted', JText::_('COM_CSVI_MANUFACTURER_XREF_DELETED')); } else { $csvilog->addStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_XREF_NOT_DELETED', $db->getErrorMsg())); } // Delete translations jimport('joomla.language.helper'); $languages = array_keys(JLanguageHelper::getLanguages('lang_code')); foreach ($languages as $language){ $query = $db->getQuery(true); $query->delete('#__virtuemart_manufacturers_'.strtolower(str_replace('-', '_', $language))); $query->where('virtuemart_manufacturer_id = '.$this->virtuemart_manufacturer_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_MANUFACTURER_LANG_XREF'), true); $db->query(); } // Delete manufacturer if ($this->_manufacturers->delete($this->virtuemart_manufacturer_id)) { $csvilog->AddStats('deleted', JText::_('COM_CSVI_DELETE_MANUFACTURER')); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MANUFACTURER_NOT_DELETED', $this->_manufacturers->getError())); } // Delete media $query = $db->getQuery(true); $query->delete('#__virtuemart_manufacturer_medias'); $query->where('virtuemart_manufacturer_id = '.$this->virtuemart_manufacturer_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_MEDIA_XREF'), true); $db->query(); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MANUFACTURER_NOT_DELETED_NO_ID')); } } /** * Get the manufacturer ID * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return mixed integer when category ID found | false when not found * @since 3.0 */ private function _getManufacturerId() { $this->_manufacturers_lang->set('mf_name', $this->mf_name); if ($this->_manufacturers_lang->check(false)) { $this->virtuemart_manufacturer_id = $this->_manufacturers_lang->virtuemart_manufacturer_id; return true; } else return false; } } ?> PK>\W-models/com_virtuemart/import/couponimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'coupon_value': case 'coupon_value_valid': $this->$name = $this->cleanPrice($value); break; case 'coupon_start_date': case 'coupon_expiry_date': $this->$name = $this->convertDate($value); break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Set some basic values if (!isset($this->modified_on)) { $this->_coupons->modified_on = $this->date->toMySQL(); $this->_coupons->modified_by = $this->user->id; } // Add a creating date if there is no product_id if (empty($this->virtuemart_coupon_id)) { $this->_coupons->created_on = $this->date->toMySQL(); $this->_coupons->created_by = $this->user->id; } // Bind the data $this->_coupons->bind($this); // Check the data $this->_coupons->check(); // Store the data if ($this->_coupons->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_COUPON')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_COUPON')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_COUPON_NOT_ADDED', $this->_coupons->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_COUPON_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_coupons = $this->getTable('coupons'); } /** * Cleaning the coupon related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_coupons->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?>PK>\ -models/com_virtuemart/import/ratingimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Load the data $this->loadData(); // Get the logger $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Load the helper $this->helper = new Com_VirtueMart(); // Get the product ID $this->virtuemart_product_id = $this->helper->getProductId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; default: $this->$name = $value; break; } } return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; // Get the imported values $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDBO(); // Check if there is a product ID if (!empty($this->virtuemart_product_id)) { // Find the user ID for the username if (isset($this->username)) { $q = "SELECT id FROM #__users WHERE username = ".$db->Quote($this->username); $db->setQuery($q); $this->created_by = $db->loadResult(); } // Set some basic values if (is_null($this->lastip)) $this->lastip = $_SERVER['SERVER_ADDR']; if (is_null($this->created_on)) $this->created_on = $this->date->toMySQL(); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->modified_on = $this->date->toMySQL(); $this->modified_by = $this->user->id; } // Bind the data $this->_rating_reviews->bind($this); // Store the rating reviews if ($this->_rating_reviews->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_PRODUCT_REVIEW')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_PRODUCT_REVIEW')); // Store the rating votes $this->_rating_votes->bind($this); if ($this->_rating_votes->store($this)) { // Update product votes $vote = new stdClass(); $vote->virtuemart_product_id = $this->virtuemart_product_id; $vote->created_on = $this->created_on; $vote->created_by = $this->created_by; $vote->modified_on = $this->modified_on; $vote->modified_by = $this->modified_by; // Check if an entry already exist $query = $db->getQuery(true); $query->select('virtuemart_rating_id'); $query->from('#__virtuemart_ratings'); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $vote->virtuemart_rating_id = $db->loadResult(); // Vote exists if ($vote->virtuemart_rating_id > 0) { // Get all the votes $q = "SELECT vote FROM #__virtuemart_rating_votes WHERE virtuemart_product_id = ".$this->virtuemart_product_id; $db->setQuery($q); $ratings = $db->loadResultArray(); // Create the new totals $vote->ratingcount = count($ratings); $vote->rates = array_sum($ratings); $vote->rating = $vote->rates / $vote->ratingcount; } // Vote does not exist else { $vote->rates = $this->vote; $vote->rating = $this->vote; $vote->ratingcount = 1; } // Store the ratings $this->_ratings->bind($vote); $this->_ratings->check(); $this->_ratings->store(); } } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_REVIEW_NOT_ADDED', $this->_rating_reviews->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_PRODUCT_REVIEW_QUERY'), true); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_REVIEW_NO_PRODUCT_ID')); } // Clean the tables $this->cleanTables(); } /** * Load the reviews related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_ratings = $this->getTable('ratings'); $this->_rating_reviews = $this->getTable('rating_reviews'); $this->_rating_votes = $this->getTable('rating_votes'); } /** * Cleaning the product related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_ratings->reset(); $this->_rating_reviews->reset(); $this->_rating_votes->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } } ?> PK>\˟PP,models/com_virtuemart/import/orderimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'customer_notified': $this->$name = (strtoupper($value) == 'N') ? 0 : 1; break; case 'order_status': $this->$name = $value; break; case 'order_status_name': $this->order_status_code = $this->helper->getOrderStatus($value); $this->order_status = $this->order_status_code; break; case 'order_total': case 'order_subtotal': case 'order_tax': case 'order_shipment': case 'order_shipment_tax': case 'order_payment': case 'order_payment_tax': case 'coupon_discount': case 'order_discount': $this->$name = $this->cleanPrice($value); break; default: $this->$name = $value; break; } } // All is good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); // Load the order user details if (!isset($this->virtuemart_user_id) && isset($this->email)) { $query = $db->getQuery(true); $query->select('id'); $query->from('#__users'); $query->where('email = '.$db->Quote($this->email)); $db->setQuery($query); $this->virtuemart_user_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_RETRIEVE_USER_ID'), true); } if (isset($this->virtuemart_user_id)) { $query = $db->getQuery(true); $query->select('*'); $query->from('#__virtuemart_userinfos'); $query->where('address_type = '.$db->Quote('BT')); $query->where('virtuemart_user_id = '.$this->virtuemart_user_id); $db->setQuery($query); $userdetails = $db->loadObject(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_USER_DETAILS'), true); } else { $csvilog->addDebug(JText::_('COM_CSVI_NOT_PROCESS_USER')); $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NOT_PROCESS_USER')); return false; } // Check if we have an order ID if (empty($this->virtuemart_order_id) && !empty($this->order_number)) { $query = $db->getQuery(true); $query->select('virtuemart_order_id'); $query->from('#__virtuemart_orders'); $query->where('order_number = '.$db->Quote($this->order_number)); $db->setQuery($query); $this->virtuemart_order_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_ORDER_ID'), true); } // Load the order if there is an order_id if (empty($this->virtuemart_order_id)) { // Add a creating date if there is no order id $this->_orders->created_on = $this->date->toMySQL(); $this->_orders->created_by = $this->user->id; // Create an order number if it is empty if (empty($this->order_number)) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_CREATE_ORDER_NUMBER')); $this->order_number = substr(md5(session_id().(string)time().(string)$this->virtuemart_user_id), 0, 8); } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_NOT_CREATE_ORDER_NUMBER')); } // Create an order pass if (empty($this->order_pass)) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_CREATE_ORDER_PASS')); $this->order_pass = 'p_'.substr(md5(session_id().(string)time().(string)$this->order_number), 0, 6); } // Check the user currency if (!isset($this->user_currency_id) && isset($this->user_currency)) { $query = $db->getQuery(true); $query->select('virtuemart_currency_id'); $query->from('#__virtuemart_currencies'); $query->where('currency_code_3 = '.$db->Quote($this->user_currency)); $db->setQuery($query); $this->user_currency_id = $db->loadResult(); } // Check the currency rate if (!isset($user->user_currency_rate)) { $user->user_currency_rate = 1; } // Check the order currency if (!isset($this->order_currency)) $this->_orders->order_currency = $this->user_currency_id; // Check the user info id //if (empty($this->virtuemart_order_id)) $this->virtuemart_order_userinfo_id = $userdetails->virtuemart_userinfo_id; // Check the pyament method ID if (!isset($this->virtuemart_paymentmethod_id)) { // Handle the payment method ID if (isset($this->payment_element)) { $query = $db->getQuery(true); $query->select('virtuemart_paymentmethod_id'); $query->from('#__virtuemart_paymentmethods'); $query->where('payment_element = '.$db->Quote($this->payment_element)); $db->setQuery($query); $this->virtuemart_paymentmethod_id = $db->loadResult(); } else $this->virtuemart_paymentmethod_id = 0; } // Check order payment if (!isset($this->order_payment) )$this->_orders->order_payment = 0; // Check order payment tax if (!isset($this->order_payment_tax)) $this->_orders->order_payment_tax = 0; // Check the order_shipping if (!isset($this->order_shipment)) $this->order_shipment = 0; // Check the order_shipping_tax if (!isset($this->order_shipment_tax)) $this->order_shipment_tax = 0; // Check the coupon_code if (!isset($this->coupon_code)) $this->coupon_code = ''; // Check the customer note if (!isset($this->customer_note)) $this->customer_note = ''; // Check the IP address if (!isset($this->ip_address)) $this->ip_address = $_SERVER['SERVER_ADDR']; // Check the ship_method_id if (!isset($this->virtuemart_shipmentmethod_id)) { if (isset($this->shipment_element)) { $query = $db->getQuery(true); $query->select('virtuemart_shipmentmethod_id'); $query->from('#__virtuemart_shipmentmethods'); $query->where('shipment_element = '.$db->Quote('shipment_element')); $db->setQuery($query); $this->virtuemart_shipmentmethod_id = $db->loadResult(); } $this->virtuemart_shipmentmethod_id = ''; } } // Add the modification date if (!isset($this->modified_on)) { $this->_orders->modified_on = $this->date->toMySQL(); $this->_orders->modified_by = $this->user->id; } // Bind order data $this->_orders->bind($this); // Store the order if ($this->_orders->store()) { $csvilog->addDebug(JText::_('COM_CSVI_ORDER_QUERY'), true); if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_ORDER')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_ORDER')); $this->virtuemart_order_id = $this->_orders->virtuemart_order_id; } else { $csvilog->addDebug(JText::_('COM_CSVI_ORDER_QUERY'), true); $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ORDER_NOT_ADDED', $this->_orders->getError())); // Clean the tables $this->cleanTables(); return false; } // Store the user info if (!isset($this->virtuemart_order_userinfo_id)) { // Check if there is the requested address in the database $query = $db->getQuery(true); $query->select('virtuemart_order_userinfo_id'); $query->from('#__virtuemart_order_userinfo'); $query->where('address_type = '.$db->Quote($this->address_type)); $query->where('virtuemart_order_id = '.$this->virtuemart_order_id); $db->setQuery($query); $this->virtuemart_order_userinfo_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_ORDER_INFO_ID'), true); } // Load the order info if ($this->virtuemart_order_userinfo_id) { $this->_order_userinfos->load($this->virtuemart_order_userinfo_id); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_ORDER_INFO'), true); if (!isset($this->modified_on)) { $this->_order_userinfos->modified_on = $this->date->toMySQL(); $this->_order_userinfos->modified_by = $this->user->id; } } if (!$this->virtuemart_order_userinfo_id || $this->_order_userinfos->virtuemart_user_id != $this->virtuemart_user_id) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_USER_ORDER_INFO')); // Address type name if (!isset($this->address_type_name)) $this->address_type_name = $userdetails->address_type_name; // Company if (!isset($this->company)) $this->company = $userdetails->company; // Title if (!isset($this->title)) $this->title = $userdetails->title; // Last name if (!isset($this->last_name)) $this->last_name = $userdetails->last_name; // First name if (!isset($this->first_name)) $this->first_name = $userdetails->first_name; // Middle name if (!isset($this->middle_name)) $this->middle_name = $userdetails->middle_name; // Phone 1 if (!isset($this->phone_1)) $this->phone_1 = $userdetails->phone_1; // Phone 2 if (!isset($this->phone_2)) $this->phone_2 = $userdetails->phone_2; // Fax if (!isset($this->fax)) $this->fax = $userdetails->fax; // Address 1 if (!isset($this->address_1)) $this->address_1 = $userdetails->address_1; // Address 2 if (!isset($this->address_2)) $this->address_2 = $userdetails->address_2; // City if (!isset($this->city)) $this->city = $userdetails->city; // State if (!isset($this->virtuemart_state_id)) { if (isset($this->state_name) || isset($this->state_2_code) || isset($this->state_3_code)) { $query = $db->getQuery(true); $query->select('virtuemart_state_id'); $query->from('#__virtuemart_states'); if (isset($this->state_name)) $query->where('state_name = '.$db->Quote($this->state)); else if (isset($this->state_2_code)) $query->where('state_2_code = '.$db->Quote($this->state_2_code)); else if (isset($this->state_3_code)) $query->where('state_3_code = '.$db->Quote($this->state_3_code)); $db->setQuery($query); $this->virtuemart_state_id = $db->loadResult(); } else $this->virtuemart_state_id = $userdetails->virtuemart_state_id; } // Country if (!isset($this->virtuemart_country_id)) { if (isset($this->country_name) || isset($this->country_2_code) || isset($this->country_3_code)) { $this->virtuemart_country_id = $this->helper->getCountryId($this->country_name, $this->country_2_code, $this->country_3_code); } else $this->virtuemart_country_id = $userdetails->virtuemart_country_id; } // Zip if (!isset($this->zip)) $this->zip = $userdetails->zip; // Agreed if (!isset($this->agreed)) $this->agreed = 0; // Modified date if (!isset($this->modified_on)) { $this->_order_userinfos->modified_on = $this->date->toMySQL(); $this->_order_userinfos->modified_by = $this->user->id; } // Created date if (!isset($this->created_on)) { $this->_order_userinfos->created_on = $this->date->toMySQL(); $this->_order_userinfos->created_by = $this->user->id; } } // Bind the user uploaded data $this->_order_userinfos->bind($this); // Store the order user info if ($this->_order_userinfos->store($this)) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_ORDERUSER')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_ORDERUSER')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ORDERUSER_NOT_ADDED', $this->_order_userinfos->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_ORDERUSER_QUERY'), true); // Check if the order has at least a billing address if ($this->address_type == 'ST') { // Check if there is the requested address in the database $query = $db->getQuery(true); $query->select('virtuemart_order_userinfo_id'); $query->from('#__virtuemart_order_userinfos'); $query->where('address_type = '.$db->Quote('BT')); $query->where('virtuemart_order_id = '.$this->virtuemart_order_id); $db->setQuery($query); $bt_order_info_id = $db->loadResult(); // There is no BT address let's add one if (!$bt_order_info_id) { // Get all the fields from the user info table $q = "SHOW COLUMNS FROM #__virtuemart_userinfos"; $db->setQuery($q); $user_fields_raw = $db->loadAssocList(); $user_fields = array(); foreach($user_fields_raw as $user_field) { $user_fields[] = $user_field['Field']; } $q = "SHOW COLUMNS FROM #__virtuemart_order_userinfos"; $db->setQuery($q); $order_user_fields_raw = $db->loadAssocList(); $order_user_fields = array(); foreach($order_user_fields_raw as $user_field) { $order_user_fields[] = $user_field['Field']; } $copy_fields = array_intersect($order_user_fields, $user_fields); // Create the billing address entry $q = "INSERT INTO #__virtuemart_order_userinfos (".implode(',', $copy_fields).", virtuemart_order_id) (SELECT ".implode(',', $copy_fields).", ".$this->virtuemart_order_id." AS order_id FROM #__virtuemart_userinfos WHERE user_id = ".$this->virtuemart_user_id." AND address_type = 'BT')"; $db->setQuery($q); $db->query(); $csvilog->addDebug(JText::_('COM_CSVI_CREATE_BILLING_QUERY'), true); } } // Create an order history entry // Load the payment info if (isset($this->virtuemart_order_history_id)) { $this->_order_histories->load($this->virtuemart_order_history_id); if (!isset($this->modified_on)) { $this->_order_histories->modified_on = $this->date->toMySQL(); $this->_order_histories->modified_by = $this->user->id; } } else { if (!isset($this->modified_on)) { $this->_order_histories->modified_on = $this->date->toMySQL(); $this->_order_histories->modified_by = $this->user->id; } // Add a creating date if there is no product_id $this->_order_histories->created_on = $this->date->toMySQL(); $this->_order_histories->created_by = $this->user->id; if (!isset($this->customer_notified)) $this->customer_notified = 0; // Comments $this->_order_histories->comments = ''; } // Bind the payment data $this->_order_histories->bind($this); // Store the order history info if ($this->_order_histories->store($this)) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_ORDER_HISTORY')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_ORDER_HISTORY')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ORDER_PAYMNET_NOT_ADDED', $this->_order_histories->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_ORDER_HISTORY_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the order import related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_orders = $this->getTable('orders'); $this->_order_userinfos = $this->getTable('order_userinfos'); $this->_order_items = $this->getTable('order_items'); $this->_order_histories = $this->getTable('order_histories'); } /** * Cleaning the order import related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_orders->reset(); $this->_order_userinfos->reset(); $this->_order_items->reset(); $this->_order_histories->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Formate a date to MySQL timestamp * * Format of the date is day/month/year or day-month-year. * * @copyright * @author RolandD * @todo use JDate * @todo move to general function * @see * @access private * @param * @return string MySQL timestamp * @since 3.0 */ private function _getMysqlDate() { $new_date = preg_replace('/-|\./', '/', $this->_datafield); $date_parts = explode('/', $new_date); if ((count($date_parts) == 3) && ($date_parts[0] > 0 && $date_parts[0] < 32 && $date_parts[1] > 0 && $date_parts[1] < 13 && (strlen($date_parts[2]) == 4))) { $old_date = $date_parts[2].'-'.$date_parts[1].'-'.$date_parts[0]; } else $old_date = date('Y-m-d H:i:s', time()); return $old_date; } } ?> PK>\e2models/com_virtuemart/import/customfieldimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'created_on': case 'modified_on': case 'locked_on': $this->$name = $this->convertDate($value); break; default: $this->$name = $value; break; } } // All is good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Get the plugin ID if (empty($this->custom_jplugin_id) && !empty($this->custom_element)) { $this->custom_jplugin_id = $this->_getPluginId(); if (empty($this->custom_jplugin_id)) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_PLUGIN_FOUND', $this->plugin_name)); return false; } else { // Make sure the custom_value is the same as custom_element when dealing with a plugin // This is needed as otherwise the plugin is not called $this->custom_value = $this->custom_element; } } // Bind the data $this->_customs->bind($this); // Check the data $this->_customs->check(); // Set the modified date as we are modifying the product if (!isset($this->modified_on)) { $this->_customs->modified_on = $this->date->toMySQL(); $this->_customs->modified_by = $this->user->id; } if (empty($this->_customs->virtuemart_custom_id)) { $this->_customs->custom_params = ''; $this->_customs->custom_field_desc = ''; $this->_customs->created_on = $this->date->toMySQL(); $this->_customs->created_by = $this->user->id; } // Store the data if ($this->_customs->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_CUSTOMFIELD')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_CUSTOMFIELD')); } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CUSTOMFIELD_NOT_ADDED', $this->_customs->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_CUSTOMFIELD_QUERY'), true); // Clean the tables $this->cleanTables(); } /** * Load the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.01 */ private function _loadTables() { $this->_customs = $this->getTable('customs'); } /** * Cleaning the waiting list related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.1 */ protected function cleanTables() { $this->_customs->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Get the user ID * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return mixed int when user ID found | false when not found * @since 3.1 */ private function _getPluginId() { if (isset($this->plugin_name)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('extension_id'); $query->from('#__extensions'); $query->where('name = '.$db->Quote($this->plugin_name)); $query->where('type = '.$db->Quote('plugin')); $db->setQuery($query); $result = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_FIND_USER_ID'), true); if ($result) return $result; else return false; } else return false; } } ?>PK>\i0**,models/com_virtuemart/import/mediaimport.phpnuW+A_loadTables(); $this->loadSettings(); // Set some initial values $this->date = JFactory::getDate(); $this->user = JFactory::getUser(); } /** * Here starts the processing * * @copyright * @author RolandD * @todo Redo the validateInput * @see * @access public * @param * @return * @since 3.0 */ public function getStart() { // Get the logger $jinput = JFactory::getApplication()->input; // Load the data $this->loadData(); // Load the helper $this->helper = new Com_VirtueMart(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $this->virtuemart_vendor_id = $this->helper->getVendorId(); // Process data foreach ($this->csvi_data as $name => $value) { // Check if the field needs extra treatment switch ($name) { case 'published': switch ($value) { case 'n': case 'N': case '0': $value = 0; break; default: $value = 1; break; } $this->published = $value; break; case 'media_delete': $this->$name = strtoupper($value); break; default: $this->$name = $value; break; } } // All good return true; } /** * Process each record and store it in the database * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessRecord() { $db = JFactory::getDBO(); $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Process the image $this->_processMedia(); // Set some basic values if (!isset($this->modified_on)) { $this->_medias->modified_on = $this->date->toMySQL(); $this->_medias->modified_by = $this->user->id; } // Find the media ID $this->_medias->file_url = $this->file_url; $this->_medias->check(); $this->virtuemart_media_id = $this->_medias->virtuemart_media_id; // Do we need to delete a media file? if ($this->media_delete == 'Y') { $this->_deleteMedia(); } else { // Check if the media exists if (empty($this->virtuemart_media_id)) { $this->_medias->created_on = $this->date->toMySQL(); $this->_medias->created_by = $this->user->id; } // Bind all the data $this->_medias->bind($this); // Store the data if ($this->_medias->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MEDIAFILE')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MEDIAFILE')); // Add a link to the product if the SKU is specified if (isset($this->product_sku)) { $this->_product_medias->virtuemart_media_id = $this->_medias->virtuemart_media_id; $this->_product_medias->virtuemart_product_id = $this->helper->getProductId(); if (!$this->_product_medias->check()) { if ($this->_product_medias->store()) { if ($this->queryResult() == 'UPDATE') $csvilog->AddStats('updated', JText::_('COM_CSVI_UPDATE_MEDIAXREF')); else $csvilog->AddStats('added', JText::_('COM_CSVI_ADD_MEDIAXREF')); } } } } else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MEDIAFILE_NOT_ADDED', $this->_medias->getError())); // Store the debug message $csvilog->addDebug(JText::_('COM_CSVI_MEDIAFILE_QUERY'), true); } // Clean the tables $this->cleanTables(); } /** * Load the product files related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_medias = $this->getTable('medias'); $this->_product_medias = $this->getTable('product_medias'); } /** * Cleaning the product files related tables * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function cleanTables() { $this->_medias->reset(); $this->_product_medias->reset(); // Clean local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') { $this->$name = $value; } } } /** * Delete a media and its references * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _deleteMedia() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Delete the product if ($this->_medias->delete($this->virtuemart_media_id)) { $db = JFactory::getDbo(); // Delete product reference $query = $db->getQuery(true); $query->delete('#__virtuemart_product_medias'); $query->where('virtuemart_media_id = '.$this->virtuemart_media_id); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_DELETE_PRODUCT_XREF'), true); $db->query(); $csvilog->AddStats('deleted', JText::sprintf('COM_CSVI_MEDIA_DELETED', $this->virtuemart_media_id)); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_MEDIA_NOT_DELETED', $this->virtuemart_media_id)); } return true; } /** * Process media files * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _processMedia() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Check if any image handling needs to be done if ($template->get('process_image', 'image', false)) { if (!is_null($this->file_url)) { // Image handling $imagehelper = new ImageHelper; // Verify the original image if ($imagehelper->isRemote($this->file_url)) { $original = $this->file_url; $remote = true; if ($template->get('save_images_on_server', 'image')) { switch ($this->file_type) { case 'category': $base = $template->get('file_location_category_images', 'path'); break; default: $base = $template->get('file_location_product_images', 'path'); break; } } else $base = ''; $full_path = $base; } else { // Create the full file_url path switch ($this->file_type) { case 'category': $base = $template->get('file_location_category_images', 'path'); break; default: $base = $template->get('file_location_product_images', 'path'); break; } // Check if the image contains the image path $dirname = dirname($this->file_url); if (strpos($base, $dirname) !== false) { $image = basename($this->file_url); } $original = $base.$this->file_url; $remote = false; // Get subfolders $path_parts = pathinfo($original); $full_path = $path_parts['dirname'].'/'; $csvilog->addDebug(JText::sprintf('COM_CSVI_CREATED_FILE_URL', $original)); $remote = false; } // Generate image names $file_details = $imagehelper->ProcessImage($original, $full_path); // Process the file details if ($file_details['exists'] && $file_details['isimage']) { $media = array(); $this->file_title = ($this->file_title) ? $this->file_title : $this->file_url; $this->file_description = ($this->file_description) ? $this->file_description : $this->file_url; $this->file_meta = ($this->file_meta) ? $this->file_meta : $this->file_url; $this->file_mimetype = $file_details['mime_type']; $this->file_type = $this->file_type; $this->file_is_product_image = ($this->file_type == 'product') ? 1 : 0; $this->file_is_downloadable = ($this->file_is_downloadable) ? $this->file_is_downloadable : 0; $this->file_is_forSale = ($this->file_is_forSale) ? $this->file_is_forSale : 0; $this->file_url = (empty($file_details['output_path'])) ? $file_details['output_name'] : $file_details['output_path'].$file_details['output_name']; // Create the thumbnail if ($template->get('thumb_create', 'image')) { // Get the subfolder structure $thumb_path = str_ireplace($base, '', $full_path); if (empty($this->file_url_thumb)) $this->file_url_thumb = 'resized/'.$thumb_path.basename($this->file_url); if (!$remote) $original = $this->file_url; $this->file_url_thumb = $imagehelper->createThumbnail($original, $base, $this->file_url_thumb); } else if (empty($this->file_url_thumb)) $this->file_url_thumb = $this->file_url; } } } } }PK>\^.models/com_virtuemart/export/productexport.phpnuW+Ainput; $db = JFactory::getDbo(); $csvidb = new CsviDb(); $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); $this->_domainname = CsviHelper::getDomainName(); $helper = new Com_VirtueMart(); $sef = new CsviSef(); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'created_on': case 'modified_on': case 'locked_on': case 'created_by': case 'modified_by': case 'locked_by': case 'virtuemart_product_id': case 'virtuemart_vendor_id': case 'hits': case 'metaauthor': case 'metarobot': case 'published': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn($field->field_name); break; case 'category_id': case 'category_path': $userfields[] = $db->qn('#__virtuemart_product_categories').'.'.$db->qn('virtuemart_category_id'); $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('virtuemart_product_id'); break; case 'product_name': case 'product_s_desc': case 'product_desc': case 'metadesc': case 'metakey': case 'slug': case 'customtitle': case 'custom_value': case 'custom_price': case 'custom_param': case 'custom_title': case 'file_url': case 'file_url_thumb': case 'shopper_group_name': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('virtuemart_product_id'); break; case 'product_parent_sku': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('product_parent_id'); break; case 'related_products': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('virtuemart_product_id').' AS main_product_id'; break; case 'product_box': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('product_packaging'); break; case 'product_price': case 'price_with_tax': $userfields[] = $db->qn('#__virtuemart_product_prices').'.'.$db->qn('product_price'); $userfields[] = $db->qn('#__virtuemart_currencies').'.'.$db->qn('currency_code_3'); break; case 'product_url': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('virtuemart_product_id'); $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('product_url'); $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('product_parent_id'); break; case 'price_with_discount': $userfields[] = $db->qn('#__virtuemart_product_prices').'.'.$db->qn('product_price'); $userfields[] = $db->qn('#__virtuemart_currencies').'.'.$db->qn('currency_code_3'); //$userfields[] = $db->qn('#__virtuemart_calcs').'.'.$db->qn('calc_value'); //$userfields[] = $db->qn('#__virtuemart_calcs').'.'.$db->qn('calc_value_mathop'); //$userfields[] = $db->qn('#__virtuemart_calcs').'.'.$db->qn('calc_kind'); break; case 'custom_shipping': $userfields[] = $db->qn('#__virtuemart_product_prices').'.'.$db->qn('product_price'); $userfields[] = '1 AS tax_rate'; break; case 'max_order_level': case 'min_order_level': $userfields[] = $db->qn('#__virtuemart_products').'.'.$db->qn('product_params'); break; case 'basepricewithtax': case 'discountedpricewithouttax': case 'pricebeforetax': case 'salesprice': case 'taxamount': case 'discountamount': case 'pricewithouttax': case 'product_currency': $userfields[] = $db->qn('#__virtuemart_products.virtuemart_product_id'); $userfields[] = $db->qn('#__virtuemart_currencies.currency_code_3'); break; case 'virtuemart_shoppergroup_id': case 'shopper_group_name_price': $userfields[] = $db->qn('#__virtuemart_product_prices.virtuemart_shoppergroup_id'); break; // Man made fields, do not export them case 'custom': case 'picture_url': case 'manufacturer_name': break; default: $userfields[] = $db->qn($field->field_name); break; } } } /** Export SQL Query * Get all products - including items * as well as products without a price */ $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_products'); $query->leftJoin('#__virtuemart_product_prices ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_product_prices.virtuemart_product_id'); $query->leftJoin('#__virtuemart_product_manufacturers ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_product_manufacturers.virtuemart_product_id'); $query->leftJoin('#__virtuemart_shoppergroups ON #__virtuemart_product_prices.virtuemart_shoppergroup_id = #__virtuemart_shoppergroups.virtuemart_shoppergroup_id'); $query->leftJoin('#__virtuemart_manufacturers ON #__virtuemart_product_manufacturers.virtuemart_manufacturer_id = #__virtuemart_manufacturers.virtuemart_manufacturer_id'); $query->leftJoin('#__virtuemart_product_categories ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_product_categories.virtuemart_product_id'); $query->leftJoin('#__virtuemart_categories ON #__virtuemart_product_categories.virtuemart_category_id = #__virtuemart_categories.virtuemart_category_id'); $query->leftJoin('#__virtuemart_currencies ON #__virtuemart_currencies.virtuemart_currency_id = #__virtuemart_product_prices.product_currency'); // Check if there are any selectors $selectors = array(); // Filter by product category /** * We are doing a selection on categories, need to redo the query to make sure child products get included * 1. Search all product ID's for that particular category * 2. Search for all child product ID's * 3. Load all products with these ids */ $productcategories = $template->get('product_categories', 'product', false); if ($productcategories && $productcategories[0] != '') { $product_ids = array(); // If selected get products of all subcategories as well if ($template->get('incl_subcategory', 'product', false)) { $q_subcat_ids = "SELECT category_child_id FROM #__virtuemart_category_categories WHERE category_parent_id IN ('".implode("','", $productcategories)."')"; $db->setQuery($q_subcat_ids); $subcat_ids = $db->loadResultArray(); $productcategories = array_merge($productcategories, $subcat_ids); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); } // Get only the parent products and products without children if ($template->get('parent_only', 'product', 0, 'bool')) { // Get all product IDs in the selected categories $q_product_ids = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p LEFT JOIN #__virtuemart_product_categories x ON p.virtuemart_product_id = x.virtuemart_product_id WHERE x.virtuemart_category_id IN ('".implode("','", $productcategories)."') AND p.product_parent_id = 0"; $db->setQuery($q_product_ids); $product_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); } // Get only the child products and products without children else if ($template->get('child_only', 'product', 0, 'bool')) { // Load all non child IDs $q_child = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p LEFT JOIN #__virtuemart_product_categories x ON p.virtuemart_product_id = x.virtuemart_product_id WHERE x.virtuemart_category_id IN ('".implode("','", $productcategories)."')"; $db->setQuery($q_child); $allproduct_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Get all child product IDs in the selected categories $q_child = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p WHERE p.product_parent_id IN ('".implode("','", $allproduct_ids)."')"; $db->setQuery($q_child); $child_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Get all parent product IDs in the selected categories $q_child = "SELECT p.product_parent_id FROM #__virtuemart_products p WHERE p.virtuemart_product_id IN ('".implode("','", $child_ids)."')"; $db->setQuery($q_child); $parent_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Combine all the IDs $product_ids = array_merge($child_ids, array_diff($allproduct_ids, $parent_ids)); } else { // Get all product IDs $q_product_ids = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p LEFT JOIN #__virtuemart_product_categories x ON p.virtuemart_product_id = x.virtuemart_product_id WHERE x.virtuemart_category_id IN ('".implode("','", $productcategories)."')"; $db->setQuery($q_product_ids); $product_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Get all child product IDs if ($product_ids) { $q_childproduct_ids = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p WHERE p.product_parent_id IN ('".implode("','", $product_ids)."')"; $db->setQuery($q_childproduct_ids); $childproduct_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Now we have all the product IDs $product_ids = array_merge($product_ids, $childproduct_ids); } } // Check if the user want child products if (!empty($product_ids)) $selectors[] = '#__virtuemart_products.virtuemart_product_id IN (\''.implode("','", $product_ids).'\')'; } else { // Filter by published category state $category_publish = $template->get('publish_state_categories', 'product'); // Filter on parent products and products without children if ($template->get('parent_only', 'product', 0, 'bool')) { $selectors[] = '#__virtuemart_products.product_parent_id = 0'; if (!empty($category_publish)) { $selectors[] = '#__virtuemart_categories.published = '.$category_publish; } } // Filter on child products and products without children else if ($template->get('child_only', 'product', 0, 'bool')) { // Load all non child IDs $q_nonchild = 'SELECT #__virtuemart_products.virtuemart_product_id FROM #__virtuemart_products '; $state = ($category_publish == '1') ? '0' : '1'; if (!empty($category_publish)) { $q_nonchild .= 'LEFT JOIN #__virtuemart_product_categories ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_product_categories.virtuemart_product_id LEFT JOIN #__virtuemart_categories ON #__virtuemart_product_categories.virtuemart_category_id = #__virtuemart_categories.virtuemart_category_id WHERE #__virtuemart_categories.published = '.$state; } $db->setQuery($q_nonchild); $nonchild_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Get the child IDs from the filtered category if (!empty($category_publish)) { $q_nonchild = 'SELECT #__virtuemart_products.virtuemart_product_id FROM #__virtuemart_products '; $q_nonchild .= 'LEFT JOIN #__virtuemart_product_categories ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_product_categories.virtuemart_product_id LEFT JOIN #__virtuemart_categories ON #__virtuemart_product_categories.virtuemart_category_id = #__virtuemart_categories.virtuemart_category_id WHERE #__virtuemart_products.product_parent_id IN (\''.implode("','", $nonchild_ids).'\')'; $q_nonchild .= ' GROUP BY virtuemart_product_id'; $db->setQuery($q_nonchild); $child_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); if (is_array($child_ids)) $nonchild_ids = array_merge($nonchild_ids, $child_ids); } $selectors[] = '#__virtuemart_products.virtuemart_product_id NOT IN (\''.implode("','", $nonchild_ids).'\')'; } else { if (!empty($category_publish)) { // Get all product IDs $q_product_ids = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p LEFT JOIN #__virtuemart_product_categories x ON p.virtuemart_product_id = x.virtuemart_product_id LEFT JOIN #__virtuemart_categories c ON x.virtuemart_category_id = c.virtuemart_category_id WHERE c.category_publish = ".$db->q($category_publish); $db->setQuery($q_product_ids); $product_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Get all child product IDs if ($product_ids) { $q_childproduct_ids = "SELECT p.virtuemart_product_id FROM #__virtuemart_products p WHERE p.product_parent_id IN ('".implode("','", $product_ids)."')"; $db->setQuery($q_childproduct_ids); $childproduct_ids = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // Now we have all the product IDs $product_ids = array_merge($product_ids, $childproduct_ids); } // Check if the user want child products if (!empty($product_ids)) $selectors[] = '#__virtuemart_products.virtuemart_product_id IN (\''.implode("','", $product_ids).'\')'; } } } // Filter on featured products $featured = $template->get('featured', 'product', ''); if ($featured) { $selectors[] = "#__virtuemart_products.product_special = 1"; } // Filter by published state $product_publish = $template->get('publish_state', 'general'); if ($product_publish !== '' && ($product_publish == 1 || $product_publish == 0)) { $selectors[] = '#__virtuemart_products.published = '.$db->q($product_publish); } // Filter by product SKU $productskufilter = $template->get('productskufilter', 'product'); if ($productskufilter) { $productskufilter .= ','; if (strpos($productskufilter, ',')) { $skus = explode(',', $productskufilter); $wildcard = ''; $normal = array(); foreach ($skus as $sku) { if (!empty($sku)) { if (strpos($sku, '%')) { $wildcard .= "#__virtuemart_products.product_sku LIKE ".$db->q($sku)." OR "; } else $normal[] = $db->q($sku); } } if (substr($wildcard, -3) == 'OR ') $wildcard = substr($wildcard, 0, -4); if (!empty($wildcard) && !empty($normal)) { $selectors[] = "(".$wildcard." OR #__virtuemart_products.product_sku IN (".implode(',', $normal)."))"; } else if (!empty($wildcard)) { $selectors[] = "(".$wildcard.")"; } else if (!empty($normal)) { $selectors[] = "(#__virtuemart_products.product_sku IN (".implode(',', $normal)."))"; } } } // Filter on price from $priceoperator = $template->get('priceoperator', 'product', 'gt'); $pricefrom = $template->get('pricefrom', 'product', 0, 'float'); $priceto = $template->get('priceto', 'product', 0, 'float'); if (!empty($pricefrom)) { switch ($priceoperator) { case 'gt': $selectors[] = "ROUND(#__virtuemart_product_prices.product_price, ".$template->get('export_price_format_decimal', 'general', 2, 'int').") > ".$pricefrom; break; case 'eq': $selectors[] = "ROUND(#__virtuemart_product_prices.product_price, ".$template->get('export_price_format_decimal', 'general', 2, 'int').") = ".$pricefrom; break; case 'lt': $selectors[] = "ROUND(#__virtuemart_product_prices.product_price, ".$template->get('export_price_format_decimal', 'general', 2, 'int').") < ".$pricefrom; break; case 'bt': $selectors[] = "ROUND(#__virtuemart_product_prices.product_price, ".$template->get('export_price_format_decimal', 'general', 2, 'int').") BETWEEN ".$pricefrom." AND ".$priceto; break; } } // Filter by stocklevel start $stocklevelstart = $template->get('stocklevelstart', 'product', 0, 'int'); if ($stocklevelstart) { $selectors[] = '#__virtuemart_products.product_in_stock >= '.$stocklevelstart; } // Filter by stocklevel end $stocklevelend = $template->get('stocklevelend', 'product', 0, 'int'); if ($stocklevelend) { $selectors[] = '#__virtuemart_products.product_in_stock <= '.$stocklevelend; } // Filter by shopper group id $shopper_group = $template->get('shopper_groups', 'product', array()); if ($shopper_group && $shopper_group[0] != 'none') { $selectors[] = "#__virtuemart_product_prices.virtuemart_shoppergroup_id IN ('".implode("','", $shopper_group)."')"; } // Filter by manufacturer $manufacturer = $template->get('manufacturers', 'product', array()); if ($manufacturer && $manufacturer[0] != 'none') { $selectors[] = "#__virtuemart_manufacturers.virtuemart_manufacturer_id IN ('".implode("','", $manufacturer)."')"; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ingore fields $ignore = array('metadesc', 'metakey', 'product_name', 'product_s_desc', 'product_desc', 'slug', 'customtitle', 'category_path', 'manufacturer_name', 'category_id', 'picture_url', 'product_box', 'product_parent_sku', 'related_products', 'custom_shipping', 'basepricewithtax', 'discountedpricewithouttax', 'pricebeforetax', 'salesprice', 'taxamount', 'discountamount', 'pricewithouttax', 'custom_title', 'custom_value', 'custom_price', 'custom_param', 'file_url', 'file_url_thumb', 'min_order_level', 'max_order_level', 'shopper_group_name', 'shopper_group_name_price'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add export limits $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); JRequest::setVar('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); // Start the XML/HTML output if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); // Load JoomFish translation if needed $joomfish = array(); if ($template->get('use_joomfish', 'product', false)) { $jfdb = JFactory::getDBO(); // Get the product details $q = "SELECT value, reference_field FROM #__jf_content WHERE reference_table = 'vm_product' AND language_id = ".$template->get('joomfish_language', 'product')." AND reference_id = ".$record->main_product_id; $jfdb->setQuery($q); $joomfish = $jfdb->loadObjectList('reference_field'); } // Reset the prices $this->_prices = array(); // Process all the export fields foreach ($export_fields as $column_id => $field) { if ($field->process) { $fieldname = $field->field_name; // Add the replacement & JoomFish if (isset($record->$fieldname)) { // Get the JoomFish data if (array_key_exists($fieldname, $joomfish)) $fieldvalue = $joomfish[$fieldname]->value; else $fieldvalue = $record->$fieldname; $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); } else $fieldvalue = ''; switch ($fieldname) { case 'category_id': $category_path = trim($helper->createCategoryPath($record->virtuemart_product_id, true)); if (strlen(trim($category_path)) == 0) $category_path = $field->default_value; $category_path = CsviHelper::replaceValue($field->replace, $category_path); $this->addExportField($field->combine, $category_path, $fieldname, $field->column_header, true); break; case 'category_path': $category_path = trim($helper->createCategoryPath($record->virtuemart_product_id)); if (strlen(trim($category_path)) == 0) $category_path = $field->default_value; $category_path = CsviHelper::replaceValue($field->replace, $category_path); $this->addExportField($field->combine, $category_path, $fieldname, $field->column_header, true); break; case 'product_name': case 'product_s_desc': case 'product_desc': case 'metadesc': case 'metakey': case 'slug': case 'customtitle': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_products_'.$template->get('language', 'general')); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'picture_url': $query = $db->getQuery(true); $query->select('file_url'); $query->from('#__virtuemart_medias'); $query->leftJoin('#__virtuemart_product_medias ON #__virtuemart_product_medias.virtuemart_media_id = #__virtuemart_medias.virtuemart_media_id'); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $query->order('#__virtuemart_product_medias.ordering'); $db->setQuery($query, 0, 1); $fieldvalue = $db->loadResult(); // Check if there is already a product full image if (strlen(trim($fieldvalue)) > 0) $picture_url = $this->_domainname.'/'.$fieldvalue; else $picture_url = $field->default_value; $picture_url = CsviHelper::replaceValue($field->replace, $picture_url); $this->addExportField($field->combine, $picture_url, $fieldname, $field->column_header); break; case 'product_parent_sku': $query = $db->getQuery(true); $query->select('product_sku'); $query->from('#__virtuemart_products'); $query->where('virtuemart_product_id = '.$record->product_parent_id); $db->setQuery($query); $product_parent_sku = $db->loadResult(); $product_parent_sku = CsviHelper::replaceValue($field->replace, $product_parent_sku); $this->addExportField($field->combine, $product_parent_sku, $fieldname, $field->column_header); break; case 'related_products': // Get the custom ID $related_records = array(); $query = $db->getQuery(true); $query->select($db->qn('#__virtuemart_products').'.'.$db->qn('product_sku')); $query->from($db->qn('#__virtuemart_product_customfields')); $query->leftJoin($db->qn('#__virtuemart_customs').' ON '.$db->qn('#__virtuemart_customs').'.'.$db->qn('virtuemart_custom_id').' = '.$db->qn('#__virtuemart_product_customfields').'.'.$db->qn('virtuemart_custom_id')); $query->leftJoin($db->qn('#__virtuemart_products').' ON '.$db->qn('#__virtuemart_products').'.'.$db->qn('virtuemart_product_id').' = '.$db->qn('#__virtuemart_product_customfields').'.'.$db->qn('custom_value')); $query->where($db->qn('#__virtuemart_customs').'.'.$db->qn('field_type').' = '.$db->q('R')); $query->where($db->qn('#__virtuemart_product_customfields').'.'.$db->qn('virtuemart_product_id').' = '.$db->q($record->virtuemart_product_id)); $query->group($db->qn('#__virtuemart_products').'.'.$db->qn('product_sku')); $db->setQuery($query); $related_records = $db->loadResultArray(); if (is_array($related_records)) $related_products = implode('|', $related_records); else $related_products = ''; if (strlen(trim($related_products)) == 0) $related_products = $field->default_value; $related_products = CsviHelper::replaceValue($field->replace, $related_products); $this->addExportField($field->combine, $related_products, $fieldname, $field->column_header); break; case 'product_available_date': case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'product_box': $product_box = $record->product_packaging>>16&0xFFFF; $product_box = CsviHelper::replaceValue($field->replace, $product_box); $this->addExportField($field->combine, $product_box, $fieldname, $field->column_header); break; case 'product_packaging': $product_packaging = $record->product_packaging & 0xFFFF; $product_packaging = CsviHelper::replaceValue($field->replace, $product_packaging); $this->addExportField($field->combine, $product_packaging, $fieldname, $field->column_header); break; case 'product_price': $product_price = $this->_convertPrice($record->product_price, $record->currency_code_3); $product_price = number_format($product_price, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($product_price)) == 0) $product_price = $field->default_value; if ($template->get('add_currency_to_price', 'general')) { if ($template->get('targetcurrency', 'product') != '') { $product_price = $template->get('targetcurrency', 'product').' '.$product_price; } else $product_price = $record->currency_code_3.' '.$product_price; } $product_price = CsviHelper::replaceValue($field->replace, $product_price); $this->addExportField($field->combine, $product_price, $fieldname, $field->column_header); break; case 'product_override_price': $product_price = number_format($record->product_override_price, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($product_price)) == 0) $product_price = $field->default_value; if ($template->get('add_currency_to_price', 'general')) { if ($template->get('targetcurrency', 'product') != '') { $product_price = $template->get('targetcurrency', 'product').' '.$product_price; } else $product_price = $record->currency_code_3.' '.$product_price; } $product_price = CsviHelper::replaceValue($field->replace, $product_price); $this->addExportField($field->combine, $product_price, $fieldname, $field->column_header); break; case 'product_url': // Check if there is already a product URL if (is_null($record->product_url) || strlen(trim($record->product_url)) == 0) { // Get the category id // Check to see if we have a child product $category_id = $helper->getCategoryId($record->virtuemart_product_id); if ($category_id > 0) { // Let's create a SEF URL $_SERVER['QUERY_STRING'] = 'option=com_virtuemart&Itemid='.$template->get('vm_itemid', 'product', 1, 'int').'&view=productdetails&virtuemart_product_id='.$record->virtuemart_product_id.'&virtuemart_category_id='.$category_id; $product_url = $sef->getSiteRoute('index.php?'.$_SERVER['QUERY_STRING']); } else $product_url = ""; } // There is a product URL, use it else $product_url = $record->product_url; // Add the suffix if (!empty($product_url)) $product_url .= $template->get('producturl_suffix', 'product'); // Check for https, replace with http. https has unnecessary overhead if (substr($product_url, 0, 5) == 'https') $product_url = 'http'.substr($product_url, 5); $product_url = CsviHelper::replaceValue($field->replace, $product_url); $this->addExportField($field->combine, $product_url, $fieldname, $field->column_header, true); break; case 'price_with_tax': $prices = $this->_getProductPrice($record->virtuemart_product_id); $price_with_tax = number_format($prices['salesPrice'], $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); // Check if we have any content otherwise use the default value if (strlen(trim($price_with_tax)) == 0) $price_with_tax = $field->default_value; if ($template->get('add_currency_to_price', 'general')) $price_with_tax = $record->product_currency.' '.$price_with_tax; $price_with_tax = CsviHelper::replaceValue($field->replace, $price_with_tax); $this->addExportField($field->combine, $price_with_tax, $fieldname, $field->column_header); break; case 'basepricewithtax': case 'discountedpricewithouttax': case 'pricebeforetax': case 'salesprice': case 'taxamount': case 'discountamount': case 'pricewithouttax': $prices = $this->_getProductPrice($record->virtuemart_product_id); if (isset($prices[$fieldname])) { $price = number_format($prices[$fieldname], $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); } // Check if we have any content otherwise use the default value if (strlen(trim($price)) == 0) $price = $field->default_value; // Check if the currency needs to be added if ($template->get('add_currency_to_price', 'general')) $price = $record->product_currency.' '.$price; // Perform the replacement rules $price = CsviHelper::replaceValue($field->replace, $price); // Export the data $this->addExportField($field->combine, $price, $fieldname, $field->column_header); break; case 'product_currency': $fieldvalue = $record->currency_code_3; // Check if we have any content otherwise use the default value if ($template->get('targetcurrency', 'product') != '') { $fieldvalue = $template->get('targetcurrency', 'product'); } if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'custom_shipping': // Get the prices $prices = $this->_getProductPrice($record->virtuemart_product_id); // Check the shipping cost if (isset($prices['salesprice'])) { $price_with_tax = number_format($prices['salesprice'], $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); $result = $helper->shippingCost($price_with_tax); if ($result) $fieldvalue = $result; } // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'manufacturer_name': $query = $db->getQuery(true); $query->select('mf_name'); $query->from('#__virtuemart_manufacturers_'.$template->get('language', 'general')); $query->leftJoin('#__virtuemart_product_manufacturers ON #__virtuemart_product_manufacturers.virtuemart_manufacturer_id = #__virtuemart_manufacturers_'.$template->get('language', 'general').'.virtuemart_manufacturer_id'); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'shopper_group_name': $query = $db->getQuery(true); $query->select($db->qn($fieldname)); $query->from($db->qn('#__virtuemart_shoppergroups', 'g')); $query->leftJoin($db->qn('#__virtuemart_product_shoppergroups').' AS p ON g.virtuemart_shoppergroup_id = p.virtuemart_shoppergroup_id'); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($record->virtuemart_product_id)); $db->setQuery($query); $csvilog->addDebug('Get shopper group', true); $titles = $db->loadColumn(); if (is_array($titles)) { $fieldvalue = CsviHelper::replaceValue($field->replace, implode('|', $titles)); // Check if we have any content otherwise use the default value } else $fieldvalue = ''; if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'shopper_group_name_price': if ($record->virtuemart_shoppergroup_id > 0) { $query = $db->getQuery(true); $query->select($db->qn('shopper_group_name')); $query->from($db->qn('#__virtuemart_shoppergroups', 'g')); $query->where($db->qn('virtuemart_shoppergroup_id').' = '.$db->q($record->virtuemart_shoppergroup_id)); $db->setQuery($query); $csvilog->addDebug('Get price shopper group', true); $fieldvalue = $db->loadResult(); } else $fieldvalue = '*'; $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'custom_title': // Get the custom title $query = $db->getQuery(true); $query->select($db->qn('custom_title')); $query->from($db->qn('#__virtuemart_customs').' AS c'); $query->leftJoin($db->qn('#__virtuemart_product_customfields').' AS f ON c.virtuemart_custom_id = f.virtuemart_custom_id'); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($record->virtuemart_product_id)); // Check if we need to filter $title_filter = array(); $title_filter = $template->get('custom_title', 'product', array(), 'array'); if (!empty($title_filter) && $title_filter[0] != '') { $query->where($db->qn('f').'.'.$db->qn('virtuemart_custom_id').' IN ('.implode(',', $title_filter).')'); } $query->order($db->qn('f').'.'.$db->qn('virtuemart_custom_id')); $db->setQuery($query); $titles = $db->loadResultArray(); if (is_array($titles)) { $fieldvalue = CsviHelper::replaceValue($field->replace, implode('~', $titles)); // Check if we have any content otherwise use the default value } else $fieldvalue = ''; if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'custom_value': case 'custom_price': case 'custom_param': if (!isset($this->_customfields[$record->virtuemart_product_id][$fieldname])) { $query = $db->getQuery(true); $query->select($db->qn($fieldname)); $query->from($db->qn('#__virtuemart_product_customfields')); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($record->virtuemart_product_id)); // Check if we need to filter $title_filter = array(); $title_filter = $template->get('custom_title', 'product', array()); if (!empty($title_filter) && $title_filter[0] != '') { $query->where($db->qn('virtuemart_custom_id').' IN ('.implode(',', $title_filter).')'); } $query->order($db->qn('virtuemart_custom_id')); $db->setQuery($query); $customfields = $db->loadObjectList(); $csvilog->addDebug('COM_CSVI_CUSTOM_FIELD_QUERY', true); if (!empty($customfields)) { $values = array(); foreach ($customfields as $customfield) { $values[] = $customfield->$fieldname; } $this->_customfields[$record->virtuemart_product_id][$fieldname] = $values; $fieldvalue = implode('~', $this->_customfields[$record->virtuemart_product_id][$fieldname]); } else $fieldvalue = ''; } else { $fieldvalue = implode('~', $this->_customfields[$record->virtuemart_product_id][$fieldname]); } $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'file_url': case 'file_url_thumb': $query = $db->getQuery(true); $query->select($db->qn($fieldname)); $query->from($db->qn('#__virtuemart_medias').' AS m'); $query->leftJoin($db->qn('#__virtuemart_product_medias').' AS p ON m.virtuemart_media_id = p.virtuemart_media_id'); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($record->virtuemart_product_id)); $query->where($db->qn('file_type').' = '.$db->q('product')); $query->order('p.ordering'); $db->setQuery($query); $titles = $db->loadResultArray(); if (is_array($titles)) { $fieldvalue = CsviHelper::replaceValue($field->replace, implode('|', $titles)); // Check if we have any content otherwise use the default value } else $fieldvalue = ''; if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'min_order_level': case 'max_order_level': if (strpos($record->product_params, '|')) { $params = explode('|', $record->product_params); foreach ($params as $param) { if ($param) { list($param_name, $param_value) = explode('=', $param); if ($param_name == $fieldname) { $fieldvalue = str_replace('"', '', $param_value); } } } } else $fieldvalue = ''; if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } /** * Convert prices to the new currency * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _convertPrice($product_price, $product_currency) { if (empty($product_price)) return $product_price; else { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // See if we need to convert the price if ($template->get('targetcurrency', 'product', '') != '') { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('currency_code, currency_rate'); $query->from('#__csvi_currency'); $query->where('currency_code IN ('.$db->q($product_currency).", ".$db->q($template->get('targetcurrency', 'product', 'EUR')).")"); $db->setQuery($query); $rates = $db->loadObjectList('currency_code'); /* Convert to base price */ $baseprice = $product_price / $rates[strtoupper($product_currency)]->currency_rate; /* Convert to destination currency */ return $baseprice * $rates[strtoupper($template->get('targetcurrency', 'product', 'EUR'))]->currency_rate; } else return $product_price; } } /** * Get product prices * * @copyright * @author RolandD * @todo * @see * @access public * @param int $product_id the ID of the product * @return * @since 4.0 */ private function _getProductPrice($product_id) { if (!isset($this->_prices[$product_id])) { // Define VM constant to make the classes work if (!defined('JPATH_VM_ADMINISTRATOR')) define('JPATH_VM_ADMINISTRATOR', JPATH_ADMINISTRATOR.'/components/com_virtuemart/'); // Load the configuration for the currency formatting require_once(JPATH_ADMINISTRATOR.'/components/com_virtuemart/helpers/config.php'); // Include the calculation helper require_once(JPATH_ADMINISTRATOR.'/components/com_virtuemart/helpers/calculationh.php'); $calc = calculationHelper::getInstance(); // Include the version class to compare require_once(JPATH_ADMINISTRATOR.'/components/com_virtuemart/version.php'); // Do a version check due to changed core code if (version_compare(vmVersion::$RELEASE, '2.0.6', '>')) { require_once(JPATH_ADMINISTRATOR.'/components/com_virtuemart/models/product.php'); $product = $this->getInstance('Product', 'VirtueMartModel'); $prices = $calc->getProductPrices($product->getProductSingle($product_id)); } else { $prices = $calc->getProductPrices($product_id); } if (is_array($prices)) $this->_prices[$product_id] = array_change_key_case($prices, CASE_LOWER); else $this->_prices[$product_id] = array(); } return $this->_prices[$product_id]; } }PK>\)&models/com_virtuemart/export/.htaccessnuW+A Order allow,deny Deny from all PK>\kP9+9+/models/com_virtuemart/export/userinfoexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { case 'virtuemart_user_id': case 'created_on': case 'modified_on': case 'locked_on': case 'created_by': case 'modified_by': case 'locked_by': case 'name': case 'agreed': $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName($field->field_name); break; case 'full_name': $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('first_name'); $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('middle_name'); $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('last_name'); break; case 'id': $userfields[] = $db->quoteName('#__users').'.'.$db->quoteName('id'); break; case 'usergroup_name': $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('virtuemart_user_id'); break; case 'virtuemart_vendor_id': $userfields[] = $db->quoteName('#__virtuemart_vmusers').'.'.$db->quoteName('virtuemart_vendor_id'); break; case 'state_2_code': case 'state_3_code': case 'state_name': $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('virtuemart_state_id'); break; case 'country_2_code': case 'country_3_code': case 'country_name': case 'virtuemart_country_id': $userfields[] = $db->quoteName('#__virtuemart_userinfos').'.'.$db->quoteName('virtuemart_country_id'); break; case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } /** Export SQL Query * Get all products - including items * as well as products without a price */ $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_userinfos'); $query->leftJoin('#__virtuemart_vmusers ON #__virtuemart_vmusers.virtuemart_user_id = #__virtuemart_userinfos.virtuemart_user_id'); $query->leftJoin('#__virtuemart_vmuser_shoppergroups ON #__virtuemart_vmuser_shoppergroups.virtuemart_user_id = #__virtuemart_userinfos.virtuemart_user_id'); $query->leftJoin('#__virtuemart_vendors ON #__virtuemart_vendors.virtuemart_vendor_id = #__virtuemart_vmusers.virtuemart_vendor_id'); $query->leftJoin('#__virtuemart_shoppergroups ON #__virtuemart_shoppergroups.virtuemart_shoppergroup_id = #__virtuemart_vmuser_shoppergroups.virtuemart_shoppergroup_id'); $query->leftJoin('#__users ON #__users.id = #__virtuemart_userinfos.virtuemart_user_id'); // Check if there are any selectors $selectors = array(); // Filter by vendors $vendors = $template->get('vendors', 'userinfo', false); if ($vendors && $vendors[0] != 'none') { $selectors[] = '#__virtuemart_vmusers.virtuemart_vendor_id IN (\''.implode("','", $vendors).'\')'; } // Filter by permissions $permissions = $template->get('permissions', 'userinfo', false); if ($permissions && $permissions[0] != 'none') { $selectors[] = '#__virtuemart_vmusers.perms IN (\''.implode("','", $permissions).'\')'; } // Filter by address type $address = $template->get('userinfo_address', 'userinfo', false); if ($address) { $selectors[] = '#__virtuemart_userinfos.address_type = '.$db->Quote(strtoupper($address)); } // Filter by user info modified date start $date = $template->get('userinfomdatestart', 'userinfo', false); if ($date) { $userinfomdate = JFactory::getDate($date); $selectors[] = '#__virtuemart_userinfos.modified_on >= '.$db->Quote($userinfomdate->toMySQL()); } // Filter by user info date end $date = $template->get('userinfomdateend', 'userinfo', false); if ($date) { $userinfomdate = JFactory::getDate($date); $selectors[] = '#__virtuemart_userinfos.modified_on <= '.$db->Quote($userinfomdate->toMySQL()); } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Array of fields not to handle $ignore = array('full_name', 'usergroup_name', 'state_2_code', 'state_3_code', 'state_name', 'country_2_code', 'country_3_code', 'country_name'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add export limits $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); JRequest::setVar('logcount', array('export' => $logcount)); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'created_on': case 'modified_on': case 'locked_on': case 'lastvisitdate': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'address_type': // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; if ($fieldvalue == 'BT') $fieldvalue = JText::_('COM_CSVI_BILLING_ADDRESS'); else if ($fieldvalue == 'ST') $fieldvalue = JText::_('COM_CSVI_SHIPPING_ADDRESS'); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'full_name': $fieldvalue = str_replace(' ', ' ', $record->first_name.' '.$record->middle_name.' '.$record->last_name); $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'usergroup_name': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__usergroups'); $query->leftJoin('#__user_usergroup_map ON #__user_usergroup_map.group_id = #__usergroups.id'); $query->where($db->quoteName('user_id').' = '.$record->virtuemart_user_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'state_2_code': case 'state_3_code': case 'state_name': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_states'); $query->where('virtuemart_state_id = '.$record->virtuemart_state_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'country_2_code': case 'country_3_code': case 'country_name': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_countries'); $query->where('virtuemart_country_id = '.$record->virtuemart_country_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\u1  3models/com_virtuemart/export/manufacturerexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'virtuemart_manufacturer_id': $userfields[] = $db->quoteName('#__virtuemart_manufacturers').'.'.$db->quoteName('virtuemart_manufacturer_id'); break; case 'mf_category_name': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_manufacturers'); $query->leftJoin('#__virtuemart_manufacturers_'.$template->get('language', 'general').' ON #__virtuemart_manufacturers_'.$template->get('language', 'general').'.virtuemart_manufacturer_id = #__virtuemart_manufacturers.virtuemart_manufacturer_id'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_manufacturers.published = '.$db->Quote($publish_state); } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Fields to ignore $ignore = array('mf_category_name'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); JRequest::setVar('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'mf_category_name': $query = $db->getQuery(true); $query->select('mf_category_name'); $query->from('#__virtuemart_manufacturercategories_'.$template->get('language', 'general')); $query->where('virtuemart_manufacturercategories_id = '.$record->virtuemart_manufacturercategories_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\#o,,'models/com_virtuemart/export/index.htmlnuW+APK>\^-models/com_virtuemart/export/couponexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_coupons'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state != '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_coupons.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby'); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort'); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'coupon_value': case 'coupon_value_valid': $coupon_value = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); if (strlen(trim($fieldvalue)) == 0) $coupon_value = $field->default_value; $this->addExportField($field->combine, $coupon_value, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\O 2models/com_virtuemart/export/customfieldexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'custom'; case 'vendor_name': break; case 'plugin_name': $userfields[] = $db->quoteName('#__virtuemart_customs').'.'.$db->quoteName('custom_jplugin_id'); break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_customs'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state != '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_customs.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ignore these fields $ignore = array('custom', 'plugin_name', 'vendor_name'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'plugin_name': if (!isset($this->_plugins[$record->custom_jplugin_id])) { $query = $db->getQuery(true); $query->select($db->quoteName('name')); $query->from($db->quoteName('#__extensions')); $query->where($db->quoteName('extension_id').' = '.$db->Quote($record->custom_jplugin_id)); $query->where($db->quoteName('type').' = '.$db->Quote('plugin')); $db->setQuery($query); $name = $db->loadResult(); $this->_plugins[$record->custom_jplugin_id]= $name; } else $name = $this->_plugins[$record->custom_jplugin_id]; $name = CsviHelper::replaceValue($field->replace, $name); $this->addExportField($field->combine, $name, $fieldname, $field->column_header); break; case 'vendor_name': if (!isset($this->_vendors[$record->virtuemart_vendor_id])) { $query = $db->getQuery(true); $query->select($db->quoteName('vendor_name')); $query->from($db->quoteName('#__virtuemart_vendors')); $query->where($db->quoteName('virtuemart_vendor_id').' = '.$db->Quote($record->virtuemart_vendor_id)); $db->setQuery($query); $name = $db->loadResult(); $this->_vendors[$record->virtuemart_vendor_id]= $name; } else $name = $this->_vendors[$record->virtuemart_vendor_id]; $name = CsviHelper::replaceValue($field->replace, $name); $this->addExportField($field->combine, $name, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\"-models/com_virtuemart/export/ratingexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { case 'created_on': case 'modified_on': case 'locked_on': case 'created_by': case 'modified_by': case 'locked_by': case 'virtuemart_product_id': case 'published': $userfields[] = $db->quoteName('#__virtuemart_rating_reviews').'.'.$db->quoteName($field->field_name); break; case 'product_sku': case 'vote': $userfields[] = $db->quoteName('#__virtuemart_rating_reviews').'.'.$db->quoteName('virtuemart_product_id'); $userfields[] = $db->quoteName('#__virtuemart_rating_reviews').'.'.$db->quoteName('created_by'); break; case 'username': $userfields[] = $db->quoteName('#__virtuemart_rating_reviews').'.'.$db->quoteName('created_by'); // Man made fields, do not export them case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } /** Export SQL Query * Get all products - including items * as well as products without a price */ $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_rating_reviews'); $query->leftJoin('#__virtuemart_products ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_rating_reviews.virtuemart_product_id'); $query->leftJoin('#__users ON #__users.id = #__virtuemart_rating_reviews.created_by'); // Check for any filters $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_rating_reviews.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Fields to ignore $ignore = array('product_sku', 'vote', 'username'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add export limits $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'product_sku': $query = $db->getQuery(true); $query->select('product_sku'); $query->from('#__virtuemart_products'); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $db->setQuery($query); $product_sku = $db->loadResult(); $product_sku = CsviHelper::replaceValue($field->replace, $product_sku); $this->addExportField($field->combine, $product_sku, $fieldname, $field->column_header); break; case 'vote': $query = $db->getQuery(true); $query->select('vote'); $query->from('#__virtuemart_rating_votes'); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $query->where('created_by = '.$record->created_by); $db->setQuery($query); $vote = $db->loadResult(); $vote = CsviHelper::replaceValue($field->replace, $vote); $this->addExportField($field->combine, $vote, $fieldname, $field->column_header); break; case 'username': $query = $db->getQuery(true); $query->select('username'); $query->from('#__users'); $query->where('id = '.$record->created_by); $db->setQuery($query); $username = $db->loadResult(); $username = CsviHelper::replaceValue($field->replace, $username); $this->addExportField($field->combine, $username, $fieldname, $field->column_header); break; case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\qZ6''0models/com_virtuemart/export/orderitemexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { case 'created_on': case 'modified_on': case 'locked_on': case 'created_by': case 'modified_by': case 'locked_by': case 'virtuemart_order_id': case 'order_status': case 'virtuemart_vendor_id': $userfields[] = $db->quoteName('#__virtuemart_order_items').'.'.$db->quoteName($field->field_name); break; case 'product_sku': $userfields[] = $db->quoteName('#__virtuemart_order_items').'.'.$db->quoteName('order_item_sku').' AS product_sku'; break; case 'full_name': $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('first_name'); $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('middle_name'); $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('last_name'); break; default: $userfields[] = $db->quoteName($field->field_name); break; } } // Construct the query // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_order_items'); $query->leftJoin('#__virtuemart_orders ON #__virtuemart_orders.virtuemart_order_id = #__virtuemart_order_items.virtuemart_order_id'); $query->leftJoin('#__virtuemart_order_userinfos AS user_info1 ON user_info1.virtuemart_order_id = #__virtuemart_order_items.virtuemart_order_id'); $query->leftJoin('#__virtuemart_orderstates ON #__virtuemart_orderstates.order_status_code = #__virtuemart_order_items.order_status'); // Check if there are any selectors $selectors = array(); // Filter by order number start $ordernostart = $template->get('orderitemnostart', 'orderitem', 0, 'int'); if ($ordernostart > 0) { $selectors[] = '#__virtuemart_order_items.virtuemart_order_id >= '.$ordernostart; } // Filter by order number end $ordernoend = $template->get('orderitemnoend', 'orderitem', 0, 'int'); if ($ordernoend > 0) { $selectors[] = '#__virtuemart_order_items.virtuemart_order_id <= '.$ordernoend; } // Filter by list of order numbers $orderlist = $template->get('orderitemlist', 'orderitem'); if ($orderlist) { $selectors[] = '#__virtuemart_order_items.virtuemart_order_id IN ('.$orderlist.')'; } // Filter by order date start $orderdatestart = $template->get('orderitemdatestart', 'orderitem', false); if ($orderdatestart) { $orderdate = JFactory::getDate($orderdatestart); $selectors[] = '#__virtuemart_order_items.created_on >= '.$db->Quote($orderdate->toMySQL()); } // Filter by order date end $orderdateend = $template->get('orderitemdateend', 'orderitem', false); if ($orderdateend) { $orderdate = JFactory::getDate($orderdateend); $selectors[] = '#__virtuemart_order_items.created_on <= '.$db->Quote($orderdate->toMySQL()); } // Filter by order modified date start $ordermdatestart = $template->get('orderitemmdatestart', 'orderitem', false); if ($ordermdatestart) { $ordermdate = JFactory::getDate($ordermdatestart); $selectors[] = '#__virtuemart_order_items.modified_on >= '.$db->Quote($ordermdate->toMySQL()); } // Filter by order modified date end $ordermdateend = $template->get('orderitemmdateend', 'orderitem', false); if ($ordermdateend) { $ordermdate = JFactory::getDate($ordermdateend); $selectors[] = '#__virtuemart_order_items.modified_on <= '.$db->Quote($ordermdate->toMySQL()); } // Filter by order status $orderstatus = $template->get('orderitemstatus', 'orderitem', false); if ($orderstatus && $orderstatus[0] != '') { $selectors[] = '#__virtuemart_order_items.order_status IN (\''.implode("','", $orderstatus).'\')'; } // Filter by order price start $pricestart = $template->get('orderitempricestart', 'orderitem', false, 'float'); if ($pricestart) { $selectors[] = '#__virtuemart_orders.order_total >= '.$pricestart; } // Filter by order price end $priceend = $template->get('orderitempriceend', 'orderitem', false, 'float'); if ($priceend) { $selectors[] = '#__virtuemart_orders.order_total <= '.$priceend; } // Filter by order product $orderproduct = $template->get('orderitemproduct', 'orderitem', false); if ($orderproduct && $orderproduct[0] != '') { $selectors[] = '#__virtuemart_order_items.order_item_sku IN (\''.implode("','", $orderproduct).'\')'; } // Filter by order currency $ordercurrency = $template->get('orderitemcurrency', 'orderitem', false); if ($ordercurrency && $ordercurrency[0] != '') { $selectors[] = '#__virtuemart_orders.order_currency IN (\''.implode("','", $ordercurrency).'\')'; } // Check if we need to attach any selectors to the query if (count($selectors) > 0) $query->where(implode("\n AND ", $selectors)); // Ignore fields $ignore = array('full_name'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'product_item_price': case 'product_final_price': case 'product_price': $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'full_name': $fieldvalue = str_replace(' ', ' ', $record->first_name.' '.$record->middle_name.' '.$record->last_name); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\.,models/com_virtuemart/export/mediaexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'product_sku': $userfields[] = $db->quoteName('#__virtuemart_product_medias').'.'.$db->quoteName('virtuemart_product_id'); break; case 'ordering': case 'virtuemart_media_id': $userfields[] = $db->quoteName('#__virtuemart_medias').'.'.$db->quoteName($field->field_name); break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_medias'); $query->leftJoin('#__virtuemart_product_medias ON #__virtuemart_product_medias.virtuemart_media_id = #__virtuemart_medias.virtuemart_media_id'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state != '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_medias.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Fields to ignore $ignore = array('product_sku'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'product_sku': $query = $db->getQuery(true); $query->select('product_sku'); $query->from('#__virtuemart_products'); $query->where('virtuemart_product_id = '.$record->virtuemart_product_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\i2``2models/com_virtuemart/export/waitinglistexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'virtuemart_user_id': case 'virtuemart_product_id': case 'created_on': case 'modified_on': case 'locked_on': case 'created_by': case 'modified_by': case 'locked_by': $userfields[] = $db->quoteName('#__virtuemart_waitingusers').'.'.$db->quoteName($field->field_name); break; // Man made fields, do not export them case 'custom': case 'username': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_waitingusers'); $query->leftJoin('#__virtuemart_products ON #__virtuemart_products.virtuemart_product_id = #__virtuemart_waitingusers.virtuemart_product_id'); $query->leftJoin('#__users ON #__users.id = #__virtuemart_waitingusers.virtuemart_user_id'); // Ignore fields $ignore = array('custom', 'username'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add export limits $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\&  3models/com_virtuemart/export/shopperfieldexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { // Man made fields, do not export them case 'custom': break; default: $userfields[] = $db->quoteName($field->field_name); break; } } /** Export SQL Query * Get all products - including items * as well as products without a price */ $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_userfields'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state !== '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_userfields.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ignore some fields $ignore = array('custom'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add export limits $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); JRequest::setVar('logcount', array('export' => $logcount)); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\ ʣ-!-!/models/com_virtuemart/export/categoryexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); $helper = new Com_VirtueMart(); // Get all categories $query = $db->getQuery(true); $query->select('LOWER(l.category_name) AS category_name, category_child_id AS cid, category_parent_id AS pid'); $query->from('#__virtuemart_categories c'); $query->leftJoin('#__virtuemart_category_categories x ON x.category_child_id = c.virtuemart_category_id'); $query->leftJoin('#__virtuemart_categories_'.$template->get('language', 'general').' l ON l.virtuemart_category_id = c.virtuemart_category_id'); $db->setQuery($query); $cats = $db->loadObjectList(); // Check if there are any categories if (empty($cats)) { if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); } $this->writeOutput(); return false; } $categories = array(); // Group all categories together according to their level foreach ($cats as $key => $cat) { $categories[$cat->pid][$cat->cid] = $cat->category_name; } // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'virtuemart_category_id': case 'ordering': $userfields[] = '#__virtuemart_categories.'.$field->field_name; break; case 'file_url': case 'file_url_thumb': $userfields[] = '#__virtuemart_category_medias.virtuemart_media_id'; break; case 'category_name': case 'category_description': case 'metadesc': case 'metakey': case 'slug': case 'category_path': $userfields[] = $db->qn('#__virtuemart_categories').'.'.$db->qn('virtuemart_category_id'); break; default: $userfields[] = $db->qn($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_categories'); $query->leftJoin('#__virtuemart_categories_'.$template->get('language', 'general').' ON #__virtuemart_categories_'.$template->get('language', 'general').'.virtuemart_category_id = #__virtuemart_categories.virtuemart_category_id'); $query->leftJoin('#__virtuemart_category_medias ON #__virtuemart_category_medias.virtuemart_category_id = #__virtuemart_categories.virtuemart_category_id'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state != '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_categories.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ignore fields $ignore = array('category_path','file_url','file_url_thumb',''); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; $fieldreplace = $field->field_name.$field->column_header; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'category_path': $fieldvalue = $helper->createCategoryPathById($record->virtuemart_category_id); $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'file_url': case 'file_url_thumb': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_medias'); $query->where('virtuemart_media_id = '.$record->virtuemart_media_id); $db->setQuery($query); $fieldvalue = $db->loadResult(); $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'category_name': case 'category_description': case 'metadesc': case 'metakey': case 'slug': case 'customtitle': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_categories_'.$template->get('language', 'general')); $query->where('virtuemart_category_id = '.$record->virtuemart_category_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\k&HXTXT,models/com_virtuemart/export/orderexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); $address = strtoupper($template->get('order_address', 'order', false)); if ($address == 'BTST') $user_info_fields = CsviModelAvailablefields::DbFields('virtuemart_order_userinfos'); else $user_info_fields = array(); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { switch ($field->field_name) { case 'created_by': case 'created_on': case 'locked_by': case 'locked_on': case 'modified_by': case 'modified_on': case 'order_status': case 'virtuemart_user_id': case 'virtuemart_vendor_id': case 'virtuemart_order_id': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName($field->field_name); break; case 'email': $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName($field->field_name); break; case 'id': $userfields[] = $db->quoteName('#__users').'.'.$db->quoteName($field->field_name); break; case 'payment_element': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('virtuemart_paymentmethod_id'); break; case 'shipment_element': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('virtuemart_shipmentmethod_id'); break; case 'state_2_code': case 'state_3_code': case 'state_name': $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('virtuemart_state_id'); break; case 'country_2_code': case 'country_3_code': case 'country_name': case 'virtuemart_country_id': $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('virtuemart_country_id'); break; case 'user_currency': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('user_currency_id'); break; case 'username': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('virtuemart_user_id'); break; case 'full_name': $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('first_name'); $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('middle_name'); $userfields[] = $db->quoteName('user_info1').'.'.$db->quoteName('last_name'); break; case 'total_order_items': $userfields[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('virtuemart_order_id'); break; case 'product_price_total': $userfields[] = 'product_item_price*product_quantity AS product_price_total'; break; case 'discount_percentage': $userfields[] = '(order_discount/order_total)*100 AS discount_percentage'; break; case 'custom': // These are man made fields, do not try to get them from the database break; default: if ($address == 'BTST' && preg_match("/".$field->field_name."/i", join(",", array_keys($user_info_fields)))) { $userfields[] = 'COALESCE(user_info2.'.$field->field_name.', user_info1.'.$field->field_name.') AS '.$field->field_name; } else $userfields[] = $db->quoteName($field->field_name); break; } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_orders'); $query->leftJoin('#__virtuemart_order_items ON #__virtuemart_orders.virtuemart_order_id = #__virtuemart_order_items.virtuemart_order_id'); $query->leftJoin('#__virtuemart_order_userinfos AS user_info1 ON #__virtuemart_orders.virtuemart_order_id = user_info1.virtuemart_order_id'); if ($address == 'BTST') { $query->leftJoin('#__virtuemart_order_userinfos AS user_info2 ON #__virtuemart_orders.virtuemart_order_id = user_info2.virtuemart_order_id AND user_info2.address_type = '.$db->Quote('ST')); } $query->leftJoin('#__virtuemart_orderstates ON #__virtuemart_orders.order_status = #__virtuemart_orderstates.order_status_code'); $query->leftJoin('#__virtuemart_product_manufacturers ON #__virtuemart_order_items.virtuemart_product_id = #__virtuemart_product_manufacturers.virtuemart_product_id'); $query->leftJoin('#__virtuemart_manufacturers ON #__virtuemart_product_manufacturers.virtuemart_manufacturer_id = #__virtuemart_manufacturers.virtuemart_manufacturer_id'); $query->leftJoin('#__users ON #__users.id = user_info1.virtuemart_user_id'); $query->leftJoin('#__virtuemart_countries ON #__virtuemart_countries.virtuemart_country_id = user_info1.virtuemart_country_id'); // Check if there are any selectors $selectors = array(); // Filter by manufacturer $manufacturer = $template->get('ordermanufacturer', 'order', false); if ($manufacturer && $manufacturer[0] != 'none') { $selectors[] = '#__virtuemart_manufacturers.virtuemart_manufacturer_id IN ('.implode(',', $manufacturer).')'; } // Filter by order number start $ordernostart = $template->get('ordernostart', 'order', false, 'int'); if ($ordernostart > 0) { $selectors[] = '#__virtuemart_orders.virtuemart_order_id >= '.$ordernostart; } // Filter by order number end $ordernoend = $template->get('ordernoend', 'order', false, 'int'); if ($ordernoend > 0) { $selectors[] = '#__virtuemart_orders.virtuemart_order_id <= '.$ordernoend; } // Filter by list of order numbers $orderlist = $template->get('orderlist', 'order'); if ($orderlist) { $selectors[] = '#__virtuemart_orders.virtuemart_order_id IN ('.$orderlist.')'; } // Filter by order date start $orderdatestart = $template->get('orderdatestart', 'order', false); if ($orderdatestart) { $orderdate = JFactory::getDate($orderdatestart); $selectors[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('created_on').' >= '.$db->Quote($orderdate->toMySQL()); } // Filter by order date end $orderdateend = $template->get('orderdateend', 'order', false); if ($orderdateend) { $orderdate = JFactory::getDate($orderdateend); $selectors[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('created_on').' <= '.$db->Quote($orderdate->toMySQL()); } // Filter by order modified date start $ordermdatestart = $template->get('ordermdatestart', 'order', false); if ($ordermdatestart) { $ordermdate = JFactory::getDate($ordermdatestart); $selectors[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('modified_on').' >= '.$db->Quote($ordermdate->toMySQL()); } // Filter by order modified date end $ordermdateend = $template->get('ordermdateend', 'order', false); if ($ordermdateend) { $ordermdate = JFactory::getDate($ordermdateend); $selectors[] = $db->quoteName('#__virtuemart_orders').'.'.$db->quoteName('modified_on').' <= '.$db->Quote($ordermdate->toMySQL()); } // Filter by order status $orderstatus = $template->get('orderstatus', 'order', false); if ($orderstatus && $orderstatus[0] != '') { $selectors[] = '#__virtuemart_orders.order_status IN (\''.implode("','", $orderstatus).'\')'; } // Filter by order price start $pricestart = $template->get('orderpricestart', 'order', false, 'float'); if ($pricestart) { $selectors[] = '#__virtuemart_orders.order_total >= '.$pricestart; } // Filter by order price end $priceend = $template->get('orderpriceend', 'order', false, 'float'); if ($priceend) { $selectors[] = '#__virtuemart_orders.order_total <= '.$priceend; } // Filter by order user id $orderuser = $template->get('orderuser', 'order', false); if ($orderuser && $orderuser[0] != '') { $selectors[] = '#__virtuemart_orders.virtuemart_user_id IN (\''.implode("','", $orderuser).'\')'; } // Filter by order product $orderproduct = $template->get('orderproduct', 'order', false); if ($orderproduct && $orderproduct[0] != '') { $selectors[] = '#__virtuemart_order_items.order_item_sku IN (\''.implode("','", $orderproduct).'\')'; } // Filter by address type if ($address) { switch (strtoupper($address)) { case 'BTST': $selectors[] = "user_info1.address_type = 'BT'"; break; default: $selectors[] = 'user_info1.address_type = '.$db->Quote(strtoupper($address)); break; } } // Filter by order currency $ordercurrency = $template->get('ordercurrency', 'order', false); if ($ordercurrency && $ordercurrency[0] != '') { $selectors[] = '#__virtuemart_orders.order_currency IN (\''.implode("','", $ordercurrency).'\')'; } // Filter by payment method $orderpayment = $template->get('orderpayment', 'order', false); if ($orderpayment && $orderpayment[0] != '') { $selectors[] = '#__virtuemart_orders.virtuemart_paymentmethod_id IN (\''.implode("','", $orderpayment).'\')'; } // Check if we need to attach any selectors to the query if (count($selectors) > 0) $query->where(implode("\n AND ", $selectors)); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $address, $user_info_fields); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $address, $user_info_fields); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { if ($field->process) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'payment_element': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_paymentmethods'); $query->where('virtuemart_paymentmethod_id = '.$record->virtuemart_paymentmethod_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'shipment_element': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_shipmentmethods'); $query->where('virtuemart_shipmentmethod_id = '.$record->virtuemart_shipmentmethod_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'state_2_code': case 'state_3_code': case 'state_name': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_states'); $query->where('virtuemart_state_id = '.$record->virtuemart_state_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'country_2_code': case 'country_3_code': case 'country_name': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_countries'); $query->where('virtuemart_country_id = '.$record->virtuemart_country_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'user_currency': $query = $db->getQuery(true); $query->select('currency_code_3'); $query->from('#__virtuemart_currencies'); $query->where('virtuemart_currency_id = '.$record->user_currency_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'user_email': $fieldvalue = CsviHelper::replaceValue($field->replace, $record->email); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'user_id': $fieldvalue = CsviHelper::replaceValue($field->replace, $record->virtuemart_user_id); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'created_on': case 'modified_on': case 'locked_on': $date = JFactory::getDate($record->$fieldname); $fieldvalue = CsviHelper::replaceValue($field->replace, date($template->get('export_date_format', 'general'), $date->toUnix())); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'address_type': // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; if ($fieldvalue == 'BT') $fieldvalue = JText::_('COM_CSVI_BILLING_ADDRESS'); else if ($fieldvalue == 'ST') $fieldvalue = JText::_('COM_CSVI_SHIPPING_ADDRESS'); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'full_name': $fieldvalue = str_replace(' ', ' ', $record->first_name.' '.$record->middle_name.' '.$record->last_name); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'total_order_items': $query = $db->getQuery(true); $query->select('COUNT(virtuemart_order_id) AS totalitems'); $query->from('#__virtuemart_order_items'); $query->where('virtuemart_order_id = '.$record->virtuemart_order_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'custom': // Has no database value, get the default value only $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'username': $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__users'); $query->where('id = '.$record->virtuemart_user_id); $db->setQuery($query); $fieldvalue = CsviHelper::replaceValue($field->replace, $db->loadResult()); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; case 'order_tax': case 'order_total': case 'order_subtotal': case 'order_shipment': case 'order_shipment_tax': case 'order_payment': case 'order_payment_tax': case 'coupon_discount': case 'order_discount': case 'user_currency_rate': case 'product_price_total': case 'discount_percentage': $fieldvalue = number_format($fieldvalue, $template->get('export_price_format_decimal', 'general', 2, 'int'), $template->get('export_price_format_decsep', 'general'), $template->get('export_price_format_thousep', 'general')); $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } } // Clean the totalitems JRequest::setVar('total_order_items', 0); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } /** * Create an SQL filter * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $filter what kind of SQL type should be created * @return string the SQL part to add to the query * @since 3.0 */ protected function getFilterBy($filter, $address, $user_info_fields) { $db = JFactory::getDBO(); $export_fields = JRequest::getVar('export.fields'); $fields = array(); foreach ($export_fields as $column_id => $field) { switch ($filter) { case 'groupby': $process = true; break; case 'sort': $process = $field->sort; break; default: $process = false; } if ($process) { switch ($field->field_name) { case 'custom': case 'total_order_items': case 'discount_percentage': case 'product_price_total': case 'full_name': case 'payment_element': case 'shipment_element': case 'state_2_code': case 'state_3_code': case 'state_name': case 'country_2_code': case 'country_3_code': case 'country_name': case 'user_currency': case 'user_email': case 'user_id': case 'virtuemart_country_id': break; case 'user_id': $fields[] = $db->qn('#__virtuemart_orders.virtuemart_user_id'); break; case 'product_price': $fields[] = $db->qn('product_item_price'); break; case 'ordering': $fields[] = $db->qn('#__virtuemart_orderstates.ordering'); break; default: if ($address == 'BTST' && preg_match("/".$field->field_name."/i", join(",", array_keys($user_info_fields)))) { $fields[] = $db->qn('user_info1.'.$field->field_name); } else $fields[] = $db->qn($field->field_name); break; } } } // Construct the SQL part if (!empty($fields)) { switch ($filter) { case 'groupby': $groupby_fields = array_unique($fields); $q = implode(',', $groupby_fields); break; case 'sort': $sort_fields = array_unique($fields); $q = implode(', ', $sort_fields); break; default: $q = ''; break; } } else $q = ''; return $q; } } ?>PK>\C&&+models/com_virtuemart/export/calcexport.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = $jinput->get('export.class', null, null); $export_fields = $jinput->get('export.fields', array(), 'array'); $helper = new Com_VirtueMart(); // Build something fancy to only get the fieldnames the user wants $userfields = array(); foreach ($export_fields as $column_id => $field) { if ($field->process) { switch ($field->field_name) { case 'virtuemart_calc_id': case 'created_by': case 'created_on': case 'locked_by': case 'locked_on': case 'modified_by': case 'modified_on': case 'ordering': case 'published': case 'shared': case 'virtuemart_vendor_id': $userfields[] = '#__virtuemart_calcs.'.$field->field_name; break; case 'category_path': case 'shopper_group_name': case 'country_name': case 'country_2_code': case 'country_3_code': case 'state_name': case 'state_2_code': case 'state_3_code': $userfields[] = '#__virtuemart_calcs.virtuemart_calc_id'; break; default: $userfields[] = $db->quoteName($field->field_name); break; } } } // Build the query $userfields = array_unique($userfields); $query = $db->getQuery(true); $query->select(implode(",\n", $userfields)); $query->from('#__virtuemart_calcs'); $query->leftJoin('#__virtuemart_calc_categories ON #__virtuemart_calc_categories.virtuemart_calc_id = #__virtuemart_calcs.virtuemart_calc_id'); $query->leftJoin('#__virtuemart_calc_countries ON #__virtuemart_calc_countries.virtuemart_calc_id = #__virtuemart_calcs.virtuemart_calc_id'); $query->leftJoin('#__virtuemart_calc_shoppergroups ON #__virtuemart_calc_shoppergroups.virtuemart_calc_id = #__virtuemart_calcs.virtuemart_calc_id'); $query->leftJoin('#__virtuemart_calc_states ON #__virtuemart_calc_states.virtuemart_calc_id = #__virtuemart_calcs.virtuemart_calc_id'); $query->leftJoin('#__virtuemart_currencies ON #__virtuemart_currencies.virtuemart_currency_id = #__virtuemart_calcs.calc_currency'); // Check if there are any selectors $selectors = array(); // Filter by published state $publish_state = $template->get('publish_state', 'general'); if ($publish_state != '' && ($publish_state == 1 || $publish_state == 0)) { $selectors[] = '#__virtuemart_calcs.published = '.$publish_state; } // Check if we need to attach any selectors to the query if (count($selectors) > 0 ) $query->where(implode("\n AND ", $selectors)); // Ignore fields $ignore = array('category_path', 'shopper_group_name','country_name', 'country_2_code', 'country_3_code', 'state_name', 'state_2_code', 'state_3_code'); // Check if we need to group the orders together $groupby = $template->get('groupby', 'general', false, 'bool'); if ($groupby) { $filter = $this->getFilterBy('groupby', $ignore); if (!empty($filter)) $query->group($filter); } // Order by set field $orderby = $this->getFilterBy('sort', $ignore); if (!empty($orderby)) $query->order($orderby); // Add a limit if user wants us to $limits = $this->getExportLimit(); // Execute the query $csvidb->setQuery($query, $limits['offset'], $limits['limit']); $csvilog->addDebug(JText::_('COM_CSVI_EXPORT_QUERY'), true); // There are no records, write SQL query to log if (!is_null($csvidb->getErrorMsg())) { $this->addExportContent(JText::sprintf('COM_CSVI_ERROR_RETRIEVING_DATA', $csvidb->getErrorMsg())); $this->writeOutput(); $csvilog->AddStats('incorrect', $csvidb->getErrorMsg()); } else { $logcount = $csvidb->getNumRows(); $jinput->set('logcount', $logcount); if ($logcount > 0) { $linenumber = 1; while ($record = $csvidb->getRow()) { $csvilog->setLinenumber($linenumber++); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') $this->addExportContent($exportclass->NodeStart()); foreach ($export_fields as $column_id => $field) { $fieldname = $field->field_name; // Add the replacement if (isset($record->$fieldname)) $fieldvalue = CsviHelper::replaceValue($field->replace, $record->$fieldname); else $fieldvalue = ''; switch ($fieldname) { case 'category_path': // Get all the category IDs $query = $db->getQuery(true); $query->select('virtuemart_category_id'); $query->from('#__virtuemart_calc_categories'); $query->where('virtuemart_calc_id = '.$record->virtuemart_calc_id); $db->setQuery($query); $catids = $db->loadColumn(); if (!empty($catids)) { $categories = array(); foreach ($catids as $catid) { $categories[] = $helper->createCategoryPathById($catid); } $fieldvalue = implode('|', $categories); } $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'shopper_group_name': $query = $db->getQuery(true); $query->select('virtuemart_shoppergroup_id'); $query->from('#__virtuemart_calc_shoppergroups'); $query->where('virtuemart_calc_id = '.$record->virtuemart_calc_id); $db->setQuery($query); $groupids = $db->loadResultArray(); if (!empty($groupids)) { $query = $db->getQuery(true); $query->select('shopper_group_name'); $query->from('#__virtuemart_shoppergroups'); $query->where('virtuemart_shoppergroup_id IN ('.implode(',', $groupids).')'); $db->setQuery($query); $names = $db->loadResultArray(); $fieldvalue = implode('|', $names); } $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'country_name': case 'country_2_code': case 'country_3_code': $query = $db->getQuery(true); $query->select('virtuemart_country_id'); $query->from('#__virtuemart_calc_countries'); $query->where('virtuemart_calc_id = '.$record->virtuemart_calc_id); $db->setQuery($query); $groupids = $db->loadResultArray(); if (!empty($groupids)) { $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_countries'); $query->where('virtuemart_country_id IN ('.implode(',', $groupids).')'); $db->setQuery($query); $names = $db->loadResultArray(); $fieldvalue = implode('|', $names); } $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; case 'state_name': case 'state_2_code': case 'state_3_code': $query = $db->getQuery(true); $query->select('virtuemart_state_id'); $query->from('#__virtuemart_calc_states'); $query->where('virtuemart_calc_id = '.$record->virtuemart_calc_id); $db->setQuery($query); $groupids = $db->loadResultArray(); if (!empty($groupids)) { $query = $db->getQuery(true); $query->select($fieldname); $query->from('#__virtuemart_states'); $query->where('virtuemart_state_id IN ('.implode(',', $groupids).')'); $db->setQuery($query); $names = $db->loadResultArray(); $fieldvalue = implode('|', $names); } $fieldvalue = CsviHelper::replaceValue($field->replace, $fieldvalue); $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header, true); break; default: // Check if we have any content otherwise use the default value if (strlen(trim($fieldvalue)) == 0) $fieldvalue = $field->default_value; $this->addExportField($field->combine, $fieldvalue, $fieldname, $field->column_header); break; } } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $this->addExportContent($exportclass->NodeEnd()); } // Output the contents $this->writeOutput(); } } else { $this->addExportContent(JText::_('COM_CSVI_NO_DATA_FOUND')); // Output the contents $this->writeOutput(); } } } } ?>PK>\models/index.htmlnuW+APK>\)models/.htaccessnuW+A Order allow,deny Deny from all PK>\^^VVmodels/exportfile.phpnuW+Ainput; $db = JFactory::getDbo(); $option = $jinput->get('option'); $data = $jinput->get('jform', array(), 'array'); // Prepare the template $template = $jinput->get('template', null, null); if (is_null($template)) { $data['id'] = $jinput->get('template_id', 0, 'int'); $template = new CsviTemplate($data); $jinput->set('template', $template); } $template->setName($jinput->get('template_name', '', 'string')); // Set the export type $jinput->set('export_type', $data['options']['operation']); // Initiate the log $csvilog = new CsviLog(); // Create a new Import ID in the logger $csvilog->setId(); // Set to collect debug info $csvilog->setDebug($template->get('collect_debug_info', 'general')); // Set some log info $csvilog->SetAction('export'); $csvilog->SetActionType($jinput->get('export_type'), $template->getName('template_name')); // Add the logger to the registry $jinput->set('csvilog', $csvilog); // Load the fields to export $exportfields = $this->getExportFields(); if (!empty($exportfields)) { // Set the last export field $jinput->set('export.fields', $exportfields); // Allow big SQL selects $db->setQuery("SET OPTION SQL_BIG_SELECTS=1"); $db->query(); // Get the filename for the export file $jinput->set('export.filename', $this->exportFilename()); // See if we need to get an XML/HTML class $export_format = $template->get('export_file', 'general'); if ($export_format == 'xml' || $export_format == 'html') { $exportclass = $this->getExportClass(); if ($exportclass) $jinput->set('export.class', $exportclass); else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_EXPORT_CLASS')); $app->enqueueMessage(JText::_('COM_CSVI_NO_EXPORT_CLASS'), 'error'); $jinput->set('logcount', 0); return false; } } // Return all is good return true; } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_EXPORT_FIELDS')); $app->enqueueMessage(JText::_('COM_CSVI_NO_EXPORT_FIELDS'), 'error'); $jinput->set('logcount', 0); return false; } } /** * Set the delimiters * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _setDelimiters() { if (is_null($this->_field_delim)) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Set the delimiters $this->_field_delim = $template->get('field_delimiter', 'general', ','); $this->_text_delim = $template->get('text_enclosure', 'general', ''); } } /** * Process the export data * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getProcessData() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); $export_format = $template->get('export_file', 'general'); $export_fields = $jinput->get('export.fields', null, null); $export_class = $jinput->get('export.class', null, null); // Write out some import settings $this->_exportDetails(); // Start the export if (!$this->_outputStart()) { // Store the log results $log_model = $this->_getModel('log'); $log_model->getStoreLogResults(); return false; } // Add signature for Excel if ($template->get('signature', 'general')) $this->_contents['signature'] = "\xEF\xBB\xBF"; // Add header for XML if ($export_format == 'xml') $this->_contents[] = $export_class->HeaderText(); // Add header for HTML else if ($export_format == 'html') { $this->_contents[] = $export_class->HeaderText(); if ($template->get('include_column_headers', 'general')) { $this->_contents[] = $export_class->StartTableHeaderText(); foreach ($export_fields as $column_id => $field) { if ($field->process) { $header = ($field->column_header) ? $field->column_header : $field->field_name; $this->_contents[] = $export_class->TableHeaderText($header); } } $this->_contents[] = $export_class->EndTableHeaderText(); } $this->_contents[] = $export_class->BodyText(); } else { // Add the header from the template $header = $template->get('header', 'layout', false); if ($header) { $this->_contents[] = $header; $this->writeOutput(); } // Get the delimiters // See if the user wants column headers // Product type names export needs to be excluded here otherwise the column headers are incorrect if ($template->get('include_column_headers', 'general', true)) { $this->_setDelimiters(); $addheader = true; foreach ($export_fields as $column_id => $field) { if ($field->process) { $header = (empty($field->column_header)) ? $field->field_name : $field->column_header; if ($addheader) $this->_contents[] = $this->_text_delim.$header.$this->_text_delim; if ($field->combine) $addheader = false; else $addheader = true; } } } } // Output content $this->writeOutput(); // Start the export from the chosen template type $exportmodel = $this->_getModel($jinput->get('export_type')); $exportmodel->getStart(); if ($export_format == 'xml' || $export_format == 'html') { $footer = $export_class->FooterText(); } else { // Add the footer from the template $footer = $template->get('footer', 'layout'); } // Write the footer if ($footer && !empty($footer)) { $this->_contents[] = $footer; $this->writeOutput(); } // End the export $this->_outputEnd(); // Store the log results $log_model = $this->_getModel('log'); $log_model->getStoreLogResults(); // Process some settings switch ($template->get('exportto', 'general')) { case 'tofile': case 'toemail': case 'toftp': if (!$jinput->get('cron', false, 'bool')) { $app = JFactory::getApplication(); $app->redirect(JURI::root().'administrator/index.php?option=com_csvi&task=process.finished&run_id='.$csvilog->getId()); } break; case 'todownload': jexit(); break; case 'tofront': return true; break; } } /** * Cleanup after export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function getCleanSession() { // Store the log results first $log = $this->_getModel('log'); $log->getStoreLogResults(); } /** * Load the export class that handles the file export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true when xml class is found|false when when no site is given * @since 3.0 */ public function getExportClass() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportclass = false; $exporttype = $template->get('export_file', 'general'); $exportsite = $template->get('export_site', 'general', 'csvimproved'); // Construct the file name $filename = $exportsite.'.php'; // Find the export class $helper = JPath::find(array(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/export/'.$exporttype), $filename); if (!$helper) return false; else { // Load the file and instantite it include_once($helper); $classname = 'Csvi'.ucfirst($exportsite); $exportclass = new $classname; } return $exportclass; } /** * Get the export filename * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string Returns the filename of the exported file * @since 3.0 */ public function exportFilename() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Check if the export is limited, if so add it to the filename // Check if both values are greater than 0 if (($template->get('recordstart', 'general') > 0) && ($template->get('recordend', 'general') > 0)) { // We have valid limiters, add the limit to the filename $filelimit = "_".$template->get('recordend', 'general').'_'.($template->get('recordend', 'general')-1)+$template->get('recordstart', 'general'); } else $filelimit = ''; // Set the filename to use for export $export_filename = trim($template->get('export_filename', 'general')); $local_path = JPath::clean($template->get('localpath', 'general'), '/'); $export_file = $template->get('export_file', 'general'); // Do some customizing // Replace year $export_filename = str_replace('[Y]', date('Y', time()), $export_filename); $export_filename = str_replace('[y]', date('y', time()), $export_filename); // Replace month $export_filename = str_replace('[M]', date('M', time()), $export_filename); $export_filename = str_replace('[m]', date('m', time()), $export_filename); $export_filename = str_replace('[F]', date('F', time()), $export_filename); $export_filename = str_replace('[n]', date('n', time()), $export_filename); // Replace day $export_filename = str_replace('[d]', date('d', time()), $export_filename); $export_filename = str_replace('[D]', date('D', time()), $export_filename); $export_filename = str_replace('[j]', date('j', time()), $export_filename); $export_filename = str_replace('[l]', date('l', time()), $export_filename); // Replace hour $export_filename = str_replace('[g]', date('g', time()), $export_filename); $export_filename = str_replace('[G]', date('G', time()), $export_filename); $export_filename = str_replace('[h]', date('h', time()), $export_filename); $export_filename = str_replace('[H]', date('H', time()), $export_filename); // Replace minute $export_filename = str_replace('[i]', date('i', time()), $export_filename); // Replace seconds $export_filename = str_replace('[s]', date('s', time()), $export_filename); // Setup the full path for the filename switch ($template->get('exportto', 'general')) { case 'toemail': case 'toftp': if (!empty($export_filename)) $localfile = CSVIPATH_TMP.'/'.$export_filename; else $localfile = CSVIPATH_TMP.'/CSVI_VM_'.$jinput->get('template_name', '', 'cmd').'_'.date("j-m-Y_H.i").$filelimit.".".$export_file; break; case 'tofile': if (!empty($local_path) && !empty($export_filename)) $localfile = $local_path.'/'.$export_filename; else if (!empty($local_path)) $localfile = $local_path.'/CSVI_VM_'.$jinput->get('template_name', '', 'cmd').'_'.date("j-m-Y_H.i").$filelimit.".".$export_file; else 'CSVI_VM_'.$jinput->get('template_name', '', 'cmd').'_'.date("j-m-Y_H.i").$filelimit.".".$export_file; break; case 'tofront': $uri = JURI::getInstance(); $localfile = $uri->toString(); break; default: if (!empty($export_filename)) $localfile = $export_filename; else $localfile = 'CSVI_VM_'.$jinput->get('template_name', '', 'cmd').'_'.date("j-m-Y_H.i").$filelimit.".".$export_file; break; } // Clean up $localfile = JPath::clean($localfile, '/'); // Set the filename $csvilog->setFilename($localfile); // Return the filename return $localfile; } /** * Get the fields to use for the export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array Returns an array of required fields and default field values * @since 3.0 */ public function getExportFields() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $template = $jinput->get('template', null, null); // Get the field configuration $export_fields = $template->get('export_fields'); // Set the field options for export if (!empty($export_fields)) { foreach ($export_fields['_selected_name'] as $kef => $field_name) { $field = new StdClass; $field->field_name = $field_name; $field->column_header = $export_fields['_column_header'][$kef]; $field->default_value = $export_fields['_default_value'][$kef]; $field->process = $export_fields['_process_field'][$kef]; $field->combine = $export_fields['_combine_field'][$kef]; $field->sort = $export_fields['_sort_field'][$kef]; $field->replace = $export_fields['_replace_field'][$kef]; $field->field_id = ($kef+1); $fields[($kef+1)] = $field; } } else return array(); // Return the required and default values return $fields; } /** * Print out export details * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _exportDetails() { $jinput = JFactory::getApplication()->input; // Get the logger $csvilog = $jinput->get('csvilog', null, null); // Get the template settings to see if we need a preview $template = $jinput->get('template', null, null); $csvilog->addDebug(JText::_('COM_CSVI_CSVI_VERSION_TEXT').JText::_('COM_CSVI_CSVI_VERSION')); if (function_exists('phpversion')) $csvilog->addDebug(JText::sprintf('COM_CSVI_PHP_VERSION', phpversion())); // General settings $csvilog->addDebug(JText::_('COM_CSVI_GENERAL_SETTINGS')); // Show which template is used */ $csvilog->addDebug(JText::sprintf('COM_CSVI_TEMPLATE_NAME', $jinput->get('template_name'))); // Destination settings $exportto = $template->get('exportto', 'general'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_CHOSEN_DESTINATION', $exportto)); switch ($exportto) { case 'tofile': $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_PATH', $template->get('localpath', 'general'))); break; case 'toftp': $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FTP_HOST', $template->get('ftphost', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FTP_PORT', $template->get('ftpport', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FTP_USERNAME', $template->get('ftpusername', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FTP_ROOT', $template->get('ftproot', 'general'))); break; } // Export filename $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_GENERATED_FILENAME', $jinput->get('export.filename'))); // Export type $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_CHOSEN_EXPORT_TYPE', $template->get('export_type'))); // User given filename $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FILENAME', $template->get('export_filename'))); // Export type $export_file = $template->get('export_file', 'general'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FILE', $export_file)); if ($export_file == 'xml') { $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_SITE', $template->get('export_site', 'general'))); } // Check delimiter char $csvilog->addDebug(JText::sprintf('COM_CSVI_USING_DELIMITER', $template->get('field_delimiter', 'general'))); // Check enclosure char $csvilog->addDebug(JText::sprintf('COM_CSVI_USING_ENCLOSURE', $template->get('text_enclosure', 'general'))); // Include column headers $use_header = ($template->get('include_column_headers', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_INCLUDE_HEADER', $use_header)); // Add signature $signature = ($template->get('signature', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_SIGNATURE', $signature)); // Export frontend $export_frontend = ($template->get('export_frontend', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FRONTEND', $export_frontend)); // Export state switch ($template->get('publish_state', 'general')) { case 'Y': $publish_state = JText::_('COM_CSVI_YES'); break; case 'N': $publish_state = JText::_('COM_CSVI_NO'); break; default: $publish_state = JText::_('COM_CSVI_ALL_STATES'); break; } $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_PUBLISH_STATE', $publish_state)); // Number of records to export $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_RECORD_START', $template->get('recordstart', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_RECORD_END', $template->get('recordend', 'general'))); // Record grouping $groupby = ($template->get('groupby', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_GROUPBY', $groupby)); // VirtueMart Item ID $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_VM_ITEMID', $template->get('vm_itemid', 'general'))); // Date format $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_DATE_FORMAT', $template->get('export_date_format', 'general'))); // Price format $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_DECIMALS', $template->get('export_price_format_decimal', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_DEC_SEP', $template->get('export_price_format_decsep', 'general'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_THOUSAND_SEP', $template->get('export_price_format_thousep', 'general'))); // Record grouping $add_currency = ($template->get('add_currency_to_price', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_ADD_CURRENCY_TO_PRICE', $add_currency)); // Exporting fields $export_fields = $jinput->get('export.fields', null, null); $addheader = true; foreach ($export_fields as $column_id => $field) { if ($addheader) $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_EXPORT_FIELD', $field->column_header)); if ($field->combine) $addheader = false; else $addheader = true; } } /** * Output the collected data * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return void * @since 3.0 */ private function _outputStart() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportfilename = $jinput->get('export.filename', null, 'string'); $result = false; if ($template->get('use_system_limits', 'limit')) { $csvilog->addDebug('Setting system limits:'); // Apply the new memory limits $csvilog->addDebug('Setting max_execution_time to '.$template->get('max_execution_time', 'limit').' seconds'); @ini_set('max_execution_time', $template->get('max_execution_time', 'limit')); $csvilog->addDebug('Setting memory_limit to '.$template->get('memory_limit', 'limit').'M'); if ($template->get('memory_limit', 'limit') == '-1') { $csvilog->addDebug('Setting memory_limit to '.$template->get('memory_limit', 'limit')); @ini_set('memory_limit', $template->get('memory_limit', 'limit')); } else { $csvilog->addDebug('Setting memory_limit to '.$template->get('memory_limit', 'limit').'M'); @ini_set('memory_limit', $template->get('memory_limit', 'limit').'M'); } } switch ($template->get('exportto', 'general', 'todownload')) { case 'todownload': if (preg_match('/Opera(\/| )([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])) { $UserBrowser = "Opera"; } elseif (preg_match('/MSIE ([0-9].[0-9]{1,2})/', $_SERVER['HTTP_USER_AGENT'])) { $UserBrowser = "IE"; } else { $UserBrowser = ''; } $mime_type = ($UserBrowser == 'IE' || $UserBrowser == 'Opera') ? 'application/octetstream' : 'application/octet-stream'; // Clean the buffer while( @ob_end_clean() ); header('Content-Type: ' . $mime_type); header('Content-Encoding: UTF-8'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); if ($UserBrowser == 'IE') { header('Content-Disposition: inline; filename="'.$exportfilename.'"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Content-Disposition: attachment; filename="'.$exportfilename.'"'); header('Pragma: no-cache'); } $result = true; break; case 'tofile': jimport('joomla.filesystem.folder'); // Check if the folder exists if (!JFolder::exists(dirname($exportfilename))) { if (!JFolder::create(dirname($exportfilename))) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_FOLDER', dirname($exportfilename))); $result = false; } } // open the file for writing $handle = @fopen($exportfilename, 'w+'); if (!$handle) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_OPEN_FILE', $exportfilename)); $result = false; } // Let's make sure the file exists and is writable first. if (is_writable($exportfilename)) { $jinput->set('handle', $handle); $result = true; } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_WRITE_FILE', $exportfilename)); $result = false; } break; case 'toftp': case 'toemail': // open the file for writing $handle = fopen($exportfilename, 'w+'); if (!$handle) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_OPEN_FILE', $exportfilename)); $result = false; } // Let's make sure the file exists and is writable first. if (is_writable($exportfilename)) { $jinput->set('handle', $handle); $result = true; } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_WRITE_FILE', $exportfilename)); $result = false; } break; case 'tofront': $result = true; break; } return $result; } /** * Write the output to download or to file * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $contents the content to output * @return bool true if data is output | false if data is not output * @since 3.0 */ protected function writeOutput() { // Let's take the local contents if nothing is supplied $contents = $this->_contents; // Clean the local contents $this->_contents = array(); if (!empty($contents)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportfilename = $jinput->get('export.filename', null, 'string'); if (!is_array($contents)) $contents = (array) $contents; switch ($template->get('exportto', 'general')) { case 'todownload': case 'tofront': if (isset($contents['signature'])) { echo $contents['signature']; unset($contents['signature']); } if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { echo implode("", $contents)."\r\n"; } else { echo implode($this->_field_delim, $contents)."\r\n"; } break; case 'tofile': case 'toftp': case 'toemail': if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { $writedata = ''; if (isset($contents['signature'])) { $writedata = $contents['signature']; unset($contents['signature']); } $writedata .= implode('', $contents); if (fwrite($jinput->get('handle', null, null), $writedata."\r\n") === FALSE) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_WRITE_FILE', $exportfilename)); return false; } } else { if (fwrite($jinput->get('handle', null, null), implode($this->_field_delim, $contents)."\r\n") === FALSE) { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_WRITE_FILE', $exportfilename)); return false; } } break; } } return true; } /** * Finalize export output * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return void * @since 3.0 */ private function _outputEnd() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $exportfilename = $jinput->get('export.filename', null, 'string'); jimport('joomla.filesystem.file'); switch ($template->get('exportto', 'general')) { case 'todownload': break; case 'tofile': $csvilog->AddStats('information', JText::sprintf('COM_CSVI_EXPORTFILE_CREATED', $exportfilename)); fclose($jinput->get('handle', null, null)); break; case 'toftp': // Close the file handle fclose($jinput->get('handle', null, null)); // Start the FTP jimport('joomla.client.ftp'); $ftp = JFTP::getInstance($template->get('ftphost', 'general', '', 'string'), $template->get('ftpport', 'general'), null, $template->get('ftpusername', 'general', '', 'string'), $template->get('ftppass', 'general', '', 'string')); $ftp->chdir($template->get('ftproot', 'general', '/', 'string')); $ftp->store($exportfilename); $ftp->quit(); // Remove the temporary file JFile::delete($exportfilename); $csvilog->AddStats('information', JText::sprintf('COM_CSVI_EXPORTFILE_CREATED', $exportfilename)); break; case 'toemail': fclose($jinput->get('handle', null, null)); $this->_getMailer(); // Add the email address $addresses = explode(',', $template->get('export_email_addresses', 'email')); foreach ($addresses as $address) { if (!empty($address)) $this->mailer->AddAddress($address); } $addresses_cc = explode(',', $template->get('export_email_addresses_cc', 'email')); if (!empty($addresses_cc)) { foreach ($addresses_cc as $address) { if (!empty($address)) $this->mailer->AddCC($address); } } $addresses_bcc = explode(',', $template->get('export_email_addresses_bcc', 'email')); if (!empty($addresses_bcc)) { foreach ($addresses_bcc as $address) { if (!empty($address)) $this->mailer->AddBCC($address); } } // Mail submitter $htmlmsg = ''.$this->_getRelToAbs($template->get('export_email_body', 'email')).''; $this->mailer->setBody($htmlmsg); $this->mailer->setSubject($template->get('export_email_subject', 'email')); // Add the attachemnt $this->mailer->AddAttachment($exportfilename); // Send the mail $sendmail = $this->mailer->Send(); if (is_a($sendmail, 'JException')) $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_MAIL_SEND', $sendmail->getMessage())); else $csvilog->AddStats('information', JText::_('COM_CSVI_MAIL_SEND')); // Clear the mail details $this->mailer->ClearAddresses(); // Remove the temporary file JFile::delete($exportfilename); $csvilog->AddStats('information', JText::sprintf('COM_CSVI_EXPORTFILE_CREATED', $exportfilename)); break; } } /** * Search through the export fields if a certain field is being exported * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $fieldname the fieldname to check if it is being exported * @return bool true if field is being exported | false if field is not being exported * @since 3.0 */ protected function searchExportFields($fieldname) { $jinput = JFactory::getApplication()->input; $exportfields = $jinput->get('export.fields', array(), 'array'); foreach ($exportfields as $column_id => $field) { if ($field->field_name == $fieldname) return true; } return false; } /** * Constructs a limit for a query * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return string the limit to apply to the query * @since 3.0 */ protected function getExportLimit() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $recordstart = $template->get('recordstart', 'general', 0, 'int'); $recordend = $template->get('recordend', 'general', 0, 'int'); $limits = array(); $limits['offset'] = 0; $limits['limit'] = 0; // Check if the user only wants to export some products if ($recordstart && $recordend) { // Check if both values are greater than 0 if (($recordstart > 0) && ($recordend > 0)) { // We have valid limiters, add the limit to the query // Recordend needs to have 1 deducted because MySQL starts from 0 $limits['offset'] = $recordend-1; $limits['limit'] = $recordstart; } } return $limits; } /** * Create an SQL filter * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $filter what kind of SQL type should be created * @param array $ignore an array of fields not to process * @param array $special an array of special fields not to nameQuote * @return string the SQL part to add to the query * @since 3.0 */ protected function getFilterBy($filter, $ignore=array(), $special=array()) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $export_fields = $jinput->get('export.fields', array(), 'array'); $fields = array(); // Add some basic fields never to be handled $ignore[] = 'custom'; // Collect the fields to process foreach ($export_fields as $column_id => $field) { switch ($filter) { case 'groupby': $process = true; break; case 'sort': $process = $field->sort; break; default: $process = false; } if ($process) { // Check if field needs to be skipped if (!in_array($field->field_name, $ignore)) { // Check if field is special if (!array_key_exists($field->field_name, $special)) { $fields[] = $db->quoteName($field->field_name); } else { $fields[] = $special[$field->field_name]; } } } } // Construct the SQL part if (!empty($fields)) { switch ($filter) { case 'groupby': $groupby_fields = array_unique($fields); $q = implode(',', $groupby_fields); break; case 'sort': $sort_fields = array_unique($fields); $q = implode(', ', $sort_fields); break; default: $q = ''; break; } } else $q = ''; return $q; } /** * Add a field to the output * * @copyright * @author RolandD * @todo * @see * @access protected * @param $combine boolean true if the fields need to be combined * @param $data string Data to output * @param $fieldname string Name of the field currently being processed * @param $column_header string Name of the column * @param $cdata boolean true to add cdata tag for XML|false not to add it * @return string containing the field for the export file * @since 3.0 */ protected function addExportField($combine=false, $data, $fieldname, $column_header, $cdata=false) { // Data is not going to be combined if (!$combine) { if (!empty($this->_outputfield)) { $this->_outputfield[] = $data; $data = implode(' ', $this->_outputfield); $this->_outputfield = array(); } $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); // Load the session $exportclass = $jinput->get('export.class', null, null); // Set the delimiters $this->_setDelimiters(); // Clean up the data by removing linebreaks $find = array("\r\n", "\r", "\n"); $replace = array('','',''); $data = str_ireplace($find, $replace, $data); if ($template->get('export_file', 'general') == 'xml' || $template->get('export_file', 'general') == 'html') { if (!is_null($this->_headername)) { $column_header = $this->_headername; $this->_headername = null; } $this->_contents[] = $exportclass->ContentText($data, $column_header, $fieldname, $cdata); } else { $data = str_replace($this->_text_delim, $this->_text_delim.$this->_text_delim, $data); $this->_contents[] = $this->_text_delim.$data.$this->_text_delim; } } // Combine with previous field else { if (is_null($this->_headername)) $this->_headername = $column_header; $this->_outputfield[] = $data; } } /** * Add data to the export content * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $content the content to export * @return * @since 3.0 */ protected function addExportContent($content) { $this->_contents[] = $content; } /** * Convert links in a text from relative to absolute * * @copyright * @author * @todo * @see * @access private * @param string $text the text to parse for links * @return string the parsed text * @since 3.0 */ private function _getRelToAbs($text) { $base = JURI::root(); $text = preg_replace("/(href|src)=\"(?!http|ftp|https|mailto)([^\"]*)\"/", '$1="$base\$2"', $text); return $text; } /** * Initialise the mailer object to start sending mails * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _getMailer() { $mainframe = Jfactory::getApplication(); jimport('joomla.mail.helper'); // Start the mailer object $this->mailer = JFactory::getMailer(); $this->mailer->isHTML(true); $this->mailer->From = $mainframe->getCfg('mailfrom'); $this->mailer->FromName = $mainframe->getCfg('sitename'); $this->mailer->AddReplyTo(array($mainframe->getCfg('mailfrom'), $mainframe->getCfg('sitename'))); } /** * Create a proxy for including other models * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _getModel($model) { return $this->getInstance($model, 'CsviModel'); } /** * Get the JoomFish translated value for a category name * * @copyright * @author RolandD * @todo * @see * @access private * @param int $category_id the category ID to find the translation for * @param string $default the default value to return if nothing found or JoomFish not used * @return string the JoomFish translated value * @since 3.0 */ protected function _getJoomFishCategory($category_id, $default='') { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); if ($template->get('use_joomfish', 'product', false)) { $q = "SELECT value FROM #__jf_content WHERE reference_table = 'vm_category' AND reference_field = 'category_name' AND language_id = ".$template->get('joomfish_language', 'product')." AND reference_id = ".$category_id; $db->setQuery($q); $csvilog->addDebug(JText::_('COM_CSVI_GET_CATEGORY_JF'), true); $category_name_jf = $db->loadResult(); if (empty($category_name_jf)) return $default; else return $category_name_jf; } else return $default; } } ?>PK>\Avb||models/importfile.phpnuW+A field default value */ private $_field_defaults = array(); /** @var array - Associative array of field_name (lower case) => field published? value */ private $_field_published = array(); /** @var integer the database ID for the vendor */ private $_vendor_id = null; /** @var bool sets if the default value should be used or not */ private $_skip_default_value = null; /** @var array contains a list of vendor currencies */ private $_vendor_currencies = array(); /** @var object contains the ICEcat helper */ private $_icecat = null; // Protected variables /** @var object contains the data to import */ protected $csvi_data = null; /** @var object contains the fields to import */ protected $_csvifields = null; /** @var array contains the available fields */ protected $_avfields = null; /** @var array contains the ICEcat data */ protected $icecat_data = null; /** @var array contains the fields to combine */ protected $combine_fields = array(); /** @var array contains the combine settings */ protected $combine_settings = array(); /** @var string contains the name of the last import field */ protected $_lastfield = null; /** * Compile a list of helper files needed to include * * @copyright * @author RolandD * @todo Make the image class loader smarter * @see * @access public * @param * @return array list of helper files to include * @since 3.0 */ public function getHelperFiles() { $jinput = JFactory::getApplication()->input; $data = $jinput->get('jform', array(), null); $helpers = array(); $upload_parts = array(); // Get the file extension of the import file switch (strtolower($data['general']['source'])) { case 'fromupload': $upload['name'] = $_FILES['jform']['name']['general']['import_file']; $upload['type'] = $_FILES['jform']['type']['general']['import_file']; $upload['tmp_name'] = $_FILES['jform']['tmp_name']['general']['import_file']; $upload['error'] = $_FILES['jform']['error']['general']['import_file']; if (isset($upload['name'])) $upload_parts = pathinfo($upload['name']); break; case 'fromserver': $upload_parts = pathinfo($data['general']['local_csv_file']); break; case 'fromurl': $upload_parts = pathinfo($data['general']['urlfile']); break; case 'fromftp': $upload_parts = pathinfo($data['general']['ftpfile']); break; } // Set the file helper if (!array_key_exists('extension', $upload_parts)) return false; else { switch ($upload_parts['extension']) { case 'xml': $helpers[] = $upload_parts['extension']; $fileclass = 'Xml'; break; case 'xls': $helpers[] = $upload_parts['extension']; $helpers[] = 'excel_reader2'; $fileclass = 'Xls'; break; case 'ods': $helpers[] = $upload_parts['extension']; $helpers[] = 'ods_reader'; $fileclass = 'Ods'; break; default: // Treat any unknown type as CSV $helpers[] = 'csv'; $fileclass = 'Csv'; break; } // Set the file class name $jinput->set('fileclass', $fileclass.'File'); // Do we need to load the image helper switch ($data['options']['operation']) { case 'productimport': case 'categoryimport': case 'mediaimport': $helpers[] = 'images'; break; } // Add the helpers to the session $session = JFactory::getSession(); $option = $jinput->get('option'); $session->set($option.'.helper_files', serialize($helpers)); return $helpers; } } /** * Make preparations for the import * * @copyright * @author RolandD * @todo Fix storing of log when file cannot be retrieved from FTP * @todo Fix the template name * @see * @access public * @param * @return bool true on file OK | false on file NOK * @since 3.0 */ public function getPrepareImport() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); // Get the form data $session = JFactory::getSession(); $option = $jinput->get('option'); $data = $jinput->get('jform', array(), null); // Set the template name $query = $db->getQuery(true); $query->select('name'); $query->from('#__csvi_template_settings'); $query->where('id = '.$jinput->get('select_template', '', null)); $db->setQuery($query); $data['template_name'] = $db->loadResult(); $template = new CsviTemplate($data); $jinput->set('template', $template); $session->set($option.'.global.template', serialize($template)); // Initiate the log $csvilog = new CsviLog(); $jinput->set('csvilog', $csvilog); // Create a new Import ID in the logger $csvilog->setId(); // Set to collect debug info $csvilog->setDebug($template->get('collect_debug_info', 'general')); // Retrieve the available fields $availablefields = $this->getModel('Availablefields'); $this->_avfields = $availablefields->getAvailableFields($template->get('operation', 'options'), $template->get('component', 'options')); $session->set($option.'.avfields', serialize($this->_avfields)); // Needed for file class $jinput->set('avfields', $this->_avfields); // Set some log info $csvilog->SetAction('import'); $csvilog->SetActionType($template->get('operation', 'options'), $template->get('template_name')); // Process the file to import if ($template->get('im_mac', 'general', false)) { // Auto detect line-endings to also support Mac line-endings ini_set('auto_detect_line_endings', true); } // Process the file to import $fileclass = $jinput->get('fileclass', null, null); $csvifile = new $fileclass; if ($csvifile->validateFile()) { $csvifile->processFile(); if (!$csvifile->fp) { return false; } else { // Load column headers if ($template->get('use_column_headers', 'general')) { $csvifile->loadColumnHeaders(); $session->set($option.'.csvicolumnheaders', serialize($jinput->get('columnheaders', array(), 'array'))); } else if ($template->get('skip_first_line', 'general')) { // Move 1 row forward as we are skipping the first line $csvifile->next(); } // Load the fields if ($this->_retrieveConfigFields($csvifile)) $session->set($option.'.csvifields', serialize($jinput->get('csvifields', null, 'array'))); else { JError::raiseNotice(0, JText::_('COM_CSVI_CANNOT_LOAD_FIELDS')); return false; } // Write out some import settings $this->_importDetails(); // Store the file position $session->set($option.'.filepos', serialize($csvifile->getFilePos())); // Empty the data first so we don't break the session $csvifile->clearData(); // Store the CSVI file handler $session->set($option.'.csvifile', serialize($csvifile)); // Store the CSVI log handler $session->set($option.'.csvilog', serialize($csvilog)); // Store the preview handler $session->set($option.'.csvipreview', serialize($template->get('show_preview', 'general'))); // Set the combine separator $this->combine_settings['separator'] = ' '; $this->combine_settings['fieldname'] = null; // Unpublish any products if needed if ($template->get('unpublish_before_import', 'product', 0)) $this->_unpublishProducts(); return true; } } else { return false; } } /** * Make preparations to do an import * * @copyright * @author RolandD * @todo Fix the setting of the file position on subsequent imports * @see finishProcess * @access public * @param * @return * @since 3.0 */ public function getDoImport() { $jinput = JFactory::getApplication()->input; // Set the system limits $this->_systemLimits(); // Open the file $csvifile = $jinput->get('csvifile', null, null); if ($csvifile->processFile()) { // Set the file pointer $session = JFactory::getSession(); $option = $jinput->get('option'); $csvifile->setFilePos(unserialize($session->get($option.'.filepos', 0))); // Set the line counter $jinput->set('currentline', 1); // Set the fields found in the file $this->_csvifields = $jinput->get('csvifields', null, 'array'); return true; } else return false; } /** * Start the import * * @copyright * @author RolandD * @todo Separate view for preview * @todo Rewrite memory usage for debug * @see * @access public * @param * @return * @since 3.0 */ public function getProcessData() { $jinput = JFactory::getApplication()->input; // Set some variables $data_preview = array(); $processdata = true; $redirect = false; // Load the log $csvilog = $jinput->get('csvilog', null, null); // Load the settings $settings = new CsviSettings(); // Load the template $template = $jinput->get('template', null, null); // Load the file $csvifile = $jinput->get('csvifile', null, null); // Set the table path $this->addTablePath(JPATH_COMPONENT_ADMINISTRATOR.'/tables/'.$template->get('component', 'options')); // Load the import routine $routine = $this->getModel($template->get('operation', 'options')); if ($routine) { // Start processing data while ($processdata) { // Pass the total log line to the logger $csvilog->setLinenumber(($jinput->get('currentline', 0, 'int')+$jinput->get('totalline', 0, 'int'))); // If the number of lines is set to 0, do unlimited import if (($settings->get('import.import_nolines', 0) == 0) || $jinput->get('cron', false, 'bool')) { $nolines = $jinput->get('currentline', 0, 'int')+1; } else $nolines = $settings->get('import.import_nolines'); if ($jinput->get('currentline', 0, 'int') <= $nolines) { // For XML files, it may be necessary to refresh the headers before reading the next record if ($csvifile->extension == 'xml' && $template->get('refresh_xml_headers', 'general')) { $csvifile->loadColumnHeaders(); if ($this->_retrieveConfigFields($csvifile) == false) { // Error found - Finish processing $redirect = $this->finishProcess(false); $processdata = false; continue; } } // Load the data $this->csvi_data = $csvifile->ReadNextLine(); if ($this->csvi_data == false) { if ($jinput->get('csvipreview', false, 'bool')) { // Set the headers $headers = array(); foreach ($this->_csvifields as $fieldname => $value) { if ($value['published']) { if (isset($routine->$fieldname) || empty($routine->$fieldname)) $headers[] = $fieldname; } } $jinput->set('headers_preview', $headers); // Set the data $jinput->set('data_preview', $data_preview); // Clean the session $this->getCleanPreview(); $processdata = false; continue; } else { // Finish processing $this->finishProcess(true); $processdata = false; } } else { // Check if we need to add any extra fields if (count($this->_csvifields) > count($this->csvi_data)) { foreach ($this->_csvifields as $fieldname => $details) { if (!array_key_exists($details['order'], $this->csvi_data)) { if (!empty($details['default_value'])) { $this->csvi_data[$details['order']] = $details['default_value']; } } } // Check if the fields are now equal if (count($this->_csvifields) > count($this->csvi_data)) { $message = JText::sprintf('COM_CSVI_INCORRECT_COLUMN_COUNT', count($this->_csvifields), count($this->csvi_data)); $message .= '
'.JText::_('COM_CSVI_FIELDS').'
'; $message .= ''; $message .= ''; foreach($this->_csvifields as $fieldname => $field_details) { $message .= ''; } $message .= '
PositionConfigurationImport file
'.$field_details['order'].''.$fieldname.''; if (isset($this->csvi_data[$field_details['order']])) $message .= $this->csvi_data[$field_details['order']]; $message .= '
'; $csvilog->AddStats('incorrect', $message, true); // Finish processing $this->finishProcess(true); $processdata = false; } } // Load ICEcat data if user wants to $this->getIcecat(); // Validate the fields $csvi_data = new JObject(); foreach ($this->_csvifields as $name => $details) { if ($details['published']) { $datafield = $this->validateInput($details['name'], $details['replace']); if ($datafield !== false) { // Check if we are dealing with the last field if ($details == $this->_lastfield) $details['combine'] = false; // See if we are combining the field if ($details['combine']) $this->setCombineField($datafield, $name); else { // Check if there are any fields to be combined if (!empty($this->combine_fields)) { // Get the fieldname the combine is for $name = $this->combine_settings['fieldname']; // Add the current data $this->setCombineField($datafield); // Get the combined data $datafield = $this->getCombineField(); } } // Set the new value $csvi_data->$name = $datafield; } } } $jinput->set('csvi_data', $csvi_data); if ($this->_checkLimits()) { // Notify the debug log what line we are one $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_PROCESS_LINE', ($jinput->get('currentline', 0, 'int')+$jinput->get('totalline', 0, 'int')))); // Start processing record if ($routine->getStart()) { if ($jinput->get('csvipreview', false, 'bool')) { $this->loadSettings(); // Update preview data foreach ($this->_csvifields as $fieldname => $value) { if ($value['published']) { if (isset($routine->$fieldname)) $preview_data[$value['order']] = $routine->$fieldname; else if (empty($routine->$fieldname)) $preview_data[$value['order']] = ''; } } $data_preview[$jinput->get('currentline', 0, 'int')] = $preview_data; if ($jinput->get('currentline', 0, 'int') == $settings->get('import.import_preview', 5)) { // Set the headers $headers = array(); foreach ($this->_csvifields as $fieldname => $value) { if ($value['published']) { if (isset($routine->$fieldname) || empty($routine->$fieldname)) $headers[] = $fieldname; } } $jinput->set('headers_preview', $headers); // Set the data $jinput->set('data_preview', $data_preview); // Clean the session $this->getCleanPreview(); $processdata = false; continue; } } else { // Now we import the rest of the records $routine->getProcessRecord(); } // Increase the number of records processed $jinput->set('recordsprocessed', $jinput->get('recordsprocessed', 0, 'int')+1); } else { // The routine reports a problem, usually unmet conditions // Finish processing $this->finishProcess(true); // Stop from processing any further, no time left $processdata = false; } // Increase linenumber $jinput->set('currentline', $jinput->get('currentline', 0, 'int')+1); } else { // Finish processing $this->finishProcess(false); // Stop from processing any further, no time left $processdata = false; } } } // Prepare for page reload else { // Finish processing $this->finishProcess(false); // Stop from processing any further, no time left $processdata = false; } } // Post Processing if (method_exists($routine, 'getPostProcessing')) { $routine->getPostProcessing(array_keys($this->_csvifields)); } } else { $csvilog->AddStats('incorrect', 'COM_CSVI_NO_VALID_CLASS_FOUND'); // Finish processing $this->finishProcess(true); } } /** * Clean the session * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function getCleanSession() { $jinput = JFactory::getApplication()->input; // Store the log results first $log = $this->getModel('log'); $log->getStoreLogResults(); // Get session handler $session = JFactory::getSession(); $option = $jinput->get('option'); // Unset all session values $session->clear($option.'.csvicolumnheaders'); $session->clear($option.'.csvifields'); $session->clear($option.'.avfields'); $session->clear($option.'.csvifile'); $session->clear($option.'.filepos'); $session->clear($option.'.recordsprocessed'); $session->clear($option.'.template_id'); $session->clear($option.'.totalline'); $session->clear($option.'.csvilog'); $session->clear($option.'.global.template'); $session->clear($option.'.csvisettings'); $session->clear($option.'.helper_files'); } /** * Clean the session after preview * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ private function getCleanPreview() { $jinput = JFactory::getApplication()->input; // Get session handler $session = JFactory::getSession(); $option = $jinput->get('option'); // Load the correct position if ($jinput->get('csvipreview', false, 'bool')) { $template = $jinput->get('template', null, null); $csvifile = $jinput->get('csvifile', null, null); // Move back to the beginning $csvifile->rewind(); // Move 1 row forward as this is the column header if ($template->get('use_column_headers', 'general') || $template->get('skip_first_line', 'general')) { $csvifile->next(true); } // Get the current position $filepos = $csvifile->getFilePos(); } else $filepos = 0; // Unset all session values $session->set($option.'.filepos', serialize($filepos)); $session->set($option.'.recordsprocessed', serialize(0)); $session->set($option.'.csvipreview', serialize(false)); } /** * Sets the system limits to user defined values * * Sets the system limits to user defined values to allow for longer and * bigger uploaded files * * @copyright * @author RolandD * @todo Allow 0 or -1 value * @see * @access private * @param * @return * @since 3.0 */ private function _systemLimits() { $jinput = JFactory::getApplication()->input; // Set the start time of the script $this->_starttime = time(); // Get the logger $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // See if we need to use the new limits if ($template->get('use_system_limits', 'limit')) { $csvilog->addDebug('Setting system limits:'); // Apply the new memory limits $execution_time = $template->get('max_execution_time'); if (strlen($exection_time) > 0) { $csvilog->addDebug('Setting max_execution_time to '.$execution_time.' seconds'); @ini_set('max_execution_time', $execution_time); } $memory_limit = $template->get('memory_limit', 'limit'); if ($memory_limit == '-1') { $csvilog->addDebug('Setting memory_limit to '.$memory_limit); @ini_set('memory_limit', $memory_limit); } else if (strlen($memory_limit) > 0) { $csvilog->addDebug('Setting memory_limit to '.$memory_limit.'M'); @ini_set('memory_limit', $memory_limit.'M'); } $post_size = $template->get('post_max_size', 'limit'); if (strlen($post_size) > 0) { $csvilog->addDebug('Setting post_max_size to '.$post_size.'M'); @ini_set('post_max_size', $post_size.'M'); } $file_size = $template->get('upload_max_filesize', 'limit'); if (strlen($file_size) > 0) { $csvilog->addDebug('Setting upload_max_filesize to '.$file_size.'M'); @ini_set('upload_max_filesize', $file_size.'M'); } } } /** * Function to check if execution time is going to be passed. * * Memory can only be checked if the function memory_get_usage is available. * If the function is not available always return true. This could lead to * out of memory failure. * * @copyright * @author RolandD * @todo * @see http://www.php.net/memory_get_usage * @access private * @param * @return bool true when limits are not reached|false when limit is reached * @since 3.0 */ private function _checkLimits() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Check for maximum execution time $timepassed = time() - $this->_starttime; if (($timepassed + 5) > ini_get('max_execution_time') && ini_get('max_execution_time') > 0) { $csvilog->AddStats('information', JText::sprintf('COM_CSVI_MAXIMUM_EXECUTION_LIMIT_EXCEEDED', $timepassed)); return false; } // Check for maximum memory usage if (!function_exists('memory_get_usage')) return true; else { // Get the size of the statistics $statslength = 0; if (isset($csvilog->stats)) { foreach ($csvilog->stats as $type => $value) { if (isset($value['message'])) $statslength += strlen($value['message']); } } $statslength = round($statslength/(1024*1024)); // Get the size of the debug message $debuglength = round(strlen($csvilog->debug_message)/(1024*1024)); // Get the size of the active memory in use $activelength = round(memory_get_usage()/(1024*1024)); // Combine memory limits $totalmem = $activelength + $statslength + $debuglength; // Set the memory limit $jinput->set('maxmem', $totalmem); // Check if we are passing the memory limit if (($totalmem * 1.5) > (int)ini_get('memory_limit')) { $csvilog->AddStats('information', JText::_('COM_CSVI_MAXIMUM_MEMORY_LIMIT_EXCEEDED', $totalmem)); return false; } // All is good return true return true; } } /** * Print out import details * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _importDetails() { $jinput = JFactory::getApplication()->input; // Get the logger $csvilog = $jinput->get('csvilog', null, null); // Get the template settings to see if we need a preview $template = $jinput->get('template', null, null); $csvilog->addDebug(JText::_('COM_CSVI_CSVI_VERSION_TEXT').JText::_('COM_CSVI_CSVI_VERSION')); if (function_exists('phpversion')) $csvilog->addDebug(JText::sprintf('COM_CSVI_PHP_VERSION', phpversion())); // General settings $csvilog->addDebug(JText::_('COM_CSVI_GENERAL_SETTINGS')); // Show which template is used $csvilog->addDebug(JText::sprintf('COM_CSVI_TEMPLATE_NAME', $template->get('template_name'))); // Auto detect delimiters $auto_detect = ($template->get('auto_detect_delimiters', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_AUTO_DETECT_DELIMITERS', $auto_detect)); if ($auto_detect == JText::_('COM_CSVI_NO')) { // Check delimiter char $csvilog->addDebug(JText::sprintf('COM_CSVI_USING_DELIMITER', $template->get('field_delimiter', 'general'))); // Check enclosure char $csvilog->addDebug(JText::sprintf('COM_CSVI_USING_ENCLOSURE', $template->get('text_enclosure', 'general'))); } // Show import settings // Show template type $csvilog->addDebug(JText::sprintf('COM_CSVI_CHOSEN_IMPORT_TYPE', JText::_('COM_CSVI_'.$template->get('operation', 'options')))); // Use column headers as configuration $use_header = ($template->get('use_column_headers', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_USE_HEADER', $use_header)); // Refresh xml headers for every record $refresh_xml_headers = ($template->get('refresh_xml_headers', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_REFRESH_XML_HEADER', $use_header)); // Skip first line $skip_first = ($template->get('skip_first_line', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_SKIP_FIRST_LINE', $skip_first)); // Ignore non-existing products $ignore_non_exist = ($template->get('ignore_non_exist', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_IGNORE_NON_EXIST', $ignore_non_exist)); // Overwrite existing data $overwrite = ($template->get('overwrite_existing_data', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_OVERWRITE_EXISTING_DATA', $overwrite)); // Skip default value $skip_default = ($template->get('skip_default_value', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_SKIP_DEFAULT_VALUE', $skip_default)); // Show preview $use_preview = ($template->get('show_preview', 'general')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_USING_PREVIEW', $use_preview)); // Products // Unpublish products before import $unpublish = ($template->get('unpublish_before_import', 'product')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_UNPUBLISH_BEFORE_IMPORT', $unpublish)); // Categories // Append categories $append_cats = ($template->get('append_categories', 'product')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_APPEND_CATEGORIES', $append_cats)); // Images // General options $process_image = ($template->get('process_image', 'image', false)) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_PROCESS_IMAGE', $process_image)); // Create image name $create_name = ($template->get('auto_generate_image_name', 'image')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_CREATE_IMAGE_NAME', $create_name)); // Generate image name $csvilog->addDebug(JText::sprintf('COM_CSVI_IMAGE_BASED_ON', $template->get('type_generate_image_name', 'image'))); // Image name format $csvilog->addDebug(JText::sprintf('COM_CSVI_IMAGE_NAME_FORMAT', $template->get('auto_generate_image_name_ext', 'image'))); // Full image // Convert image $csvilog->addDebug(JText::sprintf('COM_CSVI_CONVERT_IMAGE', $template->get('convert_type', 'image'))); // Save images on server $on_server = ($template->get('save_images_on_server', 'image')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_SAVE_IMAGES_ON_SERVER', $on_server)); // Thumbnail image // Automatic thumbnail creation $auto_thumb = ($template->get('thumb_create', 'image')) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); $csvilog->addDebug(JText::sprintf('COM_CSVI_AUTOMATIC_THUMBS', $auto_thumb)); if ($auto_thumb == JText::_('COM_CSVI_YES')) { // Thumbnail format $csvilog->addDebug(JText::sprintf('COM_CSVI_FORMAT_THUMBS', $template->get('thumb_extension', 'image'))); // Thumbnail width x height $csvilog->addDebug(JText::sprintf('COM_CSVI_DIMENSION_THUMBS', $template->get('thumb_width', 'image'), $template->get('thumb_height', 'image'))); } // Show the file paths $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_FILE_PATH_PRODUCT_IMAGES', $template->get('file_location_product_images', 'path'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_FILE_PATH_CATEGORY_IMAGES', $template->get('file_location_category_images', 'path'))); $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_FILE_PATH_MEDIA', $template->get('file_location_media', 'path'))); // Show the max execution time $csvilog->addDebug(JText::sprintf('COM_CSVI_DEBUG_MAX_EXECUTION_TIME', ini_get('max_execution_time'))); } /** * Unpublish products before import * * @copyright * @author RolandD * @todo * @see prepareImport() * @access private * @param * @return * @since 3.0 */ private function _unpublishProducts() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->update('#__virtuemart_products'); $query->set('published = 0'); $db->setQuery($query); if ($db->query()) $csvilog->addDebug(JText::_('COM_CSVI_PRODUCT_UNPUBLISH_BEFORE_IMPORT')); else $csvilog->addDebug(JText::_('COM_CSVI_COULD_NOT_UNPUBLISH_BEFORE_IMPORT'), true); } /** * Builds arrays of field names and default values to be used during the creation of the headers list * The creation of the headers from the data file may need to be carried out for every row when processing * XML files and so efficiency is important for performance. * * Note: The array supported_fields should not be used as the basis for these arrays because it is a list of * all available fields and some of these fields may not be mapped in the template. */ public function _fieldArrays() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $db = JFactory::getDBO(); $this->_supportedfields = array(); $this->_field_defaults = array(); $this->_field_published = array(); if ($template->get('use_column_headers', 'general')) { // Check if there are any avfields if (empty($this->_avfields)) { $option = $jinput->get('option'); $session = JFactory::getSession(); $this->_avfields = unserialize($session->get($option.'.avfields')); } $supportedfields = array_flip($this->_avfields); foreach ($supportedfields as $name => $value) { $this->_supported_fields[] = $name; $this->_field_defaults[strtolower($name)] = null; $this->_field_published[strtolower($name)] = 1; } } // Use the template fields assigned to the template else { $import_fields = $template->get('import_fields'); if (isset($import_fields['_selected_name'])) { $count = count($import_fields['_selected_name']); for ($rows = 0; $rows < $count; $rows++) { $this->_supported_fields[] = $import_fields['_selected_name'][$rows]; $this->_field_defaults[strtolower($import_fields['_selected_name'][$rows])] = $import_fields['_default_value'][$rows]; $this->_field_published[strtolower($import_fields['_selected_name'][$rows])] = $import_fields['_process_field'][$rows]; } } } // Create the inverted array used to lookup the field name using lowercase $this->_supportedfields = array(); foreach( $this->_supported_fields as $key => $value ) { $this->_supportedfields[strtolower($value)] = $key; } } /** * Get the configuration fields the user wants to use * * The configuration fields can be taken from the uploaded file or from * the database. Depending on the template settings. * * @copyright * @author RolandD * @todo Expand the no support fields message on line 398 * @see Templates() * @access private * @param * @return bool true|false true when there are config fields|false when there are no or unsupported fields * @since 3.0 */ private function _retrieveConfigFields($csvifile=false) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $template = $jinput->get('template', null, null); $csvilog = $jinput->get('csvilog', null, null); if (!$csvifile) $csvifile = $jinput->get('csvifile', '', 'string'); if (empty($this->_supportedfields)) $this->_fieldArrays(); $columnheaders = $jinput->get('columnheaders', array(), 'array'); $csvifields = array(); $nosupport = array(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_LOAD_CONFIG_FIELDS')); if ($template->get('use_column_headers', 'general')) { // The user has column headers in the file $jinput->set('error_found', false); if ($columnheaders) { foreach ($columnheaders as $order => $name) { // Trim the name in case the name contains any preceding or trailing spaces $name = strtolower(trim($name)); // Check if the fieldname is supported // No special field checking for Product Type Names upload if (array_key_exists($name, $this->_supportedfields)) { $csvilog->addDebug('Field: '.$name); $mixed_name = $this->_supported_fields[$this->_supportedfields[$name]]; $csvifields[$mixed_name]['name'] = $mixed_name; $csvifields[$mixed_name]['order'] = $order; $csvifields[$mixed_name]['default_value'] = (array_key_exists($name, $this->_field_defaults)) ? $this->_field_defaults[$name] : null; $csvifields[$mixed_name]['published'] = (array_key_exists($name, $this->_field_published)) ? $this->_field_published[$name] : 'Y'; $csvifields[$mixed_name]['combine'] = false; $csvifields[$mixed_name]['replace'] = null; } else { // Check if the user has any field that is not supported if (strlen($name) == 0) $name = JText::_('COM_CSVI_FIELD_EMPTY'); // Field is not supported, let's skip it $csvifields[$name]['name'] = $name; $csvifields[$name]['order'] = $order; $csvifields[$name]['default_value'] = null; $csvifields[$name]['published'] = 'N'; $csvifields[$name]['combine'] = false; $csvifields[$name]['replace'] = null; // Unset the column header so we can check if any fields are left over unset($columnheaders[$order]); // Collect the fieldnames to report them $nosupport[] = $name; } } //if (empty($columnheaders)) { // $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_COLUMN_HEADERS_FOUND')); // $jinput->set('error_found', true); // return false; //} if (!empty($nosupport)) { // Ensure the error message matches the file type switch($csvifile->extension) { case 'xml': case 'sql': $csvilog->AddStats('nosupport', implode(',', $nosupport).JText::_('COM_CSVI_FIELD_NOT_INCLUDED')); break; default: $csvilog->AddStats('nosupport', JText::sprintf('COM_CSVI_NO_SUPPORT', '
  • '.implode('
  • ', $nosupport).'
')); break; } $csvilog->AddStats('information', JText::_('COM_CSVI_UNSUPPORTED_FIELDS')); } $csvilog->addDebug(JText::_('COM_CSVI_USING_FILE_FOR_CONFIGURATION')); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_COLUMN_HEADERS_FOUND')); $jinput->set('error_found', true); return false; } } // Use the fields assigned to the template else { $fields = $template->get('import_fields'); if (!empty($fields)) { foreach ($fields['_selected_name'] as $fid => $name) { // Check if we are handling a combine field if ($name == 'combine') $name .= $fid; // Collect the data $csvifields[$name]['name'] = $name; $csvifields[$name]['order'] = $fid; $csvifields[$name]['default_value'] = $fields['_default_value'][$fid]; $csvifields[$name]['published'] = $fields['_process_field'][$fid]; $csvifields[$name]['combine'] = $fields['_combine_field'][$fid]; $csvifields[$name]['replace'] = $fields['_replace_field'][$fid]; if (!$csvifields[$name]['published']) $name .= ' ('.JText::_('COM_CSVI_FIELD_SKIPPED').')'; $csvilog->addDebug(JText::sprintf('COM_CSVI_IMPORT_FIELD', $name)); } $csvilog->addDebug(JText::_('COM_CSVI_USE_DATABASE_FOR_CONFIGURATION')); } else { $csvilog->AddStats('incorrect', JText::_('NO_COLUMN_HEADERS_FOUND')); return false; } } // Make the fields to process global $jinput->set('csvifields', $csvifields); return true; } /** * Handle the end of the import * * @copyright * @author RolandD * @todo Optimize adding ID to session * @see * @access private * @param * @return * @since 3.0 */ public function finishProcess($finished=false) { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $csvifile = $jinput->get('csvifile', null, null); $csvilog = $jinput->get('csvilog', null, null); // Adjust the current line, since it is not processing $jinput->set('currentline', $jinput->get('currentline', 0, 'int')-1); // Session init $session = JFactory::getSession(); $option = $jinput->get('option'); if ($finished) { // Close the file if (is_object($csvifile)) $csvifile->closeFile(true); // Clean the session $this->getCleanSession(); // Add the ID to the session as we need it for the redirect to the result page $session->set($option.'.run_id', $csvilog->getId()); $jinput->set('run_id', $csvilog->getId()); } else { // Flush the log details // Store the log results first $log = $this->getModel('log'); $log->getStoreLogResults(); // Create session variables $session->set($option.'.global.template', serialize($template)); $session->set($option.'.csvicolumnheaders', serialize($jinput->get('columnheaders', null, 'array'))); $session->set($option.'.csvifields', serialize($this->_csvifields)); $session->set($option.'.csvifile', serialize($csvifile)); $session->set($option.'.csvilog', serialize($csvilog)); $session->set($option.'.filepos', serialize($csvifile->getFilePos())); $session->set($option.'.recordsprocessed', serialize($jinput->get('recordsprocessed', 0, 'int'))); $session->set($option.'.totalline', serialize($jinput->get('currentline', 0, 'int') + $jinput->get('totalline', 0, 'int'))); // Close the file $csvifile->closeFile(false); } } /** * Create a proxy for including other models * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function getModel($model) { return $this->getInstance($model, 'CsviModel'); } /** * Load some settings we need for the functions * This will make the data available to the child product * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ protected function loadSettings() { $jinput = JFactory::getApplication()->input; // Load the settings $template = $jinput->get('template', null, null); $this->_avfields = $jinput->get('avfields', array(), 'array'); $this->_skip_default_value = $template->get('skip_default_value', 'general'); // Set the last field, needed for the combine function $this->_lastfield = end($jinput->get('csvifields', array(), 'array')); } /** * Load the data to import * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.4 */ protected function loadData() { $jinput = JFactory::getApplication()->input; $this->csvi_data = $jinput->get('csvi_data', null, null); } /** * Get the product currency from the vendor * * If the user does not use product currency we take the one from the current vendor * * @copyright * @author RolandD * @todo * @see * @access private * @param integer $vendor_id the database ID of the vendor * @return string the 3 letter product currency * @since 3.0 */ protected function productCurrency($vendor_id) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PRODUCT_CURRENCY')); if (array_key_exists($vendor_id, $this->_vendor_currencies)) { $product_currency = strtoupper($this->_vendor_currencies[$vendor_id]); } else { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('vendor_currency'); $query->from('#__virtuemart_vendors'); $query->where('virtuemart_vendor_id = '.$vendor_id); $db->setQuery($query); $product_currency = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_PRODUCT_CURRENCY'), true); // Add the vendor currency to the cache $this->_vendor_currencies[$vendor_id] = $product_currency; } return $product_currency; } /** * Validate input data * * Checks if the field has a value, if not check if the user wants us to * use the default value * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $fieldname the fieldname to validate * @param int $replaceid the ID of the replacement rule * @return true returns validated value | return false if the column count does not match * @since */ protected function validateInput($fieldname, $replaceid=null) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $newvalue = ''; // Check if the user wants ICEcat data if ($template->get('use_icecat', 'product', false, 'bool') && !empty($this->icecat_data) && (array_key_exists($fieldname, $this->icecat_data))) { $csvilog->addDebug(JText::sprintf('COM_CSVI_USE_ICECAT_FIELD', $fieldname)); $newvalue = $this->icecat_data[$fieldname]; } else if (isset($this->_csvifields[$fieldname])) { // Check if the field has a value if (array_key_exists($this->_csvifields[$fieldname]["order"], $this->csvi_data) && strlen($this->csvi_data[$this->_csvifields[$fieldname]["order"]]) > 0) { $csvilog->addDebug(JText::_('COM_CSVI_USE_FIELD_VALUE')); $newvalue = trim($this->csvi_data[$this->_csvifields[$fieldname]["order"]]); } // Field has no value, check if we can use default value else if (!$this->_skip_default_value) { $csvilog->addDebug(JText::_('COM_CSVI_USE_DEFAULT_VALUE')); $newvalue = $this->_csvifields[$fieldname]["default_value"]; } else { $csvilog->addDebug(JText::_('COM_CSVI_USE_NO_VALUE')); return ''; } } else return false; // Replace the value and return if (!empty($newvalue) && !empty($replaceid)) return CsviHelper::replaceValue($replaceid, $newvalue); else return $newvalue; } /** * Replace commas with periods for correct DB insertion of the prices * * @copyright * @author RolandD * @todo Handle multiple separators by removing them * @see * @access protected * @param string $value the value to clean up * @return string the cleaned up value with dots as separator * @since 3.0 */ protected function toPeriod($value) { $clean = str_replace(",", ".", $value); $lastpos = strrpos($clean, '.'); return str_replace('.', '' , substr($clean, 0, $lastpos)).substr($clean, $lastpos); } /** * Format a datetime format * * Format of the date is day/month/year or day-month-year. * * @copyright * @author RolandD * @todo use JDate * @see * @access protected * @param string $date the date to convert * @return integer UNIX timestamp if date is valid otherwise return 0 * @since */ protected function convertDate($date) { $new_date = preg_replace('/-|\./', '/', $date); $date_parts = explode('/', $new_date); if ((count($date_parts) == 3) && ($date_parts[0] > 0 && $date_parts[0] < 32 && $date_parts[1] > 0 && $date_parts[1] < 13 && (strlen($date_parts[2]) == 4))) { $old_date = mktime(0,0,0,$date_parts[1],$date_parts[0],$date_parts[2]); } else $old_date = 0; $date = JFactory::getDate($old_date); return $date->toMySQL(); } /** * Add the query statistics to the log * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function queryResult() { $db = JFactory::getDBO(); return substr($db->getQuery(), 0, strpos($db->getQuery(),' ')); } /** * Clean up a price to only exist of numbers * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $price the price to clean * @return float cleaned up price * @since */ protected function cleanPrice($price) { return JFilterInput::clean($this->toPeriod($price), 'float'); } /** * Load the ICEcat data for a product * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function getIcecat() { $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); if ($template->get('use_icecat', 'product')) { $csvilog = $jinput->get('csvilog', null, null); // Load the ICEcat helper if (is_null($this->_icecat)) $this->_icecat = new IcecatHelper(); // Clean the data holder $this->icecat_data = null; // Check conditions // 1. Do we have an MPN $mpn = $this->validateInput($template->get('mpn_column_name', 'product', 'product_sku')); if ($mpn) { $csvilog->addDebug(JText::sprintf('COM_CSVI_ICECAT_FOUND_REFERENCE', $mpn)); // 2. Do we have a manufacturer name $mf_name = $this->validateInput('manufacturer_name'); $csvilog->addDebug(JText::sprintf('COM_CSVI_ICECAT_FOUND_MF_NAME', $mf_name)); if ($mf_name) { // Load the ICEcat data $this->icecat_data = $this->_icecat->getData($mpn, $mf_name); } else { $csvilog->addDebug(JText::_('COM_CSVI_ICECAT_NO_MANUFACTURER')); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_ICECAT_NO_REFERENCE')); return false; } } return false; } /** * Set a field to combine * * @copyright * @author RolandD * @todo * @see * @access protected * @param string $data the data to be combined * @param string $fieldname the name of the current field * @return * @since 3.0 */ protected function setCombineField($data, $fieldname=null) { if (!empty($data)) { // Add the data to the array $this->combine_fields[] = $data; // Set the fieldname the data is for if (empty($this->combine_settings['fieldname'])) $this->combine_settings['fieldname'] = $fieldname; switch ($fieldname) { case 'category_path': $jinput = JFactory::getApplication()->input; $template = $jinput->get('template', null, null); $this->combine_settings['separator'] = $template->get('category_separator', 'general', '/'); break; } } } /** * Get the combined fields * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return string the space separated combined data * @since 3.0 */ protected function getCombineField() { // Get the combined data $data = implode($this->combine_settings['separator'], $this->combine_fields); // Empty some settings $this->combine_fields = array(); $this->combine_settings['fieldname'] = null; $this->combine_settings['separator'] = ' '; // Return the data return $data; } }PK>\]Lmodels/about.phpnuW+AgetValue('config.tmp_path'), '/'); $folders = array(); $root = JPath::clean(JPATH_ROOT, '/'); $folders[$tmp_path] = JFolder::exists($tmp_path); $folders[CSVIPATH_TMP] = JFolder::exists(CSVIPATH_TMP); $folders[CSVIPATH_DEBUG] = JFolder::exists(CSVIPATH_DEBUG); return $folders; } /** * Create missing folders * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function createFolder() { $app = JFactory::getApplication(); jimport('joomla.filesystem.folder'); $folder = str_ireplace(JPATH_ROOT, '', JRequest::getVar('folder')); return JFolder::create($folder); } } ?>PK>\4umodels/maintenance.phpnuW+Ainput; // Start the log $csvilog = new CsviLog(); $import_id = $csvilog->setId(); $csvilog->SetAction('Maintenance'); $csvilog->SetActionType($jinput->get('task').'_LABEL'); $jinput->set('import_id', $import_id); $jinput->set('csvilog', $csvilog); } /** * Finish up maintenance * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function getFinishProcess() { // Load the session data $jinput = JFactory::getApplication()->input; // See if we have the csvilog $csvilog = $jinput->get('csvilog', null, null); // If not, then check the session if (empty($csvilog)) { $session = JFactory::getSession(); $option = $jinput->get('option'); $csvilog = unserialize($session->get($option.'.csvilog')); $jinput->set('csvilog', $csvilog); } // Store the log $model_log = $this->getModel('log'); $model_log->getStoreLogResults(); } /** * Create a proxy for including other models * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function getModel($model) { return $this->getInstance($model, 'CsviModel'); } /** * Empty VirtueMart tables * * @copyright * @author RolandD * @todo Write out product type tables that get deleted * @see * @access public * @param * @return * @since 3.0 */ public function getEmptyDatabase() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $linenumber = 1; jimport('joomla.language.helper'); $languages = array_keys(JLanguageHelper::getLanguages('lang_code')); $tables = $db->getTableList(); // Empty all the necessary tables $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_products`;"; $db->setQuery($q); $csvilog->addDebug('Empty product table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_TABLE_HAS_NOT_BEEN_EMPTIED')); foreach ($languages as $language) { $table = $db->getPrefix().'virtuemart_products_'.strtolower(str_replace('-', '_', $language)); if (in_array($table, $tables)) { $q = "TRUNCATE TABLE ".$db->quoteName($table).";"; $db->setQuery($q); $csvilog->addDebug('Empty product language table', true); if ($db->query()) $csvilog->AddStats('empty', JText::sprintf('COM_CSVI_PRODUCT_LANGUAGE_TABLE_HAS_BEEN_EMPTIED', $language)); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCT_LANGUAGE_TABLE_HAS_NOT_BEEN_EMPTIED', $language)); } } $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_categories`;"; $db->setQuery($q); $csvilog->addDebug('Empty product category link table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_CATEGORY_LINK_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_CATEGORY_LINK_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_customfields`;"; $db->setQuery($q); $csvilog->addDebug('Empty product custom fields table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_CUSTOMFIELDS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_CUSTOMFIELDS_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_downloads`;"; $db->setQuery($q); $csvilog->addDebug('Empty product downloads table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_DOWNLOADS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_DOWNLOADS_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_manufacturers`;"; $db->setQuery($q); $csvilog->addDebug('Empty product manufacturer link table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_MANUFACTURER_LINK_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_MANUFACTURER_LINK_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_medias`;"; $db->setQuery($q); $csvilog->addDebug('Empty product medias table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_MEDIAS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_MEDIAS_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_prices`;"; $db->setQuery($q); $csvilog->addDebug('Empty product price table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_PRICE_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_PRICE_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_relations`;"; $db->setQuery($q); $csvilog->addDebug('Empty product relations table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_RELATIONS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_RELATIONS_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_product_shoppergroups`;"; $db->setQuery($q); $csvilog->addDebug('Empty product shoppergroups table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_PRODUCT_SHOPPERGROUPS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_PRODUCT_SHOPPERGROUPS_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_categories`;"; $db->setQuery($q); $csvilog->addDebug('Empty category table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_CATEGORY_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CATEGORY_TABLE_HAS_NOT_BEEN_EMPTIED')); foreach ($languages as $language) { $table = $db->getPrefix().'virtuemart_categories_'.strtolower(str_replace('-', '_', $language)); if (in_array($table, $tables)) { $q = "TRUNCATE TABLE ".$db->quoteName($table).";"; $db->setQuery($q); $csvilog->addDebug('Empty category language table', true); if ($db->query()) $csvilog->AddStats('empty', JText::sprintf('COM_CSVI_CATEGORY_LANGUAGE_TABLE_HAS_BEEN_EMPTIED', $language)); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CATEGORY_LANGUAGE_TABLE_HAS_NOT_BEEN_EMPTIED', $language)); } } $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_category_categories`;"; $db->setQuery($q); $csvilog->addDebug('Empty category link table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_CATEGORY_LINK_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CATEGORY_LINK_TABLE_HAS_NOT_BEEN_EMPTIED')); $csvilog->setLinenumber($linenumber++); $q = "TRUNCATE TABLE `#__virtuemart_category_medias`;"; $db->setQuery($q); $csvilog->addDebug('Empty category medias table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_CATEGORY_MEDIAS_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CATEGORY_MEDIAS_TABLE_HAS_NOT_BEEN_EMPTIED')); // Get the lowest manufacturer ID $q = "SELECT MIN(virtuemart_manufacturer_id) AS mf_id FROM ".$db->quoteName('#__virtuemart_manufacturers'); $db->setQuery($q); $mf_id = $db->loadResult(); // Delete anything higher than the lowest ID $csvilog->setLinenumber($linenumber++); $q = "DELETE FROM `#__virtuemart_manufacturers` WHERE virtuemart_manufacturer_id > ".$mf_id; $db->setQuery($q); $csvilog->addDebug('Empty manufacturer table', true); if ($db->query()) $csvilog->AddStats('empty', JText::_('COM_CSVI_MANUFACTURER_TABLE_HAS_BEEN_EMPTIED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MANUFACTURER_TABLE_HAS_NOT_BEEN_EMPTIED')); // Optimize the table $csvilog->setLinenumber($linenumber++); $q = "OPTIMIZE TABLE ".$db->quoteName('#__virtuemart_manufacturers'); $db->setQuery($q); if ($db->query()) $csvilog->AddStats('information', JText::_('COM_CSVI_MANUFACTURER_TABLE_HAS_BEEN_OPTIMIZED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MANUFACTURER_TABLE_HAS_NOT_BEEN_OPTIMIZED')); // Reset the auto increment $csvilog->setLinenumber($linenumber++); $q = "ALTER TABLE ".$db->quoteName('#__virtuemart_manufacturers')." AUTO_INCREMENT = ".($mf_id+1); if ($db->query()) $csvilog->AddStats('information', JText::_('COM_CSVI_MANUFACTURER_AUTO_INCREMENT_RESET')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MANUFACTURER_AUTO_INCREMENT_NOT_RESET')); // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); return true; } /** * Optimize CSVI VirtueMart and VirtueMart tables * * @todo clean up messages */ public function getOptimizeTables() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $linenumber = 1; $tables = $db->getTableList(); foreach ($tables as $id => $tablename) { $csvilog->setLinenumber($linenumber++); $q = "OPTIMIZE TABLE ".$tablename; $db->setQuery($q); if ($db->query()) $csvilog->AddStats('information', JText::sprintf('COM_CSVI_TABLE_HAS_BEEN_OPTIMIZED', $tablename)); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_TABLE_HAS_NOT_BEEN_OPTIMIZED', $tablename)); } // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); return true; } /** * Add exchange rates * The eurofxref-daily.xml file is updated daily between 14:15 and 15:00 CET * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getExchangeRates() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $linenumber = 1; // Read eurofxref-daily.xml file in memory $XMLContent= file("http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml"); // Process the file if ($XMLContent) { // Empty table $q = "TRUNCATE TABLE `#__csvi_currency`;"; $db->setQuery($q); $db->query(); // Add the Euro $q = "INSERT INTO #__csvi_currency (currency_code, currency_rate) VALUES ('EUR', 1)"; $db->setQuery($q); $db->query(); $currencyCode = array(); $rate = array(); foreach ($XMLContent as $line) { if (preg_match("/currency='([[:alpha:]]+)'/",$line,$currencyCode)) { if (preg_match("/rate='([[:graph:]]+)'/",$line,$rate)) { $csvilog->setLinenumber($linenumber++); $q = "INSERT INTO #__csvi_currency (currency_code, currency_rate) VALUES (".$db->Quote($currencyCode[1]).", ".$rate[1].")"; $db->setQuery($q); if ($db->query()) { $rate_name = 'COM_CSVI_EXCHANGE_RATE_'.$currencyCode[1].'_ADDED'; $csvilog->AddStats('added', JText::_($rate_name)); } else $csvilog->AddStats('incorrect', JText::_($rate_name)); } } } } else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_CANNOT_LOAD_EXCHANGERATE_FILE')); // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); } /** * Remove all categories that have no products * Parent categories are only deleted if there are no more children left * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getRemoveEmptyCategories() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $this->getCategoryTreeModule(); $catpaths = $jinput->get('categorypaths', array(), 'array'); arsort($this->_catlevels); foreach ($this->_catlevels as $catid => $nrlevels) { // Check if there are any products in the category $db->setQuery($this->getCatQuery($catid)); if ($db->loadResult() > 0 && array_key_exists($catid, $catpaths)) { foreach ($catpaths[$catid] as $key => $level) { unset($catpaths[$level]); unset($this->_catlevels[$level]); } unset($catpaths[$catid]); unset($this->_catlevels[$catid]); } else { if (array_key_exists($catid, $catpaths)) { foreach ($catpaths[$catid] as $key => $level) { $db->setQuery($this->getCatQuery($level)); if ($db->loadResult() > 0) { unset($catpaths[$level]); unset($this->_catlevels[$level]); } } } } } $delcats = array_keys($catpaths); if (!empty($delcats)) { // Remove all categories except the ones we have $q = "DELETE FROM #__vm_category WHERE category_id IN (".implode(', ', $delcats).")"; $db->setQuery($q); if ($db->query()) $csvilog->AddStats('deleted', JText::_('COM_CSVI_MAINTENANCE_CATEGORIES_DELETED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MAINTENANCE_CATEGORIES_NOT_DELETED')); // Remove all category parent-child relations except the ones we have $q = "DELETE FROM #__vm_category_xref WHERE category_child_id IN (".implode(', ', $delcats).")"; $db->setQuery($q); if ($db->query()) $csvilog->AddStats('deleted', JText::_('COM_CSVI_MAINTENANCE_CATEGORIES_XREF_DELETED')); else $csvilog->AddStats('incorrect', JText::_('COM_CSVI_MAINTENANCE_CATEGORIES_XREF_NOT_DELETED')); } else $csvilog->AddStats('information', JText::_('COM_CSVI_NO_CATEGORIES_FOUND')); } /** * Construct a query to count the number of references to a category * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return string the query to count entries in a category * @since 3.0 */ private function getCatQuery($catid) { return "SELECT COUNT(*) FROM #__vm_product_category_xref WHERE category_id = ".$catid; } /** * Clean the CSVI cache * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getCleanTemp() { jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $folder = CSVIPATH_TMP; if (JFolder::exists($folder)) { // Delete all import files left behind in the folder JFile::delete(JFolder::files($folder, '.', false, true)); // Delete all import folders left behind in the folder $folders = array(); $folders = JFolder::folders($folder, '.', true, true, array('debug')); if (!empty($folders)) { foreach ($folders as $path) { JFolder::delete($path); } } // Load the files if (JFolder::exists(CSVIPATH_DEBUG)) { $files = JFolder::files(CSVIPATH_DEBUG, '.', false, true); if ($files) { // Remove any debug logs that are still there but not in the database $q = "SELECT CONCAT(".$db->Quote(CSVIPATH_DEBUG.'/com_csvi.log.').", import_id, '.php') AS filename FROM #__csvi_logs WHERE import_id > 0 GROUP BY import_id"; $db->setQuery($q); $ids = $db->loadResultArray(); if (!is_array($ids)) $ids = (array)$ids; // Delete all obsolete files JFile::delete(array_diff($files, $ids)); } } $csvilog->AddStats('deleted', JText::_('COM_CSVI_TEMP_CLEANED')); } else $csvilog->AddStats('information', JText::_('COM_CSVI_TEMP_PATH_NOT_FOUND')); } /** * Export all VirtueMart tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getBackupVirtueMart() { jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $filepath = JPATH_SITE.'/tmp/com_csvi'; $filename = 'virtuemart_'.time().'.sql'; $file = $filepath.'/'.$filename; $sqlstring = ''; $fp = fopen($file, "w+"); if ($fp) { // Load a list of VirtueMart tables $q = "SHOW TABLES LIKE '".$db->getPrefix()."virtuemart\_%'"; $db->setQuery($q); $tables = $db->loadResultArray(); $linenumber = 1; foreach ($tables as $table) { $csvilog->setLinenumber($linenumber); // Get the create table statement $q = "SHOW CREATE TABLE ".$table; $db->setQuery($q); $tcreate = $db->loadAssocList(); $sqlstring .= "-- Table structure for table ".$db->quoteName($table)."\n\n"; $sqlstring .= $tcreate[0]['Create Table'].";\n\n"; // Check if there is any data in the table $q = "SELECT COUNT(*) FROM ".$db->quoteName($table); $db->setQuery($q); $count = $db->loadResult(); if ($count > 0) { $sqlstring .= "-- Data for table ".$db->quoteName($table)."\n\n"; // Get the field names $q = "SHOW COLUMNS FROM ".$db->quoteName($table); $db->setQuery($q); $fields = $db->loadObjectList(); $sqlstring .= 'INSERT INTO '.$db->quoteName($table).' ('; foreach ($fields as $field) { $sqlstring .= $db->quoteName($field->Field).','; } $sqlstring = substr(trim($sqlstring), 0, -1).") VALUES \n"; $start = 0; while ($count > 0) { $q = "SELECT * FROM ".$table." LIMIT ".$start.", 50"; $db->setQuery($q); $records = $db->loadAssocList(); // Add the values foreach ($records as $record) { foreach ($record as $rkey => $value) { if (!is_numeric($value)) $record[$rkey] = $db->Quote($value); else $record[$rkey] = $value; } $sqlstring .= '('.implode(',', $record)."),\n"; } $start += 50; $count -= 50; // Fix the end of the query if ($count < 1) $sqlstring = substr(trim($sqlstring), 0, -1).";\n"; // Add a linebreak $sqlstring .= "\n\n"; // Write the data to the file fwrite($fp, $sqlstring); // Empty the string $sqlstring = ''; } // Update the log $csvilog->AddStats('added', JText::sprintf('COM_CSVI_BACKUP_COMPLETE_FOR', $table)); $linenumber++; } } // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); // Zip up the file jimport('joomla.filesystem.archive'); $zip = JArchive::getAdapter('zip'); $files = array(); $files[] = array('name' => $filename, 'time' => filemtime($file), 'data' => JFile::read($file)); if ($zip->create($filepath.'/'.$filename.'.zip', $files)) { // Close the file fclose($fp); // Remove the SQL file JFile::delete($file); // Add a download link for the backup $csvilog->setFilename(JHTML::link(JURI::root().'tmp/com_csvi/'.$filename.'.zip', JText::_('COM_CSVI_BACKUP_DOWNLOAD_LINK'))); } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_BACKUP_NO_ZIP_CREATE')); $csvilog->setFilename($filepath.'/'.$filename); } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_COULD_NOT_OPEN_FILE', $file)); } } /** * This function is repsonsible for returning an array containing category information * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 2.3.6 */ private function getCategoryTreeModule() { $database = JFactory::getDBO(); // Get all categories $query = "SELECT category_child_id AS cid, category_parent_id AS pid FROM #__vm_category, #__vm_category_xref WHERE #__vm_category.category_id=#__vm_category_xref.category_child_id"; // Execute the query $database->setQuery( $query ); $records = $database->loadObjectList(); // Check if there are any records if (count($records[0]) == 0) { $this->_categories = false; return false; } else { $this->_categories = array(); // Group all categories together according to their level foreach( $records as $id => $record ) { $this->_categories[$record->pid][$record->cid]["category_id"] = $record->pid; $this->_categories[$record->pid][$record->cid]["category_child_id"] = $record->cid; } } $this->CategoryPaths(); } /** * Create an array of subcategories per category * * @author RolandD * @since 2.3.6 * @access private */ private function CategoryPaths() { $catpath = array(); krsort($this->_categories); foreach ($this->_categories as $pid => $categories) { foreach ($categories as $cid => $category) { $catpath[$cid] = $pid; } } foreach ($catpath as $cid => $value) { $catlevel = $value; $this->_catpaths[$cid][] = $catlevel; while ($catlevel > 0) { $this->_catpaths[$cid][] = $catpath[$catlevel]; $catlevel = $catpath[$catlevel]; } } foreach ($this->_catpaths as $cid => $paths) { $this->_catlevels[$cid] = count($paths); } asort($this->_catlevels); $jinput->set('categorypaths', $this->_catpaths); } /** * Load the ICEcat index file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true if index file is loaded | false if index file is not loaded * @since 3.0 */ public function getIcecatIndex() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $settings = $jinput->get('settings', null, null); $username = $settings->get('icecat.ice_username', false); $password = $settings->get('icecat.ice_password', false); $loadremote_index = false; $loadremote_supplier = false; $icecat_options = $jinput->get('icecat', array(), null); if (in_array('icecat_index', $icecat_options)) $load_index = true; else $load_index = false; if (in_array('icecat_supplier', $icecat_options)) $load_supplier = true; else $load_supplier = false; // Should we load the index file in 1 go $loadtype = JRequest::getBool('loadtype'); // What to do next? $result = 'full'; // Check if we have a username and password if ($username && $password) { // Joomla includes jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); jimport('joomla.filesystem.archive'); // Check if the files are stored on the server $location = JRequest::getVar('icecatlocation'); if ($load_index) { if (JFile::exists($location.'/icecat_index')) $icecat_index_file = $location.'/icecat_index'; else if (JFile::exists($location.'/icecat_index.gzip')) $icecat_index_file = $location.'/icecat_index.gzip'; else if (JFile::exists($location.'/icecat_index.zip')) $icecat_index_file = $location.'/icecat_index.zip'; else $loadremote_index = true; } if ($load_supplier) { if (JFile::exists($location.'/icecat_supplier')) $icecat_supplier_file = $location.'/icecat_supplier'; else if (JFile::exists($location.'/icecat_supplier.gzip')) $icecat_supplier_file = $location.'/icecat_supplier.gzip'; else if (JFile::exists($location.'/icecat_supplier.zip')) $icecat_supplier_file = $location.'/icecat_supplier.zip'; else $loadremote_supplier = true; } // Load the remote files if needed if ($loadremote_index || $loadremote_supplier) { // Context for retrieving files if (JRequest::getBool('icecat_gzip')) $gzip = "Accept-Encoding: gzip\r\n"; else $gzip = ''; $context = stream_context_create(array( 'http' => array( 'header' => "Authorization: Basic " . base64_encode($username.':'.$password)."\r\n". $gzip ) )); if ($load_index && $loadremote_index) { // ICEcat index file $icecat_url = $settings->get('icecat.ice_index', 'http://data.icecat.biz/export/freexml.int/INT/files.index.csv'); // Load the index file from the ICEcat server to a local file $icecat_index_file = CSVIPATH_TMP.'/icecat_index'; if (JRequest::getBool('icecat_gzip')) $icecat_index_file .= '.gzip'; $fp_url = fopen($icecat_url, 'r', false, $context); $fp_local = fopen($icecat_index_file, 'w+'); while($content = fread($fp_url,1024536)){ fwrite($fp_local, $content); } fclose($fp_url); fclose($fp_local); } if ($load_supplier && $loadremote_supplier) { // Load the manufacturer data $icecat_mf = $settings->get('icecat.ice_supplier', 'http://data.icecat.biz/export/freexml.int/INT/supplier_mapping.xml'); // Load the index file from the ICEcat server to a local file $icecat_supplier_file = CSVIPATH_TMP.'/icecat_supplier'; if (JRequest::getBool('icecat_gzip')) $icecat_supplier_file .= '.gzip'; $fp_url = fopen($icecat_mf, 'r', false, $context); $fp_local = fopen($icecat_supplier_file, 'w+'); while($content = fread($fp_url,1024536)){ fwrite($fp_local, $content); } fclose($fp_url); fclose($fp_local); } } // Check if we need to unpack the files if ($load_index) { if (substr($icecat_index_file, -3) == 'zip') { if (!$this->_unpack($icecat_index_file, CSVIPATH_TMP)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_ICECAT_INDEX_NOT_UNPACKED')); return 'cancel'; } else $icecat_index_file = CSVIPATH_TMP.'/icecat_index'; } } if ($load_supplier) { if (substr($icecat_supplier_file, -3) == 'zip') { if (!$this->_unpack($icecat_supplier_file, CSVIPATH_TMP)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_ICECAT_SUPPLIER_NOT_UNPACKED')); return 'cancel'; } else $icecat_supplier_file = CSVIPATH_TMP.'/icecat_supplier'; } } if ($load_index) { // Empty the index table $q = "TRUNCATE TABLE ".$db->quoteName('#__csvi_icecat_index'); $db->setQuery($q); $db->query(); // Load the local file into the database if (!$loadtype) { $q = "LOAD DATA LOCAL INFILE ".$db->Quote($icecat_index_file)." INTO TABLE ".$db->quoteName('#__csvi_icecat_index')." IGNORE 1 LINES"; $db->setQuery($q); if ($db->query()) $csvilog->AddStats('added', JText::_('COM_CSVI_ICECAT_INDEX_LOADED')); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ICECAT_INDEX_NOT_LOADED', $db->getErrorMsg())); } else { // Need to redirect for the batch import $result = 'single'; } } if ($load_supplier) { // Empty the supplier table $q = "TRUNCATE TABLE ".$db->quoteName('#__csvi_icecat_suppliers'); $db->setQuery($q); $db->query(); // Reset the supplier file $xmlstr = file_get_contents($icecat_supplier_file); $xml = new SimpleXMLElement($xmlstr); $supplier_data = array(); foreach ($xml->SupplierMappings->children() as $key => $mapping) { foreach ($mapping->attributes() as $attr_name => $attr_value) { switch($attr_name) { case 'supplier_id': $supplier_id = $attr_value; break; case 'name': $supplier_data[] = '('.$db->Quote($supplier_id).','.$db->Quote($attr_value).')'; } } foreach ($mapping->children() as $symbol) { $supplier_data[] = '('.$db->Quote($supplier_id).','.$db->Quote($symbol).')'; } } $q = "INSERT IGNORE INTO ".$db->quoteName('#__csvi_icecat_suppliers')." VALUES ".implode(',', $supplier_data); $db->setQuery($q); if ($db->query()) $csvilog->AddStats('added', JText::_('COM_CSVI_ICECAT_SUPPLIERS_LOADED')); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_ICECAT_SUPPLIERS_NOT_LOADED', $db->getErrorMsg())); } } else { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_ICECAT_NO_USER_PASS')); } // See if we need to store some info if ($loadtype) { // Session init $session = JFactory::getSession(); $option = JRequest::getVar('option'); $session->set($option.'.csvilog', serialize($csvilog)); $session->set($option.'.icecat_index_file', serialize($icecat_index_file)); $session->set($option.'.icecat_records', serialize(JRequest::getInt('icecat_records'))); $session->set($option.'.icecat_wait', serialize(JRequest::getInt('icecat_wait'))); } return $result; } /** * Load the ICEcat index in batches * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function getIcecatSingle() { $jinput = JFactory::getApplication()->input; // Session init $session = JFactory::getSession(); $option = $jinput->get('option'); $csvilog = unserialize($session->get($option.'.csvilog')); $icecat_index_file = unserialize($session->get($option.'.icecat_index_file')); $totalrow = unserialize($session->get($option.'.icecat_rows')); $records = unserialize($session->get($option.'.icecat_records', 1000)); $finished = false; $continue = true; // Sleep to please the server sleep(unserialize($session->get($option.'.icecat_wait', 5))); // Load the records line by line $db = JFactory::getDBO(); $q = "INSERT INTO `#__csvi_icecat_index` (`path`, `product_id`, `updated`, `quality`, `supplier_id`, `prod_id`, `catid`, `m_prod_id`, `ean_upc`, `on_market`, `country_market`, `model_name`, `product_view`, `high_pic`, `high_pic_size`, `high_pic_width`, `high_pic_height`, `m_supplier_id`, `m_supplier_name`) VALUES "; $lines = ''; if (($handle = fopen($icecat_index_file, "r")) !== FALSE) { // Position pointers $row = 0; // Position file pointer $pointer = unserialize($session->get($option.'.icecat_position')); fseek($handle, $pointer); // Start processing while ($continue) { if ($row < $records) { $data = fgetcsv($handle, 1024, "\t"); if ($data) { $row++; $lines .= '('; foreach ($data as $item) { $lines .= $db->Quote($item).','; } $lines = substr($lines, 0, -1); $lines .= '),'; } else { $finished = true; $continue = false; } } else $continue = false; } // Store the data $lines = substr($lines, 0, -1); $db->setQuery($q.$lines); $db->query(); // Information for reload $jinput->set('finished', $finished); $sumrows = $totalrow+$row; $jinput->set('linesprocessed', $sumrows); // Store for future use if (!$finished) { $session->set($option.'.csvilog', serialize($csvilog)); $session->set($option.'.icecat_rows', serialize($sumrows)); $session->set($option.'.icecat_position', serialize(ftell($handle))); } else { $csvilog->AddStats('added', JText::_('COM_CSVI_ICECAT_INDEX_LOADED')); // Store the log results $jinput->set('csvilog', $csvilog); $this->getFinishProcess(); // Clear the session $session->set($option.'.icecat_index_file', serialize('0')); $session->set($option.'.icecat_rows', serialize('0')); $session->set($option.'.icecat_position', serialize('0')); $session->set($option.'.icecat_records', serialize('0')); $session->set($option.'.icecat_wait', serialize('0')); $session->set($option.'.csvilog', serialize('0')); // Set the run ID $jinput->set('run_id', $csvilog->getId()); } fclose($handle); } } /** * Unpack the ICEcat index files * * @copyright * @author RolandD * @todo * @see * @access private * @param string $archivename the full path and name of the file to extract * @param string $extractdir the folder to copy the extracted file to * @return bool true on success | false on failure * @since 3.0 */ private function _unpack($archivename, $extractdir) { $adapter = JArchive::getAdapter('gzip'); if ($adapter) { $config = JFactory::getConfig(); $tmpfname = $config->getValue('config.tmp_path').'/'.uniqid('gzip'); $gzresult = $adapter->extract($archivename, $tmpfname); if (JError::isError($gzresult)) { @unlink($tmpfname); return false; } $path = JPath::clean($extractdir); JFolder::create($path); $result = JFile::copy($tmpfname,$path.'/'.JFile::stripExt(basename(strtolower($archivename)))); @unlink($tmpfname); } return true; } /** * Backup templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getBackupTemplates() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $linenumber = 1; // Create the backup file $filepath = JPATH_SITE.$jinput->get('backup_location', '/tmp/com_csvi', 'string'); $filename = 'csvi_templates_'.date('Ymd', time()).'.csv'; $file = JPath::clean($filepath.'/'.$filename, '/'); $fp = fopen($file, "w+"); if ($fp) { $db->setQuery("SELECT ".$db->quoteName('name').", ".$db->quoteName('settings')." FROM #__csvi_template_settings"); $templates = $db->loadAssocList(); foreach ($templates as $template) { $csvilog->setLinenumber($linenumber++); if (fputcsv($fp, $template)) $csvilog->AddStats('information', JText::sprintf('COM_CSVI_BACKUP_TEMPLATE', $template['name'])); else $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_BACKUP_NO_TEMPLATE', $template['name'])); } fclose($fp); $csvilog->AddStats('information', JText::sprintf('COM_CSVI_BACKUP_TEMPLATE_PATH', $file)); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_COULD_NOT_OPEN_FILE', $file)); } // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); } /** * Restore templates * * @copyright * @author RolandD * @todo Remove JRequest once jinput can handle files * @see * @access public * @param * @return * @since 3.0 */ public function getRestoreTemplates() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $linenumber = 1; jimport('joomla.filesystem.file'); // Load the restore file $upload = JRequest::getVar('restore_file', '', 'files'); if (empty($upload) || $upload['error'] > 0) $upload = JRequest::getVar('file', '', 'files'); // Check if the file upload has an error if (empty($upload)) { $csvilog->AddStats('incorrect', JText::_('COM_CSVI_NO_UPLOADED_FILE_PROVIDED')); return false; } else if ($upload['error'] == 0) { if (is_uploaded_file($upload['tmp_name'])) { // Get some basic info $folder = CSVIPATH_TMP.'/'.time(); $upload_parts = pathinfo($upload['name']); // Create the temp folder if (JFolder::create($folder)) { $this->folder = $folder; // Move the uploaded file to its temp location if (JFile::upload($upload['tmp_name'], $folder.'/'.$upload['name'])) { // Read the uploaded file $fp = fopen($folder.'/'.$upload['name'], "r"); if ($fp) { while (($data = fgetcsv($fp, 0, ",")) !== FALSE) { $csvilog->setLinenumber($linenumber++); $db->setQuery("INSERT IGNORE INTO #__csvi_template_settings (".$db->quoteName('name').", ".$db->quoteName('settings').") VALUES (".$db->Quote($data[0]).", ".$db->Quote($data[1]).")"); if ($db->query()) { $csvilog->AddStats('added', JText::sprintf('COM_CSVI_RESTORE_TEMPLATE', $data[0])); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_RESTORE_TEMPLATE', $data[0])); $csvilog->AddStats('incorrect', $db->getQuery()); } } fclose($fp); } } } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_CANNOT_CREATE_UNPACK_FOLDER', $folder)); return false; } } // Error warning cannot save uploaded file else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_NO_UPLOADED_FILE_PROVIDED', $upload['tmp_name'])); return false; } } // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); } /** * Unpublish products in unpublished categories * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function getUnpublishProductByCategory() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName('p').'.'.$db->quoteName('virtuemart_product_id')); $query->from($db->quoteName('#__virtuemart_products').' AS p'); $query->innerJoin($db->quoteName('#__virtuemart_product_categories').' AS pc ON '.$db->quoteName('p').'.'.$db->quoteName('virtuemart_product_id').' = '.$db->quoteName('pc').'.'.$db->quoteName('virtuemart_product_id')); $query->innerJoin($db->quoteName('#__virtuemart_categories').' AS c ON '.$db->quoteName('pc').'.'.$db->quoteName('virtuemart_category_id').' = '.$db->quoteName('c').'.'.$db->quoteName('virtuemart_category_id')); $query->where($db->quoteName('p').'.'.$db->quoteName('published').' = '.$db->quote('1')); $query->where($db->quoteName('c').'.'.$db->quoteName('published').' = '.$db->quote('0')); // Get the IDs to unpublish $q = "SELECT #__vm_product.product_id FROM #__vm_product INNER JOIN #__vm_product_category_xref ON #__vm_product.product_id = #__vm_product_category_xref.product_id INNER JOIN #__vm_category ON #__vm_product_category_xref.category_id = #__vm_category.category_id WHERE #__vm_product.product_publish = 'Y' AND #__vm_category.category_publish = 'N'"; $db->setQuery($query); $ids = $db->loadResultArray(); if (!empty($ids)) { // Unpublish the IDs $query = $db->getQuery(true); $query->update($db->quoteName('#__virtuemart_products')); $query->set($db->quoteName('published').' = '.$db->quote('0')); $query->where($db->quoteName('virtuemart_product_id').' IN ('.implode(',', $ids).')'); $q = "UPDATE #__vm_product SET product_publish = 'N' WHERE product_id IN (".implode(',', $ids).")"; $db->setQuery($query); if ($db->query()) { $csvilog->AddStats('updated', JText::sprintf('COM_CSVI_PRODUCTS_UNPUBLISHED', $db->getAffectedRows())); } else { $csvilog->AddStats('incorrect', JText::sprintf('COM_CSVI_PRODUCTS_NOT_UNPUBLISHED', $db->getErrorMsg())); } } else $csvilog->AddStats('information', JText::_('COM_CSVI_PRODUCTS_NOT_FOUND')); } /** * Get a list of available components * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getComponents() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('component AS value, component AS text'); $query->from($db->quoteName('#__csvi_template_types')); $query->leftJoin('#__extensions ON #__csvi_template_types.component = #__extensions.element'); $query->where('#__extensions.type = '.$db->Quote('component')); $query->group('component'); $db->setQuery($query); $components = $db->loadObjectList(); $options = JHtml::_('select.option', '', JText::_('COM_CSVI_MAKE_CHOICE'), 'value', 'text', true); array_unshift($components, $options); return $components; } /** * Sorts all VirtueMart categories in alphabetical order * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return bool true if categories are sorted | false if an error occured * @since 3.0 */ public function getSortCategories() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $language = $jinput->get('language'); $linenumber = 1; // Check if the table exists $tables = $db->getTableList(); if (!in_array($db->getPrefix().'virtuemart_categories_'.$language, $tables)) { $csvilog->AddStats('information', JText::sprintf('COM_CSVI_LANG_TABLE_NOT_EXIST', $language)); } else { // Get all categories $query = $db->getQuery(true); $query->select('LOWER('.$db->quoteName('category_name').') AS '.$db->quoteName('category_name')); $query->select($db->quoteName('category_child_id').' AS '.$db->quoteName('cid')); $query->select($db->quoteName('category_parent_id').' AS '.$db->quoteName('pid')); $query->from($db->quoteName('#__virtuemart_categories').' AS '.$db->quoteName('c')); $query->leftJoin($db->quoteName('#__virtuemart_category_categories').' AS '.$db->quoteName('cc').' ON '.$db->quoteName('c').'.'.$db->quoteName('virtuemart_category_id').' = '.$db->quoteName('cc').'.'.$db->quoteName('category_child_id')); $query->leftJoin($db->quoteName('#__virtuemart_categories_'.$language).' AS '.$db->quoteName('cl').' ON '.$db->quoteName('cc').'.'.$db->quoteName('category_child_id').' = '.$db->quoteName('cl').'.'.$db->quoteName('virtuemart_category_id')); // Execute the query $db->setQuery($query); $records = $db->loadObjectList(); if (count($records) > 0) { $categories = array(); // Group all categories together according to their level foreach ($records as $key => $record) { $categories[$record->pid][$record->cid] = $record->category_name; } // Sort the categories and store the item list foreach ($categories as $id => $category) { asort($category); $listorder = 1; foreach ($category as $category_id => $category_name) { // Store the new sort order $query = $db->getQuery(true); $query->update($db->quoteName('#__virtuemart_categories')); $query->set($db->quoteName('ordering').' = '.$db->quote($listorder)); $query->where($db->quoteName('virtuemart_category_id').' = '.$db->quote($category_id)); $db->setQuery($query); $db->query(); // Set the line number $csvilog->setLinenumber($linenumber++); $csvilog->AddStats('information', JText::sprintf('COM_CSVI_SAVED_CATEGORY', $category_name ,$listorder)); $listorder++; } } // Store the log count $linenumber--; $jinput->set('logcount', $linenumber); } else $csvilog->AddStats('information', 'COM_CSVI_NO_CATEGORIES_FOUND'); } return true; } /** * Create a list of maintenance options * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of available options * @since 4.0 */ public function getMaintenanceOptions() { $options = array(); $options[] = JHtml::_('select.option', '', JText::_('COM_CSVI_MAKE_CHOICE'), 'value', 'text', true); return $options; } /** * Load the languages in the system * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of available languages * @since 4.0 */ public function getLanguages() { $language = JFactory::getLanguage(); $known = $language->getKnownLanguages(); $options = array(); foreach ($known as $tag => $lang) { $options[] = JHtml::_('select.option', str_replace('-', '_', strtolower($lang['tag'])), $lang['name']); } return $options; } /** * Get operations for a selected component * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function getOperations() { $jinput = JFactory::getApplication()->input; $component = $jinput->get('component'); $options = ''; switch ($component) { case 'com_csvi': $options .= ''; $options .= ''; $options .= ''; $options .= ''; $options .= ''; $options .= ''; $options .= ''; break; case 'com_virtuemart': $options .= ''; $options .= ''; $options .= ''; $options .= ''; $options .= ''; $options .= ''; break; default: $options .= ''; break; } // Return the output return $options; } } ?>PK>\ZHHmodels/templates.phpnuW+AsetQuery($q); $templates = $db->loadObjectList(); if (!is_array($templates)) $templates = array(); $new = array(); $new[] = JHtml::_('select.option', '', JText::_('COM_CSVI_SAVE_AS_NEW_FOR_NEW_TEMPLATE')); $templates = array_merge($new, $templates); return $templates; } /** * Save export settings * * @copyright * @author RolandD * @todo * @see * @access public * @param array $data the data to be stored * @return bool true on success | false on failure * @since 3.0 */ public function save($data) { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; $table = $this->getTable('csvi_template_settings'); $bind = array(); $id = $jinput->get('template_id', 0, 'int'); if ($id > 0) $table->load($id); else $bind['name'] = $jinput->get('template_name', 'Template '.time(), 'string'); $bind['settings'] = json_encode($data); $table->bind($bind); if ($table->store()) { $app->enqueueMessage(JText::sprintf('COM_CSVI_PROCESS_SETTINGS_SAVED', $table->name)); } else { $app->enqueueMessage(JText::sprintf('COM_CSVI_PROCESS_SETTINGS_NOT_SAVED', $table->getError()), 'error'); } return $table->id; } /** * Remove a settings template * * @copyright * @author RolandD * @todo * @see * @access public * @param array $data the data to be stored * @return bool true on success | false on failure * @since 3.0 */ public function remove() { $app = JFactory::getApplication(); $jinput = JFactory::getApplication()->input; $table = $this->getTable('csvi_template_settings'); $table->load($jinput->get('template_id', null, 'int')); if ($table->delete()) { $app->enqueueMessage(JText::sprintf('COM_CSVI_PROCESS_SETTINGS_DELETED', $table->name)); } else { $app->enqueueMessage(JText::sprintf('COM_CSVI_PROCESS_SETTINGS_NOT_DELETED', $table->getError()), 'error'); } } /** * Get the template details * * Retrieves the template details from the csvi_templates table. If the * template id is 0, it will automatically retrieve the template details * for the template with the lowest ID in the database * * @see self::GetFirstTemplateId(); * @param $templateid integer Template ID to retrieve */ public function _getTemplate() { $row = $this->getTable($this->_tablename); if ($this->_id == 0) { $this_id = $this->GetFirstTemplateId(); } $row->load($this->_id); // Fix the price format $row->export_price_formats = self::getNumberFormat($row->export_price_format); return $row; } /** * Load the template types based on type * * @copyright * @author RolandD * @todo * @see * @access public * @param string $type The type of template to filter on * @return array list of template types * @since 3.0 */ function getTemplateTypes($type=false, $component=false) { $db = JFactory::getDBO(); $q = "SELECT CONCAT('COM_CSVI_', UPPER(template_type_name)) AS name, template_type_name AS value FROM #__csvi_template_types "; // Check any selectors $selectors = array(); if ($type) $selectors[] = "template_type = ".$db->Quote($type); if ($component) $selectors[] = "component = ".$db->Quote($component); if (!empty($selectors)) $q .= "WHERE ".implode(' AND ', $selectors); // Order by name $q .= " ORDER BY template_type_name"; $db->setQuery($q); $types = $db->loadObjectList(); // Translate the strings foreach ($types as $key => $type) { $type->value = JText::_($type->value); $types[$key] = $type; } return $types; } } ?>PK>\EEmodels/log.phpnuW+AsetState('filter.action', $app->getUserStateFromRequest($this->_context.'.filter.action', 'filter_actiontype', false, 'word')); // List state information. // Controls the query ORDER BY parent::populateState('l.logstamp', 'desc'); } /** * Build an SQL query to load the list data. * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return object the query to execute * @since 4.0 */ protected function getListQuery() { // Create a new query object. $jinput = JFactory::getApplication()->input; $db = $this->getDbo(); $query = $db->getQuery(true); // Select the required fields from the table. $query->select('run_id AS id, userid, logstamp, action, action_type, template_name, records, run_id, file_name, run_cancelled'); $query->from('#__csvi_logs AS l'); // Add all the filters $filters = array(); if ($this->getState('filter.action')) $filters[] = $db->quoteName('action').' = '.$db->Quote($this->getState('filter.action')); if (!empty($filters)) { // Add the clauses to the query. $query->where('('.implode(' AND ', $filters).')'); } // Add the list ordering clause. $orderCol = $this->state->get('list.ordering'); $orderDirn = $this->state->get('list.direction'); $query->order($db->getEscaped($orderCol.' '.$orderDirn)); return $query; } /** * Set the log ID * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function setId($id) { $this->_id = $id; } /** * Store the log results after import/export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function getStoreLogResults() { // Load the settings $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); if ($settings->get('log.log_store', 1)) { $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $logresult = $csvilog->getStats(); $details = array(); $logcount = array(); // Get the number of lines processed based on type switch ($logresult['action']) { case 'import': $logcount['import'] = $jinput->get('recordsprocessed', 0, 'int'); break; case 'export': $logcount['export'] = $jinput->get('logcount', 0, 'int'); break; case 'maintenance': $logcount['maintenance'] = $csvilog->GetLineNumber(); break; } // Get the database connector $rowlog = $this->getTable('csvi_logs'); // Check for an existing ID if (!$csvilog->getLogid()) { // Get user ID $my = JFactory::getUser(); $details['userid'] = $my->id; // Create GMT timestamp jimport('joomla.utilities.date'); $jnow = new JDate(time()); $details['logstamp'] = $jnow->toMySQL(); // Set action if it is import or export $details['action'] = $logresult['action']; // Type of action $details['action_type'] = $logresult['action_type']; // Name of template used $details['template_name'] = $logresult['action_template']; // Get the number of records $details['records'] = $logcount[$logresult['action']]; // Get the import ID $details['run_id'] = $csvilog->getId(); // Get the import filename $details['file_name'] = $csvilog->getFilename(); // Bind the data if (!$rowlog->bind($details)) { JError::raiseWarning(0, JText::_('COM_CSVI_CANNOT_BIND_LOG_DATA')); } // Check the data if (!$rowlog->check()) { JError::raiseWarning(0, JText::_('COM_CSVI_CANNOT_CHECK_LOG_DATA')); } // Store the data if (!$rowlog->store()) { JError::raiseWarning(0, JText::_('COM_CSVI_CANNOT_STORE_LOG_DATA')); } else { // Clean up any old logs $csvilog->cleanUpLogs(); } $csvilog->setLogid($rowlog->id); $rowlog->reset(); } else { $rowlog->load($csvilog->getLogid()); if (array_key_exists('action', $logresult) && isset($logcount[$logresult['action']])) $rowlog->records = $logcount[$logresult['action']]; else $rowlog->records = 0; $rowlog->store(); } // Store the log details if (is_array($logresult) && !empty($logresult)) { $q = 'INSERT INTO `#__csvi_log_details` ( `id`,`log_id`,`line`,`description`,`result`,`status` ) VALUES '; $qvalue = ''; foreach ($logresult as $linenr => $result) { if (is_int($linenr)) { foreach ($result['status'] as $status => $stat) { $qvalue .= "(0, ".$csvilog->getLogid().", ".$linenr.", ".$db->Quote(trim($stat['message'])).", '".$stat['result']."', '".$status."'),\n"; } } } if (!empty($qvalue)) { $q .= substr(trim($qvalue), 0, -1).';'; $db->setQuery($q); if ($db->query()) $csvilog->cleanStats(); } else $csvilog->cleanStats(); } } } /** * Delete 1 or more selected log entries * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of results * @since 3.0 */ public function getDelete() { $jinput = JFactory::getApplication()->input; jimport('joomla.filesystem.file'); $db = JFactory::getDBO(); $cids = $jinput->get('cid', array(), 'array'); $file_not_found = 0; $file_deleted = 0; $file_not_deleted = 0; $log_del = 0; $log_del_error = 0; $log_detail_del = 0; $log_detail_del_error = 0; // Make it an array if (!is_array($cids)) (array)$cids; $rowlog = $this->getTable('csvi_logs'); foreach ($cids as $key => $run_id) { $filename = CSVIPATH_DEBUG.'/com_csvi.log.'.$run_id.'.php'; if (JFile::exists($filename)){ if (JFile::delete($filename)) { $file_deleted++; } else $file_not_deleted++; } else $file_not_found++; // Delete the log entry if (empty($run_id)) $q = "SELECT id FROM #__csvi_logs WHERE (run_id = '' OR run_id IS NULL)"; else $q = "SELECT id FROM #__csvi_logs WHERE run_id = ".$run_id; $db->setQuery($q); $ids = $db->loadResultArray(); foreach ($ids as $idkey => $id) { if (!$rowlog->delete($id)) $log_del_error++; else { $log_del++; } // Delete the log details $q = "DELETE FROM #__csvi_log_details WHERE log_id = ".$id; $db->setQuery($q); if (!$db->query()) $log_detail_del_error++; else $log_detail_del++; } } // Set the results $results = array(); if ($file_not_found > 0) { if ($file_not_found == 1) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_FILE_NOT_FOUND'); else $results['ok'][] = JText::sprintf('COM_CSVI_DELETE_LOGS_FILE_NOT_FOUND', $file_not_found); } if ($file_deleted > 0) { if ($file_deleted == 1) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_FILE'); else $results['ok'][] = JText::sprintf('COM_CSVI_DELETE_LOGS_FILE', $file_deleted); } if ($file_not_deleted > 0) { if ($file_not_deleted == 1) $results['nok'][] = JText::_('COM_CSVI_CANNOT_DELETE_LOG_FILE'); else $results['nok'][] = JText::sprintf('COM_CSVI_CANNOT_DELETE_LOGS_FILE', $file_not_deleted); } if ($log_del > 0) { if ($log_del == 1) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_DATA'); else $results['ok'][] = JText::sprintf('COM_CSVI_DELETE_LOGS_DATA', $log_del); } if ($log_del_error > 0) { if ($log_del == 1) $results['nok'][] = JText::_('COM_CSVI_CANNOT_DELETE_LOG_DATA'); else $results['nok'][] = JText::sprintf('COM_CSVI_CANNOT_DELETE_LOGS_DATA', $log_del); } if ($log_detail_del > 0) { if ($log_del == 1) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_DETAILS_DATA'); else $results['ok'][] = JText::sprintf('COM_CSVI_DELETE_LOGS_DETAILS_DATA', $log_detail_del); } if ($log_detail_del_error > 0) { if ($log_del == 1) $results['nok'][] = JText::_('COM_CSVI_CANNOT_DELETE_LOG_DETAILS_DATA'); else $results['nok'][] = JText::sprintf('COM_CSVI_CANNOT_DELETE_LOGS_DETAILS_DATA', $log_detail_del_error); } return $results; } /** * Delete all log entries * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return array of results * @since 3.0 */ public function getDeleteAll() { $db = JFactory::getDBO(); $results = array(); // Empty the log table $q = "TRUNCATE ".$db->quoteName('#__csvi_logs'); $db->setQuery($q); if ($db->query()) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_DATA_ALL_OK'); else $results['nok'][] = JText::_('COM_CSVI_DELETE_LOG_DATA_ALL_NOK'); // Empty the log details table $q = "TRUNCATE ".$db->quoteName('#__csvi_log_details'); $db->setQuery($q); if ($db->query()) $results['ok'][] = JText::_('COM_CSVI_DELETE_LOG_DATA_DETAILS_ALL_OK'); else $results['nok'][] = JText::_('COM_CSVI_DELETE_LOG_DATA_DETAILS_ALL_NOK'); return $results; } /** * Load the statistics for displaying * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getStats() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); if ($csvilog) $run_id = $csvilog->getId(); else if ($jinput->get('run_id', '', 'int') > 0) $run_id = $jinput->get('run_id', '', 'int'); else { // Try to get it from the cid $cids = $jinput->get('cid', array(), 'array'); if (is_array($cids) && array_key_exists('0', $cids)) $run_id = $cids[0]; else return false; } $details = array(); if ($run_id) { jimport('joomla.filesystem.file'); // Add the run ID $details['run_id'] = $run_id; // Get the total number of records $q = "SELECT SUM(records) AS total_records FROM #__csvi_logs WHERE run_id = ".$run_id; $db->setQuery($q); $details['total_records'] = $db->loadResult(); // Get the general details $q = "SELECT MIN(id) AS min_id, MAX(id)+1 AS max_id, file_name, action, action_type, run_cancelled FROM #__csvi_logs WHERE run_id = ".$run_id." GROUP BY id"; $db->setQuery($q); $min_max = $db->loadObject(); if (!empty($min_max)) { // Protect against 'record not found' // Set the filename $details['file_name'] = $min_max->file_name; // Set the action $details['action'] = $min_max->action; // Set the action type $details['action_type'] = $min_max->action_type; // Set if the action was cancelled $details['run_cancelled'] = $min_max->run_cancelled; // Get some status results $q = "SELECT COUNT(status) AS total_result, result, status FROM #__csvi_log_details WHERE log_id BETWEEN ".$min_max->min_id." AND ".$min_max->max_id." GROUP BY status"; $db->setQuery($q); $details['result'] = $db->loadObjectList('status'); } // Check if there is a debug log file $logfile = CSVIPATH_DEBUG.'/com_csvi.log.'.$run_id.'.php'; if (JFile::exists($logfile)) { $details['debug'] = JHtml::_('link', JRoute::_('index.php?option=com_csvi&task=log.downloaddebug&run_id='.$run_id), JText::_('COM_CSVI_DOWNLOAD_DEBUG_LOG')); $attribs = 'class="modal" onclick="" rel="{handler: \'iframe\', size: {x: 950, y: 500}}"'; $details['debugview'] = JHtml::_('link', JRoute::_('index.php?option=com_csvi&task=log.logreader&tmpl=component&run_id='.$run_id), JText::_('COM_CSVI_VIEW_DEBUG_LOG'), $attribs); } else { $details['debug'] = JText::_('COM_CSVI_NO_DEBUG_LOG_FOUND'); $details['debugview'] = ''; } } return $details; } /** * Load the statistics */ public function getStatsMessage() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $run_id = $jinput->get('run_id', false, 'int'); if (!$run_id) { /* Try to get it from the cid */ $cids = $jinput->get('cid', array(), 'array'); if (is_array($cids) && array_key_exists('0', $cids)) $run_id = $cids[0]; else return false; } $details = array(); if ($run_id) { $q = "SELECT line, description, status, log_id, result FROM #__csvi_log_details WHERE log_id IN (SELECT id FROM #__csvi_logs WHERE run_id = ".$run_id.") ORDER BY line"; $db->setQuery($q); $details = $db->loadObjectList(); } return $details; } /** * Download a debug report */ public function downloadDebug() { jimport('joomla.filesystem.file'); jimport('joomla.filesystem.archive'); $jinput = JFactory::getApplication()->input; $run_id = $jinput->get('run_id', 0, 'int'); $filepath = CSVIPATH_DEBUG.'/'; $filename = 'com_csvi.log.'.$run_id.'.'; $zip = JArchive::getAdapter('zip'); $files = array(); $files[] = array('name' => $filename.'php', 'time' => filemtime($filepath.$filename.'php'), 'data' => JFile::read($filepath.$filename.'php')); $zip->create($filepath.$filename.'zip', $files); if (preg_match('/Opera[\s|\/]([^\s]+)/i', $_SERVER['HTTP_USER_AGENT'])) { $UserBrowser = "Opera"; } elseif (preg_match('/MSIE\s([^\s|;]+)/i', $_SERVER['HTTP_USER_AGENT'])) { $UserBrowser = "IE"; } else { $UserBrowser = ''; } $mime_type = ($UserBrowser == 'IE' || $UserBrowser == 'Opera') ? 'application/octetstream' : 'application/octet-stream'; /* Clean the buffer */ while( @ob_end_clean() ); header('Content-Description: File Transfer'); header('Content-Type: ' . $mime_type); header('Content-Transfer-Encoding: binary'); header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT'); header('Content-Length: ' . filesize($filepath.$filename.'zip')); if ($UserBrowser == 'IE') { header('Content-Disposition: inline; filename="'.$filename.'zip"'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); } else { header('Content-Disposition: attachment; filename="'.$filename.'zip"'); header('Pragma: no-cache'); } /* Send the file */ readfile($filepath.$filename.'zip'); JFile::delete($filepath.$filename.'zip'); /* Close the transmission */ exit(); } /** * Get the action types * * @author RolandD * @access public * @return array list of action types */ public function getActionTypes() { $db = JFactory::getDbo(); $options = array(); $options[] = JHtml::_('select.option', '', JText::_('COM_CSVI_LOG_DONT_USE')); $q = "SELECT UPPER(action) FROM #__csvi_logs GROUP BY action"; $db->setQuery($q); $actions = $db->loadResultArray(); if (!empty($actions)) { foreach ($actions as $action) { $options[] = JHTML::_('select.option', $action, JText::_('COM_CSVI_'.$action)); } } return $options; } /** * Reads a log file and displays its results * * @author RolandD * @since 2.3.11 * @access public * @return array of log lines */ public function getLogfile() { $jinput = JFactory::getApplication()->input; $run_id = $jinput->get('run_id', 0, 'int'); $log = array(); if ($run_id > 0) { $logfile = CSVIPATH_DEBUG.'/com_csvi.log.'.$run_id.'.php'; $loglines = array(); if (file_exists($logfile)) { $loglines = file($logfile); foreach ($loglines as $key => $line) { switch ($key) { case '0': // Skip the first line break; case '1': // Get the date if (strstr($line, ':')) { list($text, $value) = explode(': ', $line); } else $value = ''; $log['date'] = $value; break; case '2': // Get the Joomla version if (strstr($line, ':')) { list($text, $value) = explode(': ', $line); } else $value = ''; $log['joomla'] = $value; break; case '3': // This is an empty line break; case '4': // Get the fields if (strstr($line, ':')) { list($text, $value) = explode(': ', $line); $fields = preg_split("/\t/", $value); foreach ($fields as $fkey => $field) { $log['fields'][] = $field; } } else $log['fields'] = array(); break; default: // The actual log lines $log['entries'][] = preg_split("/\t/", $line); break; } } } } return $log; } } ?>PK>\UȲ,,models/category.phpnuW+A_tables_loaded) $this->_loadTables(); } /** * Gets the ID belonging to the category path * * @copyright * @author RolandD * @todo * @see * @access public * @param string $category_path the path to get the ID for * @param int $vendor_id the vendor ID the category belongs to * @return array containing category_id * @since 3.0 */ public function getCategoryIdFromPath($category_path, $vendor_id=1) { // Check for any missing categories, otherwise create them $category = $this->_csvCategory($category_path, $vendor_id); return array('category_id' => $category[0]); } /** * Inserts the category/categories for a product * * Any existing categories will be removed first, after that the new * categories will be imported. * * @copyright * @author RolandD * @todo * @see _csvCategory() * @access * @param integer $product_id contains the product ID the category/categories belong to * @param integer $category_path contains the category/categories path for the product * @param integer $category_id contains a single or array of category IDs * @param integer $product_list the product order in the category * @param integer $vendor_id the id of the vendor the category belongs to * @return * @since */ public function checkCategoryPath($product_id=false, $category_path=false, $category_id=false, $ordering='NULL', $vendor_id=1) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); $csvilog->addDebug('Checking category'); // Check if there is a product ID if (!$product_id) return false; else { // If product_parent_id is true, we have a child product, child products do not have category paths // We have a category path, need to find the ID if (!$category_id) { // Use CsvCategory() method to confirm/add category tree for this product // Modification: $category_id now is an array $category_id = $this->_csvCategory($category_path, $vendor_id); } // We have a category_id, no need to find the path if ($category_id) { // Delete old entries only if the user wants us to if (!$template->get('append_categories', 'product', false)) { $db = JFactory::getDBO(); $q = "DELETE FROM #__virtuemart_product_categories WHERE virtuemart_product_id = ".$product_id; $db->setQuery($q); $db->query(); $csvilog->addDebug(JText::_('COM_CSVI_DELETE_OLD_CATEGORIES_XREF'), true); } else $csvilog->addDebug(JText::_('COM_CSVI_NOT_DELETE_OLD_CATEGORIES_XREF')); // Insert new product/category relationships $category_xref_values = array('virtuemart_product_id' => $product_id, 'ordering' => $ordering); foreach( $category_id as $value ) { $category_xref_values['virtuemart_category_id'] = $value; $this->_product_categories_xref->bind($category_xref_values); $this->_product_categories_xref->store(); $this->_product_categories_xref->reset(); $category_xref_values['virtuemart_category_id'] = ''; } } } } /** * Load the category related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _loadTables() { $this->_categories = $this->getTable('categories'); $this->_categories_lang = $this->getTable('categories_lang'); $this->_categories_xref = $this->getTable('categories_xref'); $this->_product_categories_xref = $this->getTable('product_categories_xref'); $this->_tables_loaded = true; } /** * Cleaning the product related tables * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.0 */ private function _cleanTables() { $this->_categories->reset(); $this->_categories_lang->reset(); $this->_categories_xref->reset(); // Clean the local variables $class_vars = get_class_vars(get_class($this)); foreach ($class_vars as $name => $value) { if (substr($name, 0, 1) != '_') $this->$name = $value; } } /** * Creates categories from slash delimited line * * @copyright * @author John Syben, RolandD * @todo * @see * @access * @param array $category_path contains the category/categories for a product * @param int $vendor_id the id of the vendor the category belongs to * @return array containing category IDs * @since */ private function _csvCategory($category_path, $vendor_id=1) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $template = $jinput->get('template', null, null); // Load the category separator if (is_null($this->_catsep)) { $this->_catsep = $template->get('category_separator', 'general', '/'); } // Check if category_path is an array, if not make it one if (!is_array($category_path)) $category_path = array($category_path); // Get all categories in this field delimited with | foreach ($category_path as $line) { $csvilog->addDebug('Checking category path: '.$line); // Explode slash delimited category tree into array $category_list = explode($this->_catsep, $line); $category_count = count($category_list); $category_parent_id = '0'; // For each category in array for($i = 0; $i < $category_count; $i++) { // Check the cache first if (array_key_exists($category_parent_id.'.'.$category_list[$i], $this->_category_cache)) { $category_id = $this->_category_cache[$category_parent_id.'.'.$category_list[$i]]; } else { // See if this category exists with it's parent in xref $lang = $template->get('language', 'general'); $query = $db->getQuery(true); $query->select('c.virtuemart_category_id'); $query->from('#__virtuemart_categories c'); $query->leftJoin('#__virtuemart_category_categories x ON c.virtuemart_category_id = x.category_child_id'); $query->leftJoin('#__virtuemart_categories_'.$lang.' l ON l.virtuemart_category_id = c.virtuemart_category_id'); $query->where('l.category_name = '.$db->Quote($category_list[$i])); $query->where('x.category_child_id = c.virtuemart_category_id'); $query->where('x.category_parent_id = '.$category_parent_id); $db->setQuery($query); $category_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_CATEGORY_EXISTS'), true); // Add result to cache $this->_category_cache[$category_parent_id.'.'.$category_list[$i]] = $category_id; } // Category does not exist - create it if (is_null($category_id)) { $timestamp = time(); // Let's find out the last category in the level of the new category $query = $db->getQuery(true); $query->select('MAX(c.ordering) + 1 AS ordering'); $query->from('#__virtuemart_categories c'); $query->leftJoin('#__virtuemart_category_categories x ON c.virtuemart_category_id = x.category_child_id'); $query->where('x.category_child_id = c.virtuemart_category_id'); $query->where('x.category_parent_id = '.$category_parent_id); $db->setQuery($query); $list_order = $db->loadResult(); if (is_null($list_order)) $list_order = 1; // Find the category and flypage setting $configname = 'Csvi'.$template->get('component', 'options').'_Config'; $config = new $configname(); // Add category $this->_categories->set('virtuemart_vendor_id', $vendor_id); $this->_categories->set('created_on', $timestamp); $this->_categories->set('modified_on', $timestamp); $this->_categories->set('ordering', $list_order); $this->_categories->set('published', $this->category_publish); $this->_categories->set('category_template', $config->get('categorytemplate')); $this->_categories->set('category_layout', $config->get('categorylayout')); $this->_categories->set('products_per_row', $config->get('products_per_row')); $this->_categories->set('category_product_layout', $config->get('productlayout')); $this->_categories->store(); $csvilog->addDebug('Add new category:', true); $category_id = $this->_categories->get('virtuemart_category_id'); // Add the category name to the language table $this->_categories_lang->set('virtuemart_category_id', $category_id); $this->_categories_lang->set('category_name', $category_list[$i]); $this->_categories_lang->check(); $this->_categories_lang->store(); // Add result to cache $this->_category_cache[$category_parent_id.'.'.$category_list[$i]] = $category_id; // Create xref with parent $this->_categories_xref->set('category_parent_id', $category_parent_id); $this->_categories_xref->set('category_child_id', $category_id); $this->_categories_xref->store(); $csvilog->addDebug('Add new category xref:', true); // Clean for the next row $this->_categories->reset(); $this->_categories_lang->reset(); $this->_categories_xref->reset(); } // Set this category as parent of next in line $category_parent_id = $category_id; } $category[] = $category_id; } // Return an array with the last category_ids which is where the product goes return $category; } } ?>PK>\vmodels/cron.phpnuW+Ainput; $db = JFactory::getDbo(); $settings = $jinput->get('com_csvi.data', array(), 'array'); $cronline = ''; $notemplate = false; $details = new StdClass; // Get the template used $template_id = $jinput->get('template_id', 0, 'int'); if ($template_id) { $cronline .= ' template_id="'.$template_id.'"'; // Load the template settings to compare against selection $query = $db->getQuery(true); $query->select('settings'); $query->from('#__csvi_template_settings'); $query->where('id = '.$template_id); $db->setQuery($query); $template = new CsviTemplate(json_decode($db->loadResult(), true)); $details->type = $template->get('action', 'options'); } else { $notemplate = true; // Initialise the details $details->type = $settings['options']['action']; } // Check if this is an import or export cron if ($details->type == 'export') { foreach ($settings as $group => $values) { switch($group) { case 'options': break; case 'general': if ($notemplate) $general = $settings['general']; else $general = CsviHelper::recurseArrayDiff($settings['general'], $template->get('general')); foreach ($general as $name => $setting) { switch ($name) { case 'exportto': if (!empty($setting)) { if ($setting == 'todownload') $setting = 'tofile'; $cronline .= ' jform:general:'.$name.'="'.$setting.'" '; } break; case 'localpath': if (!empty($setting)) { if ($template->get('exportto', 'general') == 'todownload' || $template->get('exportto', 'general') == 'tofile') { $cronline .= ' jform:general:'.$name.'="'.$setting.'" '; } } break; default: if (!empty($setting)) $cronline .= ' jform:general:'.$name.'="'.$setting.'" '; break; } } break; case 'export_fields': if ($notemplate) { if (array_key_exists('export_fields', $settings)) $fields = $settings['export_fields']; else $fields = array(); } else $fields = $template->get('export_fields', '', array()); if (!empty($fields)) { $fields['_selected_name'] = CsviHelper::recurseArrayDiff($settings['export_fields']['_selected_name'], $fields['_selected_name']); if (!empty($fields['_selected_name'])) { $cronline .= ' jform:export_fields:_selected_name = "'.implode('|', $settings['export_fields']['_selected_name']).'|"'; $cronline .= ' jform:export_fields:_column_header = "'.implode('|', $settings['export_fields']['_column_header']).'|"'; $cronline .= ' jform:export_fields:_default_value = "'.implode('|', $settings['export_fields']['_default_value']).'|"'; $cronline .= ' jform:export_fields:_process_field = "'.implode('|', $settings['export_fields']['_process_field']).'|"'; } } break; default: if ($notemplate) $values = $settings[$group]; else $values = CsviHelper::recurseArrayDiff($settings[$group], $template->get($group)); $cronline .= $this->_getCronSetting($values, $group); break; } } } else if ($details->type == 'import') { foreach ($settings as $group => $values) { switch($group) { case 'options': break; case 'import_fields': if ($notemplate) { if (array_key_exists('import_fields', $settings)) $fields = $settings['import_fields']; else $fields = array(); } else { // Create a default value $default = array(); $default['_selected_name'][] = ''; $fields = $template->get('import_fields', '', $default); $fields['_selected_name'] = CsviHelper::recurseArrayDiff($settings['import_fields']['_selected_name'], $fields['_selected_name']); } if (!empty($fields)) { if (!empty($fields['_selected_name'])) { $cronline .= ' jform:import_fields:_selected_name = "'.implode('|', $settings['import_fields']['_selected_name']).'|"'; $cronline .= ' jform:import_fields:_default_value = "'.implode('|', $settings['import_fields']['_default_value']).'|"'; $cronline .= ' jform:import_fields:_process_field = "'.implode('|', $settings['import_fields']['_process_field']).'|"'; } } break; default: if ($notemplate) { $values = $settings[$group]; if (!is_array($values)) { $values = array(); $values[$group] = $settings[$group]; } } else $values = CsviHelper::recurseArrayDiff($settings[$group], $template->get($group)); $cronline .= $this->_getCronSetting($values, $group); break; } } } return $cronline; } /** * Build the command to use for the cron command to do a maintenance task * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string the parameters for the cron line * @since 3.0 */ public function getCronLineMaintenance() { $jinput = JFactory::getApplication()->input; $operation = $jinput->get('operation'); $cronline = 'task="maintenance" operation="'.strtolower($operation).'"'; // Handle the ICEcat settings switch ($operation) { case 'icecatindex': $cronline .= ' icecatlocation="'.$jinput->get('icecatlocation', '', 'var').'"'; $cronline .= ' icecat_gzip="'.$jinput->get('icecat_gzip', 1, 'int').'"'; $icecat_options = $jinput->get('icecat', array(), 'var'); if (!empty($icecat_options)) { $cronline .= ' icecat="'.implode('|', $icecat_options).'"'; } break; case 'restoretemplates': $cronline = ' restore_file=""'; break; } return $cronline; } /** * Create the cron parameter * * @copyright * @author RolandD * @todo * @see * @access private * @param string $values array of values to add to the cronline * @param string $type the name of the export type * @return string the command line * @since 3.0 */ private function _getCronSetting($values, $type) { $cronline = ''; if (is_array($values)) { foreach ($values as $name => $setting) { switch ($name) { case 'custom_table': $cronline .= ' jform:'.$type.'="'.$setting.'"'; break; default: if (!empty($setting)) { if (is_array($setting)) { if (!empty($setting[0])) $cronline .= ' jform:'.$type.':'.$name.'="'.implode('|', $setting).'|"'; } else $cronline .= ' jform:'.$type.':'.$name.'="'.$setting.'"'; } break; } } } return $cronline; } } ?>PK>\ע!((models/install.phpnuW+A_getVersion(); if (empty($version)) $version = 'current'; return $version; } /** * Start performing the upgrade * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string the result of the upgrade * @since 3.0 */ public function getUpgrade() { // Get the currently installed version $version = $this->_translateVersion(); // Migrate the data in the tables if ($this->_migrateTables($version)) $this->_results['messages'][] = JText::_('COM_CSVI_UPGRADE_OK'); // Update the version number in the database $this->_setVersion(); // Load the components $this->_loadComponents(); // Send the results back return $this->_results; } /** * Migrate the tables * * @copyright * @author RolandD * @todo * @see * @access private * @param string $version the version being migrated from * @return bool true if migration is OK | false if errors occured during migration * @since 3.0 */ private function _migrateTables($version) { $db = JFactory::getDbo(); switch ($version) { case '4.0': break; default: break; } } /** * Proxy function for calling the update the available fields * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getAvailableFields() { // Get the logger class $jinput = JFactory::getApplication()->input; $csvilog = new CsviLog(); $jinput->set('csvilog', $csvilog); $model = $this->getModel('Availablefields'); // Prepare to load the available fields $model->prepareAvailableFields(); // Update the available fields $model->getFillAvailableFields(); } /** * Proxy function for installing sample templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getSampleTemplates() { $db = JFactory::getDbo(); // Read the example template file $fp = fopen(JPATH_COMPONENT_ADMINISTRATOR.'/install/example_templates.csv', "r"); if ($fp) { while (($data = fgetcsv($fp, 0, ",")) !== FALSE) { $db->setQuery("INSERT IGNORE INTO #__csvi_template_settings (".$db->quoteName('name').", ".$db->quoteName('settings').") VALUES (".$db->Quote($data[0]).", ".$db->Quote($data[1]).")"); if ($db->query()) { $this->_results['messages'][] = JText::sprintf('COM_CSVI_RESTORE_TEMPLATE', $data[0]); } else { $this->_results['messages'][] = $db->getErrorMsg(); $this->_results['messages'][] = JText::sprintf('COM_CSVI_COMPONENT_HAS_NOT_BEEN_ADDED', $file); } } fclose($fp); } } /** * Create a proxy for including other models * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function getModel($model) { return $this->getInstance($model, 'CsviModel'); } /** * Set the current version in the database * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.1 */ private function _setVersion() { $db = JFactory::getDbo(); $q = "INSERT IGNORE INTO #__csvi_settings (id, params) VALUES (2, '".JText::_('COM_CSVI_CSVI_VERSION')."') ON DUPLICATE KEY UPDATE params = '".JText::_('COM_CSVI_CSVI_VERSION')."'"; $db->setQuery($q); $db->query(); } /** * Get the current version in the database * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.2 */ private function _getVersion() { $db = JFactory::getDbo(); $q = "SELECT params FROM #__csvi_settings WHERE id = 2"; $db->setQuery($q); return $db->loadResult(); } /** * Translate version * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return string with the working version * @since 3.5 */ private function _translateVersion() { $jinput = JFactory::getApplication()->input; $version = $jinput->get('version', 'current', 'string'); switch ($version) { case '4.0.1': case '4.1': case '4.2': return '4.0'; break; default: return $version; break; } } /** * Load supported components * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 4.0 */ private function _loadComponents() { $db = JFactory::getDbo(); jimport('joomla.filesystem.file'); jimport('joomla.filesystem.folder'); $files = JFolder::files(JPATH_COMPONENT_ADMINISTRATOR.'/install', '.sql', false, false, array('.svn', 'CVS', '.DS_Store', '__MACOSX', 'availablefields_extra.sql')); if (!empty($files)) { foreach ($files as $file) { $error = false; if (JFile::exists(JPATH_COMPONENT_ADMINISTRATOR.'/install/'.$file)) { $q = JFile::read(JPATH_COMPONENT_ADMINISTRATOR.'/install/'.$file); $queries = $db->splitSql(JFile::read(JPATH_COMPONENT_ADMINISTRATOR.'/install/'.$file)); foreach ($queries as $query) { $query = trim($query); if (!empty($query)) { $db->setQuery($query); if (!$db->query()) { $this->_results['messages'][] = $db->getErrorMsg(); $error = true; } } } if ($error) $this->_results['messages'][] = JText::sprintf('COM_CSVI_COMPONENT_HAS_NOT_BEEN_ADDED', $file); else $this->_results['messages'][] = JText::sprintf('COM_CSVI_COMPONENT_HAS_BEEN_ADDED', $file); } else $this->_results['messages'][] = JText::sprintf('COM_CSVI_COMPONENT_NOT_FOUND', $file); } } } } ?>PK>\ ;33models/csvi.phpnuW+APK>\=>models/templatetype.phpnuW+AloadForm($this->context, 'templatetype', array('control' => 'jform', 'load_data' => $loadData)); if (empty($form)) return false; return $form; } /** * Method to get the data that should be injected in the form. * * @return mixed The data for the form. * @since 1.6 */ protected function loadFormData() { // Check the session for previously entered form data. $data = JFactory::getApplication()->getUserState('com_csvi.edit.templatetype.data', array()); if (empty($data)) { $data = $this->getItem(); } return $data; } } ?> PK>\Z00controller.phpnuW+A PK>\ changelog.txtnuW+ACSVI Free Author: RolandD Cyber Produksi (contact@csvimproved.com) Website: http://www.csvimproved.com/ Version: 5.15 Date: 1 december 2013 Status: $Id: changelog.txt 2549 2013-11-26 01:42:51Z RolandD $ Legenda: + Added - Removed * Fixed / Changed Changelog Version 5.12 Import * Fixed available fields not always set / Cleanup some code * Fixed VirtueMart category and manufacturer import options General * Fixed database error on installation About / Changed the Magic Quotes check Version 5.11 General / Changed the installation routine Version 4.5.5 Import * Fixed custom fields not added correctly Export * Fixed the shopper_group_name and shopper_group_name_price fields Version 4.5.4 Import * Fixed price shopper group check on VirtueMart Product import * Fixed images path not taken on VirtueMart Product import * Fixed product slug on VirtueMart Product import * Fixed VM version not available * Fixed manufacturer category import on VirtueMart Manufacturer Category import Version 4.5.3.2 Export * Fixed custom paramater delimiter in VirtueMart Product export Version 4.5.3.1 Import * Fixed missing config helper Version 4.5.3 Import * Fixed a missing table file Version 4.5.2 Import * Fixed fatal error in VirtueMart Product import for shopper groups + Added shopper_group_name_price to VirtueMart Product import * Fixed product discount price missing mathop for VirtueMart Product import * Fixed images in subfolders on VirtueMart Product import * Fixed images in subfolders on VirtueMart Media import * Fixed issues with accented characters in error reporting / Updated newly created manufacturers are assigned a category on VirtueMart Product import * Fixed product_packaging and product_box on VirtueMart Product import Export * Fixed issue with price field exports General / Let cron use hostname from settings * Fixed export template not show source Version 4.5.1 Import * Fixed manufacturer slug being recreated on VirtueMart Product import / Changed custom values separator from | to ~ / Changed system limits only applied if they have a value Export * Fixed export limits + Added front-end download option * Fixed cron export General - Removed option to delete CSVI backup tables (tables are no longer created) + Added Live Update Version 4.5 Import + Added multiple shopper groups for VirtueMart product import * Fixed VirtueMart user info import * Fixed fatal error on VirtueMart manufacturer category details import * Fixed shopper group not stored for product Export * Fixed VirtueMart category export * Fixed front-end export Version 4.4 Import + Added product_discount_id to VirtueMart Product import / Updated override value for VirtueMart Product import * Fixed product_discount on VirtueMart Product import Export / Fixed VirtueMart user info export General / Updated installer Version 4.3 Import - Removed setting manufacturer category to 1 on VirtueMart Product import - Removed automatic setting override option / Fixed wait time not being applied + Added removal of manufacturer images on deletion of VirtueMart manufacturers + Added multi-language support to VirtueMart Category import Export * Fixed min_order_level on VirtueMart Product export * Fixed max_order_level on VirtueMart Product export / Changed VirtueMart Product export to handle VirtueMart core changes in prices / Fixed some possible issues on loading VirtueMart order export page * Fixed possible warning with category_id export General + Added some info about the site to the About dialog / Changed PHP requirement to PHP 5.2 / Fixed replacements being stripped - Removed built-in version check, now using Joomla version check Version 4.2 Import * Fixed product discount with a % sign + Added file_url and file_url_thumb fields to VirtueMart Product export + Added min_order_level and max_order_level to VirtueMart product import + Added product_override_price to be converted to dots * Fixed product currency on VirtueMart product import * Fixed undefined warning on VirtueMart manufacturer import * Fixed stockable child products issue on VirtueMart product import + Added VirtueMart Product import stockable variants + Added support for new VirtueMart customtitle field on categories and products - Removed category_path constraint for child products Export * Fixed category selector on VirtueMart products * Fixed manufacturers selection list + Added file_url and file_url_thumb fields to VirtueMart Product export Version 4.1 Import * Fixed I'm Mac option * Fixed image name generation * Fixed cron not using template override * Fixed prices containing commas * Fixed product discount ID not using -1 * Fixed image handling * Fixed product_discount in VirtueMart product import + Added product_override_price in VirtueMart product import Export * Fixed missing custom field export * Fixed manufacturers selection list Version 4.0.1 Import * Fixed VirtueMart transliteration * Fixed image options * Fixed VirtueMart product import custom fields missing ID field Export * Fixed VirtueMart category details export * Fixed export to e-mail * Fixed VirtueMart media import not linking to products + Added Akeeba subscriptions export options * Fixed VirtueMart calculation rule category export * Fixed VirtueMart rating export publish field * Fixed VirtueMart shopperfield export publish field Replacement / Changed replace field not to be mandatory General + Added always load en-GB as backup language / Changed use of INFORMATON_SCHEMA as shared hosts don't always allow this Version 4.0 General / Major rewrite to work with Joomla 2.5 and VirtueMart 2.0 Version 3.7 Import * Fixed product files import for non-images * Fixed combine separator for categories * Fixed order item import not showing log information + Added Billing address and shipping address options to address_type * Fixed checking uppercase image extension Export * Fixed product type names export * Fixed adding signature gives empty column * Fixed missing producttypenames field on product export Version 3.6 Import * Fixed import not taking template text enclosure + Added setting for processing images * Fixed product type parameters import Export * Fixed logdetails link * Fixed product currency not applied * Fixed price conversion not working * Fixed setting the memory limit + Added product_type_name to product type parameters export General + Added component name to template types Version 3.5 Import + Added reset of child products when parent product gets deleted + Added option to skip non-existing files in the product files import * Fixed child products attributes / Reset counters if import crashed * Fixed product type names import not correctly checking product ID * Fixed session not to be overloaded * Fixed thumbnails not created when create image name from product SKU + Added import overrides (like Joomla template overrides) + Added remember last used template + Added support for VMF * Fixed looking for product currency * Fixed checking for existing multiple price * Fixed producttypenames expecting a comma + Added possibility to add fields not in import file Export * Fixed fieldname not used when column header is empty * Fixed attribute_with_tax field + Added shipping fee table for shopper sites - Removed default value for decimal separator - Removed default value for thousand separator + Added product price filter + Added export overrides (like Joomla template overrides) / Updated Google Base export to handle tax field + Added support for VMF * Fixed price_with_discount being incorrect when using fixed value Maintenance / Changed the loading of available fields + Added option to unpublish published products in unpublished categories + Added option to delete CSVI VirtueMart backup tables General * Fixed configuration settings lost between updates * Fixed filtering with the log details / Changed storing of files in the administrator/cache folder to the tmp folder + Added list of available template types and explanation * Fixed settings being reloaded on every request / Changed cron to work with : instead of . for separation of commands + Added support for Admin Tools secret word Version 3.4.1 Import * Fixed missing available fields Version 3.4 Import / Improved import performance * Fixed import timer when using preview * Fixed product type names import when using product_type_id field + Added ICEcat tolerant matching MPN / Improved image handling Export + Added option to only export parent products and products without children + Added option to only export child products and products without children * Fixed field check not returning correct value * Fixed front-end export + Added category state filter to product export General * Fixed Update button on Available Fields page Version 3.3.1 Import * Fixed jumping around of radio buttons * Fixed related products * Fixed thumbnail import to lose / in http:// Export * Fixed jumping around of radio buttons + Added check for combine field General + Added German language * Fixed hardcoded jos in installation - Removed VirtueMart check Version 3.3 Import * Fixed fatal error Call to undefined method CsviLog::AddStat() + Added timer and progressbar / Improved handling of unknown extensions / Updated cron handling in case of errors * Fixed the manufacturer xref not created when only importing manufacturer_name / Not force the path settings Export / Not force the text enclosure * Fixed sh404SEF URLs on cron export * Fixed category_path not using CDATA Maintenance / Cleaned up sample templates + Added staggered import for ICEcat index file + Added gzip option for ICEcat / Cleaned up functions General * Fixed XML nodes map not being converted Version 3.2.3 Export * Another go at fixing the custom table handling General * Fixed available fields showing wrong fields Version 3.2.2 Import * Fixed custom table not showing on loading template Export * Fixed custom table not showing on loading template * Fixed custom table not showing when only 1 selected General * Fixed Empty Database warnings / Updated ICEcat loading Version 3.2.1 General * Fixed Settings could not be saved Version 3.2 Import / Improved error messaging on import errors * Fixed import failing when using template fields * Fixed import looping when running into maximum execution time limit * Fixed result page when not saving log reports / Updated replacements to be editable after saving Export * Fixed category tree not showing more than 2 levels * Fixed frontend XML/HTML export fatal error / Updated replacements to be editable after saving General + Added Settings reset button * Fixed website not showing on HTML selection + Added _POST variables to cron Version 3.1 Import * Fixed cancel button not going back to import screen + Added tax rates import * Fixed fatal error when uploading a file with .txt extension * Fixed fatal error when importing XML with fieldnames * Fixed 0 values being ignored + Added waiting list import Export / Made replacement feature work more granular * Fixed JoomFish languages not being shown + Added tax rates export + Added waiting list export Maintenance * Fixed logdetails on maintenance result screen + Added more options to load ICEcat indexes * Fixed ICEcat index file not importing General * Fixed toolbar buttons Log page not working / Updated help pages * Fixed custom tables not showing when only 1 selected + Added FlexTax (http://www.virtuemartflextax.com/) support / Updated installer Version 3.0 Import / Changed layout to include all settings + Added replacement option + Added load file from FTP / Changed unsupported fields are now skipped, import will use known fields found / Improved status reporting * Fixed user fields import not adding new user fields / Improved the preview + Added option to import based on SKU, MPN or child SKU + Added product type names to the product import + Added option to change case of image name + Added option to empty image data if image does not exist + Added option to keep original image files + Added option to check thumbnail file type * Fixed memory limit of -1 not set correctly + Added cleanup for prices that use currency + Added ICEcat integration for product import + Added ICEcat integration for product type names import + Added ICEcat integration for product files import + Added custom tables import + Added quick add fields option + Added combining of fields + Added option to load file from URL + Added manufacturer_delete field to allow deleting manufacturers + Added resizing of full images + Added category separator setting Export / Changed layout to include all settings + Added replacement to export template + Added FTP support * Fixed time field on review export * Fixed cdate, mdate and product price on multiple prices export * Fixed coupon_value on coupon export * Fixed shipping_rate_value and shipping_rate_package_fee on shipping rates export * Fixed shopper_group_discount on user info export + Added published filter to category, reviews, product type, product files export / Frontend export shows the URL it was called from in the log + Added combining of fields * Fixed category details export grouping too greedy + Added product name to multiple prices export + Added date and time modifiers to the export filename + Added product type names to product export * Fixed child product URLs on export + Added AceSEF support + Added collect debug support + Added custom tables export + Added option to also select subcategories when only parent categories are selected + Added JoomFish translation + Added quick add fields option + Added sort option + Added header/footer options + Added cutomized XML exports + Added category separator setting / Updated product SKU filter to allow for more SKU's General - Removed replacement view - Removed template view - Removed template fields view + Added automatic log cleanup + Added log settings + Added line limit to debug log settings + Added version check + Added internal help system / Upgraded jQuery to version 1.4.4 / Upgraded jQuery UI to version 1.8.6 + Added log details view with filters + Added create option for missing folders / Updated the complete language file * Fixed missing ; on comments in database backup + Added installer + Added template backup/restore + Added help files Version 2.3.18.1 Import * Fixed Call to undefined method TableCsvivirtuemart_templates::getValue() * Fixed product files import not finding image * Fixed memory check if set to -1 Export - Removed check if any templates are defined * Fixed mail not being sent over SMTP Version 2.3.18 Import * Fixed product price to be emptied when importing as unpublished field * Fixed XLS preview to be moved over 1 column * Fixed memory setting of -1 appplied incorrectly Export * Fixed the encryption key not being read correctly * Fixed product type names export getting confused of duplicate column names + Added product name to multiple prices export + Added AceSEF support + Added export filename customizing with date and time tags * Fixed product price export not being formatted correctly on multiple prices export General / Cleaned up log report by removing duplicate line number Version 2.3.17 Import * Fixed non-image product files + Added remote file check (thanks Phil) Maintenance * Fixed possible undefined error on removing empty categories Version 2.3.16.1 Import * Fixed fatal error when cleaning filename Version 2.3.16 Import + Added custom fields import for product files + Added support for default values for XML import (thanks Phil) * Fixed attribute on a non-record node (thanks Phil) * Fixed fatal error on import when creating image name based on product ID Version 2.3.15.1 Import * Fixed a code error on the product type parameters import * Fixed fields for order item import Version 2.3.15 Import / Change the handling of product_box and product_packaging. They both need to be used. * Fixed handling non-image files in another folder * Fixed mixed case headings on import (thanks Phil) + Added suppression of error messages when resizing images (thanks Phil) * Fixed problems with remote URLs (thanks Phil) * Fixed error messages on cron usage (thanks Phil) * Fixed BOM check + Added support for customer number Export / Updating SEF export + Added full_name and order_status_name to order item export Version 2.3.14 Import * Fixed category details import not handling images * Fixed issue with shopper_group_id Export * Update the cron generator * Fixed product type names export matching wrong tablename * Fixed category_name in product export General / Further improvements in image handling Version 2.3.13 Import * Generated image name gets extension none / Polish up image handling * Fix possible warnings on reading column headers Export + Added export filters to Basic export + Added more price fields to use the price format from the template + Added option to turn of SEF URL generation on export Replacement - Removed automatic adding of / before and after regular expression to support modifiers + Added confirmation on replacement delete General / Update jQuery to version 1.4.2 / Improved domain name parsing + On installation whitelist CSVI VirtueMart with RS Firewall (thanks to the RS Firewall team) Version 2.3.12 Import * Fixed field order for XML files / Rename selectfile to choosefile to prevent false/positive + Added Collect debug information to basic import / Workaround for MySQL bug (http://bugs.mysql.com/bug.php?id=37521) Export + Added filter for exporting featured products + Added support for JoomSEF SEF URLs + Added support for Joomla SEF URLs + Added template system limits to export + Added modification date to export filter for user info export General / Improved writable folder check Version 2.3.11 Import / Improved cron support / Improved order import details * Fixed order items import * Fixed order import / Improved image handling / Improved support for downloadable files * Fixed a download issue with non-image product files * Fixed category image handling Export * Fixed front-end export not showing domainname * Fixed some undefined errors on e-mail export General + Added a log viewer Version 2.3.10 Import + Added products per row from VirtueMart config when creating a category on product import / More work on the product files import * Fixed misaligned columns when using template fields / Changed order import behavior. Orders can now be imported with an order ID. Export + Added signature to cron export generator / Better handling of exporting non-existing product type names General + Added overview of folder permissions * Fixed incorrect fields on sample templates + Added more sample templates (order import, order item import) + Added folder checks in About section Version 2.3.9 Import * Fixed external image on product files import * Fixed XLS file eating first column * Fixed preview using template fields / Changed product_discount to properly handle a value of 0 Export + Added option to add a UTF-8 signature (BOM) on export Version 2.3.8 Import * Fixed product stock import * Fixed product files import * Fixed preview not showing when Import lines set to 0 * Fixed first line not being skipped in preview + Added some runtime statistics to cron import Templates * Fixed pasting of file paths Version 2.3.7 Import * Fixed remote images import / Improved error reporting on preview screen + Added use of template ID for cron import * Fixed XLS import Templates + Added template ID to templates list General + Added another JPEG signature Version 2.3.6 Import * Fixed XLS import * Fixed XML mixed case column headers Export * Fixed price_with_discount sometimes calculate incorrectly General * Fixed an issue with installing sample templates / Minor changes for Joomla 1.6 compatibility + Added update button on the Available Fields button * Fixed Empty categories deleting too many categories Version 2.3.5 Import / More work on the image handling Export * Fixed product type names export not to use replacement Templates + Added confirmation dialog for deleting template + Added existing available fields check for the template fields General / Some changes to the cron handler * Fixed error in case of non-existing template in replacement Version 2.3.4 Import * Fixed broken product type parameters import * Fixed cron import / Always uppercase product currency Export + Added order ID list selection * Fixed category details export to be filled with fieldnames in case field is empty * Fixed user info export General + Added the column Cancelled on log view to see if an import was cancelled + Added filter on the Log view Version 2.3.3 Import * Fixed duplicate data on product files import + Added a number of options for image handling / Improved error handling in preview / Rewrote image handling Export * Fixed a possible error using the regex replacement * Fixed price format and this time it should really be fixed / Updated export result screen / Better handling if no export fields are chosen / Better handling of the basic export + Added general export options to the basic export * Fixed front-end export not creating a unique ID General * Fixed the sample templates Version 2.3.2 Import + Added basic import + Product price can now contain thousand separator e.g. 1,300.25 or 1.300,25 * Fixed product files thumbnail not always having correct name * Fixed using wrong path name on image check Export * Fixed price format + Added basic export * Fixed a number of small issues Templates - Removed replace field as it is superseded by the Replacement section General + Added PHP requirement to installation routine Version 2.3.1 Import * Fixed first line being imported * Fixed products always being unpublished * Fixed preview not always showing * Fixed incorrect column check / Cleaned up import files * Fixed shopper group ID not to update correctly on user info import * Fixed vendor ID not to update correctly on user info import * Fixed maintenance not working via cron (Thanks Erik) Replacement + Added option to clone replacement * Fixed pagination to not load all templates General + Added result counters to Replacement, Available Fields and Templates lists + Added sample templates for user info import/export Version 2.3 Import * Fixed import hang + Added advanced XML import (thanks Phil) * Fixed image resizing not handling uppercase extensions + Added support for mixed case fieldnames (thanks Phil) / Changed product_cdate to always be applied if supplied * Fixed external image URLs not creating thumbnails Replacement * Fixed field name not being stored when adding a new replacement Export * Fixed some fields not being replaced General / Changed defaults for text delimiter to , and text enclosure " Version 2.2.1 Import / Changed first line check to handle text delimiters in strings (thanks Phil) * Fixed missing files for order item export * Fixed skipping a line too many with XLS import Export * Fixed missing files for order item export * Fixed category export not grouping on category_name General / Updated log layout / Updated installer package layout Version 2.2 Import + Added order import + Added order items import + Added support for encrypted user passwords. Use the field password_crypt + Added support for image URLs without image name Export + Added order payment method for order export / Changed handling of price format. Check your templates if you customized it !! * Fixed price quantity start from and price quantity end + Added order items export Maintenance + Added VirtueMart backup * Fixed public_html been given 777 permission General * Fixed log details not always showing up * Fixed SQL error on installation * Fixed deprecated messages - Removed all languages except English due to being too old Version 2.1.3 Export * Fixed manufacturer details export not exporting data / Improved the SEF url export for products / Updated domain name handling using cron * Fixed replacement not working as should for product exports General * Fixed Invalid argument warning on using Clean cache * Fixed Argument #1 is not an array on using Clean cache Version 2.1.2 General * Fixed installer not creating export price format column Version 2.1.1 Import * Fixed skipping first line issue (thanks Phil) + Added timer to check for possible script termination * Fixed import hangs when image is corrupted Export + Added select options for multiple price groups Templates + Added check if website is chosen for XML export + Added option to set price format output - Removed the Column Header field for import templates General * Fixed old logs not deleted (thanks Phil) + Added finer control over the replacement, is now set per field + Added field order when using Quick Add Version 2.1 Import * Fixed attribute_with_tax not handling prices in thousands correctly * Fixed LOCAL_FILE_DOESNT_EXIST on import with preview + Added unlimited import * Fixed product type names import not finding new product IDs / Check for valid image creation on generating thumbnails * Fixed shipping rates import * Fixed product type names import not importing on different case + Added cancel button to import process Export * Really fix the product_url * Fixed user details export + Added order last modified date to selection criteria Templates + Add input filter to template list General / Keep configuration between new installations / Change installation to check if old CSV Improved tables exist / Updated log handling + Added clear cache to maintenance + Added number of preview lines in the settings / Updated Hungarian language * Fixed calendars not working on order options Version 2.0.2 Import + Added option to import zip files (only 1 file per zip for now) * Cleanup after imported file is no longer needed / Expanded debug report * Fixed Fatal error: Class 'CsvimprovedModelAvailablefields' not found on Product Type Parameters import * Fixed product price not set correctly / Changed product_tax behavior to do nothing when field is empty * Fixed numerous issues in the product type name import + Added support for image SEF urls Export / Changed product type parameter names export, can now mix different parameter types * Fixed front-end export not working in subdomain * Fixed Column 'list_order' in field list is ambiguous on order export / Updated the replacement during export General + Added Czech language thanks to Komanche * Fixed Update available fields overwriting other product_type_x tables except last one / Clean up for PHP 5.3 compatibility Version 2.0.1 Import / Fixed delimiters not always set correctly / Fixed category_path mistaken for category_id Export / Fixed product_url missing domain name / Fixed picture_url missing forward slash General + Added product_type_x fields to the list of available fields + Added search filter to available fields page / Fixed sorting on available fields page / Updated French language Version 2.0 Import / Improved shopper group ID check * Fixed product_files_url for downloadable products + Added category browse and flypage to new category creation * Fixed product type names to lose HTML formatting + Added option to store remote images on the server + Added option to auto-generate imagenames based on SKU + Added option to unpublish products before import * Fixed possible crash if template type not found on import + Added option to auto-detect CSV delimiter and enclosure characters * Fixed several issues with product files import + Added category_delete field + Added field attribute_with_tax * Fixed product_discount_id keeps previous value + Added userfields import + Added product reviews import + Added product_files_delete option + Added calculations to product_in_stock field / Improved product manufacturer relation check Export * Fixed attribute export causing undefined error + Added initialisation of big SQL selects + Added replacement feature + Added Google Base channel header + Added e-mail export option * Fixed child products not being exported with category filter * Fixed non-existing product discounts to export as 0.00 + Added option to choose VirtueMart Item ID * Fixed issues with sh404SEF + Added category_name to productexport + Added field attribute_with_tax + Added userfields export + Added product reviews export + Added cron command line generator + Added HTML export format + Added front-end export / Fixed multiple category id export Templates + Added Quick Template Fields General * Fixed cron not using language file * Fixed cron not using domain name + Added replacement table + Added maintenance option to cron support + Added settings screen * Fixed tooltips on import/export screen / A lot of optimizations done to product import + Added option to not store logging + Added global category separator + Added sorting to Available Fields + Added sorting to Templates List / Moved sample templates to maintenance section / Updated German language Version 1.9 Import + Added support for ignoring empty lines thanks to doorknob * More fixing of thumbnail creation + Added message on preview screen to click Import * Fixed template fields import not importing duplicate fields * Fixed category details import to not always look for category_id * Fixed user info import to not handle user_info_id correctly + Added extra signature for JPG files + Added test check for delimiters on import failure Export * Fixed price_with_discount export * Fixed price_with_tax export not to remove too many 0 * Fixed writing to file garbles UTF-8 text * Fixed export results not being shown * Fixed undefined property with custom fields on coupon export * Fixed export with same field names to use only the last + Added condition field to Google Base sample as this is now a required field * Fixed Unknown column 'jos_vm_order_user_info.first_name' in 'field list' * Fixed product type names export to be empty when choosing Don't use Templates + Added template name when editing template + Added option to specify different kind of paths * Fixed field order ID to follow the highest order number General + Added delete all option for log entries + Added support for multiple select boxes to cron + Added another jpeg signature + Added German translation thanks to crissxcross / Updated French translation / Updated Hungarian translation / Updated Brazilian-Portugese translation / Updated Slovenian translation Version 1.8.1 Import * Fixed Fatal error: Call to undefined method TableVm_product::setValue() Export * Fixed export could give error not using product_sku Version 1.8 Import * Fixed external images not being resized * Fixed shopper_group_id ignored on user info import * Fixed shopper_group_name not foud on user info import / Changed product file import to use thumbnail sizes from template setting when not creating thumbnail * Fixed thumbnail creation for subfolders. A resized folder MUST be specified now. * Fixed file_url to be always the same for product files import / Changed import not to stop on error but only report it * Fixed user info import not creating shopper vendor xref * Fixed user info import not to create a name for Joomla user * Fixed product files import causing index.php on file download * Fixed shopper <--> vendor relation for user * Fixed undefined errors on userinfoimport * Fixed product_packaging being reset to 0 * Fixed double / in product_url + Added product stock import * Fixed Not overwrite existing data always return product exists when disabled * Fixed manufacturer details import not working without manufacturer_id * Fixed template fields import not handling "not overwrite existing data" correctly * Added check if category_name matches category_path / Updated memory usage check * Fixed incorrect import when using category_path and category_id in upload file * Fixed product files thumbnail not being put in resized/ folder + Added modal window to show template fields * Fixed undefined error in case of incorrect attribute Export * Fixed undefined error for export filename + Added sh404SEF URLs for product URL export * Fixed missing product_box field + Added modal window to show template fields General + Added Russian translation thanks to progressor / Updated Slovenian translation / Updated French translation / Updated Hungarian translation Version 1.7 Import * Fixed bug where filename loses first character on the product files import * Fixed fatal error when overwrite data is unchecked * Fixed fatal error with ToPeriod function * Fixed product_mdate and product_cdate not being processed * Fixed category list order not being processed + Added Joomla user details to user info import * Fixed XML import not using first entry + Added shipping rates import * Improved product deletion * Fixed manufacturer ID import + Added comma to period conversion on multiple prices import + Added detailed output on column mismatch + Added option to import selected columns / Changed filename handling for product files + Added check for category details import if category_name matches category_path Export + Added payment method to order export * Fixed template export not showing template selection list * Fixed template fields export not showing template selection list * Fixed order export to fail on a number of fields + Remove slashes in vendor name on user info export + Added country name to order export + Added Joomla user details to user info export * Fixed category details export + Added shipping rates export + Added currency conversion on export * Fixed missing product_box Templates + Added option to add currency to price on export Maintenance + Added product files table to emtpy database + Added option to remove empty categories General + Added Portugese translation thanks to dadus + Added Brazilian Portugese translation thanks to Igaeta + Added French translation thanks to ahamel + Added Hungarian translation thanks to dkg11hu * Fixed control panel images and links + Added template name to log view + Added Slovenian translation thanks to VidKo + Added Swedish translation thanks to cpthaddock + Added Dutch translation thanks to djors Version 1.6 Import + Added coupon import / Updated thumbnail creation process to check for sensible thumb sizes * Fixed product files import creating duplicate entries * Fixed product type names import warning if product type does not exist * Fixed vendor_id returning no result Export * Fixed product with discount has no tax + Added stock level values to product export + Added user-interactive user selector + Added user-interactive product selector * Fixed Product Type Names not exporting column headers / Changed product type names export not to force lowercase + Added coupon export * Fixed product files export * Fixed manufacturer details export not working + Added product_files_download to product files export + Added product SKU filter for product export + Added product type name filter * Fixed product_attribute not using CDATA Maintenance + Added confirmation message to database delete + Added option to resize product name field General + Added jQuery for improved GUI + Added Croation language thanks to tatamata Version 1.5.2.1 Export * Fixed category export being ignored + Added multiple category selection Version 1.5.2 Import * Fixed error when only importing manufacturer ID * Fixed incorrect preview / Changed processing of related SKU's to be more efficient Export * Fixed product export when manufacturer is set * Fixed fatal error when mysqli is set as database handler * Fixed vendor_id not exporting * Fixed delimiters not duplicated if they occur in the text / Made group by checkbox checked by default + Added order export option to export shipping address in case it exists + Added category selection to product export Templates + Added filter for import/export templates General * Fixed license check / Updated folder layout Version 1.5.1 Import * Fixed manufacturer not assigned to first product if manufacturer doesn't exist / Changed handling of auto creating thumbnails + Added auto creating thumbnails for category details import + Added some performance tweaks / Changed import routine to stop immediately when timeout has been reached / Changed product type names import to only update the parameters specified in uploaded file Export * Fixed incorrect flypage as VirtueMart config is ignored * Fixed group by not ignoring a few custom fields + Added option to set date format on export templates General * Fixed cron not logging out user / Changed informational messages to be no longer classified as success * Fixed some undefined errors in the logging * Fixed version number not always showing on about page Version 1.5 Stable Import / Updated product type parameters / Changed applying system limits only if value is greater than 0 * Fixed template import * Fixed template fields import + Added template_name field to template fields import - Removed converting HTML entities to real characters on product description / Update thumbnail creation check * Fixed undefined errors when database structure is bad Export + Added tab delimiter * Fixed missing price_with_discount field * Fixed template export not showing all templates * Fixed template export in XML format no CDATA tag on cusom field value + Added template_name field to template fields import + Added disable Export button if no templates with fields are found / Fixed handling of templates with 0 fields in case the export gets called / Fixed file export to disk not UTF-8 / Fixed Beslist.nl XML export to not include linebreaks for elements / Fixed errors showing up when no records are found to export * Fixed undefined errors when database structure is bad General / Updated license check / Updated installer to check if database can be read / Updated images Version 1.5 RC 2 Import + Added default currency read from VirtueMart on Multiple Prices import / Fixed shopper groups ignored on Multiple Prices import + Added attributes tag to Product Import + Added product_sku tag to Multiple Prices import + Added shopper_group_name tag to Multiple Prices import * Fixed products per row not working on category details import - Removed UTF-8 conversion as it does more bad than good + Added first manufacturer is assigned to product when importing new products without manufacturer Export * Fixed filtering on address did not work for order and user info export / Changed loading of usernames to not load if there are more than 5000 users + Added disable export templates without fields + Added attributes tag to Product Export + Added product_sku tag to Multiple Prices export + Added shopper_group_name tag to Multiple Prices export / Fixed cron ignoring filepath set in general settings * Fixed product type names export Templates + Added missing text for non-existing images General * Fixed unclosed quotes in installation script * Moved requirements checks to beginning of script + Added memory limits to sample templates + Added removal of images folder on un-installation as Joomla doesn't clean up / Updated install XML DTD / Changed license check - Removed CURL requirement / Replaced license check on external server with license key Version 1.5 RC 1 Import * Fixed tax not associated with product + Added preview column to import selection screen + Added shopper details to user info import * Fixed undefined errors in cron * Fixed undefined errors on result page * Fixed a bug in thumbnail creation where file is not found Export * Fixed undefined error on export result screen / Moved record grouping from order export to general settings + Added user address filter to user info export + Added user vendor filter to user info export + Added user permission filter to user info export + Added custom field to user info export + Added full_name field to user info export (combines first, middle and last name) + Added full_name field to order export (combines first, middle and last name) + Added discount_percentage field to order export (order_discount/order_total) + Added product_price_total field to order export (product_price*product_quantity) + Added total_order_items field to order export (counts number of items per order) + Added shopper details to user info export * Fixed undefined errors in cron * Fixed undefined errors on result page Templates + Added auto increment value when adding template fields / Changed field size of column headers to give more space Maintenance * Fixed not deleting product type names tables > 9 General + Added links to the available fields online help pages * Fixed pagination on available fields page + Added server address to About page / Updated license check for working locally Version 1.5 beta 5 Import / Updated available fields for product import + Added changing product_weight commas to periods + Added changing product_length commas to periods + Added changing product_width commas to periods + Added changing product_height commas to periods - Removed category details from product import Export / Updated available fields for product export * Fixed filename incorrect when downloading file + Added product type export + Added product type parameters export + Added product type names export + Added currency filter to order export / Changed some order export options to multiple select - Removed category details from product export Templates * Fixed file location having mixed path separators Version 1.5 beta 4 Import * Fixed category_id not processed Export * Fixed file location not used when exporting to local file based on template + Added log entry when SQL query is incorrect * Fixed product_parent_sku missing * Fixed local file not saving in the correct folder + Added option to group records together on order export + Added option to select address type on order export * Fixed missing product_sku, product_name on order export Templates * Fixed error message if no templates are created General * Fix icons not showing if installed in subfolder Version 1.5 beta 3.0.1 General / Updated license check * Fixed license expire date incorrectly shown Version 1.5 beta 3 Import * Fixed categories not added correctly + Added product_list Export * Fixed product_name export / Changed product_url to be enclosed in CDATA tags for XML exports * Fixed custom field not handled in product export Templates * Fixed typo in Google Base template * Fixed template list not always showing General / Completely revised language file Version 1.5 beta 2.2 Import * Fixed manufacturer_name not being imported * Fixed tax rate not being imported Export * Fixed category_name Category Details export * Fixed category_path misssing from Category Details export Templates + Added default system values for System Limits General * Fixed error messages when no logs exist Version 1.5 beta 2.1 Import + Added check and warning if no templates exist + Added a default selected template Export + Added check and warning if no templates exist + Added a default selected template * Fixed missing category_path on product export * Fixed missing number of fields General + Added Romanian thanks to Danny Version 1.5 beta 2 Import + Added option to append categories / Fixed bug where multiple categories per product were not imported Export + Added order export by sold product Templates / Fixed wrong save button Version 1.5 beta 1.3 General / Moved the creation of the log object to the parts that use it Version 1.5 beta 1.2 General / Updated license check / Update database table definition to prevent possible key length error Version 1.5 beta 1.1 General / Updated license check Version 1.5 beta 1 Import + Added price calculations for both regular and multiple prices import + Added price_with_tax + Added option to ignore non-existing products + Added manufacturer category ID + Added downloadable files option to Multiple Files import (product_files_download) + Added product_type_parameter_delete option + Added manufacturer_category_details import - Removed 100 character limitation on import preview + Added support for ODS files (OpenOffice Spreadsheet) + Added check if cache folder is writable * Fixed cron support + Added default values from template to preview + Added option to set default thumbnail format + Added user info import Export + Added order export by order number + Added order export by date range + Added order export by order status + Added order export by price + Added order export by customer name + Added removal of linebreaks on export + Added export results to log table * Fixed dates exporting as Unix timestamps * Fixed cron support + Added XML support for Oodle.com + Added user info export / Drastically reduced memory usage on export General / Converted to Joomla 1.5 codebase + Added logging storage + Added browseable list of available fields Version 0.9 Import * Fixed the product type parameters not able to update Export + Added removal of linebreaks for product export * Fixed discount start and end date to export as regular dates * Fixed product type exports were broken * product_thumb_image was exported as product_full_image Templates / Changed field adding and removing to no longer use AJAX / Updated layout to specify add field section General / Changed DB layout check to ensure DB structure consistency Version 0.9 RC 1 Import * Fixed multiple prices import to reset shopper groups * Fixed Fatal error: Class 'product_files' not found in product type parameters Templates * Fixed template not being saved * Fixed manufacturer selection got lost Version 0.9 beta 2 Import * Fixed conversion option lost + Add price field check if entry is numeric * Fixed preview losing convert choice * Fixed cron throwing a GetObject() on a non-object error Export * Fixed order export to include non-existing users * Fixed export not exporting first record Templates * Fixed settings getting lost General / Updated installer script Version 0.9 beta 1 Import + Added cron import via command line + Added support for passwords without salt + Added warning if more than 1 product <--> manufacturer link exists * Fixed manufacturer name not being escaped for database insert * Fixed generic manufacturers created when only importing manufacturer ID + Added category_id + Added custom database fields from the #__vm_product table + Added support for CSVI XML * Improved the file upload handling / Changed the preview layout Export * Fix price_with_discount using wrong discount + Added category_id / Updated Google Base XML for category paths * Fix picture URL path / Updated product description for Google Base to always be filled + Added custom database fields from the #__vm_product table + Added support for CSVI XML + Added export per manufacturer for products Templates + Added export filename + Added system limit settings - Removed standard delimiters + Added wizard for adding and editing templates / Redo Field management * Fix error when publishing no selected fields / Moved renumber icon from toolbar to field list Languages + Added French translation by Michel Loriaut and Xavier Lemoine / Updated Spanish translation by Juan Ferrari / Updated Polish translation by Keran from Quarkbit Software Version 0.8 Stable Import * Fixed attribute_values not properly added * Fixed duplicate product_tax_id Languages / Updated German language file thanks kaltokri Version 0.8 RC 3 Export + Add user_id and product_id fields to order export * Updated XML export by adding CDATA tags * Added UTF-8 encoding to the Froogle XML export / Changed mf_name to manufacturer_name for order export + Added username to order export * Fixed duplication of products on export * Fixed category details export / Changed export filename to use template name Import * Fixed fatal error Call to undefined method CsviSupportedFields::FieldsProductTypeXref() * Fixed cannot access empty property in the rpc file * Fixed Fatal error: Call to undefined method CsviRegistry::CloneObje() + Added Create manufacturer link if none exists * Fixed undefined $debug * Fixed a timeout bug where max_execution_time is set to 0 * Fixed incorrect manufacturer <---> product links * Fixed possible double vendor_id in add product query Maintenance / Changed layout of maintenance page General * Fixed VirtueMart check Version 0.8 RC 2.1 Export * Fix layout of discounted price * Fix exports giving blank files Version 0.8 RC 2 Import * Fixed product_parent_sku deleted on import * Fixed Fatal error: Class 'product_files' not found on multiple prices import - Removed product type cross reference import + Product type names spaces converted to underscores Export + Added Order export * Fix attribute_values for downloadables * Fix incorrect fieldname for order export + Added manufacturer name to order export - Removed product type cross reference export + Added record limits to all exports Templates + Added page navigation to template list + Added filter to field page + Added alternate row colors on template and field page General * Merged the product type cross reference into product type names import Version 0.8 RC 1 Import * Fixed invalid reference in mime type detection * Fixed preview mode broken with imported file only 5 lines * Fixed debug reporting being overridden * Fixed template fields import * Fixed product discount id not being used + Added more details for import preview errors * Fixed product files import * Fixed import not reading fields correctly / Changed loading of template details now uses AJAX Export * Fix hardcoded table prefixes + Add manufacturer export * Fixed incorrect column header / Changed loading of template details now uses AJAX Templates / Changed template fields page to Joomla style + Added button to add custom field * Standard thumb width and height set to 90x90 General - Removed Help section + Added link to wiki (http://www.csvimproved.com/wiki/doku.php/) + Added AJAX support Version 0.8 beta 6 Import + Added option to choose to convert encoding + Added check if iconv is available + Added BOM removal + Added check if memory_get_usage is available * Fixed linenumbers not always showing * Fixed the mdate/cdate import fields + Added default file location path to import template Export - Removed standard UTF-8 export, iconv might not be installed * Fixed the export to file, not being able to write General - Removed PHP 4 support + Added check for PHP 5 installation Version 0.8 beta 5 Import + Added filename to import results + Added button to return to import page on results page + Added manufacturer data import / Changed template list to only show import templates + Added table of site limits for import for user to check + Added check for maximum execution time + Added category details import + Added preview option for templates and template fields + Added character translation to UTF-8 Export * Fixed missing delimiter on product price in CSV export + Added export limits / Changed template list to only show export templates + Added export per shopper group + Added export to local file + Added product url suffix / Changed product_url to force http + Added list of templates to export / Changed export to respect template fields + Added record limits to filename if used + Added category details export / Changed file encoding to be UTF-8 + Added field to export discounted price + Added option to export published/unpublished/both products - Removed full server path from imagename Templates + Added tabs to clarify what options are meant for + Added thumbnail sizes for import - Removed support for required field + Added option to clone templates + Added configurable file location for product files/product images + Added check if no more fields available to add + Added automatic field ordering + Added option to select state of products to export Maintenance * Fixed product type tables not being deleted + Added option to sort categories alphabetically General + Added check if Virtuemart is installed + Added logging class * Recoded import process + Added support for Virtuemart 1.1 display options + Added Italian translation by Crisalex + Added Joomla 1.5 support using legacy mode + Added CSVI standard templates Version 0.8 beta 4.1 Import * Fixed data not being processed * Fixed txt file upload causing foreach error Export * Fixed   not allowed in XML export Version 0.8 beta 4 Import * Fixed preview to show on all product imports + Added multiple prices import to also update prices * Fixed not using default values + Added Excel support * Fixed missing price_delete field - Removed radiobutton selection * Fixed field configuration not matching Export * Fixed bug with product discount that has too many delimiters * Fixed default values not always used * Fixed product_available_date not being exported correctly * Fixed XML entities / Changed export filenames to be more descriptive * Fixed invalid XML file header General * Cleaned up file import code to allow other filetypes to upload + Supported fields now being alphabetized Version 0.8 beta 3 Import + Added tax value import * Fixed import of category names with apostrophe - Removed Empty Database option - Removed the Price List Only Upload obsolete due to templates / Changed page layout + Added template import + Added template fields import Export * Fixed export not using CSVI configuration table * Fixed product_available_date not adding field delimiter / Changed page layout + Added creation of product URL if there is none in the database + Added support for custom column names + Added template export + Added template fields export + Added picture url export + Added price with tax export + Added XML support for beslist.nl + Added XML support for froogle.com * Fixed manufacturer_name and manufacturer_id Templates * Fixed fatal error on templates page * Fixed bug available fields not selected on template ID * Fixed bug where template fields were not deleted on template removal * Fixed cancel returning to templates page showing no templates / Changed page layout + Added custom fields + Added a Froogle Export template Maintenance + Added Empty Database option + Added Removal of orphaned fields + Added Optimization of the CSV Improved tables General + Added Russian translation by Sbmart + Added Spanish translation by Joao + Added Polish translation by Jurek + Added German translation by Jingo + Added icons kindly supplied by Joao / Changed layout of program + Added maintenance page / Changed output totals to only show if count is greater than 0 * Choose language according to Joomla language setting * Split the language file. Help texts are now separated from main texts Version 0.8 beta 2.1 Import * Fixed updating of discounts when field not used * Fixed updating of prices when field not used + Added updating to product type names imports * Fixed preview mode Export * Fixed product type export layout as it had an incorrect column header * Fixed product type names export layout. Removed ^ at the end of the line Version 0.8 beta 2 Import * Fixed fatal error with manufacturer import Export / Changed price export to drop trailing zeroes after second digit * Order export on SKU + Added product type parameters export + Added product type names export General / Changed tab system to use Joomla tabs + Added Joomla toolbar - Removed deletion of tables on uninstall Version 0.8 beta 1 Import * Fixed product type details upload * Fixed error where child products did not have a price set Export + Added product type export * Fixed export of customized ordering + Export now uses the template settings / Changed the types of export to match the types of import Templates / Changed layout of templates * Fixed " and ' as delimiter not showing * Fixed skip first line not being updated General + Converted CSV Improved into Joomla! component * Added product_relations table to empty database list Version 0.7.5 Import * Fixed product adding error in certain cases + Added SQL Error reporting / Changed unsupported fields reporting * Fixed bug with shopper group name if not specified + Added related products + Added multiple files + Added template system for import General + Added attribute documentation + Created CSV Improved language file + Created CSV Improved CSS file - Removed Dutch since the file is too old Version 0.7.4 Import * Fixed error "Missing argument 1 for product_details::ProcessDiscount()." * Fixed first line of file not imported * Fixed not adding or updating products * Fixed category path not updated Version 0.7.3 Import - Removed product_discount_id * Fixed child products upload + Added shopper group name to multiple prices upload * Improved error handling on multiple prices upload * Improved code for stabilizing import Preview * Removed Continue button when an error is encountered General * Updated language file * Updated help texts Version 0.7.2 Import * Fixed error with field enclosure set to none * Fixed error "Cannot break/continue ..." * Fixed undefined variable Configuration * Fixed error with wrong datatype on saving the configuration Version 0.7.1 Import * Fixed product discount not being imported * Fixed problem where download dialog pops up * Fixed update of several fields not working * Fixed price update if price is 0 or blank * Re-added product_discount_id * Fixed child products Export + Added column headers to the Default ordering * Export takes all fields as stated in configuration page General * Improved debug collection * Fixed image not to display from front-end * Fixed navigation bar in front-end after saving configuration * Code rewrite export - Removed required fields from configuration Version 0.7 Import + Added field product_currency + Added option to import product types + Added option to import multiple prices per product + Added option to empty database * Fixed skip first line with preview mode * Fixed updating non-existing prices * Fixed preview layout that is wider than the screen Configuration * Fixed Add Field button does not work * Fixed problem with existing fields in csv table that are not supported General * Code rewrite * Improved debug collection * Updated Documentation tab * Updated Available Fields tab Translations + Added Dutch translation by giovi2002 Version 0.6.1 Import * Fixed preview not working * Fixed preview with Upload price list only * Fixed preview with " or ' as enclosure character * Fixed problem that uploaded file was always saved in cache folder Version 0.6 Import + Added option to use column headers as configuration + Added option to preview import + Added option to collect debug information * Improved support for child products * Fixed bug with date import for product_available_date Export * Fixed broken export General * Replaced text input fields in configuration tab with dropdown menus for easier configuration * Finalized changes Documentation page + Added the About page Version 0.5.1 Import * Fixed bug where Price List Upload only did not work because of not overwriting existing data Version 0.5 Import + Added option to do a Upload price list only * Only product_sku is mandatory now * Fixed bug when using custom enclosure and/or delimeter + Added option to import manufacturers * Fixed bug where product_publish was added twice to the SQL query * Fixed bug where commas in product_price was not replaced with a period * Fixed bug where all fields were imported General * Updated documentation Version 0.4 Import + Added option to import product_available_date using a regular date format + Added option to import product_box + Added option to import product_packaging + Added option to import product discounts * Fixed bug if product_publish is not used, items were not published * Fixed bug if product_delete is not used, items were not added, import crashed General + Added import statistics to the CSV upload result page * Updated the message output on the CSV upload result page * Updated localization * Updated the descriptions on the Available Fields page Version 0.3 Import * Fixed if product_publish is empty, default is now set to Yes * Fixed the vendor id. If no vendor is set, vendor id should be 1 instead of 0 + Added a check for correct number of columns + Added option to choose not to overwrite existing data + Added option to skip the default value and not use the field in the update Settings / Changed default field delimiter to ^ and text enclosure to ~ General + Added a link to the CSV import/export on the CSV upload result page + Added import flow description to readme.txt * Updated the Available Fields page with the minimal required fields * Updated the layout of the import/export tab Version 0.2.1 Import * Fixed a few undefined variables * Fixed check for required fields Version 0.2 Import + Allow empty fields + Made all fields from the product table optional except for product_id, product_sku, vendor_id, cdate, mdate, product_name. + Possibility to delete products on import General + Added a tab with the possible fields that can be used including documentation / Changed layout of the result page / Changed font size on the description page so it reads better in Firefox. Version 0.1 Import + Numbers imported with a comma are changed to a period for correct database insertion. This I found necessary since my locale uses comma as a seperator. The only thing I do not know/understand is, how to get a comma on the webshop frontend? + Imported data is sanitized for database insertion. This means that you can use regular HTML code in your long description or apostrophe in your products name for example. Export + Removed backslashes from the export Settings + Added the delimiter and field closure from Lauries Excel Generator + Added an inputbox for both the delimeter and field closure + Added an option to choose to add column headers General + Renamed Field Required? to Field Included? + Made the system honor the choice to include or not include a field for exportPK>\)assets/.htaccessnuW+A Order allow,deny Deny from all PK>\assets/js/jquery.alerts.jsnuW+A// jQuery Alert Dialogs Plugin // // Version 1.1 // // Cory S.N. LaViska // A Beautiful Site (http://abeautifulsite.net/) // 14 May 2009 // // Visit http://abeautifulsite.net/notebook/87 for more information // // Usage: // jAlert( message, [title, callback] ) // jConfirm( message, [title, callback] ) // jPrompt( message, [value, title, callback] ) // // History: // // 1.00 - Released (29 December 2008) // // 1.01 - Fixed bug where unbinding would destroy all resize events // // License: // // This plugin is dual-licensed under the GNU General Public License and the MIT License and // is copyright 2008 A Beautiful Site, LLC. // (function($) { $.alerts = { // These properties can be read/written by accessing $.alerts.propertyName from your scripts at any time verticalOffset: -75, // vertical offset of the dialog from center screen, in pixels horizontalOffset: 0, // horizontal offset of the dialog from center screen, in pixels/ repositionOnResize: true, // re-centers the dialog on window resize overlayOpacity: .01, // transparency level of overlay overlayColor: '#FFF', // base color of overlay draggable: true, // make the dialogs draggable (requires UI Draggables plugin) okButton: ' OK ', // text for the OK button cancelButton: ' Cancel ', // text for the Cancel button dialogClass: null, // if specified, this class will be applied to all dialogs // Public methods alert: function(message, title, callback) { if( title == null ) title = 'Alert'; $.alerts._show(title, message, null, 'alert', function(result) { if( callback ) callback(result); }); }, confirm: function(message, title, callback) { if( title == null ) title = 'Confirm'; $.alerts._show(title, message, null, 'confirm', function(result) { if( callback ) callback(result); }); }, prompt: function(message, value, title, callback) { if( title == null ) title = 'Prompt'; $.alerts._show(title, message, value, 'prompt', function(result) { if( callback ) callback(result); }); }, // Private methods _show: function(title, msg, value, type, callback) { $.alerts._hide(); $.alerts._overlay('show'); $("BODY").append( ''); if( $.alerts.dialogClass ) $("#popup_container").addClass($.alerts.dialogClass); // IE6 Fix var pos = ($.browser.msie && parseInt($.browser.version) <= 6 ) ? 'absolute' : 'fixed'; $("#popup_container").css({ position: pos, zIndex: 99999, padding: 0, margin: 0 }); $("#popup_title").text(title); $("#popup_content").addClass(type); $("#popup_message").text(msg); $("#popup_message").html( $("#popup_message").text().replace(/\n/g, '
') ); $("#popup_container").css({ minWidth: $("#popup_container").outerWidth(), maxWidth: $("#popup_container").outerWidth() }); $.alerts._reposition(); $.alerts._maintainPosition(true); switch( type ) { case 'alert': $("#popup_message").after(''); $("#popup_ok").click( function() { $.alerts._hide(); callback(true); }); $("#popup_ok").focus().keypress( function(e) { if( e.keyCode == 13 || e.keyCode == 27 ) $("#popup_ok").trigger('click'); }); break; case 'confirm': $("#popup_message").after(''); $("#popup_ok").click( function() { $.alerts._hide(); if( callback ) callback(true); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback(false); }); $("#popup_ok").focus(); $("#popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); break; case 'prompt': $("#popup_message").append('
').after(''); $("#popup_prompt").width( $("#popup_message").width() ); $("#popup_ok").click( function() { var val = $("#popup_prompt").val(); $.alerts._hide(); if( callback ) callback( val ); }); $("#popup_cancel").click( function() { $.alerts._hide(); if( callback ) callback( null ); }); $("#popup_prompt, #popup_ok, #popup_cancel").keypress( function(e) { if( e.keyCode == 13 ) $("#popup_ok").trigger('click'); if( e.keyCode == 27 ) $("#popup_cancel").trigger('click'); }); if( value ) $("#popup_prompt").val(value); $("#popup_prompt").focus().select(); break; } // Make draggable if( $.alerts.draggable ) { try { $("#popup_container").draggable({ handle: $("#popup_title") }); $("#popup_title").css({ cursor: 'move' }); } catch(e) { /* requires jQuery UI draggables */ } } }, _hide: function() { $("#popup_container").remove(); $.alerts._overlay('hide'); $.alerts._maintainPosition(false); }, _overlay: function(status) { switch( status ) { case 'show': $.alerts._overlay('hide'); $("BODY").append(''); $("#popup_overlay").css({ position: 'absolute', zIndex: 99998, top: '0px', left: '0px', width: '100%', height: $(document).height(), background: $.alerts.overlayColor, opacity: $.alerts.overlayOpacity }); break; case 'hide': $("#popup_overlay").remove(); break; } }, _reposition: function() { var top = (($(window).height() / 2) - ($("#popup_container").outerHeight() / 2)) + $.alerts.verticalOffset; var left = (($(window).width() / 2) - ($("#popup_container").outerWidth() / 2)) + $.alerts.horizontalOffset; if( top < 0 ) top = 0; if( left < 0 ) left = 0; // IE6 fix if( $.browser.msie && parseInt($.browser.version) <= 6 ) top = top + $(window).scrollTop(); $("#popup_container").css({ top: top + 'px', left: left + 'px' }); $("#popup_overlay").height( $(document).height() ); }, _maintainPosition: function(status) { if( $.alerts.repositionOnResize ) { switch(status) { case true: $(window).bind('resize', $.alerts._reposition); break; case false: $(window).unbind('resize', $.alerts._reposition); break; } } } } // Shortuct functions jAlert = function(message, title, callback) { $.alerts.alert(message, title, callback); } jConfirm = function(message, title, callback) { $.alerts.confirm(message, title, callback); }; jPrompt = function(message, value, title, callback) { $.alerts.prompt(message, value, title, callback); }; })(jQuery);PK>\)assets/js/.htaccessnuW+A Order allow,deny Deny from all PK>\assets/js/index.htmlnuW+APK>\d5CC assets/js/jquery.tablednd_0_5.jsnuW+A/** * TableDnD plug-in for JQuery, allows you to drag and drop table rows * You can set up various options to control how the system will work * Copyright (c) Denis Howlett * Licensed like jQuery, see http://docs.jquery.com/License. * * Configuration options: * * onDragStyle * This is the style that is assigned to the row during drag. There are limitations to the styles that can be * associated with a row (such as you can't assign a border--well you can, but it won't be * displayed). (So instead consider using onDragClass.) The CSS style to apply is specified as * a map (as used in the jQuery css(...) function). * onDropStyle * This is the style that is assigned to the row when it is dropped. As for onDragStyle, there are limitations * to what you can do. Also this replaces the original style, so again consider using onDragClass which * is simply added and then removed on drop. * onDragClass * This class is added for the duration of the drag and then removed when the row is dropped. It is more * flexible than using onDragStyle since it can be inherited by the row cells and other content. The default * is class is tDnD_whileDrag. So to use the default, simply customise this CSS class in your * stylesheet. * onDrop * Pass a function that will be called when the row is dropped. The function takes 2 parameters: the table * and the row that was dropped. You can work out the new order of the rows by using * table.rows. * onDragStart * Pass a function that will be called when the user starts dragging. The function takes 2 parameters: the * table and the row which the user has started to drag. * onAllowDrop * Pass a function that will be called as a row is over another row. If the function returns true, allow * dropping on that row, otherwise not. The function takes 2 parameters: the dragged row and the row under * the cursor. It returns a boolean: true allows the drop, false doesn't allow it. * scrollAmount * This is the number of pixels to scroll if the user moves the mouse cursor to the top or bottom of the * window. The page should automatically scroll up or down as appropriate (tested in IE6, IE7, Safari, FF2, * FF3 beta * dragHandle * This is the name of a class that you assign to one or more cells in each row that is draggable. If you * specify this class, then you are responsible for setting cursor: move in the CSS and only these cells * will have the drag behaviour. If you do not specify a dragHandle, then you get the old behaviour where * the whole row is draggable. * * Other ways to control behaviour: * * Add class="nodrop" to any rows for which you don't want to allow dropping, and class="nodrag" to any rows * that you don't want to be draggable. * * Inside the onDrop method you can also call $.tableDnD.serialize() this returns a string of the form * []=&[]= so that you can send this back to the server. The table must have * an ID as must all the rows. * * Other methods: * * $("...").tableDnDUpdate() * Will update all the matching tables, that is it will reapply the mousedown method to the rows (or handle cells). * This is useful if you have updated the table rows using Ajax and you want to make the table draggable again. * The table maintains the original configuration (so you don't have to specify it again). * * $("...").tableDnDSerialize() * Will serialize and return the serialized string as above, but for each of the matching tables--so it can be * called from anywhere and isn't dependent on the currentTable being set up correctly before calling * * Known problems: * - Auto-scoll has some problems with IE7 (it scrolls even when it shouldn't), work-around: set scrollAmount to 0 * * Version 0.2: 2008-02-20 First public version * Version 0.3: 2008-02-07 Added onDragStart option * Made the scroll amount configurable (default is 5 as before) * Version 0.4: 2008-03-15 Changed the noDrag/noDrop attributes to nodrag/nodrop classes * Added onAllowDrop to control dropping * Fixed a bug which meant that you couldn't set the scroll amount in both directions * Added serialize method * Version 0.5: 2008-05-16 Changed so that if you specify a dragHandle class it doesn't make the whole row * draggable * Improved the serialize method to use a default (and settable) regular expression. * Added tableDnDupate() and tableDnDSerialize() to be called when you are outside the table */ jQuery.tableDnD = { /** Keep hold of the current table being dragged */ currentTable : null, /** Keep hold of the current drag object if any */ dragObject: null, /** The current mouse offset */ mouseOffset: null, /** Remember the old value of Y so that we don't do too much processing */ oldY: 0, /** Actually build the structure */ build: function(options) { // Set up the defaults if any this.each(function() { // This is bound to each matching table, set up the defaults and override with user options this.tableDnDConfig = jQuery.extend({ onDragStyle: null, onDropStyle: null, // Add in the default class for whileDragging onDragClass: "tDnD_whileDrag", onDrop: null, onDragStart: null, scrollAmount: 5, serializeRegexp: /[^\-]*$/, // The regular expression to use to trim row IDs serializeParamName: null, // If you want to specify another parameter name instead of the table ID dragHandle: null // If you give the name of a class here, then only Cells with this class will be draggable }, options || {}); // Now make the rows draggable jQuery.tableDnD.makeDraggable(this); }); // Now we need to capture the mouse up and mouse move event // We can use bind so that we don't interfere with other event handlers jQuery(document) .bind('mousemove', jQuery.tableDnD.mousemove) .bind('mouseup', jQuery.tableDnD.mouseup); // Don't break the chain return this; }, /** This function makes all the rows on the table draggable apart from those marked as "NoDrag" */ makeDraggable: function(table) { var config = table.tableDnDConfig; if (table.tableDnDConfig.dragHandle) { // We only need to add the event to the specified cells var cells = jQuery("td."+table.tableDnDConfig.dragHandle, table); cells.each(function() { // The cell is bound to "this" jQuery(this).mousedown(function(ev) { jQuery.tableDnD.dragObject = this.parentNode; jQuery.tableDnD.currentTable = table; jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); if (config.onDragStart) { // Call the onDrop method if there is one config.onDragStart(table, this); } return false; }); }) } else { // For backwards compatibility, we add the event to the whole row var rows = jQuery("tr", table); // get all the rows as a wrapped set rows.each(function() { // Iterate through each row, the row is bound to "this" var row = jQuery(this); if (! row.hasClass("nodrag")) { row.mousedown(function(ev) { if (ev.target.tagName == "TD") { jQuery.tableDnD.dragObject = this; jQuery.tableDnD.currentTable = table; jQuery.tableDnD.mouseOffset = jQuery.tableDnD.getMouseOffset(this, ev); if (config.onDragStart) { // Call the onDrop method if there is one config.onDragStart(table, this); } return false; } }).css("cursor", "move"); // Store the tableDnD object } }); } }, updateTables: function() { this.each(function() { // this is now bound to each matching table if (this.tableDnDConfig) { jQuery.tableDnD.makeDraggable(this); } }) }, /** Get the mouse coordinates from the event (allowing for browser differences) */ mouseCoords: function(ev){ if(ev.pageX || ev.pageY){ return {x:ev.pageX, y:ev.pageY}; } return { x:ev.clientX + document.body.scrollLeft - document.body.clientLeft, y:ev.clientY + document.body.scrollTop - document.body.clientTop }; }, /** Given a target element and a mouse event, get the mouse offset from that element. To do this we need the element's position and the mouse position */ getMouseOffset: function(target, ev) { ev = ev || window.event; var docPos = this.getPosition(target); var mousePos = this.mouseCoords(ev); return {x:mousePos.x - docPos.x, y:mousePos.y - docPos.y}; }, /** Get the position of an element by going up the DOM tree and adding up all the offsets */ getPosition: function(e){ var left = 0; var top = 0; /** Safari fix -- thanks to Luis Chato for this! */ if (e.offsetHeight == 0) { /** Safari 2 doesn't correctly grab the offsetTop of a table row this is detailed here: http://jacob.peargrove.com/blog/2006/technical/table-row-offsettop-bug-in-safari/ the solution is likewise noted there, grab the offset of a table cell in the row - the firstChild. note that firefox will return a text node as a first child, so designing a more thorough solution may need to take that into account, for now this seems to work in firefox, safari, ie */ e = e.firstChild; // a table cell } while (e.offsetParent){ left += e.offsetLeft; top += e.offsetTop; e = e.offsetParent; } left += e.offsetLeft; top += e.offsetTop; return {x:left, y:top}; }, mousemove: function(ev) { if (jQuery.tableDnD.dragObject == null) { return; } var dragObj = jQuery(jQuery.tableDnD.dragObject); var config = jQuery.tableDnD.currentTable.tableDnDConfig; var mousePos = jQuery.tableDnD.mouseCoords(ev); var y = mousePos.y - jQuery.tableDnD.mouseOffset.y; //auto scroll the window var yOffset = window.pageYOffset; if (document.all) { // Windows version //yOffset=document.body.scrollTop; if (typeof document.compatMode != 'undefined' && document.compatMode != 'BackCompat') { yOffset = document.documentElement.scrollTop; } else if (typeof document.body != 'undefined') { yOffset=document.body.scrollTop; } } if (mousePos.y-yOffset < config.scrollAmount) { window.scrollBy(0, -config.scrollAmount); } else { var windowHeight = window.innerHeight ? window.innerHeight : document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight; if (windowHeight-(mousePos.y-yOffset) < config.scrollAmount) { window.scrollBy(0, config.scrollAmount); } } if (y != jQuery.tableDnD.oldY) { // work out if we're going up or down... var movingDown = y > jQuery.tableDnD.oldY; // update the old value jQuery.tableDnD.oldY = y; // update the style to show we're dragging if (config.onDragClass) { dragObj.addClass(config.onDragClass); } else { dragObj.css(config.onDragStyle); } // If we're over a row then move the dragged row to there so that the user sees the // effect dynamically var currentRow = jQuery.tableDnD.findDropTargetRow(dragObj, y); /** if (currentRow) { // TODO worry about what happens when there are multiple TBODIES if (movingDown && jQuery.tableDnD.dragObject != currentRow) { jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); } } */ if (currentRow) { // TODO worry about what happens when there are multiple TBODIES if (movingDown && jQuery.tableDnD.dragObject != currentRow) { if(currentRow.parentNode == jQuery.tableDnD.dragObject.parentNode) { jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow.nextSibling); } } else if (! movingDown && jQuery.tableDnD.dragObject != currentRow) { if(currentRow.parentNode == jQuery.tableDnD.dragObject.parentNode) { jQuery.tableDnD.dragObject.parentNode.insertBefore(jQuery.tableDnD.dragObject, currentRow); } } } } return false; }, /** We're only worried about the y position really, because we can only move rows up and down */ findDropTargetRow: function(draggedRow, y) { var rows = jQuery.tableDnD.currentTable.rows; for (var i=0; i rowY - rowHeight) && (y < (rowY + rowHeight))) { // that's the row we're over // If it's the same as the current row, ignore it if (row == draggedRow) {return null;} var config = jQuery.tableDnD.currentTable.tableDnDConfig; if (config.onAllowDrop) { if (config.onAllowDrop(draggedRow, row)) { return row; } else { return null; } } else { // If a row has nodrop class, then don't allow dropping (inspired by John Tarr and Famic) var nodrop = jQuery(row).hasClass("nodrop"); if (! nodrop) { return row; } else { return null; } } return row; } } return null; }, mouseup: function(e) { if (jQuery.tableDnD.currentTable && jQuery.tableDnD.dragObject) { var droppedRow = jQuery.tableDnD.dragObject; var config = jQuery.tableDnD.currentTable.tableDnDConfig; // If we have a dragObject, then we need to release it, // The row will already have been moved to the right place so we just reset stuff if (config.onDragClass) { jQuery(droppedRow).removeClass(config.onDragClass); } else { jQuery(droppedRow).css(config.onDropStyle); } jQuery.tableDnD.dragObject = null; if (config.onDrop) { // Call the onDrop method if there is one config.onDrop(jQuery.tableDnD.currentTable, droppedRow); } jQuery.tableDnD.currentTable = null; // let go of the table too } }, serialize: function() { if (jQuery.tableDnD.currentTable) { return jQuery.tableDnD.serializeTable(jQuery.tableDnD.currentTable); } else { return "Error: No Table id set, you need to set an id on your table and every row"; } }, serializeTable: function(table) { var result = ""; var tableId = table.id; var rows = table.rows; for (var i=0; i 0) result += "&"; var rowId = rows[i].id; if (rowId && rowId && table.tableDnDConfig && table.tableDnDConfig.serializeRegexp) { rowId = rowId.match(table.tableDnDConfig.serializeRegexp)[0]; } result += tableId + '[]=' + rowId; } return result; }, serializeTables: function() { var result = ""; this.each(function() { // this is now bound to each matching table result += jQuery.tableDnD.serializeTable(this); }); return result; } } jQuery.fn.extend( { tableDnD : jQuery.tableDnD.build, tableDnDUpdate : jQuery.tableDnD.updateTables, tableDnDSerialize: jQuery.tableDnD.serializeTables } );PK>\\ assets/js/jquery.timers.jsnuW+A/** * jQuery.timers - Timer abstractions for jQuery * Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com) * Licensed under the WTFPL (http://sam.zoy.org/wtfpl/). * Date: 2009/10/16 * * @author Blair Mitchelmore * @version 1.2 * **/ jQuery.fn.extend({ everyTime: function(interval, label, fn, times) { return this.each(function() { jQuery.timer.add(this, interval, label, fn, times); }); }, oneTime: function(interval, label, fn) { return this.each(function() { jQuery.timer.add(this, interval, label, fn, 1); }); }, stopTime: function(label, fn) { return this.each(function() { jQuery.timer.remove(this, label, fn); }); } }); jQuery.extend({ timer: { global: [], guid: 1, dataKey: "jQuery.timer", regex: /^([0-9]+(?:\.[0-9]*)?)\s*(.*s)?$/, powers: { // Yeah this is major overkill... 'ms': 1, 'cs': 10, 'ds': 100, 's': 1000, 'das': 10000, 'hs': 100000, 'ks': 1000000 }, timeParse: function(value) { if (value == undefined || value == null) return null; var result = this.regex.exec(jQuery.trim(value.toString())); if (result[2]) { var num = parseFloat(result[1]); var mult = this.powers[result[2]] || 1; return num * mult; } else { return value; } }, add: function(element, interval, label, fn, times) { var counter = 0; if (jQuery.isFunction(label)) { if (!times) times = fn; fn = label; label = interval; } interval = jQuery.timer.timeParse(interval); if (typeof interval != 'number' || isNaN(interval) || interval < 0) return; if (typeof times != 'number' || isNaN(times) || times < 0) times = 0; times = times || 0; var timers = jQuery.data(element, this.dataKey) || jQuery.data(element, this.dataKey, {}); if (!timers[label]) timers[label] = {}; fn.timerID = fn.timerID || this.guid++; var handler = function() { if ((++counter > times && times !== 0) || fn.call(element, counter) === false) jQuery.timer.remove(element, label, fn); }; handler.timerID = fn.timerID; if (!timers[label][fn.timerID]) timers[label][fn.timerID] = window.setInterval(handler,interval); this.global.push( element ); }, remove: function(element, label, fn) { var timers = jQuery.data(element, this.dataKey), ret; if ( timers ) { if (!label) { for ( label in timers ) this.remove(element, label, fn); } else if ( timers[label] ) { if ( fn ) { if ( fn.timerID ) { window.clearInterval(timers[label][fn.timerID]); delete timers[label][fn.timerID]; } } else { for ( var fn in timers[label] ) { window.clearInterval(timers[label][fn]); delete timers[label][fn]; } } for ( ret in timers[label] ) break; if ( !ret ) { ret = null; delete timers[label]; } } for ( ret in timers ) break; if ( !ret ) jQuery.removeData(element, this.dataKey); } } } }); jQuery(window).bind("unload", function() { jQuery.each(jQuery.timer.global, function(index, item) { jQuery.timer.remove(item); }); }); PK>\Y~nnassets/js/jquery.jsnuW+A/*! jQuery v1.7.1 jquery.com | jquery.org/license */ (function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cv(a){if(!ck[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){cl||(cl=c.createElement("iframe"),cl.frameBorder=cl.width=cl.height=0),b.appendChild(cl);if(!cm||!cl.createElement)cm=(cl.contentWindow||cl.contentDocument).document,cm.write((c.compatMode==="CSS1Compat"?"":"")+""),cm.close();d=cm.createElement(a),cm.body.appendChild(d),e=f.css(d,"display"),b.removeChild(cl)}ck[a]=e}return ck[a]}function cu(a,b){var c={};f.each(cq.concat.apply([],cq.slice(0,b)),function(){c[this]=a});return c}function ct(){cr=b}function cs(){setTimeout(ct,0);return cr=f.now()}function cj(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ci(){try{return new a.XMLHttpRequest}catch(b){}}function cc(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;g=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?parseFloat(d):j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.1",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a&&typeof a=="object"&&"setInterval"in a},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
a",d=q.getElementsByTagName("*"),e=q.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=q.getElementsByTagName("input")[0],b={leadingWhitespace:q.firstChild.nodeType===3,tbody:!q.getElementsByTagName("tbody").length,htmlSerialize:!!q.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:q.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0},i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete q.test}catch(s){b.deleteExpando=!1}!q.addEventListener&&q.attachEvent&&q.fireEvent&&(q.attachEvent("onclick",function(){b.noCloneEvent=!1}),q.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),q.appendChild(i),k=c.createDocumentFragment(),k.appendChild(q.lastChild),b.checkClone=k.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,k.removeChild(i),k.appendChild(q),q.innerHTML="",a.getComputedStyle&&(j=c.createElement("div"),j.style.width="0",j.style.marginRight="0",q.style.width="2px",q.appendChild(j),b.reliableMarginRight=(parseInt((a.getComputedStyle(j,null)||{marginRight:0}).marginRight,10)||0)===0);if(q.attachEvent)for(o in{submit:1,change:1,focusin:1})n="on"+o,p=n in q,p||(q.setAttribute(n,"return;"),p=typeof q[n]=="function"),b[o+"Bubbles"]=p;k.removeChild(q),k=g=h=j=q=i=null,f(function(){var a,d,e,g,h,i,j,k,m,n,o,r=c.getElementsByTagName("body")[0];!r||(j=1,k="position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",m="visibility:hidden;border:0;",n="style='"+k+"border:5px solid #000;padding:0;'",o="
"+""+"
",a=c.createElement("div"),a.style.cssText=m+"width:0;height:0;position:static;top:0;margin-top:"+j+"px",r.insertBefore(a,r.firstChild),q=c.createElement("div"),a.appendChild(q),q.innerHTML="
t
",l=q.getElementsByTagName("td"),p=l[0].offsetHeight===0,l[0].style.display="",l[1].style.display="none",b.reliableHiddenOffsets=p&&l[0].offsetHeight===0,q.innerHTML="",q.style.width=q.style.paddingLeft="1px",f.boxModel=b.boxModel=q.offsetWidth===2,typeof q.style.zoom!="undefined"&&(q.style.display="inline",q.style.zoom=1,b.inlineBlockNeedsLayout=q.offsetWidth===2,q.style.display="",q.innerHTML="
",b.shrinkWrapBlocks=q.offsetWidth!==2),q.style.cssText=k+m,q.innerHTML=o,d=q.firstChild,e=d.firstChild,h=d.nextSibling.firstChild.firstChild,i={doesNotAddBorder:e.offsetTop!==5,doesAddBorderForTableAndCells:h.offsetTop===5},e.style.position="fixed",e.style.top="20px",i.fixedPosition=e.offsetTop===20||e.offsetTop===15,e.style.position=e.style.top="",d.style.overflow="hidden",d.style.position="relative",i.subtractsBorderForOverflowNotVisible=e.offsetTop===-5,i.doesNotIncludeMarginInBodyOffset=r.offsetTop!==j,r.removeChild(a),q=a=null,f.extend(b,i))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.nodeName.toLowerCase()]||f.valHooks[this.type];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.nodeName.toLowerCase()]||f.valHooks[g.type];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;h=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/\bhover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")}; f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&i.push({elem:this,matches:d.slice(e)});for(j=0;j0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling(a.parentNode.firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|canvas|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/",""],legend:[1,"
","
"],thead:[1,"","
"],tr:[2,"","
"],td:[3,"","
"],col:[2,"","
"],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
","
"]),f.fn.extend({text:function(a){if(f.isFunction(a))return this.each(function(b){var c=f(this);c.text(a.call(this,b,c.text()))});if(typeof a!="object"&&a!==b)return this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a));return f.text(this)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function() {for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){if(a===b)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(var c=0,d=this.length;c1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||!bc.test("<"+a.nodeName)?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g;b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);var h=[],i;for(var j=0,k;(k=a[j])!=null;j++){typeof k=="number"&&(k+="");if(!k)continue;if(typeof k=="string")if(!_.test(k))k=b.createTextNode(k);else{k=k.replace(Y,"<$1>");var l=(Z.exec(k)||["",""])[1].toLowerCase(),m=bg[l]||bg._default,n=m[0],o=b.createElement("div");b===c?bh.appendChild(o):U(b).appendChild(o),o.innerHTML=m[1]+k+m[2];while(n--)o=o.lastChild;if(!f.support.tbody){var p=$.test(k),q=l==="table"&&!p?o.firstChild&&o.firstChild.childNodes:m[1]===""&&!p?o.childNodes:[];for(i=q.length-1;i>=0;--i)f.nodeName(q[i],"tbody")&&!q[i].childNodes.length&&q[i].parentNode.removeChild(q[i])}!f.support.leadingWhitespace&&X.test(k)&&o.insertBefore(b.createTextNode(X.exec(k)[0]),o.firstChild),k=o.childNodes}var r;if(!f.support.appendChecked)if(k[0]&&typeof (r=k.length)=="number")for(i=0;i=0)return b+"px"}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return br.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bq,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bq.test(g)?g.replace(bq,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){var c;f.swap(a,{display:"inline-block"},function(){b?c=bz(a,"margin-right","marginRight"):c=a.style.marginRight});return c}})}),c.defaultView&&c.defaultView.getComputedStyle&&(bA=function(a,b){var c,d,e;b=b.replace(bs,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b)));return c}),c.documentElement.currentStyle&&(bB=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f===null&&g&&(e=g[b])&&(f=e),!bt.test(f)&&bu.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f||0,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),bz=bA||bB,f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)});var bD=/%20/g,bE=/\[\]$/,bF=/\r?\n/g,bG=/#.*$/,bH=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bI=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bJ=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bK=/^(?:GET|HEAD)$/,bL=/^\/\//,bM=/\?/,bN=/)<[^<]*)*<\/script>/gi,bO=/^(?:select|textarea)/i,bP=/\s+/,bQ=/([?&])_=[^&]*/,bR=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bS=f.fn.load,bT={},bU={},bV,bW,bX=["*/"]+["*"];try{bV=e.href}catch(bY){bV=c.createElement("a"),bV.href="",bV=bV.href}bW=bR.exec(bV.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bS)return bS.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
").append(c.replace(bN,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bO.test(this.nodeName)||bI.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bF,"\r\n")}}):{name:b.name,value:c.replace(bF,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b_(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b_(a,b);return a},ajaxSettings:{url:bV,isLocal:bJ.test(bW[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bX},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bZ(bT),ajaxTransport:bZ(bU),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?cb(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cc(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bH.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bG,"").replace(bL,bW[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bP),d.crossDomain==null&&(r=bR.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bW[1]&&r[2]==bW[2]&&(r[3]||(r[1]==="http:"?80:443))==(bW[3]||(bW[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),b$(bT,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bK.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bM.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bQ,"$1_="+x);d.url=y+(y===d.url?(bM.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bX+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=b$(bU,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)ca(g,a[g],c,e);return d.join("&").replace(bD,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cd=f.now(),ce=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cd++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=b.contentType==="application/x-www-form-urlencoded"&&typeof b.data=="string";if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(ce.test(b.url)||e&&ce.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(ce,l),b.url===j&&(e&&(k=k.replace(ce,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var cf=a.ActiveXObject?function(){for(var a in ch)ch[a](0,1)}:!1,cg=0,ch;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ci()||cj()}:ci,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,cf&&delete ch[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n),m.text=h.responseText;try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cg,cf&&(ch||(ch={},f(a).unload(cf)),ch[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var ck={},cl,cm,cn=/^(?:toggle|show|hide)$/,co=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,cp,cq=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cr;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(cu("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each(["Left","Top"],function(a,c){var d="scroll"+c;f.fn[d]=function(c){var e,g;if(c===b){e=this[0];if(!e)return null;g=cy(e);return g?"pageXOffset"in g?g[a?"pageYOffset":"pageXOffset"]:f.support.boxModel&&g.document.documentElement[d]||g.document.body[d]:e[d]}return this.each(function(){g=cy(this),g?g.scrollTo(a?f(g).scrollLeft():c,a?c:f(g).scrollTop()):this[d]=c})}}),f.each(["Height","Width"],function(a,c){var d=c.toLowerCase();f.fn["inner"+c]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,d,"padding")):this[d]():null},f.fn["outer"+c]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,d,a?"margin":"border")):this[d]():null},f.fn[d]=function(a){var e=this[0];if(!e)return a==null?null:this;if(f.isFunction(a))return this.each(function(b){var c=f(this);c[d](a.call(this,b,c[d]()))});if(f.isWindow(e)){var g=e.document.documentElement["client"+c],h=e.document.body;return e.document.compatMode==="CSS1Compat"&&g||h&&h["client"+c]||g}if(e.nodeType===9)return Math.max(e.documentElement["client"+c],e.body["scroll"+c],e.documentElement["scroll"+c],e.body["offset"+c],e.documentElement["offset"+c]);if(a===b){var i=f.css(e,d),j=parseFloat(i);return f.isNumeric(j)?j:i}return this.css(d,typeof a=="string"?a:a+"px")}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window);PK>\mN5=5=assets/js/csvi.jsnuW+A/** * CSVI JavaScript * * CSVI * Copyright (C) 2006 - 2013 RolandD Cyber Produksi. All rights reserved. * * @package CSVI * @version $Id: csvi.js 2275 2013-01-03 21:08:43Z RolandD $ */ var Csvi = { // Retrieve the template types for the given component loadTemplateTypes: function() { var action = jQuery("#jform_options_action").val(); var component = jQuery("#jform_options_component").val(); jQuery.ajax({ async: false, url: 'index.php', dataType: 'json', data: 'option=com_csvi&task=templatetypes.loadtemplatetypes&format=json&action='+action+'&component='+component, success: function(data) { jQuery('#jform_options_operation > option').remove(); jQuery.each(data, function(value, name) { jQuery('#jform_options_operation').append(jQuery('').val(value).html(name)); }) }, error: function(data, status, statusText) { jAlert(statusText+'\r\n'+data.responseText); } }); }, getData: function(task) { var template_type = jQuery('#jformimport_type').val(); var table_name = jQuery('#jformcustom_table_import').val(); jQuery.ajax({ async: false, url: 'index.php', dataType: 'json', data: 'option=com_csvi&view=export&task='+task+'&format=json&template_type='+template_type+'&table_name='+table_name, success: function(data) { switch (task) { case 'loadtables': loadTables(data); break; case 'loadfields': loadFields(data); break; } }, error:function (xhr, ajaxOptions, thrownError){ jAlert(thrownError); } }); }, /** * Set the maintenance task */ setTask: function(task) { document.adminForm.task.value = task; }, createFolder: function(folder, element) { var spinner = jQuery('#'+element).html(""); jQuery.ajax({ async: false, url: 'index.php', dataType: 'html', data: 'option=com_csvi&task=about.createfolder&format=raw&folder='+folder, success: function(data) { location.reload(); }, error: function(data, status, statusText) { jQuery('#'+element).html(Joomla.JText._('COM_CSVI_ERROR_CREATING_FOLDER')); jAlert(statusText+'\r\n'+data.responseText); } }); }, updateRowClass: function(table) { jQuery("table#"+table+" tr:even").addClass("row0"); jQuery("table#"+table+" tr:odd").addClass("row1"); }, showSource: function(source) { switch (source) { case 'fromserver': jQuery('.importupload, .importftp, .importurl').parent().parent().hide(); jQuery('.importserver').parent().parent().show(); break; case 'fromurl': jQuery('.importupload, .importftp, .importserver').parent().parent().hide(); jQuery('.importurl').parent().parent().show(); break; case 'fromftp': jQuery('.importupload, .importserver, .importurl').parent().parent().hide(); jQuery('.importftp').parent().parent().show(); break; case 'fromupload': jQuery('.importserver, .importftp, .importurl').parent().parent().hide(); jQuery('.importupload').parent().parent().show(); break; case 'todownload': case 'toemail': jQuery('.exportftp').parent().parent().hide(); jQuery('.exportlocalpath').parent().parent().hide(); break; case 'tofile': jQuery('.exportftp').parent().parent().hide(); jQuery('.exportlocalpath').parent().parent().show(); break; case 'toftp': jQuery('.exportlocalpath').parent().parent().hide(); jQuery('.exportftp').parent().parent().show(); break; } return; }, searchUser: function() { _timeout = null; jQuery("#selectuserid tbody").remove(); jQuery("#selectuserid").append('
'); var searchfilter = jQuery("input[name='searchuserbox']").val(); var component = jQuery("#jform_options_component").val(); jQuery.ajax({ async: false, url: 'index.php', datatype: 'json', data: 'option=com_csvi&task=process.getuser&format=json&filter='+searchfilter+'&component='+component, success: function(data) { jQuery("#ajaxuserloading").remove(); jQuery("#selectuserid tbody").remove(); var options = []; var r = 0; options[++r] = ''; if (data.length > 0) { for (var i = 0; i < data.length; i++) { options[++r] = ''; } } options[++r] = ''; jQuery("#selectuserid").append(options.join('')); jQuery("table#selectuserid tr:even").addClass("row0"); jQuery("table#selectuserid tr:odd").addClass("row1"); jQuery('table#selectuserid tbody tr').click(function() { var user_id = jQuery(this).find('td.user_id').html(); /* Check if the user ID is already in the select box */ var existingvals = []; jQuery('select#jform_order_orderuser option').each(function() { var optionval = jQuery(this).val(); if (optionval !== "") existingvals.push(optionval); }); if (jQuery.inArray(user_id, existingvals) >= 0) { return; } else { var options = ''; jQuery("select#jform_order_orderuser").append(options); jQuery("select#jform_order_orderuser option:eq(0)").attr("selected", false); } }); }, error: function(data, status, statusText) { jQuery("#ajaxproductloading").remove(); jAlert(statusText+'\r\n'+data.responseText); } }) }, searchProduct: function() { _timeout = null; jQuery("#selectproductsku tbody").remove(); jQuery("#selectproductsku").append(''); var searchfilter = jQuery("input[name='searchproductbox']").val(); var component = jQuery("#jform_options_component").val(); jQuery.ajax({ async: false, url: 'index.php', datatype: 'json', data: 'option=com_csvi&task=process.getproduct&format=json&filter='+searchfilter+'&component='+component, success: function(data) { jQuery("#ajaxproductloading").remove(); jQuery("#selectproductsku tbody").remove(); var options = []; var r = 0; options[++r] = ''; if (data.length > 0) { for (var i = 0; i < data.length; i++) { options[++r] = ''; } } options[++r] = ''; jQuery("#selectproductsku").append(options.join('')); jQuery("table#selectproductsku tr:even").addClass("row0"); jQuery("table#selectproductsku tr:odd").addClass("row1"); jQuery('table#selectproductsku tbody tr').click(function() { var product_sku = jQuery(this).find('td.product_sku').html(); /* Check if the product ID is already in the select box */ var existingvals = []; jQuery('select#jform_order_orderproduct option').each(function() { var optionval = jQuery(this).val(); if (optionval !== "") existingvals.push(optionval); }); if (jQuery.inArray(product_sku, existingvals) >= 0) { return; } else { var options = ''; jQuery("select#jform_order_orderproduct").append(options); jQuery("select#jform_order_orderproduct option:eq(0)").attr("selected", false); } }); }, error: function(data, status, statusText) { jQuery("#ajaxproductloading").remove(); jAlert(statusText+'\r\n'+data.responseText); } }) }, searchItemProduct: function() { _timeout = null; jQuery("#selectitemproductsku tbody").remove(); jQuery("#selectitemproductsku").append(''); var searchfilter = jQuery("input[name='searchitemproductbox']").val(); jQuery.ajax({ async: false, url: 'index.php', datatype: 'json', data: 'option=com_csvi&task=process.getitemproduct&format=json&filter='+searchfilter, success: function(data) { jQuery("#ajaxproductloading").remove(); jQuery("#selectitemproductsku tbody").remove(); var options = []; var r = 0; options[++r] = ''; if (data.length > 0) { for (var i = 0; i < data.length; i++) { options[++r] = ''; } } options[++r] = ''; jQuery("#selectitemproductsku").append(options.join('')); jQuery("table#selectitemproductsku tr:even").addClass("row0"); jQuery("table#selectitemproductsku tr:odd").addClass("row1"); jQuery('table#selectitemproductsku tbody tr').click(function() { var product_sku = jQuery(this).find('td.product_sku').html(); // Check if the product ID is already in the select box var existingvals = []; jQuery('select#jform_orderitem_orderitemproduct option').each(function() { var optionval = jQuery(this).val(); if (optionval !== "") existingvals.push(optionval); }); if (jQuery.inArray(product_sku, existingvals) >= 0) { return; } else { var options = ''; jQuery("select#jform_orderitem_orderitemproduct").append(options); jQuery("select#jform_orderitem_orderitemproduct option:eq(0)").attr("selected", false); } }); }, error: function(data, status, statusText) { jQuery("#ajaxproductloading").remove(); jAlert(statusText+'\r\n'+data.responseText); } }) }, loadExportSites: function(site, selected) { switch (site) { case 'xml': case 'html': jQuery.ajax({ async: false, url: 'index.php', dataType: 'json', data: 'option=com_csvi&task=process.loadsites&format=json&exportsite='+site+'&selected='+selected, success: function(data) { if (data) { jQuery('#jform_general_export_site').parent().html(data); } }, error: function(data, status, statusText) { jAlert(statusText+'\r\n'+data.responseText); } }); jQuery('#jform_general_export_site').parent().parent().show(); break; default: jQuery('#jform_general_export_site').parent().parent().hide(); break; } }, loadCategoryTree: function (lang, component) { jQuery.ajax({ async: false, url: 'index.php', dataType: 'json', data: 'option=com_csvi&task=process.loadcategorytree&format=json&language='+lang+'&component='+component, success: function(data) { if (data) { jQuery('#jform_product_product_categories > option').remove(); jQuery.each(data, function(key, item) { jQuery('#jform_product_product_categories').append(jQuery('').val(item.value).html(item.text)); }) jQuery("#jform_product_product_categories > option:first").attr("selected", "true"); } }, error: function(data, status, statusText) { jAlert(statusText+'\r\n'+data.responseText); } }); } } var CsviMaint = { loadOptions: function(option) { jQuery('#optionfield').empty(); switch (option) { case 'emptydatabase': message = Joomla.JText._('COM_CSVI_CONFIRM_DB_DELETE'); jConfirm(message, Joomla.JText._('COM_CSVI_'+option+'_LABEL'), function(r) { if (r) { Csvi.setTask('maintenance.'+option); } else { Csvi.setTask('maintenance.maintenance'); } }) break; case 'removecsvitables': message = Joomla.JText._('COM_CSVI_CONFIRM_CSVITABLES_DELETE'); jConfirm(message, option, function(r) { if (r) { Csvi.setTask('maintenance.'+option); } else { Csvi.setTask('maintenance.maintenance'); } }) break; case 'backuptemplates': jQuery('#optionfield').empty().append(''); Csvi.setTask('maintenance.'+option); break; case 'restoretemplates': jQuery('#optionfield').empty().append(''); Csvi.setTask('maintenance.'+option); break; case 'icecatindex': jQuery.ajax({ async: false, url: 'index.php', dataType: 'html', data: 'option=com_csvi&task=maintenance.icecatsettings&format=raw', success: function(data) { jQuery('#optionfield').empty().append(data); }, error: function(data, status, statusText) { jQuery('#optionfield').empty(); jAlert(statusText+'\r\n'+data.responseText); } }); Csvi.setTask('maintenance.'+option); break; case 'sortcategories': jQuery.ajax({ async: false, url: 'index.php', dataType: 'html', data: 'option=com_csvi&task=maintenance.sortcategories&format=raw', success: function(data) { jQuery('#optionfield').empty().append(data); }, error: function(data, status, statusText) { jQuery('#optionfield').empty(); jAlert(statusText+'\r\n'+data.responseText); } }); Csvi.setTask('maintenance.'+option); break; default: Csvi.setTask('maintenance.'+option); break; } }, loadOperation: function(component) { jQuery('#optionfield').empty(); jQuery.ajax({ async: false, url: 'index.php', dataType: 'html', data: 'option=com_csvi&task=maintenance.operations&component='+component+'&format=raw', success: function(data) { jQuery('#operation').html(data); }, error: function(data, status, statusText) { jQuery('#operation').empty(); jAlert(statusText+'\r\n'+data.responseText); } }); } } // Set the live events var _timeout = null; var notallowedkeys = [9, 10, 16, 17, 18, 20, 27, 37, 38, 39, 40, 92, 93]; jQuery("#searchuser, #searchproduct, #searchitemproduct").live('keyup', function(e) { if (jQuery.inArray(e.keyCode, notallowedkeys) >= 0) { return; } else { if(_timeout != null) { clearTimeout(_timeout); _timeout = null; } var callfunc = jQuery(this)[0].id; switch (callfunc) { case 'searchuser': _timeout = setTimeout('Csvi.searchUser()', 1000); break; case 'searchproduct': _timeout = setTimeout('Csvi.searchProduct()', 1000); break; case 'searchitemproduct': _timeout = setTimeout('Csvi.searchItemProduct()', 1000); break; } } })PK>\:fٔ$$assets/js/jquery-ui.jsnuW+A/*! * jQuery UI 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI */ (function(c,j){function k(a){return!c(a).parents().andSelf().filter(function(){return c.curCSS(this,"visibility")==="hidden"||c.expr.filters.hidden(this)}).length}c.ui=c.ui||{};if(!c.ui.version){c.extend(c.ui,{version:"1.8.10",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106, NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}});c.fn.extend({_focus:c.fn.focus,focus:function(a,b){return typeof a==="number"?this.each(function(){var d=this;setTimeout(function(){c(d).focus();b&&b.call(d)},a)}):this._focus.apply(this,arguments)},scrollParent:function(){var a;a=c.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter(function(){return/(relative|absolute|fixed)/.test(c.curCSS(this, "position",1))&&/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0):this.parents().filter(function(){return/(auto|scroll)/.test(c.curCSS(this,"overflow",1)+c.curCSS(this,"overflow-y",1)+c.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!a.length?c(document):a},zIndex:function(a){if(a!==j)return this.css("zIndex",a);if(this.length){a=c(this[0]);for(var b;a.length&&a[0]!==document;){b=a.css("position"); if(b==="absolute"||b==="relative"||b==="fixed"){b=parseInt(a.css("zIndex"),10);if(!isNaN(b)&&b!==0)return b}a=a.parent()}}return 0},disableSelection:function(){return this.bind((c.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});c.each(["Width","Height"],function(a,b){function d(f,g,l,m){c.each(e,function(){g-=parseFloat(c.curCSS(f,"padding"+this,true))||0;if(l)g-=parseFloat(c.curCSS(f, "border"+this+"Width",true))||0;if(m)g-=parseFloat(c.curCSS(f,"margin"+this,true))||0});return g}var e=b==="Width"?["Left","Right"]:["Top","Bottom"],h=b.toLowerCase(),i={innerWidth:c.fn.innerWidth,innerHeight:c.fn.innerHeight,outerWidth:c.fn.outerWidth,outerHeight:c.fn.outerHeight};c.fn["inner"+b]=function(f){if(f===j)return i["inner"+b].call(this);return this.each(function(){c(this).css(h,d(this,f)+"px")})};c.fn["outer"+b]=function(f,g){if(typeof f!=="number")return i["outer"+b].call(this,f);return this.each(function(){c(this).css(h, d(this,f,true,g)+"px")})}});c.extend(c.expr[":"],{data:function(a,b,d){return!!c.data(a,d[3])},focusable:function(a){var b=a.nodeName.toLowerCase(),d=c.attr(a,"tabindex");if("area"===b){b=a.parentNode;d=b.name;if(!a.href||!d||b.nodeName.toLowerCase()!=="map")return false;a=c("img[usemap=#"+d+"]")[0];return!!a&&k(a)}return(/input|select|textarea|button|object/.test(b)?!a.disabled:"a"==b?a.href||!isNaN(d):!isNaN(d))&&k(a)},tabbable:function(a){var b=c.attr(a,"tabindex");return(isNaN(b)||b>=0)&&c(a).is(":focusable")}}); c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&&a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a); return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){c(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;a.target==this._mouseDownEvent.target&&c.data(a.target,this.widgetName+".preventClickEvent", true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); ;/* * jQuery UI Position 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Position */ (function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); ;/* * jQuery UI Draggable 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Draggables * * Depends: * jquery.ui.core.js * jquery.ui.mouse.js * jquery.ui.widget.js */ (function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== "original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;return true},_mouseStart:function(a){var b=this.options;this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top- this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions(); d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);return true},_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis|| this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b=false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&& this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle||!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this== a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone():this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&&a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]|| 0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0], this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top- (parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment== "parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[(a.containment=="document"?0:d(window).scrollLeft())-this.offset.relative.left-this.offset.parent.left,(a.containment=="document"?0:d(window).scrollTop())-this.offset.relative.top-this.offset.parent.top,(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"? 0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){var b=d(a.containment)[0];if(b){a=d(a.containment).offset();var c=d(b).css("overflow")!="hidden";this.containment=[a.left+(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0)-this.margins.left,a.top+(parseInt(d(b).css("borderTopWidth"), 10)||0)+(parseInt(d(b).css("paddingTop"),10)||0)-this.margins.top,a.left+(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,a.top+(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"),10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}}else if(a.containment.constructor== Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop(): f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,g=a.pageY; if(this.originalPosition){if(this.containment){if(a.pageX-this.offset.click.leftthis.containment[2])e=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g-this.originalPageY)/ b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?e:!(e-this.offset.click.left').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")})}, stop:function(){d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)})}});d.ui.plugin.add("draggable","opacity",{start:function(a,b){a=d(b.helper);b=d(this).data("draggable").options;if(a.css("opacity"))b._opacity=a.css("opacity");a.css("opacity",b.opacity)},stop:function(a,b){a=d(this).data("draggable").options;a._opacity&&d(b.helper).css("opacity",a._opacity)}});d.ui.plugin.add("draggable","scroll",{start:function(){var a=d(this).data("draggable");if(a.scrollParent[0]!= document&&a.scrollParent[0].tagName!="HTML")a.overflowOffset=a.scrollParent.offset()},drag:function(a){var b=d(this).data("draggable"),c=b.options,f=false;if(b.scrollParent[0]!=document&&b.scrollParent[0].tagName!="HTML"){if(!c.axis||c.axis!="x")if(b.overflowOffset.top+b.scrollParent[0].offsetHeight-a.pageY=0;h--){var i=c.snapElements[h].left,k=i+c.snapElements[h].width,j=c.snapElements[h].top,l=j+c.snapElements[h].height;if(i-e').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),k=0;k=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,k);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){e(this).removeClass("ui-resizable-autohide");b._handles.show()},function(){if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()}; if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a=false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(), d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"});this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset= this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff={width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio: this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis];if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize", b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false},_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height; f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f,{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing"); this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateCache:function(b){this.offset=this.helper.offset();if(l(b.left))this.position.left=b.left;if(l(b.top))this.position.top=b.top;if(l(b.height))this.size.height=b.height;if(l(b.width))this.size.width=b.width},_updateRatio:function(b){var a=this.position,c=this.size,d=this.axis;if(b.height)b.width=c.height*this.aspectRatio;else if(b.width)b.height=c.width/this.aspectRatio;if(d=="sw"){b.left=a.left+(c.width-b.width);b.top= null}if(d=="nw"){b.top=a.top+(c.height-b.height);b.left=a.left+(c.width-b.width)}return b},_respectSize:function(b){var a=this.options,c=this.axis,d=l(b.width)&&a.maxWidth&&a.maxWidthb.width,h=l(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+ this.size.height,k=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&k)b.left=i-a.minWidth;if(d&&k)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left=null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b, a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a, c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]);b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize, originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.10"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(),10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize= b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top-f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var k=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:k.parents(a.originalElement[0]).length?["width","height"]:["width", "height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(k.css("position"))){c._revertToRelativePosition=true;k.css({position:"absolute",top:"auto",left:"auto"})}k.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType?e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})}; if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a=e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height- g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing,step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width, height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement=e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d= e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset;var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options, d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left:a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper? d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top-d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height= a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition,f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&& /static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25,display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable"); b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b=e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/ (a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},l=function(b){return!isNaN(parseInt(b,10))}})(jQuery); ;/* * jQuery UI Dialog 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Dialog * * Depends: * jquery.ui.core.js * jquery.ui.widget.js * jquery.ui.button.js * jquery.ui.draggable.js * jquery.ui.mouse.js * jquery.ui.position.js * jquery.ui.resizable.js */ (function(c,j){var k={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},l={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false,position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&& c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex", -1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g),h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role", "button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id",e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose= b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body");a.uiDialog.remove();a.originalTitle&& a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!==b.uiDialog[0]){e=c(this).css("z-index"); isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.attr("scrollTop"),scrollLeft:d.element.attr("scrollLeft")};c.ui.dialog.maxZ+=1;d.uiDialog.css("z-index",c.ui.dialog.maxZ); d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target===f[0]&&e.shiftKey){g.focus(1);return false}}}); c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a,function(){return!(d=true)});if(d){c.each(a,function(f, h){h=c.isFunction(h)?{click:h,text:f}:h;f=c('').attr(h,true).unbind("click").click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.fn.button&&f.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g= d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition,originalSize:f.originalSize, position:f.position,size:f.size}}a=a===j?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize",f,b(h))},stop:function(f, h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "):[a[0],a[1]];if(b.length=== 1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f);if(g in k)e=true;if(g in l)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"):e.removeClass("ui-dialog-disabled"); break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a=this.options,b,d,e= this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height-b,0));this.uiDialog.is(":data(resizable)")&& this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.10",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "),create:function(a){if(this.instances.length=== 0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(), height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&&c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight); b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
  • #{label}
  • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| (q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= -1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, "cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.10"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.10"})})(jQuery); ;PK>\ZZ%assets/images/csvi_log_details_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<%PLTEQssㅞݘzÙ4^rĚ`掤3a\[z핹њâխЫjhr[ZꈷとgݼvGjзimMs埱ŲDtɪ愣뛽y꘶͝㣸̡,XQtRNS~IDATxb[D\Al 6T˴o*6&VVV&R6@fԻ%xRD8YxTE2dH XΒ՟o%o N]J3B3$}:CsQ~rp؄ F%Y'nՙPʡ+f,_ǰ8۝bz,,c kfJMg=6v ^L& t,?73 2'T7qk1Oׅxn6pg8żJ Z2{QIENDB`PK>\Cb$$assets/images/csvi_clone_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTE㡵Ȝ󋣼Ҩ蠵ۢam}bj|ȥnӅΚҐrud񊢻䥽Гϳۢ޸㌧䓲˫嗬숡}Զ薲ɵXtRNS*=lIDATxbXR D u@l vW4 aV \Ĕ8(o.vn" \:rpp{jY2DKr/j3`P?+?؂/`nJ rŋuK@{I"CVPr PgHȜuSc&8v U/c 9 6@İJM|XIl E9ٳ}8U"3RTSSV8U9,1/  ;/PTIENDB`PK>\|w w assets/images/csvi_new_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE3bHk:kㇴ3\ݝ-Y蓭Ar=oIrFyRvڢ:a[z8e8g@f/\ibNpTt+WݻuTxb:9tRNSS%IDATx| \e_`r  BM(h*W0A@AB3 jta8qP&&tRxnܨg{>yy^df9!L򕤤Ȳ#%dtXYޓXLO"i8qާX$ϹWQѮ)G !C 3se3݈+S"ZSOBђ6.UN@vOZ"e(4Px"V#P9E@-ȧQT\ihp~7vX,z*dA{<ͶSqO45/|Y:!0x}}5suwC~<2+dYutvtvvtc:xhD%*#iv6B`kk i<~0#(*lʳxRf:yg3N}.>88.SbGĬ[7^\R<bPA ThrƢ ::&&B[2^ 2%‰4({|.llܹQQyZZiK` SA-3iQtjp+(aNKB0|2ؽ>;wW?Nw=#fPV(y萣cFn:JW]HpܶW، m,=@2˪7TWm42vK(LF4B⌌,--=ďH!o%BQܦMBB6 .N͓RF$qAgw - zmzjY3 5,+34Z^9)bKlmv6P$ns|$,7$#:ny{Z;̣ofbe:ÁuÄWzzz~ڻwQM]uPzɰ.hbBa9+RZu %hUMz:5uoҚD;nYj^e("zDeb0uM*Et5$Vn98VvX|zQ{\ B!+ltYYyu sDAUcAT({ /'T%8 aJ469C.I{ Lhh_uIENDB`PK>\% assets/images/csvi_import_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE㏥M|dkR,YBj䊺t]3]۠肙ㄴGzLoUuEy@sDxݻ8h}{퉟־`~o>nBf_џ4b]|Iv{EqЃFxR+]'O8qOr;QDWsI:p0iҒSKw*X;}ϟ7TAUUcccd,6`+=%'Hrs{nnQ*6̝LAa.;mab\I e I[ k3}បۨvIJrldʭ\a assets/images/csvi_cron_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE7Sl*2ヨĢk|̚+BN<==LLL555 2;$~&:EDDE$%&q]-FRn-..!"uTTTi%,㒸JkZu#6@2D09z&'(.HW'=H'()(=I,`$?Sh ({#*~ƥ铵νMt\wbjAcۭ䀰Ϟ2.tRNSfY*IDATxڄ \SUE84MaZE2.@S@bf"% `5|ڤ2/{?wL|v;ιqY*yi{rC51zOao$CLLTLX7sptH+81,4tƿv7ADEN3Q{CxXT|Ppw'xbcqcc|(R!YMŹ !v&$B@ \Jqy W|p".sjuCCg9q;&ƹLpC~F{|2,܇jπc{6wj**Z<[oHJ=so!_r,$HGBQ7{* $iE='a8 / /#.81BL?KKwJiT =21A45 ܂qaS2ZȄ"ޤ=!cz RҢ ̲Ҳ YCZ- X} KЁ20>N17M9UѧՖuμC֟yu" B(*ʾtzLz:|_}k7ϼiImq>;=f|U:,_V'm]q3\#ZH2`%dl_yW oWUmc41 6x.֑k&uՐG0ODI myP73JOOi66@T(/f]\9jvT{dCCӬ]M .]X>=|CZڴi 'D `lk+)蓇r[rbLi408]M*kfN2>ac٘ORPk쮶3Y {ҥ~KNݲXV6L8h2MYS.86 s8M+@2दR.)ݰmЈ8䃣ﶱYl܊@PYJ ~\Ѧ%`C\Bassets/images/csvi_logo_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE2CtRNSfYlIDATxboSvXЅe18h緯Y7;_=%]u׸ؿɽ^mх a>w3s0}Sݣ>S3[]wۚgk~Mܽ|v8lnvvM}55}J}m.߾*=yFn V p:ߝ? X۽  庋Q1/^T0!;;BHwX~Z3G% Gê{j0 ~`ymʾrqC̎?6tOm̟ q(7QL䆉*&חZ}A!;W;轚II3g&Z6QkIcvì֗Or-[ I\^>/Og72df)sLd@|0=eii,뫫-3 ?=\q`PAmZ3"UTUT"#&hij[AxAA0rEMEL aEE'\X?M߶lsu4ofW3_K -tarrWYEZ$q 7<&5y?Z-ri*m|||lb&1slk5ĕǶ_WKI&=օF_# ZdcIIEťK%%=g}1 J0VKv͛%=$%Nj$~jabikK=={{VH#QaUy mU-K2:~ywmEmlDm{."2Da=~(WK74}hW_}ra^Y8^1;uˋQ'acIENDB`PK>\J1,;,;assets/images/csvi_logo.pngnuW+APNG  IHDRDj9;sRGBgAMA a pHYsodtEXtSoftwarePaint.NET v3.5.6ЃZ:IDATx^|V#XV}KK+Uu=:8)C@# {=&lٌ@H@Ȃ&wx= DBq9??_ JWs .U{NN}0f¤ 2ҎL=R| |cnyu9ߓ|%+jᜢ hEfgVI?QhRc&hzl9\`6:mLt*3~ߩ濸iO~jҷ|%pܢM=S7rPtHfpz ʬF1{ٝxݮqy?\w@%%p$rC N $1~ _ƿ㏭`N}&7a]yfeF ߙ'|%+˨@n} To7 v!d y Z AB`Vw`9Z3v4OiSr߾w)zK_~љ0B+ԨL:w4 ޒeFn:nFmEFA{Сߠ{رC'Q.f,tCGD9^hJC)( %r(šXi A\gZhF?@!hяA#PaWK9ڡQ !F;z^@?=z999 1 }݉nG qH`pCˑ q38 %Vai(p>/B9Bg<¾<; pk K5'KuS 2ǂ)D9( 8d9 F,ϵP 1 Y A**@0U :+-@w\ x/g1z ,~7\u 1f;F%5((aPP݆`!TMrD>k]5vw{'{ge4X`&dvTB p,,0:=(ȑ#;X4Kg c>(#H`z#DsG7FVtxyopo<<Ʋ}ٿ;#/Hw! @@#5h= k*(wB 2;[(93)׬I-G bjfmF3tےRmC}>WZ(0RTaaX N#@Gq<^( cHFI(z M(py<L> *AU@`CwhPGPР'4pTLJ(N8K`*<BGP}0d<3@^Pja;HÄO@8ѪsRFj?gJdkU',H1S̤^+L &pn|f;3$mO~.p |Wfeԣ%x"Jb'1  ɂr AYYYah%* k-€T` 9Jr=BbyU% +& VA'G$^}/eqesBʒjQ- >T{X$!A3XqX? A#VGi'"B ]3'9+G |7yzbjٰ`ƍfu74/m:wl̙cw %%L47p޽Yf3`w}wĹ"T(&P‰#F8Ҹqa蛴&ML۶m 0Ȃ` -F ?4m 4(lCCo۲e˲-Z??~|ZV4xjiK~gY\`j=9% Xh(~ nXYu:u2n=w 7NZif`L0k_oz饗|`"""sX:t0#Cz?Ob zL2L!Cj>0˴PDw1RN:bAK-?B xMKb_5?={vG}d5kfƎ[B> 𤳟_%5ՌdaB@Hõ-[ *& mh𨒅 A=Y!BA`hx#:ܹs/aVq *}.h0d{{ B㮇b2XRaAUԷ`B.fp&#C}xEgՠm+.3WNSV/3=1~| ^8Xȃ$=Ȼv+A58: ) $R·~t<:ڵku05F8Xi==zd["***uf Ƥ?G=Ҷm Xd&`P}zlT(G`C5zC _@GTtرGгgϓ<>7+z ,w]4ì@~/.{L ^rjvl7`KqeJL0}2z.M!_}8qkKGA<#tҴtlݦFO N:5<#\In dl9-HH2k:0xHԸ ԰˖-+W7=lٲE;4p<}(X0S 9$6m$s)a5З(t[Ù1@a4?e֭~ITXXx]q.S1 ºY rAHdGd:^w' +i5pB,X wqu\z;]'J$ƶ,<0Jd7L&\B d!q0:( YfHRrFOPhA槜8qlW^;PaM4C 9}E(! BC]ʺbd!Xr+RpppՀ2|7z1TxCCG$Yݎ?#}嗆pŁe !7"*Em:Zs}4I>hq-y2d_*z!K.{7 .#ض3ә,TM ۲8#'dQ{j^R6m*Ep0`xAxBy9Gu1α9G!G5e%lQ9%opxB%Uz*&QI 2)mq߈A乼$ ؔ~ ,*G^@-XjӅNL[l-3]T%qog#De0A<*^>Jh=xYw(BOFa &ԨB;P'p PD@K wۙH%[y2.uINj, `W`A @Hrqm޳@}᚟uI<d!w!00u%a9q׽89yCyaW.X<bƌn8= 1fbAb%k~g}vω_/8HԸ̍e\#8x@ 1(4>Dhh""22RY^E9tNPZ@ Z XV]lN4s=JsdO~<cg;pNJsOCfY P&}==Ct^A@X|!;Gƛ.V;G3-4M3Q=XMg2rR+ni[ Pʽu jZ JpulfE'< TjC ь w &NհARRnA@y Pc35h Wju HC||d} Tn.qk Xr 5q{͇cƌ qjAV'G@b9jh @rzK0! v ~lpQh`@M kA9UJ⍨o , mlfۻXfeMRZp;Y_.Goq4&71~(D c{4f5f}fd%—SYJ9xjf3ŠsM!3L렩f}Bb9Hr)5X1z <DDryG.i)5VDKK cf)k@1h΂J SS]p?))%'2]y< ; #eAaAdO$?vROD~;:ySr7KX@P&=Cl3'q@h^6IiC $aO:f`h^=ʿX cT7!6lZO gvе؄ km҂O"Pބ7q>-(>.`{3SӅ{ ` <ooFhˋiN2U DzsͰf@XN0(,h7qt \]t@P= (G6lP\D-K JP1* EتYVxlmެYJY Xt/`<7!W >.\x6sҲq bJA@ !hHp AGb n`"t/b `C, 0l~6dԸ+mG)lU @L-^jFOW Bޕ@zbFy0bmiYw/dիm͊ (ǃɳIJkC9ʁk_ыd HM08L _踃fz v_0Vɱ;Xbo"1sjS ¶G̠Te鹘F:M9PX o׸P'^ܞ{f!s,J2NLo%uؿq3˸^, I,+rMF"jiFƢ 0RQaY  d _: JY<\)IP`C9Z"lWkd}+yFuKf WuiA@U(t$@DhZBh)>f,ͨDh$]P@a6 ^/ئ1N[++nŰ go`@!{Jt-JFћ; }fFFq1&^)hsn}YenB֥ S.ٶ:b8&gr]&(l7Ղ8Ӆ&.3Gf$ bYQmX9P ;k25U֩irZj+jQsUwdHChwER@a v 0t' չHJ#>qJ() zbAAP^خԸg*O* n By-4s?@O Et)B蜞 Mmv mw% H"tnP|k(ML!̳0d# A^رeRh޹֋p5lo} l ܃8Fy]m+ 3QJFH3/%}oܽVWAjxII_G38wG)p$ qZ/$k\[MRrێR<>)3M0zDz O`9#R͈fDV32,LjR<Vl_lFdFf>[#o۽|v핛/ ,ژfVl1&כ/fŘNW6(Iof{JZAknĠ<yd2(fuS()XoEK*:X=O  $S^85J=IvE$92ATel{֪/vv/x uYnٶk741 Fd{4R P>OPSt&)m!GY4Fy'T@=PWqEΨD  M/d*[L5, Q1ڎRgo` .)T ʈ1C7C*kva1;pxyĊ3-jI6.jcoF.Xݲ-f}<;_@H؞n1'%8}4dԚNDxAT ]TwJL_ ԓDs_Ф mc!m6qp%ɓ^x8S 4$XCE[5uynbmxssyj5@Ih+d:0U;z,fڎe/՚^d n4P6Skm5><Qca-yԺ@U-,2{՜'fYҠ#1ۋ%_5b<[Hv7G9,# GW@ÐZq:f(V\׿5FR~ӜzAM1Bc + Px!w9]wY\1)ȺF)CG\$݇xJvc'YҔG= #inϛ$zY <pRVj"%pxWX, ELUVtCy@Qu,՞=hFfuW4 Xj] [g/5kN_%$Qqfµf5h8-tԴaQ!x&ak.5  k  f >'!$r  8gWBD4CNjEz`!@y` ForTg:s Ϩ$P([gb GP[ z+ଶV^˜ N# eBPu֑z/K4}Qee̠ef 8L[o/]m":Ư5J#'ڟ P62#:3dA 1fGnMIL{FS͇G0xpox@РN! .5m@66So27xܳBy[+AUB`0C(?GmAyjj٨\h<Ÿ NxB.y*GpUN^^yWtvӛ|E?x{q,sי טaQf^jzZi5w]Zj{'(eh3x^ mύ@ tt^h>;m  P% #?A*_\I@=j6< WTjb<O:B@ xnö]= p{R+*DjrәW6CQ pZ MGz ӨnO8h~ntUn'Mv}Ճp! V̰yf8Y5~vdYHXDƬ13VDkph BD^"LwLG fb4iq&pX*jFH10@+@xi%dxp A>3SI¨:Σ,F[H@C>pk==jR?FQ+`~{E.z 9/ALBo)Ԍq5D#%CJ{~{ Uw%Q?E|Puvt+.n̿jsz:ZʨפְыiT #`b٫M9kLz7>h~ ̋4CC#̰0 YaVDDA%DFǘf3<4 ns#@3ݧ2]&/ L[>zt3{ua.W%0pf]zE.#L(}V37 6q߃BZ|sL?sϸS˸P`e @z 3_M_i :O\l:oڐ}ƛ潃Oe_ Pϭs^vOㄥtYnL]am># 5^.j \jca2~0cS96Swд=״u&@ }׮݃kJ`ȱ5/%זvcS?W0]z=fS޳0p/K{?-j}~oj~=@i@|>ϱsЈ' |<_Sx T §#kCL.]`:[d> h BVb+d_y_.>`dLi˱[ &4lZ ;+\}+6bΏ>6{y[f nD -q[Eӎ~;?[uȶ2v|qZ4Q n;8c+ wѾKǰ5?2OOD-$ے\=>f <5ۍ{F|ֺvW/9?8LfKZeWb9WWD |>pJ@f킦WM~0lbpy)m?"q;9B3B֮g}ֿQXXwyg5k^L۾g|oᖸG.9,[ )5Si^c[}5rP=ohРAq0Rݓ.뮻4lذVFCQ?swӢӛM?۷EaZ~5jk˞c?ѲOpf9zo>"h{f/k>ī?ˍ}}GXw??C ~`p'we {jb{͏?,롻|0z 0\O&0F 6a?D8?F5fqc1s71;uQlmyمW$yxZp$o3ν{-0  S;]zk ja-^_u Q =b}Coȶ 1wC^.ѐ74S y FCӐB8RR/hKCj!hGWй;5w]Bڄ jwsJ1aa7'@n Ԁ X߀` xLހWA5UO xK6ӀWM'g;@PhTp~ k_gOGv`p$zP|rK5sMYn bwa0ʟRKe}gcy}S}^TW=My{}XK^o}kmE}>B}P;y* rq;00!ӼG\ξAooww;1J.K-^㭋pu1~]^YIuuyUx]^TWJyy}```]P(uc\C]_W0u”;V`p30?>xX|2KïAM\7YM|3-uؾP`u0:z^]O>uxQe~߿8K-{myYh:Pq͵89:„[n73oZ„k?+1kD~5`w`8 ux{0chРAu^i{L*.\:'AA0`p= A-`gPEWf P k$燑_C~-.??1Lg{|\{ ؟ǰ1p ʹ RNvO< ^9 H MiQ'XքZYK&͞(j5k5Sa~x~Oq ?cè;xWv׶ڏ90~\sNr~x$~xj#aG}jɓ~5;eQ=wYIENDB`PK>\ag99assets/images/csvi_reset_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEӹ䓯#N{Imܳ|3a勲uBv鄣\}V}꒿tEy`~喻ұjcm֧I}ٵ¡9dUt4Z:lYFum@dsN͞zPDrc7PpU!^S{UZ斊gB<( ޙX;͛lYI[&U-134lyy '(I7>WPvPJx&PEͺ6Q%,' Ͽ]4‚E(T^˛,#% "a3-ZsnIe,[RWW6ZXXH"'#Ųz%#XWzP*!a9zk/\w ,Y+9mPǜgIʮR6m%jRfe2s_͵Q/fTVW.fбOUvi Ij\EE assets/images/csvi_cancel_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTE㊥vǰӨggɑϱv[DsݳGy꒦>oqDj`dr½[{L~dܯvէ̤Ș림Crycs\vڝ䖩ֺ_eѷ;hs8a즸ˣtRNSJ IDATxbX6-"F 6k.+]l0(T_\LH+JNns). 2k7lPX.2AIƋC3<'%s{Z{ 3m3KR\)նЊGh*LLLM ։nƖA &v‘sg 2ɚ$OLL5w:'Ip+0321f3{.seBAV֯wpOU OW?bIENDB`PK>\JM assets/images/csvi_delete_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE-Y3\2a:a=o:k7g[z,Wib@rBuNp4d/\@fGjpTvTt?rb2)stRNSfYIDATx|XSWoa$%@BA( T@BdYY u!I!vYaQ"*UPRC\7xA;ι|7.J F>'G,Fo?(Bg"W}QLn҈8}`07QIf%-_luNN?;9]ti \V M[ZPoj*zJԮnxҕ?HWOOWWPP҃}0ρx#?}}}7:;nok+-mkkJHq*I T5gI"5nmvww0;E@Q9=EE$+1!PW\d+YId0dr8ūbp=/pA墢KyP> {`($Nr{{nEuPLY){-FKmEW:99edqqqsKD`-hc]\ZZ !liM???H7'OφGh|]Ȉ{ (Fsu==i#.@Lu'il (M Lm ;O==OOk-FF{ʀ@Hȉ]xd1ˀ@2ߗ |D;'(wnp0Q"$ [BNM2ߣG/'"m66Yrx.%mjlrB9sO exeY\^n[VqfR[lfffP}n]EquwoFjkk< gJGGXQ%"Zi:*FC]MͩSxԀ;:4t Ό>2}\5׮3;[qhhh܃~n{1g!ȀLo'&rg6ޖiΌ*'ގޠu LOvr 3=8Mځ0ۙB٢IA UљyIXJvL v/$2PcG ǣD61B3zJϭZAT>_E*،N@JO80;{*_H$?Z]]"QQRajYPS8zFGTP^^fJ9!QWX +-<&G(Gbc"JC ]ˤ^4Ba@w*1{?0GMZRS _-A &9\ѻo9GɑQnP3mUFT/G/2|&a;IENDB`PK>\W%assets/images/csvi_maintenance_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTEq>\}]vəh&HlPpg]v?]~]u<\}l{谾낕A^~kto^|\{`{᧺ʽIeEb)Mq<[|恔Xr@]~暭Ǧpꉜ㒶̛ꄚxգj߬Yr^vmpĬџء䬼C`A]~MiitRNSFIDATxcKI X9S /1dT~{BȔ.bOEkl2x 6P[|,ZDLm*'7H4efnJ) ̹M"h+_\^i$j! 8:RF`yu = %pͶtU-3A(VԬ?GwgŸrщavWs}Yz& q i$PSIENDB`PK>\<_#assets/images/csvi_av_fields_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEw疓yxנhsݜlɟ~ޜkɠ~ߴ߬ݛkyx뻨ç㇄۝oǢkv߰򣜞֦嘔ctRNSS%>IDATxb*|'yX؅e1i5-O?]ڌYΛ{;;;{|?<â EA<͝`߹@rBZ2ggonnn=)ΞyYdoQ: *1gꀠ"(gV#υG޾ ۳T1sûR(}XTБp_ !!SKK88l`sQMD[8(Uu0+gTZ#|iɓ'nk<A30gdTfuf-F=挪Do^L wVVIa7wݑQŐQ;YV^M޽ύ}IK6yDYji}OWΧFzH(8 TPR"aŋ͢@[ėTMk2Ֆ{8~2UFA x^z6ڒ@%Wc7Kv0,*hccd4-m9L(҉^5.be6ǢYN`ָT; u%L0Hھ ]R_fϾ{fS0 uww@,AӱB \ Gt0^SIy?p*TXr*1FbVa3$([ "zQnˤ‰`^X'[zUNʶ98\j@[ZˀjʪA拣d=ez劭 t ZU^Zz^31r7;ym\t! `("IENDB`PK>\f=  assets/images/csvi_save_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEExBu3\-Y=n[zTu:k@fp7g?q:a2a/\vbi4dGj@rNpoNoTt:_+W4cHkTatRNSS%IDATx| \e_jm8 D q :E<*5 ]JK6.B`Ny١Yt,#J"2/<1cF(ӳ S*I02g0l<G]F#!YY.zqŀ&a}kAp?YYYl;;#H`'prڻC`t p鷃nA!8*!ܳ%!J'&3!88n߳ KTe\3`ܸ1*[ zQQ(ѱhOE= Gxc0zBaĐ#(q8DC""ZDF2PC=3ʫW".&a^~P%( QZ8q| ]؛7ϞUhll@kIb0 X~M@#ė'S0ia|%##k֮=~6k׎+/6G}kFg||Zf>BBid(+LJy 0%%B&Q ծ]'sbkZW**'WOHhook;kݙ+m/u*jbn%}RQ+m 8[-0*Wwt6?`N}XMl"OZPNA8yii/>|ZǓ=eE&Cgc64+ /i3, 2DUgRAJKWezdwr%pjA> oit {V JWTTTj\x*Q"T 4\%assets/images/csvi_log_details_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEHoxʜݙڤֲڹ杲-YQ뎫6]aߠBg:iGy􍥽n㞶ҚUvXׯQxhNtQ|ի䇱ͰXxlݳϼꁪǟ䃯˘X`xj{Ǘ]]n×du焜DZܴi`~ݠ〱ЃV䢳ǒ٪katRNSfYAIDATxbi*^ܯ'mr׃e1N WTL(qNI;yWO-yIS7 ;;聉BCbDŽ: Re'V9ɮ.6knkݡ ]zum@0qbmmmLܓ TVibU{O*Vrpe߮P ΛT '~DmXXںb{n{+q0ÿȼW> 87|}+L*^fH-/3HcdrI1<""ZV _R(%u"" umYZ|qϏ-_6!#Kq` +2\Q,222| ~OW>*hZ8̌E 4 TLknj[Kse G#L]?wF4C|Su;Y7QsV_S2,Ld`9GnmZZG..D1M03]m{A6 mx Jێw yym7#K\-"nbf%V[?|Xő/YR)2oN'#ZL@!{O%{vÇv&f.H'4=?Dsr~;e,_ eĩ̼mGhP H ԀCzJ^aj&t=Zj" 6 0r7/3$=B nIENDB`PK>\JaS S assets/images/csvi_export_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEbEx3biBu-Y3\eG{=o:a:k7g@f/\DwGjNppNoG|v@r+WHkbo|jvtRNSS%IDATx| \SUǯ0!Q2`6LSJ05塡(AV84L@wjTd=tn \P=8"S4mR]#\ϋNYЌ^NCgWG=Jw>mk.$`8aX؝w4|vI A47sI$^> Hkp!*E$&Q|uw{m{>tCqIQs &@4I@wHPT=%>~hӴ+9+@;9mm̥͟ iu<辰0o{`fc#@ơ>-d;h4228c|.s==699h\&.[\.dpbWGNC ! QT- s#ـ?&,dr0Bѡ #ȧ$QdeeA2^(PiC1II'o,c86,a?)<<nZK`[X,i3pΜ9yr padjw$f ~([ocb}!`t~~~TlI|: ccAER3U[bccߚ͛P5Aûvv-UU/੪+^aV;IPt7E%'>789N/-Oi) S%` ;P@9}oNf?f' vׁLp'ݸ .fNՁLJ$u ,d ıXaⰆu눋OI@$%d~ݥMW>2t)3u*T N*ukfz#<,LW?5zJ]z֬q <ՙ~~~vJiyTzB*---V\lR ; zJ}@avJ  TV>jCCei92OT4BE@Yxʰ@"Dga%VDPPR4Cķx2:v2yApbXb_}=0!Lxollҥnn< jǞUbB~d*\}}c簇ǸFa^2#*dbeMѸJu/ K3ހ>)irC_G A%Ո峳'UFZՏfXme:8h-09 J6tjXm #Fi-}ha4,4rEY/52@x(k0/>s/EOp25 xo#%}v/h_=IENDB`PK>\assets/images/csvi_clone_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE~YVV6s!뭵&( W<(1lee3PP R6REلNDr=R-Z oׅ*XdƒZ[MS[[[OL GNHﯞ [}A^B_C;58:.a+am~goUb'_ m=, sN(l6;iNP)\ |~ܪ\)/*eSVWgPU#y&` hnss^5^t8m+ZyOAYi`~6|8vsy:O 3i}oJe& U&mp?CzF\u assets/images/csvi_back_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEV-Y2[i3bGk䙵{M|ޫOiIuDhAs;kƞd`Tu:a/\@fNp7g=o[znućrԚQs=tRNSS%IDATx| \eǷlɘ0q_S D.cNRLK.1!,M&)l@8W2@`RC%%Aa%eY6y}=M'I-WV7|W͑&7|2GP |`JdE+4Sb֡#Lz=I]rڬ׺#t/bM!k9++hF/:Z葓Z.; `Yds02\RFFFNee,*DK˲2=p&4C1 ;a2,R;>-0>Vbg<YBBLV_[#9|0pG1>L;݁Esh!7 erI>դ$ڼHS%&%].WAKKOclٲ$d^`*M \%z[yj ="GЀ'="Bߏ %T#CnXw^ZZjkknT _WXYھ\O آZ[!ێP(Zcc(H8ֱ.=(oܸo @Y:U J[6vm]bPPMf633ll2]\\@h =Hbcy"//O{WAFvAW.l#&βe:#;gyH#܋Zj]2*;bY6ubx/@t,do˜JA<4tV̯А @$VwaLPh04$?'?9#1 b2zJQ @G.7弚M&&rQ3xLcC)<\alRQPyz8߲UFҐ+e6Ad+ kEn^E=DQr5(Bk,"^ a d M.)fQ!BT3^NNR %?m9ô2q 00K<$IENDB`PK>\z;| "assets/images/csvi_continue_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE2[-YY3bڢr䙵zM|ޫleGjIuOAsŴ;kdQsa7g=o:a/\@f[zNoTuNpEpulܚIqFtRNSS%&IDATx| \ee &cB00@!@B͸ r"y&t%l 9rjP'fAT+.qLPώy~}xOgc FwWaLfl^Lϑ**KGT(0${4nEfZzØㄨ%͊~狞9MwB!F)"=fY _MssOb +LYu74r7u@?) Mmmun3ښOF 0~⻉45UIUimY4̗CHh4 1qtZȷ#(ZrTqhpmMA\ r)YgDp4ǥBo_@ e fxx`NG3 3<'vxƥ6t_N< d_ Ƞ׃rxח~+NNN p SJp"׬wj^ 5#99S3c +:;#S 鴳so+'13otKƖ p,g5EV] ceElOϑcҭj\]ZZjll<.r*+g1 {z,,>g{~8山(fp,Jm8~[|6.Б zUAAйaO[Y|0c8ONqwwlEPwD59˗dh!`~/+9jtS+|}W\&؎x߄ C b]{J_4?V*o  ԼCSRwLHȯnp=)//ls Oo^X6i);SH$4nl1l А]648xv928Hj;!???n PHKKV9]_Cvii4?Pn BhIIRq2) Ul[;I͋P :#hjiP(v!Beڄ8TBp{{rkl0j}xou|Y+ |'RBd+69 :=] ڣ2Z... >DB_Hbmw*999zZj| jǭ 1ȁb=>lYHxȫυ@/ uƅ{P˝TK Q%H;.J\ׅ2 ud/HvyO/dSo*A2<|^5H̬f% yNȇu$B.ͭRtP#|a-&&r38n0rͅ-VS£[ڨQr7B\RyreWM1Rn.t?BtvQ@jp]أ *(,B &LWpf CDS^N\Mk== assets/images/csvi_import_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTE됦zkrڭVㅪƫvɎLԶk얹wʴ|rzꐥ㢵o㠴z遲Љ䂜{sCvŢq䦼ϓݔݸ㭿ЪBv PԂtRNS\dIDATxbK$28MC@l 649I*۟ ,Y_̜ (n^e@$"&%"K0KrJ+|lDUx5iHdX?qfh ,U/vd^+nWV2LK0Q/bqCάuaiS:yT*D[-{M h)e 1Y1=|@A k93rL{)Y_H@ TlAl(U?T|IENDB`PK>\8V[[assets/images/csvi_logo_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<%PLTE;3'tRNSp IDATxb ҂\V @\3U0~bЌI L`sYMer9X=f1;@%;Rmm/+M;. YY*ʈA%zBBvN4j-.]""$v.CAxvD cWYgrs.*`.w6Xrg]) >6e-r) [F0004-b:}"W2wi`y9HrY@\^9 assets/images/csvi_cancel_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE8hQ}~t4bZzI}\MnUwݪڴYU,YmbEhUz=elƷ1[y}aj[ڥGrCmDxBufu Ͼ톙 4U{rgF__ ^(ysoҤ>0kҐ@PoF}}}7)i,WWީ0 ^ }< |WNsZΦĮM9>wL+,7-%:%K rSlٜfT`R͢TMcP`PӀb* ثq]g{"/?-uॊOd'{NOfd3(Ve?ݭ-*-+czqaj;io= 7k8:fa𩮞GEccQWQ{2'rjW:-4oBJ=w156.0a„o'@@(5ͧ__]W-Hxׂ6oɫz^20tXet_jkCLOGǗ/vH߿:Hx뜎] [:fK;'v%Ďƺba~MI~1*)g']V ˤ> bkdfcWU|<yT((YF$ PEΞ=w]QQsF+(Pah~A^8\j:uRIŸ?)2^JW,SO:k ,+Oa ` ab9? q$Q 5Qf+ ʲE˼ʖl jV#w~K ?D"D >Vh\IENDB`PK>\x!`assets/images/csvi_reset_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<pPLTEK~H}h7^n޾׾놠킱͈c߳鋽ڟޒ醟a嘱Ɲ喴˚ȫކԏ=o>o=f~̙]鉷F{[zcI|0^\~ڸ?eBr[y}ŧݤlHjvF{U1`*V^ގ'KtRNS^IDATxbSEسsl ` ŒNeG8,%6pps2W12m9dƿnNX4׎y\0,%assets/images/csvi_maintenance_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE㞴0Ru줺򎢶9Z{Xr䓧錟bzDa䜭{qUodulブnNiMi~t&Gk(KpOn殾ͤY}i^vNqr{7Xy?`ݯŔ4Tvyyw?]}WwWz.QuԽ棵m٩rsftRNSS%IDATxbzs|[x-U-z+fφ3@sWjcwr=>z8`Wg%pUe+z= DU{1gL|BKZƲ+$+?Ve Q0Z2'3pɽPu V0GݲomI0 US31v T0Uun@2P~ߚ\X#葜2|-į2vGWNk-g0gּ >?.2Q w= /_.NJan֯o7Y\}cNz&#w& /穾W?C?q|*CdB@8q /m\h_? ? assets/images/csvi_add_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE2\=dI}/\1_4^.ZG{4]/[^|K7_0[JmrWwxe?pkтG vRHyW$L+"Qzܰdrρ1L$bD FHw1uzz $g#() /)!aS6l AHޝ=/eH6 b^wkקdu*@8Aٞe{y:bI[[D%ؐDR ´mW9wݿ: ,_X([KK/H TJ%?Sr6l(-|rJD-h֑CPhω:@wź4sȔJ#.D/=hѢ/P:_j>>Q}!!!:)IPIII>w{ROP'>))HnBdqqղ#7j};w)݃쒶p5v%XRrs?DZ,k+++TPɭ e$@Ys||X˗)zn}T ٙ s|ʒ*ZB\wj T%(I!˺ qxww3g>f"mUrjh]*d|U*""= T*զMx"B6<̩*LKGy%%I\^eѵ*IɒL&A"`*kPYxbm,`p( ڸ eU &5jd/DdgC/{-VD WUCWOWު LUMΟ;y oaV5r dO砗U0 %Yzeί1ŧ%უ,'QBkIN>n>/(Bä"j%IENDB`PK>\\,,#assets/images/csvi_av_fields_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTE㯪㥣콰繺屭䲧񲪤水姥宸曪让䯩帵촶뻱㲽㽯V7tRNSIDATxbX rb,\  assets/images/csvi_delete_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEz:k۶ּUu6a2[䣹͔yNtv六ɦ۪芠삮˼뜻Ұj-Yv򍣻㓴}ΆCgިaQ@s/^刢狦ٲVəǘ銭xLn穻ήԴ宾pgw|̢ՙ솞፻֠УװuFxBrtRNSS%|IDATxb {%e10tv9 -}zaI6?ӭ~N7oޤu<BQSavW㄄ͻ5ܽkhx]릜 &6Ɋ.sw_澤K|Su5{ŭ4[[-`gx!&9,ƚYݢVn孭=T{tk #ݭʏ-y{~֎)2DmrzuΧHlxpc?NsXX_ROqvu9P>s:X,'ʀK+B!Ur '-|5bӊ?\֊0J}h1 ===J\篏wZ+1r;{32Ƈڑ {{{;M0L>55 6qqCpTT do>/]-b6gc|nϞYw ٳ7?2*v;6-6@bɓLn|ÿ'W/U0QUI}?$wBW_0ٺL!I?t:`ɤreyuFfΞ;"0Q] Ys.7] t/Z4e^-h-510 H+dIENDB`PK>\CeExʠf9g\)V #assets/images/csvi_av_fields_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEuЇONp:a/\:bb) tRNSS% IDATx| \e_W8Ƚ90+q"w@)X6+ؚ0b:M.  tZYXh~n\2lsrt~e$q*ȲP444tvR327d`hB"FgbSsܺukddhzb;#@A gI%0{j0=  -H%Tik?ehkWƾuKI&{o*@2l8dv2ffȗ~ 5\O|'<퓈;Hgff )~YͰw}}3$ #qL ltu4,oO3w ]G~Sb&&Nw ;s挸W 0,wʩD$b>AQ6kabjj:*SN6edz@l6'acc9*++kJ`/66;Lpļp6翣$Ӧ͐ Lf|)4] zL gmϩ‚9W?`?.7W~VC:boဠ.尿åioniamlR쉩>9oi)S}||J nԷs8 N]cl,GOOHR911qӓR#ٜz TOo?q`CzzQQQ]ўޔv2{ ZZvX*tZZZRA!G8~4btuEZ º!!\7oloJuţ`` $TdCVzyѸ|{E')G,/Ub"„c"""V.Cjn@4o777_bUlm9ϼ ʤr^,AQPhkk 5 ȠM(s0N*JOdxZә[ ?1 H\IY;6U U assets/images/csvi_import_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEgHk3bEyV:k-Y3\_厽٤7g:a[z뎺@f/\DwipBu⎾@ro=ob]O~Np扴둽ٳTtTv+WGvtPmtRNSS%IDATx| \SU/ kHmIӈ a%!M1"s(>UTTC(].&@~>{s~{9s.2=p'BeATfd^yg"%^e$6楴UP `5&( p.ǎ0(!|h'rrO:6Q+jnq/D55ܚdVlimu>Z[|%t+WO )P4M-lL@qP|@( [lM}Ǘŭe2(OEwp*@zuN(pZ\\sx)҅11ffCCGxLLdd[$5;]%>5&&Y},-6rn_YɃg1 }xvv􉉭UU󄪪v E"PT8x))tzY;!{8MxS̀C}8oo^:0INK2Mbcyp8޼"SL:0I[LX6m}Xazb0|Kذןч6r1;յdH,\T'پ5;{>llW&LWWs}@~Zlh>wK,NG+2}(P:##(aʕ&1!XPHHH0ptPՇBHHX B KlL!okW˵A~V> b\wwo ϟu?{?<,(d5;uxWKc0_7"#:j'ђ}}/|3|}ђh4]1!LL028,G %82@$K[ی Ѷ[%ҭK nF6m׍P6,zM}i1~UFF/HNY[IBT02::q'1qK *fWo v T`RY|b5* #C1ʂ%j3:-Jgk 5VeA\^yD;oSƌfbRVoy=ۮGA0NB9z,NÅ,zn`J3JCVJlpyu q3%!̀x'x'k #$XdnAXݏ'3e FuaeIENDB`PK>\passets/images/csvi_cron_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE$9EӒj}ẅ䆆cde@@@㳲㛳kkkbhlGQV")㼺*2 }0CMޞ ⊊ 2<\]]Unӥ5>B⒱dmq())-59Xgq~~~333-..JJJЛTVW>??6C!QRRz{{ぁ `fj6=?''')15'()өWXXO^gY0:ެBFGi#&(vvvۊ.I_3I_+,,(\( assets/images/csvi_logo_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEN tRNSfYjIDATx| ֖F"!j@ȹGkQm䚽mE4^#t91q\GB<5 &#Z4zj픜\8ǩN#rutʹs-,^2x5dt/02a6 #O6G((/'?x^ a*hNNQM ΕBz;/g.v׀б78s Zk3}wRTנN%/X̼<3l+OT-s۶m̴ƬY\_RXC:&¸z0!NPNʅj*>.,_n OP"tL&C{74< `;!Jc:s?IN5TS[ţ:b P_P/LB'$鈦55 /a=R[! &6hh@kBu`V( G(dWK?|lj[8 !Į| Qti$hu7btIENDB`PK>\)assets/images/.htaccessnuW+A Order allow,deny Deny from all PK>\: assets/images/csvi_reset_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEԘܨbk􊢻Ep4c-Y\3\:aQ|[zI~:jExt@ePs=n2`NpMTu7g|.\G{BufZ@q⡸\ՃwOu@pl`T+WipG|Gjv@r:__n߾솱dftŁɐЛәKbfպð1tRNSN!DIDATx| XGו%$$*d5hA H$P)&ZRz$b[#"'." JzhպOI@,7yв=+gc'zKog3?Lg4%gzTh}P/G#*HEyiZ E+oRMB4ogG3 )\RPJ+i'3Y,(_B$*>=NPbTTR[%%(ĩ`4Mdt%S^7Nٷo%#PZ^Αt hQ!URݻ7%%EӥݫRC}VQzԴi,:3-6v0"l12$ϯI{+僀! 1eeee.l40p3/01.| AcP;/T1Z-YI{` 0Z%nݺK.Zȗ2/tHx:Ks̾:ssT099_ /)Nt1rI;d755:멩WZM2\Ά'=c2%KءW\eh([n|oL̆Ŋ02  ߹scg̘aa YB;߁Ylń)_ЀaX(ր2Au:h|~vUDDijwt8p|=д01dbʄÇ 0ͭ@}O8m}##EF?~_OìFziq|Sg/z hГEZF{ib/G Y=i]:-{P 8 vz{4$$Ę8;$䋣GssC˗BGE؈ ?tKwѭ\'{o0TQ(`cظ|Nu#=#5!}^OQ8@{QzJy5000Kx"FaE!)hРAw333'virf渻 ڔwdA=<ʋޱtҝfƙNN":yNԚt󇠠[PVLjmmEoۿ6;e7Bۓ rPWT W8 dk6K&%oɇv7t D8'.;$;q~{wʏ`q ]pwcc??qvm<.Q4s#[EyH$vX'=:ok'5DZF9;J$ͫ~ҥ63VRE$hյ$vmh3ݻUmvԩ8SaM?@vif"4AuAM͑#Gjja6G/'+DhjuA>V `]|uuh`! _w|vUrV$)N<`5&9ӳZׁ\HBĘb9!׺$f%, O9A GlG%Hou'uIENDB`PK>\@assets/images/csvi_new_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEդ.[5c:iys嚴礽Ѥu8_}ɯX}sg~LnUuaaeFltRNSS%GIDATxb§:vX܇e1e\D;]ڜe'uvvN>QOJwN :Dyx;4ٛu tYsΗ'O,*`asa`6xʪ?,籖׆f0(;yV[ 3vN 5?B@n))>Z'Vai;{+p͚ra`51ft0,~)zkWڶS0>-ٳ2rRs2Ƀ쿪(px98s?G6:ho2Wn/~ T8LXsc@pí˻ ݋24WX.5>.MߋGכrqZtѬ ^把Vv@%l-@p)R;oWlbQ1;;.)-M }$%⭹oEnnx`II Bƒ VFJJYYLŮ ],~ݹ^IEIp_,#K@kӋ`t}׮*p%Y!e1VVvK2VjXZc5~B 0NX!Wg*d/%¨"'qVOq *j/VZLMMl2T6#c!0ZΔ@{\O]xpe[(@'3<*IENDB`PK>\ii"assets/images/csvi_continue_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<.PLTE,X4\]:kuۭ䌮Ǵq[p2`Z=d2aYzܬ惰̫m户b,XGj}_:!tRNSi$u IDATxb N"%l<Al ު.83ac;XuPVVV9@U`?$aZݤ-,6 &R=l<\XxV0Jmj?;.be| ݚʋB;Ă,/p`4/u]!lhǠZ%4!A'X|ʘY +R=s26RcސUԞ_>eil&"3깋s8o:=O@y!A)sYzL:!۹٫U(sb `b\SIENDB`PK>\yrrassets/images/csvi_back_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<4PLTE4\Or2`;lRwGj@n䑹ӹOg,X6a,X-Y^}>eꃩs9hݴU ~tRNS. k IDATxb %꘸Lf @lU,1u+C?{*66pVVV*6v(F h6Rfڵ]DC/2VNd jL~<ղ}uIJw&Ni݂8D[O.:]%%ys˖&p2pxnn'7c^ 6@^!Uw?IENDB`PK>\_ڊccassets/images/csvi_save_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<+PLTEGj[z囯Ĵԕ㇪uv{frՄò懟tH{Es䇤g:k󋡹WwNsŸ}^kӚdc}˧_cxbwȫ@ΛtRNS@  IDATxbbl 6O[T'0-,Pd *ef9 ]:e5o Tch(dK4ÖP*ѴfZɕ }yLT m7Y'9tkb0jY27*m2ma= n%YaT^Uΐ%hjF)I\U ;8U:sT:} +7,Xn]'-dYg܎xەAll[?0IENDB`PK>\e:: assets/images/csvi_export_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTEi㉢p˟hvs_b|ϟϜϦjguֆjrrkf舢Ҫscy啭ij蝹κc^=LotRNSJIDATxbX%B@l 602bѐt N9(PT.-U,! e$x<11߈ z }>26VKSŧVXqqq͘jE"JKƲf@m]6%OVA LfK,dpLYӚ K-PZe n3'0Ai,&ҺJrN9@qu)p&F =g˧%̻]CbD&L\boT?tIENDB`PK>\0y~~ assets/images/csvi_delete_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<=PLTEgߪr㬼ݶҭmԹޢǚyԮ䂝պޫ㐱˜޵ꮽξ}尾ϝݤȶ薯dzvzޘ񊣼vcs׵樽Фݞݦԟ՝䂱Σp¤׼ݝ⣼ѣݻ|dtRNSEn9 IDATxb^,@l 4fg Dyw120&՛.g=I/T:Aa/e,S1Ԋ-v[&X|C6CCtX ]QK2(fZ7?p>-<7f- dmm_џ)&iA6̼tEfpslY5Ka_ZGQQ4m@ebfddT{N]WiPs5{TXMQ  *`srIENDB`PK>\g˯  %assets/images/csvi_maintenance_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE㌢<\|򍞱d|㐢OjB`]vq̼k}VpLnˆIe4VyاY|ݎt.Quգ䙭㢵2Tw梳6Wy痨3Ux覷ǫ*Mq&JnvwPkUo]BeYy?aɜթPlnlA_ӳӭu|zCcx߭imB3!tRNSS%IDATxڄ{@SU1L dʔ06bBK1 4d "h A4y33]YTZZDi@lKd<{~:bhWzjtcvtф7ﵤE&>X [l$}6 p> fn7j8Ao>7[DE2HqLK h:{.fj[֭sl6&V a$uQ켥l28 Ix\`|s6sGujɜ Հg/Źc5o^sH כpw\ks{wC;\zM(..s&|!ܞ:ejȰ Kz%{ȘB -Žl0 ~3q]@MW X"X3Y)3Ppn>#(w<\5v$^.'az=YYO?i$g֟넍iA.ێc x==}y8jǝ >F0E??*DGG[Tc7-hӵo?Zpg">?4_ ZOy Z~Ȯṏ^: ղU/_>+$䅏_;6(hkׁj/~vС8=J_Wի/ŝׁRt&Jv:D?.Tt*50LViJ)ں5pkbP岵-0(9UׄuupZ0bWTk M-:]F+钚.tt'G"$((vQm &cꚤPECgìmЙ$m~o*** YԴTX*sҬm B+ $~EjhӼ6,GRk#z NBoHU$mP;O'j#9NZ(clhN >QEڠ$&s܀,~Y%S( O?$Xж6JZ[[jsJS.6[UԠݬf[UEXȬLո +uɃmSrvfHI5B$ނv:9Qm! s؄EdrU02)0ޓx攋Ż5`zTjU 14È qQI֐Nt2y19f@a x Op0Y؊FC9z-f5-L 哃5~)zSݦX,#ת IhJlUAAz\Gb2ncWLzP` kF .x_Ɠ %8N\Ȧ(+F9,PB0Dpi ))g! 0RL3/IENDB`PK>\( assets/images/csvi_add_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE{[4];b@mJ~ao%vtt6SQ9;+}?|z7#>9 mmmr(22T1,OOpҥ r =zFӧ JJ>}zt*!>=wO (0H8 n! 9mܣ@hj>L(x0anQcE2PEsWp1W>,!Tïb^0iɫ]M&Sm&=d|*ԶmwZ8qAQqТ?VRRL,kLe23 +*_WWw_`R!SL/Ϟ-((tLPp9 #K @rN oKKKuoo% ɟن6üғPߺ~@zݺ <_^)BͫWEJIIkddzfl $_@ȓ6欫md49=kYdee@;aFD:$&'<d\ehassets/images/csvi_cron_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<dPLTEƸ-..--.¹c{,,, UVV+,,叾ٵs},6c{ggf伽-7⍋wMTX^u_yTSTִ[[[-48vz|BAB344322")裼Μ.8!-9Wl|;BFfgf """Wgu<<KQܜ$+-7 ;;;ꕼ#8?C>-?tRNSy@6IDATx% s.N! \&r ;O{V2n<WD,Yɡb@J8Z`p:aj|(m* o9/dSi[kl_^CȒ=c5tŠ0"BhfXFA6y>w' KvM}H7IeEQ- gG1~LqU?#z+3P u x T)R$4] p^pIENDB`PK>\Qs assets/images/csvi_cancel_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEc|Ct䓬Úɥɢh㇩2`\{-YrõoJnN3\q4]ey6eUwT:jxGjLuiEx=nSs^@f:a{Cu/\,WNpBilG{An\[vG|9_@rJ扡Uz߻ֿq@p۷fk∟m՘tRNSS%IDATx| \g(M,P4@SjV,kQaL*.SgeJYv'"W MTL#wr[]m"Bv|?<"# py੪ޒ\32KE d_%lT?優9Uڔڗ S4M|5, ~EB>oN^>j_i(*Al:tGzߏ^ 7mپ(GHX!k7~~'ܮS(X(d-ЗX,u77M` InUU:ERBqKL9^f0سo\= )UDǝIRȒ&W;  4 8T IҲNi+&VWV[_YI\$)Ɲv4qɕJcZ(;x@8ƹysOG,[dUJCVʎEs~raF++!F. #G@.8 y9FrODZ1R 2J.PDGdNXSGFN )b$x3*b-!KuKMMM#\ݥB^vAKB/j˃\bQ)P_~ԉ x/dPH ǃ7 x x zjA)rAFt -)'Cރ`ȆYu+t zV@77WB>e@)̓+tcC25>{dQ=W6C/SL8 ` =?~;e36]Ɩx\yTassets/images/csvi_back_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE喳ʬ4c瀭LnZ{As4^Dm9iBf1[9_/^,X,Y.YVvtm`~\ "assets/images/csvi_continue_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEDsSu4bLzJvEnMn[{8ia1[䖹PHH6?ߚă$&׬͐ 16ɮYs|b5`dh:Dtߊ#@ yE c 넏p7ޝf Nrdޭ[ŵ {UIrED'UAe}q)T8m,ˉ2ju6((pBHUSTIG *JJ(YO|5PI%hiݧ퀖yu@Fqm:ڷ$ IENDB`PK>\H==assets/images/csvi_new_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTEٙsǪs{@q퉹դȺrs{ٽ韴^s낝䟶ʻ꠶ʺwǯ拤zZKtlガɻ榾ѠꕩQtRNSJIDATxbXV @o`;,.(0'ib`#x6 xI1%ʧ3JP59u%,,,k tҬj-ژgJ\RB͜z[.lٳUiZHJf1L)'(X35ei|_܆1<\<]assets/images/csvi_save_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE5]aٹ룽gJ}Uv2; k};A'0lK~Z`a׊xfZ[y=p ww`ۀ C6gPf@ B2O_ҽ&du3Uo*~zM\ MMmgZs3۞6êY>~Ty_< xn LfKdG#6ZYIJ2/teo490$boI5s#Y>ͦV&dYo 5Q" 3g}֞3{}xV}?,J0Y_ I$SMd986q@?uCLgBenqȶ2i*X ҝ*+Q}3&fM~8oȶ5̗Cz^ѝ@ e^H}fjȲY#.Jܾ.}GQΏ '+9;IENDB`PK>\Ǟ8 8 %assets/images/csvi_log_details_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE֜إͰ/YCs{yh8bԱע󎥽z큛RvSLtiK}nm[zݯߩ_ϒWyj=oԴិOZάGjbء״Np>f?tRNSfYIDATx| \SUL X"ǀ%@PچH*ji﷫[(`Ȳ&DZ-zzC@<~{Ϲs.241^-Hٍ֧F7uhsQ+$m˳զS˥i˗XcJ&#'Sχy?wY8CQnxA q.*+RiJDCQX`̗pZ]<ʐ߬$thE Mu\skk.[?mH"9t_"!:ЁA&$N[hkϗHdBøiX ttt" ۯ6!3"Cl~ܖ5`Q-,L{\\`H(_ĨAn7h"@:+G4 m3++%xŊCs`77a8%dQ`z BMUs6s59%% "\ ` W,B@>ÿD+k-D$}DDIĊaW :y[KJ""")yd~~^B`w1Yez:}} $Ě{(( V˖(*Cw;;|7/;e%&^IIpsd` [PD27<\Ċe&&C)z l5` %ȣ?PѮ֊ x W&aZ \-`]J mY9'.VVnܱ@&@e 6n twhb/HX.oĄjj^&a~E.Ery\;g|813w̜?>QNGCȃJff潓_2ׂk C ĕŬMXD'c=*T<JZx;GHksay$wu\ GΔIENDB`PK>\+ assets/images/csvi_export_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEx~;j8eԤ,YCm3]ݯPLbkإMnުEwBsךguO|a{폨oӭCgWڷTfhaH{d_bXeRsRtYz`@g\]mtRNSS%;IDATxbZ{4.N |hB{RS3:5 ^y1yҤI}=+qg5/&M8 &N'qZO"OS~ Rڕ=SDLL̻`e/^45=ڴ̋/ـ }(UnlZ@Z,y 8߿5,(ƒ9/ϏCvYKs3$Nh1{˝c#j0)WAF3Z)ppp{{p}Rf`Pk}7^oopZZVS{,Ⱥ 53rZ2{xf)l+}Y{pzDS'FOMWm> T 3JjA+d=U@%SA@]> +X1r7Wq! `Sl QIENDB`PK>\T9 9 assets/images/csvi_clone_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE4d2`Ex3\Bu-YTv@f:j7g/\=n:a+WiNppoTtGjb:_[z@rltRNSS%IDATx| \Su@'#G0`M0B X b84ᵭ , P)xϩ&Q}C?r"f4#I$1Hg Ti*kke>;D `DUR&Fܟ$XmVg'O$)YB J'JD݉rx465 l5M )Q4_P}Cv-Sٝilmpjmm[%6)@w˿Jy#ƭ1v/ܭlP::'`oq֏ Yp}S_ho#;9hӡJAX{{Χqv cPTrWj/'IMceC0!F}0_qV>pw݂$M(#>ާy8Nwuć[vb4Tj(ckuŝ^Ͽյz&F(JFQB2<>`?>8t 3FcO{4Bi73;|xL k$!?qb ~e_Rb"볱 /a֮ŇwFt{ }}[^x(C8OlDE"Ar,N၁QUpPi84ݩ 0`[[ Õ8(yDSb02 8yy{2e[FSD$p[T!J\P(Cp3k1ۊ 6\m$د9s>@㟜h"Zŵ4؉MN=5zGk#c{@+**r^w 8.vvv~'ޅd5p л3C!o|?ZMPoK8 M-з8e8%8ϧqᔁJZaBŸ= թܼ/1!M? d! >?Q2jhцyɔ(eF .1BaC0D9>5UV{VxC*m %󉹕.$'K&ZG Pkusr6U0edQ-~<6R DAnl&MYPI #}tGLeӗ,sQ7X:U/pbF Rz:/DQϔힹrVaBQ0sLVALnW 5Ԭ|:i&82 9d EןqJS"smcqIxs̕IENDB`PK>\#assets/images/csvi_ajax-loading.gifnuW+AGIF89a+ 3f3333f333ff3fffff3f3f̙3f3333f3333333333f3333333f3f33ff3f3f3f3333f3333333f3̙333333f333ff3ffffff3f33f3ff3f3f3ffff3fffffffffff3fffffff3fff̙ffff3fffff3f̙3333f33̙3ff3ffff̙f3f̙3f̙̙3f̙3f3333f333ff3fffff̙̙3̙f̙̙̙3f̙! NETSCAPE2.0! ,+ PH࿃,B60!ŋ-b#Nj;R Ȍ7j\J2!assets/images/csvi_process_16.pngnuW+APNG  IHDR(-S pHYs   cHRMz%u0`:o_FPLTEbEx3biBu-Y3\eG{=o:a:k7g@f/\DwGjNppNoG|v@r+WHkbo|jvtRNSS%IDATx\ùQMvȝs M6 #MRcg?5: Z^;JōoSj ;s%J MBQy76i(?3U*߅}\e[B ' rL #""/oUU!IENDB`PK>\j@*#assets/images/csvi_unpublish_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE-YUvCgꍪè뒺ErUMnl3^ح슺־4c㒮\|\1[FwlK|;a?p釴ю׭挶ҝꂦr{ʢjStRNSS%[IDATxbG[L|Ჰ!c*/K\}NLҷմB MSɞ0`E(-4WRR@ʨdJ׼]Wa R\ 9"E߮A,+uС=@SWW/pP$'k2]2`p_@FKi5^CCyܲmn*\TZXțʘ*kd;7n'{SSȞ7dZ\?==05]"\s7蜡XʠhPX~A_]!!ӧK<՝/L+ʠZXu' |D'ޙXʰ֝f@xGKZa#CFaYAHz;狠wܵp..plPbz` ХN4-9A#8ǒ 30R_|AJ7l6Y?>2ausU UU>

    \w<assets/images/csvi_order_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEƜjܜіVuCk㙾ֲ=k™Nv:ed7ϧɢK֪nsfjCs傞JySJf几\V}O|Ryxɼ_挼ءݹܬ-Z}MpEoLqCw柾ԻܰfkJm`[ʖZ[FJ{K~aHxPrZ|kUtRNSS%uIDATxb6Zk dIh2BP~%$493]aS獦k3O>sQ32\>mt06}qf eNf3&r>eg0ա׺<=s璦1P\vo~ 4/W5!@ :SBbc{mlBHOHv.']OIv.*|hԼ?#jb,3uuUU+jմ U]]] ffg8y?Wdggyyw0!]{] ^ʌSw ,e!??\zՂ;*`$ӫx_0AʯWyҷڀY]1^hNNYYYNhv^9$_Y%,΀(?w,WUw|LU3n#2 `boY@J@=1-ɧU@w C 'EsDw+IENDB`PK>\pZuassets/images/csvi_edit_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEEwѤꜳ9i2^Uud,YO|ʚmT|瓪~㓧y{왲ȼ닢ȘkrXJbzL&iGhD 7@z ]Jf#P: -jssq1KJ 'k盛]Bi=th9IENDB`PK>\DU!assets/images/csvi_publish_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEw4cCsòVw{ɨ:a2[:dLuMnCg䖾0޷Bag_oqqq)⾶g: )0 %KC+\vΝM`ҤHSX2/6jJ0x!ئx..P.WR35TW @@M6WlBރ=4VWҼp'.]aMLspo̙znbvsNaemY&1@5sA@PDDd C˫ 16<kj:+_x_\0qXYd;w~~6?*-lf(,m{Q;1wUz#.ҕ7:mPa4+nqJ4S},v8IԩS>r}QÆrer (8wٲEkʅ/Z&, bkssZ_1.Ê]ےyd`6[[ۉ]K&<*/Ǘgʔ)Զ%$˳q`o858ȈO.JJX3wju zr<"m*VY&VhM--2B+Kb$Z,W@{܏|\k};(@-+ IENDB`PK>\@@ assets/images/csvi_fields_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTE톮ʙㆮɂˈɁˑˤ⑴˂裾Ҝ㈮Ȃ̚늹䂲죽邰Μ撳ҢԜۥ쑺̟꥿ӞばϺٸ苰ʾһ~.tRNSJ IDATxbXA ˙8CAl 藨MgX,0-Ѝ!e;P3r6#̜i#(BEDԘ!WieSܢBkX3?yV{MfX0uT!QQf9 kd &0)y1ss33%FdE1)WoȠ;#+NLz%R3= %Naeadg{N [$JYOP]bUS1W=IENDB`PK>\n"assets/images/label_open_hover.pngnuW+APNG  IHDRm&N9tEXtSoftwareAdobe ImageReadyqe<LIDATxMhA&4CVP)'EADf^ԋADۛ(^ PIRM8;6ۤM~^ooa!D0(EӤ >6t ?yyT9/ryw^ $_*jX ȋbnZ(S*7:pZ4lbȿbX] yWlL4#f&B"ib:t])BUqZ]aNAdDҹ Rbe'c `Ky4L喓:p|Vtc Vˏ \р"/qP98*E0it4_]Y{`vEqFdM}_z41\zassets/images/csvi_help_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE㈣4]c-Y꛾դ􃞸lDt5bޡRפLnVvMyYyJ|sjsyj`AiChڬMZ}Foȣ|``鑩WBoح\ExMq{tRNSS%IDATxbNvB:䣕6ia t5?5wĉs18EAV[g͚&kÎP d#:qnsss/) Wܼ SP$x׹{" `kʅn?f̺ui?XjJYY]`2""KIs<@\M+D'&%egM><OWWDZ*9;,=akSӼkZ&su,SsszP6O0ٳ " uikq^0\ik۸/ .Č#&&FBʬON^mz W2~P y2(uį>am~~@nk֬Z!q7PI,ꦻqsYE3}}~ջwrs. -YaƏ%ꬬE/]x9s^ttu gipl(.>}pӧYϒ Pa_Vi/y®dvdwMu_g1[p;9Ν ;y!`焯S[A1I5 vKƾe1adEa^C+A6Rw-\:0")m*aرdJ֓  0u2}hW#ŦJ=7`n=agm?B )/.(/IENDB`PK>\e9bassets/images/csvi_log_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTExʜGnޤֲ坲-YS뎫6]aBg:iTvGy􍥽n㞶ҚXQxhNtQ|凱Xx]ꁪǃ˟xѥlj`~uǗ]`VǶn÷dܴ҄ܡMݖ߀{iXk墳ǥϒ×kT?tRNSfY3IDATxbzΉ,[Z@2<9[pJJ^䀮@}MZW]uuu]M|Yu({Q, 뚴r JuT/k[dLAUcc}806n2nZ`BW^UTWXZ dWɵ_nûmr*m*Vq-+%հ>UOnO (ƙ6 #-_*+yn6cK9=K8V W-,ܴk9tӊ' - JIOt㪭x~ 4\\ f76MAm"פ4 iiU'1X瀁%IՕi i%nurǟ%+pe.*"0`td)PA)ܗ @ R /sh4Ψ^^]n`A\0HQL_Sx̘\.V]^~Sҙ lyk_J=ݶ?ϱnDfJs>{ٲ,dͮ¡l$pzCee>+>ole' WH6a/q`nªy=NHj¾Y<,@eN3qQY {0(pLa-32ƨߢ 1~zc:=p;Zøhṋ^ngm$<>1L uK/kLXê$LLLͽ/@% 5 P 2_%IzE6G˼WtYYAc:Fp?&>7G;XIENDB`PK>\Eb: : !assets/images/csvi_replace_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE9iu+VExBu=nw2`qp:a,X4\/\1[퍦7fؙ˦@r?qb[z0_4d.Y߲恞:_:k5e3bgi㆝,Y㌡すi|-[Tt4[bTv+X6f0Z7gdg-XtRNSS%IDATx| \e_D\c2BP5 &D80RhUh*(c$n`c:HFPsmyJ+Yta^;9n<<{<ϋT!flNʜP;V)FͤIl_$QUwrFr7nddq7(Ŗ3 }@.QZؔ>0k `,M FFQ\&2 о>ڜ#Wfttt07c͛G~dxڇ/HĩT.>{̾}S *U\\Ab'd$3 ka:1qpJG pS r BJr0QV»{ PW\3ڸDlԏ;(G+ ?ճ@``ࢱ*` (i~lq"?ȣG29R70~h3f(-} #>**,qܹC~}j@ Q̟?3Ww 0uR(@ z̥;l1[ iRPQQ˗/{zb(ߟ& "$-1qŒxddڒ.\Xhύz+h7n6|z֯_dfPÇ;DCoIY2qw o05YB1{E-5OMM1p/16x )&d 8Yti)%սzrtە.N@j,ti@0NsrZh%[X4D2}tl32D}Q$AkFޅ>!:APcS($DMh[I@"B!;.;q='`)l$"*@ybMPE+F8;d66j+cҨ%opFOn.lnS[Kh2gg,,˅3oܢ'UX '4cgM\vC6w' Y5wY ;۱S B!+Rjpiyt 1s ,pb4AaHxIȞ 8 a~x`>t+qu7XIENDB`PK>\ assets/images/csvi_about_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEBuwK|m,YS{Դ梺Fj3\a:a퉦[z4dow]2aTuz:krS=ok7g|@r/\@fhpNpNo쐭ŞMuc䑷и,Wqեޫӎʚ|샥NtRNSS%4IDATx| \SU6I8`2& ( y 9|!"Y<pA )Q F !$"=H ZhEҼ?TvsNBK_6V dF/?R`tkkY!zEJs5!1#W}'D9}vچ),WL!)-,#?RU:KI$R5EJ^:\;LdzyAu`uU{8W[[p`'UU&SYqYkNt&}ʭWVV65CI~ Yp|r9V+;6_!.pF 2'T =;Q_b۶c76BN+MM8',979LQ.ӽ T*sɹ /BB4T.e`xo_TNj* S~3285si Y-}P~dKթp C@"V_ r5KТ:8Y8# = #_?QK 9SR.HIIBk`_33tS; a=34T)+>ʷN^SC cBHM{{RFkIk֬XU!ERRRF޾8 BviBš[|CUZ[‚D~Aub`D^G.@NԾ8(<1\>!|sPW:Yyyy,niiinnni eqѺ"|~=EjĈ.hC]kwvh NI#::4g؃l}M-H;:k[*wtH1@d?{ZQaNP\P\򂆋St`R EgNcBaRGyV^(Y5 @M R5FPb ځi/,*Oa 4]vglRq0{ދ=ʸNC[P$ fa1<O'iŲ7_qs$DD8߁i063X_O|=IENDB`PK>\5AG "assets/images/csvi_template_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE-X7g.Y:a/\b@rNpNo@ei?r:_AtRNSS%IDATx|\W1lD dDmm,X(RU( )DSʐ2 2BԠB-]`n9$w޻!|3͜9BbWT#2LJrHn˄?|EWXO{R!I1`¤UNp/WJp (RԄ6D zQ4WVx}SaSu/#JyFhFmeFJ`].hC͕_֋~͍O*FgIjxş/͚%4t*(흝ŋtvBcЂb G UOPZ\Z_ߞZZ q@[{jIpo5GFGrrե]] @CCCWWt`TJFp(E4*u_Ȩ8`Ixh>j0fbBA:!@UWw-۱WJ%bbҟ111*ˠ^Ez@ܾ7@.QdSʪJ1@j#/IEqar+Uꋈ>>?:և}rt{B.|.c|!w?>]< Y`o sa.!_0]|繹[BC\k{ns.kLG*aazzzߴG g|3ǰ2` Q:1hff-o"##c& Њ~c%` \e'Ю_ämyyyoKۺu:0s dN/A!MuWxGn[CC[^ $lK774[[RFᖔdi`H/a%8`i䶗fh[ ֶ[%19{s,)doo5"(X$"Tݭka0xóؘ8dP=JcLFl|NqhC1CCCX7*'ՓGρcdsf.NQU522zE0Z (R鉲a S#S&ۓ]'´Q{ ~HAAkݑG&^rm}Pg2DGD"-O1!oLxoTDDĚ% R I p6E ׮uqw ԍm]̡l8+ d^RƳHyQ8cnn?%DPpSD6  袄HyŪ-G8ŹUb)D _p ~BE*Bٹ[uAbqB.-ECC(TRj >Zd.3HHLR K(B ,!L8 "( Q^+VAJLa㧰Ϯ\v:LT&q;eX|(>oaT3UYW;ݔ|:hy$0)aCp_{lji 8 aPƊ*/c;pxfUVT/ :CIENDB`PK>\b!assets/images/csvi_process_32.pngnuW+APNG  IHDR D pHYs   cHRMz%u0`:o_FPLTEbEx3biBu-Y3\eG{=o:a:k7g@f/\DwGjNppNoG|v@r+WHkbo|jvtRNSS%7IDATx\Lu_9=#DlMAnVYMIe-~z`Ŧ8iXsZ86 Ny"S\~gyك/E ū̲U$r{Dqc,&(*[/$Egz^o;$kN |N@ FN`";i$H6]1pEdKgÒqr=؜Jm̖KCIzWVj4/ep\ScZ_Z$9)[EיvioQWiX$c d@r Ac#Ћdߞ2/>,Liї QI n^o<}(ݘgZ{nqd0QʿŦP)spb@???axxl}Gjr^8+En2_D\{.폈<P5}r<6?iG?٧ߧ魤QZ"B O)~aNz;sq r^SѴRwZA.M^u+iJbkSuodT7a>vZTt.UԹ߅v%WjJ{n^pM+v ZxFP{1 j~Z!3~O^6pNH lO8p!eڙ^,쭕RK@rɋ塿d;Z72",zC}IENDB`PK>\>oa zzassets/images/csvi_order_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<:PLTE凬w㘲ɭȫQ{h³寺߮ݯ}훹˶膲ΝˣcsHu癲[w~埯Oyаnߏ͸フcqeX}oãyㅭʠȤw_}ҿzȥ0ʭItRNSӆ IDATxb 6SXDAl +n) ,p[+++<6AQ#gԮۑћkFJ,TmWw2)AGl9Y e.Q˔"7lR`m^l%͛aǠgd-RN0`iml{hf> =i+ʻZSc+z&8xC*wN~sDg0'q=gRUʤ-2 ⹽{kBxe9-_ IENDB`PK>\ee#assets/images/csvi_unpublish_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<+PLTEGjը4\톴TmFm8_㇧r=kػj:k1`ʫLv`؂曾,X,X:k]>oKx0Ǵ[ȐmIENDB`PK>\-D{4assets/images/label_open.pngnuW+APNG  IHDRm&N9tEXtSoftwareAdobe ImageReadyqe<AIDATxKQϝYRDz^}z B z  (d+zzh5[KYά3vxg3,qa~y9=3{c !:TH~.Nٙޞ phLYF4^TxIn\+yu\VJ,SH mD5$K|k]pT卨HL+,+"JP@h2R9ǂC1c4JKN۩j:tw4?69I,Y.:;' `X^^+;ouL-Z4"X#D΄pKeeI`mzoFSr 8sl?0X_csymX)*jvRZh (c~`+/84,X(4:xvlq- "+d5[`ܚ7LIENDB`PK>\hhassets/images/csvi_edit_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<.PLTE㗫른􉢻녟㐪꠳ʤȻn䔭ó砷˺X따ȵût㠴dz柴ȟvߚĚomힴhHwk엵퇞Z|ꚯúwǢてï쮾ϫ抹֡Рҙߤ䖾ޭßf5tRNSi$u IDATxb v|ur 6Kw2n׍` Ua`d ftZ& n' >_(\dS#assets/images/label_close_hover.pngnuW+APNG  IHDRm&N9tEXtSoftwareAdobe ImageReadyqe<TIDATxkAgwm RA)hES^Dxo ^D/E/@" ŃBQ*RBZ-Ah~4;0HQٝ$;<1FE!Q1WF-MS *s33zN,U&E#< ؎B)%e) `E.4E3.h@j@*i"C[NʼnX6ѹz&Y"8U#+\ijL+f4&V H_h&BYV(LG*X, 77iB+Z8q2>!K\%"ii!assets/images/csvi_publish_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<.PLTEGj2`,X4^x[ڡߵ1`d뀢蒮Pl헷ϝ:k:k5]{ի4bݰ4\uktU銨u,Xx6ͤtRNSi$u IDATxb syXf @4Aԛ ,?AA (eU J2.Y!@DdSY*g[b,~u\\b!n,ZKoZήדi1=u[oO;E Jqja-LjT Yݼ:aԴVЄKp/gȵ/ޮ_R>;_;ap A _bI@ q213Oc̔<9͂bą!۹1GR `n*\ IENDB`PK>\Ȱ assets/images/csvi_fields_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEo勦cb|}bn䋧de{qqDZd|nf-tRNSS%DIDATxb|̪C2\'22ug(y+YXo{oMP9m=*u"p&*q%''RIi4LAIduu8PW>}ʼnG-,{,ً18l- ) y[KUhKkiPd^^i|ǻP;5`cLKy\e&@2h 0۪0?IIENDB`PK>\4,NNassets/images/csvi_log_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<PLTEұMrhɼ\my,X㘶ͪ䒪݁rGj̡㕹WxvQs[[z舷ӭЯއj㓬Z˺is䟱Dt넣3a͎蛽ժgУ4^ϲ棸zØ榽ѷs`ݢվ󅞶EtRNSQ IDATxb Y 6[-e TXx033˯ 'HI 0_+1QO_@g٨u RƢ!m3{DV;YxoNNYĠW2Ac2#FƘ9 [ $ZHj1,6Z vXjy{j3VvDOg̹AEaZ*n01EXYg.gS\P[#F6oɥb^W 7'7IENDB`PK>\,r軂assets/images/csvi_help_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<@PLTEե倚p䒭ī꛶Gj䒴䒽ס_}6^[zwɡExXs杵ʺv擹含,X~ζf㡾pY~uAnTmtRNSfs IDATxbim\Vf 6v L`ld7a lfdeeedXieVp)2n$!Ed"B-m. "MvT{9f1lYѵa ͖zZx ;3hTg E4 ʘ1%a*|Yyrssj2-#([PS4k2U--W㮘& tz= .ne`-oX+`4c+s/\̓bƍa=npIENDB`PK>\assets/images/index.htmlnuW+APK>\5 "assets/images/csvi_settings_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE-Y3cR\`o1\ItuBtFjFx:`휶˪:jp|쎪¸ZzcʶSt@fRv\~>o7gNobixMzav뢻ϳۭ푭Ŷ섲σ򁝷`V{ȂǀtRNSS%1IDATx|XgP1 l Kh2DZ CeB# Vm jE A1J,hmSmvi/ CPɸ~Iף1znТYlt^ዄ'cA} oN: ёjR/Baj:,5<۷*A/+BiiJ°$/x噙vw׮mZl+rk1l8`$lkJ巗/_^pիJ!3:;(%(վ.]ZZ %^߉Gtmԫ25JEdzlQs <@@Ym#%npĀ} oi>ןzhޮS?`SSS^^` I[eeM+`:iw>|F]]2p5xZ:[Ya&ĪAy -Nh8Wr 1睜˃j8 kk}tub1q`@~Z~i g#0 JL2%Mކ< XB4~8;Z33H0[`,m({k5CހxsJzz2MjCnf4AKIѢV @*. $Mx㳷].7 4l8M"-zƞ`܇RVLqSSXdlp٥yu-Bbj/x9;b=H8q3o3C C_E}3d< 4yUP]IENDB`PK>\> assets/images/label_close.pngnuW+APNG  IHDRm&N9tEXtSoftwareAdobe ImageReadyqe<@IDATxkAgwlHSlj)E/kAHփ= 'AX=(CDZ=/UM78o3]i6}o6OaEQ4BH djZQ5XF!ŅK|-hH:ry>H(DUT^PиYXMvEb*Pv F`ж#R8 @eضrQU_D*UcX1ʼ2)qGhЪA~0hX=vj uHt/0ʭVdg]& %30=09u4n?fv\0=:trhj#ǾdjnBcəD#}BTH4*axjdK~vp-n\Eip _-2!ҫ7j* ,<9M+3~k5ft[ZEȯd>5Cwp]\WY1=9B Pf.c$hCw#vyCKEt_bScgW! . ۊ,sw5 ={k\0assets/images/csvi_about_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE|l-Yҝ֨8iu硹傣4cDjUvIztVv|Bf|@s憩ũMn4y1ȒEM t,)<:gڴis޵e.M"GM> O[gpݐ@Ɛkڜ Ruf-zh1XZ\7TE=hF'̘vhdGM||&pgNGM\v҇F@F5˹rMQSSyH׬*`g/ ~roʗ/[?& (2hba1i:nTh5v*+~^5.`d O=? _@ eKSy@SPpoϷ1E2'RLmnۦɹ=~;i$`ߗ ϩo>d/#4MQ3 Z3w 207@%@5] Q&kf7>G+La1r7}e3pD<0 #J\IENDB`PK>\z+uzz"assets/images/csvi_settings_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<:PLTEGnDn2`QIv䌷ӫHk숷w,X揭ƃ㈯ɾԺbcz?mhqz۪eDs픵6^ԸʪBtRNSӆ IDATxb vy,@l 6V^θ,0ϫ1{2;P`V:p& jbrm`+Q_d,W`(0֭2j2'0ix.?gLS%U&)p$Xkɠý*d\yT޵ [JZSbݧGzr0x'%lQtdWdZ-YTfƫ]/t +NV\`Ůg`+ ޽{vsǥ6_憒HIENDB`PK>\_ assets/images/csvi_help_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE{ɠ~-YG{z=l琫ô㊥YAsGk䖰Ǫ[z2\up3cNlQ{bR:aiTvvNp@fTtץ狰䃛etRNSS%(IDATx| XUD9 80B'!!RW!dqO)Iɀ$ өv4,,GZ}?7A}gp.;绝goK\MK}(N̞ӍU-߅M.O4yXPK Tiy`2i⻵Zq*&/*>?wLb V$Bvڎ,Qg h:Zk[[k|w) VRk.6]ax{_kj*(XL8[ښ'rӟmm-wJұc̟F[qKˉfr))6tlєpΗC%S A15:1IWiJJ!JP \t2[Xhjj:Raao/MjLnpoʅ \+` &!.Uc\P,-)'_n՚8HPlc㑐gPje#pv^Bg3XPB/qll݂]P˝GB@@(ÉK ض=B<$)b%7~$(sylsְK`OAu zKKKy×~X[T14d<<:(@eY^1X>(VÛX.i^d;jMchٳCCo x9j;Eaq0LU$'x˗_Ҁ J=HD]v'yyy}뛓ۻwotً/# |}wWJey>I| ^C:?/gUD ,N{Kǿ x]zߺw~~°03b0p"K#,,l$>_Wm7 UpkXZښ5Eb1TQX#%Ϟ5i ]anj \ѱ;HxT_HR4l6?ȃ+7]8]bqD+Wa0zl{ (ÀHȇr4u 77cF[FXFhh]?BDUU!+Og rhFn7~TΕ6Bbl,mCcccVwG:iong-pw@}Z333{ڬaBBx8Vl@`;1)<<`hhZ''W! $dn?d2 ?FBv'v2Z4DZW&$PY+ROW_5-kG`h[u_ AdB֑e` m2l?@N,dHAwJ婾>ٻ uɵZs"%>IOj9 ?eL'bDKdFJ'biT Xb=cC)(anђ y}x\SՓ[hJKKTB\yR`֦XBV)7?Vzl_IA ZހLRm抺4@VՄ<.&9 ^%9'GlP͟5j@ms'A9 0I~0IENDB`PK>\?eQ  assets/images/csvi_log_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEͰ/YCs{yh댽8bԱ󎥽z큛RvSLtjK}n猬m[zݯߩ_ϒWyj=o랴ɜؠO捳Z储īᚳɏإ>fbhGjNpٟ(GtRNSfYIDATx| \e_ƄqX0&n(l03r!!FCeh #MvZA& N}[SJk+;ls<FcH̍.ҍ /6 M1ػ_'_$D-EX16Cn8A}Α#G̒m2Fe n򅨤ʆDRũQbMg>)\b򒟚8BmZY:Iv$!GaH9vA+ۊ{LԂ`7 1h}ϤV~'q\d 2EB#ٕ# A M GQTutPwJ@VR)o-y:76<ʗc>]B}Z Q|±coYU&;F G@jF޳al ˆ@VJ_FXWa [nT&EZ-/\4񚱵0yj~Bkar֝>=vB -2Y'%4\>3)SdD)k`C%;; g AH`~7pޗ` c0rRnWC=vJʕ Rɝ :.nN|Nq\3"7!assets/images/csvi_replace_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEBuNz3b,X˺iU~?s[z訽Ч0Z,Vjf5fՎԋ˭}$O}Y,\:m`e9kT>dy~ǽWr僞퇝0]ڮ&TH{>q5\`~8h脙yq|2wdxyyAn_}s~ӮVK ~w_hU)&@ͷ 4`)u:푽l˟\@ƽ~ ~ assets/images/csvi_edit_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE4cPw2[ㇴTuHl-YGj䉣ݝ蓭@qLt=o:k柴:aCt䜱Ƣ/\[z8e7g@fibTtNp+WTxuݟbFy:h=h>ltRNSS%IDATx| XGI "gID%PJK"xpJr_T EūJ)-4DS%"*Zz҃]o@}'fgfwgO7),7"yA32|D/0|pXDKqI HD('~I؊^%Mz!p~yi{{?%t=F,BM!b"%;O\*x3@KSSo =GHQ4W{srS &Yur EۍNckƣCg?  X:k7G#g@/KЏ)]]tuut`~BCqrJȶ#57TV44t`zhppmMsrpTPGvw777ݐ&8.7Jdx6cq_{|#ttt a{pgk||֑ýB1[=aweZZx FF}--@h?0aeOOo0 ==c + 8`96fk9 ڃ=ƾ„j]2$xMSc|kcՒ 1`!+b0`6a:PzӅALx8$z m$Z+3J"IENDB`PK>\ d d !assets/images/csvi_publish_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTEn3\-YyΩzŢ낪Ɔu:kGkAsSû2a샭4dAf/\Np:aTv풲7g+W[z=ncZ爵ҏʜޭ>pFw7aLx^>tRNSS%IDATx| \SUǯN`M`8"0a2G8 D IE`D45mpx)l')A4Qu9=s=b3iT^1Nͺ(JʜՌ(Rʳ)RIO(ibY y*0*jhYz x`'/~;i5&b AAmom-g h8j@^E[[/W*xDqΉVsNI0\/ nw78zZ[ptB7̏R45+ unTqaӴ|N}}JSSNPB3S;xDORq\+9ij@^>W"! HϠ{.7oL8xtzFL-Ⱦg}&Ǐ/lT"9gsG6LlbK#ZeLt}G<ťcc ٽg:~I\LEgpIsgpp)Xv: W0wû׼b|Wך-[4 _U|\-U|~HBMnN.+x9ļ7u|_"K )q~Ɋ9նm@*+NH x{*/h47 TV掟 @۾hl֕D``EBOxCXqɼ }C^^鎪BKaH+%}CG5#~]tGDxټo;} n4D٘}H|ZZNW⋏bC7//5kpETV!j@!--('<|9CiC sE1«LM62:xpÃd> )#vL=#`hhz|bipN/&+c ,̲Xqqb)G^сvNcMrhh:#==aJQkq\F:2mʕ\a+pj6A,/K-[3lϢGAݲa$4r-U*&He2???l$jdI$4PMc"kZ}RWuR* VD"H$jSZNßJml.H(m+G Hd*ϧstTenKO3RiIIu e54U)5@,V * @We hң݀._2Рu ( G[ \ Wassets/images/panel_bg.pngnuW+APNG  IHDRn tEXtSoftwareAdobe ImageReadyqe< IDATx1GkX©R9"+ $ Tv5 hJ,"E.@Tb%I b 8qwds۝ݝn{vg>z^<^>qR-LE F F FM}yvv7 t;j$C Թi] _;\w$UJ֥/Jvcաn8wY}H @{}ؾb#(;JRec,@>#c^t\\lj/}%JKzw]辩jc(@QZRUk> K:l_ܠ!O4h m1[(@ّ;Fe!kKw 9 Řk.;'Bߓl1:@ v5P:dQށ%ƢCp޺NJORF&s^lhisQ LA y#UXjg QX+cWt_mslD46X}ROt S[WP@Nc)_>sϺj9=wB޷9KNw=:~)fc Q`MGCU5"DA[b|QЂ4JjϽ!"8(-u}s~@$!ZO ikRӶ婷 M:L#DK_@lS$[]9F~_#S4F%.C 97ʬ|`R'꘾]GLh =5DKZtu5MlSJi"Ds@ Q:F>:c>v[+c@nT;m Qpc_QM|U.3 dgw͢s}JYȌfҷ-kE3(eݡQh)1C6mrP~1A Qפ׶M^\lĥm?6(sFQ: fҏ}ЮR^P3cn3>6kFFL`)g`2bԩoj"L`U䥾nb[e藩8gynd`?*m'zfӇ̠vmS_0u4 hYQ/ ЂuTE+wfSosR!XRҌ.A 9DK) Lۖ5)eyv=6iizR&.LbjnGbkyׯcR꫎]=/q~'A 5̶ύ.P_h߻p),C> mЮKQ 8:NR7rYV9_sͱn3zkξ釾%Y\"]fo.oQ6JU<2?C>H)Pz6Msrwa>'RQ 5Bh̺cO3%aqcϘꔍ{hJ\-GES_RՐ;+FS6X\B4\:fGX^-}mf7=:C>rF`#@)9gҗpN }(=@sh̺sͤQ]$HңoIU[ֱ)#F>GhJ鬾Gc۫]įgɓb_0VxJ)&/Fi5Ďܓbn Q`퐶:2>;qFw}^b/PZ>{}lƨb?8ª%7*49h狶-z!ʸo\9@c[(5Ds_A/\u/C}q&?Ϻs_Ϩ17BtsFG#@ q[Ab4E9 qyb Gl|~́П\)u&ȗe;c1\Gk|5ƊAgӗv{q 1>CZgd6},CK]˶픶CC>!;Tfh! %u{`4u4b{mb4ct-[? _rtR~.2~Ϳ7wZC)F]C]A9L1AsWvCj;ŞO9g4e:L;ΰ}hkg}a͝z~kƌq1/5FQz_LSWvQS`뚣}FGma@9FEs ϐ׍=:Cѳ;q 1 jfwmOnDaѮC؇1~J9C46Hc"tסtؗzLӟѳljR}鍊Cܟ>w.ٛm1zO1le+ByiW|Owb9eg N߿gr>껖;`H}-rݚ?<{_܉wkY]܍ (=:Cڥe!?˓Fs~)F!xƟCO-z{ߟ?١~ л~޵,乐J s̪ѣGt>ÿ/~\;`gsF?2x᧷n+wp: `q붠CYv/<2ϗkÇcn;gk!\Ȳ-{ڵk=z27w^i=:࣏>7~ꫯj5ڙ2~k@FJyM,!-{͛^|ş/zox<<1:HZ/p_VjJΝ;7{l裣sU>x< /\+d< NˉϦՈ/d!e~|ѥj[ǭ[?}J\@SYNVzw~84 vZ=#_[<|\|o浗_~!()08uD{믿[JY=>omX:HF.'7-?u]r/^܅ .gݻw{;wyW^ѓa#BOB4$FׯYU6|c5`>>⒠'lI5>=ڸK5*@(~ 7=mo6?'mh3B).<v/^i#8'j f=@.8ֈ+IENDB`PK>\z 5YY"assets/images/csvi_template_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<"PLTE㑴ςˆ˱膮ʞ∯ɜ㜹ϣҼ눮ߝٵ卸ݺފͯ偭ˣբ栽嗷聰΁ϣґ˵֫㊹կۦ呺斺ӭڤꞿ֜ջطؾͣшɝΒc#tRNSp IDATxb r=,&> 6ig5K ,߼/ (.mZF جSAA80k< z ,F6JX&I,(l S ߒО8aJG܆('e:k dL[W$Wu2,YdhJ-QTaezʊU1š٢ [J'JmlX^'tt&fjfW&۩` LcZ.⹭[#reS+Y@IENDB`PK>\IP #assets/images/csvi_unpublish_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE:kmע-YU_~[zĬ冣䆩Ů虶͸ڷ@s2ab鑰ɧ:a4dNp4\M}@ft7g=owTv뀧ļ/\TtHkȀaGj1[No0]怨늦2\現`blߚkztRNSS% IDATx| \SU i6ޯ@eaK"%b )@1yoD4m,pH` $DTIXάK3CPs}9'61pţrj$72iflF}8W/{TX[ZGdPNL܇] u–=H٘KE2-C܃n .EqcF3 +F~N0xr/F=i^5'G &gp\NQR5?>W 0~*aLLe_N11:-gI8^oMM0b˔Ala~(uJssYYss+m (&έ1HPsr::@::r4 q#xsr9 %Ca)Q5228ffr|4 py>,3C?MUZ44283 X,?=%(+89 j^lY# 0YR\]]B4#s$ҽC9]+KҨRRCC7fB\Ty@=㥘=ZRf& ?׮[ng :WM:*B^bחRKӅU0p_`ҕ. G E_qvLHАJ{W G}uU'qxLQ$pIENDB`PK>\ǡ assets/images/csvi_order_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE}ɛ7A888ܼYyh+LAt.Id2Ye0^#ԮUrr3 0%7+ =Mb0Q<2 td'q5¯.p'** <֭ 5\IZvv6<) [%fXaZǡ}[/4$1[,$06g.2'X!Aw/5.?wtއ+T*E.ՉqY{{ܸqIjjuKoHWEׇ(Eq.`xXuj-`]\{{Ez|r)/NQ~~}ՁoHTRX F$6 u EJzziHH:Ʀ4005ҐśrbhL>+H8+ao;.aε\F#v-؀A۶wsmk[biv?,3 $Νv~BQwsI^n̙[0!~/Fje{c]ǎMS4>B2󵢢"U]]t2':pX7»V^Up0?SU5Ӣ)4 eE htCCWشidl; 5 }uɚмxpd,",BMM4"zp!01ё8fTxp8tPZ[P +cn 7=OgeJ$Xë 幻x_лY3uH.cóhS޲&ͭkGm`$??˯P踣O`f6/5-XÝY!+~N)J8*ȕJV&z P٨er?zQIENDB`PK>\z=Qekkassets/images/csvi_about_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<.PLTE2`Yz[z:k|4\I{Bol=ei}q,X:kԬv1`Kxv㩾Ѹ萼֡v,Xwgܧ}Bu׸3CytRNSi$u IDATxb  \XxAl 6Pf7d p0(cEE8GM J ;)2K#89rͳ&3L* ^lb为VaK*ڜEq3HШ%R_ӛV.àٺC[_T4,~{6CRfߺebb JkvrEo.e&)%9;NtYaAfFƩ3y+TgnxnNy:K7v\umIENDB`PK>\"assets/images/csvi_settings_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTE㖵̩4c卸ӹ\:i񆣽Uwؠ^,YGxAr~Bk9_qyKnݥBf0[0_lzdzPaqKpj靵ɳ]~v~~Hu7e<eMO=Yԭܙvf4@#yY1_.~cQQg_U?#1Ʀrb |X~Μ93-e/zzy|:>/ұ;~2-]/7Y+z?0/]tl@>KN-]lVa*JJKX>}&iOݕTܿo]auI[ ߫ZzL ;aI'k߶mÇ及9HPVf]|kb@WOW"\\\YObu-*R T+"EUEٕ0 [[on7\A mabQOBA`O>h+J|mNr ? 1&Ч ̳ It"sb!h0ؤiv?հdXd84S!abѤ#e :@kd=uEm;@>#/̫l\Ek1r7О67,260 fOIENDB`PK>\ assets/images/csvi_fields_48.pngnuW+APNG  IHDR00` tEXtSoftwareAdobe ImageReadyqe<PLTE.Y7g:a/\b@rNpNo?rb&ltRNSS%IDATx| \SU/07#j%I`; D4"j(`s!sx†`24{`IIF֥x =:"3KqB1y"I ^֌,)Ţ ^$< o \x@ww7${4"^ѱzviyK 56+)1&D  ]9BC|LO~9xzz WiWBVLs3 @Ra 2KKKZ#:@Y49Nd3J@&;`v+=% >rLNcnn'q2'T* >[M$1 H\T9kkKR5gԜ^ABTohMO/Y TnH4R39%b0W%?ic˗]s&TpXIS{!0K($\_¤ tХs|h 0fҲEoa S͇g̹ӘƲ#*F\IENDB`PK>\5q!assets/images/csvi_replace_16.pngnuW+APNG  IHDR(-StEXtSoftwareAdobe ImageReadyqe<vPLTE M{ɧ1bҖNJa-^(Ulr|ꃭʏ݀t߬y{edH{lCvf솵頾*X?g6]Л圻(Weڰ5^8iٍɽb1_ûmٸFy7h熠퀬ɻ[y[z;mdოBi{dݱ)Uc2`h*tRNSIDATxIHMЁ ]_Qhq |d\[6F1  % Cp:2Etw@LlOvkư3o xVY,{-&je."(;+A*}>b ~c80^4J<r$)!`aTf PSRZ˽BNX/ugG?#'= 9Ыz 5mKyWiЮD7sʙUn .e|rlrIENDB`PK>\s"assets/images/csvi_template_32.pngnuW+APNG  IHDR DtEXtSoftwareAdobe ImageReadyqe<PLTEy{|ㄢbc남o|ȧ߭ndbngeųq쒿ꖰǞ}}foqdfPtRNSS%KIDATxbW+՟B2;WtN]@nEZMMMs&fӅ i/{S7{΄P.ԞQ@J3qƿ06ip?GPV6mb e@3S.\prbh2T@3mrIZgggvpvmM TyB]L-X LV-ݼyB߳[ 6G vqu^ #uˎ}eeeyx⿖-39m\ZZu މ',|N|]x iiiu9tx,ZP~x >weZ5CBZvuVߌW=7,Ͷ!4;{p;k[k3wwA2v2GT{ ; |Kqnf3) +)R3p2Ul7 } lRiì r[e?Ⱦ򌸬RVh竈HJ] ]G[D  V"f0j]42ղ'BXH鑥eTlGˌLIcQ:NIENDB`PK>\"~gφLY?OvLh~wc/|}rp; &['u? {]ԃ<ʭqߔEɁ\|/\%"v{"f)8ԆzS[G3`uǢpLo[Wx fo8A-Tcxٺoxּ'@Zr6?/ߖޛIVQ?~gDpºmߗ@ň2.Qa,\Z@[bMUaa^Yfl @Zp篽jX'q5ltz<tJ-9kMD#Y"JHIn0ǍW_dveUBFdp9KpfA¬̞ws@t??D p=ǭh!xUqZ=@, ?̀vP \ zۘuh>i Q>* (J^cȀ:I0,F.A2I++H,]QtC,[u ܧ AgQ /nfvJٮ44€\GʃN.nO2$00!C N/zqvk(>:}q@4 {MQ%?,>VE+3n$Jō -Q8|R\=r[ !assets/images/csvi_install_48.pngnuW+APNG  IHDR00WtEXtSoftwareAdobe ImageReadyqe< `IDATxڼZk]Wsiіz@O~ :] L`$cq̈Z}Gj Oœp;eyawPps* v#C$יu8]R1<ă _sH99A{!gy픊fQ\̵Ze6o]?7x<~Ggx᭠O)h58 | CR2d/.qz(+ĚRvgW۝v-NTw{m6^jFƅYy#n؞ xPjE aa3-$NuEK-k/);c|!Mx?LbTk9UwΕ.| dʆ"3x6V Z!dA(C}{hr99}$BY?Sƍ;|6e:keO#֯JB~}?ТΩٱN.y;+P7xJM?YÅYŷUH+?C 3)¨b%܅IS @pcX[GMJfUq b Lj>₂߃t(fbYf I`'eE, -RYYh9-o=!cV@NXTf"kyD>IYCKtݦ $X&.r(wPcu}k&{qﮙN,/We_ߕ-\؄!UЎ_ E&sZ);Lz)ED9l8?0WL#*3L7&TІʨ7Ce~R-Cozo%2DɈaaA (w J8 kXByj1hI`۔7fxgRA lTTvy5)=+8w9m󕅹EBYoNC)V;So7O\j5M"a`X1B%3sKTAP YXA)چh T¹le ?J|d>Gׄgy:UHڣzFFW,&5:XK^nFRXB dJ9~NtLt|@*o;Fr}d2ZI_iw:YO׸H}!ggjPPd K-XßˊW.6Rl]5"9ޑ.ssڇ薥ɮt1eʆ>_ow.6-$3=z;D9~aC]lU`#y(c,2>̲TVD:@dwPcgjgs1s/>50#'0[*'+NnrJ8~b$I|R'_R30ѧ14iIpGlOG$= H} cy?aJET̥i\׏0&bTBo"kA aQٲAJn\G|{5RiL4ToĚ>'LGPB[BuڐYP0"Hv1đ{$37PX~4(Th~IOfL߇\d5=٦iAp–} C6osJd?!7]G6`DI.VIENDB`PK>\#o,,assets/index.htmlnuW+APK>\c*  assets/css/tables.cssnuW+A.template_block { display: block; } .template_none { display: none; } table.adminlist tbody tr.addfield td { background-color: #CCFFCC; } .optionrow_block, .exportoption_block { } .optionrow_none, .exportoption_none { display: none; } table.adminlist thead th.showallbutton { background-color: #CECECE; border-style: outset; } .center { text-align: center; } table#selectuserid tbody tr, table#selectproductsku tbody tr, table#selectitemproductsku tbody tr { cursor: pointer; } PK>\obbassets/css/jquery.alerts.cssnuW+A#popup_container { font-family: Arial, sans-serif; font-size: 12px; min-width: 300px; /* Dialog will be no smaller than this */ max-width: 600px; /* Dialog will wrap after this width */ background: #FFF; border: solid 5px #999; color: #000; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; } #popup_title { font-size: 14px; font-weight: bold; text-align: center; line-height: 1.75em; color: #25415e; background: #CCC url(images/title.gif) top repeat-x; border: solid 1px #FFF; border-bottom: solid 1px #345578; cursor: default; padding: 0em; margin: 0em; } #popup_content { background: 16px 16px no-repeat url(images/info.gif); padding: 1em 1.75em; margin: 0em; } #popup_content.alert { background-image: url(images/important.gif); } #popup_content.confirm { background-image: url(images/info.gif); } #popup_content.prompt { background-image: url(images/help.gif); } #popup_message { padding-left: 48px; } #popup_panel { text-align: center; margin: 1em 0em 0em 1em; } #popup_prompt { margin: .5em 0em; }PK>\MP.assets/css/display.cssnuW+A/* Control panel */ #cpanel { display: block; float: left; } .cpanel_button { display: block; float:left; } .template_header { background-color: #CFCFCF; margin-bottom: 0em; } .longtext { width: 45em; } .delimiter { width: 1.2em; } .thumbs { width: 3em; } br { clear: left; } .clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } #subtitle { /*color: #146295;*/ font-size: 1.128em; font-weight: bold; display: inline-block; width: 100%; padding-top: 0px; padding-bottom: 0px; border-bottom-width: 1px; border-bottom-style: solid; border-bottom-color: #dfdfdf; vertical-align: top; } /* Hides from IE-mac \ */ * html .clearfix {height: 1%;} /* End hide from IE-mac */ .debug { display: none; border-bottom: 1px dashed #000000; padding: 0.2em; margin-bottom: 0.3em; } .sqlerror, .error { font-size: 14px; color: #FF0000; } IMG { border: none; } .smallprint { font-size: 10px; } .bold { font-weight: bold; } #filterbox { text-align: left; margin: 0.2em; } #templatesettings { display: block; float: left; width: 50%; } #systemlimits { display: block; float: right; width: 50%; } #templateconfig { display: block; } .templateconfig-active { background-color: #CECECE; border: 0.2em ridge #000000; } #templateconfig #templateconfig-header { display: block; margin-top: 1.5em; font-size: 120%; } #templateconfig #templateconfig-content { display: block; text-align: left; margin-top: 3.5em; margin-left: 2em; } #templateconfig #templateconfig-content .submit, #templateconfig-steps .submit { border: 0.2em ridge #000000; background: transparent; } #configurator #import_tab, #configurator #export_tab, #configurator #images_tab, #configurator #email_tab { display: none; } .msgtitle { margin-right:0.4em; padding-right: 0.4em; border-right: 0.2em solid #CECECE; } .msgtitle a { cursor: pointer; } .showexportoption { cursor: pointer; } .userfilename { text-align: center; font-size: 1.5em; padding: 0.5em; border: 1px solid #EFEFE0; } .column_header_input { width: 15em; } #importcontinue { color: #FF0000; float: right; display: block; font-size: 16px; padding: 0.2em; } .replaceinput { width: 200px; } .crontitle { margin: 5px; font-size: 14px; } .cronline { margin: 10px; padding: 10px; background: #F1EFFF; border: 1px solid #000000; } #cronnote { margin: 5px; font-size: 1.5em; } .resultscounter { display: block; float: right; } #error_file { margin: 5px; } .writable { color: #008000; } .not_writable { color: #FF0000; } /* Export page */ #set_export { font-size: 16px; } #selected_export { font-weight: bold; text-decoration: underline; } .selectcol { width: 5px; } #quickadd-buttons { display: block; position: relative; float: left; margin-left: 10px; } #importtypes, #exporttypes { display: block; position: left; float: left; } table.adminlist tbody tr.tDnD_whileDrag td { background: #ffffff url(images/subtab_bg.png) 50% top repeat-x; } .isprimary { color: #FF0000; } .dialog-text { margin-left: 42px; } .dialog-info { background-image: url("images/info.gif"); background-repeat: no-repeat; display: block; float: left; height: 32px; width: 32px; } .dialog-important { background-image: url(images/important.gif); } .dialog-help { background-image: url(images/help.gif); } .dialog-hide { display: none; } fieldset fieldset, fieldset { position: relative; overflow: visible; }PK>\ ҁassets/css/jquery-csvi-ie.cssnuW+A.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-size: 1em; } .ui-widget select { height: 2em;}PK>\_]]assets/css/jquery-ui.cssnuW+A/* * jQuery UI CSS Framework 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API */ /* Layout helpers ----------------------------------*/ .ui-helper-hidden { display: none; } .ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } .ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } .ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } .ui-helper-clearfix { display: inline-block; } /* required comment for clearfix to work in Opera \*/ * html .ui-helper-clearfix { height:1%; } .ui-helper-clearfix { display:block; } /* end clearfix */ .ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } /* Interaction Cues ----------------------------------*/ .ui-state-disabled { cursor: default !important; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } /* Misc visuals ----------------------------------*/ /* Overlays */ .ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } /* * jQuery UI CSS Framework 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Theming/API * * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Trebuchet%20MS,%20Tahoma,%20Verdana,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=f6a828&bgTextureHeader=12_gloss_wave.png&bgImgOpacityHeader=35&borderColorHeader=e78f08&fcHeader=ffffff&iconColorHeader=ffffff&bgColorContent=eeeeee&bgTextureContent=03_highlight_soft.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=333333&iconColorContent=222222&bgColorDefault=f6f6f6&bgTextureDefault=02_glass.png&bgImgOpacityDefault=100&borderColorDefault=cccccc&fcDefault=1c94c4&iconColorDefault=ef8c08&bgColorHover=fdf5ce&bgTextureHover=02_glass.png&bgImgOpacityHover=100&borderColorHover=fbcb09&fcHover=c77405&iconColorHover=ef8c08&bgColorActive=ffffff&bgTextureActive=02_glass.png&bgImgOpacityActive=65&borderColorActive=fbd850&fcActive=eb8f00&iconColorActive=ef8c08&bgColorHighlight=ffe45c&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=75&borderColorHighlight=fed22f&fcHighlight=363636&iconColorHighlight=228ef1&bgColorError=b81900&bgTextureError=08_diagonals_thick.png&bgImgOpacityError=18&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffd27a&bgColorOverlay=666666&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=20&opacityOverlay=50&bgColorShadow=000000&bgTextureShadow=01_flat.png&bgImgOpacityShadow=10&opacityShadow=20&thicknessShadow=5px&offsetTopShadow=-5px&offsetLeftShadow=-5px&cornerRadiusShadow=5px */ /* Component containers ----------------------------------*/ .ui-widget { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Trebuchet MS, Tahoma, Verdana, Arial, sans-serif; font-size: 1em; } .ui-widget-content { border: 1px solid #dddddd; background: #eeeeee url(images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x; color: #333333; } .ui-widget-content a { color: #333333; } .ui-widget-header { border: 1px solid #e78f08; background: #f6a828 url(images/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x; color: #ffffff; font-weight: bold; } .ui-widget-header a { color: #ffffff; } /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #cccccc; background: #f6f6f6 url(images/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #1c94c4; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #1c94c4; text-decoration: none; } .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #fbcb09; background: #fdf5ce url(images/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #c77405; } .ui-state-hover a, .ui-state-hover a:hover { color: #c77405; text-decoration: none; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #fbd850; background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; font-weight: bold; color: #eb8f00; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #eb8f00; text-decoration: none; } .ui-widget :active { outline: none; } /* Interaction Cues ----------------------------------*/ .ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fed22f; background: #ffe45c url(images/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x; color: #363636; } .ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } .ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #b81900 url(images/ui-bg_diagonals-thick_18_b81900_40x40.png) 50% 50% repeat; color: #ffffff; } .ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; } .ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; } .ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } .ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } .ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } /* Icons ----------------------------------*/ /* states and images */ .ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png); } .ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png); } .ui-widget-header .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); } .ui-state-default .ui-icon { background-image: url(images/ui-icons_ef8c08_256x240.png); } .ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } .ui-state-active .ui-icon {background-image: url(images/ui-icons_ef8c08_256x240.png); } .ui-state-highlight .ui-icon {background-image: url(images/ui-icons_228ef1_256x240.png); } .ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffd27a_256x240.png); } /* positioning */ .ui-icon-carat-1-n { background-position: 0 0; } .ui-icon-carat-1-ne { background-position: -16px 0; } .ui-icon-carat-1-e { background-position: -32px 0; } .ui-icon-carat-1-se { background-position: -48px 0; } .ui-icon-carat-1-s { background-position: -64px 0; } .ui-icon-carat-1-sw { background-position: -80px 0; } .ui-icon-carat-1-w { background-position: -96px 0; } .ui-icon-carat-1-nw { background-position: -112px 0; } .ui-icon-carat-2-n-s { background-position: -128px 0; } .ui-icon-carat-2-e-w { background-position: -144px 0; } .ui-icon-triangle-1-n { background-position: 0 -16px; } .ui-icon-triangle-1-ne { background-position: -16px -16px; } .ui-icon-triangle-1-e { background-position: -32px -16px; } .ui-icon-triangle-1-se { background-position: -48px -16px; } .ui-icon-triangle-1-s { background-position: -64px -16px; } .ui-icon-triangle-1-sw { background-position: -80px -16px; } .ui-icon-triangle-1-w { background-position: -96px -16px; } .ui-icon-triangle-1-nw { background-position: -112px -16px; } .ui-icon-triangle-2-n-s { background-position: -128px -16px; } .ui-icon-triangle-2-e-w { background-position: -144px -16px; } .ui-icon-arrow-1-n { background-position: 0 -32px; } .ui-icon-arrow-1-ne { background-position: -16px -32px; } .ui-icon-arrow-1-e { background-position: -32px -32px; } .ui-icon-arrow-1-se { background-position: -48px -32px; } .ui-icon-arrow-1-s { background-position: -64px -32px; } .ui-icon-arrow-1-sw { background-position: -80px -32px; } .ui-icon-arrow-1-w { background-position: -96px -32px; } .ui-icon-arrow-1-nw { background-position: -112px -32px; } .ui-icon-arrow-2-n-s { background-position: -128px -32px; } .ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } .ui-icon-arrow-2-e-w { background-position: -160px -32px; } .ui-icon-arrow-2-se-nw { background-position: -176px -32px; } .ui-icon-arrowstop-1-n { background-position: -192px -32px; } .ui-icon-arrowstop-1-e { background-position: -208px -32px; } .ui-icon-arrowstop-1-s { background-position: -224px -32px; } .ui-icon-arrowstop-1-w { background-position: -240px -32px; } .ui-icon-arrowthick-1-n { background-position: 0 -48px; } .ui-icon-arrowthick-1-ne { background-position: -16px -48px; } .ui-icon-arrowthick-1-e { background-position: -32px -48px; } .ui-icon-arrowthick-1-se { background-position: -48px -48px; } .ui-icon-arrowthick-1-s { background-position: -64px -48px; } .ui-icon-arrowthick-1-sw { background-position: -80px -48px; } .ui-icon-arrowthick-1-w { background-position: -96px -48px; } .ui-icon-arrowthick-1-nw { background-position: -112px -48px; } .ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } .ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } .ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } .ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } .ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } .ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } .ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } .ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } .ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } .ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } .ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } .ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } .ui-icon-arrowreturn-1-w { background-position: -64px -64px; } .ui-icon-arrowreturn-1-n { background-position: -80px -64px; } .ui-icon-arrowreturn-1-e { background-position: -96px -64px; } .ui-icon-arrowreturn-1-s { background-position: -112px -64px; } .ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } .ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } .ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } .ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } .ui-icon-arrow-4 { background-position: 0 -80px; } .ui-icon-arrow-4-diag { background-position: -16px -80px; } .ui-icon-extlink { background-position: -32px -80px; } .ui-icon-newwin { background-position: -48px -80px; } .ui-icon-refresh { background-position: -64px -80px; } .ui-icon-shuffle { background-position: -80px -80px; } .ui-icon-transfer-e-w { background-position: -96px -80px; } .ui-icon-transferthick-e-w { background-position: -112px -80px; } .ui-icon-folder-collapsed { background-position: 0 -96px; } .ui-icon-folder-open { background-position: -16px -96px; } .ui-icon-document { background-position: -32px -96px; } .ui-icon-document-b { background-position: -48px -96px; } .ui-icon-note { background-position: -64px -96px; } .ui-icon-mail-closed { background-position: -80px -96px; } .ui-icon-mail-open { background-position: -96px -96px; } .ui-icon-suitcase { background-position: -112px -96px; } .ui-icon-comment { background-position: -128px -96px; } .ui-icon-person { background-position: -144px -96px; } .ui-icon-print { background-position: -160px -96px; } .ui-icon-trash { background-position: -176px -96px; } .ui-icon-locked { background-position: -192px -96px; } .ui-icon-unlocked { background-position: -208px -96px; } .ui-icon-bookmark { background-position: -224px -96px; } .ui-icon-tag { background-position: -240px -96px; } .ui-icon-home { background-position: 0 -112px; } .ui-icon-flag { background-position: -16px -112px; } .ui-icon-calendar { background-position: -32px -112px; } .ui-icon-cart { background-position: -48px -112px; } .ui-icon-pencil { background-position: -64px -112px; } .ui-icon-clock { background-position: -80px -112px; } .ui-icon-disk { background-position: -96px -112px; } .ui-icon-calculator { background-position: -112px -112px; } .ui-icon-zoomin { background-position: -128px -112px; } .ui-icon-zoomout { background-position: -144px -112px; } .ui-icon-search { background-position: -160px -112px; } .ui-icon-wrench { background-position: -176px -112px; } .ui-icon-gear { background-position: -192px -112px; } .ui-icon-heart { background-position: -208px -112px; } .ui-icon-star { background-position: -224px -112px; } .ui-icon-link { background-position: -240px -112px; } .ui-icon-cancel { background-position: 0 -128px; } .ui-icon-plus { background-position: -16px -128px; } .ui-icon-plusthick { background-position: -32px -128px; } .ui-icon-minus { background-position: -48px -128px; } .ui-icon-minusthick { background-position: -64px -128px; } .ui-icon-close { background-position: -80px -128px; } .ui-icon-closethick { background-position: -96px -128px; } .ui-icon-key { background-position: -112px -128px; } .ui-icon-lightbulb { background-position: -128px -128px; } .ui-icon-scissors { background-position: -144px -128px; } .ui-icon-clipboard { background-position: -160px -128px; } .ui-icon-copy { background-position: -176px -128px; } .ui-icon-contact { background-position: -192px -128px; } .ui-icon-image { background-position: -208px -128px; } .ui-icon-video { background-position: -224px -128px; } .ui-icon-script { background-position: -240px -128px; } .ui-icon-alert { background-position: 0 -144px; } .ui-icon-info { background-position: -16px -144px; } .ui-icon-notice { background-position: -32px -144px; } .ui-icon-help { background-position: -48px -144px; } .ui-icon-check { background-position: -64px -144px; } .ui-icon-bullet { background-position: -80px -144px; } .ui-icon-radio-off { background-position: -96px -144px; } .ui-icon-radio-on { background-position: -112px -144px; } .ui-icon-pin-w { background-position: -128px -144px; } .ui-icon-pin-s { background-position: -144px -144px; } .ui-icon-play { background-position: 0 -160px; } .ui-icon-pause { background-position: -16px -160px; } .ui-icon-seek-next { background-position: -32px -160px; } .ui-icon-seek-prev { background-position: -48px -160px; } .ui-icon-seek-end { background-position: -64px -160px; } .ui-icon-seek-start { background-position: -80px -160px; } /* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ .ui-icon-seek-first { background-position: -80px -160px; } .ui-icon-stop { background-position: -96px -160px; } .ui-icon-eject { background-position: -112px -160px; } .ui-icon-volume-off { background-position: -128px -160px; } .ui-icon-volume-on { background-position: -144px -160px; } .ui-icon-power { background-position: 0 -176px; } .ui-icon-signal-diag { background-position: -16px -176px; } .ui-icon-signal { background-position: -32px -176px; } .ui-icon-battery-0 { background-position: -48px -176px; } .ui-icon-battery-1 { background-position: -64px -176px; } .ui-icon-battery-2 { background-position: -80px -176px; } .ui-icon-battery-3 { background-position: -96px -176px; } .ui-icon-circle-plus { background-position: 0 -192px; } .ui-icon-circle-minus { background-position: -16px -192px; } .ui-icon-circle-close { background-position: -32px -192px; } .ui-icon-circle-triangle-e { background-position: -48px -192px; } .ui-icon-circle-triangle-s { background-position: -64px -192px; } .ui-icon-circle-triangle-w { background-position: -80px -192px; } .ui-icon-circle-triangle-n { background-position: -96px -192px; } .ui-icon-circle-arrow-e { background-position: -112px -192px; } .ui-icon-circle-arrow-s { background-position: -128px -192px; } .ui-icon-circle-arrow-w { background-position: -144px -192px; } .ui-icon-circle-arrow-n { background-position: -160px -192px; } .ui-icon-circle-zoomin { background-position: -176px -192px; } .ui-icon-circle-zoomout { background-position: -192px -192px; } .ui-icon-circle-check { background-position: -208px -192px; } .ui-icon-circlesmall-plus { background-position: 0 -208px; } .ui-icon-circlesmall-minus { background-position: -16px -208px; } .ui-icon-circlesmall-close { background-position: -32px -208px; } .ui-icon-squaresmall-plus { background-position: -48px -208px; } .ui-icon-squaresmall-minus { background-position: -64px -208px; } .ui-icon-squaresmall-close { background-position: -80px -208px; } .ui-icon-grip-dotted-vertical { background-position: 0 -224px; } .ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } .ui-icon-grip-solid-vertical { background-position: -32px -224px; } .ui-icon-grip-solid-horizontal { background-position: -48px -224px; } .ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } .ui-icon-grip-diagonal-se { background-position: -80px -224px; } /* Misc visuals ----------------------------------*/ /* Corner radius */ .ui-corner-tl { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; } .ui-corner-tr { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } .ui-corner-bl { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } .ui-corner-br { -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } .ui-corner-top { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; } .ui-corner-bottom { -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } .ui-corner-right { -moz-border-radius-topright: 4px; -webkit-border-top-right-radius: 4px; border-top-right-radius: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 4px; border-bottom-right-radius: 4px; } .ui-corner-left { -moz-border-radius-topleft: 4px; -webkit-border-top-left-radius: 4px; border-top-left-radius: 4px; -moz-border-radius-bottomleft: 4px; -webkit-border-bottom-left-radius: 4px; border-bottom-left-radius: 4px; } .ui-corner-all { -moz-border-radius: 4px; -webkit-border-radius: 4px; border-radius: 4px; } /* Overlays */ .ui-widget-overlay { background: #666666 url(images/ui-bg_diagonals-thick_20_666666_40x40.png) 50% 50% repeat; opacity: .50;filter:Alpha(Opacity=50); } .ui-widget-shadow { margin: -5px 0 0 -5px; padding: 5px; background: #000000 url(images/ui-bg_flat_10_000000_40x100.png) 50% 50% repeat-x; opacity: .20;filter:Alpha(Opacity=20); -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; }/* * jQuery UI Resizable 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Resizable#theming */ .ui-resizable { position: relative;} .ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} .ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } .ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } .ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } .ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } .ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } .ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } .ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } .ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } .ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/* * jQuery UI Dialog 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Dialog#theming */ .ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } .ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } .ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } .ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } .ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } .ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } .ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } .ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } .ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } .ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } .ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } .ui-draggable .ui-dialog-titlebar { cursor: move; } /* * jQuery UI Tabs 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Tabs#theming */ .ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ .ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } .ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } .ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } .ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ .ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } .ui-tabs .ui-tabs-hide { display: none !important; } /* * jQuery UI Progressbar 1.8.10 * * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license * * http://docs.jquery.com/UI/Progressbar#theming */ .ui-progressbar { height:2em; text-align: left; } .ui-progressbar .ui-progressbar-value {height:100%; }PK>\}EEassets/css/install.cssnuW+A#installcsvi { width: 850px; } #versions { display: block; float: left; border: 0px solid #CCCCCC; width: 300px; } #rightbox { float:right; margin-top:13px; width: 520px; height: 350px; position:relative; border-left: 1px solid #cecece; } #options { position:absolute; top: 0px; left: 1px; padding-left: 5px; padding-top: 3px; padding-bottom: 3px; background-color: #f4f4f4; background: -moz-linear-gradient(left, #e2e0e0 0%, #f4f4f4 100%); /* FF3.6+ */ background: -webkit-gradient(linear, left top, right top, color-stop(0%,#e2e0e0), color-stop(100%,#f4f4f4)); /* Chrome,Safari4+ */ background: -webkit-linear-gradient(left, #e2e0e0 0%,#f4f4f4 100%); /* Chrome10+,Safari5.1+ */ background: -o-linear-gradient(left, #e2e0e0 0%,#f4f4f4 100%); /* Opera 11.10+ */ background: -ms-linear-gradient(left, #e2e0e0 0%,#f4f4f4 100%); /* IE10+ */ background: linear-gradient(left, #e2e0e0 0%,#f4f4f4 100%); /* W3C */ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e0e0', endColorstr='#f4f4f4',GradientType=1 ); /* IE6-9 */ width: 450px; } #progress { display: block; position:absolute; top: 40px; left: 1px; width: 600px; height: 250px; padding: 5px; overflow-y:auto; overflow-x:hidden; } #oldversionbox { height: 34px; width: 274px; font-size: 20px; color: #ea5402; padding-top: 30px; margin: 1px; text-align: center; display: block; background-image: url(images/version_found_bg.png); background-repeat: no-repeat; background-position: center bottom; } #newversionbox { height: 34px; width: 274px; font-size: 20px; color: #126592; padding-top: 30px; margin: 1px; text-align:center; display:block; background-image: url(images/install_info_bg.png); background-repeat: no-repeat; background-position: center bottom; } #update { } #update a, #update a:visited { display: block; padding: 5px; border: 1px solid #fba534; -webkit-border-radius: 6px 6px 6px 6px; -moz-border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px; background-color: #fba534; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffad40', endColorstr='#f58c04'); /* for IE */ background: -webkit-gradient(linear, left top, left bottom, from(#ffad40), to(#f58c04)); /* for webkit browsers */ background: -moz-linear-gradient(top, #ffad40, #f58c04); /* for firefox 3.6+ */ -webkit-box-shadow: 1px 1px 4px #666; -moz-box-shadow: 1px 1px 4px #666; box-shadow: 1px 1px 4px #666; color: #FFF; text-decoration:none; font-weight: bold; font-size: 15px; margin-bottom: 10px; margin-top: 12px; width: 35%; text-align:center; } #updatedesc { padding-bottom: 7px; } #install { } #install a, #install a:visited{ display: block; padding: 5px; border: 1px solid #176b99; -webkit-border-radius: 6px 6px 6px 6px; -moz-border-radius: 6px 6px 6px 6px; border-radius: 6px 6px 6px 6px; background-color: #3b91c0; filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#3b91c0', endColorstr='#0e5c86'); /* for IE */ background: -webkit-gradient(linear, left top, left bottom, from(#3b91c0), to(#0e5c86)); /* for webkit browsers */ background: -moz-linear-gradient(top, #3b91c0, #0e5c86); /* for firefox 3.6+ */ -webkit-box-shadow: 1px 1px 4px #666; -moz-box-shadow: 1px 1px 4px #666; box-shadow: 1px 1px 4px #666; color: #FFF; text-decoration:none; font-weight: bold; font-size: 15px; margin-bottom: 10px; margin-top: 10px; width: 28%; text-align:center; } #finished { display: block; font-size: 18px; color: #126592; padding-top: 3px; margin: 5px 5px 20px; } #install_continue { vertical-align: middle; } #finished_text { margin-left: 10px; }PK>\\f''assets/css/jquery-csvi.cssnuW+A/* Component containers ----------------------------------*/ .ui-widget { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 1.1em; } .ui-widget .ui-widget { font-size: 1em; } .ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 1em; } .ui-widget-content { border: 1px solid #aaaaaa; background: #ffffff ; color: #222222; } .ui-widget-content a { color: #222222; } .ui-widget-header { border: 0px solid #aaaaaa; color: #222222; font-weight: bold; background-color: #cccccc; background-image: url(images/maintabbg.png); background-repeat: repeat-x; background-position: 50% bottom; } .ui-widget-header a { color: #222222; } a:active { outline: none;} a:focus { outline: none;} /* Interaction states ----------------------------------*/ .ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #555555; background-color: #e6e6e6; background-image: url(images/deactmaintab.png); background-repeat: repeat-x; background-position: 50% bottom; } .ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2a6583; text-decoration: none; font-size:16px; } /*.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border-bottom: 1px solid #4a84a5; font-weight: normal; color: #212121; background-color: #dadada; background-image: url(images/deactmaintab_hov.png); background-repeat: repeat-x; background-position: 50% bottom; }*/ .ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #212121; background-color: #dadada; background-image: url(images/deactmaintab_hov.png); background-repeat: repeat-x; background-position: 50% bottom; } .ui-state-hover a, .ui-state-hover a:hover { color: #3f7c9b; text-decoration: none; font-size: 16px; } .ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/activetab_bg.png) 50% top repeat-x; font-weight: normal; color: #212121; } .ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121; background: #ffffff url(images/activetab_bg.png) 50% top repeat-x; text-decoration: none; font-weight:bold; } .ui-widget :active { outline: none; } .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; border-bottom: 0 !important; padding: 0; white-space: nowrap; margin-top: 0; margin-right: 0.2em; margin-bottom: 2px; margin-left: 0; } .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding-top: 0.2em; padding-right: 0.7em; padding-bottom: 0.2em; padding-left: 0.7em; } /*IMPORT PAGE */ #import_page #options_tab .ui-widget { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 0.8em; } #import_page #options_tab .ui-widget .ui-widget { font-size: 0.8em; } #import_page #options_tab .ui-widget input, #import_page #options_tab .ui-widget select, #import_page #options_tab .ui-widget textarea, #import_page #options_tab .ui-widget button { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 0.8em; } #import_page #options_tab .ui-widget-content { border-top: 0px solid #aaaaaa; border-bottom: 1px solid #aaaaaa; border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; background: #ffffff ; color: #222222; } #import_page #options_tab .ui-widget-content a { color: #222222; } #import_page #options_tab .ui-widget-header { border: 0px solid #aaaaaa; color: #222222; font-weight: bold; background-color: #cccccc; background-image: url(images/maintabbg.png); background-repeat: repeat-x; background-position: 50% bottom; } #import_page #options_tab .ui-widget-header a { color: #222222; } #import_page #options_tab a:active { outline: none;} #import_page #options_tab a:focus { outline: none;} #import_page #options_tab .ui-state-default, #import_page #options_tab .ui-widget-content .ui-state-default, #import_page #options_tab .ui-widget-header .ui-state-default { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #555555; background-color: #e6e6e6; background-image: url(images/subtab_bg.png); background-repeat: repeat-x; background-position: 50% bottom; } #import_page #options_tab .ui-state-default a, #import_page #options_tab .ui-state-default a:link, #import_page #options_tab .ui-state-default a:visited { color: #2a6583; text-decoration: none; font-size:14px; } #import_page #options_tab .ui-state-hover, #import_page #options_tab .ui-widget-content .ui-state-hover, #import_page #options_tab .ui-widget-header .ui-state-hover { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #212121; background-color: #dadada; background-image: url(images/deactmaintab_hov.png); background-repeat: repeat-x; background-position: 50% bottom; } #import_page #options_tab .ui-state-hover a, #import_page #options_tab .ui-state-hover a:hover { color: #3f7c9b; text-decoration: none; font-size: 14px; } #import_page #options_tab .ui-state-active, #import_page #options_tab .ui-widget-content .ui-state-active, #import_page #options_tab .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/activetab_bg.png) 50% top repeat-x; font-weight: normal; color: #212121; } #import_page #options_tab .ui-state-active a, #import_page #options_tab .ui-state-active a:link, #import_page #options_tab .ui-state-active a:visited { color: #212121; text-decoration: none; font-weight:bold; } #import_page #options_tab .ui-widget :active { outline: none; } #import_page #options_tab .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; border-bottom: 0 !important; padding: 0; white-space: nowrap; margin-top: 0; margin-right: 0.2em; margin-bottom: 1px; margin-left: 0; } #import_page #options_tab .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding-top: 0.5em; padding-right: 0.7em; padding-bottom: 0.3em; padding-left: 0.7em; } /*IMPORT PAGE */ #import_page #options_tab .ui-widget { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 0.8em; } #import_page #options_tab .ui-widget .ui-widget { font-size: 0.8em; } #import_page #options_tab .ui-widget input, #import_page #options_tab .ui-widget select, #import_page #options_tab .ui-widget textarea, #import_page #options_tab .ui-widget button { font-family: "Trebuchet MS", Arial, Helvetica, sans-serif ; font-size: 0.8em; } #import_page #options_tab .ui-widget-content { border-top: 0px solid #aaaaaa; border-bottom: 1px solid #aaaaaa; border-left: 1px solid #aaaaaa; border-right: 1px solid #aaaaaa; background: #ffffff ; color: #222222; } #import_page #options_tab .ui-widget-content a { color: #222222; } #import_page #options_tab .ui-widget-header { border: 0px solid #aaaaaa; color: #222222; font-weight: bold; background-color: #cccccc; background-image: url(images/maintabbg.png); background-repeat: repeat-x; background-position: 50% bottom; } #import_page #options_tab .ui-widget-header a { color: #222222; } /*EXPORT PAGE*/ #export_page #options_tab .ui-state-default, #export_page #options_tab .ui-widget-content .ui-state-default, #export_page #options_tab .ui-widget-header .ui-state-default { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #555555; background-color: #e6e6e6; background-image: url(images/subtab_bg.png); background-repeat: repeat-x; background-position: 50% bottom; } #export_page #options_tab .ui-state-default a, #export_page #options_tab .ui-state-default a:link, #export_page #options_tab .ui-state-default a:visited { color: #2a6583; text-decoration: none; font-size:14px; } #export_page #options_tab .ui-state-hover, #export_page #options_tab .ui-widget-content .ui-state-hover, #export_page #options_tab .ui-widget-header .ui-state-hover, #export_page #options_tab .ui-state-focus, #export_page #options_tab .ui-widget-content .ui-state-focus { /* border-bottom: 1px solid #4a84a5;*/ font-weight: normal; color: #212121; background-color: #dadada; background-image: url(images/deactmaintab_hov.png); background-repeat: repeat-x; background-position: bottom; } #export_page #options_tab .ui-state-hover a, #export_page #options_tab .ui-state-hover a:hover { color: #3f7c9b; text-decoration: none; font-size: 14px; } #export_page #options_tab .ui-state-active, #export_page #options_tab .ui-widget-content .ui-state-active, #export_page #options_tab .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa; background: #ffffff url(images/activetab_bg.png) 50% top repeat-x; font-weight: normal; color: #212121; } #export_page #options_tab .ui-state-active a, #export_page #options_tab .ui-state-active a:link, #export_page #options_tab .ui-state-active a:visited { color: #212121; text-decoration: none; font-weight:bold; } #export_page #options_tab .ui-widget :active { outline: none; } #export_page #options_tab .ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; border-bottom: 0 !important; padding: 0; white-space: nowrap; margin-top: 0; margin-right: 0.2em; margin-bottom: 1px; margin-left: 0; } #export_page #options_tab .ui-tabs .ui-tabs-nav li a { float: left; text-decoration: none; padding-top: 0.5em; padding-right: 0.7em; padding-bottom: 0.3em; padding-left: 0.7em; }PK>\ ^BBassets/css/process.cssnuW+A.option_label { display:inline-block; width: 240px; padding-top: 0px; padding-bottom: 0px; border-bottom: 1px #dfdfdf solid; vertical-align:top; } .option_label_image { display:inline-block; width: 200px; padding-top: 0px; padding-bottom: 0px; border-bottom: 1px #dfdfdf solid; vertical-align:top; } .option_label_short { display:inline-block; width: 90px; padding-top: 0px; padding-bottom: 0px; border-bottom: 1px #dfdfdf solid; vertical-align:top; } .option_label_long { display:inline-block; width: 330px; padding-top: 0px; padding-bottom: 0px; border-bottom: 1px #dfdfdf solid; vertical-align:top; } .option_value { display: inline-block; padding-top: 0px; padding-bottom: 0px; /* border-bottom: 1px #ddd solid;*/ } .option_value_block { padding-top: 0px; padding-bottom: 0px; /* border-bottom: 1px #ddd solid;*/ } fieldset fieldset, fieldset { position: relative; /* margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;*/ overflow: visible; } fieldset fieldset:hover, fieldset:hover { position: relative; /* margin-top: 10px; margin-right: 10px; margin-bottom: 10px; margin-left: 10px;*/ overflow: visible; /* border: 1px solid #67b2da;*/ background-color: #f6fcff; } fieldset fieldset legend, fieldset legend { /* display:block;*/ } fieldset fieldset legend span { /* display:block;*/ } fieldset.float31 { float:left; width: 32%; margin-right: 10px; height: auto; min-height: 280px; } fieldset.float30 { float:left; width: 30%; margin-right: 10px; height: auto; min-height: 280px; } fieldset.float50 { float:left; width: 48%; } fieldset.float70 { float:left; width: 66%; } .ordersearch { width: 40%; }PK>\)assets/css/.htaccessnuW+A Order allow,deny Deny from all PK>\+%hh2assets/css/images/ui-bg_glass_100_f6f6f6_1x400.pngnuW+APNG  IHDRoX /IDAT8DZ "" dkf$$۪-< +PIENDB`PK>\C<<"assets/css/images/deactmaintab.pngnuW+APNG  IHDR!\&tEXtSoftwareAdobe ImageReadyqe<HPLTEڮдٲէĵ٭θJƪʯѳ֨ŦŰөǬͫ˴ױԪȦĶ&IDATxb`g`e`de qf.1b`XlF A AHXAPA@AL RZCG 90( ;DQDCBDpwT "DwCU3^ψ8OW|IENDB`PK>\assets/css/images/title.gifnuW+AGIF89a !, ]$dihlG,1`߸ |(ŁrT@Zv]x`ocL.hm|N !;PK>\JR[$assets/css/images/new_version_bg.jpgnuW+AJFIFddDucky-Adobed       ,+++,1111111111 !!!!))())1111111111@"\ ?Ti`*疆9ohqemEzK ĉDHK ĉDHK ĉDHK ĉDHK ĉDH%i ti:Jlri)@@$F͂EvlٰXWfa]vlٰXWfa]vlٰXWfa6 #)ʹʡj33H9"KĦ$D)2"Jk"LHȓ)$$D)2"Jk"LHȓ)$$D)&2LKc,q8qX*g59>G]ѼǯK<ǯV}zg=Ϣ,rjUKKH-ac uX䴴v9-- ]KKH-ac uX䴴v9-- ]KKH-blrZz[n,zѝ{wsLtѿ]|tc)gK;cqՄPK>\g:assets/css/images/maintabbg.pngnuW+APNG  IHDR9QtEXtSoftwareAdobe ImageReadyqe<iPLTE#QlJ5QVIDATxbPbAf1ab8XʃQSde %%t$$ ( - + )@(栚)4Uh4dٲ@ӹKm`d \<(4"" mЅ;}Z9PU)ZI)1$" 4=qIENDB`PK>\4W  assets/css/images/subtab_bg.pngnuW+APNG  IHDRF{`tEXtSoftwareAdobe ImageReadyqe<6PLTEqIœiIDATxbdd`f A6~ <   E8b @Qf8P A_J/BIENDB`PK>\D&assets/css/images/version_found_bg.pngnuW+APNG  IHDR{tEXtSoftwareAdobe ImageReadyqe<IDATx]0 Źr͜4(OIͲ;RT[A ikkk5H$mmm7`hKf< $ -?|~|@?iwg1Y~,d }ڜp`f0a["gsxXͨrgъ 5T<ۃ@ >l퓀_@o[(^}P0\75 ퟷb4mèo YP ڑG|Ink<BֆNg0̙z`?whyDZ:rlme;Jɶ_Y߁IENDB`PK>\qJZZ;assets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.pngnuW+APNG  IHDRdG,Z`!IDATc&!D;~D"IENDB`PK>\)assets/css/images/.htaccessnuW+A Order allow,deny Deny from all PK>\p$assets/css/images/old_version_bg.jpgnuW+AJFIFddDucky-Adobed       ,+++,1111111111 !!!!))())1111111111@"^ ?d$9ÜN/T9h4[3ԊbQSDH/,4DBQSDH/,4DBQSDH/,4DBQSDH/,4DBQSDH/,&LJu54K8˭ ę4$TAHٰHٰHٰHٰHٰH 369sj!'fŒ$DY"JHŒ$DY"JHŒ$DY"JHŒ$DY"JHŒ$DY$T"mcXĤĹR)@ez.3:O^zywn3ڞUg>m92}XyXii]Xii]Xii]Xii]XiielVmf;aǪ}[3m祘'ϧ/^W%:uPK>\}}2assets/css/images/ui-bg_glass_100_fdf5ce_1x400.pngnuW+APNG  IHDRoX DIDAT8c&Qb%/-#`db`b``b`b`dFe1ea3(1J`! ĔIENDB`PK>\FW-assets/css/images/ui-icons_ffd27a_256x240.pngnuW+APNG  IHDRIJPLTE|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||ǟNtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?s\!q-assets/css/images/ui-icons_ef8c08_256x240.pngnuW+APNG  IHDRIJPLTE ["̙NtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?s\ﱍ-assets/css/images/ui-icons_228ef1_256x240.pngnuW+APNG  IHDRIJPLTE$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$A NtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?s\;assets/css/images/ui-bg_diagonals-thick_20_666666_40x40.pngnuW+APNG  IHDR((mIDATX] 0Dl ³b!Mk G(hWMc~'=w;JY *2 JA *TA p8Qϔ=CanwTA$I>Mr6jY+IFJM2S6ɕ2MV6$^rzQqIENDB`PK>\ii1assets/css/images/ui-bg_glass_65_ffffff_1x400.pngnuW+APNG  IHDRoX 0IDAT8! + ̼JHR)[lk=O_(<` H"IENDB`PK>\Nnassets/css/images/info.gifnuW+AGIF89a =C#cb i\4c[;u"lTنӄlߙVTryni-<}+Eߑ;:p݅^܂}sdSXH`H+܋l_ڌ^Mk]A&-4i5рX_R/kږ1ݓޖ&ۅp NGONhD؞IhfUx|@EKJ=XBQ!,  ( !|#EB8q ҸVc(l,"." § 8?e-񣉾^,l0S%؅ZE A 2@cD12G " CPK.-D/ނp%Id@Y|!ѧF2 EB1%30@\@ assets/css/images/options_bg.pngnuW+APNG  IHDR(bjtEXtSoftwareAdobe ImageReadyqe<KPLTEoIIDATxз0 @E4_RMDUGzjfNoVcdl]IQF} .]L[IENDB`PK>\b1assets/css/images/ui-bg_flat_10_000000_40x100.pngnuW+APNG  IHDR(ddrzyIDATh1 [ 7(ȚooN+J+J+J+J+J+J+J+J+J+J+J+Jv-F7IENDB`PK>\}rȘ&assets/css/images/deactmaintab_hov.pngnuW+APNG  IHDR!WtEXtSoftwareAdobe ImageReadyqe<EPLTEݷи߻JϹѻ׾ںԿܿۼض϶<oIDATxbadfb` 1AnQb l cfCv-Q D)?j CNcp̉Ut* IENDB`PK>\:  assets/css/images/help.gifnuW+AGIF89a qhn޻ڲ^=1C![e B:Ukt\Б495iJZ3, љ-n,Ȋƃf<()~+ԫe>ɆVEab5MUas"|V(AOϒGJdwAzĄf&_+3Y_ȃgǓ͖OvU^NMҚmkSA?ԥ9ױ1˓Y:P>E68R;NҴ#͊JJ?,SBF*6|yAH:dJmG̅WT~q`S?Ӟtrc^NHJ+̋q̇ev$ˌɉAUΓo;7_sMY[Жڪ3RqS֪+Êw͏6ܷ?ENɒŕʞpD{ui0kPX̞RPVֵzѵ/ʂ!,  (,QVCز]l&DbDp!P.E!”L1a 7,h%HM%NP:%Uq1^1"Z<@VrvZց.1".Wo_Yf+n-k]+RDXR_9FPYx3zZL3K=xI HbC.\JR"!'XfFWKWʄXCH Q qZXC@O[+yIY"&X; *GG*U0PH"g` @`D= Ms9d:P6$%Hs$^4<-H%H14L %lyd3 8@286xd N4 | Ě1 1H ,t$؁8;i1B%8 ` ,h,BDmA,AXi| Ntr G ,ȒS*m  Tt*E 4"PFa0Nqb2c,P-@J.|J.҇ ">40?ޤRF.t QdQ0q؄J=Y`蓁#<э &Lh\'쾉 +,EJR$~)/ p(U/4h~1 ?a@6qaD#/Xp@*vAP$%A/BP4QxЁ ;PK>\)p;;assets/css/images/important.gifnuW+AGIF89a NN==FFQQzz66YY$$==--EEnnuuMMPP~~11ddYY\\**qqiiRR44IIvv__MMRRaaJJ--MMMMvv]]ppIIkkYYddnn..WWmmff^^8822rr##@@00TT HHYY**{{ssDDppooRRcc``^^EEllWW>>88qqaaii44''BBCCii~~||YY::DDffjjjjff##^^\\;;66WWBB @@bbAAnnTT88ll@@;;VVTTHHHHGGCCAABBCC==99oorr33VVVVUUUU!!GGTTmmddggee^^KKDDIImm;;KKUU!!22''sshhppccii&&AATTJJ8888<\gq!assets/css/images/progress_bg.pngnuW+APNG  IHDRpQtEXtSoftwareAdobe ImageReadyqe<6PLTEERs@IDATx|I @K=\36֚3%#^%R[Ω`sƵ/ǸYy-I IENDB`PK>\t8assets/css/images/ui-bg_gloss-wave_35_f6a828_500x100.pngnuW+APNG  IHDRdp}yIDATx[@ɱH֙$YVb&3̇qOlXC#bQ%hyu(@A :P6t l`(@A :P6t l`(@A :P6upޡl`(c޿]I1)G!n${Ax5{2&w݋]˃5k Vؤ=k39Ʀhkxcdgu51k~aIkYyLa+8-;3c:3k%;Ȋ):W\Zʧ3OQA_񗸺SG@A :,U^N1et]L޲>2z+v5'yڝ_}uE+zW變uř6jKQ{km| "s?b|dljvg}Tv粭GFޓħ]u=>fKvfTTgLnfCfڷڪll>grd͜?c8 󿳌ġjxx>oL^|5֌̘=-.+_QܙQYlklZ1Eyzr}+7o\^>q_?7^Jg6ॵ~8YR&+26bƚkl[c)eCKfHe[Bk~͎~<2E5hoxv8=qZ ˷ϊ17Ѽff/gŜynœ?qEVx2ؒCk|YkXȳdYWlErX͛ՙSyu1F2kό/=ٜ{2ZÓWCd>21UZGtTG5ϙk6t 8;7m~MFYkVgρdײy Q{Ư+bzg-Fku5$y>5hZ<3saݫ{6ZC\af΢X^_ˑWKdKTw*gKMqՋ\{Uj3/ٹr%g^{PW̉fCyy]m3qnگr_Ya#jYf_Ϝ3{/-Y8cGvm xtoombU֮,'5v,K)_ڻ`E~k#xMNx޲rA)r2bZo?Zw, :cnz;Ε֟%UAxhLスǕ ǿԎ3kUqߝ1FkC1ayA~kw Xxmv|,τsmWT?Jˏc`r_x7Qp[koYV~*=(]W_EwBʇXX\s՚}yw. 'U6x.Cܺ?wԆqKoO+z{[zxAS,ɢ[o^ovGg3ɯVtV~؀wpi:`-}َpF9x2 eX3c;3!ϲ"Hֲ 2VdZ9lgof]{ݟ1TsPjV~uol*{Fik}]9dzgyw%7w,z%yE7Ő_ԗGvHVTAӛѹJWbڽ[>ҿ{UR597s=kc>rn؀_`(@A :5 :? >r>r~)`x5tOKYHDzٟ=GpؓW֞g]oY{Q~yc/UMv"_^?ӍkzwWKSѽ mxzoQU㋢\GYL`{w+z+_;pS5 :<?]7Ə覹Mu}͇v2c,+m+~+ު\f<^yi1ZqD1fl֏|U[#XqHm]ZGchfoh#_3Z79=gD͞wecS/٦Ř|~K[^fG8 ;q WFgߓq&/HE:\ܲc+Uו6*sjl:͵o̷%ci$gf糲򐱣 4m%ّs4l~26|[] ïj/g+qE}+gٸkmKEݳe*6gSu2]Wm6kE6}__;o&9S_Y_œ2%'mJ]-VͯOWzMKO&嵹rl[xrZNX9b֗mTŧA+~͟oMWdHho5Ūu/>oI'ʃ7Yў8ۭ]g;^"hͯQ=s1e`Cy|!3qFv65/f%v_dw_L ~#+dev݊z>+YwnnvϞjߌ3l}s9KUgU}q7>WzqGc⹚YX|su~;ΟdS6+{SYw+΃=q?l'?co~WDXYy]1WYAiVz*T݊`ev+<#/z]n/z*2]1yϺ(n-_h,e?Gv*kWϳ=y[5Mty-Q.2k"dbgr=YU*{3sX2{`eu/kG1TuWĔ,E=ckڋd*e݋zQE= E=k+ؗm.\n[= IENDB`PK>\#o,,assets/css/images/index.htmlnuW+APK>\\-assets/css/images/ui-icons_ffffff_256x240.pngnuW+APNG  IHDRIJPLTE NtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?s\i>)assets/css/images/grad_line_separator.pngnuW+APNG  IHDRI6tEXtSoftwareAdobe ImageReadyqe<PLTE𾾾EzEwIDATxڼ! wZ`W/;btlSMe&qȳڼ$󪍪Ls˛j<.*2Ǔ:̰»JL1ƹv=*h[8ouBa*IENDB`PK>\uW%assets/css/images/install_info_bg.pngnuW+APNG  IHDR{tEXtSoftwareAdobe ImageReadyqe<1IDATxAr@ERVKnfKv"hI3 6HjգaBtttt -httt4H:::$ IGG b{ލlG>_?HZ/GP&o CU@)^}M~u0zSUN>g0`<܏ 9 $WsVt☫Gc/ zyXǨ ̿tUPq9 R"se5 3]d5uKrٳt>Cl':>:><sQ!3(f_GYqKNG "#a#.nBw%P=ΡjFq斤u_u܃80Q КJ(=osTo ky9?s&aUlͽLDjBZH2W_ SX@Dw",X_8ט3;fF'D,$\!K8-Z׸qjN* 3Lr{f'2#prL0 'olH.Q(*g`o2&*TڰӇٯ}MN҈΀$*=tMX#Ȉ1&`{СK;8LYB?aаF2F(Ɂ @F><^sJk!g׳52#.īx>Q >(9ߜ yY dTҥMkGI aƜ|3*40"Xx` a?e~/4^lw:DYX A9Ap:ƿBdPXup&_[*r(lXz` 6 bb̿:"_!D=gD3:\&8Nd/|ϹX }=43Ajeon6 W&,IENDB`PK>\` :assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.pngnuW+APNG  IHDRdG,Z`HIDATՏ @' ݍ_30B-d4\Vd;assets/css/images/ui-bg_diagonals-thick_18_b81900_40x40.pngnuW+APNG  IHDR((mIDATXA 0,}Mi o _ mH|K?9_={=r *`22Hkgx 8(Up*  *`2~=eGMl@*8M⛤$[|YMRo8Io&) p{R@IENDB`PK>\a  "assets/css/images/activetab_bg.pngnuW+APNG  IHDR/-tEXtSoftwareAdobe ImageReadyqe<9PLTE1}IDATxbb`gd fn!!b؁lA0O XXxyA@A(&@@E,@e@ @@P@` |||  <<< lll LLL @`1eLIENDB`PK>\7-assets/css/images/ui-icons_222222_256x240.pngnuW+APNG  IHDRIJPLTE$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$$"$ÈNtRNS2P."Tp@f` <BHJZ&0R,4j8D|($ blߝF>n~hhHIDATx]b۶H儒-{iZK:glkn-tIqq? E$dK>$>;PZsVh!Sy0E0}H)-t koܪKp\RϠ .E7 ) *V;~Pe Bx*,=$zDؾ JҸٻ9{ ǸHpqW@"2'B[$ @TiH/b٥96!XHq`DE*R HV!%;" i] dddddddd4y5  Rb@(8CdŪݡ,@T@ibrq0alX!pe, =4bW { 5Ƭhu~(Q^@3="b5XC@JCT76q_5 @,r šɩD)T|O@ ON-ՙ [n@RXIm݋(F @?=0puL;g$@6η K`>п @h գKVn"a" %l@.v$/U^ G:#`` uTtK~ŋZ5T%kxk]\*Q ,҇B44 OXK|yg+_M(lоEO V$T1BXb-|?@ fBXr%'@ҹA\IJ,}BBc\V rh(]tI^}oצo S3 ";ʙb}"߰ ){b$Gwwݾab")T@pF_er6JvШ"mޭM-d76x˰6ӥ;/`>KrP\_^u1%OTM.}Q3.Nس})>-w`a+sy$t)NbFFFFBejnNVn4,A*X*5>PGa 3 {oB &<L[ Nc.öi=`Q@d ͆I.Il`\t[< Cit484-r +f쑱BCB MH iy }>rxp|z;BǏ;burcK4tz1G~`ؚK| ̔>ۡO$~ Ao)0pzz }i`;ADm8n:cfA@s7L Z/..h8or? N93B~o_'`opO- :TG L;7]`B%˛>*wTpM0H}&t ^1'Oqr'2P͡+z,tIW''|en=dzgRm[NStK{҉mؓVt6ҲR`ζN&}B U(rۗ&1%Q''?l׸+&r{jN಻4) `N狌. ߭ ǣ)q 2?n3Hb`} .`pqY1e_bu7e+N_F(DT,L}LLrmP5|x芥1cx DAb`M(7NED~Mz +4BXd.Mzv͈Pd8p<6?8N*x.6ڍ6GFZ)O !lSshssNp8`'0/<s}.@Ǩs7ξO۟VDa5av]m1+3y6۠>@u50Ps51==p *KVҫ܂ݻc$N4(Xr2###c- 賟Lδ>]5.sYs1f0;'̨Yg銛{@9 `aC(=%bo2=n1 jBoS$n#m=i0ci9}oI qT]W%.(؅]z\x f"]o'u䫵tk{v;AC3ֆwwR_#X (xҋ/q%W hpk_IX'b/fXKi"#####QCLi2t 5L0 QiH2;yTOok;ע ٶ`RNg{zy!Kxm?A(vU~mL(`o/!nmX-{v[ dw=n「sdwzn(}Oy~ m ?XU;,V'+ V&JRZ]᧭:zC'-߆@y 4u `Vۓwъ#zP@Q N>2/{\o)W~a3xLw :_Q;=pּdt\'8~3SRP6y+XQ*޺r ̗ѭ*޺r gl/\U^u$|mbVnw \V|D͊NVNy7k<;/E}?E*dzgO ~g/96f cD}% g$QG7o)U Jo,O@0߾Q(;bw:5 NwRN5Iy'K?}:9mֽ*@f@jU9mҫÍ{$ؗ}dFp|%!DdF>}G{@FFFFFFƦQܞH 3 u Mo~vy}mwz<7nP9rWku=|_nz쿳}@IXn?s\assets/css/index.htmlnuW+APK>\ښC assets/css/images.cssnuW+A/* 32 pixels */ .icon-32-csvi_new_32 { background-image: url(../images/csvi_new_32.png); } .icon-32-csvi_add_32 { background-image: url(../images/csvi_add_32.png); } .icon-32-csvi_edit_32 { background-image: url(../images/csvi_edit_32.png); } .icon-32-csvi_clone_32 { background-image: url(../images/csvi_clone_32.png); } .icon-32-csvi_delete_32 { background-image: url(../images/csvi_delete_32.png); } .icon-32-csvi_fields_32 { background-image: url(../images/csvi_fields_32.png); } .icon-32-csvi_templates_32 { background-image: url(../images/csvi_template_32.png); } .icon-32-csvi_publish_32 { background-image: url(../images/csvi_publish_32.png); } .icon-32-csvi_unpublish_32 { background-image: url(../images/csvi_unpublish_32.png); } .icon-32-csvi_save_32 { background-image: url(../images/csvi_save_32.png); } .icon-32-csvi_fields_32 { background-image: url(../images/csvi_fields_32.png); } .icon-32-csvi_logdetails_32 { background-image: url(../images/csvi_log_details_32.png); } .icon-32-csvi_cancel_32 { background-image: url(../images/csvi_cancel_32.png); } .icon-32-csvi_delete_32 { background-image: url(../images/csvi_delete_32.png); } .icon-32-csvi_continue_32 { background-image: url(../images/csvi_continue_32.png); } .icon-32-csvi_process_32 { background-image: url(../images/csvi_process_32.png); } .icon-32-csvi_settings_32 { background-image: url(../images/csvi_settings_32.png); } .icon-32-csvi_maintenance_32 { background-image: url(../images/csvi_maintenance_32.png); } .icon-32-csvi_replacement_32 { background-image: url(../images/csvi_replace_32.png); } .icon-32-csvi_cron_32 { background-image: url(../images/csvi_cron_32.png); } .icon-32-csvi_availablefields_32 { background-image: url(../images/csvi_av_fields_32.png); } .icon-32-csvi_help_32 { background-image: url(../images/csvi_help_32.png); } .icon-32-csvi_reset_32 { background-image: url(../images/csvi_reset_32.png); } .icon-32-csvi_import_32 { background-image: url(../images/csvi_import_32.png); } /* 48 pixels */ .icon-48-csvi_new_48 { background-image: url(../images/csvi_new_48.png); } .icon-48-csvi_edit_48 { background-image: url(../images/csvi_edit_48.png); } .icon-48-csvi_templates_48 { background-image: url(../images/csvi_template_48.png); } .icon-48-csvi_fields_48 { background-image: url(../images/csvi_fields_48.png); } .icon-48-csvi_process_48 { background-image: url(../images/csvi_process_48.png); } .icon-48-csvi_maintenance_48 { background-image: url(../images/csvi_maintenance_48.png); } .icon-48-csvi_log_48 { background-image: url(../images/csvi_log_48.png); } .icon-48-csvi_about_48 { background-image: url(../images/csvi_about_48.png); } .icon-48-csvi_availablefields_48 { background-image: url(../images/csvi_av_fields_48.png); } .icon-48-csvi_logdetails_48 { background-image: url(../images/csvi_log_details_48.png); } .icon-48-csvi_logo_48 { background-image: url(../images/csvi_logo_48.png); } .icon-48-csvi_settings_48 { background-image: url(../images/csvi_settings_48.png); } .icon-48-csvi_replacement_48 { background-image: url(../images/csvi_replace_48.png); } .icon-48-csvi_cron_48 { background-image: url(../images/csvi_cron_48.png); } .icon-48-csvi_help_48 { background-image: url(../images/csvi_help_48.png); } .icon-48-csvi_reset_48 { background-image: url(../images/csvi_reset_48.png); } .icon-48-csvi_import_48 { background-image: url(../images/csvi_import_48.png); } .icon-48-csvi_export_48 { background-image: url(../images/csvi_export_48.png); } .icon-48-csvi_install_48 { background-image: url(../images/csvi_install_48.png); }PK>\h#%install/com_akeebasubs.sqlnuW+ADELETE FROM `#__csvi_template_tables` WHERE `component` = 'com_akeebasubs'; INSERT IGNORE INTO `#__csvi_template_tables` (`template_type_name`, `template_table`, `component`) VALUES ('affiliateexport', 'affiliateexport', 'com_akeebasubs'), ('affiliateexport', 'akeebasubs_affiliates', 'com_akeebasubs'), ('affiliateexport', 'akeebasubs_affpayments', 'com_akeebasubs'), ('affiliateexport', 'users', 'com_akeebasubs'), ('affiliateimport', 'affiliateimport', 'com_akeebasubs'), ('affiliateimport', 'akeebasubs_affiliates', 'com_akeebasubs'), ('affiliateimport', 'akeebasubs_affpayments', 'com_akeebasubs'), ('couponexport', 'akeebasubs_coupons', 'com_akeebasubs'), ('couponexport', 'couponexport', 'com_akeebasubs'), ('couponimport', 'akeebasubs_coupons', 'com_akeebasubs'), ('couponimport', 'couponimport', 'com_akeebasubs'), ('subscriptionexport', 'akeebasubs_subscriptions', 'com_akeebasubs'), ('subscriptionexport', 'akeebasubs_users', 'com_akeebasubs'), ('subscriptionexport', 'subscriptionexport', 'com_akeebasubs'), ('subscriptionimport', 'akeebasubs_subscriptions', 'com_akeebasubs'), ('subscriptionimport', 'akeebasubs_users', 'com_akeebasubs'), ('subscriptionimport', 'subscriptionimport', 'com_akeebasubs'); DELETE FROM `#__csvi_template_types` WHERE `component` = 'com_akeebasubs'; INSERT IGNORE INTO `#__csvi_template_types` (`template_type_name`, `template_type`, `component`, `url`, `options`) VALUES ('subscriptionexport', 'export', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=subscriptions', 'file,fields,subscription,layout,email,limit'), ('affiliateexport', 'export', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=affiliates', 'file,fields,layout,email,limit'), ('couponexport', 'export', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=coupons', 'file,fields,layout,email,limit'), ('couponimport', 'import', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=coupons', 'file,fields,limit'), ('subscriptionimport', 'import', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=subscriptions', 'file,fields,limit'), ('affiliateimport', 'import', 'com_akeebasubs', 'index.php?option=com_akeebasubs&view=affiliates', 'file,fields,limit');PK>\CE~44install/example_templates.csvnuW+A"Example VirtueMart Calculation rule export","{""options"":{""action"":""export"",""component"":""com_virtuemart"",""operation"":""calcexport""},""general"":{""exportto"":""todownload"",""localpath"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""export_filename"":""calculation_rule_export.csv"",""export_file"":""csv"",""field_delimiter"":"","",""text_enclosure"":""\""",""include_column_headers"":""1"",""signature"":""0"",""export_frontend"":""1"",""collect_debug_info"":""0"",""publish_state"":"""",""recordstart"":"""",""recordend"":"""",""groupby"":""1"",""export_date_format"":""d\/m\/Y H:i:s"",""export_price_format_decimal"":""2"",""export_price_format_decsep"":"""",""export_price_format_thousep"":"""",""add_currency_to_price"":""0"",""language"":""en-GB"",""category_separator"":""\/""},""export_fields"":{""_selected_name"":[""calc_name"",""calc_descr"",""calc_kind"",""calc_value_mathop"",""calc_value"",""category_path"",""country_name"",""shopper_group_name"",""state_2_code""],""_column_header"":["""","""","""","""","""","""","""","""",""""],""_default_value"":["""","""","""","""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_sort_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""","""","""","""","""",""""]},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":""""}}" "Example VirtueMart Calculation rule import","{""options"":{""action"":""import"",""component"":""com_virtuemart"",""operation"":""calcimport""},""general"":{""source"":""fromupload"",""local_csv_file"":"""",""urlfile"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""auto_detect_delimiters"":""0"",""field_delimiter"":"","",""text_enclosure"":""\""",""use_column_headers"":""0"",""skip_first_line"":""1"",""overwrite_existing_data"":""1"",""ignore_non_exist"":""0"",""skip_default_value"":""0"",""collect_debug_info"":""1"",""refresh_xml_headers"":""0"",""xml_nodes_map"":"""",""language"":""en-GB"",""category_separator"":""\/""},""import_fields"":{""_selected_name"":[""calc_name"",""calc_descr"",""calc_kind"",""calc_value_mathop"",""calc_value"",""category_path"",""country_name"",""shopper_group_name"",""state_2_code""],""_default_value"":["""","""","""","""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""","""","""","""","""",""""]},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":"""",""post_max_size"":"""",""upload_max_filesize"":""""}}" "Example VirtueMart Category export","{""options"":{""action"":""export"",""component"":""com_virtuemart"",""operation"":""categoryexport""},""general"":{""exportto"":""todownload"",""localpath"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""export_filename"":""category_export.csv"",""export_file"":""csv"",""field_delimiter"":"","",""text_enclosure"":""\""",""include_column_headers"":""1"",""signature"":""0"",""export_frontend"":""1"",""collect_debug_info"":""1"",""publish_state"":"""",""recordstart"":"""",""recordend"":"""",""groupby"":""1"",""export_date_format"":""d\/m\/Y H:i:s"",""export_price_format_decimal"":""2"",""export_price_format_decsep"":"""",""export_price_format_thousep"":"""",""add_currency_to_price"":""0"",""language"":""en-GB"",""category_separator"":""\/""},""export_fields"":{""_selected_name"":[""category_path"",""category_description"",""file_url"",""file_url_thumb"",""published""],""_column_header"":["""","""","""","""",""""],""_default_value"":["""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0""],""_sort_field"":[""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""",""""]},""layout"":{""header"":"""",""body"":"""",""footer"":""""},""email"":{""export_email_addresses"":"""",""export_email_addresses_cc"":"""",""export_email_addresses_bcc"":"""",""export_email_subject"":"""",""export_email_body"":""""},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":""""}}" "Example VirtueMart Category import","{""options"":{""action"":""import"",""component"":""com_virtuemart"",""operation"":""categoryimport""},""general"":{""source"":""fromupload"",""local_csv_file"":"""",""urlfile"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""auto_detect_delimiters"":""1"",""field_delimiter"":"","",""text_enclosure"":""\""",""use_column_headers"":""0"",""skip_first_line"":""1"",""overwrite_existing_data"":""1"",""ignore_non_exist"":""0"",""skip_default_value"":""0"",""collect_debug_info"":""1"",""refresh_xml_headers"":""0"",""xml_nodes_map"":"""",""language"":""en-GB"",""category_separator"":""\/""},""import_fields"":{""_selected_name"":[""category_path"",""category_description"",""file_url"",""file_url_thumb"",""published""],""_default_value"":["""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""",""""]},""image"":{""process_image"":""0"",""change_case"":""none"",""keep_original"":""0"",""convert_type"":""none"",""save_images_on_server"":""0"",""full_resize"":""0"",""full_width"":"""",""full_height"":"""",""thumb_check_filetype"":""0"",""thumb_create"":""0"",""thumb_extension"":""none"",""thumb_width"":""90"",""thumb_height"":""90""},""path"":{""file_location_category_images"":""""},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":"""",""post_max_size"":"""",""upload_max_filesize"":""""}}" "Example VirtueMart Media export","{""options"":{""action"":""export"",""component"":""com_virtuemart"",""operation"":""mediaexport""},""general"":{""exportto"":""todownload"",""localpath"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""export_filename"":""media_export.csv"",""export_file"":""csv"",""field_delimiter"":"","",""text_enclosure"":""\""",""include_column_headers"":""1"",""signature"":""0"",""export_frontend"":""0"",""collect_debug_info"":""1"",""publish_state"":"""",""recordstart"":"""",""recordend"":"""",""groupby"":""1"",""export_date_format"":""d\/m\/Y H:i:s"",""export_price_format_decimal"":""2"",""export_price_format_decsep"":"""",""export_price_format_thousep"":"""",""add_currency_to_price"":""0""},""export_fields"":{""_selected_name"":[""file_url"",""file_type"",""published"",""file_title"",""file_description"",""file_meta""],""_column_header"":["""","""","""","""","""",""""],""_default_value"":["""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0""],""_sort_field"":[""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""","""",""""]},""layout"":{""header"":"""",""body"":"""",""footer"":""""},""email"":{""export_email_addresses"":"""",""export_email_addresses_cc"":"""",""export_email_addresses_bcc"":"""",""export_email_subject"":"""",""export_email_body"":""""},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":""""}}" "Example VirtueMart Media import","{""options"":{""action"":""import"",""component"":""com_virtuemart"",""operation"":""mediaimport""},""general"":{""source"":""fromupload"",""local_csv_file"":"""",""urlfile"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""auto_detect_delimiters"":""0"",""field_delimiter"":"","",""text_enclosure"":""\""",""use_column_headers"":""0"",""skip_first_line"":""0"",""overwrite_existing_data"":""1"",""ignore_non_exist"":""0"",""skip_default_value"":""0"",""collect_debug_info"":""1"",""refresh_xml_headers"":""0"",""xml_nodes_map"":""""},""import_fields"":{""_selected_name"":[""file_url"",""file_type"",""published"",""file_title"",""file_description"",""file_meta""],""_default_value"":["""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":{""4"":"""",""3"":"""",""5"":"""",""2"":"""",""0"":"""",""1"":""""}},""media"":{""ignore_non_exist"":""0""},""image"":{""process_image"":""0"",""change_case"":""none"",""keep_original"":""0"",""convert_type"":""none"",""save_images_on_server"":""0"",""full_resize"":""0"",""full_width"":"""",""full_height"":"""",""thumb_check_filetype"":""0"",""thumb_create"":""0"",""thumb_extension"":""none"",""thumb_width"":""90"",""thumb_height"":""90""},""path"":{""file_location_product_images"":"""",""file_location_category_images"":""""}}" "Example VirtueMart Product export","{""options"":{""action"":""export"",""component"":""com_virtuemart"",""operation"":""productexport""},""general"":{""exportto"":""todownload"",""localpath"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""export_filename"":""product_export.csv"",""export_file"":""csv"",""field_delimiter"":"","",""text_enclosure"":""\""",""include_column_headers"":""1"",""signature"":""0"",""export_frontend"":""0"",""collect_debug_info"":""1"",""publish_state"":"""",""recordstart"":"""",""recordend"":"""",""groupby"":""1"",""export_date_format"":""d\/m\/Y H:i:s"",""export_price_format_decimal"":""2"",""export_price_format_decsep"":"""",""export_price_format_thousep"":"""",""add_currency_to_price"":""0"",""language"":""en-GB"",""category_separator"":""\/""},""export_fields"":{""_selected_name"":[""product_sku"",""product_name"",""manufacturer_name"",""product_price"",""related_products"",""category_path"",""product_parent_sku"",""published"",""product_in_stock""],""_column_header"":["""","""","""","""","""","""","""","""",""""],""_default_value"":["""","""","""","""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_sort_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":["""","""","""","""","""","""","""","""",""""]},""product"":{""exportsef"":""1"",""producturl_suffix"":"""",""featured"":""0"",""product_categories"":[""""],""publish_state_categories"":"""",""incl_subcategory"":""0"",""parent_only"":""0"",""child_only"":""0"",""productskufilter"":"""",""priceoperator"":""gt"",""pricefrom"":"""",""priceto"":"""",""stocklevelstart"":"""",""stocklevelend"":"""",""targetcurrency"":"""",""shopper_groups"":[""none""]},""layout"":{""header"":"""",""body"":"""",""footer"":""""},""email"":{""export_email_addresses"":"""",""export_email_addresses_cc"":"""",""export_email_addresses_bcc"":"""",""export_email_subject"":"""",""export_email_body"":""""},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":""""}}" "Example VirtueMart Product import","{""options"":{""action"":""import"",""component"":""com_virtuemart"",""operation"":""productimport""},""general"":{""source"":""fromupload"",""local_csv_file"":"""",""urlfile"":"""",""ftphost"":"""",""ftpport"":"""",""ftpusername"":"""",""ftppass"":"""",""ftproot"":"""",""ftpfile"":"""",""auto_detect_delimiters"":""0"",""field_delimiter"":"","",""text_enclosure"":""\""",""use_column_headers"":""0"",""skip_first_line"":""1"",""overwrite_existing_data"":""1"",""ignore_non_exist"":""0"",""skip_default_value"":""0"",""collect_debug_info"":""1"",""refresh_xml_headers"":""0"",""xml_nodes_map"":"""",""language"":""nl-NL"",""category_separator"":""\/""},""import_fields"":{""_selected_name"":[""product_sku"",""product_name"",""manufacturer_name"",""product_price"",""related_products"",""category_path"",""product_parent_sku"",""published"",""product_in_stock""],""_default_value"":["""","""","""","""","""","""","""","""",""""],""_process_field"":[""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1"",""1""],""_combine_field"":[""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0"",""0""],""_replace_field"":{""6"":"""",""3"":"""",""1"":"""",""5"":"""",""8"":"""",""0"":"""",""4"":"""",""7"":"""",""2"":""""}},""product"":{""append_categories"":""0"",""update_based_on"":""product_sku"",""mpn_column_name"":"""",""unpublish_before_import"":""0"",""use_icecat"":""0""},""image"":{""process_image"":""0"",""auto_generate_image_name"":""0"",""type_generate_image_name"":""product_sku"",""autogenerateext"":""jpg"",""change_case"":""none"",""keep_original"":""0"",""convert_type"":""none"",""save_images_on_server"":""0"",""full_resize"":""0"",""full_width"":"""",""full_height"":"""",""thumb_check_filetype"":""0"",""thumb_create"":""0"",""thumb_extension"":""none"",""thumb_width"":""90"",""thumb_height"":""90""},""path"":{""file_location_product_images"":""""},""limit"":{""use_system_limits"":""0"",""max_execution_time"":"""",""memory_limit"":"""",""post_max_size"":"""",""upload_max_filesize"":""""}}"PK>\)install/.htaccessnuW+A Order allow,deny Deny from all PK>\&CMMinstall/com_csvi.sqlnuW+ADELETE FROM `#__csvi_template_types` WHERE `component` = 'com_csvi'; INSERT IGNORE INTO `#__csvi_template_types` (`template_type_name`, `template_type`, `component`, `url`, `options`) VALUES ('customexport', 'export', 'com_csvi', '', 'file,fields,layout,email,limit'), ('customimport', 'import', 'com_csvi', '', 'file,fields,limit');PK>\install/install.mysql.utf8.sqlnuW+ACREATE TABLE IF NOT EXISTS `#__csvi_available_fields` ( `id` int(11) NOT NULL AUTO_INCREMENT, `csvi_name` varchar(255) NOT NULL, `component_name` varchar(55) NOT NULL, `component_table` varchar(55) NOT NULL, `component` varchar(55) NOT NULL, `isprimary` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `component_name_table` (`component_name`,`component_table`,`component`) ) CHARSET=utf8 COMMENT='Available fields for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_currency` ( `currency_id` tinyint(4) NOT NULL AUTO_INCREMENT, `currency_code` varchar(3) DEFAULT NULL, `currency_rate` varchar(55) DEFAULT NULL, PRIMARY KEY (`currency_id`), UNIQUE KEY `currency_code` (`currency_code`) ) CHARSET=utf8 COMMENT='Curriencies and exchange rates for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_icecat_index` ( `path` varchar(100) DEFAULT NULL, `product_id` int(2) DEFAULT NULL, `updated` int(14) DEFAULT NULL, `quality` varchar(6) DEFAULT NULL, `supplier_id` int(1) DEFAULT NULL, `prod_id` varchar(16) DEFAULT NULL, `catid` int(3) DEFAULT NULL, `m_prod_id` varchar(10) DEFAULT NULL, `ean_upc` varchar(10) DEFAULT NULL, `on_market` int(1) DEFAULT NULL, `country_market` varchar(10) DEFAULT NULL, `model_name` varchar(26) DEFAULT NULL, `product_view` int(5) DEFAULT NULL, `high_pic` varchar(51) DEFAULT NULL, `high_pic_size` int(5) DEFAULT NULL, `high_pic_width` int(3) DEFAULT NULL, `high_pic_height` int(3) DEFAULT NULL, `m_supplier_id` int(3) DEFAULT NULL, `m_supplier_name` varchar(51) DEFAULT NULL, KEY `product_mpn` (`prod_id`), KEY `manufacturer_name` (`supplier_id`) ) CHARSET=utf8 COMMENT='ICEcat index data for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_icecat_suppliers` ( `supplier_id` int(11) unsigned NOT NULL, `supplier_name` varchar(255) NOT NULL, UNIQUE KEY `Unique supplier` (`supplier_id`,`supplier_name`), KEY `Supplier name` (`supplier_name`) ) CHARSET=utf8 COMMENT='ICEcat supplier data for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userid` int(11) NOT NULL, `logstamp` datetime NOT NULL, `action` varchar(255) NOT NULL, `action_type` varchar(255) NOT NULL DEFAULT '', `template_name` varchar(255) DEFAULT NULL, `records` int(11) NOT NULL, `run_id` int(11) DEFAULT NULL, `file_name` varchar(255) DEFAULT NULL, `run_cancelled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Log results for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_log_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, `log_id` int(11) NOT NULL, `line` int(11) NOT NULL, `description` text NOT NULL, `result` varchar(45) NOT NULL, `status` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Log details for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_related_products` ( `product_sku` varchar(64) NOT NULL, `related_sku` text NOT NULL ) CHARSET=utf8 COMMENT='Related products import for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_replacements` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `findtext` text NOT NULL, `replacetext` text NOT NULL, `multivalue` ENUM('0','1') NOT NULL, `method` enum('text','regex') NOT NULL DEFAULT 'text', `checked_out` int(11) unsigned DEFAULT '0', `checked_out_time` datetime DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Replacement rules for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_settings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `params` text NOT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Configuration values for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_settings` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the saved setting', `name` VARCHAR(255) NOT NULL COMMENT 'Name for the saved setting', `settings` TEXT NOT NULL COMMENT 'The actual settings', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Stores the template settings for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_tables` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `checked_out` int(10) unsigned NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `template_type_name` varchar(55) NOT NULL, `template_table` varchar(55) NOT NULL, `component` varchar(55) NOT NULL, `indexed` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `type_name` (`template_type_name`,`template_table`,`component`) ) CHARSET=utf8 COMMENT='Template tables used per template type for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_types` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `checked_out` INT(10) UNSIGNED NOT NULL DEFAULT '0', `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `template_type_name` VARCHAR(55) NOT NULL, `template_type` VARCHAR(55) NOT NULL, `component` VARCHAR(55) NOT NULL COMMENT 'Name of the component', `url` VARCHAR(100) NULL DEFAULT NULL COMMENT 'The URL of the page the import is for', `options` VARCHAR(255) NOT NULL DEFAULT 'fields' COMMENT 'The template pages to show for the template type', PRIMARY KEY (`id`), UNIQUE KEY `type_name` (`template_type_name`,`template_type`,`component`) ) CHARSET=utf8 COMMENT='Template types for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the template field', `template_id` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'The template ID', `ordering` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'The order of the field', `field_name` VARCHAR(255) NOT NULL COMMENT 'Name for the field', `column_header` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Header for the column', `default_value` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Default value for the field', `process` ENUM('0','1') NOT NULL DEFAULT '1' COMMENT 'Process the field', `combine` ENUM('0','1') NOT NULL DEFAULT '0' COMMENT 'Combine the field', `sort` ENUM('0','1') NOT NULL DEFAULT '0' COMMENT 'Sort the field', PRIMARY KEY (`id`) ) COMMENT='Holds the fields for a CSVI template'; PK>\#o,,install/index.htmlnuW+APK>\install/update/4.5.1.sqlnuW+APK>\)install/update/.htaccessnuW+A Order allow,deny Deny from all PK>\ ffinstall/update/4.1.sqlnuW+AALTER TABLE `#__csvi_replacements` ADD COLUMN `multivalue` ENUM('0','1') NOT NULL AFTER `replacetext`;PK>\install/update/4.4.sqlnuW+APK>\ӸhMM!install/availablefields_extra.sqlnuW+A/* VirtueMart Product import */ INSERT IGNORE INTO `#__csvi_available_fields` (`csvi_name`, `component_name`, `component_table`, `component`) VALUES ('skip', 'skip', 'productimport', 'com_virtuemart'), ('combine', 'combine', 'productimport', 'com_virtuemart'), ('product_discount', 'product_discount', 'productimport', 'com_virtuemart'), ('product_discount_date_start', 'product_discount_date_start', 'productimport', 'com_virtuemart'), ('product_discount_date_end', 'product_discount_date_end', 'productimport', 'com_virtuemart'), ('product_price', 'product_price', 'productimport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'productimport', 'com_virtuemart'), ('shopper_group_name_new', 'shopper_group_name_new', 'productimport', 'com_virtuemart'), ('shopper_group_name_price', 'shopper_group_name_price', 'productimport', 'com_virtuemart'), ('related_products', 'related_products', 'productimport', 'com_virtuemart'), ('category_id', 'category_id', 'productimport', 'com_virtuemart'), ('category_path', 'category_path', 'productimport', 'com_virtuemart'), ('manufacturer_name', 'manufacturer_name', 'productimport', 'com_virtuemart'), ('manufacturer_id', 'manufacturer_id', 'productimport', 'com_virtuemart'), ('price_with_tax', 'price_with_tax', 'productimport', 'com_virtuemart'), ('product_override_price', 'product_override_price', 'productimport', 'com_virtuemart'), ('override', 'override', 'productimport', 'com_virtuemart'), ('product_box', 'product_box', 'productimport', 'com_virtuemart'), ('product_delete', 'product_delete', 'productimport', 'com_virtuemart'), ('product_name', 'product_name', 'productimport', 'com_virtuemart'), ('product_s_desc', 'product_s_desc', 'productimport', 'com_virtuemart'), ('product_desc', 'product_desc', 'productimport', 'com_virtuemart'), ('metadesc', 'metadesc', 'productimport', 'com_virtuemart'), ('metakey', 'metakey', 'productimport', 'com_virtuemart'), ('customtitle', 'customtitle', 'productimport', 'com_virtuemart'), ('slug', 'slug', 'productimport', 'com_virtuemart'), ('file_url', 'file_url', 'productimport', 'com_virtuemart'), ('file_url_thumb', 'file_url_thumb', 'productimport', 'com_virtuemart'), ('file_title', 'file_title', 'productimport', 'com_virtuemart'), ('file_description', 'file_description', 'productimport', 'com_virtuemart'), ('file_meta', 'file_meta', 'productimport', 'com_virtuemart'), ('product_tax', 'product_tax', 'productimport', 'com_virtuemart'), ('product_parent_sku', 'product_parent_sku', 'productimport', 'com_virtuemart'), ('product_delete', 'product_delete', 'productimport', 'com_virtuemart'), ('product_currency', 'product_currency', 'productimport', 'com_virtuemart'), ('custom_title', 'custom_title', 'productimport', 'com_virtuemart'), ('custom_value', 'custom_value', 'productimport', 'com_virtuemart'), ('custom_price', 'custom_price', 'productimport', 'com_virtuemart'), ('custom_param', 'custom_param', 'productimport', 'com_virtuemart'), ('min_order_level', 'min_order_level', 'productimport', 'com_virtuemart'), ('max_order_level', 'max_order_level', 'productimport', 'com_virtuemart'), ('product_tax_id', 'product_tax_id', 'productimport', 'com_virtuemart'), ('product_discount_id', 'product_discount_id', 'productimport', 'com_virtuemart'), /* VirtueMart Category import */ ('skip', 'skip', 'categoryimport', 'com_virtuemart'), ('combine', 'combine', 'categoryimport', 'com_virtuemart'), ('category_path', 'category_path', 'categoryimport', 'com_virtuemart'), ('category_path_trans', 'category_path_trans', 'categoryimport', 'com_virtuemart'), ('category_name', 'category_name', 'categoryimport', 'com_virtuemart'), ('category_description', 'category_description', 'categoryimport', 'com_virtuemart'), ('metadesc', 'metadesc', 'categoryimport', 'com_virtuemart'), ('metakey', 'metakey', 'categoryimport', 'com_virtuemart'), ('customtitle', 'customtitle', 'categoryimport', 'com_virtuemart'), ('slug', 'slug', 'categoryimport', 'com_virtuemart'), ('category_delete', 'category_delete', 'categoryimport', 'com_virtuemart'), ('file_url', 'file_url', 'categoryimport', 'com_virtuemart'), ('file_url_thumb', 'file_url_thumb', 'categoryimport', 'com_virtuemart'), ('file_title', 'file_title', 'categoryimport', 'com_virtuemart'), ('file_description', 'file_description', 'categoryimport', 'com_virtuemart'), ('file_meta', 'file_meta', 'categoryimport', 'com_virtuemart'), /* VirtueMart Manufacturer Categories import */ ('skip', 'skip', 'manufacturercategoryimport', 'com_virtuemart'), ('combine', 'combine', 'manufacturercategoryimport', 'com_virtuemart'), ('mf_category_name', 'mf_category_name', 'manufacturercategoryimport', 'com_virtuemart'), ('mf_category_desc', 'mf_category_desc', 'manufacturercategoryimport', 'com_virtuemart'), ('slug', 'slug', 'manufacturercategoryimport', 'com_virtuemart'), ('mf_category_delete', 'mf_category_delete', 'manufacturercategoryimport', 'com_virtuemart'), /* VirtueMart Manufacturer import */ ('skip', 'skip', 'manufacturerimport', 'com_virtuemart'), ('combine', 'combine', 'manufacturerimport', 'com_virtuemart'), ('mf_name', 'mf_name', 'manufacturerimport', 'com_virtuemart'), ('mf_email', 'mf_email', 'manufacturerimport', 'com_virtuemart'), ('mf_desc', 'mf_desc', 'manufacturerimport', 'com_virtuemart'), ('mf_url', 'mf_url', 'manufacturerimport', 'com_virtuemart'), ('slug', 'slug', 'manufacturerimport', 'com_virtuemart'), ('mf_category_name', 'mf_category_name', 'manufacturerimport', 'com_virtuemart'), ('manufacturer_delete', 'manufacturer_delete', 'manufacturerimport', 'com_virtuemart'), /* VirtueMart Rating import */ ('skip', 'skip', 'ratingimport', 'com_virtuemart'), ('combine', 'combine', 'ratingimport', 'com_virtuemart'), ('product_sku', 'product_sku', 'ratingimport', 'com_virtuemart'), ('vote', 'vote', 'ratingimport', 'com_virtuemart'), ('username', 'username', 'ratingimport', 'com_virtuemart'), /* VirtueMart Medias import */ ('skip', 'skip', 'mediaimport', 'com_virtuemart'), ('combine', 'combine', 'mediaimport', 'com_virtuemart'), ('product_sku', 'product_sku', 'mediaimport', 'com_virtuemart'), ('media_delete', 'media_delete', 'mediaimport', 'com_virtuemart'), /* VirtueMart Order import */ ('skip', 'skip', 'orderimport', 'com_virtuemart'), ('combine', 'combine', 'orderimport', 'com_virtuemart'), ('user_currency', 'user_currency', 'orderimport', 'com_virtuemart'), /* In the format EUR */ ('payment_element', 'payment_element', 'orderimport', 'com_virtuemart'), ('state_name', 'state_name', 'orderimport', 'com_virtuemart'), ('state_2_code', 'state_2_code', 'orderimport', 'com_virtuemart'), ('state_3_code', 'state_3_code', 'orderimport', 'com_virtuemart'), ('virtuemart_state_id', 'virtuemart_state_id', 'orderimport', 'com_virtuemart'), ('country_name', 'country_name', 'orderimport', 'com_virtuemart'), ('country_2_code', 'country_2_code', 'orderimport', 'com_virtuemart'), ('country_3_code', 'country_3_code', 'orderimport', 'com_virtuemart'), ('virtuemart_country_id', 'virtuemart_country_id', 'orderimport', 'com_virtuemart'), ('shipment_element', 'shipment_element', 'orderimport', 'com_virtuemart'), ('order_status_name', 'order_status_name', 'orderimport', 'com_virtuemart'), /* VirtueMart order item import */ ('skip', 'skip', 'orderitemimport', 'com_virtuemart'), ('combine', 'combine', 'orderitemimport', 'com_virtuemart'), ('product_sku', 'product_sku', 'orderitemimport', 'com_virtuemart'), ('order_status_name', 'order_status_name', 'orderitemimport', 'com_virtuemart'), /* VirtueMart shopperfield import */ ('skip', 'skip', 'shopperfieldimport', 'com_virtuemart'), ('combine', 'combine', 'shopperfieldimport', 'com_virtuemart'), ('shopperfield_delete', 'shopperfield_delete', 'shopperfieldimport', 'com_virtuemart'), /* VirtueMart Userinfo import */ ('skip', 'skip', 'userinfoimport', 'com_virtuemart'), ('combine', 'combine', 'userinfoimport', 'com_virtuemart'), ('vendor_name', 'vendor_name', 'userinfoimport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'userinfoimport', 'com_virtuemart'), ('address_type', 'address_type', 'userinfoimport', 'com_virtuemart'), ('address_type_name', 'address_type_name', 'userinfoimport', 'com_virtuemart'), ('usergroup_name', 'usergroup_name', 'userinfoimport', 'com_virtuemart'), /* VirtueMart waiting users import */ ('skip', 'skip', 'waitinglistimport', 'com_virtuemart'), ('combine', 'combine', 'waitinglistimport', 'com_virtuemart'), ('product_sku', 'product_sku', 'waitinglistimport', 'com_virtuemart'), ('username', 'username', 'waitinglistimport', 'com_virtuemart'), /* VirtueMart custom field import */ ('skip', 'skip', 'customfieldimport', 'com_virtuemart'), ('combine', 'combine', 'customfieldimport', 'com_virtuemart'), ('plugin_name', 'plugin_name', 'customfieldimport', 'com_virtuemart'), ('vendor_name', 'vendor_name', 'customfieldimport', 'com_virtuemart'), /* VirtueMart calculation rule import */ ('skip', 'skip', 'calcimport', 'com_virtuemart'), ('combine', 'combine', 'calcimport', 'com_virtuemart'), ('currency_code_3', 'currency_code_3', 'calcimport', 'com_virtuemart'), ('category_path', 'category_path', 'calcimport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'calcimport', 'com_virtuemart'), ('country_name', 'country_name', 'calcimport', 'com_virtuemart'), ('country_2_code', 'country_2_code', 'calcimport', 'com_virtuemart'), ('country_3_code', 'country_3_code', 'calcimport', 'com_virtuemart'), ('state_name', 'state_name', 'calcimport', 'com_virtuemart'), ('state_2_code', 'state_2_code', 'calcimport', 'com_virtuemart'), ('state_3_code', 'state_3_code', 'calcimport', 'com_virtuemart'), /* VirtueMart category export */ ('category_path', 'category_path', 'categoryexport', 'com_virtuemart'), ('category_name', 'category_name', 'categoryexport', 'com_virtuemart'), ('category_description', 'category_description', 'categoryexport', 'com_virtuemart'), ('metadesc', 'metadesc', 'categoryexport', 'com_virtuemart'), ('metakey', 'metakey', 'categoryexport', 'com_virtuemart'), ('customtitle', 'customtitle', 'categoryexport', 'com_virtuemart'), ('slug', 'slug', 'categoryexport', 'com_virtuemart'), ('file_url', 'file_url', 'categoryexport', 'com_virtuemart'), ('file_url_thumb', 'file_url_thumb', 'categoryexport', 'com_virtuemart'), /* VirtueMart calculation rule export */ ('currency_code_3', 'currency_code_3', 'calcexport', 'com_virtuemart'), ('category_path', 'category_path', 'calcexport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'calcexport', 'com_virtuemart'), ('country_name', 'country_name', 'calcexport', 'com_virtuemart'), ('country_2_code', 'country_2_code', 'calcexport', 'com_virtuemart'), ('country_3_code', 'country_3_code', 'calcexport', 'com_virtuemart'), ('state_name', 'state_name', 'calcexport', 'com_virtuemart'), ('state_2_code', 'state_2_code', 'calcexport', 'com_virtuemart'), ('state_3_code', 'state_3_code', 'calcexport', 'com_virtuemart'), /* VirtueMart Manufacturer export */ ('mf_name', 'mf_name', 'manufacturerexport', 'com_virtuemart'), ('mf_email', 'mf_email', 'manufacturerexport', 'com_virtuemart'), ('mf_desc', 'mf_desc', 'manufacturerexport', 'com_virtuemart'), ('mf_url', 'mf_url', 'manufacturerexport', 'com_virtuemart'), ('slug', 'slug', 'manufacturerexport', 'com_virtuemart'), ('mf_category_name', 'mf_category_name', 'manufacturerexport', 'com_virtuemart'), /* VirtueMart medias export */ ('product_sku', 'product_sku', 'mediaexport', 'com_virtuemart'), /* VirtueMart order export */ ('custom', 'custom', 'orderexport', 'com_virtuemart'), ('user_currency', 'user_currency', 'orderexport', 'com_virtuemart'), /* In the format EUR */ ('payment_element', 'payment_element', 'orderexport', 'com_virtuemart'), ('state_name', 'state_name', 'orderexport', 'com_virtuemart'), ('state_2_code', 'state_2_code', 'orderexport', 'com_virtuemart'), ('state_3_code', 'state_3_code', 'orderexport', 'com_virtuemart'), ('virtuemart_state_id', 'virtuemart_state_id', 'orderexport', 'com_virtuemart'), ('country_name', 'country_name', 'orderexport', 'com_virtuemart'), ('country_2_code', 'country_2_code', 'orderexport', 'com_virtuemart'), ('country_3_code', 'country_3_code', 'orderexport', 'com_virtuemart'), ('virtuemart_country_id', 'virtuemart_country_id', 'orderexport', 'com_virtuemart'), ('shipment_element', 'shipment_element', 'orderexport', 'com_virtuemart'), ('order_status_name', 'order_status_name', 'orderexport', 'com_virtuemart'), ('full_name', 'full_name', 'orderexport', 'com_virtuemart'), ('username', 'username', 'orderexport', 'com_virtuemart'), ('total_order_items', 'total_order_items', 'orderexport', 'com_virtuemart'), ('discount_percentage', 'discount_percentage', 'orderexport', 'com_virtuemart'), ('product_price_total', 'product_price_total', 'orderexport', 'com_virtuemart'), /* VirtueMart order item export */ ('full_name', 'fullname', 'orderitemexport', 'com_virtuemart'), ('product_sku', 'product_sku', 'orderitemexport', 'com_virtuemart'), ('order_status_name', 'order_status_name', 'orderitemexport', 'com_virtuemart'), /* VirtueMart Product export */ ('custom', 'custom', 'productexport', 'com_virtuemart'), ('product_price', 'product_price', 'productexport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'productexport', 'com_virtuemart'), ('shopper_group_name_price', 'shopper_group_name_price', 'productexport', 'com_virtuemart'), ('related_products', 'related_products', 'productexport', 'com_virtuemart'), ('category_id', 'category_id', 'productexport', 'com_virtuemart'), ('category_path', 'category_path', 'productexport', 'com_virtuemart'), ('product_box', 'product_box', 'productexport', 'com_virtuemart'), ('product_parent_sku', 'product_parent_sku', 'productexport', 'com_virtuemart'), ('product_name', 'product_name', 'productexport', 'com_virtuemart'), ('product_s_desc', 'product_s_desc', 'productexport', 'com_virtuemart'), ('product_desc', 'product_desc', 'productexport', 'com_virtuemart'), ('metadesc', 'metadesc', 'productexport', 'com_virtuemart'), ('metakey', 'metakey', 'productexport', 'com_virtuemart'), ('customtitle', 'customtitle', 'productexport', 'com_virtuemart'), ('slug', 'slug', 'productexport', 'com_virtuemart'), ('picture_url', 'picture_url', 'productexport', 'com_virtuemart'), ('override', 'override', 'productexport', 'com_virtuemart'), ('product_override_price', 'product_override_price', 'productexport', 'com_virtuemart'), ('product_currency', 'product_currency', 'productexport', 'com_virtuemart'), ('custom_shipping', 'custom_shipping', 'productexport', 'com_virtuemart'), ('basepricewithtax', 'basepricewithtax', 'productexport', 'com_virtuemart'), ('discountedpricewithouttax', 'discountedpricewithouttax', 'productexport', 'com_virtuemart'), ('pricebeforetax', 'pricebeforetax', 'productexport', 'com_virtuemart'), ('salesprice', 'salesprice', 'productexport', 'com_virtuemart'), ('taxamount', 'taxamount', 'productexport', 'com_virtuemart'), ('discountamount', 'discountamount', 'productexport', 'com_virtuemart'), ('pricewithouttax', 'pricewithouttax', 'productexport', 'com_virtuemart'), ('manufacturer_name', 'manufacturer_name', 'productexport', 'com_virtuemart'), ('custom_title', 'custom_title', 'productexport', 'com_virtuemart'), ('custom_value', 'custom_value', 'productexport', 'com_virtuemart'), ('custom_price', 'custom_price', 'productexport', 'com_virtuemart'), ('custom_param', 'custom_param', 'productexport', 'com_virtuemart'), ('file_url', 'file_url', 'productexport', 'com_virtuemart'), ('file_url_thumb', 'file_url_thumb', 'productexport', 'com_virtuemart'), ('min_order_level', 'min_order_level', 'productexport', 'com_virtuemart'), ('max_order_level', 'max_order_level', 'productexport', 'com_virtuemart'), /* VirtueMart Rating export */ ('custom', 'custom', 'ratingexport', 'com_virtuemart'), ('product_sku', 'product_sku', 'ratingexport', 'com_virtuemart'), ('vote', 'vote', 'ratingexport', 'com_virtuemart'), ('username', 'username', 'ratingexport', 'com_virtuemart'), /* VirtueMart Shopperfield export */ ('custom', 'custom', 'shopperfieldexport', 'com_virtuemart'), /* VirtueMart Userinfo export */ ('custom', 'custom', 'userinfoexport', 'com_virtuemart'), ('full_name', 'fullname', 'userinfoexport', 'com_virtuemart'), ('vendor_name', 'vendor_name', 'userinfoexport', 'com_virtuemart'), ('shopper_group_name', 'shopper_group_name', 'userinfoexport', 'com_virtuemart'), ('address_type', 'address_type', 'userinfoexport', 'com_virtuemart'), ('address_type_name', 'address_type_name', 'userinfoexport', 'com_virtuemart'), ('usergroup_name', 'usergroup_name', 'userinfoexport', 'com_virtuemart'), ('country_name', 'country_name', 'userinfoexport', 'com_virtuemart'), ('country_2_code', 'country_2_code', 'userinfoexport', 'com_virtuemart'), ('country_3_code', 'country_3_code', 'userinfoexport', 'com_virtuemart'), ('state_name', 'state_name', 'userinfoexport', 'com_virtuemart'), ('state_2_code', 'state_2_code', 'userinfoexport', 'com_virtuemart'), ('state_3_code', 'state_3_code', 'userinfoexport', 'com_virtuemart'), /* VirtueMart Waiting users export */ ('custom', 'custom', 'waitinglistexport', 'com_virtuemart'), ('product_sku', 'product_sku', 'waitinglistexport', 'com_virtuemart'), ('username', 'username', 'waitinglistexport', 'com_virtuemart'), /* VirtueMart Custom field export */ ('custom', 'custom', 'customfieldexport', 'com_virtuemart'), ('plugin_name', 'plugin_name', 'customfieldexport', 'com_virtuemart'), ('vendor_name', 'vendor_name', 'customfieldexport', 'com_virtuemart'), /* Akeeba Subscriptions subscription export */ ('custom', 'custom', 'subscriptionexport', 'com_akeebasubs'), ('name', 'name', 'subscriptionexport', 'com_akeebasubs'), ('username', 'username', 'subscriptionexport', 'com_akeebasubs'), ('email', 'email', 'subscriptionexport', 'com_akeebasubs'), ('password', 'password', 'subscriptionexport', 'com_akeebasubs'), /* Akeeba Subscriptions affiliate export */ ('custom', 'custom', 'affiliateexport', 'com_akeebasubs'), ('money_owed', 'money_owed', 'affiliateexport', 'com_akeebasubs'), ('money_paid', 'money_paid', 'affiliateexport', 'com_akeebasubs'), ('total_commission', 'total_commission', 'affiliateexport', 'com_akeebasubs'), /* Akeeba Subscriptions coupon export */ ('custom', 'custom', 'couponexport', 'com_akeebasubs'), ('name', 'name', 'couponexport', 'com_akeebasubs'), ('username', 'username', 'couponexport', 'com_akeebasubs'), ('email', 'email', 'couponexport', 'com_akeebasubs'), ('password', 'password', 'couponexport', 'com_akeebasubs'), /* Akeeba Subscriptions coupon import */ ('skip', 'skip', 'couponimport', 'com_akeebasubs'), ('username', 'username', 'couponimport', 'com_akeebasubs'), ('subscription_title', 'subscription_title', 'couponimport', 'com_akeebasubs'), /* Comma separated value */ /* Akeeba Subscriptions subscription import */ ('skip', 'skip', 'subscriptionimport', 'com_akeebasubs'), ('subscription_delete', 'subscription_delete', 'subscriptionimport', 'com_akeebasubs'), ('subscription_title', 'subscription_title', 'subscriptionimport', 'com_akeebasubs'), ('name', 'name', 'subscriptionimport', 'com_akeebasubs'), ('username', 'username', 'subscriptionimport', 'com_akeebasubs'), ('email', 'email', 'subscriptionimport', 'com_akeebasubs'), ('password', 'password', 'subscriptionimport', 'com_akeebasubs'), /* Akeeba Subscriptions affiliate import */ ('skip', 'skip', 'affiliateimport', 'com_akeebasubs'), ('affiliate_delete', 'affiliate_delete', 'affiliateimport', 'com_akeebasubs'), ('username', 'username', 'affiliateimport', 'com_akeebasubs'), ('amount', 'amount', 'affiliateimport', 'com_akeebasubs');PK>\install/com_virtuemart.sqlnuW+ADELETE FROM `#__csvi_template_tables` WHERE `component` = 'com_virtuemart'; INSERT IGNORE INTO `#__csvi_template_tables` (`template_type_name`, `template_table`, `component`) VALUES ('calcexport', 'calcexport', 'com_virtuemart'), ('calcexport', 'virtuemart_calcs', 'com_virtuemart'), ('calcimport', 'calcimport', 'com_virtuemart'), ('calcimport', 'virtuemart_calcs', 'com_virtuemart'), ('categoryexport', 'categoryexport', 'com_virtuemart'), ('categoryexport', 'virtuemart_categories', 'com_virtuemart'), ('categoryimport', 'categoryimport', 'com_virtuemart'), ('categoryimport', 'virtuemart_categories', 'com_virtuemart'), ('couponexport', 'couponexport', 'com_virtuemart'), ('couponexport', 'virtuemart_coupons', 'com_virtuemart'), ('couponimport', 'couponimport', 'com_virtuemart'), ('couponimport', 'virtuemart_coupons', 'com_virtuemart'), ('customfieldimport', 'customfieldimport', 'com_virtuemart'), ('customfieldimport', 'virtuemart_customs', 'com_virtuemart'), ('customfieldexport', 'customfieldexport', 'com_virtuemart'), ('customfieldexport', 'virtuemart_customs', 'com_virtuemart'), ('manufacturercategoryimport', 'manufacturercategoryimport', 'com_virtuemart'), ('manufacturercategoryimport', 'virtuemart_manufacturercategories', 'com_virtuemart'), ('manufacturerexport', 'manufacturerexport', 'com_virtuemart'), ('manufacturerexport', 'virtuemart_manufacturers', 'com_virtuemart'), ('manufacturerimport', 'manufacturerimport', 'com_virtuemart'), ('manufacturerimport', 'virtuemart_manufacturers', 'com_virtuemart'), ('mediaexport', 'mediaexport', 'com_virtuemart'), ('mediaexport', 'virtuemart_medias', 'com_virtuemart'), ('mediaimport', 'mediaimport', 'com_virtuemart'), ('mediaimport', 'virtuemart_medias', 'com_virtuemart'), ('orderexport', 'orderexport', 'com_virtuemart'), ('orderexport', 'virtuemart_orders', 'com_virtuemart'), ('orderexport', 'virtuemart_order_userinfos', 'com_virtuemart'), ('orderimport', 'orderimport', 'com_virtuemart'), ('orderimport', 'virtuemart_orders', 'com_virtuemart'), ('orderimport', 'virtuemart_order_userinfos', 'com_virtuemart'), ('orderitemexport', 'orderitemexport', 'com_virtuemart'), ('orderitemexport', 'virtuemart_order_items', 'com_virtuemart'), ('orderitemimport', 'orderitemimport', 'com_virtuemart'), ('orderitemimport', 'virtuemart_order_items', 'com_virtuemart'), ('productexport', 'productexport', 'com_virtuemart'), ('productexport', 'virtuemart_products', 'com_virtuemart'), ('productimport', 'productimport', 'com_virtuemart'), ('productimport', 'virtuemart_products', 'com_virtuemart'), ('ratingexport', 'ratingexport', 'com_virtuemart'), ('ratingexport', 'virtuemart_rating_reviews', 'com_virtuemart'), ('ratingimport', 'ratingimport', 'com_virtuemart'), ('ratingimport', 'virtuemart_rating_reviews', 'com_virtuemart'), ('shopperfieldexport', 'shopperfieldexport', 'com_virtuemart'), ('shopperfieldexport', 'virtuemart_userfields', 'com_virtuemart'), ('shopperfieldimport', 'shopperfieldimport', 'com_virtuemart'), ('shopperfieldimport', 'virtuemart_userfields', 'com_virtuemart'), ('userinfoexport', 'userinfoexport', 'com_virtuemart'), ('userinfoexport', 'users', 'com_virtuemart'), ('userinfoexport', 'virtuemart_userinfos', 'com_virtuemart'), ('userinfoexport', 'virtuemart_vmusers', 'com_virtuemart'), ('userinfoimport', 'userinfoimport', 'com_virtuemart'), ('userinfoimport', 'users', 'com_virtuemart'), ('userinfoimport', 'virtuemart_userinfos', 'com_virtuemart'), ('userinfoimport', 'virtuemart_vmusers', 'com_virtuemart'), ('waitinglistexport', 'virtuemart_waitingusers', 'com_virtuemart'), ('waitinglistexport', 'waitinglistexport', 'com_virtuemart'), ('waitinglistimport', 'virtuemart_waitingusers', 'com_virtuemart'), ('waitinglistimport', 'waitinglistimport', 'com_virtuemart'); DELETE FROM `#__csvi_template_types` WHERE `component` = 'com_virtuemart'; INSERT IGNORE INTO `#__csvi_template_types` (`template_type_name`, `template_type`, `component`, `url`, `options`) VALUES ('categoryexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=category', 'file,fields,category,layout,email,limit'), ('categoryimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=category', 'category_file,fields,category,category_image,category_path,limit'), ('couponexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=coupon', 'file,fields,layout,email,limit'), ('couponimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=coupon', 'file,fields,limit'), ('manufacturercategoryimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=manufacturercategories', 'file,fields,manufacturer_category'), ('manufacturerexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=manufacturer', 'file,fields,manufacturer,layout,email,limit'), ('manufacturerimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=manufacturer', 'manufacturer_file,fields,manufacturer'), ('orderexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=orders', 'file,fields,order,layout,email,limit'), ('orderimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=orders', 'file,fields,limit'), ('orderitemexport', 'export', 'com_virtuemart', NULL, 'file,fields,orderitem,layout,email,limit'), ('orderitemimport', 'import', 'com_virtuemart', NULL, 'file,fields,order_item'), ('productexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=product', 'file,fields,product,layout,email,shipping,limit'), ('mediaexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=media', 'file,fields,layout,email,limit'), ('mediaimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=media', 'file,fields,media,media_image,media_path'), ('productimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=product', 'file,fields,product,image,product_path,limit'), ('ratingexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=ratings', 'file,fields,layout,email,limit'), ('ratingimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=ratings', 'file,fields'), ('customfieldimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=custom', 'file,fields,limit'), ('customfieldexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=custom', 'file,fields,layout,email,limit'), ('shopperfieldexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=userfields', 'file,fields,layout,email,limit'), ('shopperfieldimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=userfields', 'file,fields'), ('waitinglistexport', 'export', 'com_virtuemart', NULL, 'file,fields,layout,email,limit'), ('waitinglistimport', 'import', 'com_virtuemart', NULL, 'file,fields,limit'), ('userinfoexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=user', 'file,fields,userinfo,layout,email,limit'), ('userinfoimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=user', 'file,fields'), ('calcimport', 'import', 'com_virtuemart', 'index.php?option=com_virtuemart&view=calc', 'file,fields,calc,limit'), ('calcexport', 'export', 'com_virtuemart', 'index.php?option=com_virtuemart&view=calc', 'file,fields,calc,limit');PK>\c@ config.xmlnuW+A

    PK>\zenqueueMessage(JText::sprintf('COM_CSVI_PHP_VERSION_ERROR', phpversion()), 'error'); return false; } // Check if the Joomla version is correct $version = new JVersion(); if (version_compare($version->getShortVersion(), '2.5', '<') == '-1') { $app = JFactory::getApplication(); $app->enqueueMessage(JText::sprintf('COM_CSVI_JOOMLA_VERSION_ERROR', $version->getShortVersion()), 'error'); return false; } // Check if there is an entry in the schemas table if ($type == 'update') { $db = JFactory::getDbo(); // Get the extension id first $query = $db->getQuery(true); $query->select('extension_id')->from('#__extensions')->where($db->qn('type').'='.$db->q('component'))->where($db->qn('element').'='.$db->q('com_csvi')); $db->setQuery($query); $eid = $db->loadResult(); if ($eid) { // Check if there is a version in the schemas table $query->clear(); $query->select('version_id') ->from('#__schemas') ->where('extension_id = ' . $eid); $db->setQuery($query); $version = $db->loadResult(); if (empty($version)) { // Get the current CSVI version $query->clear(); $query->select('params') ->from('#__csvi_settings') ->where('id = 2'); $db->setQuery($query); $version = $db->loadResult(); // Add the version number $query->clear(); $query->insert('#__schemas')->values($eid.','.$db->q($version)); $db->setQuery($query); $db->query(); } } } return true; } /** * method to run after an install/update/uninstall method * * @return void */ function postflight($type, $parent) { // Load the CSS ?> '; echo JHtml::_('link', JRoute::_('index.php?option=com_csvi&view=install'), JText::_('COM_CSVI_CONTINUE_SETUP')); echo ''; } }PK>\ index.htmlnuW+APK>\v?tables/csvi_log_details.phpnuW+A $value) { if (substr($name, 0, 1) != '_') $this->$name = $value; } } } ?>PK>\ ,EEtables/csvi_template_types.phpnuW+APK>\̼mtables/settings.phpnuW+APK>\tables/index.htmlnuW+APK>\(O~~tables/replacement.phpnuW+APK>\]qtables/templatetype.phpnuW+APK>\5oo,tables/com_virtuemart/manufacturers_lang.phpnuW+Ainput; $template = $jinput->get('template', null, null); parent::__construct('#__virtuemart_manufacturers_'.$template->get('language', 'general'), 'virtuemart_manufacturer_id', $db ); } /** * Check if the manufacturer exists * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function check($create = true) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); if (!empty($this->virtuemart_manufacturer_id)) { $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->qn($this->_tbl_key).' = '.$db->q($this->virtuemart_manufacturer_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_EXISTS'), true); return false; } else { if ($create) { // Create a dummy entry for updating $query = "INSERT IGNORE INTO ".$this->_tbl." (".$db->qn($this->_tbl_key).") VALUES (".$db->q($this->virtuemart_manufacturer_id).")"; $db->setQuery($query); if ($db->query()) return true; else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_NOT_EXISTS'), true); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_NOT_EXISTS'), true); return false; } } } else { $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('mf_name = '.$db->q($this->mf_name)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_EXISTS'), true); $this->virtuemart_manufacturer_id = $id; $this->load(); return true; } else { if ($create) { // Find the highest ID $query = $db->getQuery(true); $query->select('MAX(virtuemart_manufacturer_id)'); $query->from($this->_tbl); $db->setQuery($query); $maxid = $db->loadResult(); $maxid++; // Create a dummy entry for updating $query = "INSERT IGNORE INTO ".$this->_tbl." (".$db->qn($this->_tbl_key).") VALUES (".$db->q($maxid).")"; $db->setQuery($query); if ($db->query()) { $this->virtuemart_manufacturer_id = $maxid; return true; } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_NOT_EXISTS'), true); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_NOT_EXISTS'), true); return false; } } } } /** * Create a slug if needed and store the product * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function store() { if (empty($this->slug)) { // Create the slug $this->_validateSlug(); } return parent::store(); } /** * Validate a slug * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _validateSlug() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Create the slug $this->slug = Com_virtuemart::createSlug($this->mf_name); // Check if the slug exists $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('COUNT('.$db->qn($this->_tbl_key).')'); $query->from($this->_tbl); $query->where($db->qn('slug').' = '.$db->q($this->slug)); $db->setQuery($query); $slugs = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_MANUFACTURER_SLUG'), true); if ($slugs > 0) { $jdate = JFactory::getDate(); $this->slug .= $jdate->format("Y-m-d-h-i-s").mt_rand(); } } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\d"!tables/com_virtuemart/coupons.phpnuW+Avirtuemart_coupon_id)) return true; else { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('coupon_code ='.$db->Quote($this->coupon_code)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_COUPON_CODE_EXISTS'), true); $db->query(); if ($db->getAffectedRows() > 0) { $this->virtuemart_coupon_id = $db->loadResult(); } } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?> PK>\r#tables/com_virtuemart/userinfos.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\)tables/com_virtuemart/.htaccessnuW+A Order allow,deny Deny from all PK>\.Gfftables/com_virtuemart/users.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\ S tables/com_virtuemart/orders.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\AXX.tables/com_virtuemart/vmuser_shoppergroups.phpnuW+Avirtuemart_user_id) && !empty($this->virtuemart_shoppergroup_id)) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_user_id = '.$this->virtuemart_user_id); $query->where('virtuemart_shoppergroup_id = '.$this->virtuemart_shoppergroup_id); $db->setQuery($query); $this->id = $db->loadResult(); } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\B++)tables/com_virtuemart/categories_xref.phpnuW+Acheck(); if($k) { $ret = $this->_db->updateObject( $this->_tbl, $this, $this->_tbl_key, false ); } else { $ret = $this->_db->insertObject( $this->_tbl, $this, $this->_tbl_key ); } if( !$ret ) { $this->setError(get_class( $this ).'::store failed - '.$this->_db->getErrorMsg()); return false; } else { return true; } } /** * Check if a relation already exists */ public function check() { $q = "SELECT COUNT(".$this->_tbl_key.") AS total FROM ".$this->_tbl." WHERE category_parent_id = ".$this->category_parent_id." AND category_child_id = ".$this->category_child_id; $this->_db->setQuery($q); $result = $this->_db->loadResult(); if ($result > 0) return true; else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\o .tables/com_virtuemart/product_customfields.phpnuW+AgetQuery(true); $query->select($db->qn($this->_tbl_key)); $query->from($db->qn($this->_tbl)); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($this->virtuemart_product_id)); $query->where($db->qn('virtuemart_custom_id').' = '.$db->q($this->virtuemart_custom_id)); $query->where($db->qn('custom_value').' = '.$db->q($this->custom_value)); $db->setQuery($query); $id = $db->loadResult(); if ($id) { $this->virtuemart_customfield_id = $id; return true; } else return false; } /** * Delete all related products for given product ID * * @copyright * @author RolandD * @todo * @see * @access public * @param int $product_id the product to delete related products for * @param int $vendor_id the vendor ID to filter on * @param int $related_id the related ID to filter on * @return * @since 4.0 */ public function deleteRelated($product_id, $vendor_id, $related_id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->delete($this->_tbl); $query->where('virtuemart_product_id = '.$product_id); $query->where('virtuemart_custom_id = '.$related_id); $db->setQuery($query); return $db->query(); } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\_#!tables/com_virtuemart/ratings.phpnuW+Avirtuemart_rating_id)) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); // Check if a record already exists in the database $q = "SELECT ".$this->_tbl_key." FROM ".$this->_tbl." WHERE virtuemart_product_id = '".$this->virtuemart_product_id."' AND created_by = ".$this->created_by; $db->setQuery($q); $db->query($q); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_RATING_EXISTS'), true); if ($db->getAffectedRows() > 0) { $this->virtuemart_rating_id = $db->loadResult(); return true; } else { // There is no entry yet, so we must insert a new one return false; } } // There is already a rating id else return true; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\ %"tables/com_virtuemart/products.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\x&tables/com_virtuemart/rating_votes.phpnuW+Avirtuemart_rating_vote_id)) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); // Check if a record already exists in the database $q = "SELECT ".$this->_tbl_key." FROM ".$this->_tbl." WHERE virtuemart_product_id = '".$this->virtuemart_product_id."' AND created_by = ".$this->created_by; $db->setQuery($q); $db->query($q); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_RATING_VOTE_EXISTS'), true); if ($db->getAffectedRows() > 0) { $this->virtuemart_rating_vote_id = $db->loadResult(); return true; } else { // There is no entry yet, so we must insert a new one return false; } } // There is already a rating id else return true; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\&tables/com_virtuemart/waitingusers.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } /** * Check if there is already a waiting list entry * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.1 */ public function check() { if (empty($this->virtuemart_waitinguser_id)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $query->where('virtuemart_user_id = '.$this->virtuemart_user_id); $db->setQuery($query); $this->virtuemart_waitinguser_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECKING_WAITINGLIST_EXISTS'), true); } } } ?> PK>\MD D 1tables/com_virtuemart/product_categories_xref.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); // Check if the entry already exists if (!$this->checkDuplicate()) { $ret = $this->_db->insertObject( $this->_tbl, $this); $csvilog->addDebug(JText::_('COM_CSVI_ADD_NEW_CATEGORY_REFERENCES'), true); if (!$ret) { $this->setError(get_class($this).'::store failed - '.$this->_db->getErrorMsg()); return false; } else return true; } else return true; } /** * Check if the entry already exists */ private function checkDuplicate() { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); $q = "SELECT COUNT(*) AS total FROM ".$this->_tbl." WHERE virtuemart_product_id = ".$this->virtuemart_product_id." AND virtuemart_category_id = ".$this->virtuemart_category_id; $db->setQuery($q); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_IF_CATEGORY_REFERENCE_ALREADY_EXISTS'), true); $total = $db->loadResult(); if ($total > 0) { $csvilog->addDebug(JText::_('COM_CSVI_CATEGORY_REFERENCE_ALREADY_EXISTS')); return true; } else { $csvilog->addDebug(JText::_('COM_CSVI_CATEGORY_REFERENCE_DOES_NOT_YET_EXIST')); return false; } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\ݛ< /tables/com_virtuemart/product_manufacturers.phpnuW+AgetQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_product_id = '.$db->Quote($this->virtuemart_product_id)); $query->where('virtuemart_manufacturer_id = '.$db->Quote($this->virtuemart_manufacturer_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $this->id = $id; return true; } else return false; } /** * Store a manufacturer reference * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function store($updateNulls=false) { // First remove any existing references $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->delete($db->quoteName($this->_tbl)); $query->where($db->quoteName('virtuemart_product_id').' = '.$db->quote($this->virtuemart_product_id)); $db->setQuery($query); if ($db->query()) return parent::store($updateNulls); else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\L$tables/com_virtuemart/categories.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\?fgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\SC %tables/com_virtuemart/order_items.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\YH!tables/com_virtuemart/vmusers.phpnuW+Avirtuemart_user_id)) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('COUNT('.$this->_tbl_key.') AS total'); $query->from($this->_tbl); $query->where($db->quoteName($this->_tbl_key).' = '.$db->Quote($this->virtuemart_user_id)); $db->setQuery($query); if ($db->loadResult() == 1) return true; else { $query = "INSERT IGNORE INTO ".$db->quoteName($this->_tbl)." (".$db->quoteName($this->_tbl_key).") VALUES (".$db->Quote($this->virtuemart_user_id).")"; $db->setQuery($query); $db->query(); return false; } } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\.(tables/com_virtuemart/product_prices.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->qn('virtuemart_product_id').' = '.$db->q($this->virtuemart_product_id)); $query->where($db->qn('virtuemart_shoppergroup_id').' = '.$db->q($this->virtuemart_shoppergroup_id)); $query->where($db->qn('product_currency').' = '.$db->q($this->product_currency)); $query->where($db->qn('price_quantity_start').' = '.$db->q($this->price_quantity_start)); $query->where($db->qn('price_quantity_end').' = '.$db->q($this->price_quantity_end)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_VM_PRODUCT_PRICE'), true); $id = $db->loadResult(); if ($id) { $this->virtuemart_product_price_id = $id; $this->load($id); return true; } else return false; } /** * See if we can find a shopper group ID * * @copyright * @author RolandD * @todo * @see * @access * @param * @return array of shopper group IDs * @since 4.0 */ public function getShopperGroupID() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('virtuemart_shoppergroup_id'); $query->from($this->_tbl); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $db->setQuery($query); $shopper_groups = $db->loadResultArray(); $csvilog->addDebug(JText::_('COM_CSVI_VM_PRODUCT_PRICE_SHOPPER_GROUP'), true); return $shopper_groups; } /** * This function calculates the new price by adding the uploaded value * to the current price * * Prices can be calculated with: * - Add (+) * - Subtract (-) * - Divide (/) * - Multiply (*) * * Add and subtract support percentages * * @todo logging */ public function CalculatePrice() { // Get the operation $operation = substr($this->product_price, 0, 1); if (strstr('+-/*', $operation)) { // Get the price value $modify = $this->product_price; // Clone the current instance as we don't want the DB values overwrite the uploaded values */ $newprice = clone $this; // Get the current price in the database $newprice->check(); $newprice->load($this->virtuemart_product_price_id); $this->virtuemart_product_price_id = $newprice->virtuemart_product_price_id; // Set the price to calculate with $price = $newprice->product_price; // Check if we have a percentage value if (substr($modify, -1) == '%') { $modify = substr($modify, 0, -1); $percent = true; } else $percent = false; // Get the price value $value = substr($modify, 1); // Check what modification we need to do and apply it switch ($operation) { case '+': if ($percent) $price += $price* ($value/100); else $price += $value; break; case '-': if ($percent) $price -= $price* ($value/100); else $price -= $value; break; case '/': $price /= $value; break; case '*': $price*= $value; break; default: // Assign the current price to prevent it being overwritten $price = $this->product_price; break; } // Set the new price $this->product_price = $price; } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } }PK>\V]z4ii)tables/com_virtuemart/category_medias.phpnuW+AgetQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_category_id = '.$db->Quote($this->virtuemart_category_id)); $query->where('virtuemart_media_id = '.$db->Quote($this->virtuemart_media_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) return true; else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\#o,, tables/com_virtuemart/index.htmlnuW+APK>\I8/tables/com_virtuemart/product_shoppergroups.phpnuW+AgetQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_product_id = '.$this->virtuemart_product_id); $query->where('virtuemart_shoppergroup_id = '.$this->virtuemart_shoppergroup_id); $db->setQuery($query); $id = $db->loadResult(); if ($id) return true; else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } }PK>\#(tables/com_virtuemart/rating_reviews.phpnuW+Avirtuemart__rating_review_id)) { $jinput = JFactory::getApplication()->input; $db = JFactory::getDBO(); $csvilog = $jinput->get('csvilog', null, null); // Check if a record already exists in the database $q = "SELECT ".$this->_tbl_key." FROM ".$this->_tbl." WHERE virtuemart_product_id = '".$this->virtuemart_product_id."' AND created_by = ".$this->created_by; $db->setQuery($q); $db->query($q); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_RATING_REVIEW_EXISTS'), true); if ($db->getAffectedRows() > 0) { $this->virtuemart_rating_id = $db->loadResult(); return true; } else { // There is no entry yet, so we must insert a new one return false; } } // There is already a rating id else return true; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\E'6tables/com_virtuemart/manufacturer_categories_lang.phpnuW+Ainput; $template = $jinput->get('template', null, null); parent::__construct('#__virtuemart_manufacturercategories_'.$template->get('language', 'general'), 'virtuemart_manufacturercategories_id', $db ); } /** * Check if the manufacturer category exists * * @copyright * @author RolandD * @todo * @see * @access public * @param bool $create Set true if a dummy entry needs to be added * @return * @since 4.0 */ public function check($create = true) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); if (!empty($this->virtuemart_manufacturercategories_id)) { $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->qn($this->_tbl_key).' = '.$db->q($this->virtuemart_manufacturercategories_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURERCATEGORY_EXISTS'), true); return true; } else { if ($create) { // Create a dummy entry for updating $query = "INSERT IGNORE INTO ".$this->_tbl." (".$db->qn($this->_tbl_key).") VALUES (".$db->q($this->virtuemart_manufacturercategories_id).")"; $db->setQuery($query); if ($db->query()) return true; else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURERCATEGORY_NOT_EXISTS'), true); return false; } } else return false; } } else { $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('mf_category_name = '.$db->q($this->mf_category_name)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURERCATEGORY_EXISTS'), true); $this->virtuemart_manufacturercategories_id = $id; return true; } else { if ($create) { // Create a dummy entry for updating $query = "INSERT IGNORE INTO ".$this->_tbl." (".$db->qn($this->_tbl_key).") VALUES (".$db->q($this->virtuemart_manufacturercategories_id).")"; $db->setQuery($query); if ($db->query()) { $this->virtuemart_manufacturercategories_id = $db->insertid(); return true; } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURERCATEGORY_NOT_EXISTS'), true); return false; } } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURERCATEGORY_NOT_EXISTS'), true); return false; } } } } /** * Create a slug if needed and store the product * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function store() { if (empty($$this->_tbl_key)) { // Create the slug $this->slug = Com_virtuemart::createSlug($this->mf_category_name); } return parent::store(); } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } }PK>\[v)tables/com_virtuemart/order_userinfos.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\@Y)tables/com_virtuemart/order_histories.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\9#s%%'tables/com_virtuemart/products_lang.phpnuW+Ainput; $template = $jinput->get('template', null, null); parent::__construct('#__virtuemart_products_'.$template->get('language', 'general'), 'virtuemart_product_id', $db); } /** * Check if the product ID exists * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function check() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->quoteName($this->_tbl_key). ' = '.$this->virtuemart_product_id); $db->setQuery($query); $id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_PRODUCT_LANG'), true); if (empty($id)) { if (empty($this->slug)) $this->createSlug(); if (!empty($this->slug)) { // Create a dummy entry for updating $query = "INSERT INTO ".$this->_tbl." (".$db->qn($this->_tbl_key).", ".$db->qn('slug').") VALUES (".$db->q($this->virtuemart_product_id).", ".$db->q($this->slug).")"; $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_ADD_PRODUCT_LANG'), true); if ($db->query()) { // Get the last inserted ID $query = $db->getQuery(true) ->select($this->_tbl_key) ->from($this->_tbl) ->where($db->qn('slug').' = '.$db->q($this->slug)); $db->setQuery($query); $id = $db->loadResult(); $this->virtuemart_product_id = $id; return true; } } else return false; } else return true; } /** * Validate a slug * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function createSlug() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Create the slug $this->slug = Com_virtuemart::createSlug($this->product_name); // Check if the slug exists $db = JFactory::getDbo(); $query = $db->getQuery(true) ->select('COUNT('.$db->qn($this->_tbl_key).')') ->from($this->_tbl) ->where($db->qn('slug').' = '.$db->q($this->slug)) ->where($db->qn($this->_tbl_key).' != '.$db->q($this->virtuemart_product_id)); $db->setQuery($query); $slugs = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_PRODUCT_SLUG'), true); if ($slugs > 0) { $jdate = JFactory::getDate(); $this->slug .= $jdate->format("Y-m-d-h-i-s").mt_rand(); } } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } }PK>\&Ҡ$tables/com_virtuemart/userfields.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\ ċ 'tables/com_virtuemart/manufacturers.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->qn($this->_tbl_key).' = '.$db->q($this->virtuemart_manufacturer_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_EXISTS'), true); return true; } else { // Find the default category $query = $db->getQuery(true) ->select('MIN('.($db->qn('virtuemart_manufacturercategories_id').')')) ->from($db->qn('#__virtuemart_manufacturercategories')) ->where($db->qn('published').'=1'); $db->setQuery($query); $this->virtuemart_manufacturercategories_id = $db->loadResult(); // Create a dummy entry for updating $query->insert($this->_tbl) ->columns(array($this->_tbl_key.','.$db->qn('virtuemart_manufacturercategories_id'))) ->values($db->q($this->virtuemart_manufacturer_id).','.$db->q($this->virtuemart_manufacturercategories_id)); $db->setQuery($query); if ($db->query()) { $this->virtuemart_manufacturer_id = $db->insertid(); return true; } else { $csvilog->addDebug(JText::_('COM_CSVI_DEBUG_MANUFACTURER_NOT_EXISTS'), true); return false; } } } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } }PK>\ tables/com_virtuemart/medias.phpnuW+AgetQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('file_url = '.$db->Quote($this->file_url)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) { $this->virtuemart_media_id = $id; return true; } else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\&'x|YY(tables/com_virtuemart/product_medias.phpnuW+AgetQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('virtuemart_product_id = '.$db->Quote($this->virtuemart_product_id)); $query->where('virtuemart_media_id = '.$db->Quote($this->virtuemart_media_id)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) return true; else return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\+!tables/com_virtuemart/customs.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } /** * Check if there is already a waiting list entry * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.1 */ public function check() { if (empty($this->virtuemart_custom_id)) { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('custom_element = '.$db->Quote($this->custom_element)); $query->where('custom_title = '.$db->Quote($this->custom_title)); $db->setQuery($query); $this->virtuemart_custom_id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECKING_CUSTOMFIELD_EXISTS'), true); } } } ?> PK>\3q q tables/com_virtuemart/calcs.phpnuW+Ainput; $db = JFactory::getDbo(); $csvilog = $jinput->get('csvilog', null, null); if ($this->calc_value) { // Check if the amount exists in the database $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->quoteName('calc_kind').' = '.$db->quote($this->calc_kind)); $query->where($db->quoteName('calc_value_mathop').' = '.$db->quote($this->calc_value_mathop)); $query->where($db->quoteName('calc_value').' BETWEEN '.$db->quote(($this->calc_value-0.1)).' AND '.$db->quote(($this->calc_value+0.1))); if (!empty($this->publish_up)) $query->where('publish_up = '.$db->Quote($this->publish_up)); if (!empty($this->publish_down)) $query->where('publish_down = '.$db->Quote($this->publish_down)); $db->setQuery($query); $ids = $db->loadColumn(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_CALC_EXISTS'), true); // There are multiple discount ids, we take the first one if (count($ids) > 0) { $csvilog->addDebug(JText::sprintf('COM_CSVI_USE_CALC_ID', $ids[0])); $this->virtuemart_calc_id = $ids[0]; return true; } else { $this->virtuemart_calc_id = null; return false; } } return false; } /** * Reset the keys including primary key * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\Nb)tables/com_virtuemart/categories_lang.phpnuW+Ainput; $template = $jinput->get('template', null, null); if ($template->get('operation', 'options') == 'categoryimport') { if ($template->get('language', 'general') == $template->get('target_language', 'general')) $lang = $template->get('language', 'general'); else $lang = $template->get('target_language', 'general'); } else $lang = $template->get('language', 'general'); parent::__construct('#__virtuemart_categories_'.$lang, 'virtuemart_category_id', $db); } /** * Check if the category ID exists * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function check() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where($db->quoteName($this->_tbl_key). ' = '.$this->virtuemart_category_id); $db->setQuery($query); $id = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_CATEGORY_LANG'), true); if (!$id) { if (empty($this->slug)) $this->_validateSlug(); if (!empty($this->slug)) { // Create a dummy entry for updating $query = "INSERT INTO ".$this->_tbl." (".$db->quoteName($this->_tbl_key).", ".$db->quoteName('slug').") VALUES (".$db->Quote($this->virtuemart_category_id).", ".$db->Quote($this->slug).")"; $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_ADD_CATGEGORY_LANG'), true); if ($db->query()) return true; else return false; } else return false; } else return true; } /** * Create a slug if needed and store the product * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function store() { if (empty($this->slug)) { // Create the slug $this->_validateSlug(); } return parent::store(); } /** * Validate a slug * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ private function _validateSlug() { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); // Create the slug $this->slug = Com_virtuemart::createSlug($this->category_name); // Check if the slug exists $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('COUNT('.$db->Quote($this->_tbl_key).')'); $query->from($this->_tbl); $query->where($db->quoteName('slug').' = '.$db->Quote($this->slug)); $db->setQuery($query); $slugs = $db->loadResult(); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_CATGEGORY_SLUG'), true); if ($slugs > 0) { $jdate = JFactory::getDate(); $this->slug .= $jdate->format("Y-m-d-h-i-s").mt_rand(); } } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\狏!tables/csvi_template_settings.phpnuW+APK>\:: tables/csvi_available_fields.phpnuW+APK>\|;;tables/csvimproved.phpnuW+AloadArray($array['params']); $array['params'] = $registry->toString(); } return parent::bind($array, $ignore); } } ?>PK>\iA00$tables/com_akeebasubs/affiliates.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } /** * Check if the affiliate already exists * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function check() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName($this->_tbl_key)); $query->from($db->quoteName($this->_tbl)); $query->where($db->quoteName('user_id').' = '.$db->quote($this->user_id)); $db->setQuery($query); $this->akeebasubs_affiliate_id = $db->loadResult(); if ($this->akeebasubs_affiliate_id > 0) return true; else return false; } } ?> PK>\#o,, tables/com_akeebasubs/index.htmlnuW+APK>\R %tables/com_akeebasubs/affpayments.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } /** * Check if a payment has already been made * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function check() { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($db->quoteName($this->_tbl_key)); $query->from($db->quoteName($this->_tbl)); $query->where($db->quoteName('akeebasubs_affiliate_id').' = '.$db->quote($this->akeebasubs_affiliate_id)); $query->where($db->quoteName('created_on').' = '.$db->quote($this->created_on)); $db->setQuery($query); $id = $db->loadResult(); if ($id > 0) return false; else return true; } /** * Delete affiliate payments * * @copyright * @author RolandD * @todo * @see * @access public * @param int $user_id the ID of the affiliate * @return * @since 4.0 */ public function delete($user_id) { $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->delete($db->quoteName($this->_tbl)); $query->where($db->quoteName('akeebasubs_affiliate_id').' = '.$db->quote($user_id)); $db->setQuery($query); if ($db->query()) return true; else return false; } } ?> PK>\ǵ!tables/com_akeebasubs/coupons.phpnuW+Aakeebasubs_coupon_id)) return true; else { $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select($this->_tbl_key); $query->from($this->_tbl); $query->where('coupon ='.$db->Quote($this->coupon)); $db->setQuery($query); $csvilog->addDebug(JText::_('COM_CSVI_CHECK_COUPON_CODE_EXISTS'), true); $db->query(); if ($db->getAffectedRows() > 0) { $this->akeebasubs_coupon_id = $db->loadResult(); } } } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?> PK>\^4T'tables/com_akeebasubs/subscriptions.phpnuW+AgetFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?> PK>\)tables/com_akeebasubs/.htaccessnuW+A Order allow,deny Deny from all PK>\)tables/.htaccessnuW+A Order allow,deny Deny from all PK>\ tables/csvi_logs.phpnuW+A $value) { if (substr($name, 0, 1) != '_') $this->$name = $value; } } } ?>PK>\- tables/com_csvi/custom_table.phpnuW+Ainput; $template = $jinput->get('template', null, null); // Find which table we are importing $tbl = $template->get('custom_table'); // Find the primare key for this table $pk = CsviHelper::getPrimaryKey($tbl); parent::__construct('#__'.$tbl, $pk, $db); } /** * Reset the table fields, need to do it ourselves as the fields default is not NULL * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function reset() { // Get the default values for the class from the table. foreach ($this->getFields() as $k => $v) { // If the property is not private, reset it. if (strpos($k, '_') !== 0) { $this->$k = NULL; } } } } ?>PK>\)tables/com_csvi/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,tables/com_csvi/index.htmlnuW+APK>\22controllers/maintenance.phpnuW+AgetView('maintenance', 'html'); // Standard model $view->setModel( $this->getModel( 'maintenance', 'CsviModel' ), true ); // Extra models $view->setModel( $this->getModel( 'log', 'CsviModel' )); $view->setModel( $this->getModel( 'availablefields', 'CsviModel' )); // View if (!JRequest::getBool('cron', false)) { if (JRequest::getInt('run_id') > 0) $view->setLayout('log'); } else $view->setLayout('cron'); // Now display the view $view->display(); } /** * Redirect to the log screen * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.3 */ private function _outputHtml() { $this->setRedirect('index.php?option=com_csvi&task=maintenance.maintenance&run_id='.JRequest::getInt('import_id')); } /** * Handle the cron output * * @copyright * @author RolandD * @todo * @see * @access private * @param * @return * @since 3.3 */ private function _outputCron() { // Create the view object $view = $this->getView('maintenance', 'html'); // Standard model $view->setModel( $this->getModel( 'maintenance', 'CsviModel' ), true ); // Extra models $view->setModel( $this->getModel( 'log', 'CsviModel' )); // View $view->setLayout('cron'); // Now display the view $view->display(); } /** * Update available fields * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function updateAvailableFields() { // Prepare $jinput = JFactory::getApplication()->input; $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Check if we are running a cron job if ($jinput->get('cron', false, 'bool')) { // Pre-configuration $available_fields = $this->getModel('availablefields', 'CsviModel'); $available_fields->prepareAvailableFields(); // Update the available fields $available_fields->getFillAvailableFields(); // Finish $model->getFinishProcess(); // Redirect $this->_outputCron(); } else { // Create the view object $view = $this->getView('maintenance', 'json'); // Pre-configuration $available_fields = $this->getModel('availablefields', 'CsviModel'); $available_fields->prepareAvailableFields(); // View $view->setLayout('availablefields'); // Now display the view $view->display(); } } /** * Update available fields in steps * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function updateAvailableFieldsSingle() { // Create the view object $view = $this->getView('maintenance', 'json'); // View $view->setLayout('availablefields'); // Load the model $view->setModel($this->getModel('maintenance', 'CsviModel'), true); $view->setModel($this->getModel('availablefields', 'CsviModel')); // Now display the view $view->display(); } /** * Install sample templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function installDefaultTemplates() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getInstallDefaultTemplates(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Sort categories * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function sortCategories() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getSortCategories(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Remove empty categories * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function removeEmptyCategories() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getRemoveEmptyCategories(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Load the exchange rates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function exchangeRates() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getExchangeRates(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Clean the cache folder * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function cleanTemp() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getCleanTemp(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Backup the CSVI VirtueMart templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function backupTemplates() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getBackupTemplates(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Restore the CSVI VirtueMart templates * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function restoreTemplates() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getRestoreTemplates(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Load the ICEcat index files * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function icecatIndex() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Check if we are running a cron job if (JRequest::getBool('cron', false)) { JRequest::setVar('loadtype', false); } // Perform the task $result = $model->getIcecatIndex(); // See if we need to do the staggered import of the index file switch ($result) { case 'full': // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); break; case 'single': // Create the view object $view = $this->getView('maintenance', 'json'); // View $view->setLayout('icecat'); // Now display the view $view->display(); break; case 'cancel': // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); break; } } /** * Empty the VirtueMart tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function icecatSingle() { // Create the view object $view = $this->getView('maintenance', 'json'); // View $view->setLayout('icecat'); // Load the model $view->setModel($this->getModel('maintenance', 'CsviModel'), true); $view->setModel($this->getModel( 'log', 'CsviModel' )); // Now display the view $view->display(); } /** * Optimize the database tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function optimizeTables() { // Prepare $jinput = JFactory::getApplication()->input; $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getOptimizeTables(); // Finish $model->getFinishProcess(); // Redirect if (!$jinput->get('cron', false, 'bool')) $this->_outputHtml(); else $this->_outputCron(); } /** * Backup the VirtueMart tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function backupVm() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getBackupVirtueMart(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Empty the VirtueMart tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function emptyDatabase() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getEmptyDatabase(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Unpublish products in unpublished categories * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function unpublishProductByCategory() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->getUnpublishProductByCategory(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } /** * Cancel the loading of the ICEcat index * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.3 */ public function cancelImport() { // Clean the session $session = JFactory::getSession(); $option = JRequest::getVar('option'); $session->set($option.'.icecat_index_file', serialize('0')); $session->set($option.'.icecat_rows', serialize('0')); $session->set($option.'.icecat_position', serialize('0')); $session->set($option.'.icecat_records', serialize('0')); $session->set($option.'.icecat_wait', serialize('0')); // Redirect back to the maintenance page $this->setRedirect('index.php?option='.JRequest::getCmd('option').'&view=maintenance'); } /** * Delete all CSVI VirtueMart backup tables * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function removeCsviTables() { // Prepare $model = $this->getModel('maintenance'); $model->getPrepareMaintenance(); // Perform the task $model->removeCsviTables(); // Finish $model->getFinishProcess(); // Redirect if (!JRequest::getBool('cron', false)) $this->_outputHtml(); else $this->_outputCron(); } } ?> PK>\2&&controllers/logdetails.phpnuW+Ainput; // Check if the run ID is set $run_id = $jinput->get('run_id', array(), 'array'); // Get the first Run ID only $run_id = $run_id[0]; if ($run_id > 0) { $jinput->set('run_id', $run_id); // Create the view object $view = $this->getView('logdetails', 'html'); // Standard model $view->setModel( $this->getModel( 'logdetails', 'CsviModel' ), true ); // Log functions $view->setModel( $this->getModel( 'log', 'CsviModel' )); // Now display the view $view->display(); } else { $this->setRedirect('index.php?option=com_csvi&view=log', JText::_('COM_CSVI_NO_RUNID_FOUND'), 'error'); } } /** * Cancel the operation and return to the log view * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function cancel() { $this->setRedirect('index.php?option=com_csvi&view=log'); } } ?> PK>\ zcontrollers/install.json.phpnuW+AgetView('install', 'json'); // Standard model $view->setModel( $this->getModel( 'install', 'CsviModel' ), true ); $view->setModel( $this->getModel( 'availablefields', 'CsviModel' )); $view->setModel( $this->getModel( 'maintenance', 'CsviModel' )); $view->display(); } } ?> PK>\#`h::controllers/templatetype.phpnuW+A false)); return $model; } } ?>PK>\ȔO7  controllers/log.phpnuW+AregisterTask('remove_all','remove'); } /** * Cancel the operation * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.5 */ public function cancel() { $this->setRedirect('index.php?option=com_csvi&view=log'); } /** * Download a debug log file * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function downloadDebug() { $log = $this->getModel('log', 'CsviModel'); $log->downloadDebug(); } /** * Read a logfile from disk and show it in a popup * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function LogReader() { $jinput = JFactory::getApplication()->input; $jinput->set('view', 'log'); $jinput->set('layout', 'logreader'); $jinput->set('hidemainmenu', 1); parent::display(); } /** * Delete log files * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function remove() { $jinput = JFactory::getApplication()->input; $model = $this->getModel('log'); switch ($this->getTask()) { case 'remove': $results = $model->getDelete(); break; case 'remove_all': $results = $model->getDeleteAll(); break; } foreach ($results as $type => $messages) { foreach ($messages as $msg) { if ($type == 'ok') $this->setMessage($msg); else if ($type == 'nok') $this->setMessage($msg, 'error'); } } $this->setRedirect('index.php?option=com_csvi&view=log'); } } ?> PK>\r  controllers/export.phpnuW+AregisterTask('getUser','getData'); $this->registerTask('getProduct','getData'); $this->registerTask('getItemProduct','getData'); $this->registerTask('loadfields','getData'); $this->registerTask('loadtables','getData'); $this->registerTask('loadsites','getData'); } /** * Show the export option screen * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function Export() { $jinput = JFactory::getApplication()->input; // Create the view object $view = $this->getView('export', $jinput->get('format', 'html')); // Standard model $view->setModel( $this->getModel( 'export', 'CsviModel' ), true ); $view->setModel( $this->getModel( 'templates', 'CsviModel' )); $view->setModel( $this->getModel( 'availablefields', 'CsviModel' )); // Now display the view $view->display(); } /** * Retrieve different kinds of data in JSON format * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function getData() { // Create the view object $view = $this->getView('export', 'json'); // Standard model $view->setModel( $this->getModel( 'export', 'CsviModel' ), true ); $view->setModel( $this->getModel( 'availablefields', 'CsviModel' )); $view->setLayout('export'); // Now display the view $view->display(); } } ?> PK>\Md controllers/maintenance.json.phpnuW+AgetView('maintenance', 'json'); // View $view->setLayout('availablefields'); // Load the model $view->setModel($this->getModel('maintenance', 'CsviModel'), true); $view->setModel($this->getModel( 'availablefields', 'CsviModel' )); // Now display the view $view->display(); } } ?> PK>\ /_  controllers/maintenance.raw.phpnuW+AregisterTask('sortcategories', 'options'); $this->registerTask('icecatsettings', 'options'); } /** * Load the ICEcat settings * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function options() { // Create the view object $view = $this->getView('maintenance', 'raw'); // Load the model $view->setModel($this->getModel('maintenance', 'CsviModel'), true); // Now display the view $view->display(); } /** * Load the operations * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function operations() { $model = $this->getModel(); $options = $model->getOperations(); echo $options; } } ?> PK>\  controllers/process.phpnuW+AregisterTask('saveasnew','save'); } /** * Save a template * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function save() { // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); $jinput = JFactory::getApplication()->input; $model = $this->getModel('templates'); // Store the form fields $app = JFactory::getApplication(); $data = $jinput->get('jform', array(), 'array'); // Re-order the import fields if (array_key_exists('import_fields', $data)) { $fields = array(); foreach ($data['import_fields']['_process_field'] as $field) { $fields[] = $field; } $data['import_fields']['_process_field'] = $fields; // Combine field $fields = array(); foreach ($data['import_fields']['_combine_field'] as $field) { $fields[] = $field; } $data['import_fields']['_combine_field'] = $fields; } // Re-order the export fields else if (array_key_exists('export_fields', $data)) { // Process field $fields = array(); foreach ($data['export_fields']['_process_field'] as $field) { $fields[] = $field; } $data['export_fields']['_process_field'] = $fields; // Combine field $fields = array(); foreach ($data['export_fields']['_combine_field'] as $field) { $fields[] = $field; } $data['export_fields']['_combine_field'] = $fields; // Sort field $fields = array(); foreach ($data['export_fields']['_sort_field'] as $field) { $fields[] = $field; } $data['export_fields']['_sort_field'] = $fields; // Replace field $fields = array(); foreach ($data['export_fields']['_replace_field'] as $field) { $fields[] = $field; } $data['export_fields']['_replace_field'] = $fields; } // Save the data $id = $model->save($data); // Redirect back to the export page $this->setRedirect(JRoute::_('index.php?option=com_csvi&view=process&template_id='.$id, false)); } /** * Remove a template * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return void * @since 3.0 */ public function remove() { // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); $model = $this->getModel('templates'); // Save the data $model->remove(); // Redirect back to the export page $this->setRedirect(JRoute::_('index.php?option=com_csvi&view=process', false)); } /** * Import is all finished, show the results page * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function finished() { // Create the view object $view = $this->getView('process', 'result'); // Standard model $view->setModel( $this->getModel( 'process', 'CsviModel' ), true ); // Log functions $view->setModel( $this->getModel( 'log', 'CsviModel' )); // Set the layout file $view->setLayout('import_result'); // Now display the view $view->display(); } /** * Cancel a running import * * @copyright * @author RolandD * @todo Figure out the session vars * @see * @access public * @param * @return * @since 3.0 */ public function cancelImport() { $jinput = JFactory::getApplication()->input; if ($jinput->get('was_preview', false, 'bool')) { $this->setRedirect('index.php?option=com_csvi&view=import', JText::_('COM_CSVI_IMPORT_CANCELLED'), 'notice'); } else { // Load the data from the session $session = JFactory::getSession(); $option = $jinput->get('option'); // The template require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/template.php'); $template = unserialize($session->get($option.'.global.template')); $csvilog = unserialize($session->get($option.'.csvilog')); if (is_object($template)) { // Enable the session $jinput->set('importsession', true); // Set the template $jinput->set('template', $template); // The logger $jinput->set('csvilog', $csvilog); // Set the file handler $jinput->set('csvifile', unserialize($session->get($option.'.csvifile'))); // Load the total line counter $jinput->set('totalline', unserialize($session->get($option.'.totalline'))); // Load the total of records processed $jinput->set('recordsprocessed', unserialize($session->get($option.'.recordsprocessed'))); // Load the field settings $jinput->set('csvifields', unserialize($session->get($option.'.csvifields'))); // Load the column headers $jinput->set('columnheaders', unserialize($session->get($option.'.csvicolumnheaders'))); // Load the preview handler $jinput->set('csvipreview', unserialize($session->get($option.'.csvipreview'))); // Finish the process $model = $this->getModel('importfile'); $model->finishProcess(true); // Store the import as cancelled $db = JFactory::getDbo(); // Get the records processed $query = $db->getQuery(true); $query->select('COUNT(id) AS records'); $query->from('#__csvi_log_details'); $query->where('log_id = '.$csvilog->getLogId()); $db->setQuery($query); $records = $db->loadResult(); // Store the data $query = $db->getQuery(true); $query->update('#__csvi_logs'); $query->set('records = '.$records); $query->set('run_cancelled = 1'); $query->where('run_id = '.$csvilog->getId()); $db->setQuery($query); $db->query(); // Return to the import result screen $this->setRedirect('index.php?option=com_csvi&task=process.finished&run_id='.$csvilog->getId(), JText::_('COM_CSVI_IMPORT_CANCELLED'), 'notice'); } else { // Return to the import result screen $this->setRedirect('index.php?option=com_csvi&view=process', JText::_('COM_CSVI_IMPORT_CANCELLED'), 'notice'); } } } } ?> PK>\)controllers/.htaccessnuW+A Order allow,deny Deny from all PK>\`controllers/availablefields.phpnuW+A PK>\R·controllers/replacements.phpnuW+A true)); return $model; } } ?> PK>\-c  controllers/about.phpnuW+A\0 __controllers/settings.phpnuW+AgetModel('settings'); if ($model->getResetSettings()) { $msg = JText::_('COM_CSVI_SETTINGS_RESET_SUCCESSFULLY'); $msgtype = ''; } else { $msg = JText::_('COM_CSVI_SETTINGS_NOT_RESET_SUCCESSFULLY'); $msgtype = 'error'; } $this->setRedirect('index.php?option=com_csvi&view=settings', $msg, $msgtype); } } ?> PK>\controllers/index.htmlnuW+APK>\!Pήcontrollers/cron.phpnuW+Ainput; $data = $jinput->post->get('jform', array(), 'array'); $jinput->set('com_csvi.data', $data); // Create the view object $view = $this->getView('cron', 'html'); // Standard model $view->setModel( $this->getModel( 'cron', 'CsviModel' ), true ); // Now display the view $view->display(); } } ?> PK>\VWWcontrollers/csvi.phpnuW+A PK>\K] controllers/exportfile.phpnuW+Ainput; $view = $this->getView('exportfile', 'html'); // Default model $view->setModel( $this->getModel('exportfile', 'CsviModel' ), true ); // Log functions $view->setModel( $this->getModel('log', 'CsviModel' )); // Settings functions $view->setModel( $this->getModel('settings', 'CsviModel' )); // General import functions $view->setModel( $this->getModel('export', 'CsviModel' )); // General category functions $view->setModel( $this->getModel('category', 'CsviModel' )); // Available fields $view->setModel( $this->getModel('availablefields', 'CsviModel' )); // Load the model $model = $this->getModel('exportfile'); // Add extra helper paths $view->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/xml'); $view->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/html'); // Load the helper classes $view->loadHelper('csvidb'); $view->loadHelper('template'); $view->loadHelper('csvisef'); // Prepare for export if ($model->getPrepareExport()) { // Set the export override $app = JFactory::getApplication(); $template = $jinput->get('template', null, null); $overridefile = JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/export/'.$template->get('operation', 'options').'.php'; // Add the export model path if override exists if (file_exists($overridefile)) $this->addModelPath(JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/'.$template->get('component', 'options').'/export'); else $this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR.'/models/'.$template->get('component', 'options').'/export'); // Load export specifc helper $view->loadHelper($template->get('component', 'options')); $view->loadHelper($template->get('component', 'options').'_config'); // Start the export $view->display(); } else { // Clean up first $model->getCleanSession(); // Redirect back to the export page $this->setRedirect('index.php?option=com_csvi&view=process', JText::_('COM_CSVI_ERROR_EXPORT_PREP'), 'error'); } } } ?>PK>\}i@@controllers/replacement.phpnuW+A false)); return $model; } } ?>PK>\D\, , controllers/importfile.phpnuW+A importFile * 2. models/importfile.php -> prepareImport (sets session values) * 3. views/importfile/view.html.php -> display * 4. views/importfile/tmpl/default.php JS calls import * 5. controllers/importfile.json.php -> doImport * 6. models/importfile.php -> getDoImport (sets session values) * 7. views/importfile/view.json.php -> return result * * @package CSVI */ class CsviControllerImportfile extends JController { /** * Load import model files * * Here the models are loaded that are used for import. Special is the * import model file as this is included based on the template type * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 3.0 */ public function process() { $jinput = JFactory::getApplication()->input; // Load the import type $vtype = ($jinput->get('cron', false, 'bool')) ? 'cron' : 'html'; if ($vtype == 'html') { // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); } // Set the start time of the import $session = JFactory::getSession(); $option = $jinput->get('option'); $session->set($option.'.runtime', time()); // Start with a clean session $session->set($option.'.select_template', serialize($jinput->get('select_template', 0, 'int'))); $session->set($option.'.global.template', serialize('0')); $session->set($option.'.csvicolumnheaders', serialize('0')); $session->set($option.'.csvifields', serialize('0')); $session->set($option.'.csvifile', serialize('0')); $session->set($option.'.csvilog', serialize('0')); $session->set($option.'.filepos', serialize('0')); $session->set($option.'.recordsprocessed', serialize('0')); $session->set($option.'.totalline', serialize('0')); $model = $this->getModel('templates'); // Create the view object $view = $this->getView('importfile', $vtype); // Load the model $view->setModel( $this->getModel( 'importfile', 'CsviModel' ), true ); // Log functions $view->setModel( $this->getModel( 'log', 'CsviModel' )); // Load the model $model = $this->getModel('importfile'); // Check which helper files to include $helper_files = $model->getHelperFiles(); if (!$helper_files) { if (!JRequest::getBool('cron', false)) { // Redirect back to the import page $this->setRedirect('index.php?option=com_csvi&view=process', JText::_('COM_CSVI_ERROR_IMPORT_FILE'), 'error'); } else { echo JText::_('COM_CSVI_ERROR_IMPORT_FILE')."\n"; $view->setLayout('cron'); } } else { // Load helper files $view->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/import'); $view->loadHelper('file'); $view->loadHelper('template'); if (!empty($helper_files)) { foreach ($helper_files as $helper) { $view->loadHelper($helper); } } // Prepare for import if ($model->getPrepareImport()) { // Start the import switch ($vtype) { case 'cron': $view->setLayout('cron'); return true; break; default: break; } // Show the screen $view->display(); } else { // Clean up $model->getCleanSession(); switch ($vtype) { case 'cron': $jinput->set('error', true); $view->setLayout('cron'); $view->display(); break; default: // Redirect back to the import page $this->setRedirect('index.php?option=com_csvi&view=process', JText::_('COM_CSVI_ERROR_IMPORT_FILE'), 'error'); break; } } } } /** * Import records called via JavaScript * * @copyright * @author RolandD * @todo remove global from session vars * @todo * @see prepareImport (models/importfile) where the session data is set * @see _finishProcess (models/importfile) where the session data is unset * @access public * @param * @return * @since 3.0 */ public function doImport() { // Process first $this->process(); // Start the import $jinput = JFactory::getApplication()->input; // Create the view object $vtype = ($jinput->get('cron', false, 'bool')) ? 'cron' : 'json'; $view = $this->getView('importfile', $vtype); // Load the data from the session $session = JFactory::getSession(); $option = $jinput->get('option'); // Set the run ID $jinput->set('run_id', $session->get($option.'.run_id')); // Check which helper files to include $helper_files = unserialize($session->get($option.'.helper_files')); // Load helper files $view->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/import'); $view->loadHelper('file'); $view->loadHelper('template'); $view->loadHelper('icecat'); $view->loadHelper('settings'); if (!empty($helper_files)) { foreach ($helper_files as $helper) { $view->loadHelper($helper); } } // The template $template = unserialize($session->get($option.'.global.template')); if (is_object($template)) { // Enable the session $jinput->set('importsession', true); // Set the template $jinput->set('template', $template); // The logger $jinput->set('csvilog', unserialize($session->get($option.'.csvilog'))); // Set the file handler $jinput->set('csvifile', unserialize($session->get($option.'.csvifile'))); // Load the total line counter $jinput->set('totalline', unserialize($session->get($option.'.totalline'))); // Load the total of records processed $jinput->set('recordsprocessed', unserialize($session->get($option.'.recordsprocessed'))); // Set the fields found in the import file $jinput->set('csvifields', unserialize($session->get($option.'.csvifields'))); // Set the list of available fields $jinput->set('avfields', unserialize($session->get($option.'.avfields'))); // Load the column headers $jinput->set('columnheaders', unserialize($session->get($option.'.csvicolumnheaders'))); // Load the preview handler $jinput->set('csvipreview', unserialize($session->get($option.'.csvipreview'))); // Set the override for the operation model if exists $app = JFactory::getApplication(); $overridefile = JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/'.$template->get('component', 'options').'/import/'.$template->get('operation', 'options').'.php'; if (file_exists($overridefile)) $this->addModelPath(JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/'.$template->get('component', 'options').'/import'); else $this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR.'/models/'.$template->get('component', 'options').'/import'); // Load the model for the component $view->setModel($this->getModel('importfile', 'CsviModel'), true); // Log functions $view->setModel($this->getModel('log', 'CsviModel')); // General category functions $view->setModel($this->getModel('category', 'CsviModel')); // Available fields $view->setModel($this->getModel('availablefields', 'CsviModel')); // Load import specifc helper $view->loadHelper($template->get('component', 'options')); $view->loadHelper($template->get('component', 'options').'_config'); // Prepare for import $view->get('DoImport'); } else { $jinput->set('importsession', false); } // Set the output screen switch ($vtype) { case 'cron': $view->setLayout('cron'); break; default: break; } // Show the screen $view->display(); } } ?> PK>\7,,controllers/install.phpnuW+A PK>\controllers/templatetypes.phpnuW+A PK>\Ӽnzzcontrollers/about.raw.phpnuW+AgetModel(); echo json_encode($model->createFolder()); } } ?> PK>\]?-"controllers/templatetypes.json.phpnuW+Ainput; $model = $this->getModel('templatetypes'); $action = $jinput->get('action'); $component = $jinput->get('component'); echo json_encode($model->loadTemplateTypes($action, $component)); } public function loadSettings() { $jinput = JFactory::getApplication()->input; $model = $this->getModel('templatetypes'); $action = $jinput->get('action'); $component = $jinput->get('component'); $operation = $jinput->get('operation'); echo $model->loadSettings($action, $component, $operation); } } ?> PK>\+}mmcontrollers/importfile.json.phpnuW+A importFile * 2. models/importfile.php -> prepareImport (sets session values) * 3. views/importfile/view.html.php -> display * 4. views/importfile/tmpl/default.php JS calls import * 5. controllers/importfile.php -> doImport * 6. models/importfile.php -> getDoImport (sets session values) * 7. views/importfile/view.json.php -> return result * * @package CSVI */ class CsviControllerImportfile extends JController { /** * Import records called via JavaScript * * @copyright * @author RolandD * @todo remove global from session vars * @todo * @see prepareImport (models/importfile) where the session data is set * @see _finishProcess (models/importfile) where the session data is unset * @access public * @param * @return * @since 3.0 */ public function doImport() { $jinput = JFactory::getApplication()->input; // Create the view object $vtype = ($jinput->get('cron', false, 'bool')) ? 'cron' : 'json'; $view = $this->getView('importfile', $vtype); // Load the data from the session $session = JFactory::getSession(); $option = $jinput->get('option'); // Set the run ID $jinput->set('run_id', $session->get($option.'.run_id')); // Check which helper files to include $helper_files = unserialize($session->get($option.'.helper_files')); // Load helper files $view->addHelperPath(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/file/import'); $view->loadHelper('file'); $view->loadHelper('template'); $view->loadHelper('icecat'); $view->loadHelper('settings'); if (!empty($helper_files)) { foreach ($helper_files as $helper) { $view->loadHelper($helper); } } // The template $template = unserialize($session->get($option.'.global.template')); if (is_object($template)) { // Enable the session $jinput->set('importsession', true); // Set the template $jinput->set('template', $template); // The logger $jinput->set('csvilog', unserialize($session->get($option.'.csvilog'))); // Set the file handler $jinput->set('csvifile', unserialize($session->get($option.'.csvifile'))); // Load the total line counter $jinput->set('totalline', unserialize($session->get($option.'.totalline'))); // Load the total of records processed $jinput->set('recordsprocessed', unserialize($session->get($option.'.recordsprocessed'))); // Set the fields found in the import file $jinput->set('csvifields', unserialize($session->get($option.'.csvifields'))); // Set the list of available fields $jinput->set('avfields', unserialize($session->get($option.'.avfields'))); // Load the column headers $jinput->set('columnheaders', unserialize($session->get($option.'.csvicolumnheaders'))); // Load the preview handler $jinput->set('csvipreview', unserialize($session->get($option.'.csvipreview'))); // Set the override for the operation model if exists $app = JFactory::getApplication(); $overridefile = JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/'.$template->get('component', 'options').'/import/'.$template->get('operation', 'options').'.php'; if (file_exists($overridefile)) $this->addModelPath(JPATH_BASE.'/templates/'.$app->getTemplate().'/html/com_csvi/models/'.$template->get('component', 'options').'/import'); else $this->addModelPath(JPATH_COMPONENT_ADMINISTRATOR.'/models/'.$template->get('component', 'options').'/import'); // Load the model for the component $view->setModel($this->getModel('importfile', 'CsviModel'), true); // Log functions $view->setModel($this->getModel('log', 'CsviModel')); // General category functions $view->setModel($this->getModel('category', 'CsviModel')); // Available fields $view->setModel($this->getModel('availablefields', 'CsviModel')); // Load import specifc helper $view->loadHelper($template->get('component', 'options')); $view->loadHelper($template->get('component', 'options').'_config'); // Prepare for import $view->get('DoImport'); } else { $jinput->set('importsession', false); } // Set the output screen switch ($vtype) { case 'cron': $view->setLayout('cron'); break; default: break; } // Show the screen $view->display(); } } ?> PK>\bcontrollers/process.json.phpnuW+Ainput; // Load the appropiate helper file $component = $jinput->get('component'); $users = array(); if ($component) { require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/'.$component.'.php'); $helper = new $component; $users = $helper->getOrderUser(); } echo json_encode($users); } /** * Method Description * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string json encoded values * @since 4.0 */ public function getProduct() { $jinput = JFactory::getApplication()->input; // Load the appropiate helper file $component = $jinput->get('component'); $users = array(); if ($component) { require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/'.$component.'.php'); $helper = new $component; $products = $helper->getOrderProduct(); } echo json_encode($products); } /** * Method Description * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string json encoded values * @since 4.0 */ public function getItemProduct() { $jinput = JFactory::getApplication()->input; // Load the appropiate helper file $component = $jinput->get('component'); $users = array(); if ($component) { require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/'.$component.'.php'); $helper = new $component; $products = $helper->getOrderItemProduct(); } echo json_encode($products); } /** * Load the available sites for XML or HTML export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function loadSites() { $jinput = JFactory::getApplication()->input; $model = $this->getModel('process'); $options = array(); $options[] = JHtml::_('select.option', '', JText::_('COM_CSVI_CHOOSE_WEBSITE')); $sites = $model->getExportSites($jinput->get('exportsite')); foreach ($sites as $site) { $options[] = JHtml::_('select.option', $site, JText::_('COM_CSVI_'.strtoupper($site))); } echo json_encode(JHtml::_('select.genericlist', $options, 'jform[general][export_site]', null, 'value', 'text', $jinput->get('selected'), 'jform_general_export_site')); } /** * Load fields for the custom import/export * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return * @since 4.0 */ public function loadFields() { $jinput = JFactory::getApplication()->input; $availablefields_model = $this->getModel('availablefields'); $result = $availablefields_model->getAvailableFields($jinput->get('template_type'), $jinput->get('component', 'com_csvi'), 'array', $jinput->get('table_name', '', 'word')); echo json_encode($result); } /** * Load the category tree * * @copyright * @author RolandD * @todo * @see * @access public * @param * @return string json encoded values * @since 4.0 */ public function loadCategoryTree() { $jinput = JFactory::getApplication()->input; $helper = new Com_VirtueMart(); $options = $helper->getCategoryTree($jinput->get('language')); echo json_encode($options); } /* TO BE FIGURED OUT */ public function loadTables() { $result = CsviHelper::getCustomTables(); array_unshift($result, JText::_('COM_CSVI_SELECT_TABLE_FOR_EXPORT')); echo json_encode($result); } public function getStates() { $model = $this->getModel('import'); $options = array(); $options[] = JHtml::_('select.option', 'none', JText::_('COM_CSVI_ALL_TAX_STATES')); $states = array_merge($options, $model->getStates(JRequest::getCmd('country'))); echo json_encode(JHtml::_('select.genericlist', $states, 'jform[tax][states][]', 'multiple="multiple" size="7"', 'value', 'text', 'none')); } } ?> PK>\csvi.phpnuW+Aauthorise('core.manage', 'com_csvi')) { return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); } require_once JPATH_COMPONENT_ADMINISTRATOR.'/liveupdate/liveupdate.php'; if(JRequest::getCmd('view','') == 'liveupdate') { LiveUpdate::handleRequest(); return; } // Define our version number define('CSVI_VERSION', '5.15'); // Make sure the Joomla default language is always loaded $jlang = JFactory::getLanguage(); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, 'en-GB', true); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, $jlang->getDefault(), true); $jlang->load('com_csvi', JPATH_ADMINISTRATOR, null, true); // Get the input object $jinput = JFactory::getApplication()->input; // Load the logger require_once (JPATH_COMPONENT_ADMINISTRATOR.'/helpers/log.php'); // Load the general helper require_once (JPATH_COMPONENT_ADMINISTRATOR.'/helpers/csvi.php'); // Load a specific helper if available $filename = JPATH_COMPONENT_ADMINISTRATOR.'/helpers/'.$jinput->get('component').'.php'; if (file_exists($filename)) require_once($filename); // Get the database object $db = JFactory::getDbo(); // Define the tmp folder $config = JFactory::getConfig(); $tmp_path = $config->getValue('config.tmp_path'); if (!defined('CSVIPATH_TMP')) define('CSVIPATH_TMP', JPath::clean($tmp_path.'/com_csvi', '/')); if (!defined('CSVIPATH_DEBUG')) define('CSVIPATH_DEBUG', JPath::clean($tmp_path.'/com_csvi/debug', '/')); // Set the global settings require_once(JPATH_COMPONENT_ADMINISTRATOR.'/helpers/settings.php'); $settings = new CsviSettings(); $jinput->set('settings', $settings); // Start preparing if ($jinput->get('cron', false, 'bool')) { // Override preview in cron mode $jinput->set('was_preview', true); } else { // Not doing cron, so set it to false $jinput->set('cron', false); // Add stylesheets $document = JFactory::getDocument(); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/images.css'); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/display.css'); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/tables.css'); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/jquery.alerts.css'); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/jquery-ui.css'); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/jquery-csvi.css'); // Add javascript $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/jquery.js'); $document->addScriptDeclaration('jQuery.noConflict();'); $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/jquery.alerts.js'); $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/jquery.timers.js'); $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/jquery-ui.js'); $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/jquery.tablednd_0_5.js'); $document->addScript(JURI::root().'administrator/components/com_csvi/assets/js/csvi.js'); JHtml::_('behavior.modal'); // Add language strings to JavaScript // About view JText::script('COM_CSVI_ERROR_CREATING_FOLDER'); // Maintenance view JText::script('COM_CSVI_CONFIRM_DB_DELETE'); JText::script('COM_CSVI_CONFIRM_CSVITABLES_DELETE'); JText::script('COM_CSVI_CHOOSE_RESTORE_FILE_LABEL'); JText::script('COM_CSVI_CHOOSE_BACKUP_LOCATION_LABEL'); JText::script('COM_CSVI_EMPTYDATABASE_LABEL'); JText::script('COM_CSVI_ERROR_PROCESSING_RECORDS'); // Process JText::script('COM_CSVI_ERROR_DURING_PROCESS'); JText::script('COM_CSVI_CHOOSE_TEMPLATE_FIELD'); JText::script('COM_CSVI_ALERT'); // Install JText::script('COM_CSVI_ERROR_DURING_INSTALL'); } // Include dependancies jimport('joomla.application.component.controller'); // Create the controller $controller = JController::getInstance('csvi'); $controller->execute($jinput->get('task')); $controller->redirect(); ?>PK>\UC  csvi.xmlnuW+A CSVI 1 december 2013 RolandD Cyber Produksi contact@csvimproved.com http://www.csvimproved.com/ Copyright (C) 2006 - 2013 RolandD Cyber Produksi. All rights reserved. GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html 5.15 COM_CSVI_XML_DESCRIPTION csvi.php controllers models views script.php en-GB/en-GB.com_csvi.ini sql/install/mysql/install.mysql.utf8.sql sql/updates/mysql COM_CSVI COM_CSVI_DASHBOARD COM_CSVI_PROCESS COM_CSVI_REPLACEMENTS COM_CSVI_LOG COM_CSVI_MAINTENANCE COM_CSVI_AVAILABLEFIELDS COM_CSVI_SETTINGS COM_CSVI_TEMPLATETYPES COM_CSVI_ABOUT changelog.txt config.xml csvi.php controller.php index.html assets controllers helpers install liveupdate models sql tables views en-GB/en-GB.com_csvi.ini en-GB/en-GB.com_csvi.sys.ini http://www.csvimproved.com/csvi.xml PK>\ ffsql/updates/mysql/4.1.sqlnuW+AALTER TABLE `#__csvi_replacements` ADD COLUMN `multivalue` ENUM('0','1') NOT NULL AFTER `replacetext`;PK>\SFsql/updates/mysql/5.11.sqlnuW+ACREATE TABLE IF NOT EXISTS `#__csvi_mapheaders` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `map_id` INT(10) NOT NULL, `csvheader` VARCHAR(100) NOT NULL, `templateheader` VARCHAR(100) NOT NULL, PRIMARY KEY (`id`) ) COMMENT='Contains the mapped fields'; CREATE TABLE IF NOT EXISTS `#__csvi_maps` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NULL DEFAULT NULL, `mapfile` VARCHAR(100) NULL DEFAULT NULL, `action` VARCHAR(100) NULL DEFAULT NULL, `component` VARCHAR(100) NULL DEFAULT NULL, `operation` VARCHAR(100) NULL DEFAULT NULL, `checked_out` INT(10) NULL DEFAULT NULL, `checked_out_time` DATETIME NULL DEFAULT NULL, PRIMARY KEY (`id`) ) COMMENT='Holds map configurations'; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the template field', `template_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'The template ID', `ordering` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'The order of the field', `field_name` varchar(255) NOT NULL COMMENT 'Name for the field', `column_header` varchar(255) NOT NULL DEFAULT '' COMMENT 'Header for the column', `default_value` varchar(255) NOT NULL DEFAULT '' COMMENT 'Default value for the field', `process` enum('0','1') NOT NULL DEFAULT '1' COMMENT 'Process the field', `combine` ENUM('0','1') NOT NULL DEFAULT '0' COMMENT 'Combine the field', `sort` enum('0','1') NOT NULL DEFAULT '0' COMMENT 'Sort the field', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds the fields for a CSVI template'; CREATE TABLE IF NOT EXISTS `#__csvi_related_categories` ( `product_sku` VARCHAR(64) NOT NULL, `related_cat` TEXT NOT NULL ) COMMENT='Related categories import for CSVI'; ALTER TABLE `#__csvi_replacements` ADD COLUMN `ordering` INT(11) NOT NULL DEFAULT '0' AFTER `method`; ALTER TABLE `#__csvi_template_fields` ADD COLUMN `file_field_name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Name for the field from the file' AFTER `field_name`; ALTER TABLE `#__csvi_template_fields` ADD COLUMN `template_field_name` VARCHAR(255) NOT NULL DEFAULT '' COMMENT 'Name for the field from the template' AFTER `file_field_name`; ALTER TABLE `#__csvi_template_fields` ADD COLUMN `cdata` ENUM('0','1') NOT NULL DEFAULT '1' COMMENT 'Use the CDATA tag' AFTER `sort`; ALTER TABLE `#__csvi_template_fields` ADD COLUMN `combine_char` VARCHAR(5) NOT NULL DEFAULT '' COMMENT 'The character(s) to combine the fields' AFTER `combine`; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields_combine` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the cross reference', `field_id` VARCHAR(255) NOT NULL COMMENT 'ID of the field', `combine_id` VARCHAR(255) NOT NULL COMMENT 'ID of the field to combine', PRIMARY KEY (`id`) ) COMMENT='Holds the replacement cross reference for a CSVI template field'; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields_replacement` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the cross reference', `field_id` VARCHAR(255) NOT NULL COMMENT 'ID of the field', `replace_id` VARCHAR(255) NOT NULL COMMENT 'ID of the replacement rule', PRIMARY KEY (`id`) ) COMMENT='Holds the replacement cross reference for a CSVI template field'; CREATE TABLE IF NOT EXISTS `#__csvi_template_settings` ( `id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the saved setting', `name` VARCHAR(255) NOT NULL COMMENT 'Name for the saved setting', `settings` TEXT NOT NULL COMMENT 'The actual settings', `process` ENUM('import','export') NOT NULL DEFAULT 'import' COMMENT 'The type of template', PRIMARY KEY (`id`) ) COMMENT='Stores the template settings for CSVI'; ALTER TABLE `#__csvi_template_types` ADD COLUMN `published` TINYINT(1) NOT NULL DEFAULT '1' AFTER `options`, ADD COLUMN `ordering` INT(11) NULL DEFAULT NULL AFTER `published`; ALTER TABLE `#__csvi_template_settings` ADD COLUMN `process` ENUM('import','export') NOT NULL DEFAULT 'import' COMMENT 'The type of template' AFTER `settings`;PK>\sql/updates/mysql/4.5.1.sqlnuW+APK>\sql/updates/mysql/4.4.sqlnuW+APK>\)sql/updates/mysql/.htaccessnuW+A Order allow,deny Deny from all PK>\)sql/updates/.htaccessnuW+A Order allow,deny Deny from all PK>\)sql/install/.htaccessnuW+A Order allow,deny Deny from all PK>\)sql/install/mysql/.htaccessnuW+A Order allow,deny Deny from all PK>\o>:":"(sql/install/mysql/install.mysql.utf8.sqlnuW+ACREATE TABLE IF NOT EXISTS `#__csvi_available_fields` ( `id` int(11) NOT NULL AUTO_INCREMENT, `csvi_name` varchar(255) NOT NULL, `component_name` varchar(55) NOT NULL, `component_table` varchar(55) NOT NULL, `component` varchar(55) NOT NULL, `isprimary` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `component_name_table` (`component_name`,`component_table`,`component`) ) CHARSET=utf8 COMMENT='Available fields for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_currency` ( `currency_id` tinyint(4) NOT NULL AUTO_INCREMENT, `currency_code` varchar(3) DEFAULT NULL, `currency_rate` varchar(55) DEFAULT NULL, PRIMARY KEY (`currency_id`), UNIQUE KEY `currency_code` (`currency_code`) ) CHARSET=utf8 COMMENT='Curriencies and exchange rates for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_icecat_index` ( `path` varchar(100) DEFAULT NULL, `product_id` int(2) DEFAULT NULL, `updated` int(14) DEFAULT NULL, `quality` varchar(6) DEFAULT NULL, `supplier_id` int(1) DEFAULT NULL, `prod_id` varchar(16) DEFAULT NULL, `catid` int(3) DEFAULT NULL, `m_prod_id` varchar(10) DEFAULT NULL, `ean_upc` varchar(10) DEFAULT NULL, `on_market` int(1) DEFAULT NULL, `country_market` varchar(10) DEFAULT NULL, `model_name` varchar(26) DEFAULT NULL, `product_view` int(5) DEFAULT NULL, `high_pic` varchar(51) DEFAULT NULL, `high_pic_size` int(5) DEFAULT NULL, `high_pic_width` int(3) DEFAULT NULL, `high_pic_height` int(3) DEFAULT NULL, `m_supplier_id` int(3) DEFAULT NULL, `m_supplier_name` varchar(51) DEFAULT NULL, KEY `product_mpn` (`prod_id`), KEY `manufacturer_name` (`supplier_id`) ) CHARSET=utf8 COMMENT='ICEcat index data for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_icecat_suppliers` ( `supplier_id` int(11) unsigned NOT NULL, `supplier_name` varchar(255) NOT NULL, UNIQUE KEY `Unique supplier` (`supplier_id`,`supplier_name`), KEY `Supplier name` (`supplier_name`) ) CHARSET=utf8 COMMENT='ICEcat supplier data for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_logs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `userid` int(11) NOT NULL, `logstamp` datetime NOT NULL, `action` varchar(255) NOT NULL, `action_type` varchar(255) NOT NULL DEFAULT '', `template_name` varchar(255) DEFAULT NULL, `records` int(11) NOT NULL, `run_id` int(11) DEFAULT NULL, `file_name` varchar(255) DEFAULT NULL, `run_cancelled` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Log results for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_log_details` ( `id` int(11) NOT NULL AUTO_INCREMENT, `log_id` int(11) NOT NULL, `line` int(11) NOT NULL, `description` text NOT NULL, `result` varchar(45) NOT NULL, `status` varchar(45) NOT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Log details for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_related_products` ( `product_sku` varchar(64) NOT NULL, `related_sku` text NOT NULL ) CHARSET=utf8 COMMENT='Related products import for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_related_categories` ( `product_sku` varchar(64) NOT NULL, `related_cat` text NOT NULL ) CHARSET=utf8 COMMENT='Related categories import for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_replacements` ( `id` int(10) NOT NULL AUTO_INCREMENT, `name` varchar(100) NOT NULL, `findtext` text NOT NULL, `replacetext` text NOT NULL, `multivalue` enum('0','1') NOT NULL, `method` enum('text','regex') NOT NULL DEFAULT 'text', `ordering` int(11) NOT NULL DEFAULT '0', `checked_out` int(11) unsigned DEFAULT '0', `checked_out_time` datetime DEFAULT '0000-00-00 00:00:00', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Replacement rules for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_settings` ( `id` int(11) NOT NULL AUTO_INCREMENT, `params` text NOT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Configuration values for CSVI'; INSERT IGNORE INTO `#__csvi_settings` VALUES (1, ''); INSERT IGNORE INTO `#__csvi_settings` VALUES (2, ''); CREATE TABLE IF NOT EXISTS `#__csvi_template_fields` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the template field', `template_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'The template ID', `ordering` int(11) unsigned NOT NULL DEFAULT '0' COMMENT 'The order of the field', `field_name` varchar(255) NOT NULL COMMENT 'Name for the field', `file_field_name` varchar(255) NOT NULL COMMENT 'Name for the field from the file', `template_field_name` varchar(255) NOT NULL DEFAULT '' COMMENT 'Name for the field from the template', `column_header` varchar(255) NOT NULL DEFAULT '' COMMENT 'Header for the column', `default_value` varchar(255) NOT NULL DEFAULT '' COMMENT 'Default value for the field', `process` enum('0','1') NOT NULL DEFAULT '1' COMMENT 'Process the field', `combine` ENUM('0','1') NOT NULL DEFAULT '0' COMMENT 'Combine the field', `combine_char` varchar(5) NOT NULL DEFAULT '' COMMENT 'The character(s) to combine the fields', `sort` enum('0','1') NOT NULL DEFAULT '0' COMMENT 'Sort the field', `cdata` enum('0','1') NOT NULL DEFAULT '1' COMMENT 'Use the CDATA tag', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds the fields for a CSVI template'; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields_combine` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the cross reference', `field_id` varchar(255) NOT NULL COMMENT 'ID of the field', `combine_id` varchar(255) NOT NULL COMMENT 'ID of the combine rule', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds the combine cross reference for a CSVI template field'; CREATE TABLE IF NOT EXISTS `#__csvi_template_fields_replacement` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the cross reference', `field_id` varchar(255) NOT NULL COMMENT 'ID of the field', `replace_id` varchar(255) NOT NULL COMMENT 'ID of the replacement rule', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds the replacement cross reference for a CSVI template field'; CREATE TABLE IF NOT EXISTS `#__csvi_template_settings` ( `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID for the saved setting', `name` varchar(255) NOT NULL COMMENT 'Name for the saved setting', `settings` text NOT NULL COMMENT 'The actual settings', `process` enum('import','export') NOT NULL DEFAULT 'import' COMMENT 'The type of template', PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Stores the template settings for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_tables` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `checked_out` int(10) unsigned NOT NULL DEFAULT '0', `checked_out_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `template_type_name` varchar(55) NOT NULL, `template_table` varchar(55) NOT NULL, `component` varchar(55) NOT NULL, `indexed` int(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `type_name` (`template_type_name`,`template_table`,`component`) ) CHARSET=utf8 COMMENT='Template tables used per template type for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_template_types` ( `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT, `checked_out` INT(10) UNSIGNED NOT NULL DEFAULT '0', `checked_out_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', `template_type_name` VARCHAR(55) NOT NULL, `template_type` VARCHAR(55) NOT NULL, `component` VARCHAR(55) NOT NULL COMMENT 'Name of the component', `url` VARCHAR(100) NULL DEFAULT NULL COMMENT 'The URL of the page the import is for', `options` VARCHAR(255) NOT NULL DEFAULT 'fields' COMMENT 'The template pages to show for the template type', `published` TINYINT(1) NOT NULL DEFAULT '1', `ordering` INT(11) NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `type_name` (`template_type_name`,`template_type`,`component`) ) CHARSET=utf8 COMMENT='Template types for CSVI'; CREATE TABLE IF NOT EXISTS `#__csvi_maps` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `name` VARCHAR(100) NULL DEFAULT NULL, `mapfile` VARCHAR(100) NULL DEFAULT NULL, `action` VARCHAR(100) NULL DEFAULT NULL, `component` VARCHAR(100) NULL DEFAULT NULL, `operation` VARCHAR(100) NULL DEFAULT NULL, `checked_out` INT(10) NULL DEFAULT NULL, `checked_out_time` DATETIME NULL DEFAULT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds map configurations'; CREATE TABLE IF NOT EXISTS `#__csvi_mapheaders` ( `id` INT(10) NOT NULL AUTO_INCREMENT, `map_id` INT(10) NOT NULL, `csvheader` VARCHAR(100) NOT NULL, `templateheader` VARCHAR(100) NOT NULL, PRIMARY KEY (`id`) ) CHARSET=utf8 COMMENT='Holds map field mapping'; PK>\) sql/.htaccessnuW+A Order allow,deny Deny from all PK>\)liveupdate/.htaccessnuW+A Order allow,deny Deny from all PK>\bS liveupdate/classes/inihelper.phpnuW+A */ defined('_JEXEC') or die(); /** * A smart INI file parser with reproducible behaviour among different PHP versions */ class LiveUpdateINIHelper { /** * Parse an INI file and return an associative array. Since PHP versions before * 5.1 are bitches with regards to INI parsing, I use a PHP-only solution to * overcome this obstacle. * @param string $file The file to process * @param bool $process_sections True to also process INI sections * @return array An associative array of sections, keys and values */ public static function parse_ini_file( $file, $process_sections, $rawdata = false ) { if($rawdata) { return self::parse_ini_file_php($file, $process_sections, $rawdata); } else { if( version_compare(PHP_VERSION, '5.1.0', '>=') && (!$rawdata) ) { if( function_exists('parse_ini_file') ) { return parse_ini_file($file, $process_sections); } else { return self::parse_ini_file_php($file, $process_sections); } } else { return self::parse_ini_file_php($file, $process_sections, $rawdata); } } } /** * A PHP based INI file parser. * Thanks to asohn ~at~ aircanopy ~dot~ net for posting this handy function on * the parse_ini_file page on http://gr.php.net/parse_ini_file * @param string $file Filename to process * @param bool $process_sections True to also process INI sections * @param bool $rawdata If true, the $file contains raw INI data, not a filename * @return array An associative array of sections, keys and values */ static function parse_ini_file_php($file, $process_sections = false, $rawdata = false) { $process_sections = ($process_sections !== true) ? false : true; if(!$rawdata) { $ini = file($file); } else { $file = str_replace("\r","",$file); $ini = explode("\n", $file); } if (count($ini) == 0) {return array();} $sections = array(); $values = array(); $result = array(); $globals = array(); $i = 0; foreach ($ini as $line) { $line = trim($line); $line = str_replace("\t", " ", $line); // Comments if (!preg_match('/^[a-zA-Z0-9[]/', $line)) {continue;} // Sections if ($line{0} == '[') { $tmp = explode(']', $line); $sections[] = trim(substr($tmp[0], 1)); $i++; continue; } // Key-value pair list($key, $value) = explode('=', $line, 2); $key = trim($key); $value = trim($value); if (strstr($value, ";")) { $tmp = explode(';', $value); if (count($tmp) == 2) { if ((($value{0} != '"') && ($value{0} != "'")) || preg_match('/^".*"\s*;/', $value) || preg_match('/^".*;[^"]*$/', $value) || preg_match("/^'.*'\\s*;/", $value) || preg_match("/^'.*;[^']*$/", $value) ){ $value = $tmp[0]; } } else { if ($value{0} == '"') { $value = preg_replace('/^"(.*)".*/', '$1', $value); } elseif ($value{0} == "'") { $value = preg_replace("/^'(.*)'.*/", '$1', $value); } else { $value = $tmp[0]; } } } $value = trim($value); $value = trim($value, "'\""); if ($i == 0) { if (substr($line, -1, 2) == '[]') { $globals[$key][] = $value; } else { $globals[$key] = $value; } } else { if (substr($line, -1, 2) == '[]') { $values[$i-1][$key][] = $value; } else { $values[$i-1][$key] = $value; } } } for($j = 0; $j < $i; $j++) { if ($process_sections === true) { if( isset($sections[$j]) && isset($values[$j]) ) $result[$sections[$j]] = $values[$j]; } else { if( isset($values[$j]) ) $result[] = $values[$j]; } } return $result + $globals; } }PK>\!liveupdate/classes/controller.phpnuW+A */ defined('_JEXEC') or die(); jimport('joomla.application.component.controller'); if(!class_exists('JoomlaSucksController')) { if(interface_exists('JController')) { abstract class JoomlaSucksController extends JControllerLegacy {} } else { class JoomlaSucksController extends JController {} } } /** * The Live Update MVC controller */ class LiveUpdateController extends JoomlaSucksController { /** * Object contructor * @param array $config * * @return LiveUpdateController */ public function __construct($config = array()) { parent::__construct(); $this->registerDefaultTask('overview'); } /** * Runs the overview page task */ public function overview() { $this->display(); } /** * Starts the update procedure. If the FTP credentials are required, it asks for them. */ public function startupdate() { $updateInfo = LiveUpdate::getUpdateInformation(); if($updateInfo->stability != 'stable') { $skipNag = JRequest::getBool('skipnag', false); if(!$skipNag) { $this->setRedirect('index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=nagscreen'); $this->redirect(); } } $ftp = $this->setCredentialsFromRequest('ftp'); if($ftp === true) { // The user needs to supply the FTP credentials $this->display(); } else { // No FTP credentials required; proceed with the download $this->setRedirect('index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=download'); $this->redirect(); } } /** * Download the update package */ public function download() { $ftp = $this->setCredentialsFromRequest('ftp'); $model = $this->getThisModel(); $result = $model->download(); if(!$result) { // Download failed $msg = JText::_('LIVEUPDATE_DOWNLOAD_FAILED'); $this->setRedirect('index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=overview', $msg, 'error'); } else { // Download successful. Let's extract the package. $url = 'index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=extract'; $user = JRequest::getString('username', null, 'GET', JREQUEST_ALLOWRAW); $pass = JRequest::getString('password', null, 'GET', JREQUEST_ALLOWRAW); if($user) { $url .= '&username='.urlencode($user).'&password='.urlencode($pass); } $this->setRedirect($url); } $this->redirect(); } public function extract() { $ftp = $this->setCredentialsFromRequest('ftp'); $model = $this->getThisModel(); $result = $model->extract(); if(!$result) { // Download failed $msg = JText::_('LIVEUPDATE_EXTRACT_FAILED'); $this->setRedirect('index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=overview', $msg, 'error'); } else { // Extract successful. Let's install the package. $url = 'index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=install'; $user = JRequest::getString('username', null, 'GET', JREQUEST_ALLOWRAW); $pass = JRequest::getString('password', null, 'GET', JREQUEST_ALLOWRAW); if($user) { $url .= '&username='.urlencode($user).'&password='.urlencode($pass); } // Do we have SRP installed yet? $app = JFactory::getApplication(); $jResponse = $app->triggerEvent('onSRPEnabled'); $status = false; if(!empty($jResponse)) { $status = false; foreach($jResponse as $response) { $status = $status || $response; } } // SRP enabled, use it if($status) { $return = $url; $url = $model->getSRPURL($return); if(!$url) { $url = $return; } } $this->setRedirect($url); } $this->redirect(); } public function install() { $ftp = $this->setCredentialsFromRequest('ftp'); $model = $this->getThisModel(); $result = $model->install(); if(!$result) { // Installation failed $model->cleanup(); $this->setRedirect('index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=overview'); $this->redirect(); } else { // Installation successful. Show the installation message. $cache = JFactory::getCache('mod_menu'); $cache->clean(); $this->display(); } } public function cleanup() { // Perform the cleanup $ftp = $this->setCredentialsFromRequest('ftp'); $model = $this->getThisModel(); $model->cleanup(); // Force reload update information $dummy = LiveUpdate::getUpdateInformation(true); die('OK'); } /** * Displays the current view * @param bool $cachable Ignored! */ public final function display($cachable = false, $urlparams = false) { $viewLayout = JRequest::getCmd( 'layout', 'default' ); $view = $this->getThisView(); // Get/Create the model $model = $this->getThisModel(); $view->setModel($model, true); // Assign the FTP credentials from the request, or return TRUE if they are required jimport('joomla.client.helper'); $ftp = $this->setCredentialsFromRequest('ftp'); $view->assignRef('ftp', $ftp); // Set the layout $view->setLayout($viewLayout); // Display the view $view->display(); } public final function getThisView() { static $view = null; if(is_null($view)) { $basePath = $this->basePath; $tPath = dirname(__FILE__).'/tmpl'; require_once('view.php'); $view = new LiveUpdateView(array('base_path'=>$basePath, 'template_path'=>$tPath)); } return $view; } public final function getThisModel() { static $model = null; if(is_null($model)) { require_once('model.php'); $model = new LiveUpdateModel(); $task = $this->task; $model->setState( 'task', $task ); $app = JFactory::getApplication(); $menu = $app->getMenu(); if (is_object( $menu )) { $item = $menu->getActive(); if ($item) { $params = $menu->getParams($item->id); // Set Default State Data $model->setState( 'parameters.menu', $params ); } } } return $model; } private function setCredentialsFromRequest($client) { // Determine wether FTP credentials have been passed along with the current request jimport('joomla.client.helper'); $user = JRequest::getString('username', null, 'GET', JREQUEST_ALLOWRAW); $pass = JRequest::getString('password', null, 'GET', JREQUEST_ALLOWRAW); if ($user != '' && $pass != '') { // Add credentials to the session if (JClientHelper::setCredentials($client, $user, $pass)) { $return = false; } else { $return = JError::raiseWarning('SOME_ERROR_CODE', 'JClientHelper::setCredentialsFromRequest failed'); } } else { // Just determine if the FTP input fields need to be shown $return = !JClientHelper::hasCredentials('ftp'); } return $return; } }PK>\` liveupdate/classes/view.phpnuW+A */ defined('_JEXEC') or die(); jimport('joomla.application.component.view'); if(!class_exists('JoomlaSucksView')) { if(interface_exists('JView')) { abstract class JoomlaSucksView extends JViewLegacy {} } else { class JoomlaSucksView extends JView {} } } /** * The Live Update MVC view */ class LiveUpdateView extends JoomlaSucksView { public function display($tpl = null) { // Load the CSS $config = LiveUpdateConfig::getInstance(); $this->assign('config', $config); if(!$config->addMedia()) { // No custom CSS overrides were set; include our own $document = JFactory::getDocument(); $url = JURI::base().'/components/'.JRequest::getCmd('option','').'/liveupdate/assets/liveupdate.css'; $document->addStyleSheet($url, 'text/css'); } $requeryURL = 'index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&force=1'; $this->assign('requeryURL', $requeryURL); $model = $this->getModel(); $extInfo = (object)$config->getExtensionInformation(); JToolBarHelper::title($extInfo->title.' – '.JText::_('LIVEUPDATE_TASK_OVERVIEW'),'liveupdate'); JToolBarHelper::back('JTOOLBAR_BACK', 'index.php?option='.JRequest::getCmd('option','')); switch(JRequest::getCmd('task','default')) { case 'startupdate': $this->setLayout('startupdate'); $this->assign('url','index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=download'); break; case 'install': $this->setLayout('install'); // Get data from the model $state = $this->get('State'); // Are there messages to display ? $showMessage = false; if ( is_object($state) ) { $message1 = $state->get('message'); $message2 = $state->get('extension.message'); $showMessage = ( $message1 || $message2 ); } $this->assign('showMessage', $showMessage); $this->assignRef('state', $state); break; case 'nagscreen': $this->setLayout('nagscreen'); $this->assign('updateInfo', LiveUpdate::getUpdateInformation()); $this->assign('runUpdateURL','index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=startupdate&skipnag=1'); break; case 'overview': default: $this->setLayout('overview'); $force = JRequest::getInt('force',0); $this->assign('updateInfo', LiveUpdate::getUpdateInformation($force)); $this->assign('runUpdateURL','index.php?option='.JRequest::getCmd('option','').'&view='.JRequest::getCmd('view','liveupdate').'&task=startupdate'); $needsAuth = !($config->getAuthorization()) && ($config->requiresAuthorization()); $this->assign('needsAuth', $needsAuth); break; } parent::display($tpl); } } PK>\|q%liveupdate/classes/abstractconfig.phpnuW+A */ defined('_JEXEC') or die(); /** * This is the base class inherited by the config.php file in LiveUpdate's root. * You may override it non-final members to customise its behaviour. * @author Nicholas K. Dionysopoulos * */ abstract class LiveUpdateAbstractConfig extends JObject { /** @var string The extension name, e.g. com_foobar, plg_foobar, mod_foobar, tpl_foobar etc */ protected $_extensionName = 'com_foobar'; /** @var string The human-readable name of your extension */ protected $_extensionTitle = 'Foobar Component for Joomla!'; /** * The filename of the XML manifest of your extension. Leave blank to use extensionname.xml. For example, * if the extension is com_foobar, it will look for com_foobar.xml and foobar.xml in the component's * directory. * @var string * */ protected $_xmlFilename = ''; /** @var string The information storage adapter to use. Can be 'file' or 'component' */ protected $_storageAdapter = 'file'; /** @var array The configuration options for the storage adapter used */ protected $_storageConfig = array('path' => JPATH_CACHE); /** * How to determine if a new version is available. 'different' = if the version number is different, * the remote version is newer, 'vcompare' = use version compare between the two versions, 'newest' = * compare the release dates to find the newest. I suggest using 'different' on most cases. * @var string */ protected $_versionStrategy = 'different'; /** @var The current version of your extension. Populated automatically from the XML manifest. */ protected $_currentVersion = ''; /** @var The current release date of your extension. Populated automatically from the XML manifest. */ protected $_currentReleaseDate = ''; /** @var string The URL to the INI update stream of this extension */ protected $_updateURL = ''; /** @var bool Does the download URL require authorization to download the package? */ protected $_requiresAuthorization = false; /** @var string The username to authorize a download on your site */ protected $_username = ''; /** @var string The password to authorize a download on your site */ protected $_password = ''; /** @var string The Download ID to authorize a download on your site; use it instead of the username/password pair */ protected $_downloadID = ''; /** @var string The path to a local copy of cacert.pem, required if you plan on using HTTPS URLs to fetch live udpate information or download files from */ protected $_cacerts = null; /** @var string The minimum stability level to report as available update. One of alpha, beta, rc and stable. */ protected $_minStability = 'alpha'; /** * Singleton implementation * @return LiveUpdateConfig An instance of the Live Update configuration class */ public static function &getInstance() { static $instance = null; if(!is_object($instance)) { $instance = new LiveUpdateConfig(); } return $instance; } /** * Public constructor. It populates all extension-specific fields. Override to your liking if necessary. */ public function __construct() { parent::__construct(); $this->populateExtensionInfo(); $this->populateAuthorization(); } /** * Returns the URL to the update INI stream. By default it returns the value to * the protected $_updateURL property of the class. Override with your implementation * if you want to modify its logic. */ public function getUpdateURL() { return $this->_updateURL; } /** * Override this ethod to load customized CSS and media files instead of the stock * CSS and media provided by Live Update. If you override this class it MUST return * true, otherwise LiveUpdate's CSS will be loaded after yours and will override your * settings. * * @return bool Return true to stop Live Update from loading its own CSS files. */ public function addMedia() { return false; } /** * Gets the authorization string to append to the download URL. It returns either the * download ID or username/password pair. Please override the class constructor, not * this method, if you want to fetch these values. */ public final function getAuthorization() { if(!empty($this->_downloadID)) { return "dlid=".urlencode($this->_downloadID); } if(!empty($this->_username) && !empty($this->_password)) { return "username=".urlencode($this->_username)."&password=".urlencode($this->_password); } return ""; } public final function requiresAuthorization() { return $this->_requiresAuthorization; } /** * Returns all the information we have about the extension and its update preferences * @return array The extension information */ public final function getExtensionInformation() { return array( 'name' => $this->_extensionName, 'title' => $this->_extensionTitle, 'version' => $this->_currentVersion, 'date' => $this->_currentReleaseDate, 'updateurl' => $this->_updateURL, 'requireauth' => $this->_requiresAuthorization ); } /** * Returns the information regarding the storage adapter * @return array */ public final function getStorageAdapterPreferences() { $config = $this->_storageConfig; $config['extensionName'] = $this->_extensionName; return array( 'adapter' => $this->_storageAdapter, 'config' => $config ); } public final function getVersionStrategy() { return $this->_versionStrategy; } /** * Get the current version from the XML manifest of the extension and * populate the class' properties. */ private function populateExtensionInfo() { require_once dirname(__FILE__).'/xmlslurp.php'; $xmlslurp = new LiveUpdateXMLSlurp(); $data = $xmlslurp->getInfo($this->_extensionName, $this->_xmlFilename); if(empty($this->_currentVersion)) $this->_currentVersion = $data['version']; if(empty($this->_currentReleaseDate)) $this->_currentReleaseDate = $data['date']; } /** * Fetch username/password and Download ID from the component's configuration. */ protected function populateAuthorization() { if(!$this->_requiresAuthorization) return; // Do we already have authorizaton information? if( (!empty($this->_username) && !empty($this->_password)) || !empty($this->_downloadID) ) { return; } if(substr($this->_extensionName,0,3) != 'com') return; // Not using JComponentHelper to avoid conflicts ;) $db = JFactory::getDbo(); $sql = $db->getQuery(true) ->select($db->qn('params')) ->from($db->qn('#__extensions')) ->where($db->qn('type').' = '.$db->q('component')) ->where($db->qn('element').' = '.$db->q($this->_extensionName)); $db->setQuery($sql); $rawparams = $db->loadResult(); $params = new JRegistry(); $params->loadString($rawparams, 'JSON'); $this->_username = $params->get('username',''); $this->_password = $params->get('password',''); $this->_downloadID = $params->get('downloadid',''); } public function applyCACert(&$ch) { if(!empty($this->_cacerts)) { if(file_exists($this->_cacerts)) { @curl_setopt($ch, CURLOPT_CAINFO, $this->_cacerts); } } } public function getMinimumStability() { return $this->_minStability; } } PK>\2#,,liveupdate/classes/xmlslurp.phpnuW+A */ defined('_JEXEC') or die(); class LiveUpdateXMLSlurp extends JObject { private $_info = array(); public function getInfo($extensionName, $xmlName) { if(!array_key_exists($extensionName, $this->_info)) { $this->_info[$extensionName] = $this->fetchInfo($extensionName, $xmlName); } return $this->_info[$extensionName]; } /** * Gets the version information of an extension by reading its XML file * @param string $extensionName The name of the extension, e.g. com_foobar, mod_foobar, plg_foobar or tpl_foobar. * @param string $xmlName The name of the XML manifest filename. If empty uses $extensionName.xml */ private function fetchInfo($extensionName, $xmlName) { $type = strtolower(substr($extensionName,0,3)); switch($type) { case 'com': return $this->getComponentData($extensionName, $xmlName); break; case 'mod': return $this->getModuleData($extensionName, $xmlName); break; case 'plg': return $this->getPluginData($extensionName, $xmlName); break; case 'tpl': return $this->getTemplateData($extensionName, $xmlName); break; case 'pkg': return $this->getPackageData($extensionName, $xmlName); break; case 'lib': return $this->getPackageData($extensionName, $xmlName); break; default: if(strtolower(substr($extensionName, 0, 4)) == 'file') { return $this->getPackageData($extensionName, $xmlName); } else { return array('version'=>'', 'date'=>''); } } } /** * Gets the version information of a component by reading its XML file * @param string $extensionName The name of the extension, e.g. com_foobar * @param string $xmlName The name of the XML manifest filename. If empty uses $extensionName.xml */ private function getComponentData($extensionName, $xmlName) { $extensionName = strtolower($extensionName); $path = JPATH_ADMINISTRATOR.'/components/'.$extensionName; $altExtensionName = substr($extensionName,4); jimport('joomla.filesystem.file'); if(JFile::exists("$path/$xmlName")) { $filename = "$path/$xmlName"; } elseif(JFile::exists("$path/$extensionName.xml")) { $filename = "$path/$extensionName.xml"; } elseif(JFile::exists("$path/$altExtensionName.xml")) { $filename = "$path/$altExtensionName.xml"; } elseif(JFile::exists("$path/manifest.xml")) { $filename = "$path/manifest.xml"; } else { $filename = $this->searchForManifest($path); if($filename === false) $filename = null; } if(empty($filename)) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } // Need to check for extension (since 1.6) and install (supported through 2.5) if ($xml->getName() != 'extension' && $xml->getName() != 'install') { unset($xml); return array('version' => '', 'date' => '', 'xmlfile' => ''); } $data['version'] = $xml->version ? (string) $xml->version : ''; $data['date'] = $xml->creationDate ? (string) $xml->creationDate : ''; $data['xmlfile'] = $filename; return $data; } /** * Gets the version information of a module by reading its XML file * @param string $extensionName The name of the extension, e.g. mod_foobar * @param string $xmlName The name of the XML manifest filename. If empty uses $extensionName.xml */ private function getModuleData($extensionName, $xmlName) { $extensionName = strtolower($extensionName); $altExtensionName = substr($extensionName,4); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $path = JPATH_SITE.'/modules/'.$extensionName; if(!JFolder::exists($path)) { $path = JPATH_ADMINISTRATOR.'/modules/'.$extensionName; } if(!JFolder::exists($path)) { // Joomla! 1.5 // 1. Check front-end $path = JPATH_ADMINISTRATOR.'/modules'; $filename = "$path/$xmlName"; if(!JFile::exists($filename)) { $filename = "$path/$extensionName.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$altExtensionName.xml"; } // 2. Check front-end if(!JFile::exists($filename)) { $path = JPATH_SITE.'/modules'; $filename = "$path/$xmlName"; if(!JFile::exists($filename)) { $filename = "$path/$extensionName.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$altExtensionName.xml"; } if(!JFile::exists($filename)) { return array('version' => '', 'date' => ''); } } } else { // Joomla! 1.6 $filename = "$path/$xmlName"; if(!JFile::exists($filename)) { $filename = "$path/$extensionName.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$altExtensionName.xml"; } if(!JFile::exists($filename)) { return array('version' => '', 'date' => ''); } } if(empty($filename)) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } // Need to check for extension (since 1.6) and install (supported through 2.5) if ($xml->getName() != 'extension' && $xml->getName() != 'install') { unset($xml); return array('version' => '', 'date' => '', 'xmlfile' => ''); } $data['version'] = $xml->version ? (string) $xml->version : ''; $data['date'] = $xml->creationDate ? (string) $xml->creationDate : ''; $data['xmlfile'] = $filename; return $data; } /** * Gets the version information of a plugin by reading its XML file * @param string $extensionName The name of the plugin, e.g. plg_foobar * @param string $xmlName The name of the XML manifest filename. If empty uses $extensionName.xml */ private function getPluginData($extensionName, $xmlName) { $extensionName = strtolower($extensionName); $altExtensionName = substr($extensionName,4); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $base = JPATH_PLUGINS; // Get a list of directories $stack = JFolder::folders($base,'.',true,true); foreach($stack as $path) { $filename = "$path/$xmlName"; if(JFile::exists($filename)) break; $filename = "$path/$extensionName.xml"; if(JFile::exists($filename)) break; $filename = "$path/$altExtensionName.xml"; if(JFile::exists($filename)) break; } if(!JFile::exists($filename)) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } // Need to check for extension (since 1.6) and install (supported through 2.5) if ($xml->getName() != 'extension' && $xml->getName() != 'install') { unset($xml); return array('version' => '', 'date' => '', 'xmlfile' => ''); } $data['version'] = $xml->version ? (string) $xml->version : ''; $data['date'] = $xml->creationDate ? (string) $xml->creationDate : ''; $data['xmlfile'] = $filename; return $data; } /** * Gets the version information of a template by reading its XML file * @param string $extensionName The name of the template, e.g. tpl_foobar * @param string $xmlName The name of the XML manifest filename. If empty uses $extensionName.xml or templateDetails.xml */ private function getTemplateData($extensionName, $xmlName) { $extensionName = strtolower($extensionName); $altExtensionName = substr($extensionName,4); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); // First look for administrator templates $path = JPATH_THEMES.'/'.$altExtensionName; if(!JFolder::exists($path)) { // Then look for front-end templates $path = JPATH_SITE.'/templates/'.$altExtensionName; if(!JFolder::exists($path)) return array('version' => '', 'date' => ''); } $filename = "$path/$xmlName"; if(!JFile::exists($filename)) { $filename = "$path/templateDetails.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$extensionName.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$altExtensionName.xml"; } if(!JFile::exists($filename)) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } // Need to check for extension (since 1.6) and install (supported through 2.5) if ($xml->getName() != 'extension' && $xml->getName() != 'install') { unset($xml); return array('version' => '', 'date' => '', 'xmlfile' => ''); } $data['version'] = $xml->version ? (string) $xml->version : ''; $data['date'] = $xml->creationDate ? (string) $xml->creationDate : ''; $data['xmlfile'] = $filename; return $data; } /** * This method parses the manifest information of package, library and file * extensions. All of those extensions do not store their manifests in the * extension's directory, but in administrator/manifests. Kudos to @mbabker * for sharing this method! * * @param string $extensionName * @param string $xmlName * @return type */ private function getPackageData($extensionName, $xmlName) { $extensionName = strtolower($extensionName); $altExtensionName = substr($extensionName,4); jimport('joomla.filesystem.folder'); jimport('joomla.filesystem.file'); $path = JPATH_ADMINISTRATOR.'/manifests/packages'; $filename = "$path/$xmlName"; if(!JFile::exists($filename)) { $filename = "$path/$extensionName.xml"; } if(!JFile::exists($filename)) { $filename = "$path/$altExtensionName.xml"; } if(!JFile::exists($filename)) { return array('version' => '', 'date' => ''); } if(empty($filename)) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { return array('version' => '', 'date' => '', 'xmlfile' => ''); } // Need to check for extension (since 1.6) and install (supported through 2.5) if ($xml->getName() != 'extension') { unset($xml); return array('version' => '', 'date' => '', 'xmlfile' => ''); } $data['version'] = $xml->version ? (string) $xml->version : ''; $data['date'] = $xml->creationDate ? (string) $xml->creationDate : ''; $data['xmlfile'] = $filename; return $data; } /** * Scans a directory for XML manifest files. The first XML file to be a * manifest wins. * * @var $path string The path to look into * * @return string|bool The full path to a manifest file or false if not found */ private function searchForManifest($path) { jimport('joomla.filesystem.folder'); $files = JFolder::files($path, '\.xml$', false, true); if(!empty($files)) foreach($files as $filename) { try { $xml = new SimpleXMLElement($filename, LIBXML_NONET, true); } catch(Exception $e) { continue; } // Check for extension (since 1.6) and install (supported through 2.5) if(($xml->getName() != 'extension' && $xml->getName() != 'install')) continue; unset($xml); return $filename; } return false; } } PK>\Dp7liveupdate/classes/model.phpnuW+A */ defined('_JEXEC') or die(); jimport('joomla.application.component.model'); if(!class_exists('JoomlaSucksModel')) { if(interface_exists('JModel')) { abstract class JoomlaSucksModel extends JModelLegacy {} } else { class JoomlaSucksModel extends JModel {} } } /** * The Live Update MVC model */ class LiveUpdateModel extends JoomlaSucksModel { public function download() { // Get the path to Joomla!'s temporary directory $jreg = JFactory::getConfig(); $tmpdir = $jreg->get('tmp_path'); jimport('joomla.filesystem.folder'); // Make sure the user doesn't use the system-wide tmp directory. You know, the one that's // being erased periodically and will cause a real mess while installing extensions (Grrr!) if(realpath($tmpdir) == '/tmp') { // Someone inform the user that what he's doing is insecure and stupid, please. In the // meantime, I will fix what is broken. $tmpdir = JPATH_SITE.'/tmp'; } // Make sure that folder exists (users do stupid things too often; you'd be surprised) elseif(!JFolder::exists($tmpdir)) { // Darn it, user! WTF where you thinking? OK, let's use a directory I know it's there... $tmpdir = JPATH_SITE.'/tmp'; } // Oki. Let's get the URL of the package $updateInfo = LiveUpdate::getUpdateInformation(); $config = LiveUpdateConfig::getInstance(); $auth = $config->getAuthorization(); $url = $updateInfo->downloadURL; // Sniff the package type. If sniffing is impossible, I'll assume a ZIP package $basename = basename($url); if(strstr($basename,'?')) { $basename = substr($basename, strstr($basename,'?')+1); } if(substr($basename,-4) == '.zip') { $type = 'zip'; } elseif(substr($basename,-4) == '.tar') { $type = 'tar'; } elseif(substr($basename,-4) == '.tgz') { $type = 'tar.gz'; } elseif(substr($basename,-7) == '.tar.gz') { $type = 'tar.gz'; } else { $type = 'zip'; } // Cache the path to the package file and the temp installation directory in the session $target = $tmpdir.'/'.$updateInfo->extInfo->name.'.update.'.$type; $tempdir = $tmpdir.'/'.$updateInfo->extInfo->name.'_update'; $session = JFactory::getSession(); $session->set('target', $target, 'liveupdate'); $session->set('tempdir', $tempdir, 'liveupdate'); // Let's download! require_once dirname(__FILE__).'/download.php'; return LiveUpdateDownloadHelper::download($url, $target); } public function extract() { $session = JFactory::getSession(); $target = $session->get('target', '', 'liveupdate'); $tempdir = $session->get('tempdir', '', 'liveupdate'); jimport('joomla.filesystem.archive'); return JArchive::extract( $target, $tempdir); } public function install() { $session = JFactory::getSession(); $tempdir = $session->get('tempdir', '', 'liveupdate'); jimport('joomla.installer.installer'); jimport('joomla.installer.helper'); $installer = JInstaller::getInstance(); $packageType = JInstallerHelper::detectType($tempdir); if(!$packageType) { $msg = JText::_('LIVEUPDATE_INVALID_PACKAGE_TYPE'); $result = false; } elseif (!$installer->install($tempdir)) { // There was an error installing the package $msg = JText::sprintf('LIVEUPDATE_INSTALLEXT', JText::_($packageType), JText::_('LIVEUPDATE_Error')); $result = false; } else { // Package installed sucessfully $msg = JText::sprintf('LIVEUPDATE_INSTALLEXT', JText::_($packageType), JText::_('LIVEUPDATE_Success')); $result = true; } $app = JFactory::getApplication(); $app->enqueueMessage($msg); $this->setState('result', $result); $this->setState('packageType', $packageType); if($packageType) { $this->setState('name', $installer->get('name')); $this->setState('message', $installer->message); $this->setState('extmessage', $installer->get('extension_message')); } return $result; } public function cleanup() { $session = JFactory::getSession(); $target = $session->get('target', '', 'liveupdate'); $tempdir = $session->get('tempdir', '', 'liveupdate'); jimport('joomla.installer.helper'); JInstallerHelper::cleanupInstall($target, $tempdir); $session->clear('target','liveupdate'); $session->clear('tempdir','liveupdate'); } public function getSRPURL($return = '') { $session = JFactory::getSession(); $tempdir = $session->get('tempdir', '', 'liveupdate'); jimport('joomla.installer.installer'); jimport('joomla.installer.helper'); jimport('joomla.filesystem.file'); $instModelFile = JPATH_ADMINISTRATOR.'/components/com_akeeba/models/installer.php'; if(!JFile::exists($instModelFile)) { $instModelFile = JPATH_ADMINISTRATOR.'/components/com_akeeba/plugins/models/installer.php'; }; if(!JFile::exists($instModelFile)) return false; require_once $instModelFile; $model = JModel::getInstance('Installer', 'AkeebaModel'); $packageType = JInstallerHelper::detectType($tempdir); $name = $model->getExtensionName($tempdir); $url = 'index.php?option=com_akeeba&view=backup&tag=restorepoint&type='.$packageType.'&name='.urlencode($name['name']); switch($packageType) { case 'module': case 'template': $url .= '&group='.$name['client']; break; case 'plugin': $url .= '&group='.$name['group']; break; } if(!empty($return)) $url .= '&returnurl='.urlencode($return); return $url; } } PK>\SD**"liveupdate/classes/updatefetch.phpnuW+A */ defined('_JEXEC') or die(); /** * Fetches the update information from the server or the cache, depending on * whether the cache is fresh or not. */ class LiveUpdateFetch extends JObject { private $cacheTTL = 24; private $storage = null; /** * One-stop-shop function which fetches update information and tells you * if there are updates available or not, or if updates are not supported. * * @return int 0 = no updates, 1 = updates available, -1 = updates not supported, -2 = fetching updates crashes the server */ public function hasUpdates() { $updateInfo = $this->getUpdateInformation(); if($updateInfo->stuck) return -2; if(!$updateInfo->supported) return -1; $config = LiveUpdateConfig::getInstance(); $extInfo = $config->getExtensionInformation(); // Filter by stability level $minStability = $config->getMinimumStability(); $stability = strtolower($updateInfo->stability); switch($minStability) { case 'alpha': default: // Reports any stability level as an available update break; case 'beta': // Do not report alphas as available updates if(in_array($stability, array('alpha'))) return 0; break; case 'rc': // Do not report alphas and betas as available updates if(in_array($stability, array('alpha','beta'))) return 0; break; case 'stable': // Do not report alphas, betas and rcs as available updates if(in_array($stability, array('alpha','beta','rc'))) return 0; break; } if(empty($updateInfo->version) && empty($updateInfo->date)) return 0; // Use the version strategy to determine the availability of an update switch($config->getVersionStrategy()) { case 'newest': jimport('joomla.utilities.date'); if(empty($extInfo)) { $mine = new JDate('2000-01-01 00:00:00'); } else { try { $mine = new JDate($extInfo['date']); } catch(Exception $e) { $mine = new JDate('2000-01-01 00:00:00'); } } $theirs = new JDate($updateInfo->date); return ($theirs->toUnix() > $mine->toUnix()) ? 1 : 0; break; case 'vcompare': $mine = $extInfo['version']; if(empty($mine)) $mine = '0.0.0'; $theirs = $updateInfo->version; if(empty($theirs)) $theirs = '0.0.0'; return (version_compare($theirs, $mine, 'gt')) ? 1 : 0; break; case 'different': $mine = $extInfo['version']; if(empty($mine)) $mine = '0.0.0'; $theirs = $updateInfo->version; if(empty($theirs)) $theirs = '0.0.0'; return ($theirs != $mine) ? 1 : 0; break; } } /** * Get the latest version (update) information, either from the cache or * from the update server. * * @param $force bool Set to true to force fetching fresh data from the server * * @return stdClass The update information, in object format */ public function getUpdateInformation($force = false) { // Get the Live Update configuration $config = LiveUpdateConfig::getInstance(); // Get an instance of the storage class $storageOptions = $config->getStorageAdapterPreferences(); require_once dirname(__FILE__).'/storage/storage.php'; $this->storage = LiveUpdateStorage::getInstance($storageOptions['adapter'], $storageOptions['config']); $storage = $this->storage; // If we are requested to forcibly reload the information, clear old data first if($force) { $this->storage->set('lastcheck', 0); $this->storage->set('updatedata', ''); $this->storage->save(); $registry = $storage->getRegistry(); $registry->set('update.lastcheck', null); $registry->set('update.updatedata', null); $storage->setRegistry($registry); } // Fetch information from the cache $registry = $storage->getRegistry(); $lastCheck = $registry->get('lastcheck', 0); $cachedData = $registry->get('updatedata', null); if(is_string($cachedData)) { $cachedData = trim($cachedData,'"'); $cachedData = json_decode($cachedData); } if(empty($cachedData)) { $lastCheck = 0; } // Check if the cache is at most $cacheTTL hours old $now = time(); $maxDifference = $this->cacheTTL * 3600; $difference = abs($now - $lastCheck); if(!($force) && ($difference <= $maxDifference)) { // The cache is fresh enough; return cached data return $cachedData; } else { // The cache is stale; fetch new data, cache it and return it to the caller $data = $this->getUpdateData($force); $this->storage->set('lastcheck', $now); $this->storage->set('updatedata', json_encode($data)); $this->storage->save(); return $data; } } /** * Retrieves the update data from the server, unless previous runs indicate * that the download process gets stuck and ends up in a WSOD. * * @param bool $force Set to true to force fetching new data no matter if the process is marked as stuck * @return stdClass */ private function getUpdateData($force = false) { $ret = array( 'supported' => false, 'stuck' => true, 'version' => '', 'date' => '', 'stability' => '', 'downloadURL' => '', 'infoURL' => '', 'releasenotes' => '' ); // If the process is marked as "stuck", we won't bother fetching data again; well, // unless you really force me to, by setting $force = true. if( ($this->storage->get('stuck',0) != 0) && !$force) return (object)$ret; $ret['stuck'] = false; require_once dirname(__FILE__).'/download.php'; // First we mark Live Updates as getting stuck. This way, if fetching the update // fails with a server error, reloading the page will not result to a White Screen // of Death again. Hey, Joomla! core team, are you listening? Some hosts PRETEND to // support cURL or URL fopen() wrappers but using them throws an immediate WSOD. $this->storage->set('stuck', 1); $this->storage->save(); $config = LiveUpdateConfig::getInstance(); $extInfo = $config->getExtensionInformation(); $url = $extInfo['updateurl']; $rawData = LiveUpdateDownloadHelper::downloadAndReturn($url); // Now that we have some data returned, let's unmark the process as being stuck ;) $this->storage->set('stuck', 0); $this->storage->save(); // If we didn't get anything, assume Live Update is not supported (communication error) if(empty($rawData) || ($rawData == false)) return (object)$ret; // TODO Detect the content type of the returned update stream. For now, I will pretend it's an INI file. $data = $this->parseINI($rawData); $ret['supported'] = true; return (object)array_merge($ret, $data); } /** * Fetches update information from the server using cURL * @return string The raw server data */ private function fetchCURL() { $config = LiveUpdateConfig::getInstance(); $extInfo = $config->getExtensionInformation(); $url = $extInfo['updateurl']; $process = curl_init($url); $config = new LiveUpdateConfig(); $config->applyCACert($process); curl_setopt($process, CURLOPT_HEADER, 0); // Pretend we are Firefox, so that webservers play nice with us curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110105 Firefox/3.6.14'); curl_setopt($process, CURLOPT_ENCODING, 'gzip'); curl_setopt($process, CURLOPT_TIMEOUT, 10); curl_setopt($process, CURLOPT_RETURNTRANSFER, 1); curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false); // The @ sign allows the next line to fail if open_basedir is set or if safe mode is enabled @curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1); @curl_setopt($process, CURLOPT_MAXREDIRS, 20); $inidata = curl_exec($process); curl_close($process); return $inidata; } /** * Fetches update information from the server using file_get_contents, which internally * uses URL fopen() wrappers. * @return string The raw server data */ private function fetchFOPEN() { $config = LiveUpdateConfig::getInstance(); $extInfo = $config->getExtensionInformation(); $url = $extInfo['updateurl']; return @file_get_contents($url); } /** * Parses the raw INI data into an array of update information * @param string $rawData The raw INI data * @return array The parsed data */ private function parseINI($rawData) { $ret = array( 'version' => '', 'date' => '', 'stability' => '', 'downloadURL' => '', 'infoURL' => '', 'releasenotes' => '' ); // Get the magic string $magicPos = strpos($rawData, '; Live Update provision file'); if($magicPos === false) { // That's not an INI file :( return $ret; } if($magicPos !== 0) { $rawData = substr($rawData, $magicPos); } require_once dirname(__FILE__).'/inihelper.php'; $iniData = LiveUpdateINIHelper::parse_ini_file($rawData, false, true); // Get the supported platforms $supportedPlatform = false; $versionParts = explode('.',JVERSION); $currentPlatform = $versionParts[0].'.'.$versionParts[1]; if(array_key_exists('platforms', $iniData)) { $rawPlatforms = explode(',', $iniData['platforms']); foreach($rawPlatforms as $platform) { $platform = trim($platform); if(substr($platform,0,7) != 'joomla/') { echo 'continue'; continue; } $platform = substr($platform, 7); if($currentPlatform == $platform) { $supportedPlatform = true; } } } else { // Lies, damn lies $supportedPlatform = true; } if(!$supportedPlatform) { return $ret; } $ret['version'] = array_key_exists('version', $iniData) ? $iniData['version'] : ''; $ret['date'] = array_key_exists('date', $iniData) ? $iniData['date'] : ''; $config = LiveUpdateConfig::getInstance(); $auth = $config->getAuthorization(); if(!array_key_exists('link', $iniData)) $iniData['link'] = ''; $glue = strpos($iniData['link'],'?') === false ? '?' : '&'; $ret['downloadURL'] = $iniData['link'] . (empty($auth) ? '' : $glue.$auth); if(array_key_exists('stability', $iniData)) { $stability = $iniData['stability']; } else { // Stability not defined; guesswork mode enabled $version = $ret['version']; if( preg_match('#^[0-9\.]*a[0-9\.]*#', $version) == 1 ) { $stability = 'alpha'; } elseif( preg_match('#^[0-9\.]*b[0-9\.]*#', $version) == 1 ) { $stability = 'beta'; } elseif( preg_match('#^[0-9\.]*rc[0-9\.]*#', $version) == 1 ) { $stability = 'rc'; } elseif( preg_match('#^[0-9\.]*$#', $version) == 1 ) { $stability = 'stable'; } else { $stability = 'svn'; } } $ret['stability'] = $stability; if(array_key_exists('releasenotes', $iniData)) { $ret['releasenotes'] = $iniData['releasenotes']; } if(array_key_exists('infourl', $iniData)) { $ret['infoURL'] = $iniData['infourl']; } return $ret; } }PK>\ztQ Q (liveupdate/classes/storage/component.phpnuW+A */ defined('_JEXEC') or die(); /** * Live Update Component Storage Class * Allows to store the update data to a component's parameters. This is the most reliable method. * Its configuration options are: * component string The name of the component which will store our data. If not specified the extension name will be used. * key string The name of the component parameter where the serialized data will be stored. If not specified "liveupdate" will be used. */ class LiveUpdateStorageComponent extends LiveUpdateStorage { private static $component = null; private static $key = null; public function load($config) { if(!array_key_exists('component', $config)) { self::$component = $config['extensionName']; } else { self::$component = $config['component']; } if(!array_key_exists('key', $config)) { self::$key = 'liveupdate'; } else { self::$key = $config['key']; } // Not using JComponentHelper to avoid conflicts ;) $db = JFactory::getDbo(); $sql = $db->getQuery(true) ->select($db->qn('params')) ->from($db->qn('#__extensions')) ->where($db->qn('type').' = '.$db->q('component')) ->where($db->qn('element').' = '.$db->q(self::$component)); $db->setQuery($sql); $rawparams = $db->loadResult(); $params = new JRegistry(); $params->loadString($rawparams, 'JSON'); $data = $params->get(self::$key, ''); jimport('joomla.registry.registry'); self::$registry = new JRegistry('update'); self::$registry->loadString($data, 'INI'); } public function save() { $data = self::$registry->toString('INI'); $db = JFactory::getDBO(); // An interesting discovery: if your component is manually updating its // component parameters before Live Update is called, then calling Live // Update will reset the modified component parameters because // JComponentHelper::getComponent() returns the old, cached version of // them. So, we have to forget the following code and shoot ourselves in // the feet. Dammit!!! $sql = $db->getQuery(true) ->select($db->qn('params')) ->from($db->qn('#__extensions')) ->where($db->qn('type').' = '.$db->q('component')) ->where($db->qn('element').' = '.$db->q(self::$component)); $db->setQuery($sql); $rawparams = $db->loadResult(); $params = new JRegistry(); $params->loadString($rawparams, 'JSON'); $params->set(self::$key, $data); // Joomla! 1.6 $data = $params->toString('JSON'); $sql = $db->getQuery(true) ->update($db->qn('#__extensions')) ->set($db->qn('params').' = '.$db->q($data)) ->where($db->qn('type').' = '.$db->q('component')) ->where($db->qn('element').' = '.$db->q(self::$component)); $db->setQuery($sql); $db->query(); } } PK>\H!RR#liveupdate/classes/storage/file.phpnuW+A */ defined('_JEXEC') or die(); /** * Live Update File Storage Class * Allows to store the update data to files on disk. Its configuration options are: * path string The absolute path to the directory where the update data will be stored as INI files * */ class LiveUpdateStorageFile extends LiveUpdateStorage { private static $filename = null; public function load($config) { $path = $config['path']; $extname = $config['extensionName']; $filename = "$path/$extname.updates.ini"; self::$filename = $filename; jimport('joomla.registry.registry'); self::$registry = new JRegistry('update'); jimport('joomla.filesystem.file'); if(JFile::exists(self::$filename)) { self::$registry->loadFile(self::$filename, 'INI'); } } public function save() { jimport('joomla.filesystem.file'); $data = self::$registry->toString('INI'); JFile::write(self::$filename, $data); } } PK>\)$liveupdate/classes/storage/.htaccessnuW+A Order allow,deny Deny from all PK>\Y=&liveupdate/classes/storage/storage.phpnuW+A */ defined('_JEXEC') or die(); /** * Abstract class for the update parameters storage * @author nicholas * */ class LiveUpdateStorage { /** * The update data registry * @var JRegistry */ public static $registry = null; /** * * @param string $type * @param array $config * @return LiveUpdateStorage */ public static function getInstance($type, $config) { static $instances = array(); $sig = md5($type, serialize($config)); if(!array_key_exists($sig, $instances)) { require_once dirname(__FILE__).'/'.strtolower($type).'.php'; $className = 'LiveUpdateStorage'.ucfirst($type); $object = new $className($config); $object->load($config); $newRegistry = clone(self::$registry); $object->setRegistry($newRegistry); $instances[$sig] = $object; } return $instances[$sig]; } /** * Returns the internally used registry * * @return JRegistry */ public function &getRegistry() { return self::$registry; } /** * Replaces the internally used registry with the one supplied * * @param JRegistry $registry */ public function setRegistry($registry) { self::$registry = $registry; } public final function set($key, $value) { if($key == 'updatedata') { if(function_exists('json_encode') && function_exists('json_decode')) { $value = json_encode($value); } elseif(function_exists('base64_encode') && function_exists('base64_decode')) { $value = base64_encode(serialize($value)); } else { $value = serialize($value); } } self::$registry->set("update.$key", $value); } public final function get($key, $default) { $value = self::$registry->get("update.$key", $default); if($key == 'updatedata') { if(function_exists('json_encode') && function_exists('json_decode')) { $value = json_decode($value); } elseif(function_exists('base64_encode') && function_exists('base64_decode')) { $value = unserialize(base64_decode($value)); } else { $value = unserialize($value); } } return $value; } public function save() {} public function load($config) {} } PK>\"QIx#x#liveupdate/classes/download.phpnuW+A */ defined('_JEXEC') or die(); /** * Allows downloading packages over the web to your server */ class LiveUpdateDownloadHelper { /** * Downloads from a URL and saves the result as a local file * @param $url * @param $target * @return bool True on success */ public static function download($url, $target) { // Import Joomla! libraries jimport('joomla.filesystem.file'); /** @var bool Did we try to force permissions? */ $hackPermissions = false; // Make sure the target does not exist if(JFile::exists($target)) { if(!@unlink($target)) { JFile::delete($target); } } // Try to open the output file for writing $fp = @fopen($target, 'wb'); if($fp === false) { // The file can not be opened for writing. Let's try a hack. $empty = ''; if( JFile::write($target, $empty) ) { if( self::chmod($target, 511) ) { $fp = @fopen($target, 'wb'); $hackPermissions = true; } } } $result = false; if($fp !== false) { // First try to download directly to file if $fp !== false $adapters = self::getAdapters(); $result = false; while(!empty($adapters) && ($result === false)) { // Run the current download method $method = 'get' . strtoupper( array_shift($adapters) ); $result = self::$method($url, $fp); // Check if we have a download if($result === true) { // The download is complete, close the file pointer @fclose($fp); // If the filesize is not at least 1 byte, we consider it failed. clearstatcache(); $filesize = @filesize($target); if($filesize <= 0) { $result = false; $fp = @fopen($target, 'wb'); } } } // If we have no download, close the file pointer if($result === false) { @fclose($fp); } } if($result === false) { // Delete the target file if it exists if(file_exists($target)) { if( !@unlink($target) ) { JFile::delete($target); } } // Download and write using JFile::write(); $result = JFile::write($target, self::downloadAndReturn($url) ); } return $result; } /** * Downloads from a URL and returns the result as a string * @param $url * @return mixed Result string on success, false on failure */ public static function downloadAndReturn($url) { $adapters = self::getAdapters(); $result = false; while(!empty($adapters) && ($result === false)) { // Run the current download method $method = 'get' . strtoupper( array_shift($adapters) ); $result = self::$method($url, null); } return $result; } /** * Does the server support PHP's cURL extension? * @return bool True if it is supported */ private static function hasCURL() { static $result = null; if(is_null($result)) { $result = function_exists('curl_init'); } return $result; } /** * Downloads the contents of a URL and writes them to disk (if $fp is not null) * or returns them as a string (if $fp is null) * @param string $url The URL to download from * @param resource $fp The file pointer to download to. Omit to return the contents. * @return bool|string False on failure, true on success ($fp not null) or the URL contents (if $fp is null) */ private static function &getCURL($url, $fp = null, $nofollow = false) { $result = false; $ch = curl_init($url); $config = new LiveUpdateConfig(); $config->applyCACert($ch); if( !@curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1) && !$nofollow ) { // Safe Mode is enabled. We have to fetch the headers and // parse any redirections present in there. curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Get the headers $data = curl_exec($ch); curl_close($ch); // Init $newURL = $url; // Parse the headers $lines = explode("\n", $data); foreach($lines as $line) { if(substr($line, 0, 9) == "Location:") { $newURL = trim(substr($line,9)); } } // Download from the new URL if($url != $newURL) { return self::getCURL($newURL, $fp); } else { return self::getCURL($newURL, $fp, true); } } else { @curl_setopt($ch, CURLOPT_MAXREDIRS, 20); } curl_setopt($ch, CURLOPT_AUTOREFERER, true); curl_setopt($ch, CURLOPT_FAILONERROR, true); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10); curl_setopt($ch, CURLOPT_TIMEOUT, 30); // Pretend we are IE7, so that webservers play nice with us curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'); if(is_resource($fp)) { curl_setopt($ch, CURLOPT_FILE, $fp); } $result = curl_exec($ch); curl_close($ch); return $result; } /** * Does the server support URL fopen() wrappers? * @return bool */ private static function hasFOPEN() { static $result = null; if(is_null($result)) { // If we are not allowed to use ini_get, we assume that URL fopen is // disabled. if(!function_exists('ini_get')) { $result = false; } else { $result = ini_get('allow_url_fopen'); } } return $result; } private static function &getFOPEN($url, $fp = null) { $result = false; // Track errors if( function_exists('ini_set') ) { $track_errors = ini_set('track_errors',true); } // Open the URL for reading if(function_exists('stream_context_create')) { // PHP 5+ way (best) $httpopts = Array('user_agent'=>'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'); $context = stream_context_create( array( 'http' => $httpopts ) ); $ih = @fopen($url, 'r', false, $context); } else { // PHP 4 way (actually, it's just a fallback as we can't run Admin Tools in PHP4) if( function_exists('ini_set') ) { ini_set('user_agent', 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.0.3705; .NET CLR 1.1.4322; Media Center PC 4.0)'); } $ih = @fopen($url, 'r'); } // If fopen() fails, abort if( !is_resource($ih) ) { return $result; } // Try to download $bytes = 0; $result = true; $return = ''; while (!feof($ih) && $result) { $contents = fread($ih, 4096); if ($contents === false) { @fclose($ih); $result = false; return $result; } else { $bytes += strlen($contents); if(is_resource($fp)) { $result = @fwrite($fp, $contents); } else { $return .= $contents; unset($contents); } } } @fclose($ih); if(is_resource($fp)) { return $result; } elseif( $result === true ) { return $return; } else { return $result; } } /** * Detect and return available download adapters * @return array */ private static function getAdapters() { // Detect available adapters $adapters = array(); if(self::hasCURL()) $adapters[] = 'curl'; if(self::hasFOPEN()) $adapters[] = 'fopen'; return $adapters; } /** * Change the permissions of a file, optionally using FTP * @param string $file Absolute path to file * @param int $mode Permissions, e.g. 0755 */ private static function chmod($path, $mode) { if(is_string($mode)) { $mode = octdec($mode); if( ($mode < 0600) || ($mode > 0777) ) $mode = 0755; } // Initialize variables jimport('joomla.client.helper'); $ftpOptions = JClientHelper::getCredentials('ftp'); // Check to make sure the path valid and clean $path = JPath::clean($path); if ($ftpOptions['enabled'] == 1) { // Connect the FTP client jimport('joomla.client.ftp'); if(version_compare(JVERSION,'3.0','ge')) { $ftp = JClientFTP::getInstance( $ftpOptions['host'], $ftpOptions['port'], null, $ftpOptions['user'], $ftpOptions['pass'] ); } else { if(version_compare(JVERSION,'3.0','ge')) { $ftp = JClientFTP::getInstance( $ftpOptions['host'], $ftpOptions['port'], null, $ftpOptions['user'], $ftpOptions['pass'] ); } else { $ftp = JFTP::getInstance( $ftpOptions['host'], $ftpOptions['port'], null, $ftpOptions['user'], $ftpOptions['pass'] ); } } } if(@chmod($path, $mode)) { $ret = true; } elseif ($ftpOptions['enabled'] == 1) { // Translate path and delete jimport('joomla.client.ftp'); $path = JPath::clean(str_replace(JPATH_ROOT, $ftpOptions['root'], $path), '/'); // FTP connector throws an error $ret = $ftp->chmod($path, $mode); } else { return false; } } }PK>\keKpp%liveupdate/classes/tmpl/nagscreen.phpnuW+A */ defined('_JEXEC') or die(); $stability = JText::_('LIVEUPDATE_STABILITY_'.$this->updateInfo->stability); ?>

    updateInfo->version, $stability) ?>

    Powered by Akeeba Live Update

    PK>\S2#liveupdate/classes/tmpl/install.phpnuW+A */ defined( '_JEXEC' ) or die(); $state = $this->get('State'); $message1 = $state->get('message'); $message2 = $state->get('extmessage'); ?>
    '; options[++r] = data[i].user_id; options[++r] = ''; options[++r] = data[i].user_name; options[++r] = '
    '; options[++r] = data[i].product_sku; options[++r] = ''; options[++r] = data[i].product_name; options[++r] = '
    '; options[++r] = data[i].product_sku; options[++r] = ''; options[++r] = data[i].product_name; options[++r] = '

    Powered by Akeeba Live Update

    PK>\)!liveupdate/classes/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\ۭnn'liveupdate/classes/tmpl/startupdate.phpnuW+A */ defined('_JEXEC') or die(); ?>

    Powered by Akeeba Live Update

    PK>\*Y$liveupdate/classes/tmpl/overview.phpnuW+A */ defined('_JEXEC') or die(); JHtml::_('behavior.framework'); JHtml::_('behavior.modal'); ?>
    updateInfo->releasenotes): ?>
    updateInfo->releasenotes ?>
    updateInfo->supported): ?>

    escape($this->updateInfo->extInfo->updateurl) ?>

    escape($this->updateInfo->extInfo->title)); ?>

    updateInfo->stuck):?>

    escape($this->updateInfo->extInfo->title)); ?>

    updateInfo->hasUpdates ? 'hasupdates' : 'noupdates'; $auth = $this->config->getAuthorization(); $auth = empty($auth) ? '' : '?'.$auth; ?> needsAuth): ?>

    updateInfo->extInfo->version ?>
    updateInfo->version ?>
    updateInfo->date ?>
    updateInfo->releasenotes) || !empty($this->updateInfo->infoURL)): ?>
    updateInfo->releasenotes): ?> addScriptDeclaration($script,'text/javascript'); ?> updateInfo->releasenotes && $this->updateInfo->infoURL): ?>  •  updateInfo->infoURL): ?>

    updateInfo->hasUpdates):?> needsAuth ? 'disabled="disabled"' : ''?>

    Powered by Akeeba Live Update

    PK>\)liveupdate/classes/.htaccessnuW+A Order allow,deny Deny from all PK>\E .liveupdate/language/lt-LT/lt-LT.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Automatinis atnaujinimas" LIVEUPDATE_NOTSUPPORTED_HEAD="Šiame serveryje automatinis atnaujinimas negalimas" LIVEUPDATE_NOTSUPPORTED_INFO="Jūsų serveris rodo, kad automatinis atnaujinimas yra negalimas. Prašome susisiekti su savo tinklapio talpintojais ir paprašyti įgalinti cURL PHP plėtinį arba aktyvuoti URL fopen(). Jei šie plėtiniai jau yra įgalinti, paprašykite jų sukonfigūruoti savo ugniasienę taip, kad ji leistų prieigą prie šios URL:" LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Jūs visada galite atnaujinti %s rankiniu būdu, aplankydami mūsų tinklapį, parsisiųsdami naujausią programos laidą ir įdiegdami standartiniu Joomla! Būdu." LIVEUPDATE_STUCK_HEAD="Automatinis atnaujinimas nurodė, kad įvyko programinė klaida" LIVEUPDATE_STUCK_INFO="Automatinis atnaujinimas nurodė, kad bandant susisiekti su atnaujinimų serveriu įvyko programinė klaida. Paprastai tai rodo, kad tinklapio talpintojas aktyviai blokuoja ryšius su išorinėmis svetainėmis. Jei norite pabandyti iš naujo parsisiųsti atnaujinimo informaciją, prašome spragtelėti žemiau esantį mygtuką "Atnaujinti informaciją". Jei parodomas tuščias puslapis, norint išspręsti šią problemą turėsite kreiptis į savo tinklapio talpintoją." LIVEUPDATE_ERROR_NEEDSAUTH="Norėdami atsinaujinti į naujausią programos versiją, turite nurodyti savo prisijungimo vardą/slaptažodį arba Parsisiuntimo ID komponento parametruose. Kol to nepadarysite, atnaujinimo mygtukas išliks neaktyvus." LIVEUPDATE_HASUPDATES_HEAD="Yra nauja versija" LIVEUPDATE_NOUPDATES_HEAD="Jūs turite naujausią programos versiją." LIVEUPDATE_CURRENTVERSION="Įdiegta versija" LIVEUPDATE_LATESTVERSION="Naujausia versija" LIVEUPDATE_LATESTRELEASED="Naujausios versijos išleidimo data" LIVEUPDATE_DOWNLOADURL="Tiesioginė parsisiuntimo nuoroda" LIVEUPDATE_REFRESH_INFO="Atnaujinti informaciją" LIVEUPDATE_DO_UPDATE="Atnaujinti į naujausią versiją" LIVEUPDATE_FTP_REQUIRED="Automatinis atnaujinimas nustatė, kad norint atsisiųsti ir įdiegti atnaujinimą turi būti naudojamas FTP sluoksnis, tačiau Jūs nenurodėte savo FTP prisijungimo duomenų globaliose savo tinklapio Joomla! nuostatose.

    Jei norite įdiegti naujinimą, nurodykite FTP prisijungimo duomenis." LIVEUPDATE_FTP="FTP informacija" LIVEUPDATE_FTPUSERNAME="FTP naudotojo vardas" LIVEUPDATE_FTPPASSWORD="FTP slaptažodis" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Atsisiųsti ir įdiegti naujinimą" LIVEUPDATE_DOWNLOAD_FAILED="Nepavyko atsisiųsti atnaujinimo paketo. Įsitikinkite, kad į tinklapio laikinąjį aplanką leidžiama rašyti ir tai, kad Jūsų tinklapio globaliose Joomla! nuostatose įgalintas FTP naudojimas." LIVEUPDATE_EXTRACT_FAILED="Nepavyko išpakuoti atnaujinimo paketo. Prašome bandyti atsinaujinti rankiniu būdu." LIVEUPDATE_INVALID_PACKAGE_TYPE="Neteisingas paketo tipas. Atnaujinimas negalimas" LIVEUPDATE_INSTALLEXT="Įdiegti %s %s" LIVEUPDATE_ERROR="Klaida" LIVEUPDATE_SUCCESS="Pavyko" LIVEUPDATE_ICON_UNSUPPORTED="Automatinis atnaujinimas nepalaikomas" LIVEUPDATE_ICON_CRASHED="Įvyko automatinio atnaujinimo programinis lūžis" LIVEUPDATE_ICON_CURRENT="Jūs turite naujausią programos versiją." LIVEUPDATE_ICON_UPDATES="GALIMAS ATNAUJINIMAS! NORĖDAMI ATSINAUJINTI SPRAGTELĖKITE ČIA" PK>\)#liveupdate/language/lt-LT/.htaccessnuW+A Order allow,deny Deny from all PK>\׳l .liveupdate/language/sv-SE/sv-SE.liveupdate.ininuW+A; Akeeba Live Update ; Copyright ©2011 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update stöds inte på denna server" LIVEUPDATE_NOTSUPPORTED_INFO="Din server indikerar att Live Update inte stöds. Kontakta ditt webbhotell och be dem aktivera PHP-tillägget cURL och att aktivera URL fopen() wrappers. Om detta redan är aktiverat skall du be dem konfiurera brandväggen så att den accepterar anslutningar från följande URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Du kan alltid uppdatera %s manuellt genom att vår webbplats och ladda ned senaste utgåvan och installera via Joomla som vanligt." LIVEUPDATE_STUCK_HEAD="Live Update har markerat sig själv som krashad" LIVEUPDATE_STUCK_INFO="Live Update har indikerat att den kraschade förra gången den försökte kontakta uppdateringsservern. Detta händer vanligen om kommunikationen med externa webbplatser aktivt har blockerats. Om du vill fortsätta hämta uppdateringsinformation, klicka på knappen "Hämta uppdateringsinfo på nytt" här nedan. Om detta resluterar i en blank sida skall du kontakta ditt webbhotell och rapportera ärendet." LIVEUPDATE_ERROR_NEEDSAUTH="Du måste ange användarnamn/lösenord eller Nedladdnings-ID i komponentens Inställningar innan du försöker uppdatera till senaste version. Uppgraderingsknappen kommer att vara inaktiv till dess detta är gjort." LIVEUPDATE_HASUPDATES_HEAD="Det finns en ny version tillgänglig" LIVEUPDATE_NOUPDATES_HEAD="Du har den senatste versionen" LIVEUPDATE_CURRENTVERSION="Installerad version" LIVEUPDATE_LATESTVERSION="Senaste version" LIVEUPDATE_LATESTRELEASED="Senaste utgåvodatum" LIVEUPDATE_DOWNLOADURL="Direkt nedladdnings-URL" LIVEUPDATE_REFRESH_INFO="Hämta uppdateringsinformation" LIVEUPDATE_DO_UPDATE="Uppdatera till senaste version" LIVEUPDATE_FTP_REQUIRED="Live Update har upptäckt att den behöver använda FTP för att kunna ladda ned och installera uppdateringen. Du har inte sparat din FTP-inloggningsinfo i Joomlas globala inställningar.

    Ange ditt FTP användarnamn och lösenord nedan för att fortsätta med uppdateringen." LIVEUPDATE_FTP="FTP-Information" LIVEUPDATE_FTPUSERNAME="FTP användarnamn" LIVEUPDATE_FTPPASSWORD="FTP Lösenord" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Ladda ned och installera uppdateringen" LIVEUPDATE_DOWNLOAD_FAILED="Nedladdningen av uppdateringen misslyckades. Kontrollera att temp-mappen är skrivbar och att du aktiverat Joomla!s FTP-lager i de globala inställningarna för din webbplats." LIVEUPDATE_EXTRACT_FAILED="Uppackningen av uppdaterinspaketet misslyckades. Försök att uppdatera tillägget manuellt." LIVEUPDATE_INVALID_PACKAGE_TYPE="Ogiltig pakettyp. Uppdateringen kan inte fortsätta." LIVEUPDATE_INSTALLEXT="Installera %s %s" LIVEUPDATE_ERROR="FEL!" LIVEUPDATE_SUCCESS="Klart" LIVEUPDATE_ICON_UNSUPPORTED="Live Update stöds inte" LIVEUPDATE_ICON_CRASHED="Live Update krashade" LIVEUPDATE_ICON_CURRENT="Du har den senaste versionen" LIVEUPDATE_ICON_UPDATES="UPPDATERING HITTAD! KLICKA FÖR ATT UPPDATERA." LIVEUPDATE_RELEASEINFO="Information" LIVEUPDATE_RELEASENOTES="Release notes" LIVEUPDATE_READMOREINFO="Läs mer"PK>\)#liveupdate/language/sv-SE/.htaccessnuW+A Order allow,deny Deny from all PK>\R .liveupdate/language/tr-TR/tr-TR.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Canlı Güncelleme" LIVEUPDATE_NOTSUPPORTED_HEAD="Canlı Güncelleme bu sunucu üzerinde desteklenmiyor" LIVEUPDATE_NOTSUPPORTED_INFO="Sunucunuz Canlı Güncellemeyi desteklemiyor. Lütfen sunucu yöneticinizle görüşerek cURL PHP ekini ya da URL fopen() sarıcılarını etkinleştirmelerini isteyin. Bu ekler zaten etkinleştirilmişse, güvenlik duvarını şu İnternet adresine izin verecek şekilde ayarlamalarını isteyin:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="%s güncellemelerini istediğiniz zaman el ile kurmak için, sitemizden en son sürümü indirip Joomla! bileşen kurucusu ile yükleyebilirsiniz." LIVEUPDATE_STUCK_HEAD="Canlı güncelleme hata vermiş" LIVEUPDATE_STUCK_INFO="Canlı güncelleme, güncelleme sunucusuna son bağlanma denemesinde hata verdiğini belirledi. Bu durum genellikle dışarıdaki sunuculara bağlantıları engelleyen bir sunucu yapılandırmasından kaynaklanır. Güncelleme bilgisini yeniden almak isterseniz lütfen aşağıdaki "Güncelleme bilgisini al" düğmesine tıklayın. Boş beyaz bir sayfa ile karşılaşırsanız sunucu yöneticinize bu durumu iletin." LIVEUPDATE_ERROR_NEEDSAUTH="Son sürüme güncellemeyi denemeden önce, bileşen ayarlarından kullanıcı adı/parolanızı ya da indirme kodunuzu yazmalısınız. Bu bilgileri yazana kadar Güncelle düğmesi devre dışı görünecektir." LIVEUPDATE_HASUPDATES_HEAD="Yeni bir sürüm bulundu" LIVEUPDATE_NOUPDATES_HEAD="Son sürümü kullanıyorsunuz" LIVEUPDATE_CURRENTVERSION="Kullandığınız sürüm" LIVEUPDATE_LATESTVERSION="Son sürüm" LIVEUPDATE_LATESTRELEASED="Son yayın tarihi" LIVEUPDATE_DOWNLOADURL="Doğrudan indirme adresi" LIVEUPDATE_REFRESH_INFO="Güncelleme bilgisini al" LIVEUPDATE_DO_UPDATE="Son sürüme güncelle" LIVEUPDATE_FTP_REQUIRED="Canlı Güncelle, güncellemeyi indirip kurmak yerine FTP kullanmaya gerek duyuyor, ancak FTP bilgilerinizi Joomla! Genel Ayarlarına kaydetmemişsiniz.

    Lütfen güncellemeyi yapabilmek için FTP kullanıcı adı ve parolanızı aşağıya yazın." LIVEUPDATE_FTP="FTP Bilgisi" LIVEUPDATE_FTPUSERNAME="FTP Kullanıcı Adı" LIVEUPDATE_FTPPASSWORD="FTP Parolası" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Güncellemeyi indir ve kur" LIVEUPDATE_DOWNLOAD_FAILED="Güncelleme paketi indirilemedi. Geçici klasörünüzün yazılabilir olduğundan ya da Joomla! Genel Ayarlarından FTP seçeneğini etkinleştirdiğinizden emin olun." LIVEUPDATE_EXTRACT_FAILED="Güncelleme paketi ayıklanamadı. Lütfen bileşeni elle güncellemeyi deneyin." LIVEUPDATE_INVALID_PACKAGE_TYPE="Geçersiz paket tipi. Güncelleme yapılamıyor." LIVEUPDATE_INSTALLEXT="%s %s Kuruldu" LIVEUPDATE_ERROR="Hata" LIVEUPDATE_SUCCESS="Başarıyla" LIVEUPDATE_ICON_UNSUPPORTED="Canlı Güncelleme Desteklenmiyor" LIVEUPDATE_ICON_CRASHED="Canlı Güncelleme hata verdi" LIVEUPDATE_ICON_CURRENT="Son sürümü kullanıyorsunuz" LIVEUPDATE_ICON_UPDATES="GÜNCELLEME VAR! YÜKLEMEK İÇİN TIKLAYIN." LIVEUPDATE_RELEASEINFO="Bilgi" LIVEUPDATE_RELEASENOTES="Yayın notları" LIVEUPDATE_READMOREINFO="Devamını oku"PK>\)#liveupdate/language/tr-TR/.htaccessnuW+A Order allow,deny Deny from all PK>\z --.liveupdate/language/es-ES/es-ES.liveupdate.ininuW+A; Akeeba Live Update ; Copyright ©2011 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Translators Isidro Baquero - Carlos M. Cámara - Gnumla.com ; Translation Copyright Gnumla.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Actualización automática" LIVEUPDATE_NOTSUPPORTED_HEAD="Este servidor no soporta la Actualización automática" LIVEUPDATE_NOTSUPPORTED_INFO="Su servidor indica que no soporta la Actualización automática. Por favor, contacte con su proveedor de hosting y pídale que active la función cURL de PHP, o bien que active los wrappers de URL fopen(). Si alguna de las opciones anteriores ya está activada, por favor pídale que que configure su cortafuegos de manera que permita el acceso a la siguiente URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Siempre puede actualizar %s manualmente visitando nuestro sitio, descargando la última versión e instalándola mediante el instalador del gestor de extensiones de Joomla!"; LIVEUPDATE_STUCK_HEAD="La actualización automática informa de un fallo" LIVEUPDATE_STUCK_INFO="La actualización automática determinó que hubo un fallo la última vez que intentó contactar con el servidor de actualizaciones. Esto habitualmente ocurre cuando un host bloquea activamente las comunicaciones con sitios externos. Si desea trata de obtener de nuevo la información sobre nuevas actualizaciones, por favor haga clic en el botón "Refrescar la información sobre actualizaciones" que hay a continuación. Si tras hacerlo obtiene una página en blanco, por favor contacte con su proveedor de hosting y coméntele el problema." LIVEUPDATE_ERROR_NEEDSAUTH="Debe introducir su nombre de usuario/contraseña su ID de Descarga (Download ID) en los parámetros de configuración del componente antes de intentar actualizar a la última versión. El botón de actualización permanecerá deshabilitado hasta que lo haga." LIVEUPDATE_HASUPDATES_HEAD="Hay disponible una nueva versión" LIVEUPDATE_NOUPDATES_HEAD="Ya tiene instalada la última vesión" LIVEUPDATE_CURRENTVERSION="Versión instalada" LIVEUPDATE_LATESTVERSION="Última versión" LIVEUPDATE_LATESTRELEASED="Fecha de la última versión" LIVEUPDATE_DOWNLOADURL="URL de descarga directa" LIVEUPDATE_REFRESH_INFO="Refrescar la información de actualización" LIVEUPDATE_DO_UPDATE="Actualizar a la última versión" LIVEUPDATE_FTP_REQUIRED="La actualización automática determinó que es necesario usar FTP para poder descargar e instalar su actualización, pero usted aún no ha guardado la información de inicio de sesión FTP en la configuración global de Joomla!.

    Por favor introduzca el nombre de usuario y la contraseña de su cuenta FTP a continuación para proceder con la actualización." LIVEUPDATE_FTP="Información FTP" LIVEUPDATE_FTPUSERNAME="Usuario FTP" LIVEUPDATE_FTPPASSWORD="Contraseña FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Descargar e instalar la actualización" LIVEUPDATE_DOWNLOAD_FAILED="La descarga del paquete de actualización no se pudo completar. Asegúrese de que su directorio temporal (temp) tiene permisos de escritura o de que ha habilitado la configuración de FTP en la configuración global de su sitio." LIVEUPDATE_EXTRACT_FAILED="La extracción de los archivos del paquete de actualización falló. Por favor, trate de actualizar la extensión manualmente." LIVEUPDATE_INVALID_PACKAGE_TYPE="Tipo de paquete erróneo. No se puede proceder con la actualización." LIVEUPDATE_INSTALLEXT="Instalando %s %s" LIVEUPDATE_ERROR="Error" LIVEUPDATE_SUCCESS="Éxito" LIVEUPDATE_ICON_UNSUPPORTED="La actualización automática no está soportada" LIVEUPDATE_ICON_CRASHED="La actualización automática falló" LIVEUPDATE_ICON_CURRENT="Ya tiene la última versión" LIVEUPDATE_ICON_UPDATES="¡ACTUALIZACIÓN DISPONIBLE! CLIC PARA INSTALAR." PK>\)#liveupdate/language/es-ES/.htaccessnuW+A Order allow,deny Deny from all PK>\*:.liveupdate/language/it-IT/it-IT.liveupdate.ininuW+A; @package Akeeba Live Update ; @subpackage it-IT.liveupdate.ini ; @description Traduzione italiana - it-IT ; @version 3.3.6 ; @author Roberto Restelli (roberto@msoutlook.it) ; @copyright Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; @license Licensed under the GNU LGPLv3 or later ; @note All ini files need to be saved as UTF-8 - No BOM LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="La funzionalità di Live Update non è supportata su questo server" LIVEUPDATE_NOTSUPPORTED_INFO="Il vostro server indica che la funzionalità di Live Update non è supportata. Contattate il fornitore e chiedete di abilitare l'estensione PHP cURL oppure attivare le funzionalità di URL fopen(). Se queste opzioni sono già attive, fate verificare la configurazione del firewall per permettere l'accesso al seguente URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="E' sempre possibile aggiornare %s visitando il nostro sito, scaricando l'ultima versione disponibile ed installandola in Joomla usando i normali comando di installazione delle estensioni." LIVEUPDATE_STUCK_HEAD="Live Update ha rilevato un precedente crash" LIVEUPDATE_STUCK_INFO="Live Update ha determinato che, nell'ultimo tentativo di contattare il server di aggiornamento, l'operazione è fallita con un crash. Generalmente questo indica la presenza di un servizio che blocca la comunicazione con siti esterni. Se volete riprovare a recuperare le informazioni di aggiornamento utilizzate il pulsante "Verifica disponibilità aggiornamenti" più sotto. Se il risultato è una pagina vuota, contattate il vostro fornitore per segnalare il problema." LIVEUPDATE_ERROR_NEEDSAUTH="E' necessario inserire Username e Password oppure il proprio Download ID tra i parametri di configurazione del componente prima di tentare l'aggiornamento all'ultima versione. Il pulsante di aggiornamento sarà attivato solamente dopo l'inserimento di tali informazioni." LIVEUPDATE_HASUPDATES_HEAD="E' disponibile una nuova versione" LIVEUPDATE_NOUPDATES_HEAD="Non sono disponibili nuovi aggiornamenti" LIVEUPDATE_CURRENTVERSION="Versione installata" LIVEUPDATE_LATESTVERSION="Ultima versione" LIVEUPDATE_LATESTRELEASED="Data rilascio ultima versione" LIVEUPDATE_DOWNLOADURL="URL di scaricamento diretto" LIVEUPDATE_REFRESH_INFO="Verifica disponibilità aggiornamenti" LIVEUPDATE_DO_UPDATE="Aggiorna all'ultima versione" LIVEUPDATE_FTP_REQUIRED="Live Update ha determinato che è necessario l'utilizzo di FTP per scaricamente ed installare l'aggiornamento, tuttavia non sono state impostate correttamente le informazioni di configurazione in Joomla. Inserite qui sotto Username e Password per il servizio FTP per proseguire con l'aggiornamento." LIVEUPDATE_FTP="Informazioni FTP" LIVEUPDATE_FTPUSERNAME="Username FTP" LIVEUPDATE_FTPPASSWORD="Password FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Scarica ed installa aggiornamento" LIVEUPDATE_DOWNLOAD_FAILED="Lo scaricamento dell'aggiornamento è fallito. Verificate che la cartella temporanea sia scrivibile e che siano abilitate le opzioni FTP di Joomla all'interno della sezione di Configurazione Globale del sito." LIVEUPDATE_EXTRACT_FAILED="L'estrazione del pacchetto di aggiornamento è fallita. Sarà necessario effettuare l'aggiornamento tramite procedura manuale." LIVEUPDATE_INVALID_PACKAGE_TYPE="Formato del pacchetto di aggiornamento non riconosciuto. L'aggiornamento non può essere effettuato." LIVEUPDATE_INSTALLEXT="Installazione %s %s" LIVEUPDATE_ERROR="Errore" LIVEUPDATE_SUCCESS="Completato" LIVEUPDATE_ICON_UNSUPPORTED="Live Update non supportato" LIVEUPDATE_ICON_CRASHED="Live Update non funziona correttamente" LIVEUPDATE_ICON_CURRENT="Non sono disponibili nuovi aggiornamenti" LIVEUPDATE_ICON_UPDATES="INSTALLA NUOVO AGGIORNAMENTO!"PK>\)#liveupdate/language/it-IT/.htaccessnuW+A Order allow,deny Deny from all PK>\)#liveupdate/language/nl-NL/.htaccessnuW+A Order allow,deny Deny from all PK>\OX X .liveupdate/language/nl-NL/nl-NL.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later ; Dutch Translation version 3.2.3 by [Robert J. Klop] info@zocors-web.nl LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update wordt op deze server niet ondersteund" LIVEUPDATE_NOTSUPPORTED_INFO="De server geeft aan dat Live Update niet wordt ondersteund. Neem contact op met de hoster en vraag de cURL PHP extensie of om de URL fopen() wrappers te activeren. Vraag, als ze al geactiveerd zijn, de firewall zo in te stellen dat er toegang tot de volgende URL is:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="U kunt %s altijd updaten door onze site te bezoeken, de laatste versie te downloaden en doormiddel van Joomla!'s extensiebeheer te installeren." LIVEUPDATE_STUCK_HEAD="Live Update is gecrasht" LIVEUPDATE_STUCK_INFO="Live Update stelt vast dat het, de laatste keer dat het de update-server trachtte te bereiken, gecrasht is. Dit betekent meestal dat de host actief de communicatie met externe sites blokkeert. Klik, als u de update informatie opnieuw wilt ophalen, op de "Ververs update informatie" knop hieronder. Als dat leidt tot een blanco pagina, neem dan contact op met uw hoster en meld dit." LIVEUPDATE_ERROR_NEEDSAUTH="U moet uw gebruikersnaam / wachtwoord of download ID opgegeven in de parameters van de component om naar de laatste release te upgraden. De upgrade knop zal geblokkeerd blijven tot dit gedaan is." LIVEUPDATE_HASUPDATES_HEAD="Er is een nieuwe versie beschikbaar" LIVEUPDATE_NOUPDATES_HEAD="U heeft de laatste versie al" LIVEUPDATE_CURRENTVERSION="Geïnstalleerde versie" LIVEUPDATE_LATESTVERSION="Nieuwste versie" LIVEUPDATE_LATESTRELEASED="Datum laatste release" LIVEUPDATE_DOWNLOADURL="URL voor directe download" LIVEUPDATE_REFRESH_INFO="Ververs update-informatie" LIVEUPDATE_DO_UPDATE="Update naar de laatste versie" LIVEUPDATE_FTP_REQUIRED="Live Update stelt vast dat het FTP moet gebruiken om de updates te downloaden en installeren, maar uw FTP logingegevens zijn bij de Joomla algemene instellingen niet opgeslagen.

    Vul a.u.b. hieronder de FTP gebruikersnaam en het wachtwoord in om verder te gaan met updaten." LIVEUPDATE_FTP="FTP informatie" LIVEUPDATE_FTPUSERNAME="FTP gebruikersnaam" LIVEUPDATE_FTPPASSWORD="FTP wachtwoord" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Download en installeer de update" LIVEUPDATE_DOWNLOAD_FAILED="Het downloaden van het updatepakket is mislukt. Zorg dat de temp map beschrijfbaar is of dat de FTP opties bij de algemene instellingen goed ingevuld zijn." LIVEUPDATE_EXTRACT_FAILED="Uitpakken van het pakket mislukt. Probeer de extensie handmatig bij te werken." LIVEUPDATE_INVALID_PACKAGE_TYPE="Verkeerd pakkettype. Updaten kan niet verder gaan." LIVEUPDATE_INSTALLEXT="Installeer %s %s" LIVEUPDATE_ERROR="Fout" LIVEUPDATE_SUCCESS="Succesvol" LIVEUPDATE_ICON_UNSUPPORTED="Live Update niet ondersteund" LIVEUPDATE_ICON_CRASHED="Live Update gecrasht" LIVEUPDATE_ICON_CURRENT="U heeft de laatste versie" LIVEUPDATE_ICON_UPDATES="UPDATE GEVONDEN! KLIK OM TE UPDATEN."PK>\0,,.liveupdate/language/ru-RU/ru-RU.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Автоматическое обновление" LIVEUPDATE_NOTSUPPORTED_HEAD="Автоматическое обновление не поддерживается на этом сервере" LIVEUPDATE_NOTSUPPORTED_INFO="Ваш сервер сообщает, что автоматическое обновление не поддерживается. Пожалуйста, обратитесь к Вашему хостеру и попросите его разрешить CURL расширение для PHP или включить функцию URL FOPEN(). Если они уже включены, пожалуйста, попросите его настроить их сетевой экран так, чтобы она позволяла получить доступ к следующему адресу:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Вы всегда сможете обновить %s посетив наш сайт, вручную, загрузив последнюю версию и установив ее с помощью Joomla!." LIVEUPDATE_STUCK_HEAD="Автоматическое обновление обнаружило ошибку" LIVEUPDATE_STUCK_INFO="Автоматическое обновление обнаружило, что произошла ошибка при последнем сеансе связи с сервером обновлений. Обычно это означает, что хост блокирует связи с внешними сайтами. Если Вы желаете снова получить информацию об обновлении, пожалуйста, нажмите кнопку "Освежить информацию об обновлении" , расположенную ниже. Если это приводит к появлению пустой страницы, пожалуйста, свяжитесь с Вашим хостером и сообщите об этой проблеме." LIVEUPDATE_ERROR_NEEDSAUTH="Перед попыткой обновления до последней версии, Вы должны ввести Ваше имя пользователя/пароль или ID загрузки в параметры компонента. Кнопка обновления будет оставаться неактивной, пока Вы этого не сделаете." LIVEUPDATE_HASUPDATES_HEAD="Доступна новая версия" LIVEUPDATE_NOUPDATES_HEAD="У Вас уже установлена последняя версия" LIVEUPDATE_CURRENTVERSION="Установленная версия" LIVEUPDATE_LATESTVERSION="Последняя версия" LIVEUPDATE_LATESTRELEASED="Дата выхода последней версии" LIVEUPDATE_DOWNLOADURL="Ссылка для прямой загрузки" LIVEUPDATE_REFRESH_INFO="Освежить информацию об обновлении" LIVEUPDATE_DO_UPDATE="Обновить до последней версии" LIVEUPDATE_FTP_REQUIRED="Автоматическое обновление определило, что необходимо использовать FTP для загрузки и установки обновления, но Вы не сохранили данные для авторизации на FTP в общих настройках Joomla!.

    Просьба ввести свое имя пользователя и пароль FTP для продолжения обновления." LIVEUPDATE_FTP="Информация FTP" LIVEUPDATE_FTPUSERNAME="Имя пользователя FTP" LIVEUPDATE_FTPPASSWORD="Пароль пользователя FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Загрузить и установить обновление" LIVEUPDATE_DOWNLOAD_FAILED="Загрузка пакета обновления не удалась. Убедитесь, что временный каталог доступен для записи или что Вы включили и настроили FTP в общих настройках Joomla!." LIVEUPDATE_EXTRACT_FAILED="Извлечение пакета обновления не удалось. Пожалуйста, попробуйте обновить компонент вручную." LIVEUPDATE_INVALID_PACKAGE_TYPE="Неверный тип пакета. Обновление не может продолжаться." LIVEUPDATE_INSTALLEXT="Установлено %s %s" LIVEUPDATE_ERROR="Ошибка" LIVEUPDATE_SUCCESS="Успешно" LIVEUPDATE_ICON_UNSUPPORTED="Автоматическое обновление не поддерживается" LIVEUPDATE_ICON_CRASHED="Автоматическое обновление не удалось!" LIVEUPDATE_ICON_CURRENT="У Вас последняя версия" LIVEUPDATE_ICON_UPDATES="НАЙДЕНА НОВАЯ ВЕРСИЯ! НАЖМИТЕ ДЛЯ ОБНОВЛЕНИЯ." PK>\)#liveupdate/language/ru-RU/.htaccessnuW+A Order allow,deny Deny from all PK>\)#liveupdate/language/uk-UA/.htaccessnuW+A Order allow,deny Deny from all PK>\.liveupdate/language/uk-UA/uk-UA.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update не підтримується на цьому сервері" LIVEUPDATE_NOTSUPPORTED_INFO="Ваш сервер сигналізує, що Live Update не підтримується. Будь ласка, зв’яжіться з вашим постачальником послуг хостингу і попросіть його ввімкнути розширення PHP cURL або активувати пакувальники URL fopen(). Якщо вони вже ввімкнені, будь ласка, попросіть його сконфігурувати мережеві екрани так, щоб вони дозволяли доступ до цих URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Ви можете завжди оновити %s відвідавши наш сайт персонально, завантажити останній випуск та встановити його, використовуючи інсталятор розширень Joomla!." LIVEUPDATE_STUCK_HEAD="Live Update позначив себе таким, що зазнав краху" LIVEUPDATE_STUCK_INFO="Live Update визначив, що він зазнав краху останнього разу, коли намагався зв’язатися з сервером оновлень. Це зазвичай означає, що хост активно блокує комунікацію з зовнішніми сайтами. Якщо ви ви захочете спробувати знову отримати інформацію про оновлення, будь ласка, натисніть на кнопку "Оновити інформацію " нижче. Якщо це видасть пусту сторінку, будь ласка, зв’яжіться з постачальником послуг хостингу і опишіть цю проблему." LIVEUPDATE_ERROR_NEEDSAUTH="Ви повинні надати ваше ім’я користувача/пароль або ID завантаження в параметрах компоненту перед тим, як намагатися оновитися до останнього випуску. Кнопка оновлення буде залишатися неактивною, доки ви цього не зробите." LIVEUPDATE_HASUPDATES_HEAD="Доступна нова версія" LIVEUPDATE_NOUPDATES_HEAD="У вас уже встановлена остання версія" LIVEUPDATE_CURRENTVERSION="Встановлена версія" LIVEUPDATE_LATESTVERSION="Остання версія" LIVEUPDATE_LATESTRELEASED="Дата останнього випуску" LIVEUPDATE_DOWNLOADURL="URL для безпосереднього завантаження" LIVEUPDATE_REFRESH_INFO="Оновити інформацію" LIVEUPDATE_DO_UPDATE="Оновити до останньої версії" LIVEUPDATE_FTP_REQUIRED="Live Update визначив, що йому потрібно використовувати FTP для завантаження та встановлення вашого оновлення, але ви не зберегли інформацію вашого логіну FTP на сторінці Загальної Конфігурації Joomla! .

    Будь ласка, надайте ім’я користувача і пароль FTP нижче, щоб продовжити процес оновлення." LIVEUPDATE_FTP="Інформація FTP" LIVEUPDATE_FTPUSERNAME="Ім’я користувача FTP" LIVEUPDATE_FTPPASSWORD="Пароль FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Завантажити і встановити оновлення" LIVEUPDATE_DOWNLOAD_FAILED="Завантаження пакету оновлень не вдалося. Переконайтесь, що ваш тимчасовий каталог доступний для запису або що ви ввімкнули налаштування FTP в Загальній Конфігурації Joomla!." LIVEUPDATE_EXTRACT_FAILED="Видобування пакету оновлень не вдалося. Будь ласка, спробуйте оновити розширення вручну." LIVEUPDATE_INVALID_PACKAGE_TYPE="Неправильний тип пакету. Оновлення не може бути продовжено." LIVEUPDATE_INSTALLEXT="Встановлення %s %s" LIVEUPDATE_ERROR="Помилка" LIVEUPDATE_SUCCESS="Успішно" LIVEUPDATE_ICON_UNSUPPORTED="Live Update не підтримується" LIVEUPDATE_ICON_CRASHED="Live Update зазнало краху" LIVEUPDATE_ICON_CURRENT="У вас остання версія" LIVEUPDATE_ICON_UPDATES="ЗНАЙДЕНО ОНОВЛЕННЯ! НАТИСНІТЬ ДЛЯ ЗАПУСКУ ОНОВЛЕННЯ."PK>\)liveupdate/language/.htaccessnuW+A Order allow,deny Deny from all PK>\G .liveupdate/language/hu-HU/hu-HU.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Ez a szerver nem támogatja a Live Update-ot" LIVEUPDATE_NOTSUPPORTED_INFO="A szerver nem támogatja a Live Update-et. Lépj kapcsolatba a szolgáltatóddal és kérd a cURL PHP bővítmény vagy az URL fopen() aktiválását. Ha ezek már engedélyezve vannak, akkor kérd meg őket, hogy úgy állítsák be a tűzfalukat, hogy hozzáférhető legyen a következő URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Bármikor frissítheted a(z) %s úgy, hogy meglátogatod a webhelyünket, letöltöd a legfrissebb verziót és a Joomla! bővítmény telepítőjével felrakod." LIVEUPDATE_STUCK_HEAD="A saját jelzése szerint a Live Update összeomlott" LIVEUPDATE_STUCK_INFO="Az utolsó használat során a Live Update összeomlott amikor kapcsolatot próbált létesíteni a frissítő szerverrel. Ez általában azt jelzi, hogy a szolgáltató aktívan blokkolja a külső webhelyekkel való kommunikációt. Ha meg akarod ismételni a frissítési információk lekérését, akkor kattints alul a "Frissítési információk újra letöltése" gombra. Ha ez üres oldalt eredményez, akkor lépj kapcsolatba a szolgáltatóddal és jelezd nekik ezt a problémát. LIVEUPDATE_ERROR_NEEDSAUTH="Mielőtt frissíteni szeretnél, meg kell adnod a felhasználói neved/jelszavad vagy a letöltési AZ-t a komponens paraméterekben. A frissítés gomb addig nem lesz aktív, amíg ezeket nem adod meg." LIVEUPDATE_HASUPDATES_HEAD="Elérhető az új verzió" LIVEUPDATE_NOUPDATES_HEAD="Már a legújabb verzióval rendelkezel" LIVEUPDATE_CURRENTVERSION="Telepített verzió" LIVEUPDATE_LATESTVERSION="Legújabb verzió" LIVEUPDATE_LATESTRELEASED="A legújabb verzió kiadási időpontja" LIVEUPDATE_DOWNLOADURL="Direkt letöltési URL" LIVEUPDATE_REFRESH_INFO="Frissítési információk újratöltése" LIVEUPDATE_DO_UPDATE="Frissítés a legújabb verzióra" LIVEUPDATE_FTP_REQUIRED="A Live Update-nek szüksége van az FTP használatára, hogy le tudja tölteni és feltelepíteni a frissítést, de te nem adtál meg FTP elérési adatokat a Joomla! globális beállításaiban.

    Kérjük, hogy add meg az FTP felhasználói nevet és jelszót, hogy folytatni lehessen a frissítést." LIVEUPDATE_FTP="FTP információk" LIVEUPDATE_FTPUSERNAME="FTP felhasználói név" LIVEUPDATE_FTPPASSWORD="FTP jelszó" LIVEUPDATE_DOWNLOAD_AND_INSTALL="A frissítés letöltése és telepítése" LIVEUPDATE_DOWNLOAD_FAILED="A frissítési csomag letöltése sikertelen. Ellenőrizd az átmeneti (temp) könyvtár írhatóságát vagy a globális beállításoknál engedélyezd a Joomla! FTP feltöltést." LIVEUPDATE_EXTRACT_FAILED="A frissítési csomag kitömörítése sikertelen. Kérjük, hogy a frissítést próbáld meg manuális módban." LIVEUPDATE_INVALID_PACKAGE_TYPE="Hibás csomagtípus. A frissítés nem folytatható." LIVEUPDATE_INSTALLEXT="Telepítés %s %s" LIVEUPDATE_ERROR="Hiba" LIVEUPDATE_SUCCESS="Sikeres" LIVEUPDATE_ICON_UNSUPPORTED="A Live Update nem támogatott" LIVEUPDATE_ICON_CRASHED="A Live Update összeomlott" LIVEUPDATE_ICON_CURRENT="A legfrissebb verzióval rendelkezel" LIVEUPDATE_ICON_UPDATES="FRISSÍTÉST TALÁLTAM! KATTINTS IDE." LIVEUPDATE_RELEASEINFO="Információk" LIVEUPDATE_RELEASENOTES="Kiadási megjegyzések" LIVEUPDATE_READMOREINFO="Bővebben"PK>\)#liveupdate/language/hu-HU/.htaccessnuW+A Order allow,deny Deny from all PK>\)#liveupdate/language/en-GB/.htaccessnuW+A Order allow,deny Deny from all PK>\s.liveupdate/language/en-GB/en-GB.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update is not supported on this server" LIVEUPDATE_NOTSUPPORTED_INFO="Your server indicates that Live Update is not supported. Please contact your host and ask them to enable the cURL PHP extension or activate the URL fopen() wrappers. If these are already enabled, please ask them to configure their firewall so that it allows access to the following URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="You can always update %s by visiting our site manually, downloading the latest release and installing it using Joomla!'s extension installer." LIVEUPDATE_STUCK_HEAD="Live Update has marked itself as crashed" LIVEUPDATE_STUCK_INFO="Live Update determined that it crashed the last time it tried to contact the update server. This usually indicates a host which actively blocks communications with external sites. If you would like to retry fetching the update information, please click the "Refresh update information" button below. If that results to a blank page, please contact your host and report this issue." LIVEUPDATE_ERROR_NEEDSAUTH="You have to supply your username/password or Download ID to the component's parameters before trying to upgrade to the latest release. The upgrade button will remain disabled until you do that." LIVEUPDATE_HASUPDATES_HEAD="A new version is available" LIVEUPDATE_NOUPDATES_HEAD="You already have the latest version" LIVEUPDATE_CURRENTVERSION="Installed version" LIVEUPDATE_LATESTVERSION="Latest version" LIVEUPDATE_LATESTRELEASED="Latest release date" LIVEUPDATE_DOWNLOADURL="Direct download URL" LIVEUPDATE_REFRESH_INFO="Refresh update information" LIVEUPDATE_DO_UPDATE="Update to the latest version" LIVEUPDATE_FTP_REQUIRED="Live Update determined that it needs to use FTP in order to download and install your update, but you have not saved your FTP login information in your Joomla! Global Configuration.

    Please provide the FTP username and password below to proceed with the update." LIVEUPDATE_FTP="FTP Information" LIVEUPDATE_FTPUSERNAME="FTP Username" LIVEUPDATE_FTPPASSWORD="FTP Password" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Download and install update" LIVEUPDATE_DOWNLOAD_FAILED="Downloading the update package failed. Make sure that your temp-directory is writable or that you have enabled Joomla!'s FTP options in your site's Global Configuration." LIVEUPDATE_EXTRACT_FAILED="Extracting the update package failed. Please try updating the extension manually." LIVEUPDATE_INVALID_PACKAGE_TYPE="Invalid package type. The update can not proceed." LIVEUPDATE_INSTALLEXT="Install %s %s" LIVEUPDATE_ERROR="Error" LIVEUPDATE_SUCCESS="Success" LIVEUPDATE_ICON_UNSUPPORTED="Live Update not supported" LIVEUPDATE_ICON_CRASHED="Live Update crashed" LIVEUPDATE_ICON_CURRENT="You have the latest version" LIVEUPDATE_ICON_UPDATES="UPDATE FOUND! CLICK TO UPDATE." LIVEUPDATE_RELEASEINFO="Information" LIVEUPDATE_RELEASENOTES="Release notes" LIVEUPDATE_READMOREINFO="Read more" LIVEUPDATE_NAGSCREEN_HEAD="WARNING! You are about to install an unstable version." LIVEUPDATE_NAGSCREEN_BODY="You are about to install an unstable version (%s - %s). Unstable versions may have undergone minimal or no testing and contain bugs which may have an serious adverse to the stability and functionality of your web site. If you are not sure about what you are about to do, please close this browser window. If you are absolutely certain you understand the risks involved with the installation of unstable releases, please click the button below to continue the installation of this unstable release." LIVEUPDATE_NAGSCREEN_BUTTON="I understand the risks. Continue with the installation." LIVEUPDATE_STABILITY_ALPHA="Alpha" LIVEUPDATE_STABILITY_BETA="Beta" LIVEUPDATE_STABILITY_RC="RC" LIVEUPDATE_STABILITY_STABLE="Stable"PK>\)#liveupdate/language/fr-FR/.htaccessnuW+A Order allow,deny Deny from all PK>\?b.liveupdate/language/fr-FR/fr-FR.liveupdate.ininuW+A; @package Live Update ; @copyright (c) 2010-2012 Nicholas K. Dionysopoulos ; @subpackage fr-FR.liveupdate.ini ; @description Traduction francophone - fr-FR ; @version 2.2.2 - 28.03.2012 ; @author Mihàly Marti alias Sarki - Joomlatutos.com ; @copyright AFUJ - Association Francophone des Utilisateurs de Joomla! ; @license http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL ; @note Client Administrator ; @note All ini files need to be saved as UTF-8 - No BOM LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update n'est pas pris en charge sur ce serveur" LIVEUPDATE_NOTSUPPORTED_INFO="Votre serveur indique que Live Update n'est pas supporté. Veuillez contactez votre hébergeur et lui demander d'activer l'extension PHP cURL ou activer la fonction fopen URL (). Si ceux-ci sont déjà activés, veuillez lui demander d'adapter le pare-feu pour qu'il autorise l'accès à l'URL suivante:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Vous pouvez toujours mettre à jour %s en visitant notre site manuellement, télécharger la dernière version et l'installer en utilisant l'extension d'installation de Joomla!" LIVEUPDATE_STUCK_HEAD="Live Update a échoué !" LIVEUPDATE_STUCK_INFO="Live Update a échoué la dernière fois qu'il a essayé de contacter le serveur de mise à jour. Cela signifie généralement que votre hébergeur bloque activement les communications avec des sites externes. Si vous souhaitez réessayer de récupérer les informations de mise à jour, cliquez sur le bouton " Rafraichir les informations de mise à jour ". S'il en résulte une page blanche, veuillez contactez votre hébergeur et lui signaler ce problème." LIVEUPDATE_ERROR_NEEDSAUTH="Pour activer le bouton de mise à jour, vous devez indiquer dans les paramètres d'Akeeba Backup l'ID de mise à jour fournie avec votre abonnement." LIVEUPDATE_HASUPDATES_HEAD="Une nouvelle version est disponible" LIVEUPDATE_NOUPDATES_HEAD="Vous avez la dernière version" LIVEUPDATE_CURRENTVERSION="Version installée" LIVEUPDATE_LATESTVERSION="Dernière version" LIVEUPDATE_LATESTRELEASED="Date de la dernière version " LIVEUPDATE_DOWNLOADURL="URL de téléchargement directe" LIVEUPDATE_REFRESH_INFO="Rafraîchir les informations de mise à jour" LIVEUPDATE_DO_UPDATE="Mettre à jour vers la dernière version" LIVEUPDATE_FTP_REQUIRED="Live Update a besoin d'utiliser la couche FTP pour télécharger et installer la mise à jour, mais vous n'avez pas sauvegardé vos informations de connexion FTP dans la 'Configuration' de Joomla!

    Veuillez fournir ci-dessous votre nom d'utilisateur et votre mot de passe FTP afin de procéder à la mise à jour." LIVEUPDATE_FTP="Informations FTP" LIVEUPDATE_FTPUSERNAME="Nom d'utilisateur FTP" LIVEUPDATE_FTPPASSWORD="Mot de passe FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Télécharger et installez la mise à jour" LIVEUPDATE_DOWNLOAD_FAILED="Le téléchargement du package de mise à jour a échoué. Assurez-vous que votre répertoire temporaire (tmp) est accessible en écriture et que vous avez activé les options FTP dans la configuration globale de Joomla!." LIVEUPDATE_EXTRACT_FAILED="L'extraction du package de mise à jour a échoué. Veuillez mettre à jour l'extension manuellement." LIVEUPDATE_INVALID_PACKAGE_TYPE="Le type du package n'est pas valide. La mise à jour ne peut pas être effectuée." LIVEUPDATE_INSTALLEXT="Installer %s %s" LIVEUPDATE_ERROR="Erreur" LIVEUPDATE_SUCCESS="Réussite" LIVEUPDATE_ICON_UNSUPPORTED="Live Update n'est pas pris en charge" LIVEUPDATE_ICON_CRASHED="Live Update a échoué!" LIVEUPDATE_ICON_CURRENT="Vous avez la dernière version" LIVEUPDATE_ICON_UPDATES="Mise à jour disponible! Cliquez pour mettre à jour."PK>\\X .liveupdate/language/pl-PL/pl-PL.liveupdate.ininuW+A; $Id: pl-PL.liveupdate.ini 632 2011-05-22 20:44:46Z nikosdion $ ; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later ; Translated by: Marek Kolka - 'zorro' - http://www.zorro.cal24.pl LIVEUPDATE_TASK_OVERVIEW="Aktualizacja" LIVEUPDATE_NOTSUPPORTED_HEAD="Aktualizacja nie jest obsługiwana na tym serwerze" LIVEUPDATE_NOTSUPPORTED_INFO="Twój serwer sygnalizuje, że Aktualizacja nie jest obsługiwana. Proszę skontaktować się administratorem hosta i poprosić o włączenie rozszerzenia cURL PHP albo aktywowanie URL fopen() wrappers. Jeżeli te są już włączone, poproś o skonfigurowanie firewalla tak, by umożliwił dostęp do następującego adresu URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Zawsze można zaktualizować %s odwiedzając naszeą witrynę ręcznie, pobranie najnowszej wersji i instalacji za pomocą instalatora rozszerzeń Joomla!." LIVEUPDATE_STUCK_HEAD="Aktualizacja oznaczona jako niepowodzenie" LIVEUPDATE_STUCK_INFO="Aktualizacja zaznacza o niepowodzeniu podczas ostatniej próby kontaktu z serwerem aktualizacji. To zwykle wskazuje na hosta, który aktywnie blokuje komunikacje z zewnętrznymi stronami. Jeśli chcesz ponowić próbę pobierania informacje o aktualizacji, kliknij przycisk "Odśwież informacje o aktualizacji" poniżej. Jeśli wynikiem jest pusta strona, proszę skontaktować się z administracją hosta i zgłosić ten problem." LIVEUPDATE_ERROR_NEEDSAUTH="Musisz podać swój login/hasło lub Download ID w parametrach komponentu przed próbą aktualizacji do najnowszej wersji. Przycisk aktualizacji pozostanie wyłączony do czasu aż to zrobisz." LIVEUPDATE_HASUPDATES_HEAD="Nowa wersja jest dostępna" LIVEUPDATE_NOUPDATES_HEAD="Masz już najnowszą wersję" LIVEUPDATE_CURRENTVERSION="Zainstalowana wersja" LIVEUPDATE_LATESTVERSION="Najnowsza wersja" LIVEUPDATE_LATESTRELEASED="Data najnowszej wersji" LIVEUPDATE_DOWNLOADURL="URL bezpośredniego pobierania" LIVEUPDATE_REFRESH_INFO="Odśwież informacje o aktualizacji" LIVEUPDATE_DO_UPDATE="Aktualizacja do najnowszej wersji" LIVEUPDATE_FTP_REQUIRED="Aktualizacja zaznacza, że musi korzystać z protokołu FTP w celu pobrania i zainstalowania aktualizacji, ale nie zostały wcześniej zapisane dane logowania FTP w twojej Konfiguracji Globalnej Joomla!.

    Prosimy o podanie nazwy użytkownika i hasła FTP poniżej, aby kontynuować aktualizację." LIVEUPDATE_FTP="Informacje FTP" LIVEUPDATE_FTPUSERNAME="Login FTP" LIVEUPDATE_FTPPASSWORD="Hasło FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Pobierz i zainstaluj aktualizację" LIVEUPDATE_DOWNLOAD_FAILED="Pobranie pakietu aktualizacji nie powiodło się. Upewnij się, że katalog tymczasowy jest zapisywalny lub, że masz włączoną opcję FTP Joomla! w Konfiguracji Globalnej twojej witryny." LIVEUPDATE_EXTRACT_FAILED="Rozpakowanie pakietu aktualizacji nie powiodło się. Proszę spróbować aktualizacji rozszerzenia ręcznie." LIVEUPDATE_INVALID_PACKAGE_TYPE="Nieprawidłowy typ pakietu. Aktualizacja nie może być kontynuowana." LIVEUPDATE_INSTALLEXT="Instalacja %s %s" LIVEUPDATE_ERROR="Błąd" LIVEUPDATE_SUCCESS="Powodzenie" LIVEUPDATE_ICON_UNSUPPORTED="Aktualizacja nie jest obsługiwana" LIVEUPDATE_ICON_CRASHED="Aktualizacja nie powiodła się" LIVEUPDATE_ICON_CURRENT="Masz najnowszą wersję" LIVEUPDATE_ICON_UPDATES="ZNALEZIONO AKTUALIZACJĘ! Kliknij!."PK>\)#liveupdate/language/pl-PL/.htaccessnuW+A Order allow,deny Deny from all PK>\)#liveupdate/language/el-GR/.htaccessnuW+A Order allow,deny Deny from all PK>\A=WW.liveupdate/language/el-GR/el-GR.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Απευθείας Ενημέρωση" LIVEUPDATE_NOTSUPPORTED_HEAD="Η Απευθείας Ενημέρωση δεν υποστηρίζεται από αυτόν τον διακομιστή" LIVEUPDATE_NOTSUPPORTED_INFO="Ο διακομιστής σας δείχνει ότι η Απευθείας Ενημέρωση δεν υποστηρίζεται. Παρακαλώ επικοινωνήστε με τον πάροχο φιλοξενίας σας και ζητήστε του να ενεργοποιήσει την επέκταση cURL της PHP ή τους URL fopen() wrappers. Εάν είναι ήδη ενεργοποιημένα, παρακαλώ ζητήστε του να ανοίξει το τείχος ασφαλείας ώστε να επιτρέπει την πρόσβαση στην παρακάτω διεύθυνση URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Μπορείτε πάντα να ενημερώστε το λογισμικό %s επισκεπτόμενοι τον ιστότοπό μας, κατεβάζοντας την τελευταία έκδοση και εγκαθιστόντας την με την εγκατάσταση εφαρμογών του Joomla!." LIVEUPDATE_STUCK_HEAD="Η Απευθείας Ενημέρωση ανίχνευσε αποτυχία λειτουργίας" LIVEUPDATE_STUCK_INFO="Η Απευθείας Ενημέρωση εντόπισε ότι η τελευταία απόπειρα επικοινωνίας με τον διακομιστή ενημερώσεων κατέληξε σε κόλλημα. Αυτό συνήθως υποδυκνείει έναν πάροχο φιλοξενίας που μπλοκάρει ενεργά τις προσπάθειες επικοινωνίας με εξωετρικούς ιστοχώρους. Εάν θα θέλατε να δοκιμάσετε να ξαναπροσπαθήσουμε να λάβουμε τις πληροφορίες ενημέρωσεις, παρακαλώ κάντε κλικ στο κουμπί "Ανανέωση πληροφοριών ενημερώσεων" πιο κάτω. Εάν αυτό οδηγήσει σε λευκή σελίδα, παρακαλώ επικοινωνήστε με τον πάροχο φιλοξενίας και αναφέρετε αυτό το πρόβλημα." LIVEUPDATE_ERROR_NEEDSAUTH="Πρέπει να εισάγετε το όνομα χρήστη και συνθηματικό ή το Αναγνωριστικό Μεταφόρτωσης στις παραμέτρους της εφαρμογής πριν προσπαθήσετε να αναβαθμίσετε στην τελευταία έκδοση. Το κουμπί ενημέρωσης θα παραμείνει ανενεργό έως ότου το κάνετε." LIVEUPDATE_HASUPDATES_HEAD="Μια νέα έκδοση είναι διαθέσιμη" LIVEUPDATE_NOUPDATES_HEAD="Έχετε ήδη την τελευταία έκδοση" LIVEUPDATE_CURRENTVERSION="Εγκατεστημένη έκδοση" LIVEUPDATE_LATESTVERSION="Τελευταία έκδοση" LIVEUPDATE_LATESTRELEASED="Ημερομηνία έκδοσης" LIVEUPDATE_DOWNLOADURL="Διεύθυνση απευθείας μεταφόρτωσης" LIVEUPDATE_REFRESH_INFO="Ανανέωση πληροφοριών ενημερώσεων" LIVEUPDATE_DO_UPDATE="Ενημέρωση στην τελευταία έκδοση" LIVEUPDATE_FTP_REQUIRED="Η Απευθείας Ενημέρωση εντόπισε ότι απαιτείται η χρήση FTP για να μεταφορτώσει και να εγκαταστήσει την ενημέρωσή σας, αλλά δεν έχετε σώσει τις πληροφορίες εισόδου στο FTP στις Γενικές Ρυθμίσεις του Joomla!.

    Παρακαλώ εισάγετε το όνομα χρήστη και το συνθηματικό για το FTP προκειμένου να προχωρήσετε με την ενημέρωση." LIVEUPDATE_FTP="Πληροφορίες FTP" LIVEUPDATE_FTPUSERNAME="Όνομα Χρήστη FTP" LIVEUPDATE_FTPPASSWORD="Συνθηματικό FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Μεταφόρτωση και εγκατάσταση ενημέρωσης" LIVEUPDATE_DOWNLOAD_FAILED="Η μεταφόρτωση του πακέτου ενημέρωσης απέτυχε. Παρακαλώ βεβαιωθείτε ότι ο κάταλογος προσωρινής αποθήκευσης είναι εγγράψιμος ή ότι έχετε ενεργοποιήσει τις επιλογές FTP στις Γενικές Ρυθμίσεις του ιστοχώρου σας." LIVEUPDATE_EXTRACT_FAILED="Η αποσυμπίεση του πακέτου αναβάθμισης απέτυχε. Παρακαλώ δοκιμάστε να εγκαταστήσετε την επέκταση χειροκίνητα." LIVEUPDATE_INVALID_PACKAGE_TYPE="Ο τύπος του πακέτου δεν είναι έγκυρος. Η αναβάθμιση δεν μπορεί να συνεχίσει." LIVEUPDATE_INSTALLEXT="Εγκατάσταση %s %s" LIVEUPDATE_ERROR="Σφάλμα" LIVEUPDATE_SUCCESS="Επιτυχία" LIVEUPDATE_ICON_UNSUPPORTED="Η Απευθείας Ενημέρωση δεν υποστηρίζεται" LIVEUPDATE_ICON_CRASHED="Η Απευθείας Ενημέρωση κόλλησε" LIVEUPDATE_ICON_CURRENT="Έχετε την τελευταία έκδοση" LIVEUPDATE_ICON_UPDATES="ΒΡΕΘΗΚΕ ΕΝΗΜΕΡΩΣΗ! ΚΑΝΤΕ ΚΛΙΚ ΓΙΑ ΑΝΑΒΑΘΜΙΣΗ." LIVEUPDATE_RELEASEINFO="Πληροφορίες" LIVEUPDATE_RELEASENOTES="Σημειώσεις έκδοσης" LIVEUPDATE_READMOREINFO="Διαβάστε περισσότερα"PK>\)#liveupdate/language/da-DK/.htaccessnuW+A Order allow,deny Deny from all PK>\<Ɯ .liveupdate/language/da-DK/da-DK.liveupdate.ininuW+A; Akeeba Live Update ; Copyright ©2011 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Opdatering" LIVEUPDATE_NOTSUPPORTED_HEAD="Live opdatering understøttes ikke af denne server" LIVEUPDATE_NOTSUPPORTED_INFO="Din server indikerer at Live opdatering ikke er understøttet. Kontakt venligst din udbyder og spørg dem om at aktivere cURL PHP udvidelsen eller aktivere URL fopen() wrappers. Hvis disse allerede er aktive, så spørg dem venligst om at konfigurere deres firewall, således at den tillader adgang til følgende :" LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Du kan altid opdatere %s ved at besøge vores hjemmeside manuelt og hente den seneste udgivelse og derefter installere den ved at bruge Joomla!'s udvidelsesinstalleren." LIVEUPDATE_STUCK_HEAD="Live opdatering melder at den gik ned" LIVEUPDATE_STUCK_INFO="Live opdatering opdagede at den gik ned sidste gang den prøvede at kontakte opdateringsserveren. Dette indikerer nomalt en udbyder der aktivt blokerer kommunikation med eksterne sider. Hvis du vil forsøge at hente opdateringsinformationen igen, klik da venligst på "Opdatér opdateringsinformation" herunder. Hvis det resulterer i en blank side, så kontakt venligst din udbyder og rapportér dette problem." LIVEUPDATE_ERROR_NEEDSAUTH="Du skal angive dit brugernavn/adgangskode eller Overførsel's ID i komponenten's indstillinger, før du kan opdatere til den seneste version. Opdateringsknappen vil forblive inaktiv indtil da." LIVEUPDATE_HASUPDATES_HEAD="En ny version er tilgængelig" LIVEUPDATE_NOUPDATES_HEAD="Du har allerede den seneste version" LIVEUPDATE_CURRENTVERSION="Installeret version" LIVEUPDATE_LATESTVERSION="Seneste version" LIVEUPDATE_LATESTRELEASED="Seneste udgivelsesdato" LIVEUPDATE_DOWNLOADURL="Direkte link" LIVEUPDATE_REFRESH_INFO="Opdatér opdateringsinformation" LIVEUPDATE_DO_UPDATE="Opdatér til seneste version" LIVEUPDATE_FTP_REQUIRED="Live opdatering har opdaget at den skal bruge FTP for at kunne overføre og installere din opdatering, men du har ikke gemt en FTP log ind information i din Joomla!'s konfiguration.

    Angiv venligst FTP brugernavn og adgangskode herunder for at fortsætte med opdateringen." LIVEUPDATE_FTP="FTP information" LIVEUPDATE_FTPUSERNAME="FTP Brugernavn" LIVEUPDATE_FTPPASSWORD="FTP Adgangskode" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Overfør og installér opdatering" LIVEUPDATE_DOWNLOAD_FAILED="Overførsel af opdateringspakken fejlede. Vær venligst sikker på der kan skrives til din midlertidige mappe og at du har aktiveret Joomla!'s FTP mulighed i Joomla!'s konfiguration." LIVEUPDATE_EXTRACT_FAILED="Udpakning af opdateringspakken fejlede. Opdatér venligst udvidelsen manuelt." LIVEUPDATE_INVALID_PACKAGE_TYPE="Ugyldig pakketype. Opdateringen kan ikke fortsætte." LIVEUPDATE_INSTALLEXT="Installér %s %s" LIVEUPDATE_ERROR="Fejl" LIVEUPDATE_SUCCESS="Korrekt" LIVEUPDATE_ICON_UNSUPPORTED="Live opdatering er ikke understøttet" LIVEUPDATE_ICON_CRASHED="Live opdatering gik ned" LIVEUPDATE_ICON_CURRENT="Du har den seneste version" LIVEUPDATE_ICON_UPDATES="OPDATERING FUNDET! OPDATER NU."PK>\NQQ.liveupdate/language/de-DE/de-DE.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later ; Translated by Niko Winckel - www.nik-o-mat.de LIVEUPDATE_TASK_OVERVIEW="Echtzeitaktualisierung" LIVEUPDATE_NOTSUPPORTED_HEAD="Die Echtzeitaktualisierung wird auf diesem Server nicht unterstützt" LIVEUPDATE_NOTSUPPORTED_INFO="Ihr Server zeigt an, dass die Echtzeitaktualisierung nicht unterstützt wird. Bitte kontaktieren Sie Ihren Anbieter und bitten ihn, die cURL-PHP-Erweiterung zu aktivieren oder die URL fopen() Wrapper. Sollten diese schon aktviert sein, bitten Sie ihn, die Firewall so zu konfigurieren, dass sie den Zugriff auf folgende URL zulässt:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Sie können immer aktualisieren %s indem Sie unsere Internetseite besuchen, die neueste Version herunterladen und ganz normal installieren." LIVEUPDATE_STUCK_HEAD="Die Echtzeitaktualisierung hat sich selbst als abgestürzt gemeldet" LIVEUPDATE_STUCK_INFO="Die Echtzeitaktualisierung hat festgestellt, dass sie beim letzten Versuch den Aktualisierungsserver zu erreichen abgestürzt ist. Dies deutet meist auf einen Anbieter hin, der die Kommunikation mit externen Servern blockiert. Sollten Sie die Aktulalisierungsinformationen nochmals abrufen wollen, klicken Sie bitte auf den Knopf "Aktualisierungsinformationen abrufen". Sollte dieser Versuch auf einer weißen Seite enden, melden Sie diesen Fehler ihrem Anbieter." LIVEUPDATE_ERROR_NEEDSAUTH="Bevor Sie eine Echtzeitaktualisierung durchführen können, müssen Sie Ihren Benutzernamen, das Passwort bzw. die Download-ID angeben. Der Aktualisierungsknopf wird solange ohne Funktion bleiben." LIVEUPDATE_HASUPDATES_HEAD="Es gibt eine neue Version" LIVEUPDATE_NOUPDATES_HEAD="Sie haben die aktuelle Version" LIVEUPDATE_CURRENTVERSION="Installierte Version" LIVEUPDATE_LATESTVERSION="Neueste Version" LIVEUPDATE_LATESTRELEASED="Neuestes Veröffentlichungsdatum" LIVEUPDATE_DOWNLOADURL="Direkte Download-URL" LIVEUPDATE_REFRESH_INFO="Aktualisierungsinformationen abrufen" LIVEUPDATE_DO_UPDATE="Auf die neueste Version aktualisieren" LIVEUPDATE_FTP_REQUIRED="Die Echtzeitaktualisierung hat festgestellt, dass FTP für die Aktualisierung und Installation verwednet werden muss. Sie haben aber noch keine FTP-Daten in der Joomla!-Konfiguraton angegeben.

    BItte geben Sie Ihre FTP-Daten ein, bevor Sie mit der Aktualisierung fortfahren." LIVEUPDATE_FTP="FTP Informationen" LIVEUPDATE_FTPUSERNAME="FTP Benutzername" LIVEUPDATE_FTPPASSWORD="FTP Passwort" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Aktualisierung herunterladen und installieren" LIVEUPDATE_DOWNLOAD_FAILED="Das Herunterladen des Aktualisierungspakets ist fehlgeschlagen. Bitte stellen Sie sicher, dass Ihr temp-Verzeichnis Schreibrechte besitzt und Sie Ihre FTP-Nutzerdaten in der Joomla!-Konfiguration angegeben haben." LIVEUPDATE_EXTRACT_FAILED="Das Auspacken des Aktualisierungspakets ist fehlgeschlagen. Bitte aktualisieren Sie die Erweiterung manuell." LIVEUPDATE_INVALID_PACKAGE_TYPE="Falscher Aktualisierungspakettyp. Die Aktualisierung kann nicht durchgeführt werden." LIVEUPDATE_INSTALLEXT="Installiere %s %s" LIVEUPDATE_ERROR="Fehler" LIVEUPDATE_SUCCESS="Erfolg" LIVEUPDATE_ICON_UNSUPPORTED="Echtzeitaktualisierung nicht unterstützt" LIVEUPDATE_ICON_CRASHED="Live Update abgestürzt" LIVEUPDATE_ICON_CURRENT="Sie haben die aktuelle Version" LIVEUPDATE_ICON_UPDATES="AKTUALISIERUNG GEFUNDEN! JETZT AKTUALISIEREN." LIVEUPDATE_RELEASEINFO="Information" LIVEUPDATE_RELEASENOTES="Infos zur Veröffentlichung" LIVEUPDATE_READMOREINFO="Weiterlesen"PK>\)#liveupdate/language/de-DE/.htaccessnuW+A Order allow,deny Deny from all PK>\)#liveupdate/language/fi-FI/.htaccessnuW+A Order allow,deny Deny from all PK>\u$ $ .liveupdate/language/fi-FI/fi-FI.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Live Update" LIVEUPDATE_NOTSUPPORTED_HEAD="Live Update ei ole tuettu tällä palvelimella" LIVEUPDATE_NOTSUPPORTED_INFO="Palvelimesi mukaan Live Update ei ole tuettu. Ota yhteyttä palveluntarjoajaasi ja pyydä heitä ottamaan cURL PHP laajennus tai URL fopen() lisätoiminnot käyttöön. Jos nämä ovat jo käytössä, pyydä heitä muuttamaan palomuurinsa asetuksia niin, että se sallii yhteydet seuraavaan osoitteeseen:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Voit aina päivittää %s lisäosan käymällä sivustollamme, lataamalla viimeisimmän version ja asentamalla sen Joomla! lisäosien asennuksella." LIVEUPDATE_STUCK_HEAD="Live Update on havainnut kaatuneensa" LIVEUPDATE_STUCK_INFO="Live Update on havainnut, että se kaatui edellisellä kerralla päivitystä hakiessaan. Yleensä tämä johtuu palvelimestä, joka pyrkii estämään yhteydet muille palvelimille. Jos haluat yrittää päivitystietojen hakemista uudelleen, napsauta "Päivitä päivitystiedot" painiketta. Jos tästä seuraa tyhjä sivu, ota yhteyttä palveluntarjoajaasi ja ilmoita ongelmasta." LIVEUPDATE_ERROR_NEEDSAUTH="Sinun täytyy syöttää pyydetty käyttäjätunniste komponentin asetuksissa ennenkuin voit päivittää viimeisimpään versioon. Päivityspainike pysyy estettynä siihen asti." LIVEUPDATE_HASUPDATES_HEAD="Uusi versio on saatavilla" LIVEUPDATE_NOUPDATES_HEAD="Sinulla on jo uusin versio" LIVEUPDATE_CURRENTVERSION="Asennettu versio" LIVEUPDATE_LATESTVERSION="Uusin versio" LIVEUPDATE_LATESTRELEASED="Uusimman julkaisupäivä" LIVEUPDATE_DOWNLOADURL="Suora latauslinkki" LIVEUPDATE_REFRESH_INFO="Päivitä päivitystiedot" LIVEUPDATE_DO_UPDATE="Päivitä uusimpaan versioon" LIVEUPDATE_FTP_REQUIRED="Live Update havaitsi, että se tarvitsee FTP yhteyden ladatakseen päivityksesi, mutta FTP tietoja ei ole asetettu Joomla! asetuksissa.

    Syötä FTP tunnus ja salasana päivittääksesi." LIVEUPDATE_FTP="FTP tiedot" LIVEUPDATE_FTPUSERNAME="FTP käyttäjänimi" LIVEUPDATE_FTPPASSWORD="FTP salasana" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Lataa ja asenna päivitys" LIVEUPDATE_DOWNLOAD_FAILED="Päivityspaketin lataaminen epäonnistui. Varmista, että temp-kansioom voi kirjoittaa tai Joomla! FTP toiminnot on sallittu sivuston asetuksissa." LIVEUPDATE_EXTRACT_FAILED="Päivityspaketin purkaminen epäonnistui. Yritä päivittää lisäosa manuaalisesti." LIVEUPDATE_INVALID_PACKAGE_TYPE="Paketin tyyppi ei kelpaa. Päivitystä ei voida tehdä." LIVEUPDATE_INSTALLEXT="Asenna %s %s" LIVEUPDATE_ERROR="Virhe" LIVEUPDATE_SUCCESS="Onnistui" LIVEUPDATE_ICON_UNSUPPORTED="Live Update ei tuettu" LIVEUPDATE_ICON_CRASHED="Live Update kaatui" LIVEUPDATE_ICON_CURRENT="Sinulla on uusin versio" LIVEUPDATE_ICON_UPDATES="Päivitys löydetty! Napsauta päivittääksesi." LIVEUPDATE_RELEASEINFO="Tietoja" LIVEUPDATE_RELEASENOTES="Julkaisutiedot" LIVEUPDATE_READMOREINFO="Lue lisää"PK>\`wכ .liveupdate/language/nb-NO/nb-NO.liveupdate.ininuW+A; Akeeba Live Update ; Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later LIVEUPDATE_TASK_OVERVIEW="Direkteoppdatering" LIVEUPDATE_NOTSUPPORTED_HEAD="Direkteoppdatering støttes ikke på denne serveren." LIVEUPDATE_NOTSUPPORTED_INFO="Din server indikerer at direkteoppdatering ikke støttes. Kontakt din leverandør og spør om de kan aktivere cURL PHP eller aktivere URL fopen(). Dersom disse allerede er aktivert kan du spørre om de kan konfigurere sin brannmur slik at den gir tilgang til følgende URL:" LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Du kan alltid oppdatere %s manuelt ved å besøke vår side. Laste ned og installer den nyeste versjonen ved hjelp av Joomlas installasjonsfunksjon." LIVEUPDATE_STUCK_HEAD="Direkteoppdateringen har merket seg selv som krasjet." LIVEUPDATE_STUCK_INFO="Direkteoppdatering avdekket at den krasjet forrige gang den forsøkte å kontakte oppdateringsserveren. Dette betyr vanligvis at du benytter en leverandør av netthotell som aktivt blokkerer kommunikasjon med eksterne nettsteder. Hvis du ønsker å forsøke på nytt å hente oppdateringsinformasjonen, klikk på knappen "_QQ_"Oppdater informasjon"_QQ_" nedenfor. Dersom dette resulterer i en blank side bør du kontakte din leverandør av netthotell for å melde fra om dette problemet." LIVEUPDATE_ERROR_NEEDSAUTH="Du må oppgi ditt brukernavn/passord eller nedlastnings-id i komponentens innstillinger før du forsøker å oppdatere til siste versjon. Oppdateringsknappen vil forbli deaktivert inntil du gjøre dette." LIVEUPDATE_HASUPDATES_HEAD="En ny versjon er tilgjengelig" LIVEUPDATE_NOUPDATES_HEAD="Du har allerede den nyeste versjonen" LIVEUPDATE_CURRENTVERSION="Installert versjon" LIVEUPDATE_LATESTVERSION="Nyeste versjon" LIVEUPDATE_LATESTRELEASED="Siste utgivelsesdato" LIVEUPDATE_DOWNLOADURL="Nedlastingsadresse" LIVEUPDATE_REFRESH_INFO="Oppdater informasjon" LIVEUPDATE_DO_UPDATE="Oppdater til siste versjon" LIVEUPDATE_FTP_REQUIRED="Direkteoppdatering har avdekket at den må bruke FTP, for å laste ned og installere oppdateringen, men du har ikke angitt og lagret FTP-informasjonen under nettstedets globale konfigurasjon .

    Du må oppgi FTP-brukernavn og passord nedenfor for å kunne fortsette med oppdateringen." LIVEUPDATE_FTP="FTP-informasjon" LIVEUPDATE_FTPUSERNAME="FTP-brukernavn" LIVEUPDATE_FTPPASSWORD="FTP-passord" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Last ned og installer oppdateringen" LIVEUPDATE_DOWNLOAD_FAILED="Nedlasting av oppdateringspakke mislyktes. Påse at temp-mappen er skrivbar, eller at du har aktivert Joomlas FTP-innstillinger under nettstedets globale konfigurasjon." LIVEUPDATE_EXTRACT_FAILED="Utpakking av oppdateringspakken mislyktes. Forsøk å oppdatere utvidelsen manuelt." LIVEUPDATE_INVALID_PACKAGE_TYPE="Ugyldig pakketype. Oppdateringen kan ikke fortsette." LIVEUPDATE_INSTALLEXT="Installer %s %s" LIVEUPDATE_ERROR="Feil" LIVEUPDATE_SUCCESS="Vellykket" LIVEUPDATE_ICON_UNSUPPORTED="Direkteoppdatering støttes ikke." LIVEUPDATE_ICON_CRASHED="Direkteoppdatering krasjet." LIVEUPDATE_ICON_CURRENT="Du har den nyeste versjonen." LIVEUPDATE_ICON_UPDATES="OPPDATERING FUNNET! KLIKK FOR Å OPPDATERE."PK>\)#liveupdate/language/nb-NO/.htaccessnuW+A Order allow,deny Deny from all PK>\- .liveupdate/language/pt-BR/pt-BR.liveupdate.ininuW+A; Akeeba Live Update ; Copyright ©2011 Nicholas K. Dionysopoulos / AkeebaBackup.com ; Licensed under the GNU LGPLv3 or later ; Translated by gnumax - www.gnumax.org - 15-05-2011 LIVEUPDATE_TASK_OVERVIEW="Actualização ao vivo" LIVEUPDATE_NOTSUPPORTED_HEAD="A atualização ao vivo não esta suportada neste servidor" LIVEUPDATE_NOTSUPPORTED_INFO="O servidor indica que Atualização ao Vivo não é compatível. Entre em contato com seu Hosting e solicite que permitam a extensão cURL PHP ou desativem o URL fopen(). Se estão já desabilitadas, por favor, solicite que configurem seu firewall para que permita o acesso do seguinte endereço URL:"; LIVEUPDATE_NOTSUPPORTED_ALTMETHOD="Sempre é possível atualizar %s, visite nosso site manualmente, baixe a última versão e instale usando o instalador de extensões Joomla!." LIVEUPDATE_STUCK_HEAD="Actualização ao Vivo marcou como se danificou" LIVEUPDATE_STUCK_INFO="Live Update determinou que foi danificado a última vez que tratou de contatar com o servidor de atualizações. Isto d emodo geral indica uma série de bloqueios ativos de comunicação com sites externos. Se deseja voltar a tentar buscar a informação de atualização, por favor clique em 'Atualizar informação de atualização' no botão abaixo. Em caso de ontér uma página em branco como resultado, por favor contate com seu Hosting e informe sobre este tema." LIVEUPDATE_ERROR_NEEDSAUTH="Tem que facilitar seu nome de usuário/senha ou ID de download nos parâmetros do componente antes de tentar atualizar a última versão. O botão de atualização permanecerá desativado até que não realize esta ação." LIVEUPDATE_HASUPDATES_HEAD="Existe uma versão nova disponível" LIVEUPDATE_NOUPDATES_HEAD="Você já tem a última versão" LIVEUPDATE_CURRENTVERSION="Versão instalada" LIVEUPDATE_LATESTVERSION="Última versão" LIVEUPDATE_LATESTRELEASED="Data do último lançamento" LIVEUPDATE_DOWNLOADURL="URL de download direto" LIVEUPDATE_REFRESH_INFO="Refrescar a informação de atualização" LIVEUPDATE_DO_UPDATE="Atualizar a última versão" LIVEUPDATE_FTP_REQUIRED="Live Update determina que é necessário o uso de FTP para baixar e instalar a atualização, mas não guardou sua informação de acesso FTP em seu site Joomla!, em Configuração Global.

    Indique o nome de usuário FTP e senha para continuar com a atualização." LIVEUPDATE_FTP="Informação FTP" LIVEUPDATE_FTPUSERNAME="Usuário FTP" LIVEUPDATE_FTPPASSWORD="Senha FTP" LIVEUPDATE_DOWNLOAD_AND_INSTALL="Baixar e instalar a atualização" LIVEUPDATE_DOWNLOAD_FAILED="O download do pacote de atualização falhou. Assegure-se que seu diretório /tmp pode escrever ou que habilitou as opções de FTP na Configuração Global do seu site Joomla!" LIVEUPDATE_EXTRACT_FAILED="Falhou a descompressão do pacote de atualização. Por favor, tente atualizar a extensão manualmente." LIVEUPDATE_INVALID_PACKAGE_TYPE="Tipo de pacote não é válido. A atualização não pode continuar." LIVEUPDATE_INSTALLEXT="Instale %s %s" LIVEUPDATE_ERROR="Erro" LIVEUPDATE_SUCCESS="Êxito" LIVEUPDATE_ICON_UNSUPPORTED="Atualização ao Vivo não suportadactualización en Vivo no soportada" LIVEUPDATE_ICON_CRASHED="Atualização ao Vivo foi danificada" LIVEUPDATE_ICON_CURRENT="Você tem a última versão" LIVEUPDATE_ICON_UPDATES="ATUALIZAÇÃO ENCONTRADA! CLIQUE PARA ATUALIZAR." LIVEUPDATE_RELEASEINFO="Informações" LIVEUPDATE_RELEASENOTES="Notas de lançamento" LIVEUPDATE_READMOREINFO="Leia mais"PK>\)#liveupdate/language/pt-BR/.htaccessnuW+A Order allow,deny Deny from all PK>\=u JJliveupdate/liveupdate.phpnuW+A * * One-click updater for Joomla! extensions * Copyright (C) 2011 Nicholas K. Dionysopoulos / AkeebaBackup.com * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ defined('_JEXEC') or die(); require_once dirname(__FILE__).'/classes/abstractconfig.php'; require_once dirname(__FILE__).'/config.php'; class LiveUpdate { /** @var string The current version of Akeeba Live Update */ public static $version = '1.1'; /** * Loads the translation strings -- this is an internal function, called automatically */ private static function loadLanguage() { // Load translations $basePath = dirname(__FILE__); $jlang = JFactory::getLanguage(); $jlang->load('liveupdate', $basePath, 'en-GB', true); // Load English (British) $jlang->load('liveupdate', $basePath, $jlang->getDefault(), true); // Load the site's default language $jlang->load('liveupdate', $basePath, null, true); // Load the currently selected language } /** * Handles requests to the "liveupdate" view which is used to display * update information and perform the live updates */ public static function handleRequest() { // Load language strings self::loadLanguage(); // Load the controller and let it run the show require_once dirname(__FILE__).'/classes/controller.php'; $controller = new LiveUpdateController(); $controller->execute(JRequest::getCmd('task','overview')); $controller->redirect(); } /** * Returns update information about your extension, based on your configuration settings * @return stdClass */ public static function getUpdateInformation($force = false) { require_once dirname(__FILE__).'/classes/updatefetch.php'; $update = new LiveUpdateFetch(); $info = $update->getUpdateInformation($force); $hasUpdates = $update->hasUpdates(); $info->hasUpdates = $hasUpdates; $config = LiveUpdateConfig::getInstance(); $extInfo = $config->getExtensionInformation(); $info->extInfo = (object)$extInfo; return $info; } public static function getIcon($config=array()) { // Load language strings self::loadLanguage(); $defaultConfig = array( 'option' => JRequest::getCmd('option',''), 'view' => 'liveupdate', 'mediaurl' => JURI::base().'components/'.JRequest::getCmd('option','').'/liveupdate/assets/' ); $c = array_merge($defaultConfig, $config); $url = 'index.php?option='.$c['option'].'&view='.$c['view']; $img = $c['mediaurl']; $updateInfo = self::getUpdateInformation(); if(!$updateInfo->supported) { // Unsupported $class = 'liveupdate-icon-notsupported'; $img .= 'nosupport-32.png'; $lbl = JText::_('LIVEUPDATE_ICON_UNSUPPORTED'); } elseif($updateInfo->stuck) { // Stuck $class = 'liveupdate-icon-crashed'; $img .= 'nosupport-32.png'; $lbl = JText::_('LIVEUPDATE_ICON_CRASHED'); } elseif($updateInfo->hasUpdates) { // Has updates $class = 'liveupdate-icon-updates'; $img .= 'update-32.png'; $lbl = JText::_('LIVEUPDATE_ICON_UPDATES'); } else { // Already in the latest release $class = 'liveupdate-icon-noupdates'; $img .= 'current-32.png'; $lbl = JText::_('LIVEUPDATE_ICON_CURRENT'); } return ''; } }PK>\?uuliveupdate/index.htmlnuW+APK>\$_ liveupdate/LICENSE.txtnuW+A============================================================================== Akeeba Live Update - One-click updates for Joomla! extensions Copyright ©2011 Nicholas K. Dionysopoulos / AkeebaBackup.com Live Update is a sub-component to assist you in providing one-click updates for your Joomla! 1.5 and Joomla! 1.6 extensions. It is licensed under the GNU Lesser General Public License version 3 or, at your option, any later version published by the Free Software Foundation. You can use it royalty- free in any Joomla! extension, Free or Proprietary. The full text of its license is provided below. ============================================================================== GNU LESSER GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. This version of the GNU Lesser General Public License incorporates the terms and conditions of version 3 of the GNU General Public License, supplemented by the additional permissions listed below. 0. Additional Definitions. As used herein, "this License" refers to version 3 of the GNU Lesser General Public License, and the "GNU GPL" refers to version 3 of the GNU General Public License. "The Library" refers to a covered work governed by this License, other than an Application or a Combined Work as defined below. An "Application" is any work that makes use of an interface provided by the Library, but which is not otherwise based on the Library. Defining a subclass of a class defined by the Library is deemed a mode of using an interface provided by the Library. A "Combined Work" is a work produced by combining or linking an Application with the Library. The particular version of the Library with which the Combined Work was made is also called the "Linked Version". The "Minimal Corresponding Source" for a Combined Work means the Corresponding Source for the Combined Work, excluding any source code for portions of the Combined Work that, considered in isolation, are based on the Application, and not on the Linked Version. The "Corresponding Application Code" for a Combined Work means the object code and/or source code for the Application, including any data and utility programs needed for reproducing the Combined Work from the Application, but excluding the System Libraries of the Combined Work. 1. Exception to Section 3 of the GNU GPL. You may convey a covered work under sections 3 and 4 of this License without being bound by section 3 of the GNU GPL. 2. Conveying Modified Versions. If you modify a copy of the Library, and, in your modifications, a facility refers to a function or data to be supplied by an Application that uses the facility (other than as an argument passed when the facility is invoked), then you may convey a copy of the modified version: a) under this License, provided that you make a good faith effort to ensure that, in the event an Application does not supply the function or data, the facility still operates, and performs whatever part of its purpose remains meaningful, or b) under the GNU GPL, with none of the additional permissions of this License applicable to that copy. 3. Object Code Incorporating Material from Library Header Files. The object code form of an Application may incorporate material from a header file that is part of the Library. You may convey such object code under terms of your choice, provided that, if the incorporated material is not limited to numerical parameters, data structure layouts and accessors, or small macros, inline functions and templates (ten or fewer lines in length), you do both of the following: a) Give prominent notice with each copy of the object code that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the object code with a copy of the GNU GPL and this license document. 4. Combined Works. You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following: a) Give prominent notice with each copy of the Combined Work that the Library is used in it and that the Library and its use are covered by this License. b) Accompany the Combined Work with a copy of the GNU GPL and this license document. c) For a Combined Work that displays copyright notices during execution, include the copyright notice for the Library among these notices, as well as a reference directing the user to the copies of the GNU GPL and this license document. d) Do one of the following: 0) Convey the Minimal Corresponding Source under the terms of this License, and the Corresponding Application Code in a form suitable for, and under terms that permit, the user to recombine or relink the Application with a modified version of the Linked Version to produce a modified Combined Work, in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source. 1) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (a) uses at run time a copy of the Library already present on the user's computer system, and (b) will operate properly with a modified version of the Library that is interface-compatible with the Linked Version. e) Provide Installation Information, but only if you would otherwise be required to provide such information under section 6 of the GNU GPL, and only to the extent that such information is necessary to install and execute a modified version of the Combined Work produced by recombining or relinking the Application with a modified version of the Linked Version. (If you use option 4d0, the Installation Information must accompany the Minimal Corresponding Source and Corresponding Application Code. If you use option 4d1, you must provide the Installation Information in the manner specified by section 6 of the GNU GPL for conveying Corresponding Source.) 5. Combined Libraries. You may place library facilities that are a work based on the Library side by side in a single library together with other library facilities that are not Applications and are not covered by this License, and convey such a combined library under terms of your choice, if you do both of the following: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities, conveyed under the terms of this License. b) Give prominent notice with the combined library that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 6. Revised Versions of the GNU Lesser General Public License. The Free Software Foundation may publish revised and/or new versions of the GNU Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library as you received it specifies that a certain numbered version of the GNU Lesser General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that published version or of any later version published by the Free Software Foundation. If the Library as you received it does not specify a version number of the GNU Lesser General Public License, you may choose any version of the GNU Lesser General Public License ever published by the Free Software Foundation. If the Library as you received it specifies that a proxy can decide whether future versions of the GNU Lesser General Public License shall apply, that proxy's public statement of acceptance of any version is permanent authorization for you to choose that version for the Library.PK>\}1%ZZ liveupdate/assets/liveupdate.cssnuW+A/** * @package LiveUpdate * @copyright Copyright (c)2010-2012 Nicholas K. Dionysopoulos / AkeebaBackup.com * @license GNU LGPLv3 or later */ @CHARSET "UTF-8"; .icon-48-liveupdate { background-image: url(liveupdate-48.png) } var { font-style: italic; font-weight: bold; } p.liveupdate-url { font-family: "Lucida Sans Mono", "Courier New", Courier, monospace; } div.liveupdate-notsupported, div.liveupdate-stuck { border: thin solid #990000; background: #fff0f0; padding: 1em; color: #330000; -moz-border-radius: 10px; -webkit-border-radius: 10px; -border-radius: 10px; -moz-box-shadow: 5px 5px 5px #f88; -webkit-box-shadow: 5px 5px 5px #f88; box-shadow: 5px 5px 5px #f88; } div.liveupdate-notsupported h3, div.liveupdate-stuck h3 { background: transparent url("fail-24.png") top left no-repeat; min-height: 24px; padding: 2px 0 0 28px; font-size: large; color: red; text-shadow: 1px 1px 6px #cccc00; } div.liveupdate-hasupdates { border: thin solid #999900; background: #fffff0; padding: 1em; color: #333300; -moz-border-radius: 10px; -webkit-border-radius: 10px; -border-radius: 10px; -moz-box-shadow: 5px 5px 5px #ff8; -webkit-box-shadow: 5px 5px 5px #ff8; box-shadow: 5px 5px 5px #ff8; } div.liveupdate-hasupdates h3 { background: transparent url("warn-24.png") top left no-repeat; min-height: 24px; padding: 2px 0 0 28px; font-size: large; color: #660; text-shadow: 1px 1px 6px #ffff00; } div.liveupdate-noupdates { border: thin solid #009900; background: #f0fff0; padding: 1em; color: #003300; -moz-border-radius: 10px; -webkit-border-radius: 10px; -border-radius: 10px; -moz-box-shadow: 5px 5px 5px #8f8; -webkit-box-shadow: 5px 5px 5px #8f8; box-shadow: 5px 5px 5px #8f8; } div.liveupdate-noupdates h3 { background: transparent url("ok-24.png") top left no-repeat; min-height: 24px; padding: 2px 0 0 28px; font-size: large; color: #060; text-shadow: 1px 1px 6px #00ff00; } div.liveupdate-infotable { width: 620px; margin: auto auto; padding: 2px; border: thin solid #333; background: #fefefe; -moz-border-radius: 5px; -webkit-border-radius: 5px; -border-radius: 5px; } div.liveupdate-infotable .row0 { background: #fcfcfc } div.liveupdate-infotable .row1 { background: #f0f0f0 } div.liveupdate-row { padding: 5px 1px } span.liveupdate-label { display: inline-block; width: 200px; font-weight: bold; } span.liveupdate-data { display: inline-block; width: 400px; overflow: none } p.liveupdate-buttons { text-align: center; margin: 1em; } p.liveupdate-error-needsauth { margin: 1em; background: #ffcccc; border: medium solid #ff0000; color: #660000; font-size: large; font-weight: bold; padding: 1em; text-align: center; text-shadow: 1px 1px 2px white; -moz-border-radius: 10px; -webkit-border-radius: 10px; -border-radius: 10px; -moz-box-shadow: 5px 5px 5px #f88; -webkit-box-shadow: 5px 5px 5px #f88; box-shadow: 5px 5px 5px #f88; } p.liveupdate-poweredby { font-size: 8pt; color: silver; margin: 1em 0 0.5em 0 } p.liveupdate-poweredby a { color: silver; } div.liveupdate-ftp p { margin: 1em 2em; line-height: 140%; border: thin solid #00c; padding: 0.5em; color: #006; background-color: #f0f0ff; font-size: 12pt; text-shadow: 1px 1px 3px silver } #nagscreen { margin: 1em; background: #ffcccc; border: medium solid #ff0000; color: #660000; font-size: large; font-weight: bold; padding: 1em; text-align: center; text-shadow: 1px 1px 2px white; -moz-border-radius: 10px; -webkit-border-radius: 10px; -border-radius: 10px; -moz-box-shadow: 5px 5px 5px #f88; -webkit-box-shadow: 5px 5px 5px #f88; box-shadow: 5px 5px 5px #f88; }PK>\vpVPPliveupdate/assets/update-32.pngnuW+APNG  IHDR szz pHYs  IDATX W[lUΜK QoR"b0& /ĤM|'>ht4BbL4'i(!1z#U Жnﻳ3?̜}9ZXu9 Ӿ %LČ.6';D V6l@p0 @~Hr4VoPJRml@2lM8A Ric TTATPB:`#Ќ~؋ %"\F<-!cfAdԈp eY(S$ -@ a+$bZ5^TgyM55)NK l" Y- RfR00k8D@!2 k I !]Q9P(EU~k"۰nk Ib#?j?ucp<0=lm)UCxmIh%N~ #UPn:)=ROH<Ⱦ;iu+`Aj&$܆E޳Bŝ 5R2Տo빼:tv R#v9FD`2@qGTm@Ŷr}Q G<Պ-}Z|hM"<'(eR(w LE[n!^+1Uu=MkTGv)}rQBX⏂XkdS]T-&|`Q.`S[v7ٛwΘ WptE׌1  %SJq޼]:V҉r;K ˰Ps^|ܝHQne"fiqŒtKx`+OEYքp D?F VSE`$a>6fn?s=[:dH0HˎOt g8w"dO(@Iج|vSK(1$ZPZ$>p6iH! z1F/C6£/ < Iy㐴пXPLҁ($E_~mz]gU$IyCV 4к>QAT!l>"Ew/[HbH+h{uwXz2$sBUqVPPa]x9BI//3N4|[\5r#ZSꑱHy2Jc $^o;'B ǞMsDgGϋy1>.Do.X$a 'fR^'CT$1e*M 2 LJoI?px=1 A<(Xnc_a |cNw[_pF@DŽp_U$-VJ|P^$a i=C R,,[UxYDJ|3xƜpHyzΘ5+@.o/$>L6XX籽 ؅c[±m':+0jDDZwF^-ʷk xSm4‚IENDB`PK>\q liveupdate/assets/current-32.pngnuW+APNG  IHDR szz pHYs  IDATX ŖPT}쏷n!AMaC$m"t&hLm"2)d4i)G8qL?Ѡ rYDxxwo}dA4zww;s?s]D){ٸ{ g.V0t-ݺ u u+XwE܀opO=_f<P h^o+*g7`sH9Dk(ay'a,|\T*{*ti_PjI`v~χ7Sp*(~//bZR~dJG/3ჴy%Д!>yU2̹+ޠ mf85?a*:Arv_l ^M[YM3RF^pjtEZXo?wp|~dݮ YƲ~V=SZ"aT( .o|pVBiGDr/lr'ďA}]θ]W`5(Nj|~SsU=;R^1<}}źy߅ճQJ|αwoz_s~?ïEnA5;O;:}:FGm錄mO@pÍcw2i`Αl1\2;\\liveupdate/assets/fail-24.pngnuW+APNG  IHDRw= pHYs  IDATH mVmlS~ιc;q $1 #FƠ&Ԋ jGºǴNU'X;m մ`CZʀB)]nI khY~{P*Z^sy>ǹ|N"qh@ )&0\>I4COa%JXLK|FzJGm-=ֶ 5XWf.71;4tm'./]1 tK^b۾jݱEx҃&@\ܸ]_.&u)o ~pWUuQ(L6L-`< p??:[x;$>^/Knή{kxv`&|6+Xʺe)TܼO tmv>||U>~Y͏}s]jU t+B!q̐ǯ~φe& Y8,L,M-m}eΝP__z֤WNoܨQ&NS%zd3Q;ܹ^M}a .nJ<>ljR6/ȃ H"Cjewܒk+ғhj#dlvq3؇ IvF7F131ʊ%E^63#c7.>5)Ē6.Y{unbT}6ˈ ~\P3jHzũk#-gο1mˎ~0#OX-7DѨTi#%sfͣy/G LcCCp3ł+ဪ^w\G匪ֵU25>+SmXSlٵ\) ϡ+:aC7By$3sx|ӎ-Pmv%[TQSj{ MljhR|o2{脳 -6Rs"IUmg)քÕ SI"6b9(HìKYyiYE'?lCvӎl'K.dTUYīw+7 v.,UH$9 #fvipA9O4zӲ.VfBkCCkyD\ǭRҬv$|YL.*A)CD"^tjX5vFt_ dr Ҫb>4?L}}gɱ~E*Ր+f$odN=\M,+0ɻ [+7ǵ~RL}kDY=:Y~kWṲ;A 4ixytoSHSeMM[W@pW[bme=+H;,#{ E&v?^SBi&qn9Pu2B>#=C)lztM}cf"=Đ>A>뾔Kkifi9ѠS0C!Ţ*RD[Ig谬aV;[|nX,?Ϯ[hFCM %7řŕ8\8As¹|7w %DS-Ȗ{MK4dtŵ@vEo>bpҀ͓ww D:`50P.\^|_. 4Ʒ$;GIENDB`PK>\^ONliveupdate/assets/warn-24.pngnuW+APNG  IHDRw= pHYs  NIDATH UkUv[kX`PM . >Pė}RD((m!- FPb 6`c-5MnwMi?ffx؝;ss(c ԇ*ܾ6l՚,ޓ( v3pE>ː BF.>Tnbש4uX4a8M`߃RhL<CP ]$>U`~`卌ϤiRHMNFe(o.9\Ь X 1= Vp%z;gTŁPtCmQ[Ϋ*YǦgUgvKƇ,=s0_Y6UsFe1rKP2K ;Q[ɿ2nM3A ]%Xghpg/!j A2=K_ZU(jW74)6U4#dp@)'@4lvU) i+]Śm4L@Qssj6nvZ+_ձi%*d`b8֏7g@Y6U NL5S;*f#;u[;-3"96 o9ޓ9TattQ#I6BﱁdFnvy.Bnͣf$Z q.]f YXA8A&2}S@~#q|ER{9|;zܸ m 5,U0Ġo ~=t0"Gκsѿr*!h"x9p@~1>)6sWW?E_t5aK`K)8އBm:Cb|Mz9cv>3xO=G(z~b'# -vH5k.jPӱ5Af+ox a >ۋGY{ǰ\km‹i)e?uLd7}W<ijqcX痢Ki(tq<,d,JޅE| 0RHl ]|ĵfA͚q Yڛ!IENDB`PK>\^^#liveupdate/assets/liveupdate-48.pngnuW+APNG  IHDR00W pHYs  IDAThZ p\ř1}K6Ɩm"A. %d@@%Y6VEq2+ !˧oɺl3:~G11ð=͌}W̨BI,k3ݧ敃Np.TZ$\L:('1L TW\o?TxfZ8_W}A /\zVۉcKuJd!Q.*p< zH&og+|~"@  zn'V{|qiB425"$ nLu`T=A)?ڦ{<5zztQMʙ/=W' ltZP, 0v3c~NE\R&gx_'IfbEpQ# \Tm8l)Pqݍc7Bwy XQ-W9%??,"J>P;$7u f8GiJDJ^v61"jwةA HIHĒYNIr=bf kav-Mgn&%/]4w4$ZLqsl*idOArnL|/SGLQdydrd:h h^{ẄKxX>PrkUj:.9ʼOtxKT{lH |-+6h~&9ڲÉ:czN++o#< y؃}^14np'uC HBkJr?hTJHr[ ܲT6"g NQa -j ^)? ~-ȉdJ  <#@[| VUII/TsG{6Dn[2`ףCv[/R9ԗף}b?\=%x69nBpS E<: B}):>O,]\&/~a\°~5kPU,YC-ίzWOd w{)F*/.Hǿw<֋fTⲢma3ch| zgr \!~̀y$7%Flw.ާ_Xz ;RHV_ `eQ >pWLnZ\Smc=ONv3KeYgop0 )/)1KqVնΩNIn R!p&`3SJH]bc%P/ ^"ֈӑ !/7VZg Fnq&J2w;H$d:g>1i,07w}[^a'lM%ߪj˾?7t+fddTI2E^(TBͳs&)!2G~(ږ%}#\g#BQpn38Gnw_?0I|M𣹞?(g,xto -1wP!Wk&yY)GgosPHb! XY: @)>9t詿Xꡍ/=im&c;%!7moTDt_!XFXXZdMA@Bfp\ѸB/'n|+T阛c1`+{WO$]YTB<MeH<=ZG\J ! aSe+$aԿ0xgY뭦]gS =EΥe`=Ej 0+yU|w i.L+6 CBH Tf(%a3x-TZ?`fGعj]?̟z˺ǃ'sCBiЀ76M,7:T`Vbn մkL B*Rй$mPӌ3ffISOIFoۼ) 3 ~­,!lkCCqe L]x¢8xmY@lC^u!qhԈɿq[Fhu}݀|OΒ]dgC>[h|Lzb[پy{~Е,$֪XS*X/| 60^^wq:YD:,<Xlњf_,yY~IqAnCJQ,k.D|/-_ues3U%k~xd{8KC!~G=yx0bK=zLKZ/%ˎ].5tuɦ*Há!_Į wTx|d Sl۲hKNCM&6pg7\K+xUw޿G葖 [Cg_FUP%bd C&9>cH)SGt[i*UG<3oYkz{C{ޕUiSr@M8Cfxe7I/ 9ۄĠ("+&O͡C[Pq#҄$ #0 Aնm xd]sfxsMD?XfA(ULc]&IZ^OKR++Ww׆wmw׶oizS كJCjG* odj[ ƺ*#uGcQ<>nD҃rovws1ɉ{l,|ub-+2w~:5UB"ረgD*}}  dz|0 p¼rHhqc 0SԠz"[۱g Хٖ_UU bZʹZq;IʘCo$Si/Y,GN\UUޒakͥ avЛ]$⏂HʃW:>ᇻDt8!n $vȀ$f?+hK+SY8!G*}M8zYƄ)!8r>erl*QC<;&gvX%IH7Cfje^[sMM!8ru;QIB׹8,q /C-7ޜm0w񜞜ܜN&Bj}U3owJάlصS:v8%#e}Nne V@|Ɍerc)uzVPH-/ZK1'i+R׍+'^z\%]8GbCJO lnMCeAi\/qTliveupdate/assets/ok-24.pngnuW+APNG  IHDRw= pHYs  IDATH mLSWmo@hkaP4$(ʋɾ܊Kd#`lֲ1gt& e0`A hGA!PhK[/lq{9?BXqü@z= 06†_#`q^8Nh%BG9OGTd\a~]'@MykG>Dsx'y;laxRdٹŹ*+`6<\((WX,i(*V?5%-q ˲ՉNٯN>NoN(T01%n\!PD8D~ ֖$i0pXI_\ l8ה 63ql Aw@%<ϠQX@iZvefBRD,gR枦;;5%֦݁hWٗDӂ"sPbzoD)mJd^eNB5nPrZ|ᴴ#DLu{M/d1a#L;e@_ڲmZ*QN`h ޘu-ա~4d446Vm{(6*PC<5ۏ^Ene;4i(c$77/Cp.;4Iz)l?xd>edlx&ɒqbUpqKMUfuSnZJd?FNBvv80p}bmpy{f:C9R4$Zi:ްP(?n.8utt!|p9r'N{; &&"JJˀaldy³hZ2FH9~w,g,"p.B&U=14+ӥ D.ʧdZ$a4Q~JnvKv;(Enhi"܄b3:52>Q?~ej875@> :[n&oZւXQDn05X,*h>̅)|naL|k7CőG_}?5ozCa=k[ 8Ru…+XYj-PyAU{ΡBF?qX"鍊|2b/iG2ar31b} GOZ]4qcIENDB`PK>\. "liveupdate/assets/nosupport-32.pngnuW+APNG  IHDR szz pHYs   ZIDATX uWkl3Oxk0P3ƴȩI("-hRVi?H-D! $!@B Dv)cH(#,ػ玽ρ]|sϹ>B&']-uufm֭UoȱTABOQjF4s߽ƭD`φ ݻW-|ᩧZL(V# II`!d~uݸ OX{zqڊ&]om*SI6& PP0E',͠xrϵD[>&5MMMqvO{dJ˄"57aHQ8ۭfI8Hl;r$ F>[єɴ+E>.`L8zG:C7vS_jG]͏!…/BE^g4Q,f1l6aYx? ?7/IB& &a%}z~4[{{Ag8W/mݸ1mڴuxvhT3hPFC:D` | Θ$ݽKB2@@G:J@'Hݑ[B-9~c-Or$sL;L| b1*dXO_zEw R/i%hE& yc1GQ((ܵf64_jkMHW"|C!qtZDӼ_BL"`i{"sWVmŕ/˜DAI ٦Ozβ#:& z2]~EJF &F\Q+QxINQ޽4zRiقVΛgw&{d(zu\I 5̐4Ng[xpsr@-B_^M bȜL$_0b CgAj'NaJc*n@bdi8q׬ÇMPvJHs6bV:bE4:`gQK ,Z*#5JE)6,ʁ#]K^KB #vw ͻs(cuDNE |XTDY.Z<q<\:b(앁.YXsDm?5eg֢q8_`4{Nk}]*_TOEKp\`Pӎ)aŧ'.:I ㆁ_ЎTX-g[SCޞ!p0m9 (28h[6}&Q 'LFyf0JA0 fq;FP3'*EzH9H$” M%T cdo7|7#zFDɹlԁ@Ad_cwGqy{z\)l cK_F nlevFNԋtZ+{{ΝkDNFƠ'):m $U@ 뭞.ͯYJ瓂=_2ƭyyב&nb({яw#gF nbJ7JJ')JJJPHOu$d8]dÆ$lL&OA Hk`,(e|(+H&Z':&IBbȹ4p; a剿hƮ@pWĉ}h_ǍNqðXlF`(N,[WwP(4 Θ?p gY _kڗ v*b x H~mjŐM*و0 nѳVۋkAf@#R^;gmҴ NXIUUse3W{? 3wb9IENDB`PK>\)liveupdate/assets/.htaccessnuW+A Order allow,deny Deny from all PK>\#\liveupdate/config.phpnuW+A */ defined('_JEXEC') or die(); /** * Configuration class for your extension's updates. Override to your liking. */ class LiveUpdateConfig extends LiveUpdateAbstractConfig { var $_extensionName = 'com_csvi'; var $_extensionTitle = 'CSVI Free'; var $_updateURL = 'http://www.csvimproved.com/index.php?option=com_ars&view=update&format=ini&id=2'; var $_versionStrategy = 'vcompare'; var $_requiresAuthorization = true; /** var $_storageAdapter = 'component'; var $_storageConfig = array( 'extensionName' => 'com_akeebasubs', 'key' => 'liveupdate' ); */ public function __construct() { parent::__construct(); // Dev releases use the "newest" strategy if(substr($this->_currentVersion,1,2) == 'ev') { $this->_versionStrategy = 'newest'; } } }PK>\) .htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/cron/index.htmlnuW+APK>\)views/cron/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/cron/tmpl/index.htmlnuW+APK>\9փ%%views/cron/tmpl/default.phpnuW+A
    cronline; ?>
    PK>\)views/cron/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\~Oviews/cron/view.html.phpnuW+Ainput; $option = $jinput->get('option'); $data = $jinput->get($option.'.data', array(), 'array'); $from = $jinput->get('from'); // The basics of the cronline $this->cronline = 'php "'.JPATH_COMPONENT_ADMINISTRATOR.'/helpers/cron.php" username="" passwd="" '; // Construct the correct cron switch ($from) { case 'process': if (!empty($data)) { // Load the template handler $this->loadHelper('template'); // Construct the cronline $this->cronline .= $this->get('CronLine'); } else $this->cronline = JText::_('COM_CSVI_NO_CRON_DATA_FOUND'); JToolBarHelper::custom('process', 'csvi_process_32.png', 'csvi_process_32.png', JText::_('COM_CSVI_PROCESS'), false); break; case 'maintenance': // Construct the cronline $this->cronline .= $this->get('CronLineMaintenance'); JToolBarHelper::custom('maintenance', 'csvi_maintenance_32.png', 'csvi_maintenance_32.png', JText::_('COM_CSVI_MAINTENANCE'), false); break; } // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_CRON'), 'csvi_cron_48'); // Display it all parent::display($tpl); } } ?>PK>\ʿ&&views/exportfile/view.html.phpnuW+Ainput; // Process the export data $result = $this->get('ProcessData'); if (!$jinput->get('cron', false, 'bool')) { // Load the results $logresult = $this->get('Stats', 'log'); $this->assignRef('logresult', $logresult); // Load the run ID $jinput = JFactory::getApplication()->input; $csvilog = $jinput->get('csvilog', null, null); $this->assignRef('run_id', $csvilog->getId()); } // Display it all parent::display($tpl); } } ?>PK>\)views/exportfile/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\I#"h  !views/exportfile/tmpl/default.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); // Display any messages there are if (!empty($csvilog->logmessage)) echo $csvilog->logmessage; else { $filename = $jinput->get('template_name'); echo JText::sprintf('COM_CSVI_RESULTS_FOR', $filename)."\n"; echo str_repeat("=", (strlen(JText::_('COM_CSVI_RESULTS_FOR'))+strlen($filename)+1))."\n"; if (!empty($this->logresult['result'])) { echo JText::_('COM_CSVI_TOTAL')."\t\t".JText::_('COM_CSVI_RESULT')."\t\t".JText::_('COM_CSVI_STATUS')."\n"; foreach ($this->logresult['result'] as $result => $log) { echo $log->total_result."\t\t".$log->result."\t\t".JText::_('COM_CSVI_'.$log->status)."\n"; } echo JText::sprintf('COM_CSVI_SAVED_FILE', $this->logresult['file_name'])."\n"; } else echo JText::_('COM_CSVI_NO_RESULTS_FOUND')."\n"; } ?>PK>\#o,, views/exportfile/tmpl/index.htmlnuW+APK>\)views/exportfile/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/exportfile/index.htmlnuW+APK>\)views/availablefields/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,, views/availablefields/index.htmlnuW+APK>\)$views/availablefields/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,%views/availablefields/tmpl/index.htmlnuW+APK>\% &views/availablefields/tmpl/default.phpnuW+Astate->get('list.ordering'); $listDirn = $this->state->get('list.direction'); ?>
    : actions; ?> components; ?> operations; ?> name="filter_idfields" id="filter_idfields" />
    pagination->getResultsCounter(); ?>
    availablefields ); $i < $n; $i++) { $row = $this->availablefields[$i]; ?>
    pagination->getListFooter(); ?>
    pagination->getRowOffset($i); ?> csvi_name; if ($row->isprimary) echo ''.JText::_('COM_CSVI_IS_PRIMARY').''; ?> component_name; ?> component_table; ?>
    PK>\;6 6 #views/availablefields/view.html.phpnuW+Aavailablefields = $this->get('Items'); // Load the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); if (!$this->get('FieldCheck')) Throw new Exception(JText::_('COM_CSVI_NO_AVAILABLE_FIELDS'), 0); // Get the list of actions $options = array(); $options[] = JHtml::_('select.option', 'import', JText::_('COM_CSVI_IMPORT')); $options[] = JHtml::_('select.option', 'export', JText::_('COM_CSVI_EXPORT')); $this->actions = JHtml::_('select.genericlist', $options, 'jform_options_action', 'onchange="Csvi.loadTemplateTypes();"', 'value', 'text', $this->state->get('filter.action', '')); // Get the list of supported components $this->components = JHtml::_('select.genericlist', CsviHelper::getComponents(), 'jform_options_component', 'onchange="Csvi.loadTemplateTypes();"', 'value', 'text', $this->state->get('filter.component')); // Get the list of template types $model = $this->getModel(); $templates_model = $model->getModel('templates'); $operations = $templates_model->getTemplateTypes($this->state->get('filter.action', 'import'), $this->state->get('filter.component', false)); // Create the operations list $this->operations = JHtml::_('select.genericlist', $operations, 'jform_options_operation', '', 'value', 'name', $this->state->get('filter.operation'), false, true); // Get the panel $this->loadHelper('panel'); // Show the toolbar $this->addToolbar(); // Display it all parent::display($tpl); } /** * Display the toolbar * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return * @since 3.0 */ protected function addToolbar() { JToolBarHelper::title(JText::_('COM_CSVI_AVAILABLE_FIELDS'), 'csvi_availablefields_48'); JToolBarHelper::custom('maintenance.updateavailablefields', 'csvi_availablefields_32', 'csvi_availablefields_32', JText::_('COM_CSVI_UPDATE'), false); //JToolBarHelper::help('available_fields.html', true); } } ?>PK>\#o,,views/maintenance/index.htmlnuW+APK>\|iviews/maintenance/view.html.phpnuW+Acomponents = $this->get('Components'); // Get the maintenance options $this->options = $this->get('MaintenanceOptions'); $app = JFactory::getApplication(); $app->setUserState('com_csvi.global.form', false); // Load the results $jinput = JFactory::getApplication()->input; $settings = $jinput->get('settings', null, null); if ($settings->get('log.log_store', 1)) { $this->logresult = $this->get('Stats', 'log'); $this->logmessage = $this->get('StatsMessage', 'log'); } else $this->logresult = false; // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_MAINTENANCE'), 'csvi_maintenance_48'); if ($this->getLayout() != 'log') { JToolBarHelper::custom('cron.cron', 'csvi_cron_32', 'csvi_cron_32', JText::_('COM_CSVI_CRONLINE'), false); JToolBarHelper::custom('', 'csvi_continue_32.png', 'csvi_continue_32.png', JText::_('COM_CSVI_CONTINUE'), false); //JToolBarHelper::help('maintenance.html', true); } else if ($settings->get('log.log_store', 1)) { JToolBarHelper::custom('logdetails.logdetails', 'csvi_logdetails_32', 'csvi_logdetails_32', JText::_('COM_CSVI_LOG_DETAILS'), false); } // Display it all parent::display($tpl); } } ?> PK>\ !views/maintenance/tmpl/icecat.phpnuW+A
    PK>\ $@@views/maintenance/tmpl/log.phpnuW+Alogresult) { ?> logresult['result']) > 0) { foreach ($this->logresult['result'] as $result => $log) { ?>
    logresult['action_type']); ?>
    total_result; ?> result; ?> status); ?>
    operation[0].'_LABEL')); echo '
    '; echo '
    '; echo JText::_('COM_CSVI_NO_LOG_EXPLAIN'); } ?> PK>\("views/maintenance/tmpl/default.phpnuW+A
    components, 'component', 'onchange=CsviMaint.loadOperation(this.value)','value', 'text', null, false, true); ?> options, 'operation', 'onchange=CsviMaint.loadOptions(this.value)'); ?>
    PK>\) views/maintenance/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,!views/maintenance/tmpl/index.htmlnuW+APK>\ b1views/maintenance/tmpl/default_sortcategories.phpnuW+A
    • languages, 'language'); ?>
    PK>\views/maintenance/tmpl/cron.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); // Display any messages there are if (!empty($csvilog->logmessage)) echo $csvilog->logmessage; else { echo JText::sprintf('COM_CSVI_RESULTS_FOR', JText::_('COM_CSVI_'.strtoupper(JRequest::getCmd('task')).'_LABEL'))."\n"; echo str_repeat("=", (strlen(JText::_('COM_CSVI_RESULTS_FOR'))+strlen(JRequest::getCmd('task'))+1))."\n"; if (!empty($this->logresult['result'])) { echo JText::_('COM_CSVI_TOTAL')."\t\t".JText::_('COM_CSVI_RESULT')."\t\t".JText::_('COM_CSVI_STATUS')."\n"; foreach ($this->logresult['result'] as $result => $log) { echo $log->total_result."\t\t".$log->result."\t\t".JText::_('COM_CSVI_'.$log->status)."\n"; } } else echo JText::_('COM_CSVI_NO_RESULTS_FOUND')."\n"; } ?>PK>\w)*views/maintenance/tmpl/availablefields.phpnuW+A
    PK>\# )views/maintenance/tmpl/default_icecat.phpnuW+A
    PK>\lNQ""views/maintenance/view.raw.phpnuW+AloadTemplate('icecat'); break; case 'sortcategories': $this->languages = $this->get('Languages'); echo $this->loadTemplate('sortcategories'); break; } } } ?> PK>\)views/maintenance/.htaccessnuW+A Order allow,deny Deny from all PK>\(G$ $ views/maintenance/view.json.phpnuW+Ainput; $task = strtolower($jinput->get('task')); switch ($task) { case 'icecatindex': case 'updateavailablefields': JToolBarHelper::custom('cancelimport', 'csvi_cancel_32', 'csvi_cancel_32', JText::_('COM_CSVI_CANCEL'), false); // Display it all parent::display($tpl); break; case 'icecatsingle': $this->get('IcecatSingle'); $result['view'] = ''; // Get the number of records processed $result['records'] = $jinput->get('linesprocessed', 0, 'int'); if ($jinput->get('finished', false, 'bool')) { $result['process'] = false; $result['url'] = JURI::root().'administrator/index.php?option='.$jinput->get('option').'&task=logdetails.logdetails&run_id[]='.$jinput->get('run_id', 0, 'int'); } else { $result['process'] = true; } // Output the results echo json_encode($result); break; case 'updateavailablefieldssingle': $continue = $this->get('AvailableFieldsSingle', 'availablefields'); $result['view'] = ''; // Get the number of records processed $result['table'] = $jinput->get('updatetable', '', 'string'); if (!$continue) { $result['process'] = false; $result['url'] = JURI::root().'administrator/index.php?option='.$jinput->get('option').'&task=logdetails.logdetails&run_id='.$jinput->get('run_id', 0, 'int'); // Store the log results $this->get('finishProcess'); } else { $result['process'] = true; } // Output the results echo json_encode($result); break; } } } ?> PK>\views/index.htmlnuW+APK>\)views/logdetails/.htaccessnuW+A Order allow,deny Deny from all PK>\ //views/logdetails/view.html.phpnuW+Alogmessage = $this->get('Items'); $this->setModel(JModel::getInstance('log', 'CsviModel')); $this->logresult = $this->get('Stats', 'log'); // Load the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); // Set the Run ID $jinput = JFactory::getApplication()->input; $this->run_id = $jinput->get('run_id', 0, 'int'); // Set the actions $this->list['actions'] = $this->get('Actions'); $this->list['results'] = $this->get('Results'); // Get the panel $this->loadHelper('panel'); // Add toolbar JToolBarHelper::title(JText::_('COM_CSVI_LOG_DETAILS'), 'csvi_logdetails_48'); JToolBarHelper::custom('logdetails.cancel', 'csvi_cancel_32', 'csvi_cancel_32', JText::_('COM_CSVI_BACK'), false); // Display it all parent::display($tpl); } } ?> PK>\)views/logdetails/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\.؍!views/logdetails/tmpl/default.phpnuW+Astate->get('list.ordering'); $listDirn = $this->state->get('list.direction'); ?>
    logresult['action_type'])); ?>
    logresult['file_name']; ?>
    logresult['total_records']; ?>
    logresult['run_cancelled']) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); ?>
    logresult['debug']; ?>
    logresult['debugview'])) { echo '
    '.$this->logresult['debugview'].'
    '; } ?>
    logresult['result'])) { ?> logresult['result'] as $result => $log) { ?>
    total_result; ?> result; ?> status)); ?>
    list['actions']; ?> list['results']; ?>
    pagination->getResultsCounter(); ?>
    logmessage) { foreach ($this->logmessage as $key => $log) { ?>
    pagination->getListFooter(); ?>
    line; ?> status)); ?> result)); ?> description); ?>
    PK>\ views/logdetails/tmpl/index.htmlnuW+APK>\views/logdetails/index.htmlnuW+APK>\)views/csvi/.htaccessnuW+A Order allow,deny Deny from all PK>\views/csvi/tmpl/default.phpnuW+A
    cpanel_images->process; ?> cpanel_images->replacements; ?> cpanel_images->log; ?> cpanel_images->maintenance; ?>
    cpanel_images->availablefields; ?> cpanel_images->settings; ?> cpanel_images->about; ?> cpanel_images->help; ?> cpanel_images->install; ?>
    PK>\#o,,views/csvi/tmpl/index.htmlnuW+APK>\)views/csvi/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#cWWviews/csvi/view.html.phpnuW+Aauthorise('core.admin', 'com_csvi')) { JToolBarHelper::preferences('com_csvi'); } //JToolBarHelper::help('control_panel.html', true); // Assign data for display $helper = new CsviHelper(); $this->cpanel_images = $helper->getButtons(); // Display the page parent::display($tpl); } } ?> PK>\#o,,views/csvi/index.htmlnuW+APK>\Z Z views/templatetype/view.html.phpnuW+Aform = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Toolbar for product editing * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return void * @since 1.0 */ protected function addToolbar() { // Hide the mainmenu JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); JToolBarHelper::title(JText::_('COM_CSVI_PAGE_'.($checkedOut ? 'VIEW_TEMPLATETYPE' : ($isNew ? 'ADD_TEMPLATETYPE' : 'EDIT_TEMPLATETYPE'))), 'csvi_templates_48.png'); if (!$checkedOut) { JToolBarHelper::apply('templatetype.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('templatetype.save', 'JTOOLBAR_SAVE'); JToolBarHelper::custom('templatetype.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew) { JToolBarHelper::custom('templatetype.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('templatetype.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('templatetype.cancel', 'JTOOLBAR_CLOSE'); } } } ?>PK>\KЗ(( views/templatetype/tmpl/edit.phpnuW+A
    • form->getLabel('template_type_name'); ?> form->getInput('template_type_name'); ?>
    • form->getLabel('template_type'); ?> form->getInput('template_type'); ?>
    • form->getLabel('component'); ?> form->getInput('component'); ?>
    • form->getLabel('options'); ?> form->getInput('options'); ?>
    • form->getLabel('url'); ?> form->getInput('url'); ?>
    PK>\wtW"views/templatetype/tmpl/index.htmlnuW+APK>\)!views/templatetype/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/templatetype/index.htmlnuW+APK>\)views/templatetype/.htaccessnuW+A Order allow,deny Deny from all PK>\)views/replacements/.htaccessnuW+A Order allow,deny Deny from all PK>\)!views/replacements/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,"views/replacements/tmpl/index.htmlnuW+APK>\(Ch  #views/replacements/tmpl/default.phpnuW+Astate->get('list.ordering'); $listDirn = $this->state->get('list.direction'); ?>
    items)) { foreach ($this->items as $i => $item) { ?>
    pagination->getListFooter(); ?>
    id); ?> checked_out) { echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'replacements.'); echo $this->escape($item->name); } else { ?> escape($item->name); ?> findtext, 0, 100); if (strlen($item->findtext) > 100) echo '...';?> replacetext, 0, 100); if (strlen($item->replacetext) > 100) echo '...'; ?> method; ?>
    PK>\ƫ views/replacements/view.html.phpnuW+Aitems = $this->get('Items'); // Get the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_REPLACEMENTS'), 'csvi_replacement_48'); JToolBarHelper::addNew('replacement.add'); JToolBarHelper::editList('replacement.edit'); JToolBarHelper::deleteList('', 'replacements.delete'); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); } } ?>PK>\#o,,views/replacements/index.htmlnuW+APK>\#o,,#views/templatetypes/tmpl/index.htmlnuW+APK>\,c c $views/templatetypes/tmpl/default.phpnuW+Astate->get('list.ordering'); $listDirn = $this->state->get('list.direction'); ?>
    templatetypes as $i => $template) { ?>
    pagination->getListFooter(); ?>
    id); ?> url)) echo JHtml::_('link', JRoute::_($template->url), JText::_('COM_CSVI_'.$template->template_type_name), 'target="_blank"'); else echo JText::_('COM_CSVI_'.$template->template_type_name); ?> template_type_name).'_DESC'); ?> component), $template->component, 'target="_blank"'); ?> template_type)); ?>
    PK>\)"views/templatetypes/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\)views/templatetypes/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/templatetypes/index.htmlnuW+APK>\똢77!views/templatetypes/view.html.phpnuW+Atemplatetypes = $this->get('Items'); // Get the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_TEMPLATETYPES'), 'csvi_templates_48'); JToolBarHelper::custom('templatetype.add', 'new.png', 'new_f2.png','JTOOLBAR_NEW', false); JToolBarHelper::custom('templatetype.edit', 'edit.png', 'edit_f2.png','JTOOLBAR_EDIT', true); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); } } ?>PK>\GY Y views/replacement/view.html.phpnuW+Aform = $this->get('Form'); $this->item = $this->get('Item'); $this->state = $this->get('State'); // Check for errors. if (count($errors = $this->get('Errors'))) { JError::raiseError(500, implode("\n", $errors)); return false; } $this->addToolbar(); parent::display($tpl); } /** * Toolbar for product editing * * @copyright * @author RolandD * @todo * @see * @access protected * @param * @return void * @since 1.0 */ protected function addToolbar() { // Hide the mainmenu JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = ($this->item->id == 0); $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); JToolBarHelper::title(JText::_('COM_CSVI_PAGE_'.($checkedOut ? 'VIEW_REPLACEMENT' : ($isNew ? 'ADD_REPLACEMENT' : 'EDIT_REPLACEMENT'))), 'csvi_replacement_48'); if (!$checkedOut) { JToolBarHelper::apply('replacement.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('replacement.save', 'JTOOLBAR_SAVE'); JToolBarHelper::custom('replacement.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew) { JToolBarHelper::custom('replacement.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('replacement.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('replacement.cancel', 'JTOOLBAR_CLOSE'); } } } ?>PK>\) views/replacement/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\wtW!views/replacement/tmpl/index.htmlnuW+APK>\vvviews/replacement/tmpl/edit.phpnuW+A
    • form->getLabel('name'); ?> form->getInput('name'); ?>
    • form->getLabel('findtext'); ?> form->getInput('findtext'); ?>
    • form->getLabel('replacetext'); ?> form->getInput('replacetext'); ?>
    • form->getLabel('method'); ?> form->getInput('method'); ?>
    PK>\#o,,views/replacement/index.htmlnuW+APK>\)views/replacement/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,, views/importfile/tmpl/index.htmlnuW+APK>\3views/importfile/tmpl/cron.phpnuW+Ainput; $csvilog = $jinput->get('csvilog', null, null); // Display any messages there are if (!empty($csvilog->logmessage)) echo $csvilog->logmessage; else { echo JText::sprintf('COM_CSVI_RESULTS_FOR', $csvilog->getFilename())."\n"; echo str_repeat("=", (strlen(JText::_('COM_CSVI_RESULTS_FOR'))+strlen($csvilog->getFilename())+1))."\n"; if (!empty($this->logresult['result'])) { echo JText::_('COM_CSVI_TOTAL')."\t\t".JText::_('COM_CSVI_RESULT')."\t\t".JText::_('COM_CSVI_STATUS')."\n"; foreach ($this->logresult['result'] as $result => $log) { echo $log->total_result."\t\t".$log->result."\t\t".JText::_('COM_CSVI_'.$log->status)."\n"; } } else echo JText::_('COM_CSVI_NO_RESULTS_FOUND')."\n"; } ?>PK>\9\)44!views/importfile/tmpl/default.phpnuW+Ainput; ?>
    template_name); ?>
    PK>\)views/importfile/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\PpQQviews/importfile/view.html.phpnuW+Ainput; $template = $jinput->get('template', null, null); $this->template_name = $template->get('template_name'); // Toolbar $jinput->set('hidemainmenu', 1); JToolBarHelper::title(JText::_( 'COM_CSVI_IMPORTING' ), 'csvi_import_48'); JToolBarHelper::custom('process.cancelimport', 'csvi_cancel_32', 'csvi_cancel_32', JText::_('COM_CSVI_CANCEL'), false); JToolBarHelper::custom('importfile.doimport', 'csvi_import_32', 'csvi_import_32', JText::_('COM_CSVI_IMPORT'), false); // Display it all parent::display($tpl); } } ?>PK>\L views/importfile/view.json.phpnuW+Ainput; if ($jinput->get('importsession', true, 'bool')) { // Process the data $this->get('ProcessData'); // Empty the message stack $app = JFactory::getApplication(); $app->set('_messageQueue', array()); // Collect the results $result = array(); // Set the view mode if ($jinput->get('csvipreview', false, 'bool')) { $result['view'] = 'preview'; $result['headers'] = $jinput->get('headers_preview', null, null); $result['output'] = $jinput->get('data_preview', null, null); if (empty($results['headers']) && empty($result['output'])) { $result['process'] = false; $csvilog = $jinput->get('csvilog', null, null); $result['url'] = JURI::root().'administrator/index.php?option=com_csvi&task=process.finished&run_id='.$csvilog->getId(); // Clean the session, nothing to import $this->get('CleanSession'); } else $result['process'] = true; } else { $result['view'] = ''; // Get the number of records processed $result['records'] = $jinput->get('recordsprocessed', 0, 'int'); if ($result['records'] == 0) { $result['process'] = false; $result['url'] = JURI::root().'administrator/index.php?option=com_csvi&task=process.finished&run_id='.$jinput->get('run_id', 0, 'int'); } else { $result['process'] = true; } } } else { $csvilog = $jinput->get('csvilog', null, null); // Collect the results $result = array(); $result['process'] = false; $result['url'] = JURI::root().'administrator/index.php?option=com_csvi&task=process.finished&run_id='.$jinput->get('run_id', 0, 'int'); // Clean the session, nothing to import $this->get('CleanSession'); } if ($result['process']) { // Import is not finished, lets sleep $settings = new CsviSettings(); sleep($settings->get('import.import_wait', 0)); } // Output the results echo json_encode($result); } } ?>PK>\#o,,views/importfile/index.htmlnuW+APK>\)views/importfile/.htaccessnuW+A Order allow,deny Deny from all PK>\ F""views/importfile/view.cron.phpnuW+Ainput; if (!$jinput->get('error', false, 'bool')) { // Process the data $this->get('ProcessData'); } // Assign the data $this->assignRef('logresult', $this->get('Stats', 'log')); // Display it all parent::display($tpl); } } ?>PK>\tIf((views/install/view.html.phpnuW+AaddStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/install.css'); // Load the installed version $this->selectversion = $this->get('Version'); $this->newversion = CSVI_VERSION; // Options of extra tasks to do during installation $this->installoptions = array(); $this->installoptions[] = JHtml::_('select.option', 'availablefields', JText::_('COM_CSVI_UPDATEAVAILABLEFIELDS_LABEL')); $this->installoptions[] = JHtml::_('select.option', 'sampletemplates', JText::_('COM_CSVI_INSTALLDEFAULTTEMPLATES_LABEL')); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_INSTALL'), 'csvi_install_48'); //JToolBarHelper::help('install.html', true); // Display it all parent::display($tpl); } } ?>PK>\#o,,views/install/index.htmlnuW+APK>\)views/install/.htaccessnuW+A Order allow,deny Deny from all PK>\!4 BBviews/install/view.json.phpnuW+Aget($task); if (JRequest::getBool('cancelinstall')) { $result['tasks'] = ''; } else { $result['results']['messages'][] = JText::_('COM_CSVI_COMPLETED_'.strtoupper($task)); // Add remaining tasks to the result for further processing $result['tasks'] = implode('.', $tasks); } // Send back the result echo json_encode($result); } } ?>PK>\)views/install/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/install/tmpl/index.htmlnuW+APK>\.ddviews/install/tmpl/default.phpnuW+A
    selectversion == 'current') echo JText::_('COM_CSVI_NONEW_VERSION'); else echo JText::sprintf('COM_CSVI_FOUND_VERSION', $this->selectversion); ?>
    newversion); ?>
    installoptions as $installoption) { if ($installoption->value == 'availablefields') $checked = 'checked="checked"'; else $checked = ''; ?> />text; ?>
    selectversion != 'current') { ?>
    PK>\'4  views/about/tmpl/default.phpnuW+A folders as $name => $access) { ?>
    '.JText::_('COM_CSVI_WRITABLE').''; } else { echo ''.JText::_('COM_CSVI_NOT_WRITABLE').''; } ?>

    Name:CSVI Free
    Version:5.15
    Coded by:RolandD Cyber Produksi
    Contact:contact@csvimproved.com
    Support:
    Copyright:Copyright (C) 2006 - 2013 RolandD Cyber Produksi. All rights reserved.
    License:
    PK>\)views/about/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/about/tmpl/index.htmlnuW+APK>\#o,,views/about/index.htmlnuW+APK>\)views/about/.htaccessnuW+A Order allow,deny Deny from all PK>\L.ñviews/about/view.html.phpnuW+Afolders = $this->get('FolderCheck'); // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_ABOUT'), 'csvi_about_48'); //JToolBarHelper::help('about.html', true); // Display it all parent::display($tpl); } } ?>PK>\D`FFviews/process/view.html.phpnuW+Ainput; $session = JFactory::getSession(); $option = $jinput->get('option'); // Load the models $model = $this->getModel(); $this->setModel(JModel::getInstance('templates', 'CsviModel')); $this->setModel(JModel::getInstance('availablefields', 'CsviModel')); // Load stylesheet $document = JFactory::getDocument(); $document->addStyleSheet(JURI::root().'administrator/components/com_csvi/assets/css/process.css'); // Set the template ID $template_id = $jinput->get('template_id', $session->get($option.'.select_template', 0), 'int'); $jinput->set('template_id', $template_id); // Load the saved templates $template_model = $this->getModel('Templates'); $this->templates = JHtml::_('select.genericlist', $template_model->getTemplates(), 'select_template', '', 'value', 'text', $jinput->get('template_id', 0, 'int')); // Load the selected template $this->loadHelper('template'); $this->template = new CsviTemplate(); $this->template->load($template_id); $jinput->set('template', $this->template); // Set the action, component and operation for the form if ($template_id > 0) $jinput->set('jform', $this->template->getSettings()); // Load the option templates $this->optiontemplates = $model->getOptions(); // Get the options for the user $this->form = $model->getForm(array(), true, $this->optiontemplates); // Load the fields $av_model = $this->getModel('availablefields'); $this->templatefields = $av_model->getAvailableFields($this->form->getValue('operation','options'), $this->form->getValue('component','options'), 'object', $this->form->getValue('custom_table')); // Load the replacements $this->replacements = $this->get('Replacements'); // Add the component path to find template files $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.'/views/process/tmpl/'.$this->form->getValue('component','options').'/'.$this->form->getValue('action','options')); $this->addTemplatePath(JPATH_COMPONENT_ADMINISTRATOR.'/views/process/tmpl/'.$this->form->getValue('action','options')); // Load the helper $this->loadHelper($this->form->getValue('component','options')); // Load the configuration helper $this->loadHelper($this->form->getValue('component','options').'_config'); $classname = 'Csvi'.$this->form->getValue('component','options').'_config'; if (class_exists($classname)) $this->config = new $classname; // Get the panel $this->loadHelper('panel'); // Get the toolbar title JToolBarHelper::title(JText::_('COM_CSVI_PROCESS'), 'csvi_process_48'); // Get the toolbar JToolBarHelper::custom('cronline', 'csvi_cron_32', 'csvi_cron_32', JText::_('COM_CSVI_CRONLINE'), false); JToolBarHelper::custom('process.imexport', 'csvi_process_32', 'csvi_process_32', JText::_('COM_CSVI_PROCESS'), false); //JToolBarHelper::help('process.html', true); // Display it all parent::display($tpl); } } ?> PK>\#o,,views/process/index.htmlnuW+APK>\#o,,&views/process/tmpl/com_csvi/index.htmlnuW+APK>\ 3views/process/tmpl/com_csvi/export/default_file.phpnuW+A
    • form->getLabel('export_filename', 'general'); ?>
      form->getInput('export_filename', 'general'); ?>
    • form->getLabel('export_file', 'general'); ?>
      form->getInput('export_file', 'general'); ?>
    • form->getLabel('export_site', 'general'); ?>
      form->getInput('export_site', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('include_column_headers', 'general'); ?>
      form->getInput('include_column_headers', 'general'); ?>
    • form->getLabel('signature', 'general'); ?>
      form->getInput('signature', 'general'); ?>
    • form->getLabel('export_frontend', 'general'); ?>
      form->getInput('export_frontend', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('recordstart', 'general'); ?>
      form->getInput('recordstart', 'general'); ?> form->getInput('recordend', 'general'); ?>
    • form->getLabel('groupby', 'general'); ?>
      form->getInput('groupby', 'general'); ?>
    PK>\),views/process/tmpl/com_csvi/export/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,-views/process/tmpl/com_csvi/export/index.htmlnuW+APK>\)%views/process/tmpl/com_csvi/.htaccessnuW+A Order allow,deny Deny from all PK>\K8=views/process/tmpl/com_virtuemart/export/default_userinfo.phpnuW+A
    • form->getLabel('userinfo_address', 'userinfo'); ?>
      form->getInput('userinfo_address', 'userinfo'); ?>
    • form->getLabel('vendors', 'userinfo'); ?>
      form->getInput('vendors', 'userinfo'); ?>
    • form->getLabel('permissions', 'userinfo'); ?>
      form->getInput('permissions', 'userinfo'); ?>
    • form->getLabel('userinfomdatestart', 'userinfo'); ?>
      form->getInput('userinfomdatestart', 'userinfo'); ?> form->getInput('userinfomdateend', 'userinfo'); ?>
    PK>\lQAviews/process/tmpl/com_virtuemart/export/default_manufacturer.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    PK>\^{9views/process/tmpl/com_virtuemart/export/default_calc.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    PK>\%=views/process/tmpl/com_virtuemart/export/default_shipping.phpnuW+A
    'addRow_shopper_shipping')); ?>

    template->get('shopper_shipping_export_fields', '', array()); if (isset($shopper_shipping_fields['_price_from'])) { $count = count($shopper_shipping_fields['_price_from']); for ($rows = 0; $rows < $count; $rows++) { $id = mt_rand(); ?>
    PK>\9zz9views/process/tmpl/com_virtuemart/export/default_file.phpnuW+A
    • form->getLabel('export_filename', 'general'); ?>
      form->getInput('export_filename', 'general'); ?>
    • form->getLabel('export_file', 'general'); ?>
      form->getInput('export_file', 'general'); ?>
    • form->getLabel('export_site', 'general'); ?>
      form->getInput('export_site', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('include_column_headers', 'general'); ?>
      form->getInput('include_column_headers', 'general'); ?>
    • form->getLabel('signature', 'general'); ?>
      form->getInput('signature', 'general'); ?>
    • form->getLabel('export_frontend', 'general'); ?>
      form->getInput('export_frontend', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('publish_state', 'general'); ?>
      form->getInput('publish_state', 'general'); ?>
    • form->getLabel('recordstart', 'general'); ?>
      form->getInput('recordstart', 'general'); ?> form->getInput('recordend', 'general'); ?>
    • form->getLabel('groupby', 'general'); ?>
      form->getInput('groupby', 'general'); ?>
    • form->getLabel('export_date_format', 'general'); ?>
      form->getInput('export_date_format', 'general'); ?>

    • form->getLabel('export_price_format_decimal', 'general'); ?>
      form->getInput('export_price_format_decimal', 'general'); ?>
    • form->getLabel('export_price_format_decsep', 'general'); ?>
      form->getInput('export_price_format_decsep', 'general'); ?>
    • form->getLabel('export_price_format_thousep', 'general'); ?>
      form->getInput('export_price_format_thousep', 'general'); ?>
    • form->getLabel('add_currency_to_price', 'general'); ?>
      form->getInput('add_currency_to_price', 'general'); ?>
    PK>\yY=views/process/tmpl/com_virtuemart/export/default_category.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    PK>\#o,,3views/process/tmpl/com_virtuemart/export/index.htmlnuW+APK>\)2views/process/tmpl/com_virtuemart/export/.htaccessnuW+A Order allow,deny Deny from all PK>\I >views/process/tmpl/com_virtuemart/export/default_orderitem.phpnuW+A
    • form->getLabel('orderitemnostart', 'orderitem'); ?>
      form->getInput('orderitemnostart', 'orderitem'); ?> form->getInput('orderitemnoend', 'orderitem'); ?>
    • form->getLabel('orderitemlist', 'orderitem'); ?>
      form->getInput('orderitemlist', 'orderitem'); ?>
    • form->getLabel('orderitemdatestart', 'orderitem'); ?>
      form->getInput('orderitemdatestart', 'orderitem'); ?> form->getInput('orderitemdateend', 'orderitem'); ?>
    • form->getLabel('orderitemmdatestart', 'orderitem'); ?>
      form->getInput('orderitemmdatestart', 'orderitem'); ?> form->getInput('orderitemmdateend', 'orderitem'); ?>
    • form->getLabel('orderitemstatus', 'orderitem'); ?>
      form->getInput('orderitemstatus', 'orderitem'); ?>
    • form->getLabel('orderitemcurrency', 'orderitem'); ?>
      form->getInput('orderitemcurrency', 'orderitem'); ?>
    • form->getLabel('orderitempricestart', 'orderitem'); ?>
      form->getInput('orderitempricestart', 'orderitem'); ?> form->getInput('orderitemspriceend', 'orderitem'); ?>
    form->getLabel('orderitemproduct', 'orderitem'); ?> form->getInput('orderitemproduct', 'orderitem'); ?>
    PK>\3[[:views/process/tmpl/com_virtuemart/export/default_order.phpnuW+A
    • form->getLabel('ordernostart', 'order'); ?>
      form->getInput('ordernostart', 'order'); ?> form->getInput('ordernoend', 'order'); ?>
    • form->getLabel('orderlist', 'order'); ?>
      form->getInput('orderlist', 'order'); ?>
    • form->getLabel('orderdatestart', 'order'); ?>
      form->getInput('orderdatestart', 'order'); ?> form->getInput('orderdateend', 'order'); ?>
    • form->getLabel('ordermdatestart', 'order'); ?>
      form->getInput('ordermdatestart', 'order'); ?> form->getInput('ordermdateend', 'order'); ?>
    • form->getLabel('orderstatus', 'order'); ?>
      form->getInput('orderstatus', 'order'); ?>
    • form->getLabel('orderpayment', 'order'); ?>
      form->getInput('orderpayment', 'order'); ?>
    • form->getLabel('order_address', 'order'); ?>
      form->getInput('order_address', 'order'); ?>
    • form->getLabel('ordermanufacturer', 'order'); ?>
      form->getInput('ordermanufacturer', 'order'); ?>
    • form->getLabel('ordercurrency', 'order'); ?>
      form->getInput('ordercurrency', 'order'); ?>
    • form->getLabel('orderpricestart', 'order'); ?>
      form->getInput('orderpricestart', 'order'); ?> form->getInput('orderpriceend', 'order'); ?>
    form->getLabel('orderuser', 'order'); ?>
    form->getInput('orderuser', 'order'); ?>
    form->getLabel('orderproduct', 'order'); ?>
    form->getInput('orderproduct', 'order'); ?>
    PK>\0<views/process/tmpl/com_virtuemart/export/default_product.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('exportsef', 'product'); ?>
      form->getInput('exportsef', 'product'); ?>
    • form->getLabel('producturl_suffix', 'product'); ?>
      form->getInput('producturl_suffix', 'product'); ?>
    • form->getLabel('featured', 'product'); ?>
      form->getInput('featured', 'product'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    • form->getLabel('product_categories', 'product'); ?>
      form->getInput('product_categories', 'product'); ?>
    • form->getLabel('publish_state_categories', 'product'); ?>
      form->getInput('publish_state_categories', 'product'); ?>
    • form->getLabel('incl_subcategory', 'product'); ?>
      form->getInput('incl_subcategory', 'product'); ?>
    • form->getLabel('parent_only', 'product'); ?>
      form->getInput('parent_only', 'product'); ?>
    • form->getLabel('child_only', 'product'); ?>
      form->getInput('child_only', 'product'); ?>
    • form->getLabel('custom_title', 'product'); ?>
      form->getInput('custom_title', 'product'); ?>
    • form->getLabel('productskufilter', 'product'); ?>
      form->getInput('productskufilter', 'product'); ?>
    • form->getLabel('pricefrom', 'product'); ?>
      form->getInput('priceoperator', 'product'); ?> form->getInput('pricefrom', 'product'); ?> form->getInput('priceto', 'product'); ?>
    • form->getLabel('stocklevelstart', 'product'); ?>
      form->getInput('stocklevelstart', 'product'); ?> form->getInput('stocklevelend', 'product'); ?>
    • form->getLabel('targetcurrency', 'product'); ?>
      form->getInput('targetcurrency', 'product'); ?>
    • form->getLabel('shopper_groups', 'product'); ?>
      form->getInput('shopper_groups', 'product'); ?>
    • form->getLabel('manufacturers', 'product'); ?>
      form->getInput('manufacturers', 'product'); ?>
    PK>\)+views/process/tmpl/com_virtuemart/.htaccessnuW+A Order allow,deny Deny from all PK>\&}uuBviews/process/tmpl/com_virtuemart/import/default_category_path.phpnuW+A
    • form->getLabel('file_location_category_images', 'path'); ?>
      form->getInput('file_location_category_images', 'path'); ?>
      '.$this->config->get('media_category_path').'');?> | |
    PK>\`?views/process/tmpl/com_virtuemart/import/default_media_path.phpnuW+A
    • form->getLabel('file_location_product_images', 'path'); ?>
      form->getInput('file_location_product_images', 'path'); ?>
      '.$this->config->get('media_product_path').'');?> | |
    • form->getLabel('file_location_category_images', 'path'); ?>
      form->getInput('file_location_category_images', 'path'); ?>
      '.$this->config->get('media_category_path').'');?> | |
    PK>\UN=views/process/tmpl/com_virtuemart/import/default_category.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('target_language', 'general'); ?>
      form->getInput('target_language', 'general'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    PK>\ujP P <views/process/tmpl/com_virtuemart/import/default_product.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    • form->getLabel('append_categories', 'product'); ?>
      form->getInput('append_categories', 'product'); ?>
    • form->getLabel('update_based_on', 'product'); ?>
      form->getInput('update_based_on', 'product'); ?>
    • form->getLabel('mpn_column_name', 'product'); ?>
      form->getInput('mpn_column_name', 'product'); ?>
    • form->getLabel('unpublish_before_import', 'product'); ?>
      form->getInput('unpublish_before_import', 'product'); ?>
    • form->getLabel('use_icecat', 'product'); ?>
      form->getInput('use_icecat', 'product'); ?>
    PK>\)2views/process/tmpl/com_virtuemart/import/.htaccessnuW+A Order allow,deny Deny from all PK>\>&Cviews/process/tmpl/com_virtuemart/import/default_category_image.phpnuW+A
    • form->getLabel('process_image', 'image'); ?>
      form->getInput('process_image', 'image'); ?>
    • form->getLabel('change_case', 'image'); ?>
      form->getInput('change_case', 'image'); ?>
    • form->getLabel('keep_original', 'image'); ?>
      form->getInput('keep_original', 'image'); ?>
    • form->getLabel('convert_type', 'image'); ?>
      form->getInput('convert_type', 'image'); ?>
    • form->getLabel('save_images_on_server', 'image'); ?>
      form->getInput('save_images_on_server', 'image'); ?>
    • form->getLabel('full_resize', 'image'); ?>
      form->getInput('full_resize', 'image'); ?>
    • form->getLabel('full_width', 'image'); ?>
      form->getInput('full_width', 'image'); ?>
    • form->getLabel('full_height', 'image'); ?>
      form->getInput('full_height', 'image'); ?>
    • form->getLabel('thumb_check_filetype', 'image'); ?>
      form->getInput('thumb_check_filetype', 'image'); ?>
    • form->getLabel('thumb_create', 'image'); ?>
      form->getInput('thumb_create', 'image'); ?>
    • form->getLabel('thumb_extension', 'image'); ?>
      form->getInput('thumb_extension', 'image'); ?>
    • form->getLabel('thumb_width', 'image'); ?>
      form->getInput('thumb_width', 'image'); ?>
    • form->getLabel('thumb_height', 'image'); ?>
      form->getInput('thumb_height', 'image'); ?>
    PK>\#o,,3views/process/tmpl/com_virtuemart/import/index.htmlnuW+APK>\qU''?views/process/tmpl/com_virtuemart/import/default_order_item.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    PK>\-Bviews/process/tmpl/com_virtuemart/import/default_category_file.phpnuW+A
    • form->getLabel('auto_detect_delimiters', 'general'); ?>
      form->getInput('auto_detect_delimiters', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('im_mac', 'general'); ?>
      form->getInput('im_mac', 'general'); ?>
    • form->getLabel('use_column_headers', 'general'); ?>
      form->getInput('use_column_headers', 'general'); ?>
    • form->getLabel('skip_first_line', 'general'); ?>
      form->getInput('skip_first_line', 'general'); ?>
    • form->getLabel('skip_default_value', 'general'); ?>
      form->getInput('skip_default_value', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('refresh_xml_headers', 'general'); ?>
      form->getInput('refresh_xml_headers', 'general'); ?>
    • form->getLabel('xml_nodes_map', 'general'); ?>
      form->getInput('xml_nodes_map', 'general'); ?>
    PK>\ȋ[u++:views/process/tmpl/com_virtuemart/import/default_media.phpnuW+A
    • form->getLabel('ignore_non_exist', 'media'); ?>
      form->getInput('ignore_non_exist', 'media'); ?>
    PK>\(o@views/process/tmpl/com_virtuemart/import/default_media_image.phpnuW+A
    • form->getLabel('process_image', 'image'); ?>
      form->getInput('process_image', 'image'); ?>
    • form->getLabel('change_case', 'image'); ?>
      form->getInput('change_case', 'image'); ?>
    • form->getLabel('keep_original', 'image'); ?>
      form->getInput('keep_original', 'image'); ?>
    • form->getLabel('convert_type', 'image'); ?>
      form->getInput('convert_type', 'image'); ?>
    • form->getLabel('save_images_on_server', 'image'); ?>
      form->getInput('save_images_on_server', 'image'); ?>
    • form->getLabel('full_resize', 'image'); ?>
      form->getInput('full_resize', 'image'); ?>
    • form->getLabel('full_width', 'image'); ?>
      form->getInput('full_width', 'image'); ?>
    • form->getLabel('full_height', 'image'); ?>
      form->getInput('full_height', 'image'); ?>
    • form->getLabel('thumb_check_filetype', 'image'); ?>
      form->getInput('thumb_check_filetype', 'image'); ?>
    • form->getLabel('thumb_create', 'image'); ?>
      form->getInput('thumb_create', 'image'); ?>
    • form->getLabel('thumb_extension', 'image'); ?>
      form->getInput('thumb_extension', 'image'); ?>
    • form->getLabel('thumb_width', 'image'); ?>
      form->getInput('thumb_width', 'image'); ?>
    • form->getLabel('thumb_height', 'image'); ?>
      form->getInput('thumb_height', 'image'); ?>
    PK>\66Jviews/process/tmpl/com_virtuemart/import/default_manufacturer_category.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    PK>\ڞ:views/process/tmpl/com_virtuemart/import/default_image.phpnuW+A
    • form->getLabel('process_image', 'image'); ?>
      form->getInput('process_image', 'image'); ?>
    • form->getLabel('auto_generate_image_name', 'image'); ?>
      form->getInput('auto_generate_image_name', 'image'); ?>
    • form->getLabel('type_generate_image_name', 'image'); ?>
      form->getInput('type_generate_image_name', 'image'); ?>
    • form->getLabel('autogenerateext', 'image'); ?>
      form->getInput('autogenerateext', 'image'); ?>
    • form->getLabel('change_case', 'image'); ?>
      form->getInput('change_case', 'image'); ?>
    • form->getLabel('keep_original', 'image'); ?>
      form->getInput('keep_original', 'image'); ?>
    • form->getLabel('convert_type', 'image'); ?>
      form->getInput('convert_type', 'image'); ?>
    • form->getLabel('save_images_on_server', 'image'); ?>
      form->getInput('save_images_on_server', 'image'); ?>
    • form->getLabel('full_resize', 'image'); ?>
      form->getInput('full_resize', 'image'); ?>
    • form->getLabel('full_width', 'image'); ?>
      form->getInput('full_width', 'image'); ?>
    • form->getLabel('full_height', 'image'); ?>
      form->getInput('full_height', 'image'); ?>
    • form->getLabel('thumb_check_filetype', 'image'); ?>
      form->getInput('thumb_check_filetype', 'image'); ?>
    • form->getLabel('thumb_create', 'image'); ?>
      form->getInput('thumb_create', 'image'); ?>
    • form->getLabel('thumb_extension', 'image'); ?>
      form->getInput('thumb_extension', 'image'); ?>
    • form->getLabel('thumb_width', 'image'); ?>
      form->getInput('thumb_width', 'image'); ?>
    • form->getLabel('thumb_height', 'image'); ?>
      form->getInput('thumb_height', 'image'); ?>
    PK>\t6$$Aviews/process/tmpl/com_virtuemart/import/default_manufacturer.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    PK>\ܭ,Aviews/process/tmpl/com_virtuemart/import/default_product_path.phpnuW+A
    • form->getLabel('file_location_product_images', 'path'); ?>
      form->getInput('file_location_product_images', 'path'); ?>
      '.$this->config->get('media_product_path').'');?> | |
    PK>\^{9views/process/tmpl/com_virtuemart/import/default_calc.phpnuW+A
    • form->getLabel('language', 'general'); ?>
      form->getInput('language', 'general'); ?>
    • form->getLabel('category_separator', 'general'); ?>
      form->getInput('category_separator', 'general'); ?>
    PK>\-Fviews/process/tmpl/com_virtuemart/import/default_manufacturer_file.phpnuW+A
    • form->getLabel('auto_detect_delimiters', 'general'); ?>
      form->getInput('auto_detect_delimiters', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('im_mac', 'general'); ?>
      form->getInput('im_mac', 'general'); ?>
    • form->getLabel('use_column_headers', 'general'); ?>
      form->getInput('use_column_headers', 'general'); ?>
    • form->getLabel('skip_first_line', 'general'); ?>
      form->getInput('skip_first_line', 'general'); ?>
    • form->getLabel('skip_default_value', 'general'); ?>
      form->getInput('skip_default_value', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('refresh_xml_headers', 'general'); ?>
      form->getInput('refresh_xml_headers', 'general'); ?>
    • form->getLabel('xml_nodes_map', 'general'); ?>
      form->getInput('xml_nodes_map', 'general'); ?>
    PK>\#o,,,views/process/tmpl/com_virtuemart/index.htmlnuW+APK>\Sviews/process/tmpl/default.phpnuW+A
    templates; ?>
    form->getGroup('options') as $field) : ?> input; ?>
    form->getValue('action', 'options'); $component = $this->form->getValue('component', 'options'); $operation = $this->form->getValue('operation', 'options'); if ($action && $component & $operation) { // Load the source template echo $this->loadTemplate('source'); // Load the specific templates switch($action) { case 'import': ?>
      optiontemplates as $template) { ?>
    optiontemplates as $template) { ?>
    loadTemplate($template); ?>
      optiontemplates as $template) { ?>
    optiontemplates as $template) { ?>
    loadTemplate($template); ?>
    PK>\P P $views/process/tmpl/import_result.phpnuW+Alogresult) { $jinput = JFactory::getApplication()->input; ?> logresult['result']) > 0) { foreach ($this->logresult['result'] as $result => $log) { ?>
    logresult['file_name']).'
    '.$this->runtime; ?>
    get('run_id', 0, 'int')), JText::_('COM_CSVI_SHOW_FULL_LOG')); echo ' | '; // Show view debug log if (!empty($this->logresult['debugview'])) { echo $this->logresult['debugview']; echo ' | '; } // Show download debug log echo $this->logresult['debug']; ?>
    total_result; ?> result; ?> status); ?>
    '; echo $this->runtime; echo '
    '; echo '
    '; echo JText::_('COM_CSVI_NO_LOG_EXPLAIN'); }?> PK>\#o,,views/process/tmpl/index.htmlnuW+APK>\)views/process/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\-p;;,views/process/tmpl/import/default_fields.phpnuW+A form->getValue('operation', 'options') == 'customimport') { ?>
    form->getInput('custom_table'); ?>

    'addRow')); ?> templatefields, '_field_name', null, 'value', 'text', null, '_field_name'); ?> replacements, '_replace_field', '', 'value', 'text', '', '_replace_field_default'); ?>

    template->get('import_fields'); if (isset($import_fields['_selected_name'])) { for ($rows = 0; $rows < count($import_fields['_selected_name']); $rows++) { $id = mt_rand(); ?>
    replacements, 'jform[import_fields][_replace_field]['.$rows.']', '', 'value', 'text', $import_fields['_replace_field'][$rows], '_replace_field_'.$id); ?>
    templatefields as $fieldname) { ?>
    text; ?>
    PK>\)#views/process/tmpl/import/.htaccessnuW+A Order allow,deny Deny from all PK>\D;^^+views/process/tmpl/import/default_limit.phpnuW+A
    • form->getLabel('use_system_limits', 'limit'); ?>
      form->getInput('use_system_limits', 'limit'); ?>
    • form->getLabel('max_execution_time', 'limit'); ?>
      form->getInput('max_execution_time', 'limit'); ?>
      :
    • form->getLabel('memory_limit', 'limit'); ?>
      form->getInput('memory_limit', 'limit'); ?>
      :
    • form->getLabel('post_max_size', 'limit'); ?>
      form->getInput('post_max_size', 'limit'); ?>
      :
    • form->getLabel('upload_max_filesize', 'limit'); ?>
      form->getInput('upload_max_filesize', 'limit'); ?>
      :
    PK>\Pw ,views/process/tmpl/import/default_source.phpnuW+A
    • form->getLabel('source', 'general'); ?>
      form->getInput('source', 'general'); ?>
    • form->getLabel('import_file', 'general'); ?>
      form->getInput('import_file', 'general'); ?>
    • form->getLabel('local_csv_file', 'general'); ?>
      form->getInput('local_csv_file', 'general'); ?>
    • form->getLabel('urlfile', 'general'); ?>
      form->getInput('urlfile', 'general'); ?>
    • form->getLabel('ftphost', 'general'); ?>
      form->getInput('ftphost', 'general'); ?>
    • form->getLabel('ftpport', 'general'); ?>
      form->getInput('ftpport', 'general'); ?>
    • form->getLabel('ftpusername', 'general'); ?>
      form->getInput('ftpusername', 'general'); ?>
    • form->getLabel('ftppass', 'general'); ?>
      form->getInput('ftppass', 'general'); ?>
    • form->getLabel('ftproot', 'general'); ?>
      form->getInput('ftproot', 'general'); ?>
    • form->getLabel('ftpfile', 'general'); ?>
      form->getInput('ftpfile', 'general'); ?>
    PK>\L*views/process/tmpl/import/default_file.phpnuW+A
    • form->getLabel('auto_detect_delimiters', 'general'); ?>
      form->getInput('auto_detect_delimiters', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('im_mac', 'general'); ?>
      form->getInput('im_mac', 'general'); ?>
    • form->getLabel('use_column_headers', 'general'); ?>
      form->getInput('use_column_headers', 'general'); ?>
    • form->getLabel('skip_first_line', 'general'); ?>
      form->getInput('skip_first_line', 'general'); ?>
    • form->getLabel('overwrite_existing_data', 'general'); ?>
      form->getInput('overwrite_existing_data', 'general'); ?>
    • form->getLabel('ignore_non_exist', 'general'); ?>
      form->getInput('ignore_non_exist', 'general'); ?>
    • form->getLabel('skip_default_value', 'general'); ?>
      form->getInput('skip_default_value', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('refresh_xml_headers', 'general'); ?>
      form->getInput('refresh_xml_headers', 'general'); ?>
    • form->getLabel('xml_nodes_map', 'general'); ?>
      form->getInput('xml_nodes_map', 'general'); ?>
    PK>\#o,,$views/process/tmpl/import/index.htmlnuW+APK>\)2views/process/tmpl/com_akeebasubs/export/.htaccessnuW+A Order allow,deny Deny from all PK>\]t{ Aviews/process/tmpl/com_akeebasubs/export/default_subscription.phpnuW+A
    • form->getLabel('ordernostart', 'order'); ?>
      form->getInput('ordernostart', 'order'); ?> form->getInput('ordernoend', 'order'); ?>
    • form->getLabel('orderlist', 'order'); ?>
      form->getInput('orderlist', 'order'); ?>
    • form->getLabel('orderdatestart', 'order'); ?>
      form->getInput('orderdatestart', 'order'); ?> form->getInput('orderdateend', 'order'); ?>
    • form->getLabel('orderstatus', 'order'); ?>
      form->getInput('orderstatus', 'order'); ?>
    • form->getLabel('orderpayment', 'order'); ?>
      form->getInput('orderpayment', 'order'); ?>
    • form->getLabel('orderpricestart', 'order'); ?>
      form->getInput('orderpricestart', 'order'); ?> form->getInput('orderpriceend', 'order'); ?>
    form->getLabel('orderuser', 'order'); ?>
    form->getInput('orderuser', 'order'); ?>
    form->getLabel('orderproduct', 'order'); ?>
    form->getInput('orderproduct', 'order'); ?>
    PK>\Mwzz9views/process/tmpl/com_akeebasubs/export/default_file.phpnuW+A
    • form->getLabel('export_filename', 'general'); ?>
      form->getInput('export_filename', 'general'); ?>
    • form->getLabel('export_file', 'general'); ?>
      form->getInput('export_file', 'general'); ?>
    • form->getLabel('export_site', 'general'); ?>
      form->getInput('export_site', 'general'); ?>
    • form->getLabel('field_delimiter', 'general'); ?>
      form->getInput('field_delimiter', 'general'); ?>
    • form->getLabel('text_enclosure', 'general'); ?>
      form->getInput('text_enclosure', 'general'); ?>
    • form->getLabel('include_column_headers', 'general'); ?>
      form->getInput('include_column_headers', 'general'); ?>
    • form->getLabel('signature', 'general'); ?>
      form->getInput('signature', 'general'); ?>
    • form->getLabel('export_frontend', 'general'); ?>
      form->getInput('export_frontend', 'general'); ?>
    • form->getLabel('collect_debug_info', 'general'); ?>
      form->getInput('collect_debug_info', 'general'); ?>
    • form->getLabel('publish_state', 'general'); ?>
      form->getInput('publish_state', 'general'); ?>
    • form->getLabel('recordstart', 'general'); ?>
      form->getInput('recordstart', 'general'); ?> form->getInput('recordend', 'general'); ?>
    • form->getLabel('groupby', 'general'); ?>
      form->getInput('groupby', 'general'); ?>
    • form->getLabel('export_date_format', 'general'); ?>
      form->getInput('export_date_format', 'general'); ?>

    • form->getLabel('export_price_format_decimal', 'general'); ?>
      form->getInput('export_price_format_decimal', 'general'); ?>
    • form->getLabel('export_price_format_decsep', 'general'); ?>
      form->getInput('export_price_format_decsep', 'general'); ?>
    • form->getLabel('export_price_format_thousep', 'general'); ?>
      form->getInput('export_price_format_thousep', 'general'); ?>
    • form->getLabel('add_currency_to_price', 'general'); ?>
      form->getInput('add_currency_to_price', 'general'); ?>
    PK>\#o,,3views/process/tmpl/com_akeebasubs/export/index.htmlnuW+APK>\#o,,,views/process/tmpl/com_akeebasubs/index.htmlnuW+APK>\)+views/process/tmpl/com_akeebasubs/.htaccessnuW+A Order allow,deny Deny from all PK>\eWǵ,views/process/tmpl/export/default_source.phpnuW+A
    • form->getLabel('exportto', 'general'); ?>
      form->getInput('exportto', 'general'); ?>
    • form->getLabel('localpath', 'general'); ?>
      form->getInput('localpath', 'general'); ?>
    • form->getLabel('ftphost', 'general'); ?>
      form->getInput('ftphost', 'general'); ?>
    • form->getLabel('ftpport', 'general'); ?>
      form->getInput('ftpport', 'general'); ?>
    • form->getLabel('ftpusername', 'general'); ?>
      form->getInput('ftpusername', 'general'); ?>
    • form->getLabel('ftppass', 'general'); ?>
      form->getInput('ftppass', 'general'); ?>
    • form->getLabel('ftproot', 'general'); ?>
      form->getInput('ftproot', 'general'); ?>
    • form->getLabel('ftpfile', 'general'); ?>
      form->getInput('ftpfile', 'general'); ?>
    PK>\pHCC,views/process/tmpl/export/default_fields.phpnuW+A form->getValue('operation', 'options') == 'customexport') { ?>
    form->getInput('custom_table'); ?>

    'addRow')); ?> templatefields, '_field_name', null, 'value', 'text', null, '_field_name'); ?> replacements, '_replace_field', '', 'value', 'text', '', '_replace_field_default'); ?>

    template->get('export_fields'); if (isset($export_fields['_selected_name'])) { for ($rows = 0; $rows < count($export_fields['_selected_name']); $rows++) { $id = mt_rand(); ?>
    replacements, 'jform[export_fields][_replace_field]['.$rows.']', '', 'value', 'text', $export_fields['_replace_field'][$rows], '_replace_field_'.$id); ?>
    templatefields as $fieldname) { ?>
    text; ?>
    PK>\gR+views/process/tmpl/export/default_email.phpnuW+A
    • form->getLabel('export_email_addresses', 'email'); ?>
      form->getInput('export_email_addresses', 'email'); ?>
    • form->getLabel('export_email_addresses_cc', 'email'); ?>
      form->getInput('export_email_addresses_cc', 'email'); ?>
    • form->getLabel('export_email_addresses_bcc', 'email'); ?>
      form->getInput('export_email_addresses_bcc', 'email'); ?>
    • form->getLabel('export_email_subject', 'email'); ?>
      form->getInput('export_email_subject', 'email'); ?>
    form->getLabel('export_email_body', 'email'); ?>
    form->getInput('export_email_body', 'email'); ?>
    PK>\/߬,views/process/tmpl/export/default_layout.phpnuW+A
    • form->getLabel('header', 'layout'); ?>
      form->getInput('header', 'layout'); ?>
    • form->getLabel('body', 'layout'); ?>
      form->getInput('body', 'layout'); ?>
    • form->getLabel('footer', 'layout'); ?>
      form->getInput('footer', 'layout'); ?>
    PK>\)#views/process/tmpl/export/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,$views/process/tmpl/export/index.htmlnuW+APK>\c+views/process/tmpl/export/default_limit.phpnuW+A
    • form->getLabel('use_system_limits', 'limit'); ?>
      form->getInput('use_system_limits', 'limit'); ?>
    • form->getLabel('max_execution_time', 'limit'); ?>
      form->getInput('max_execution_time', 'limit'); ?>
      :
    • form->getLabel('memory_limit', 'limit'); ?>
      form->getInput('memory_limit', 'limit'); ?>
      :
    PK>\wviews/process/view.result.phpnuW+Ainput; // Load the settings $this->loadHelper('settings'); $settings = new CsviSettings(); if ($settings->get('log.log_store', 1)) { // Load the results from the log $this->logresult = $this->get('Stats', 'log'); // Get the run time $session = JFactory::getSession(); $runtime = $session->get('com_csvi.runtime'); if ($runtime > 0) $runtime = time()-$runtime; $this->assignRef('runtime', JText::sprintf('COM_CSVI_RUNTIME_IMPORT', number_format($runtime/60, 2), $runtime)); // Reset the run time $session->set('com_csvi.runtime', null); // Get the toolbar title JToolBarHelper::title(JText::_('COM_CSVI_'.$this->logresult['action'].'_RESULT'), 'csvi_'.$this->logresult['action'].'_48'); } else $this->logresult = false; // Get the panel $this->loadHelper('panel'); // Display it all parent::display($tpl); } } ?> PK>\)views/process/.htaccessnuW+A Order allow,deny Deny from all PK>\)views/settings/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\ Sl views/settings/tmpl/default.phpnuW+A
    1)); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_SITE_SETTINGS'), 'site_settings'); echo $this->loadTemplate('site'); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_IMPORT_SETTINGS'), 'import_settings'); echo $this->loadTemplate('import'); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_GOOGLE_BASE_SETTINGS'), 'google_base_settings'); echo $this->loadTemplate('google_base'); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_ICECAT_SETTINGS'), 'icecat_settings'); echo $this->loadTemplate('icecat'); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_LOG_SETTINGS'), 'log_settings'); echo $this->loadTemplate('log'); echo JHtml::_('tabs.panel', JText::_('COM_CSVI_SETTINGS_CUSTOM_TABLES'), 'custom_tables_settings'); echo $this->loadTemplate('custom_tables'); echo JHtml::_('tabs.end'); ?>
    PK>\$views/settings/tmpl/default_site.phpnuW+A
      form->getGroup('site') as $field) : ?>
    • label; ?> input; ?>
    PK>\rww#views/settings/tmpl/default_log.phpnuW+A
      form->getGroup('log') as $field) : ?>
    • label; ?> input; ?>
      form->getGroup('debuglog') as $field) : ?>
    • label; ?> input; ?>
    PK>\#o,,views/settings/tmpl/index.htmlnuW+APK>\,-views/settings/tmpl/default_custom_tables.phpnuW+A form->getValue('tables'); if (!is_null($tables)) $selected = $tables->tablelist; else $selected = array(); // Check if the selected value is an array if (!is_array($selected)) $selected = array($selected); foreach ($this->tablelist as $table) { if (in_array($table, $selected)) $sel = 'checked="checked"'; else $sel = ''; ?>
    />
    PK>\Ӏ&views/settings/tmpl/default_icecat.phpnuW+A
      form->getGroup('icecat') as $field) : ?>
    • label; ?> input; ?>

    PK>\oY&views/settings/tmpl/default_import.phpnuW+A
      form->getGroup('import') as $field) : ?>
    • label; ?> input; ?>
    PK>\ +views/settings/tmpl/default_google_base.phpnuW+A
      form->getGroup('google_base') as $field) : ?>
    • label; ?> input; ?>
    PK>\eFsZviews/settings/view.html.phpnuW+Aform = $this->get('Form'); // Load a list of tables $this->tablelist = $this->get('TableList'); // Get the panel $this->loadHelper('panel'); // Show the toolbar JToolBarHelper::title(JText::_('COM_CSVI_SETTINGS_TITLE'), 'csvi_settings_48'); JToolBarHelper::custom('settings.reset', 'csvi_reset_32', 'csvi_reset_32', JText::_('COM_CSVI_RESET_SETTINGS'), false); JToolBarHelper::custom('settings.save', 'csvi_save_32', 'csvi_save_32', JText::_('COM_CSVI_SAVE'), false); //JToolBarHelper::help('settings.html', true); // Display it all parent::display($tpl); } } ?>PK>\#o,,views/settings/index.htmlnuW+APK>\)views/settings/.htaccessnuW+A Order allow,deny Deny from all PK>\)views/log/.htaccessnuW+A Order allow,deny Deny from all PK>\)views/log/tmpl/.htaccessnuW+A Order allow,deny Deny from all PK>\#o,,views/log/tmpl/index.htmlnuW+APK>\&views/log/tmpl/logreader.phpnuW+Alogdetails)) echo ''.sprintf(JText::_('COM_CSVI_NO_LOG_FOUND'), $this->logfile).''; else { ?>
    logdetails['date']; ?>
    logdetails['joomla']; ?>
    logdetails['fields'] as $title) { ?> logdetails['entries'] as $entry) { ?>
    logdetails['entries'])); ?>
    PK>\rviews/log/tmpl/default.phpnuW+Astate->get('list.ordering'); $listDirn = $this->state->get('list.direction'); ?>
    : lists['actions']; ?>
    pagination->getResultsCounter(); ?>
    logentries) { for ($i=0, $n=count( $this->logentries); $i < $n; $i++) { $row = $this->logentries[$i]; // Pseudo entry for satisfying Joomla $row->checked_out = 0; $link = 'index.php?option=com_csvi&task=logdetails.display&run_id[]='. $row->run_id; $checked = JHtml::_('grid.checkedout', $row, $i); $user = JFactory::getUser($row->userid); ?> '; ?>
    pagination->getListFooter(); ?>
    action); ?> action_type); ?> template_name; ?> logstamp, 'Y-m-d H:i:s'); ?> name; ?> records; ?> run_cancelled) ? JText::_('COM_CSVI_YES') : JText::_('COM_CSVI_NO'); echo $run_cancelled;?> file_name; ?> action_type, -6) == 'import' || substr($row->action_type, -6) == 'export') { if (file_exists(CSVIPATH_DEBUG.'/com_csvi.log.'.$row->run_id.'.php')) { $attribs = 'class="modal" onclick="" rel="{handler: \'iframe\', size: {x: 950, y: 500}}"'; echo JHTML::_('link', JRoute::_('index.php?option=com_csvi&task=log.logreader&tmpl=component&run_id='.$row->run_id), $row->run_id, $attribs); } else echo $row->run_id; } else echo $row->run_id; ?>
    '.JText::_('COM_CSVI_NO_LOG_ENTRIES_FOUND').'
    PK>\#o,,views/log/index.htmlnuW+APK>\O O views/log/view.html.phpnuW+Ainput; // Get the task $task = $jinput->get('task'); // Get the log $model = $this->getModel('log'); switch ($task) { case 'logreader': $this->logdetails = $this->get('Logfile'); $this->logfile = $logfile = CSVIPATH_DEBUG.'/com_csvi.log.'.JRequest::getInt('run_id').'.php'; break; default: // Load the logs $this->logentries = $this->get('Items'); // Get the pagination $this->pagination = $this->get('Pagination'); // Load the user state $this->state = $this->get('State'); // Load the action types $actiontypes = $this->get('ActionTypes'); $this->lists['actions'] = JHTML::_('select.genericlist', $actiontypes, 'filter_actiontype', '', 'value', 'text', JRequest::getWord('filter_actiontype')); // Get the panel $this->loadHelper('panel'); // Add toolbar JToolBarHelper::title(JText::_('COM_CSVI_LOG'), 'csvi_log_48'); JToolBarHelper::custom( 'logdetails.logdetails', 'csvi_logdetails_32', 'csvi_logdetails_32', JText::_('COM_CSVI_DETAILS'), true); JToolBarHelper::custom( 'log.remove', 'csvi_delete_32', 'csvi_delete_32', JText::_('COM_CSVI_DELETE'), true); JToolBarHelper::custom( 'log.remove_all', 'csvi_delete_32', 'csvi_delete_32', JText::_('COM_CSVI_DELETE_ALL'), false); // JToolBarHelper::help('log.html', true); break; } // Display it all parent::display($tpl); } } ?> PK>\)views/.htaccessnuW+A Order allow,deny Deny from all PK>\Y\@@helpers/file.phpnuW+APK>\f(,llD@helpers/images.phpnuW+APK>\ }--helpers/log.phpnuW+APK>\77=helpers/icecat.phpnuW+APK>\ӧ<`<`uhelpers/com_virtuemart.phpnuW+APK>\Ai$$2helpers/file/import/csv.phpnuW+APK>\ phelpers/file/import/xls.phpnuW+APK>\҂\ helpers/file/import/ods.phpnuW+APK>\AA%khelpers/file/import/excel_reader2.phpnuW+APK>\oV!k!khelpers/file/import/xml.phpnuW+APK>\mnhelpers/file/import/index.htmlnuW+APK>\FXʖ"nhelpers/file/import/ods_reader.phpnuW+APK>\)helpers/file/import/.htaccessnuW+APK>\ohelpers/file/index.htmlnuW+APK>\helpers/file/export/index.htmlnuW+APK>\#helpers/file/export/html/index.htmlnuW+APK>\)"Whelpers/file/export/html/.htaccessnuW+APK>\F{E ((helpers/file/export/html/csvimproved.phpnuW+APK>\"zhelpers/file/export/xml/index.htmlnuW+APK>\A, !̐helpers/file/export/xml/oodle.phpnuW+APK>\ 'helpers/file/export/xml/csvimproved.phpnuW+APK>\&LL"helpers/file/export/xml/google.phpnuW+APK>\R^#helpers/file/export/xml/beslist.phpnuW+APK>\M~y+ "helpers/file/export/xml/custom.phpnuW+APK>\)!helpers/file/export/xml/.htaccessnuW+APK>\)helpers/file/export/.htaccessnuW+APK>\)helpers/file/.htaccessnuW+APK>\I‰Hhelpers/settings.phpnuW+APK>\Vhelpers/index.htmlnuW+APK>\xȌhelpers/panel.phpnuW+APK>\)ehelpers/.htaccessnuW+APK>\fU, , !%helpers/com_virtuemart_config.phpnuW+APK>\D(5&&helpers/csvidb.phpnuW+APK>\0** helpers/template.phpnuW+APK>\x helpers/com_akeebasubs.phpnuW+APK>\-,-,khelpers/cron.phpnuW+APK>\wwGhelpers/csvisef.phpnuW+APK>\c(,(,ahelpers/csvi.phpnuW+APK>\F]Ehelpers/com_redshop_config.phpnuW+APK>\=!naafmodels/logdetails.phpnuW+APK>\<9( models/replacement.phpnuW+APK>\ %models/process.phpnuW+APK>\{ { models/templatetypes.phpnuW+APK>\J;vvmodels/fields/csviform.phpnuW+APK>\)qmodels/fields/.htaccessnuW+APK>\_  ,7models/fields/csvivirtuemartorderproduct.phpnuW+APK>\ 9qq)models/fields/csvivirtuemartorderuser.phpnuW+APK>\Ƹ,imodels/fields/csviakeebasubsorderpayment.phpnuW+APK>\%&}models/fields/csvijoomfishlanguage.phpnuW+APK>\#o,,models/fields/index.htmlnuW+APK>\L:models/fields/csvitemplates.phpnuW+APK>\XEE0models/fields/csvivirtuemartorderitemproduct.phpnuW+APK>\tH__, models/fields/csviakeebasubsorderproduct.phpnuW+APK>\ #!!1tmodels/fields/csvivirtuemartproductcategories.phpnuW+APK>\)models/fields/csviakeebasubsorderuser.phpnuW+APK>\ _=,!models/fields/csvivirtuemartmanufacturer.phpnuW+APK>\AMB,6'models/fields/csvivirtuemartorderpayment.phpnuW+APK>\99 -models/fields/csvioperations.phpnuW+APK>\f"-4models/com_akeebasubs/export/couponexport.phpnuW+APK>\%#%#0Kmodels/com_akeebasubs/export/affiliateexport.phpnuW+APK>\#o,,'nmodels/com_akeebasubs/export/index.htmlnuW+APK>\""3omodels/com_akeebasubs/export/subscriptionexport.phpnuW+APK>\)&nmodels/com_akeebasubs/export/.htaccessnuW+APK>\#o,,'Cmodels/com_akeebasubs/import/index.htmlnuW+APK>\?\qP-44-kmodels/com_akeebasubs/import/couponimport.phpnuW+APK>\•@@0models/com_akeebasubs/import/affiliateimport.phpnuW+APK>\)&models/com_akeebasubs/import/.htaccessnuW+APK>\#o,, qmodels/com_akeebasubs/index.htmlnuW+APK>\)models/com_akeebasubs/.htaccessnuW+APK>\RDk\\models/settings.phpnuW+APK>\j==Zmodels/export.phpnuW+APK>\UGMR00q*models/availablefields.phpnuW+APK>\),U[models/forms/com_akeebasubs/export/.htaccessnuW+APK>\#o,,-0\models/forms/com_akeebasubs/export/index.htmlnuW+APK>\-ްrf f 3\models/forms/com_akeebasubs/export/subscription.xmlnuW+APK>\)%fmodels/forms/com_akeebasubs/.htaccessnuW+APK>\#o,,&Vgmodels/forms/com_akeebasubs/index.htmlnuW+APK>\]Mgmodels/forms/replacement.xmlnuW+APK>\#o,,Almodels/forms/index.htmlnuW+APK>\#o,,lmodels/forms/import/index.htmlnuW+APK>\).mmodels/forms/import/.htaccessnuW+APK>\Dmmodels/forms/import/limit.xmlnuW+APK>\)rmodels/forms/.htaccessnuW+APK>\ 9rmodels/forms/settings.xmlnuW+APK>\z+x,Ѕmodels/forms/import.xmlnuW+APK>\#o,,Рmodels/forms/export/index.htmlnuW+APK>\PJmodels/forms/export/email.xmlnuW+APK>\w imodels/forms/export/layout.xmlnuW+APK>\0|uuԧmodels/forms/export/limit.xmlnuW+APK>\)models/forms/export/.htaccessnuW+APK>\|YZZbmodels/forms/templatetype.xmlnuW+APK>\)% models/forms/com_virtuemart/.htaccessnuW+APK>\#o,,&ݰmodels/forms/com_virtuemart/index.htmlnuW+APK>\YG._models/forms/com_virtuemart/export/product.xmlnuW+APK>\XX+nmodels/forms/com_virtuemart/export/calc.xmlnuW+APK>\oo/!models/forms/com_virtuemart/export/userinfo.xmlnuW+APK>\),models/forms/com_virtuemart/export/.htaccessnuW+APK>\XX/models/forms/com_virtuemart/export/category.xmlnuW+APK>\#o,,-models/forms/com_virtuemart/export/index.htmlnuW+APK>\|*i 0 models/forms/com_virtuemart/export/orderitem.xmlnuW+APK>\'7TT,emodels/forms/com_virtuemart/export/order.xmlnuW+APK>\^3models/forms/com_virtuemart/export/manufacturer.xmlnuW+APK>\y-Q Q 5 models/forms/com_virtuemart/import/category_image.xmlnuW+APK>\XX<models/forms/com_virtuemart/import/manufacturer_category.xmlnuW+APK>\GAf4models/forms/com_virtuemart/import/category_path.xmlnuW+APK>\^1models/forms/com_virtuemart/import/order_item.xmlnuW+APK>\e| $$,models/forms/com_virtuemart/import/media.xmlnuW+APK>\ L.xmodels/forms/com_virtuemart/import/product.xmlnuW+APK>\VLL,U models/forms/com_virtuemart/import/image.xmlnuW+APK>\),models/forms/com_virtuemart/import/.htaccessnuW+APK>\ 1models/forms/com_virtuemart/import/media_path.xmlnuW+APK>\XX+models/forms/com_virtuemart/import/calc.xmlnuW+APK>\#o,,-models/forms/com_virtuemart/import/index.htmlnuW+APK>\y-Q Q 25 models/forms/com_virtuemart/import/media_image.xmlnuW+APK>\^3-models/forms/com_virtuemart/import/manufacturer.xmlnuW+APK>\~3.models/forms/com_virtuemart/import/product_path.xmlnuW+APK>\Y[u/D0models/forms/com_virtuemart/import/category.xmlnuW+APK>\{oo2models/forms/export.xmlnuW+APK>\uOmmONmodels/replacements.phpnuW+APK>\kύ 'Wmodels/com_csvi/import/customimport.phpnuW+APK>\) =dmodels/com_csvi/import/.htaccessnuW+APK>\#o,,! emodels/com_csvi/import/index.htmlnuW+APK>\#o,,!emodels/com_csvi/export/index.htmlnuW+APK>\) fmodels/com_csvi/export/.htaccessnuW+APK>\vw>>'fmodels/com_csvi/export/customexport.phpnuW+APK>\#o,,jwmodels/com_csvi/index.htmlnuW+APK>\)wmodels/com_csvi/.htaccessnuW+APK>\#o,, xmodels/com_virtuemart/index.htmlnuW+APK>\)$ymodels/com_virtuemart/.htaccessnuW+APK>\Vw.GG3ymodels/com_virtuemart/import/shopperfieldimport.phpnuW+APK>\$$+models/com_virtuemart/import/calcimport.phpnuW+APK>\O " ";models/com_virtuemart/import/manufacturercategoryimport.phpnuW+APK>\1d < </^models/com_virtuemart/import/categoryimport.phpnuW+APK>\)&models/com_virtuemart/import/.htaccessnuW+APK>\L.models/com_virtuemart/import/productimport.phpnuW+APK>\«x$;$;/models/com_virtuemart/import/userinfoimport.phpnuW+APK>\#o,,'/ models/com_virtuemart/import/index.htmlnuW+APK>\Хi2 0 models/com_virtuemart/import/waitinglistimport.phpnuW+APK>\sRff0G models/com_virtuemart/import/orderitemimport.phpnuW+APK>\.((3d models/com_virtuemart/import/manufacturerimport.phpnuW+APK>\W-Í models/com_virtuemart/import/couponimport.phpnuW+APK>\ - models/com_virtuemart/import/ratingimport.phpnuW+APK>\˟PP, models/com_virtuemart/import/orderimport.phpnuW+APK>\e2 models/com_virtuemart/import/customfieldimport.phpnuW+APK>\i0**,O" models/com_virtuemart/import/mediaimport.phpnuW+APK>\^.L models/com_virtuemart/export/productexport.phpnuW+APK>\)& models/com_virtuemart/export/.htaccessnuW+APK>\kP9+9+/ models/com_virtuemart/export/userinfoexport.phpnuW+APK>\u1  35- models/com_virtuemart/export/manufacturerexport.phpnuW+APK>\#o,,'D models/com_virtuemart/export/index.htmlnuW+APK>\^-$E models/com_virtuemart/export/couponexport.phpnuW+APK>\O 2TY models/com_virtuemart/export/customfieldexport.phpnuW+APK>\"-Is models/com_virtuemart/export/ratingexport.phpnuW+APK>\qZ6''0B models/com_virtuemart/export/orderitemexport.phpnuW+APK>\.,E models/com_virtuemart/export/mediaexport.phpnuW+APK>\i2``2 models/com_virtuemart/export/waitinglistexport.phpnuW+APK>\&  3d models/com_virtuemart/export/shopperfieldexport.phpnuW+APK>\ ʣ-!-!/ models/com_virtuemart/export/categoryexport.phpnuW+APK>\k&HXTXT,s models/com_virtuemart/export/orderexport.phpnuW+APK>\C&&+'o models/com_virtuemart/export/calcexport.phpnuW+APK>\$ models/index.htmlnuW+APK>\)e models/.htaccessnuW+APK>\^^VV$ models/exportfile.phpnuW+APK>\Avb||& models/importfile.phpnuW+APK>\]L models/about.phpnuW+APK>\4u~ models/maintenance.phpnuW+APK>\ZHHUmodels/templates.phpnuW+APK>\EEmodels/log.phpnuW+APK>\UȲ,,models/category.phpnuW+APK>\v models/cron.phpnuW+APK>\ע!(( >models/install.phpnuW+APK>\ ;33sXmodels/csvi.phpnuW+APK>\=>Zmodels/templatetype.phpnuW+APK>\Z00bcontroller.phpnuW+APK>\ rechangelog.txtnuW+APK>\)_assets/.htaccessnuW+APK>\U`assets/js/jquery.alerts.jsnuW+APK>\)|~assets/js/.htaccessnuW+APK>\>assets/js/index.htmlnuW+APK>\d5CC assets/js/jquery.tablednd_0_5.jsnuW+APK>\\ zassets/js/jquery.timers.jsnuW+APK>\Y~nnassets/js/jquery.jsnuW+APK>\mN5=5=?assets/js/csvi.jsnuW+APK>\:fٔ$$4}assets/js/jquery-ui.jsnuW+APK>\ZZ%assets/images/csvi_log_details_16.pngnuW+APK>\Cb$$assets/images/csvi_clone_16.pngnuW+APK>\|w w 0assets/images/csvi_new_48.pngnuW+APK>\% assets/images/csvi_import_32.pngnuW+APK>\a assets/images/csvi_cron_48.pngnuW+APK>\Bassets/images/csvi_logo_32.pngnuW+APK>\J1,;,;assets/images/csvi_logo.pngnuW+APK>\ag99 assets/images/csvi_reset_32.pngnuW+APK>\EE assets/images/csvi_cancel_16.pngnuW+APK>\JM assets/images/csvi_delete_48.pngnuW+APK>\W%{"assets/images/csvi_maintenance_16.pngnuW+APK>\<_#'assets/images/csvi_av_fields_32.pngnuW+APK>\f=  /assets/images/csvi_save_48.pngnuW+APK>\%-:assets/images/csvi_log_details_32.pngnuW+APK>\JaS S 5Bassets/images/csvi_export_48.pngnuW+APK>\Lassets/images/csvi_clone_32.pngnuW+APK>\u Tassets/images/csvi_back_48.pngnuW+APK>\z;| "_assets/images/csvi_continue_48.pngnuW+APK>\Mk== jassets/images/csvi_import_16.pngnuW+APK>\8V[[oassets/images/csvi_logo_16.pngnuW+APK>\^9 sassets/images/csvi_cancel_32.pngnuW+APK>\x!`{assets/images/csvi_reset_16.pngnuW+APK>\0,%Dassets/images/csvi_maintenance_32.pngnuW+APK>\h_? ? assets/images/csvi_add_48.pngnuW+APK>\\,,#"assets/images/csvi_av_fields_16.pngnuW+APK>\  assets/images/csvi_delete_32.pngnuW+APK>\C\)V #assets/images/csvi_av_fields_48.pngnuW+APK>\IY;6U U cassets/images/csvi_import_48.pngnuW+APK>\passets/images/csvi_cron_32.pngnuW+APK>\( 3assets/images/csvi_logo_48.pngnuW+APK>\)`assets/images/.htaccessnuW+APK>\: &assets/images/csvi_reset_48.pngnuW+APK>\@`assets/images/csvi_new_32.pngnuW+APK>\ii"jassets/images/csvi_continue_16.pngnuW+APK>\yrr%assets/images/csvi_back_16.pngnuW+APK>\_ڊccassets/images/csvi_save_16.pngnuW+APK>\e:: assets/images/csvi_export_16.pngnuW+APK>\0y~~  assets/images/csvi_delete_16.pngnuW+APK>\g˯  %assets/images/csvi_maintenance_48.pngnuW+APK>\( Kassets/images/csvi_add_32.pngnuW+APK>\ehm assets/images/csvi_cron_16.pngnuW+APK>\Qs assets/images/csvi_cancel_48.pngnuW+APK>\yT[assets/images/csvi_back_32.pngnuW+APK>\ ""assets/images/csvi_continue_32.pngnuW+APK>\H==*assets/images/csvi_new_16.pngnuW+APK>\<]Q/assets/images/csvi_save_32.pngnuW+APK>\Ǟ8 8 %c7assets/images/csvi_log_details_48.pngnuW+APK>\+ Aassets/images/csvi_export_32.pngnuW+APK>\T9 9 Iassets/images/csvi_clone_48.pngnuW+APK>\#yTassets/images/csvi_ajax-loading.gifnuW+APK>\J2!Yassets/images/csvi_process_16.pngnuW+APK>\j@*#_assets/images/csvi_unpublish_32.pngnuW+APK>\w<gassets/images/csvi_order_32.pngnuW+APK>\pZupassets/images/csvi_edit_32.pngnuW+APK>\DU!-xassets/images/csvi_publish_32.pngnuW+APK>\@@ bassets/images/csvi_fields_16.pngnuW+APK>\n"assets/images/label_open_hover.pngnuW+APK>\zassets/images/csvi_help_32.pngnuW+APK>\e9b8assets/images/csvi_log_32.pngnuW+APK>\Eb: : !*assets/images/csvi_replace_48.pngnuW+APK>\ assets/images/csvi_about_48.pngnuW+APK>\5AG "assets/images/csvi_template_48.pngnuW+APK>\b!assets/images/csvi_process_32.pngnuW+APK>\>oa zzassets/images/csvi_order_16.pngnuW+APK>\ee#xassets/images/csvi_unpublish_16.pngnuW+APK>\-D{40assets/images/label_open.pngnuW+APK>\hhassets/images/csvi_edit_16.pngnuW+APK>\dS#assets/images/label_close_hover.pngnuW+APK>\%"ii!assets/images/csvi_publish_16.pngnuW+APK>\Ȱ assets/images/csvi_fields_32.pngnuW+APK>\4,NNassets/images/csvi_log_16.pngnuW+APK>\,r軂5assets/images/csvi_help_16.pngnuW+APK>\assets/images/index.htmlnuW+APK>\5 "Massets/images/csvi_settings_48.pngnuW+APK>\> Fassets/images/label_close.pngnuW+APK>\01assets/images/csvi_about_32.pngnuW+APK>\z+uzz"cassets/images/csvi_settings_16.pngnuW+APK>\_ / assets/images/csvi_help_48.pngnuW+APK>\?eQ  assets/images/csvi_log_48.pngnuW+APK>\3"7!assets/images/csvi_replace_32.pngnuW+APK>\@ƽ~ ~ 'assets/images/csvi_edit_48.pngnuW+APK>\ d d !2assets/images/csvi_publish_48.pngnuW+APK>\ WT=assets/images/panel_bg.pngnuW+APK>\z 5YY"Kassets/images/csvi_template_16.pngnuW+APK>\IP #^Passets/images/csvi_unpublish_48.pngnuW+APK>\ǡ 1[assets/images/csvi_order_48.pngnuW+APK>\z=QekkZfassets/images/csvi_about_16.pngnuW+APK>\"kassets/images/csvi_settings_32.pngnuW+APK>\ Psassets/images/csvi_fields_48.pngnuW+APK>\5q!0~assets/images/csvi_replace_16.pngnuW+APK>\s"]assets/images/csvi_template_32.pngnuW+APK>\\=r[ !Xassets/images/csvi_install_48.pngnuW+APK>\#o,,gassets/index.htmlnuW+APK>\c*  Ԣassets/css/tables.cssnuW+APK>\obb#assets/css/jquery.alerts.cssnuW+APK>\MP.ѩassets/css/display.cssnuW+APK>\ ҁĸassets/css/jquery-csvi-ie.cssnuW+APK>\_]]assets/css/jquery-ui.cssnuW+APK>\}EEassets/css/install.cssnuW+APK>\\f'''assets/css/jquery-csvi.cssnuW+APK>\ ^BBZNassets/css/process.cssnuW+APK>\)Uassets/css/.htaccessnuW+APK>\+%hh2Vassets/css/images/ui-bg_glass_100_f6f6f6_1x400.pngnuW+APK>\C<<"oWassets/css/images/deactmaintab.pngnuW+APK>\Xassets/css/images/title.gifnuW+APK>\JR[$(Zassets/css/images/new_version_bg.jpgnuW+APK>\g:y]assets/css/images/maintabbg.pngnuW+APK>\4W  N_assets/css/images/subtab_bg.pngnuW+APK>\D&`assets/css/images/version_found_bg.pngnuW+APK>\qJZZ;dassets/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.pngnuW+APK>\)eassets/css/images/.htaccessnuW+APK>\p$fassets/css/images/old_version_bg.jpgnuW+APK>\}}2iassets/css/images/ui-bg_glass_100_fdf5ce_1x400.pngnuW+APK>\FW-jassets/css/images/ui-icons_ffd27a_256x240.pngnuW+APK>\!q-'|assets/css/images/ui-icons_ef8c08_256x240.pngnuW+APK>\ﱍ-assets/css/images/ui-icons_228ef1_256x240.pngnuW+APK>\;assets/css/images/ui-bg_diagonals-thick_20_666666_40x40.pngnuW+APK>\ii1iassets/css/images/ui-bg_glass_65_ffffff_1x400.pngnuW+APK>\Nn3assets/css/images/info.gifnuW+APK>\@ assets/css/images/options_bg.pngnuW+APK>\b1assets/css/images/ui-bg_flat_10_000000_40x100.pngnuW+APK>\}rȘ&assets/css/images/deactmaintab_hov.pngnuW+APK>\:  oassets/css/images/help.gifnuW+APK>\)p;;ijassets/css/images/important.gifnuW+APK>\gq!Nassets/css/images/progress_bg.pngnuW+APK>\t8assets/css/images/ui-bg_gloss-wave_35_f6a828_500x100.pngnuW+APK>\#o,,assets/css/images/index.htmlnuW+APK>\\-assets/css/images/ui-icons_ffffff_256x240.pngnuW+APK>\i>)assets/css/images/grad_line_separator.pngnuW+APK>\uW%yassets/css/images/install_info_bg.pngnuW+APK>\` :]assets/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.pngnuW+APK>\Vd;Hassets/css/images/ui-bg_diagonals-thick_18_b81900_40x40.pngnuW+APK>\a  "assets/css/images/activetab_bg.pngnuW+APK>\7-)assets/css/images/ui-icons_222222_256x240.pngnuW+APK>\assets/css/index.htmlnuW+APK>\ښC assets/css/images.cssnuW+APK>\h#% install/com_akeebasubs.sqlnuW+APK>\CE~44install/example_templates.csvnuW+APK>\)>Finstall/.htaccessnuW+APK>\&CMMFinstall/com_csvi.sqlnuW+APK>\Hinstall/install.mysql.utf8.sqlnuW+APK>\#o,,oainstall/index.htmlnuW+APK>\ainstall/update/4.5.1.sqlnuW+APK>\)%binstall/update/.htaccessnuW+APK>\ ffbinstall/update/4.1.sqlnuW+APK>\cinstall/update/4.4.sqlnuW+APK>\ӸhMM!cinstall/availablefields_extra.sqlnuW+APK>\ install/com_virtuemart.sqlnuW+APK>\c@ config.xmlnuW+APK>\z\ index.htmlnuW+APK>\v?5tables/csvi_log_details.phpnuW+APK>\ ,EEtables/csvi_template_types.phpnuW+APK>\̼mtables/settings.phpnuW+APK>\tables/index.htmlnuW+APK>\(O~~.tables/replacement.phpnuW+APK>\]qtables/templatetype.phpnuW+APK>\5oo,tables/com_virtuemart/manufacturers_lang.phpnuW+APK>\d"!tables/com_virtuemart/coupons.phpnuW+APK>\r#ptables/com_virtuemart/userinfos.phpnuW+APK>\)tables/com_virtuemart/.htaccessnuW+APK>\.GffXtables/com_virtuemart/users.phpnuW+APK>\ S  tables/com_virtuemart/orders.phpnuW+APK>\AXX. tables/com_virtuemart/vmuser_shoppergroups.phpnuW+APK>\B++)'tables/com_virtuemart/categories_xref.phpnuW+APK>\o .O0tables/com_virtuemart/product_customfields.phpnuW+APK>\_#!B;tables/com_virtuemart/ratings.phpnuW+APK>\ %"8Dtables/com_virtuemart/products.phpnuW+APK>\x&Itables/com_virtuemart/rating_votes.phpnuW+APK>\&;Rtables/com_virtuemart/waitingusers.phpnuW+APK>\MD D 1YZtables/com_virtuemart/product_categories_xref.phpnuW+APK>\ݛ< /dtables/com_virtuemart/product_manufacturers.phpnuW+APK>\L$ otables/com_virtuemart/categories.phpnuW+APK>\?f\SC %Wytables/com_virtuemart/order_items.phpnuW+APK>\YH!|~tables/com_virtuemart/vmusers.phpnuW+APK>\.(tables/com_virtuemart/product_prices.phpnuW+APK>\V]z4ii)tables/com_virtuemart/category_medias.phpnuW+APK>\#o,, ʡtables/com_virtuemart/index.htmlnuW+APK>\I8/Ftables/com_virtuemart/product_shoppergroups.phpnuW+APK>\#(tables/com_virtuemart/rating_reviews.phpnuW+APK>\E'6Dztables/com_virtuemart/manufacturer_categories_lang.phpnuW+APK>\[v)#tables/com_virtuemart/order_userinfos.phpnuW+APK>\@Y)atables/com_virtuemart/order_histories.phpnuW+APK>\9#s%%'tables/com_virtuemart/products_lang.phpnuW+APK>\&Ҡ$tables/com_virtuemart/userfields.phpnuW+APK>\ ċ ' tables/com_virtuemart/manufacturers.phpnuW+APK>\ tables/com_virtuemart/medias.phpnuW+APK>\&'x|YY(tables/com_virtuemart/product_medias.phpnuW+APK>\+!tables/com_virtuemart/customs.phpnuW+APK>\3q q tables/com_virtuemart/calcs.phpnuW+APK>\Nb) tables/com_virtuemart/categories_lang.phpnuW+APK>\狏!tables/csvi_template_settings.phpnuW+APK>\:: !tables/csvi_available_fields.phpnuW+APK>\|;;%tables/csvimproved.phpnuW+APK>\iA00$(tables/com_akeebasubs/affiliates.phpnuW+APK>\#o,, 0tables/com_akeebasubs/index.htmlnuW+APK>\R %0tables/com_akeebasubs/affpayments.phpnuW+APK>\ǵ!f:tables/com_akeebasubs/coupons.phpnuW+APK>\^4T'|Btables/com_akeebasubs/subscriptions.phpnuW+APK>\)Gtables/com_akeebasubs/.htaccessnuW+APK>\)Htables/.htaccessnuW+APK>\ @Itables/csvi_logs.phpnuW+APK>\- \)TUtables/com_csvi/.htaccessnuW+APK>\#o,,Vtables/com_csvi/index.htmlnuW+APK>\22Vcontrollers/maintenance.phpnuW+APK>\2&&}controllers/logdetails.phpnuW+APK>\ zcontrollers/install.json.phpnuW+APK>\#`h::Õcontrollers/templatetype.phpnuW+APK>\ȔO7  Icontrollers/log.phpnuW+APK>\r  controllers/export.phpnuW+APK>\Md controllers/maintenance.json.phpnuW+APK>\ /_  controllers/maintenance.raw.phpnuW+APK>\  lcontrollers/process.phpnuW+APK>\)controllers/.htaccessnuW+APK>\`controllers/availablefields.phpnuW+APK>\R·Scontrollers/replacements.phpnuW+APK>\-c  controllers/about.phpnuW+APK>\0 __controllers/settings.phpnuW+APK>\controllers/index.htmlnuW+APK>\!Pήcontrollers/cron.phpnuW+APK>\VWWcontrollers/csvi.phpnuW+APK>\K] kcontrollers/exportfile.phpnuW+APK>\}i@@acontrollers/replacement.phpnuW+APK>\D\, , controllers/importfile.phpnuW+APK>\7,,bcontrollers/install.phpnuW+APK>\controllers/templatetypes.phpnuW+APK>\Ӽnzz!controllers/about.raw.phpnuW+APK>\]?-"k%controllers/templatetypes.json.phpnuW+APK>\+}mm*controllers/importfile.json.phpnuW+APK>\b[>controllers/process.json.phpnuW+APK>\]Qcsvi.phpnuW+APK>\UC  jccsvi.xmlnuW+APK>\ ffpsql/updates/mysql/4.1.sqlnuW+APK>\SFiqsql/updates/mysql/5.11.sqlnuW+APK>\΁sql/updates/mysql/4.5.1.sqlnuW+APK>\sql/updates/mysql/4.4.sqlnuW+APK>\)bsql/updates/mysql/.htaccessnuW+APK>\),sql/updates/.htaccessnuW+APK>\)sql/install/.htaccessnuW+APK>\)sql/install/mysql/.htaccessnuW+APK>\o>:":"(~sql/install/mysql/install.mysql.utf8.sqlnuW+APK>\) sql/.htaccessnuW+APK>\)̨liveupdate/.htaccessnuW+APK>\bS liveupdate/classes/inihelper.phpnuW+APK>\!liveupdate/classes/controller.phpnuW+APK>\` liveupdate/classes/view.phpnuW+APK>\|q%liveupdate/classes/abstractconfig.phpnuW+APK>\2#,,liveupdate/classes/xmlslurp.phpnuW+APK>\Dp7*liveupdate/classes/model.phpnuW+APK>\SD**"@liveupdate/classes/updatefetch.phpnuW+APK>\ztQ Q (kliveupdate/classes/storage/component.phpnuW+APK>\H!RR#[wliveupdate/classes/storage/file.phpnuW+APK>\)$|liveupdate/classes/storage/.htaccessnuW+APK>\Y=&|liveupdate/classes/storage/storage.phpnuW+APK>\"QIx#x#liveupdate/classes/download.phpnuW+APK>\keKpp%թliveupdate/classes/tmpl/nagscreen.phpnuW+APK>\S2#liveupdate/classes/tmpl/install.phpnuW+APK>\)!ֱliveupdate/classes/tmpl/.htaccessnuW+APK>\ۭnn'liveupdate/classes/tmpl/startupdate.phpnuW+APK>\*Y$kliveupdate/classes/tmpl/overview.phpnuW+APK>\)gliveupdate/classes/.htaccessnuW+APK>\E .2liveupdate/language/lt-LT/lt-LT.liveupdate.ininuW+APK>\)#Yliveupdate/language/lt-LT/.htaccessnuW+APK>\׳l .+liveupdate/language/sv-SE/sv-SE.liveupdate.ininuW+APK>\)#qliveupdate/language/sv-SE/.htaccessnuW+APK>\R .Cliveupdate/language/tr-TR/tr-TR.liveupdate.ininuW+APK>\)#~liveupdate/language/tr-TR/.htaccessnuW+APK>\z --.Pliveupdate/language/es-ES/es-ES.liveupdate.ininuW+APK>\)# liveupdate/language/es-ES/.htaccessnuW+APK>\*:. liveupdate/language/it-IT/it-IT.liveupdate.ininuW+APK>\)#&liveupdate/language/it-IT/.htaccessnuW+APK>\)#liveupdate/language/nl-NL/.htaccessnuW+APK>\OX X .liveupdate/language/nl-NL/nl-NL.liveupdate.ininuW+APK>\0,,.(liveupdate/language/ru-RU/ru-RU.liveupdate.ininuW+APK>\)# =liveupdate/language/ru-RU/.htaccessnuW+APK>\)#=liveupdate/language/uk-UA/.htaccessnuW+APK>\.>liveupdate/language/uk-UA/uk-UA.liveupdate.ininuW+APK>\) Sliveupdate/language/.htaccessnuW+APK>\G .Sliveupdate/language/hu-HU/hu-HU.liveupdate.ininuW+APK>\)#bliveupdate/language/hu-HU/.htaccessnuW+APK>\)#bliveupdate/language/en-GB/.htaccessnuW+APK>\s.cliveupdate/language/en-GB/en-GB.liveupdate.ininuW+APK>\)#sliveupdate/language/fr-FR/.htaccessnuW+APK>\?b.tliveupdate/language/fr-FR/fr-FR.liveupdate.ininuW+APK>\\X .liveupdate/language/pl-PL/pl-PL.liveupdate.ininuW+APK>\)#liveupdate/language/pl-PL/.htaccessnuW+APK>\)#liveupdate/language/el-GR/.htaccessnuW+APK>\A=WW._liveupdate/language/el-GR/el-GR.liveupdate.ininuW+APK>\)#liveupdate/language/da-DK/.htaccessnuW+APK>\<Ɯ .liveupdate/language/da-DK/da-DK.liveupdate.ininuW+APK>\NQQ.liveupdate/language/de-DE/de-DE.liveupdate.ininuW+APK>\)#liveupdate/language/de-DE/.htaccessnuW+APK>\)#liveupdate/language/fi-FI/.htaccessnuW+APK>\u$ $ .Uliveupdate/language/fi-FI/fi-FI.liveupdate.ininuW+APK>\`wכ .liveupdate/language/nb-NO/nb-NO.liveupdate.ininuW+APK>\)#liveupdate/language/nb-NO/.htaccessnuW+APK>\- .liveupdate/language/pt-BR/pt-BR.liveupdate.ininuW+APK>\)#!liveupdate/language/pt-BR/.htaccessnuW+APK>\=u JJliveupdate/liveupdate.phpnuW+APK>\?uuliveupdate/index.htmlnuW+APK>\$_ @liveupdate/LICENSE.txtnuW+APK>\}1%ZZ %liveupdate/assets/liveupdate.cssnuW+APK>\vpVPP3liveupdate/assets/update-32.pngnuW+APK>\q \:liveupdate/assets/current-32.pngnuW+APK>\2;\\Aliveupdate/assets/fail-24.pngnuW+APK>\^ONcIliveupdate/assets/warn-24.pngnuW+APK>\^^#LNliveupdate/assets/liveupdate-48.pngnuW+APK>\/qTaliveupdate/assets/ok-24.pngnuW+APK>\. "?gliveupdate/assets/nosupport-32.pngnuW+APK>\)9rliveupdate/assets/.htaccessnuW+APK>\#\sliveupdate/config.phpnuW+APK>\) w.htaccessnuW+APK>\#o,,wviews/cron/index.htmlnuW+APK>\)?xviews/cron/.htaccessnuW+APK>\#o,,yviews/cron/tmpl/index.htmlnuW+APK>\9փ%%xyviews/cron/tmpl/default.phpnuW+APK>\)}views/cron/tmpl/.htaccessnuW+APK>\~O~views/cron/view.html.phpnuW+APK>\ʿ&&views/exportfile/view.html.phpnuW+APK>\)&views/exportfile/tmpl/.htaccessnuW+APK>\I#"h  !views/exportfile/tmpl/default.phpnuW+APK>\#o,, Nviews/exportfile/tmpl/index.htmlnuW+APK>\)ʒviews/exportfile/.htaccessnuW+APK>\#o,,views/exportfile/index.htmlnuW+APK>\) views/availablefields/.htaccessnuW+APK>\#o,, ؔviews/availablefields/index.htmlnuW+APK>\)$Tviews/availablefields/tmpl/.htaccessnuW+APK>\#o,,%'views/availablefields/tmpl/index.htmlnuW+APK>\% &views/availablefields/tmpl/default.phpnuW+APK>\;6 6 #views/availablefields/view.html.phpnuW+APK>\#o,,lviews/maintenance/index.htmlnuW+APK>\|iviews/maintenance/view.html.phpnuW+APK>\ !Rviews/maintenance/tmpl/icecat.phpnuW+APK>\ $@@}views/maintenance/tmpl/log.phpnuW+APK>\(" views/maintenance/tmpl/default.phpnuW+APK>\) views/maintenance/tmpl/.htaccessnuW+APK>\#o,,!views/maintenance/tmpl/index.htmlnuW+APK>\ b1Rviews/maintenance/tmpl/default_sortcategories.phpnuW+APK>\yviews/maintenance/tmpl/cron.phpnuW+APK>\w)*views/maintenance/tmpl/availablefields.phpnuW+APK>\# )views/maintenance/tmpl/default_icecat.phpnuW+APK>\lNQ"")views/maintenance/view.raw.phpnuW+APK>\)views/maintenance/.htaccessnuW+APK>\(G$ $ cviews/maintenance/view.json.phpnuW+APK>\views/index.htmlnuW+APK>\)views/logdetails/.htaccessnuW+APK>\ //views/logdetails/view.html.phpnuW+APK>\)\ views/logdetails/tmpl/.htaccessnuW+APK>\.؍!*views/logdetails/tmpl/default.phpnuW+APK>\  views/logdetails/tmpl/index.htmlnuW+APK>\X views/logdetails/index.htmlnuW+APK>\) views/csvi/.htaccessnuW+APK>\f!views/csvi/tmpl/default.phpnuW+APK>\#o,,%views/csvi/tmpl/index.htmlnuW+APK>\) &views/csvi/tmpl/.htaccessnuW+APK>\#cWW&views/csvi/view.html.phpnuW+APK>\#o,,r+views/csvi/index.htmlnuW+APK>\Z Z +views/templatetype/view.html.phpnuW+APK>\KЗ(( 6views/templatetype/tmpl/edit.phpnuW+APK>\wtW"=views/templatetype/tmpl/index.htmlnuW+APK>\)!q=views/templatetype/tmpl/.htaccessnuW+APK>\#o,,A>views/templatetype/index.htmlnuW+APK>\)>views/templatetype/.htaccessnuW+APK>\)?views/replacements/.htaccessnuW+APK>\)!P@views/replacements/tmpl/.htaccessnuW+APK>\#o,," Aviews/replacements/tmpl/index.htmlnuW+APK>\(Ch  #Aviews/replacements/tmpl/default.phpnuW+APK>\ƫ Mviews/replacements/view.html.phpnuW+APK>\#o,,Sviews/replacements/index.htmlnuW+APK>\#o,,#~Sviews/templatetypes/tmpl/index.htmlnuW+APK>\,c c $Sviews/templatetypes/tmpl/default.phpnuW+APK>\)"^views/templatetypes/tmpl/.htaccessnuW+APK>\)_views/templatetypes/.htaccessnuW+APK>\#o,,Q`views/templatetypes/index.htmlnuW+APK>\똢77!`views/templatetypes/view.html.phpnuW+APK>\GY Y Sgviews/replacement/view.html.phpnuW+APK>\) qviews/replacement/tmpl/.htaccessnuW+APK>\wtW!rviews/replacement/tmpl/index.htmlnuW+APK>\vv5sviews/replacement/tmpl/edit.phpnuW+APK>\#o,,xviews/replacement/index.htmlnuW+APK>\)ryviews/replacement/.htaccessnuW+APK>\#o,, \3zviews/importfile/tmpl/cron.phpnuW+APK>\9\)44!views/importfile/tmpl/default.phpnuW+APK>\)1views/importfile/tmpl/.htaccessnuW+APK>\PpQQviews/importfile/view.html.phpnuW+APK>\L views/importfile/view.json.phpnuW+APK>\#o,,xviews/importfile/index.htmlnuW+APK>\)views/importfile/.htaccessnuW+APK>\ F""views/importfile/view.cron.phpnuW+APK>\tIf(((views/install/view.html.phpnuW+APK>\#o,,views/install/index.htmlnuW+APK>\)views/install/.htaccessnuW+APK>\!4 BBծviews/install/view.json.phpnuW+APK>\)bviews/install/tmpl/.htaccessnuW+APK>\#o,,-views/install/tmpl/index.htmlnuW+APK>\.ddviews/install/tmpl/default.phpnuW+APK>\'4  Xviews/about/tmpl/default.phpnuW+APK>\)views/about/tmpl/.htaccessnuW+APK>\#o,,sviews/about/tmpl/index.htmlnuW+APK>\#o,,views/about/index.htmlnuW+APK>\)\views/about/.htaccessnuW+APK>\L.ñ views/about/view.html.phpnuW+APK>\D`FFviews/process/view.html.phpnuW+APK>\#o,,views/process/index.htmlnuW+APK>\#o,,&views/process/tmpl/com_csvi/index.htmlnuW+APK>\ 3views/process/tmpl/com_csvi/export/default_file.phpnuW+APK>\),views/process/tmpl/com_csvi/export/.htaccessnuW+APK>\#o,,-zviews/process/tmpl/com_csvi/export/index.htmlnuW+APK>\)%views/process/tmpl/com_csvi/.htaccessnuW+APK>\K8=views/process/tmpl/com_virtuemart/export/default_userinfo.phpnuW+APK>\lQA,views/process/tmpl/com_virtuemart/export/default_manufacturer.phpnuW+APK>\^{9 views/process/tmpl/com_virtuemart/export/default_calc.phpnuW+APK>\%= views/process/tmpl/com_virtuemart/export/default_shipping.phpnuW+APK>\9zz9$ views/process/tmpl/com_virtuemart/export/default_file.phpnuW+APK>\yY=1 views/process/tmpl/com_virtuemart/export/default_category.phpnuW+APK>\#o,,3s5 views/process/tmpl/com_virtuemart/export/index.htmlnuW+APK>\)26 views/process/tmpl/com_virtuemart/export/.htaccessnuW+APK>\I >6 views/process/tmpl/com_virtuemart/export/default_orderitem.phpnuW+APK>\3[[:B views/process/tmpl/com_virtuemart/export/default_order.phpnuW+APK>\0<T views/process/tmpl/com_virtuemart/export/default_product.phpnuW+APK>\)+g views/process/tmpl/com_virtuemart/.htaccessnuW+APK>\&}uuBh views/process/tmpl/com_virtuemart/import/default_category_path.phpnuW+APK>\`?n views/process/tmpl/com_virtuemart/import/default_media_path.phpnuW+APK>\UN=w views/process/tmpl/com_virtuemart/import/default_category.phpnuW+APK>\ujP P <| views/process/tmpl/com_virtuemart/import/default_product.phpnuW+APK>\)2 views/process/tmpl/com_virtuemart/import/.htaccessnuW+APK>\>&Ce views/process/tmpl/com_virtuemart/import/default_category_image.phpnuW+APK>\#o,,3Ӛ views/process/tmpl/com_virtuemart/import/index.htmlnuW+APK>\qU''?b views/process/tmpl/com_virtuemart/import/default_order_item.phpnuW+APK>\-B views/process/tmpl/com_virtuemart/import/default_category_file.phpnuW+APK>\ȋ[u++:6 views/process/tmpl/com_virtuemart/import/default_media.phpnuW+APK>\(o@˳ views/process/tmpl/com_virtuemart/import/default_media_image.phpnuW+APK>\66J1 views/process/tmpl/com_virtuemart/import/default_manufacturer_category.phpnuW+APK>\ڞ: views/process/tmpl/com_virtuemart/import/default_image.phpnuW+APK>\t6$$A views/process/tmpl/com_virtuemart/import/default_manufacturer.phpnuW+APK>\ܭ,A views/process/tmpl/com_virtuemart/import/default_product_path.phpnuW+APK>\^{9 views/process/tmpl/com_virtuemart/import/default_calc.phpnuW+APK>\-F views/process/tmpl/com_virtuemart/import/default_manufacturer_file.phpnuW+APK>\#o,,,I views/process/tmpl/com_virtuemart/index.htmlnuW+APK>\S views/process/tmpl/default.phpnuW+APK>\P P $!views/process/tmpl/import_result.phpnuW+APK>\#o,,E!!views/process/tmpl/index.htmlnuW+APK>\)!!views/process/tmpl/.htaccessnuW+APK>\-p;;,"!views/process/tmpl/import/default_fields.phpnuW+APK>\)#^!views/process/tmpl/import/.htaccessnuW+APK>\D;^^+_!views/process/tmpl/import/default_limit.phpnuW+APK>\Pw ,hh!views/process/tmpl/import/default_source.phpnuW+APK>\L*s!views/process/tmpl/import/default_file.phpnuW+APK>\#o,,$o!views/process/tmpl/import/index.htmlnuW+APK>\)2!views/process/tmpl/com_akeebasubs/export/.htaccessnuW+APK>\]t{ AЇ!views/process/tmpl/com_akeebasubs/export/default_subscription.phpnuW+APK>\Mwzz9!views/process/tmpl/com_akeebasubs/export/default_file.phpnuW+APK>\#o,,3!views/process/tmpl/com_akeebasubs/export/index.htmlnuW+APK>\#o,,,!views/process/tmpl/com_akeebasubs/index.htmlnuW+APK>\)+!views/process/tmpl/com_akeebasubs/.htaccessnuW+APK>\eWǵ,!views/process/tmpl/export/default_source.phpnuW+APK>\pHCC,Ƶ!views/process/tmpl/export/default_fields.phpnuW+APK>\gR+!views/process/tmpl/export/default_email.phpnuW+APK>\/߬,"views/process/tmpl/export/default_layout.phpnuW+APK>\)#"views/process/tmpl/export/.htaccessnuW+APK>\#o,,$"views/process/tmpl/export/index.htmlnuW+APK>\c+T"views/process/tmpl/export/default_limit.phpnuW+APK>\wn "views/process/view.result.phpnuW+APK>\)D"views/process/.htaccessnuW+APK>\) "views/settings/tmpl/.htaccessnuW+APK>\ Sl "views/settings/tmpl/default.phpnuW+APK>\$# "views/settings/tmpl/default_site.phpnuW+APK>\rww#\#"views/settings/tmpl/default_log.phpnuW+APK>\#o,,&("views/settings/tmpl/index.htmlnuW+APK>\,-("views/settings/tmpl/default_custom_tables.phpnuW+APK>\Ӏ&-"views/settings/tmpl/default_icecat.phpnuW+APK>\oY&\1"views/settings/tmpl/default_import.phpnuW+APK>\ +4"views/settings/tmpl/default_google_base.phpnuW+APK>\eFsZ7"views/settings/view.html.phpnuW+APK>\#o,,)="views/settings/index.htmlnuW+APK>\)="views/settings/.htaccessnuW+APK>\)e>"views/log/.htaccessnuW+APK>\)'?"views/log/tmpl/.htaccessnuW+APK>\#o,,?"views/log/tmpl/index.htmlnuW+APK>\&c@"views/log/tmpl/logreader.phpnuW+APK>\r8G"views/log/tmpl/default.phpnuW+APK>\#o,,a]"views/log/index.htmlnuW+APK>\O O ]"views/log/view.html.phpnuW+APK>\)gg"views/.htaccessnuW+APK %h"