Fixed issue #8 - Issue was related to being unable to support https, and also over https, the port number was being included. Added support for https and removal of the port number. Also fixed issue with calls going to legacy location instead of core.

This commit is contained in:
Andy Dixon
2024-08-01 21:14:51 +01:00
parent 3e09519f5f
commit 49e914bb6e
10 changed files with 4524 additions and 370 deletions
+2 -2
View File
@@ -26,8 +26,8 @@ if (!isset($_SESSION['neoCMSSess'])) {
} else $sessname = $_SESSION['neoCMSSess']; } else $sessname = $_SESSION['neoCMSSess'];
session_name($sessname); @session_name($sessname);
session_cache_expire(240); // 4 hours @session_cache_expire(240); // 4 hours
@session_start(); @session_start();
$ver = 'NeoCMS 0.1'; $ver = 'NeoCMS 0.1';
+1 -1
View File
@@ -90,7 +90,7 @@ changePrefs = function () {
}; };
logout = function () { logout = function () {
$.ajax({ $.ajax({
type: "POST", url: "../functions/logout.php", success: function () { type: "POST", url: "../core/logout.php", success: function () {
window.location = '../../' window.location = '../../'
} }
}) })
+4361 -348
View File
File diff suppressed because it is too large Load Diff
+14 -11
View File
@@ -18,14 +18,14 @@ $(function () {
fBrowseBind() fBrowseBind()
}); });
tempCache = function () { tempCache = function () {
$.ajax({url: "neocms-temps/editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/image-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/image-editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/video-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/video-editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/html-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/html-editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/link-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/link-editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/table-editor.html", cache: true, dataType: "html"}); $.ajax({url: "templates/table-editor.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/prompt.html", cache: true, dataType: "html"}); $.ajax({url: "templates/prompt.html", cache: true, dataType: "html"});
$.ajax({url: "neocms-temps/upload.html", cache: true, dataType: "html"}) $.ajax({url: "templates/upload.html", cache: true, dataType: "html"})
}; };
fBrowseBind = function () { fBrowseBind = function () {
$('.neoCMSFBrowse').unbind('click').bind('click', function () { $('.neoCMSFBrowse').unbind('click').bind('click', function () {
@@ -174,25 +174,28 @@ linkBind = function () {
checkURL = function (linky) { checkURL = function (linky) {
var linkHref = (linky.match('://')) ? linky.split('://') : linky; var linkHref = (linky.match('://')) ? linky.split('://') : linky;
$('#neoCMSFilesWrap').remove(); $('#neoCMSFilesWrap').remove();
if (linkHref[0] == 'http' && linkHref[1]) { if ((linkHref[0] == 'http' || linkHref[0] == 'https') && linkHref[1]) {
if (linkHref[1].match('/')) linkHref = linkHref[1].split('/'); if (linkHref[1].match('/')) linkHref = linkHref[1].split('/');
linkHref = linkHref[0].split(':');
linkHref = linkHref[0]; linkHref = linkHref[0];
var neoCMSLoc = window.location.href.split('//'); var neoCMSLoc = window.location.href.split('//');
neoCMSLoc = neoCMSLoc[1].split('/'); neoCMSLoc = neoCMSLoc[1].split('/');
neoCMSLoc = neoCMSLoc[0]; neoCMSLoc = neoCMSLoc[0];
if (linkHref == neoCMSLoc || linkHref == 'www.' + neoCMSLoc) { if (linkHref == neoCMSLoc || linkHref == 'www.' + neoCMSLoc) {
if ($('#neoCMSPageEdits .edit', ifrDoc).length) { if ($('#neoCMSPageEdits .edit', ifrDoc).length) {
console.log(linkHref);
navAwayPrompt(linky, 'loc') navAwayPrompt(linky, 'loc')
} else { } else {
console.log($('#neoCMSPageSrc').length);
if ($('#neoCMSPageSrc').length) { if ($('#neoCMSPageSrc').length) {
$.ajax({ $.ajax({
type: "POST", url: "functions/getpage.php", data: "page=" + linky, success: function () { type: "POST", url: "core/getpage.php", data: "page=" + linky, success: function () {
if (frames['neoCMSPageSrc'].contentWindow) frames['neoCMSPageSrc'].contentWindow.location.href = linky; else frames['neoCMSPageSrc'].location.href = linky if (frames['neoCMSPageSrc'].contentWindow) frames['neoCMSPageSrc'].contentWindow.location.href = linky; else frames['neoCMSPageSrc'].location.href = linky
} }
}) })
} else { } else {
$.ajax({ $.ajax({
type: "POST", url: "../functions/getpage.php", data: "page=" + linky, success: function () { type: "POST", url: "../core/getpage.php", data: "page=" + linky, success: function () {
window.location = '../' window.location = '../'
} }
}) })
+1 -1
View File
@@ -1861,7 +1861,7 @@ logoutPrompt = function () {
}; };
logout = function () { logout = function () {
$.ajax({ $.ajax({
type: "POST", url: "functions/logout.php", success: function () { type: "POST", url: "core/logout.php", success: function () {
window.location = retUrl() window.location = retUrl()
} }
}) })
+1 -1
View File
@@ -1863,7 +1863,7 @@ logoutPrompt = function () {
}; };
logout = function () { logout = function () {
$.ajax({ $.ajax({
type: "POST", url: "functions/logout.php", success: function () { type: "POST", url: "core/logout.php", success: function () {
window.location = retUrl() window.location = retUrl()
} }
}) })
+1 -1
View File
@@ -39,7 +39,7 @@
<h3>Exclude Folders</h3> <h3>Exclude Folders</h3>
<p>Enter a comma separated list of folder names or paths you do not want listed in the neocms file <p>Enter a comma separated list of folder names or paths you do not want listed in the neocms file
browser. Do not use a &ldquo;/&rdquo; at the end fo the path. <em>Ex: &ldquo;wordpress, .svn, browser. Do not use a &ldquo;/&rdquo; at the end fo the path. <em>Ex: &ldquo;wordpress, .svn,
functions/important&rdquo;</em></p> core/important&rdquo;</em></p>
<ul> <ul>
<li><label>Folders </label><input id="neoCMSExFolders" class="neoCMSUnlocked" name="exFolders" <li><label>Folders </label><input id="neoCMSExFolders" class="neoCMSUnlocked" name="exFolders"
type="text" value=""/></li> type="text" value=""/></li>
+1 -1
View File
@@ -3,7 +3,7 @@
<div class="neoCMSImgChoose neoCMSImgChooseInline clearfix" id="neoCMSImgChoose"> <div class="neoCMSImgChoose neoCMSImgChooseInline clearfix" id="neoCMSImgChoose">
<h4>Upload A New Image</h4> <h4>Upload A New Image</h4>
<p>First select the folder you want to upload to:</p> <p>First select the folder you want to upload to:</p>
<form action="functions/upload.php?type=img" class="neoCMSImgLoc" enctype="multipart/form-data" id="neoCMSImgLoc" <form action="core/upload.php?type=img" class="neoCMSImgLoc" enctype="multipart/form-data" id="neoCMSImgLoc"
method="POST" target="neoCMSImgUploadIframe"> method="POST" target="neoCMSImgUploadIframe">
<select id="neoCMSImgFolder" name="neoCMSImgFolder"> <select id="neoCMSImgFolder" name="neoCMSImgFolder">
<option class="defaultFolder" id="neoCMSImgFolderDefault" selected="selected" value="">Loading&hellip; <option class="defaultFolder" id="neoCMSImgFolderDefault" selected="selected" value="">Loading&hellip;
+1 -1
View File
@@ -1,7 +1,7 @@
<div class="neoCMSUploadContent neoCMSPrompt clearfix" id="neoCMSPrompt"> <div class="neoCMSUploadContent neoCMSPrompt clearfix" id="neoCMSPrompt">
<h4 class="neoCMSPromptTitle" id="neoCMSPromptTitle">Upload A File</h4> <h4 class="neoCMSPromptTitle" id="neoCMSPromptTitle">Upload A File</h4>
<p id="neoCMSUploadTxt">To upload a file, first select the folder you want to upload to:</p> <p id="neoCMSUploadTxt">To upload a file, first select the folder you want to upload to:</p>
<form action="functions/upload.php" class="neoCMSUploadForm neoCMSImgChooseInline" enctype="multipart/form-data" id="neoCMSUploadForm" <form action="core/upload.php" class="neoCMSUploadForm neoCMSImgChooseInline" enctype="multipart/form-data" id="neoCMSUploadForm"
method="POST" name="neoCMSUploadForm" target="neoCMSUploadIframe"> method="POST" name="neoCMSUploadForm" target="neoCMSUploadIframe">
<ul> <ul>
<li> <li>
+138
View File
@@ -0,0 +1,138 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>Default page</title>
<meta charset="utf-8">
<meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible">
<meta content="Default page" name="description">
<meta content="width=device-width, initial-scale=1" name="viewport">
<link href="https://fonts.googleapis.com" rel="preconnect">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans&display=swap" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;700&display=swap" rel="stylesheet">
<style>
body {
margin: 0px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100vw;
height: 100vh;
min-height: 675px;
background-color: #F4F5FF;
}
p {
width: 100%;
left: 0px;
font-size: 16px;
font-family: 'DM Sans', sans-serif;
font-weight: 400;
letter-spacing: 0px;
text-align: center;
vertical-align: top;
max-width: 550px;
color: #727586;
margin: 0px;
}
a:hover {
cursor: pointer;
color: #673DE6;
text-decoration: underline;
}
h1 {
font-family: 'DM Sans', sans-serif;
font-size: 24px;
font-weight: 700;
letter-spacing: 0px;
text-align: center;
margin: 8px;
}
.content {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 100%;
height: 100%;
}
.ic-launch {
margin-left: 10.5px;
width: 21px !important;
height: 20px !important;
}
.link-container {
margin-top: 32px;
margin-bottom: 32px;
}
.link {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
font-family: 'DM Sans', sans-serif;
font-style: normal;
font-weight: 700;
font-size: 14px;
color: #673DE6;
margin-top: 8px;
text-decoration: none;
}
.main-image {
width: 100%;
max-width: 650px;
max-height: 406px;
height: auto;
}
.navigation {
width: 100%;
height: 72px;
display: flex;
margin: 0;
padding: 0;
flex-direction: row;
align-items: center;
justify-content: center;
background-color: #36344D;
}
@media screen and (max-width: 580px) and (min-width: 0px) {
h1, p, .link-container {
width: 80%;
}
}
@media screen and (min-width: 650px) and (min-height: 0px) and (max-height: 750px) {
.link-container {
margin-top: 12px;
}
h1 {
margin-top: 0px;
margin-bottom: 0px;
}
}
.navigation {
color: white;
}
</style>
</head>
<body>
<nav class="navigation neocms">
<h1>neoCMS</h1>
</nav>
<div class="content neocms">
<h1>This is page 2</h1>
</div>
</body>
</html>