} $instmodules = $result[1]; // build a letters list $letters = array(); $tmp = explode(',', 'A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z'); foreach ($tmp as $i) { if ($i == $curletter) { $letters[] = "<strong>{$i}</strong>"; } else { $letters[] = $this->CreateLink($id, 'defaultadmin', $returnid, $i, array('curletter' => $i, 'active_tab' => 'modules')); } } // cross reference them $data = array(); if (count($repmodules)) { $data = modmgr_utils::build_module_data($repmodules, $instmodules); } if (count($data)) { $size = count($data); // check for permissions $moduledir = dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . "modules"; $writable = is_writable($moduledir); // build the table $rowarray = array(); $rowclass = 'row1'; $newestdisplayed = ""; foreach ($data as $row) { $onerow = new stdClass(); $onerow->name = $this->CreateLink($id, 'modulelist', $returnid, $row['name'], array('name' => $row['name'])); $onerow->version = $row['version']; $onerow->helplink = $this->CreateLink($id, 'modulehelp', $returnid, $this->Lang('helptxt'), array('name' => $row['name'], 'version' => $row['version'], 'filename' => $row['filename']));
if (count($deps) > 1) { $smarty->assign('installmodule', modmgr_utils::file_to_module_name($allmods[1], $params['filename'])); $smarty->assign('dependencies', $deps); $smarty->assign('mod', $this); $smarty->assign('form_start', $this->CreateFormStart($id, 'doinstall', $returnid) . $this->CreateInputHidden($id, 'modlist', base64_encode(serialize($deps)))); $smarty->assign('submit', $this->CreateInputSubmit($id, 'submit', $this->Lang('install_submit'))); $smarty->assign('cancel', $this->CreateInputSubmit($id, 'cancel', lang('cancel'))); $smarty->assign('formend', $this->CreateFormEnd()); echo $this->ProcessTemplate('installinfo.tpl'); return; } // only one module. $keys = array_keys($deps); $key = $keys[0]; $smarty->assign('mod', $this); $res = modmgr_utils::install_module($deps[$key], $deps[$key]['status'] == 'u' ? 1 : 0); if (is_array($res) && $res[0] == TRUE) { $this->Redirect($id, 'display_install_results'); } // some kind of error occurred. if (!is_array($res)) { $smarty->assign('message', $this->ShowErrors($this->Lang('error_internal'))); } else { if ($res[0] == FALSE) { $smarty->assign('message', $this->ShowErrors($res[1])); } } echo $this->ProcessTemplate('installinfo.tpl'); # # EOF #
echo '<h3>' . $this->Lang('notice') . "</h3>\n"; $link = '<a target="_blank" href="http://dev.cmsmadesimple.org">forge</a>'; echo '<p>' . $this->Lang('general_notice', $link, $link) . "</p>\n"; echo '<h3>' . $this->Lang('use_at_your_own_risk') . "</h3>\n"; echo '<p>' . $this->Lang('compatibility_disclaimer') . "</p></div>\n"; if (isset($_SESSION[$this->GetName()]['tab_error'])) { echo $this->ShowErrors($_SESSION[$this->GetName()]['tab_error']); unset($_SESSION[$this->GetName()]['tab_message']); unset($_SESSION[$this->GetName()]['tab_error']); } if (isset($_SESSION[$this->GetName()]['tab_message'])) { echo $this->ShowMessage($_SESSION[$this->GetName()]['tab_message']); unset($_SESSION[$this->GetName()]['tab_message']); unset($_SESSION[$this->GetName()]['tab_error']); } if (!modmgr_utils::is_connection_ok()) { echo $this->_DisplayErrorPage($id, $params, $returnid, $this->Lang('error_request_problem')); } $active_tab = 'newversions'; if (isset($params['active_tab'])) { $active_tab = $params['active_tab']; } else { if (isset($_SESSION[$this->GetName()]['active_tab'])) { $active_tab = $_SESSION[$this->GetName()]['active_tab']; unset($_SESSION[$this->GetName()]['active_tab']); } } echo $this->StartTabHeaders(); if ($this->CheckPermission('Modify Modules')) { echo $this->SetTabHeader('newversions', $this->Lang('newversions'), $active_tab == 'newversions'); echo $this->SetTabHeader('search', $this->Lang('search'), $active_tab == 'search');
# 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, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # Or read it online: http://www.gnu.org/licenses/licenses.html#GPL # #------------------------------------------------------------------------- #END_LICENSE if (!isset($gCms)) { exit; } if (isset($params['cancel'])) { $this->Redirect($id, 'defaultadmin'); } if (!isset($params['modlist'])) { // no module list... $this->Redirect($id, 'defaultadmin'); } $installs = array_reverse(unserialize(base64_decode($params['modlist']))); $messages = modmgr_utils::install_module_list($installs); // now redirect to the action that will display the results $gCms->clear_cached_files(); $this->Redirect($id, 'display_install_results'); // $smarty->assign('mod',$this); // $smarty->assign('messages',$messages); // $smarty->assign('link_back',$this->CreateLink('defaultadmin',$returnid,$this->Lang('back_to_module_manager'))); // echo $this->ProcessTemplate('postinstall.tpl'); # # EOF #