mirror of
https://github.com/monstra-cms/monstra.git
synced 2025-08-23 05:13:06 +02:00
@@ -31,25 +31,25 @@ class FilesmanagerAdmin extends Backend
|
||||
// Add slash if not exists
|
||||
if (substr($path, -1, 1) != '/') {
|
||||
$path .= '/';
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
}
|
||||
|
||||
// Upload corectly!
|
||||
if ($path == 'uploads' || $path == 'uploads//') {
|
||||
$path = 'uploads/';
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
}
|
||||
|
||||
// Only 'uploads' folder!
|
||||
if (strpos($path, 'uploads') === false) {
|
||||
$path = 'uploads/';
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
}
|
||||
|
||||
// Set default path value if path is empty
|
||||
if ($path == '') {
|
||||
$path = 'uploads/';
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
}
|
||||
|
||||
$files_path = ROOT . DS . 'public' . DS . $path;
|
||||
@@ -85,7 +85,7 @@ class FilesmanagerAdmin extends Backend
|
||||
if (Security::check(Request::get('token'))) {
|
||||
|
||||
File::delete($files_path.Request::get('delete_file'));
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
|
||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||
}
|
||||
@@ -97,7 +97,7 @@ class FilesmanagerAdmin extends Backend
|
||||
if (Security::check(Request::get('token'))) {
|
||||
|
||||
Dir::delete($files_path.Request::get('delete_dir'));
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
|
||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||
}
|
||||
@@ -111,7 +111,7 @@ class FilesmanagerAdmin extends Backend
|
||||
if ($_FILES['file']) {
|
||||
if ( ! in_array(File::ext($_FILES['file']['name']), $forbidden_types)) {
|
||||
move_uploaded_file($_FILES['file']['tmp_name'], $files_path.Security::safeName(basename($_FILES['file']['name'], File::ext($_FILES['file']['name'])), '-', true).'.'.File::ext($_FILES['file']['name']));
|
||||
Request::redirect($site_url.'admin/index.php?id=filesmanager&path='.$path);
|
||||
Request::redirect($site_url.'/admin/index.php?id=filesmanager&path='.$path);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -486,7 +486,7 @@ class Page extends Pages
|
||||
*/
|
||||
public static function url()
|
||||
{
|
||||
return Option::get('siteurl').Pages::$page['slug'];
|
||||
return Option::get('siteurl').'/'.Pages::$page['slug'];
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -82,7 +82,7 @@ class Sitemap extends Frontend
|
||||
$map .= '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">'."\n";
|
||||
foreach ($pages_list as $page) {
|
||||
if ($page['parent'] != '') { $parent = $page['parent'].'/'; $priority = '0.5'; } else { $parent = ''; $priority = '1.0'; }
|
||||
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').$parent.$page['slug'].'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", (int) $page['date']).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>'.$priority.'</priority>'."\n\t".'</url>'."\n";
|
||||
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').'/'.$parent.$page['slug'].'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", (int) $page['date']).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>'.$priority.'</priority>'."\n\t".'</url>'."\n";
|
||||
}
|
||||
|
||||
// Get list of components
|
||||
@@ -91,7 +91,7 @@ class Sitemap extends Frontend
|
||||
// Add components to sitemap
|
||||
if (count($components) > 0) {
|
||||
foreach ($components as $component) {
|
||||
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1.0</priority>'."\n\t".'</url>'."\n";
|
||||
$map .= "\t".'<url>'."\n\t\t".'<loc>'.Option::get('siteurl').'/'.Text::lowercase($component).'</loc>'."\n\t\t".'<lastmod>'.date("Y-m-d", time()).'</lastmod>'."\n\t\t".'<changefreq>weekly</changefreq>'."\n\t\t".'<priority>1.0</priority>'."\n\t".'</url>'."\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -9,7 +9,7 @@
|
||||
foreach ($pages_list as $page) {
|
||||
if (trim($page['parent']) !== '') $parent = $page['parent'].'/'; else $parent = '';
|
||||
if (trim($page['parent']) !== '') { echo '<ul>'."\n"; }
|
||||
echo '<li><a href="'.Option::get('siteurl').$parent.$page['slug'].'">'.$page['title'].'</a></li>'."\n";
|
||||
echo '<li><a href="'.Option::get('siteurl').'/'.$parent.$page['slug'].'">'.$page['title'].'</a></li>'."\n";
|
||||
if (trim($page['parent']) !== '') { echo '</ul>'."\n"; }
|
||||
}
|
||||
if (count($components) == 0) { echo '<ul>'."\n"; }
|
||||
@@ -21,7 +21,7 @@
|
||||
if (count($components) > 0) {
|
||||
if (count($pages_list) == 0) { echo '<ul>'."\n"; }
|
||||
foreach ($components as $component) {
|
||||
echo '<li><a href="'.Option::get('siteurl').$component.'">'.__(ucfirst($component), $component).'</a></li>'."\n";
|
||||
echo '<li><a href="'.Option::get('siteurl').'/'.$component.'">'.__(ucfirst($component), $component).'</a></li>'."\n";
|
||||
}
|
||||
if (count($pages_list) == 0) { echo '</ul>'."\n"; }
|
||||
}
|
||||
|
@@ -155,7 +155,7 @@ class Users extends Frontend
|
||||
$mail->Send();
|
||||
|
||||
// Redirect to user profile
|
||||
Request::redirect(Option::get('siteurl').'users/'.Users::$users->lastId());
|
||||
Request::redirect(Option::get('siteurl').'/users/'.Users::$users->lastId());
|
||||
}
|
||||
|
||||
} else { die('Request was denied because it contained an invalid security token. Please refresh the page and try again.'); }
|
||||
|
@@ -6,7 +6,7 @@ Your new details are as follows:
|
||||
Username: <?php echo $user_login; ?><br>
|
||||
Password: <?php echo $new_password; ?>
|
||||
<br><br>
|
||||
To change your password, please visit this page: <a href="<?php echo $site_url; ?>users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>users/<?php echo $user_id; ?></a>
|
||||
To change your password, please visit this page: <a href="<?php echo $site_url; ?>/users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>/users/<?php echo $user_id; ?></a>
|
||||
<br><br>
|
||||
All the best,<br>
|
||||
<?php echo $site_name; ?>
|
||||
|
@@ -4,14 +4,14 @@ You have requested to reset your password on <?php echo $site_name; ?> because y
|
||||
If you did not request this, please ignore it.
|
||||
<br><br>
|
||||
To reset your password, please visit the following page:<br>
|
||||
<a href="<?php echo $site_url; ?>users/password-reset?hash=<?php echo $new_hash; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>users/password-reset?hash=<?php echo $new_hash; ?></a>
|
||||
<a href="<?php echo $site_url; ?>/users/password-reset?hash=<?php echo $new_hash; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url; ?>/users/password-reset?hash=<?php echo $new_hash; ?></a>
|
||||
<br><br>
|
||||
When you visit that page, your password will be reset, and the new password will be emailed to you.
|
||||
<br><br>
|
||||
Your username is: <?php echo $user_login; ?>
|
||||
<br><br>
|
||||
To edit your profile, go to this page:<br>
|
||||
<a href="<?php echo $site_url ?>users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url ?>users/<?php echo $user_id; ?></a>
|
||||
<a href="<?php echo $site_url ?>/users/<?php echo $user_id; ?>" style="color:#333; text-decoration:underline;"><?php echo $site_url ?>/users/<?php echo $user_id; ?></a>
|
||||
<br><br>
|
||||
All the best,<br>
|
||||
<?php echo $site_name; ?>
|
||||
|
@@ -5,5 +5,5 @@
|
||||
<?php echo Form::hidden('csrf', Security::token()); ?>
|
||||
<label><?php echo __('Username', 'users'); ?></label><input name="username" type="text" class="input-large" />
|
||||
<label><?php echo __('Password', 'users'); ?></label><input name="password" type="password" class="input-large" />
|
||||
<br><input name="login_submit" class="btn" type="submit" value="<?php echo __('Log In', 'users'); ?>" /> <a class="small-grey-text reset-password-btn" href="<?php echo Option::get('siteurl').'users/password-reset'; ?>"><?php echo __('Forgot your password?', 'users');?></a>
|
||||
<br><input name="login_submit" class="btn" type="submit" value="<?php echo __('Log In', 'users'); ?>" /> <a class="small-grey-text reset-password-btn" href="<?php echo Option::get('siteurl').'/users/password-reset'; ?>"><?php echo __('Forgot your password?', 'users');?></a>
|
||||
</form>
|
Reference in New Issue
Block a user