Merge branch 'master' into dev

This commit is contained in:
Andy Dixon
2024-07-23 19:03:59 +01:00
committed by GitHub
29 changed files with 24 additions and 6691 deletions
-8
View File
@@ -1,8 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
$doc = file_get_contents("./login.php", true);
$doc = stripslashes($doc);
$cb = true;
-35
View File
@@ -1,35 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
@session_start();
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('createsession.php');
$forgotproxy = 'https://www.neogate.com/licencing/forgotpass-serv.php?';
if ($_POST && $_POST['neoCMSUsername']) {
include_once('getpath.php');
$forgotgets = 'neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . $path . '&neoCMSAcctUser=' . urlencode($_POST['neoCMSUsername']);
header("Location:$forgotproxy$forgotgets");
} elseif ($_GET && $_GET['neoCMSSess'] == $_SESSION['neoCMSSess']) {
$m = $_GET['neoCMSPassMessage'];
echo $m;
if ($m == '0') $getmessage = "Your password was reset and an email was sent.";
elseif ($m == '1') $getmessage = "There is no such user on this domain.";
$script = '<script type="text/javascript">window.top.window.forgotReset("' . $getmessage . '");</script>';
echo $script;
}
}
?>
-67
View File
@@ -1,67 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
@session_start();
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('urldissect.php');
include_once('createsession.php');
if (isset($_SESSION['neoCMSUserid']) && isset($_SESSION['neoCMSIsadmin']) && $_SESSION['neoCMSIsadmin'] == 'Y') {
$ftpconn = false;
$ftpvars = "<?php\n\n";
$ftpvars .= "\t" . '$ftpu = ' . "false;\n";
$ftpvars .= "\t" . '$ftpp = ' . "false;\n";
$ftpvars .= "\t" . '$ftps = ' . "false;\n";
$ftpvars .= "\t" . '$ftpwd = ' . "false;\n\n";
$ftpvars .= '?>';
$fftp = '';
include_once('ftpvars.php');
include_once('ftpconnect.php');
ftpconnect();
if ($ftpconn) {
$ftpdoc = tmpfile();
if (!$ftpdoc) {
$ftpdocp = tempnam(dirname(__FILE__) . '/../settings/tmp', 'Ftpdoc');
chmod($ftpdocp, 0777);
$ftpdoc = fopen($ftpdocp, 'w+');
}
fwrite($ftpdoc, $ftpvars);
rewind($ftpdoc);
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 1);
$remotefile = $ftpwd . $path . 'ftpvars.php';
if (ftp_fput($ftpconn, $remotefile, $ftpdoc, FTP_BINARY)) {
$getmessage = "Your FTP information has been successfully cleared.";
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
} else {
$getmessage = '<strong>Error:</strong> neocms could not find this page: <em>' . $remotefile . '</em>';
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
}
fclose($ftpdoc);
if (isset($ftpdocp)) unlink($ftpdocp);
}
echo '<script type="text/javascript">window.top.window.clearFTPInfo();window.top.window.removeFrames();</script>';
}
}
?>
-34
View File
@@ -1,34 +0,0 @@
<?php
function ftpconnect()
{
global $fftp, $ftpu, $ftpp, $ftps, $ftpwd, $ftpconn;
if ($ftpu && $ftpp && $ftps && $ftpwd) {
if ($ftpwd != '/') $ftpwd = rtrim($ftpwd, '/');
//start ftp connection
if (function_exists('ftp_connect')) {
$ftpconn = ftp_connect($ftps) or die("Couldn't connect to $ftps");
ftp_login($ftpconn, $ftpu, $ftpp);
ftp_pasv($ftpconn, true);
} else {
$ftpconn = false;
$getmessage = "<strong>Error:</strong> FTP is not enabled for your install of PHP. <a href='http://www.php.net/manual/en/ftp.setup.php' title='Installing FTP on PHP'>More info here.</a>";
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
}
}
}
?>
-82
View File
@@ -1,82 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
@session_start();
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('urldissect.php');
include_once('createsession.php');
if (isset($_SESSION['neoCMSUserid']) && isset($_SESSION['neoCMSIsadmin']) && $_SESSION['neoCMSIsadmin'] == 'Y') {
extract($_POST);
$ftpconn = false;
$ftpu = ($ftpu != '') ? $ftpu : false;
$ftpp = ($ftpp != '') ? $ftpp : false;
$ftps = ($ftps != '') ? $ftps : false;
$ftpwd = ($ftpwd != '') ? $ftpwd : false;
if ($ftpu && $ftpp && $ftps && $ftpwd) {
$ftpvars = "<?php\n\n";
$ftpvars .= "\t" . '$ftpu = "' . $ftpu . '"' . ";\n";
$ftpvars .= "\t" . '$ftpp = "' . $ftpp . '"' . ";\n";
$ftpvars .= "\t" . '$ftps = "' . $ftps . '"' . ";\n";
$ftpvars .= "\t" . '$ftpwd = "' . $ftpwd . '"' . "\n\n";
$ftpvars .= '?>';
include_once('ftpconnect.php');
ftpconnect();
if ($ftpconn) {
$ftpdoc = tmpfile();
if (!$ftpdoc) {
$ftpdocp = tempnam(dirname(__FILE__) . '/../settings/tmp', 'Ftpdoc');
chmod($ftpdocp, 0777);
$ftpdoc = fopen($ftpdocp, 'w+');
}
fwrite($ftpdoc, $ftpvars);
rewind($ftpdoc);
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 1);
$remotefile = $ftpwd . $path . 'ftpvars.php';
if (ftp_fput($ftpconn, $remotefile, $ftpdoc, FTP_BINARY)) {
$getmessage = "Your FTP information was successfully saved.";
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
} else {
$getmessage = "<strong>Error:</strong> There is an error in your FTP credentials. Please try entering them again.";
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
}
fclose($ftpdoc);
if (isset($ftpdocp)) unlink($ftpdocp);
}
echo '<script type="text/javascript">window.top.window.removeFrames();</script>';
} else {
$getmessage = '<strong>Error:</strong> All fields are required.';
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
echo '<script type="text/javascript">window.top.window.removeFrames();</script>';
}
}
}
?>
-10
View File
@@ -1,10 +0,0 @@
<?php
$ftpconn = false;
include_once('ftpvars.php');
include_once('ftpconnect.php');
ftpconnect($ftpu, $ftpp, $ftps, $ftpwd);
?>
-8
View File
@@ -1,8 +0,0 @@
<?php
$ftpu = false;
$ftpp = false;
$ftps = false;
$ftpwd = false;
?>
-25
View File
@@ -1,25 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
@session_start();
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('geturi.php');
include_once('createsession.php');
$pathproxy = 'https://www.neogate.com/licencing/prefs-serv.php?';
$scripturl = $_SERVER['HTTP_HOST'] . uri();
$path = explode('/', $scripturl);
$path = $path[sizeof($path) - 3];
if (isset($_SESSION['neoCMSPath']) && $_SESSION['neoCMSPath'] != $path) {
$pathgets = 'neoCMSUsername=' . urlencode($_SESSION['neoCMSUserid']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($_POST['neoCMSHTML']);
header("Location:$pathproxy$pathgets");
}
}
-98
View File
@@ -1,98 +0,0 @@
<?php
error_reporting(E_ALL & ~E_NOTICE);
@session_start();
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('createsession.php');
if (isset($_SESSION['neoCMSUserid'])) {
$userproxy = 'https://www.neogate.com/licencing/users-serv.php?';
if ($_POST && $_POST['neoCMSAcctUser'] && $_POST['neoCMSAcctEmail'] && $_POST['neoCMSAcctUser-orig'] && $_POST['neoCMSAcctEmail-orig']) {
include_once('getpath.php');
$usergets = 'neoCMSUsername=' . urlencode($_SESSION['neoCMSUserid']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($path) . '&neoCMSAcctUser=' . urlencode($_POST['neoCMSAcctUser']) . '&neoCMSAcctEmail=' . urlencode($_POST['neoCMSAcctEmail']) . '&neoCMSOrigEmail=' . urlencode($_POST['neoCMSAcctEmail-orig']) . '&neoCMSOrigUser=' . urlencode($_POST['neoCMSAcctUser-orig']);
if ($_POST['neoCMSAcctName']) $usergets .= '&neoCMSAcctName=' . urlencode($_POST['neoCMSAcctName']);
if ($_POST['neoCMSAcctPass'] != '' && $_POST['neoCMSAcctPassConfirm'] != '') $usergets .= '&neoCMSAcctPass=' . urlencode($_POST['neoCMSAcctPass']) . '&neoCMSAcctPassConfirm=' . urlencode($_POST['neoCMSAcctPassConfirm']);
header("Location:$userproxy$usergets");
} elseif ($_POST && $_POST['neoCMSNewAcctUser'] && $_POST['neoCMSNewAcctEmail'] && $_POST['neoCMSNewAcctName'] && $_POST['neoCMSNewAcctPass'] && $_POST['neoCMSNewAcctPassConfirm']) {
include_once('getpath.php');
$usergets = 'neoCMSUsername=' . urlencode($_SESSION['neoCMSUserid']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($path) . '&neoCMSNewAcctUser=' . urlencode($_POST['neoCMSNewAcctUser']) . '&neoCMSNewAcctEmail=' . urlencode($_POST['neoCMSNewAcctEmail']) . '&neoCMSNewAcctName=' . urlencode($_POST['neoCMSNewAcctName']) . '&neoCMSNewAcctPass=' . urlencode($_POST['neoCMSNewAcctPass']) . '&neoCMSNewAcctPassConfirm=' . urlencode($_POST['neoCMSNewAcctPassConfirm']);
header("Location:$userproxy$usergets");
} elseif (empty($_GET)) {
include_once('getpath.php');
$usergets = 'neoCMSUsername=' . urlencode($_SESSION['neoCMSUserid']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($path);
header("Location:$userproxy$usergets");
} elseif ($_GET && $_GET['neoCMSDelUser']) {
include_once('getpath.php');
$usergets = 'neoCMSUsername=' . urlencode($_SESSION['neoCMSUserid']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($path) . '&neoCMSDelUser=' . urlencode($_GET['neoCMSDelUser']);
header("Location:$userproxy$usergets");
} elseif ($_GET && $_GET['neoCMSSess'] == $_SESSION['neoCMSSess']) {
$admin = array();
$users = array();
foreach ($_GET as $key => $val) {
if (strstr($key, '-A')) $admin[str_replace('-A', '', $key)] = $val;
elseif (!strstr($key, 'neoCMSSess') && !strstr($key, 'neoCMSUserMessage')) {
$num = explode('-', $key);
$users[$num[1]][$num[0]] = $val;
}
}
$adminscript = '<script type="text/javascript">window.top.window.adminUser("' . $admin['neoCMSName'] . '", "' . $admin['neoCMSUsername'] . '", "' . $admin['neoCMSEmail'] . '");</script>';
echo $adminscript;
foreach ($users as $user) {
$userscript = '<script type="text/javascript">window.top.window.buildUser("' . $user['neoCMSName'] . '", "' . $user['neoCMSUsername'] . '", "' . $user['neoCMSEmail'] . '", "' . $user['neoCMSId'] . '");</script>';
echo $userscript;
}
if ($_GET['neoCMSUserMessage'] != '0') {
$m = $_GET['neoCMSUserMessage'];
if ($m == '1') $getmessage = "Your account settings were successfully saved.";
elseif ($m == '2') $getmessage = "Your new account has been successfully created.";
elseif ($m == '3') $getmessage = "<strong>Error:</strong> This account has already been created.";
elseif ($m == '4') $getmessage = "Account successfully deleted.";
elseif ($m == '5') $getmessage = "<strong>Error:</strong> There was an error deleting this account.";
else $getmessage = "<strong>Error:</strong> There was an error saving.";
$savescript = '<script type="text/javascript">window.top.window.userBar("' . $getmessage . '");</script>';
echo $savescript;
$_SESSION['neoCMSUserid'] = $admin['neoCMSUsername'];
}
echo '<script type="text/javascript">window.top.window.removeFrames();</script>';
}
}
}
?>
-4
View File
@@ -10,10 +10,6 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if ($_POST) { if ($_POST) {
include_once('getpath.php');
$logingets = 'neoCMSUsername=' . urlencode($_POST['neoCMSUsername']) . '&neoCMSPassword=' . urlencode($_POST['neoCMSPassword']) . '&neoCMSSess=' . urlencode($_SESSION['neoCMSSess']) . '&neoCMSPath=' . urlencode($path);
include_once('../config.php'); include_once('../config.php');
if (@$_users[$_POST['neoCMSUsername']]["password"] == $_POST['neoCMSPassword']) { if (@$_users[$_POST['neoCMSUsername']]["password"] == $_POST['neoCMSPassword']) {
-2
View File
@@ -10,5 +10,3 @@ session_destroy();
@session_write_close(); @session_write_close();
exit; exit;
?>
+2 -50
View File
@@ -10,7 +10,6 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if (isset($_SESSION['neoCMSUserid'])) { if (isset($_SESSION['neoCMSUserid'])) {
include_once('urldissect.php'); include_once('urldissect.php');
include_once('ftpstart.php');
include_once('checkpath.php'); include_once('checkpath.php');
$message = '<strong>Error:</strong> There was an error restoring your page. Please try again.'; $message = '<strong>Error:</strong> There was an error restoring your page. Please try again.';
@@ -103,58 +102,15 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
function editfile($content, $backcontent, $url, $incpath, $inc) function editfile($content, $backcontent, $url, $incpath, $inc)
{ {
global $ftpconn, $ftpwd;
if ($content != $backcontent && ((!stristr($content, '<?php') && !strstr($content, '<%')) || (preg_match('/>[^<]+</', $backcontent) || preg_match('/<html/', $backcontent)) && strstr($backcontent, 'neocms'))) { if ($content != $backcontent && ((!stristr($content, '<?php') && !strstr($content, '<%')) || (preg_match('/>[^<]+</', $backcontent) || preg_match('/<html/', $backcontent)) && strstr($backcontent, 'neocms'))) {
if ($ftpconn) { if (is_writable($url)) {
$restdoc = tmpfile();
if (!$restdoc) {
$restdocp = tempnam(dirname(__FILE__) . '/../settings/tmp', 'Rest');
chmod($restdocp, 0777);
$restdoc = fopen($restdocp, 'w+');
}
fwrite($restdoc, $backcontent);
rewind($restdoc);
if (strstr($url, $_SERVER['DOCUMENT_ROOT'])) {
$nfkey = explode($_SERVER['DOCUMENT_ROOT'], $url);
$nfkey = $nfkey[1];
if ($inc) $remotefile = $ftpwd . $nfkey;
else {
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 3);
$filename = explode('../../', $url);
$filename = "$filename[1]";
$remotefile = $ftpwd . $path . $filename;
}
} else {
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 3);
$filename = explode('../../', $url);
$filename = "$filename[1]";
$remotefile = $ftpwd . $path . $filename;
}
if (ftp_fput($ftpconn, $remotefile, $restdoc, FTP_BINARY)) echo "Uploaded: $remotefile\n\n";
else $message = '<strong>Error:</strong> neocms could not find this page: <em>' . $remotefile . '</em>';
fclose($restdoc);
if (isset($restdocp)) unlink($restdocp);
} elseif (is_writable($url)) {
//restores file //restores file
$restdoc = fopen($url, "w"); $restdoc = fopen($url, "w");
fputs($restdoc, $backcontent); fputs($restdoc, $backcontent);
fclose($restdoc); fclose($restdoc);
} else $message = "<strong>Error:</strong> You do not have permission to edit this page. Try <a href='settings/ftpinfo.php' title='Enter your FTP info'>saving your FTP info here</a>."; } else $message = "<strong>Error:</strong> You do not have permission to edit this page.";
} }
@@ -172,9 +128,5 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
echo $script; echo $script;
} }
if ($ftpconn) ftp_close($ftpconn);
} }
} }
?>
+4 -29
View File
@@ -10,7 +10,6 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if (isset($_SESSION['neoCMSUserid'])) { if (isset($_SESSION['neoCMSUserid'])) {
include_once('urldissect.php'); include_once('urldissect.php');
include_once('ftpstart.php');
include_once('checkpath.php'); include_once('checkpath.php');
$message = 'Your page was successfully published.'; $message = 'Your page was successfully published.';
@@ -47,7 +46,7 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
function loadfile($url, $incpath, $f) function loadfile($url, $incpath, $f)
{ {
global $message, $includes, $pagepath, $ftpconn, $ftpwd, $doctype, $encode, $edit; global $message, $includes, $pagepath, $doctype, $encode, $edit;
$ssi = false; $ssi = false;
@@ -85,37 +84,13 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
$pagename = preg_replace('/(\.php|\.asp|\.html|\.htm|\.phtml|\.shtml|\.cfm)/', '', $pagename); $pagename = preg_replace('/(\.php|\.asp|\.html|\.htm|\.phtml|\.shtml|\.cfm)/', '', $pagename);
$backup = dirname(__FILE__) . '/../backups/' . $pagename . '_Bak.' . $pageext[1]; $backup = dirname(__FILE__) . '/../backups/' . $pagename . '_Bak.' . $pageext[1];
if ($ftpconn) { if (is_writable($url)) {
$backdoc = tmpfile();
if (!$backdoc) {
$backdocp = tempnam(dirname(__FILE__) . '/../settings/tmp', 'Back');
chmod($backdocp, 0777);
$backdoc = fopen($backdocp, 'w+');
}
fwrite($backdoc, $content);
rewind($backdoc);
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 2);
$remotefile = $ftpwd . $path . 'backups/' . $pagename . '_Bak.' . $pageext[1];
echo "Backup File: $remotefile\n\n";
if (ftp_fput($ftpconn, $remotefile, $backdoc, FTP_BINARY)) echo "Uploaded Backup: $remotefile!\n\n";
else $message = '<strong>Error:</strong> neocms failed creating backup for: <em>' . $remotefile . '</em>';
fclose($backdoc);
if (isset($backdocp)) unlink($backdocp);
} elseif (is_writable($url)) {
$backdoc = fopen($backup, "w+"); $backdoc = fopen($backup, "w+");
fwrite($backdoc, $content); fwrite($backdoc, $content);
fclose($backdoc); fclose($backdoc);
} else $message = '<strong>Error:</strong> You do not have permission to edit this page: <em>' . $pagefile . "</em>. Try <a href='settings/ftpinfo.php' title='Enter your FTP info'>saving your FTP info here</a>."; } else $message = '<strong>Error:</strong> You do not have permission to edit this page: <em>' . $pagefile . "</em>.";
// clean up content // clean up content
@@ -500,7 +475,7 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
fwrite($doc, $fpost); fwrite($doc, $fpost);
fclose($doc); fclose($doc);
} else $message = "<strong>Error:</strong> You do not have permission to edit this page. Try <a href='settings/ftpinfo.php' title='Enter your FTP info'>saving your FTP info here</a>."; } else $message = "<strong>Error:</strong> You do not have permission to edit this page.";
} else $message = '<strong>Error:</strong> neocms is unable find this page.'; } else $message = '<strong>Error:</strong> neocms is unable find this page.';
+2 -2
View File
@@ -9,9 +9,9 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if (isset($_SESSION['neoCMSUserid'])) { if (isset($_SESSION['neoCMSUserid'])) {
$_SESSION['neoCMSHTML'] = $gethtml = ""; $_SESSION['neoCMSHTML'] = $gethtml = "Y";
$_SESSION['neoCMSPath'] = $getpath = "cms"; $_SESSION['neoCMSPath'] = $getpath = "cms";
$_SESSION['neoCMSFiles'] = $getfile = 1; $_SESSION['neoCMSFiles'] = $getfile = "Y";
$_SESSION['neoCMSFilePath'] = $getfilepath = "files"; $_SESSION['neoCMSFilePath'] = $getfilepath = "files";
$_SESSION['neoCMSImagePath'] = $getimagepath = "images"; $_SESSION['neoCMSImagePath'] = $getimagepath = "images";
$_SESSION['neoCMSExFolders'] = $getexfolders = "ext"; $_SESSION['neoCMSExFolders'] = $getexfolders = "ext";
+1 -31
View File
@@ -6,7 +6,6 @@
if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) { if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSsession')) {
include_once('urldissect.php'); include_once('urldissect.php');
include_once('ftpstart.php');
include_once('createsession.php'); include_once('createsession.php');
if (!empty($_POST) && isset($_SESSION['neoCMSUserid'])) { if (!empty($_POST) && isset($_SESSION['neoCMSUserid'])) {
@@ -30,16 +29,6 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if (move_uploaded_file($file['tmp_name'], $uploadfile)) { if (move_uploaded_file($file['tmp_name'], $uploadfile)) {
$alert = "Your file was successfully uploaded."; $alert = "Your file was successfully uploaded.";
} elseif ($ftpconn) {
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 3);
$uploadfile = str_ireplace('../../', '', $uploadfile);
$remotefile = $ftpwd . $path . $uploadfile;
$tempfile = fopen($file['tmp_name'], 'r');
if (ftp_fput($ftpconn, $remotefile, $tempfile, FTP_BINARY)) $alert = "Your file was successfully uploaded.";
} }
} else { } else {
@@ -73,22 +62,7 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
if (!preg_match('/(\.html|\.php|\.js|\.css|\.htm|\.shtml|\.asp|\.cfm|\.phtml)$/i', $fileName) && $fileSize < 100000000) { if (!preg_match('/(\.html|\.php|\.js|\.css|\.htm|\.shtml|\.asp|\.cfm|\.phtml)$/i', $fileName) && $fileSize < 100000000) {
if ($ftpconn) { if (move_uploaded_file($file['tmp_name'], $uploadfile)) {
$path = urldissect($_SERVER['SCRIPT_NAME'], false, 3);
$uploadfile = str_ireplace('../../', '', $uploadfile);
$remotefile = $ftpwd . $path . $uploadfile;
$tempfile = fopen($file['tmp_name'], 'r');
if (ftp_fput($ftpconn, $remotefile, $tempfile, FTP_BINARY)) $alert = "Your file was successfully uploaded.";
else {
$alert = "<strong>Error:</strong> You do not have permission to upload files to this folder.";
$script = '<script language="javascript" type="text/javascript">window.top.window.fileInfo("", "' . $alert . '", "", "" );</script>';
echo $script;
}
} elseif (move_uploaded_file($file['tmp_name'], $uploadfile)) {
$alert = "Your file was successfully uploaded."; $alert = "Your file was successfully uploaded.";
} else { } else {
$alert = "<strong>Error:</strong> You do not have permission to upload files to this folder."; $alert = "<strong>Error:</strong> You do not have permission to upload files to this folder.";
@@ -111,10 +85,6 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
} }
if ($ftpconn) ftp_close($ftpconn);
} }
} }
?>
-589
View File
@@ -1,589 +0,0 @@
/* NORMALIZATION STYLES --------------------------------------------- */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
outline: 0;
font-size: 100%;
vertical-align: baseline;
background: transparent;
text-align: left;
}
body {
line-height: 1;
font-size: 62.5%;
text-align: center;
color: #333;
font-family: Arial, Helvetica, sans-serif;
}
h1, h2, h3, h4, h5, h6 {
font-weight: normal;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
abbr, acronym {
border-bottom: 1px dashed #999;
cursor: help;
}
:focus {
outline: 0;
}
ins {
text-decoration: none;
}
del {
text-decoration: line-through;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
html, body {
height: 100%;
width: 100%;
overflow: hidden;
}
/* LOGIN STYLES --------------------------------------------- */
#neoCMSPromptWrap {
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
z-index: 350;
display: block;
background: none;
}
.neoCMSLoginWrap {
position: relative;
border: 1px solid;
border-color: #666 #000 #000 #000;
margin: 7% auto 0;
padding: 20px 20px 40px;
width: 542px;
z-index: 10000;
display: none;
-moz-box-shadow: 0 0 10px #666;
-moz-border-radius: 10px;
-webkit-border-radius: 10px;
overflow: hidden;
background: #000;
}
.neoCMSLoginWrap h1.logo {
height: 73px;
background: #000 url(../neocms-images/neocms_sprite1.png) no-repeat -813px -47px;
margin: 0 auto 19px;
width: 537px;
text-indent: -5000px;
display: block;
overflow: hidden;
}
.neoCMSLoginWrap h2 {
color: #fff;
margin-bottom: 20px;
font-size: 14px;
}
.neoCMSLoginConfig {
margin: 0 auto 20px;
text-align: left;
width: 535px;
display: inline;
}
.neoCMSLoginConfig li {
margin: 0;
display: block;
padding: 0 0 2px;
}
.neoCMSLoginConfig li a {
background: url(../neocms-images/prompt.gif) repeat-x left bottom #666;
height: 28px;
display: block;
padding: 12px 0 0 20px;
font-size: 1.4em;
color: #ccc;
text-decoration: none;
position: relative;
}
.neoCMSLoginConfig li a strong {
color: #fff;
}
.neoCMSLoginConfig li a span {
background: url(../neocms-images/neocms_sprite1.png) no-repeat;
background-position: -689px 0;
height: 22px;
width: 90px;
overflow: hidden;
display: block;
position: absolute;
right: 10px;
text-indent: -5000px;
top: 9px;
}
.neoCMSLoginConfig li a:hover {
background: #fff;
color: #666;
}
.neoCMSLoginConfig li a:hover strong {
color: #82ac3f;
}
.neoCMSAppInfo {
margin: 0;
padding: 0;
float: left;
background: transparent;
text-align: left;
width: 252px;
display: inline;
}
.neoCMSAppInfo p {
padding: 0;
margin: 0;
font-size: 11px;
text-align: left;
color: #ccc;
line-height: 1.3em;
}
.neoCMSAppInfo p a:link, .neoCMSAppInfo p a:visited {
color: #82ac3f;
text-decoration: none;
}
.neoCMSAppInfo p a:hover {
color: #fff;
text-decoration: underline;
}
p.neoCMSTopBorder {
margin-top: 15px;
padding-top: 15px;
padding-bottom: 15px;
border-top: 1px solid #333;
}
.neoCMSLoginCont {
float: left;
margin: 0 0 0 21px;
padding: 0;
width: 260px;
height: 135px;
display: inline;
position: relative;
}
.neoCMSLoginCont form {
margin: 0;
padding: 0;
width: 260px;
}
.neoCMSLoginCont fieldset {
margin: 0;
padding: 0;
border: none;
}
.neoCMSLoginCont legend, .neoCMSLogin h1 {
margin: 0;
padding: 0 0 5px;
color: #fff;
font-size: 15px;
font-weight: bold;
width: 257px;
}
.neoCMSLogin h1 {
padding: 0 0 5px;
margin: 0 auto 10px;
width: auto;
display: block;
width: 535px;
}
.neoCMSLoginCont ol {
margin: 0;
padding: 10px 0 0;
list-style: none;
border-top: 1px solid #333;
}
.neoCMSLoginCont li {
margin: 0;
padding: 0;
color: #fff;
}
li#neoCMSEnter {
padding-top: 13px;
font-size: 11px;
display: block;
}
li#neoCMSEnter p {
float: left;
width: auto;
line-height: 22px;
}
li p.error {
display: none;
color: #f00;
font-style: italic;
margin-left: 10px;
}
li#neoCMSEnter p.invalid {
clear: both;
margin: 5px 0 0 0;
width: 257px;
}
li#neoCMSEnter a:link, li#neoCMSEnter a:visited {
color: #82ac3f;
text-decoration: none;
margin-left: 20px;
display: inline;
line-height: 22px;
}
li#neoCMSEnter p.invalid a {
margin-left: 0;
}
li#neoCMSEnter a:hover {
color: #fff;
text-decoration: underline;
}
.neoCMSLoginCont label {
font-size: 12px;
line-height: 18px;
}
input.neoCMSInput {
width: 183px;
padding: 2px;
background: #fff;
border: none;
}
#neoCMSPromptBtn, #neoCMSSubmitBtn, #neoCMSLoginBtn, #neoCMSPrefBtn, #neoCMSAutoUpdate, .userSave, #neoCMSFTPBtn, #neoCMSConfigRetry {
float: left;
padding: 0;
width: 57px;
height: 22px;
line-height: 22px;
display: block;
background: url(../neocms-images/neocms_sprite1.png) no-repeat -1221px 0;
text-indent: 0;
text-align: center;
border: 0;
margin: 0;
font-size: 12px;
cursor: pointer;
color: #fff !important;
text-decoration: none !important;
}
.userSave {
float: none;
margin: 10px 0 0 113px;
}
#neoCMSAutoUpdate {
background-position: -1149px -22px;
width: 71px;
margin: 0 10px 0 0 !important;
position: relative;
top: -5px;
color: #333 !important;
}
#neoCMSSubmitBtn, #neoCMSLoginBtn {
margin-top: 0;
padding-bottom: 3px;
}
#neoCMSLoginWrap #neoCMSSubmitBtn {
margin-top: 5px;
}
#neoCMSPromptBtn:hover, #neoCMSSubmitBtn:hover, #neoCMSLoginBtn:hover, #neoCMSAutoUpdate:hover, .userSave:hover, #neoCMSConfigRetry:hover {
background-position: -1221px -22px;
color: #000 !important;
text-decoration: none !important;
}
#neoCMSAutoUpdate:hover {
background-position: -1279px -22px;
}
#neoCMSPrefBtn:hover, #neoCMSFTPBtn:hover {
background-position: -1164px 0;
color: #000 !important;
text-decoration: none;
}
div.forgotLogin {
background: #000;
padding: 4px 0 10px;
*padding: 7px 0 10px;
position: absolute;
top: 69px;
*top: 75px;
left: 0;
width: 257px;
display: none;
}
div.forgotLogin p {
color: #ccc;
margin: 0 0 10px;
font-size: 11px;
line-height: 14px;
}
div.forgotLogin p a {
color: #82ac3f;
float: left;
margin: 5px 0 0 20px;
text-decoration: none;
line-height: 22px;
}
div.forgotLogin p a:hover {
color: #82ac3f;
text-decoration: underline;
}
div.forgotLogin p.message {
color: #82ac3f;
display: none;
clear: both;
width: auto;
margin: 10px 0 0 0;
}
#neoCMSPageSrc {
width: 100%;
height: 100%;
z-index: 0;
position: relative;
top: 0 !important;
left: 0;
margin: 0 !important;
padding: 0;
overflow: visible;
border: none !important;
display: block;
*zoom: 1; /* ie7 */
}
div#overlay, div#overlayEditWrap {
position: absolute;
top: 0;
left: 0;
height: 100%;
width: 100%;
display: none;
z-index: 100;
}
div#overlay {
background: #eee;
}
div#overlayEditWrap {
display: block;
}
/* FILE BROWSER STYLES --------------------------------------------- */
#neoCMSFilesWrap {
position: absolute;
height: 100%;
width: 100%;
top: 0;
left: 0;
z-index: 351;
display: block;
background: none;
overflow: auto;
}
#neoCMSFiles {
border: 1px solid;
border-color: #eee #ddd #bbb #ddd;
*border-color: #eee #ccc #999 #ccc;
position: relative;
display: block;
margin: 0 auto;
background: #ddd;
padding: 10px 20px 20px;
width: 314px;
top: 100px;
font-size: 1.2em;
z-index: 10;
-moz-border-radius: 14px;
-webkit-border-radius: 14px;
-moz-box-shadow: 0 0 10px #666;
}
.clear {
clear: left;
}
div.neoCMSFiles h2 {
color: #666;
padding: 10px 0 0;
margin: 0 0 15px;
font-size: 1.1em;
}
#neoCMSFClose {
float: right;
padding: 10px 0 0;
color: #82ac3f;
}
#filesTab {
display: none;
overflow: hidden;
margin: 0 0 -1px 1px;
position: relative;
z-index: 10;
}
#filesTab li {
display: block;
float: left;
margin-right: 3px;
}
#filesTab li a {
display: block;
color: #000;
padding: 7px 10px 3px;
font-size: 12px;
text-decoration: none;
background: #bbb;
-moz-border-radius-topleft: 10px;
-moz-border-radius-topright: 10px;
-webkit-border-top-left-radius: 10px;
-webkit-border-top-right-radius: 10px;
}
#filesTab li.on a {
background: #fff;
color: #888;
}
#neoCMSFileULs {
height: 300px;
padding: 0;
overflow: auto;
background: #fff;
border: 1px solid;
border-color: #ccc #ddd #eee #ddd;
display: block;
position: relative;
}
#neoCMSFileULs ul {
margin: 0;
padding-top: 15px;
position: relative;
}
#neoCMSFileULs li {
padding: 7px 10px;
cursor: pointer;
line-height: 1.2em;
overflow: hidden;
position: relative;
}
#neoCMSFileULs li div.mask {
height: 15px;
width: 20px;
float: left;
margin: 0 10px 0 0;
overflow: hidden;
display: block;
position: relative;
text-align: center;
}
#neoCMSFileULs li img {
height: 100%;
width: auto;
border: 1px solid #ddd;
margin: 0 auto;
position: relative;
}
#neoCMSFileULs li p {
display: block;
float: left;
width: 245px;
}
#neoCMSFileULs li:hover {
background: #82ac3f;
color: #fff;
}
div.disabled {
opacity: 0.3 !important;
*filter: alpha(opacity=30) !important;
}
/* FLOAT CLEARING STYLES
------------------------------------------------------------------------ */
.clearfix:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}
.clearfix {
display: inline-block;
}
/* Hide from IE Mac \*/
.clearfix {
display: block;
}
/* End hide from IE Mac */
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -154,7 +154,7 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
$restdoc = fopen($url, "w"); $restdoc = fopen($url, "w");
fputs($restdoc, $backcontent); fputs($restdoc, $backcontent);
fclose($restdoc); fclose($restdoc);
} else $message = "<strong>Error:</strong> You do not have permission to edit this page. Try <a href='settings/ftpinfo.php' title='Enter your FTP info'>saving your FTP info here</a>."; } else $message = "<strong>Error:</strong> You do not have permission to edit this page.";
} }
+1 -1
View File
@@ -500,7 +500,7 @@ if (isset($_SESSION['neoCMSSess']) && strstr($_SESSION['neoCMSSess'], 'neoCMSses
fwrite($doc, $fpost); fwrite($doc, $fpost);
fclose($doc); fclose($doc);
} else $message = "<strong>Error:</strong> You do not have permission to edit this page. Try <a href='settings/ftpinfo.php' title='Enter your FTP info'>saving your FTP info here</a>."; } else $message = "<strong>Error:</strong> You do not have permission to edit this page.";
} else $message = '<strong>Error:</strong> neocms is unable find this page.'; } else $message = '<strong>Error:</strong> neocms is unable find this page.';
+4 -501
View File
@@ -167,219 +167,13 @@ hideUserBar = function () {
}) })
}; };
var v = 0; var v = 0;
neocmsUsers = function () {
var usersIframe;
try {
usersIframe = document.createElement('<iframe name="neoCMSUsersFrame" >')
} catch (ex) {
usersIframe = document.createElement('iframe')
}
$(usersIframe).attr({
id: 'neoCMSUsersFrame',
name: 'neoCMSUsersFrame',
src: '../core/getsaveusers.php',
application: 'yes'
}).css('display', 'none');
$('body').append(usersIframe)
};
adminUser = function (name, user, email) {
$('#neoCMSAcctFormSuperAdmin').find('h3').html(name + ' <strong>Admin</strong>').prepend($('<span/>').append($('<a/>').addClass('neoCMSAcctModify').attr({
href: 'javascript:',
title: 'edit your login information'
}).html('modify'))).end().find('.neoCMSAcctUserLi input').val(user).end().find('.neoCMSAcctEmailLi input').val(email);
$('#neoCMSAcctFormSuperAdmin a.neoCMSAcctModify').unbind('click').bind('click', userModify)
};
buildUser = function (name, user, email, uid) {
if (name && user && email) {
if (!$('#user' + uid).length) {
var userArea = '<div id="user' + uid + '" class="neoCMSDashElement"><form class="neoCMSAcctForm neoCMSAcctDisplay" action="../core/getsaveusers.php" method="post" target="neoCMSSaveUserFrame" ><h3></h3><ul><li class="neoCMSAcctUserLi"><label>Username </label><input class="neoCMSLocked neoCMSAcctUser" name="neoCMSAcctUser" type="text" value="" readonly="true" /><input class="neoCMSLocked neoCMSAcctUser-orig" name="neoCMSAcctUser-orig" type="hidden" value="" readonly="true" /></li><li class="neoCMSAcctPassLi"><label>Password </label><input id="neoCMSAcctPass" class="neoCMSLocked neoCMSAcctPass" name="neoCMSAcctPass" type="text" value="TOTALLY SECURE, REALLY" readonly="true" /></li></ul><ul class="neoCMSAcctMeta"><li class="neoCMSAcctEmailLi"><label>Email </label><input class="neoCMSLocked neoCMSAcctEmail" name="neoCMSAcctEmail" type="text" value="" readonly="true" /><input class="neoCMSLocked neoCMSAcctEmail-orig" name="neoCMSAcctEmail-orig" type="hidden" value="" readonly="true" /></li></ul></form></div>';
userArea = $(userArea);
$(userArea).find('h3').html(name).prepend($('<span/>').append($('<a/>').addClass('neoCMSAcctModify').attr({
href: 'javascript:',
title: 'edit this user'
}).html('modify')).append('|').append($('<a/>').addClass('neoCMSAcctDelete').attr({
href: 'javascript:',
title: 'delete this user'
}).html('delete'))).end().find('.neoCMSAcctUserLi input').val(user).end().find('.neoCMSAcctEmailLi input').val(email);
$(userArea).find('a.neoCMSAcctModify').bind('click', userModify).end().find('a.neoCMSAcctDelete').bind('click', function () {
userDeletePrompt(this)
}).end().insertAfter('.neoCMSDashElement:last')
} else {
$('#user' + uid).find('h3').html(name).prepend($('<span/>').append($('<a/>').addClass('neoCMSAcctModify').attr({
href: 'javascript:',
title: 'edit this user'
}).html('modify')).append('|').append($('<a/>').addClass('neoCMSAcctDelete').attr({
href: 'javascript:',
title: 'delete this user'
}).html('delete'))).end().find('.neoCMSAcctUserLi input').val(user).end().find('.neoCMSAcctEmailLi input').val(email).end().find('a.neoCMSAcctModify').unbind('click').bind('click', userModify).end().find('a.neoCMSAcctDelete').unbind('click').bind('click', function () {
userDeletePrompt(this)
})
}
}
};
removeFrames = function () { removeFrames = function () {
$('#neoCMSUsersFrame, #neoCMSSaveUserFrame, #neoCMSDelUserFrame, #neoCMSSaveFTPFrame, #neoCMSClearFTPFrame').remove(); $('#neoCMSUsersFrame, #neoCMSSaveUserFrame, #neoCMSDelUserFrame, #neoCMSSaveFTPFrame, #neoCMSClearFTPFrame').remove();
$('#neoCMSTopBanner').css('background', 'none'); $('#neoCMSTopBanner').css('background', 'none');
cancel() cancel()
}; };
newUser = function () {
userModifyCancel();
$('#neoCMSNewUser').css('display', 'block').find('input:first').focus().end().find('#neoCMSAcctFormNewUser').addClass('neoCMSNewAcctEditing').end().find('#neoCMSNewUserSave').bind('click', userModifySave);
$('#neoCMSNewUserLink').unbind('click').bind('click', newUserCancel);
$('#neoCMSNewAcctPass').unbind('keyup').bind('keyup', function () {
runPassword(this)
});
setTimeout(function () {
$('#neoCMSNewName').focus()
}, 0)
};
newUserCancel = function () {
$('#neoCMSNewUser').css('display', 'none').find('input').val('');
$('#pwStrengthNew').removeClass().html('n/a <span class="advice">&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required.</span>');
$('#neoCMSNewUserLink').unbind('click', newUserCancel).bind('click', newUser)
};
userModify = function () {
newUserCancel();
if (!$('.neoCMSAcctPassConLi').length) {
$(this.parentNode.parentNode.parentNode).addClass('neoCMSAcctEditing').find('input').removeAttr('readonly').removeClass('neoCMSLocked').addClass('neoCMSUnlocked').end().find('.neoCMSAcctUserLi').append($('<span/>').addClass('error').html('Please create a username')).end().find('.neoCMSAcctPassLi').append($('<span/>').addClass('error').html('&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required.')).after($('<li/>').addClass('neoCMSAcctPassConLi').append($('<label/>').html('Confirm Password')).append($('<input/>').addClass('neoCMSUnlocked neoCMSAcctPassCon').attr({
name: 'neoCMSAcctPassConfirm',
type: 'password'
})).append($('<span/>').addClass('error').html('Must match password'))).after($('<li/>').addClass('neoCMSAcctPassInfo').attr('id', 'pwStrength').html('n/a <span class="advice">&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required. Leave blank if you don&rsquo;t want a new password.</span>')).end().find('.neoCMSAcctPassLi label').html('New Password ').end().find('.neoCMSAcctPassLi input').replaceWith($('<input/>').attr('id', 'neoCMSAcctPass').addClass('neoCMSUnlocked neoCMSAcctPass').attr({
type: 'password',
name: 'neoCMSAcctPass'
}).val('')).end().find('.neoCMSAcctEmailLi').append($('<span/>').addClass('error').html('Please enter a valid email')).end().find('.neoCMSAcctMeta').append($('<li/>').addClass('neoCMSFormSave').append($('<a/>').addClass('userSave').attr({
href: 'javascript:',
title: 'save'
}).html('save').bind('click', userModifySave)).append($('<span/>').addClass('neoCMSCancel').html('or ').append($('<a/>').attr('href', 'javascript:').html('cancel').bind('click', userModifyCancel))))
}
$('#neoCMSAcctPass').unbind('keyup').bind('keyup', function () {
runPassword(this)
});
$('a.neoCMSAcctModify').unbind('click', userModify).bind('click', userModifyCancel);
$('#neoCMSAcctFormSuperAdmin .neoCMSAcctUser input:first').focus()
};
userModifySave = function () {
if (userModifyValid()) {
$('#neoCMSTopBanner').css('background', 'url(../images/loading.gif) repeat-x bottom');
var saveUserIframe;
try {
saveUserIframe = document.createElement('<iframe name="neoCMSSaveUserFrame" >')
} catch (ex) {
saveUserIframe = document.createElement('iframe')
}
$(saveUserIframe).attr({
id: 'neoCMSSaveUserFrame',
name: 'neoCMSSaveUserFrame',
application: 'yes'
}).css('display', 'none');
$('body').append(saveUserIframe);
$(this).parents('.neoCMSAcctForm')[0].submit();
userModifyCancel()
}
};
userModifyValid = function (f) {
$('.neoCMSAcctEditing li.error').removeClass('error');
if (f) validCheck(f); else {
v = 0;
var fields = $('.neoCMSAcctEditing input, .neoCMSNewAcctEditing input').not('.neoCMSAcctUser-orig, .neoCMSAcctEmail-orig');
$(fields).each(function () {
validCheck(this)
});
$('.neoCMSAcctEditing input, .neoCMSNewAcctEditing input').not('.neoCMSAcctUser-orig, .neoCMSAcctEmail-orig').unbind('change').bind('change', function () {
validCheck(this)
});
if (v == $(fields).length) return true
}
};
validCheck = function (f) {
var emailreg = /^[a-zA-Z0-9,!#\$%&'\*\+\/=\?\^_`\{\|}~-]+(\.[a-z0-9,!#\$%&'\*\+\/=\?\^_`\{\|}~-]+)*@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/,
passreg = /^\w*(?=\w*\d)(?=\w*[a-z])(?=\w*[A-Z])\w{5,}$/, c = false;
var tval = $(f).val(), fclass = $(f).attr('class'), fpar = $(f).parent();
if (fclass.match(/neoCMSAcctEmail/g)) {
if (emailreg.test(tval) == true) {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
} else if (fclass.match(/neoCMSAcctPass\b/)) {
if ($(f).parents('.neoCMSAcctEditing').length) {
if ($('#pwStrength').attr('class').match(/strong|medium/) || tval == '') {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
} else {
if ($('#pwStrengthNew').attr('class').match(/strong|medium/)) {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
}
} else if (fclass.match(/neoCMSAcctPassCon/)) {
if ($(f).parents('.neoCMSAcctEditing').length) {
if (tval == $('.neoCMSAcctPass', '.neoCMSAcctEditing').val()) {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
} else {
if (tval == $('.neoCMSAcctPass', '.neoCMSNewAcctEditing').val()) {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
}
}
if (fclass.match(/neoCMSFTPServer/g)) {
if (!tval.match(/^ftp\./)) {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
} else {
if (tval != '') {
c = true;
fpar.removeClass('error')
} else fpar.addClass('error')
}
if (c) v++
};
userModifyCancel = function () {
$('.neoCMSAcctEditing li.error').removeClass('error');
$('.neoCMSAcctEditing').removeClass('neoCMSAcctEditing').find('.neoCMSAcctPassInfo').remove().end().find('.neoCMSAcctPassLi label').html('Password ').end().find('.neoCMSAcctPassLi input').replaceWith($('<input/>').addClass('neoCMSLocked').attr({
type: 'text',
name: 'neoCMSAcctPass'
}).val('TOTALLY SECURE, REALLY')).end().find('#pwStrength').remove().end().find('input').removeClass('neoCMSUnlocked').addClass('neoCMSLocked').attr('readonly', 'true').end().find('.neoCMSAcctPassConLi').remove().end().find('.neoCMSFormSave').remove().end().find('li span').remove();
$('#neoCMSAcctPass').unbind('keyup');
$('a.neoCMSAcctModify').unbind('click', userModifyCancel).bind('click', userModify)
};
userDeletePrompt = function (user) {
overlay();
if (!$('#neoCMSPrompt').length) {
$('body').append($('<div/>').attr('id', 'neoCMSPromptWrap').load('../templates/prompt.html', function () {
$('#neoCMSPrompt h4.neoCMSPromptTitle').html('Delete User');
$('#neoCMSPrompt p').html('Are you sure you want to delete this user? You cannot undo this action.');
$('#neoCMSPromptBtn').addClass('neoCMSDeleteBtn').attr('title', 'delete this user').html('delete').bind('click', function () {
var uid = $(user).parents('.neoCMSDashElement').attr('id').replace('user', '');
userDelete(uid)
});
$('#neoCMSCancelBtn').bind('click', cancel);
showPrompt()
}))
}
};
userDelete = function (user) {
$('.neoCMSDashElement').not('#neoCMSSuperAdmin').each(function () {
$('#user' + user).remove()
});
var delUserIframe;
try {
delUserIframe = document.createElement('<iframe name="neoCMSDelUserFrame" >')
} catch (ex) {
delUserIframe = document.createElement('iframe')
}
$(delUserIframe).attr({
id: 'neoCMSDelUserFrame',
name: 'neoCMSDelUserFrame',
src: '../core/getsaveusers.php?neoCMSDelUser=' + user,
application: 'yes'
}).css('display', 'none');
$('body').append(delUserIframe)
};
getNoLines = function (ele) { getNoLines = function (ele) {
var hardlines = ele.value.split('\n'); var hardlines = ele.value.split('\n');
var total = hardlines.length; var total = hardlines.length;
@@ -395,150 +189,7 @@ String.prototype.strReverse = function () {
} }
return newstring return newstring
}; };
checkPassword = function (pwd) {
var nScore = 0, nLength = 0, nAlphaUC = 0, nAlphaLC = 0, nNumber = 0, nSymbol = 0, nMidChar = 0, nAlphasOnly = 0,
nNumbersOnly = 0, nRepChar = 0, nConsecAlphaUC = 0, nConsecAlphaLC = 0, nConsecNumber = 0, nConsecSymbol = 0,
nConsecCharType = 0, nSeqAlpha = 0, nSeqNumber = 0, nSeqChar = 0, nMultLength = 4, nMultNumber = 4,
nMultSymbol = 6, nMultMidChar = 2, nMultConsecAlphaUC = 2, nMultConsecAlphaLC = 2, nMultConsecNumber = 2,
nMultSeqAlpha = 3, nMultSeqNumber = 3, nTmpAlphaUC = "", nTmpAlphaLC = "", nTmpNumber = "", nTmpSymbol = "",
sAlphas = "abcdefghijklmnopqrstuvwxyz", sNumerics = "01234567890";
nScore = parseInt(pwd.length * nMultLength);
nLength = pwd.length;
var arrPwd = pwd.replace(/\s+/g, "").split(/\s*/), arrPwdLen = arrPwd.length;
for (var a = 0; a < arrPwdLen; a++) {
if (arrPwd[a].match(new RegExp(/[A-Z]/g))) {
if (nTmpAlphaUC !== "") {
if ((nTmpAlphaUC + 1) == a) {
nConsecAlphaUC++;
nConsecCharType++
}
}
nTmpAlphaUC = a;
nAlphaUC++
} else if (arrPwd[a].match(new RegExp(/[a-z]/g))) {
if (nTmpAlphaLC !== "") {
if ((nTmpAlphaLC + 1) == a) {
nConsecAlphaLC++;
nConsecCharType++
}
}
nTmpAlphaLC = a;
nAlphaLC++
} else if (arrPwd[a].match(new RegExp(/[0-9]/g))) {
if (a > 0 && a < (arrPwdLen - 1)) {
nMidChar++
}
if (nTmpNumber !== "") {
if ((nTmpNumber + 1) == a) {
nConsecNumber++;
nConsecCharType++
}
}
nTmpNumber = a;
nNumber++
} else if (arrPwd[a].match(new RegExp(/[^a-zA-Z0-9_]/g))) {
if (a > 0 && a < (arrPwdLen - 1)) {
nMidChar++
}
if (nTmpSymbol !== "") {
if ((nTmpSymbol + 1) == a) {
nConsecSymbol++;
nConsecCharType++
}
}
nTmpSymbol = a;
nSymbol++
}
for (var b = 0; b < arrPwdLen; b++) {
if (arrPwd[a].toLowerCase() == arrPwd[b].toLowerCase() && a != b) {
nRepChar++
}
}
}
for (var s = 0; s < 23; s++) {
var sFwd = sAlphas.substring(s, parseInt(s + 3));
var sRev = sFwd.strReverse();
if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) {
nSeqAlpha++;
nSeqChar++
}
}
for (var s = 0; s < 8; s++) {
var sFwd = sNumerics.substring(s, parseInt(s + 3));
var sRev = sFwd.strReverse();
if (pwd.toLowerCase().indexOf(sFwd) != -1 || pwd.toLowerCase().indexOf(sRev) != -1) {
nSeqNumber++;
nSeqChar++
}
}
if (nAlphaUC > 0 && nAlphaUC < nLength) {
nScore = parseInt(nScore + ((nLength - nAlphaUC) * 2));
sAlphaUC = "+ " + parseInt((nLength - nAlphaUC) * 2)
}
if (nAlphaLC > 0 && nAlphaLC < nLength) {
nScore = parseInt(nScore + ((nLength - nAlphaLC) * 2));
sAlphaLC = "+ " + parseInt((nLength - nAlphaLC) * 2)
}
if (nNumber > 0 && nNumber < nLength) {
nScore = parseInt(nScore + (nNumber * nMultNumber));
sNumber = "+ " + parseInt(nNumber * nMultNumber)
}
if (nSymbol > 0) {
nScore = parseInt(nScore + (nSymbol * nMultSymbol));
sSymbol = "+ " + parseInt(nSymbol * nMultSymbol)
}
if (nMidChar > 0) {
nScore = parseInt(nScore + (nMidChar * nMultMidChar));
sMidChar = "+ " + parseInt(nMidChar * nMultMidChar)
}
if ((nAlphaLC > 0 || nAlphaUC > 0) && nSymbol === 0 && nNumber === 0) {
nScore = parseInt(nScore - nLength);
nAlphasOnly = nLength;
sAlphasOnly = "- " + nLength
}
if (nAlphaLC === 0 && nAlphaUC === 0 && nSymbol === 0 && nNumber > 0) {
nScore = parseInt(nScore - nLength);
nNumbersOnly = nLength;
sNumbersOnly = "- " + nLength
}
if (nRepChar > 0) {
nScore = parseInt(nScore - (nRepChar * nRepChar));
sRepChar = "- " + nRepChar
}
if (nConsecAlphaUC > 0) {
nScore = parseInt(nScore - (nConsecAlphaUC * nMultConsecAlphaUC));
sConsecAlphaUC = "- " + parseInt(nConsecAlphaUC * nMultConsecAlphaUC)
}
if (nConsecAlphaLC > 0) {
nScore = parseInt(nScore - (nConsecAlphaLC * nMultConsecAlphaLC));
sConsecAlphaLC = "- " + parseInt(nConsecAlphaLC * nMultConsecAlphaLC)
}
if (nConsecNumber > 0) {
nScore = parseInt(nScore - (nConsecNumber * nMultConsecNumber));
sConsecNumber = "- " + parseInt(nConsecNumber * nMultConsecNumber)
}
if (nSeqAlpha > 0) {
nScore = parseInt(nScore - (nSeqAlpha * nMultSeqAlpha));
sSeqAlpha = "- " + parseInt(nSeqAlpha * nMultSeqAlpha)
}
if (nSeqNumber > 0) {
nScore = parseInt(nScore - (nSeqNumber * nMultSeqNumber));
sSeqNumber = "- " + parseInt(nSeqNumber * nMultSeqNumber)
}
return nScore
};
runPassword = function (t) {
var nScore = checkPassword(t.value), strength, strText, helper;
if (nScore < 0) nScore = 0; else if (nScore > 100) nScore = 100;
if (nScore >= 60) strength = "strong", strText = strength + " (" + nScore + "%)", helper = "Great password! Now just confirm in the next field."; else if (nScore >= 30 && nScore <= 59) strength = "medium", strText = strength + " (" + nScore + "%)", helper = "That will do! Now just confirm in the next field."; else strText = strength = "weak", strText = strength + " (" + nScore + "%)", helper = "&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required. Varied lettercase, numbers, & special characters help.";
if ($(t).val() == '') {
$('#pwStrength').removeClass().html('n/a <span class="advice">&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required. Leave blank if you don&rsquo;t want a new password.</span>');
if ($(t).parents('#neoCMSAcctFormNewUser').length) $('#pwStrengthNew').removeClass().html('n/a <span class="advice">&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required.</span>')
} else {
var pid = ($(t).parents('#neoCMSAcctFormNewUser').length) ? '#pwStrengthNew' : '#pwStrength';
$(pid).removeClass().addClass(strength).html(strText + ' <span class="advice">' + helper + '</span>')
}
};
countContain = function (strPassword, strCheck) { countContain = function (strPassword, strCheck) {
var nCount = 0; var nCount = 0;
for (i = 0; i < strPassword.length; i++) { for (i = 0; i < strPassword.length; i++) {
@@ -546,155 +197,7 @@ countContain = function (strPassword, strCheck) {
} }
return nCount return nCount
}; };
formatTweet = function (txt) {
var urls = txt.match(/http[^\s]+/gi);
if (urls) for (var i = 0; i < urls.length; i++) txt = txt.replace(urls[i], '<a href="' + urls[i] + '">' + urls[i] + '</a>');
var users = txt.match(/^@[^\s]+|\s@[^\s]+\b/gi);
if (users) {
for (var i = 0; i < users.length; i++) {
users[i] = users[i].replace(' ', '');
users[i] = users[i].replace(':', '');
var user = users[i].replace(/@/, '');
txt = txt.replace(users[i], '@<a href="http://twitter.com/' + user + '">' + user + '</a>')
}
}
var hashes = txt.match(/#[^\s]+/gi);
if (hashes) {
for (var i = 0; i < hashes.length; i++) {
hashes[i] = hashes[i].replace(' ', '');
hashes[i] = hashes[i].replace(':', '');
var hash = hashes[i].replace(/#/, '');
txt = txt.replace(hashes[i], '#<a href="http://twitter.com/search?q=#' + hash + '">' + hash + '</a>')
}
}
return txt
};
twitterFeed = function () {
$.ajax({
type: "GET",
crossDomain: true,
url: "http://twitter.com/statuses/user_timeline/neogateTechnologies.json?count=100",
dataType: "jsonp",
success: function (data) {
var ts = '', c = 0;
$(data).each(function (i) {
var txt = this.text;
if (txt.match(/#neocms/gi)) {
c++;
ts += '<li>' + formatTweet(txt) + '</li>';
if (c == 5 || i == data.length - 1) {
$('#twitter_update_list').html(ts);
return false
}
}
})
}
})
};
saveFTP = function () {
if (FTPvalid()) {
$('#neoCMSTopBanner').css('background', 'url(../images/loading.gif) repeat-x bottom');
var saveFTPIframe;
try {
saveFTPIframe = document.createElement('<iframe name="neoCMSSaveFTPFrame" >')
} catch (ex) {
saveFTPIframe = document.createElement('iframe')
}
$(saveFTPIframe).attr({
id: 'neoCMSSaveFTPFrame',
name: 'neoCMSSaveFTPFrame',
application: 'yes'
}).css('display', 'none');
$('body').append(saveFTPIframe);
$('#neoCMSFTPForm')[0].submit()
}
};
clearFTPPrompt = function (user) {
overlay();
if (!$('#neoCMSPrompt').length) {
$('body').append($('<div/>').attr('id', 'neoCMSPromptWrap').load('../templates/prompt.html', function () {
$('#neoCMSPrompt h4.neoCMSPromptTitle').html('Clear FTP Info');
$('#neoCMSPrompt p').html('Are you sure you want to clear your FTP info? You cannot undo this.');
$('#neoCMSPromptBtn').addClass('neoCMSPromptBtn').attr('title', 'clear').html('clear').bind('click', function () {
clearFTP()
});
$('#neoCMSCancelBtn').bind('click', cancel);
showPrompt()
}))
}
};
clearFTP = function () {
$('#neoCMSTopBanner').css('background', 'url(../images/loading.gif) repeat-x bottom');
var clearFTPIframe;
try {
clearFTPIframe = document.createElement('<iframe name="neoCMSClearFTPFrame" >')
} catch (ex) {
clearFTPIframe = document.createElement('iframe')
}
$(clearFTPIframe).attr({
id: 'neoCMSClearFTPFrame',
name: 'neoCMSClearFTPFrame',
application: 'yes',
src: '../core/ftpclear.php'
}).css('display', 'none');
$('body').append(clearFTPIframe)
};
clearFTPInfo = function () {
$('#neoCMSFTPForm input').val('')
};
FTPvalid = function (f) {
$('#neoCMSFTPForm li.error').removeClass('error');
if (f) validCheck(f); else {
v = 0;
var fields = $('#neoCMSFTPForm input');
$(fields).each(function () {
validCheck(this)
});
$('#neoCMSFTPForm input').unbind('change').bind('change', function () {
validCheck(this)
});
if (v == $(fields).length) return true
}
};
autoUpdatePrompt = function () {
overlay();
if (!$('#neoCMSPrompt').length) {
$('body').append($('<div/>').attr('id', 'neoCMSPromptWrap').load('../templates/prompt.html', function () {
$('#neoCMSPrompt h4.neoCMSPromptTitle').html('Auto-Update neocms');
$('#neoCMSPrompt p').addClass('simple').html('Are you sure you want to update? Your preferences, FTP info, and restore states will be preserved. You cannot undo or cancel once you start the auto-update process. It should take less than 3 minutes.');
$('#neoCMSPromptBtn').addClass('neoCMSPromptBtn').attr('title', 'Auto-update neocms to the latest version').html('update').bind('click', autoUpdate);
$('#neoCMSCancelBtn').bind('click', cancel);
showPrompt()
}))
}
};
autoUpdate = function () {
$('#neoCMSTopBanner').css('background', 'url(../images/loading.gif) repeat-x bottom');
$('#neoCMSPrompt h4.neoCMSPromptTitle').html('Auto-Updating&hellip; Please Wait');
$('#neoCMSPrompt p').html('Uploading the new files now. Please do not refresh your browser or stop loading.');
$('#neoCMSPromptBtn,#neoCMSCancelBtn').remove();
var updateIframe;
try {
updateIframe = document.createElement('<iframe name="neoCMSUpdateFrame" >')
} catch (ex) {
updateIframe = document.createElement('iframe')
}
$(updateIframe).attr({
id: 'neoCMSUpdateFrame',
name: 'neoCMSUpdateFrame',
application: 'yes',
src: '../core/updatestart.php'
}).css('display', 'none');
$('body').append(updateIframe)
};
autoUpdateSuccess = function () {
$('#neoCMSPrompt h4.neoCMSPromptTitle').html('Auto-Update was Successful!');
$('#neoCMSPrompt p').html('You are now updated to the latest version of neocms. Please click &ldquo;done&rdquo;.');
$('#neoCMSPromptInsert').append($('<a/>').attr({
id: 'neoCMSPromptBtn',
href: 'javascript:'
}).addClass('neoCMSPromptBtn').attr('title', 'Start using the latest neocms!').html('done').bind('click', reloadPage))
};
reloadPage = function () { reloadPage = function () {
window.location.reload(true); window.location.reload(true);
window.location.reload(true) window.location.reload(true)
+8 -32
View File
@@ -10,7 +10,6 @@ $(function () {
}); });
$(window).bind('resize', windowResize); $(window).bind('resize', windowResize);
$('#neoCMSLoginForm').bind('submit', loginSubmit); $('#neoCMSLoginForm').bind('submit', loginSubmit);
$('#forgotPass').bind('click', forgotShow);
$('#neoCMSUsername input').focus(); $('#neoCMSUsername input').focus();
$('#neoCMSHome').bind('click', function () { $('#neoCMSHome').bind('click', function () {
checkURL(fpath()) checkURL(fpath())
@@ -18,14 +17,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 () {
@@ -70,29 +69,6 @@ loginIncorr = function (message) {
$('#neoCMSEnter p.error').html(message).css('display', 'block'); $('#neoCMSEnter p.error').html(message).css('display', 'block');
$('#neoCMSLoginIframe').remove() $('#neoCMSLoginIframe').remove()
}; };
forgotShow = function () {
$('#neoCMSLoginForm').attr({action: 'core/forgotpassword.php'}).find('p.error').css('display', 'none');
$('#forgot').css({opacity: '0', display: 'block'}).fadeTo(300, 1.0, function () {
$('#forgotCancel').unbind('click').bind('click', forgotHide);
$('#neoCMSPassword').remove()
})
};
forgotHide = function () {
$('#neoCMSLoginForm').attr({action: 'core/forgotpassword.php'}).find('p.error').css('display', 'none');
$('<li/>').attr('id', 'neoCMSPassword').html('<br/>').prepend($('<label/>').html('Password')).append($('<input/>').addClass("neoCMSInput").attr({
name: "neoCMSPassword",
type: "password",
tabindex: "2"
})).append($('<p/>').addClass('error').html('Required')).insertAfter('#neoCMSUsername');
$('#forgot').css('display', 'none');
$('#neoCMSLoginForm').attr({action: 'core/login.php'});
$('#forgot p.message').html('').css({display: 'none'})
};
forgotReset = function (message) {
var c = (message.match(/domain/gi)) ? '#666' : '#fff';
$('#forgot p.message').html(message).css({color: c, display: 'block'});
$('#neoCMSLoginIframe').remove()
};
windowResize = function () { windowResize = function () {
if ($('.neoCMSIcon, .neoCMSRepIcon', ifrDoc).length) destroyIcons(); if ($('.neoCMSIcon, .neoCMSRepIcon', ifrDoc).length) destroyIcons();
if ($('#overlay').length) $('#overlay').css({width: $(window).width(), height: $(window).height()}); if ($('#overlay').length) $('#overlay').css({width: $(window).width(), height: $(window).height()});
-2041
View File
File diff suppressed because it is too large Load Diff
+1 -3
View File
@@ -51,9 +51,7 @@ getGlobals = function (path, html, files, filePath, exFolders, imagePath) {
neoCMSFilePath = filePath; neoCMSFilePath = filePath;
neoCMSImagePath = imagePath; neoCMSImagePath = imagePath;
neoCMSExFolders = exFolders; neoCMSExFolders = exFolders;
$('#neoCMSPrefsFrame').load('core/getpath.php', function () { $('#neoCMSPrefsFrame').remove(); // Is this needed?
$('#neoCMSPrefsFrame').remove()
});
initPage(); initPage();
setTimeout(function () { setTimeout(function () {
$('#neoCMSPageSrc').bind('load', initPage) $('#neoCMSPageSrc').bind('load', initPage)
-75
View File
@@ -1,75 +0,0 @@
<?php include_once('dashcheck.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>neoCMS Settings :: User Info</title>
<link href="../css/main.css" rel="stylesheet" type="text/css"/>
<link href="../css/ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../js/lib/jquery.js"></script>
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/dash.js"></script>
</head>
<body class="neoCMSAcct">
<?php include 'dashnav.php'; ?>
<div class="neoCMSDashLeft">
<div class="neoCMSDashElement">
<form id="neoCMSAcctFormSuperAdmin" class="neoCMSAcctForm neoCMSAcctDisplay"
action="../core/getsaveusers.php" method="post" target="neoCMSSaveUserFrame">
<h3></h3>
<ul>
<li class="neoCMSAcctUserLi"><label>Username </label><input class="neoCMSLocked neoCMSAcctUser"
name="neoCMSAcctUser" type="text"
value="" readonly="true"/><input
class="neoCMSLocked neoCMSAcctUser-orig" name="neoCMSAcctUser-orig" type="hidden"
value="" readonly="true"/></li>
<li class="neoCMSAcctPassLi"><label>Password </label><input class="neoCMSLocked neoCMSAcctPass"
name="neoCMSAcctPass" type="text"
value="TOTALLY SECURE, REALLY"
readonly="true"/></li>
</ul>
<ul class="neoCMSAcctMeta">
<!--<li><label>First &amp; Last Name </label><input class="neoCMSUnlocked" name="neoCMSAcctName" type="text" value="" readonly="true" /> <span class="neoCMSInstructions">For identification only</span></li>-->
<li class="neoCMSAcctEmailLi"><label>Email </label><input class="neoCMSLocked neoCMSAcctEmail"
name="neoCMSAcctEmail" type="text"
value="" readonly="true"/><input
class="neoCMSLocked neoCMSAcctEmail-orig" name="neoCMSAcctEmail-orig" type="hidden"
value="" readonly="true"/></li>
</ul>
</form>
</div>
<h4><a id="neoCMSNewUserLink" href="javascript:"
title="give someone else the ability to edit content on your site">Add New User</a> <span>Only the account owner has administrative privileges</span>
</h4>
<div id="neoCMSNewUser" class="neoCMSNewUserElement">
<form id="neoCMSAcctFormNewUser" class="neoCMSAcctForm neoCMSAcctDisplay"
action="../core/getsaveusers.php" method="post" target="neoCMSSaveUserFrame">
<h3>New User</h3>
<ul>
<li><label>Name </label><input id="neoCMSNewName" class="neoCMSUnlocked neoCMSAcctName"
name="neoCMSNewAcctName"
type="text"/><span>Please enter a name</span></li>
<li><label>Email </label><input class="neoCMSUnlocked neoCMSAcctEmail" name="neoCMSNewAcctEmail"
type="text" value=""/><span>Please enter a valid email</span></li>
<li><label>Username </label><input class="neoCMSUnlocked neoCMSAcctUser" name="neoCMSNewAcctUser"
type="text" value=""/><span>Please enter a username</span></li>
<li><label>Password </label><input id="neoCMSNewAcctPass" class="neoCMSUnlocked neoCMSAcctPass"
name="neoCMSNewAcctPass" type="password" value=""/><span>&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required.</span>
</li>
<li id="pwStrengthNew" class="neoCMSAcctPassInfo">n/a <span class="advice">&ldquo;Medium&rdquo; or &ldquo;strong&rdquo; required.</span>
</li>
<li><label>Confirm Password </label><input class="neoCMSUnlocked neoCMSAcctPassCon"
name="neoCMSNewAcctPassConfirm" type="password"
value=""/><span>Must match password</span></li>
<li class="neoCMSFormSave"><a id="neoCMSNewUserSave" class="userSave" href="javascript:"
title="save">save</a> <span class="neoCMSCancel">or <a
id="neoCMSNewUserCancel" href="javascript:">cancel</a></span></li>
</ul>
</form>
</div>
</div>
<?php include 'dashfoot.php'; ?>
-37
View File
@@ -1,37 +0,0 @@
<?php
@session_start();
if (isset($_SESSION['neoCMSSess']) && isset($_SESSION['neoCMSUserid'])) {
session_name($_SESSION['neoCMSSess']);
@session_start();
$user = &$_SESSION['neoCMSUserid'];
$admin = &$_SESSION['neoCMSIsadmin'];
$sess = &$_SESSION['neoCMSSess'];
if ($admin != 'Y') header("Location:../index.php");
} else header("Location:../login.php");
if (file_exists('../../_neoCMSupdate000.php')) {
include_once('../core/ftpstart.php');
include_once('../core/urldissect.php');
if ($ftpconn) {
$updatepath = urldissect($_SERVER['SCRIPT_NAME'], false, 3);
ftp_delete($ftpconn, $ftpwd . $updatepath . '_neoCMSupdate000.php');
ftp_close($ftpconn);
} else {
unlink('../../_neoCMSupdate000.php');
}
}
?>
-11
View File
@@ -1,11 +0,0 @@
<div class="neoCMSDashSidebar">
</div>
<div class="neoCMSDashFooter">
<p><strong>Thanks for using neoCMS&trade;</strong> <span><?php echo $_SESSION['ver']; ?></span></p>
<p>&copy; <?php echo date('Y'); ?> Neogate Technologies</p>
</div>
</div><!--end of neoCMSDashboardWrap-->
</div><!-- end of neoCMSDashScrollWrap -->
</body>
</html>
-29
View File
@@ -1,29 +0,0 @@
<div id="neoCMSTopBanner" class="neoCMSTopBanner">
<div class="neoCMSHeader">
<ul class="neoCMSTopNav">
<li id="neoCMSGoUpdate"><a class="neoCMSFBrowse" rel="#neoCMSPages" href="javascript:"
title="Choose a page to edit">Back to Editing</a></li>
</ul>
<h1><a id="neoCMSHome" href="../" title="Go to your hompage">NeoCMS</a></h1>
<ul class="neoCMSInfo">
<li id="logout"><a href="javascript:" title="logout">logout</a>&middot;</li>
</ul>
</div>
</div><!--end of neoCMSTopBanner-->
<div id="neoCMSDashScrollWrap">
<div class="neoCMSTopBuffer">
<div class="neoCMSTabNav clearfix">
<ul>
<li id="neoCMSTabPreferences"><a href="./" title="Preferences">Preferences</a></li>
<li id="neoCMSTabMyAccount"><a href="acct.php" title="User Info">User Info</a></li>
<li id="neoCMSTabFTPInfo"><a href="ftpinfo.php" title="FTP Info">FTP Info</a></li>
</ul>
</div><!--end of neoCMSTabNav-->
</div><!--end of neoCMSTopBuffer-->
<div class="neoCMSDashboardWrap clearfix">
<div class="neoCMSDashContent clearfix">
<div id="neoCMSUpdates">
</div>
-56
View File
@@ -1,56 +0,0 @@
<?php include_once('dashcheck.php');
include_once('../core/ftpvars.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>neoCMS Settings :: FTP Info</title>
<link href="../css/main.css" rel="stylesheet" type="text/css"/>
<link href="../css/ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../js/lib/jquery.js"></script>
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/dash.js"></script>
</head>
<body class="neoCMSFTP">
<?php include 'dashnav.php'; ?>
<form id="neoCMSFTPForm" class="neoCMSAcctForm neoCMSAcctDisplay neoCMSAcctEditing" action="../core/ftpcreate.php"
method="post" target="neoCMSSaveFTPFrame">
<div class="neoCMSDashLeft">
<p class="FTPtext"><strong>Please Note:</strong> FTP information is not required for most installations of
neocms. If you are encountering file permission issues, save your FTP info here and try publishing/uploading
again. neocms will write your FTP information to an unreadable file on this server.</p>
<div class="neoCMSDashElement">
<h3>Your FTP Info</h3>
<ul>
<li class="neoCMSFTPServerLi"><label>Server</label><input class="neoCMSFTPServer neoCMSUnlocked"
name="ftps" type="text"
value="<?php if ($ftps) echo $ftps; ?>"/><span>Please enter your server &ndash; no &ldquo;ftp.&rdquo;</span>
</li>
<li class="neoCMSFTPUserLi"><label>FTP Username</label><input class="neoCMSUnlocked" name="ftpu"
type="text"
value="<?php if ($ftpu) echo $ftpu; ?>"/><span>Please your FTP username</span>
</li>
<li class="neoCMSFTPPassLi"><label>FTP Password</label><input class="neoCMSUnlocked" name="ftpp"
type="password" value=""/><span>Please enter your FTP password</span>
</li>
<li class="neoCMSFTPPathLi"><label>Domain Root</label><input class="neoCMSUnlocked" name="ftpwd"
type="text"
value="<?php if ($ftpwd) echo $ftpwd; ?>"/><span>Please enter the path to your site</span>
</li>
</ul>
</div>
<h2 class="neoCMSPrefSave"><a id="neoCMSFTPBtn" href="javascript:">save</a><a id="neoCMSFTPClearBtn"
href="javascript:">Clear all FTP
info</a></h2>
</div>
</form>
<?php include 'dashfoot.php'; ?>
-79
View File
@@ -1,79 +0,0 @@
<?php include_once('dashcheck.php'); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>neoCMS Settings :: Preferences</title>
<link href="../css/main.css" rel="stylesheet" type="text/css"/>
<link href="../css/ui.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../js/lib/jquery.js"></script>
<script type="text/javascript" src="../js/main.js"></script>
<script type="text/javascript" src="../js/dash.js"></script>
</head>
<body class="neoCMSPref">
<?php include 'dashnav.php'; ?>
<form id="neoCMSPrefsForm" class="neoCMSPrefForm" action="../core/sessionConfiguration.php" method="post"
target="neoCMSSavePrefsFrame">
<div class="neoCMSDashLeft">
<div id="neoCMSPathElement" class="neoCMSDashElement">
<h3>Your neocms file path</h3>
<ul>
<li id="neoCMSPath" class="neoCMSPath"></li>
</ul>
<p>This is where your neocms files are located. This is also the path you&rsquo;ll follow to login to
your site&rsquo;s neocms account to begin editing your site content. <em><strong>Note:</strong>
neocms discovers this based on what you name your neocms folder.</em></p>
</div>
<div class="neoCMSDashElement">
<h3>HTML Editing</h3>
<label class="neoCMSPrefHtmlOn"><input id="htmltoggleon" name="htmltoggle" type="radio" value="Y"/>
on</label> <label class="neoCMSPrefHtmlOff"><input id="htmltoggleoff" name="htmltoggle" type="radio"
value="N"/> off</label>
<p>Set this preference to &ldquo;on&rdquo; if you want users to be able to directly edit the HTML
markup, or &ldquo;off&rdquo; if you do not want users to be able to edit the HTML.</p>
</div>
<div class="neoCMSDashElement">
<h3>Exclude Folders</h3>
<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,
functions/important&rdquo;</em></p>
<ul>
<li><label>Folders </label><input id="neoCMSExFolders" class="neoCMSUnlocked" name="exFolders"
type="text" value=""/></li>
</ul>
</div>
<div class="neoCMSDashElement">
<h3>File Uploads</h3>
<label class="neoCMSPrefHtmlOn"><input id="filetoggleon" name="filetoggle" type="radio" value="Y"/>
on</label> <label class="neoCMSPrefHtmlOff"><input id="filetoggleoff" name="filetoggle" type="radio"
value="N"/> off</label>
<p>Set this preference to &ldquo;on&rdquo; if you want users to be able to upload files, or &ldquo;off&rdquo;
if you do not want users to upload files. There is a 100MB limit on all uploads.</p>
<ul>
<li class="neoCMSFilePath">
<p>To specify a file folder, enter the relative path here. Leave it blank if you want neocms to
auto-discover folders.</p>
<label>Default File Path </label><input id="neoCMSFilePath" class="neoCMSUnlocked"
name="filePath" type="text" value=""/>
</li>
</ul>
</div>
<div class="neoCMSDashElement">
<h3>Image Uploads</h3>
<p>To specify an image folder, enter the relative path here. Leave it blank if you want neocms to
auto-discover folders.</p>
<ul>
<li><label>Default Image Path </label><input id="neoCMSImagePath" class="neoCMSUnlocked"
name="imagePath" type="text" value=""/></li>
</ul>
</div>
<h2 class="neoCMSPrefSave"><a id="neoCMSPrefBtn" href="javascript:">save</a></h2>
</div>
</form>
<?php include 'dashfoot.php'; ?>