From 3b1bd49621cb48fd134cc9667d6ed7da369c461f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xe=CC=81fir=20Destiny?= Date: Wed, 2 Oct 2013 14:47:25 +0200 Subject: [PATCH] Lib Mal Foutu D: --- {lib/Crypt => Crypt}/AES.php | 0 {lib/Crypt => Crypt}/Blowfish.php | 0 {lib/Crypt => Crypt}/DES.php | 0 {lib/Crypt => Crypt}/Hash.php | 0 {lib/Crypt => Crypt}/RC4.php | 0 {lib/Crypt => Crypt}/RSA.php | 0 {lib/Crypt => Crypt}/Random.php | 0 {lib/Crypt => Crypt}/Rijndael.php | 0 {lib/Crypt => Crypt}/TripleDES.php | 0 {lib/Crypt => Crypt}/Twofish.php | 0 {lib/File => File}/ANSI.php | 0 {lib/File => File}/ASN1.php | 0 {lib/File => File}/X509.php | 0 {lib/Math => Math}/BigInteger.php | 0 {lib/Net => Net}/SCP.php | 0 {lib/Net => Net}/SFTP.php | 0 {lib/Net => Net}/SFTP/Stream.php | 0 {lib/Net => Net}/SSH1.php | 0 {lib/Net => Net}/SSH2.php | 0 ajax.php | 24 +++++++++++------------- js/app.js | 3 +-- lib/openssl.cnf => openssl.cnf | 0 22 files changed, 12 insertions(+), 15 deletions(-) rename {lib/Crypt => Crypt}/AES.php (100%) rename {lib/Crypt => Crypt}/Blowfish.php (100%) rename {lib/Crypt => Crypt}/DES.php (100%) rename {lib/Crypt => Crypt}/Hash.php (100%) rename {lib/Crypt => Crypt}/RC4.php (100%) rename {lib/Crypt => Crypt}/RSA.php (100%) rename {lib/Crypt => Crypt}/Random.php (100%) rename {lib/Crypt => Crypt}/Rijndael.php (100%) rename {lib/Crypt => Crypt}/TripleDES.php (100%) rename {lib/Crypt => Crypt}/Twofish.php (100%) rename {lib/File => File}/ANSI.php (100%) rename {lib/File => File}/ASN1.php (100%) rename {lib/File => File}/X509.php (100%) rename {lib/Math => Math}/BigInteger.php (100%) rename {lib/Net => Net}/SCP.php (100%) rename {lib/Net => Net}/SFTP.php (100%) rename {lib/Net => Net}/SFTP/Stream.php (100%) rename {lib/Net => Net}/SSH1.php (100%) rename {lib/Net => Net}/SSH2.php (100%) rename lib/openssl.cnf => openssl.cnf (100%) diff --git a/lib/Crypt/AES.php b/Crypt/AES.php similarity index 100% rename from lib/Crypt/AES.php rename to Crypt/AES.php diff --git a/lib/Crypt/Blowfish.php b/Crypt/Blowfish.php similarity index 100% rename from lib/Crypt/Blowfish.php rename to Crypt/Blowfish.php diff --git a/lib/Crypt/DES.php b/Crypt/DES.php similarity index 100% rename from lib/Crypt/DES.php rename to Crypt/DES.php diff --git a/lib/Crypt/Hash.php b/Crypt/Hash.php similarity index 100% rename from lib/Crypt/Hash.php rename to Crypt/Hash.php diff --git a/lib/Crypt/RC4.php b/Crypt/RC4.php similarity index 100% rename from lib/Crypt/RC4.php rename to Crypt/RC4.php diff --git a/lib/Crypt/RSA.php b/Crypt/RSA.php similarity index 100% rename from lib/Crypt/RSA.php rename to Crypt/RSA.php diff --git a/lib/Crypt/Random.php b/Crypt/Random.php similarity index 100% rename from lib/Crypt/Random.php rename to Crypt/Random.php diff --git a/lib/Crypt/Rijndael.php b/Crypt/Rijndael.php similarity index 100% rename from lib/Crypt/Rijndael.php rename to Crypt/Rijndael.php diff --git a/lib/Crypt/TripleDES.php b/Crypt/TripleDES.php similarity index 100% rename from lib/Crypt/TripleDES.php rename to Crypt/TripleDES.php diff --git a/lib/Crypt/Twofish.php b/Crypt/Twofish.php similarity index 100% rename from lib/Crypt/Twofish.php rename to Crypt/Twofish.php diff --git a/lib/File/ANSI.php b/File/ANSI.php similarity index 100% rename from lib/File/ANSI.php rename to File/ANSI.php diff --git a/lib/File/ASN1.php b/File/ASN1.php similarity index 100% rename from lib/File/ASN1.php rename to File/ASN1.php diff --git a/lib/File/X509.php b/File/X509.php similarity index 100% rename from lib/File/X509.php rename to File/X509.php diff --git a/lib/Math/BigInteger.php b/Math/BigInteger.php similarity index 100% rename from lib/Math/BigInteger.php rename to Math/BigInteger.php diff --git a/lib/Net/SCP.php b/Net/SCP.php similarity index 100% rename from lib/Net/SCP.php rename to Net/SCP.php diff --git a/lib/Net/SFTP.php b/Net/SFTP.php similarity index 100% rename from lib/Net/SFTP.php rename to Net/SFTP.php diff --git a/lib/Net/SFTP/Stream.php b/Net/SFTP/Stream.php similarity index 100% rename from lib/Net/SFTP/Stream.php rename to Net/SFTP/Stream.php diff --git a/lib/Net/SSH1.php b/Net/SSH1.php similarity index 100% rename from lib/Net/SSH1.php rename to Net/SSH1.php diff --git a/lib/Net/SSH2.php b/Net/SSH2.php similarity index 100% rename from lib/Net/SSH2.php rename to Net/SSH2.php diff --git a/ajax.php b/ajax.php index 08b5ea4..64e1d64 100644 --- a/ajax.php +++ b/ajax.php @@ -1,6 +1,7 @@ login($config['user'], $config['pass'])) { + if ($_POST['action'] == 'status') { + echo $ssh->exec('cd ' . $config['path'] . ' && git fetch && git status'); + } else if ($_POST['action'] == 'push') { + $message = empty($_POST['message']) ? 'FTP' : $_POST['message']; + //echo $ssh->exec('cd ' . $config['path'] . ' && git add -A && git commit -m "' . $message . '" && git push'); + } else if ($_POST['action'] == 'pull') { + //echo $ssh->exec('cd ' . $config['path'] . ' && git pull'); + } } - - $pre = stream_get_contents($output); } - -echo json_encode(array('pre' => $pre)); diff --git a/js/app.js b/js/app.js index 1159732..67a0152 100644 --- a/js/app.js +++ b/js/app.js @@ -14,8 +14,7 @@ function callRequest(section) { xhr.send('action=status§ion=' + section); xhr.onreadystatechange = function() { if (xhr.readyState === 4 && (xhr.status === 200 || xhr.status === 0)) { - var data = JSON.parse(xhr.responseText); - pre.innerHTML = data['pre']; + pre.innerHTML = xhr.responseText; } }; } diff --git a/lib/openssl.cnf b/openssl.cnf similarity index 100% rename from lib/openssl.cnf rename to openssl.cnf