/** * Displays the search form * * @return @e void */ protected function _showForm() { //----------------------------------------- // INIT //----------------------------------------- $this->registry->output->html .= $this->html->searchandreplace_form($this->skinFunctions->getTiersFunction()->fetchAllsItemDropDown(), $this->skinFunctions->fetchNumberTemplateBits(), $this->_bitsPerRound); }
/** * Initiate a skin diff session * * @access private * @return void */ private function _start() { //----------------------------------------- // INIT //----------------------------------------- $content = ""; $seen = array(); $diff_session_title = $this->request['diff_session_title']; $ignoreMissing = $this->request['diff_session_ignore_missing'] ? TRUE : FALSE; $diffFolder = trim($this->request['diffFolder']); //----------------------------------------- // Check... //----------------------------------------- if (!$diff_session_title) { $this->registry->output->global_error = $this->lang->words['sd_entertitle']; return $this->_list(); } if ($diffFolder) { $files = array(); $content = ''; /* Did we specify a folder? */ if (!is_dir(DOC_IPS_ROOT_PATH . $diffFolder)) { $this->registry->output->global_error = sprintf($this->lang->words['diff_folder_error'], DOC_IPS_ROOT_PATH . $diffFolder); return $this->_list(); } try { foreach (new DirectoryIterator(DOC_IPS_ROOT_PATH . $diffFolder) as $file) { if (!$file->isDot() and !$file->isDir()) { $_name = $file->getFileName(); if (substr($_name, -4) == '.xml') { $files[$_name] = @file_get_contents(DOC_IPS_ROOT_PATH . $diffFolder . '/' . $_name); } } } } catch (Exception $e) { } if (count($files)) { foreach ($files as $name => $xml) { if (!$content) { $content = $xml; } else { preg_match("#<templategroup([^>]+?)?>.*</templategroup>#is", $xml, $match); if ($match[0]) { $content = str_replace('</templates>', $match[0] . "\n</templates>", $content); } } } } } else { /* fetch the upload then */ $content = $this->registry->adminFunctions->importXml(); } if (!$content) { $this->registry->output->global_error = $this->lang->words['sd_nocontent']; return $this->_list(); } //----------------------------------------- // Create session... //----------------------------------------- $diffSessionID = $this->skinFunctions->createSession($diff_session_title, $content); if ($diffSessionID === FALSE) { $this->registry->output->global_error = $this->lang->words['sd_nocontent']; return $this->_list(); } $this->registry->output->html = $this->html->skindiff_ajaxScreen($diffSessionID, $this->skinFunctions->fetchNumberTemplateBits(), $this->_bitsPerRound); }