Merge branch 'master' of ssh://gitlab.chiefsoft.net/WrenchBoard/WrenchBoradWeb
This commit is contained in:
@@ -1,3 +0,0 @@
|
||||
|
||||
node_modules
|
||||
npm-debug.log
|
||||
@@ -1,209 +0,0 @@
|
||||
{
|
||||
"env": {
|
||||
"es6": true,
|
||||
"browser": true,
|
||||
"node": true,
|
||||
"meteor": true,
|
||||
"mocha": true
|
||||
},
|
||||
|
||||
"plugins": [],
|
||||
|
||||
"ecmaFeatures": {
|
||||
"arrowFunctions": true,
|
||||
"binaryLiterals": true,
|
||||
"blockBindings": true,
|
||||
"classes": true,
|
||||
"defaultParams": true,
|
||||
"destructuring": true,
|
||||
"experimentalObjectRestSpread": true,
|
||||
"forOf": true,
|
||||
"generators": true,
|
||||
"globalReturn": true,
|
||||
"jsx": true,
|
||||
"modules": true,
|
||||
"objectLiteralComputedProperties": true,
|
||||
"objectLiteralDuplicateProperties": true,
|
||||
"objectLiteralShorthandMethods": true,
|
||||
"objectLiteralShorthandProperties": true,
|
||||
"octalLiterals": true,
|
||||
"regexUFlag": true,
|
||||
"regexYFlag": true,
|
||||
"restParams": true,
|
||||
"spread": true,
|
||||
"superInFunctions": true,
|
||||
"templateStrings": true,
|
||||
"unicodeCodePointEscapes": true
|
||||
},
|
||||
|
||||
"rules": {
|
||||
"array-bracket-spacing": [2, "always"],
|
||||
"arrow-spacing": 2,
|
||||
"block-scoped-var": 0,
|
||||
"brace-style": [2, "1tbs", {"allowSingleLine": true}],
|
||||
"callback-return": 2,
|
||||
"comma-dangle": 0,
|
||||
"comma-spacing": 0,
|
||||
"comma-style": [2, "last"],
|
||||
"complexity": 0,
|
||||
"computed-property-spacing": [2, "never"],
|
||||
"consistent-return": 0,
|
||||
"consistent-this": 0,
|
||||
"curly": [2, "all"],
|
||||
"default-case": 0,
|
||||
"dot-location": [2, "property"],
|
||||
"dot-notation": 0,
|
||||
"eol-last": 2,
|
||||
"eqeqeq": 2,
|
||||
"func-names": 0,
|
||||
"func-style": 0,
|
||||
"generator-star-spacing": [0, {"before": true, "after": false}],
|
||||
"guard-for-in": 2,
|
||||
"handle-callback-err": [2, "error"],
|
||||
"id-length": 0,
|
||||
"id-match": [2, "^(?:_?[a-zA-Z0-9]*)|[_A-Z0-9]+$"],
|
||||
"indent": [2, 2, {"SwitchCase": 1}],
|
||||
"init-declarations": 0,
|
||||
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
|
||||
"linebreak-style": 2,
|
||||
"lines-around-comment": 0,
|
||||
"max-depth": 0,
|
||||
"max-len": [2, 300, 4],
|
||||
"max-nested-callbacks": 0,
|
||||
"max-params": 0,
|
||||
"max-statements": 0,
|
||||
"new-cap": 0,
|
||||
"new-parens": 2,
|
||||
"newline-after-var": 0,
|
||||
"no-array-constructor": 2,
|
||||
"no-bitwise": 0,
|
||||
"no-caller": 2,
|
||||
"no-catch-shadow": 0,
|
||||
"no-class-assign": 2,
|
||||
"no-cond-assign": 2,
|
||||
"no-console": 1,
|
||||
"no-const-assign": 2,
|
||||
"no-constant-condition": 2,
|
||||
"no-continue": 0,
|
||||
"no-control-regex": 0,
|
||||
"no-debugger": 1,
|
||||
"no-delete-var": 2,
|
||||
"no-div-regex": 2,
|
||||
"no-dupe-args": 2,
|
||||
"no-dupe-keys": 2,
|
||||
"no-duplicate-case": 2,
|
||||
"no-else-return": 2,
|
||||
"no-empty": 2,
|
||||
"no-empty-character-class": 2,
|
||||
"no-empty-label": 2,
|
||||
"no-eq-null": 0,
|
||||
"no-eval": 2,
|
||||
"no-ex-assign": 2,
|
||||
"no-extend-native": 2,
|
||||
"no-extra-bind": 2,
|
||||
"no-extra-boolean-cast": 2,
|
||||
"no-extra-parens": 0,
|
||||
"no-extra-semi": 2,
|
||||
"no-fallthrough": 2,
|
||||
"no-floating-decimal": 2,
|
||||
"no-func-assign": 2,
|
||||
"no-implicit-coercion": 2,
|
||||
"no-implied-eval": 2,
|
||||
"no-inline-comments": 0,
|
||||
"no-inner-declarations": [2, "functions"],
|
||||
"no-invalid-regexp": 2,
|
||||
"no-invalid-this": 0,
|
||||
"no-irregular-whitespace": 2,
|
||||
"no-iterator": 2,
|
||||
"no-label-var": 2,
|
||||
"no-labels": 0,
|
||||
"no-lone-blocks": 2,
|
||||
"no-lonely-if": 2,
|
||||
"no-loop-func": 0,
|
||||
"no-mixed-requires": [2, true],
|
||||
"no-mixed-spaces-and-tabs": 2,
|
||||
"no-multi-spaces": 2,
|
||||
"no-multi-str": 2,
|
||||
"no-multiple-empty-lines": 0,
|
||||
"no-native-reassign": 0,
|
||||
"no-negated-in-lhs": 2,
|
||||
"no-nested-ternary": 0,
|
||||
"no-new": 1,
|
||||
"no-new-func": 0,
|
||||
"no-new-object": 2,
|
||||
"no-new-require": 2,
|
||||
"no-new-wrappers": 2,
|
||||
"no-obj-calls": 2,
|
||||
"no-octal": 2,
|
||||
"no-octal-escape": 2,
|
||||
"no-param-reassign": 2,
|
||||
"no-path-concat": 2,
|
||||
"no-plusplus": 0,
|
||||
"no-process-env": 0,
|
||||
"no-process-exit": 0,
|
||||
"no-proto": 2,
|
||||
"no-redeclare": 2,
|
||||
"no-regex-spaces": 2,
|
||||
"no-restricted-modules": 0,
|
||||
"no-return-assign": 2,
|
||||
"no-script-url": 2,
|
||||
"no-self-compare": 0,
|
||||
"no-sequences": 2,
|
||||
"no-shadow": 2,
|
||||
"no-shadow-restricted-names": 2,
|
||||
"no-spaced-func": 2,
|
||||
"no-sparse-arrays": 2,
|
||||
"no-sync": 0,
|
||||
"no-ternary": 0,
|
||||
"no-this-before-super": 2,
|
||||
"no-throw-literal": 2,
|
||||
"no-trailing-spaces": 2,
|
||||
"no-undef": 2,
|
||||
"no-undef-init": 2,
|
||||
"no-undefined": 0,
|
||||
"no-underscore-dangle": 0,
|
||||
"no-unexpected-multiline": 2,
|
||||
"no-unneeded-ternary": 2,
|
||||
"no-unreachable": 2,
|
||||
"no-unused-expressions": 0,
|
||||
"no-unused-vars": [2, {"vars": "all", "args": "after-used"}],
|
||||
"no-use-before-define": 0,
|
||||
"no-useless-call": 2,
|
||||
"no-var": 0,
|
||||
"no-void": 2,
|
||||
"no-warning-comments": 0,
|
||||
"no-with": 2,
|
||||
"object-curly-spacing": [0, "always"],
|
||||
"object-shorthand": [2, "properties"],
|
||||
"one-var": [2, "never"],
|
||||
"operator-assignment": [2, "always"],
|
||||
"operator-linebreak": [0, "after"],
|
||||
"padded-blocks": 0,
|
||||
"prefer-const": 0,
|
||||
"prefer-reflect": 0,
|
||||
"prefer-spread": 0,
|
||||
"quote-props": [2, "as-needed"],
|
||||
"quotes": [2, "single"],
|
||||
"radix": 2,
|
||||
"require-yield": 2,
|
||||
"semi": [2, "always"],
|
||||
"semi-spacing": [2, {"before": false, "after": true}],
|
||||
"sort-vars": 0,
|
||||
"space-after-keywords": [2, "always"],
|
||||
"space-before-blocks": [2, "always"],
|
||||
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
|
||||
"space-in-parens": 0,
|
||||
"space-infix-ops": [2, {"int32Hint": false}],
|
||||
"space-return-throw-case": 2,
|
||||
"space-unary-ops": [2, {"words": true, "nonwords": false}],
|
||||
"spaced-comment": [2, "always"],
|
||||
"strict": 0,
|
||||
"use-isnan": 2,
|
||||
"valid-jsdoc": 0,
|
||||
"valid-typeof": 2,
|
||||
"vars-on-top": 0,
|
||||
"wrap-iife": 2,
|
||||
"wrap-regex": 0,
|
||||
"yoda": [2, "never", {"exceptRange": true}]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
node_modules
|
||||
*.log
|
||||
config.json
|
||||
.queues
|
||||
*.txt
|
||||
docs
|
||||
@@ -1,14 +0,0 @@
|
||||
FROM node:erbium
|
||||
|
||||
# Create app directory
|
||||
RUN mkdir -p /usr/src/app
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Install app dependencies
|
||||
COPY package.json /usr/src/app/
|
||||
RUN npm install
|
||||
|
||||
COPY . /usr/src/app
|
||||
|
||||
CMD [ "npm", "start" ]
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
# flutterwave-transfer-micro
|
||||
A microservice to handle flitterware payment services
|
||||
|
||||
# Installation
|
||||
* `git clone` this repository
|
||||
* `cd` into the repository
|
||||
* Build the docker image by `docker build -t flutterwave-transfer-micro .`
|
||||
|
||||
# Run
|
||||
* Set environment variables like `PORT` and `POSTGRE_URL`. Full list in the wiki.
|
||||
* `docker run -p <BINDING> -e PORT=<app_port> -e POSTGRE_URL=<postgre_url> -e FLUTTERWAVE_API=<flutterwave_config> -i -t flutterwave-transfer-micro`
|
||||
|
||||
## Example configurations
|
||||
* binding: 127.0.0.1:3000:3000/tcp
|
||||
* app_port: 3000
|
||||
* postgre_url: postgresql://wrenchboard:wrenchboard@10.10.10.23:5432/wrenchboard
|
||||
* flutterwave_config: eyJCYXNlQXBpVXJsIjoiaHR0cHM6Ly9hcGkuZmx1dHRlcndhdmUuY29tIiwiUHVibGljS2V5IjoiRkxXUFVCS19URVNULTU0YzkwMTQxYjAyODc4OWQ2NzEwNjdiZDcyZjc4MWE5LVgiLCJTZWNyZXRLZXkiOiJGTFdTRUNLX1RFU1QtYzdiYmM4NmQ3ZTcxMDAyNTRjNWU1YmJmMTYyYmYyYjItWCIsIkVuY3J5cHRpb25LZXkiOiJGTFdTRUNLX1RFU1RlOTQ3NGQ0ZTJjZTYifQ==
|
||||
|
||||
## Example command
|
||||
|
||||
```
|
||||
docker run -p 127.0.0.1:3000:3000/tcp \
|
||||
-e PORT=3000 \
|
||||
-e POSTGRE_URL='postgresql://wrenchboard:wrenchboard@10.10.10.23:5432/wrenchboard' \
|
||||
-e FLUTTERWAVE_API='eyJCYXNlQXBpVXJsIjoiaHR0cHM6Ly9hcGkuZmx1dHRlcndhdmUuY29tIiwiUHVibGljS2V5IjoiRkxXUFVCS19URVNULTU0YzkwMTQxYjAyODc4OWQ2NzEwNjdiZDcyZjc4MWE5LVgiLCJTZWNyZXRLZXkiOiJGTFdTRUNLX1RFU1QtYzdiYmM4NmQ3ZTcxMDAyNTRjNWU1YmJmMTYyYmYyYjItWCIsIkVuY3J5cHRpb25LZXkiOiJGTFdTRUNLX1RFU1RlOTQ3NGQ0ZTJjZTYifQ==' \
|
||||
-i -t flutterwave-transfer-micro
|
||||
```
|
||||
|
||||
## Flutterwave config
|
||||
|
||||
Either use a converniece script base64encoder.js or base64 CLI to encode the config:
|
||||
|
||||
```
|
||||
echo '{
|
||||
"BaseApiUrl":"https://api.flutterwave.com",
|
||||
"PublicKey":"FLWPUBK_TEST-54c90141b028789d671067bd72f781a9-X",
|
||||
"SecretKey":"FLWSECK_TEST-c7bbc86d7e7100254c5e5bbf162bf2b2-X",
|
||||
"EncryptionKey":"FLWSECK_TESTe9474d4e2ce6"
|
||||
}' | base64
|
||||
```
|
||||
|
||||
# Test
|
||||
`npm test`
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const properties = require('../package.json')
|
||||
const transfer = require('../service/transfer');
|
||||
|
||||
var controllers = {
|
||||
about: function(req, res) {
|
||||
var aboutInfo = {
|
||||
name: properties.name,
|
||||
version: properties.version
|
||||
}
|
||||
res.json(aboutInfo);
|
||||
},
|
||||
postTransfer: function(req, res) {
|
||||
transfer.create(req, res, function(err, dist) {
|
||||
if (err) {
|
||||
res.send(err);
|
||||
}
|
||||
res.json(dist);
|
||||
});
|
||||
},
|
||||
getStatus: function(req, res) {
|
||||
transfer.get(req, res, function(err, dist) {
|
||||
if (err) {
|
||||
res.send(err);
|
||||
}
|
||||
res.json(dist);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = controllers;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const controller = require('./controller');
|
||||
|
||||
module.exports = function(app) {
|
||||
app.route('/about')
|
||||
.get(controller.about);
|
||||
app.route('/create')
|
||||
.post(controller.postTransfer);
|
||||
app.route('/status/:id')
|
||||
.get(controller.getStatus);
|
||||
};
|
||||
@@ -1,47 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
* Configures the database connection
|
||||
*/
|
||||
|
||||
const { Pool, Client } = require('pg');
|
||||
const logger = require('./logger');
|
||||
//const connectionString = 'postgresql://wrenchboard:wrenchboard@10.10.10.23:5432/wrenchboard';
|
||||
const connectionString = process.env.POSTGRE_URL;
|
||||
const postgres = new Pool({
|
||||
connectionString,
|
||||
});
|
||||
|
||||
postgres.on('connect', client => {
|
||||
logger.info('Connected to Database');
|
||||
});
|
||||
|
||||
postgres.on('acquire', client => {
|
||||
logger.info('Client is checked out from the DB connection pool');
|
||||
});
|
||||
|
||||
postgres.on('remove', client => {
|
||||
logger.info('Client is closed & removed from the DB connection pool');
|
||||
});
|
||||
|
||||
postgres.on('error', (err, client) => {
|
||||
logger.error(err);
|
||||
});
|
||||
|
||||
// Connect to PostgreSQL
|
||||
postgres.connect((err, client, release) => {
|
||||
logger.info(connectionString);
|
||||
if (err) {
|
||||
logger.error('Error acquiring client', err.stack);
|
||||
return null;
|
||||
}
|
||||
client.query('SELECT NOW()', (err, result) => {
|
||||
release();
|
||||
if (err) {
|
||||
logger.error('Error executing query', err.stack);
|
||||
return nul;
|
||||
}
|
||||
logger.info(result.rows);
|
||||
});
|
||||
});
|
||||
|
||||
module.exports = postgres;
|
||||
@@ -1,10 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
* Set up the app
|
||||
*/
|
||||
var _ = require('underscore');
|
||||
var db = require('./db');
|
||||
|
||||
module.exports = function () {
|
||||
db();
|
||||
};
|
||||
@@ -1,61 +0,0 @@
|
||||
/**
|
||||
* @file
|
||||
* Defines logger for the microservice
|
||||
*/
|
||||
|
||||
var winston = require('winston');
|
||||
var Papertrail = require('winston-papertrail').Papertrail;
|
||||
var serviceIdentifier = require('../package.json').name;
|
||||
|
||||
var host = process.env.LOG_SERVICE_HOST;
|
||||
var port = process.env.LOG_SERVICE_PORT;
|
||||
|
||||
/**
|
||||
* Class to provide logging facilities for the microservice
|
||||
* @constructor
|
||||
*/
|
||||
|
||||
var Logger = function () {
|
||||
|
||||
// Try to route logs to third party service
|
||||
if (host && port) {
|
||||
// Define our transport
|
||||
var transport = new Papertrail({
|
||||
levels: {
|
||||
debug: 0,
|
||||
info: 1,
|
||||
error: 3
|
||||
},
|
||||
colors: {
|
||||
debug: 'blue',
|
||||
info: 'green',
|
||||
error: 'red'
|
||||
},
|
||||
host,
|
||||
port,
|
||||
json: true,
|
||||
colorize: true,
|
||||
logFormat: (level, message) => {
|
||||
return `[${serviceIdentifier}] ${level} : ${message}`;
|
||||
}
|
||||
});
|
||||
|
||||
// Handle exceptions
|
||||
transport.exceptionsLevel = 'error';
|
||||
winston.handleExceptions(transport);
|
||||
}
|
||||
|
||||
this.info = winston.info;
|
||||
this.error = winston.error;
|
||||
this.debug = winston.debug;
|
||||
};
|
||||
|
||||
module.exports = new Logger();
|
||||
|
||||
|
||||
/**
|
||||
* @typedef {Object} Logger
|
||||
* @property {function} info - Log in level `info`
|
||||
* @property {function} error - Log in level `error`
|
||||
* @property {function} debug - Log in level `debug`
|
||||
*/
|
||||
@@ -1,9 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
let data = 'eyJQdWJsaWNLZXkiOiJGTFdQVUJLX1RFU1QtNTRjOTAxNDFiMDI4Nzg5ZDY3MTA2N2JkNzJmNzgxYTktWCIsIlNlY3JldEtleSI6IkZMV1NFQ0tfVEVTVC1jN2JiYzg2ZDdlNzEwMDI1NGM1ZTViYmYxNjJiZjJiMi1YIiwiRW5jcnlwdGlvbktleSI6IkZMV1NFQ0tfVEVTVGU5NDc0ZDRlMmNlNiJ9';
|
||||
let buff = new Buffer(data, 'base64');
|
||||
let text = buff.toString('ascii');
|
||||
let json = JSON.parse(text);
|
||||
|
||||
console.log('"' + data + '" converted from Base64 to ASCII is "' + text + '"');
|
||||
console.log(json);
|
||||
@@ -1,13 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
let json = {
|
||||
"BaseApiUrl":"https://api.flutterwave.com",
|
||||
"PublicKey":"FLWPUBK_TEST-54c90141b028789d671067bd72f781a9-X",
|
||||
"SecretKey":"FLWSECK_TEST-c7bbc86d7e7100254c5e5bbf162bf2b2-X",
|
||||
"EncryptionKey":"FLWSECK_TESTe9474d4e2ce6"
|
||||
};
|
||||
let data = JSON.stringify(json);
|
||||
let buff = new Buffer(data);
|
||||
let base64data = buff.toString('base64');
|
||||
|
||||
console.log('"' + data + '" converted to Base64 is "' + base64data + '"');
|
||||
@@ -1,19 +0,0 @@
|
||||
version: '3'
|
||||
services:
|
||||
flutterwave-transfer-micro:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
restart: unless-stopped
|
||||
image: registry.chiefsoft.net/flutterwave-transfer-micro:latest
|
||||
volumes:
|
||||
- ./:/app
|
||||
- '/app/node_modules'
|
||||
ports:
|
||||
- 9086:3000
|
||||
environment:
|
||||
- PORT=3000
|
||||
- POSTGRE_URL='postgresql://wrenchboard:wrenchboard@10.10.10.23:5432/wrenchboard'
|
||||
- FLUTTERWAVE_API='eyJCYXNlQXBpVXJsIjoiaHR0cHM6Ly9hcGkuZmx1dHRlcndhdmUuY29tIiwiUHVibGljS2V5IjoiRkxXUFVCS19URVNULTU0YzkwMTQxYjAyODc4OWQ2NzEwNjdiZDcyZjc4MWE5LVgiLCJTZWNyZXRLZXkiOiJGTFdTRUNLX1RFU1QtYzdiYmM4NmQ3ZTcxMDAyNTRjNWU1YmJmMTYyYmYyYjItWCIsIkVuY3J5cHRpb25LZXkiOiJGTFdTRUNLX1RFU1RlOTQ3NGQ0ZTJjZTYifQ=='
|
||||
volumes:
|
||||
src:
|
||||
-4430
File diff suppressed because it is too large
Load Diff
@@ -1,46 +0,0 @@
|
||||
{
|
||||
"name": "flutterwave-transfer-micro",
|
||||
"version": "0.0.4",
|
||||
"description": "A microservice to handle flutterware payment services",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"generate-docs": "jsdoc ./api/*.js ./api/**/*.js ./app/*.js ./app/**/*.js ./service/*.js ./service/**/*.js -d docs",
|
||||
"lint": "eslint ./ --ext .js",
|
||||
"start": "node server.js",
|
||||
"start:dev": "nodemon server.js",
|
||||
"test": "npm run lint"
|
||||
},
|
||||
"author": "Anatolii Okhotnikov <acidumirae@gmail.com>",
|
||||
"dependencies": {
|
||||
"axios": "^0.24.0",
|
||||
"body-parser": "^1.19.0",
|
||||
"express": "^4.17.1",
|
||||
"openapi-types": "^10.0.0",
|
||||
"pg": "8.7.1",
|
||||
"request": "^2.88.2",
|
||||
"swagger-autogen": "^2.17.2",
|
||||
"swagger-jsdoc": "^6.1.0",
|
||||
"swagger-ui-express": "^4.3.0",
|
||||
"underscore": "^1.8.3",
|
||||
"winston": "^2.3.1",
|
||||
"winston-papertrail": "^1.0.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "^1.10.3",
|
||||
"jsdoc": "^3.4.3",
|
||||
"nodemon": "^1.11.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "ssh://git@gitlab.chiefsoft.net:10222/WrenchBoard/WrenchBoradWeb.git"
|
||||
},
|
||||
"keywords": [
|
||||
"microservice",
|
||||
"flutterwave",
|
||||
"transfer"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://gitlab.chiefsoft.net/WrenchBoard/WrenchBoradWeb/issues"
|
||||
},
|
||||
"homepage": "https://gitlab.chiefsoft.net/WrenchBoard/WrenchBoradWeb/src/master/microservices/flutterwave-transfer-micro/README.md"
|
||||
}
|
||||
@@ -1,151 +0,0 @@
|
||||
const express = require('express');
|
||||
const logger = require('./app/logger');
|
||||
const swaggerUI = require('swagger-ui-express');
|
||||
const swaggerJSDocs = require('swagger-jsdoc');
|
||||
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
const definition = {
|
||||
"swagger": "2.0",
|
||||
"info": {
|
||||
"version": "0.0.4",
|
||||
"title": "flutterwave-transfer-micro",
|
||||
"description": "A microservice to handle flitterware payment services"
|
||||
},
|
||||
"host": "localhost:3000",
|
||||
"basePath": "/",
|
||||
"tags": [],
|
||||
"schemes": [
|
||||
"http"
|
||||
],
|
||||
"consumes": ['application/json'],
|
||||
"produces": ['application/json'],
|
||||
"paths": {
|
||||
"/about": {
|
||||
"get": {
|
||||
"tags": [],
|
||||
"description": "About the microservice (service status)",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/create": {
|
||||
"post": {
|
||||
"tags": [],
|
||||
"description": "Create new transfer",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"parameters": [{
|
||||
"name":"transfer",
|
||||
"in": "body",
|
||||
"description": "Transfer to create",
|
||||
"required": true,
|
||||
"type":"object",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/NewTransfer"
|
||||
},
|
||||
"example": {
|
||||
"account_bank": "044",
|
||||
"account_number": "0690000040",
|
||||
"amount": 5500,
|
||||
"narration": "Akhlm Pstmn Trnsfr xx007",
|
||||
"currency": "NGN",
|
||||
"reference": "akhlm-pstmnpyt-rfxx007_PMCKDU_1",
|
||||
"debit_currency": "NGN"
|
||||
}
|
||||
}],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/status/{id}": {
|
||||
"get": {
|
||||
"tags": [],
|
||||
"description": "Get transfer status",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true,
|
||||
"type": "string"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"NewTransfer": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"account_bank",
|
||||
"account_number",
|
||||
"amount",
|
||||
"narration",
|
||||
"currency",
|
||||
"reference",
|
||||
"debit_currency"
|
||||
],
|
||||
"properties": {
|
||||
"account_bank": {
|
||||
"type": "string"
|
||||
},
|
||||
"account_number": {
|
||||
"type": "string"
|
||||
},
|
||||
"amount": {
|
||||
"type": "integer"
|
||||
},
|
||||
"narration": {
|
||||
"type": "string"
|
||||
},
|
||||
"currency": {
|
||||
"type": "string"
|
||||
},
|
||||
"reference": {
|
||||
"type": "string"
|
||||
},
|
||||
"debit_currency": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
const options = {
|
||||
definition,
|
||||
apis: ['./server.js'],
|
||||
};
|
||||
|
||||
const swaggerSpec = swaggerJSDocs(options);
|
||||
|
||||
const app = express();
|
||||
|
||||
app.get('/swagger.json', (req, res) => {
|
||||
res.setHeader('Content-Type', 'application/json');
|
||||
res.send(swaggerSpec);
|
||||
});
|
||||
app.use('/api-docs', swaggerUI.serve, swaggerUI.setup(swaggerSpec));
|
||||
|
||||
app.use(express.json());
|
||||
app.use(express.urlencoded());
|
||||
|
||||
const routes = require('./api/routes');
|
||||
routes(app);
|
||||
|
||||
app.listen(port, "0.0.0.0", function() {
|
||||
logger.info('***** Server started on port: ' + port + ' *****');
|
||||
});
|
||||
@@ -1,98 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const axios = require('axios');
|
||||
const request = require('request');
|
||||
const db = require('../app/db')
|
||||
const logger = require('../app/logger');
|
||||
|
||||
// https://developer.flutterwave.com/reference/create-a-transfer
|
||||
const flutterwaveConfigBuffer = new Buffer(process.env.FLUTTERWAVE_API, 'base64');
|
||||
const flutterwaveConfig = JSON.parse(flutterwaveConfigBuffer.toString('ascii'));
|
||||
|
||||
var transfer = {
|
||||
create: function(req, res, next) {
|
||||
var url = flutterwaveConfig.BaseApiUrl + '/v3/transfers';
|
||||
var headersOpt = {
|
||||
"Content-Type": "application/json",
|
||||
"Authorization": "Bearer " + flutterwaveConfig.SecretKey,
|
||||
};
|
||||
var data = {
|
||||
"account_bank": req.body.account_bank,
|
||||
"account_number": req.body.account_number,
|
||||
"amount": req.body.amount,
|
||||
"narration": req.body.narration,
|
||||
"currency": req.body.currency,
|
||||
"reference": req.body.reference,
|
||||
"debit_currency": req.body.debit_currency
|
||||
};
|
||||
var options = {
|
||||
headers: headersOpt
|
||||
};
|
||||
logger.info(url);
|
||||
logger.info(options);
|
||||
logger.info(data);
|
||||
// https://blog.logrocket.com/5-ways-to-make-http-requests-in-node-js/
|
||||
// https://stackoverflow.com/questions/53846709/how-do-i-use-axios-within-expressjs
|
||||
axios.post(url, data, options)
|
||||
.then(data => {
|
||||
res.json(data);
|
||||
})
|
||||
.catch(err => {
|
||||
logger.error(err.message);
|
||||
//logger.error(err.stack);
|
||||
logger.error(err.response.data);
|
||||
//logger.error(err.response.headers);
|
||||
res.send({
|
||||
status: "failure",
|
||||
message: "Invalid response",
|
||||
details: err.message,
|
||||
code: err.response.status,
|
||||
data: err.response.data
|
||||
});
|
||||
});
|
||||
// TODO: Do we save the response in the DB? I assume: YES
|
||||
db.query('SELECT NOW()', (err, res) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
logger.info('time:', res.rows[0])
|
||||
});
|
||||
},
|
||||
get: function(req, res, next) {
|
||||
var url = flutterwaveConfig.BaseApiUrl + '/v3/transfers/' + req.params.id;
|
||||
var headersOpt = {
|
||||
"Authorization": "Bearer " + flutterwaveConfig.SecretKey,
|
||||
};
|
||||
var options = {
|
||||
headers: headersOpt
|
||||
};
|
||||
logger.info(url);
|
||||
axios.get(url, options)
|
||||
.then(data => {
|
||||
res.json(data);
|
||||
})
|
||||
.catch(err => {
|
||||
logger.error(err.message);
|
||||
//logger.error(err.stack);
|
||||
logger.error(err.response.data);
|
||||
//logger.error(err.response.headers);
|
||||
res.send({
|
||||
status: "failure",
|
||||
message: "Invalid response",
|
||||
details: err.message,
|
||||
code: err.response.status,
|
||||
data: err.response.data
|
||||
});
|
||||
});
|
||||
// TODO: Do we save the response in the DB? I assume: YES
|
||||
db.query('SELECT NOW()', (err, res) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
logger.info('time:', res.rows[0])
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = transfer;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
const swaggerAutogen = require('swagger-autogen')();
|
||||
|
||||
const outputFile = './swagger.json';
|
||||
const endpointsFiles = ['./api/routes.js']
|
||||
|
||||
swaggerAutogen(outputFile, endpointsFiles).then(() => {
|
||||
require('./server.js')
|
||||
})
|
||||
@@ -105,7 +105,7 @@ If you did not log on to your account at the time detailed above, please contact
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
For all support, contact us at <a href="https://{{server_name}}/contact">https://{{server_name}}/contact</a>
|
||||
For all support, contact us at <a href="{{server_name}}/contact">https://{{server_name}}/contact</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -130,7 +130,7 @@ Recently added task(s)
|
||||
{{pin}}
|
||||
{{/...}}
|
||||
{{/inv_items}}
|
||||
</table
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</td></tr>
|
||||
|
||||
@@ -128,7 +128,7 @@ Note : The link will expire by:{{expire}}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
If you did not initiate this account creation or have any further support question, Please contact us at https://{{server_name}}/contact<br>
|
||||
If you did not initiate this account creation or have any further support question, Please contact us at https://www.wrenchboard.com/contact<br>
|
||||
<hr size="1">
|
||||
With <a href="http://{{server_name}}">{{site_name}}</a>,you can enjoy free connection to makerplace for all of your ability. We are simply here to empower you..
|
||||
</td>
|
||||
@@ -146,7 +146,7 @@ Note : The link will expire by:{{expire}}
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://www.wrenchboard.com/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -1,192 +1,182 @@
|
||||
Subject: WrenchBoard Signup Report
|
||||
|
||||
Subject: WrenchBoard Report {{site_name}}
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>WrenchBoard Signup Report</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 40px 30px 20px 30px;}
|
||||
.innerpadding {padding: 30px 30px 30px 30px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.h2 {padding: 0 0 15px 0; font-size: 24px; line-height: 28px; font-weight: bold;}
|
||||
.bodycopy {font-size: 14px; line-height: 20px;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
|
||||
@media only screen and (max-width: 550px), screen and (max-device-width: 550px) {
|
||||
body[yahoo] .hide {display: none!important;}
|
||||
body[yahoo] .buttonwrapper {background-color: transparent!important;}
|
||||
body[yahoo] .button {padding: 0px!important;}
|
||||
body[yahoo] .button a {background-color: #e05443; padding: 15px 15px 13px!important;}
|
||||
body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px; background: #2f3942; border-radius: 5px; text-decoration: none!important; font-weight: bold;}
|
||||
}
|
||||
|
||||
/*@media only screen and (min-device-width: 601px) {
|
||||
.content {width: 600px !important;}
|
||||
.col425 {width: 425px!important;}
|
||||
.col380 {width: 380px!important;}
|
||||
}*/
|
||||
|
||||
</style>
|
||||
<meta charset="utf-8">
|
||||
<title>WrenchBoard Report {{site_name}}</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 10px 10px 10px 10px;}
|
||||
.innerpadding {padding: 10px 10px 10px 10px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h2, h2 {color: #153643; font-family: sans-serif;}
|
||||
.h1, h1 {font-size: 15px; line-height: 10px; font-weight: bold;}
|
||||
.bodycopy {font-size: 10px; line-height: 10px; text-align: center;}
|
||||
.trColor { background-color:#D2F7F4;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<table width="70" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="70" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard-icon.gif" width="70" height="70" border="0" alt="WrenchBoard" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td class="h1" style="padding: 5px 0 0 0;">
|
||||
{{site_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="115" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="115" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/article1.png" width="115" height="115" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
|
||||
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 380px;">
|
||||
<tr><td colspan="2"><h2>{{report_date}}</h2></td></tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Today Sign-up</td>
|
||||
<td class="bodycopy"><h1>{{today_signup}}</h1>People that completed the sign-up</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Pending Sign-up</td>
|
||||
<td class="bodycopy"><h2>{{today_pending_signup}}</h2>-People still in the process not completed</td>
|
||||
</tr>
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="30" border="0" style="text-align:center;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td style="padding: 1px 0 1px 0; text-align:center;">
|
||||
<a href="https://www.wrenchboard.com/"><img src="https://dashboard.wrenchboard.com/assets/ext/images/wrenchboard.png" alt="WrenchBoard"></a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px; text-align:center;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td colspan="2"><h2>{{report_date}}</h2></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">Today Sign-up - <span>People that completed the sign-up</span></td>
|
||||
<td class="bodycopy"><h1>{{today_signup}}</h1></td>
|
||||
</tr>
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">Pending Sign-up - <span>People still in the process not completed</span></td>
|
||||
<td class="bodycopy"><h1>{{today_pending_signup}}</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">Public Active Jobs - <span>Jobs total shown to public now</span></td>
|
||||
<td class="bodycopy"><h1>{{total_active_public_jobs}}</h1></td>
|
||||
</tr>
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">Interest Contats - <span>Total Show of interest today</span></td>
|
||||
<td class="bodycopy"><h1>{{total_task_interest}}</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">Session - <span>Session total created today</span></td>
|
||||
<td class="bodycopy"><h1>{{total_login}}</h1></td>
|
||||
</tr>
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">Private Tasks - <span>Private Task now</span></td>
|
||||
<td class="bodycopy"><h1>{{total_private_tasks}}</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">Mobile App Login - <span>Log in tracked from the mobile app</span></td>
|
||||
<td class="bodycopy"><h1>{{count_mobile_login}}</h1></td>
|
||||
</tr>
|
||||
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">-------------------</span></td>
|
||||
<td class="bodycopy"><h1>-----</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">--------<span>--------</span></td>
|
||||
<td class="bodycopy"><h1>-----</h1></td>
|
||||
</tr>
|
||||
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">-------------------</span></td>
|
||||
<td class="bodycopy"><h1>-----</h1></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">--------<span>--------</span></td>
|
||||
<td class="bodycopy"><h1>-----</h1></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
{{site_name}} Support Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because you are a member of {{site_name}} support team. If you get this email in error, please <a href="https://{{server_name}}/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>Please <a href ="https://{{server_name}}/bko">login</a> into BackOffice from authorized system to support the user.</h4>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://twitter.com/wrenchboard">
|
||||
<img src="https://{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
{{site_name}} Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
You received this email because you are a support user for {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://twitter.com/wrenchboard">
|
||||
<img src="https://{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,220 +1,212 @@
|
||||
Subject: WrenchBoard Completed Signup ALERT
|
||||
Subject: {{site_name}} - Completed Signup ALERT
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>WrenchBoard Completed Signup ALERT</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 40px 30px 20px 30px;}
|
||||
.innerpadding {padding: 30px 30px 30px 30px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.h2 {padding: 0 0 15px 0; font-size: 24px; line-height: 28px; font-weight: bold;}
|
||||
.bodycopy {font-size: 14px; line-height: 20px;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>{{site_name}} - Completed Signup ALERT {{email}}</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 40px 30px 20px 30px;}
|
||||
.innerpadding {padding: 30px 30px 30px 30px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.h2 {padding: 0 0 15px 0; font-size: 24px; line-height: 28px; font-weight: bold;}
|
||||
.h3 {padding: 0 0 15px 0; font-size: 20px; line-height: 20px; font-weight: bold;}
|
||||
.bodycopy {font-size: 16px; line-height: 22px;}
|
||||
.button {text-align: center; font-size: 18px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
|
||||
@media only screen and (max-width: 550px), screen and (max-device-width: 550px) {
|
||||
body[yahoo] .hide {display: none!important;}
|
||||
body[yahoo] .buttonwrapper {background-color: transparent!important;}
|
||||
body[yahoo] .button {padding: 0px!important;}
|
||||
body[yahoo] .button a {background-color: #e05443; padding: 15px 15px 13px!important;}
|
||||
body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px; background: #2f3942; border-radius: 5px; text-decoration: none!important; font-weight: bold;}
|
||||
}
|
||||
@media only screen and (max-width: 550px), screen and (max-device-width: 550px) {
|
||||
body[yahoo] .hide {display: none!important;}
|
||||
body[yahoo] .buttonwrapper {background-color: transparent!important;}
|
||||
body[yahoo] .button {padding: 0px!important;}
|
||||
body[yahoo] .button a {background-color: #e05443; padding: 15px 15px 13px!important;}
|
||||
body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px; background: #2f3942; border-radius: 5px; text-decoration: none!important; font-weight: bold;}
|
||||
}
|
||||
|
||||
/*@media only screen and (min-device-width: 601px) {
|
||||
.content {width: 600px !important;}
|
||||
.col425 {width: 425px!important;}
|
||||
.col380 {width: 380px!important;}
|
||||
}*/
|
||||
/*@media only screen and (min-device-width: 601px) {
|
||||
.content {width: 600px !important;}
|
||||
.col425 {width: 425px!important;}
|
||||
.col380 {width: 380px!important;}
|
||||
}*/
|
||||
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<table width="70" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="70" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard-icon.gif" width="70" height="70" border="0" alt="WrenchBoard" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<table width="70" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="50" style="padding: 0 10px 10px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard-icon.gif" width="70" height="70" border="0" alt="WrenchBoard" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td class="h1" style="padding: 5px 0 0 0;">
|
||||
{{site_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="h1" style="padding: 5px 0 0 0;">
|
||||
{{site_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
|
||||
<tr >
|
||||
<td colspan="2"><h3>Signup Pending-{{added}}</h3></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="115" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="115" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/article1.png" width="115" height="115" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 380px;">
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Firstname</td>
|
||||
<td class="bodycopy">{{firstname}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Lastname</td>
|
||||
<td class="bodycopy">{{lastname}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
|
||||
<tr >
|
||||
<td colspan="2"><h3>Signup Pending-{{added}}</h3></td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Email</td>
|
||||
<td class="bodycopy">{{email2}}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Firstname</td>
|
||||
<td class="bodycopy">{{firstname}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Lastname</td>
|
||||
<td class="bodycopy">{{lastname}}</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Location</td>
|
||||
<td class="bodycopy"><a href="https://www.chiefsoft.com/tools/iplocator?ip={{loc}}">{{loc}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Created</td>
|
||||
<td class="bodycopy">{{added}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Email</td>
|
||||
<td class="bodycopy">{{email2}}</td>
|
||||
</tr>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Location</td>
|
||||
<td class="bodycopy"><a href="https://www.chiefsoft.com/tools/iplocator?ip={{loc}}">{{loc}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="left" style="width:100px">Created</td>
|
||||
<td class="bodycopy">{{added}}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Link</td>
|
||||
<td class="bodycopy">{{verify_link}}</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><h4>Please <a href ="https://{{server_name}}/bko">login</a> into BackOffice from authorized system to support the user.</h4>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
{{site_name}} Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
You received this email because you are a support user for {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://twitter.com/wrenchboard">
|
||||
<img src="https://{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="http://www.twitter.com/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
@@ -0,0 +1,180 @@
|
||||
Subject: {{site_name}} - Coupon Allocated
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>{{site_name}} - Coupon Allocated</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 10px 10px 10px 10px;}
|
||||
.innerpadding {padding: 10px 10px 10px 10px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.bodycopy {font-size: 14px; line-height: 20px;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="30" border="0" style="text-align:center;">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td style="padding: 1px 0 1px 0; text-align:center;">
|
||||
<a href="https://www.wrenchboard.com/"><img src="https://dashboard.wrenchboard.com/assets/ext/images/wrenchboard.png" alt="WrenchBoard"></a> <!-- {{site_name}} -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px; text-align:center;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%;">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
Hello {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
Please be informed that you logged on to {{site_name}} account at <b>{{last_login2}}</b>.
|
||||
If you did not log on to your account at the time detailed above, please contact us immediately.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
For all support, contact us at <a href="{{server_name}}/contact">https://{{server_name}}/contact</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
{{site_name}} Team
|
||||
<br>
|
||||
{{server_name}}
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
<br>
|
||||
Recently added task(s)
|
||||
<table border="0" width='100%;' id="table1" style="font-family: Trebuchet MS; font-size: 10pt ">
|
||||
{{\inv_items}}
|
||||
{{...}}
|
||||
{{pin}}
|
||||
{{/...}}
|
||||
{{/inv_items}}
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="center" style="padding: 20px 0 0 0;">
|
||||
<table border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://www.facebook.com/wrenchboard/">
|
||||
<img src="https://{{server_name}}/assets/images/brands/facebook.png" width="37" height="37" alt="Facebook" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://twitter.com/wrenchboard">
|
||||
<img src="https://{{server_name}}/assets/images/brands/twitter.png" width="37" height="37" alt="Twitter" border="0" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,4 +1,4 @@
|
||||
Subject: {{subject}}
|
||||
Subject: {{subject}}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
@@ -10,158 +10,91 @@ Subject: {{subject}}
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
img {height: auto;}
|
||||
.content {width: 100%; max-width: 600px;}
|
||||
.header {padding: 40px 30px 20px 30px;}
|
||||
.header {padding: 10px 10px 10px 10px;}
|
||||
.innerpadding {padding: 10px 10px 10px 10px;}
|
||||
.borderbottom {border-bottom: 1px solid #f2eeed;}
|
||||
.subhead {font-size: 12px; color: #ffffff; font-family: sans-serif; letter-spacing: 3px;}
|
||||
.h1, .h2, .bodycopy {color: #153643; font-family: sans-serif;}
|
||||
.h1 {font-size: 33px; line-height: 38px; font-weight: bold;}
|
||||
.h2 {padding: 0 0 15px 0; font-size: 24px; line-height: 28px; font-weight: bold;}
|
||||
.bodycopy {font-size: 14px; line-height: 20px;}
|
||||
.button {text-align: center; font-size: 16px; font-family: sans-serif; font-weight: bold; padding: 0 30px 0 30px;}
|
||||
.button a {color: #ffffff; text-decoration: none;}
|
||||
.footer {padding: 20px 30px 15px 30px;}
|
||||
.footer {padding: 20px 30px 15px 30px; bgcolor:#007bff; background-color:#007bff;}
|
||||
.footercopy {font-family: sans-serif; font-size: 14px; color: #ffffff;}
|
||||
.footercopy a {color: #ffffff; text-decoration: underline;}
|
||||
|
||||
@media only screen and (max-width: 550px), screen and (max-device-width: 550px) {
|
||||
body[yahoo] .hide {display: none!important;}
|
||||
body[yahoo] .buttonwrapper {background-color: transparent!important;}
|
||||
body[yahoo] .button {padding: 0px!important;}
|
||||
body[yahoo] .button a {background-color: #e05443; padding: 15px 15px 13px!important;}
|
||||
body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px; background: #2f3942; border-radius: 5px; text-decoration: none!important; font-weight: bold;}
|
||||
}
|
||||
|
||||
/*@media only screen and (min-device-width: 601px) {
|
||||
.content {width: 600px !important;}
|
||||
.col425 {width: 425px!important;}
|
||||
.col380 {width: 380px!important;}
|
||||
}*/
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<tr>
|
||||
<td>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="600" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<![endif]-->
|
||||
<table bgcolor="#ffffff" class="content" align="center" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td bgcolor="#c7d8a7" class="header">
|
||||
<table width="70" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="70" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard-icon.gif" width="70" height="70" border="0" alt="WrenchBoard" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="425" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
|
||||
<tr>
|
||||
<td class="h1" style="padding: 5px 0 0 0;">
|
||||
{{site_name}}
|
||||
<td style="padding: 1px 0 1px 0; text-align:center;">
|
||||
<a href="https://www.wrenchboard.com/"><img src="https://dashboard.wrenchboard.com/assets/ext/images/wrenchboard.png" alt="WrenchBoard"></a> <!-- {{site_name}} -->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="subhead" style="padding: 0 0 0 3px;">
|
||||
<td class="subhead" style="padding: 0 0 0 3px; text-align:center;">
|
||||
{{site_trade_name}}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="h3">
|
||||
<td class="h2">
|
||||
<b>Dear {{firstname}}</b>,
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
You now have <b>{{preview_count}} task(s)</b> at <a href="https://{{server_name}}/">{{site_name}}</a> in <b>"Preview"</b> status and your attention is needed.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
You now have <b>{{preview_count}} task(s)</b> at <a href="https://{{server_name}}/">{{site_name}}</a> in <b>"Preview"</b> status and your attention is needed.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="115" align="left" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td height="115" style="padding: 0 20px 20px 0;">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/article1.png" width="115" height="115" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="380" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col380" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 380px;">
|
||||
<tr>
|
||||
<td>
|
||||
<table width="100%" border="0" cellspacing="1" cellpadding="0" class="bodycopy" style="font-size: 14px; font-family: sans-serif; border: 1px solid #f2eeed; background-color:#e6f9ff;">
|
||||
<tr>
|
||||
<td>
|
||||
<td class="bodycopy">
|
||||
<hr size="1">
|
||||
It is essential that you login and process the task(s) appropriately. In the event of no response from you, <a href="https://{{server_name}}/">{{site_name}}</a> will automatically pay the client and close the task for you in few hours.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<b>Delivery Date: </b>
|
||||
|
||||
{{delivery_date}}
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
<hr size="1">
|
||||
<b>Delivery Date: </b> {{delivery_date}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
<hr size="1">
|
||||
<h4>Please <a href ="https://{{server_name}}/eoffer?offerID={{offer_code}}">login</a> into your account to manage this task.</h4>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td><h4>Please <a href ="https://{{server_name}}/eoffer?offerID={{offer_code}}">login</a> into your account to manage this task.</h4>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
<td class="innerpaddig bodycopy">
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -172,12 +105,13 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
You received this email because a subscriber to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because you subscribe to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -210,8 +144,5 @@ You received this email because a subscriber to {{site_name}}. If you get this e
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -174,7 +174,7 @@ This task will be due very soon. After the due date, the task will be past due,
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -189,7 +189,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a subscriber to {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -225,6 +225,5 @@ You received this email because a subscriber to {{site_name}}. If you get this e
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -202,7 +202,7 @@ Note that this task was posted in the public domain and the owner can select any
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -217,7 +217,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -253,6 +253,5 @@ You received this email because a user sent a job to you from {{site_name}}. If
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -197,7 +197,7 @@ Detail
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -212,7 +212,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -156,7 +156,7 @@ You have received a messager from a <a href="https://{{server_name}}/eoffer?offe
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -171,7 +171,7 @@ You have received a messager from a <a href="https://{{server_name}}/eoffer?offe
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because of your interest in a task @ {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -162,7 +162,7 @@ You have received a job message from <a href="https://{{server_name}}/eoffer?off
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -177,7 +177,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -211,8 +211,5 @@ You received this email because a user sent a job to you from {{site_name}}. If
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -169,7 +169,7 @@ Last Message
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -184,7 +184,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -218,8 +218,5 @@ You received this email because a user sent a job to you from {{site_name}}. If
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -195,7 +195,7 @@ img {height: auto;}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -210,7 +210,7 @@ img {height: auto;}
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -185,7 +185,7 @@ img {height: auto;}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -200,7 +200,7 @@ img {height: auto;}
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -190,7 +190,7 @@ You have received a job offer from a <a href="https://{{server_name}}">{{site_na
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -205,7 +205,7 @@ You have received a job offer from a <a href="https://{{server_name}}">{{site_na
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -213,7 +213,7 @@ You have received a job offer from a <a href="https://{{server_name}}/eoffer?off
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -228,7 +228,7 @@ You have received a job offer from a <a href="https://{{server_name}}/eoffer?off
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -187,7 +187,7 @@ Offer Expire
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -192,7 +192,7 @@ img {height: auto;}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -207,7 +207,7 @@ img {height: auto;}
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -208,8 +208,5 @@ Price
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -143,7 +143,7 @@ You have task that are in past due status as shown below, Please log in to close
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -158,7 +158,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -148,7 +148,7 @@ You have received a reply message from <a href="https://{{server_name}}/eoffer?o
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -163,7 +163,7 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because of your interest in a task @ {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -178,7 +178,7 @@ img {height: auto;}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
Please contact us at https://{{server_name}}/contact if you have any question about this email.
|
||||
Please contact us at https://www.wrenchboard.com/contact if you have any question about this email.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -193,7 +193,7 @@ img {height: auto;}
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2017<br/>
|
||||
® {{site_name}} 2022<br/>
|
||||
You received this email because a user sent a job to you from {{site_name}}. If you get this email in error, please <a href="https://{{server_name}}/contactus" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
@@ -227,8 +227,5 @@ img {height: auto;}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -108,10 +108,10 @@ paylid:
|
||||
|
||||
transnotif:
|
||||
{
|
||||
contact = "ses66181@gmail.com,support@wrenchboard.com,ameye@fluxtra.net";
|
||||
topupemail = "ses66181@gmail.com,ameye@chiefsoft.com";
|
||||
signupreport ="ses66181+signup@gmail.com";
|
||||
topalert = "demo@myexperiencenow.com";
|
||||
contact = "ses66181+contact@gmail.com,support+contact@wrenchboard.com,tokslaw+contact@chiefsoft.com";
|
||||
topupemail = "ses66181@gmail.com,ameye@chiefsoft.com,tokslaw+signup@chiefsoft.com";
|
||||
signupreport ="ses66181+signup@gmail.com,tokslaw+signup@chiefsoft.com";
|
||||
topalert = "ses66181+alert@gmail.com,tokslaw+alert@chiefsoft.com";
|
||||
};
|
||||
|
||||
webpay:
|
||||
|
||||
@@ -12,7 +12,7 @@ ZEND_EXT_TYPE = zend_extension
|
||||
RE2C = exit 0;
|
||||
AWK = gawk
|
||||
WRENCHBOARD_API_OAMEYE_SHARED_LIBADD = -Wl,-rpath,/usr/lib64 -L/usr/lib64 -lpq -lstdc++ -lcurl -lconfig++ -ljson-c -lssl -lz -lpcrecpp -lgcc_s
|
||||
shared_objects_wrenchboard_api_oameye = core/XmlElements.lo core/XmlParser.lo core/cfg.lo core/cgi.lo core/clog.lo core/cvariables.lo core/exceptions.lo core/hmac_sha2.lo core/input.lo core/list.lo core/pgsql.lo core/pgsql_wrapper.lo core/safestring.lo core/sha2.lo core/sha512.lo core/smtp.lo core/timer.lo core/util.lo core/vars.lo core/wrenchboard.lo core/wrenchboard_api.lo shared_tool/account.lo shared_tool/account_mngt.lo shared_tool/bko.lo shared_tool/common_tool.lo shared_tool/contract.lo shared_tool/creditcards.lo shared_tool/email.lo shared_tool/groups.lo shared_tool/jobs.lo shared_tool/login.lo shared_tool/mobile.lo shared_tool/namespaces.lo shared_tool/payments.lo shared_tool/site_crons.lo shared_tool/smoney.lo shared_tool/stripe.lo shared_tool/stripe_charge.lo shared_tool/topups.lo shared_tool/twilo.lo shared_tool/wrenchboard_api_main.lo
|
||||
shared_objects_wrenchboard_api_oameye = core/XmlElements.lo core/XmlParser.lo core/cfg.lo core/cgi.lo core/clog.lo core/cvariables.lo core/exceptions.lo core/hmac_sha2.lo core/input.lo core/list.lo core/pgsql.lo core/pgsql_wrapper.lo core/safestring.lo core/sha2.lo core/sha512.lo core/smtp.lo core/timer.lo core/util.lo core/vars.lo core/wrenchboard.lo core/wrenchboard_api.lo shared_tool/account.lo shared_tool/account_mngt.lo shared_tool/bko.lo shared_tool/cards.lo shared_tool/common_tool.lo shared_tool/contract.lo shared_tool/coupons.lo shared_tool/creditcards.lo shared_tool/email.lo shared_tool/groups.lo shared_tool/jobs.lo shared_tool/login.lo shared_tool/mobile.lo shared_tool/namespaces.lo shared_tool/payments.lo shared_tool/reco_egine.lo shared_tool/site_crons.lo shared_tool/smoney.lo shared_tool/stripe.lo shared_tool/stripe_charge.lo shared_tool/topups.lo shared_tool/twilo.lo shared_tool/wrenchboard_api_main.lo
|
||||
PHP_PECL_EXTENSION = wrenchboard_api_oameye
|
||||
PHP_MODULES = $(phplibdir)/wrenchboard_api_oameye.la
|
||||
PHP_ZEND_EX =
|
||||
@@ -238,10 +238,14 @@ shared_tool/account_mngt.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_too
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/account_mngt.cc -o shared_tool/account_mngt.lo
|
||||
shared_tool/bko.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/bko.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/bko.cc -o shared_tool/bko.lo
|
||||
shared_tool/cards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/cards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/cards.cc -o shared_tool/cards.lo
|
||||
shared_tool/common_tool.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc -o shared_tool/common_tool.lo
|
||||
shared_tool/contract.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc -o shared_tool/contract.lo
|
||||
shared_tool/coupons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc -o shared_tool/coupons.lo
|
||||
shared_tool/creditcards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc -o shared_tool/creditcards.lo
|
||||
shared_tool/email.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/email.cc
|
||||
@@ -258,6 +262,8 @@ shared_tool/namespaces.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/namespaces.cc -o shared_tool/namespaces.lo
|
||||
shared_tool/payments.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/payments.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/payments.cc -o shared_tool/payments.lo
|
||||
shared_tool/reco_egine.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/reco_egine.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/reco_egine.cc -o shared_tool/reco_egine.lo
|
||||
shared_tool/site_crons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/site_crons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/site_crons.cc -o shared_tool/site_crons.lo
|
||||
shared_tool/smoney.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/smoney.cc
|
||||
|
||||
@@ -46,10 +46,14 @@ shared_tool/account_mngt.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_too
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/account_mngt.cc -o shared_tool/account_mngt.lo
|
||||
shared_tool/bko.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/bko.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/bko.cc -o shared_tool/bko.lo
|
||||
shared_tool/cards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/cards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/cards.cc -o shared_tool/cards.lo
|
||||
shared_tool/common_tool.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/common_tool.cc -o shared_tool/common_tool.lo
|
||||
shared_tool/contract.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/contract.cc -o shared_tool/contract.lo
|
||||
shared_tool/coupons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/coupons.cc -o shared_tool/coupons.lo
|
||||
shared_tool/creditcards.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/creditcards.cc -o shared_tool/creditcards.lo
|
||||
shared_tool/email.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/email.cc
|
||||
@@ -66,6 +70,8 @@ shared_tool/namespaces.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/namespaces.cc -o shared_tool/namespaces.lo
|
||||
shared_tool/payments.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/payments.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/payments.cc -o shared_tool/payments.lo
|
||||
shared_tool/reco_egine.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/reco_egine.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/reco_egine.cc -o shared_tool/reco_egine.lo
|
||||
shared_tool/site_crons.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/site_crons.cc
|
||||
$(LIBTOOL) --mode=compile $(CXX) -I/home/oameye/wrenchboard/wrenchboard/src/libconfig-1.0.1 -I. -I/home/oameye/wrenchboard/wrenchboard/src $(COMMON_FLAGS) $(CXXFLAGS_CLEAN) $(EXTRA_CXXFLAGS) -c /home/oameye/wrenchboard/wrenchboard/src/shared_tool/site_crons.cc -o shared_tool/site_crons.lo
|
||||
shared_tool/smoney.lo: /home/oameye/wrenchboard/wrenchboard/src/shared_tool/smoney.cc
|
||||
|
||||
@@ -12,9 +12,9 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
|
||||
hostname = WrenchBoardDev
|
||||
uname -m = x86_64
|
||||
uname -r = 4.18.0-193.14.2.el8_2.x86_64
|
||||
uname -r = 4.18.0-358.el8.x86_64
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP Sun Jul 26 03:54:29 UTC 2020
|
||||
uname -v = #1 SMP Mon Jan 10 13:11:20 UTC 2022
|
||||
|
||||
/usr/bin/uname -p = x86_64
|
||||
/bin/uname -X = unknown
|
||||
@@ -50,7 +50,7 @@ configure:2566: found /usr/bin/cc
|
||||
configure:2577: result: cc
|
||||
configure:2608: checking for C compiler version
|
||||
configure:2617: cc --version >&5
|
||||
cc (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
|
||||
cc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13)
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -65,7 +65,7 @@ OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
|
||||
gcc version 8.5.0 20210514 (Red Hat 8.5.0-13) (GCC)
|
||||
configure:2628: $? = 0
|
||||
configure:2617: cc -V >&5
|
||||
cc: error: unrecognized command line option '-V'
|
||||
@@ -216,7 +216,7 @@ configure:4113: found /usr/bin/g++
|
||||
configure:4124: result: g++
|
||||
configure:4151: checking for C++ compiler version
|
||||
configure:4160: g++ --version >&5
|
||||
g++ (GCC) 8.3.1 20191121 (Red Hat 8.3.1-5)
|
||||
g++ (GCC) 8.5.0 20210514 (Red Hat 8.5.0-13)
|
||||
Copyright (C) 2018 Free Software Foundation, Inc.
|
||||
This is free software; see the source for copying conditions. There is NO
|
||||
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -231,7 +231,7 @@ OFFLOAD_TARGET_DEFAULT=1
|
||||
Target: x86_64-redhat-linux
|
||||
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --disable-libmpx --enable-offload-targets=nvptx-none --without-cuda-driver --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
|
||||
Thread model: posix
|
||||
gcc version 8.3.1 20191121 (Red Hat 8.3.1-5) (GCC)
|
||||
gcc version 8.5.0 20210514 (Red Hat 8.5.0-13) (GCC)
|
||||
configure:4171: $? = 0
|
||||
configure:4160: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
@@ -537,6 +537,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
on WrenchBoardDev
|
||||
|
||||
config.status:944: creating config.h
|
||||
config.status:1034: config.h is unchanged
|
||||
config.status:1048: executing libtool commands
|
||||
|
||||
## ---------------- ##
|
||||
|
||||
@@ -662,7 +662,7 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
|
||||
finish_eval=''
|
||||
hardcode_into_libs='yes'
|
||||
sys_lib_search_path_spec='/usr/lib/gcc/x86_64-redhat-linux/8 /usr/lib64 /lib64 /usr/lib /lib '
|
||||
configure_time_dlsearch_path='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst '
|
||||
configure_time_dlsearch_path='/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst '
|
||||
configure_time_lt_sys_library_path=''
|
||||
hardcode_action='immediate'
|
||||
enable_dlopen='unknown'
|
||||
|
||||
@@ -8,6 +8,9 @@ long account_calls(CVars in, CVars &out);
|
||||
|
||||
long LoginWrenchBoardAccount( CVars in, CVars &out );
|
||||
long LoginWrenchBoardFacebook( CVars in, CVars &out );
|
||||
long LoginWrenchBoardGoogle( CVars in, CVars &out );
|
||||
long LoginWrenchBoardApple( CVars in, CVars &out );
|
||||
long LoginWrenchBoardExternal( CVars in, CVars &out );
|
||||
long SessionCheck(long uid, const char *sessionid, int create );
|
||||
long account_session_check(CVars in, CVars out);
|
||||
long VerifySession(CVars in, CVars &out);
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef __mx_cards_h__
|
||||
#define __mx_cards_h__
|
||||
|
||||
#include "vars.h"
|
||||
|
||||
long card_calls(CVars in, CVars &out);
|
||||
|
||||
long card_calls(CVars in, CVars &out);
|
||||
long getMembercards(CVars in, CVars &out);
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
#ifndef __mx_coupons_h__
|
||||
#define __mx_coupons_h__
|
||||
|
||||
#include "vars.h"
|
||||
|
||||
long coupons_calls(CVars in, CVars &out);
|
||||
|
||||
long CreateCoupon( CVars in, CVars &out );
|
||||
long AssignCoupon( CVars in, CVars &out );
|
||||
long RedeemCoupon( CVars in, CVars &out );
|
||||
|
||||
#endif
|
||||
@@ -38,6 +38,7 @@ long sendmoney_email(long mailtype, CVars in, CVars &out);
|
||||
long alert_email(long mailtype, CVars in, CVars &out) ;
|
||||
long SendmarketMessage(CVars in, CVars &out);
|
||||
long cron_email(long mailtype, CVars in, CVars &out);
|
||||
long coupon_email(long mailtype, CVars in, CVars &out);
|
||||
|
||||
long SignupPendingAlertMailfile(CVars in);
|
||||
long SignupCompletedAlertMailfile(CVars in);
|
||||
|
||||
@@ -12,8 +12,9 @@ long WrenchCanceContractPayment( CVars in, CVars &out );
|
||||
|
||||
long WrenchNewCardPayment( CVars in, CVars &out );
|
||||
long WrenchCardRechargePayment( CVars in, CVars &out );
|
||||
long CheckWallet(long member_id,CVars in);
|
||||
long DeductMemberWallet(long member_id,long wallet_id,long amount, long payment_id);
|
||||
long CheckWallet(long member_id,CVars in);
|
||||
long DeductMemberWallet(long member_id,long wallet_id,long amount, long payment_id);
|
||||
long WrenchMemberCouponPayment( CVars in, CVars &out );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
#ifndef __mx_reco_engine_h__
|
||||
#define __mx_reco_engine_h__
|
||||
|
||||
#include "vars.h"
|
||||
|
||||
long recommendation_engine(long action , CVars in, CVars &out);
|
||||
|
||||
#endif
|
||||
@@ -20,6 +20,11 @@ enum { PARTNER_STRIPE };
|
||||
#define OFFER_EXPIRE 444
|
||||
#define OFFER_SENDTOME 777
|
||||
|
||||
#define WEBSITE_LOGIN 1100
|
||||
#define MOBILE_LOGIN 1101
|
||||
#define FACEBOOK_LOGIN 1102
|
||||
#define APPLE_LOGIN 1103
|
||||
#define GOOGLE_LOGIN 1104
|
||||
|
||||
#define CONTRACT_CANCEL_CONTRACT 7
|
||||
#define CONTRACT_EXTEND_TIMELINE 9
|
||||
@@ -99,7 +104,12 @@ enum { PARTNER_STRIPE };
|
||||
#define ACCOUNT_AGREE_REFER 200
|
||||
|
||||
//========================
|
||||
|
||||
#define RECOMMEND_COUPON 1000
|
||||
#define RECOMMEND_BLOG 1005
|
||||
#define RECOMMEND_NEWTASK 1010
|
||||
#define RECOMMEND_TOKEN 1015
|
||||
#define RECOMMEND_OFFERS 1020
|
||||
//========================
|
||||
|
||||
#define WRENCHBOARD_SESSION_CHECK 299
|
||||
#define WRENCHBOARD_USER_LOGIN 300
|
||||
@@ -113,7 +123,8 @@ enum { PARTNER_STRIPE };
|
||||
|
||||
#define WRB_CRONJOB_SIGNUP_ALERT 773
|
||||
#define WRB_CRONJOB_PASTDUE_ALERT 774
|
||||
|
||||
#define WRB_CRONJOB_OFFER_REFUND_ALERT 775
|
||||
#define WRB_CRONJOB_PENDOFFER_ALERT 776
|
||||
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_BKO_START 10000
|
||||
@@ -144,6 +155,8 @@ enum { PARTNER_STRIPE };
|
||||
#define WRENCHBOARD_ACCOUNT_CREATEACC 11020
|
||||
#define WRENCHBOARD_ACCOUNT_LOGIN 11025
|
||||
#define WRENCHBOARD_FACEBOOK_LOGIN 11026
|
||||
#define WRENCHBOARD_GOOGLE_LOGIN 11027
|
||||
#define WRENCHBOARD_APPLE_LOGIN 11031
|
||||
#define WRENCHBOARD_START_JOBLIST 11028
|
||||
#define WRENCHBOARD_ACCOUNT_DASHDATA 11029
|
||||
|
||||
@@ -169,6 +182,7 @@ enum { PARTNER_STRIPE };
|
||||
|
||||
#define WRENCHBOARD_USER_ADNEWCC 11054
|
||||
#define WRENCHBOARD_USER_USESAVEDCC 11056
|
||||
#define WRENCHBOARD_USER_SETTINGS 11058
|
||||
|
||||
#define WRENCHBOARD_ACCOUNT_WALLETS 11060
|
||||
|
||||
@@ -235,9 +249,16 @@ enum { PARTNER_STRIPE };
|
||||
#define WRENCHBOARD_SMONEY_BKOPROC 33030
|
||||
|
||||
#define WRENCHBOARD_SMONEY_END 33999
|
||||
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_CARDS_START 40000
|
||||
|
||||
#define WRENCHBOARD_CARDS_GETCARDLIST 40010
|
||||
#define WRENCHBOARD_CARDS_UPDATECARD 40015
|
||||
#define WRENCHBOARD_CARDS_CREATECARD 40020
|
||||
|
||||
#define WRENCHBOARD_CARDS_END 49999
|
||||
//**************************************************************
|
||||
|
||||
#define WRENCHBOARD_LOGIN_SHOP 50501
|
||||
#define WRENCHBOARD_LOGIN_ADMIN 50502
|
||||
@@ -247,6 +268,18 @@ enum { PARTNER_STRIPE };
|
||||
#define WRENCHBOARD_ADD_SURVEY 55050
|
||||
#define WRENCHBOARD_LOAD_SURVEY 55055
|
||||
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_COUPON_START 85000
|
||||
|
||||
#define WRENCHBOARD_COUPON_CREATE 85010
|
||||
#define WRENCHBOARD_COUPON_ACTIVATE 85015
|
||||
#define WRENCHBOARD_COUPON_REDEEM 85020
|
||||
#define WRENCHBOARD_COUPON_MEMLIST 85025
|
||||
#define WRENCHBOARD_COUPON_PENDLIST 85030
|
||||
#define WRENCHBOARD_COUPON_END 85999
|
||||
//**************************************************************
|
||||
|
||||
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_ONE 90004
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_NEW 90005
|
||||
|
||||
|
||||
@@ -285,7 +285,7 @@ hardcode_into_libs=yes
|
||||
sys_lib_search_path_spec="/usr/lib/gcc/x86_64-redhat-linux/8 /usr/lib64 /lib64 /usr/lib /lib "
|
||||
|
||||
# Detected run-time system search path for libraries.
|
||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst "
|
||||
sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib /usr/lib64//bind9-export/ /usr/lib64/dyninst "
|
||||
|
||||
# Explicit LT_SYS_LIBRARY_PATH set during ./configure time.
|
||||
configure_time_lt_sys_library_path=""
|
||||
|
||||
@@ -108,6 +108,7 @@ status INT DEFAULT 1,
|
||||
created timestamp without time zone DEFAULT now()
|
||||
);
|
||||
*/
|
||||
long LoginLogger( long member_id, long login_mode);
|
||||
long WrenchBoardMobileSendMoney(CVars in, CVars &out);
|
||||
long WrenchBoardMobileSendJobInterest(CVars in, CVars &out);
|
||||
long WrenchReturnPendingJobList(CVars in, CVars &out);
|
||||
@@ -133,8 +134,10 @@ long account_calls(CVars in, CVars &out) {
|
||||
CVars x;
|
||||
long ret = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
|
||||
test();
|
||||
const PGresult *res;
|
||||
logfmt(logINFO, "action = %ld", action);
|
||||
logfmt(logINFO, "google = %ld", WRENCHBOARD_GOOGLE_LOGIN);
|
||||
//test();
|
||||
|
||||
switch (action) {
|
||||
case WRENCHBOARD_CREATE_MOBILEUSER:
|
||||
@@ -175,7 +178,7 @@ test();
|
||||
REQ_STRING(in, "email", 5, 49, "(.*)");
|
||||
REQ_STRING(in, "firstname", 1, 49, "(.*)");
|
||||
REQ_STRING(in, "lastname", 1, 40, "(.*)");
|
||||
REQ_STRING(in, "your_message", 4, 400, "(.*)");
|
||||
REQ_STRING(in, "your_message", 4, 400, "(.*)");
|
||||
//OPTIONAL( in, "loc" ) REQ_STRING (in, "loc", 3, 15, "(.*)");
|
||||
|
||||
in["loc"] = loc;
|
||||
@@ -212,6 +215,14 @@ test();
|
||||
return LoginWrenchBoardFacebook(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_GOOGLE_LOGIN:
|
||||
return LoginWrenchBoardGoogle(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_APPLE_LOGIN:
|
||||
return LoginWrenchBoardApple(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_PENDING:
|
||||
return CreateWrenchBoardAccountPending(in, out);
|
||||
break;
|
||||
@@ -317,6 +328,25 @@ test();
|
||||
return WrenchCardRechargePayment(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_SETTINGS:
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_STRING(in, "pref_id", 4, 6, "(.*)");
|
||||
REQ_LONG(in, "status", 1, -1);
|
||||
|
||||
res = pgsql_query("SELECT id FROM members_settings WHERE member_id=%lu AND pref_id='%s' ", in["member_id"].Long(), in["pref_id"].c_str());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
pgsql_exec("UPDATE members_settings SET status=%lu WHERE member_id=%lu AND pref_id='%s' ",in["status"].Long(), in["member_id"].Long(), in["pref_id"].c_str());
|
||||
}
|
||||
else{
|
||||
CVars xx;
|
||||
xx["member_id"] = in["member_id"]; xx["member_id"].set_valid(true);
|
||||
xx["pref_id"] = in["pref_id"]; xx["pref_id"].set_valid(true);
|
||||
xx["status"] = in["status"]; xx["status"].set_valid(true);
|
||||
insert_db_record(DBS_VALID, "members_settings", "members_settings_id_seq", xx);
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_ACCOUNT_WALLETS:
|
||||
logfmt(logINFO, "/account_calls()");
|
||||
return WrenchBoardMobileSendUserWallet(in, out);
|
||||
@@ -351,7 +381,7 @@ long WrenchBoardMobileSendUserWallet(CVars in, CVars &out) {
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
out["total_record"] = "0";
|
||||
const PGresult *res;
|
||||
res = pgsql_query(" SELECT * FROM members_wallet WHERE member_id = %lu", in["member_id"].Long());
|
||||
res = pgsql_query("SELECT w.amount,c.*,w.amount AS current_balance FROM members_wallet w LEFT JOIN currency c ON c.code=w.currency WHERE w.member_id =%lu ORDER BY c.lorder DESC", in["member_id"].Long());
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
@@ -366,6 +396,20 @@ long WrenchBoardMobileSendUserWallet(CVars in, CVars &out) {
|
||||
out[vname] = rec["amount"];
|
||||
snprintf(vname, sizeof (vname), "currency_%05d", i);
|
||||
out[vname] = rec["currency"];
|
||||
|
||||
// amount | id | code | description | symbol | action_type | lorder | current_balance
|
||||
snprintf(vname, sizeof (vname), "description_%05d", i);
|
||||
out[vname] = rec["description"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "symbol_%05d", i);
|
||||
out[vname] = rec["symbol"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "action_type_%05d", i);
|
||||
out[vname] = rec["action_type"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "code_%05d", i);
|
||||
out[vname] = rec["code"];
|
||||
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
@@ -720,6 +764,7 @@ long WrenchReturnStartJobList(CVars in, CVars &out) {
|
||||
"WHERE m.status = 1 AND m.client_id=0 "
|
||||
"AND m.expire IS NOT NULL "
|
||||
"AND m.public_view = 1 "
|
||||
"AND m.expire > now() "
|
||||
"ORDER BY m.expire DESC LIMIT %lu", in["limit"].Long());
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
@@ -945,6 +990,7 @@ long WrenchUpdateAccountDescription(CVars in, CVars &out) {
|
||||
long WrenchUpdateAccountTerms(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "long WrenchUpdateAccountTerms(CVars in, CVars out)");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
out["terms_update"] = "";
|
||||
try {
|
||||
long action_item = REQ_LONG(in, "action_item", 1, -1);
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
@@ -953,18 +999,15 @@ long WrenchUpdateAccountTerms(CVars in, CVars &out) {
|
||||
case ACCOUNT_AGREE_JOBS:
|
||||
pgsql_exec("UPDATE members SET post_jobs=NOW() WHERE id=%lu ", member_id);
|
||||
ret = PHP_API_OK;
|
||||
out["terms_update"] = "completed";
|
||||
break;
|
||||
|
||||
case ACCOUNT_AGREE_REFER:
|
||||
pgsql_exec("UPDATE members SET refer=NOW() WHERE id=%lu ", member_id);
|
||||
ret = PHP_API_OK;
|
||||
out["terms_update"] = "completed";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
out["status"] = "Invalid Parameters";
|
||||
}
|
||||
@@ -1196,6 +1239,46 @@ long SessionCheck(long uid, const char *sessionid, int create) {
|
||||
return 0L; // No route
|
||||
}
|
||||
|
||||
/*
|
||||
CREATE TABLE mobile_login (
|
||||
id SERIAL,
|
||||
member_id INT REFERENCES members(id) UNIQUE NOT NULL,
|
||||
added timestamp without time zone DEFAULT now(),
|
||||
updated timestamp without time zone DEFAULT now()
|
||||
);
|
||||
ALTER TABLE ONLY mobile_login
|
||||
ADD CONSTRAINT mobile_login_id_key UNIQUE (id);
|
||||
*/
|
||||
long LoginLogger( long member_id, long login_mode){
|
||||
CVars sess;
|
||||
long ret = 0;
|
||||
try {
|
||||
switch( login_mode ){
|
||||
case MOBILE_LOGIN:
|
||||
if (load_db_record(sess, "SELECT * FROM mobile_login WHERE member_id=%lu", member_id) > 0) {
|
||||
pgsql_exec("UPDATE mobile_login SET updated=NOW() WHERE member_id=%ld", member_id);
|
||||
}else{
|
||||
sess["member_id"] = member_id;
|
||||
sess["member_id"].set_valid(true);
|
||||
insert_db_record(DBS_VALID, "mobile_login", "mobile_login_id_seq", sess); //members_session_id_seq
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
#define WEBSITE_LOGIN 1100
|
||||
#define MOBILE_LOGIN 1101
|
||||
#define FACEBOOK_LOGIN 1102
|
||||
#define APPLE_LOGIN 1103
|
||||
#define GOOGLE_LOGIN 1104
|
||||
*/
|
||||
|
||||
long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardAccount()");
|
||||
@@ -1203,6 +1286,8 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
REQ_STRING(in, "password", 5, 49, "(.*)");
|
||||
REQ_STRING(in, "sessionid", 4, 140, "(.*)");
|
||||
OPTIONAL(in, "loc") REQ_STRING(in, "loc", 3, 15, "(.*)");
|
||||
// $in["login_mode"] = MOBILE_LOGIN;
|
||||
long login_mode = REQ_LONG(in, "login_mode", 0, -1);
|
||||
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
in["loc"] = loc;
|
||||
@@ -1233,6 +1318,7 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
pgsql_query("UPDATE members SET last_login = now() , loc='%s' WHERE id = %lu",loc, out["member_id"].Long());
|
||||
account_email(ACCOUNT_LOGIN_ALERT, out, out); // ALERT CUSTOMER OF LOGIN
|
||||
ret = PHP_LOGIN_OK;
|
||||
LoginLogger(out["member_id"].Long(),login_mode);
|
||||
} else {
|
||||
out["status"] = "Session check failed";
|
||||
}
|
||||
@@ -1249,6 +1335,9 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
long res = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardFacebook()");
|
||||
REQ_STRING(in, "fb_id", 5, 49, "(.*)");
|
||||
in["external_idp_provider_id"] = in["fb_id"].Long();
|
||||
in["external_idp_provider"] = 1L; // Facebook
|
||||
in["fb_id"].set_valid(false);
|
||||
REQ_STRING(in, "email", 6, 49, "(.*)");
|
||||
OPTIONAL(in, "firstname") REQ_STRING(in, "firstname", 1, 49, "(.*)");
|
||||
else in["firstname"] = "";
|
||||
@@ -1256,8 +1345,53 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
else in["lastname"] = "";
|
||||
REQ_STRING(in, "sessionid", 4, 40, "(.*)");
|
||||
OPTIONAL(in, "loc") REQ_STRING(in, "loc", 3, 15, "(.*)");
|
||||
res = LoginWrenchBoardExternal(in, out);
|
||||
logfmt(logINFO, "/LoginWrenchBoardFacebook()");
|
||||
return res;
|
||||
}
|
||||
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
long LoginWrenchBoardGoogle(CVars in, CVars &out) {
|
||||
long res = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardGoogle()");
|
||||
REQ_STRING(in, "google_id", 5, 49, "(.*)");
|
||||
in["external_idp_provider_id"] = in["google_id"].Long();
|
||||
in["external_idp_provider"] = 2L; // Google
|
||||
in["google_id"].set_valid(false);
|
||||
REQ_STRING(in, "email", 6, 49, "(.*)");
|
||||
OPTIONAL(in, "firstname") REQ_STRING(in, "firstname", 1, 49, "(.*)");
|
||||
else in["firstname"] = "";
|
||||
OPTIONAL(in, "lastname") REQ_STRING(in, "lastname", 1, 49, "(.*)");
|
||||
else in["lastname"] = "";
|
||||
REQ_STRING(in, "sessionid", 4, 40, "(.*)");
|
||||
OPTIONAL(in, "loc") REQ_STRING(in, "loc", 3, 15, "(.*)");
|
||||
res = LoginWrenchBoardExternal(in, out);
|
||||
logfmt(logINFO, "/LoginWrenchBoardGoogle()");
|
||||
return res;
|
||||
}
|
||||
|
||||
long LoginWrenchBoardApple(CVars in, CVars &out) {
|
||||
long res = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardApple()");
|
||||
REQ_STRING(in, "apple_id", 5, 49, "(.*)");
|
||||
in["external_idp_provider_id"] = in["apple_id"];
|
||||
in["external_idp_provider"] = 3L; // Apple
|
||||
in["apple_id"].set_valid(false);
|
||||
REQ_STRING(in, "email", 6, 49, "(.*)");
|
||||
OPTIONAL(in, "firstname") REQ_STRING(in, "firstname", 1, 49, "(.*)");
|
||||
else in["firstname"] = "";
|
||||
OPTIONAL(in, "lastname") REQ_STRING(in, "lastname", 1, 49, "(.*)");
|
||||
else in["lastname"] = "";
|
||||
REQ_STRING(in, "sessionid", 4, 40, "(.*)");
|
||||
OPTIONAL(in, "loc") REQ_STRING(in, "loc", 3, 15, "(.*)");
|
||||
res = LoginWrenchBoardExternal(in, out);
|
||||
logfmt(logINFO, "/LoginWrenchBoardApple()");
|
||||
return res;
|
||||
}
|
||||
|
||||
long LoginWrenchBoardExternal(CVars in, CVars &out) {
|
||||
long res = PHP_API_BAD_PARAM;
|
||||
logfmt(logINFO, "LoginWrenchBoardExternal()");
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
in["loc"] = loc;
|
||||
in["loc"].set_valid(true);
|
||||
|
||||
@@ -1265,9 +1399,9 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
if (ret > 0) {
|
||||
out["status"] = "Email is already registered";
|
||||
} else {
|
||||
ret = load_db_record(out, "SELECT *,id AS member_id FROM members WHERE LOWER(email)=LOWER('%s') AND fb_id='%s'", in["email"].c_str(), in["fb_id"].c_str());
|
||||
ret = load_db_record(out, "SELECT *,id AS member_id FROM members WHERE LOWER(email)=LOWER('%s') AND external_idp_provider_id='%s' AND external_idp_provider=%ld", in["email"].c_str(), in["external_idp_provider_id"].c_str(), in["external_idp_provider"].Long());
|
||||
if (ret > 0) {
|
||||
logfmt(logINFO, "FB account already exists");
|
||||
logfmt(logINFO, "External account already exists");
|
||||
} else {
|
||||
logfmt(logINFO, "Create new FB account");
|
||||
CVars xx;
|
||||
@@ -1281,8 +1415,10 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
xx["email"].set_valid(true);
|
||||
xx["loc"] = in["loc"];
|
||||
xx["loc"].set_valid(true);
|
||||
xx["fb_id"] = in["fb_id"];
|
||||
xx["fb_id"].set_valid(true);
|
||||
xx["external_idp_provider"] = in["external_idp_provider"];
|
||||
xx["external_idp_provider"].set_valid(true);
|
||||
xx["external_idp_provider_id"] = in["external_idp_provider_id"];
|
||||
xx["external_idp_provider_id"].set_valid(true);
|
||||
out["member_id"] = insert_db_record(DBS_VALID, "members", "members_id_seq", xx);
|
||||
ret = load_db_record(out, "SELECT *,id AS member_id FROM members WHERE id='%ld'", out["member_id"].Long());
|
||||
}
|
||||
@@ -1302,7 +1438,7 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
}
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/LoginWrenchBoardFacebook()");
|
||||
logfmt(logINFO, "/LoginWrenchBoardExternal()");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -508,6 +508,8 @@ long CreateWrenchBoardAccount(CVars in, CVars &out) {
|
||||
ret = insert_db_record(DBS_VALID, "members", "members_id_seq", x);
|
||||
|
||||
if (ret > 0) {
|
||||
|
||||
|
||||
out["member_id"] = ret;
|
||||
out["member_id"].set_valid(true);
|
||||
x["member_id"] = ret;
|
||||
@@ -515,10 +517,16 @@ long CreateWrenchBoardAccount(CVars in, CVars &out) {
|
||||
x["pending_id"] = out["pending_id"];
|
||||
x["pending_id"].set_valid(true);
|
||||
|
||||
CVars u;
|
||||
load_db_record(u,"SELECT code AS currency FROM currency WHERE country = '%s'", x["country"].c_str() );
|
||||
logfmt(logINFO, " The Currency code = %s", u["currency"].c_str());
|
||||
out["wallet_id"] = CheckWallet( x["member_id"].Long() , u);
|
||||
logfmt(logINFO, " The wallet_id = %lu", out["wallet_id"].Long());
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this will become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
out["wallet_id"] = CheckWallet(out["member_id"].Long(),vw); // initial wallet
|
||||
// vw["currency"] = "NAIRA"; // this will become a variable based on the country
|
||||
// vw["currency"].set_valid( true );
|
||||
// out["wallet_id"] = CheckWallet(out["member_id"].Long(),vw); // initial wallet
|
||||
|
||||
// - password already set pgsql_query("UPDATE members SET password = md5('%s') WHERE id = %lu",in["pass1"].c_str(),ret);
|
||||
pgsql_query("UPDATE members_pending SET status = 5 WHERE id = %lu", out["pending_id"].Long());
|
||||
|
||||
@@ -0,0 +1,181 @@
|
||||
// Twillo management toosl
|
||||
#include "clog.h"
|
||||
#include "cgi.h"
|
||||
#include "input.h"
|
||||
#include "wrenchboard_api.h"
|
||||
#include "cards.h"
|
||||
#include "email.h"
|
||||
#include "safestring.h"
|
||||
#include <string>
|
||||
#include "pgsql.h"
|
||||
#include "pgsql_wrapper.h"
|
||||
#include <curl/curl.h>
|
||||
#include "account.h"
|
||||
#include "reco_engine.h"
|
||||
|
||||
#include "twilo.h"
|
||||
|
||||
long createMembercard(CVars in, CVars &out);
|
||||
long card_calls(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "card_calls()");
|
||||
out["result"] = "YES I GET TO BACK END";
|
||||
long action = REQ_LONG(in, "action", 0, -1);
|
||||
CVars x;
|
||||
long ret = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
const PGresult *res;
|
||||
logfmt(logINFO, "action = %ld", action);
|
||||
//test();
|
||||
|
||||
switch (action) {
|
||||
case WRENCHBOARD_CARDS_GETCARDLIST:
|
||||
return getMembercards(in, out);
|
||||
break;
|
||||
case WRENCHBOARD_CARDS_CREATECARD:
|
||||
return createMembercard(in, out);
|
||||
break;
|
||||
case WRENCHBOARD_CARDS_UPDATECARD:
|
||||
return 0; //CompleteMobileAccountCreation(in, out);
|
||||
break;
|
||||
}
|
||||
logfmt(logINFO, "/card_calls()");
|
||||
return ret;
|
||||
}
|
||||
/*
|
||||
CREATE TABLE members_cards (
|
||||
id SERIAL,
|
||||
card_type VARCHAR(15) REFERENCES card_type( code ) NOT NULL,
|
||||
card_style VARCHAR(15) REFERENCES card_style( style ) NOT NULL,
|
||||
card_icon VARCHAR(15) REFERENCES card_icon( icon ) NOT NULL,
|
||||
member_id INT REFERENCES members(id) NOT NULL,
|
||||
title VARCHAR(35) NOT NULL,
|
||||
description VARCHAR(55) NOT NULL,
|
||||
blog_id INT DEFAULT 0,
|
||||
added timestamp without time zone DEFAULT now(),
|
||||
expire timestamp without time zone DEFAULT now(),
|
||||
active timestamp DEFAULT NULL,
|
||||
loc INET,
|
||||
status INT DEFAULT 0
|
||||
);
|
||||
*/
|
||||
long createMembercard(CVars in, CVars &out){
|
||||
CVars y;
|
||||
long card_id = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_STRING(in, "card_type", 5, 14, "(.*)");
|
||||
REQ_STRING(in, "card_style", 2, 14, "(.*)");
|
||||
REQ_STRING(in, "card_icon", 2, 14, "(.*)");
|
||||
REQ_STRING(in, "title", 5, 34, "(.*)");
|
||||
REQ_STRING(in, "description", 5, 54, "(.*)");
|
||||
OPTIONAL(in, "blog_id") REQ_LONG(in, "blog_id", 1, -1);
|
||||
OPTIONAL(in, "offer_id") REQ_LONG(in, "offer_id", 1, -1);
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
|
||||
bool continue_insert = false;
|
||||
//const PGresult *res = pgsql_query("SELECT id FROM members_cards WHERE member_id=%lu AND card_type = '%s'", in["member_id"].Long(), in["card_type"].c_str());
|
||||
if (load_db_record(y, "SELECT * FROM members_cards WHERE member_id=%lu AND card_type = '%s' LIMIT 1", in["member_id"].Long(), in["card_type"].c_str()) > 0) {
|
||||
card_id = y["id"].Long();
|
||||
pgsql_exec("UPDATE members_cards SET active=NOW(),status =1,expire = now()+'2 days' WHERE member_id=%lu AND card_type = '%s' AND id = %lu", member_id,in["card_type"].c_str(),card_id);
|
||||
}
|
||||
else
|
||||
{
|
||||
continue_insert= true;
|
||||
}
|
||||
|
||||
if(continue_insert){
|
||||
CVars x;
|
||||
x["member_id"] = member_id;
|
||||
x["member_id"].set_valid(true);
|
||||
x["card_type"] = in["card_type"];
|
||||
x["card_type"].set_valid(true);
|
||||
x["card_style"] = in["card_style"];
|
||||
x["card_style"].set_valid(true);
|
||||
x["card_icon"] = in["card_icon"];
|
||||
x["card_icon"].set_valid(true);
|
||||
x["title"] = in["title"];
|
||||
x["title"].set_valid(true);
|
||||
x["description"] = in["description"];
|
||||
x["description"].set_valid(true);
|
||||
x["blog_id"] = in["blog_id"];
|
||||
x["blog_id"].set_valid(true);
|
||||
x["offer_id"] = in["offer_id"];
|
||||
x["offer_id"].set_valid(true);
|
||||
x["loc"] = loc;
|
||||
x["loc"].set_valid(true);
|
||||
x["status"] = "1";
|
||||
x["status"].set_valid(true);
|
||||
|
||||
card_id = insert_db_record(DBS_VALID, "members_cards", "members_cards_id_seq", x);
|
||||
pgsql_exec("UPDATE members_cards SET active = now(),expire = now()+'2 days' WHERE id = %lu",card_id);
|
||||
// pgsql_exec("UPDATE members_cards SET expire = now()+'2 days' WHERE id = %lu",card_id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long createMembercard");
|
||||
}
|
||||
logfmt(logINFO, "/createMembercard()");
|
||||
return card_id;
|
||||
}
|
||||
long getMembercards(CVars in, CVars &out){
|
||||
char vname[30];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
try {
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
out["total_record"] = "0";
|
||||
const PGresult *res;
|
||||
res = pgsql_query("SELECT * FROM members_cards WHERE member_id =%lu AND expire > now() AND status = 1 ORDER BY added DESC", in["member_id"].Long());
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
|
||||
snprintf(vname, sizeof (vname), "assign_id_%05d", i);
|
||||
out[vname] = rec["id"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "title_%05d", i);
|
||||
out[vname] = rec["title"];
|
||||
|
||||
// amount | id | code | description | symbol | action_type | lorder | current_balance
|
||||
snprintf(vname, sizeof (vname), "description_%05d", i);
|
||||
out[vname] = rec["description"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "card_type_%05d", i);
|
||||
out[vname] = rec["card_type"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "card_style_%05d", i);
|
||||
out[vname] = rec["card_style"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "card_icon_%05d", i);
|
||||
out[vname] = rec["card_icon"];
|
||||
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long getMembercards(CVars in, CVars &out)");
|
||||
}
|
||||
logfmt(logINFO, "/getMembercards()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*
|
||||
['title'=>'This is your coupon',
|
||||
'description'=>'This is the description of the description',
|
||||
'card_type'=>'COUPON',
|
||||
'card_style' =>'card1',
|
||||
'card_icon' =>'icon1',
|
||||
'assign_id'=> 0,
|
||||
'Nigeria'],
|
||||
['title'=>'A Recommended S
|
||||
*/
|
||||
@@ -0,0 +1,256 @@
|
||||
// Account management toosl
|
||||
#include "clog.h"
|
||||
#include "cgi.h"
|
||||
#include "input.h"
|
||||
#include "wrenchboard_api.h"
|
||||
#include "coupons.h"
|
||||
#include "email.h"
|
||||
#include "safestring.h"
|
||||
#include <string>
|
||||
#include "pgsql.h"
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "cfg.h"
|
||||
#include <curl/curl.h>
|
||||
#include "smoney.h"
|
||||
#include "account_mngt.h"
|
||||
#include "creditcards.h"
|
||||
#include "payments.h"
|
||||
#include "reco_engine.h"
|
||||
|
||||
/*
|
||||
#define WRENCHBOARD_COUPON_START 85000
|
||||
|
||||
#define WRENCHBOARD_COUPON_CREATE 85010
|
||||
#define WRENCHBOARD_COUPON_ACTIVATE 85015
|
||||
#define WRENCHBOARD_COUPON_REDEEM 85020
|
||||
|
||||
#define WRENCHBOARD_COUPON_MEMLIST 85025
|
||||
#define WRENCHBOARD_COUPON_PENDLIST 85030
|
||||
|
||||
#define WRENCHBOARD_COUPON_END 85999
|
||||
****** */
|
||||
long MemberCouponList( CVars in, CVars &out );
|
||||
|
||||
|
||||
long coupons_calls(CVars in, CVars &out){
|
||||
logfmt(logINFO, "coupons_calls()");
|
||||
out["result"] = "YES I GET TO BACK END";
|
||||
long action = REQ_LONG(in, "action", 0, -1);
|
||||
CVars x;
|
||||
long ret = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
const PGresult *res;
|
||||
logfmt(logINFO, "action = %ld", action);
|
||||
|
||||
|
||||
switch (action) {
|
||||
case WRENCHBOARD_COUPON_CREATE:
|
||||
return CreateCoupon(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_COUPON_ACTIVATE:
|
||||
return AssignCoupon(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_COUPON_REDEEM:
|
||||
return RedeemCoupon(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_COUPON_MEMLIST: // member list
|
||||
in["mode"] = 100; in["mode"].set_valid( true );
|
||||
return MemberCouponList(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_COUPON_PENDLIST: // member list
|
||||
in["mode"] = 200; in["mode"].set_valid( true );
|
||||
return MemberCouponList(in, out);
|
||||
break;
|
||||
|
||||
}
|
||||
logfmt(logINFO, "/coupons_calls()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
long RedeemCoupon( CVars in, CVars &out ){
|
||||
logfmt(logINFO, "long RedeemCoupon( CVars in, CVars &out )()");
|
||||
long ret = 0;
|
||||
|
||||
const PGresult *res;
|
||||
|
||||
try{
|
||||
REQ_STRING(in, "code", 5, 49, "(.*)");
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_LONG(in, "code_id", 1, -1);
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
|
||||
long payment_id = WrenchMemberCouponPayment( in, out );
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
// for coupon table
|
||||
#define COUPON_ALLOC_STARTED 100
|
||||
#define COUPON_ALLOC_ALLOCATED 200
|
||||
|
||||
|
||||
// for allocation table
|
||||
#define COUPON_ACTIVE 500
|
||||
|
||||
|
||||
long AssignCoupon( CVars in, CVars &out ){
|
||||
long ret = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
const PGresult *res;
|
||||
|
||||
try{
|
||||
|
||||
REQ_STRING(in, "code", 5, 49, "(.*)");
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
long coupon_id = 0;
|
||||
|
||||
res = pgsql_query("SELECT * FROM coupons WHERE code='%s' AND status = 0", in["code"].c_str());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, 0);
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
pgsql_exec("UPDATE coupons SET status=%lu WHERE code='%s' AND status=%lu",COUPON_ALLOC_ALLOCATED,in["code"].c_str(),COUPON_ALLOC_STARTED);
|
||||
// Now We start
|
||||
/*
|
||||
CREATE TABLE coupons_allocation (
|
||||
id SERIAL,
|
||||
code VARCHAR(15) UNIQUE REFERENCES coupons( code ) NOT NULL,
|
||||
amount INT DEFAULT 0,
|
||||
member_id INT REFERENCES members(id) NOT NULL,
|
||||
added timestamp without time zone DEFAULT now(),
|
||||
active timestamp DEFAULT NULL,
|
||||
loc INET,
|
||||
status INT DEFAULT 0
|
||||
);
|
||||
|
||||
wrenchboard=> SELECT substring(ca.code,0,4)||'XXXXXXXX' as code, ca.amount,m.email,m.firstname FROM coupons_allocation ca LEFT JOIN members m ON m.id=ca.member_id;
|
||||
code | amount | email | firstname
|
||||
-------------+--------+----------------------+-----------
|
||||
1M5XXXXXXXX | 0 | ses66181+1@gmail.com | Olusesan
|
||||
*/
|
||||
CVars xx;
|
||||
xx["member_id"] = in["member_id"]; xx["member_id"].set_valid(true);
|
||||
xx["code"] = rec["code"]; xx["code"].set_valid(true);
|
||||
xx["amount"] = rec["amount"]; xx["amount"].set_valid(true);
|
||||
xx["status"] = COUPON_ACTIVE; xx["status"].set_valid(true);
|
||||
|
||||
coupon_id = insert_db_record(DBS_VALID, "coupons_allocation", "coupons_allocation_id_seq", xx);
|
||||
if (coupon_id > 0 ){
|
||||
CVars inx;
|
||||
inx["member_id"] = xx["member_id"]; inx["member_id"].set_valid(true);
|
||||
inx["coupon_id"] = coupon_id; inx["coupon_id"].set_valid(true);
|
||||
// mark status on coupon
|
||||
pgsql_exec("UPDATE coupons SET active=now(), status=%lu WHERE code='%s' AND status=0",COUPON_ALLOC_STARTED,in["code"].c_str());
|
||||
// send allocation email
|
||||
coupon_email(WRENCHBOARD_COUPON_ACTIVATE, inx, out);
|
||||
recommendation_engine(RECOMMEND_COUPON , inx, out); // trigger the card interaction in apps
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
else{
|
||||
CVars xx;
|
||||
// xx["member_id"] = in["member_id"]; xx["member_id"].set_valid(true);
|
||||
// xx["pref_id"] = in["pref_id"]; xx["pref_id"].set_valid(true);
|
||||
// xx["status"] = in["status"]; xx["status"].set_valid(true);
|
||||
// insert_db_record(DBS_VALID, "members_settings", "members_settings_id_seq", xx);
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
|
||||
|
||||
} catch (bad_parameter) {
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
long MemberCouponList( CVars in, CVars &out ){
|
||||
logfmt(logINFO, "MemberCouponList()");
|
||||
char vname[30];
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
try {
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
long mode = REQ_LONG(in, "mode", 1, -1);
|
||||
|
||||
in["active_q"] = "ca.active IS NOT NULL";
|
||||
if ( mode == 200 ){
|
||||
in["active_q"] = "ca.active IS NULL";
|
||||
}
|
||||
in["active_q"].set_valid( true );
|
||||
|
||||
out["total_record"] = "0";
|
||||
const PGresult *res;
|
||||
|
||||
res = pgsql_query("SELECT id AS coupon_id, ca.code, ca.amount, ca.added::date,ca.status FROM coupons_allocation ca WHERE ca.member_id = %lu AND %s ORDER BY ca.id DESC", in["member_id"].Long(),in["active_q"].c_str());
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
out["total_record"] = pgsql_num_rows(res);
|
||||
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
|
||||
snprintf(vname, sizeof (vname), "coupon_id_%05d", i);
|
||||
out[vname] = rec["coupon_id"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "code_%05d", i);
|
||||
out[vname] = rec["code"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "added_%05d", i);
|
||||
out[vname] = rec["added"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "amount_%05d", i);
|
||||
out[vname] = rec["amount"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "status_%05d", i);
|
||||
out[vname] = rec["status"];
|
||||
|
||||
}
|
||||
}
|
||||
ret = PHP_API_OK;
|
||||
out["status"] = "OK";
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long MemberCouponList(CVars in, CVars &out)");
|
||||
}
|
||||
logfmt(logINFO, "/MemberCouponList()");
|
||||
return ret;
|
||||
}
|
||||
|
||||
long CreateCoupon( CVars in, CVars &out ){
|
||||
long ret = 0;
|
||||
logfmt(logINFO, "CreateCoupon()");
|
||||
REQ_STRING(in, "code", 5, 49, "(.*)");
|
||||
REQ_LONG(in, "amount", 1, -1);
|
||||
CVars x;
|
||||
x["code"] = in["code"];
|
||||
x["code"].set_valid(true);
|
||||
x["amount"] = in["amount"];
|
||||
x["amount"].set_valid(true);
|
||||
x["description"] = in["description"];
|
||||
x["description"].set_valid(true);
|
||||
|
||||
ret = insert_db_record(DBS_VALID, "coupons", "coupons_id_seq", x);
|
||||
if (ret > 0) {
|
||||
x["coupon_id"] = ret;
|
||||
x["coupon_id"].set_valid(true);
|
||||
|
||||
// account_email(ACCOUNT_CONTACT_ALERT, x, out);
|
||||
}
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -210,7 +210,11 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case WRB_CRONJOB_PENDOFFER_ALERT:
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", in["email"].c_str());
|
||||
form.Email("REMINDER/offer_pending_reminder.mailfile");
|
||||
break;
|
||||
|
||||
|
||||
|
||||
@@ -222,6 +226,52 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
long coupon_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
//REQ_LONG( in, "member_id", 1, -1 );
|
||||
CVars x;
|
||||
C_CGI_Form form("", "");
|
||||
|
||||
CGIList * inv_list = new CGIList(&form, "inv_items");
|
||||
char listing_items[1024];
|
||||
const PGresult *res;
|
||||
bool exclude_email = true;
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
try {
|
||||
|
||||
switch (mailtype) {
|
||||
/*
|
||||
|
||||
wrenchboard=> SELECT substring(ca.code,0,4)||'XXXXXXXX' as code, ca.amount,m.email,m.firstname FROM coupons_allocation ca LEFT JOIN members m ON m.id=ca.member_id;
|
||||
code | amount | email | firstname
|
||||
-------------+--------+----------------------+-----------
|
||||
1M5XXXXXXXX | 0 | ses66181+1@gmail.com | Olusesan
|
||||
*/
|
||||
case WRENCHBOARD_COUPON_ACTIVATE:
|
||||
REQ_LONG(in, "coupon_id", 1, -1);
|
||||
if (load_db_record(x, "SELECT substring(ca.code,0,4)||'XXXXXXXX' as code, ca.amount,m.email,m.firstname FROM coupons_allocation ca LEFT JOIN members m ON m.id=ca.member_id WHERE ca.id = %lu ", in["coupon_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", x["email"].c_str());
|
||||
form.Email("COUPON/member_coupon_allocated.mailfile");
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
} catch (bad_parameter) {
|
||||
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
long account_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
//REQ_LONG( in, "member_id", 1, -1 );
|
||||
@@ -231,12 +281,13 @@ long account_email(long mailtype, CVars in, CVars &out) {
|
||||
CGIList * inv_list = new CGIList(&form, "inv_items");
|
||||
char listing_items[1024];
|
||||
const PGresult *res;
|
||||
|
||||
bool exclude_email = true;
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
|
||||
try {
|
||||
|
||||
switch (mailtype) {
|
||||
@@ -272,7 +323,14 @@ long account_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
case ACCOUNT_LOGIN_ALERT:
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
if (load_db_record(x, "SELECT *,email as email2,to_char(last_login, 'Day Mon dd, yyyy HH:MI AM') AS last_login2 FROM members WHERE id = %lu ", in["member_id"].Long())) {
|
||||
|
||||
// testing exclusion first
|
||||
res = pgsql_query("SELECT * FROM members_settings WHERE member_id = %lu AND pref_id='S0001' AND status=100", in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
exclude_email = false;
|
||||
}
|
||||
|
||||
if (!exclude_email && load_db_record(x, "SELECT *,email as email2,to_char(last_login, 'Day Mon dd, yyyy HH:MI AM') AS last_login2 FROM members WHERE id = %lu ", in["member_id"].Long())) {
|
||||
|
||||
|
||||
in["server_name"] = "https://dashboard.wrenchboard.com";
|
||||
@@ -303,7 +361,7 @@ long account_email(long mailtype, CVars in, CVars &out) {
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
|
||||
sprintf(listing_items, "<TR><td style='background-color:#%s'><a href='%s/plb/viewjob/%s'>%s</a> - %s<br><b>Duration:</b>%s Day(s)</td></TR>", in["color"].c_str(), in["server_name"].c_str(), rec["offer_code"].c_str(), rec["title"].c_str(), rec["description"].c_str(), rec["timeline_days"].c_str());
|
||||
sprintf(listing_items, "<TR><td style='background-color:#%s; font-size:12px;'><a href='%s/plb/viewjob/%s'>%s</a> - %s<br><b>Duration:</b>%s Day(s)</td></TR>", in["color"].c_str(), in["server_name"].c_str(), rec["offer_code"].c_str(), rec["title"].c_str(), rec["description"].c_str(), rec["timeline_days"].c_str());
|
||||
inv_list->LetStr("pin", listing_items);
|
||||
inv_list->CloseElement();
|
||||
//<hr size=1 color=#FF0000>
|
||||
@@ -1020,16 +1078,30 @@ long WelcomeAccountMail(CVars in) // TESTED
|
||||
|
||||
long JobAddedMail(CVars in) //TESTED
|
||||
{
|
||||
|
||||
|
||||
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_LONG(in, "job_id", 1, -1);
|
||||
CVars x;
|
||||
CVars out;
|
||||
C_CGI_Form form("", "");
|
||||
const PGresult *res;
|
||||
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
|
||||
// testing exclusion first
|
||||
res = pgsql_query("SELECT * FROM members_settings WHERE member_id = %lu AND pref_id='S0008' AND status=100", in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
|
||||
}
|
||||
else{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (load_db_record(x, "SELECT j.*,j.title as title2,m.email,m.firstname FROM members_jobs j LEFT JOIN members m ON m.id = j.member_id WHERE j.id = %lu AND j.member_id = %lu", in["job_id"].Long(), in["member_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", x["email"].c_str());
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "cfg.h"
|
||||
#include <curl/curl.h>
|
||||
#include "common_tool.h"
|
||||
#include "reco_engine.h"
|
||||
|
||||
long WrenchJobsQuestion(CVars in, CVars &out);
|
||||
long WrenchMarketInterestQuestion(CVars in, CVars &out);
|
||||
@@ -171,14 +172,14 @@ long WrenchMarketInterestQuestion(CVars in, CVars &out) {
|
||||
ret = PHP_CREATED_OK;
|
||||
|
||||
} catch (bad_parameter) {
|
||||
out["log_status"] = "Invalid Log Action";
|
||||
out["log_status"] = "Error WrenchMarketInterestQuestion";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long WrenchJobsQuestion(CVars in, CVars &out) {
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
out = in;
|
||||
//out = in;
|
||||
try {
|
||||
out["status"] = "Recieved";
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
@@ -207,8 +208,14 @@ long WrenchJobsQuestion(CVars in, CVars &out) {
|
||||
x["memo"].set_valid(true);
|
||||
long msg_id = insert_db_record(DBS_VALID, "members_messages", "members_messages_id_seq", x);
|
||||
if (msg_id > 0) {
|
||||
|
||||
x["msg_id"] = msg_id;
|
||||
x["msg_id"].set_valid(true);
|
||||
//x["offer_id"] = out["offer_id"];
|
||||
//x["offer_id"].set_valid(true);
|
||||
job_email(WRENCHBOARD_JOB_SEND_QUESTION, x, out);
|
||||
}
|
||||
out = x;
|
||||
out["status"] = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -500,9 +507,9 @@ TABLE "jobs_contract_message" CONSTRAINT "jobs_contract_message_contract_fkey" F
|
||||
break;
|
||||
|
||||
case OFFER_EXPIRE: // note status 4
|
||||
logfmt(logINFO, "WrenchConcludeJobsOffer() rc=OFFER_CANCEL");
|
||||
if (load_db_record(out, " SELECT id AS offer_id,* FROM members_jobs_offer WHERE offer_code ='%s' AND status = 1", in["offer_code"].c_str())) {
|
||||
// valid load of offer needed
|
||||
logfmt(logINFO, "WrenchConcludeJobsOffer() rc=OFFER_EXPIRE");
|
||||
if (load_db_record(out, "SELECT id AS offer_id,* FROM members_jobs_offer WHERE offer_code ='%s' AND status = 1", in["offer_code"].c_str())) {
|
||||
// valid load of offer needed
|
||||
CVars y;
|
||||
y["member_id"] = out["member_id"];
|
||||
y["member_id"].set_valid(true);
|
||||
@@ -514,7 +521,6 @@ TABLE "jobs_contract_message" CONSTRAINT "jobs_contract_message_contract_fkey" F
|
||||
y["dir"].set_valid(true);
|
||||
y["payment_id"] = out["payment_id"];
|
||||
y["payment_id"].set_valid(true);
|
||||
|
||||
if (WrenchRefundoffer(y, out) == PHP_CREATED_OK) {
|
||||
pgsql_exec("UPDATE members_jobs_offer SET status = 4 WHERE id = %lu AND offer_code='%s' ", out["offer_id"].Long(), in["offer_code"].c_str());
|
||||
// REFUND THE MONEY
|
||||
@@ -660,6 +666,7 @@ long WrenchSendJobsOfferIndividual(CVars in, CVars &out) {
|
||||
job_email(JOBS_INDIVIDUAL_OFFER_MAIL, x, out);
|
||||
load_db_record(out, "SELECT *,id AS offer_id FROM members_jobs_offer WHERE id = %lu ", offer_id);
|
||||
out["status"] = "Offer sent to recipient";
|
||||
recommendation_engine(RECOMMEND_OFFERS , y, out); // trigger the card interaction in apps
|
||||
|
||||
} else {
|
||||
out["status"] = "Unable to create this offer";
|
||||
@@ -699,7 +706,7 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
CVars x;
|
||||
CVars y;
|
||||
CVars z;
|
||||
|
||||
CVars u;
|
||||
|
||||
|
||||
// we need this job id
|
||||
@@ -710,6 +717,10 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
load_db_record(u,"SELECT code AS currency FROM currency WHERE country = '%s'", y["country"].c_str() );
|
||||
logfmt(logINFO, " The Currency code = %s", u["currency"].c_str());
|
||||
long wallet_id = CheckWallet( in["member_id"].Long() , u);
|
||||
logfmt(logINFO, " The wallet_id = %lu", wallet_id);
|
||||
|
||||
if (y["price"].Long() > 0) {
|
||||
} else {
|
||||
@@ -720,20 +731,20 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
// Now do you have money to do this ....
|
||||
z["balance"] = "0";
|
||||
z["balance"].set_valid(true); // just initialize it
|
||||
if (load_db_record(z, " SELECT * FROM members WHERE id =%lu AND balance >= %lu", in["member_id"].Long(), y["price"].Long())) {
|
||||
if (load_db_record(z, " SELECT * FROM members_wallet WHERE id =%lu AND member_id =%lu AND amount >= %lu",wallet_id, in["member_id"].Long(), y["price"].Long())) {
|
||||
|
||||
} else {
|
||||
out["status"] = "Insuficient balancde to create this offer";
|
||||
logfmt(logINFO, "Price2 = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
out["status"] = "Insufficient balance to create this offer";
|
||||
logfmt(logINFO, "Price2 = %lu Balance = %lu", y["price"].Long(), z["amount"].Long());
|
||||
}
|
||||
|
||||
if (y["price"].Long() >= z["balance"].Long()) {
|
||||
out["status"] = "Insuficient balancde to create this offer";
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
if (y["price"].Long() >= z["amount"].Long()) {
|
||||
out["status"] = "Insufficient balance to create this offer";
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["amount"].Long());
|
||||
return ret;
|
||||
}
|
||||
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["amount"].Long());
|
||||
|
||||
try {
|
||||
// if ( load_db_record( out, "SELECT count(id) AS duplicate_name FROM members_jobs_offer WHERE LOWER(group_name)=LOWER('%s') AND member_id =%lu AND status = 1",in["group_name"].c_str(), in["member_id"].Long() ))
|
||||
@@ -805,6 +816,7 @@ long WrenchSendJobsOfferGroup(CVars in, CVars &out) {
|
||||
CVars x;
|
||||
CVars y;
|
||||
CVars z;
|
||||
CVars u;
|
||||
|
||||
long total_member = 0;
|
||||
load_db_record(out, "SELECT count(id) AS m_count FROM members_job_groupmember WHERE group_id = %lu AND member_id= %lu", in["group_id"].Long(), in["member_id"].Long());
|
||||
@@ -819,6 +831,7 @@ long WrenchSendJobsOfferGroup(CVars in, CVars &out) {
|
||||
}
|
||||
|
||||
|
||||
|
||||
// we need this job id
|
||||
if (load_db_record(y, " SELECT * FROM members_jobs WHERE id =%lu", in["job_id"].Long())) {
|
||||
// valid load of job needed
|
||||
@@ -827,6 +840,10 @@ long WrenchSendJobsOfferGroup(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
load_db_record(u,"SELECT code AS currency FROM currency WHERE country = '%s'", y["country"].c_str() );
|
||||
logfmt(logINFO, " The Currency code = %s", u["currency"].c_str());
|
||||
long wallet_id = CheckWallet( in["member_id"].Long() , u);
|
||||
logfmt(logINFO, " The wallet_id = %lu", wallet_id);
|
||||
|
||||
if (y["price"].Long() > 0) {
|
||||
} else {
|
||||
@@ -835,20 +852,32 @@ long WrenchSendJobsOfferGroup(CVars in, CVars &out) {
|
||||
} // no price zero for job on this path
|
||||
|
||||
// Now do you have money to do this ....
|
||||
if (load_db_record(z, " SELECT * FROM members WHERE id =%lu AND balance >= %lu", in["member_id"].Long(), y["price"].Long())) {
|
||||
z["balance"] = "0";
|
||||
z["balance"].set_valid(true); // just initialize it
|
||||
if (load_db_record(z, " SELECT * FROM members_wallet WHERE id =%lu AND member_id =%lu AND amount >= %lu",wallet_id, in["member_id"].Long(), y["price"].Long())) {
|
||||
|
||||
} else {
|
||||
|
||||
out["status"] = "Insufficient balance to create this offer";
|
||||
logfmt(logINFO, "Price2 = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
}
|
||||
|
||||
if (y["price"].Long() * total_member >= z["balance"].Long()) // note that we have all members here for the price
|
||||
{
|
||||
out["status"] = "Insuficient balancde to create this offer";
|
||||
if (y["price"].Long() >= z["amount"].Long()) {
|
||||
out["status"] = "Insufficient balance to create this offer";
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
return ret;
|
||||
}
|
||||
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long() * total_member, z["balance"].Long());
|
||||
|
||||
/*
|
||||
|
||||
if (y["price"].Long() * total_member >= z["balance"].Long()) // note that we have all members here for the price
|
||||
{
|
||||
out["status"] = "Insufficient balance to create this offer";
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long(), z["balance"].Long());
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
logfmt(logINFO, "Price = %lu Balance = %lu", y["price"].Long() * total_member, z["amount"].Long());
|
||||
|
||||
|
||||
try {
|
||||
@@ -1065,11 +1094,15 @@ long WrenchCreateJobs(CVars in, CVars &out) {
|
||||
REQ_LONG(in, "timeline_days", 1, -1);
|
||||
REQ_STRING(in, "title", 5, 149, "(.*)");
|
||||
REQ_STRING(in, "description", 5, 299, "(.*)");
|
||||
//REQ_STRING (in, "job_detail", 4, 40, "(.*)");
|
||||
REQ_STRING (in, "job_detail", 4, 1440, "(.*)");
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
in["loc"] = loc;
|
||||
in["loc"].set_valid(true);
|
||||
|
||||
if (in["price"].Long()<=0){
|
||||
out["status"] = "Unable to create job, price cannot be zero";
|
||||
return ret;
|
||||
}
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = in["member_id"];
|
||||
@@ -1086,6 +1119,10 @@ long WrenchCreateJobs(CVars in, CVars &out) {
|
||||
x["loc"].set_valid(true);
|
||||
x["job_detail"] = in["job_detail"];
|
||||
x["job_detail"].set_valid(true);
|
||||
//country added
|
||||
x["country"] = in["country"];
|
||||
x["country"].set_valid(true);
|
||||
|
||||
job_id = insert_db_record(DBS_VALID, "members_jobs", "members_jobs_id_seq", x);
|
||||
|
||||
if (job_id) {
|
||||
@@ -1095,7 +1132,7 @@ long WrenchCreateJobs(CVars in, CVars &out) {
|
||||
JobAddedMail(x);
|
||||
load_db_record(out, "SELECT *,id AS job_id FROM members_jobs WHERE id = %lu ", job_id);
|
||||
} else {
|
||||
out["status"] = "Uanble to create job";
|
||||
out["status"] = "Unable to create job";
|
||||
}
|
||||
|
||||
logfmt(logINFO, "/WrenchCreateJobs()");
|
||||
|
||||
@@ -28,9 +28,91 @@ CREATE TABLE payment_types (
|
||||
INSERT INTO payment_types(type_code,code,dir) VALUES('OFFER_PYM_DEPOSIT','OFDPS',0);
|
||||
INSERT INTO payment_types(type_code,code,dir) VALUES('OFFER_PYM_REFUND','OFRFD',1); -- // refund if offer was rejected or not accepted
|
||||
*/
|
||||
|
||||
long UpdateMemberWallet(long member_id,long wallet_id,long amount, long payment_id);
|
||||
|
||||
long WrenchMemberCouponPayment( CVars in, CVars &out )
|
||||
{
|
||||
logfmt(FLOG_MAX, "long WrenchMemberCouponPayment(CVars in, CVars &out)" );
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
ULONG payment_id = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
in["loc"] = loc; in["loc"].set_valid(true);
|
||||
|
||||
long member_id = REQ_LONG( in, "member_id", 1, -1 );
|
||||
REQ_STRING (in, "code", 4, 15, "(.*)");
|
||||
long code_id = REQ_LONG( in, "code_id", 1, -1 );
|
||||
|
||||
// let us make sure you have the wallet
|
||||
// do we have a wallet for this action
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(member_id,vw);
|
||||
if(!wallet_id || wallet_id == 0 ){
|
||||
return -1; // no wallet
|
||||
}
|
||||
in["curr_balance"] ="0";
|
||||
|
||||
long retDb = load_db_record( out, "SELECT amount AS curr_balance FROM members_wallet WHERE member_id = %lu AND currency='%s' ", member_id, vw["currency"].c_str());
|
||||
if (retDb)
|
||||
{ in["curr_balance"] =out["curr_balance"]; in["curr_balance"].set_valid( true );
|
||||
logfmt(FLOG_MAX, "Current balance Read ********************" );
|
||||
}
|
||||
else { return -1; /* unable to read wallet*/ }
|
||||
|
||||
|
||||
long retDb2 = load_db_record( out, "SELECT * FROM coupons_allocation WHERE member_id = %lu AND code ='%s' AND id = %lu AND active IS NULL", in["member_id"].Long(), in["code"].c_str(),code_id );
|
||||
if (retDb2)
|
||||
{
|
||||
in["coupon_amount"] =out["amount"]; in["coupon_amount"].set_valid( true );
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = member_id; x["member_id"].set_valid( true );
|
||||
x["code"] = "COUP"; x["code"].set_valid( true );
|
||||
x["dir"] = "1"; x["dir"].set_valid( true );
|
||||
x["loc"] = in["loc"]; x["loc"].set_valid( true );
|
||||
|
||||
x["curr_balance"] = in["curr_balance"]; x["curr_balance"].set_valid( true );
|
||||
x["amount"] = in["coupon_amount"]; x["amount"].set_valid( true );
|
||||
x["fee"] = "0"; x["fee"].set_valid( true );
|
||||
|
||||
// x["what_offer"] = offer_id; x["what_offer"].set_valid( true );
|
||||
x["what_coupon"] = code_id; x["what_coupon"].set_valid( true ); // assign coupon id
|
||||
|
||||
|
||||
x["flags"] = FLAG_INIT; x["flags"].set_valid( true ); // starting the pprocess
|
||||
payment_id = insert_db_record( DBS_VALID, "members_payments", "members_payments_id_seq", x );
|
||||
|
||||
if (payment_id) {
|
||||
ret = PHP_CREATED_OK;
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
|
||||
UpdateMemberWallet( x["member_id"].Long(), wallet_id,x["amount"].Long(), payment_id); // correct this dont send amount
|
||||
|
||||
x["flags"] = FLAG_OK; x["flags"].set_valid( true );
|
||||
x["payment_id"] = payment_id; x["payment_id"].set_valid( true );
|
||||
pgsql_exec("UPDATE members_payments SET flags = %lu WHERE id = %lu",x["flags"].Long(),payment_id );
|
||||
pgsql_exec("UPDATE coupons_allocation SET active = now() WHERE id = %lu AND CODE='%s' ",code_id,in["code"].c_str() );
|
||||
load_db_record( out, "SELECT * FROM members_payments WHERE id = %lu ", payment_id );
|
||||
} else {
|
||||
out["status"] = "Unable to create payment";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{ out["status"] = "Invalid coupon";
|
||||
ret= PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
logfmt(FLOG_MAX, "/long WrenchMemberCouponPayment(CVars in, CVars &out)" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*
|
||||
call to verify the user have the wallet in place - or create it
|
||||
if this fail , dont continue with collecting money , no place to put it.
|
||||
@@ -200,6 +282,8 @@ long WrenchNewCardPayment( CVars in, CVars &out )
|
||||
return payment_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
long WrenchCardRechargePayment( CVars in, CVars &out )
|
||||
{
|
||||
logfmt(FLOG_MAX, "long WrenchCardRechargePayment(CVars in, CVars &out)" );
|
||||
@@ -464,6 +548,7 @@ Foreign-key constraints:
|
||||
|
||||
long WrenchRefundoffer( CVars in, CVars &out )
|
||||
{
|
||||
logfmt( logINFO, "WrenchRefundoffer" );
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
//ULONG payment_id = 0;
|
||||
|
||||
@@ -527,7 +612,7 @@ long WrenchRefundoffer( CVars in, CVars &out )
|
||||
|
||||
}
|
||||
|
||||
|
||||
logfmt( logINFO, "/WrenchRefundoffer" );
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
// Twillo management toosl
|
||||
#include "clog.h"
|
||||
#include "cgi.h"
|
||||
#include "input.h"
|
||||
#include "wrenchboard_api.h"
|
||||
#include "reco_engine.h"
|
||||
#include "email.h"
|
||||
#include "safestring.h"
|
||||
#include <string>
|
||||
#include "pgsql.h"
|
||||
#include "pgsql_wrapper.h"
|
||||
#include <curl/curl.h>
|
||||
#include "account.h"
|
||||
#include "cards.h"
|
||||
#include "twilo.h"
|
||||
|
||||
/*
|
||||
#define RECOMMEND_COUPON 1000
|
||||
#define RECOMMEND_BLOG 1005
|
||||
#define RECOMMEND_NEWTASK 1010
|
||||
#define RECOMMEND_TOKEN 1015
|
||||
#define RECOMMEND_OFFERS 1020
|
||||
//========================
|
||||
*/
|
||||
long sendOffersRecommendation( CVars in, CVars &out);
|
||||
long sendCouponRecommendation( CVars in, CVars &out);
|
||||
long recommendation_engine(long action , CVars in, CVars &out) {
|
||||
try{
|
||||
|
||||
switch (action) {
|
||||
case RECOMMEND_COUPON:
|
||||
return sendCouponRecommendation( in, out);
|
||||
break;
|
||||
|
||||
case RECOMMEND_BLOG:
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case RECOMMEND_NEWTASK:
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case RECOMMEND_TOKEN:
|
||||
return 0;
|
||||
break;
|
||||
|
||||
case RECOMMEND_OFFERS:
|
||||
return sendOffersRecommendation( in, out);
|
||||
break;
|
||||
}
|
||||
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long recommendation_engine");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
long sendOffersRecommendation( CVars in, CVars &out){
|
||||
|
||||
try{
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_LONG(in, "offer_id", 1, -1);
|
||||
|
||||
if ( load_db_record(out, "SELECT client_id FROM members_jobs_offer WHERE id=%lu", in["offer_id"].Long())> 0){
|
||||
CVars xx;
|
||||
CVars xout;
|
||||
xx["action"] = WRENCHBOARD_CARDS_CREATECARD; xx["action"].set_valid( true );
|
||||
xx["member_id"] = out["client_id"]; xx["member_id"].set_valid( true ); // the card is going to job recipient
|
||||
xx["title"] = "New job offer"; xx["title"].set_valid( true );
|
||||
xx["description"] = "You have received a new Task/Job offer"; xx["description"].set_valid( true );
|
||||
xx["card_type"] = "OFFERS"; xx["card_type"].set_valid( true );
|
||||
xx["card_style"] = "card2"; xx["card_style"].set_valid( true );
|
||||
xx["card_icon"] = "icon1"; xx["card_icon"].set_valid( true );
|
||||
xx["offer_id"] = in["offer_id"]; xx["offer_id"].set_valid( true );
|
||||
xx["blog_id"] = "0"; xx["blog_id"].set_valid( true );
|
||||
card_calls(xx, xout);
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long sendCouponRecommendation");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
long sendCouponRecommendation( CVars in, CVars &out){
|
||||
/*
|
||||
CVars xx;
|
||||
xx["member_id"] = in["member_id"]; xx["member_id"].set_valid(true);
|
||||
xx["code"] = rec["code"]; xx["code"].set_valid(true);
|
||||
xx["amount"] = rec["amount"]; xx["amount"].set_valid(true);
|
||||
xx["status"] = COUPON_ACTIVE; xx["status"].set_valid(true);
|
||||
coupon_id = insert_db_record(DBS_VALID, "coupons_allocation", "coupons_allocation_id_seq", xx);
|
||||
|
||||
['title'=>'This is your coupon',
|
||||
'description'=>'This is the description of the description',
|
||||
'card_type'=>'COUPON',
|
||||
'card_style' =>'card1',
|
||||
'card_icon' =>'icon1',
|
||||
'assign_id'=> 0,
|
||||
*/
|
||||
|
||||
try{
|
||||
long member_id = REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_LONG(in, "coupon_id", 1, -1);
|
||||
|
||||
CVars xx;
|
||||
CVars xout;
|
||||
xx["action"] = WRENCHBOARD_CARDS_CREATECARD; xx["action"].set_valid( true );
|
||||
xx["member_id"] = member_id; xx["member_id"].set_valid( true );
|
||||
xx["title"] = "This is your coupon"; xx["title"].set_valid( true );
|
||||
xx["description"] = "Click to redeem your coupon to your account"; xx["description"].set_valid( true );
|
||||
xx["card_type"] = "COUPON"; xx["card_type"].set_valid( true );
|
||||
xx["card_style"] = "card1"; xx["card_style"].set_valid( true );
|
||||
xx["card_icon"] = "icon1"; xx["card_icon"].set_valid( true );
|
||||
xx["blog_id"] = "0"; xx["blog_id"].set_valid( true );
|
||||
xx["offer_id"] = "0"; xx["offer_id"].set_valid( true );
|
||||
card_calls(xx, xout);
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long sendCouponRecommendation");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "cfg.h"
|
||||
#include <curl/curl.h>
|
||||
#include "jobs.h"
|
||||
|
||||
long ReviewReminder(CVars in, CVars &out);
|
||||
long OfferPending(CVars in, CVars &out);
|
||||
@@ -20,32 +21,74 @@ long DeadlineLineApprachClient(CVars in, CVars &out);
|
||||
long SignUpPendingReminder(CVars in, CVars &out);
|
||||
long SignUpStats(CVars in, CVars &out);
|
||||
long PastDueWarings(CVars in, CVars &out);
|
||||
long PastDueOffersRefund(CVars in, CVars &out);
|
||||
|
||||
long CronTracker(CVars in, CVars &out);
|
||||
/*
|
||||
CREATE TABLE cron_jobs (
|
||||
id SERIAL,
|
||||
job_type VARCHAR(50) UNIQUE NOT NULL,
|
||||
description VARCHAR(55) NOT NULL,
|
||||
added timestamp without time zone DEFAULT now(),
|
||||
updated timestamp without time zone DEFAULT now(),
|
||||
active INT DEFAULT 0
|
||||
);
|
||||
ALTER TABLE ONLY cron_jobs
|
||||
ADD CONSTRAINT cron_jobs_id_key UNIQUE (id);
|
||||
|
||||
*/
|
||||
long sitecrons_calls(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "sitecrons_calls()");
|
||||
//out["result"] = "YES I GET TO BACK END";
|
||||
long call_action = REQ_LONG(in, "call_action", 0, -1);
|
||||
CVars x;
|
||||
CVars ct,co;
|
||||
long ret = 0;
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
logfmt(logINFO, "sitecrons_calls() action=%lu",call_action);
|
||||
|
||||
switch (call_action) {
|
||||
case WRB_CRONJOB_JOBDUE_REMINDER:
|
||||
ct["job_type"]="WRB_CRONJOB_JOBDUE_REMINDER"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="This is to organize and send job due date remider to client"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return DeadlineLineApprachClient(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_JOBDUE_PAYMENTS:
|
||||
ct["job_type"]="WRB_CRONJOB_JOBDUE_PAYMENTS"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="This is to organize jonb compleyted remider to owner of task"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return PaymentPending(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_SIGNUP_ALERT:
|
||||
ct["job_type"]="WRB_CRONJOB_SIGNUP_ALERT"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="General Signup job stats "; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return SignUpStats(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_PASTDUE_ALERT:
|
||||
ct["job_type"]="WRB_CRONJOB_PASTDUE_ALERT"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="This is to organize and send job due date remider to owner of task"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return PastDueWarings(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_OFFER_REFUND_ALERT:
|
||||
ct["job_type"]="WRB_CRONJOB_OFFER_REFUND_ALERT"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Offer expired , need to cancel and return deposit for the offer"; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return PastDueOffersRefund(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_PENDOFFER_ALERT:
|
||||
ct["job_type"]="WRB_CRONJOB_PENDOFFER_ALERT"; ct["job_type"].set_valid( true );
|
||||
ct["description"]="Offer is pending remind the client to attend to it before it expires "; ct["description"].set_valid( true );
|
||||
CronTracker(ct, co);
|
||||
return OfferPending(in, out);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -53,6 +96,32 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
long CronTracker(CVars in, CVars &out){
|
||||
long ret = 0;
|
||||
const PGresult *res;
|
||||
try {
|
||||
REQ_STRING(in, "job_type", 2, 149, "(.*)");
|
||||
REQ_STRING(in, "description", 2, 149, "(.*)");
|
||||
|
||||
if ( load_db_record(out, "SELECT id AS cron_id,active FROM cron_jobs WHERE job_type ='%s' ", in["job_type"].c_str())> 0){
|
||||
ret = out["active"].Long();
|
||||
res = pgsql_query("UPDATE cron_jobs SET updated=now() WHERE id = %lu", out["cron_id"].Long());
|
||||
}
|
||||
else{
|
||||
CVars xx;
|
||||
xx["job_type"] = in["job_type"];
|
||||
xx["job_type"].set_valid(true);
|
||||
xx["description"] = in["description"];
|
||||
xx["description"].set_valid(true);
|
||||
long cron_id = insert_db_record(DBS_VALID, "cron_jobs", "cron_jobs_id_seq", xx);
|
||||
|
||||
}
|
||||
} catch (bad_parameter) {
|
||||
out["action_status"] = "Invalid CronTracker Action";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
long ReviewReminder(CVars in, CVars &out) {
|
||||
|
||||
|
||||
@@ -60,9 +129,31 @@ long ReviewReminder(CVars in, CVars &out) {
|
||||
}
|
||||
|
||||
long OfferPending(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "ENTER OfferPending()");
|
||||
long limit = in["one_limit"].Long();
|
||||
const PGresult *res = pgsql_query("SELECT jo.id AS offer_id,jo.added,j.title,jo.expire,jo.email, jo.client_id, "
|
||||
"jo.job_id,jo.reminder_count,jo.reminder_date "
|
||||
"FROM members_jobs_offer jo "
|
||||
"LEFT JOIN members_jobs j ON j.id = jo.job_id "
|
||||
"WHERE now() > jo.added +'6 hrs' "
|
||||
"AND jo.expire > now() AND jo.status = 1 AND jo.public_view =0 "
|
||||
"AND jo.reminder_count =0 AND jo.reminder_date IS NULL LIMIT %lu ",limit);
|
||||
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
|
||||
|
||||
cron_email(WRB_CRONJOB_PENDOFFER_ALERT, rec, out); // send the cron email
|
||||
|
||||
pgsql_exec("UPDATE members_jobs_offer SET reminder_count=reminder_count+1, reminder_date=now() "\
|
||||
"WHERE id=%lu AND job_id=%lu ", rec["offer_id"].Long(),rec["job_id"].Long());
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/OfferPending()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
long InterestPending(CVars in, CVars &out) {
|
||||
@@ -71,20 +162,58 @@ long InterestPending(CVars in, CVars &out) {
|
||||
|
||||
}
|
||||
|
||||
long PastDueWarings(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "ENTER PastDueWarings()");
|
||||
const PGresult *res = pgsql_query("SELECT mc.member_id "
|
||||
" FROM members_jobs_contract mc "
|
||||
" LEFT JOIN members m ON m.id=mc.client_id "
|
||||
" WHERE mc.status IN (1,2) "
|
||||
"AND delivery_date < now() GROUP BY mc.member_id");
|
||||
long PastDueOffersRefund(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "ENTER PastDueOffersRefund()");
|
||||
long contract_id = 0;
|
||||
const PGresult *res = pgsql_query("SELECT j.* "
|
||||
" FROM members_jobs_offer j "
|
||||
" LEFT JOIN members m1 ON m1.id=j.member_id "
|
||||
" LEFT JOIN members m2 ON m2.id=j.client_id "
|
||||
" WHERE j.expire < now() "
|
||||
" AND j.status = 1 AND j.auto_close IS NULL "
|
||||
" AND j.payment_id IS NOT NULL LIMIT 1");
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
cron_email(WRB_CRONJOB_PASTDUE_ALERT, rec, out); // send the cron email
|
||||
rec["offer_result"] = OFFER_EXPIRE;
|
||||
rec["offer_result"].set_valid( true );
|
||||
|
||||
WrenchConcludeJobsOffer(rec, out);
|
||||
pgsql_exec("UPDATE members_jobs_offer SET auto_close=now() "\
|
||||
"WHERE offer_code='%s' ", rec["offer_code"].c_str());
|
||||
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/PastDueOffersRefund()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
long PastDueWarings(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "ENTER PastDueWarings()");
|
||||
long contract_id = 0;
|
||||
const PGresult *res = pgsql_query("SELECT mc.id AS contract_id, mc.member_id,mc.auto_remind "
|
||||
" FROM members_jobs_contract mc "
|
||||
" LEFT JOIN members m ON m.id=mc.client_id "
|
||||
" WHERE mc.status IN (1,2) AND mc.auto_remind < 3 "
|
||||
" AND delivery_date < now() GROUP BY mc.member_id ,mc.auto_remind, contract_id ORDER BY mc.auto_remind DESC");
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
for (int i = 0, n = pgsql_num_rows(res); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
// note we send once in the loop
|
||||
// we need the loop to mar items but wanted to send the email only once
|
||||
if ( contract_id != rec["contract_id"].Long() ){
|
||||
contract_id = rec["contract_id"].Long();
|
||||
cron_email(WRB_CRONJOB_PASTDUE_ALERT, rec, out); // send the cron email
|
||||
}
|
||||
pgsql_exec("UPDATE members_jobs_contract SET auto_remind=auto_remind + 1,due_remind=now() "\
|
||||
"WHERE member_id=%lu AND id = %lu ", rec["member_id"].Long(),rec["contract_id"].Long());
|
||||
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/PastDueWarings()");
|
||||
@@ -96,8 +225,15 @@ long SignUpStats(CVars in, CVars &out) {
|
||||
|
||||
load_db_record(out, "SELECT count(id) AS today_signup FROM members WHERE added::date = now()::date");
|
||||
load_db_record(out, "SELECT count(id) AS today_pending_signup FROM members_pending WHERE added::date = now()::date");
|
||||
load_db_record(out, "SELECT TO_CHAR(NOW(), 'Day Mon dd, yyyy hh:mm AM') AS report_date");
|
||||
load_db_record(out, "SELECT count(*) AS total_task_interest FROM members_offer_interest WHERE added::date = now()::date");
|
||||
load_db_record(out, "SELECT count(id) AS total_active_public_jobs FROM members_jobs_offer WHERE status=1 AND public_view= 1 AND expire> now()");
|
||||
load_db_record(out, "SELECT count(*) AS total_login FROM members_session WHERE created::date=now()::date");
|
||||
load_db_record(out, "SELECT count(id) AS total_private_tasks FROM members_jobs_offer WHERE status=1 AND public_view= 0 AND expire> now()");
|
||||
|
||||
load_db_record(out, "SELECT count(*) AS count_mobile_login FROM mobile_login WHERE updated::date = now()::date");
|
||||
|
||||
|
||||
load_db_record(out, "SELECT TO_CHAR(NOW() :: DATE, 'Day Mon dd, yyyy') AS report_date");
|
||||
|
||||
in = out;
|
||||
|
||||
@@ -131,6 +267,8 @@ long PaymentPending(CVars in, CVars &out) {
|
||||
long DeadlineLineApprachClient(CVars in, CVars &out) // called
|
||||
{
|
||||
logfmt(logINFO, "DeadlineLineApprachClient()");
|
||||
|
||||
// First Reminder
|
||||
const PGresult *res = pgsql_query("SELECT j.client_id,j.id AS contract_id FROM members_jobs_contract j "\
|
||||
"WHERE j.due_remind IS NULL AND j.status IN (1,2) "\
|
||||
"AND j.delivery_date > now() AND j.delivery_date < now() + '1 day' "\
|
||||
@@ -145,6 +283,24 @@ long DeadlineLineApprachClient(CVars in, CVars &out) // called
|
||||
pgsql_exec("UPDATE members_jobs_contract SET due_remind=now() WHERE id=%lu", rec["contract_id"].Long());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
const PGresult *res2 = pgsql_query("SELECT j.client_id,j.id AS contract_id FROM members_jobs_contract j "\
|
||||
"WHERE now() > j.due_remind + '6 hours' AND j.status IN (1,2) "\
|
||||
"AND j.delivery_date > now() AND j.delivery_date < now() + '1 day' "\
|
||||
"AND j.client_id IS NOT NULL AND j.client_id > 0 limit %lu", in["one_limit"].Long());
|
||||
if (res2 != NULL && pgsql_num_rows(res2) > 0) {
|
||||
for (int i = 0, n = pgsql_num_rows(res2); i < n; i++) {
|
||||
map<const char*, const char*>f = pgsql_fetch_assoc(res2, i);
|
||||
if (f.empty()) continue;
|
||||
CVars rec;
|
||||
map_to_cvars(f, rec);
|
||||
job_email(JOBS_DUE_APPROACH_MAIL, rec, out); // send the reminder email
|
||||
pgsql_exec("UPDATE members_jobs_contract SET due_remind=now() WHERE id=%lu", rec["contract_id"].Long());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
logfmt(logINFO, "/DeadlineLineApprachClient()");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -19,6 +19,8 @@
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "stripe_charge.h"
|
||||
#include "account_mngt.h"
|
||||
#include "coupons.h"
|
||||
#include "cards.h"
|
||||
|
||||
#include "twilo.h"
|
||||
//extern CSQL *sql;
|
||||
@@ -56,6 +58,16 @@ long wrenchboard_api_main(CVars in, CVars &out) {
|
||||
return sitecrons_calls(in, out);
|
||||
}
|
||||
|
||||
if (action >= WRENCHBOARD_CARDS_START && action <= WRENCHBOARD_CARDS_END) {
|
||||
logfmt(logINFO, "card_calls");
|
||||
return card_calls(in, out);
|
||||
}
|
||||
|
||||
if (action >= WRENCHBOARD_COUPON_START && action <= WRENCHBOARD_COUPON_END) {
|
||||
logfmt(logINFO, "coupons_calls");
|
||||
return coupons_calls(in, out);
|
||||
}
|
||||
|
||||
if (action >= WRENCHBOARD_ACCOUNT_START && action <= WRENCHBOARD_ACCOUNT_END) {
|
||||
logfmt(logINFO, "account calls");
|
||||
return account_calls(in, out);
|
||||
|
||||
+474
@@ -0,0 +1,474 @@
|
||||
##### Windows
|
||||
# Windows thumbnail cache files
|
||||
Thumbs.db
|
||||
Thumbs.db:encryptable
|
||||
ehthumbs.db
|
||||
ehthumbs_vista.db
|
||||
|
||||
# Dump file
|
||||
*.stackdump
|
||||
|
||||
# Folder config file
|
||||
[Dd]esktop.ini
|
||||
|
||||
# Recycle Bin used on file shares
|
||||
$RECYCLE.BIN/
|
||||
|
||||
# Windows Installer files
|
||||
*.cab
|
||||
*.msi
|
||||
*.msix
|
||||
*.msm
|
||||
*.msp
|
||||
|
||||
# Windows shortcuts
|
||||
*.lnk
|
||||
|
||||
##### Linux
|
||||
*~
|
||||
|
||||
# temporary files which can be created if a process still has a handle open of a deleted file
|
||||
.fuse_hidden*
|
||||
|
||||
# KDE directory preferences
|
||||
.directory
|
||||
|
||||
# Linux trash folder which might appear on any partition or disk
|
||||
.Trash-*
|
||||
|
||||
# .nfs files are created when an open file is removed but is still being accessed
|
||||
.nfs*
|
||||
|
||||
##### MacOS
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
##### Backup
|
||||
*.bak
|
||||
*.gho
|
||||
*.ori
|
||||
*.orig
|
||||
*.tmp
|
||||
|
||||
##### GPG
|
||||
secring.*
|
||||
|
||||
##### Dropbox
|
||||
# Dropbox settings and caches
|
||||
.dropbox
|
||||
.dropbox.attr
|
||||
.dropbox.cache
|
||||
|
||||
##### SynopsysVCS
|
||||
# Waveform formats
|
||||
*.vcd
|
||||
*.vpd
|
||||
*.evcd
|
||||
*.fsdb
|
||||
|
||||
# Default name of the simulation executable. A different name can be
|
||||
# specified with this switch (the associated daidir database name is
|
||||
# also taken from here): -o <path>/<filename>
|
||||
simv
|
||||
|
||||
# Generated for Verilog and VHDL top configs
|
||||
simv.daidir/
|
||||
simv.db.dir/
|
||||
|
||||
# Infrastructure necessary to co-simulate SystemC models with
|
||||
# Verilog/VHDL models. An alternate directory may be specified with this
|
||||
# switch: -Mdir=<directory_path>
|
||||
csrc/
|
||||
|
||||
# Log file - the following switch allows to specify the file that will be
|
||||
# used to write all messages from simulation: -l <filename>
|
||||
*.log
|
||||
|
||||
# Coverage results (generated with urg) and database location. The
|
||||
# following switch can also be used: urg -dir <coverage_directory>.vdb
|
||||
simv.vdb/
|
||||
urgReport/
|
||||
|
||||
# DVE and UCLI related files.
|
||||
DVEfiles/
|
||||
ucli.key
|
||||
|
||||
# When the design is elaborated for DirectC, the following file is created
|
||||
# with declarations for C/C++ functions.
|
||||
vc_hdrs.h
|
||||
|
||||
##### SVN
|
||||
.svn/
|
||||
|
||||
##### Mercurial
|
||||
.hg/
|
||||
.hgignore
|
||||
.hgsigs
|
||||
.hgsub
|
||||
.hgsubstate
|
||||
.hgtags
|
||||
|
||||
##### Bazaar
|
||||
.bzr/
|
||||
.bzrignore
|
||||
|
||||
##### CVS
|
||||
/CVS/*
|
||||
**/CVS/*
|
||||
.cvsignore
|
||||
*/.cvsignore
|
||||
|
||||
##### TortoiseGit
|
||||
# Project-level settings
|
||||
/.tgitconfig
|
||||
|
||||
##### PuTTY
|
||||
# Private key
|
||||
*.ppk
|
||||
|
||||
##### Vim
|
||||
# Swap
|
||||
[._]*.s[a-v][a-z]
|
||||
!*.svg # comment out if you don't need vector files
|
||||
[._]*.sw[a-p]
|
||||
[._]s[a-rt-v][a-z]
|
||||
[._]ss[a-gi-z]
|
||||
[._]sw[a-p]
|
||||
|
||||
# Session
|
||||
Session.vim
|
||||
Sessionx.vim
|
||||
|
||||
# Temporary
|
||||
.netrwhist
|
||||
*~
|
||||
# Auto-generated tag files
|
||||
tags
|
||||
# Persistent undo
|
||||
[._]*.un~
|
||||
|
||||
##### Emacs
|
||||
# -*- mode: gitignore; -*-
|
||||
*~
|
||||
\#*\#
|
||||
/.emacs.desktop
|
||||
/.emacs.desktop.lock
|
||||
*.elc
|
||||
auto-save-list
|
||||
tramp
|
||||
.\#*
|
||||
|
||||
# Org-mode
|
||||
.org-id-locations
|
||||
*_archive
|
||||
|
||||
# flymake-mode
|
||||
*_flymake.*
|
||||
|
||||
# eshell files
|
||||
/eshell/history
|
||||
/eshell/lastdir
|
||||
|
||||
# elpa packages
|
||||
/elpa/
|
||||
|
||||
# reftex files
|
||||
*.rel
|
||||
|
||||
# AUCTeX auto folder
|
||||
/auto/
|
||||
|
||||
# cask packages
|
||||
.cask/
|
||||
dist/
|
||||
|
||||
# Flycheck
|
||||
flycheck_*.el
|
||||
|
||||
# server auth directory
|
||||
/server/
|
||||
|
||||
# projectiles files
|
||||
.projectile
|
||||
|
||||
# directory configuration
|
||||
.dir-locals.el
|
||||
|
||||
# network security
|
||||
/network-security.data
|
||||
|
||||
##### SublimeText
|
||||
# Cache files for Sublime Text
|
||||
*.tmlanguage.cache
|
||||
*.tmPreferences.cache
|
||||
*.stTheme.cache
|
||||
|
||||
# Workspace files are user-specific
|
||||
*.sublime-workspace
|
||||
|
||||
# Project files should be checked into the repository, unless a significant
|
||||
# proportion of contributors will probably not be using Sublime Text
|
||||
# *.sublime-project
|
||||
|
||||
# SFTP configuration file
|
||||
sftp-config.json
|
||||
sftp-config-alt*.json
|
||||
|
||||
# Package control specific files
|
||||
Package Control.last-run
|
||||
Package Control.ca-list
|
||||
Package Control.ca-bundle
|
||||
Package Control.system-ca-bundle
|
||||
Package Control.cache/
|
||||
Package Control.ca-certs/
|
||||
Package Control.merged-ca-bundle
|
||||
Package Control.user-ca-bundle
|
||||
oscrypto-ca-bundle.crt
|
||||
bh_unicode_properties.cache
|
||||
|
||||
# Sublime-github package stores a github token in this file
|
||||
# https://packagecontrol.io/packages/sublime-github
|
||||
GitHub.sublime-settings
|
||||
|
||||
##### Notepad++
|
||||
# Notepad++ backups #
|
||||
*.bak
|
||||
|
||||
##### TextMate
|
||||
*.tmproj
|
||||
*.tmproject
|
||||
tmtags
|
||||
|
||||
##### VisualStudioCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
*.code-workspace
|
||||
|
||||
# Local History for Visual Studio Code
|
||||
.history/
|
||||
|
||||
##### NetBeans
|
||||
**/nbproject/private/
|
||||
**/nbproject/Makefile-*.mk
|
||||
**/nbproject/Package-*.bash
|
||||
build/
|
||||
nbbuild/
|
||||
dist/
|
||||
nbdist/
|
||||
.nb-gradle/
|
||||
|
||||
##### JetBrains
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/artifacts
|
||||
# .idea/compiler.xml
|
||||
# .idea/jarRepositories.xml
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
##### Eclipse
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
##### Dreamweaver
|
||||
# DW Dreamweaver added files
|
||||
_notes
|
||||
_compareTemp
|
||||
configs/
|
||||
dwsync.xml
|
||||
dw_php_codehinting.config
|
||||
*.mno
|
||||
|
||||
##### CodeKit
|
||||
# General CodeKit files to ignore
|
||||
config.codekit
|
||||
config.codekit3
|
||||
/min
|
||||
|
||||
##### Gradle
|
||||
.gradle
|
||||
**/build/
|
||||
!src/**/build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
##### Composer
|
||||
composer.phar
|
||||
/vendor/
|
||||
|
||||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
|
||||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
|
||||
composer.lock
|
||||
|
||||
##### PHP CodeSniffer
|
||||
# gitignore for the PHP Codesniffer framework
|
||||
# website: https://github.com/squizlabs/PHP_CodeSniffer
|
||||
#
|
||||
# Recommended template: PHP.gitignore
|
||||
|
||||
/wpcs/*
|
||||
|
||||
##### SASS
|
||||
.sass-cache/
|
||||
*.css.map
|
||||
*.sass.map
|
||||
*.scss.map
|
||||
File diff suppressed because one or more lines are too long
@@ -1,43 +0,0 @@
|
||||
<?
|
||||
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
|
||||
$randd = rand(1, 5) * 1000;
|
||||
$data['member_id'] = 1;
|
||||
$data['group_id'] = 1;
|
||||
$data['firstname'] = "Firstnme" . $randd;
|
||||
$data['lastname'] = "Lastname" . $randd;
|
||||
$data['email'] = "ses66181+$randd@gmail.com";
|
||||
|
||||
$data['action'] = WRENCHBOARD_JOB_GROUP_MEMBER;
|
||||
print_r($data);
|
||||
$out = array();
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
//phpinfo();
|
||||
|
||||
/*
|
||||
*
|
||||
* //**************************************************************
|
||||
#define WRENCHBOARD_JOBS_START 13000
|
||||
|
||||
#define WRENCHBOARD_JOB_CREATEJOB 13010
|
||||
|
||||
#define WRENCHBOARD_JOBS_END 13999
|
||||
//**************************************************************
|
||||
*
|
||||
*/
|
||||
?>
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
$email = 'ses66181+1@gmail.com';
|
||||
$email = 'ameye@chiefsoft.com';
|
||||
$data['email'] = $email;
|
||||
$data['username'] = 'admin'; //$email;
|
||||
$data['password'] = 'may12002';
|
||||
$data['terms'] = 1; // $terms;
|
||||
$data['news'] = 1; //$news;
|
||||
$data['loc'] = "38.101.241.200";
|
||||
$data['sessionid'] = rand(10000,99999)."A".rand(10000,99999);
|
||||
$data['action'] = 10010;
|
||||
|
||||
$out = array();
|
||||
$ret = $wrenchboard->wrenchboard_api($data,$out);
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
//phpinfo();
|
||||
?>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?php
|
||||
include '../backend.php';
|
||||
$base_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||
$local_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||
|
||||
$base_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||
$local_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
|
||||
|
||||
//$base_url = 'https://www.wrenchboard.com/svs/user';
|
||||
//$local_url = 'https://www.wrenchboard.com/svs/user';
|
||||
|
||||
|
||||
?>
|
||||
@@ -1,47 +0,0 @@
|
||||
<?
|
||||
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
$data['title'] = rand(100,999).'Job Title Job Title Job Title Job Title'.rand(100,999);
|
||||
|
||||
for ($i=0; $i<= rand(2,5); $i++){
|
||||
$data['description'] .= 'Job description';
|
||||
}
|
||||
|
||||
for ($i=0; $i<= rand(5,15); $i++){
|
||||
$data['job_detail'] .= 'Job job_detail ';
|
||||
}
|
||||
$data['timeline_days'] = rand(1,3);
|
||||
$data['price'] = rand(1,5)*1000;
|
||||
$data['member_id'] = 1;
|
||||
$data['action'] = 13010;
|
||||
print_r($data);
|
||||
$out = array();
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
//phpinfo();
|
||||
|
||||
/*
|
||||
*
|
||||
* //**************************************************************
|
||||
#define WRENCHBOARD_JOBS_START 13000
|
||||
|
||||
#define WRENCHBOARD_JOB_CREATEJOB 13010
|
||||
|
||||
#define WRENCHBOARD_JOBS_END 13999
|
||||
//**************************************************************
|
||||
*
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
|
||||
@@ -1,107 +0,0 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
|
||||
define('PHP_API_OK', 0);
|
||||
define('PHP_API_BAD_PARAM', -1);
|
||||
|
||||
define('WRENCHBOARD_SESSION_CHECK', 299);
|
||||
define('WRENCHBOARD_USER_LOGIN', 300);
|
||||
define('WRENCHBOARD_USER_LOGOUT', 301);
|
||||
define('WRENCHBOARD_CREATE_ACCOUNT', 320);
|
||||
|
||||
//**************************************************************
|
||||
define('WRENCHBOARD_BKO_START', 10000);
|
||||
|
||||
define('WRENCHBOARD_BKO_LOGIN', 10010);
|
||||
define('WRENCHBOARD_BKO_CREATEUSER', 10015);
|
||||
define('WRENCHBOARD_BKO_UPDATEUSER', 10020);
|
||||
|
||||
define('WRENCHBOARD_BKO_END', 10999);
|
||||
//**************************************************************
|
||||
define('WRENCHBOARD_ACCOUNT_START', 11000);
|
||||
|
||||
define('WRENCHBOARD_ACCOUNT_TESTEMAIL', 11001);
|
||||
define('WRENCHBOARD_ACCOUNT_PENDING', 11010);
|
||||
define('WRENCHBOARD_VERIFY_PENDING_LINK', 11015);
|
||||
define('WRENCHBOARD_ACCOUNT_CREATEACC', 11020);
|
||||
define('WRENCHBOARD_ACCOUNT_LOGIN', 11025);
|
||||
|
||||
define('WRENCHBOARD_ACCOUNT_END', 11999);
|
||||
//**************************************************************
|
||||
|
||||
define('WRENCHBOARD_JOB_GROUP_MEMBER', 13015) ;
|
||||
define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017);
|
||||
define('WRENCHBOARD_JOB_CREATE_GROUP', 13020);
|
||||
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
|
||||
|
||||
define('WRENCHBOARD_GROUP_START', 12000);
|
||||
|
||||
define('WRENCHBOARD_GROUP_CREATEGROUP', 12010);
|
||||
define('WRENCHBOARD_GROUP_INVITEGROUP', 12015);
|
||||
define('WRENCHBOARD_GROUP_ACCEPTGROUP', 12020);
|
||||
|
||||
define('WRENCHBOARD_GROUP_END', 12999);
|
||||
//**************************************************************
|
||||
|
||||
define('WRENCHBOARD_LOGIN_SHOP', 50501);
|
||||
define('WRENCHBOARD_LOGIN_ADMIN', 50502);
|
||||
define('WRENCHBOARD_LOGIN_MANAGER', 50503);
|
||||
|
||||
define('WRENCHBOARD_SURVEY_DATA', 55000);
|
||||
define('WRENCHBOARD_ADD_SURVEY', 55050);
|
||||
define('WRENCHBOARD_LOAD_SURVEY', 55055);
|
||||
|
||||
|
||||
define('WRENCHBOARD_COMPLETE_SENDMONEY_INTERSW', 555);
|
||||
define('WRENCHBOARD_GETBILLER_INTERSW', 556);
|
||||
define('WRENCHBOARD_BILL_PAYMENT_ADVICE_INTERSW', 557);
|
||||
|
||||
define('WRENCHBOARD_INTERSW_GETBILLER', 556);
|
||||
define('WRENCHBOARD_INTERSW_BILL_PAYMENT_ADVICE', 557);
|
||||
define('WRENCHBOARD_INTERSW_GETBILLERPAYMENTINTEMS', 558);
|
||||
define('WRENCHBOARD_INTERSW_GETBILLERCATEGORIES', 559);
|
||||
define('WRENCHBOARD_INTERSW_DO_TRANSFER', 560);
|
||||
define('WRENCHBOARD_INTERSW_QUERY_TRANSACTION', 561);
|
||||
|
||||
define('WRENCHBOARD_ADD_MONEYRECIPIENT', 600);
|
||||
|
||||
define('WRENCHBOARD_CREATE_USER_ACCOUNT', 700);
|
||||
define('WRENCHBOARD_USER_ACCOUNT_LOGIN', 710);
|
||||
define('WRENCHBOARD_START_PASSWORDRESET', 720);
|
||||
define('WRENCHBOARD_COMPLETE_PASSWORDRESET', 730);
|
||||
|
||||
//#define WRENCHBOARD_START_ADDMONEY', 770 );
|
||||
//#define WRENCHBOARD_COMPLETE_ADDMONEY' 775 );
|
||||
|
||||
define('WRENCHBOARD_ADD_MOBILE_TOPUPNUM', 900);
|
||||
define('WRENCHBOARD_PROMO_CALL', 990);
|
||||
|
||||
|
||||
define('WRENCHBOARD_STOREFACE_GET_ACCOUNT_BALANCE', 891);
|
||||
|
||||
define('WRENCHBOARD_LOG_ENTRY', 900000);
|
||||
define('WRENCHBOARD_CREDIT_TOPUP', 900010);
|
||||
|
||||
define('WRENCHBOARD_TOPUP_ORDER', 900020);
|
||||
define('WRENCHBOARD_TOPUP_ORDER_PURCHASE', 900030);
|
||||
define('WRENCHBOARD_PAYPAL_IPNMSG', 900090);
|
||||
|
||||
define('WRENCHBOARD_BULKTOPUP_ORDER', 700010);
|
||||
define('WRENCHBOARD_BULKTOPUP_ITEM', 700020);
|
||||
define('WRENCHBOARD_BULKTOPUP_ITEMUPDATE', 700030);
|
||||
define('WRENCHBOARD_BULKTOPUP_DELIVER', 700040);
|
||||
|
||||
define('WRENCHBOARD_BALANCE_TOPUP_ORDER', 800020);
|
||||
define('WRENCHBOARD_BALANCE_TOPUP_PURCHASE', 800030);
|
||||
define('WRENCHBOARD_BALANCE_TOPUP_PAYMENT', 800040);
|
||||
|
||||
define('VIRTUAL_AIRTOPUP', 70011);
|
||||
define('PAY_MODE_BALANCE', 0);
|
||||
define('PAY_MODE_CCARD', 1);
|
||||
define('PAY_MODE_BONUS', 9);
|
||||
define('APPROVED_BALANCE', 5);
|
||||
define('DISAPROVE_BALANCE', 3);
|
||||
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php
|
||||
// Include and instantiate the class.
|
||||
require_once 'Mobile_Detect.php';
|
||||
$detect = new Mobile_Detect;
|
||||
|
||||
// Any mobile device (phones or tablets).
|
||||
if ( $detect->isMobile() ) {
|
||||
echo 'mobile -> '.$detect->isMobile();
|
||||
}
|
||||
|
||||
// Any tablet device.
|
||||
if( $detect->isTablet() ){
|
||||
|
||||
}
|
||||
|
||||
// Exclude tablets.
|
||||
if( $detect->isMobile() && !$detect->isTablet() ){
|
||||
|
||||
}
|
||||
|
||||
// Check for a specific platform with the help of the magic methods:
|
||||
if( $detect->isiOS() ){
|
||||
|
||||
}
|
||||
|
||||
if( $detect->isAndroidOS() ){
|
||||
|
||||
}
|
||||
|
||||
// Alternative method is() for checking specific properties.
|
||||
// WARNING: this method is in BETA, some keyword properties will change in the future.
|
||||
$detect->is('Chrome');
|
||||
$detect->is('iOS');
|
||||
$detect->is('UC Browser');
|
||||
// [...]
|
||||
|
||||
// Batch mode using setUserAgent():
|
||||
$userAgents = array(
|
||||
'Mozilla/5.0 (Linux; Android 4.0.4; Desire HD Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19',
|
||||
'BlackBerry7100i/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/103',
|
||||
// [...]
|
||||
);
|
||||
foreach($userAgents as $userAgent){
|
||||
|
||||
$detect->setUserAgent($userAgent);
|
||||
$isMobile = $detect->isMobile();
|
||||
$isTablet = $detect->isTablet();
|
||||
// Use the force however you want.
|
||||
|
||||
}
|
||||
|
||||
// Get the version() of components.
|
||||
// WARNING: this method is in BETA, some keyword properties will change in the future.
|
||||
$detect->version('iPad'); // 4.3 (float)
|
||||
$detect->version('iPhone'); // 3.1 (float)
|
||||
$detect->version('Android'); // 2.1 (float)
|
||||
$detect->version('Opera Mini'); // 5.0 (float)
|
||||
// [...]
|
||||
@@ -1,2 +0,0 @@
|
||||
|
||||
|
||||
@@ -1,98 +0,0 @@
|
||||
<?php
|
||||
|
||||
function excudedEmails(){
|
||||
return [
|
||||
'ses6681+1@gmail.com',
|
||||
'tokslawus@gmail.com',
|
||||
'ses6681+1@gmail.com',
|
||||
'ameye@chiefsoft.com',
|
||||
'ses66181@gmail.com',
|
||||
];
|
||||
}
|
||||
|
||||
if (in_array("ses6681+3@gmail.com", excudedEmails()))
|
||||
{
|
||||
echo "found";
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "not found";
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
|
||||
/*
|
||||
$ar1 = [
|
||||
"color" => "red",
|
||||
"sex" => "male",
|
||||
];
|
||||
|
||||
|
||||
$ar2 = ["color" => "green", ];
|
||||
$result = array_merge_recursive($ar1, $ar2);
|
||||
print_r($result);*/
|
||||
print_r( spaTranslationsCall());
|
||||
|
||||
|
||||
function spaTranslationsCall()
|
||||
{
|
||||
return array_merge_recursive(spaTranslations(),[
|
||||
'hide_boards' => 'Hide Boards',
|
||||
'draw_numbers' => 'Draw Number(s)',
|
||||
'next_draw' => 'Next Draw',
|
||||
]);
|
||||
|
||||
}
|
||||
|
||||
|
||||
function spaTranslations(){
|
||||
return [
|
||||
'cart_title' => 'Below you can review and adjust the games you have added',
|
||||
'cart_subtitle' => 'Select a row to see more details',
|
||||
'cart_empty' => 'Your cart is empty.',
|
||||
'cart_summary_title' => 'Below are the entries you purchased!',
|
||||
'cart_summary_title_fail' => 'Your transaction could not be completed, please try again.',
|
||||
'cart_summary_title_some_fail' => 'Some tickets could not be played, please return to cart and try again.',
|
||||
'show_boards' => 'Expand to display boards',
|
||||
'board' => 'Board',
|
||||
'week' => 'Week',
|
||||
'current_shopping_cart_total' => 'Your current Shopping Cart total is',
|
||||
'subtotal' => 'Subtotal',
|
||||
'discount' => 'Discount',
|
||||
'voucher_discount' => 'Voucher Discount',
|
||||
'total' => 'Total',
|
||||
'clear_cart_confirmation' => 'Do you realy want to empty your cart?',
|
||||
'cart_delete_confirmation' => 'Do you really want to delete this cart item?',
|
||||
'number_of_draws' => 'Multi draws',
|
||||
'ticket_update' => 'Update Ticket',
|
||||
'ticket_updated' => 'Your ticket was Updated, return to cart to replay.',
|
||||
'ticket_id' => 'Ticket ID',
|
||||
'wager_id' => 'Wager ID',
|
||||
'next_draw' => 'Next draw',
|
||||
'btn_continue_playing' => 'Continue Playing',
|
||||
'cart_draw_date' => 'Date',
|
||||
'details_date_at' => 'at',
|
||||
'details_date_from' => 'from',
|
||||
'details_date_to' => 'to',
|
||||
'no_of_draws' => 'No of Draws',
|
||||
'handling_fee' => 'Handling Fee',
|
||||
'price_details_title' => 'Price Details',
|
||||
'cart_item_price' => 'Price',
|
||||
'details_total' => 'Total',
|
||||
'system_played' => 'System',
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
$ret = $wrenchboard->wrenchboard_api($in,$out);
|
||||
//var_dump($ret);
|
||||
//phpinfo();
|
||||
?>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
//Array ( [title] => Re:Week 1 CAT 2: “Muddiest” Point [description] => sffss [timeline] => 3 [job_detail] => sgsagsagashas [price] => 5000 [action] => 0 )
|
||||
|
||||
|
||||
$data['firstname'] = 'Olu';
|
||||
$data['lastname'] = 'Amey';
|
||||
|
||||
$email = 'ses66181+1@gmail.com';
|
||||
$email = 'acidumirae@gmail.com';
|
||||
$data['email'] = $email;
|
||||
$data['username'] = $email;
|
||||
$data['password'] = 'may12002';
|
||||
$data['terms'] = 1; // $terms;
|
||||
$data['news'] = 1; //$news;
|
||||
$data['loc'] = "38.101.241.200";
|
||||
$data['sessionid'] = rand(10000,99999)."A".rand(10000,99999);
|
||||
$data['action'] = WRENCHBOARD_ACCOUNT_LOGIN;
|
||||
|
||||
$out = array();
|
||||
$ret = $wrenchboard->wrenchboard_api($data,$out);
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
//phpinfo();
|
||||
?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
$data['action'] = 11040;
|
||||
$data['mlog'] = "Account login";
|
||||
$data['member_id'] = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data,$out);
|
||||
var_dump($ret);
|
||||
phpinfo();
|
||||
?>
|
||||
@@ -1,104 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
echo "TEST - SEND OFFER<br>";
|
||||
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
|
||||
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
|
||||
|
||||
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
|
||||
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
|
||||
define('WRENCHBOARD_JOB_OFFER_CONCLUDE',13035);
|
||||
|
||||
if ($_POST) {
|
||||
$data["offer_code"] = $_POST['offer_code'];
|
||||
$data["offer_result"] = 100;
|
||||
$data['action'] = WRENCHBOARD_JOB_OFFER_CONCLUDE; // test EMAIL
|
||||
$data["member_id"]=3;
|
||||
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
}
|
||||
|
||||
//$data['email'] = "ameye+".rand(100,999)."@chiefsoft.com";
|
||||
$data['offer_code'] = "2R89783R2B";
|
||||
// $data['ses66181+2@gmail.com'] = "ses66181+2@gmail.com";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Offer Test Page</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d }
|
||||
ul.navbar {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
width: 9em }
|
||||
h1 {
|
||||
font-family: Helvetica, Geneva, Arial,
|
||||
SunSans-Regular, sans-serif }
|
||||
ul.navbar li {
|
||||
background: white;
|
||||
margin: 0.5em 0;
|
||||
padding: 0.3em;
|
||||
border-right: 1em solid black }
|
||||
ul.navbar a {
|
||||
text-decoration: none }
|
||||
a:link {
|
||||
color: blue }
|
||||
a:visited {
|
||||
color: purple }
|
||||
address {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
border-top: thin dotted }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Site navigation menu -->
|
||||
<ul class="navbar">
|
||||
<li><a href="#">Home page</a>
|
||||
</ul>
|
||||
|
||||
<!-- Main content -->
|
||||
<h1>Manage Offer Test Page</h1>
|
||||
|
||||
<p>Welcome to my test page!
|
||||
<form action="#" method="POST">
|
||||
<div>
|
||||
<input type="text" name="offer_code" value="<?echo $data["offer_code"]?>" style="width: 300px;">
|
||||
<input type="submit" name="submit" value="Submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<!-- Sign and date the page, it's only polite! -->
|
||||
<address>Made 5 March 2017<br>
|
||||
by myself.</address>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,62 +0,0 @@
|
||||
<?
|
||||
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
$data['member_id'] = 3;
|
||||
$data['action'] = 33020;
|
||||
|
||||
|
||||
$data["InitiatingEntityCode"] = "MBA"; //isset($_POST["InitiatingEntityCode"])?$_POST["InitiatingEntityCode"]:"";
|
||||
// $data["senderid"] = 1;
|
||||
$data["senderid"] = "1"; // isset($_POST["customerid"])?((int)$_POST["customerid"]):0;
|
||||
$data["InitiatingAmount"] = 120000 + rand(999, 99999);
|
||||
$data["Fee"] = 120;
|
||||
$data["InitiatingChannel"] = 7;
|
||||
$data["InitiatingPaymentMethodCode"] = "CA";
|
||||
$data["InitiatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
|
||||
$data["recipientid"] = 1;
|
||||
$data["TerminatingPaymentMethodCode"] = "AC";
|
||||
$data["TerminatingAmount"] = $data["InitiatingAmount"];
|
||||
$data["TerminatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
$data["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
|
||||
$data["TerminatingAccountNumber"] = "";
|
||||
// $data["TerminatingAccountType"] = isset($_POST["TerminatingAccountType"])?$_POST["TerminatingAccountType"]:"";
|
||||
$data["TerminatingEntityCode"] = "";
|
||||
|
||||
$data["transaction_id"] = "T".rand(120000,999999);
|
||||
print_r($data);
|
||||
$out = array();
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
echo "<hr>";
|
||||
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
* //**************************************************************
|
||||
#define WRENCHBOARD_SMONEY_START 33000
|
||||
|
||||
#define WRENCHBOARD_SMONEY_ADDRECIPIENT 33010
|
||||
#define WRENCHBOARD_SMONEY_MEMBER 33020
|
||||
|
||||
#define WRENCHBOARD_SMONEY_END 33999
|
||||
//**************************************************************
|
||||
*
|
||||
*/
|
||||
?>
|
||||
|
||||
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
$data['firstname'] = 'Olu';
|
||||
$data['lastname'] = 'Amey';
|
||||
|
||||
$email = 'ses66181+'.rand(1000,9999).'@gmail.com';
|
||||
$email = 'ameye+'.rand(1000,9999).'@chiefsoft.com';
|
||||
$data['email'] = $email;
|
||||
$data['username'] = $email;
|
||||
$data['password'] = 'may12002';
|
||||
$data['terms'] = 1; // $terms;
|
||||
$data['news'] = 1; //$news;
|
||||
$data['loc'] = "38.101.241.200";
|
||||
|
||||
$data['action'] = WRENCHBOARD_ACCOUNT_PENDING;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data,$out);
|
||||
var_dump($ret);
|
||||
phpinfo();
|
||||
?>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/account";
|
||||
|
||||
/*
|
||||
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
|
||||
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
|
||||
*/
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/activejoblist";
|
||||
|
||||
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
|
||||
$username = "ses66181+1@gmail.com";
|
||||
|
||||
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP",
|
||||
"limit" => 10,
|
||||
"page" => "1"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,75 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/createuser";
|
||||
|
||||
$username = urlencode("jubaworker+" . rand(1000, 9999) . "@gmail.com");
|
||||
|
||||
$username = "jubaworker+" . rand(1000, 9999) . "@gmail.com";
|
||||
//$username = "ameye+" . rand(1000, 9999) . "@chiefsoft.com";
|
||||
//$username = "ses66181+" . rand(1000, 9999) . "@gmail.com";
|
||||
$phone = (rand(1, 2) > 1) ? "770222" . rand(2222, 9999) : '';
|
||||
|
||||
include 'sample_data.php'; // just for sample data
|
||||
$firstname = random_name(); //
|
||||
$lastname = random_name(); //
|
||||
|
||||
$data = array(
|
||||
"country" => 'NG',
|
||||
"username" => $username,
|
||||
"password" => "wrenchboard",
|
||||
"email" => $username,
|
||||
"firstname" => $firstname,
|
||||
"lastname" => $lastname,
|
||||
"phone" => $phone,
|
||||
"news" =>0 ,
|
||||
"terms" => 1
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($status != 200) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
var_dump($response);
|
||||
|
||||
echo "<hr/>";
|
||||
var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/createuser";
|
||||
|
||||
$username = urlencode("ses66181+" . rand(1000, 9999) . "@gmail.com");
|
||||
|
||||
$username = "ses66181+" . rand(1000, 9999) . "@gmail.com";
|
||||
$phone = (rand(1, 2) > 1) ? "770222" . rand(2222, 9999) : '';
|
||||
|
||||
include 'sample_data.php'; // just for sample data
|
||||
$firstname = random_name(); //
|
||||
$lastname = random_name(); //
|
||||
|
||||
$data = array(
|
||||
"country" => 'NG',
|
||||
"username" => $username,
|
||||
"password" => "wrenchboard",
|
||||
"email" => $username,
|
||||
"firstname" => $firstname,
|
||||
"lastname" => $lastname,
|
||||
"phone" => $phone,
|
||||
"login" => 1
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ($status != 200) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
|
||||
//var_dump($response);
|
||||
|
||||
echo "<hr/>";
|
||||
var_dump($data);
|
||||
|
||||
echo "<hr/><pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,89 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
echo "TEST - EMAIL<br>";
|
||||
|
||||
if ($_POST) {
|
||||
$data["email"] = $_POST['email'];
|
||||
$data['action'] = 9999099; // test EMAIL
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>My first styled page</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d }
|
||||
ul.navbar {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
width: 9em }
|
||||
h1 {
|
||||
font-family: Helvetica, Geneva, Arial,
|
||||
SunSans-Regular, sans-serif }
|
||||
ul.navbar li {
|
||||
background: white;
|
||||
margin: 0.5em 0;
|
||||
padding: 0.3em;
|
||||
border-right: 1em solid black }
|
||||
ul.navbar a {
|
||||
text-decoration: none }
|
||||
a:link {
|
||||
color: blue }
|
||||
a:visited {
|
||||
color: purple }
|
||||
address {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
border-top: thin dotted }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Site navigation menu -->
|
||||
<ul class="navbar">
|
||||
<li><a href="#">Home page</a>
|
||||
</ul>
|
||||
|
||||
<!-- Main content -->
|
||||
<h1>Email Test Page</h1>
|
||||
|
||||
<p>Welcome to my test page!
|
||||
<form action="#" method="POST">
|
||||
<div>
|
||||
<input type="text" name="email" value="ameye@fluxtra.net">
|
||||
<input type="submit" name="submit" value="Submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<!-- Sign and date the page, it's only polite! -->
|
||||
<address>Made 55 March 2017<br>
|
||||
by myself.</address>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/dashdata";
|
||||
|
||||
/*
|
||||
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
|
||||
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
|
||||
*/
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/loadprofile";
|
||||
|
||||
/*
|
||||
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
|
||||
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
|
||||
*/
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?
|
||||
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
$email = 'ses66181+1@gmail.com';
|
||||
$data['email'] = 'ses66181@gmail.com';
|
||||
|
||||
$data['action'] = 9090919;
|
||||
|
||||
$out = array();
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
print_r($out);
|
||||
var_dump($ret);
|
||||
//phpinfo();
|
||||
?>
|
||||
@@ -1,68 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/message";
|
||||
|
||||
/*
|
||||
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
|
||||
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
|
||||
|
||||
*/
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,104 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
echo "TEST - SEND OFFER<br>";
|
||||
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
|
||||
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
|
||||
|
||||
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
|
||||
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
|
||||
|
||||
if ($_POST) {
|
||||
$data["email"] = $_POST['email'];
|
||||
$data['action'] = WRENCHBOARD_JOB_OFFER_INDVI; // test EMAIL
|
||||
$data["job_id"]=35;
|
||||
// $data["email"]="ameye@chiefsoft.com";
|
||||
$data["job_description"]= "Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail";
|
||||
$data["member_id"] = 1;
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
}
|
||||
|
||||
$data['email'] = "ameye+".rand(100,999)."@chiefsoft.com";
|
||||
$data['email'] = "ses66181+".rand(1,9)."@gmail.com";
|
||||
$data['ses66181+2@gmail.com'] = "ses66181+2@gmail.com";
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Offer Test Page</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d }
|
||||
ul.navbar {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
width: 9em }
|
||||
h1 {
|
||||
font-family: Helvetica, Geneva, Arial,
|
||||
SunSans-Regular, sans-serif }
|
||||
ul.navbar li {
|
||||
background: white;
|
||||
margin: 0.5em 0;
|
||||
padding: 0.3em;
|
||||
border-right: 1em solid black }
|
||||
ul.navbar a {
|
||||
text-decoration: none }
|
||||
a:link {
|
||||
color: blue }
|
||||
a:visited {
|
||||
color: purple }
|
||||
address {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
border-top: thin dotted }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Site navigation menu -->
|
||||
<ul class="navbar">
|
||||
<li><a href="#">Home page</a>
|
||||
</ul>
|
||||
|
||||
<!-- Main content -->
|
||||
<h1>Offer Test Page</h1>
|
||||
|
||||
<p>Welcome to my test page!
|
||||
<form action="#" method="POST">
|
||||
<div>
|
||||
<input type="text" name="email" value="<?echo $data["email"]?>" style="width: 300px;">
|
||||
<input type="submit" name="submit" value="Submit">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<!-- Sign and date the page, it's only polite! -->
|
||||
<address>Made 5 March 2017<br>
|
||||
by myself.</address>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/offerslist";
|
||||
|
||||
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
|
||||
$username = "ses66181+1@gmail.com";
|
||||
|
||||
|
||||
|
||||
$data = array(
|
||||
"member_id" => 1,
|
||||
"sessionid" => "ABCDEFGHIJKLMNOP",
|
||||
"limit" => 10,
|
||||
"page" => "1"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,38 +0,0 @@
|
||||
<?php
|
||||
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
echo "TEST - SKILL<br>";
|
||||
define('WRENCHBOARD_ACCOUNT_SAVESKILL', 11038);
|
||||
|
||||
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
|
||||
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
|
||||
|
||||
|
||||
$data["member_id"] = 1;
|
||||
$data["skill_id"] = 1;
|
||||
$data['category_id'] = 1;
|
||||
$data['action'] = WRENCHBOARD_ACCOUNT_SAVESKILL;
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
|
||||
$data["skill_id"] = 2;
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
|
||||
$data["skill_id"] = 3;
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
|
||||
@@ -1,60 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/startjoblist";
|
||||
|
||||
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
|
||||
$username = "ses66181+1@gmail.com";
|
||||
|
||||
|
||||
|
||||
$data = array(
|
||||
"limit" => 10,
|
||||
"page" => "1"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,32 +0,0 @@
|
||||
<pre>
|
||||
<?php
|
||||
//#define WRENCHBOARD_USER_ADNEWCC 11054
|
||||
|
||||
include('../backend.php');
|
||||
$hostname = $wrenchboard->cfgReadChar("database.host");
|
||||
$username = $wrenchboard->cfgReadChar("database.user");
|
||||
$password = $wrenchboard->cfgReadChar("database.pass");
|
||||
$database = $wrenchboard->cfgReadChar("database.name");
|
||||
$dbconn = pg_connect("host=${hostname} dbname=${database} user=${username} password=${password}");
|
||||
|
||||
$q = "SELECT * FROM members WHERE stripe_customer_id IS NULL ORDER BY id LIMIT 1";
|
||||
$r = pg_query($q);
|
||||
$f = pg_fetch_assoc($r);
|
||||
|
||||
$in=array(
|
||||
"action" => 90005, /* WRENCHBOARD_STRIPE_CHARGE_NEW */
|
||||
"ccnum" => "4242424242424242",
|
||||
"ccexpm" => "12",
|
||||
"ccexpy" => "26",
|
||||
"cccvc" => "123",
|
||||
"amount" => "100",
|
||||
"customer_id" => $f["id"],
|
||||
"email" => $f["email"],
|
||||
"description" => "This is a test charge for new stripe account"
|
||||
);
|
||||
$out=array();
|
||||
$ret = $wrenchboard->wrenchboard_api($in, $out);
|
||||
var_dump($ret);
|
||||
var_dump($out);
|
||||
|
||||
pg_close($dbconn);
|
||||
@@ -1,61 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/userlogin";
|
||||
|
||||
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
|
||||
$username = "ses66181+1@gmail.com";
|
||||
|
||||
|
||||
|
||||
$data = array(
|
||||
"username" => $username,
|
||||
"password" => "may12002",
|
||||
"sessionid" => "DUMMYSESSION"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
//echo "<hr/>";
|
||||
//var_dump($data);
|
||||
|
||||
//echo "<hr/><pre>";
|
||||
echo "<pre>";
|
||||
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
|
||||
echo "</pre>";
|
||||
|
||||
//echo "</pre><hr/>";
|
||||
|
||||
//echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
//echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/userlogin";
|
||||
|
||||
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
|
||||
|
||||
// NOTE - THIS TEST RANDOMLY PICK ACCOUNTS - Some will be invalid
|
||||
|
||||
|
||||
$data = array(
|
||||
"username" => $username,
|
||||
"password" => "medtransgoBAD",
|
||||
"sessionid" => "DUMMYSESSION"
|
||||
);
|
||||
|
||||
$content = json_encode($data);
|
||||
|
||||
$curl = curl_init($url);
|
||||
curl_setopt($curl, CURLOPT_HEADER, false);
|
||||
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
curl_setopt($curl, CURLOPT_HTTPHEADER,
|
||||
array("Content-type" => "application/json"));
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
|
||||
|
||||
$json_response = curl_exec($curl);
|
||||
|
||||
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
|
||||
|
||||
if ( $status != 200 ) {
|
||||
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
|
||||
}
|
||||
|
||||
curl_close($curl);
|
||||
|
||||
$response = json_decode($json_response, true);
|
||||
|
||||
echo "<b>RESPONSE</b><br>";
|
||||
var_dump($response);
|
||||
echo "<hr/><b>INPUT</b><br>";
|
||||
var_dump($data);
|
||||
echo "<hr/>";
|
||||
|
||||
echo "<hr/>";
|
||||
|
||||
// saving the session in a file for other call use
|
||||
$myfile = fopen("fl/sample_session.txt", "w") ;
|
||||
$txt = $response['sessionid']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
$txt = $response['member_id']."\n";
|
||||
fwrite($myfile, $txt);
|
||||
fclose($myfile);
|
||||
|
||||
|
||||
echo highlight_string(file_get_contents(__FILE__));
|
||||
?>
|
||||
@@ -1,101 +0,0 @@
|
||||
<?
|
||||
include('def.php');
|
||||
|
||||
$USER = $_SERVER['SCRIPT_FILENAME'];
|
||||
$USER = str_replace('/home', '', $USER);
|
||||
$USER = strtok($USER, '/');
|
||||
//echo $USER;
|
||||
// Load API class
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
|
||||
echo "TEST - SEND SMS<br>";
|
||||
|
||||
|
||||
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
|
||||
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
|
||||
|
||||
if ($_POST) {
|
||||
$data["phone"] = $_POST['phone'];
|
||||
$data['action'] = 9090909; // test EMAIL
|
||||
$data["job_id"]=35;
|
||||
// $data["phone"]="ameye@chiefsoft.com";
|
||||
$data["job_description"]= "Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail";
|
||||
$data["member_id"] = 1;
|
||||
|
||||
|
||||
$ret = $wrenchboard->wrenchboard_api($data, $out);
|
||||
var_dump($out);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
|
||||
<html>
|
||||
<head>
|
||||
<title>Offer Test Page</title>
|
||||
|
||||
<style type="text/css">
|
||||
body {
|
||||
padding-left: 11em;
|
||||
font-family: Georgia, "Times New Roman",
|
||||
Times, serif;
|
||||
color: purple;
|
||||
background-color: #d8da3d }
|
||||
ul.navbar {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
position: absolute;
|
||||
top: 2em;
|
||||
left: 1em;
|
||||
width: 9em }
|
||||
h1 {
|
||||
font-family: Helvetica, Geneva, Arial,
|
||||
SunSans-Regular, sans-serif }
|
||||
ul.navbar li {
|
||||
background: white;
|
||||
margin: 0.5em 0;
|
||||
padding: 0.3em;
|
||||
border-right: 1em solid black }
|
||||
ul.navbar a {
|
||||
text-decoration: none }
|
||||
a:link {
|
||||
color: blue }
|
||||
a:visited {
|
||||
color: purple }
|
||||
address {
|
||||
margin-top: 1em;
|
||||
padding-top: 1em;
|
||||
border-top: thin dotted }
|
||||
</style>
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<!-- Site navigation menu -->
|
||||
<ul class="navbar">
|
||||
<li><a href="#">Home page</a>
|
||||
</ul>
|
||||
|
||||
<!-- Main content -->
|
||||
<h1>Offer Test Page</h1>
|
||||
|
||||
<p>Welcome to my test page!
|
||||
<form action="#" method="POST">
|
||||
<div>
|
||||
<input type="text" name="phone" value="<?echo $data["phone"]?>" style="width: 300px;">
|
||||
<input type="submit" name="submit" value="Send">
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<p>
|
||||
<!-- Sign and date the page, it's only polite! -->
|
||||
<address>Made 5 March 2017<br>
|
||||
by myself.</address>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -92,7 +92,7 @@ define('PHP_API_OK', 0);
|
||||
define('PHP_LOGIN_OK', 100);
|
||||
define('PHP_CREATED_OK', 10);
|
||||
define('PHP_API_BAD_PARAM', -1);
|
||||
define('SESSION_TIMEOUT_LOGOUT',144000);
|
||||
define('SESSION_TIMEOUT_LOGOUT',900000);
|
||||
|
||||
define('SUPPORT_PHONE','+234 (818)-3866434');
|
||||
|
||||
@@ -105,6 +105,8 @@ define('OFFER_EXPIRE',444);
|
||||
|
||||
define('OFFER_SENDTOME',777);
|
||||
|
||||
define('WEBSITE_LOGIN', 1100);
|
||||
|
||||
|
||||
define('JOB_INTEREST_ACCEPT',100);
|
||||
define('JOB_INTEREST_REJECT',200);
|
||||
@@ -155,6 +157,8 @@ define('WRENCHBOARD_RESEND_PENDING_LINK', 11019);
|
||||
define('WRENCHBOARD_ACCOUNT_CREATEACC', 11020);
|
||||
define('WRENCHBOARD_ACCOUNT_LOGIN', 11025);
|
||||
define('WRENCHBOARD_FACEBOOK_LOGIN', 11026);
|
||||
define('WRENCHBOARD_GOOGLE_LOGIN', 11027);
|
||||
define('WRENCHBOARD_APPLE_LOGIN', 11031);
|
||||
define('WRENCHBOARD_SEND_CONTACTUS', 11030);
|
||||
define('WRENCHBOARD_ACCOUNT_SENDREFER',11032);
|
||||
define('WRENCHBOARD_ACCOUNT_REFERLINK',11033);
|
||||
@@ -172,6 +176,9 @@ define('WRENCHBOARD_SAVE_GALLERY', 11042);
|
||||
define('WRENCHBOARD_USER_ADNEWCC', 11054);
|
||||
define('WRENCHBOARD_USER_USESAVEDCC', 11056);
|
||||
|
||||
define('WRENCHBOARD_USER_SETTINGS', 11058);
|
||||
|
||||
|
||||
define('WRENCHBOARD_USER_DELETEACC', 11990);
|
||||
define('WRENCHBOARD_ACCOUNT_END', 11999);
|
||||
//**************************************************************
|
||||
@@ -273,6 +280,10 @@ define('PAY_MODE_BONUS', 9);
|
||||
define('APPROVED_BALANCE', 5);
|
||||
define('DISAPROVE_BALANCE', 3);
|
||||
|
||||
// define('WRENCHBOARD_COUPON_CREATE', 85010);
|
||||
// define('WRENCHBOARD_COUPON_ACTIVATE',85015);
|
||||
define('WRENCHBOARD_COUPON_REDEEM', 85020);
|
||||
|
||||
|
||||
define('WRENCHBOARD_USER_SENDMONEY', 11051);
|
||||
|
||||
|
||||
@@ -6,7 +6,8 @@ class Bko extends CI_Controller {
|
||||
|
||||
public function index() {
|
||||
$data["username"] = "";
|
||||
$this->load->view('bko/view_bko_login', $data);
|
||||
//$this->load->view('bko/view_bko_login', $data);
|
||||
echo '';
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Coupons extends Users_Controller {
|
||||
|
||||
function __construct() {
|
||||
parent::__construct();
|
||||
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
|
||||
redirect(home);
|
||||
}
|
||||
}
|
||||
|
||||
public function index(){
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
$this->load->model('coupon_model');
|
||||
$activeCouponResult = $this->coupon_model->loadMemberActiveCoupons($_SESSION['member_id'] ,$fliters=[]);
|
||||
$_SESSION['coupon'] = $activeCouponResult->num_rows();
|
||||
$data['coupon_table_row'] = $activeCouponResult->result();
|
||||
|
||||
$redeemCouponResult = $this->coupon_model->loadMemberRedeemCoupons($_SESSION['member_id'] ,$fliters=[]);
|
||||
$data['coupon_redeem_row'] = $redeemCouponResult->result();
|
||||
|
||||
|
||||
|
||||
$data['page_title'] ="Coupons";
|
||||
$this->renderSecurePage('users/view_coupon', $data);
|
||||
}
|
||||
|
||||
public function redeem(){
|
||||
|
||||
$what = $this->input->get('what');
|
||||
$value = $this->input->get('value');
|
||||
|
||||
if ($what !='' && $value!=''){
|
||||
$data = $this->getSessionArray();
|
||||
$in=[];
|
||||
|
||||
$in['code_id'] = $what;
|
||||
$in['code'] = $value; // just maing sure
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$in['action'] = WRENCHBOARD_COUPON_REDEEM;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
if ( $res == 0 ){
|
||||
echo 'Completed';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'Redeem fail';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -11,6 +11,11 @@ class Dash extends Users_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function help(){
|
||||
$data = $this->getSessionArray();
|
||||
$data['page_title'] ="Help";
|
||||
$this->renderSecurePage('users/view_help', $data);
|
||||
}
|
||||
public function index() {
|
||||
|
||||
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
|
||||
@@ -25,6 +30,12 @@ class Dash extends Users_Controller {
|
||||
redirect(home);
|
||||
} else {
|
||||
// load the Dash model now
|
||||
|
||||
$this->load->model('coupon_model');
|
||||
$activeCouponResult = $this->coupon_model->loadMemberActiveCoupons($_SESSION['member_id'] ,$fliters=[]);
|
||||
$_SESSION['coupon'] = $activeCouponResult->num_rows();
|
||||
|
||||
// print_r($_SESSION);
|
||||
$this->load->model('dash_model');
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
|
||||
@@ -68,7 +79,7 @@ class Dash extends Users_Controller {
|
||||
//======================= move it
|
||||
/* Table Slider Data */
|
||||
|
||||
$jbx = "''/proj/thisjob''";
|
||||
/* $jbx = "''/proj/thisjob''";
|
||||
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br><b>Timeline:</b>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
|
||||
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,"
|
||||
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
|
||||
@@ -88,7 +99,7 @@ class Dash extends Users_Controller {
|
||||
|
||||
$data['job_table'] = $this->table->generate($query);
|
||||
$data['job_table_result'] = $query->result(); // used in new impl.
|
||||
|
||||
*/
|
||||
$x = $this->dashTaskMessage();
|
||||
$data['job_message_table'] = $x['job_message_table'];
|
||||
$data['job_message_table_result'] = $x['job_message_table_result'];
|
||||
@@ -102,7 +113,7 @@ class Dash extends Users_Controller {
|
||||
$data['job_table_result'] = $acp['job_table_result'];
|
||||
|
||||
$ya = array();
|
||||
$ya = $this->dash_title();
|
||||
$ya = $this->dash_title( 4 );
|
||||
$data["dash_title"] = $ya["dash_title"];
|
||||
$data["offer_dash"] = $ya["offer_dash"];
|
||||
$data["offer_dash_result"] = $ya["offer_dash_result"];
|
||||
@@ -118,33 +129,7 @@ class Dash extends Users_Controller {
|
||||
}
|
||||
|
||||
|
||||
private function activeProjects(){
|
||||
|
||||
|
||||
$jbx = "''/proj/thisjob''";
|
||||
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br><b>Timeline:</b>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
|
||||
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,'\/proj\/thisjob' AS qpath, mc.id AS offer_id,"
|
||||
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
|
||||
. " WHEN mc.status = 1 AND mc.delivery_date > now() THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
|
||||
. " WHEN mc.status = 1 AND mc.delivery_date <now() THEN '<span class=\"label label-flat border-danger text-danger-600\">PastDue</span>' "
|
||||
. " ELSE '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"View\">' END) AS manage "
|
||||
. " FROM members_jobs_contract mc LEFT JOIN members m ON m.id=mc.client_id "
|
||||
. " WHERE mc.member_id = " . $_SESSION['member_id'] . " AND mc.status IN (1,2,4) AND mc.delivery_date > now() "
|
||||
. " OR mc.client_id =" . $_SESSION['member_id'] . " AND mc.status IN (1,2,4) AND mc.delivery_date > now() LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$this->table->set_heading(array('data' => 'Job', 'style' => 'width:180px'), 'Title/Description', array('data' => '', 'style' => 'width:100px; cellpadding:0px;'));
|
||||
|
||||
$data['job_table'] = $this->table->generate($query);
|
||||
$data['job_table_result'] = $query->result(); // used in new impl.
|
||||
|
||||
return $data;
|
||||
|
||||
}
|
||||
private function dashTaskMessage() {
|
||||
$data = array();
|
||||
$jbx = "''/proj/thisjob''";
|
||||
@@ -166,7 +151,7 @@ class Dash extends Users_Controller {
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function dash_title() {
|
||||
private function dash_title($listLimit) {
|
||||
|
||||
$offer_found = false;
|
||||
|
||||
@@ -181,14 +166,12 @@ class Dash extends Users_Controller {
|
||||
. "'<input type=submit onclick=\"return post_nav_find_action($jbx,'''||jo.offer_code||''')\" name=\"manage\" class=\"btn btn-primary btn-xs\" value=\"View\">' AS View ,jo.offer_code AS offer_code "
|
||||
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
|
||||
. "WHERE jo.expire > now() AND jo.status = 1 "
|
||||
. "AND jo.client_id = " . $_SESSION['member_id'] . " LIMIT 4";
|
||||
. "AND jo.client_id = " . $_SESSION['member_id'] . " LIMIT $listLimit";
|
||||
$query = $this->db->query($mysql);
|
||||
$num = $query->num_rows();
|
||||
$data["dash_title"] = "Pending Offer(s)";
|
||||
if ($num > 0) {
|
||||
|
||||
|
||||
|
||||
// array('data' => 'Added', 'style' => 'width:80px')
|
||||
|
||||
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:80px'), 'Title', array('data' => '', 'style' => 'width:80px'));
|
||||
@@ -201,14 +184,14 @@ class Dash extends Users_Controller {
|
||||
|
||||
|
||||
if ($offer_found == false) {
|
||||
$data["dash_title"] = "<a href='/jobs/pendingoffer'>My Pending Offer(s)</a>";
|
||||
$data["dash_title"] = "<a href='/jobs/pendingoffer'>Offer(s)</a>";
|
||||
$jbx = "''/jobs/viewmyjob''";
|
||||
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date AS pdate,j.title, (CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,'\/jobs\/viewmyjob' AS qpath,"
|
||||
. 'CASE WHEN jo.status = 1 AND jo.public_view =0 THEN \'Pending\' WHEN jo.status = 1 AND jo.public_view >0 THEN \'Active\' ELSE \'Other\' END AS status,'
|
||||
. "'<input type=submit onclick=\"return post_nav_find_action($jbx,'''||jo.offer_code||''')\" name=\"manage\" class=\"btn btn-primary btn-xs\" value=\"View\">' AS View,jo.offer_code AS offer_code "
|
||||
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
|
||||
. "WHERE jo.expire > now() AND jo.status = 1 "
|
||||
. "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT 4";
|
||||
. "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT $listLimit";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$num = $query->num_rows();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user