// License: GPL 2.0 // -------------------------------------------------------------- $xoopsOption['template_main'] = 'mywords-author.tpl'; $xoopsOption['module_subpage'] = 'author'; include 'header.php'; if (!is_numeric($editor)) { $sql = "SELECT id_editor FROM " . $db->prefix("mod_mywords_editors") . " WHERE shortname='{$editor}'"; list($editor) = $db->fetchRow($db->query($sql)); if ($editor == '') { $editor = 0; } } $ed = new MWEditor($editor); if ($ed->isNew()) { $params = array('page' => 'author'); RMFunctions::error_404(__('Sorry, we don\'t know this editor', 'admin_mywords'), 'mywords', $params); die; } $xoopsTpl->assign('editor', array('id' => $ed->id(), 'uid' => $ed->uid, 'name' => $ed->name, 'email' => $ed->data('email'), 'uname' => $ed->uname)); $page = isset($_REQUEST['page']) ? $_REQUEST['page'] : 0; if ($page <= 0) { $path = explode("/", $request); $srh = array_search('page', $path); if (isset($path[$srh]) && $path[$srh] == 'page') { if (!isset($path[$srh])) { $page = 0; } else { $page = $path[$srh + 1]; } } }