$LANG = $_POST['lang']; } include 'inc/common.php'; # default variables if (defined('GSLOGINSALT')) { $logsalt = GSLOGINSALT; } else { $logsalt = null; } $kill = ''; $status = ''; $err = null; $message = null; $random = null; $fullpath = suggest_site_path(); $path_parts = suggest_site_path(true); # if the form was submitted, continue if (isset($_POST['submitted'])) { if ($_POST['sitename'] != '') { $SITENAME = htmlentities($_POST['sitename'], ENT_QUOTES, 'UTF-8'); } else { $err .= i18n_r('WEBSITENAME_ERROR') . '<br />'; } $urls = $_POST['siteurl']; if (preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $urls)) { $SITEURL = tsl($_POST['siteurl']); } else { $err .= i18n_r('WEBSITEURL_ERROR') . '<br />'; } if ($_POST['user'] != '') { $USR = strtolower($_POST['user']);
<script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script> <script type="text/javascript"> var editor = CKEDITOR.replace('<?php echo $text_area_name; ?> ', { skin : 'getsimple', forcePasteAsPlainText : true, language : '<?php echo $EDLANG; ?> ', defaultLanguage : 'en', <?php if (file_exists(GSTHEMESPATH . $TEMPLATE . '/editor.css')) { $path = suggest_site_path(); ?> contentsCss: '<?php echo $path; ?> theme/<?php echo $TEMPLATE; ?> /editor.css', <?php } ?> entities : true, uiColor : '#FFFFFF', height: '<?php echo $EDHEIGHT;
$filedeletionstatus = delete_file(GSADMINPATH . 'install.php'); } if (file_exists(GSADMINPATH . 'setup.php')) { $filedeletionstatus = delete_file(GSADMINPATH . 'setup.php'); } if (file_exists(GSADMINPATH . 'update.php')) { $filedeletionstatus = delete_file(GSADMINPATH . 'update.php'); } if (!$filedeletionstatus) { $error = sprintf(i18n_r('ERR_CANNOT_DELETE'), '<code>/' . $GSADMIN . '/install.php</code>, <code>/' . $GSADMIN . '/setup.php</code> or <code>/' . $GSADMIN . '/update.php</code>'); } } } // set these for install, empty if website.xml doesnt exist yet if (empty($SITEURL)) { $SITEURL = suggest_site_path(); } if (empty($SITEURL_ABS)) { $SITEURL_ABS = $SITEURL; } if (empty($SITEURL_REL)) { $SITEURL_REL = $SITEURL; } if (empty($ASSETURL)) { $ASSETURL = $SITEURL; } /** * Include other files depending if they are needed or not */ require_once GSADMININCPATH . 'cookie_functions.php'; require_once GSADMININCPATH . 'assets.php';
?> <script type="text/javascript" src="template/js/ckeditor/ckeditor.js"></script> <script type="text/javascript"> var editor = CKEDITOR.replace( 'codetext', { skin : 'core', language : '<?php echo $EDLANG; ?> ', defaultLanguage : '<?php echo $EDLANG; ?> ', <?php if (file_exists(GSTHEMESPATH . $TEMPLATE . "/editor.css")) { $fullpath = suggest_site_path(); ?> contentsCss: '<?php echo $fullpath; ?> theme/<?php echo $TEMPLATE; ?> /editor.css', <?php } ?> entities : true, uiColor : '#FFFFFF', height: '<?php echo $EDHEIGHT;
function nm_generate_htaccess() { global $NMPAGEURL, $PERMALINK; $path = tsl(suggest_site_path(true)); $prefix = ''; $page = ''; # format prefix and page directions if ($NMPAGEURL != 'index') { if (nm_get_parent() != '' && ($PERMALINK == '' || strpos($PERMALINK, '%parent%') !== false)) { $prefix = nm_get_parent() . '/' . $NMPAGEURL . '/'; } else { $prefix = $NMPAGEURL . '/'; } $page = 'id=' . $NMPAGEURL . '&'; } # generate .htaccess contents $htaccess = file_get_contents(GSPLUGINPATH . 'news_manager/temp.htaccess'); $htaccess = str_replace('**PATH**', $path, $htaccess); $htaccess = str_replace('**PREFIX**', $prefix, $htaccess); $htaccess = str_replace('**PAGE**', $page, $htaccess); $htaccess = htmlentities($htaccess, ENT_QUOTES, 'UTF-8'); # show .htaccess include NMTEMPLATEPATH . 'htaccess.php'; }