# License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined('EXPONENT')) { exit(''); } if (exponent_permissions_check('manage_site', exponent_core_makeLocation('sharedcoremodule'))) { $site = null; if (isset($_GET['site_id'])) { $site = $db->selectObject('sharedcore_site', 'id=' . intval($_GET['site_id'])); } if ($site) { ///// $form = sharedcore_site::linkForm($site); $form->meta('module', 'sharedcoremodule'); if (isset($site->id)) { $form->meta('action', 'save_extensions'); // Save without db conf if edit } else { // Need to go through initial db config for new sites. $form->meta('action', 'edit_site_dbconf'); } $form->meta('core_id', $site->core_id); $form->meta('name', $site->name); $form->meta('path', $site->path); $form->meta('relpath', $site->relpath); $template = new template('sharedcoremodule', '_form_editModules'); $template->assign('form_html', $form->toHTML()); $template->output();
# Software Foundation; either version 2 of the # License, or (at your option) any later version. # # GPL: http://www.gnu.org/licenses/gpl.txt # ################################################## if (!defined("EXPONENT")) { exit(""); } if (exponent_permissions_check('manage_site', exponent_core_makeLocation('SharedCoreModule'))) { $i18n = exponent_lang_loadFile('modules/sharecoremodule/actions/save_site.php'); $site = null; if (isset($_POST['id'])) { $site = $db->selectObject("sharedcore_site", "id=" . intval($_POST['id'])); } $site = sharedcore_site::update($_POST, $site); if ($site == null) { header("Location: " . $_SERVER['HTTP_REFERER']); exit('Redirecting'); } if (substr($site->path, -1, 1) != "/") { $site->path .= "/"; } if (is_really_writable($site->path)) { if (!isset($site->id)) { // New -- link stuff if (!file_exists($site->path . "exponent_version.php")) { if (!defined("SYS_SHAREDCORE")) { require_once BASE . "subsystems/sharedcore.php"; } $core = $db->selectobject("sharedcore_core", "id=" . $site->core_id);
# for more details. # # You should have received a copy of the GNU # General Public License along with Exponent; if # not, write to: # # Free Software Foundation, Inc., # 59 Temple Place, # Suite 330, # Boston, MA 02111-1307 USA # # $Id: edit_site.php,v 1.5 2005/02/26 05:21:23 filetreefrog Exp $ ################################################## if (!defined('PATHOS')) { exit(''); } if (pathos_permissions_check('manage_site', pathos_core_makeLocation('sharedcoremodule'))) { $site = null; if (isset($_GET['id'])) { $site = $db->selectObject('sharedcore_site', 'id=' . $_GET['id']); } $form = sharedcore_site::form($site); $form->meta('module', 'sharedcoremodule'); $form->meta('action', 'save_site'); $template = new template('sharedcoremodule', '_form_editSite'); $template->assign('is_edit', !isset($site->id)); $template->assign('form_html', $form->toHTML()); $template->output(); } else { echo SITE_403_HTML; }