Compare commits
13 Commits
3100444a26
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61d50fa9b2 | ||
|
|
744d037a02 | ||
|
|
b25b26fde1 | ||
|
|
7191e6ea8b | ||
|
|
5ced0e3a4b | ||
|
|
09117a248d | ||
|
|
65b87afefa | ||
|
|
4b23e9ef8b | ||
|
|
67ef31a4d0 | ||
|
|
2732371d5c | ||
|
|
0de96df03c | ||
|
|
f4ea340a27 | ||
|
|
49e1bcf0d3 |
112
.gitignore
vendored
Normal file
112
.gitignore
vendored
Normal file
@@ -0,0 +1,112 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
#.env
|
||||||
|
#.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
#dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
|
||||||
|
|
||||||
|
.DS_Store
|
||||||
|
._.DS_Store
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
42
.htaccess
Normal file
42
.htaccess
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<ifModule mod_headers.c>
|
||||||
|
# Prevent clickjacking (forbids framing by third-party sites)
|
||||||
|
Header set X-Frame-Options sameorigin
|
||||||
|
|
||||||
|
# Prevent content sniffing (MIME sniffing)
|
||||||
|
Header set X-Content-Type-Options nosniff
|
||||||
|
|
||||||
|
# Attempt to enable XSS filters in browsers, if available, and block reflected XSS
|
||||||
|
Header set X-XSS-Protection "1; mode=block"
|
||||||
|
|
||||||
|
# Cache media files for a month
|
||||||
|
<FilesMatch "\.(js|css|jpg|jpeg|png|svg|webp|gif|ico|ogg|mp4|webm)$">
|
||||||
|
Header set Cache-Control max-age=2629800
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# Remove response headers that provide no value but leak information
|
||||||
|
Header unset X-Powered-By
|
||||||
|
|
||||||
|
# Disable "ETag" headers so that browsers rely on the "Cache-Control" and "Expires" headers
|
||||||
|
Header unset ETag
|
||||||
|
|
||||||
|
</ifModule>
|
||||||
|
<IfModule mod_autoindex.c>
|
||||||
|
# Turn off directory listings for folders without default documents
|
||||||
|
Options -Indexes
|
||||||
|
</IfModule>
|
||||||
|
<IfModule mod_negotiation.c>
|
||||||
|
# Disable 'MultiViews' implicit filename pattern matches
|
||||||
|
Options -MultiViews
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
RedirectMatch 403 /.git/.*$
|
||||||
|
|
||||||
|
<Files "README.md">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
<Files ".gitignore">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
|
||||||
|
|
||||||
4
core/js/main.js
Normal file
4
core/js/main.js
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
(function(){
|
||||||
|
|
||||||
|
|
||||||
|
})();
|
||||||
26
core/js/pages/_temp.js
Normal file
26
core/js/pages/_temp.js
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
define([], function() {
|
||||||
|
|
||||||
|
|
||||||
|
function init(myapp,afsconfig){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
return init;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
(function(factory) {
|
||||||
|
var root = typeof self == 'object' && self.self === self && self || typeof global == 'object' && global.global === global && global;
|
||||||
|
if (typeof define === 'function' && define.amd) {
|
||||||
|
define([],function() {return factory(); });
|
||||||
|
} else if (typeof exports !== 'undefined') {
|
||||||
|
module.exports = factory();
|
||||||
|
} else {
|
||||||
|
root.AFSPayments = factory();// browser global.
|
||||||
|
}
|
||||||
|
})(function() {
|
||||||
|
return {}
|
||||||
|
});// !!!END!!!
|
||||||
17
core/js/pages/index.js
Normal file
17
core/js/pages/index.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
define([], function() {
|
||||||
|
function init(app){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return init;
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
8
core/php/clientincludes.php
Normal file
8
core/php/clientincludes.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
91
core/php/indexcore.php
Normal file
91
core/php/indexcore.php
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// session_start();
|
||||||
|
/***
|
||||||
|
* The main component by which html pages are served
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
function AFSIndexCoreTemplate($title,
|
||||||
|
$page,
|
||||||
|
$css,
|
||||||
|
$mypage,
|
||||||
|
$dir,
|
||||||
|
$show_header = true,
|
||||||
|
$show_footer = true,
|
||||||
|
$javascript = "",
|
||||||
|
$isAdmin = false,
|
||||||
|
$clientcount=1,
|
||||||
|
$pageIncludes="",
|
||||||
|
$top_admin=true){
|
||||||
|
|
||||||
|
$GLOBALS["MYPATH"] = $dir;
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title><?php echo $title ?></title>
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="icon" type="image/x-icon" href="<?php echo $dir ?>assets/favicon.ico">
|
||||||
|
<link rel="stylesheet" href="https://unpkg.com/boxicons@2.0.7/css/boxicons.min.css">
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css">
|
||||||
|
<link rel="stylesheet" href="/portal/admin/core/api/styles/tabler/tabler.min.css" />
|
||||||
|
<link rel="stylesheet" href="/core/styles/styles.css">
|
||||||
|
<link rel="stylesheet" href="/core/styles/global.css">
|
||||||
|
<link rel="stylesheet" href="<?php echo $css ?>">
|
||||||
|
|
||||||
|
<script src="https://code.jquery.com/jquery-3.6.3.min.js" integrity="sha256-pvPw+upLPUjgMXY0G+8O0xUf+/Im1MZjXxxgOcBQBXU=" crossorigin="anonymous"></script>
|
||||||
|
<script src="/portal/admin/core/api/js/libs/analytics_0.8.14.min.js"></script>
|
||||||
|
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
|
||||||
|
<script src="https://api.appfactory.studio/sdk/js/afssdk-dev.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<script src="/core/js/functions.js"></script>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
if($pageIncludes!=""){ require_once $pageIncludes; }
|
||||||
|
?>
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<?php
|
||||||
|
// Header
|
||||||
|
if($show_header){
|
||||||
|
?>
|
||||||
|
<link rel="stylesheet" href="<?php echo $dir ?>pages/_components/header/header.css">
|
||||||
|
<?php include_once($dir . "pages/_components/header/header.php")?>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<!-- Contents -->
|
||||||
|
<script>window.mypage = "<?php echo $mypage ?>"; window.mypath = "<?php echo $dir ?>"</script>
|
||||||
|
<?php include_once($page); ?>
|
||||||
|
|
||||||
|
<?php
|
||||||
|
// Footer
|
||||||
|
if($show_footer){
|
||||||
|
?>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="<?php echo $dir ?>pages/_components/footer/footer.css">
|
||||||
|
<?php include_once $dir . "pages/_components/footer/footer.php" ?>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<script data-main="/core/js/main" src="/portal/admin/core/api/js/libs/require.js"></script>
|
||||||
|
<body>
|
||||||
|
</html>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
8
core/php/request.php
Normal file
8
core/php/request.php
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?php
|
||||||
|
require dirname( __DIR__, 2 ) . "/portal/admin/core/api/php/includes/init.php";
|
||||||
|
require dirname( __DIR__, 2 ) . "/portal/admin/core/api/php/includes/libs/dompdf/vendor/autoload.php";
|
||||||
|
require dirname( __DIR__, 2 ) . "/portal/admin/core/api/php/includes/functions.php";
|
||||||
|
|
||||||
|
require dirname( __DIR__, 2 ) . "/core/php/callrequest.php";
|
||||||
|
|
||||||
|
header_remove("X-Powered-By");
|
||||||
4
core/styles/global.css
Normal file
4
core/styles/global.css
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,8 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
// require_once 'portal/admin/core/api/php/includes/indexcore.php';
|
|
||||||
require_once __DIR__ . '/core/php/indexcore.php';
|
require_once __DIR__ . '/core/php/indexcore.php';
|
||||||
header_remove("X-Powered-By");
|
header_remove("X-Powered-By");
|
||||||
AFSIndexCoreTemplate("Appfactory Studio",
|
AFSIndexCoreTemplate("",
|
||||||
"pages/index/index_include.php",
|
"pages/index/index_include.php",
|
||||||
"pages/index/index_include.css",
|
"pages/index/index_include.css",
|
||||||
"index",
|
"index",
|
||||||
|
|||||||
2
pages/_components/footer/footer.css
Normal file
2
pages/_components/footer/footer.css
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
|
||||||
|
|
||||||
0
pages/_components/footer/footer.php
Normal file
0
pages/_components/footer/footer.php
Normal file
0
pages/_components/header/header.php
Normal file
0
pages/_components/header/header.php
Normal file
14
pages/_template/index.php
Normal file
14
pages/_template/index.php
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
<?php
|
||||||
|
// require_once dirname( __DIR__, 2 ) . '/portal/admin/core/api/php/includes/indexcore.php';
|
||||||
|
// require_once 'portal/admin/core/api/php/includes/indexcore.php';
|
||||||
|
require_once dirname(__DIR__, 2) . '/core/php/indexcore.php';
|
||||||
|
header_remove("X-Powered-By");
|
||||||
|
AFSIndexCoreTemplate("Appfactory Studio - Events",
|
||||||
|
"events_content.html",
|
||||||
|
"events.css",
|
||||||
|
"events",
|
||||||
|
"../../",
|
||||||
|
true,
|
||||||
|
true,
|
||||||
|
"pages/events.js");
|
||||||
|
?>
|
||||||
8
pages/_template/media.css
Normal file
8
pages/_template/media.css
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
|
||||||
|
.spacer {
|
||||||
|
width: 100%;
|
||||||
|
height:325px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
7
pages/_template/media.html
Normal file
7
pages/_template/media.html
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<div class="spacer"></div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
3
pages/descriptor.json
Normal file
3
pages/descriptor.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"custom": false
|
||||||
|
}
|
||||||
0
pages/index/index_include.css
Normal file
0
pages/index/index_include.css
Normal file
7
pages/index/index_include.php
Normal file
7
pages/index/index_include.php
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h3>Under Construction</h3>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
# portal_v3
|
|
||||||
|
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
# RewriteCond %{REQUEST_FILENAME} !-d
|
# RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
# RewriteRule . /portal/admin/index.php [L]
|
# RewriteRule . /portal/admin/index.php [L]
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,11 @@
|
|||||||
let gen_nam = "d"+self.app.utils.randomGenerator(12) + "." + file.name.split('.').pop();
|
let gen_nam = "d"+self.app.utils.randomGenerator(12) + "." + file.name.split('.').pop();
|
||||||
let content_type = self.getMimiType(file.name);
|
let content_type = self.getMimiType(file.name);
|
||||||
// let urlparams = `/portal/admin/core/api/php/request.php?getdoc=true&ref=${ref_num}&name=${gen_nam}&content_type=${content_type}`;
|
// let urlparams = `/portal/admin/core/api/php/request.php?getdoc=true&ref=${ref_num}&name=${gen_nam}&content_type=${content_type}`;
|
||||||
let urlparams = `/portal/api/data/downloads?getdoc=true&ref=${ref_num}&name=${gen_nam}&content_type=${content_type}`;
|
let urlparams = `?getdoc=true&ref=${ref_num}&name=${gen_nam}&content_type=${content_type}`;
|
||||||
let doc_url = self.app.extra.config.managed_domain.Address + urlparams;
|
let doc_url = `https://api.${self.app.extra.config.managed_domain.Domain}/v1/data/downloads${urlparams}`;
|
||||||
|
let doc_url2 = `${self.app.extra.config.managed_domain.Address2}/portal/admin/core/api/php/request.php${urlparams}`;
|
||||||
|
// https://www.appfactory.studio/portal/api/data/downloads?getdoc=true&ref=doc888072803282&name=djnUwMIfNWmiK.png&content_type=image/png
|
||||||
|
// https://api.appfactory.studio/v1/data/downloads?getdoc=true&ref=doc888072803282&name=djnUwMIfNWmiK.png&content_type=image/png
|
||||||
|
|
||||||
let fileobj = self._NewFileObject(
|
let fileobj = self._NewFileObject(
|
||||||
file.name,
|
file.name,
|
||||||
@@ -40,8 +43,9 @@
|
|||||||
file.size,
|
file.size,
|
||||||
file.type,
|
file.type,
|
||||||
new Date().toLocaleString(),
|
new Date().toLocaleString(),
|
||||||
"/mnt/"+self.app.extra.config.managed_domain.SystemUser+"/modules/documents",
|
"/mnt/node1/"+self.app.extra.config.managed_domain.SystemUser+"/modules/documents",
|
||||||
doc_url,
|
doc_url,
|
||||||
|
doc_url2,
|
||||||
ref_num,
|
ref_num,
|
||||||
catogery,
|
catogery,
|
||||||
jsondata);
|
jsondata);
|
||||||
@@ -81,6 +85,8 @@
|
|||||||
req.open("POST", requesturl);
|
req.open("POST", requesturl);
|
||||||
req.send(formData);
|
req.send(formData);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -88,7 +94,7 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
_NewFileObject: function(on,gn,fs,ft,ud,loc,url,ref,cat,jsondata){
|
_NewFileObject: function(on,gn,fs,ft,ud,loc,url,url2,ref,cat,jsondata){
|
||||||
return {
|
return {
|
||||||
"original_name": on,
|
"original_name": on,
|
||||||
"generated_name": gn,
|
"generated_name": gn,
|
||||||
@@ -97,6 +103,7 @@
|
|||||||
"upload_date": ud,
|
"upload_date": ud,
|
||||||
"directory": loc,
|
"directory": loc,
|
||||||
"url": url,
|
"url": url,
|
||||||
|
"url2": url2,
|
||||||
"reference_num": ref,
|
"reference_num": ref,
|
||||||
"catagory": cat,
|
"catagory": cat,
|
||||||
"json": jsondata
|
"json": jsondata
|
||||||
@@ -220,6 +227,17 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
|
getDocumentUrl(document,managed_domain){
|
||||||
|
let url = document.url;
|
||||||
|
if(window.location.href.includes(managed_domain.Domain)){
|
||||||
|
url = document.url;
|
||||||
|
}else{
|
||||||
|
url = document.url2;
|
||||||
|
}
|
||||||
|
|
||||||
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1542,7 +1542,19 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
// rrrrr
|
// rrrrr
|
||||||
function SaveMailHandlers(category,item_ref,handlers,app,cb){
|
function SaveMailHandlers(category,item_ref,handlers,app,cb,subscribers){
|
||||||
|
for(let prop in handlers){
|
||||||
|
let exist = false;
|
||||||
|
for (let n = 0; n < subscribers.length; n++) {
|
||||||
|
const element = subscribers[n];
|
||||||
|
if(element.reference_num==handlers[prop].reference_num){
|
||||||
|
exist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(exist) continue;
|
||||||
|
subscribers.push(handlers[prop]);
|
||||||
|
}
|
||||||
$.post(app.extra.url,{
|
$.post(app.extra.url,{
|
||||||
save_mail_handlers: true,
|
save_mail_handlers: true,
|
||||||
handlers: JSON.stringify(handlers),
|
handlers: JSON.stringify(handlers),
|
||||||
@@ -1550,7 +1562,7 @@
|
|||||||
item_reference_num: item_ref
|
item_reference_num: item_ref
|
||||||
},function(resp){
|
},function(resp){
|
||||||
resp = JSON.parse(resp);
|
resp = JSON.parse(resp);
|
||||||
if(cb!=undefined) cb(resp);
|
if(cb!=undefined) cb(resp,subscribers);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -1651,6 +1663,7 @@
|
|||||||
function GetThisDomainMemberSettings(tmpConfig,app){
|
function GetThisDomainMemberSettings(tmpConfig,app){
|
||||||
let _domain = null;
|
let _domain = null;
|
||||||
if(app.extra.root==undefined) app.extra.root = {};
|
if(app.extra.root==undefined) app.extra.root = {};
|
||||||
|
console.log(tmpConfig.root.member.json_data)
|
||||||
for (let i = 0; i < tmpConfig.root.member.json_data.domains.length; i++) {
|
for (let i = 0; i < tmpConfig.root.member.json_data.domains.length; i++) {
|
||||||
const element = tmpConfig.root.member.json_data.domains[i];
|
const element = tmpConfig.root.member.json_data.domains[i];
|
||||||
if(element.domain_name==app.extra.config.managed_domain.Domain){
|
if(element.domain_name==app.extra.config.managed_domain.Domain){
|
||||||
@@ -2421,31 +2434,60 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Transforms the mail_handler from a database object to a standered object
|
||||||
|
* @param {object} mail_handlers
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
function StructureEmailHandlers(mail_handlers){
|
function StructureEmailHandlers(mail_handlers){
|
||||||
|
|
||||||
|
// check to see if mail_handlers is already formated
|
||||||
|
if(mail_handlers.length > 0){
|
||||||
|
if(mail_handlers[0].json==undefined){
|
||||||
|
return mail_handlers;
|
||||||
|
}
|
||||||
|
}
|
||||||
var tmp_mail_handlers = {};
|
var tmp_mail_handlers = {};
|
||||||
|
let container = [];
|
||||||
for (let n = 0; n < mail_handlers.length; n++) {
|
for (let n = 0; n < mail_handlers.length; n++) {
|
||||||
const element = mail_handlers[n];
|
const element = mail_handlers[n];
|
||||||
tmp_mail_handlers[element.json.reference_num] = element.json;
|
tmp_mail_handlers[element.json.reference_num] = element.json;
|
||||||
tmp_mail_handlers[element.json.reference_num]["item_reference_num"] = element.item_reference_num;
|
tmp_mail_handlers[element.json.reference_num]["item_reference_num"] = element.item_reference_num;
|
||||||
|
container.push(tmp_mail_handlers[element.json.reference_num]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return tmp_mail_handlers;
|
return container;
|
||||||
}
|
}
|
||||||
function SortEmailHandlersIntoItem(item_handlers,item){
|
|
||||||
var mail_handler = {};
|
|
||||||
|
|
||||||
for(element in item_handlers){
|
function SortEmailHandlersIntoItem(item_handlers,reference_num){
|
||||||
if(item_handlers[element]["item_reference_num"] == item.json.reference_num){
|
var mail_handler = {};
|
||||||
let refnum = item_handlers[element].reference_num;
|
for (let i = 0; i < item_handlers.length; i++) {
|
||||||
mail_handler[refnum] = item_handlers[element];
|
// console.log(item_handlers[i])
|
||||||
|
if(item_handlers[i]["item_reference_num"]=="") continue;
|
||||||
|
if(item_handlers[i]["item_reference_num"] == reference_num){
|
||||||
|
let refnum = item_handlers[i]["reference_num"];
|
||||||
|
mail_handler[refnum] = item_handlers[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return mail_handler;
|
return mail_handler;
|
||||||
}
|
}
|
||||||
function InitializeEmailCreatorDashboard2(handlers,cbMain,cbSave,cbExit,app,append_container){
|
function InitializeEmailCreatorDashboard2(handlers,cbMain,cbSave,cbExit,app,append_container,item_reference_num=null){
|
||||||
let handlersInstance = new EmailHandlerManager(handlers,app);
|
let handlersInstance = new EmailHandlerManager(handlers,app);
|
||||||
let emailContainer = null;
|
let emailContainer = null;
|
||||||
// console.log(handlersInstance.handlers);
|
// console.log(handlersInstance.handlers);
|
||||||
|
|
||||||
|
function MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,cb){
|
||||||
|
if(emailContainer==null){
|
||||||
|
cbSave(null, handlersInstance.handlers);
|
||||||
|
}else{
|
||||||
|
|
||||||
|
handlersInstance.handlers[handlersInstance.current.ref_group][emailContainer.email.reference_num] = emailContainer.email;
|
||||||
|
handlersInstance.handlers[handlersInstance.current.ref_group][emailContainer.email.reference_num].item_reference_num = item_reference_num;
|
||||||
|
cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
function _init_category(app){
|
function _init_category(app){
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
function setupListHandlers(app){
|
function setupListHandlers(app){
|
||||||
@@ -2586,16 +2628,17 @@
|
|||||||
let reference_num = "v"+app.utils.randomGenerator(12).toLowerCase();
|
let reference_num = "v"+app.utils.randomGenerator(12).toLowerCase();
|
||||||
handler.reference_num = reference_num;
|
handler.reference_num = reference_num;
|
||||||
handler.name = value;
|
handler.name = value;
|
||||||
// 77777
|
handlersInstance.handlers[handlersInstance.current.ref_group].item_reference_num = item_reference_num;
|
||||||
let ref_num = handlersInstance.current.ref_group;
|
// 77777 rrrrr
|
||||||
handlersInstance.addHandler(reference_num, handler);
|
handlersInstance.addHandler(reference_num, handler);
|
||||||
setupListHandlers(app);
|
setupListHandlers(app);
|
||||||
$("#new_template_name_input").val("");
|
$("#new_template_name_input").val("");
|
||||||
cbSave(handler, handlersInstance.handlers);
|
// TODO_1: EmailBuilder - Because emailContainer do not save
|
||||||
|
MySave(cbSave,null,handlersInstance,item_reference_num,app,function(){});
|
||||||
RemoveModal(modal);
|
RemoveModal(modal);
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
|
|
||||||
console.log(handler);
|
// console.log(handler);
|
||||||
|
|
||||||
// console.log(handlersInstance.current);
|
// console.log(handlersInstance.current);
|
||||||
|
|
||||||
@@ -2689,8 +2732,10 @@
|
|||||||
var optionSelected = $("option:selected", this);
|
var optionSelected = $("option:selected", this);
|
||||||
var valueSelected = this.value;
|
var valueSelected = this.value;
|
||||||
emailContainer.email.from = valueSelected;
|
emailContainer.email.from = valueSelected;
|
||||||
handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
// TODO_3: EmailBuilder - reference by first objectb because it should only be one object
|
||||||
cbSave(emailContainer.email, handlersInstance.handlers);
|
// handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
||||||
|
// cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){});
|
||||||
});
|
});
|
||||||
$("#delivery_from_email_select").val(emailContainer.email.from);
|
$("#delivery_from_email_select").val(emailContainer.email.from);
|
||||||
|
|
||||||
@@ -2726,7 +2771,8 @@
|
|||||||
$("#emailbuilder_active_checkbox_id").prop('checked', emailContainer.email.active);
|
$("#emailbuilder_active_checkbox_id").prop('checked', emailContainer.email.active);
|
||||||
$("#emailbuilder_active_checkbox_id").on("change",function(e){
|
$("#emailbuilder_active_checkbox_id").on("change",function(e){
|
||||||
saveCheckboxActive(app);
|
saveCheckboxActive(app);
|
||||||
cbSave(emailContainer.email,handlersInstance.handlers);
|
// cbSave(emailContainer.email,handlersInstance.handlers);
|
||||||
|
MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){});
|
||||||
});
|
});
|
||||||
|
|
||||||
// $("#delivery_from_email_select").on("change",function(e){
|
// $("#delivery_from_email_select").on("change",function(e){
|
||||||
@@ -2815,23 +2861,21 @@
|
|||||||
emailContainer.email.variables.schema[n].value = $(editor.getContent()).text().trim();
|
emailContainer.email.variables.schema[n].value = $(editor.getContent()).text().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(emailContainer.email.variables.schema);
|
// console.log(emailContainer.email.variables.schema);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let ref_num = handlersInstance.current.ref_group;
|
let ref_num = handlersInstance.current.ref_group;
|
||||||
console.log(ref_num);
|
// console.log(ref_num);
|
||||||
emailContainer.email.name = $("#emailbuilder_name_input_id").val().trim();
|
emailContainer.email.name = $("#emailbuilder_name_input_id").val().trim();
|
||||||
handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email);
|
handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email);
|
||||||
|
|
||||||
|
|
||||||
console.log(emailContainer.email);
|
|
||||||
console.log(handlersInstance.handlers);
|
|
||||||
saveCheckboxAlert(app);
|
saveCheckboxAlert(app);
|
||||||
saveCheckboxActive(app);
|
saveCheckboxActive(app);
|
||||||
$("#save_badge_indicator_id").css("display","none");
|
$("#save_badge_indicator_id").css("display","none");
|
||||||
cbSave(emailContainer.email, handlersInstance.handlers);
|
// cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){});
|
||||||
});
|
});
|
||||||
$("#options_delete_emailbuilder_id").on("click",function(e){
|
$("#options_delete_emailbuilder_id").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -2843,12 +2887,10 @@
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
MySpinnerOn(function(MySpinnerOff){
|
MySpinnerOn(function(MySpinnerOff){
|
||||||
console.log(handlersInstance);
|
|
||||||
console.log(handlersInstance.current.ref_group);
|
|
||||||
console.log(emailContainer.email.reference_num);
|
|
||||||
|
|
||||||
delete handlersInstance.handlers[handlersInstance.current.ref_group]["handlers"][emailContainer.email.reference_num];
|
delete handlersInstance.handlers[handlersInstance.current.ref_group]["handlers"][emailContainer.email.reference_num];
|
||||||
cbSave(emailContainer.email, handlersInstance.handlers);
|
// cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
MySave(cbSave,emailContainer, handlersInstance,item_reference_num,app,function(){});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
setTimeout(() => { MySpinnerOff(); },1000);
|
setTimeout(() => { MySpinnerOff(); },1000);
|
||||||
RemoveModal(modal);
|
RemoveModal(modal);
|
||||||
@@ -2905,8 +2947,9 @@
|
|||||||
emailContainer.email.variables.schema[index]["value"] = $(editor.getContent()).text().trim();
|
emailContainer.email.variables.schema[index]["value"] = $(editor.getContent()).text().trim();
|
||||||
}
|
}
|
||||||
|
|
||||||
handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
// handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
||||||
cbSave(emailContainer.email, handlersInstance.handlers);
|
// cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
MySave(cbSave,emailContainer, handlersInstance,item_reference_num,app,function(){});
|
||||||
$("#save_badge_indicator_id").css("display","none");
|
$("#save_badge_indicator_id").css("display","none");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3051,10 +3094,11 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
let sendemail = structuredClone(emailContainer.email);
|
let sendemail = structuredClone(emailContainer.email);
|
||||||
sendemail.integration = integration;
|
sendemail.integration = integration;
|
||||||
sendemail.emails = [to];
|
sendemail.emails = [to];
|
||||||
sendemail.variables.schema = [sendemail.variables.schema];
|
sendemail.variables.schema = sendemail.variables.schema;
|
||||||
sendemail.variables.client = [];//[submission_variables];
|
sendemail.variables.client = [];//[submission_variables];
|
||||||
sendemail.variables.system = [app.extra.extras.SetupSystemVariables(app,emailContainer.email)];
|
sendemail.variables.system = [app.extra.extras.SetupSystemVariables(app,emailContainer.email)];
|
||||||
console.log(sendemail);
|
console.log(sendemail);
|
||||||
@@ -3292,11 +3336,14 @@
|
|||||||
emailContainer.email.body_mjml_html = decodedString; //editor.getHtml();
|
emailContainer.email.body_mjml_html = decodedString; //editor.getHtml();
|
||||||
|
|
||||||
// 77777
|
// 77777
|
||||||
// console.log(emailContainer.email);
|
|
||||||
// console.log({html: decodedString});
|
|
||||||
handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email);
|
// handlersInstance.addHandler(emailContainer.email.reference_num, emailContainer.email);
|
||||||
handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
// handlersInstance.handlers[emailContainer.email.reference_num] = emailContainer.email;
|
||||||
cbSave(emailContainer.email, handlersInstance.handlers);
|
// cbSave(emailContainer.email, handlersInstance.handlers);
|
||||||
|
console.log(emailContainer);
|
||||||
|
console.log(handlersInstance);
|
||||||
|
MySave(cbSave,emailContainer,handlersInstance,item_reference_num,app,function(){});
|
||||||
});
|
});
|
||||||
},500);
|
},500);
|
||||||
|
|
||||||
|
|||||||
@@ -87,15 +87,15 @@ class AFSSurveyJSForm {
|
|||||||
// TODO_1: go through all the handlers, this only selects the firs one
|
// TODO_1: go through all the handlers, this only selects the firs one
|
||||||
let mail_handler_prop = "";
|
let mail_handler_prop = "";
|
||||||
|
|
||||||
for(let prop1 in mail_handlers){
|
// for(let prop1 in mail_handlers){
|
||||||
for(let prop in mail_handlers[prop1].handlers){
|
// for(let prop in mail_handlers[prop1].handlers){
|
||||||
mail_handler_prop = prop;
|
// mail_handler_prop = prop;
|
||||||
break; // this does not need to break
|
// break; // this does not need to break
|
||||||
}
|
// }
|
||||||
mail_handlers = mail_handlers[prop1].handlers[mail_handler_prop];
|
// mail_handlers = mail_handlers[prop1].handlers[mail_handler_prop];
|
||||||
break; // only one should have been sent, so breaking is not required
|
// break; // only one should have been sent, so breaking is not required
|
||||||
}
|
// }
|
||||||
console.log(mail_handlers);
|
// console.log(mail_handlers);
|
||||||
|
|
||||||
|
|
||||||
self.survey.onComplete.add(function(survey,options){
|
self.survey.onComplete.add(function(survey,options){
|
||||||
@@ -111,11 +111,43 @@ class AFSSurveyJSForm {
|
|||||||
onStartCompleteCB(formSubmittion,form,survey);
|
onStartCompleteCB(formSubmittion,form,survey);
|
||||||
if(postData){
|
if(postData){
|
||||||
|
|
||||||
if(mail_handlers!=undefined && mail_handlers!=null){
|
// if(mail_handlers!=undefined && mail_handlers!=null){
|
||||||
let email = self.__getVariable("email", mail_handlers.variables.client);
|
// let email = self.__getVariable("email", mail_handlers.variables.client);
|
||||||
mail_handlers.emails = [email];
|
// mail_handlers.emails = [email];
|
||||||
}else{
|
// }else{
|
||||||
mail_handlers = {"__empty":true};
|
// mail_handlers = {"__empty":true};
|
||||||
|
// }
|
||||||
|
|
||||||
|
let client_variables = [];
|
||||||
|
client_variables.push({
|
||||||
|
"name": "form_name",
|
||||||
|
"value": form.name,
|
||||||
|
})
|
||||||
|
let response_email = null;
|
||||||
|
for (let v = 0; v < formSubmittion.length; v++) {
|
||||||
|
const element = formSubmittion[v];
|
||||||
|
// console.log(element);
|
||||||
|
if(element.form.name==undefined){continue;}
|
||||||
|
if(typeof element.answer !== 'string'){continue;}
|
||||||
|
if(element.form.name=="email"){
|
||||||
|
response_email = element.answer;
|
||||||
|
}
|
||||||
|
client_variables.push({
|
||||||
|
"name": element.form.name,
|
||||||
|
"value": element.answer,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if(response_email!=null){
|
||||||
|
for(let prop1 in mail_handlers){
|
||||||
|
for(let prop2 in mail_handlers[prop1].handlers){
|
||||||
|
if(mail_handlers[prop1].handlers[prop2]['alert']==true)
|
||||||
|
continue;
|
||||||
|
mail_handlers[prop1].handlers[prop2]['emails'] = [response_email];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let senddata = {
|
let senddata = {
|
||||||
@@ -124,8 +156,13 @@ class AFSSurveyJSForm {
|
|||||||
form_reference_num: form.json.reference_num,
|
form_reference_num: form.json.reference_num,
|
||||||
submission_json: JSON.stringify(formSubmittion),
|
submission_json: JSON.stringify(formSubmittion),
|
||||||
form_json: JSON.stringify(form),
|
form_json: JSON.stringify(form),
|
||||||
mail_handlers: JSON.stringify(mail_handlers)
|
mail_handlers: JSON.stringify(mail_handlers),
|
||||||
|
client_variables: JSON.stringify([client_variables])
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log(form);
|
||||||
|
console.log(client_variables);
|
||||||
|
console.log(formSubmittion);
|
||||||
$.post(url, senddata, function(resp){
|
$.post(url, senddata, function(resp){
|
||||||
// console.log(JSON.parse(resp));
|
// console.log(JSON.parse(resp));
|
||||||
onPostCompleteCB(formSubmittion,form,survey);
|
onPostCompleteCB(formSubmittion,form,survey);
|
||||||
|
|||||||
@@ -1127,10 +1127,10 @@
|
|||||||
// console.log(self);
|
// console.log(self);
|
||||||
|
|
||||||
if (self.active != null) {
|
if (self.active != null) {
|
||||||
let url = self.managed_domain.Address + ":" + self.active.json.service_port + "/" + self.active.json.service_end_point;
|
// let url = self.managed_domain.Address + ":" + self.active.json.service_port + "/" + self.active.json.service_end_point;
|
||||||
self.service_request_url = url;
|
// self.service_request_url = url;
|
||||||
self.service_request_get_url = url;
|
// self.service_request_get_url = url;
|
||||||
self.service_request_post_url = self.managed_domain.Address + ":" + self.active.json.service_port;
|
// self.service_request_post_url = self.managed_domain.Address + ":" + self.active.json.service_port;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1498,19 +1498,19 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
async function _check_stripe_service(cb,self){
|
async function _check_stripe_service(cb,self){
|
||||||
let data = {checking:true};
|
// let data = {checking:true};
|
||||||
// console.log(self.service_request_url)
|
// // console.log(self.service_request_url)
|
||||||
fetchJsonp(self.service_request_url + "?" + new URLSearchParams({type:"check",data: JSON.stringify(data)}), {
|
// fetchJsonp(self.service_request_url + "?" + new URLSearchParams({type:"check",data: JSON.stringify(data)}), {
|
||||||
method: "get"
|
// method: "get"
|
||||||
})
|
// })
|
||||||
.then(resp => resp.json())
|
// .then(resp => resp.json())
|
||||||
.then((response) => {
|
// .then((response) => {
|
||||||
console.log(response);
|
// console.log(response);
|
||||||
cb(response);
|
// cb(response);
|
||||||
}).catch((err) => {
|
// }).catch((err) => {
|
||||||
console.error(err);
|
// console.error(err);
|
||||||
cb(false,err);
|
// cb(false,err);
|
||||||
});
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
function _stripe_register(self){
|
function _stripe_register(self){
|
||||||
|
|||||||
@@ -269,6 +269,8 @@ function RUN(root,$,b,_,bootstrap){
|
|||||||
this._props_._root_element_component = element;
|
this._props_._root_element_component = element;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
// ddddd
|
||||||
/**
|
/**
|
||||||
* Register a method to be called later with in the app
|
* Register a method to be called later with in the app
|
||||||
*/
|
*/
|
||||||
@@ -606,7 +608,8 @@ ComponentManager.prototype = {};
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
}// 33333
|
}
|
||||||
|
// ddddd
|
||||||
ComponentFactory.prototype = {
|
ComponentFactory.prototype = {
|
||||||
|
|
||||||
|
|
||||||
@@ -2291,6 +2294,7 @@ function ViewComponent2(opts,elements){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// 33333
|
||||||
// xxxxxh
|
// xxxxxh
|
||||||
function ViewComponent(opts){
|
function ViewComponent(opts){
|
||||||
gl_HandleAll(this,opts,'ViewComponent');
|
gl_HandleAll(this,opts,'ViewComponent');
|
||||||
@@ -12002,7 +12006,7 @@ function _addAppElementToList(self){
|
|||||||
|
|
||||||
|
|
||||||
var CONNECTED_COMPONENTS = [];
|
var CONNECTED_COMPONENTS = [];
|
||||||
// 7676 50505 77777 xxxxx
|
// 7676 50505 77777 xxxxx // ddddd
|
||||||
function ApplicationManager_start_runInterval(self){
|
function ApplicationManager_start_runInterval(self){
|
||||||
let interval = setInterval(function(){
|
let interval = setInterval(function(){
|
||||||
//var GL_COMPONENTS = self.getComponents();
|
//var GL_COMPONENTS = self.getComponents();
|
||||||
|
|||||||
@@ -2395,21 +2395,6 @@ GLOBAL_SETTINGS.SUBSCRIBER = [
|
|||||||
"reference_abbr": "sub",
|
"reference_abbr": "sub",
|
||||||
"display_name": "News5",
|
"display_name": "News5",
|
||||||
"description": "",
|
"description": "",
|
||||||
"catalogs_config": {
|
|
||||||
"subscriber_confirmation_email":{
|
|
||||||
"on":false,
|
|
||||||
"email_response":{
|
|
||||||
"title":"",
|
|
||||||
"body":"",
|
|
||||||
"subject":"",
|
|
||||||
"email":"",
|
|
||||||
"template":"_email_alert",
|
|
||||||
"from":"no-reply",
|
|
||||||
"image": "",
|
|
||||||
"footer":""
|
|
||||||
},
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"short_description": "",
|
"short_description": "",
|
||||||
"reference_num": "sub_239874234",
|
"reference_num": "sub_239874234",
|
||||||
"articles": [
|
"articles": [
|
||||||
@@ -2417,27 +2402,7 @@ GLOBAL_SETTINGS.SUBSCRIBER = [
|
|||||||
"title":"My 1 Post",
|
"title":"My 1 Post",
|
||||||
"reference_num":"sub_897345jgd",
|
"reference_num":"sub_897345jgd",
|
||||||
"type":"email",
|
"type":"email",
|
||||||
"delivered":false,
|
"delivered":false
|
||||||
"email_response":{
|
|
||||||
"title":"",
|
|
||||||
"body":"",
|
|
||||||
"subject":"",
|
|
||||||
"email":"",
|
|
||||||
"template":"_email_alert",
|
|
||||||
"from":"no-reply",
|
|
||||||
"image": "",
|
|
||||||
"footer":""
|
|
||||||
},
|
|
||||||
"email_alert":{
|
|
||||||
"title":"",
|
|
||||||
"body":"",
|
|
||||||
"subject":"",
|
|
||||||
"emails":[],
|
|
||||||
"template":"_email_alert",
|
|
||||||
"from":"no-reply",
|
|
||||||
"image": "",
|
|
||||||
"footer":""
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"subscribers":[]
|
"subscribers":[]
|
||||||
@@ -2450,15 +2415,12 @@ GLOBAL_SETTINGS.SUBSCRIBER_CATALOG = [
|
|||||||
json: {
|
json: {
|
||||||
"mysql_id":-1,
|
"mysql_id":-1,
|
||||||
"category":"subscriber_catalog",
|
"category":"subscriber_catalog",
|
||||||
|
"title": "",
|
||||||
|
"reference_num": "",
|
||||||
"nameid":"default",
|
"nameid":"default",
|
||||||
"release_type": false,
|
"release_type": false,
|
||||||
"description": "",
|
"description": "",
|
||||||
"short_description": "",
|
"short_description": ""
|
||||||
"mail_handlers": {
|
|
||||||
"email_response":{},
|
|
||||||
"email_alert":{}
|
|
||||||
},
|
|
||||||
"subscribers":[]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
@@ -2468,11 +2430,7 @@ GLOBAL_SETTINGS.SUBSCRIBER_ARTICLES = [
|
|||||||
json: {
|
json: {
|
||||||
"category":"catalog_article",
|
"category":"catalog_article",
|
||||||
"delivery_type": "email",
|
"delivery_type": "email",
|
||||||
"deliveries": [],
|
"deliveries": []
|
||||||
"mail_handlers": {
|
|
||||||
"email_delivery": {},
|
|
||||||
"link_delivery": {}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -43,12 +43,13 @@
|
|||||||
}, function(obj){
|
}, function(obj){
|
||||||
obj = JSON.parse(obj);
|
obj = JSON.parse(obj);
|
||||||
|
|
||||||
|
// console.log(obj);
|
||||||
tmpConfig.root.member = obj.member;
|
tmpConfig.root.member = obj.member;
|
||||||
// tmpConfig.root.access = obj.results.access;
|
// tmpConfig.root.access = obj.results.access;
|
||||||
tmpConfig.root.config = obj.config;
|
tmpConfig.root.config = obj.config;
|
||||||
tmpConfig.root.tenant = obj.tenant;
|
tmpConfig.root.tenant = obj.tenant;
|
||||||
|
|
||||||
console.log(obj);
|
// console.log(obj);
|
||||||
resolve(obj);
|
resolve(obj);
|
||||||
})
|
})
|
||||||
}),
|
}),
|
||||||
@@ -206,7 +207,7 @@
|
|||||||
|
|
||||||
|
|
||||||
app.extra.manager = new internalsdk.MemberManagementSystem(__PLAY_MODE__, tmpConfig.root.member, tmpConfig.root.config);
|
app.extra.manager = new internalsdk.MemberManagementSystem(__PLAY_MODE__, tmpConfig.root.member, tmpConfig.root.config);
|
||||||
console.log(app.extra);
|
// console.log(app.extra);
|
||||||
|
|
||||||
app.extra.config.html = app.extra.extras.ConvertHtmlTextToLanguage(app.extra.config.html);
|
app.extra.config.html = app.extra.extras.ConvertHtmlTextToLanguage(app.extra.config.html);
|
||||||
app.extra.config.email_builder = tmpConfig.config.email_builder;
|
app.extra.config.email_builder = tmpConfig.config.email_builder;
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ define([
|
|||||||
function func_logout_event(app){
|
function func_logout_event(app){
|
||||||
$('.log_out_link').on('click',function(e){
|
$('.log_out_link').on('click',function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
window.location.href = app.extra.config.managed_domain.Address + "/portal/admin/logout.php";
|
window.location.href = "/portal/admin/logout.php";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function init(app){
|
function init(app){
|
||||||
@@ -858,11 +858,11 @@ define([
|
|||||||
|
|
||||||
// settings
|
// settings
|
||||||
app.extra.views.subscriber.newSubView({
|
app.extra.views.subscriber.newSubView({
|
||||||
id: "settings",
|
id: "catalog_settings",
|
||||||
init: false,
|
init: false,
|
||||||
body: app.extra.config.html.subscriber_settings,
|
body: app.extra.config.html.subscriber_settings,
|
||||||
listener: function(){
|
listener: function(){
|
||||||
imp_subscriber.init_settings(app);
|
imp_subscriber.init_catalog_settings(app);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// manage_email
|
// manage_email
|
||||||
@@ -871,7 +871,7 @@ define([
|
|||||||
init: false,
|
init: false,
|
||||||
body: app.extra.config.html.subscriber_email_container,
|
body: app.extra.config.html.subscriber_email_container,
|
||||||
listener: function(){
|
listener: function(){
|
||||||
imp_subscriber.init_email(app);
|
imp_subscriber.init_settings_email(app);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// article_editor
|
// article_editor
|
||||||
|
|||||||
@@ -12,31 +12,14 @@ define([
|
|||||||
|
|
||||||
|
|
||||||
function _init(app){
|
function _init(app){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#enter_builder_btn_id").on("click",function(e){
|
$("#enter_builder_btn_id").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
if(window.location.host.includes(app.extra.config.managed_domain.Domain)){
|
||||||
console.log(window.location.host);
|
window.open(app.extra.config.managed_domain.Address + "/portal/admin/services/builder/web/v3", "appfactory_webbuilder");
|
||||||
console.log(window.location.origin);
|
}
|
||||||
console.log(app.extra.config.managed_domain.Address);
|
if(window.location.host.includes(app.extra.config.managed_domain.Domain2)){
|
||||||
console.log(app.extra.config.managed_domain.Address.split("//")[1]);
|
window.open(app.extra.config.managed_domain.Address2 + "/portal/admin/services/builder/web/v3", "appfactory_webbuilder");
|
||||||
console.log(app.extra.config.managed_domain.Address2);
|
|
||||||
console.log(app.extra.config.managed_domain);
|
|
||||||
|
|
||||||
if(app.extra.config.managed_domain.Address!=undefined){
|
|
||||||
if(window.location.host.includes(app.extra.config.managed_domain.Address.split("//")[1])){
|
|
||||||
window.open(app.extra.config.managed_domain.Address + "/portal/admin/services/builder/web/v3", "appfactory_webbuilder");
|
|
||||||
}
|
|
||||||
}else if(app.extra.config.managed_domain.Address2!=undefined){
|
|
||||||
if(window.location.host.includes(app.extra.config.managed_domain.Address2.split("//")[1])){
|
|
||||||
window.open(app.extra.config.managed_domain.Address2 + "/portal/admin/services/builder/web/v3", "appfactory_webbuilder");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// https://www15.appfactory.studio/portal/admin/services/builder/
|
|
||||||
// window.open(app.extra.config.managed_domain.Address2 + "/portal/admin/services/builder/web", "appfactory_webbuilder");
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,9 +237,10 @@ define([
|
|||||||
handleProcessor(app);
|
handleProcessor(app);
|
||||||
|
|
||||||
}
|
}
|
||||||
function showChargeTypeSubscription(app){save_access_settings_id
|
function showChargeTypeSubscription(app){
|
||||||
function initEditor(app,cb){
|
function initEditor(app,cb){
|
||||||
let processor_array = getProcessorArray(app);
|
let processor_array = getProcessorArray(app);
|
||||||
|
schema_direct_payment_subscription.properties.processors.items.properties.processor_nameid.default = "Test Live 001";
|
||||||
schema_direct_payment_subscription.properties.processors.items.properties.processor_nameid.enum = processor_array.processor_enums;
|
schema_direct_payment_subscription.properties.processors.items.properties.processor_nameid.enum = processor_array.processor_enums;
|
||||||
|
|
||||||
function ReplaceProcessorTitle(recurring,processor_array){
|
function ReplaceProcessorTitle(recurring,processor_array){
|
||||||
@@ -280,6 +281,8 @@ define([
|
|||||||
// app.extra.current.direct_payment.obj.json.configuration.recurring = tmp_subscipt.groups;
|
// app.extra.current.direct_payment.obj.json.configuration.recurring = tmp_subscipt.groups;
|
||||||
// app.extra.current.direct_payment.obj.json.mail_handlers = tmp_subscipt.mail_handlers;
|
// app.extra.current.direct_payment.obj.json.mail_handlers = tmp_subscipt.mail_handlers;
|
||||||
|
|
||||||
|
console.log(processor_array.processor_enums);
|
||||||
|
console.log(schema_direct_payment_subscription.properties.processors.items.properties.processor_nameid);
|
||||||
app.extra.extras.CreateJSONScemaEditor(
|
app.extra.extras.CreateJSONScemaEditor(
|
||||||
"access_settings_container_id",
|
"access_settings_container_id",
|
||||||
schema_direct_payment_subscription,
|
schema_direct_payment_subscription,
|
||||||
@@ -292,10 +295,11 @@ define([
|
|||||||
let recurring = ReplaceProcessorTitle(editor1.getValue(),processor_array);
|
let recurring = ReplaceProcessorTitle(editor1.getValue(),processor_array);
|
||||||
app.extra.current.direct_payment.obj.json.configuration.recurring = recurring;
|
app.extra.current.direct_payment.obj.json.configuration.recurring = recurring;
|
||||||
|
|
||||||
// console.log("=====================================");
|
console.log("=====================================");
|
||||||
// console.log(recurring);
|
console.log(recurring);
|
||||||
// console.log(tmp_subscipt);
|
console.log(app.extra.current.direct_payment);
|
||||||
// console.log(app.extra.current.direct_payment);
|
|
||||||
|
app.extra.current.direct_payment.obj.processor = recurring.processors[0].processor_nameid;
|
||||||
|
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
||||||
@@ -308,8 +312,6 @@ define([
|
|||||||
no_additional_properties: true
|
no_additional_properties: true
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
initEditor(app);
|
initEditor(app);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
})(function(bootstrap) {
|
})(function(bootstrap) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function init(app){
|
function init(app){
|
||||||
app.extra.current.documents = {};
|
app.extra.current.documents = {};
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
@@ -20,6 +21,7 @@
|
|||||||
app.extra.extras.RequestDocuments(100,function(documents){
|
app.extra.extras.RequestDocuments(100,function(documents){
|
||||||
if(app.extra.documents==undefined){ app.extra.documents = documents; }
|
if(app.extra.documents==undefined){ app.extra.documents = documents; }
|
||||||
|
|
||||||
|
app.extra.instances.documents.setDocuments(documents);
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
_init(app);
|
_init(app);
|
||||||
},app.extra.documents,true,app);
|
},app.extra.documents,true,app);
|
||||||
@@ -32,7 +34,8 @@
|
|||||||
function append_files(documents,app){
|
function append_files(documents,app){
|
||||||
let ids = [];
|
let ids = [];
|
||||||
let rowsHtml = "";
|
let rowsHtml = "";
|
||||||
for (let i = 0; i < documents.length; i++) {
|
// for (let i = 0; i < documents.length; i++) {
|
||||||
|
for (let i = documents.length - 1; i >= 0; i--) {
|
||||||
const index = i;
|
const index = i;
|
||||||
const document = documents[i];
|
const document = documents[i];
|
||||||
const id = "m"+app.utils.randomGenerator(12);
|
const id = "m"+app.utils.randomGenerator(12);
|
||||||
@@ -70,7 +73,7 @@
|
|||||||
console.log(params);
|
console.log(params);
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
modal.toggle();
|
modal.toggle();
|
||||||
let documents = app.extra.documents;
|
let documents = app.extra.instances.documents.files; // app.extra.documents;
|
||||||
append_files(documents,app);
|
append_files(documents,app);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -124,12 +127,12 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
function displayImageEditor(app){
|
function displayImageEditor(url,app){
|
||||||
// Image editor
|
// Image editor
|
||||||
var imageEditor = new tui.ImageEditor('#tui-image-editor-container2', {
|
var imageEditor = new tui.ImageEditor('#tui-image-editor-container2', {
|
||||||
includeUI: {
|
includeUI: {
|
||||||
loadImage: {
|
loadImage: {
|
||||||
path: app.extra.current.documents.document.obj.url, //'img/sampleImage2.png',
|
path: url, //'img/sampleImage2.png',
|
||||||
name: 'SampleImage',
|
name: 'SampleImage',
|
||||||
},
|
},
|
||||||
// theme: blackTheme, // or whiteTheme
|
// theme: blackTheme, // or whiteTheme
|
||||||
@@ -144,31 +147,27 @@
|
|||||||
imageEditor.ui.resizeEditor();
|
imageEditor.ui.resizeEditor();
|
||||||
};
|
};
|
||||||
|
|
||||||
$(".tui-image-editor-header-logo").remove();
|
$(".tui-image-editor-header-logo").remove();
|
||||||
}
|
}
|
||||||
function displayPdfEditor(app){
|
function displayPdfEditor(url,app){
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// console.log(app.extra.current.documents);
|
||||||
if(app.utils.imageExists(app.extra.current.documents.document.obj.url)){
|
let url = app.extra.instances.documents.getDocumentUrl(app.extra.current.documents.document.obj, app.extra.config.managed_domain);
|
||||||
|
console.log(url);
|
||||||
|
if(app.utils.imageExists(url)){
|
||||||
if(app.utils.isFileType("image",app.extra.current.documents.document.obj.generated_name)){
|
if(app.utils.isFileType("image",app.extra.current.documents.document.obj.generated_name)){
|
||||||
// console.log(imageExists(app.extra.current.documents.document.obj.url));
|
// console.log(imageExists(app.extra.current.documents.document.obj.url));
|
||||||
displayImageEditor(app);
|
displayImageEditor(url,app);
|
||||||
}
|
}
|
||||||
if(app.utils.isFileType("pdf",app.extra.current.documents.document.obj.generated_name)){
|
if(app.utils.isFileType("pdf",app.extra.current.documents.document.obj.generated_name)){
|
||||||
displayPdfEditor(app);
|
displayPdfEditor(url,app);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
$("#document_status_message").text("File missing!");
|
$("#document_status_message").text("File missing!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log(app.extra.current.documents.document);
|
|
||||||
// console.log(imageEditor);
|
|
||||||
// console.log(tui);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function UpdateDocuments(action,mydocument,app,cb){
|
function UpdateDocuments(action,mydocument,app,cb){
|
||||||
@@ -210,7 +209,7 @@
|
|||||||
<th class="w-1"></th>
|
<th class="w-1"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody id="documents_table_body">
|
||||||
${rows}
|
${rows}
|
||||||
|
|
||||||
</tbody>
|
</tbody>
|
||||||
@@ -264,99 +263,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#_______add_document_btn12121").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
let modal = new bootstrap.Modal("#modal_upload_document");
|
|
||||||
modal.toggle();
|
|
||||||
|
|
||||||
$("#modal_upload_new_file_btn").off();
|
|
||||||
$("#modal_upload_new_file_btn").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
AFSSpinner.showFullScreen(true);
|
|
||||||
|
|
||||||
let file = $('#modal_document_file_upload_input').prop('files')[0];
|
|
||||||
|
|
||||||
let fileobj = NewFileObject(
|
|
||||||
file.name,
|
|
||||||
"d"+app.utils.randomGenerator(12) + "." + file.name.split('.').pop(),
|
|
||||||
file.size,
|
|
||||||
file.type,
|
|
||||||
new Date().toLocaleString(),
|
|
||||||
"/mnt/"+app.extra.config.managed_domain.SystemUser+"/modules/documents",
|
|
||||||
"none");
|
|
||||||
|
|
||||||
console.log(file);
|
|
||||||
console.log(fileobj);
|
|
||||||
app.extra.config.configurations.documents[0].json.files.push(fileobj);
|
|
||||||
|
|
||||||
UploadDocument(file, fileobj, app, function(resp){
|
|
||||||
console.log(resp);
|
|
||||||
let senddata2 = {
|
|
||||||
configurations_update: true,
|
|
||||||
mysql_id: app.extra.config.configurations.documents[0].json.mysql_id,
|
|
||||||
data: JSON.stringify(app.extra.config.configurations.documents[0].json)
|
|
||||||
}
|
|
||||||
$.post(app.extra.url,senddata2,function(resp2){
|
|
||||||
AFSSpinner.showFullScreen(false);
|
|
||||||
console.log(resp2);
|
|
||||||
RemoveModal(modal);
|
|
||||||
|
|
||||||
append_files(app);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
//
|
|
||||||
|
|
||||||
// var form_data = new FormData();
|
|
||||||
// form_data.append('file', file_data);
|
|
||||||
// console.log(file_data);
|
|
||||||
|
|
||||||
|
|
||||||
// let fi = document.getElementById('modal_document_file_upload_input');
|
|
||||||
// const fsize = fi.files.item(0).size;
|
|
||||||
// const file = Math.round((fsize / 1024));
|
|
||||||
// // The size of the file.
|
|
||||||
// if (file >= 4096) {
|
|
||||||
// console.log("yes");
|
|
||||||
// }else{
|
|
||||||
// console.log("no");
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// $.ajax({
|
|
||||||
// url: app.extra.url + "?upload=true", // <-- point to server-side PHP script
|
|
||||||
// dataType: 'text', // <-- what to expect back from the PHP script, if anything
|
|
||||||
// cache: false,
|
|
||||||
// contentType: false,
|
|
||||||
// processData: false,
|
|
||||||
// data: form_data,
|
|
||||||
// type: 'post',
|
|
||||||
// success: function(php_script_response){
|
|
||||||
// alert(php_script_response); // <-- display response from the PHP script, if any
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// RemoveModal(modal);
|
|
||||||
// let senddata = {
|
|
||||||
// configurations_update:true,
|
|
||||||
// mysql_id: app.extra.config.configurations.documents[0].mysql_id,
|
|
||||||
// data: JSON.stringify(app.extra.config.configurations.documents[0])
|
|
||||||
// }
|
|
||||||
|
|
||||||
// $.post(app.extra.url,senddata,function(resp){
|
|
||||||
// console.log(resp);
|
|
||||||
// });
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -391,53 +297,10 @@
|
|||||||
$('body').css("overflow","");
|
$('body').css("overflow","");
|
||||||
$('body').css("padding-right","");
|
$('body').css("padding-right","");
|
||||||
}
|
}
|
||||||
function NewFileObject(on,gn,fs,ft,ud,loc,url){
|
|
||||||
return {
|
|
||||||
"original_name": on,
|
|
||||||
"generated_name": gn,
|
|
||||||
"file_size": fs,
|
|
||||||
"file_type": ft,
|
|
||||||
"upload_date": ud,
|
|
||||||
"location": loc,
|
|
||||||
"url": url
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// deprecated - used in afsdocuments
|
|
||||||
function UploadDocument(file,obj,app,cb){
|
|
||||||
|
|
||||||
let formData = new FormData();
|
|
||||||
// these values are switched
|
|
||||||
let datauploadUrl = "datauploadUrl";//sponsorship.json.request.dataupload;
|
|
||||||
let fileuploadUrl = "fileuploadUrl";//sponsorship.json.request.fileupload;
|
|
||||||
formData.append(fileuploadUrl, file);
|
|
||||||
formData.append(datauploadUrl, JSON.stringify(obj));
|
|
||||||
|
|
||||||
let req = new XMLHttpRequest();
|
|
||||||
req.addEventListener('progress', function(e) {
|
|
||||||
var done = e.position || e.loaded, total = e.totalSize || e.total;
|
|
||||||
// console.log('---progress: ' + (Math.floor(done/total*1000)/10) + '%');
|
|
||||||
}, false);
|
|
||||||
if ( req.upload ) {
|
|
||||||
// self.upload_in_progress = true;
|
|
||||||
req.upload.onprogress = function(e) {
|
|
||||||
var done = e.position || e.loaded, total = e.totalSize || e.total;
|
|
||||||
// console.log(' req.upload progress: ' + done + ' / ' + total + ' = ' + (Math.floor(done/total*1000)/10) + '%');
|
|
||||||
};
|
|
||||||
}
|
|
||||||
req.onreadystatechange = function(e) {
|
|
||||||
if ( 4 == this.readyState ) {
|
|
||||||
// console.log(e.target.responseText)
|
|
||||||
if(cb!=undefined){
|
|
||||||
cb(e.target.responseText,e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
let requesturl = app.extra.url;// afsconfig.managed_domain.Address + "/" + sponsorship.json.request.url
|
|
||||||
req.open("POST", requesturl);
|
|
||||||
req.send(formData);
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
init,
|
init,
|
||||||
|
|||||||
@@ -253,6 +253,7 @@ function _init_form_submissions(app){
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function _init_init_submission(app,self){
|
function _init_init_submission(app,self){
|
||||||
$("#back_to_forms_init").on("click",function(e){
|
$("#back_to_forms_init").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
@@ -306,7 +307,7 @@ function _init_init_submission(app,self){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
// console.log(sub);
|
console.log(sub);
|
||||||
if(typeof sub.answer === "string"){
|
if(typeof sub.answer === "string"){
|
||||||
if(sub.answer.includes("data:image")){
|
if(sub.answer.includes("data:image")){
|
||||||
answer = `<img src="${sub.answer}" />`;
|
answer = `<img src="${sub.answer}" />`;
|
||||||
@@ -319,6 +320,7 @@ function _init_init_submission(app,self){
|
|||||||
for (let n = 0; n < sub.answer.length; n++) {
|
for (let n = 0; n < sub.answer.length; n++) {
|
||||||
const ans = sub.answer[n];
|
const ans = sub.answer[n];
|
||||||
|
|
||||||
|
console.log(ans);
|
||||||
if(typeof ans === "object"){
|
if(typeof ans === "object"){
|
||||||
// file
|
// file
|
||||||
if(ans.name!=undefined && ans.type!=undefined && ans.content!=undefined){
|
if(ans.name!=undefined && ans.type!=undefined && ans.content!=undefined){
|
||||||
@@ -329,7 +331,7 @@ function _init_init_submission(app,self){
|
|||||||
}
|
}
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
answer += `${ans.name}<br>`;
|
answer += `${ans}<br>`;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}else if(typeof sub.answer === "object"){
|
}else if(typeof sub.answer === "object"){
|
||||||
@@ -341,10 +343,6 @@ function _init_init_submission(app,self){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
let question_html = __make_label(sub.question,answer);
|
let question_html = __make_label(sub.question,answer);
|
||||||
|
|
||||||
html += question_html;
|
html += question_html;
|
||||||
@@ -2048,7 +2046,7 @@ function _init_settings(app,self){
|
|||||||
}
|
}
|
||||||
|
|
||||||
let form = app.extra.config.forms[app.extra.current.forms.form_index];
|
let form = app.extra.config.forms[app.extra.current.forms.form_index];
|
||||||
let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.forms, form);
|
let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.forms, form.json.reference_num);
|
||||||
|
|
||||||
// rrrrr
|
// rrrrr
|
||||||
$("#manage_email_construction_id").on("click",function(e){
|
$("#manage_email_construction_id").on("click",function(e){
|
||||||
@@ -2071,14 +2069,11 @@ function _init_settings_email(app){
|
|||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
if(handlers!=undefined && handlers!=null){
|
if(handlers!=undefined && handlers!=null){
|
||||||
let category = app.extra.config.configurations.forms[0].json.category;
|
let category = app.extra.config.configurations.forms[0].json.category;
|
||||||
app.extra.extras.SaveMailHandlers(category, form.json.reference_num, handlers, app, function(resp){
|
app.extra.extras.SaveMailHandlers(category, form.json.reference_num, handlers, app, function(resp,subs){
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
// console.log(app.extra.config.configurations.access[index])
|
app.extra.mail_handlers.forms = subs;
|
||||||
// app.extra.extras.SaveConfiguration(app.extra.config.configurations.access[index].json, app, function(resp){
|
},app.extra.mail_handlers.forms);
|
||||||
// console.log(resp);
|
|
||||||
// });
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},function(emailobj){
|
},function(emailobj){
|
||||||
// console.log(emailobj);
|
// console.log(emailobj);
|
||||||
|
|||||||
@@ -101,10 +101,10 @@ define([
|
|||||||
return active_paypal_service;
|
return active_paypal_service;
|
||||||
}
|
}
|
||||||
function opennewprocessor(app,cb){
|
function opennewprocessor(app,cb){
|
||||||
const myModalAlternative = new bootstrap.Modal('#modal_new_processor_service', {});
|
// const myModalAlternative = new bootstrap.Modal('#modal_new_processor_service', {});
|
||||||
myModalAlternative.toggle();
|
myModalAlternative.toggle();
|
||||||
|
|
||||||
let view = _func_view_create_new_processor_form(app, "paypal", cb, myModalAlternative);
|
let view = _func_view_create_new_processor_form(app, "paypal", cb);
|
||||||
$("#new_processor_container_form").empty();
|
$("#new_processor_container_form").empty();
|
||||||
$("#new_processor_container_form").html(view.getHtml());
|
$("#new_processor_container_form").html(view.getHtml());
|
||||||
}
|
}
|
||||||
@@ -286,6 +286,7 @@ define([
|
|||||||
// });
|
// });
|
||||||
let processor = JSON.parse(JSON.stringify(getCurrentProcessor(app).json));
|
let processor = JSON.parse(JSON.stringify(getCurrentProcessor(app).json));
|
||||||
// console.log(processor);
|
// console.log(processor);
|
||||||
|
|
||||||
app.extra.extras.CreateJSONScemaEditor(
|
app.extra.extras.CreateJSONScemaEditor(
|
||||||
"paypal_processor_container_id",
|
"paypal_processor_container_id",
|
||||||
schema_processor,
|
schema_processor,
|
||||||
@@ -390,7 +391,7 @@ define([
|
|||||||
|
|
||||||
|
|
||||||
function opennewprocessor(app){
|
function opennewprocessor(app){
|
||||||
const myModalAlternative = new bootstrap.Modal('#modal_new_processor_service', {});
|
// const myModalAlternative = new bootstrap.Modal('#modal_new_processor_service', {});
|
||||||
myModalAlternative.toggle();
|
myModalAlternative.toggle();
|
||||||
|
|
||||||
let view = _func_view_create_new_processor_form(app, "stripe");
|
let view = _func_view_create_new_processor_form(app, "stripe");
|
||||||
@@ -415,15 +416,12 @@ define([
|
|||||||
app.extra.views.payments.render('manage_processors_stripe');
|
app.extra.views.payments.render('manage_processors_stripe');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function _init_payments_manage_stripe_processors(app){
|
|
||||||
$("#back_to_init").on("click",function(e){
|
function AppendStripeList(app){
|
||||||
e.preventDefault();
|
|
||||||
app.extra.views.payments.render('manage_processors');
|
|
||||||
});
|
|
||||||
__open_dailog_create_processor(app);
|
__open_dailog_create_processor(app);
|
||||||
function _get_button(id,span_id,label){
|
function _get_button(id,span_id,label){
|
||||||
return `
|
return `
|
||||||
<button id="${id}" class="w-100 btn btn-outline-dark">
|
<button id="${id}" class="w-100 btn btn-outline-dark mb-4">
|
||||||
|
|
||||||
<div class="row w-50">
|
<div class="row w-50">
|
||||||
<div class="col-12 col-md-6 d-flex justify-content-left">
|
<div class="col-12 col-md-6 d-flex justify-content-left">
|
||||||
@@ -436,18 +434,15 @@ define([
|
|||||||
|
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(app.extra.current.stripe==undefined) app.extra.current.stripe = {};
|
if(app.extra.current.stripe==undefined) app.extra.current.stripe = {};
|
||||||
app.extra.current.stripe.instances = [];
|
app.extra.current.stripe.instances = [];
|
||||||
let stripe_radio_name = "m"+app.utils.randomGenerator(12);
|
let stripe_radio_name = "m"+app.utils.randomGenerator(12);
|
||||||
let ids = [];
|
let ids = [];
|
||||||
$('#stripe_accordion_body').empty();
|
|
||||||
let html = "";
|
let html = "";
|
||||||
let processors = app.extra.config.configurations.processors;
|
let processors = app.extra.config.configurations.processors;
|
||||||
|
console.log(processors);
|
||||||
for(let i=0; i < processors.length; i++){
|
for(let i=0; i < processors.length; i++){
|
||||||
const index = i;
|
const index = i;
|
||||||
// console.log(pay);
|
// console.log(pay);
|
||||||
@@ -461,34 +456,59 @@ define([
|
|||||||
if(processors[i].json.processor!="stripe"){
|
if(processors[i].json.processor!="stripe"){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
pushme(index,app);
|
||||||
|
|
||||||
|
}
|
||||||
|
function pushme(index,app){
|
||||||
let pay = processors[index].json;
|
let pay = processors[index].json;
|
||||||
let id = "m"+app.utils.randomGenerator(12);
|
let id = "m"+app.utils.randomGenerator(12);
|
||||||
let spanid = "m"+app.utils.randomGenerator(12);
|
let spanid = "m"+app.utils.randomGenerator(12);
|
||||||
let label = pay.display_name;
|
let label = pay.display_name;
|
||||||
html += _get_button(id,spanid,label);
|
html += _get_button(id,spanid,label);
|
||||||
|
ids.push({id:id, obj:processors[index], index:index});
|
||||||
|
console.log(id);
|
||||||
|
// rrrrr
|
||||||
|
|
||||||
$('#stripe_accordion_body').append(html);
|
}
|
||||||
let managed_domain = app.extra.config.managed_domain;
|
|
||||||
let st = app.extra.instances.payments.service.createInstance("stripe", pay, managed_domain);
|
|
||||||
st.check(function(result){
|
|
||||||
run_stripe_check(`#${spanid}`,result.action, pay, app);
|
|
||||||
});
|
|
||||||
|
|
||||||
app.extra.current.stripe.instances.push({
|
|
||||||
ids: ids[index],
|
|
||||||
instance: st,
|
|
||||||
processor: pay
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
$('#stripe_accordion_body').empty();
|
||||||
|
$('#stripe_accordion_body').append(html);
|
||||||
|
for(let i=0; i < ids.length; i++){
|
||||||
|
let id = ids[i].id;
|
||||||
|
let pay = ids[i].processor;
|
||||||
$("#"+id).on("click",function(e){
|
$("#"+id).on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
let managed_domain = app.extra.config.managed_domain;
|
||||||
|
let st = app.extra.instances.payments.service.createInstance("stripe", pay, managed_domain);
|
||||||
|
|
||||||
|
app.extra.current.stripe.instances.push({
|
||||||
|
ids: ids[index],
|
||||||
|
instance: st,
|
||||||
|
processor: pay
|
||||||
|
});
|
||||||
app.extra.current.stripe.instance = st;
|
app.extra.current.stripe.instance = st;
|
||||||
app.extra.current.stripe._processor = pay;
|
app.extra.current.stripe._processor = pay;
|
||||||
app.extra.current.stripe._processor_index = index;
|
app.extra.current.stripe._processor_index = ids[i].index;
|
||||||
app.extra.views.payments.render('manage_processor_stripe');
|
app.extra.views.payments.render('manage_processor_stripe');
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let myModalAlternative = null;
|
||||||
|
function _init_payments_manage_stripe_processors(app){
|
||||||
|
myModalAlternative = new bootstrap.Modal('#modal_new_processor_service', {});
|
||||||
|
$("#back_to_init").on("click",function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
app.extra.views.payments.render('manage_processors');
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
AppendStripeList(app);
|
||||||
|
}
|
||||||
|
|
||||||
function _init_payments_manage_stripe_processor(app){
|
function _init_payments_manage_stripe_processor(app){
|
||||||
function _stop_stripe_service_submit(statusid,processor,app){
|
function _stop_stripe_service_submit(statusid,processor,app){
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
@@ -582,7 +602,7 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
// nnnnn
|
// rrrrr
|
||||||
$("#back_to_init").on("click",function(e){
|
$("#back_to_init").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
app.extra.views.payments.render('manage_processors_stripe');
|
app.extra.views.payments.render('manage_processors_stripe');
|
||||||
@@ -590,33 +610,38 @@ define([
|
|||||||
|
|
||||||
console.log(app.extra.current.stripe);
|
console.log(app.extra.current.stripe);
|
||||||
// schema_cluster.properties.json.properties.clones2.items.enum = available_clones;
|
// schema_cluster.properties.json.properties.clones2.items.enum = available_clones;
|
||||||
let processor = app.extra.current.stripe.instance.getProcessorConfiguration();
|
// let processor = app.extra.current.stripe.instance.getProcessorConfiguration();
|
||||||
|
let index = app.extra.current.stripe._processor_index;
|
||||||
|
let processor = app.extra.config.configurations.processors[index].json;
|
||||||
|
|
||||||
let val_service_port = processor.service_port;
|
// console.log(processor);
|
||||||
let val_service_end_point = processor.service_end_point;
|
|
||||||
let val_webhooks = processor.webhooks;
|
let val_service_port = ""; //processor.service_port;
|
||||||
|
let val_service_end_point = ""; //processor.service_end_point;
|
||||||
|
// let val_webhooks = processor.webhooks;
|
||||||
let val_processor = processor.processor;
|
let val_processor = processor.processor;
|
||||||
let val_mysql_id = processor.mysql_id;
|
let val_mysql_id = processor.mysql_id;
|
||||||
let val_nameid = processor.nameid;
|
let val_nameid = processor.nameid;
|
||||||
let val_category = processor.category;
|
let val_category = processor.category;
|
||||||
let val_is_my_processor = processor.val_is_my_processor;
|
let val_is_my_processor = processor.val_is_my_processor;
|
||||||
|
|
||||||
app.extra.current.stripe.instance.check(function(result){
|
// app.extra.current.stripe.instance.check(function(result){
|
||||||
run_stripe_check2(result.action, processor, app);
|
// run_stripe_check2(result.action, processor, app);
|
||||||
});
|
// });
|
||||||
|
|
||||||
console.log(app);
|
console.log(schema_processor);
|
||||||
|
// console.log(app);
|
||||||
app.extra.extras.CreateJSONScemaEditor(
|
app.extra.extras.CreateJSONScemaEditor(
|
||||||
"stripe_processor_container_id",
|
"stripe_processor_container_id",
|
||||||
schema_processor,
|
schema_processor,
|
||||||
processor,
|
processor,
|
||||||
function(editor1){
|
function(editor1){
|
||||||
|
editor1.getEditor('root.nameid').disable();
|
||||||
function _getvalues(editor1,app){
|
function _getvalues(editor1,app){
|
||||||
let newprocessor = editor1.getValue();
|
let newprocessor = editor1.getValue();
|
||||||
newprocessor.service_port = val_service_port;
|
newprocessor.service_port = val_service_port;
|
||||||
newprocessor.service_end_point = val_service_end_point;
|
newprocessor.service_end_point = val_service_end_point;
|
||||||
newprocessor.webhooks = val_webhooks;
|
// newprocessor.webhooks = val_webhooks;
|
||||||
newprocessor.processor = val_processor;
|
newprocessor.processor = val_processor;
|
||||||
newprocessor.mysql_id = val_mysql_id;
|
newprocessor.mysql_id = val_mysql_id;
|
||||||
newprocessor.nameid = val_nameid;
|
newprocessor.nameid = val_nameid;
|
||||||
@@ -891,27 +916,14 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function init_processor_form_stripe(app,view){
|
|
||||||
|
function setup_listener_form_stripe(app,view){
|
||||||
$("#processor_form_back").on("click",function(e){
|
$("#processor_form_back").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
view.render("init");
|
view.render("init");
|
||||||
});
|
});
|
||||||
|
|
||||||
let newport = app.utils.getRandomInt(9000,9999);
|
let newport = app.utils.getRandomInt(9000,9999);
|
||||||
// let newname = "v"+app.utils.randomGenerator(7);
|
|
||||||
// $("#stripe_new_service_nameid").val(newname);
|
|
||||||
// $("#stripe_new_service_port").val(newport);
|
|
||||||
|
|
||||||
let settings = app.extra.config.configurations.settings[0].json;
|
|
||||||
for(let n=0; n < settings.ports_used.length; n++){
|
|
||||||
if(newport==settings.ports_used[n].port){
|
|
||||||
newport = app.utils.getRandomInt(9000,9999);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$("#stripe_new_service_cancel").off("click");
|
$("#stripe_new_service_cancel").off("click");
|
||||||
$("#stripe_new_service_cancel").on("click",function(e){
|
$("#stripe_new_service_cancel").on("click",function(e){
|
||||||
|
|
||||||
@@ -920,48 +932,49 @@ define([
|
|||||||
|
|
||||||
$("#stripe_new_service_submit").off("click");
|
$("#stripe_new_service_submit").off("click");
|
||||||
$("#stripe_new_service_submit").on("click",function(e){
|
$("#stripe_new_service_submit").on("click",function(e){
|
||||||
// TODO: get port from afs
|
e.preventDefault();
|
||||||
let newport = app.utils.getRandomInt(9000,9999);
|
MySpinnerOn((MySpinnerOff) => {
|
||||||
let newname = "v"+app.utils.randomGenerator(7);
|
let newport = app.utils.getRandomInt(9000,9999);
|
||||||
|
let newname = "v"+app.utils.randomGenerator(7);
|
||||||
|
|
||||||
let form_client_id = $("#stripe_new_service_clientid").val();
|
let form_client_id = $("#stripe_new_service_clientid").val().trim();
|
||||||
let form_secret = $("#stripe_new_service_secret").val();
|
let form_secret = $("#stripe_new_service_secret").val().trim();
|
||||||
let form_label = $("#stripe_new_service_label").val();
|
let form_label = $("#stripe_new_service_label").val().trim();
|
||||||
let form_nameid = newname;//$("#stripe_new_service_nameid").val();
|
let form_nameid = newname;//$("#stripe_new_service_nameid").val();
|
||||||
let form_mode = $("#stripe_new_service_mode").val();
|
let form_mode = $("#stripe_new_service_mode").val().trim();
|
||||||
let form_port = newport;//$("#stripe_new_service_port").val();
|
let form_port = newport;//$("#stripe_new_service_port").val();
|
||||||
|
|
||||||
if(form_nameid=="" || form_client_id=="" || form_secret=="" || form_port=="" || form_label==""){
|
if(form_nameid=="" || form_client_id=="" || form_secret=="" || form_port=="" || form_label==""){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
let stripecopy = JSON.parse(JSON.stringify(app.extra.config.configurations.payments_systems[0].json));
|
||||||
|
stripecopy["category"] = "processors";
|
||||||
|
stripecopy["nameid"] = form_nameid;
|
||||||
|
stripecopy["client_id"] = form_client_id;
|
||||||
|
stripecopy["client_secret"] = form_secret;
|
||||||
|
stripecopy["display_name"] = form_label;
|
||||||
|
stripecopy["service_port"] = form_port;
|
||||||
|
stripecopy["mode"] = form_mode;
|
||||||
|
stripecopy["processor"] = "stripe";
|
||||||
|
|
||||||
let stripecopy = JSON.parse(JSON.stringify(GLOBAL_SETTINGS.PAYMENTS_SYSTEMS[0].json));
|
let data = {
|
||||||
stripecopy["nameid"] = form_nameid;
|
configurations_update: true,
|
||||||
stripecopy["client_id"] = form_client_id;
|
mysql_id: stripecopy.mysql_id,
|
||||||
stripecopy["client_secret"] = form_secret;
|
data: JSON.stringify(stripecopy)
|
||||||
stripecopy["display_name"] = form_label;
|
};
|
||||||
stripecopy["service_port"] = form_port;
|
|
||||||
stripecopy["mode"] = form_mode;
|
|
||||||
stripecopy["processor"] = "stripe";
|
|
||||||
|
|
||||||
let data = {
|
app.extra.config.configurations.processors.push({json:stripecopy});
|
||||||
configurations_insert: true,
|
// rrrrr
|
||||||
mysql_id: stripecopy.mysql_id,
|
$.post(app.extra.url,data,function(resp){
|
||||||
category: stripecopy.category,
|
console.log(resp);
|
||||||
reference_abbr: stripecopy.reference_abbr,
|
setTimeout(() => {
|
||||||
json: JSON.stringify(stripecopy)
|
$("#stripe_accordion_body").empty();
|
||||||
};
|
myModalAlternative.toggle();
|
||||||
|
AppendStripeList(app);
|
||||||
|
MySpinnerOff();
|
||||||
|
},500);
|
||||||
|
});
|
||||||
|
|
||||||
app.extra.config.configurations.processors.push({json:stripecopy});
|
|
||||||
|
|
||||||
console.log(app.extra.url);
|
|
||||||
console.log(stripecopy);
|
|
||||||
|
|
||||||
$.post(app.extra.url,data,function(resp){
|
|
||||||
console.log(resp);
|
|
||||||
|
|
||||||
$("#stripe_accordion_body").empty();
|
|
||||||
__setup_stripe(JSON.parse(JSON.stringify(app.extra.config.configurations.processors)),app);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
@@ -978,7 +991,7 @@ define([
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function _func_view_create_new_processor_form(app,type,cb,myModalAlternative){
|
function _func_view_create_new_processor_form(app,type,cb){
|
||||||
let view = app.factory.view();
|
let view = app.factory.view();
|
||||||
if(type=="stripe"){
|
if(type=="stripe"){
|
||||||
view.newSubView({
|
view.newSubView({
|
||||||
@@ -986,7 +999,7 @@ define([
|
|||||||
init: true,
|
init: true,
|
||||||
body: app.extra.config.html.payments_form_stripe,
|
body: app.extra.config.html.payments_form_stripe,
|
||||||
listener: function(){
|
listener: function(){
|
||||||
init_processor_form_stripe(app,view);
|
setup_listener_form_stripe(app,view);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}else if(type=="paypal"){
|
}else if(type=="paypal"){
|
||||||
@@ -995,7 +1008,7 @@ define([
|
|||||||
init: true,
|
init: true,
|
||||||
body: app.extra.config.html.payments_form_paypal,
|
body: app.extra.config.html.payments_form_paypal,
|
||||||
listener: function(){
|
listener: function(){
|
||||||
init_processor_form_paypal(app,view,cb,myModalAlternative);
|
init_processor_form_paypal(app,view,cb);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -2270,7 +2283,7 @@ define([
|
|||||||
schema_processor,
|
schema_processor,
|
||||||
pay,
|
pay,
|
||||||
function(editor1){
|
function(editor1){
|
||||||
console.log(editor1);
|
// console.log(editor1);
|
||||||
|
|
||||||
},{
|
},{
|
||||||
no_additional_properties: true
|
no_additional_properties: true
|
||||||
|
|||||||
@@ -4,19 +4,36 @@ define([
|
|||||||
function(bootstrap){
|
function(bootstrap){
|
||||||
|
|
||||||
function init(app){
|
function init(app){
|
||||||
|
if(app.extra.mail_handlers.subscribers==undefined){
|
||||||
|
app.extra.mail_handlers.subscribers = [];
|
||||||
|
}
|
||||||
|
if(app.extra.subscribers==undefined){
|
||||||
|
app.extra.subscribers = [];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
||||||
app.extra.extras.RequestCatalogs(100,function(catalogs){
|
app.extra.extras.RequestCatalogs(100,function(catalogs){
|
||||||
app.extra.extras.RequestDocuments(100,function(documents){
|
app.extra.extras.RequestDocuments(100,function(documents){
|
||||||
if(app.extra.documents==undefined){ app.extra.documents = documents; }
|
app.extra.extras.RequestMailHandlers(100,function(mail_handlers){
|
||||||
if(app.extra.catalogs==undefined){ app.extra.catalogs = catalogs; }
|
if(app.extra.documents==undefined){ app.extra.documents = documents; }
|
||||||
app.extra.catalogs = app.extra.extras.UpdateConfigurationsObject(
|
if(app.extra.catalogs==undefined){ app.extra.catalogs = catalogs; }
|
||||||
app.extra.catalogs,
|
app.extra.catalogs = app.extra.extras.UpdateConfigurationsObject(
|
||||||
app.extra.config.configurations.subscriber_catalog[0].json,
|
app.extra.catalogs,
|
||||||
app);
|
app.extra.config.configurations.subscriber_catalog[0].json,
|
||||||
|
app);
|
||||||
|
|
||||||
AFSSpinner.showFullScreen(false);
|
console.log(mail_handlers);
|
||||||
_init(app);
|
|
||||||
|
app.extra.mail_handlers.subscribers = app.extra.extras.StructureEmailHandlers(mail_handlers);
|
||||||
|
console.log(app.extra.mail_handlers.subscribers)
|
||||||
|
|
||||||
|
AFSSpinner.showFullScreen(false);
|
||||||
|
_init(app);
|
||||||
|
|
||||||
|
|
||||||
|
},app.extra.mail_handlers.subscribers, true, app, "subscriber_catalog");
|
||||||
},app.extra.documents,true,app);
|
},app.extra.documents,true,app);
|
||||||
},app.extra.catalogs,true,app);
|
},app.extra.catalogs,true,app);
|
||||||
}
|
}
|
||||||
@@ -28,9 +45,7 @@ define([
|
|||||||
let reference_num = app.extra.current.subscriber.catalog.reference_num;
|
let reference_num = app.extra.current.subscriber.catalog.reference_num;
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
setTimeout(() => { AFSSpinner.showFullScreen(false); },35000);
|
||||||
if(app.extra.subscribers==undefined){
|
|
||||||
app.extra.subscribers = [];
|
|
||||||
}
|
|
||||||
if(app.extra.catalog_articles==undefined){
|
if(app.extra.catalog_articles==undefined){
|
||||||
app.extra.catalog_articles = {};
|
app.extra.catalog_articles = {};
|
||||||
}
|
}
|
||||||
@@ -113,7 +128,7 @@ define([
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
||||||
let display_name = $("#create_new_catalog_name").val();
|
let display_name = $("#create_new_catalog_name").val().trim();
|
||||||
if(display_name==""){
|
if(display_name==""){
|
||||||
alert("Please provide catalog name");
|
alert("Please provide catalog name");
|
||||||
return;
|
return;
|
||||||
@@ -122,23 +137,24 @@ define([
|
|||||||
[app.extra.config.configurations.subscriber_catalog[0]],
|
[app.extra.config.configurations.subscriber_catalog[0]],
|
||||||
app.extra.config.configurations.subscriber_catalog[0].json,
|
app.extra.config.configurations.subscriber_catalog[0].json,
|
||||||
app);
|
app);
|
||||||
// ppppp
|
|
||||||
|
|
||||||
console.log(newCatalogJson);
|
|
||||||
|
const ref_num = "v"+app.utils.numberId(4) + "-" + app.utils.numberId(4) + "-" + app.utils.numberId(4) + "-" + app.utils.numberId(4);
|
||||||
|
|
||||||
|
newCatalogJson[0].title = display_name;
|
||||||
|
newCatalogJson[0].json.title = display_name;
|
||||||
|
newCatalogJson[0].json.reference_num = ref_num;
|
||||||
let data = {
|
let data = {
|
||||||
"admin_subscriber_create_catalog": true,
|
"admin_subscriber_create_catalog": true,
|
||||||
"title": display_name,
|
"title": display_name,
|
||||||
"reference_num": "c"+app.utils.numberId(12),
|
"reference_num": ref_num,
|
||||||
"json": JSON.stringify(newCatalogJson[0].json),
|
"json": JSON.stringify(newCatalogJson[0].json),
|
||||||
};
|
};
|
||||||
// __append_catalogs_list(app);
|
|
||||||
$("#create_new_catalog_name").val("");
|
$("#create_new_catalog_name").val("");
|
||||||
$.post(app.extra.url, data, function(resp){
|
$.post(app.extra.url, data, function(resp){
|
||||||
resp = JSON.parse(resp);
|
resp = JSON.parse(resp);
|
||||||
|
|
||||||
console.log(resp);
|
console.log(resp);
|
||||||
app.extra.catalogs.push(resp);
|
app.extra.catalogs.push(resp);
|
||||||
// console.log(app.extra.catalogs);
|
|
||||||
__append_catalogs_list(app);
|
__append_catalogs_list(app);
|
||||||
AFSSpinner.showFullScreen(false);
|
AFSSpinner.showFullScreen(false);
|
||||||
modal.toggle();
|
modal.toggle();
|
||||||
@@ -161,16 +177,23 @@ define([
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
modal.toggle();
|
modal.toggle();
|
||||||
});
|
});
|
||||||
$("#catalogs_configure_btn").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
app.extra.views.subscriber.render("settings");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function init_settings_email(app){
|
||||||
|
_init_settings_email(app);
|
||||||
|
}
|
||||||
|
|
||||||
function init_mangage(app){
|
function init_mangage(app){
|
||||||
_init_mangage(app);
|
app.extra.extras.RequestSubscribers(500,function(subscribers){
|
||||||
|
console.log(subscribers);
|
||||||
|
app.extra.subscribers = app.extra.subscribers.concat(subscribers);;
|
||||||
|
_init_mangage(app);
|
||||||
|
},app.extra.subscribers , false, app);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function init_article_editor2(app){
|
function init_article_editor2(app){
|
||||||
_init_article_editor2(app)
|
_init_article_editor2(app)
|
||||||
@@ -178,14 +201,10 @@ define([
|
|||||||
function init_configure_catalogs(app){
|
function init_configure_catalogs(app){
|
||||||
_init_configure_catalogs(app);
|
_init_configure_catalogs(app);
|
||||||
}
|
}
|
||||||
function init_settings(app){
|
function init_catalog_settings(app){
|
||||||
_init_settings(app);
|
_init_catalog_settings(app);
|
||||||
}
|
|
||||||
function init_email(app){
|
|
||||||
_init_email(app);
|
|
||||||
}
|
}
|
||||||
function init_manage_subscriber(app){
|
function init_manage_subscriber(app){
|
||||||
StopEditorInterval(app);
|
|
||||||
_init_manage_subscriber(app);
|
_init_manage_subscriber(app);
|
||||||
}
|
}
|
||||||
function init_article_editor(app){
|
function init_article_editor(app){
|
||||||
@@ -196,7 +215,7 @@ define([
|
|||||||
function _init_catalog_overview(app){
|
function _init_catalog_overview(app){
|
||||||
function isSubscriberActiveForCurrentCatalog(subscriber,app){
|
function isSubscriberActiveForCurrentCatalog(subscriber,app){
|
||||||
let isActive = false;
|
let isActive = false;
|
||||||
console.log(subscriber);
|
// console.log(subscriber);
|
||||||
for (let v = 0; v < subscriber.json.catalogs.length; v++) {
|
for (let v = 0; v < subscriber.json.catalogs.length; v++) {
|
||||||
if(subscriber.json.catalogs[v].reference_num == app.extra.current.subscriber.catalog.reference_num){
|
if(subscriber.json.catalogs[v].reference_num == app.extra.current.subscriber.catalog.reference_num){
|
||||||
isActive = subscriber.json.catalogs[v].active;
|
isActive = subscriber.json.catalogs[v].active;
|
||||||
@@ -243,7 +262,7 @@ define([
|
|||||||
app.extra.current.subscriber.ids = ids;
|
app.extra.current.subscriber.ids = ids;
|
||||||
for (let m = 0; m < ids.length; m++) {
|
for (let m = 0; m < ids.length; m++) {
|
||||||
const element = ids[m];
|
const element = ids[m];
|
||||||
console.log(app.extra.subscribers[ids[m].index])
|
// console.log(app.extra.subscribers[ids[m].index])
|
||||||
$(`#${element.id}`).on("change",function(e){
|
$(`#${element.id}`).on("change",function(e){
|
||||||
let is_checked = document.getElementById(element.id).checked;
|
let is_checked = document.getElementById(element.id).checked;
|
||||||
for (let v = 0; v < app.extra.subscribers[ids[m].index].json.catalogs.length; v++) {
|
for (let v = 0; v < app.extra.subscribers[ids[m].index].json.catalogs.length; v++) {
|
||||||
@@ -263,7 +282,7 @@ define([
|
|||||||
// console.log(app.extra.catalog_articles);
|
// console.log(app.extra.catalog_articles);
|
||||||
$("#catalog_title").append(app.extra.current.subscriber.catalog.json.display_name);
|
$("#catalog_title").append(app.extra.current.subscriber.catalog.json.display_name);
|
||||||
function __append_articles_list(app){
|
function __append_articles_list(app){
|
||||||
// ppppp
|
|
||||||
let articles = app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num]; //app.extra.current.subscriber.catalog.json.articles;
|
let articles = app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num]; //app.extra.current.subscriber.catalog.json.articles;
|
||||||
let listHtml = "";
|
let listHtml = "";
|
||||||
let ids = [];
|
let ids = [];
|
||||||
@@ -312,7 +331,7 @@ define([
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
console.log(ids[i]);
|
console.log(ids[i]);
|
||||||
// modal_form_article_title_name_input
|
// modal_form_article_title_name_input
|
||||||
let newtitle = $("#modal_form_article_title_name_input").val();
|
let newtitle = $("#modal_form_article_title_name_input").val().trim();
|
||||||
if(newtitle=="" || newtitle.length < 2) { alert("Cannot be empty or less to 2 characters"); return;}
|
if(newtitle=="" || newtitle.length < 2) { alert("Cannot be empty or less to 2 characters"); return;}
|
||||||
|
|
||||||
UpdateCatagoryArticle(app,ids[i].article_config.reference_num,{title: newtitle});
|
UpdateCatagoryArticle(app,ids[i].article_config.reference_num,{title: newtitle});
|
||||||
@@ -380,7 +399,7 @@ define([
|
|||||||
$("#submit_new_article_name").on("click",function(e){
|
$("#submit_new_article_name").on("click",function(e){
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let article_name = $("#article_name").val();
|
let article_name = $("#article_name").val().trim();
|
||||||
if(article_name==""){
|
if(article_name==""){
|
||||||
alert("Please enter an article name.");
|
alert("Please enter an article name.");
|
||||||
return;
|
return;
|
||||||
@@ -400,7 +419,7 @@ define([
|
|||||||
__append_articles_list(app);
|
__append_articles_list(app);
|
||||||
setTimeout(() => { AFSSpinner.showFullScreen(false); },3000);
|
setTimeout(() => { AFSSpinner.showFullScreen(false); },3000);
|
||||||
|
|
||||||
// ppppp
|
|
||||||
CreateArticle(newArticleConfig,app,function(article){
|
CreateArticle(newArticleConfig,app,function(article){
|
||||||
app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num].push(article);
|
app.extra.catalog_articles[app.extra.current.subscriber.catalog.reference_num].push(article);
|
||||||
__append_articles_list(app);
|
__append_articles_list(app);
|
||||||
@@ -475,14 +494,18 @@ define([
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
app.extra.views.subscriber.render("manage_catalogs");
|
app.extra.views.subscriber.render("manage_catalogs");
|
||||||
});
|
});
|
||||||
|
$("#catalog_settings_btn").on("click",function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
app.extra.views.subscriber.render("catalog_settings");
|
||||||
|
});
|
||||||
|
|
||||||
$("#modal_update_category_btn").off("click");
|
$("#modal_update_category_btn").off("click");
|
||||||
$("#modal_update_category_btn").on("click",function(e){
|
$("#modal_update_category_btn").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
let _display_name = $("#update_new_catalog_name").val();
|
let _display_name = $("#update_new_catalog_name").val().trim();
|
||||||
let _short_desc = $("#update_new_catalog_short_description").val();
|
let _short_desc = $("#update_new_catalog_short_description").val().trim();
|
||||||
let _description = $("#update_new_catalog_description").val();
|
let _description = $("#update_new_catalog_description").val().trim();
|
||||||
|
|
||||||
if(_display_name==""){
|
if(_display_name==""){
|
||||||
alert("Display name cannot be empty");
|
alert("Display name cannot be empty");
|
||||||
@@ -503,7 +526,73 @@ define([
|
|||||||
});
|
});
|
||||||
SetupCatalogOverview(app);
|
SetupCatalogOverview(app);
|
||||||
|
|
||||||
|
// console.log(app.extra.current.subscriber);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
function _init_catalog_settings(app){
|
||||||
|
$("#back_to_init").on("click",function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
app.extra.views.subscriber.render("catalog_overview");
|
||||||
|
});
|
||||||
|
|
||||||
|
function CreateSubmissionVariables(app){
|
||||||
|
let index = app.extra.current.forms.form_index;
|
||||||
|
let submission_variables = [];
|
||||||
|
for (let i = 0; i < app.extra.config.forms[index].json.form_data.pages.length; i++) {
|
||||||
|
const page = app.extra.config.forms[index].json.form_data.pages[i];
|
||||||
|
for (let n = 0; n < page.elements.length; n++) {
|
||||||
|
const element = page.elements[n];
|
||||||
|
submission_variables.push({
|
||||||
|
name: element.name,
|
||||||
|
value: ""
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return submission_variables;
|
||||||
|
}
|
||||||
|
|
||||||
|
let catalog = app.extra.catalogs[app.extra.current.subscriber.catalog_index];
|
||||||
|
let mail_handler = app.extra.extras.SortEmailHandlersIntoItem(app.extra.mail_handlers.subscribers, catalog.json.reference_num);
|
||||||
|
|
||||||
|
|
||||||
|
// rrrrr
|
||||||
|
$("#email_manager").on("click",function(e){
|
||||||
|
e.preventDefault();
|
||||||
|
app.extra.current._emailbuilder.handler = mail_handler;
|
||||||
|
app.extra.views.subscriber.render("manage_email");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function _init_settings_email(app){
|
||||||
|
let catalog = app.extra.catalogs[app.extra.current.subscriber.catalog_index];
|
||||||
|
// console.log(catalog);
|
||||||
|
app.extra.extras.InitializeEmailCreatorDashboard2(app.extra.current._emailbuilder.handler,
|
||||||
|
function(view){
|
||||||
|
},
|
||||||
|
function(handler,handlers){
|
||||||
|
AFSSpinner.showFullScreen(true);
|
||||||
|
if(handlers!=undefined && handlers!=null){
|
||||||
|
|
||||||
|
// console.log(catalog);
|
||||||
|
app.extra.extras.SaveMailHandlers(
|
||||||
|
catalog.json.category,
|
||||||
|
catalog.json.reference_num,
|
||||||
|
handlers, app, function(resp,subs){
|
||||||
|
AFSSpinner.showFullScreen(false);
|
||||||
|
app.extra.mail_handlers.subscribers = subs;
|
||||||
|
|
||||||
|
},app.extra.mail_handlers.subscribers);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
function(emailobj){
|
||||||
|
// console.log(emailobj);
|
||||||
|
app.extra.views.subscriber.render("catalog_settings");
|
||||||
|
},app,"#email_manager_contaner",catalog.json.reference_num);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -511,13 +600,14 @@ define([
|
|||||||
function _init_mangage(app){
|
function _init_mangage(app){
|
||||||
goBack(app);
|
goBack(app);
|
||||||
|
|
||||||
|
|
||||||
function _TableRowHtml(title,ref,id){
|
function _TableRowHtml(title,ref,id){
|
||||||
return `
|
return `
|
||||||
<tr>
|
<tr>
|
||||||
<td>${title}</td>
|
<td>${title}</td>
|
||||||
<td><a id="${id}" href="#">Edit</a></td>
|
<td><a id="${id}" href="#">Edit</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
function _TableHtml(content){
|
function _TableHtml(content){
|
||||||
return `
|
return `
|
||||||
@@ -543,12 +633,8 @@ define([
|
|||||||
let ids = [];
|
let ids = [];
|
||||||
let table = "";
|
let table = "";
|
||||||
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]);
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]);
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]);
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.subscribers.push(app.extra.config.configurations.subscriber[0]);
|
|
||||||
|
|
||||||
// loop through each catalog's subscriber list
|
// loop through each catalog's subscriber list
|
||||||
|
// console.log(app.extra.subscribers);
|
||||||
for (let i = 0; i < app.extra.subscribers.length; i++) {
|
for (let i = 0; i < app.extra.subscribers.length; i++) {
|
||||||
const subscriber = app.extra.subscribers[i];
|
const subscriber = app.extra.subscribers[i];
|
||||||
// CleanAndValidateSubscriberList(i,app);
|
// CleanAndValidateSubscriberList(i,app);
|
||||||
@@ -557,7 +643,7 @@ define([
|
|||||||
table += _TableRowHtml(subscriber.email,"",id);
|
table += _TableRowHtml(subscriber.email,"",id);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(table);
|
// console.log(table);
|
||||||
|
|
||||||
$("#subscriber_list_container").empty();
|
$("#subscriber_list_container").empty();
|
||||||
$("#subscriber_list_container").append(_TableHtml(table));
|
$("#subscriber_list_container").append(_TableHtml(table));
|
||||||
@@ -571,86 +657,100 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ppppp
|
||||||
$("#add_subscriber_btn").on("click",function(e){
|
$("#add_subscriber_btn").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let new_subscriber_email = $("#add_email_subscriber_input").val();
|
let new_subscriber_email = $("#add_email_subscriber_input").val().trim();
|
||||||
if(new_subscriber_email==""){
|
if(new_subscriber_email==""){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
let found = false;
|
||||||
|
for (let n = 0; n < app.extra.subscribers.length; n++) {
|
||||||
|
if(app.extra.subscribers[n].email==new_subscriber_email){
|
||||||
|
|
||||||
|
app.extra.current.subscriber.selected_subscriber = {
|
||||||
|
obj: app.extra.subscribers[n],
|
||||||
|
index: n
|
||||||
|
};
|
||||||
|
const index = app.extra.current.subscriber.selected_subscriber.obj.index;
|
||||||
|
app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj;
|
||||||
|
app.extra.views.subscriber.render("manage_subscriber");requestAnimationFrame;
|
||||||
|
found = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
let sub = {name:"",email:new_subscriber_email,active:false};
|
if(found) return;
|
||||||
for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) {
|
|
||||||
app.extra.config.configurations.subscriber[n].json.subscribers.unshift(sub);
|
let s = new AFSSdk.AFSSubscriber();
|
||||||
}
|
let newsub = s.initializeSubscriber(new_subscriber_email,"","").buildSubscriber();
|
||||||
app.extra.current.subscriber.selected_subscriber = {obj:sub};
|
// console.log(newsub);
|
||||||
app.extra.views.subscriber.render("manage_subscriber");
|
app.extra.subscribers.push(newsub);
|
||||||
|
app.extra.current.subscriber.selected_subscriber = {
|
||||||
|
obj:newsub,
|
||||||
|
index:(app.extra.subscribers.length-1)
|
||||||
|
};
|
||||||
|
|
||||||
|
$.post(app.extra.url,{
|
||||||
|
"admin_subscriber_update_subscriber": true,
|
||||||
|
"subscriber": JSON.stringify(app.extra.current.subscriber.selected_subscriber.obj)
|
||||||
|
},function(resp){
|
||||||
|
resp = JSON.parse(resp);
|
||||||
|
console.log(resp);
|
||||||
|
const index = app.extra.current.subscriber.selected_subscriber.obj.index;
|
||||||
|
app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj;
|
||||||
|
app.extra.views.subscriber.render("manage_subscriber");
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function _init_manage_subscriber(app){
|
function _init_manage_subscriber(app){
|
||||||
let selected_email = app.extra.current.subscriber.selected_subscriber.obj.email;
|
let selected_email = app.extra.current.subscriber.selected_subscriber.obj.email;
|
||||||
let obj = manage_build_sub(selected_email,app);
|
let obj = manage_build_sub(selected_email,app);
|
||||||
let ids = obj.ids;
|
let ids = obj.ids;
|
||||||
let html = obj.html;
|
let html = obj.html;
|
||||||
|
|
||||||
$("#back_to_init").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
app.extra.views.subscriber.render("manage");
|
|
||||||
});
|
|
||||||
|
|
||||||
$("#subscriber_container_data").empty();
|
|
||||||
$("#subscriber_container_data").append(html);
|
|
||||||
|
|
||||||
|
|
||||||
$("#subscriber_main_header").text(selected_email);
|
console.log(app.extra.current.subscriber.selected_subscriber);
|
||||||
|
|
||||||
$("#update_subscriber_subscriptions").on("click",function(e){
|
$("#back_to_init").on("click",function(e){
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
AFSSpinner.showFullScreen(true);
|
app.extra.views.subscriber.render("manage");
|
||||||
$("#update_subscriber_subscriptions").prop("disabled",true);
|
});
|
||||||
setTimeout(() => {
|
|
||||||
$("#update_subscriber_subscriptions").prop("disabled",false);
|
|
||||||
AFSSpinner.showFullScreen(false);
|
|
||||||
},25000);
|
|
||||||
|
|
||||||
for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) {
|
$("#subscriber_container_data").empty();
|
||||||
const catalog = app.extra.config.configurations.subscriber[n].json;
|
$("#subscriber_container_data").append(html);
|
||||||
for (let i = 0; i < ids.length; i++) {
|
$("#subscriber_main_header").text(selected_email);
|
||||||
const element = ids[i];
|
|
||||||
if(element.obj.catalog_ref==catalog.reference_num){
|
$("#update_subscriber_subscriptions").on("click",function(e){
|
||||||
for (let v = 0; v < catalog.subscribers.length; v++) {
|
for (let i = 0; i < ids.length; i++) {
|
||||||
const sub = catalog.subscribers[v];
|
const element = ids[i];
|
||||||
if(sub.email==selected_email){
|
let radioValue = $("input[id='"+element.id+"']:checked").val();
|
||||||
let radioValue = $("input[id='"+element.id+"']:checked").val();
|
let ischecked = false;
|
||||||
if(radioValue!=undefined && radioValue=="on"){
|
if(radioValue!=undefined && radioValue=="on"){
|
||||||
app.extra.config.configurations.subscriber[n].json.subscribers[v].active = true;
|
ischecked = true;
|
||||||
}else{
|
|
||||||
app.extra.config.configurations.subscriber[n].json.subscribers[v].active = false;
|
|
||||||
}
|
|
||||||
console.log(app.extra.config.configurations.subscriber[n]);
|
|
||||||
}
|
}
|
||||||
}
|
console.log(app.extra.current.subscriber.selected_subscriber.obj);
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let n = 0; n < app.extra.config.configurations.subscriber.length; n++) {
|
// console.log(element);
|
||||||
let senddata = {
|
|
||||||
configurations_update:true,
|
|
||||||
mysql_id: app.extra.config.configurations.subscriber[n].json.mysql_id,
|
|
||||||
data: JSON.stringify(app.extra.config.configurations.subscriber[n].json)
|
|
||||||
}
|
|
||||||
$.post(app.extra.url,senddata,function(resp){
|
|
||||||
if(n==app.extra.config.configurations.subscriber.length-1){
|
|
||||||
console.log(resp);
|
|
||||||
AFSSpinner.showFullScreen(false);
|
|
||||||
$("#update_subscriber_subscriptions").prop("disabled",true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
app.extra.current.subscriber.selected_subscriber.obj.json.catalogs[i] = {
|
||||||
|
reference_num: element.catalog.json.reference_num,
|
||||||
|
active: ischecked
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
$.post(app.extra.url,{
|
||||||
|
"admin_subscriber_update_subscriber": true,
|
||||||
|
"subscriber": JSON.stringify(app.extra.current.subscriber.selected_subscriber.obj)
|
||||||
|
},function(resp){
|
||||||
|
resp = JSON.parse(resp);
|
||||||
|
console.log(resp);
|
||||||
|
const index = app.extra.current.subscriber.selected_subscriber.obj.index;
|
||||||
|
app.extra.subscribers[index] = app.extra.current.subscriber.selected_subscriber.obj;
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
function _init_configure_catalogs(app){
|
function _init_configure_catalogs(app){
|
||||||
@@ -675,7 +775,7 @@ define([
|
|||||||
$("#from_email_select").val(app.extra.current.subscriber.article.data.email.from);
|
$("#from_email_select").val(app.extra.current.subscriber.article.data.email.from);
|
||||||
$("#from_email_select").on("change",function(e){
|
$("#from_email_select").on("change",function(e){
|
||||||
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
||||||
let email_from = $("#from_email_select").val();
|
let email_from = $("#from_email_select").val().trim();
|
||||||
let cata = app.extra.current.subscriber.catalog.json;
|
let cata = app.extra.current.subscriber.catalog.json;
|
||||||
cata = app.extra.instances.subscriber.setGlobalConfig("from_email",email_from,cata);
|
cata = app.extra.instances.subscriber.setGlobalConfig("from_email",email_from,cata);
|
||||||
app.extra.current.subscriber.catalog.json = cata;
|
app.extra.current.subscriber.catalog.json = cata;
|
||||||
@@ -756,71 +856,7 @@ define([
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
function _init_settings(app){
|
|
||||||
function CreateSubmissionVariables(app){
|
|
||||||
let submission_variables = [];
|
|
||||||
// TODO_3: Events Submission variables
|
|
||||||
// for (let i = 0; i < app.extra.config.forms[index].json.form_data.pages.length; i++) {
|
|
||||||
// const page = app.extra.config.forms[index].json.form_data.pages[i];
|
|
||||||
// for (let n = 0; n < page.elements.length; n++) {
|
|
||||||
// const element = page.elements[n];
|
|
||||||
// submission_variables.push({
|
|
||||||
// name: element.name,
|
|
||||||
// value: ""
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
return submission_variables;
|
|
||||||
}
|
|
||||||
$("#back_to_init").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
app.extra.views.subscriber.render("manage_catalogs");
|
|
||||||
});
|
|
||||||
|
|
||||||
if(app.extra.config.configurations.subscriber[1].json.mail_handlers==undefined){
|
|
||||||
app.extra.config.configurations.subscriber[1].json.mail_handlers = {
|
|
||||||
email_response: app.extra.config.configurations.mail_handler[0].json.handler,
|
|
||||||
email_alert: app.extra.config.configurations.mail_handler[0].json.handler
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response.variables.schema[0] =
|
|
||||||
// app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response.variables.schema[0][0];
|
|
||||||
|
|
||||||
|
|
||||||
$("#edit_repsonse_content_id").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
let response = app.extra.config.configurations.subscriber[1].json.mail_handlers.email_response;
|
|
||||||
app.extra.current._emailbuilder.submission_variables = CreateSubmissionVariables(app);
|
|
||||||
app.extra.current._emailbuilder.type = "email_response";
|
|
||||||
app.extra.current._emailbuilder.email = response;
|
|
||||||
app.extra.views.subscriber.render("manage_email");
|
|
||||||
});
|
|
||||||
$("#edit_alert_content_id").on("click",function(e){
|
|
||||||
e.preventDefault();
|
|
||||||
let alert = app.extra.config.configurations.subscriber[1].json.mail_handlers.email_alert;
|
|
||||||
app.extra.current._emailbuilder.submission_variables = CreateSubmissionVariables(app);
|
|
||||||
app.extra.current._emailbuilder.type = "email_alert";
|
|
||||||
app.extra.current._emailbuilder.email = alert;
|
|
||||||
app.extra.views.subscriber.render("manage_email");
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
function _init_email(app){
|
|
||||||
let email = app.extra.current._emailbuilder.email;
|
|
||||||
app.extra.extras.InitializeEmailCreatorDashboard(email,[],function(view){
|
|
||||||
},function(emailobj){
|
|
||||||
const key = app.extra.current._emailbuilder.type;
|
|
||||||
app.extra.config.configurations.subscriber[1].json.mail_handlers[key] = emailobj;
|
|
||||||
app.extra.extras.SaveConfiguration(app.extra.config.configurations.subscriber[1].json,app,function(){
|
|
||||||
|
|
||||||
});
|
|
||||||
},function(emailobj){
|
|
||||||
app.extra.current._emailbuilder.type = null;
|
|
||||||
app.extra.current._emailbuilder.email = null;
|
|
||||||
app.extra.views.subscriber.render("settings");
|
|
||||||
},app,"#email_manager_contaner");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
function _init_article_editor2(app){
|
function _init_article_editor2(app){
|
||||||
@@ -870,7 +906,7 @@ define([
|
|||||||
$("#delivery_from_email_select").append(options_html);
|
$("#delivery_from_email_select").append(options_html);
|
||||||
$("#delivery_from_email_select").on("change",function(e){
|
$("#delivery_from_email_select").on("change",function(e){
|
||||||
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
||||||
let email_from = $("#delivery_from_email_select").val();
|
let email_from = $("#delivery_from_email_select").val().trim();
|
||||||
app.extra.current.subscriber.article.data.email.from = email_from;
|
app.extra.current.subscriber.article.data.email.from = email_from;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -883,7 +919,7 @@ define([
|
|||||||
|
|
||||||
$("#article_name").on("focusout",function(e){
|
$("#article_name").on("focusout",function(e){
|
||||||
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
// let typeValue = Number($("input[name='delivery_from_email_select']:checked").val());
|
||||||
let email_subject = $("#article_name").val();
|
let email_subject = $("#article_name").val().trim();
|
||||||
console.log(email_subject);
|
console.log(email_subject);
|
||||||
app.extra.current.subscriber.article.data.email.subject = email_subject;
|
app.extra.current.subscriber.article.data.email.subject = email_subject;
|
||||||
});
|
});
|
||||||
@@ -1284,7 +1320,6 @@ define([
|
|||||||
"value": subscriber.name
|
"value": subscriber.name
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
// ppppp
|
|
||||||
"name": "unsubscribe",
|
"name": "unsubscribe",
|
||||||
"value": app.extra.config.managed_domain.Address +
|
"value": app.extra.config.managed_domain.Address +
|
||||||
`/mod/sub/subprefs.php?reference_num=${subscriber.email}&email=${subscriber.email}`
|
`/mod/sub/subprefs.php?reference_num=${subscriber.email}&email=${subscriber.email}`
|
||||||
@@ -1630,7 +1665,6 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function CreateArticle(newArticleConfig,app,cb){
|
function CreateArticle(newArticleConfig,app,cb){
|
||||||
// ppppp
|
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
||||||
let send = {
|
let send = {
|
||||||
@@ -1647,7 +1681,7 @@ define([
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
function SaveArticle(article,app,cb){
|
function SaveArticle(article,app,cb){
|
||||||
// ppppp
|
|
||||||
AFSSpinner.showFullScreen(true);
|
AFSSpinner.showFullScreen(true);
|
||||||
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
setTimeout(() => {AFSSpinner.showFullScreen(false);},35000);
|
||||||
let send = {
|
let send = {
|
||||||
@@ -1844,18 +1878,18 @@ define([
|
|||||||
return catalog;
|
return catalog;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
function ListCreateLI(id,content){
|
function ListCreateLI(id,content){
|
||||||
return `
|
return `
|
||||||
<li class="list-group-item list-group-item-action">
|
<li class="list-group-item list-group-item-action">
|
||||||
<a id="${id}" href="#">${content}</a>
|
<a id="${id}" href="#">${content}</a>
|
||||||
</li>
|
</li>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
function ListCreateUL(id,content){
|
function ListCreateUL(id,content){
|
||||||
return `<ul class="list-group list-group-flush" id="${id}">${content}</ul>`;
|
return `<ul class="list-group list-group-flush" id="${id}">${content}</ul>`;
|
||||||
}
|
}
|
||||||
function TableRowHtml(title,ref,id){
|
function TableRowHtml(title,ref,id){
|
||||||
return `
|
return `
|
||||||
<tr>
|
<tr>
|
||||||
<td>${title}</td>
|
<td>${title}</td>
|
||||||
@@ -1863,8 +1897,8 @@ define([
|
|||||||
<td><a id="${id}" href="#">Edit</a></td>
|
<td><a id="${id}" href="#">Edit</a></td>
|
||||||
</tr>
|
</tr>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
function TableHtml(content){
|
function TableHtml(content){
|
||||||
return `
|
return `
|
||||||
|
|
||||||
<div class="table-responsive">
|
<div class="table-responsive">
|
||||||
@@ -1909,55 +1943,42 @@ define([
|
|||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
// ppppp
|
||||||
let ids = [];
|
let ids = [];
|
||||||
let subscribers_list = [];
|
let subscribers_list = [];
|
||||||
let items = "";
|
let items = "";
|
||||||
for (let i = 0; i < app.extra.config.configurations.subscriber.length; i++) {
|
let subscribers_catalogs = [];
|
||||||
const catalog = app.extra.config.configurations.subscriber[i].json;
|
const sub_catalogs = app.extra.current.subscriber.selected_subscriber.obj.json.catalogs;
|
||||||
let found = false;
|
for (let i = 0; i < app.extra.catalogs.length; i++) {
|
||||||
let inputid = "m"+app.utils.randomGenerator(12);
|
const catalog = app.extra.catalogs[i];
|
||||||
let checked = "";
|
let found = false;
|
||||||
let _sub = null;
|
let inputid = "m"+app.utils.randomGenerator(12);
|
||||||
let duplicates = [];
|
let isChecked = false;
|
||||||
for (let n = 0; n < catalog.subscribers.length; n++) {
|
let checked = "";
|
||||||
const sub = catalog.subscribers[n];
|
let current_sub = {};
|
||||||
if(sub.email==selected_email){
|
let title = catalog.title;
|
||||||
if(found){
|
for (let n = 0; n < sub_catalogs.length; n++) {
|
||||||
duplicates.push(n);
|
const sub_catalog = sub_catalogs[n];
|
||||||
continue;
|
if(catalog.json.reference_num==sub_catalog.reference_num){
|
||||||
}
|
found = true;
|
||||||
found = true;
|
current_sub = catalog;
|
||||||
sub.catalog_ref = catalog.reference_num;
|
}
|
||||||
sub.catalog_display_name = catalog.display_name;
|
if(catalog.json.reference_num==sub_catalog.reference_num && sub_catalog.active==true){
|
||||||
let title = catalog.display_name;
|
isChecked = true;
|
||||||
subscribers_list.push(sub);
|
checked = "checked";
|
||||||
if(sub.active==true){
|
break;
|
||||||
checked = "checked";
|
}
|
||||||
}
|
|
||||||
items += item_html(title,inputid,checked);
|
|
||||||
ids.push({id:inputid,obj:sub,index:n});
|
|
||||||
}
|
}
|
||||||
}
|
|
||||||
if(found==false){
|
|
||||||
let sub = {
|
|
||||||
name:'',
|
|
||||||
email:selected_email,
|
|
||||||
active:false,
|
|
||||||
catalog_ref: catalog.reference_num,
|
|
||||||
catalog_display_name: catalog.display_name
|
|
||||||
};
|
|
||||||
app.extra.config.configurations.subscriber[i].json.subscribers.push(sub);
|
|
||||||
items += item_html(catalog.display_name,inputid,checked);
|
|
||||||
ids.push({id:inputid,obj:sub,index:i});
|
|
||||||
}
|
|
||||||
|
|
||||||
// delete duplicate subscribers in 1 catalog
|
items += item_html(title,inputid,checked);
|
||||||
duplicates = duplicates.reverse();
|
ids.push({
|
||||||
for (let x = 0; x < duplicates.length; x++) {
|
id:inputid,
|
||||||
let index = duplicates[x];
|
catalog: catalog,
|
||||||
if(x!=0){ index = (duplicates[x]-1); }
|
index:i
|
||||||
app.extra.config.configurations.subscriber[i].json.subscribers.splice(index,1);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
let html = items_html(items);
|
let html = items_html(items);
|
||||||
@@ -2105,9 +2126,9 @@ define([
|
|||||||
init_manage:init_mangage,
|
init_manage:init_mangage,
|
||||||
init_manage_subscriber:init_manage_subscriber,
|
init_manage_subscriber:init_manage_subscriber,
|
||||||
init_configure_catalogs:init_configure_catalogs,
|
init_configure_catalogs:init_configure_catalogs,
|
||||||
init_settings:init_settings,
|
init_catalog_settings:init_catalog_settings,
|
||||||
init_email:init_email,
|
init_article_editor2:init_article_editor2,
|
||||||
init_article_editor2:init_article_editor2
|
init_settings_email:init_settings_email
|
||||||
}
|
}
|
||||||
});// !!!END!!!
|
});// !!!END!!!
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@ define([],function () {
|
|||||||
"name": {"type":"string"},
|
"name": {"type":"string"},
|
||||||
"processor_nameid": {
|
"processor_nameid": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
"default": "",
|
||||||
"enum": []
|
"enum": []
|
||||||
},
|
},
|
||||||
"processor_name": {"type":"string"},
|
"processor_name": {"type":"string"},
|
||||||
|
|||||||
@@ -10,13 +10,25 @@ define([],function () {
|
|||||||
},
|
},
|
||||||
"properties": {
|
"properties": {
|
||||||
// "mysql_id": {"type":"number"},
|
// "mysql_id": {"type":"number"},
|
||||||
// "nameid": {"type":"string"},
|
"nameid": {
|
||||||
|
"type": "string",
|
||||||
|
"properties": {
|
||||||
|
"inputAttributes": {
|
||||||
|
"placeholder": "your name here...",
|
||||||
|
"class": "myclass"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"active": {
|
||||||
|
"type": "string",
|
||||||
|
"enum": ["true","false"]
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
"display_name": {"type":"string"},
|
"display_name": {"type":"string"},
|
||||||
"active": {"type":"boolean"},
|
// "active": {"type":"boolean"},
|
||||||
// "active": {
|
|
||||||
// "type": "number",
|
|
||||||
// "enum": [0,1]
|
|
||||||
// },
|
|
||||||
"mode": {
|
"mode": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": [
|
"enum": [
|
||||||
@@ -35,6 +47,8 @@ define([],function () {
|
|||||||
// "reference_abbr": {"type":"string"},
|
// "reference_abbr": {"type":"string"},
|
||||||
"client_id": {"type":"string"},
|
"client_id": {"type":"string"},
|
||||||
"client_secret": {"type":"string"},
|
"client_secret": {"type":"string"},
|
||||||
|
"webhook_secret": {"type":"string"},
|
||||||
|
"webhook_url": {"type":"string"},
|
||||||
// "is_my_processor": {"type":"boolean"},
|
// "is_my_processor": {"type":"boolean"},
|
||||||
// "service_port": {"type":"string"},
|
// "service_port": {"type":"string"},
|
||||||
// "service_end_point": {"type":"string"},
|
// "service_end_point": {"type":"string"},
|
||||||
|
|||||||
@@ -84,6 +84,60 @@ class AppCore {
|
|||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function _getIPAddress(){
|
||||||
|
|
||||||
|
$ip = $_GET['ip'];
|
||||||
|
// $ip = "207.126.212.3";
|
||||||
|
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
|
||||||
|
if($query && $query['status'] == 'success')
|
||||||
|
{
|
||||||
|
|
||||||
|
EchoJsonObject([
|
||||||
|
'access' => 'success',
|
||||||
|
'city' => $query['city'],
|
||||||
|
'zip' => $query['zip'],
|
||||||
|
'state' => $query['region']
|
||||||
|
]);
|
||||||
|
// echo 'Your City is ' . $query['city'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your State is ' . $query['region'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your Zipcode is ' . $query['zip'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your Coordinates are ' . $query['lat'] . ', ' . $query['lon'];
|
||||||
|
|
||||||
|
|
||||||
|
// echo '<br />';
|
||||||
|
// echo $_SERVER['REMOTE_ADDR'];
|
||||||
|
}else{
|
||||||
|
EchoJsonObject([
|
||||||
|
'access' => 'failure',
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
// echo '<br />';
|
||||||
|
// echo '<br />';
|
||||||
|
// echo '<br />';
|
||||||
|
|
||||||
|
// $query = @unserialize(file_get_contents('http://ip-api.com/php/'.$_SERVER['REMOTE_ADDR']));
|
||||||
|
// if($query && $query['status'] == 'success')
|
||||||
|
// {
|
||||||
|
// echo 'Your City is ' . $query['city'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your State is ' . $query['region'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your Zipcode is ' . $query['zip'];
|
||||||
|
// echo '<br />';
|
||||||
|
// echo 'Your Coordinates are ' . $query['lat'] . ', ' . $query['lon'];
|
||||||
|
|
||||||
|
|
||||||
|
// echo '<br />';
|
||||||
|
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public function send_email(){
|
public function send_email(){
|
||||||
// ApiCheck(function($header_set,$status,$decoded){
|
// ApiCheck(function($header_set,$status,$decoded){
|
||||||
|
|||||||
@@ -33,15 +33,25 @@ class Membership {
|
|||||||
$domain = get_subdomain_managed_domain_new_way($subdomain);
|
$domain = get_subdomain_managed_domain_new_way($subdomain);
|
||||||
|
|
||||||
$username = \Input::get("username");
|
$username = \Input::get("username");
|
||||||
|
|
||||||
|
if($username==""){
|
||||||
|
$payload = json_decode(@file_get_contents('php://input'), true);
|
||||||
|
$username = $payload["username"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// $nameid = \Input::get("nameid");
|
// $nameid = \Input::get("nameid");
|
||||||
$db = new \DB();
|
$db = new \DB();
|
||||||
$rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'");
|
$rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'",[], \PDO::FETCH_ASSOC);
|
||||||
$member = ["set"=>false,"username"=>$username];
|
$member = ["set"=>false,"username"=>$username];
|
||||||
if($rows->count() > 0){
|
if($rows->count() > 0){
|
||||||
$member = $rows->results()[0];
|
$member = $rows->results()[0];
|
||||||
|
$member["json_data"] = json_decode(html_entity_decode($member["json_data"]),true);
|
||||||
}
|
}
|
||||||
$db = null;
|
$db = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$config_domain = __get_main_configurations();
|
$config_domain = __get_main_configurations();
|
||||||
$managed_domain = $config_domain["managed_domain"];
|
$managed_domain = $config_domain["managed_domain"];
|
||||||
$config = $config_domain["configurations"];
|
$config = $config_domain["configurations"];
|
||||||
@@ -60,7 +70,7 @@ class Membership {
|
|||||||
// $authfile = dirname(__DIR__, 5) . "/db/application_data_model_schema.json";
|
// $authfile = dirname(__DIR__, 5) . "/db/application_data_model_schema.json";
|
||||||
// $auth_config = file_get_contents($authfile);
|
// $auth_config = file_get_contents($authfile);
|
||||||
|
|
||||||
$authfile2 = dirname(__DIR__, 7) . "/system/data/application_data_model_schema.json";
|
$authfile2 = dirname(__DIR__, 7) . "/system/data/application_registry_schema.json";
|
||||||
$auth_config2 = file_get_contents($authfile2);
|
$auth_config2 = file_get_contents($authfile2);
|
||||||
return json_encode([
|
return json_encode([
|
||||||
// "account" => $account,
|
// "account" => $account,
|
||||||
@@ -68,7 +78,7 @@ class Membership {
|
|||||||
"member" => $member,
|
"member" => $member,
|
||||||
"tenants" => $tenants,
|
"tenants" => $tenants,
|
||||||
"access" => $config["access"][0]["json"],
|
"access" => $config["access"][0]["json"],
|
||||||
"config" => json_decode($auth_config2),
|
"registry" => json_decode($auth_config2),
|
||||||
"username" => $username,
|
"username" => $username,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,120 @@
|
|||||||
|
<?php
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
namespace AppfactoryStudio\Plugins;
|
||||||
|
require_once dirname( __DIR__, 2 ) . "/include.php";
|
||||||
|
|
||||||
|
class Subscribers {
|
||||||
|
|
||||||
|
public function get_catalogs(){
|
||||||
|
client_subscriber_get_catalogs();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function create_subscriber(){
|
||||||
|
client_subscriber_add_subscriber();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function store(){
|
||||||
|
return "store made";
|
||||||
|
}
|
||||||
|
|
||||||
|
public function test_form1(){
|
||||||
|
return '<form action="/portal/api/membership/store" method="post"> <input type="text" /> <button type="submit">Submit</button> </form>';
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public function member_update(){
|
||||||
|
$content = trim(file_get_contents("php://input"));
|
||||||
|
$decoded = json_decode($content, true);
|
||||||
|
$member = $decoded["data"];
|
||||||
|
// $member = json_decode(\Input::get("data"),true);
|
||||||
|
SaveMember($member);
|
||||||
|
EchoJsonResponse($decoded);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_membership(){
|
||||||
|
$subdomain = getSubdomain2();
|
||||||
|
$domain = get_subdomain_managed_domain_new_way($subdomain);
|
||||||
|
|
||||||
|
$username = \Input::get("username");
|
||||||
|
|
||||||
|
if($username==""){
|
||||||
|
$payload = json_decode(@file_get_contents('php://input'), true);
|
||||||
|
$username = $payload["username"];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// $nameid = \Input::get("nameid");
|
||||||
|
$db = new \DB();
|
||||||
|
$rows = $db->query("SELECT * FROM users_member WHERE reference_num='$username'",[], \PDO::FETCH_ASSOC);
|
||||||
|
$member = ["set"=>false,"username"=>$username];
|
||||||
|
if($rows->count() > 0){
|
||||||
|
$member = $rows->results()[0];
|
||||||
|
$member["json_data"] = json_decode(html_entity_decode($member["json_data"]),true);
|
||||||
|
}
|
||||||
|
$db = null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
$config_domain = __get_main_configurations();
|
||||||
|
$managed_domain = $config_domain["managed_domain"];
|
||||||
|
$config = $config_domain["configurations"];
|
||||||
|
|
||||||
|
$tenants = [];
|
||||||
|
$db = new \DB();
|
||||||
|
$rows = $db->query("SELECT * FROM brain_http_server_tenants WHERE member_reference_num='$username'",[],\PDO::FETCH_ASSOC);
|
||||||
|
if($rows->count() > 0){
|
||||||
|
for ($i=0; $i < $rows->count(); $i++) {
|
||||||
|
$tenant = $rows->results()[$i];
|
||||||
|
$tenant["json"] = json_decode(html_entity_decode($tenant["json"]),true);
|
||||||
|
array_push($tenants, $tenant);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db = null;
|
||||||
|
// $authfile = dirname(__DIR__, 5) . "/db/application_data_model_schema.json";
|
||||||
|
// $auth_config = file_get_contents($authfile);
|
||||||
|
|
||||||
|
$authfile2 = dirname(__DIR__, 7) . "/system/data/application_registry_schema.json";
|
||||||
|
$auth_config2 = file_get_contents($authfile2);
|
||||||
|
return json_encode([
|
||||||
|
// "account" => $account,
|
||||||
|
// "config" => json_decode($auth_config),
|
||||||
|
"member" => $member,
|
||||||
|
"tenants" => $tenants,
|
||||||
|
"access" => $config["access"][0]["json"],
|
||||||
|
"registry" => json_decode($auth_config2),
|
||||||
|
"username" => $username,
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public function member_get_config(){
|
||||||
|
// ApiCheck(function($header_set,$status,$decoded){
|
||||||
|
$username = \Input::get("subdomain");
|
||||||
|
$subdomain = getSubdomain2();
|
||||||
|
$domain = get_subdomain_managed_domain_new_way($subdomain);
|
||||||
|
|
||||||
|
$db = new \DB();
|
||||||
|
$rows = $db->query("SELECT * FROM configurations WHERE category='domain_settings'",[],\PDO::FETCH_ASSOC);
|
||||||
|
$configurations = array();
|
||||||
|
if($rows->count() > 0){
|
||||||
|
// $configurations['access'] = true;
|
||||||
|
for($i=0; $i < $rows->count(); $i++){
|
||||||
|
if(array_key_exists($rows->results()[$i]["category"], $configurations)==false){
|
||||||
|
$configurations[$rows->results()[$i]["category"]] = [];
|
||||||
|
}
|
||||||
|
$con = $rows->results()[$i];
|
||||||
|
$con["json"] = json_decode(html_entity_decode($con["json"]),true);
|
||||||
|
array_push($configurations[$rows->results()[$i]["category"]], $con);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$db = null;
|
||||||
|
EchoJsonObject( [ "configuration" => $configurations, "domain" => $domain ] );
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -251,25 +251,11 @@ function BackgroundRun_member_provision_website_domain($mainconfigfile){
|
|||||||
$tmpdataconfigfile = "/mnt/" . STORAGE_NODE1 . "/$sysUser/temp/main_" . Utils_generateRandomString(32) . ".json";
|
$tmpdataconfigfile = "/mnt/" . STORAGE_NODE1 . "/$sysUser/temp/main_" . Utils_generateRandomString(32) . ".json";
|
||||||
Utils_WriteFileJson($tmpdataconfigfile, $transfer_data);
|
Utils_WriteFileJson($tmpdataconfigfile, $transfer_data);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Stage 4: database inserts & updates
|
|
||||||
|
|
||||||
|
|
||||||
// $db = new DB();
|
|
||||||
// $db->updateFields("users_member",[
|
|
||||||
// "json_data" => htmlentities(json_encode($member["json_data"]))
|
|
||||||
// ],[
|
|
||||||
// "reference_num" => $member["reference_num"]
|
|
||||||
// ]);
|
|
||||||
// $db = null;
|
|
||||||
|
|
||||||
|
|
||||||
$shParams = "--create-domain-on-server $tmpdataconfigfile";
|
$shParams = "--create-domain-on-server $tmpdataconfigfile";
|
||||||
|
|
||||||
// EchoJsonObject(["file" => $tmpdataconfigfile]);
|
EchoJsonObject(["file" => $tmpdataconfigfile]);
|
||||||
// $processId2 = RunCommandBG($shParams,$managed_domain,null,false);
|
$processId2 = RunCommandBG($shParams,$managed_domain,null,false);
|
||||||
|
|
||||||
|
|
||||||
// $dns_record = member_dns_check_for_new_domain($domain_name);
|
// $dns_record = member_dns_check_for_new_domain($domain_name);
|
||||||
|
|||||||
@@ -70,9 +70,9 @@ function sendmessagetome(){
|
|||||||
|
|
||||||
function InitMemberUserAuthObject($type = "mysql"){
|
function InitMemberUserAuthObject($type = "mysql"){
|
||||||
// \ini_set('session.cookie_domain', 'appfactory.studio');
|
// \ini_set('session.cookie_domain', 'appfactory.studio');
|
||||||
if(session_status() !== PHP_SESSION_ACTIVE){
|
// if(session_status() !== PHP_SESSION_ACTIVE){
|
||||||
\ini_set('session.cookie_path', '/members');
|
// \ini_set('session.cookie_path', '/members');
|
||||||
}
|
// }
|
||||||
|
|
||||||
$username = $GLOBALS['config'][$type]["username"];
|
$username = $GLOBALS['config'][$type]["username"];
|
||||||
$password = $GLOBALS['config'][$type]["password"];
|
$password = $GLOBALS['config'][$type]["password"];
|
||||||
@@ -413,7 +413,8 @@ function _temp_register_admin_user(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_member_app_config(){
|
function get_member_app_config(){
|
||||||
$auth_config = json_decode(file_get_contents(dirname(__DIR__, 3 ) . "/db/application_data_model_schema.json"));
|
// $auth_config = json_decode(file_get_contents(dirname(__DIR__, 3 ) . "/db/application_data_model_schema.json"));
|
||||||
|
$auth_config = json_decode(file_get_contents(dirname(__DIR__, 5 ) . "/system/data/application_registry_schema.json"));
|
||||||
EchoJsonObject($auth_config);
|
EchoJsonObject($auth_config);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -482,7 +483,6 @@ function EchoJsonObject($object){
|
|||||||
echo json_encode($object);
|
echo json_encode($object);
|
||||||
}
|
}
|
||||||
function RunCommand($shParams,$managed_domain,$cb=null,$isOutput=false){
|
function RunCommand($shParams,$managed_domain,$cb=null,$isOutput=false){
|
||||||
// ppppp
|
|
||||||
$basefolder = "/home/" . $managed_domain["SystemUser"] . "/websites/" . $managed_domain["Subdomain"] . "/portal/admin/core/scripts";
|
$basefolder = "/home/" . $managed_domain["SystemUser"] . "/websites/" . $managed_domain["Subdomain"] . "/portal/admin/core/scripts";
|
||||||
$shCmd = $basefolder . "/commands.sh";
|
$shCmd = $basefolder . "/commands.sh";
|
||||||
$cmd = $basefolder . "/bin/afs-website \"" . $shCmd . " " . $shParams . "\"";
|
$cmd = $basefolder . "/bin/afs-website \"" . $shCmd . " " . $shParams . "\"";
|
||||||
@@ -596,8 +596,13 @@ function get_membership_from_brain_controller(){
|
|||||||
$result = ["status" => "failure"];
|
$result = ["status" => "failure"];
|
||||||
}else{
|
}else{
|
||||||
$result = json_decode($result,true);
|
$result = json_decode($result,true);
|
||||||
$result["member"]["domain"] = $domain;
|
// $result["member"]["domain"] = $domain;
|
||||||
$result["member"]["json_data"] = json_decode(html_entity_decode($result["member"]["json_data"]), true);
|
|
||||||
|
//Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/_afile.json",$result["member"]);
|
||||||
|
if(gettype($result["member"]["json_data"])=="string"){
|
||||||
|
$result["member"]["json_data"] = json_decode(html_entity_decode($result["member"]["json_data"]), true);
|
||||||
|
}
|
||||||
|
|
||||||
for ($i=0; $i < count($result["tenants"]); $i++) {
|
for ($i=0; $i < count($result["tenants"]); $i++) {
|
||||||
$tenants[$i] = $result["tenants"][$i];
|
$tenants[$i] = $result["tenants"][$i];
|
||||||
// $tenants[$i]["json"] = json_decode(html_entity_decode($tenants[$i]["json"]), true);
|
// $tenants[$i]["json"] = json_decode(html_entity_decode($tenants[$i]["json"]), true);
|
||||||
@@ -641,11 +646,12 @@ function get_membership_from_brain_controller(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
EchoJsonObject([
|
EchoJsonObject([
|
||||||
"config" => $result["config"],
|
"registry" => $result["registry"],
|
||||||
"tenant" => $tenant,
|
"tenant" => $tenant,
|
||||||
"member" => $result["member"],
|
"member" => $result["member"],
|
||||||
"url" => $requestUrl,
|
"url" => $requestUrl,
|
||||||
// "result" => $result
|
"result" => $result,
|
||||||
|
"domain" => $domain
|
||||||
// "createdby" => $createdby,
|
// "createdby" => $createdby,
|
||||||
// "domain" => $domain,
|
// "domain" => $domain,
|
||||||
// "override" => $override,
|
// "override" => $override,
|
||||||
@@ -678,6 +684,10 @@ function getSubdomain2($dboverride = false) {
|
|||||||
}
|
}
|
||||||
$subdomain = str_replace("\n", "", $subdomain);
|
$subdomain = str_replace("\n", "", $subdomain);
|
||||||
$subdomain = trim($subdomain, " ");
|
$subdomain = trim($subdomain, " ");
|
||||||
|
|
||||||
|
if($subdomain!="www" || $subdomain!="www15"){
|
||||||
|
$subdomain = "www";
|
||||||
|
}
|
||||||
return $subdomain;
|
return $subdomain;
|
||||||
}
|
}
|
||||||
function get_subdomain_managed_domain_new_way($subdomain,$dboverride = false){
|
function get_subdomain_managed_domain_new_way($subdomain,$dboverride = false){
|
||||||
@@ -855,11 +865,27 @@ function ClietRequestTokens(){
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
function get_configuration_obj(){
|
/**
|
||||||
$cat = Input::get("category");
|
* Takes in the a category or if no category is given then all categories are returned.
|
||||||
|
* categories can either be set with $_GET/$_POST or as a parameter to the function
|
||||||
|
* @param mixed $given_category
|
||||||
|
* @return array{configuration: array}
|
||||||
|
*/
|
||||||
|
function get_configuration_obj($given_category=null){
|
||||||
|
$cat = $given_category;
|
||||||
|
if($given_category==null){
|
||||||
|
$cat = Input::get("category");
|
||||||
|
}
|
||||||
|
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
$rows = $db->query("SELECT * FROM configurations WHERE category='".$cat."'",[],PDO::FETCH_ASSOC);
|
$rows = null;
|
||||||
$configurations = array();
|
if($cat){
|
||||||
|
$rows = $db->query("SELECT * FROM configurations WHERE category='".$cat."'",[],PDO::FETCH_ASSOC);
|
||||||
|
}else{
|
||||||
|
$rows = $db->query("SELECT * FROM configurations",[],PDO::FETCH_ASSOC);
|
||||||
|
}
|
||||||
|
|
||||||
|
$configurations = [];
|
||||||
if($rows->count() > 0){
|
if($rows->count() > 0){
|
||||||
// $configurations['access'] = true;
|
// $configurations['access'] = true;
|
||||||
for($i=0; $i < $rows->count(); $i++){
|
for($i=0; $i < $rows->count(); $i++){
|
||||||
@@ -1374,6 +1400,7 @@ function get_managed_domain(){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$db = null;
|
$db = null;
|
||||||
|
return $configurations;
|
||||||
}
|
}
|
||||||
function delete_configuration(){
|
function delete_configuration(){
|
||||||
|
|
||||||
@@ -1456,6 +1483,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
// "form_data" => $form_data
|
// "form_data" => $form_data
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
||||||
if(array_key_exists("active", $form_data)){
|
if(array_key_exists("active", $form_data)){
|
||||||
if($form_data["active"]==false){
|
if($form_data["active"]==false){
|
||||||
$message_response["action"] = "active=false, Not Sending";
|
$message_response["action"] = "active=false, Not Sending";
|
||||||
@@ -1467,7 +1495,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
|
|
||||||
|
|
||||||
$form_data["variables"]["system"] = SetupEmailSystemVariables($integration,$config, $form_data, $domain);
|
$form_data["variables"]["system"] = SetupEmailSystemVariables($integration,$config, $form_data, $domain);
|
||||||
Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile778.json",$form_data);
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile778.json",$form_data);
|
||||||
|
|
||||||
// nnnnn
|
// nnnnn
|
||||||
if($form_data!=null &&
|
if($form_data!=null &&
|
||||||
@@ -1507,27 +1535,43 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
$from = $form_data["from"];
|
$from = $form_data["from"];
|
||||||
|
|
||||||
// ccccc
|
// ccccc
|
||||||
if(array_key_exists("variables",$form_data)){
|
|
||||||
// the system and schema variables only need 1 array as their values shouldn't change
|
|
||||||
$index_count = 0;
|
|
||||||
// schema variables process first because they might contain other variables
|
|
||||||
if(array_key_exists("schema",$form_data["variables"])){
|
|
||||||
// $setvariables = $form_data["variables"]["schema"];
|
|
||||||
|
|
||||||
//
|
try {
|
||||||
$form_data["variables"]["schema"] = [$form_data["variables"]["schema"]];
|
if(array_key_exists("variables",$form_data)){
|
||||||
|
// the system and schema variables only need 1 array as their values shouldn't change
|
||||||
|
$index_count = 0;
|
||||||
|
// schema variables process first because they might contain other variables
|
||||||
|
if(array_key_exists("schema",$form_data["variables"])){
|
||||||
|
// $setvariables = $form_data["variables"]["schema"];
|
||||||
|
|
||||||
|
//
|
||||||
|
$form_data["variables"]["schema"] = [$form_data["variables"]["schema"]];
|
||||||
|
|
||||||
|
|
||||||
// https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-instagram.svg
|
// https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-instagram.svg
|
||||||
// https://www.appfactory.studio/assets/social_icons/facebook_733547.png
|
// https://www.appfactory.studio/assets/social_icons/facebook_733547.png
|
||||||
// https://www.appfactory.studio/assets/social_icons/instagram_174855.png
|
// https://www.appfactory.studio/assets/social_icons/instagram_174855.png
|
||||||
// https://www.appfactory.studio/assets/social_icons/twitter_11823292.png
|
// https://www.appfactory.studio/assets/social_icons/twitter_11823292.png
|
||||||
|
|
||||||
// https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-facebook-filled.svg
|
// https://www.appfactory.studio/portal/admin/core/assets/tabler-icons/icons/brand-facebook-filled.svg
|
||||||
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile303.json",$form_data["variables"]);
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile303.json",$form_data["variables"]);
|
||||||
if($form_data["variables"]["schema"][$index_count]!=null){
|
if($form_data["variables"]["schema"][$index_count]!=null){
|
||||||
for($n=0; $n < count($form_data["variables"]["schema"][$index_count]); $n++){
|
for($n=0; $n < count($form_data["variables"]["schema"][$index_count]); $n++){
|
||||||
$var = $form_data["variables"]["schema"][$index_count][$n];
|
$var = $form_data["variables"]["schema"][$index_count][$n];
|
||||||
|
$value = "";
|
||||||
|
if($var!=null){
|
||||||
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/_tailfile.json",$var);
|
||||||
|
if(array_key_exists("value",$var)){$value = $var["value"];}
|
||||||
|
$subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject);
|
||||||
|
$title = str_replace("\${".$var["name"]."}", $value, $title);
|
||||||
|
$html = str_replace("\${".$var["name"]."}", $value, $html);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(array_key_exists("client",$form_data["variables"])){
|
||||||
|
for($n=0; $n < count($form_data["variables"]["client"][$i]); $n++){
|
||||||
|
$var = $form_data["variables"]["client"][$i][$n];
|
||||||
$value = "";
|
$value = "";
|
||||||
if($var!=null){
|
if($var!=null){
|
||||||
if(array_key_exists("value",$var)){$value = $var["value"];}
|
if(array_key_exists("value",$var)){$value = $var["value"];}
|
||||||
@@ -1537,34 +1581,26 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
if(array_key_exists("system",$form_data["variables"])){
|
||||||
if(array_key_exists("client",$form_data["variables"])){
|
$setvariables = $form_data["variables"]["system"];
|
||||||
for($n=0; $n < count($form_data["variables"]["client"][$i]); $n++){
|
if($setvariables!=null && $setvariables[$index_count]!=null){
|
||||||
$var = $form_data["variables"]["client"][$i][$n];
|
for($n=0; $n < count($setvariables[$index_count]); $n++){
|
||||||
$value = "";
|
$var = $setvariables[$index_count][$n];
|
||||||
if($var!=null){
|
$value = "";
|
||||||
if(array_key_exists("value",$var)){$value = $var["value"];}
|
if($var!=null){
|
||||||
$subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject);
|
if(array_key_exists("value",$var)){$value = $var["value"];}
|
||||||
$title = str_replace("\${".$var["name"]."}", $value, $title);
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile30345.json",["message" => $form_data["variables"]["system"]]);
|
||||||
$html = str_replace("\${".$var["name"]."}", $value, $html);
|
$subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject);
|
||||||
}
|
$title = str_replace("\${".$var["name"]."}", $value, $title);
|
||||||
}
|
$html = str_replace("\${".$var["name"]."}", $value, $html);
|
||||||
}
|
}
|
||||||
if(array_key_exists("system",$form_data["variables"])){
|
|
||||||
$setvariables = $form_data["variables"]["system"];
|
|
||||||
if($setvariables!=null && $setvariables[$index_count]!=null){
|
|
||||||
for($n=0; $n < count($setvariables[$index_count]); $n++){
|
|
||||||
$var = $setvariables[$index_count][$n];
|
|
||||||
$value = "";
|
|
||||||
if($var!=null){
|
|
||||||
if(array_key_exists("value",$var)){$value = $var["value"];}
|
|
||||||
$subject = str_replace("\${".$var["name"]."}", strip_tags( $value), $subject);
|
|
||||||
$title = str_replace("\${".$var["name"]."}", $value, $title);
|
|
||||||
$html = str_replace("\${".$var["name"]."}", $value, $html);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}catch(\Exception $e){
|
||||||
|
|
||||||
}
|
}
|
||||||
// $html = str_replace(" ","", $html);
|
// $html = str_replace(" ","", $html);
|
||||||
// $html = str_replace(" ","", $html);
|
// $html = str_replace(" ","", $html);
|
||||||
@@ -1573,7 +1609,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
$html = str_replace(" ", "", $html);
|
$html = str_replace(" ", "", $html);
|
||||||
$html = html_entity_decode($html);
|
$html = html_entity_decode($html);
|
||||||
|
|
||||||
Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile333.json",$integration);
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile333.json",$integration);
|
||||||
if($integration["name"]=="sendgrid"){
|
if($integration["name"]=="sendgrid"){
|
||||||
$mydata = [];
|
$mydata = [];
|
||||||
$mydata["subject"] = $subject;
|
$mydata["subject"] = $subject;
|
||||||
@@ -1584,7 +1620,7 @@ function SendEmailBuilder($handler,$integration,$config,$domain,$cb=null){
|
|||||||
$mydata["html"] = $html;
|
$mydata["html"] = $html;
|
||||||
$mydata["sendgrid_key"] = $integration["secret"];//"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";
|
$mydata["sendgrid_key"] = $integration["secret"];//"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";
|
||||||
_email_send_sendgrid($mydata,$message_response, $cb);
|
_email_send_sendgrid($mydata,$message_response, $cb);
|
||||||
Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile334.json",$mydata);
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/tailfile334.json",$mydata);
|
||||||
}
|
}
|
||||||
if($integration["name"]=="appfactory_studio"){
|
if($integration["name"]=="appfactory_studio"){
|
||||||
$mailobj = [
|
$mailobj = [
|
||||||
@@ -1646,22 +1682,21 @@ function GetActiveEmailIntegration($config1){
|
|||||||
return $integration;
|
return $integration;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// rrrrr
|
||||||
function admin_email_test_send_email(){
|
function admin_email_test_send_email(){
|
||||||
$config_domain = __get_main_configurations();
|
$config_domain = __get_main_configurations();
|
||||||
$managed_domain = $config_domain["managed_domain"];
|
$managed_domain = $config_domain["managed_domain"];
|
||||||
$config = $config_domain["configurations"];
|
$config = $config_domain["configurations"];
|
||||||
$data = json_decode(Input::get("data"),true);
|
$data = json_decode(Input::get("data"),true);
|
||||||
|
|
||||||
|
$data["variables"]["client"] = [[["name" => "_testing_", "value" => "_name_"]]];
|
||||||
$integration = GetActiveEmailIntegration($config_domain);
|
// $data["variables"]["schema"] = $data["variables"]["schema"];
|
||||||
SendEmailBuilder($data,$integration, $config_domain, $managed_domain,function($resp){
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/__tailfile.json",$data["variables"]["schema"]);
|
||||||
EchoJsonObject(["data" => $resp]);
|
$integration = GetActiveEmailIntegration($config);
|
||||||
|
SendEmailBuilder($data,$integration, $config, $managed_domain,function($resp)use ($data){
|
||||||
|
EchoJsonObject(["data" => $resp, "variables" => $data["variables"]]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1936,7 +1971,6 @@ function send_invite_email($fields){
|
|||||||
}
|
}
|
||||||
|
|
||||||
function send_email($data){
|
function send_email($data){
|
||||||
// ppppp
|
|
||||||
$to = $data['to'];
|
$to = $data['to'];
|
||||||
$from = $data['from'];
|
$from = $data['from'];
|
||||||
$subject = $data['subject'];
|
$subject = $data['subject'];
|
||||||
@@ -2494,6 +2528,7 @@ function DirectPaymentsSelectProcessor($obj,$configuration){
|
|||||||
|
|
||||||
$processor = null;
|
$processor = null;
|
||||||
for ($i=0; $i < count($processors); $i++) {
|
for ($i=0; $i < count($processors); $i++) {
|
||||||
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/tmp/afile$i.json", $processors[$i]);
|
||||||
$nameid = $processors[$i]["json"]["nameid"];
|
$nameid = $processors[$i]["json"]["nameid"];
|
||||||
if($obj["type"]==0){
|
if($obj["type"]==0){
|
||||||
if($nameid==$obj["json"]["configuration"]["payables"]["processor"]){
|
if($nameid==$obj["json"]["configuration"]["payables"]["processor"]){
|
||||||
@@ -2523,6 +2558,7 @@ function api_initialize_direct_payments($options, $cb=null){
|
|||||||
|
|
||||||
$_POST["category"] = "processors";
|
$_POST["category"] = "processors";
|
||||||
$configuration = get_configuration_obj();
|
$configuration = get_configuration_obj();
|
||||||
|
// TODO_1: direct payment must be type 0 - type 1 subscriptions is not implemented yet
|
||||||
$processor = DirectPaymentsSelectProcessor($obj, $configuration);
|
$processor = DirectPaymentsSelectProcessor($obj, $configuration);
|
||||||
if($processor==null){
|
if($processor==null){
|
||||||
// EchoJsonResponse("error - no processor");
|
// EchoJsonResponse("error - no processor");
|
||||||
@@ -2788,13 +2824,13 @@ function Utils_create_date(){
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Utils_WriteFile($file,$data){
|
function Utils_WriteFile($file,$data,$mode="w"){
|
||||||
$myfile = fopen($file, "w");
|
$myfile = fopen($file, $mode);
|
||||||
fwrite($myfile, $data);
|
fwrite($myfile, $data);
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
}
|
}
|
||||||
function Utils_WriteFileJson($file,$jsondata,$type=JSON_PRETTY_PRINT){
|
function Utils_WriteFileJson($file,$jsondata,$mode="w",$type=JSON_PRETTY_PRINT){
|
||||||
$myfile = fopen($file, "w");
|
$myfile = fopen($file, $mode);
|
||||||
fwrite($myfile, json_encode($jsondata,$type));
|
fwrite($myfile, json_encode($jsondata,$type));
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
}
|
}
|
||||||
@@ -3277,18 +3313,18 @@ function save_brain_settings($echo_return = true){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/temp/hello1.json", $data);
|
|
||||||
if(is_array($data)){
|
|
||||||
for ($i=0; $i < count($data); $i++) {
|
|
||||||
if($data!=null && array_key_exists(0, $data)==false){
|
|
||||||
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/temp/hello3.json", $data);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
__SaveDnsSubdomain($data[$i],$db);
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
__SaveDnsSubdomain($data,$db);
|
__SaveDnsSubdomain($data,$db);
|
||||||
}
|
// Utils_WriteFileJson("/mnt/node1/appfactorystudio/temp/hello1.json", $data);
|
||||||
|
// if(is_array($data)){
|
||||||
|
// for ($i=0; $i < count($data); $i++) {
|
||||||
|
// if($data!=null && array_key_exists(0, $data)==false){
|
||||||
|
// // Utils_WriteFileJson("/mnt/node1/appfactorystudio/temp/hello3.json", $data);
|
||||||
|
// continue;
|
||||||
|
// }
|
||||||
|
// __SaveDnsSubdomain($data[$i],$db);
|
||||||
|
// }
|
||||||
|
// }else{
|
||||||
|
// }
|
||||||
|
|
||||||
$db = null;
|
$db = null;
|
||||||
if($echo_return == true){
|
if($echo_return == true){
|
||||||
@@ -4072,6 +4108,26 @@ function client_signup_member_data(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
function _getIPAddress(){
|
||||||
|
|
||||||
|
|
||||||
|
$ip = "207.126.212.3";
|
||||||
|
$query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));
|
||||||
|
if($query && $query['status'] == 'success')
|
||||||
|
{
|
||||||
|
echo 'Your City is ' . $query['city'];
|
||||||
|
echo '<br />';
|
||||||
|
echo 'Your State is ' . $query['region'];
|
||||||
|
echo '<br />';
|
||||||
|
echo 'Your Zipcode is ' . $query['zip'];
|
||||||
|
echo '<br />';
|
||||||
|
echo 'Your Coordinates are ' . $query['lat'] . ', ' . $query['lon'];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// rrrrr
|
// rrrrr
|
||||||
function create_new_member($auth){
|
function create_new_member($auth){
|
||||||
// nnnnn xxxxx vvvvv 55555
|
// nnnnn xxxxx vvvvv 55555
|
||||||
@@ -4081,6 +4137,7 @@ function create_new_member($auth){
|
|||||||
// $settings = $config["settings"][0]["json"];
|
// $settings = $config["settings"][0]["json"];
|
||||||
$data = json_decode(Input::get("data"),true);
|
$data = json_decode(Input::get("data"),true);
|
||||||
$member = $data["member"];
|
$member = $data["member"];
|
||||||
|
$stripe_data = $data["stripe_data"];
|
||||||
$mail_handlers = $data["mail_handlers"];//json_decode(Input::get("mail_handlers"),true);
|
$mail_handlers = $data["mail_handlers"];//json_decode(Input::get("mail_handlers"),true);
|
||||||
$brain_settings = get_brain_settings($managed_domain,[
|
$brain_settings = get_brain_settings($managed_domain,[
|
||||||
"brain_dns_servers", "brain_http_servers", "subdomains", "dns_zone", "brain_dns_zones", "server_clusters", "brain_dns_subdomains"
|
"brain_dns_servers", "brain_http_servers", "subdomains", "dns_zone", "brain_dns_zones", "server_clusters", "brain_dns_subdomains"
|
||||||
@@ -4101,7 +4158,7 @@ function create_new_member($auth){
|
|||||||
"firstname" => $member["firstname"],
|
"firstname" => $member["firstname"],
|
||||||
"lastname" => $member["lastname"],
|
"lastname" => $member["lastname"],
|
||||||
"email" => $member["email"],
|
"email" => $member["email"],
|
||||||
"family" => $member["family"],
|
"family" => 1, //$member["family"],
|
||||||
"level" => $member["level"],
|
"level" => $member["level"],
|
||||||
"membership" => $member["membership"],
|
"membership" => $member["membership"],
|
||||||
"password" => $member["password"],
|
"password" => $member["password"],
|
||||||
@@ -4136,6 +4193,7 @@ function create_new_member($auth){
|
|||||||
// __send_response_email(json_decode($json_data,true),$domain,false);
|
// __send_response_email(json_decode($json_data,true),$domain,false);
|
||||||
|
|
||||||
// add client variables
|
// add client variables
|
||||||
|
|
||||||
$client_variables = [
|
$client_variables = [
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
@@ -4172,12 +4230,26 @@ function create_new_member($auth){
|
|||||||
$store_data = [
|
$store_data = [
|
||||||
"client_variables" => $client_variables,
|
"client_variables" => $client_variables,
|
||||||
"mail_handlers" => $mail_handlers,
|
"mail_handlers" => $mail_handlers,
|
||||||
"member" => $obj,
|
"member" => $member,
|
||||||
"managed_domain" => $managed_domain,
|
"managed_domain" => $managed_domain,
|
||||||
"config" => $config
|
"config" => $config
|
||||||
];
|
];
|
||||||
Utils_WriteFileJson($filename_save, $store_data);
|
Utils_WriteFileJson($filename_save, $store_data);
|
||||||
|
|
||||||
|
$member_ref = $member["reference_num"];
|
||||||
|
$db = new DB();
|
||||||
|
$db->insert("general_data_storage",[
|
||||||
|
"reference_num" => Utils_generate_uuid(),
|
||||||
|
"name" => "customer_create-$payment_intent_id",
|
||||||
|
"json" => json_encode($store_data)
|
||||||
|
]);
|
||||||
|
$db->insert("general_data_storage",[
|
||||||
|
"reference_num" => Utils_generate_uuid(),
|
||||||
|
"name" => "customer_create-$member_ref",
|
||||||
|
"json" => htmlentities(json_encode($store_data))
|
||||||
|
]);
|
||||||
|
$db = null;
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
if(is_dir("/mnt/node1/appfactorystudio/datainfo/member_action_action")==false){
|
if(is_dir("/mnt/node1/appfactorystudio/datainfo/member_action_action")==false){
|
||||||
if (mkdir("/mnt/node1/appfactorystudio/datainfo/member_action_action", 0777, true)) {}
|
if (mkdir("/mnt/node1/appfactorystudio/datainfo/member_action_action", 0777, true)) {}
|
||||||
@@ -4193,7 +4265,16 @@ function create_new_member($auth){
|
|||||||
];
|
];
|
||||||
Utils_WriteFileJson($filename_save, $store_data);
|
Utils_WriteFileJson($filename_save, $store_data);
|
||||||
|
|
||||||
|
$db = new DB();
|
||||||
|
$db->insert("general_data_storage",[
|
||||||
|
"reference_num" => Utils_generate_uuid(),
|
||||||
|
"name" => "customer_create-$member_ref",
|
||||||
|
"json" => htmlentities(json_encode($store_data))
|
||||||
|
]);
|
||||||
|
$db = null;
|
||||||
|
|
||||||
|
|
||||||
|
// rrrrr
|
||||||
$integration = GetActiveEmailIntegration($config);
|
$integration = GetActiveEmailIntegration($config);
|
||||||
$mail_handler = array_shift($mail_handlers);
|
$mail_handler = array_shift($mail_handlers);
|
||||||
SendEmailBuildIntegration(
|
SendEmailBuildIntegration(
|
||||||
@@ -4210,6 +4291,7 @@ function create_new_member($auth){
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// not needed
|
||||||
if($obj["membership"]!=0){
|
if($obj["membership"]!=0){
|
||||||
// save user_id to file
|
// save user_id to file
|
||||||
$payment_intent_id = $obj["json_data"]["transactions"]["stripe"]["payment_intent"]["id"];
|
$payment_intent_id = $obj["json_data"]["transactions"]["stripe"]["payment_intent"]["id"];
|
||||||
@@ -4226,13 +4308,26 @@ function create_new_member($auth){
|
|||||||
|
|
||||||
|
|
||||||
// save member to database
|
// save member to database
|
||||||
$member_copy = json_decode(json_encode($obj),true);
|
$member_copy = json_decode(json_encode($member),true);
|
||||||
$member_copy["user_id"] = $userId;
|
$member_copy["user_id"] = $userId;
|
||||||
$member_copy["json_data"] = htmlentities(json_encode($member_copy["json_data"]));
|
$member_copy["json_data"] = htmlentities(json_encode($member_copy["json_data"]));
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
$db->insert("users_member",$member_copy);
|
$db->insert("users_member",$member_copy);
|
||||||
$db = null;
|
$db = null;
|
||||||
|
|
||||||
|
$db = new DB();
|
||||||
|
$db->insert("processor_customers",[
|
||||||
|
"reference_num" => Utils_generate_uuid(),
|
||||||
|
"member_reference_num" => $member["reference_num"],
|
||||||
|
"customer_id" => $stripe_data["customer"]["id"],
|
||||||
|
"json" => json_encode([
|
||||||
|
"customer" => $stripe_data["customer"],
|
||||||
|
"tax_calculation" => $stripe_data["calculation"],
|
||||||
|
"payment_intent" => $stripe_data["payment_intent"]
|
||||||
|
])
|
||||||
|
]);
|
||||||
|
$db = null;
|
||||||
|
|
||||||
// return
|
// return
|
||||||
EchoJsonObject([
|
EchoJsonObject([
|
||||||
'response_repnext' => json_decode($response_repnext),
|
'response_repnext' => json_decode($response_repnext),
|
||||||
@@ -4297,7 +4392,8 @@ function create_new_member($auth){
|
|||||||
function member_createERPNextCustomer($userId,$member){
|
function member_createERPNextCustomer($userId,$member){
|
||||||
$curl = curl_init();
|
$curl = curl_init();
|
||||||
curl_setopt_array($curl, [
|
curl_setopt_array($curl, [
|
||||||
CURLOPT_URL => 'https://x-erpnext-sandbox.company.appfactory.studio/api/method/myapi.api.add_customer',
|
// CURLOPT_URL => 'https://x-erpnext-sandbox.company.appfactory.studio/api/method/myapi.api.add_customer',
|
||||||
|
CURLOPT_URL => 'https://x-erpnext.company.appfactory.studio/api/method/myapi.api.add_customer',
|
||||||
CURLOPT_RETURNTRANSFER => true,
|
CURLOPT_RETURNTRANSFER => true,
|
||||||
CURLOPT_ENCODING => '',
|
CURLOPT_ENCODING => '',
|
||||||
CURLOPT_MAXREDIRS => 10,
|
CURLOPT_MAXREDIRS => 10,
|
||||||
@@ -4310,7 +4406,7 @@ function member_createERPNextCustomer($userId,$member){
|
|||||||
'cust_name' => $member["firstname"],
|
'cust_name' => $member["firstname"],
|
||||||
'cust_type' => 'Individual',
|
'cust_type' => 'Individual',
|
||||||
'cust_group' => 'Individual',
|
'cust_group' => 'Individual',
|
||||||
'territory' => $member["country"],
|
'territory' => $member["country_code"],
|
||||||
'default_currency' => 'USD',
|
'default_currency' => 'USD',
|
||||||
'email_id' => $member["email"],
|
'email_id' => $member["email"],
|
||||||
'address_title' => 'Main',
|
'address_title' => 'Main',
|
||||||
@@ -4319,10 +4415,10 @@ function member_createERPNextCustomer($userId,$member){
|
|||||||
'address_line2' => '',
|
'address_line2' => '',
|
||||||
'city' => $member["city"],
|
'city' => $member["city"],
|
||||||
'state' => $member["state"],
|
'state' => $member["state"],
|
||||||
'country' => $member["country"],
|
'country' => $member["country_name"],
|
||||||
'pincode' => $member["zip_code"]],
|
'pincode' => $member["zip_code"]],
|
||||||
CURLOPT_HTTPHEADER => [
|
CURLOPT_HTTPHEADER => [
|
||||||
'Authorization: Token 91c62aa2748af61:474954ca26a2ef0',
|
'Authorization: Token c49c62746224379:2f52f3438cfe883',
|
||||||
'Cookie: full_name=Guest; sid=Guest; system_user=no; user_id=Guest; user_image='
|
'Cookie: full_name=Guest; sid=Guest; system_user=no; user_id=Guest; user_image='
|
||||||
],
|
],
|
||||||
]);
|
]);
|
||||||
@@ -4898,12 +4994,12 @@ function apicall_stripe_create_subscription($decoded){
|
|||||||
|
|
||||||
function webhookStripeHandlePaymentIntentSucceeded($event){
|
function webhookStripeHandlePaymentIntentSucceeded($event){
|
||||||
$paymentMethod = $event->data->object;
|
$paymentMethod = $event->data->object;
|
||||||
$file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment1.json";
|
// $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment1.json";
|
||||||
Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]);
|
Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]);
|
||||||
}
|
}
|
||||||
function webhookStripeHandlePaymentMethodAttached($event){
|
function webhookStripeHandlePaymentMethodAttached($event){
|
||||||
$paymentMethod = $event->data->object;
|
$paymentMethod = $event->data->object;
|
||||||
$file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment2.json";
|
// $file = "/mnt/node1/appfactorystudio/tmp/a_hello_world_payment2.json";
|
||||||
Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]);
|
Utils_WriteFileJson($file,["event" => $event->type, "payment" => $paymentMethod]);
|
||||||
}
|
}
|
||||||
function webhookStripeHandlePaymentSucceeded($event){
|
function webhookStripeHandlePaymentSucceeded($event){
|
||||||
@@ -5472,6 +5568,7 @@ function reload_dns_subs($run_cmd = true, $echo_out = true){
|
|||||||
$brain_settings = get_brain_settings($managed_domain,["brain_dns_subdomains"], PDO::FETCH_ASSOC, "","",true);
|
$brain_settings = get_brain_settings($managed_domain,["brain_dns_subdomains"], PDO::FETCH_ASSOC, "","",true);
|
||||||
$subs = GetSubdomains(true);
|
$subs = GetSubdomains(true);
|
||||||
|
|
||||||
|
// rrrrr
|
||||||
$subdomain_contents_ww15 = DirectorSubdomainCreation($zone,$subs["www15"]["subdomains"]);
|
$subdomain_contents_ww15 = DirectorSubdomainCreation($zone,$subs["www15"]["subdomains"]);
|
||||||
$subdomain_file_www15 = "/mnt/" . STORAGE_NODE1 . "/" . MYCOMPANY_NAME . "/tmp/m_2___" . Utils_generateRandomString(24) . ".zone";
|
$subdomain_file_www15 = "/mnt/" . STORAGE_NODE1 . "/" . MYCOMPANY_NAME . "/tmp/m_2___" . Utils_generateRandomString(24) . ".zone";
|
||||||
Utils_WriteFile($subdomain_file_www15,$subdomain_contents_ww15);
|
Utils_WriteFile($subdomain_file_www15,$subdomain_contents_ww15);
|
||||||
@@ -5509,7 +5606,7 @@ function reload_dns_subs($run_cmd = true, $echo_out = true){
|
|||||||
$out = null;
|
$out = null;
|
||||||
if($run_cmd){
|
if($run_cmd){
|
||||||
// rrrrr
|
// rrrrr
|
||||||
// $out = RunCommand($shParams,$managed_domain,null,true);
|
$out = RunCommand($shParams,$managed_domain,null,true);
|
||||||
}
|
}
|
||||||
$obj = ["out" => $out, "file" => $subdomain_file, "subs" => $subs, "brain" => $brain_settings, "options" => $options, "settings" => $dns_settings];
|
$obj = ["out" => $out, "file" => $subdomain_file, "subs" => $subs, "brain" => $brain_settings, "options" => $options, "settings" => $dns_settings];
|
||||||
if($echo_out){ EchoJsonObject($obj); }
|
if($echo_out){ EchoJsonObject($obj); }
|
||||||
@@ -5575,181 +5672,7 @@ function member_provision_new_domain_website(){
|
|||||||
EchoJsonObject(["process" => $processId]);
|
EchoJsonObject(["process" => $processId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// obsolete - implemented in background_runner.php sssss
|
|
||||||
function member_provision_new_domain_website2(){
|
|
||||||
$website = json_decode(Input::get('website'), true);
|
|
||||||
$member_zone = json_decode(Input::get("domain_zone"),true);
|
|
||||||
$domain_name = $member_zone["domain_name"];
|
|
||||||
$member_reference_num = $member_zone["member_reference_num"];
|
|
||||||
|
|
||||||
// check if domain is valid format
|
|
||||||
$domainResult = is_valid_domain_name($domain_name);
|
|
||||||
if($domainResult==false){EchoJsonResponse("Invalid domain name ". $domain_name);return;}
|
|
||||||
|
|
||||||
// get member
|
|
||||||
$member = GetMember($member_reference_num);
|
|
||||||
if($member==null) {EchoJsonResponse("Error no member"); return;}
|
|
||||||
|
|
||||||
// setup variables
|
|
||||||
$config_domain = __get_main_configurations();
|
|
||||||
$managed_domain = $config_domain["managed_domain"];
|
|
||||||
$config = $config_domain["configurations"];
|
|
||||||
// $settings = $config["settings"][0]["json"];
|
|
||||||
$brain_settings = get_brain_settings($managed_domain,[
|
|
||||||
"dns_zone", "brain_dns_servers", "brain_dns_zones", "brain_http_servers", "subdomains", "brain_server_clusters", "brain_dns_subdomains", "brain_http_servers_regions"
|
|
||||||
], PDO::FETCH_ASSOC);
|
|
||||||
|
|
||||||
$_a_Record = CreateMemberSubdomain();
|
|
||||||
$domainconfig = ProvisionGetDomain($_a_Record,$domain_name);
|
|
||||||
$newdomain = $domainconfig["fullname"];
|
|
||||||
//$_mycompany = "appfactory.studio";
|
|
||||||
$sysUser = $managed_domain["SystemUser"];
|
|
||||||
|
|
||||||
$subdom = $managed_domain["Subdomain"];
|
|
||||||
$brain_controller = $brain_settings["config"]["json"]["controller"];
|
|
||||||
$gitea_domain = $brain_controller["gitea_3051"]["domain"] ."/". $brain_controller["gitea_3051"]["two"]["gitea_username"];
|
|
||||||
$family = $member_zone["family"];
|
|
||||||
|
|
||||||
// assign server 77777
|
|
||||||
$server_selected = SelectDeploymentServerForMember($member, $brain_settings, $website);
|
|
||||||
$server = $server_selected["server"];
|
|
||||||
if($server==null){ EchoJsonObject(["message" => "Error selecting server, no server selected!"]); return; }
|
|
||||||
|
|
||||||
// $progress = MemberStartSetupPogressTracker($member_reference_num);
|
|
||||||
|
|
||||||
// create member subdomain
|
|
||||||
$_subdomain = _convert_dns_subdomain_to_a_record($_a_Record,$member,$server);
|
|
||||||
$member_dns_subdomain_obj = [
|
|
||||||
"active" => 1,
|
|
||||||
"reference_num" => "s" . Utils_generateRandomString(21),
|
|
||||||
"domain_name" => $managed_domain["Domain"],
|
|
||||||
"member_reference_num" => $member["reference_num"],
|
|
||||||
"member_username" => $member["username"],
|
|
||||||
"ipv4" => $server["public_ipv4"],
|
|
||||||
"ipv6" => "",
|
|
||||||
"name" => $_a_Record,
|
|
||||||
"comment" => $_subdomain["comment"],
|
|
||||||
"systemuser" => $_a_Record,
|
|
||||||
];
|
|
||||||
array_push($brain_settings["others"]["brain_dns_subdomains"], $member_dns_subdomain_obj);
|
|
||||||
|
|
||||||
$httpserverroot = getServerRootUser($server);
|
|
||||||
if($httpserverroot==null){ EchoJsonObject(["message" => "Error no server root user!"]);return; }
|
|
||||||
$tenant = [
|
|
||||||
// mmmmm7
|
|
||||||
"server" => $server["public_ipv4"],
|
|
||||||
"reference_num" => "v".Utils_generateRandomString(20),
|
|
||||||
"owner" => false,
|
|
||||||
"CreatedBy" => $subdom,
|
|
||||||
"member_reference_num" => $member["reference_num"],
|
|
||||||
"Username" => $member['reference_num'],
|
|
||||||
"SystemUser" => $_a_Record,
|
|
||||||
"db_username" => $_a_Record,
|
|
||||||
"db_password" => "d_" . Utils_generateRandomString(24),
|
|
||||||
"db_name" => $_a_Record . "_db",
|
|
||||||
"db_host" => "localhost",
|
|
||||||
|
|
||||||
"Domain" => $domainconfig["domain"],
|
|
||||||
"Address" => "https://$newdomain",
|
|
||||||
"CertPrivateKeyLocation" => "/etc/letsencrypt/live/$newdomain/privkey.pem",
|
|
||||||
"CertPublicKeyLocation" => "/etc/letsencrypt/live/$newdomain/cert.pem",
|
|
||||||
"Subdomain" => "www",
|
|
||||||
|
|
||||||
"Domain2" => "$_a_Record.sites." . MYCOMPANY_DOMAIN,
|
|
||||||
"Address2" => "https://$_a_Record.sites." . MYCOMPANY_DOMAIN,
|
|
||||||
"CertPrivateKeyLocation2" => "/etc/letsencrypt/live/$_a_Record.sites." . MYCOMPANY_DOMAIN . "/privkey.pem",
|
|
||||||
"CertPublicKeyLocation2" => "/etc/letsencrypt/live/$_a_Record.sites." . MYCOMPANY_DOMAIN . "/cert.pem",
|
|
||||||
"Subdomain2" => $_a_Record,
|
|
||||||
|
|
||||||
"ports_blocks" => [$server_selected["blocks"]]
|
|
||||||
];
|
|
||||||
|
|
||||||
$website["tenant_reference_num"] = $tenant["reference_num"];
|
|
||||||
$website["tenant_username"] = $tenant["Username"];
|
|
||||||
InsertNewTanant($tenant);
|
|
||||||
$db = new DB();
|
|
||||||
$db->insert("members_websites", $website);
|
|
||||||
$last = $db->getPDO()->lastInsertId();
|
|
||||||
$db = null;
|
|
||||||
|
|
||||||
MemberInitialDNSSetup($member_zone, $server);
|
|
||||||
$_POST["data"] = json_encode($member_zone);
|
|
||||||
$_POST["table"] = "brain_dns_zones";
|
|
||||||
save_brain_settings(false);
|
|
||||||
|
|
||||||
$_POST["data"] = json_encode($member_dns_subdomain_obj);
|
|
||||||
$_POST["table"] = "brain_dns_subdomains";
|
|
||||||
save_brain_settings(false);
|
|
||||||
|
|
||||||
$_POST["domain_name"] = $domain_name;
|
|
||||||
$_POST["member_reference_num"] = $member["reference_num"];
|
|
||||||
$dns_settings = reload_dns_zone(false,false);
|
|
||||||
|
|
||||||
$_POST["domain_name"] = $domain_name;
|
|
||||||
$_POST["member_reference_num"] = $member["reference_num"];
|
|
||||||
$dns_subdomain = reload_dns_subs(false,false);
|
|
||||||
$dns_settings["subdomain_file"] = $dns_subdomain["file"];
|
|
||||||
|
|
||||||
$transfer_data = [
|
|
||||||
"tenant" => $tenant,
|
|
||||||
"website" => $website,
|
|
||||||
"managed_domain" => $managed_domain,
|
|
||||||
"dns" => $dns_settings["config"]["dns"],
|
|
||||||
"subdomain_file" => $dns_settings["subdomain_file"],
|
|
||||||
"server" => [
|
|
||||||
"systemuser" => $sysUser,
|
|
||||||
"subdomain" => $subdom,
|
|
||||||
"member_reference_num" => $member["reference_num"] ,
|
|
||||||
"ipv4" => $server["public_ipv4"],
|
|
||||||
"username" => $httpserverroot['username'],
|
|
||||||
"password" => $httpserverroot['password'],
|
|
||||||
"remote_dir" => "/mnt/" . STORAGE_NODE1 . "/" . MYCOMPANY_NAME . "/tmp",
|
|
||||||
"mysql_password" => $brain_controller["mysql_password"],
|
|
||||||
"domain" => MYCOMPANY_DOMAIN
|
|
||||||
],
|
|
||||||
"git_settings" => [
|
|
||||||
"gitea_token" => $brain_controller["gitea_3051"]["two"]["gitea_token"],
|
|
||||||
"gitea_password" => $brain_controller["gitea_3051"]["two"]["gitea_username"],
|
|
||||||
"gitea_domain" => $gitea_domain,
|
|
||||||
"gitea_username" => $brain_controller["gitea_3051"]["two"]["gitea_username"],
|
|
||||||
"gitea_url" => $brain_controller["gitea_3051"]["url"],
|
|
||||||
"gitea_api_url" => $brain_controller["gitea_3051"]["api_url"],
|
|
||||||
"gitea_afs_repo" => $brain_controller["gitea_3051"]["afspackage_repo"],
|
|
||||||
"gitea_members_repo" => $brain_controller["gitea_3051"]["members_repo"]
|
|
||||||
],
|
|
||||||
];
|
|
||||||
$tmpdataconfigfile = "/mnt/" . STORAGE_NODE1 . "/$sysUser/temp/m_" . Utils_generateRandomString(32) . ".json";
|
|
||||||
Utils_WriteFileJson($tmpdataconfigfile, $transfer_data);
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Stage 4: database inserts & updates
|
|
||||||
|
|
||||||
|
|
||||||
$db = new DB();
|
|
||||||
$db->updateFields("users_member",[
|
|
||||||
"json_data" => htmlentities(json_encode($member["json_data"]))
|
|
||||||
],[
|
|
||||||
"reference_num" => $member["reference_num"]
|
|
||||||
]);
|
|
||||||
$db = null;
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
////////////////////////////////////////////////////////////
|
|
||||||
// Stage 5: run commands xxxxxx
|
|
||||||
$shParams = "--create-domain-on-server $tmpdataconfigfile";
|
|
||||||
// $processId2 = RunCommandBG($shParams,$managed_domain,null,false);
|
|
||||||
|
|
||||||
$dns_record = member_dns_check_for_new_domain($domain_name);
|
|
||||||
|
|
||||||
|
|
||||||
EchoJsonObject(["domain_name" => $domain_name, "dns_record" => $dns_record, "dns_settings" => $dns_settings, "config" => $tmpdataconfigfile, "proc2" => $tmpdataconfigfile]);
|
|
||||||
// EchoJsonObject(["dns_settings" => $dns_settings, "config" => $tmpdataconfigfile, "dns_subdomain" => $dns_subdomain]);
|
|
||||||
|
|
||||||
}
|
|
||||||
function member_website_https_activation(){
|
function member_website_https_activation(){
|
||||||
$config_domain = __get_main_configurations();
|
$config_domain = __get_main_configurations();
|
||||||
$managed_domain = $config_domain["managed_domain"];
|
$managed_domain = $config_domain["managed_domain"];
|
||||||
@@ -6819,7 +6742,7 @@ function get_admin_user($auth){
|
|||||||
$user = $result->fetch_assoc();
|
$user = $result->fetch_assoc();
|
||||||
unset($user["password_hash"]);
|
unset($user["password_hash"]);
|
||||||
$user["user_id"] = $auth->getUserId();
|
$user["user_id"] = $auth->getUserId();
|
||||||
$user["json_data"] = json_decode(html_entity_decode($user["json_data"]),true);
|
$user["json"] = json_decode(html_entity_decode($user["json"]),true);
|
||||||
EchoJsonObject(["user" => $user]);
|
EchoJsonObject(["user" => $user]);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -7236,25 +7159,13 @@ function admin_subscriber_get_subscribers(){
|
|||||||
EchoJsonObject($subscribers);
|
EchoJsonObject($subscribers);
|
||||||
|
|
||||||
}
|
}
|
||||||
function admin_subscriber_update_subscriber(){
|
|
||||||
$subscriber = json_decode(Input::get("subscriber"), true);
|
|
||||||
$db = new DB();
|
|
||||||
$db->updateFields("subscribers",[
|
|
||||||
"name" => $subscriber["name"],
|
|
||||||
// "catagory" => $subscriber["catagory"],
|
|
||||||
"json" => htmlentities(json_encode($subscriber["json"]))
|
|
||||||
],[
|
|
||||||
"reference_num" => $subscriber["reference_num"]
|
|
||||||
]);
|
|
||||||
$db = null;
|
|
||||||
EchoJsonResponse();
|
|
||||||
}
|
|
||||||
function client_subscriber_get_catalogs(){
|
function client_subscriber_get_catalogs(){
|
||||||
$token = Input::get("token");
|
$token = Input::get("token");
|
||||||
if(CheckClientToken($token)==false){
|
// if(CheckClientToken($token)==false){
|
||||||
EchoJsonResponse("request_failure");
|
// EchoJsonResponse("request_failure");
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
$catalogs = [];
|
$catalogs = [];
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
@@ -7270,23 +7181,54 @@ function client_subscriber_get_catalogs(){
|
|||||||
|
|
||||||
EchoJsonObject(["catalogs" => $catalogs]);
|
EchoJsonObject(["catalogs" => $catalogs]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ppppp
|
// ppppp
|
||||||
function client_subscriber_add_subscriber(){
|
function admin_subscriber_update_subscriber(){
|
||||||
$token = Input::get("token");
|
$subscriber = json_decode(Input::get("subscriber"), true);
|
||||||
if(CheckClientToken($token)==false){
|
$email = $subscriber["email"];
|
||||||
EchoJsonResponse("request_failure");
|
$db = new DB();
|
||||||
return;
|
$rows = $db->query("SELECT * FROM subscribers WHERE email='$email'");
|
||||||
|
if($rows->count() > 0){
|
||||||
|
$db->updateFields("subscribers",[
|
||||||
|
"name" => $subscriber["name"],
|
||||||
|
// "catagory" => $subscriber["catagory"],
|
||||||
|
"json" => htmlentities(json_encode($subscriber["json"]))
|
||||||
|
],[
|
||||||
|
"reference_num" => $subscriber["reference_num"]
|
||||||
|
]);
|
||||||
|
}else{
|
||||||
|
$db->insert("subscribers",[
|
||||||
|
"reference_num" => $subscriber["reference_num"],
|
||||||
|
"email" => $email,
|
||||||
|
"json" => htmlentities(json_encode($subscriber["json"]))
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$db = null;
|
||||||
|
EchoJsonResponse('success');
|
||||||
|
}
|
||||||
|
function client_subscriber_add_subscriber(){
|
||||||
|
// $token = Input::get("token");
|
||||||
|
// if(CheckClientToken($token)==false){
|
||||||
|
// EchoJsonResponse("request_failure");
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
$config_domain = __get_main_configurations();
|
$config_domain = __get_main_configurations();
|
||||||
$managed_domain = $config_domain["managed_domain"];
|
$managed_domain = $config_domain["managed_domain"];
|
||||||
$config = $config_domain["configurations"];
|
$config = $config_domain["configurations"];
|
||||||
$settings = $config["settings"][0]["json"];
|
$settings = $config["settings"][0]["json"];
|
||||||
|
|
||||||
$sendresponse = Input::get("sendresponse");
|
$payload = json_decode(@file_get_contents('php://input'), true);
|
||||||
$subscriber = json_decode(Input::get("subscriber"), true);
|
$sendresponse = $payload["data"]["sendresponse"];
|
||||||
$response = json_decode(Input::get("response"), true);
|
$subscriber = $payload["data"]["subscriber"];
|
||||||
$email = $subscriber["email"];
|
$email = $subscriber["email"];
|
||||||
|
|
||||||
|
// $sendresponse = Input::get("sendresponse");
|
||||||
|
// $subscriber = json_decode(Input::get("subscriber"), true);
|
||||||
|
// $mail_handlers = json_decode(Input::get("mail_handlers"), true);
|
||||||
|
// $email = $subscriber["email"];
|
||||||
|
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
$rows = $db->query("SELECT * FROM subscribers WHERE email='$email'",[],PDO::FETCH_ASSOC);
|
$rows = $db->query("SELECT * FROM subscribers WHERE email='$email'",[],PDO::FETCH_ASSOC);
|
||||||
if($rows->count() > 0){
|
if($rows->count() > 0){
|
||||||
@@ -7315,13 +7257,13 @@ function client_subscriber_add_subscriber(){
|
|||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
$db = null;
|
$db = null;
|
||||||
if($sendresponse==true || $sendresponse=="true"){
|
// if($sendresponse==true || $sendresponse=="true"){
|
||||||
SendEmailBuilder($response,$managed_domain,function($resp){
|
// SendEmailBuilder($response,$managed_domain,function($resp){
|
||||||
// EchoJsonObject(["data" => $resp]);
|
// // EchoJsonObject(["data" => $resp]);
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
|
|
||||||
EchoJsonResponse();
|
EchoJsonObject($payload);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -7878,7 +7820,7 @@ function submit_form(){
|
|||||||
$reference_num = Input::get("reference_num");
|
$reference_num = Input::get("reference_num");
|
||||||
$form_json = json_decode(Input::get("form_json"),true);
|
$form_json = json_decode(Input::get("form_json"),true);
|
||||||
$submission_json = json_decode(Input::get("submission_json"),true);
|
$submission_json = json_decode(Input::get("submission_json"),true);
|
||||||
|
$client_variables = json_decode(Input::get('client_variables'),true);
|
||||||
|
|
||||||
$db = new DB();
|
$db = new DB();
|
||||||
$db->insert("form_submissions", array(
|
$db->insert("form_submissions", array(
|
||||||
@@ -7899,6 +7841,23 @@ function submit_form(){
|
|||||||
$mytype = "yes";
|
$mytype = "yes";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ppppp
|
||||||
|
|
||||||
|
$integration = GetActiveEmailIntegration($config);
|
||||||
|
$mail_handler = array_shift($mail_handlers);
|
||||||
|
SendEmailBuildIntegration(
|
||||||
|
$mail_handler,
|
||||||
|
$client_variables,
|
||||||
|
$integration,
|
||||||
|
$config,
|
||||||
|
$managed_domain,
|
||||||
|
function($resp){
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// // $form_json["email_alert"]["variables"] = [$form_json["variables"]];
|
// // $form_json["email_alert"]["variables"] = [$form_json["variables"]];
|
||||||
// $form_json["json"]["email_alert"]["_output_html"] = "forms/alert_" . $time . ".html";
|
// $form_json["json"]["email_alert"]["_output_html"] = "forms/alert_" . $time . ".html";
|
||||||
// SendEmail($form_json["json"]["email_alert"],$managed_domain,function($message){
|
// SendEmail($form_json["json"]["email_alert"],$managed_domain,function($message){
|
||||||
@@ -8420,6 +8379,8 @@ function admin_documents_delete_document(){
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// rrrrr
|
||||||
function api_data_downloads(){
|
function api_data_downloads(){
|
||||||
// if (Input::get('getdoc')) {
|
// if (Input::get('getdoc')) {
|
||||||
$subdomain = getSubdomain2();
|
$subdomain = getSubdomain2();
|
||||||
@@ -8436,6 +8397,8 @@ function api_data_downloads(){
|
|||||||
$content_type = Input::get("content_type");
|
$content_type = Input::get("content_type");
|
||||||
$content_type = ($content_type) ? $content_type : "image/$ext";
|
$content_type = ($content_type) ? $content_type : "image/$ext";
|
||||||
$filename = $fileDir . $file;
|
$filename = $fileDir . $file;
|
||||||
|
|
||||||
|
// https://api.appfactory.studio/v1/data/downloads?getdoc=true&ref=doc888072803282&name=djnUwMIfNWmiK.png&content_type=image/png
|
||||||
if (file_exists($filename))
|
if (file_exists($filename))
|
||||||
{
|
{
|
||||||
header('Content-Description: File Transfer');
|
header('Content-Description: File Transfer');
|
||||||
@@ -8453,7 +8416,9 @@ function api_data_downloads(){
|
|||||||
die();
|
die();
|
||||||
}else{
|
}else{
|
||||||
// echo $filename;
|
// echo $filename;
|
||||||
echo "";
|
// echo "no file $subdomain $filename ";
|
||||||
|
|
||||||
|
// EchoJsonObject($managed_domain);
|
||||||
}
|
}
|
||||||
|
|
||||||
// }
|
// }
|
||||||
@@ -8527,7 +8492,8 @@ function handleUploadFile(){
|
|||||||
"file_type" => $data2["file_type"],
|
"file_type" => $data2["file_type"],
|
||||||
"upload_date" => $data2["upload_date"],
|
"upload_date" => $data2["upload_date"],
|
||||||
"directory" => $data2["directory"],
|
"directory" => $data2["directory"],
|
||||||
"url" => $data2["url"]
|
"url" => $data2["url"],
|
||||||
|
"url2" => $data2["url2"]
|
||||||
));
|
));
|
||||||
// {
|
// {
|
||||||
// "success" : 1,
|
// "success" : 1,
|
||||||
@@ -8963,7 +8929,7 @@ function PublishWebsite($base,$rootDir,$project,$project_config,$member,$setting
|
|||||||
for ($n=0; $n < count($value["styles"]); $n++) {
|
for ($n=0; $n < count($value["styles"]); $n++) {
|
||||||
$link_styles .= "<link rel=\"stylesheet\" href=\"".$value["styles"][$n]."\">";
|
$link_styles .= "<link rel=\"stylesheet\" href=\"".$value["styles"][$n]."\">";
|
||||||
}
|
}
|
||||||
if($key=="home"){
|
if($key=="home" || $key=="index"){
|
||||||
$html = str_replace("\${contents}", $value["html"], $contents);
|
$html = str_replace("\${contents}", $value["html"], $contents);
|
||||||
$html = str_replace("\${favicon}", $favicon, $html);
|
$html = str_replace("\${favicon}", $favicon, $html);
|
||||||
$html = str_replace("\${title}", $title, $html);
|
$html = str_replace("\${title}", $title, $html);
|
||||||
@@ -8972,8 +8938,9 @@ function PublishWebsite($base,$rootDir,$project,$project_config,$member,$setting
|
|||||||
|
|
||||||
$html = str_replace("\${scripts}", $value["js"], $html);
|
$html = str_replace("\${scripts}", $value["js"], $html);
|
||||||
$html = str_replace("\${styles}", $value["css"], $html);
|
$html = str_replace("\${styles}", $value["css"], $html);
|
||||||
mkdir("$base/$rootDir/index", 0777, true);
|
// mkdir("$base/$rootDir/index", 0777, true);
|
||||||
$file = "$base/$rootDir/index/index.php";
|
// $base = /home/user/websites/www
|
||||||
|
$file = "$base/index.php";
|
||||||
$myfile = fopen($file, "w");
|
$myfile = fopen($file, "w");
|
||||||
fwrite($myfile, $html);
|
fwrite($myfile, $html);
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
@@ -8998,13 +8965,15 @@ function PublishWebsite($base,$rootDir,$project,$project_config,$member,$setting
|
|||||||
"path_dir" => dirname( __DIR__ ) . "/pages_template.php",
|
"path_dir" => dirname( __DIR__ ) . "/pages_template.php",
|
||||||
"contents" => $contents,
|
"contents" => $contents,
|
||||||
"make" => $make,
|
"make" => $make,
|
||||||
|
"directory_base" => $base,
|
||||||
"directory" => "$base/$rootDir",
|
"directory" => "$base/$rootDir",
|
||||||
"settings" => $settings,
|
"settings" => $settings,
|
||||||
"project" => $project,
|
"project" => $project,
|
||||||
"managed_domain" => $managed_domain,
|
"managed_domain" => $managed_domain,
|
||||||
"member" => $member,
|
"member" => $member,
|
||||||
"project_config" => $project_config,
|
"project_config" => $project_config,
|
||||||
"run_command" => $result
|
"run_command" => $result,
|
||||||
|
"website" => $website
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
|
||||||
@@ -9035,9 +9004,9 @@ function webbuilder_publish(){
|
|||||||
$txt = "{}";
|
$txt = "{}";
|
||||||
fwrite($myfile, $txt);
|
fwrite($myfile, $txt);
|
||||||
fclose($myfile);
|
fclose($myfile);
|
||||||
EchoJsonResponse("$base/$rootDir/descriptor.json");
|
// EchoJsonResponse("$base/$rootDir/descriptor.json");
|
||||||
}
|
}
|
||||||
EchoJsonResponse("$base/$rootDir/descriptor.json");
|
// EchoJsonResponse("$base/$rootDir/descriptor.json");
|
||||||
if(file_exists("$base/$rootDir/descriptor.json")){
|
if(file_exists("$base/$rootDir/descriptor.json")){
|
||||||
$descriptor = json_decode(file_get_contents("$base/$rootDir/descriptor.json"), true);
|
$descriptor = json_decode(file_get_contents("$base/$rootDir/descriptor.json"), true);
|
||||||
if($descriptor["custom"]==true){
|
if($descriptor["custom"]==true){
|
||||||
@@ -10386,7 +10355,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom
|
|||||||
|
|
||||||
$logo1 = "";
|
$logo1 = "";
|
||||||
if(array_key_exists("logo1", $domain_setting["brand"]["logos"])) {
|
if(array_key_exists("logo1", $domain_setting["brand"]["logos"])) {
|
||||||
$logo1 = $domain_setting["brand"]["logos"]["logo1"];
|
$logo1 = $domain_setting["brand"]["logos"]["logo1"]["reference_num"];
|
||||||
}
|
}
|
||||||
array_push($variables, [
|
array_push($variables, [
|
||||||
"name" => "mybrand_logo1",
|
"name" => "mybrand_logo1",
|
||||||
@@ -10395,7 +10364,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom
|
|||||||
|
|
||||||
$logo2 = "";
|
$logo2 = "";
|
||||||
if(array_key_exists("logo2", $domain_setting["brand"]["logos"])) {
|
if(array_key_exists("logo2", $domain_setting["brand"]["logos"])) {
|
||||||
$logo2 = $domain_setting["brand"]["logos"]["logo2"];
|
$logo2 = $domain_setting["brand"]["logos"]["logo2"]["reference_num"];
|
||||||
}
|
}
|
||||||
array_push($variables, [
|
array_push($variables, [
|
||||||
"name" => "mybrand_logo2",
|
"name" => "mybrand_logo2",
|
||||||
@@ -10404,7 +10373,7 @@ function SetupEmailSystemVariables($integration, $config, $handler, $managed_dom
|
|||||||
|
|
||||||
$logo3 = "";
|
$logo3 = "";
|
||||||
if(array_key_exists("logo3", $domain_setting["brand"]["logos"])) {
|
if(array_key_exists("logo3", $domain_setting["brand"]["logos"])) {
|
||||||
$logo2 = $domain_setting["brand"]["logos"]["logo3"];
|
$logo2 = $domain_setting["brand"]["logos"]["logo3"]["reference_num"];
|
||||||
}
|
}
|
||||||
array_push($variables, [
|
array_push($variables, [
|
||||||
"name" => "mybrand_logo3",
|
"name" => "mybrand_logo3",
|
||||||
|
|||||||
@@ -784,6 +784,10 @@ function MemberInitialDNSSetup(&$member_zone, $server){
|
|||||||
if(array_key_exists("a", $member_zone["json_zone_data"])==false){
|
if(array_key_exists("a", $member_zone["json_zone_data"])==false){
|
||||||
$member_zone["json_zone_data"]["a"] = [];
|
$member_zone["json_zone_data"]["a"] = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(count($member_zone["json_zone_data"]["a"]) > 0){
|
||||||
|
return $member_zone;
|
||||||
|
}
|
||||||
array_push($member_zone["json_zone_data"]["a"],[
|
array_push($member_zone["json_zone_data"]["a"],[
|
||||||
"comment" => "",
|
"comment" => "",
|
||||||
"ip" => $server["public_ipv4"],
|
"ip" => $server["public_ipv4"],
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ function func_get_database(){
|
|||||||
return $mysqli;
|
return $mysqli;
|
||||||
}
|
}
|
||||||
|
|
||||||
function func_page($auth, $is_sandbox = true){
|
function func_page($auth, $is_sandbox = false){
|
||||||
$directory_admin = dirname( __DIR__, 2 );
|
$directory_admin = dirname( __DIR__, 2 );
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
@@ -53,7 +53,7 @@ function func_page($auth, $is_sandbox = true){
|
|||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-icons/1.11.3/font/bootstrap-icons.min.css" integrity="sha512-dPXYcDub/aeb08c63jRq/k6GaKccl256JQy/AnOq7CAnEZ9FzSL9wSbcZkMp4R26vBsMLFYH4kQ67/bbV8XaCQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
<!-- <link rel="stylesheet" href="/portal/admin/core/libs/font-awsome-6.6.0-all.min.css"> -->
|
<!-- <link rel="stylesheet" href="/portal/admin/core/libs/font-awsome-6.6.0-all.min.css"> -->
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.0/css/all.min.css" integrity="sha512-3PN6gfRNZEX4YFyz+sIyTF6pGlQiryJu9NlGhu9LrLMQ7eDjNgudQoFDK3WSNAayeIKc6B8WXXpo4a7HqxjKwg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.8.0/css/all.min.css" integrity="sha512-3PN6gfRNZEX4YFyz+sIyTF6pGlQiryJu9NlGhu9LrLMQ7eDjNgudQoFDK3WSNAayeIKc6B8WXXpo4a7HqxjKwg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
|
||||||
<link rel="stylesheet" href="/portal/admin/core/api/styles/tabler/tabler.min.css"/>
|
<link rel="stylesheet" href="/portal/admin/core/api/styles/tabler/tabler.css"/>
|
||||||
|
|
||||||
<script src="/portal/admin/core/api/js/libs/jquery-3.6.3.min.js"></script>
|
<script src="/portal/admin/core/api/js/libs/jquery-3.6.3.min.js"></script>
|
||||||
<!-- <script src="/portal/admin/core/api/js/libs/bootstrap.bundle.min.js"></script> -->
|
<!-- <script src="/portal/admin/core/api/js/libs/bootstrap.bundle.min.js"></script> -->
|
||||||
@@ -120,10 +120,10 @@ function func_page($auth, $is_sandbox = true){
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
<link href='/portal/admin/core/api/styles/styles.css' rel='stylesheet'>
|
|
||||||
<script src="//unpkg.com/grapesjs"></script>
|
<script src="//unpkg.com/grapesjs"></script>
|
||||||
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
|
<link href="https://unpkg.com/grapesjs/dist/css/grapes.min.css" rel="stylesheet">
|
||||||
<script src="/portal/admin/core/api/js/pages/modules/builder_email/mjml/_dist/index.js"></script>
|
<script src="/portal/admin/core/api/js/pages/modules/builder_email/mjml/_dist/index.js"></script>
|
||||||
|
<link href='/portal/admin/core/api/styles/styles.css' rel='stylesheet'>
|
||||||
|
|
||||||
|
|
||||||
<style> .spacer { width: 100%; height:550px;}</style>
|
<style> .spacer { width: 100%; height:550px;}</style>
|
||||||
|
|||||||
@@ -11,6 +11,25 @@ class EmailManager {
|
|||||||
public function __construct(){ }
|
public function __construct(){ }
|
||||||
|
|
||||||
|
|
||||||
|
public function authDomain(){
|
||||||
|
|
||||||
|
$apiKey = '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';//getenv('SENDGRID_API_KEY'); // Or replace with your actual API key
|
||||||
|
$sg = new \SendGrid($apiKey);
|
||||||
|
|
||||||
|
$requestBody = json_decode('{
|
||||||
|
"domain": "mail.cradle2careertx.org",
|
||||||
|
"automated_security": false
|
||||||
|
}');
|
||||||
|
|
||||||
|
try {
|
||||||
|
$response = $sg->client->whitelabel()->domains()->post($requestBody);
|
||||||
|
// echo $response->statusCode();
|
||||||
|
return $response->body();
|
||||||
|
} catch (Exception $e) {
|
||||||
|
return 'Caught exception: '. $e->getMessage() ."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function initialize($type,$data,$message_response,$cb){
|
public function initialize($type,$data,$message_response,$cb){
|
||||||
|
|
||||||
|
|||||||
@@ -61,7 +61,11 @@ if(Input::get('get_prices')){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pub_key = $data['_processor']['json']['client_id'];
|
$pub_key = $data['_processor']['json']['client_id'];
|
||||||
$prices = $stripe->prices->all(['lookup_keys' => $lookup_keys]);
|
$prices = $stripe->prices->all([
|
||||||
|
'lookup_keys' => $lookup_keys,
|
||||||
|
'expand' => ['data.product']
|
||||||
|
|
||||||
|
]);
|
||||||
|
|
||||||
EchoJsonObject([
|
EchoJsonObject([
|
||||||
'publishableKey' => $pub_key,
|
'publishableKey' => $pub_key,
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ if(Input::get('get_new_config1')){
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if(Input::get('_temp_register_member_user')){
|
if(Input::get('_temp_register_member_user')){
|
||||||
_temp_register_member_user();
|
_temp_register_member_user();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500");
|
@import url("https://fonts.googleapis.com/css?family=Roboto:300,400,400i,500");
|
||||||
|
|
||||||
|
:root {
|
||||||
|
/* --tblr-primary: #f1f1f1 !important; */
|
||||||
|
/* --tblr-bg-surface: #222222; */
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
font-family: "Roboto", sans-serif;
|
font-family: "Roboto", sans-serif;
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
* Copyright 2018-2023 codecalm.net Paweł Kuna
|
* Copyright 2018-2023 codecalm.net Paweł Kuna
|
||||||
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
* Licensed under MIT (https://github.com/tabler/tabler/blob/master/LICENSE)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/* change */
|
||||||
@charset "UTF-8";
|
@charset "UTF-8";
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
@@ -17587,7 +17589,11 @@ body.theme-dark .hide-theme-dark, body[data-bs-theme=dark] .hide-theme-dark {
|
|||||||
--tblr-emphasis-color: #ffffff;
|
--tblr-emphasis-color: #ffffff;
|
||||||
--tblr-emphasis-color-rgb: 255, 255, 255;
|
--tblr-emphasis-color-rgb: 255, 255, 255;
|
||||||
--tblr-bg-forms: #151f2c;
|
--tblr-bg-forms: #151f2c;
|
||||||
--tblr-bg-surface: #182433;
|
/* change */
|
||||||
|
/* --tblr-bg-surface: #182433; */
|
||||||
|
/* --tblr-bg-surface: #111111; */
|
||||||
|
/* --tblr-bg-surface: #222222; */
|
||||||
|
--tblr-bg-surface: #121212;
|
||||||
--tblr-bg-surface-dark: #151f2c;
|
--tblr-bg-surface-dark: #151f2c;
|
||||||
--tblr-bg-surface-secondary: #1b293a;
|
--tblr-bg-surface-secondary: #1b293a;
|
||||||
--tblr-bg-surface-tertiary: #151f2c;
|
--tblr-bg-surface-tertiary: #151f2c;
|
||||||
|
|||||||
83
portal/admin/core/api/styles/tailwind3.4.js
Normal file
83
portal/admin/core/api/styles/tailwind3.4.js
Normal file
File diff suppressed because one or more lines are too long
1122
portal/admin/core/db/application_data_model_schema.json
Normal file
1122
portal/admin/core/db/application_data_model_schema.json
Normal file
File diff suppressed because it is too large
Load Diff
@@ -128,10 +128,14 @@ CREATE TABLE IF NOT EXISTS documents (
|
|||||||
upload_date VARCHAR(255) NULL,
|
upload_date VARCHAR(255) NULL,
|
||||||
directory VARCHAR(255) NULL,
|
directory VARCHAR(255) NULL,
|
||||||
url VARCHAR(255) NULL,
|
url VARCHAR(255) NULL,
|
||||||
|
url2 VARCHAR(255) NULL,
|
||||||
jsontext MEDIUMTEXT,
|
jsontext MEDIUMTEXT,
|
||||||
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP()
|
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
-- ALTER TABLE documents ADD COLUMN url2 VARCHAR(255) NULL;
|
||||||
|
|
||||||
|
|
||||||
-- Forms
|
-- Forms
|
||||||
CREATE TABLE IF NOT EXISTS forms (
|
CREATE TABLE IF NOT EXISTS forms (
|
||||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
@@ -592,6 +596,11 @@ CREATE TABLE IF NOT EXISTS users_member (
|
|||||||
zone INT DEFAULT 0,
|
zone INT DEFAULT 0,
|
||||||
processor VARCHAR(255) NULL,
|
processor VARCHAR(255) NULL,
|
||||||
processor_group VARCHAR(255) NULL,
|
processor_group VARCHAR(255) NULL,
|
||||||
|
|
||||||
|
account_closed INT DEFAULT 0,
|
||||||
|
account_close_date TIMESTAMP,
|
||||||
|
customer_id VARCHAR(255) NULL,
|
||||||
|
|
||||||
access_reference_num VARCHAR(255) NULL,
|
access_reference_num VARCHAR(255) NULL,
|
||||||
access_nameid VARCHAR(255) NULL,
|
access_nameid VARCHAR(255) NULL,
|
||||||
order_data MEDIUMTEXT,
|
order_data MEDIUMTEXT,
|
||||||
@@ -599,7 +608,14 @@ CREATE TABLE IF NOT EXISTS users_member (
|
|||||||
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP()
|
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS processor_customers (
|
||||||
|
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
reference_num VARCHAR(255) NULL,
|
||||||
|
member_reference_num VARCHAR(255) NULL,
|
||||||
|
customer_id VARCHAR(255) NULL,
|
||||||
|
json MEDIUMTEXT,
|
||||||
|
date TIMESTAMP DEFAULT CURRENT_TIMESTAMP()
|
||||||
|
);
|
||||||
|
|
||||||
-- application member users
|
-- application member users
|
||||||
CREATE TABLE IF NOT EXISTS `ext_member_users` (
|
CREATE TABLE IF NOT EXISTS `ext_member_users` (
|
||||||
|
|||||||
@@ -19,3 +19,18 @@
|
|||||||
<div class="content">
|
<div class="content">
|
||||||
<div id="dashboard-content"></div>
|
<div id="dashboard-content"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -144,7 +144,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -392,7 +392,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -129,7 +129,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -89,7 +89,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -103,7 +103,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -142,7 +142,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -432,7 +432,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -53,7 +53,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -179,7 +179,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -131,7 +131,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -163,7 +163,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -80,7 +80,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -207,7 +207,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -59,7 +59,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -85,7 +85,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -94,7 +94,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -88,7 +88,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -140,7 +140,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -101,7 +101,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -71,7 +71,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -225,7 +225,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -159,7 +159,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -106,7 +106,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -86,7 +86,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -134,7 +134,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
<div class="col-12 col-lg-auto mt-3 mt-lg-0">
|
||||||
<ul class="list-inline list-inline-dots mb-0">
|
<ul class="list-inline list-inline-dots mb-0">
|
||||||
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2024 Appfactory Studio inc.</a></li>
|
<li class="list-inline-item"><a href="#" class="link-secondary" rel="noopener">©2025 Appfactory Studio inc.</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user