Compare commits
200 Commits
v0.0.1
...
d776643f7e
| Author | SHA1 | Date | |
|---|---|---|---|
| d776643f7e | |||
| 9e8ec9c37e | |||
| 2bb996baff | |||
| 877dc5ba40 | |||
| 8c2c0e56a1 | |||
| c6bd157dcf | |||
| da914bfd93 | |||
| 6bc06fef8b | |||
| 35acf363aa | |||
| 84f3325c46 | |||
| 99794baa11 | |||
| 24baeb5449 | |||
| ab34dd6b82 | |||
| ebe13ef30b | |||
| 07c3425046 | |||
| 268e1b6a54 | |||
| a9380d73e9 | |||
| 9ea25c81c4 | |||
| 019e650090 | |||
| 320cbb11ee | |||
| 6949150647 | |||
| 8f1507548e | |||
| a5e5bafb40 | |||
| b3f7f13d6b | |||
| 97770ffe95 | |||
| e9e1a5fe71 | |||
| a4ba2da5ed | |||
| de6288fc3a | |||
| 5e5f643d9f | |||
| cd8afaf1b1 | |||
| 30f19d771d | |||
| 1c5b0a24c7 | |||
| b866d2a1be | |||
| 3b5eac3d52 | |||
| b6f4adf046 | |||
| 39ec57c10c | |||
| c14ab2a76b | |||
| edd7712ea7 | |||
| fe17055c90 | |||
| 1957c7f1d9 | |||
| 0a9898a69d | |||
| 186ee393a2 | |||
| ee04eaa22c | |||
| 58b12ee874 | |||
| 28cca364a8 | |||
| 2dfbb4ea88 | |||
| 95b7128d91 | |||
| aa0a9789fa | |||
| ecbd702ec5 | |||
| 40a92d844a | |||
| e6f8ba1d0d | |||
| c414318ca8 | |||
| 64b74940b8 | |||
| 699c789714 | |||
| 876c4e29e2 | |||
| 460c4ac9f7 | |||
| 68bbfe9514 | |||
| 4a2f4b8c70 | |||
| 0de7c858a3 | |||
| f5ea90faa0 | |||
| 3b77436210 | |||
| f2c56962a7 | |||
| 766f034ac4 | |||
| 966c611e0e | |||
| a7a4234f79 | |||
| d2442a256e | |||
| 31bdb511bb | |||
| a542184759 | |||
| f97a7c54ab | |||
| 886379b0f7 | |||
| a1eac4a91f | |||
| 95bc611309 | |||
| f6288105fb | |||
| 5692d9f3b2 | |||
| 984df3184f | |||
| 8cb2a9d918 | |||
| 88dd88241d | |||
| e0edf1932d | |||
| ebcb7aef1e | |||
| 432028c088 | |||
| 7d2373a080 | |||
| 2e61b070ba | |||
| a4aee540a6 | |||
| 51812950e3 | |||
| 577995cf03 | |||
| 6596089608 | |||
| 5f5abd0b3e | |||
| 55c06162ef | |||
| 23c4762347 | |||
| 7e220e3b05 | |||
| bc90fb9bb2 | |||
| 62c4444217 | |||
| a0cf3feecc | |||
| aea5fd9f6b | |||
| 50b480d963 | |||
| 59f0e75842 | |||
| 769e1bc7b1 | |||
| 99d7b89ebd | |||
| 9163c8ad84 | |||
| c87494b40e | |||
| fb2034ab97 | |||
| 266b9ddad8 | |||
| a9b09dc416 | |||
| de37aea2c4 | |||
| 92d89d90a3 | |||
| 31d98bddfb | |||
| e25017a25f | |||
| 2e63218e82 | |||
| 928d064fbe | |||
| f62840a450 | |||
| 7865c34b7d | |||
| 4aa313402a | |||
| e22dc706dc | |||
| 0ba0794197 | |||
| b67f736f04 | |||
| 79bb8ed05d | |||
| db39cea49b | |||
| 41fe987f5d | |||
| f391716de4 | |||
| 7f0aff735f | |||
| f08abbe9f6 | |||
| 74f3b1d282 | |||
| 346073b544 | |||
| 81f0c4c233 | |||
| 626f381c1b | |||
| 76024459a9 | |||
| aea41d6ac5 | |||
| 92af9cdd81 | |||
| b9de6b4a98 | |||
| b0747071e9 | |||
| f64576f3e8 | |||
| 9009ec13fb | |||
| dc77c56b43 | |||
| a3bd756566 | |||
| c54974811c | |||
| 3ca0ce7600 | |||
| d323cc274b | |||
| 49e0c1191f | |||
| 862d129d00 | |||
| 615f09399d | |||
| 0c400e3918 | |||
| f2e9e1550e | |||
| 18c2b8668c | |||
| 3c31423bb1 | |||
| e27259dca9 | |||
| b949c910ea | |||
| 944ec49640 | |||
| ae98daa2ec | |||
| 902e0031d4 | |||
| 34406d81fa | |||
| 7e7080f23c | |||
| 10917727a8 | |||
| 4d4c75aa48 | |||
| cf8c2131bd | |||
| dff9b496cf | |||
| 961b003078 | |||
| 44e2295bb7 | |||
| cf2e761c5a | |||
| c2d4a49eb2 | |||
| 1b025a1563 | |||
| 83a246ee6e | |||
| 65e7601bda | |||
| ee4b81e348 | |||
| d88c823b9f | |||
| 7d7f5c00dc | |||
| 31ae9aa725 | |||
| e7f26e9a39 | |||
| 999520c31f | |||
| 285a4c2cfa | |||
| 45193b66b8 | |||
| 8a9df7b1df | |||
| b992d1f9b4 | |||
| 2261ab9d72 | |||
| 7447f7d96e | |||
| 0cc56dd4df | |||
| dabec5c244 | |||
| efc87db1ca | |||
| ad56540080 | |||
| 6d8cdc01ee | |||
| 6c40d4f22e | |||
| ef45fd4b6b | |||
| 76983004a6 | |||
| f3c2c37326 | |||
| 54296bf7d6 | |||
| e122fb93fc | |||
| cff0929205 | |||
| 8b8eaf88f9 | |||
| 46ed530ec1 | |||
| 2b38b02530 | |||
| 90ee3dd46f | |||
| f1e5d7eec7 | |||
| 0cd1f321f9 | |||
| 6956c7f409 | |||
| a456043ced | |||
| 1edcd3ea58 | |||
| 80d5044534 | |||
| f8b262ae54 | |||
| 6cce6a0a45 | |||
| e276b6cb7b | |||
| a43c48cd99 |
@@ -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:boron
|
||||
|
||||
# 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,27 +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 `MONGO_URL` and `RABBITMQ_URL`. Full list in the wiki.
|
||||
* `docker run -p <BINDING> -e PORT=<app_port> -e POSTGRE_URL=<postgre_url> -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
|
||||
|
||||
## 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' -i -t flutterwave-transfer-micro
|
||||
|
||||
# Test
|
||||
`npm test`
|
||||
|
||||
|
||||
---
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const properties = require('../package.json')
|
||||
const distance = require('../service/distance');
|
||||
|
||||
var controllers = {
|
||||
about: function(req, res) {
|
||||
var aboutInfo = {
|
||||
name: properties.name,
|
||||
version: properties.version
|
||||
}
|
||||
res.json(aboutInfo);
|
||||
},
|
||||
getDistance: function(req, res) {
|
||||
distance.find(req, res, function(err, dist) {
|
||||
if (err)
|
||||
res.send(err);
|
||||
res.json(dist);
|
||||
});
|
||||
},
|
||||
};
|
||||
|
||||
module.exports = controllers;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const controller = require('./controller');
|
||||
|
||||
module.exports = function(app) {
|
||||
app.route('/about')
|
||||
.get(controller.about);
|
||||
app.route('/distance/:zipcode1/:zipcode2')
|
||||
.get(controller.getDistance);
|
||||
};
|
||||
@@ -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`
|
||||
*/
|
||||
-2943
File diff suppressed because it is too large
Load Diff
@@ -1,40 +0,0 @@
|
||||
{
|
||||
"name": "flutterwave-transfer-micro",
|
||||
"version": "0.0.1",
|
||||
"description": "A microservice to handle flitterware payment services",
|
||||
"main": "server.js",
|
||||
"scripts": {
|
||||
"generate-docs": "jsdoc ./api/*.js ./api/**/*.js ./service/*.js ./services/**/*.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": {
|
||||
"pg": "8.7.1",
|
||||
"express": "^4.17.1",
|
||||
"request": "^2.88.2",
|
||||
"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,10 +0,0 @@
|
||||
const express = require('express')
|
||||
const logger = require('./app/logger');
|
||||
const app = express();
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
const routes = require('./api/routes');
|
||||
routes(app);
|
||||
app.listen(port, function() {
|
||||
logger.info('***** Server started on port: ' + port + ' *****');
|
||||
});
|
||||
@@ -1,36 +0,0 @@
|
||||
const request = require('request');
|
||||
const db = require('../app/db')
|
||||
const logger = require('../app/logger');
|
||||
|
||||
const apiKey = process.env.ZIPCODE_API_KEY || "x4hw36qerDOdewjz5HIx4IR7XO5wsWVb7jFZTJ9jvCYYIHNhvK4aIpMExKb5gEoW";
|
||||
const zipCodeURL = 'https://www.zipcodeapi.com/rest/';
|
||||
|
||||
var distance = {
|
||||
find: function(req, res, next) {
|
||||
var url = zipCodeURL + apiKey
|
||||
+ '/distance.json/' + req.params.zipcode1 + '/'
|
||||
+ req.params.zipcode2 + '/mile';
|
||||
logger.info(url);
|
||||
process.env["NODE_TLS_REJECT_UNAUTHORIZED"] = 0;
|
||||
request(url,
|
||||
function (error, response, body) {
|
||||
if (!error && response.statusCode == 200) {
|
||||
response = JSON.parse(body);
|
||||
res.send(response);
|
||||
} else {
|
||||
logger.info(error);
|
||||
res.send({distance: -1});
|
||||
}
|
||||
});
|
||||
// Sample DB call
|
||||
db.query('SELECT NOW()', (err, res) => {
|
||||
if (err) {
|
||||
throw err;
|
||||
}
|
||||
logger.info('time:', res.rows[0])
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
module.exports = distance;
|
||||
|
||||
@@ -16,17 +16,16 @@ img {height: auto;}
|
||||
.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;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -50,12 +49,12 @@ img {height: auto;}
|
||||
<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>
|
||||
@@ -131,13 +130,12 @@ For all support, contact us at <a href="https://{{server_name}}/contact">https:
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<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.
|
||||
|
||||
® {{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>
|
||||
@@ -150,7 +148,7 @@ You received this email because you subscribe to {{site_name}}. If you get this
|
||||
</a>
|
||||
</td>
|
||||
<td width="37" style="text-align: center; padding: 0 10px 0 10px;">
|
||||
<a href="https://twitter.com/wrenchboard">
|
||||
<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>
|
||||
@@ -171,7 +169,8 @@ You received this email because you subscribe to {{site_name}}. If you get this
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ Subject: {{site_name}} - Log in Confirmation
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<title>{{site_name}} - Log in Confirmation</title>
|
||||
<style type="text/css">
|
||||
body {margin: 0; padding: 0; min-width: 100%!important;}
|
||||
@@ -16,17 +16,16 @@ img {height: auto;}
|
||||
.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;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -43,18 +42,18 @@ img {height: auto;}
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<td height="30" border="0" style="text-align:center;">
|
||||
<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>
|
||||
@@ -69,18 +68,7 @@ img {height: auto;}
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
Hello {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
@@ -90,29 +78,22 @@ Hello {{firstname}},
|
||||
<![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> from <b>{{loc}}</b>.
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<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>
|
||||
@@ -124,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>
|
||||
@@ -149,19 +130,19 @@ Recently added task(s)
|
||||
{{pin}}
|
||||
{{/...}}
|
||||
{{/inv_items}}
|
||||
</table
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</td></tr>
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<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.
|
||||
® {{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>
|
||||
@@ -195,8 +176,5 @@ You received this email because you subscribe to {{site_name}}. If you get this
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -97,7 +97,7 @@ body[yahoo] .unsubscribe {display: block; margin-top: 20px; padding: 10px 50px;
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td>
|
||||
Dear {{firstname}},
|
||||
Dear {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -4,33 +4,28 @@ Subject: {{site_name}} - Pending Signup - Verify {{email}}
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<meta charset="utf-8">
|
||||
<title>{{site_name}} - Pending Signup - Verify {{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: 10px 10px 10px 10px;}
|
||||
.innerpadding {padding: 30px 30px 30px 30px;}
|
||||
.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;}
|
||||
.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;}
|
||||
.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;}
|
||||
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -47,18 +42,18 @@ img {height: auto;}
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 100%;">
|
||||
<table align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<td height="30" border="0" style="text-align:center;">
|
||||
<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>
|
||||
@@ -73,17 +68,23 @@ img {height: auto;}
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
<table width="100%" align="left" cellpadding="0" cellspacing="0" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
Dear {{firstname}},
|
||||
<![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 class="bodycopy">
|
||||
Welcome to {{site_name}}!. In order to complete your registration , use the number below to complete registration.
|
||||
Welcome to {{site_name}}!. In order to complete your registration , use the number below to complete registration.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -103,25 +104,17 @@ Welcome to {{site_name}}!. In order to complete your registration , use the numb
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="bodycopy">
|
||||
<b>Enter the number to continue :</b> <h2>{{signup_random}}</h2>
|
||||
<br>
|
||||
For app sign up ,enter the number <b>{{signup_random}}</b> to continue.
|
||||
<hr size="1">
|
||||
For Web sign up , <a href="https://{{server_name}}/vemail?vlnk={{verify_link}}">Click here to verify account</a> to continue.
|
||||
<hr size="1">
|
||||
Or
|
||||
<table class="buttonwrapper" bgcolor="#e05443" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="button" height="45" style="align-center;">
|
||||
<a href="https://{{server_name}}/vemail?vlnk={{verify_link}}">Click to Verify Account</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bodycopy" style="color:#ff0033">
|
||||
The Link will expire by {{expire}}
|
||||
Note : The link will expire by:{{expire}}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -134,15 +127,10 @@ The Link will expire by {{expire}}
|
||||
</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">
|
||||
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 coordinated skills training section. Empower yourself and be around those that work with latest to update your knowledge.
|
||||
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>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -153,12 +141,12 @@ With <a href="http://{{server_name}}">{{site_name}}</a>, you can enjoy free coor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<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.
|
||||
® {{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://www.wrenchboard.com/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -192,8 +180,6 @@ You received this email because you subscribe to {{site_name}}. If you get this
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
@@ -16,17 +16,16 @@ img {height: auto;}
|
||||
.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;}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -44,22 +43,22 @@ img {height: auto;}
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<tr>
|
||||
<td height="50">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<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>
|
||||
<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>
|
||||
@@ -74,7 +73,7 @@ img {height: auto;}
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="h2">
|
||||
<td class="bodycopy">
|
||||
Hello {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
@@ -107,8 +106,8 @@ img {height: auto;}
|
||||
<td style="padding: 20px 0 0 0;">
|
||||
<table class="buttonwrapper" bgcolor="#e05443" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="button" height="45">
|
||||
<a href="https://{{server_name}}/complereset?passlink={{pass_link}}">Click to Reset Password</a>
|
||||
<td class="button" height="45" style="text-align:center;" >
|
||||
<a href="{{server_name}}/complereset?passlink={{pass_link}}">Click to Reset Password</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -128,7 +127,7 @@ img {height: auto;}
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
If you did not initiate this password reset or have any further support question, please contact us at https://{{server_name}}/contact
|
||||
If you did not initiate this password reset or have any further support question, please contact us at {{server_name}}/contact
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -139,47 +138,47 @@ img {height: auto;}
|
||||
</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}} 2018<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="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 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="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>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -6,42 +6,26 @@ Subject: Welcome to {{site_name}}
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>Welcome to {{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: 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: 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 (min-device-width: 601px) {
|
||||
.content {width: 600px !important;}
|
||||
.col425 {width: 425px!important;}
|
||||
.col380 {width: 380px!important;}
|
||||
}*/
|
||||
|
||||
</style>
|
||||
<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 yahoo bgcolor="#f6f8f1">
|
||||
<body bgcolor="#f6f8f1">
|
||||
<table width="100%" bgcolor="#f6f8f1" border="0" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td>
|
||||
@@ -53,42 +37,20 @@ Subject: Welcome to {{site_name}}
|
||||
<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">
|
||||
<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]-->
|
||||
<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>
|
||||
<tr>
|
||||
@@ -160,11 +122,11 @@ With <a href="http://{{server_name}}">{{site_name}}</a>, you can enjoy free coor
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<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 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>
|
||||
@@ -199,8 +161,5 @@ With <a href="http://{{server_name}}">{{site_name}}</a>, you can enjoy free coor
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,192 +1,162 @@
|
||||
Subject: WrenchBoard Signup Report
|
||||
|
||||
Subject: WrenchBoard Signup 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 Signup 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;}
|
||||
.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;}
|
||||
.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>
|
||||
<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><h4>Please <a href ="https://{{server_name}}/bko">login</a> into BackOffice from authorized system to support the user.</h4>
|
||||
<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">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class="innerpadding bodycopy">
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
|
||||
<table align="left" border="1" 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<h5>People that completed the sign-up</h5></td>
|
||||
<td class="bodycopy"><h1>{{today_signup}}</h1></td>
|
||||
</tr>
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">Pending Sign-up<h5>People still in the process not completed</h5></td>
|
||||
<td class="bodycopy"><h2>{{today_pending_signup}}</h2></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2"><h2>{{report_date}}</h2></td></tr>
|
||||
<tr>
|
||||
<td class="left" style="width:250px">Active Jobs<h5>People that completed the sign-up</h5></td>
|
||||
<td class="bodycopy"><h1>{{today_signup}}</h1></td>
|
||||
</tr>
|
||||
<tr class="trColor">
|
||||
<td class="left" style="width:250px">Expired Jobs<h5>People still in the process not completed</h5></td>
|
||||
<td class="bodycopy"><h2>{{today_pending_signup}}</h2></td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
|
||||
<h4>Please <a href ="https://{{server_name}}/bko">login</a> into BackOffice from authorized system to support the user.</h4>
|
||||
|
||||
<!--[if (gte mso 9)|(IE)]>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<![endif]-->
|
||||
</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>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr><td>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
<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 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>
|
||||
@@ -11,20 +11,17 @@ 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: 30px 30px 30px 30px;}
|
||||
.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;}
|
||||
|
||||
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -52,8 +49,8 @@ img {height: auto;}
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -75,13 +72,6 @@ img {height: auto;}
|
||||
|
||||
<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>
|
||||
@@ -94,8 +84,10 @@ img {height: auto;}
|
||||
<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>
|
||||
<td class="left" style="width:100px">Signup Pending</td>
|
||||
<td class="bodycopy">{{added}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
<tr >
|
||||
<td class="left" style="width:100px">Firstname</td>
|
||||
@@ -125,15 +117,14 @@ img {height: auto;}
|
||||
<td class="bodycopy">{{verify_link}}</td>
|
||||
</tr>
|
||||
|
||||
<tr >
|
||||
<td class="left" colspan="2">Please <a href ="https://{{server_name}}/bko">login</a> into BackOffice from authorized system to support the user.</td>
|
||||
</tr>
|
||||
|
||||
|
||||
</table>
|
||||
</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>
|
||||
@@ -144,7 +135,7 @@ img {height: auto;}
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
<img class="fix" src="https://dashboard.wrenchboard.com/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -156,11 +147,11 @@ img {height: auto;}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<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 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>
|
||||
@@ -196,6 +187,5 @@ You received this email because you are a support user for {{site_name}}. If you
|
||||
</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>
|
||||
@@ -16,16 +16,12 @@ img {height: auto;}
|
||||
.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;}
|
||||
|
||||
|
||||
</style>
|
||||
</style>
|
||||
</head>
|
||||
|
||||
@@ -47,18 +43,18 @@ img {height: auto;}
|
||||
<tr>
|
||||
<td>
|
||||
<![endif]-->
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 425px;">
|
||||
<table class="col425" align="left" border="0" cellpadding="0" cellspacing="0" style="width: 100%; max-width: 600px;">
|
||||
<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>
|
||||
</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>
|
||||
@@ -77,7 +73,7 @@ img {height: auto;}
|
||||
<td class="innerpadding borderbottom">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr>
|
||||
<td class="h2">
|
||||
<td class="bodycopy">
|
||||
Dear {{firstname}},
|
||||
</td>
|
||||
</tr>
|
||||
@@ -95,7 +91,7 @@ You have posted a job offer at <a href="https://{{server_name}}">{{site_name}}</
|
||||
<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="" />
|
||||
<img class="fix" src="https://dashboard.wrenchboard.com/assets/images/article1.png" width="115" height="115" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -186,7 +182,7 @@ Offer Expire
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="innerpadding borderbottom">
|
||||
<img class="fix" src="https://{{server_name}}/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
<img class="fix" src="https://dashboard.wrenchboard.com/assets/images/wrenchboard_email_banner.jpg" width="100%" border="0" alt="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -202,12 +198,12 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer" bgcolor="#44525f">
|
||||
<td class="footer">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0" >
|
||||
<tr>
|
||||
<td align="center" class="footercopy">
|
||||
® {{site_name}} 2018<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.
|
||||
® {{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}}/contact" class="unsubscribe"><font color="#ffffff">contact</font></a> us.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -242,6 +238,5 @@ Please contact us at https://{{server_name}}/contact if you have any question a
|
||||
</table>
|
||||
|
||||
<!--analytics-->
|
||||
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -46,13 +46,16 @@ Paypal:
|
||||
|
||||
stripe:
|
||||
{
|
||||
publishable_key = "pk_test_X7TylEk9BkZCarcj0FyKRYXc";
|
||||
secret_key = "sk_test_MA2ltfGlT70Nu7uWlmHowBRB";
|
||||
publishable_key = "pk_test_51JwvOXCMmfol61TL2IlTEWytKObMLrZTAxJRHdepqWggXm4ENMyrrnR5dxfd5cPeflvCUG1HsErQI43BjOAmUEh500N0FWOZoE";
|
||||
old_publishable_key ="pk_test_X7TylEk9BkZCarcj0FyKRYXc";
|
||||
secret_key = "sk_test_51JwvOXCMmfol61TLadZlDf2rxq6Q1IC50JITRixcbyig8T2zdqpO8HY2NEcwNHacRQKQpTf6JGh7haqUVEH0rccA00eFht1ewi";
|
||||
old_secret_key = "sk_test_MA2ltfGlT70Nu7uWlmHowBRB";
|
||||
};
|
||||
|
||||
database:
|
||||
{
|
||||
host = "127.0.0.1";
|
||||
#- using docker 10.23 host = "127.0.0.1";
|
||||
host = "10.10.10.23";
|
||||
name = "wrenchboard";
|
||||
user = "wrenchboard";
|
||||
pass = "wrenchboard";
|
||||
@@ -105,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/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/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 =
|
||||
@@ -242,6 +242,8 @@ shared_tool/common_tool.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/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
|
||||
|
||||
@@ -50,6 +50,8 @@ shared_tool/common_tool.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/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
|
||||
|
||||
@@ -10,11 +10,11 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
## Platform. ##
|
||||
## --------- ##
|
||||
|
||||
hostname = localhost.localdomain
|
||||
hostname = WrenchBoardDev
|
||||
uname -m = x86_64
|
||||
uname -r = 4.18.0-193.el8.x86_64
|
||||
uname -r = 4.18.0-358.el8.x86_64
|
||||
uname -s = Linux
|
||||
uname -v = #1 SMP Fri May 8 10:59:10 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-10)
|
||||
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-10) (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-10)
|
||||
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-10) (GCC)
|
||||
configure:4171: $? = 0
|
||||
configure:4160: g++ -V >&5
|
||||
g++: error: unrecognized command line option '-V'
|
||||
@@ -534,7 +534,7 @@ generated by GNU Autoconf 2.69. Invocation command line was
|
||||
CONFIG_COMMANDS =
|
||||
$ ./config.status
|
||||
|
||||
on localhost.localdomain
|
||||
on WrenchBoardDev
|
||||
|
||||
config.status:944: creating config.h
|
||||
config.status:1034: config.h is unchanged
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -117,7 +117,7 @@ int SMTP2( const char * _server, const char * _from, char * _to, char * _body, c
|
||||
}
|
||||
|
||||
// Google
|
||||
snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -domain %s -name '%s' +cc +bcc -v -starttls -port 587 -auth-plain -user %s -pass %s -sub '%s' -content-type 'text/html' -mime-type 'text/html' -M '%s'",
|
||||
snprintf( name, BUF_SIZE, EMAIL_PREFIX"/../src/modules/mailsend -smtp %s -f %s -t %s -domain %s -name '%s' +cc +bcc -v -starttls -port 587 -auth-plain -user %s -pass %s -sub '%s' -content-type 'multipart/mixed' -mime-type 'text/html' -disposition inline -M '%s'",
|
||||
_server, _from, _to, _domain, _name, _user, _pass, subject, body != NULL ? body : _body );
|
||||
/*
|
||||
// Virtualmail
|
||||
|
||||
@@ -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_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);
|
||||
|
||||
@@ -9,5 +9,12 @@ long WrenchRefundoffer( CVars in, CVars &out );
|
||||
long WrenchContractPayment( CVars in, CVars &out );
|
||||
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 WrenchMemberCouponPayment( CVars in, CVars &out );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ enum { PARTNER_STRIPE };
|
||||
|
||||
#define WRB_CRONJOB_SIGNUP_ALERT 773
|
||||
#define WRB_CRONJOB_PASTDUE_ALERT 774
|
||||
|
||||
#define WRB_CRONJOB_OFFER_REFUND_ALERT 775
|
||||
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_BKO_START 10000
|
||||
@@ -144,6 +144,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
|
||||
|
||||
@@ -167,6 +169,13 @@ enum { PARTNER_STRIPE };
|
||||
#define WRENCHBOARD_USER_SENDMONEY 11051
|
||||
#define WRENCHBOARD_USER_SENDJOBINT 11052
|
||||
|
||||
#define WRENCHBOARD_USER_ADNEWCC 11054
|
||||
#define WRENCHBOARD_USER_USESAVEDCC 11056
|
||||
#define WRENCHBOARD_USER_SETTINGS 11058
|
||||
|
||||
#define WRENCHBOARD_ACCOUNT_WALLETS 11060
|
||||
|
||||
#define WRENCHBOARD_USER_DELETEACC 11990
|
||||
#define WRENCHBOARD_ACCOUNT_END 11999
|
||||
//**************************************************************
|
||||
#define WRENCHBOARD_GROUP_START 12000
|
||||
@@ -241,6 +250,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_END 85999
|
||||
//**************************************************************
|
||||
|
||||
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_ONE 90004
|
||||
#define WRENCHBOARD_STRIPE_CHARGE_NEW 90005
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Generated automatically by config.status ()
|
||||
# Libtool was configured on host localhost.localdomain:
|
||||
# Libtool was configured on host WrenchBoardDev:
|
||||
# NOTE: Changes made to this file will be lost: look at ltmain.sh.
|
||||
|
||||
# Provide generalized library-building support services.
|
||||
@@ -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=""
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include <curl/curl.h>
|
||||
#include "smoney.h"
|
||||
#include "account_mngt.h"
|
||||
#include "creditcards.h"
|
||||
#include "payments.h"
|
||||
|
||||
#include "jobs.h"
|
||||
|
||||
@@ -109,6 +111,7 @@ created timestamp without time zone DEFAULT now()
|
||||
long WrenchBoardMobileSendMoney(CVars in, CVars &out);
|
||||
long WrenchBoardMobileSendJobInterest(CVars in, CVars &out);
|
||||
long WrenchReturnPendingJobList(CVars in, CVars &out);
|
||||
long WrenchBoardMobileSendUserWallet(CVars in, CVars &out);
|
||||
|
||||
long test() {
|
||||
FILE* oldFile = Output2FILE::Stream();
|
||||
@@ -130,8 +133,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:
|
||||
@@ -143,7 +148,7 @@ test();
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_RESET_PASSWORD:
|
||||
|
||||
return WrenchResetMemberPass(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_MOBILE_MESSAGE:
|
||||
@@ -172,7 +177,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;
|
||||
@@ -209,6 +214,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;
|
||||
@@ -294,18 +307,62 @@ test();
|
||||
return WrenchLoadDashData(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_GETBANKLIST:
|
||||
return WrenchReturnMemberBankAccount(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_SENDMONEY:
|
||||
return WrenchBoardMobileSendMoney(in, out);
|
||||
case WRENCHBOARD_USER_GETBANKLIST:
|
||||
return WrenchReturnMemberBankAccount(in, out);
|
||||
break;
|
||||
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_SENDJOBINT:
|
||||
return WrenchBoardMobileSendJobInterest(in, out);
|
||||
break;
|
||||
case WRENCHBOARD_USER_SENDMONEY:
|
||||
return WrenchBoardMobileSendMoney(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_SENDJOBINT:
|
||||
return WrenchBoardMobileSendJobInterest(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_ADNEWCC:
|
||||
return WrenchNewCardPayment(in, out);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_USESAVEDCC:
|
||||
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);
|
||||
break;
|
||||
|
||||
case WRENCHBOARD_USER_DELETEACC:
|
||||
REQ_LONG(in, "member_id", 1, -1);
|
||||
REQ_STRING(in, "reason", 2, 149, "(.*)");
|
||||
CVars xx;
|
||||
xx["member_id"] = in["member_id"]; xx["member_id"].set_valid(true);
|
||||
xx["reason"] = in["reason"]; xx["reason"].set_valid(true);
|
||||
out["delete_id"] = insert_db_record(DBS_VALID, "members_delete", "members_delete_id_seq", xx);
|
||||
ret = PHP_API_OK;
|
||||
/*
|
||||
DO THE DELETE HERE NOW
|
||||
*/
|
||||
break;
|
||||
|
||||
}
|
||||
logfmt(logINFO, "/account_calls()");
|
||||
@@ -314,6 +371,56 @@ test();
|
||||
|
||||
#define PHP_API_TRANSFER_COMPLETE 200
|
||||
|
||||
long WrenchBoardMobileSendUserWallet(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "WrenchBoardMobileSendUserWallet()");
|
||||
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 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);
|
||||
|
||||
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), "amount_%05d", i);
|
||||
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;
|
||||
out["status"] = "OK";
|
||||
} catch (bad_parameter) {
|
||||
logfmt(logINFO, "ERROR CALL long WrenchBoardMobileSendUserWallet(CVars in, CVars &out)");
|
||||
}
|
||||
logfmt(logINFO, "/WrenchBoardMobileSendUserWallet()");
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
long WrenchBoardMobileSendJobInterest(CVars in, CVars &out) {
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
@@ -363,6 +470,7 @@ long WrenchBoardMobileSendJobInterest(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
long WrenchBoardMobileSendMoney(CVars in, CVars &out){
|
||||
logfmt(logINFO, "long *************** WrenchBoardMobileSendMoney(CVars in, CVars out)");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
|
||||
try{
|
||||
@@ -377,7 +485,7 @@ long WrenchBoardMobileSendMoney(CVars in, CVars &out){
|
||||
sprintf(send_trxid, "T%04lu", r1);
|
||||
|
||||
logfmt(logINFO, "Recipient ID =====() %lu",in["bankid"].Long() );
|
||||
out["sendmoney_message"] ="Processing...";
|
||||
out["sendmoney_message"] ="Processing...";
|
||||
|
||||
|
||||
REQ_LONG(in, "bankid", 1, -1);
|
||||
@@ -655,6 +763,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) {
|
||||
@@ -672,6 +781,9 @@ long WrenchReturnStartJobList(CVars in, CVars &out) {
|
||||
snprintf(vname, sizeof (vname), "description_%05d", i);
|
||||
out[vname] = rec["description"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "expire_%05d", i);
|
||||
out[vname] = rec["expire"];
|
||||
|
||||
snprintf(vname, sizeof (vname), "id_%05d", i);
|
||||
out[vname] = rec["job_id"];
|
||||
}
|
||||
@@ -1146,6 +1258,13 @@ long LoginWrenchBoardAccount(CVars in, CVars &out) {
|
||||
|
||||
ret = load_db_record(out, "SELECT *,id AS member_id , to_char(last_login, 'Day Mon dd, yyyy HH:MI AM') AS last_login2 FROM members WHERE status=1 AND LOWER(username)=LOWER('%s') AND password= md5('%s')", in["username"].c_str(), in["password"].c_str());
|
||||
if (ret) {
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(out["member_id"].Long(),vw);
|
||||
|
||||
load_db_record( out, "SELECT amount AS balance FROM members_wallet WHERE member_id = %lu AND currency='%s' ", out["member_id"].Long(), vw["currency"].c_str());
|
||||
|
||||
|
||||
pgsql_exec("DELETE FROM members_session WHERE member_id=%ld ", out["member_id"].Long());
|
||||
// remove all existing session
|
||||
@@ -1174,6 +1293,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"] = "";
|
||||
@@ -1181,8 +1303,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);
|
||||
|
||||
@@ -1190,9 +1357,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;
|
||||
@@ -1206,8 +1373,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());
|
||||
}
|
||||
@@ -1227,7 +1396,7 @@ long LoginWrenchBoardFacebook(CVars in, CVars &out) {
|
||||
}
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/LoginWrenchBoardFacebook()");
|
||||
logfmt(logINFO, "/LoginWrenchBoardExternal()");
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "cfg.h"
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include "payments.h"
|
||||
#include "account.h"
|
||||
|
||||
|
||||
@@ -508,12 +508,26 @@ 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;
|
||||
x["member_id"].set_valid(true);
|
||||
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
|
||||
|
||||
// - 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());
|
||||
pgsql_query("UPDATE members_refer_friend SET status = 5 WHERE status = 1 AND email = '%s'", x["email"].c_str());
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
// 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"
|
||||
|
||||
/*
|
||||
#define WRENCHBOARD_COUPON_START 85000
|
||||
|
||||
#define WRENCHBOARD_COUPON_CREATE 85010
|
||||
#define WRENCHBOARD_COUPON_ACTIVATE 85015
|
||||
#define WRENCHBOARD_COUPON_REDEEM 85020
|
||||
|
||||
#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
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
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 ){
|
||||
/*
|
||||
wrenchboard=> select * from coupons_allocation WHERE member_id = 1 ORDER BY added DESC;
|
||||
id | code | amount | member_id | added | active | loc | status
|
||||
----+------------+--------+-----------+----------------------------+----------------------------+-----+--------
|
||||
7 | WE4BXKLMDP | 200000 | 1 | 2022-06-03 01:07:50.321491 | 2022-06-03 01:12:01.209814 | | 500
|
||||
6 | QPKM5NEACA | 200000 | 1 | 2022-06-03 01:07:48.053047 | 2022-06-03 01:12:59.395797 | | 500
|
||||
5 | RGSPQUDOVA | 200000 | 1 | 2022-06-03 01:04:01.632499 | 2022-06-03 01:14:43.54169 | | 500
|
||||
4 | TH9UGRZV0D | 200000 | 1 | 2022-05-31 19:58:09.980929 | | | 500
|
||||
3 | I2B5OCO8LP | 200000 | 1 | 2022-05-31 19:55:29.376655 | 2022-06-02 00:27:43.371677 | | 500
|
||||
2 | U1RBYNH9QV | 0 | 1 | 2022-05-31 19:52:30.010599 | 2022-06-02 00:26:36.12992 | | 500
|
||||
1 | 1M5IXDSGRK | 0 | 1 | 2022-05-31 19:16:00.499092 | 2022-06-02 00:24:38.080741 | | 500
|
||||
(7 rows)
|
||||
|
||||
wrenchboard=>
|
||||
wrenchboard=>
|
||||
wrenchboard=>
|
||||
wrenchboard=>
|
||||
*/
|
||||
return 0;
|
||||
}
|
||||
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;
|
||||
}
|
||||
@@ -22,14 +22,14 @@ long save_creditcard(CVars in, CVars &out) {
|
||||
try {
|
||||
CVars v;
|
||||
|
||||
REQ_LONG(in, "member_id", 1, -1); // Does not make any sence without member persitence
|
||||
REQ_LONG(in, "member_id", 1, -1); // Does not make any sence without member persitence
|
||||
REQ_STRING(in, "cardnumber", 12, 16, "(.*)"); //4111111111111111"
|
||||
REQ_STRING(in, "cvc", 3, 4, "(.*)"); //234"
|
||||
REQ_LONG(in, "paymenttype", 0, -1);
|
||||
REQ_STRING(in, "exp_month", 2, 2, "(.*)");
|
||||
REQ_STRING(in, "exp_year", 4, 4, "(.*)");
|
||||
|
||||
if ( load_db_record( v, "SELECT a.id AS member_id,a.firstname,a.lastname,'' AS street1,'' AS street2,a.city,'' AS postal,a.state,a.country FROM members a WHERE a.id=%lu", in["member_id"].Long()) > 0) {
|
||||
if ( load_db_record( v, "SELECT a.id AS member_id,a.firstname,a.lastname,'' AS street1,'' AS street2,a.city,zip_code AS postal,a.state,a.country FROM members a WHERE a.id=%lu", in["member_id"].Long()) > 0) {
|
||||
|
||||
logfmt(logDEBUG, "Loaded member %s %s", v["firstname"].c_str(), v["lastname"].c_str());
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ long alert_email(long mailtype, CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
switch (mailtype) {
|
||||
|
||||
case WRB_CRONJOB_SIGNUP_ALERT:
|
||||
@@ -57,10 +57,10 @@ long SendmarketMessage(CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
// form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
vars2form(in, form);
|
||||
|
||||
in["server_name"] = "https://www.wrenchboard.com";
|
||||
in["server_name"] = "https://dashboard.wrenchboard.com";
|
||||
|
||||
int c = 0;
|
||||
|
||||
@@ -144,7 +144,7 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
try {
|
||||
|
||||
@@ -157,7 +157,7 @@ long cron_email(long mailtype, CVars in, CVars &out) {
|
||||
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())) {
|
||||
|
||||
|
||||
in["server_name"] = "https://www.wrenchboard.com";
|
||||
in["server_name"] = "https://dashboard.wrenchboard.com";
|
||||
|
||||
int c = 0;
|
||||
|
||||
@@ -222,6 +222,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,11 +277,12 @@ 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", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
|
||||
try {
|
||||
|
||||
@@ -272,10 +319,17 @@ 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://www.wrenchboard.com";
|
||||
in["server_name"] = "https://dashboard.wrenchboard.com";
|
||||
|
||||
int c = 0;
|
||||
|
||||
@@ -303,7 +357,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>
|
||||
@@ -321,6 +375,7 @@ long account_email(long mailtype, CVars in, CVars &out) {
|
||||
break;
|
||||
|
||||
case ACCOUNT_PASSWORD_RESET:
|
||||
|
||||
REQ_LONG(in, "password_reset_id", 1, -1);
|
||||
if (load_db_record(x, "select p.*,m.firstname,m.lastname,m.email, "
|
||||
" TO_CHAR(expired :: TIMESTAMP, 'Day Mon dd, yyyy HH:MI AM') AS long_expired , "
|
||||
@@ -328,6 +383,7 @@ long account_email(long mailtype, CVars in, CVars &out) {
|
||||
" FROM password_reset p "
|
||||
" LEFT JOIN members m ON m.id =p.member_id WHERE p.id = %lu ", in["password_reset_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("server_name", server_name);
|
||||
form.Email("ACCOUNT/member_resetpass.mailfile");
|
||||
}
|
||||
break;
|
||||
@@ -379,7 +435,7 @@ long job_email(long mailtype, CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
switch (mailtype) {
|
||||
|
||||
case WRENCHBOARD_JOB_REPLY_QUESTION:
|
||||
@@ -417,7 +473,7 @@ long job_email(long mailtype, CVars in, CVars &out) {
|
||||
vars2form(y, form);
|
||||
// FOR CRON JOBS SET SERVER NAME
|
||||
form.LetStr("preview_count", in["preview_count"].c_str());
|
||||
form.LetStr("server_name", "www.wrenchboard.com");
|
||||
form.LetStr("server_name", "dashboard.wrenchboard.com");
|
||||
vars2form(x, form);
|
||||
form.LetStr("subject", "Completed Task Processing Past Due");
|
||||
form.LetStr("email", y["email"].c_str());
|
||||
@@ -431,7 +487,7 @@ long job_email(long mailtype, CVars in, CVars &out) {
|
||||
|
||||
if (load_db_record(x, "SELECT m.firstname,m.email,mj.title,c.* FROM members_jobs_contract c LEFT JOIN members m ON m.id=c.client_id LEFT JOIN members_jobs mj ON mj.id = c.job_id WHERE c.id=%lu AND c.due_remind IS NULL", in["contract_id"].Long())) {
|
||||
// FOR CRON JOBS SET SERVER NAME
|
||||
form.LetStr("server_name", "www.wrenchboard.com");
|
||||
form.LetStr("server_name", "dashboard.wrenchboard.com");
|
||||
vars2form(x, form);
|
||||
form.LetStr("subject", "Task Due Date Approaching");
|
||||
form.LetStr("email", x["email"].c_str());
|
||||
@@ -662,7 +718,7 @@ long sendmoney_email(long mailtype, CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
long sendmoney_id = REQ_LONG(in, "sendmoney_id", 1, -1);
|
||||
logfmt(logINFO, "sendmoney_email() sendmoney_id = %lu", sendmoney_id);
|
||||
@@ -723,7 +779,7 @@ long project_email(long mailtype, CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
|
||||
load_db_record(out, "SELECT ms.firstname AS member_firstaname,ms.email AS member_email, j.*,js.title,js.description,js.price AS amount FROM members_jobs_contract j LEFT JOIN members_jobs js ON js.id=j.job_id LEFT JOIN members ms ON ms.id=j.member_id WHERE j.id=%lu", contract_id);
|
||||
@@ -835,7 +891,7 @@ long test_email(CVars in, CVars &out) {
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
if (load_db_record(x, "select p.*,m.firstname,m.lastname,m.email from password_reset p LEFT JOIN members m ON m.id =p.member_id WHERE p.id = 8 ")) {
|
||||
vars2form(x, form);
|
||||
@@ -897,7 +953,7 @@ long SignupPendingAlertMailfile(CVars in) {
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("subject", "WrenchBoard Contact Us Alert");
|
||||
|
||||
if (load_db_record(x, "SELECT *,email as email2 FROM members_pending WHERE id = %lu ", in["pending_id"].Long())) {
|
||||
if (load_db_record(x, "SELECT *,email as email2,to_char(expire, 'Day Mon dd, yyyy HH:MI AM') AS expire,to_char(added, 'Day Mon dd, yyyy HH:MI AM') AS added FROM members_pending WHERE id = %lu ", in["pending_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", out["alertemail"].c_str());
|
||||
form.Email("ALERT/alert_signup.mailfile");
|
||||
@@ -971,16 +1027,16 @@ long AccountPendingMail(CVars in) //TESTED
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
form.LetStr("site_trade_name", "Connecting Experts with Clients");
|
||||
form.LetStr("site_trade_name", "Connecting Opportunities");
|
||||
|
||||
if (load_db_record(x, "SELECT * FROM members_pending WHERE id = %lu ", in["pending_id"].Long())) {
|
||||
if (load_db_record(x, "SELECT *,to_char(expire, 'Day Mon dd, yyyy HH:MI AM') AS expire FROM members_pending WHERE id = %lu ", in["pending_id"].Long())) {
|
||||
vars2form(x, form);
|
||||
form.LetStr("email", x["email"].c_str());
|
||||
if (x["signup_random"] != "" && x["signup_random"].Long() > 0 && in["mobile_email"].Long() == 100) {
|
||||
form.Email("ACCOUNT/member_pending_mobile.mailfile");
|
||||
|
||||
} else {
|
||||
form.Email("ACCOUNT/member_pending.mailfile");
|
||||
form.Email("ACCOUNT/member_pending_mobile.mailfile");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -988,8 +1044,6 @@ long AccountPendingMail(CVars in) //TESTED
|
||||
in["message"] = "Account Pending";
|
||||
in["title"].set_valid(true);
|
||||
in["message"].set_valid(true);
|
||||
//AlertActions(in);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1001,7 +1055,7 @@ long WelcomeAccountMail(CVars in) // TESTED
|
||||
C_CGI_Form form("", "");
|
||||
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
|
||||
if (load_db_record(x, "SELECT * FROM members WHERE id = %lu ", in["member_id"].Long())) {
|
||||
@@ -1020,16 +1074,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", 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());
|
||||
@@ -1040,7 +1108,7 @@ long JobAddedMail(CVars in) //TESTED
|
||||
vars2form(x, form2);
|
||||
out["alertemail"] = CfgReadChar("transnotif.contact");
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form2.LetStr("server_name", server_name);
|
||||
form2.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form2.LetStr("site_name", "WrenchBoard");
|
||||
in["title"] = "Job Added Alert";
|
||||
in["message"] = "Job Added Alert";
|
||||
@@ -1063,7 +1131,7 @@ long CreateWrenchBoardGroupMail(CVars in) {
|
||||
C_CGI_Form form("", "");
|
||||
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
|
||||
if (load_db_record(x, "select g.*,m.email,m.firstname,m.lastname from members_groups g LEFT JOIN members m ON m.id = g.member_id WHERE g.id = %lu ", in["group_id"].Long())) {
|
||||
@@ -1082,7 +1150,7 @@ long GroupCreateMemberMail(CVars in) {
|
||||
C_CGI_Form form("", "");
|
||||
|
||||
char * server_name = getenv("SERVER_NAME");
|
||||
form.LetStr("server_name", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site_name", "WrenchBoard");
|
||||
|
||||
if (load_db_record(x, "SELECT gm.*,m.*,e.email FROM group_members gm LEFT JOIN members_groups m ON m.id=gm.group_id LEFT JOIN members e ON e.id=gm.member_id WHERE gm.id = %lu", in["group_member_id"].Long())) {
|
||||
@@ -1117,7 +1185,7 @@ long EmailCustBalUpdt(CVars in) {
|
||||
CVars x;
|
||||
|
||||
vars2form(x, form);
|
||||
form.LetStr("site", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.Email("test.mailfile");
|
||||
return 0;
|
||||
}
|
||||
@@ -1209,7 +1277,7 @@ long StartPassResetEmail(CVars in) {
|
||||
vars2form(x, form);
|
||||
|
||||
|
||||
form.LetStr("site", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
/*
|
||||
CREATE TABLE lostpass (
|
||||
id serial NOT NULL,
|
||||
@@ -1245,7 +1313,7 @@ long CompletePassResetEmail(CVars in) {
|
||||
vars2form(x, form);
|
||||
|
||||
|
||||
form.LetStr("site", server_name);
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
|
||||
|
||||
|
||||
@@ -1296,7 +1364,7 @@ long CustomerAirSalePayment(CVars in) {
|
||||
form.LetStr("paymode", "Payment with card");
|
||||
}
|
||||
|
||||
|
||||
form.LetStr("server_name", "https://dashboard.wrenchboard.com");
|
||||
form.LetStr("site", server_name);
|
||||
form.LetStr("email", x["email2"].c_str());
|
||||
form.Email("topup_payment.mailfile"); //customer notification
|
||||
|
||||
@@ -171,14 +171,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 +207,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"] = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -699,7 +705,7 @@ long WrenchSendJobsOfferPublic(CVars in, CVars &out) {
|
||||
CVars x;
|
||||
CVars y;
|
||||
CVars z;
|
||||
|
||||
CVars u;
|
||||
|
||||
|
||||
// we need this job id
|
||||
@@ -710,6 +716,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 +730,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 +815,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 +830,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 +839,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 +851,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 +1093,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 +1118,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 +1131,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()");
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include "input.h"
|
||||
#include "wrenchboard_api.h"
|
||||
#include "payments.h"
|
||||
#include "creditcards.h"
|
||||
#include "common_tool.h"
|
||||
#include "email.h"
|
||||
#include "safestring.h"
|
||||
@@ -27,6 +28,272 @@ 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.
|
||||
*/
|
||||
long CheckWallet(long member_id,CVars in){
|
||||
logfmt(FLOG_MAX, "long CheckWallet()" );
|
||||
long wallet_id = 0;
|
||||
CVars y;
|
||||
if ( load_db_record( y, "SELECT * FROM members_wallet WHERE currency ='%s' AND member_id =%lu",in["currency"].c_str(),member_id ) > 0 )
|
||||
{
|
||||
wallet_id = y["id"].Long();
|
||||
}
|
||||
else{
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = member_id; x["member_id"].set_valid( true );
|
||||
x["currency"] = in["currency"]; x["currency"].set_valid( true );
|
||||
wallet_id = insert_db_record( DBS_VALID, "members_wallet", "members_wallet_id_seq", x );
|
||||
}
|
||||
return wallet_id;
|
||||
}
|
||||
|
||||
long UpdateMemberWallet(long member_id,long wallet_id,long amount, long payment_id){
|
||||
CVars y;
|
||||
if ( load_db_record( y, "SELECT * FROM members_wallet WHERE id = %lu AND member_id =%lu", wallet_id,member_id ) > 0 )
|
||||
{
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = member_id; x["member_id"].set_valid( true ); //
|
||||
x["payment_id"] = payment_id; x["payment_id"].set_valid( true ); //
|
||||
x["amount"] = amount; x["amount"].set_valid( true ); //
|
||||
x["balance"] = y["amount"]; x["balance"].set_valid( true ); //
|
||||
insert_db_record( DBS_VALID, "members_wallet_detail", "members_wallet_detail_id_seq", x );
|
||||
|
||||
|
||||
pgsql_exec("UPDATE members_wallet SET amount=amount + %lu,prev_amount=%lu WHERE member_id = %lu AND id=%lu",amount,y["amount"].Long(),member_id , wallet_id); // pay attention to who you pay here
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
long DeductMemberWallet(long member_id,long wallet_id,long amount, long payment_id){
|
||||
logfmt(FLOG_MAX, "DeductMemberWallet ************************" );
|
||||
logfmt(FLOG_MAX, "Review this design so as not to loose money ");
|
||||
logfmt(FLOG_MAX, "DeductMemberWallet ************************" );
|
||||
|
||||
CVars y;
|
||||
if ( load_db_record( y, "SELECT * FROM members_wallet WHERE id = %lu AND member_id =%lu", wallet_id,member_id ) > 0 )
|
||||
{
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = member_id; x["member_id"].set_valid( true ); //
|
||||
x["payment_id"] = payment_id; x["payment_id"].set_valid( true ); //
|
||||
x["amount"] = amount; x["amount"].set_valid( true ); //
|
||||
x["balance"] = y["amount"]; x["balance"].set_valid( true ); //
|
||||
insert_db_record( DBS_VALID, "members_wallet_detail", "members_wallet_detail_id_seq", x );
|
||||
pgsql_exec("UPDATE members_wallet SET amount=amount - %lu,prev_amount=%lu WHERE member_id = %lu AND id=%lu",amount,y["amount"].Long(),member_id , wallet_id); // pay attention to who you pay here
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
long WrenchNewCardPayment( CVars in, CVars &out )
|
||||
{
|
||||
long payment_return = 0; // just return 0 if not okay , payment_id is all okay
|
||||
logfmt(FLOG_MAX, "long WrenchNewCardPayment(CVars in, CVars &out)" );
|
||||
long member_id = REQ_LONG( in, "member_id", 1, -1 );
|
||||
long amount = REQ_LONG( in, "amount", 1, -1 );
|
||||
OPTIONAL(in, "WHAT_CHARGE_TYPE") REQ_STRING(in, "WHAT_CHARGE_TYPE", 3, 15, "(.*)");
|
||||
long card_id = 0;
|
||||
|
||||
if ( in["WHAT_CHARGE_TYPE"] == "USE_CARD_ID"){
|
||||
card_id = REQ_LONG( in, "card_id", 1, -1 );
|
||||
in["what_purhcase"] = "MEMBER_RETCARD_PAYM"; in["what_purhcase"].set_valid( true );
|
||||
}
|
||||
else
|
||||
{
|
||||
REQ_STRING(in, "cardnumber", 12, 16, "(.*)"); //4111111111111111"
|
||||
REQ_STRING(in, "cvc", 3, 4, "(.*)"); //234"
|
||||
REQ_LONG(in, "paymenttype", 0, -1);
|
||||
REQ_STRING(in, "exp_month", 2, 2, "(.*)");
|
||||
REQ_STRING(in, "exp_year", 4, 4, "(.*)");
|
||||
in["what_purhcase"] = "MEMBER_NEWCARD_PAYM"; in["what_purhcase"].set_valid( true );
|
||||
}
|
||||
|
||||
|
||||
const char * loc = getenv("REMOTE_ADDR");
|
||||
in["loc"] = loc; in["loc"].set_valid(true);
|
||||
|
||||
long payment_id =0;
|
||||
|
||||
// do we have a wallet for this action
|
||||
CVars vw;
|
||||
vw["currency"] = "USD"; // 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*/ }
|
||||
|
||||
// verify if allowed
|
||||
|
||||
// take in sessionid to verify if allaowed too
|
||||
|
||||
// Get the code and dir contruct
|
||||
long retTc = load_db_record( out, "SELECT * FROM payment_types WHERE type_code = '%s' ",in["what_purhcase"].c_str());
|
||||
if (retTc)
|
||||
{
|
||||
in["code"] = out["code"]; in["code"].set_valid( true );
|
||||
in["dir"] = out["dir"]; in["dir"].set_valid( true );
|
||||
}
|
||||
else { return -1; /* unable to get payment type*/ }
|
||||
|
||||
CVars x;
|
||||
x["member_id"] = member_id; x["member_id"].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"] = amount; x["amount"].set_valid( true );
|
||||
x["fee"] = "0"; x["fee"].set_valid( true );
|
||||
x["code"] = in["code"]; x["code"].set_valid( true );
|
||||
x["dir"] = in["dir"]; x["dir"].set_valid( true );
|
||||
x["flags"] = FLAG_INIT; x["flags"].set_valid( true ); // starting the pprocess
|
||||
x["currency"] = vw["currency"]; x["currency"].set_valid( true );
|
||||
|
||||
payment_id = insert_db_record( DBS_VALID, "members_payments", "members_payments_id_seq", x );
|
||||
// ALL STRIPE COMPATIBLE
|
||||
if ( card_id == 0 ){
|
||||
card_id = save_creditcard(in, out);
|
||||
}
|
||||
|
||||
|
||||
if (card_id && card_id> 0){
|
||||
pgsql_exec("UPDATE members_payments SET account_id = %lu WHERE id = %lu",card_id,payment_id );
|
||||
}
|
||||
else{
|
||||
return -1;
|
||||
}
|
||||
|
||||
CVars yx;
|
||||
yx["member_id"] = member_id; yx["member_id"].set_valid( true );
|
||||
yx["payment_id"] = payment_id; yx["payment_id"].set_valid( true );
|
||||
long stripe_payment = stripe_charge_member_paymentid(yx, out); // go for stripe now
|
||||
|
||||
if (stripe_payment==PHP_API_OK) {
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
//pgsql_exec("UPDATE members_wallet SET amount=amount + %lu,prev_amount=%lu WHERE member_id = %lu AND id=%lu",x["amount"].Long(),x["curr_balance"].Long(),x["member_id"].Long() , wallet_id); // pay attention to who you pay here
|
||||
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
UpdateMemberWallet( member_id, 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 );
|
||||
load_db_record( out, "SELECT * FROM members_payments WHERE id = %lu ", payment_id );
|
||||
payment_return = payment_id;
|
||||
} else {
|
||||
out["status"] = "Unable to create payment";
|
||||
}
|
||||
|
||||
logfmt(FLOG_MAX, "/long WrenchNewCardPayment(CVars in, CVars &out)" );
|
||||
return payment_return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
long WrenchCardRechargePayment( CVars in, CVars &out )
|
||||
{
|
||||
logfmt(FLOG_MAX, "long WrenchCardRechargePayment(CVars in, CVars &out)" );
|
||||
long member_id = REQ_LONG( in, "member_id", 1, -1 );
|
||||
long amount = REQ_LONG( in, "amount", 1, -1 );
|
||||
long card_id = REQ_LONG( in, "card_id", 1, -1 );
|
||||
in["WHAT_CHARGE_TYPE"] = "USE_CARD_ID"; in["WHAT_CHARGE_TYPE"].set_valid( true ); //
|
||||
return WrenchNewCardPayment( in, out );
|
||||
logfmt(FLOG_MAX, "/long WrenchCardRechargePayment(CVars in, CVars &out)" );
|
||||
}
|
||||
|
||||
long WrenchCanceContractPayment( CVars in, CVars &out )
|
||||
{
|
||||
@@ -95,7 +362,11 @@ long WrenchCanceContractPayment( CVars in, CVars &out )
|
||||
|
||||
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
/*
|
||||
// TEST FOR DUPLICATE
|
||||
@@ -133,9 +404,12 @@ long WrenchCanceContractPayment( CVars in, CVars &out )
|
||||
ret = PHP_CREATED_OK;
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long(),x["member_id"].Long() ); // pay attention to who you pay here
|
||||
//- Retired this method pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long(),x["member_id"].Long() ); // pay attention to who you pay here
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
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 );
|
||||
@@ -200,7 +474,11 @@ Foreign-key constraints:
|
||||
REQ_LONG( in, "dir", 1, -1 );
|
||||
REQ_LONG( in, "offer_id", 1, -1 );
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", in["member_id"].Long());
|
||||
|
||||
@@ -251,7 +529,8 @@ Foreign-key constraints:
|
||||
ret = PHP_CREATED_OK;
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
pgsql_exec("UPDATE members SET balance=balance - %lu WHERE id = %lu",in["amount"].Long() + in["fee"].Long(),in["member_id"].Long() );
|
||||
//pgsql_exec("UPDATE members SET balance=balance - %lu WHERE id = %lu",in["amount"].Long() + in["fee"].Long(),in["member_id"].Long() );
|
||||
DeductMemberWallet(in["member_id"].Long(), wallet_id,in["amount"].Long(), payment_id);
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
x["flags"] = FLAG_OK; x["flags"].set_valid( true );
|
||||
@@ -280,7 +559,12 @@ long WrenchRefundoffer( CVars in, CVars &out )
|
||||
REQ_LONG( in, "dir", 1, -1 );
|
||||
long offer_id = REQ_LONG( in, "offer_id", 1, -1 );
|
||||
long payment_id = REQ_LONG( in, "payment_id", 1, -1 );
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", in["member_id"].Long());
|
||||
|
||||
if (retDb)
|
||||
@@ -312,9 +596,10 @@ long WrenchRefundoffer( CVars in, CVars &out )
|
||||
ret = PHP_CREATED_OK;
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long() + x["fee"].Long(),in["member_id"].Long() );
|
||||
// pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long() + x["fee"].Long(),in["member_id"].Long() );
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
UpdateMemberWallet( member_id, 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 );
|
||||
@@ -393,8 +678,11 @@ long WrenchContractPayment( CVars in, CVars &out )
|
||||
return PHP_API_BAD_PARAM; }
|
||||
|
||||
|
||||
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
/*
|
||||
// TEST FOR DUPLICATE
|
||||
@@ -432,9 +720,12 @@ long WrenchContractPayment( CVars in, CVars &out )
|
||||
ret = PHP_CREATED_OK;
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long(),x["member_id"].Long() ); // pay attention to who you pay here
|
||||
//pgsql_exec("UPDATE members SET balance=balance + %lu WHERE id = %lu",x["amount"].Long(),x["member_id"].Long() ); // pay attention to who you pay here
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
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 );
|
||||
@@ -496,6 +787,11 @@ Foreign-key constraints:
|
||||
REQ_LONG( in, "dir", 1, -1 );
|
||||
REQ_LONG( in, "sendmoney_id", 1, -1 );
|
||||
|
||||
CVars vw;
|
||||
vw["currency"] = "NAIRA"; // this might become a variable based on the country
|
||||
vw["currency"].set_valid( true );
|
||||
long wallet_id = CheckWallet(in["member_id"].Long(),vw);
|
||||
|
||||
|
||||
long retDb = load_db_record( out, "SELECT balance AS curr_balance FROM members WHERE id = %lu", in["member_id"].Long());
|
||||
|
||||
@@ -553,27 +849,22 @@ Foreign-key constraints:
|
||||
out["status"] = "Failure to create";
|
||||
return PHP_API_BAD_PARAM;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
out["payment_id"] = payment_id; out["payment_id"].set_valid( true );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (payment_id) {
|
||||
ret = PHP_CREATED_OK;
|
||||
|
||||
x["flags"] = FLAG_START; x["flags"].set_valid( true ); // done not completed yet
|
||||
// now generate the confirmation
|
||||
pgsql_exec("UPDATE members SET balance=balance - %lu WHERE id = %lu",in["amount"].Long() + in["fee"].Long(),in["member_id"].Long() );
|
||||
//pgsql_exec("UPDATE members SET balance=balance - %lu WHERE id = %lu",in["amount"].Long() + in["fee"].Long(),in["member_id"].Long() );
|
||||
DeductMemberWallet(in["member_id"].Long(), wallet_id,in["amount"].Long() + in["fee"].Long(), payment_id);
|
||||
char confirmation[15] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation)); // this stamp the offer code directly in that call
|
||||
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 );
|
||||
load_db_record( out, "SELECT * FROM members_payments WHERE id = %lu ", payment_id );
|
||||
ret = PHP_CREATED_OK;
|
||||
|
||||
load_db_record( out, "SELECT * FROM members_payments WHERE id = %lu ", payment_id );
|
||||
} else {
|
||||
out["status"] = "Uanble to create payment";
|
||||
}
|
||||
|
||||
@@ -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,6 +21,7 @@ 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 sitecrons_calls(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "sitecrons_calls()");
|
||||
@@ -46,6 +48,9 @@ long sitecrons_calls(CVars in, CVars &out) {
|
||||
return PastDueWarings(in, out);
|
||||
break;
|
||||
|
||||
case WRB_CRONJOB_OFFER_REFUND_ALERT:
|
||||
return PastDueOffersRefund(in, out);
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -71,20 +76,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 "\
|
||||
"WHERE member_id=%lu AND id = %lu ", rec["member_id"].Long(),rec["contract_id"].Long());
|
||||
|
||||
}
|
||||
}
|
||||
logfmt(logINFO, "/PastDueWarings()");
|
||||
|
||||
@@ -10,6 +10,9 @@
|
||||
#include "pgsql.h"
|
||||
#include "pgsql_wrapper.h"
|
||||
#include <curl/curl.h>
|
||||
#include "email.h"
|
||||
#include "payments.h"
|
||||
#include "common_tool.h"
|
||||
|
||||
long smoney_calls(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "smoney_calls()");
|
||||
@@ -130,11 +133,17 @@ long member_sendmoney_fee(CVars in, CVars &out) {
|
||||
return out["processing_fee"].Long();
|
||||
}
|
||||
|
||||
long WRB_doServiceTransferComplete(CVars in, CVars &out);
|
||||
long do_transferPayment(CVars in) ;
|
||||
long INTW_configure(CVars in, CVars &out) ;
|
||||
|
||||
long member_sendmoney(CVars in, CVars &out) {
|
||||
//plog->SetFileName( PREFIX"/logs/member_sendmoney.log" );
|
||||
//return INTW_doServiceTransfer(in, out);
|
||||
return -1L;
|
||||
//return 0;
|
||||
long ret = WRB_doServiceTransferComplete(in, out);
|
||||
|
||||
logfmt(logINFO, "************************ E****** member_sendmoney(CVars in, CVars out) =%lu",ret);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
long member_addrecipient(CVars in, CVars &out) {
|
||||
@@ -233,3 +242,367 @@ Referenced by:
|
||||
|
||||
|
||||
|
||||
long INTW_configure(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "long INTW_configure(CVars in, CVars &out)");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
// Configure Interswitch SSL
|
||||
|
||||
|
||||
out["interswitch_ver"] = CfgReadLong("interswitch.version");
|
||||
out["interswitch_sep"] = CfgReadChar("interswitch.soap_endpoint");
|
||||
out["interswitch_tid"] = CfgReadChar("interswitch.terminal_id");
|
||||
out["interswitch_code"] = CfgReadChar("interswitch.entity_code");
|
||||
out["interswitch_mkey"] = CfgReadChar("interswitch.master_key");
|
||||
out["interswitch_pin"] = CfgReadChar("interswitch.pin");
|
||||
out["interswitch_pfix"] = CfgReadChar("interswitch.prefix");
|
||||
out["interswitch_keyf"] = CfgReadChar("interswitch.keyfile");
|
||||
out["interswitch_pass"] = CfgReadChar("interswitch.password");
|
||||
out["interswitch_cert"] = CfgReadChar("interswitch.cacert");
|
||||
|
||||
ret = PHP_API_OK;
|
||||
|
||||
} catch (bad_parameter) {
|
||||
|
||||
out["status"] = "Bad parameter";
|
||||
|
||||
} catch (...) {
|
||||
|
||||
out["status"] = "Unhandled exception in INTW_configure";
|
||||
|
||||
}
|
||||
logfmt(logINFO, "/long INTW_configure(CVars in, CVars &out)");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
long do_transferPayment(CVars in) {
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
CVars out;
|
||||
|
||||
long customer_id = REQ_LONG(in, "customer_id", 1, -1);
|
||||
long transfer_id = REQ_LONG(in, "transfer_id", 1, -1);
|
||||
long payMode = REQ_LONG(in, "mode", 1, -1);
|
||||
long payment_id = 0;
|
||||
long amount = 0;
|
||||
long fee = 0;
|
||||
long total = 0;
|
||||
|
||||
|
||||
/*
|
||||
CREATE TABLE sendmoney_payment
|
||||
(
|
||||
id serial NOT NULL,
|
||||
transfer_mode integer NOT NULL,
|
||||
customer_id INT REFERENCES customer(id),
|
||||
transfer_id INT REFERENCES interswitch_money_transfer(id),
|
||||
amount integer DEFAULT 0,
|
||||
fee integer DEFAULT 0,
|
||||
total integer DEFAULT 0,
|
||||
current_balance integer DEFAULT 0,
|
||||
new_balance integer DEFAULT 0,
|
||||
status integer DEFAULT 1,
|
||||
added TIMESTAMP DEFAULT NOW()
|
||||
);
|
||||
*/
|
||||
|
||||
ret = load_db_record(out, "SELECT balance FROM members WHERE id = %lu AND status = 1", customer_id);
|
||||
if (ret < 1L) {
|
||||
throw new bad_parameter(out, "senderid");
|
||||
}
|
||||
|
||||
if (payMode == PAYMENT_MODE) {
|
||||
amount = REQ_LONG(in, "amount", 1, -1);
|
||||
fee = REQ_LONG(in, "fee", 1, -1);
|
||||
total = amount + fee; // make sure you are cent here
|
||||
|
||||
if (out["balance"].Long() >= total) // do you have this money
|
||||
{
|
||||
CVars x;
|
||||
x["transfer_mode"] = PAYMENT_MODE;
|
||||
x["transfer_mode"].set_valid(true);
|
||||
x["member_id"] = customer_id;
|
||||
x["member_id"].set_valid(true);
|
||||
x["transfer_id"] = transfer_id;
|
||||
x["transfer_id"].set_valid(true);
|
||||
x["amount"] = amount;
|
||||
x["amount"].set_valid(true);
|
||||
x["fee"] = fee;
|
||||
x["fee"].set_valid(true);
|
||||
x["total"] = total;
|
||||
x["total"].set_valid(true);
|
||||
x["current_balance"] = out["balance"];
|
||||
x["current_balance"].set_valid(true);
|
||||
payment_id = 0;
|
||||
|
||||
out["payment_id"] = insert_db_record(DBS_VALID, "sendmoney_payment", "sendmoney_payment_id_seq", x);
|
||||
char confirmation[20] = "";
|
||||
Confirmation(payment_id, confirmation, sizeof (confirmation));
|
||||
|
||||
|
||||
|
||||
|
||||
ret = PHP_API_BAD_PARAM; // it is still a failure if we get here and did not take the money out of the balance
|
||||
|
||||
CVars y;
|
||||
y["member_id"] = x["member_id"];
|
||||
y["member_id"].set_valid(true);
|
||||
y["sendmoney_id"] = x["transfer_id"];
|
||||
y["sendmoney_id"].set_valid(true);
|
||||
y["code"] = "SMPAY";
|
||||
y["code"].set_valid(true);
|
||||
y["dir"] = DIR_TARGET;
|
||||
y["dir"].set_valid(true);
|
||||
//y["payment_id"] = out["payment_id"]; y["payment_id"].set_valid( true );
|
||||
|
||||
ret = WrenchSendMoneyPayment(y, out);
|
||||
|
||||
if (ret == PHP_CREATED_OK) {
|
||||
load_db_record(out, "SELECT balance AS new_balance FROM members WHERE id = %lu", customer_id);
|
||||
pgsql_exec("UPDATE sendmoney_payment SET new_balance=%lu WHERE id=%lu", out["new_balance"].Long(), out["payment_id"].Long());
|
||||
ret = PHP_API_OK;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (payMode == REFUND_MODE) {
|
||||
if (load_db_record(out, "SELECT * FROM sendmoney_payment WHERE transfer_id = %lu AND member_id = %lu", transfer_id, customer_id)) {
|
||||
logfmt(logINFO, "*****WE RE DO VERIFICATION and NO DUPLICATES)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
logfmt(logINFO, "**)");
|
||||
CVars out;
|
||||
/*REQ_STRING( in, "TransferCode", 3, 30, "(.*)" );
|
||||
REQ_STRING( in, "requestReference", 3, 30, "(.*)" );*/
|
||||
|
||||
//int vRet = INTW_querySendMoneyTransaction(in, out);
|
||||
ret = PHP_API_OK;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
//PAYMENT_MODE
|
||||
//REFUND_MODE
|
||||
|
||||
return ret;
|
||||
}
|
||||
//*****************************************************************************/
|
||||
|
||||
long WRB_doServiceTransferComplete(CVars in, CVars &out) {
|
||||
//plog->SetFileName( PREFIX"/logs/send_money.log" );
|
||||
|
||||
logfmt(logINFO, "long WRB_doServiceTransferComplete(CVars in, CVars &out)");
|
||||
long ret = PHP_API_BAD_PARAM;
|
||||
try {
|
||||
|
||||
out = in;
|
||||
// Initiate interswitch session
|
||||
CVars setup;
|
||||
INTW_configure(in, setup);
|
||||
|
||||
|
||||
in["action"].set_valid(false);
|
||||
REQ_STRING(in, "InitiatingEntityCode", 3, 3, "(.*)");
|
||||
REQ_LONG(in, "InitiatingAmount", 1, -1);
|
||||
REQ_LONG(in, "Fee", 1, -1);
|
||||
REQ_LONG(in, "InitiatingChannel", 1, -1);
|
||||
REQ_STRING(in, "InitiatingPaymentMethodCode", 2, 2, "(.*)");
|
||||
REQ_STRING(in, "InitiatingCurrencyCode", 3, 3, "(.*)");
|
||||
REQ_STRING(in, "TerminatingPaymentMethodCode", 2, 2, "(.*)");
|
||||
REQ_LONG(in, "TerminatingAmount", 1, -1);
|
||||
REQ_STRING(in, "TerminatingCurrencyCode", 3, 3, "(.*)");
|
||||
REQ_STRING(in, "TerminatingCountryCode", 2, 2, "(.*)");
|
||||
|
||||
//REQ_STRING( in, "TerminatingEntityCode", 1, 5, "(.*)" );
|
||||
//REQ_STRING( in, "TerminatingAccountNumber", 1, 50, "(.*)" );
|
||||
//REQ_STRING( in, "TerminatingAccountType", 2, 2, "(.*)" );
|
||||
|
||||
long senderid = REQ_LONG(in, "senderid", 1, -1);
|
||||
long recipientid = REQ_LONG(in, "recipientid", 1, -1);
|
||||
|
||||
in["InitiatingEntityCode"] = "MBA";
|
||||
in["InitiatingEntityCode"].set_valid(true);
|
||||
|
||||
|
||||
CVars sender; // Load sender
|
||||
ret = load_db_record(sender, "SELECT firstname,lastname,balance FROM members WHERE id = %lu AND status = 1", senderid);
|
||||
if (ret < 1L) {
|
||||
throw new bad_parameter(out, "senderid");
|
||||
}
|
||||
|
||||
long LongTotalCost = in["Fee"].Long() + in["TerminatingAmount"].Long() + 0;
|
||||
|
||||
if (sender["balance"].Long() < LongTotalCost) {
|
||||
throw new bad_parameter(out, "insufficient balance for transaction");
|
||||
}
|
||||
|
||||
|
||||
|
||||
CVars recipient; // Load recipient
|
||||
/*recipient["firstname"] = in["firstname"]; recipient["firstname"].set_valid( true );
|
||||
recipient["lastname"] = in["lastname"]; recipient["lastname"].set_valid( true );
|
||||
recipient["account_no"] = in["account_no"]; recipient["account_no"].set_valid( true );
|
||||
recipient["bank_code"] = in["bank_code"]; recipient["bank_code"].set_valid( true );
|
||||
recipient["account_type"] = in["account_type"]; recipient["account_type"].set_valid( true );*/
|
||||
ret = load_db_record(recipient, "SELECT firstname,lastname,account_no,bank_code,account_type FROM sendmoney_recipient WHERE id = %lu AND member_id = %lu AND status = 1", recipientid, senderid);
|
||||
if (ret < 1L) {
|
||||
throw new bad_parameter(out, "recipientid");
|
||||
}
|
||||
|
||||
in["TerminatingEntityCode"] = recipient["bank_code"];
|
||||
in["TerminatingEntityCode"].set_valid(true);
|
||||
in["TerminatingAccountNumber"] = recipient["account_no"];
|
||||
in["TerminatingAccountNumber"].set_valid(true);
|
||||
in["transactionID"] = in["transaction_id"];
|
||||
in["transactionID"].set_valid(true);
|
||||
|
||||
CVars inx;
|
||||
inx["Fee"] = in["Fee"];
|
||||
inx["Fee"].set_valid(true);
|
||||
inx["InitiatingAmount"] = in["InitiatingAmount"];
|
||||
inx["InitiatingAmount"].set_valid(true);
|
||||
|
||||
inx["InitiatingChannel"] = in["InitiatingChannel"];
|
||||
inx["InitiatingChannel"].set_valid(true);
|
||||
inx["InitiatingCurrencyCode"] = in["InitiatingCurrencyCode"];
|
||||
inx["InitiatingCurrencyCode"].set_valid(true);
|
||||
|
||||
inx["InitiatingEntityCode"] = in["InitiatingEntityCode"];
|
||||
inx["InitiatingEntityCode"].set_valid(true);
|
||||
inx["InitiatingPaymentMethodCode"] = in["InitiatingPaymentMethodCode"];
|
||||
inx["InitiatingPaymentMethodCode"].set_valid(true);
|
||||
|
||||
inx["TerminatingAccountNumber"] = in["TerminatingAccountNumber"];
|
||||
inx["TerminatingAccountNumber"].set_valid(true);
|
||||
inx["TerminatingAmount"] = in["TerminatingAmount"];
|
||||
inx["TerminatingAmount"].set_valid(true);
|
||||
|
||||
inx["TerminatingCountryCode"] = in["TerminatingCountryCode"];
|
||||
inx["TerminatingCountryCode"].set_valid(true);
|
||||
inx["TerminatingCurrencyCode"] = in["TerminatingCurrencyCode"];
|
||||
inx["TerminatingCurrencyCode"].set_valid(true);
|
||||
|
||||
inx["TerminatingEntityCode"] = in["TerminatingEntityCode"];
|
||||
inx["TerminatingEntityCode"].set_valid(true);
|
||||
inx["TerminatingPaymentMethodCode"] = in["TerminatingPaymentMethodCode"];
|
||||
inx["TerminatingPaymentMethodCode"].set_valid(true);
|
||||
|
||||
inx["recipientid"] = in["recipientid"];
|
||||
inx["recipientid"].set_valid(true);
|
||||
inx["member_id"] = in["senderid"];
|
||||
inx["member_id"].set_valid(true);
|
||||
inx["transactionID"] = in["transactionID"];
|
||||
inx["transactionID"].set_valid(true);
|
||||
|
||||
inx["transfer_code"] = "";
|
||||
inx["transfer_code"].set_valid(true);
|
||||
|
||||
|
||||
out["money_transfer_id"] = insert_db_record(DBS_VALID, "money_transfer", " money_transfer_id_seq", inx);
|
||||
if (out["money_transfer_id"].Long() < 1L) {
|
||||
throw new runtime_error("Failed to create money transfer record");
|
||||
}
|
||||
|
||||
const PGresult *res = pgsql_query("SELECT * FROM money_transfer WHERE id=%lu AND member_id = %lu", out["money_transfer_id"].Long(), in["member_id"].Long());
|
||||
if (res != NULL && pgsql_num_rows(res) > 0) {
|
||||
|
||||
} else {
|
||||
throw new runtime_error("Failed to create money_transfer record");
|
||||
}
|
||||
|
||||
CVars transaction;
|
||||
transaction["detail_id"] = out["money_transfer_id"];
|
||||
transaction["detail_id"].set_valid(true);
|
||||
transaction["type"] = 2L;
|
||||
/* DoTransfer */ transaction["type"].set_valid(true);
|
||||
out["transaction_id"] = insert_db_record(DBS_VALID, "money_transfer_transaction", "money_transfer_transaction_id_seq", transaction);
|
||||
if (out["transaction_id"].Long() < 1L) {
|
||||
throw new runtime_error("Failed to create money_transfer_transaction record");
|
||||
}
|
||||
CVars transaction_final;
|
||||
|
||||
char xtid[12], uniqueRef[20];
|
||||
memset(uniqueRef, 0, 20);
|
||||
// TransferCode - RequestReference - UniqueRef => request prefix for terminal owner + ID
|
||||
sprintf(uniqueRef, "%s%s000000", setup["interswitch_pfix"].c_str(), out["transaction_id"].c_str());
|
||||
//sprintf( uniqueRef, "%s%-09lu", setup["interswitch_pfix"].c_str(), out["transaction_id"].Long() );
|
||||
|
||||
transaction["transfer_code"] = uniqueRef;
|
||||
transaction["transfer_code"].set_valid(true);
|
||||
transaction_final["transfer_code"] = transaction["transfer_code"];
|
||||
transaction_final["transfer_code"].set_valid(true);
|
||||
|
||||
pgsql_exec("UPDATE money_transfer SET transfer_code='%s' WHERE id=%lu", transaction_final["transfer_code"].c_str(), out["money_transfer_id"].Long());
|
||||
|
||||
//sprintf( xtid, "%s", setup["interswitch_tid"].c_str() );
|
||||
sprintf(xtid, "%s", setup["interswitch_tid"].c_str());
|
||||
|
||||
|
||||
//in["SenderEmail"] = sender["email"]; in["SenderEmail"].set_valid(true);
|
||||
//in["BeneficiaryEmail"] = recipient["email"]; in["BeneficiaryEmail"].set_valid(true);
|
||||
|
||||
//*TAKE THE MONEY NOW
|
||||
CVars pm;
|
||||
pm["customer_id"] = senderid;
|
||||
pm["customer_id"].set_valid(true);
|
||||
pm["transfer_id"] = out["money_transfer_id"];
|
||||
pm["transfer_id"].set_valid(true);
|
||||
pm["amount"] = in["InitiatingAmount"];
|
||||
pm["amount"].set_valid(true);
|
||||
pm["fee"] = in["Fee"];
|
||||
pm["fee"].set_valid(true);
|
||||
pm["mode"] = PAYMENT_MODE;
|
||||
pm["mode"].set_valid(true);
|
||||
|
||||
/*
|
||||
#define SM_PENDING 1
|
||||
#define SM_CANCEL 3
|
||||
#define SM_FAILED 4
|
||||
#define SM_COMPLETED 5
|
||||
*/
|
||||
if (do_transferPayment(pm) == PHP_API_OK) {
|
||||
out["sendmoney_status"] = SM_PENDING;
|
||||
in["sendmoney_id"] = out["money_transfer_id"];
|
||||
ret = PHP_API_OK;
|
||||
sendmoney_email(SM_PENDING, in, out);
|
||||
// all is good on money side
|
||||
logfmt(logINFO, "*** ALL Good ------ ****** ");
|
||||
} else {
|
||||
out["sendmoney_status"] = SM_FAILED;
|
||||
throw new runtime_error("Failed to create payment record");
|
||||
}
|
||||
|
||||
load_db_record(out, "SELECT r.firstname, r.lastname, m.*,mp.confirmation,r.firstname||' '||r.lastname AS Recitient,r.account_no,b.name AS bank_name FROM money_transfer m LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid LEFT JOIN bank_entity_codes b ON b.code = r.bank_code WHERE m.id=%lu", out["money_transfer_id"].Long());
|
||||
|
||||
} catch (runtime_error& ex) {
|
||||
|
||||
out["status"] = ex.what();
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
|
||||
} catch (bad_parameter) {
|
||||
|
||||
out["status"] = "Invalid input";
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
|
||||
} catch (...) {
|
||||
|
||||
out["status"] = "Unhandled exception in INTW_doTransfer";
|
||||
ret = PHP_API_BAD_PARAM;
|
||||
|
||||
}
|
||||
|
||||
//out["wallet"].set_valid( false );
|
||||
|
||||
logfmt(logINFO, "/long WRB_doServiceTransferComplete(CVars in, CVars &out)");
|
||||
return ret;
|
||||
|
||||
}
|
||||
|
||||
@@ -294,10 +294,9 @@ long stripe_charge_member_paymentid(CVars in, CVars &out) {
|
||||
logfmt(logINFO, "stripe_charge_member_paymentid()");
|
||||
out["result"] = "stripe_charge_member_paymentid() call in progress...";
|
||||
long res, ret = PHP_API_BAD_PARAM;
|
||||
|
||||
|
||||
try {
|
||||
REQ_LONG(in, "service_id", 0, -1);
|
||||
// REQ_LONG(in, "service_id", 0, -1);
|
||||
// REQ_LONG(in, "payment_id", 0, -1);
|
||||
REQ_LONG(in, "member_id", 0, -1);
|
||||
long payment_id = REQ_LONG(in, "payment_id", 0, -1);
|
||||
|
||||
@@ -318,7 +317,7 @@ long stripe_charge_member_paymentid(CVars in, CVars &out) {
|
||||
return ret;
|
||||
}
|
||||
*/
|
||||
in["description"] = "Laundry Pickup";
|
||||
in["description"] = "Account Recharge";
|
||||
in["invoice_id"] = in["payment_id"];
|
||||
|
||||
|
||||
@@ -350,7 +349,10 @@ long stripe_charge_member_paymentid(CVars in, CVars &out) {
|
||||
ret = PHP_API_OK;
|
||||
out["id"] = id;
|
||||
pgsql_exec("UPDATE members_payments SET stripe_confirm='%s',dt_confirmed=now() WHERE id = %lu", id, payment_id);
|
||||
//pgsql_exec("UPDATE members_service_request SET payment_id=%lu,dt_confirmed=now(),flags=%lu WHERE id = %lu",payment_id, CONFIRMED , in["service_id"].Long());
|
||||
/*
|
||||
|
||||
|
||||
*/
|
||||
|
||||
out["result"] = "Charge success";
|
||||
} else {
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "pgsql_wrapper.h"
|
||||
#include "stripe_charge.h"
|
||||
#include "account_mngt.h"
|
||||
#include "coupons.h"
|
||||
|
||||
#include "twilo.h"
|
||||
//extern CSQL *sql;
|
||||
@@ -56,6 +57,11 @@ long wrenchboard_api_main(CVars in, CVars &out) {
|
||||
return sitecrons_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);
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
chdir('..');
|
||||
require 'vendor/autoload.php';
|
||||
|
||||
use Firebase\JWT\JWT;
|
||||
|
||||
$teamId = 'JR363FEY8R';
|
||||
$keyId = 'W5WTWC9DTJ';
|
||||
$sub = 'com.wrenchboard.users.client';
|
||||
$aud = 'https://appleid.apple.com'; // it's a fixed URL value
|
||||
|
||||
$iat = strtotime('now');
|
||||
$exp = strtotime('+60days');
|
||||
$keyContent = file_get_contents('/home/oameye/AuthKey_W5WTWC9DTJ.p8');
|
||||
|
||||
echo JWT::encode([
|
||||
'iss' => $teamId,
|
||||
'iat' => $iat,
|
||||
'exp' => $exp,
|
||||
'aud' => $aud,
|
||||
'sub' => $sub,
|
||||
], $keyContent, 'ES256', $keyId);
|
||||
|
||||
// Write the snippet in a method, return the value from that method
|
||||
|
||||
// You
|
||||
|
||||
?>
|
||||
+89
-3
@@ -1,4 +1,90 @@
|
||||
<?
|
||||
<?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, '/');
|
||||
@@ -7,6 +93,6 @@ $USER = strtok($USER, '/');
|
||||
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
|
||||
$wrenchboard = new $wrenchboard_class();
|
||||
$ret = $wrenchboard->wrenchboard_api($in,$out);
|
||||
var_dump($ret);
|
||||
phpinfo();
|
||||
//var_dump($ret);
|
||||
//phpinfo();
|
||||
?>
|
||||
|
||||
+2
-1
@@ -11,13 +11,14 @@ $wrenchboard = new $wrenchboard_class();
|
||||
|
||||
|
||||
|
||||
Array ( [title] => Re:Week 1 CAT 2: “Muddiest” Point [description] => sffss [timeline] => 3 [job_detail] => sgsagsagashas [price] => 5000 [action] => 0 )
|
||||
//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';
|
||||
|
||||
@@ -3,9 +3,11 @@
|
||||
require_once 'config.php';
|
||||
$url = $local_url . "/createuser";
|
||||
|
||||
$username = urlencode("ses66181+" . rand(1000, 9999) . "@gmail.com");
|
||||
$username = urlencode("jubaworker+" . rand(1000, 9999) . "@gmail.com");
|
||||
|
||||
$username = "ses66181+" . rand(1000, 9999) . "@gmail.com";
|
||||
$username = "jubaworker+" . rand(1000, 9999) . "@gmail.com";
|
||||
$username = "ameye+auto" . 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
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
<pre>
|
||||
<?php
|
||||
//#define WRENCHBOARD_USER_ADNEWCC 11054
|
||||
|
||||
include('../backend.php');
|
||||
$hostname = $wrenchboard->cfgReadChar("database.host");
|
||||
@@ -16,7 +17,7 @@ $in=array(
|
||||
"action" => 90005, /* WRENCHBOARD_STRIPE_CHARGE_NEW */
|
||||
"ccnum" => "4242424242424242",
|
||||
"ccexpm" => "12",
|
||||
"ccexpy" => "18",
|
||||
"ccexpy" => "26",
|
||||
"cccvc" => "123",
|
||||
"amount" => "100",
|
||||
"customer_id" => $f["id"],
|
||||
|
||||
@@ -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',72000);
|
||||
define('SESSION_TIMEOUT_LOGOUT',144000);
|
||||
|
||||
define('SUPPORT_PHONE','+234 (818)-3866434');
|
||||
|
||||
@@ -155,6 +155,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);
|
||||
@@ -169,6 +171,13 @@ define('WRENCHBOARD_LOG_MEMBER', 11040);
|
||||
define('WRENCHBOARD_DELETE_RECACC', 11041);
|
||||
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);
|
||||
//**************************************************************
|
||||
define('WRENCHBOARD_JOB_CREATEJOB',13010 );
|
||||
@@ -269,3 +278,11 @@ 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);
|
||||
|
||||
|
||||
|
||||
@@ -49,7 +49,9 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
| Examples: my-controller/index -> my_controller/index
|
||||
| my-controller/my-method -> my_controller/my_method
|
||||
*/
|
||||
$route['default_controller'] = 'site';
|
||||
$route['default_controller'] = 'login';
|
||||
$route['404_override'] = 'Wrb404';
|
||||
$route['translate_uri_dashes'] = FALSE;
|
||||
$route['auth/(.+)'] = 'home/auth/$1';
|
||||
|
||||
$route['cardreciepts/(.+)'] = 'paymnt/cardreciepts/$1';
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -25,7 +25,8 @@ class Bkotransaction extends Bko_Controller {
|
||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
||||
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process "
|
||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process, "
|
||||
. "m.initiatingamount AS raw_amount, m.fee AS raw_fee, sr.bank_code, sr.account_no "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN members me ON me.id=m.member_id "
|
||||
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
||||
@@ -39,7 +40,7 @@ class Bkotransaction extends Bko_Controller {
|
||||
|
||||
break;
|
||||
|
||||
case 'TRANSDETAIL':
|
||||
case 'TRANSDETAIL':
|
||||
|
||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee "
|
||||
@@ -65,93 +66,155 @@ class Bkotransaction extends Bko_Controller {
|
||||
|
||||
case 'COMPLETE':
|
||||
//echo 'complete 1';
|
||||
// url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
||||
// url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
||||
$data["trans_code"] = $this->input->get('tcode');
|
||||
$data["trans_tref"] = $this->input->get('tref');
|
||||
$data["sendmoney_id"] = $sendmoney_id;
|
||||
$data['action'] = WRENCHBOARD_SMONEY_BKOPROC;
|
||||
$data['action_mode'] = SMONEY_PROCC_MANUAL;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$this->backend_model->wrenchboard_api($data, $out);
|
||||
echo $out['status'];
|
||||
|
||||
|
||||
echo $this->sendmoneyCompletePage($data);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
protected function sendmoneyCompletePage($data) {
|
||||
$data['action'] = WRENCHBOARD_SMONEY_BKOPROC;
|
||||
$data['action_mode'] = SMONEY_PROCC_MANUAL;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$this->backend_model->wrenchboard_api($data, $out);
|
||||
return $out['status'];
|
||||
}
|
||||
|
||||
|
||||
public function smTransmitProcess() {
|
||||
// url: "/bkotransaction/smprocess?proc=PROCESS&sendmoney_id="+link_id
|
||||
$proc = $this->input->get('proc');
|
||||
$sendmoney_id = $this->input->get('sendmoney_id');
|
||||
// url: "/bkotransaction/smprocess?proc=PROCESS&sendmoney_id="+link_id
|
||||
$proc = $this->input->get('proc');
|
||||
$sendmoney_id = $this->input->get('sendmoney_id');
|
||||
|
||||
switch ($proc) {
|
||||
case 'PROCESS':
|
||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
||||
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN members me ON me.id=m.member_id "
|
||||
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code WHERE m.id=" . $sendmoney_id;
|
||||
switch ($proc) {
|
||||
case 'PROCESS':
|
||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS Sender,"
|
||||
. "sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient, m.initiatingamount*0.01 AS Amount,m.fee*0.01 AS Fee, "
|
||||
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
|
||||
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process, "
|
||||
. "m.initiatingamount AS raw_amount, m.fee AS raw_fee, sr.bank_code, sr.account_no "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN members me ON me.id=m.member_id "
|
||||
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code WHERE m.id=" . $sendmoney_id;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$row = $query->row_array();
|
||||
$query = $this->db->query($mysql);
|
||||
$row = $query->row_array();
|
||||
|
||||
echo $this->sendmoneyProcessPage($row);
|
||||
echo $this->sendmoneyProcessPage($row);
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'DETAIL':
|
||||
case 'DETAIL':
|
||||
|
||||
echo 'detail';
|
||||
echo 'detail';
|
||||
|
||||
break;
|
||||
break;
|
||||
|
||||
case 'TRANSMIT':
|
||||
//echo 'complete 1';
|
||||
// url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
||||
$data["trans_code"] = $this->input->get('tcode');
|
||||
$data["trans_tref"] = $this->input->get('tref');
|
||||
$data["sendmoney_id"] = $sendmoney_id;
|
||||
$data['action'] = WRENCHBOARD_SMONEY_BKOPROC;
|
||||
$data['action_mode'] = SMONEY_PROCC_INTERSWITCH;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$this->backend_model->wrenchboard_api($data, $out);
|
||||
echo $out['status'];
|
||||
|
||||
|
||||
|
||||
break;
|
||||
case 'TRANSMIT':
|
||||
//echo 'complete 1';
|
||||
// url: "/bkotransaction/smprocess?proc=COMPLETE&sendmoney_id="+link_id+'&tcode='+tcode+'&tref='+tref
|
||||
$data["trans_code"] = $this->input->get('tcode');
|
||||
$data["trans_tref"] = $this->input->get('tref');
|
||||
$data["sendmoney_id"] = $sendmoney_id;
|
||||
$mysql = "SELECT m.id,mp.confirmation, m.added,me.firstname||' '||me.lastname||'<br>'||me.email AS sender,
|
||||
sr.firstname||' '||sr.lastname||'<br>ACC:'||sr.account_no||'-'||be.name AS recipient,
|
||||
m.initiatingamount*0.01 AS amount, m.fee*0.01 AS fee,
|
||||
m.initiatingamount AS raw_amount, m.fee AS raw_fee, sr.bank_code, sr.account_no
|
||||
FROM money_transfer m
|
||||
LEFT JOIN members me ON me.id=m.member_id
|
||||
LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid
|
||||
LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id
|
||||
LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code WHERE m.id=" . $sendmoney_id;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$row = $query->row_array();
|
||||
|
||||
echo $this->sendmoneyProcessPage($row, $data);
|
||||
/*
|
||||
$data['action'] = WRENCHBOARD_SMONEY_BKOPROC;
|
||||
$data['action_mode'] = SMONEY_PROCC_INTERSWITCH;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$this->backend_model->wrenchboard_api($data, $out);
|
||||
echo $out['status'];
|
||||
*/
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private function TransmitSendmoneyProcessPage($out) {
|
||||
|
||||
$myTable = "<form id='sendmoneyProcessPage" . $out['id'] . "' name='sendmoneyProcessPage" . $out['id'] . "'><table class='table table-striped table-hover table-bordered table-condensed'>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Confirmation</b></td><td>" . $out['confirmation'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Trx. Date</b></td><td>" . $out['added'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Sender</b></td><td>" . $out['sender'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Recipient</b></td><td>" . $out['recipient'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Amount</b></td><td>" . $out['amount'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Fee</b></td><td>" . $out['fee'] . "</td></tr>";
|
||||
|
||||
$myTable .="<tr><td style='width:100px;'><b></b></td><td></td></tr>";
|
||||
$myTable .="</table></form> ";
|
||||
$myTable = "<form id='sendmoneyProcessPage" . $out['id'] . "' name='sendmoneyProcessPage" . $out['id'] . "'><table class='table table-striped table-hover table-bordered table-condensed'>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Confirmation</b></td><td>" . $out['confirmation'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Trx. Date</b></td><td>" . $out['added'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Sender</b></td><td>" . $out['sender'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Recipient</b></td><td>" . $out['recipient'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Amount</b></td><td>" . $out['amount'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Fee</b></td><td>" . $out['fee'] . "</td></tr>";
|
||||
|
||||
$myTable .="<tr><td style='width:100px;'><b></b></td><td></td></tr>";
|
||||
$myTable .="</table></form> ";
|
||||
|
||||
return $myTable;
|
||||
}
|
||||
return $myTable;
|
||||
}
|
||||
|
||||
private function sendmoneyProcessPage($out) {
|
||||
private function sendmoneyProcessPage($out, $page=array()) {
|
||||
$data = array(
|
||||
"account_bank" => $out['bank_code'],
|
||||
"account_number" => $out['account_no'],
|
||||
"amount" => $out['raw_amount'],
|
||||
"narration" => $out['sender'],
|
||||
"currency" => "NGN",
|
||||
"reference" => $out['id'],
|
||||
"debit_currency" => "NGN"
|
||||
);
|
||||
$url = "http://localhost:3000/create";
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch,CURLOPT_URL, $url);
|
||||
curl_setopt($ch,CURLOPT_POST, count($data));
|
||||
curl_setopt($ch,CURLOPT_POSTFIELDS, json_encode($data));
|
||||
curl_setopt($ch,CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
|
||||
curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
$myTable = "<form id='sendmoneyProcessPage" . $out['id'] . "' name='sendmoneyProcessPage" . $out['id'] . "'><table class='table table-striped table-hover table-bordered table-condensed'>";
|
||||
$data = json_decode($result, true);
|
||||
// Error
|
||||
// {"status":"failure","message":"Invalid response","details":"Request failed with status code 400","code":400,"data":{"status":"error","code":"UNAUTHORIZED_ACCESS","message":"Unauthorized access. Compliance approval required to use this feature"}}
|
||||
// Success
|
||||
// ???
|
||||
$page["message"] = "";
|
||||
if ($data == null || $data == "" || (array_key_exists("status",$data) && $data["status"]=="failure")) {
|
||||
if ($data == null || $data == "") {
|
||||
// Invalid response, not clear what is going on (non-JSON response from the payment API)
|
||||
$page["message"] = "Invalid payment API respose: ".htmlentities($result);
|
||||
} else if (array_key_exists("data",$data) && array_key_exists("message",$data["data"])) {
|
||||
// Payment processor message
|
||||
$page["message"] = $data["data"]["message"];
|
||||
} else if (array_key_exists("message",$data)) {
|
||||
// Payment API message
|
||||
$page["message"] = $data["message"];
|
||||
} else {
|
||||
// Not clear what is going on (failure with no messages?)
|
||||
$page["message"] = "Invalid payment API respose: ".htmlentities($result);
|
||||
}
|
||||
} else {
|
||||
// TODO: success
|
||||
}
|
||||
// $page['confirmation']
|
||||
// $page['trans_code']
|
||||
// $data['trans_tref']
|
||||
|
||||
$myTable = "<form id='sendmoneyProcessPage" . $out['id'] . "' name='sendmoneyProcessPage" . $out['id'] . "'>";
|
||||
$myTable .="<span style='font-weight:bold;color:red'>".$page["message"]."</span>";
|
||||
$myTable .="<table class='table table-striped table-hover table-bordered table-condensed'>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Confirmation</b></td><td>" . $out['confirmation'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Trx. Date</b></td><td>" . $out['added'] . "</td></tr>";
|
||||
$myTable .="<tr><td style='width:100px;'><b>Sender</b></td><td>" . $out['sender'] . "</td></tr>";
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -87,82 +98,68 @@ class Dash extends Users_Controller {
|
||||
$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.
|
||||
|
||||
$x = $this->dashTaskMessage();
|
||||
$data['job_message_table'] = $x['job_message_table'];
|
||||
$data['job_message_table_result'] = $x['job_message_table_result'];
|
||||
$data['message_found'] = $x['message_found'];
|
||||
/// End table data ===========================
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
//$this->table->set_heading('Job', 'Client', 'Terms', 'Description', 'Manage', 'Status');
|
||||
$mysql = 'SELECT jo.added::date,jo.member_id,j.title,'
|
||||
. 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status'
|
||||
. 'FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id LIMIT 5';
|
||||
// $sqb =" ,'<button type=\"button\" class=\"btn btn-primary btn-xs\">View</button>' As View ";
|
||||
$jbx = "''jobs/viewjob''";
|
||||
$mysql = "SELECT jo.added::date,j.title,"
|
||||
. 'CASE WHEN jo.status = 1 THEN \'Pending\' 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 "
|
||||
. "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";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$num = $query->num_rows();
|
||||
|
||||
$data["dash_title"] = "Pending Offer(s)";
|
||||
if ($num > 0) {
|
||||
$this->table->set_heading('Added', 'Title', 'Status', '');
|
||||
$data['offer_dash'] = $this->table->generate($query);
|
||||
} else {
|
||||
$data["offer_dash"] = "<div class=\"thumb\"><img src='assets/images/notask.png' alt=\"Active Projects\"></div>";
|
||||
}
|
||||
*/
|
||||
$acp = array();
|
||||
$acp = $this->activeProjects();
|
||||
$data['job_table'] = $acp['job_table'];
|
||||
$data['job_table_result'] = $acp['job_table_result'];
|
||||
|
||||
$ya = array();
|
||||
$ya = $this->dash_title();
|
||||
$data["dash_title"] = $ya["dash_title"];
|
||||
$data["offer_dash"] = $ya["offer_dash"];
|
||||
$data["offer_dash_result"] = $ya["offer_dash_result"];
|
||||
$data["offer_found"] = $ya["offer_found"];
|
||||
|
||||
$_SESSION['secure_data'] = $data; // all data needed for secure page
|
||||
// print_r($_SESSION);
|
||||
//var_dump( $_SESSION);
|
||||
//exit;
|
||||
$data['page_title'] ="Dashboard";
|
||||
$this->renderSecurePage('users/view_dash', $data);
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_dash', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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();
|
||||
/*
|
||||
wrenchboard=> select s.created,j.contract,j.title,j.id,j.status,j.delivery_date,substring(s.message,0,100) FROM members_jobs_contract j RIGHT JOIN jobs_contract_message s ON s.contract=j.contract WHERE j.member_id=3 or j.client_id = 3 AND j.status IN (1,4);
|
||||
created | contract | title | id | status | delivery_date | substring
|
||||
----------------------------+------------+-----------------------------------------------+----+--------+----------------------------+-----------------------------------------------------------------------------------------------------
|
||||
2017-05-18 11:53:20.569399 | 7BW9B9R8BB | five thousand naira | 13 | 1 | 2017-08-02 14:19:38.711257 | This is a test of ajax send message
|
||||
2017-05-18 12:03:30.685328 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | dldldldldldl
|
||||
2017-05-18 12:03:44.137005 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | This is an empty list test
|
||||
2017-05-18 12:04:00.228586 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | List should be populated now
|
||||
2017-05-18 20:49:12.996077 | 7BW9B9R8BB | five thousand naira | 13 | 1 | 2017-08-02 14:19:38.711257 | About PayQuic\r +
|
||||
| | | | | | PayQuic is global payments and airtime top-up company. Open for business 24/7, 365 d
|
||||
2017-06-12 10:28:32.720786 | 601BBWRW48 | 595Job Title Job Title Job Title Job Title932 | 10 | 1 | 2017-08-09 16:08:43.503739 | <table><tbody><tr><td><div><span><br>can you share your controller method and did you tried <c
|
||||
2017-06-12 10:28:41.932836 | 601BBWRW48 | 595Job Title Job Title Job Title Job Title932 | 10 | 1 | 2017-08-09 16:08:43.503739 | <table><tbody><tr><td><div><span><br>can you share your controller method and did you tried <c
|
||||
|
||||
*/
|
||||
$jbx = "''/proj/thisjob''";
|
||||
|
||||
$mysql = " SELECT s.created,j.contract,j.title,j.id,j.status,j.delivery_date,substring(s.message,0,100),"
|
||||
. " '<input type=submit onclick=\"return post_nav_find_action($jbx, '||j.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
|
||||
. " FROM members_jobs_contract j "
|
||||
. " RIGHT JOIN jobs_contract_message s ON s.contract=j.contract "
|
||||
. " WHERE j.member_id=" . $_SESSION['member_id'] . " OR j.client_id = " . $_SESSION['member_id'] . " AND j.status IN (1,4)";
|
||||
|
||||
$mysql = " SELECT s.created::date ||'<br>'||j.contract AS date_contract,'<b>Title:</b>'||j.title||'<br>'||substring(s.message,0,90) as title_message,"
|
||||
$mysql = " SELECT s.created::date ||'<br>'||j.contract AS date_contract,j.title AS title,substring(s.message,0,90) as title_message,'\/proj\/thisjob' AS qpath,j.id AS offer_code,"
|
||||
. " '<input type=submit onclick=\"return post_nav_find_action($jbx, '||j.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
|
||||
. " FROM members_jobs_contract j "
|
||||
. " RIGHT JOIN jobs_contract_message s ON s.contract=j.contract "
|
||||
@@ -170,13 +167,13 @@ class Dash extends Users_Controller {
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:180px'), 'Title/Message', array('data' => '', 'style' => 'width:100px; cellpadding:0px;'));
|
||||
|
||||
$data['job_message_table'] = $this->table->generate($query);
|
||||
|
||||
$data['job_message_table_result'] = $query->result(); // used in new impl.
|
||||
$data['message_found'] = true;
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -185,21 +182,19 @@ class Dash extends Users_Controller {
|
||||
$offer_found = false;
|
||||
|
||||
$data = array();
|
||||
$data['offer_dash'] = '';
|
||||
$data['offer_dash'] = $data['offer_dash_result'] ='';
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
$jbx = "''/jobs/viewjob''";
|
||||
$mysql = "SELECT jo.added::date,j.title,"
|
||||
. "'<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 "
|
||||
$mysql = "SELECT jo.added::date AS pdate,j.title,(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,'\/jobs\/viewjob' 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.client_id = " . $_SESSION['member_id'] . " LIMIT 4";
|
||||
// . 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status,'
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$num = $query->num_rows();
|
||||
|
||||
$data["dash_title"] = "Pending Offer(s)";
|
||||
if ($num > 0) {
|
||||
|
||||
@@ -209,6 +204,7 @@ class Dash extends Users_Controller {
|
||||
|
||||
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:80px'), 'Title', array('data' => '', 'style' => 'width:80px'));
|
||||
$data['offer_dash'] = $this->table->generate($query);
|
||||
$data['offer_dash_result'] = $query->result();
|
||||
$offer_found = true;
|
||||
} else {
|
||||
$data["offer_dash"] = "<div class=\"thumb\"><img src='assets/images/notask.png' alt=\"Active Projects\"></div>";
|
||||
@@ -218,15 +214,14 @@ class Dash extends Users_Controller {
|
||||
if ($offer_found == false) {
|
||||
$data["dash_title"] = "<a href='/jobs/pendingoffer'>My Pending Offer(s)</a>";
|
||||
$jbx = "''/jobs/viewmyjob''";
|
||||
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date,j.title||'<br><b>To :</b>'||(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,"
|
||||
$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 "
|
||||
. "'<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";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$num = $query->num_rows();
|
||||
|
||||
if ($num > 0) {
|
||||
@@ -236,10 +231,12 @@ class Dash extends Users_Controller {
|
||||
|
||||
$this->table->set_heading(array('data' => 'Added/Expire', 'style' => 'width:120px'), 'Title/Recipient', array('data' => 'Status', 'style' => 'width:100px'), array('data' => '', 'style' => 'width:100px'));
|
||||
$data['offer_dash'] = $this->table->generate($query);
|
||||
$data['offer_dash_result'] = $query->result();
|
||||
$offer_found = true;
|
||||
}
|
||||
}
|
||||
|
||||
$data["offer_found"] = $offer_found;
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,16 +2,48 @@
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
//Import Hybridauth's namespace
|
||||
use Hybridauth\Hybridauth;
|
||||
|
||||
class Home extends WRB_Controller {
|
||||
|
||||
public function index() {
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
|
||||
//Load URL helper
|
||||
$this->load->helper('url');
|
||||
|
||||
//Load session library
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
$this->home1('');
|
||||
//Displays social login links
|
||||
public function index() {
|
||||
// Load Hybridauth's helper
|
||||
$this->load->helper('hybridauth');
|
||||
|
||||
/*
|
||||
// Instantiate Hybridauth's classes
|
||||
$hybrid = new Hybridauth(get_hybridauth_config());
|
||||
|
||||
// Get login links
|
||||
$login_links = get_hybridauth_links($hybrid, $this->router);
|
||||
*/
|
||||
$login_links = array(
|
||||
'Google' => get_google_login_link(),
|
||||
'Apple' => get_apple_login_link()
|
||||
);
|
||||
// Pass login links to html template
|
||||
$data['login_links'] = $login_links;
|
||||
|
||||
// Render html template
|
||||
$this->load->view('site3/external/view_home', $data);
|
||||
}
|
||||
|
||||
public function about() {
|
||||
|
||||
$this->home2('home2/about');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -33,6 +33,71 @@ class Jobs extends Users_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function startcreate(){
|
||||
$data = $this->getSessionArray();
|
||||
$this->load->model('dash_model');
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
$data['active_task'] = $out['active_task'];
|
||||
$data['active_pass_due'] = $out['active_pass_due'];
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
$data['template_data'] = $this->jobsTemplates();
|
||||
$this->renderSecurePage('jobs/view_startcreate', $data);
|
||||
}
|
||||
|
||||
private function jobsTemplates(){
|
||||
|
||||
return [
|
||||
[
|
||||
'ID'=>'FACEBOOKSHARE',
|
||||
'name'=>'Share my article on your facebook page',
|
||||
'description'=>'We’ve been focused on making a the from also not been eye',
|
||||
'delivery'=>'',
|
||||
'img'=>'/site3/assets/media/jobs/share-stories.jpg',
|
||||
'timeline_days'=>'7',
|
||||
'price'=> 2000
|
||||
],
|
||||
[
|
||||
'ID'=>'TESTMYAPP',
|
||||
'name'=>'Test my App and give feedback',
|
||||
'description'=>'We’ve been focused on making a the from also not been eye',
|
||||
'delivery'=>'',
|
||||
'img'=>'/site3/assets/media/jobs/test-app.jpg',
|
||||
'timeline_days'=>'7',
|
||||
'price'=> 2000
|
||||
],
|
||||
[
|
||||
'ID'=>'REVIEWFEEDBACK',
|
||||
'name'=>'Review My Blog Story with feedback',
|
||||
'description'=>'We’ve been focused on making a the from also not been eye',
|
||||
'delivery'=>'',
|
||||
'img'=>'/site3/assets/media/jobs/review-stories.jpg',
|
||||
'timeline_days'=>'7',
|
||||
'price'=> 2000
|
||||
],
|
||||
[
|
||||
'ID'=>'PROPOSEBLOG',
|
||||
'name'=>'Propose new articles tiltles for my blog',
|
||||
'description'=>'We’ve been focused on making a the from also not been eye',
|
||||
'delivery'=>'',
|
||||
'img'=>'/site3/assets/media/jobs/propose-new.jpg',
|
||||
'timeline_days'=>'7',
|
||||
'price'=> 2000
|
||||
],
|
||||
[
|
||||
'ID'=>'WEBSITEREVIEW',
|
||||
'name'=>'Visit and review my Website provide feedback',
|
||||
'description'=>'We’ve been focused on making a the from also not been eye',
|
||||
'delivery'=>'',
|
||||
'img'=>'/site3/assets/media/jobs/review-site.jpg',
|
||||
'timeline_days'=>'7',
|
||||
'price'=> 2000
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
}
|
||||
|
||||
public function active() {
|
||||
|
||||
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
|
||||
@@ -138,9 +203,12 @@ class Jobs extends Users_Controller {
|
||||
|
||||
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_pendinginterest', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->load->view('users/view_footer_user', $data); */
|
||||
|
||||
$this->renderSecurePage('jobs/view_pendinginterest', $data);
|
||||
|
||||
}
|
||||
|
||||
public function jobinterest() {
|
||||
@@ -214,9 +282,12 @@ class Jobs extends Users_Controller {
|
||||
|
||||
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_manageinterest', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->load->view('users/view_footer_user', $data);*/
|
||||
|
||||
$this->renderSecurePage('jobs/view_manageinterest', $data);
|
||||
|
||||
}
|
||||
|
||||
private function getMarketInterestMessage($offer_code, $client_id) {
|
||||
@@ -500,8 +571,8 @@ class Jobs extends Users_Controller {
|
||||
. ' AND expire> now() AND public_view > 0';
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$num = $query->num_rows();
|
||||
$data['market_table_result'] = $query->result(); // used in new impl.
|
||||
|
||||
if ($num > 0) {
|
||||
$myTable = "<table class='table table-striped table-hover table-bordered table-condensed'>";
|
||||
@@ -520,9 +591,13 @@ class Jobs extends Users_Controller {
|
||||
|
||||
$_SESSION['secure_data'] = $data; // all data needed for secure page
|
||||
$data['page_title'] = "Available Jobs & Tasks";
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_market', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
// var_dump( $data['market_table_result']);
|
||||
// exit;
|
||||
$this->renderSecurePage('jobs/view_market', $data);
|
||||
}
|
||||
|
||||
private function makeMarketTableRow($row) {
|
||||
@@ -532,13 +607,14 @@ class Jobs extends Users_Controller {
|
||||
|
||||
public function showinterest() {
|
||||
$data = $this->getSessionArray();
|
||||
$data['offer_code'] = $this->input->get('job_contract');
|
||||
$data['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$in=[];
|
||||
$in['offer_code'] = $this->input->get('job_contract');
|
||||
$in['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
|
||||
$data['action'] = WRENCHBOARD_JOB_SEND_INTEREST;
|
||||
$in['action'] = WRENCHBOARD_JOB_SEND_INTEREST;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
if ($res == PHP_CREATED_OK) {
|
||||
echo 'Success - ' . $out['status'];
|
||||
} else {
|
||||
@@ -550,15 +626,16 @@ class Jobs extends Users_Controller {
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
// echo 'Ameye';
|
||||
$data['offer_code'] = $this->input->get('offer_code');
|
||||
$data['yourmessage'] = $this->input->get('yourmessage');
|
||||
$data['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$data['msg_type'] = 'JOB';
|
||||
$data['action'] = WRENCHBOARD_JOB_SEND_QUESTION;
|
||||
$in=[];
|
||||
$in['offer_code'] = $this->input->get('offer_code');
|
||||
$in['yourmessage'] = $this->input->get('yourmessage');
|
||||
$in['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$in['msg_type'] = 'JOB';
|
||||
$in['action'] = WRENCHBOARD_JOB_SEND_QUESTION;
|
||||
// $this->load->model('backend_model');
|
||||
$out = array();
|
||||
$out['status'] = '';
|
||||
$res = $this->wrenchboard_api($data, $out);
|
||||
$res = $this->wrenchboard_api($in, $out);
|
||||
if ($res == PHP_CREATED_OK) {
|
||||
echo 'Success - Message sent' . $out['status'];
|
||||
} else {
|
||||
@@ -571,22 +648,23 @@ class Jobs extends Users_Controller {
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
// echo 'Ameye';
|
||||
$data['offer_code'] = $this->input->get('offer_code');
|
||||
$data['yourmessage'] = $this->input->get('yourmessage');
|
||||
$data['interest_id'] = $this->input->get('interest_id');
|
||||
$data['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$data['msg_type'] = 'MRKTINT'; // MARKET INTEREST
|
||||
$in =[];
|
||||
$in['offer_code'] = $this->input->get('offer_code');
|
||||
$in['yourmessage'] = $this->input->get('yourmessage');
|
||||
$in['interest_id'] = $this->input->get('interest_id');
|
||||
$in['member_id'] = $_SESSION['member_id']; // just maing sure
|
||||
$in['msg_type'] = 'MRKTINT'; // MARKET INTEREST
|
||||
|
||||
$data['action'] = WRENCHBOARD_JOB_MRKTINT_QUEST;
|
||||
$in['action'] = WRENCHBOARD_JOB_MRKTINT_QUEST;
|
||||
// $this->load->model('backend_model');
|
||||
$out = array();
|
||||
$out['status'] = '';
|
||||
$res = $this->wrenchboard_api($data, $out);
|
||||
$res = $this->wrenchboard_api($in, $out);
|
||||
// print_r($out);
|
||||
if ($res == PHP_CREATED_OK) {
|
||||
|
||||
//echo rand(100,999)." " .$out['client_id'];
|
||||
echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] ); //'Success - Message sent' . $out['status'];
|
||||
echo $this->getMarketInterestMessage( $in['offer_code'], $out['client_id'] ); //'Success - Message sent' . $out['status'];
|
||||
} else {
|
||||
echo 'Error - ' . $out['status'];
|
||||
}
|
||||
@@ -606,9 +684,9 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
if ($num > 0) {
|
||||
$row = $query->row_array();
|
||||
$myTable = "<table class='table table-sm table-hover table-bordered table-condensed' style=' background-color: #ebf1e8;'>";
|
||||
$myTable = " <div class='card card-xl-stretch mb-5 mb-xl-8'>";
|
||||
$myTable .= $this->makeMarketDetailTableRow($row);
|
||||
$myTable .="</table>";
|
||||
$myTable .="</div>";
|
||||
}
|
||||
|
||||
echo $myTable;
|
||||
@@ -625,35 +703,30 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
|
||||
|
||||
return "<tr><td colspan='2' ><b>" . $row['offer_code'] . "</b> Timeline:" . $row['timeline_days'] . " day(s) - <b>Budget: </b> " . $row['price'] * 0.01 . " Naira</td></tr>"
|
||||
. "<tr><td style='width:100px;'><b>Title</b></td><td>" . $row['title'] . "</td></tr>"
|
||||
. "<tr><td><b>Description</b></td><td>" . $row['description'] . "</td></tr>"
|
||||
. "<tr><td><b>Detail</b></td><td>" . $row['job_description'] . "</td></tr>"
|
||||
. "<tr><td colspan='2' >Interests : <b>" . $data['interest'] . "</b> Expire:<b> " . $row['expire']."</b> </td></tr>"
|
||||
. "<tr><td><b></b></td><td style='text-align:right;'><input type=submit id='submit_interest_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return SInterest('" . $row['offer_code'] . "');\" class=\"btn btn-success btn-xs\" value=\"Send Interest Request
|
||||
\"></td></tr>"
|
||||
. "<tr><td colspan='2'>If you have any questions about this task :"
|
||||
. "<div id='msg_result_" . $row['offer_code'] . "'><form name=\"job_message\"><table class='table table-striped table-hover table-bordered table-condensed'>"
|
||||
. "<tr><td><textarea name='yourmessage' cols=\"5\" rows=\"3\" class=\"textarea form-control\" class=\"btn btn-success btn-xs\" placeholder=\"Enter message here ...\"></textarea></td></tr>"
|
||||
. "<tr><td style='text-align:right;'><button id='submit_yourmessage_" . $row['offer_code'] . "' onclick=\"return OMessage('" . $row['offer_code'] . "');\" class=\"btn btn-info btn-xs\">Send Message</button></td></tr></table></form></div>"
|
||||
. "</td></tr>"
|
||||
. " ";
|
||||
return "<div class='card-body'><table class='table table-sm table-hover table-bordered table-condensed' style='background-color: #ffffff;'><tr><td colspan='2' ><b>" . $row['offer_code'] . "</b> Timeline:" . $row['timeline_days'] . " day(s) - <b>Budget: </b> " . $row['price'] * 0.01 . " Naira</td></tr>"
|
||||
. "<tr><td style='width:100px;'><b>Title</b></td><td>" . $row['title'] . "</td></tr>"
|
||||
. "<tr><td><b>Description</b></td><td>" . $row['description'] . "</td></tr>"
|
||||
. "<tr><td><b>Detail</b></td><td>" . $row['job_description'] . "</td></tr>"
|
||||
. "<tr><td colspan='2' >Interests : <b>" . $data['interest'] . "</b> Expire:<b> " . $row['expire']."</b> </td></tr>"
|
||||
. "<tr><td colspan='2' style='text-align:center; padding-bottom: 10px;'><b>If you are interested in this task, send message to the owner </b><input type=submit id='submit_interest_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return SInterest('" . $row['offer_code'] . "');\" class=\"btn btn-success btn-xs\" value=\"Send Interest Request\"></td></tr>"
|
||||
. "<tr><td colspan='2'><div id='" . $row['offer_code'] . "'></div><hr size='1'></td></tr>"
|
||||
."<tr><td colspan='2'>If you have any questions about this task :"
|
||||
. "<div id='msg_result_" . $row['offer_code'] . "'><form name=\"job_message\"><table class='table table-striped table-hover table-bordered table-condensed'>"
|
||||
. "<tr><td><textarea name='yourmessage' cols=\"5\" rows=\"3\" class=\"textarea form-control\" class=\"btn btn-warning btn-xs\" placeholder=\"Enter message here ...\"></textarea></td></tr>"
|
||||
. "<tr><td style='text-align:right;'><button id='submit_yourmessage_" . $row['offer_code'] . "' onclick=\"return OMessage('" . $row['offer_code'] . "');\" class=\"btn btn-warning btn-sm\">Send Message</button></td></tr></table></form></div>"
|
||||
. "</td></tr>"
|
||||
. " </table></div>";
|
||||
}
|
||||
|
||||
public function viewmyjob() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
$jobOfferID = $this->input->post('jobOfferID');
|
||||
$data['jobOfferID'] = $jobOfferID;
|
||||
if ($jobOfferID != '') {
|
||||
$this->load->model('job_model');
|
||||
$out = $this->job_model->readMyloadJobOffer($_SESSION['member_id'], $jobOfferID);
|
||||
|
||||
// print_r($out);
|
||||
if ($out['result'] == 1) {
|
||||
|
||||
$data["job_sent_to"] = $out["job_sent_to"];
|
||||
|
||||
$data["added_date"] = $out["added_date"];
|
||||
$data["title"] = $out["title"];
|
||||
$data["description"] = $out["description"];
|
||||
@@ -664,12 +737,9 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$date = date_create($out["expire"]);
|
||||
$out["expire"] = date_format($date, 'Y-m-d H:i');
|
||||
$data["expire"] = $out["expire"];
|
||||
|
||||
$data['job_link'] = 'https://'.$_SERVER['HTTP_HOST']."/plb/viewjob/".$out['offer_code'];
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_viewmyjoboffer', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$data['page_title'] = 'View Job - '.$out["offer_code"];
|
||||
$this->RenderUserPage('jobs/view_viewmyjoboffer', $data);
|
||||
} else {
|
||||
redirect('dash'); // go back to dash if not valid
|
||||
}
|
||||
@@ -696,7 +766,7 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
. "WHERE jo.expire > now() AND jo.status = 1 "
|
||||
. "AND jo.member_id = " . $_SESSION['member_id'] . "LIMIT 400";
|
||||
|
||||
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date,j.title||'<br><b>To :</b>'||(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,"
|
||||
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date AS job_dates,j.title||'<br><b>To :</b>'||(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,"
|
||||
. "'<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 "
|
||||
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
|
||||
. "WHERE jo.expire > now() AND jo.status = 1 "
|
||||
@@ -705,6 +775,14 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$mysql2 = "SELECT jo.added::date AS start_job_date, jo.expire::date AS end_job_date, j.title, (CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS job_to,jo.offer_code AS offer_code,"
|
||||
. "'<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 "
|
||||
. "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 400";
|
||||
$query2 = $this->db->query($mysql2);
|
||||
$data['offer_dash_rows'] = $query2->result();
|
||||
|
||||
$num = $query->num_rows();
|
||||
|
||||
if ($num > 0) {
|
||||
@@ -712,15 +790,20 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
$this->table->set_heading(array('data' => 'Added/Expire', 'style' => 'width:100px'), 'Title/Recipient', array('data' => ' ', 'style' => 'width:80px'));
|
||||
$data['offer_dash'] = $this->table->generate($query);
|
||||
|
||||
$offer_found = true;
|
||||
}
|
||||
|
||||
$_SESSION['secure_data'] = $data; // all data needed for secure page
|
||||
$data['page_title'] = "my Market Job(s)";
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_pendingoffer', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
$data['page_title'] = "My Pending Offer(s)";
|
||||
$this->renderSecurePage('jobs/view_pendingoffer', $data);
|
||||
|
||||
}
|
||||
|
||||
public function jobgrp() {
|
||||
@@ -830,20 +913,59 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
return $this->job_model->addGroupMemberForm($group_id);
|
||||
}
|
||||
|
||||
private function getJobTemplateFill($template_page){
|
||||
$templateList = $this->jobsTemplates();
|
||||
|
||||
foreach ($templateList as $row){
|
||||
if ( $row['ID'] == trim($template_page)){
|
||||
return $row;
|
||||
}
|
||||
}
|
||||
return [];
|
||||
}
|
||||
public function create() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
$template_page = ($this->uri->segment(3)) ? $this->uri->segment(3) : '';
|
||||
$preFill = $this->getJobTemplateFill($template_page);
|
||||
if(!empty($preFill))
|
||||
{
|
||||
$title = $preFill['name'];
|
||||
$description = $preFill['description'];
|
||||
$timeline = $preFill['timeline_days'];
|
||||
$price = $preFill['price'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$title = NULL;
|
||||
$description = NULL;
|
||||
$timeline = NULL;
|
||||
$price = 0;
|
||||
}
|
||||
|
||||
|
||||
$mybalance = 0;
|
||||
$data['job_message'] = '';
|
||||
// print_r($_SESSION);
|
||||
|
||||
$title = NULL;
|
||||
$description = NULL;
|
||||
$job_detail = NULL;
|
||||
$timeline = NULL;
|
||||
// $timeline_days = NULL;
|
||||
$price = NULL;
|
||||
$country = 'NG';
|
||||
$submit = NULL;
|
||||
$country_job ='NG';
|
||||
$amountArray = [];
|
||||
|
||||
for ($i = 2000; $i <= 10000; $i = $i + 1000) {
|
||||
$amountArray[] = [$i,$i,'Naira'];
|
||||
}
|
||||
|
||||
$data['amount_array'] = $amountArray;
|
||||
|
||||
$mysqlJ = "SELECT id, title,created::date FROM members_jobs WHERE
|
||||
member_id = " . $_SESSION['member_id'] . "
|
||||
AND status = 1
|
||||
ORDER BY id DESC LIMIT 5";
|
||||
|
||||
$query = $this->db->query($mysqlJ);
|
||||
$data['recentjobs'] = $query->result();
|
||||
|
||||
extract($_POST);
|
||||
$redirected = false;
|
||||
@@ -851,10 +973,12 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$in = array();
|
||||
$in['title'] = $title;
|
||||
$in['description'] = $description;
|
||||
$in['timeline_days'] = $timeline;
|
||||
$in['job_detail'] =$this->input->post('job_detail'); // Somehow this doesnt show when large $job_detail;
|
||||
$in['price'] = $price * 100;
|
||||
$in['timeline_days'] = $this->input->post('timeline') ; //$timeline;
|
||||
$in['job_detail'] = trim( $this->input->post('job_detail') ); // Somehow this doesnt show when large $job_detail;
|
||||
$price = $this->input->post('price');
|
||||
$in['price'] = $price * 100; // (is_int($price)? $price:0) * 100;
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$in['country'] = $country_job;
|
||||
|
||||
$this->load->model('job_model');
|
||||
if ($this->job_model->verifyJobInputs($in) == true) {
|
||||
@@ -865,7 +989,6 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
if ($res == PHP_CREATED_OK) {
|
||||
// print_r($out);
|
||||
if ($out['job_id'] > 0) {
|
||||
|
||||
$this->processingJob($out['job_id']);
|
||||
$redirected = true;
|
||||
}
|
||||
@@ -878,6 +1001,20 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
}
|
||||
|
||||
$this->load->model('combo_model');
|
||||
$this->combo_model->defaultComboMessage = 'Select Job Country';
|
||||
$data['country_job'] = $this->combo_model->getCountryJobCombo('country', $country);
|
||||
$data['job_price'] = $this->combo_model->getJobPriceCombo('price','Naira', $price);
|
||||
|
||||
$data['title'] = $title;
|
||||
$data['description'] = $description;
|
||||
$data['timeline_days'] = $timeline;
|
||||
$data['job_detail'] = trim( $job_detail );
|
||||
$data['price'] = $price;
|
||||
$data['country'] = $country_job;
|
||||
|
||||
$data['page_title'] = "Create Job";
|
||||
|
||||
if ($redirected == false) {
|
||||
$this->load->model('dash_model');
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
@@ -886,12 +1023,17 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_create', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
// $this->load->view('jobs/view_create', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
|
||||
$this->renderSecurePage('jobs/view_create', $data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function processjob() {
|
||||
$jobID = $this->input->post('jobID');
|
||||
if ($jobID > 0) {
|
||||
@@ -902,13 +1044,26 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
}
|
||||
}
|
||||
|
||||
public function agreejobterms(){
|
||||
$data = $this->getSessionArray();
|
||||
$in = array();
|
||||
$in['action'] = WRENCHBOARD_ACCOUNT_TERMS;
|
||||
$in['action_item'] = ACCOUNT_AGREE_JOBS;
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
|
||||
if ($res == PHP_API_OK) {
|
||||
redirect('/jobs/create');
|
||||
}
|
||||
}
|
||||
|
||||
public function jobagree() {
|
||||
$data = $this->getSessionArray();
|
||||
//echo 'Ameye-- '. rand(100,999);
|
||||
//print_r($this->input->post());
|
||||
//$this->agreejobterms();
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
$in = array();
|
||||
$in['action'] = WRENCHBOARD_ACCOUNT_TERMS;
|
||||
$in['action_item'] = ACCOUNT_AGREE_JOBS;
|
||||
@@ -917,7 +1072,6 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
|
||||
|
||||
if ($res == PHP_API_OK) {
|
||||
redirect('/jobs/create');
|
||||
}
|
||||
@@ -925,13 +1079,7 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
|
||||
$data['page_key'] = 'WRB_POST_JOB_TERM';
|
||||
$data['txt_detail'] = $this->readFixedText($data['page_key']);
|
||||
|
||||
|
||||
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_jobagree', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->renderSecurePage('jobs/view_jobagree', $data);
|
||||
}
|
||||
|
||||
private function processingJob($jobID) {
|
||||
@@ -948,20 +1096,29 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
|
||||
$mysql = "SELECT title,description,timeline_days||' day(s)', price*0.01||'Naira' AS price, created::date"
|
||||
$mysql = "SELECT title,description,timeline_days||' day(s)' AS day_timeline, price*0.01||'Naira' AS price, created::date AS create_date, job_detail"
|
||||
. " FROM members_jobs WHERE id =" . $jobID . " AND member_id = " . $_SESSION['member_id'];
|
||||
$query = $this->db->query($mysql);
|
||||
$data['job_table_row'] = $query->row();
|
||||
$this->table->set_heading('Title', 'Description', 'Timeline', 'Price', 'Created');
|
||||
$data['job_table'] = $this->table->generate($query);
|
||||
|
||||
|
||||
$this->load->model('job_model'); // too bad I have to run again
|
||||
$jobData = $this->job_model->getJob($jobID);
|
||||
$data['job_description'] = $jobData->job_detail;
|
||||
$data['jobID'] = $jobID;
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_joboffer', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$activeJobData = $this->job_model->selectMarketJob($jobID);
|
||||
$data['active_job_data'] = $activeJobData;
|
||||
|
||||
// var_dump( $activeJobData );
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
// $this->load->view('jobs/view_joboffer', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
$data['page_title'] ="View Job";
|
||||
$this->renderSecurePage('jobs/view_joboffer', $data);
|
||||
|
||||
} else {
|
||||
redirect('/jobs/manage');
|
||||
}
|
||||
@@ -1111,7 +1268,7 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
$out = array();
|
||||
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
$out["status"] = '';
|
||||
//$out["status"] = '';
|
||||
//$res = $this->wrenchboard_api($in, $out);
|
||||
// print_r($out);
|
||||
|
||||
@@ -1240,11 +1397,14 @@ echo $this->getMarketInterestMessage( $data['offer_code'], $out['client_id'] )
|
||||
// array('data' => 'Del.', 'style' => 'width:80px')
|
||||
|
||||
$data['page_title'] = "Manage Job(s)";
|
||||
$data['job_table_rows'] = $query->result();
|
||||
|
||||
$data['job_table'] = $this->table->generate($query);
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_manage', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->load->view('users/view_footer_user', $data); */
|
||||
$this->renderSecurePage('jobs/view_manage', $data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,10 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
//Import Hybridauth's namespace
|
||||
use Hybridauth\Hybridauth;
|
||||
|
||||
class Login extends WRB_Controller {
|
||||
|
||||
public function __construct() {
|
||||
@@ -10,8 +15,28 @@ class Login extends WRB_Controller {
|
||||
$this->load->library(array('session', 'lib_login'));
|
||||
}
|
||||
|
||||
private function excudedEmails(){
|
||||
$ecData= [
|
||||
'ses66181+1@gmail.com',
|
||||
'tokslawus@gmail.com',
|
||||
'ses6681+3@gmail.com',
|
||||
'ameye@chiefsoft.com',
|
||||
'ses66181@gmail.com',
|
||||
];
|
||||
|
||||
if (in_array($_SESSION['username'], $ecData))
|
||||
{
|
||||
$_SESSION['allow_payment_features'] = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$_SESSION['allow_payment_features'] = false;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
public function index() {
|
||||
$data["login_message"] = "";
|
||||
$data["login_message"] = $this->session->flashdata('login_message');
|
||||
$this->load->library('form_validation');
|
||||
$this->form_validation->set_rules('username', 'Username', 'required');
|
||||
$this->form_validation->set_rules('password', 'Password', 'required');
|
||||
@@ -28,7 +53,7 @@ class Login extends WRB_Controller {
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
$is_live = $this->backend_model->cfgReadChar("system.live");
|
||||
// print_r($out);
|
||||
// print_r($out);
|
||||
if ($res == PHP_LOGIN_OK) {
|
||||
$this->load->model('account_model');
|
||||
$ret = $this->account_model->username_data($data);
|
||||
@@ -59,7 +84,11 @@ class Login extends WRB_Controller {
|
||||
$this->logUser('Account login');
|
||||
$this->refreshAccountDetail($_SESSION['member_id']);
|
||||
$this->getSessionArray();
|
||||
redirect('dash');
|
||||
$this->excudedEmails();
|
||||
$this->load->model('autopref_model');
|
||||
|
||||
$prefArray = $this->autopref_model->afterLoginPage();
|
||||
redirect($prefArray['returnPage']);
|
||||
}
|
||||
} else {
|
||||
$data["login_message"] = "Invalid username or password";
|
||||
@@ -69,30 +98,15 @@ class Login extends WRB_Controller {
|
||||
} else {
|
||||
echo validation_errors();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
if ($this->lib_login->is_authenticated()) {
|
||||
$fb_data = $this->lib_login->getData($this->lib_login->get_access_token());
|
||||
if (isset($fb_data['me'])) {
|
||||
$user = $fb_data['me'];
|
||||
$proceed = false;
|
||||
//$data["login_message"] = $user["id"]."/".$user["name"]."/".$user["email"]."<a href='".$this->lib_login->getLogoutUrl()."'>Logout</a>";
|
||||
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "') AND password IS NULL AND fb_id='" . $user["id"] . "'";
|
||||
$query = $this->db->query($q);
|
||||
if (count($query->result_array)) {
|
||||
// Account exists
|
||||
$proceed = true;
|
||||
} else {
|
||||
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "')";
|
||||
$query = $this->db->query($q);
|
||||
if (count($query->result_array)) {
|
||||
$data["login_message"] = "The e-mail " . $user["email"] . " is already registered. You should login with your username and password.";
|
||||
} else {
|
||||
// Create account
|
||||
$proceed = true;
|
||||
}
|
||||
}
|
||||
$user['facebook'] = 1;
|
||||
|
||||
list($proceed, $data) = $this->checkUserExists($user, $data);
|
||||
|
||||
if ($proceed) {
|
||||
$name = (string) $user["name"];
|
||||
if (trim($name) == "")
|
||||
@@ -123,10 +137,13 @@ class Login extends WRB_Controller {
|
||||
$_SESSION['mesaage_count'] = 0;
|
||||
$this->findOffers($_SESSION['email']);
|
||||
$_SESSION['message_snapshot'] = $this->myMessagesSnapshot();
|
||||
|
||||
$_SESSION['profile_picture'] = "../smedia/DEFAULTS/default-profile.png";
|
||||
$this->logUser('Account login');
|
||||
$this->refreshAccountDetail($_SESSION['member_id']);
|
||||
$this->getSessionArray();
|
||||
|
||||
$this->excudedEmails();
|
||||
|
||||
redirect('dash');
|
||||
}
|
||||
}
|
||||
@@ -138,30 +155,368 @@ class Login extends WRB_Controller {
|
||||
|
||||
if( strlen( $data["login_message"]) > 0 )
|
||||
{
|
||||
$data["login_message"] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $data["login_message"] . "</div></div>";
|
||||
$data["login_message"] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $data["login_message"] . "-<a href=\"/password_recovery\">Forgot Password ?</a></div></div>";
|
||||
}
|
||||
$data['title'] = "Login"; // Capitalize the first letter
|
||||
$data['page_title'] = "Login WrenchBoard";
|
||||
//$this->load->view('templates/header_boxed', $data);
|
||||
$this->load->view('users/view_login', $data);
|
||||
$this->load->view('users/view_external_footer');
|
||||
//----- long out $this->load->view('templates/header_boxed', $data);
|
||||
//$this->load->view('users/view_login', $data);
|
||||
//$this->load->view('users/view_external_footer');
|
||||
|
||||
// Load Hybridauth's helper
|
||||
$this->load->helper('hybridauth');
|
||||
|
||||
/*
|
||||
// Instantiate Hybridauth's classes
|
||||
$hybrid = new Hybridauth(get_hybridauth_config());
|
||||
|
||||
// Get login links
|
||||
$login_links = get_hybridauth_links($hybrid, $this->router);
|
||||
*/
|
||||
$login_links = array(
|
||||
'Google' => get_google_login_link(),
|
||||
'Apple' => get_apple_login_link()
|
||||
);
|
||||
// Pass login links to html template
|
||||
$data['login_links'] = $login_links;
|
||||
|
||||
// Render html template
|
||||
$this->load->view('site3/external/view_home',$data);
|
||||
}
|
||||
|
||||
//<a href="/password_recovery">Forgot Password ?</a>
|
||||
|
||||
|
||||
public function refreshAccountDetail($member_id) {
|
||||
public function refreshAccountDetail($member_id) {
|
||||
$this->load->model('account_model');
|
||||
$qr = $this->account_model->loadAccountData($member_id);
|
||||
// print_r($qr);
|
||||
$_SESSION['current_balance'] = $qr[0]['balance'];
|
||||
$this->load->model('account_model');
|
||||
|
||||
$_SESSION['current_balance'] = $this->account_model->getUserWallet($member_id,$currency='NAIRA'); // $out['current_balance'];
|
||||
// $_SESSION['current_balance'] = $qr[0]['balance'];
|
||||
$_SESSION['active_task'] = $this->account_model->loadActiveTaskCount($member_id);
|
||||
}
|
||||
|
||||
|
||||
private function checkUserExists($user, $data)
|
||||
{
|
||||
$proceed = false;
|
||||
$q = " AND external_idp_provider=1";
|
||||
if (is_array($user) && array_key_exists('google',$user)) {
|
||||
$q = " AND external_idp_provider=2";
|
||||
}
|
||||
//$data["login_message"] = $user["id"]."/".$user["name"]."/".$user["email"]."<a href='".$this->lib_login->getLogoutUrl()."'>Logout</a>";
|
||||
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "') AND password IS NULL AND external_idp_provider_id='" . $user["id"] . "'" . $q;
|
||||
$query = $this->db->query($q);
|
||||
if (count($query->result_array)) {
|
||||
// Account exists
|
||||
$proceed = true;
|
||||
} else {
|
||||
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "')";
|
||||
$query = $this->db->query($q);
|
||||
if (count($query->result_array)) {
|
||||
$data["login_message"] = "The e-mail " . $user["email"] . " is already registered. You should login with your username and password.";
|
||||
} else {
|
||||
// Create account
|
||||
$proceed = true;
|
||||
}
|
||||
}
|
||||
return array($proceed, $data);
|
||||
}
|
||||
|
||||
public function logout() {
|
||||
$this->lib_login->destroy_session();
|
||||
redirect('login', redirect);
|
||||
}
|
||||
|
||||
//Processes social login
|
||||
function auth($provider = NULL)
|
||||
{
|
||||
$data = array();
|
||||
// Load Hybridauth's helper
|
||||
$this->load->helper('hybridauth');
|
||||
$code = $this->input->get('code');
|
||||
$apple_code = '';
|
||||
if ($provider == 'apple') {
|
||||
$apple_code = $this->input->post('code');
|
||||
}
|
||||
if ($code!='') {
|
||||
$client = get_google_client();
|
||||
$token = $client->fetchAccessTokenWithAuthCode($code);
|
||||
if (is_array($token) && array_key_exists('access_token',$token)) {
|
||||
$client->setAccessToken($token['access_token']);
|
||||
|
||||
// get profile info
|
||||
$google_oauth = new Google_Service_Oauth2($client);
|
||||
$google_account_info = $google_oauth->userinfo->get();
|
||||
$id = $google_account_info->id;
|
||||
$email = $google_account_info->email;
|
||||
$name = $google_account_info->name;
|
||||
|
||||
//var_dump($google_account_info);
|
||||
//exit();
|
||||
|
||||
if ($id !='' && $email != '') {
|
||||
$user = array(
|
||||
'id' => $id,
|
||||
'name' => $name,
|
||||
'email' => $email,
|
||||
'google' => 1
|
||||
);
|
||||
list($proceed, $data) = $this->checkUserExists($user, $data);
|
||||
|
||||
if ($proceed) {
|
||||
|
||||
$this->provisionAccount($user, $data);
|
||||
|
||||
} else {
|
||||
// Cannot proceed - duplicate email?
|
||||
$this->session->set_flashdata('login_message','Cannot proceed - duplicate email');
|
||||
redirect('login');
|
||||
}
|
||||
} else {
|
||||
// Invalid or missing id and/or email - login failed?
|
||||
$this->session->set_flashdata('login_message','Invalid or missing id and/or email - login failed!');
|
||||
redirect('login');
|
||||
}
|
||||
} else {
|
||||
// Missing access token / invalid grant - expired credentials?
|
||||
$this->session->set_flashdata('login_message','Missing access token / invalid grant - expired credentials!');
|
||||
redirect('login');
|
||||
}
|
||||
} else if ($apple_code != '') {
|
||||
// Handle Apple
|
||||
if($_SESSION['apple_state'] != $this->input->post('state')) {
|
||||
// Invalid or missing state - login failed?
|
||||
$this->session->set_flashdata('login_message','Authorization server returned an invalid state parameter'
|
||||
.$_SESSION['apple_state'].'/'.$this->input->post('state'));
|
||||
unset($_SESSION['apple_state']);
|
||||
redirect('login');
|
||||
return;
|
||||
}
|
||||
// Token endpoint docs:
|
||||
// https://developer.apple.com/documentation/signinwithapplerestapi/generate_and_validate_tokens
|
||||
list($clientId, $clientSecret, $redirectUri) = get_apple_config();
|
||||
$data = [
|
||||
'grant_type' => 'authorization_code',
|
||||
'code' => $apple_code,
|
||||
'redirect_uri' => $redirectUri,
|
||||
'client_id' => $clientId,
|
||||
'client_secret' => $clientSecret,
|
||||
];
|
||||
$url = "https://appleid.apple.com/auth/token";
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch,CURLOPT_URL, $url);
|
||||
curl_setopt($ch,CURLOPT_POST, true);
|
||||
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
curl_setopt($ch,CURLOPT_HTTPHEADER, [
|
||||
'Accept: application/json',
|
||||
'Content-type: application/x-www-form-urlencoded',
|
||||
'User-Agent: curl', # Apple requires a user agent header at the token endpoint
|
||||
]);
|
||||
curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);
|
||||
$result = curl_exec($ch);
|
||||
curl_close($ch);
|
||||
|
||||
/*
|
||||
{
|
||||
"access_token": "adg61...67Or9",
|
||||
"token_type": "Bearer",
|
||||
"expires_in": 3600,
|
||||
"refresh_token": "rca7...lABoQ"
|
||||
"id_token": "eyJra...96sZg"
|
||||
}
|
||||
*/
|
||||
|
||||
$response = json_decode($result);
|
||||
|
||||
if(!isset($response->access_token)) {
|
||||
$this->session->set_flashdata('login_message','Error getting an access token');
|
||||
//echo '<pre>'; print_r($response); echo '</pre>';
|
||||
//echo $result; die();
|
||||
redirect('login');
|
||||
return;
|
||||
}
|
||||
|
||||
$claims = explode('.', $response->id_token)[1];
|
||||
$claims = json_decode(base64_decode($claims));
|
||||
|
||||
//echo '<h3>Access Token Response</h3>';
|
||||
//echo '<pre>'; print_r($response); echo '</pre>';
|
||||
|
||||
//echo '<h3>Parsed ID Token</h3>';
|
||||
//echo '<pre>'; print_r($claims); echo '</pre>';
|
||||
/*
|
||||
eyJraWQiOiJmaDZCczhDIiwiYWxnIjoiUlMyNTYifQ
|
||||
eyJpc3MiOiJodHRwczovL2FwcGxlaWQuYXBwbGUuY29tIiwiYXVkIjoiY29tLndyZW5jaGJvYXJkLnVzZXJzLmNsaWVudCIsImV4cCI6MTY1NDE3MjM5NywiaWF0IjoxNjU0MDg1OTk3LCJzdWIiOiIwMDE4MTAuMjBlNzUwMjhkNDljNDJkOGI0MzBiNDJkMWQ3NDg3ZjMuMTE1NyIsImF0X2hhc2giOiJPSzNfZlNtLUJZTEMzd3R5QTB4Q2pRIiwiZW1haWwiOiJhY2lkdW1pcmFlQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjoidHJ1ZSIsImF1dGhfdGltZSI6MTY1NDA4NTk2Mywibm9uY2Vfc3VwcG9ydGVkIjp0cnVlfQ
|
||||
jHxcOMAxUYEJx7nlmAXPN6PuqKMxVVcklGU5p6k16UvSS4DOM7nDwduo8D9FrzcjnTMGmLAThBYw2reilKv3vod034iTfBoL-vno_I7Wa-Iig5uTji7leaoDpfWyDAT7kFXpa6LVGdtZ8KdcVfSY-GF58JpKKQtf-sKB4sqnN1HAeCgYKP3EO5sf0zOttA7noZ_i6ITrmFbx5Mndf8Ktw-gb-LM-Ux11TEApByn4FcpL5m3ycvxxyaWsnLrGtraNK2S5N7Sby2imSB0iT9MFQRCL-4ddyD1YUDbpKLQDTlaSQuTPCX09AdMeLpx0wK6TAiTUUrOf93ljYU724Flb4g
|
||||
*/
|
||||
//die();
|
||||
$id = $claims->sub;
|
||||
echo "<h1>${id}</h1>";
|
||||
$email = $claims->email;
|
||||
|
||||
if ($id !='' && $email != '') {
|
||||
$user = array(
|
||||
'id' => $id,
|
||||
'name' => '',
|
||||
'email' => $email,
|
||||
'apple' => 1
|
||||
);
|
||||
list($proceed, $data) = $this->checkUserExists($user, $data);
|
||||
|
||||
if ($proceed) {
|
||||
|
||||
$this->provisionAccount($user, $data);
|
||||
|
||||
} else {
|
||||
// Cannot proceed - duplicate email?
|
||||
$this->session->set_flashdata('login_message','Cannot proceed - duplicate email');
|
||||
redirect('login');
|
||||
}
|
||||
} else {
|
||||
// Invalid or missing id and/or email - login failed?
|
||||
$this->session->set_flashdata('login_message','Invalid or missing id and/or email - login failed!');
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
} else {
|
||||
// Invalid or missing code - login failed?
|
||||
$this->session->set_flashdata('login_message','Invalid or missing code - login failed!');
|
||||
redirect('login');
|
||||
}
|
||||
}
|
||||
|
||||
private function provisionAccount($user, $data)
|
||||
{
|
||||
$name = (string) $user["name"];
|
||||
if (trim($name) == "") {
|
||||
$name = strtok($user["email"], "@");
|
||||
}
|
||||
if (array_key_exists('google',$user)) {
|
||||
$data['google_id'] = $user["id"];
|
||||
$data['action'] = WRENCHBOARD_GOOGLE_LOGIN;
|
||||
} else {
|
||||
$data['apple_id'] = $user["id"];
|
||||
$data['action'] = WRENCHBOARD_APPLE_LOGIN;
|
||||
}
|
||||
$data['firstname'] = strtok($name, " ");
|
||||
$data['lastname'] = strtok(" ");
|
||||
$data['email'] = $user["email"];
|
||||
$data['sessionid'] = rand(10000, 99999) . "A" . rand(10000, 99999);
|
||||
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
if ($res == PHP_LOGIN_OK) {
|
||||
$this->load->model('account_model');
|
||||
$ret = $this->account_model->username_data($out);
|
||||
if ($res !== false) {
|
||||
$data["login_message"] = "Welcome...";
|
||||
// yes person has an account
|
||||
$_SESSION['session_id'] = $out["session"];
|
||||
$_SESSION['username'] = $ret->username;
|
||||
$_SESSION['name'] = $ret->username;
|
||||
$_SESSION['firstname'] = $ret->firstname;
|
||||
$_SESSION['lastname'] = $ret->lastname;
|
||||
$_SESSION['email'] = $ret->email;
|
||||
$_SESSION['member_id'] = $ret->id;
|
||||
$_SESSION['log_count'] = 0;
|
||||
$_SESSION['mesaage_count'] = 0;
|
||||
$this->findOffers($_SESSION['email']);
|
||||
$_SESSION['message_snapshot'] = $this->myMessagesSnapshot();
|
||||
$_SESSION['profile_picture'] = "../smedia/DEFAULTS/default-profile.png";
|
||||
$this->logUser('Account login');
|
||||
$this->refreshAccountDetail($_SESSION['member_id']);
|
||||
$this->getSessionArray();
|
||||
|
||||
$this->excudedEmails();
|
||||
|
||||
redirect('dash');
|
||||
} else {
|
||||
// Cannot proceed - account model error?
|
||||
$this->session->set_flashdata('login_message','Cannot proceed - account model error: '.$ret);
|
||||
redirect('login');
|
||||
}
|
||||
} else {
|
||||
// Cannot proceed - backend error?
|
||||
$msg = (is_array($out) && array_key_exists('status',$out) && $out['status']!='')
|
||||
? $out ['status'] : json_encode($out);
|
||||
$this->session->set_flashdata('login_message','Cannot proceed - backend error: '.$msg);
|
||||
redirect('login');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//Processes social login
|
||||
function authh($provider = NULL)
|
||||
{
|
||||
// Load Hybridauth's helper
|
||||
$this->load->helper('hybridauth');
|
||||
|
||||
$service = NULL;
|
||||
|
||||
try
|
||||
{
|
||||
//Instantiate Hybridauth's classes
|
||||
$hybrid = new Hybridauth(get_hybridauth_config());
|
||||
|
||||
//Check if given provider is enabled
|
||||
if ((isset($provider)) && in_array($provider, $hybrid->getProviders()))
|
||||
{
|
||||
$this->session->set_userdata('provider', $provider);
|
||||
}
|
||||
|
||||
//Update variable with the valid provider
|
||||
$provider = $this->session->userdata('provider');
|
||||
|
||||
if ($provider)
|
||||
{
|
||||
$service = $hybrid->authenticate($provider);
|
||||
var_dump($service);
|
||||
exit();
|
||||
if ($service->isConnected())
|
||||
{
|
||||
//Get user profile
|
||||
$profile = $service->getUserProfile();
|
||||
|
||||
//Get user contacts
|
||||
$contacts = $service->getUserContacts();
|
||||
|
||||
/*
|
||||
Disconnect the service else HA would reuse stored session data
|
||||
rather making a fresh request in case the user has denied permissions
|
||||
in the previous authorization request
|
||||
*/
|
||||
$service->disconnect();
|
||||
|
||||
$this->session->unset_userdata('provider');
|
||||
|
||||
//Display the profile data
|
||||
echo 'Name: ' . $profile->displayName;
|
||||
print_r($profile);
|
||||
exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->session->set_flashdata('showmsg', array('msg' => 'Sorry! We couldn\'t authenticate your identity.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
if (isset($service) && $service->isConnected())
|
||||
$service->disconnect();
|
||||
|
||||
$error = 'Sorry! We couldn\'t authenticate you.';
|
||||
$this->session->set_flashdata('showmsg', array('msg' => $error));
|
||||
$error .= '\nError Code: ' . $e->getCode();
|
||||
$error .= '\nError Message: ' . $e->getMessage();
|
||||
|
||||
log_message('error', $error);
|
||||
}
|
||||
|
||||
//redirect();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -26,7 +26,25 @@ class Member extends Users_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Schedule account delete in the backend
|
||||
*/
|
||||
public function deleteacc(){
|
||||
// echo "Please log out of your account, and you will not be able to log in anymore. ";
|
||||
$data = $this->getSessionArray();
|
||||
$in = [];
|
||||
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$in['reason'] = "Not accepted in this version";
|
||||
$in['action'] = WRENCHBOARD_USER_DELETEACC;
|
||||
if ($this->wrenchboard_api($in, $outx) == PHP_API_OK) {
|
||||
$data['delete_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">Your Account and Information Deleted.</div></div>";
|
||||
redirect('/logout');
|
||||
} else {
|
||||
$data['delete_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">Unable to complete account delete at this time. </div></div>";
|
||||
}
|
||||
echo $data['delete_message'];
|
||||
}
|
||||
|
||||
public function addreccipient() {
|
||||
|
||||
@@ -250,9 +268,12 @@ class Member extends Users_Controller {
|
||||
//stdClass Object ( [id] => 146 [code] => NG [country] => Nigeria [phone_code] => 234 [allow] => 2017-01-08 10:30:42.259079-05 [status] => 1 [created] => 2017-01-08 10:30:15.087696 [updated] => 2017-01-08 10:30:15.087696 )
|
||||
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_profile', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->load->view('users/view_footer_user', $data);*/
|
||||
|
||||
$this->RenderUserPage('users/view_profile', $data);
|
||||
|
||||
}
|
||||
|
||||
public function picture() {
|
||||
@@ -438,9 +459,12 @@ class Member extends Users_Controller {
|
||||
|
||||
$data['galery_list'] = $this->getGaleryList($_SESSION['member_id']);
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_yourpage', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
$data['page_title'] ="My Page";
|
||||
$this->renderSecurePage('users/view_yourpage', $data);
|
||||
}
|
||||
|
||||
|
||||
@@ -583,6 +607,25 @@ class Member extends Users_Controller {
|
||||
|
||||
public function addfund() {
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
|
||||
$data['sendmoney_table'] = $this->table->generate($query);
|
||||
$data['sendmoney_table_result'] = $query->result();
|
||||
|
||||
|
||||
$data['page_key'] = 'WRB_FUND_ACCOUNT';
|
||||
$data['txt_detail'] = $this->readFixedText($data['page_key']);
|
||||
$data['txt_detail'] = str_replace("[how-it-worked-image-1]", "<img src='/assets/images/howitworks/howitworks-1.jpg' alt=''>", $data['txt_detail']);
|
||||
@@ -619,10 +662,6 @@ class Member extends Users_Controller {
|
||||
public function balance() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
|
||||
|
||||
|
||||
$data['add_error'] = '';
|
||||
$data['amount'] = 0;
|
||||
$this->load->model('combo_model');
|
||||
@@ -632,6 +671,28 @@ class Member extends Users_Controller {
|
||||
$data['comment'] = '';
|
||||
// $data['fee'] = 0;
|
||||
//$data['escrow_balance'] = 0;
|
||||
$this->load->model('report_model');
|
||||
$this->load->model('account_model');
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
|
||||
$data['sendmoney_table'] = $this->table->generate($query);
|
||||
$data['sendmoney_table_result'] = $query->result();
|
||||
$data['card_payment_data_result'] = $this->report_model->getCardPurchase(6)['card_payment_data_result'];
|
||||
$data['card_coupon_data_result'] = $this->report_model->getRedeemCouponsList(6)['card_coupon_data_result'];
|
||||
|
||||
$data['wallet'] = $this->account_model->getUserWallet( $_SESSION['member_id']);
|
||||
|
||||
|
||||
if ($_POST) {
|
||||
$data['comment'] = $this->input->post('comment');
|
||||
@@ -664,24 +725,84 @@ class Member extends Users_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$data['page_title'] ="Wallet";
|
||||
$this->RenderUserPage('users/view_balance', $data);
|
||||
}
|
||||
|
||||
|
||||
public function smoney() {
|
||||
$data = $this->getSessionArray();
|
||||
//var_dump($data);
|
||||
//exit();
|
||||
|
||||
$data['add_error'] = '';
|
||||
$data['amount'] = 0;
|
||||
$this->load->model('combo_model');
|
||||
$data['recipient_account'] = $this->input->post('recipient_account');
|
||||
$data['recipient_account_combo'] = $this->combo_model->getUserRecipientCombo('recipient_account', $_SESSION['member_id'], $data['recipient_account']);
|
||||
$data['fee'] = $data['total'] =0;
|
||||
$data['comment'] = '';
|
||||
// $data['fee'] = 0;
|
||||
//$data['escrow_balance'] = 0;
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($_SESSION['member_id'],$currency='NAIRA'); // $out['current_balance'];
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
|
||||
if ($_POST) {
|
||||
$data['comment'] = $this->input->post('comment');
|
||||
$data['amount'] = $this->input->post('amount') + 0; // must be number [still in full will be cents to go to backend latter]
|
||||
|
||||
if ($data['amount'] == 0 || $data['amount'] < 0 || $data['amount'] == '' || $data['recipient_account'] == '') {
|
||||
$out['error'] = 'Amount & Recipient Account Required';
|
||||
$data['add_error'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
if ($data['amount'] > 0) {
|
||||
$outx = $this->transactionFee($data['amount'], $_SESSION['member_id']);
|
||||
$data['total'] = $outx['total_amount'];
|
||||
$data['fee'] = $outx['processing_fee'];
|
||||
}
|
||||
} else {
|
||||
|
||||
$outx = $this->transactionFee($data['amount'], $_SESSION['member_id']);
|
||||
$data['total'] = $outx['total_amount'];
|
||||
$data['fee'] = $outx['processing_fee'];
|
||||
|
||||
$TotalAmount = $data['total'];
|
||||
|
||||
// now let us do initial check if you have enough money
|
||||
if ($data['current_balance'] < $TotalAmount) {
|
||||
$out['error'] = 'You do not have enough balance for this transfer';
|
||||
$data['add_error'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
} else {
|
||||
$this->session->set_flashdata('pending_sendmoney', $data);
|
||||
redirect('member/confirmwithdraw');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
|
||||
$data['sendmoney_table'] = $this->table->generate($query);
|
||||
$data['sendmoney_table_result'] = $query->result();
|
||||
$data['page_title'] ="Wallet";
|
||||
|
||||
$this->RenderUserPage('users/view_balance', $data);
|
||||
|
||||
|
||||
$this->RenderUserPage('users/view_smoney', $data);
|
||||
}
|
||||
|
||||
|
||||
public function fee() {
|
||||
$amount = $this->input->get('amount') + 0;
|
||||
$res = $this->transactionFee($amount, $_SESSION['member_id']);
|
||||
@@ -705,41 +826,41 @@ class Member extends Users_Controller {
|
||||
public function confirmwithdraw() {
|
||||
$final_page = false;
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
//$data = $this->getSessionArray();
|
||||
|
||||
if ($_POST) {
|
||||
$smIn =[];
|
||||
$smIn['member_id'] = $_SESSION['member_id'];
|
||||
$smIn['action'] = WRENCHBOARD_SMONEY_MEMBER;
|
||||
$smIn["senderid"] = $_SESSION['member_id'];
|
||||
$smIn["InitiatingEntityCode"] = "MBA";
|
||||
|
||||
//$data = array();
|
||||
$data['member_id'] = $_SESSION['member_id'];
|
||||
$data['action'] = WRENCHBOARD_SMONEY_MEMBER;
|
||||
$data["senderid"] = $_SESSION['member_id'];
|
||||
$data["InitiatingEntityCode"] = "MBA";
|
||||
$smIn['InitiatingAmount'] = $this->input->post('amount') * 100;
|
||||
$smIn['Fee'] = $this->input->post('fee') * 100;
|
||||
|
||||
$data['InitiatingAmount'] = $this->input->post('amount') * 100;
|
||||
$data['Fee'] = $this->input->post('fee') * 100;
|
||||
$smIn["InitiatingChannel"] = 7;
|
||||
$smIn["InitiatingPaymentMethodCode"] = "CA";
|
||||
$smIn["InitiatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
//$smIn["recipientid"] = $this->input->post('recipient_account');
|
||||
$smIn['recipientid'] = $this->input->post('recipientid');
|
||||
$smIn["transaction_id"] = "T" . rand(120000, 999999);
|
||||
$smIn["TerminatingPaymentMethodCode"] = "AC";
|
||||
$smIn["TerminatingAmount"] = $smIn["InitiatingAmount"];
|
||||
$smIn["TerminatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
$smIn["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
|
||||
|
||||
$data["InitiatingChannel"] = 7;
|
||||
$data["InitiatingPaymentMethodCode"] = "CA";
|
||||
$data["InitiatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
//$data["recipientid"] = $this->input->post('recipient_account');
|
||||
$data['recipientid'] = $this->input->post('recipientid');
|
||||
$data["transaction_id"] = "T" . rand(120000, 999999);
|
||||
$data["TerminatingPaymentMethodCode"] = "AC";
|
||||
$data["TerminatingAmount"] = $data["InitiatingAmount"];
|
||||
$data["TerminatingCurrencyCode"] = '566'; // 566 - NRN - Naira
|
||||
$data["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
|
||||
$final_page = true;
|
||||
if ($data['recipientid'] != '' && $data['recipientid'] > 0 && $data['InitiatingAmount'] > 0 && $data['Fee'] >= 0) {
|
||||
if ($smIn['recipientid'] != '' && $smIn['recipientid'] > 0 && $smIn['InitiatingAmount'] > 0 && $smIn['Fee'] >= 0) {
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
$res = $this->backend_model->wrenchboard_api($smIn, $out);
|
||||
// print_r($out);
|
||||
// exit;
|
||||
$data = $this->getSessionArray(); // you will need this for new balace
|
||||
$data["fee"] = $out["Fee"];
|
||||
$data["amount"] = $out["InitiatingAmount"];
|
||||
$data["total"] = $data["fee"] + $data["amount"];
|
||||
$data["recipient_account_detail"] = "Recipient Account Here";
|
||||
$data["comment"] = "Coment Here";
|
||||
$data["comment"] = "Comment Here";
|
||||
|
||||
$data["rec_firstname"] = $out["firstname"];
|
||||
$data["rec_lastname"] = $out["lastname"];
|
||||
@@ -770,7 +891,10 @@ class Member extends Users_Controller {
|
||||
*/
|
||||
} else {
|
||||
$pending_sendmoney = $this->session->flashdata('pending_sendmoney');
|
||||
$data['amount'] = 0;
|
||||
// var_dump($pending_sendmoney);
|
||||
if (!isset($pending_sendmoney)){
|
||||
redirect('member/balance');
|
||||
}
|
||||
$data['amount'] = $pending_sendmoney['amount'];
|
||||
$data['total'] = $pending_sendmoney['total'];
|
||||
$data['fee'] = $pending_sendmoney['fee'];
|
||||
@@ -782,18 +906,45 @@ class Member extends Users_Controller {
|
||||
$this->load->model('combo_model');
|
||||
$this->combo_model->setReadOnly(true);
|
||||
$data['recipient_account_combo'] = $this->combo_model->getUserRecipientCombo('recipient_account', $_SESSION['member_id'], $data['recipient_account']);
|
||||
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
$this->RenderUserPage('users/view_confirmwithdraw', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->RenderUserPage('users/view_confirmwithdraw', $data);
|
||||
} else {
|
||||
|
||||
//$this->load->view('users/view_header_user', $data);
|
||||
$this->RenderUserPage('users/view_finalwithdraw', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->session->set_flashdata('reciept_sendmoney', $data);
|
||||
redirect('member/sendMoneyReciepts');
|
||||
|
||||
// $data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
// $this->RenderUserPage('users/view_finalwithdraw', $data);
|
||||
}
|
||||
}
|
||||
|
||||
public function sendMoneyReciepts(){
|
||||
|
||||
$data = $this->session->flashdata('reciept_sendmoney');
|
||||
// var_dump($pending_sendmoney);
|
||||
if (!isset($data)){
|
||||
redirect('member/balance');
|
||||
}
|
||||
|
||||
$data['sendmoney_table_result'] = $this->getSendMoneyRecent();
|
||||
$this->RenderUserPage('users/view_finalwithdraw', $data);
|
||||
}
|
||||
|
||||
private function getSendMoneyRecent(){
|
||||
|
||||
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
return $query->result();
|
||||
|
||||
}
|
||||
public function completewithdraw() {
|
||||
|
||||
echo 'Not attached - backend implemented already';
|
||||
@@ -817,7 +968,7 @@ class Member extends Users_Controller {
|
||||
|
||||
$myTable .="</table>";
|
||||
|
||||
|
||||
$data['page_title'] ="Messages";
|
||||
//$this->table->set_heading(array('data' => 'Date', 'style' => 'width:110px'), 'Message');
|
||||
$data['message_table'] = $myTable; //$this->table->generate($query);
|
||||
$this->RenderUserPage('users/view_message', $data);
|
||||
@@ -894,7 +1045,11 @@ class Member extends Users_Controller {
|
||||
|
||||
$this->load->library('pagination');
|
||||
$config = array();
|
||||
|
||||
/*
|
||||
*
|
||||
* 7 | MEMBER_NEWCARD_PAYM | MNCCD | 0
|
||||
8 | MEMBER_RETCARD_PAYM | MRCCD | 0
|
||||
*/
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
@@ -902,7 +1057,10 @@ class Member extends Users_Controller {
|
||||
. "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' "
|
||||
. "WHEN code ='SMPAY' THEN 'Account Withdraw' "
|
||||
. "WHEN code ='COCNL' THEN 'Cancellation Refund' "
|
||||
. "WHEN code ='COPAY' THEN 'Completed Task Payment' ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation "
|
||||
. "WHEN code ='COPAY' THEN 'Completed Task Payment' "
|
||||
. "WHEN code ='MNCCD' THEN 'New Card Payment' "
|
||||
. "WHEN code ='MRCCD' THEN 'Repeat Card Payment' "
|
||||
. "ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation "
|
||||
. "FROM members_payments "
|
||||
. "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC";
|
||||
$query = $this->db->query($mysql);
|
||||
@@ -935,20 +1093,25 @@ class Member extends Users_Controller {
|
||||
$page = is_numeric($page) ? $page : 0;
|
||||
|
||||
$mysql = "SELECT added::date,(CASE WHEN code = 'OFDPS' THEN 'Job Offer Deposit' "
|
||||
. "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' "
|
||||
. "WHEN code ='SMPAY' THEN 'Account Withdraw' "
|
||||
. "WHEN code ='COCNL' THEN 'Cancellation Refund' "
|
||||
. "WHEN code ='COPAY' THEN 'Completed Task Payment' ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation "
|
||||
. "FROM members_payments "
|
||||
. "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
|
||||
. "WHEN code ='OFRFD' THEN 'Job Offer Refund' WHEN code='MDEPT' THEN 'Account Depoist' "
|
||||
. "WHEN code ='SMPAY' THEN 'Account Withdraw' "
|
||||
. "WHEN code ='COCNL' THEN 'Cancellation Refund' "
|
||||
. "WHEN code ='COPAY' THEN 'Completed Task Payment' "
|
||||
. "WHEN code ='MNCCD' THEN 'New Card Payment' "
|
||||
. "WHEN code ='MRCCD' THEN 'Repeat Card Payment' "
|
||||
. "ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation "
|
||||
. "FROM members_payments "
|
||||
. "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:110px'), 'Description', array('data' => 'Amount', 'style' => 'width:100px'), array('data' => 'Fee', 'style' => 'width:70px'), array('data' => 'Confirmation', 'style' => 'width:100px'));
|
||||
$data['payment_result'] = $this->table->generate($query);
|
||||
$data['payment_data_result'] = $query->result();
|
||||
$data["links"] = $this->pagination->create_links();
|
||||
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
$data['page_title'] ="Payments Report";
|
||||
$this->RenderUserPage('users/view_payment', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
}
|
||||
@@ -966,13 +1129,13 @@ class Member extends Users_Controller {
|
||||
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
$in = [];
|
||||
//$email = $this->input->post('email');
|
||||
// $firstname = $this->input->post('firstname');
|
||||
// $lastname = $this->input->post('lastname');
|
||||
$your_message = $this->input->post('msg');
|
||||
$data['firstname'] = $_SESSION['firstname']; // $firstname;
|
||||
$data['lastname'] = $_SESSION['lastname']; // $lastname;
|
||||
$in['firstname'] = $_SESSION['firstname']; // $firstname;
|
||||
$in['lastname'] = $_SESSION['lastname']; // $lastname;
|
||||
// if ($firstname == '' || $lastname == '') {
|
||||
// $message = 'Both first and last name are required';
|
||||
// }
|
||||
@@ -986,14 +1149,14 @@ class Member extends Users_Controller {
|
||||
// }
|
||||
|
||||
if ($message == '') {
|
||||
$data['email'] = $_SESSION['email']; // $email;
|
||||
$in['email'] = $_SESSION['email']; // $email;
|
||||
|
||||
$data['your_message'] = $your_message;
|
||||
$data['loc'] = $_SERVER['REMOTE_ADDR']; //'38.101.241.200';
|
||||
$data['action'] = WRENCHBOARD_SEND_CONTACTUS;
|
||||
$in['your_message'] = $your_message;
|
||||
$in['loc'] = $_SERVER['REMOTE_ADDR']; //'38.101.241.200';
|
||||
$in['action'] = WRENCHBOARD_SEND_CONTACTUS;
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($data, $out);
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
$message = "Your message was sent";
|
||||
$email = $firstname = $lastname = $your_message = "";
|
||||
} else {
|
||||
@@ -1054,9 +1217,12 @@ class Member extends Users_Controller {
|
||||
|
||||
$data["calendar_data"] = $calendar_data;
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_schedule', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
// $this->load->view('users/view_schedule', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
|
||||
$this->renderSecurePage('users/view_schedule', $data);
|
||||
|
||||
}
|
||||
|
||||
public function userlog() {
|
||||
@@ -1079,11 +1245,53 @@ class Member extends Users_Controller {
|
||||
public function settings() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_settings', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$q = "SELECT id,title,description,pref_id FROM members_settings_options ORDER BY lorder ASC";
|
||||
$query = $this->db->query($q);
|
||||
$data['settings_option'] = $query->result_array();
|
||||
|
||||
$q2 = "SELECT pref_id FROM members_settings WHERE member_id = " . $_SESSION['member_id'] . " AND status = 100";
|
||||
$query2 = $this->db->query($q2);
|
||||
|
||||
$selRes = [];
|
||||
$sel_vals = $query2->result_array();
|
||||
foreach ($sel_vals as $rw){
|
||||
$selRes[] =$rw['pref_id'];
|
||||
}
|
||||
|
||||
$data['selected_settings'] = $selRes;
|
||||
|
||||
$this->RenderUserPage('users/view_settings', $data);
|
||||
}
|
||||
|
||||
public function accsettings(){
|
||||
$data = $this->getSessionArray();
|
||||
|
||||
if ($_GET) {
|
||||
|
||||
$set_type = $this->input->get('set_type');
|
||||
$seval = $this->input->get('seval');
|
||||
if ( $set_type !='' && $seval !='' ){
|
||||
$in = array();
|
||||
$in['status'] =$seval;
|
||||
$in['pref_id'] =$set_type;
|
||||
$in['action'] = WRENCHBOARD_USER_SETTINGS;
|
||||
$in['sessionid'] = $_SESSION['session_id'];
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
if ($res != PHP_API_OK) {
|
||||
echo '<span style=\"color: green;\">updated</span>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private function AgetSessionArray() {
|
||||
$data = $_SESSION['secure_data'];
|
||||
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
|
||||
|
||||
@@ -7,9 +7,10 @@ class Outmessage extends CI_Controller {
|
||||
$data['account_email'] = ''; //$data['username'];
|
||||
$data['title'] = "Message"; //ucfirst($page); // Capitalize the first letter
|
||||
$data['page_title'] = "Verify Email.";
|
||||
$this->load->view('templates/header_boxed', $data);
|
||||
$this->load->view('users/view_outmessage', $data);
|
||||
$this->load->view('templates/footer_boxed', $data);
|
||||
//$this->load->view('templates/header_boxed', $data);
|
||||
//$this->load->view('users/view_outmessage', $data);
|
||||
//$this->load->view('templates/footer_boxed', $data);
|
||||
$this->load->view('site3/external/view_signup_started',$data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,29 +5,36 @@ defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
class Password_recovery extends CI_Controller {
|
||||
|
||||
public function index() {
|
||||
//echo "ameye kvkgkg";
|
||||
$data = [];
|
||||
$data['hcaptcha_site_key'] = "416c2382-9d6e-4131-bb58-e61b33f46a8b";
|
||||
$data['hcaptcha_secret'] = "0x371da01B1407137aCb0FcCB387753450DFD096BC";
|
||||
|
||||
$data['action_message'] = "";
|
||||
|
||||
|
||||
if ($_POST) {
|
||||
|
||||
$data['email'] = $this->input->post('email');
|
||||
if ($data['email'] == '') {
|
||||
$out['error'] = 'Please specify valid emal to continue';
|
||||
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
$data['h-captcha-response'] = $this->input->post('h-captcha-response');
|
||||
if ($this->verifyCaptcha($data)) {
|
||||
$data['email'] = $this->input->post('email');
|
||||
if ($data['email'] == '') {
|
||||
$out['error'] = 'Please specify valid emal to continue';
|
||||
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
} else {
|
||||
$this->resetMemberPass($data['email']);
|
||||
$out['error'] = " If we find your email, you will receive a link to reset your password. Please use or <a
|
||||
href='https://www.wrenchboard.com/contact'>contact form</a> if you did not get our message after few minutes. ";
|
||||
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $out['error'] . "</div></div>";
|
||||
}
|
||||
} else {
|
||||
//WRENCHBOARD_ACCOUNT_RESETPASS
|
||||
|
||||
$this->resetMemberPass($data['email']);
|
||||
|
||||
$out['error'] = "If we find your email, you will receive a link to reset your password. Please use or <a href='/contact'>contact form</a> if you did not get our message after few minutes. ";
|
||||
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $out['error'] . "</div></div>";
|
||||
$out['error'] = 'Please verify that you are human';
|
||||
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
|
||||
}
|
||||
|
||||
}
|
||||
$data["message"] = "Enter your account username, Email.<br> We will send you an email to reset your password";
|
||||
$this->load->view('users/view_external_header');
|
||||
$this->load->view('users/view_password_recovery', $data);
|
||||
$this->load->view('users/view_external_footer');
|
||||
// $this->load->view('users/view_external_header');
|
||||
// $this->load->view('users/view_password_recovery', $data);
|
||||
// $this->load->view('users/view_external_footer');
|
||||
$this->load->view('site3/external/view_resetpass',$data);
|
||||
//
|
||||
}
|
||||
|
||||
var $actionMessage = '';
|
||||
@@ -52,4 +59,27 @@ class Password_recovery extends CI_Controller {
|
||||
return $this->actionMessage;
|
||||
}
|
||||
|
||||
private function verifyCaptcha($verify_data) {
|
||||
if (!is_array($verify_data) || !array_key_exists('hcaptcha_secret',$verify_data) || $verify_data['hcaptcha_secret']==''
|
||||
|| !array_key_exists('h-captcha-response',$verify_data) || $verify_data['h-captcha-response']=='') {
|
||||
return false;
|
||||
}
|
||||
$data = array(
|
||||
'secret' => $verify_data['hcaptcha_secret'],
|
||||
'response' => $verify_data['h-captcha-response']
|
||||
);
|
||||
$verify = curl_init();
|
||||
curl_setopt($verify, CURLOPT_URL, "https://hcaptcha.com/siteverify");
|
||||
curl_setopt($verify, CURLOPT_POST, true);
|
||||
curl_setopt($verify, CURLOPT_POSTFIELDS, http_build_query($data));
|
||||
curl_setopt($verify, CURLOPT_RETURNTRANSFER, true);
|
||||
$response = curl_exec($verify);
|
||||
// var_dump($response);
|
||||
$responseData = json_decode($response);
|
||||
if(is_object($responseData) && property_exists($responseData, 'success') && $responseData->success) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,156 @@
|
||||
<?php
|
||||
|
||||
class Paymnt extends Users_Controller {
|
||||
|
||||
public function index() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
|
||||
redirect(home);
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public function paymus() {
|
||||
|
||||
$data = $this->getSessionArray();
|
||||
$data['card_table_result'] = $this->cardListData(4)['card_table_result'];
|
||||
$data['page_title'] ="Deposit Funds";
|
||||
// $this->RenderUserPage('users/view_startpaymus', $data);
|
||||
$this->RenderUserPage('users/view_selectpay', $data);
|
||||
}
|
||||
|
||||
public function paycc() {
|
||||
$data = $this->getSessionArray();
|
||||
$data['card_table_result'] = $this->cardListData(4)['card_table_result'];
|
||||
$data['page_title'] ="Deposit Funds with Credit or Debit Card(s)";
|
||||
$this->RenderUserPage('users/view_startpaymus', $data);
|
||||
}
|
||||
|
||||
public function paypal() {
|
||||
$data = $this->getSessionArray();
|
||||
$data['card_table_result'] = $this->cardListData(4)['card_table_result'];
|
||||
$data['page_title'] ="Deposit Funds with PayPal";
|
||||
$this->RenderUserPage('users/view_paypal', $data);
|
||||
}
|
||||
|
||||
public function paybankdeposit() {
|
||||
$data = $this->getSessionArray();
|
||||
$data['card_table_result'] = $this->cardListData(4)['card_table_result'];
|
||||
$data['page_title'] ="Deposit Funds";
|
||||
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
|
||||
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name AS Recitient,mp.confirmation,"
|
||||
. "CASE WHEN m.status=1 THEN 'Pending' WHEN m.status=3 THEN 'Cancelled' WHEN m.status=5 THEN 'Completed' ELSE '' END AS Status "
|
||||
. "FROM money_transfer m "
|
||||
. "LEFT JOIN sendmoney_recipient r ON r.id = m.recipientid "
|
||||
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
|
||||
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
|
||||
. "WHERE m.member_id =" . $_SESSION['member_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
|
||||
$data['sendmoney_table'] = $this->table->generate($query);
|
||||
$data['sendmoney_table_result'] = $query->result();
|
||||
|
||||
|
||||
$data['page_key'] = 'WRB_FUND_ACCOUNT';
|
||||
$data['txt_detail'] = $this->readFixedText($data['page_key']);
|
||||
$data['txt_detail'] = str_replace("[how-it-worked-image-1]", "<img src='/assets/images/howitworks/howitworks-1.jpg' alt=''>", $data['txt_detail']);
|
||||
$data['txt_detail'] = str_replace("[how-it-worked-image-2]", "<img src='/assets/images/howitworks/howitworks-2.jpg' alt=''>", $data['txt_detail']);
|
||||
|
||||
$this->RenderUserPage('users/view_bankdeposit', $data);
|
||||
}
|
||||
|
||||
|
||||
private function cardListData($limit){
|
||||
$data = array();
|
||||
$mysql = "SELECT * FROM creditcard WHERE member_id = " . $_SESSION['member_id'] . " AND status =3 AND active =1 ORDER BY id DESC limit ".$limit;
|
||||
$query = $this->db->query($mysql);
|
||||
$data['card_table_result'] = $query->result();
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public function newcc(){
|
||||
$data = $this->getSessionArray();
|
||||
if ($_POST) {
|
||||
$this->load->model('cardpay_model');
|
||||
$cd = array();
|
||||
$cd['cardnumber'] = $this->input->post('cardnumber');
|
||||
$cd['exp_month'] = $this->input->post('exp_month');
|
||||
$cd['exp_year'] = $this->input->post('exp_year');
|
||||
$cd['cvc'] = $this->input->post('cvc');
|
||||
$cd['description']= $this->input->post('description');
|
||||
//$amount = rand(5555,9999);
|
||||
//$amount = rand(450,700);
|
||||
$cd['amount'] = $this->input->post('amount');
|
||||
$cd['postal'] = $this->input->post('postal');
|
||||
|
||||
$cardTestResult= $this->cardpay_model->verifyCardData($cd);
|
||||
|
||||
//var_dump($cardTestResult);
|
||||
//var_dump($cd);
|
||||
|
||||
|
||||
if ( $cardTestResult['error_status'] == false) // no error
|
||||
{
|
||||
$member_id = $_SESSION['member_id'];
|
||||
$email ="support@wrenchboard.com";
|
||||
$cardData=array(
|
||||
"action" => WRENCHBOARD_USER_ADNEWCC,
|
||||
"cardnumber" => $cd['cardnumber'],
|
||||
"exp_month" => $cd['exp_month'],
|
||||
"exp_year" => $cd['exp_year'],
|
||||
"cvc" => $cd['cvc'],
|
||||
"amount" => $cd['amount'],
|
||||
"email" => $email,
|
||||
"description" => $cd['description'],
|
||||
"member_id" => $member_id,
|
||||
"postal" => $cd['postal'] ,
|
||||
"paymenttype" => 100
|
||||
);
|
||||
$out=array();
|
||||
$this->load->model('backend_model');
|
||||
$res = $this->backend_model->wrenchboard_api($cardData, $out);
|
||||
|
||||
// var_dump($res);
|
||||
// exit();
|
||||
$out['order_id'] = $res;
|
||||
if ($res > 0 && isset($out) && isset($out['confirmation']) && $out['confirmation']!='') {
|
||||
// we are good
|
||||
$this->session->set_flashdata('reciept_data', $out);
|
||||
redirect("paymnt/cardreciepts");
|
||||
|
||||
} else {
|
||||
// not good
|
||||
$this->session->set_flashdata('reciept_data', $out);
|
||||
redirect("paymnt/cardreciepts");
|
||||
}
|
||||
|
||||
} // no error(s) from card test PHP model
|
||||
else{
|
||||
$data['card_test_result'] = $cardTestResult;
|
||||
$data['card_table_result'] = $this->cardListData(4)['card_table_result'];
|
||||
$this->RenderUserPage('users/view_startpaymus', $data); // return back to card page
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->paymus();
|
||||
}
|
||||
}
|
||||
|
||||
public function cardreciepts(){
|
||||
|
||||
$data = array_merge($this->getSessionArray(), $this->session->flashdata('reciept_data'));
|
||||
if (!isset($data['confirmation'])){
|
||||
redirect("dash");
|
||||
}
|
||||
$this->RenderUserPage('users/view_payreciepts', $data); // return back to card page
|
||||
}
|
||||
}
|
||||
@@ -10,21 +10,19 @@ class Plb extends WRB_Controller {
|
||||
|
||||
public function viewjob() {
|
||||
$offerCode = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
|
||||
$this->jobViewPage($offerCode);
|
||||
|
||||
if ( strlen($offerCode) == 10 && !preg_match('/'.preg_quote('^\'£$%^&*()}{@#~?><,@|-=-_+-¬', '/').'/', $offerCode) )
|
||||
{
|
||||
$this->jobViewPage($offerCode);
|
||||
}
|
||||
else{
|
||||
redirect('/login');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function jobViewPage($offerCode) {
|
||||
/* $data['sitename'] = 'home';
|
||||
$this->load->view('templates/header_boxed', $data);
|
||||
$this->load->view('users/view_index');
|
||||
$this->load->view('users/view_external_footer');
|
||||
* */
|
||||
// $this->load->view('users/view_index');
|
||||
// $this->load->view('users/view_external_footer');
|
||||
|
||||
$data = array();
|
||||
|
||||
|
||||
$mysql = "SELECT jo.expire,jo.id AS offer_id, jo.offer_code,mj.title,mj.description,mj.timeline_days,mj.price,jo.job_description FROM members_jobs_offer jo "
|
||||
. " LEFT JOIN members_jobs mj ON mj.id=jo.job_id "
|
||||
. " WHERE mj.status=1 AND jo.status=1 "
|
||||
@@ -42,7 +40,6 @@ class Plb extends WRB_Controller {
|
||||
}
|
||||
|
||||
$myTable .="</table>";
|
||||
// $this->table->set_heading('Added/Expire', 'Title/Recipient', 'Status', '');
|
||||
$data['market_table'] = $myTable; // $this->table->generate($query);
|
||||
// $offer_found = true;
|
||||
} else {
|
||||
@@ -55,25 +52,9 @@ class Plb extends WRB_Controller {
|
||||
. " WHERE o.public_view =1 AND o.offer_code<>'" . $offerCode . "' AND o.expire> now() AND o.status=1 ORDER BY o.id DESC LIMIT 50";
|
||||
$query = $this->db->query($mysql2);
|
||||
$data["numof_other_jobs"] = $query->num_rows();
|
||||
$data["job_data"] = $query->result();
|
||||
$data["job_data"] = $query->result()[0];
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$mysql2 = " SELECT o.*,j.title,j.description,j.timeline_days,j.price,j FROM members_jobs_offer o "
|
||||
. " LEFT JOIN members_jobs j ON j.id =o.job_id "
|
||||
. " WHERE o.public_view =1 AND o.offer_code<>'" . $offerCode . "' AND o.expire> now() ORDER BY o.id DESC LIMIT 50";
|
||||
|
||||
|
||||
$query = $this->db->query($mysql2);
|
||||
$data["numof_other_jobs"] = $query->num_rows();
|
||||
$data["job_data"] = $query->result();
|
||||
*/
|
||||
|
||||
|
||||
$this->load->view('templates/view_header_market', $data);
|
||||
$this->load->view('site/view_market', $data);
|
||||
$this->load->view('templates/view_footer_market', $data);
|
||||
$this->load->view('site3/external/view_market',$data);
|
||||
}
|
||||
|
||||
private function makeMarketTableRow($row) {
|
||||
@@ -92,13 +73,13 @@ class Plb extends WRB_Controller {
|
||||
|
||||
|
||||
|
||||
return "<table class='table table-striped table-hover table-bordered table-condensed'><tr><td colspan='2' ><b> Timeline:</b>" . $row['timeline_days'] . " day(s) - <b>Budget: </b> " . $row['price'] * 0.01 . " Naira</td></tr>"
|
||||
return "<table class='table table align-middle gs-0 gy-5'><tr><td colspan='2' ><b> Timeline:</b>" . $row['timeline_days'] . " day(s) - <b>Budget: </b> " . $row['price'] * 0.01 . " Naira</td></tr>"
|
||||
. "<tr><td style='width:100px;'><b>Title</b></td><td>" . $row['title'] . "</td></tr>"
|
||||
. "<tr><td><b>Description</b></td><td>" . $row['description'] . "</td></tr>"
|
||||
. "<tr><td><b>Detail</b></td><td>" . $row['job_description'] . "</td></tr>"
|
||||
. "<tr><td colspan='2' >Interests : <b>" . $data['interest'] . "</b> Expire:<b> " . $row['expire'] . "</b> </td></tr>"
|
||||
. "<tr><td><b></b></td><td style='text-align:right;'><input type=submit id='submit_interest_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return LoginInterest('" . $row['offer_code'] . "');\" class=\"btn btn-success btn-xs\" value=\"see more ?
|
||||
\"></td></tr>"
|
||||
|
||||
. "<tr><td><b></b></td><td style='text-align:right;'><a class=\"btn btn-primary btn-xs\" href='/login'>See More</a></td></tr>"
|
||||
. "</table> ";
|
||||
}
|
||||
|
||||
|
||||
@@ -125,9 +125,12 @@ class Proj extends Users_Controller {
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
/* $this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_activejob', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$this->load->view('users/view_footer_user', $data);*/
|
||||
//view_pastduejob.php
|
||||
$data['page_title'] ="Past Due";
|
||||
$this->renderSecurePage('jobs/view_pastduejob', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +177,7 @@ class Proj extends Users_Controller {
|
||||
$config["uri_segment"] = 3;
|
||||
$config["num_links"] = 5;
|
||||
|
||||
$config['full_tag_open'] = "<ul class='pagination'>";
|
||||
$config['full_tag_open'] = "<ul class='pagination' style='font-size: 14px; padding-left: 5px; padding-right: 5px'>";
|
||||
$config['full_tag_close'] = "</ul>";
|
||||
$config['num_tag_open'] = '<li>';
|
||||
$config['num_tag_close'] = '</li>';
|
||||
@@ -205,7 +208,7 @@ class Proj extends Users_Controller {
|
||||
. "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) OR mc.client_id =" . $_SESSION['member_id'] . " AND mc.status IN (1,2,4) LIMIT " . $config["per_page"] . " OFFSET " . $page;
|
||||
|
||||
$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,"
|
||||
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br>'||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\">' "
|
||||
. " 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\">' "
|
||||
@@ -215,7 +218,7 @@ class Proj extends Users_Controller {
|
||||
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
|
||||
$data['job_table_result'] = $query->result();;
|
||||
$data['ref_site'] = "/proj/active/$page";
|
||||
|
||||
|
||||
@@ -232,9 +235,9 @@ class Proj extends Users_Controller {
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_activejob', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
$data['page_title'] = "Active Task";
|
||||
$this->RenderUserPage('jobs/view_activejob', $data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -905,9 +908,10 @@ $data = $this->getSessionArray();
|
||||
|
||||
|
||||
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_completejob', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
// $this->load->view('users/view_header_user', $data);
|
||||
// $this->load->view('jobs/view_completejob', $data);
|
||||
// $this->load->view('users/view_footer_user', $data);
|
||||
$this->renderSecurePage('jobs/view_completejob', $data);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1010,10 +1014,13 @@ $data = $this->getSessionArray();
|
||||
$data['new_message'] = $out['new_message'];
|
||||
|
||||
|
||||
|
||||
/*
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('jobs/view_mycompletejob', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
$data['page_title'] ="Previous Tasks";
|
||||
$this->renderSecurePage('jobs/view_mycompletejob', $data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,13 +95,15 @@ class Refer extends Users_Controller {
|
||||
$this->table->set_heading(array('data' => 'Added/Name', 'style' => 'width:170px'), 'Email', array('data' => 'Status', 'style' => 'width:80px'));
|
||||
|
||||
$data['refer_table'] = $this->table->generate($query);
|
||||
|
||||
$data['refer_table_result'] =$query->result();
|
||||
|
||||
$data['page_title'] ="Refer a Friend";
|
||||
|
||||
/*
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view('users/view_refer', $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
$this->RenderUserPage('users/view_refer', $data);
|
||||
}
|
||||
|
||||
public function refagree() {
|
||||
|
||||
@@ -18,6 +18,7 @@ class Signup extends CI_Controller {
|
||||
$submit = NULL;
|
||||
|
||||
extract($_POST);
|
||||
//var_dump($_POST);
|
||||
|
||||
$data['firstname'] = $firstname;
|
||||
$data['lastname'] = $lastname;
|
||||
@@ -39,7 +40,8 @@ class Signup extends CI_Controller {
|
||||
$data['signup_error'] = '';
|
||||
|
||||
if ($_POST) { // post
|
||||
if ($data['terms'] == 'on') {
|
||||
if ($data['terms'] == 'on' || $data['terms'] == '1') {
|
||||
$data['terms'] == 'on';
|
||||
$terms_checked = 'checked';
|
||||
}
|
||||
|
||||
@@ -73,6 +75,7 @@ class Signup extends CI_Controller {
|
||||
} else {
|
||||
$data['signup_error'] = "Enter all required fields";
|
||||
}
|
||||
//exit;
|
||||
} // if post
|
||||
$data['signup_error_style'] = '';
|
||||
if (strlen($data['signup_error']) > 0) {
|
||||
@@ -81,10 +84,7 @@ class Signup extends CI_Controller {
|
||||
|
||||
|
||||
$data['terms'] = $terms_checked;
|
||||
|
||||
|
||||
$this->load->view('users/view_registration', $data);
|
||||
$this->load->view('users/view_external_footer', $data);
|
||||
$this->load->view('site3/external/view_signup',$data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
//Import Hybridauth's namespace
|
||||
use Hybridauth\Hybridauth;
|
||||
|
||||
class Site extends WRB_Controller {
|
||||
|
||||
public function index() {
|
||||
@@ -11,7 +14,26 @@ class Site extends WRB_Controller {
|
||||
$this->load->view('users/view_external_footer');
|
||||
* */
|
||||
|
||||
$this->home1();
|
||||
// Load Hybridauth's helper
|
||||
$this->load->helper('hybridauth');
|
||||
|
||||
/*
|
||||
// Instantiate Hybridauth's classes
|
||||
$hybrid = new Hybridauth(get_hybridauth_config());
|
||||
|
||||
// Get login links
|
||||
$login_links = get_hybridauth_links($hybrid, $this->router);
|
||||
*/
|
||||
$login_links = array(
|
||||
'Google' => get_google_login_link(),
|
||||
'Apple' => get_apple_login_link()
|
||||
);
|
||||
// Pass login links to html template
|
||||
$data['login_links'] = $login_links;
|
||||
|
||||
// Render html template
|
||||
$this->load->view('site3/external/view_home');
|
||||
///home/oameye/wrenchboard/www/application/views/site3/external
|
||||
}
|
||||
|
||||
public function registration() {
|
||||
|
||||
@@ -8,8 +8,9 @@ class Vemail extends CI_Controller {
|
||||
|
||||
$vlnk = NULL;
|
||||
$data['title'] = "Verify Email"; // Capitalize the first letter
|
||||
$data['page_title'] = "About WrenchBoard";
|
||||
$data['page_title'] = "Verify Signup";
|
||||
$data['email'] = "ameye@chiefsoft.com";
|
||||
$show_error=true;
|
||||
|
||||
extract($_GET);
|
||||
if (trim($vlnk) !== '') {
|
||||
@@ -28,12 +29,9 @@ class Vemail extends CI_Controller {
|
||||
$data['username'] = $ret->username;
|
||||
$res1 = $this->backend_model->wrenchboard_api($data, $out);
|
||||
if ($res1 > 0) {
|
||||
$this->load->view('users/view_vemail', $data);
|
||||
$this->load->view('site3/external/view_vemail', $data);
|
||||
$show_error = false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// make sure status is set to 5 : complete
|
||||
}
|
||||
// call backend to create the account now
|
||||
@@ -43,9 +41,10 @@ class Vemail extends CI_Controller {
|
||||
}
|
||||
}
|
||||
// IF YOU GET HERE - ERROR PAGE
|
||||
// $this->load->view('templates/header_boxed', $data);
|
||||
$this->load->view('users/view_error', $data);
|
||||
// $this->load->view('templates/footer_boxed', $data);
|
||||
if ($show_error == true){
|
||||
$this->load->view('site3/external/view_error', $data);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
defined('BASEPATH') OR exit('No direct script access allowed');
|
||||
|
||||
class Wallet extends Users_Controller {
|
||||
|
||||
public function index() {
|
||||
//
|
||||
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
|
||||
redirect(home);
|
||||
} else {
|
||||
|
||||
redirect(dash);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -10,14 +10,21 @@ class Wrb404 extends CI_Controller {
|
||||
|
||||
public function index() {
|
||||
//echo 'Ameye';
|
||||
$this->output->set_status_header('404');
|
||||
$data['content'] = 'error_4042'; // View name
|
||||
// $this->output->set_status_header('404');
|
||||
// $data['error_content'] = 'error_4042'; // View name
|
||||
|
||||
|
||||
$this->load->view('templates/header_boxed', $data);
|
||||
$this->load->view('errors/cli/error_wrb_404', $data); //loading in my template
|
||||
$this->load->view('users/view_external_footer');
|
||||
|
||||
//view_errorpage
|
||||
|
||||
// $this->load->view('templates/header_boxed', $data);
|
||||
// $this->load->view('errors/cli/error_wrb_404', $data); //loading in my template
|
||||
// $this->load->view('users/view_external_footer');
|
||||
|
||||
$data['error_content'] = $this->load->view('errors/cli/error_wrb_404','', true);
|
||||
|
||||
// $data['terms'] = $terms_checked;
|
||||
// $data['error_content'] ='';
|
||||
$this->load->view('site3/external/view_errorpage',$data);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -74,17 +74,22 @@ class WRB_Controller extends CI_Controller {
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
$data['active_task'] = $out['active_task'];
|
||||
$data['active_pass_due'] = $out['active_pass_due'];
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
$_SESSION["active_offers_count"] = $out['active_offers_count'];
|
||||
|
||||
$data = $_SESSION['secure_data'];
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($_SESSION['member_id'],$currency='NAIRA'); // $out['current_balance'];
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
|
||||
|
||||
$data = $_SESSION['secure_data'];
|
||||
$data['member_id'] = $_SESSION['member_id']; // = $ret->email;
|
||||
|
||||
$this->refreshAccountDetail($_SESSION['member_id']);
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
protected function logUser($mlog) {
|
||||
//
|
||||
$data['action'] = WRENCHBOARD_LOG_MEMBER;
|
||||
|
||||
@@ -0,0 +1,185 @@
|
||||
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
|
||||
|
||||
/*
|
||||
POST /oauth2/v4/token HTTP/1.1
|
||||
Host: www.googleapis.com
|
||||
Content-length: 233
|
||||
content-type: application/x-www-form-urlencoded
|
||||
user-agent: google-oauth-playground
|
||||
code=4%2FKxoYTS-jeq5-d6Lv7YvSz9ZrK0pJ_5lZsMExzNC1M0o
|
||||
&redirect_uri=https%3A%2F%2Foameye.work.wrenchboard.com%2Flogin%2Fauth%2F
|
||||
&client_id=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com
|
||||
&client_secret=aozK_2G8UjaCmLgPPkv9abIm
|
||||
&scope=
|
||||
&grant_type=authorization_code
|
||||
|
||||
https://oameye.work.wrenchboard.com/login/auth/
|
||||
?state=HA-R5UG9ZADN2JL8MKPCV736QSIHTEXW4OF01YB
|
||||
&code=4/0AX4XfWjGtsNysrdFaHZLp6rIOKzZjMj4zmJTQrqu0NOBdEDEuYn9LoBzJoxDFgrw43BqGA
|
||||
&scope=email+profile+https://www.googleapis.com/auth/userinfo.email+https://www.googleapis.com/auth/userinfo.profile+openid&authuser=0&
|
||||
prompt=consent
|
||||
|
||||
|
||||
curl -X POST -d 'code=4/0AX4XfWjGtsNysrdFaHZLp6rIOKzZjMj4zmJTQrqu0NOBdEDEuYn9LoBzJoxDFgrw43BqGA&redirect_uri=https%3A%2F%2Foameye.work.wrenchboard.com%2Flogin%2Fauth%2F&client_id=817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com&client_secret=aozK_2G8UjaCmLgPPkv9abIm&scope=&grant_type=authorization_code' https://www.googleapis.com/oauth2/v4/token
|
||||
|
||||
*/
|
||||
if ( ! function_exists('get_google_client'))
|
||||
{
|
||||
// Configure Google Client
|
||||
function get_google_client()
|
||||
{
|
||||
// init configuration
|
||||
$clientID = '817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com';
|
||||
$clientSecret = 'aozK_2G8UjaCmLgPPkv9abIm';
|
||||
$redirectUri = site_url('login/auth/');
|
||||
|
||||
// create Client Request to access Google API
|
||||
$client = new Google_Client();
|
||||
$client->setClientId($clientID);
|
||||
$client->setClientSecret($clientSecret);
|
||||
$client->setRedirectUri($redirectUri);
|
||||
$client->addScope("email");
|
||||
$client->addScope("profile");
|
||||
|
||||
return $client;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_apple_config'))
|
||||
{
|
||||
function get_apple_config() {
|
||||
// https://arfasoftech.com/blog/How-to-Integrate-Sign-in-with-Apple-in-PHP-(5-minute-code)
|
||||
return array(
|
||||
/* 'client_id' => */ 'com.wrenchboard.users.client',
|
||||
/* 'client_secret' => */ 'eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6Ilc1V1RXQzlEVEoifQ.eyJpc3MiOiJKUjM2M0ZFWThSIiwiaWF0IjoxNjU0MDgzODQxLCJleHAiOjE2NTkyNjc4NDEsImF1ZCI6Imh0dHBzOi8vYXBwbGVpZC5hcHBsZS5jb20iLCJzdWIiOiJjb20ud3JlbmNoYm9hcmQudXNlcnMuY2xpZW50In0.TIPMwjS2MgSysqEuw3yu1nrOcrH-6omzerDhx0CadjWn2yCO8wZhQiAlhIFs7F-WPektIJ6h-2BT62yGrILiTA',
|
||||
/* 'redirect_uri' => */ site_url('login/auth/apple')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('get_apple_login_link'))
|
||||
{
|
||||
// Configure Apple CLient
|
||||
function get_apple_login_link()
|
||||
{
|
||||
// init configuration
|
||||
list($clientID, $clientSecret, $redirectUri) = get_apple_config();
|
||||
|
||||
$_SESSION['apple_state'] = bin2hex(random_bytes(5));
|
||||
|
||||
$authorize_url = 'https://appleid.apple.com/auth/authorize'.'?'.http_build_query([
|
||||
'response_type' => 'code',
|
||||
'response_mode' => 'form_post',
|
||||
'client_id' => $clientID,
|
||||
'redirect_uri' => $redirectUri,
|
||||
'state' => $_SESSION['apple_state'],
|
||||
'scope' => 'name email',
|
||||
]);
|
||||
|
||||
return $authorize_url;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
Client ID: com.wrenchboard.users.client
|
||||
Key ID: W5WTWC9DTJ
|
||||
Sign In with Apple: JR363FEY8R.com.wrenchboard.users
|
||||
Secret: eyJ0eXAiOiJKV1QiLCJhbGciOiJFUzI1NiIsImtpZCI6Ilc1V1RXQzlEVEoifQ.eyJpc3MiOiJKUjM2M0ZFWThSIiwiaWF0IjoxNjU0MDgzODQxLCJleHAiOjE2NTkyNjc4NDEsImF1ZCI6Imh0dHBzOi8vYXBwbGVpZC5hcHBsZS5jb20iLCJzdWIiOiJjb20ud3JlbmNoYm9hcmQudXNlcnMuY2xpZW50In0.TIPMwjS2MgSysqEuw3yu1nrOcrH-6omzerDhx0CadjWn2yCO8wZhQiAlhIFs7F-WPektIJ6h-2BT62yGrILiTA
|
||||
*/
|
||||
|
||||
if ( ! function_exists('get_google_login_link'))
|
||||
{
|
||||
// Get Google login link
|
||||
function get_google_login_link()
|
||||
{
|
||||
$client = get_google_client();
|
||||
return $client->createAuthUrl();
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('get_hybridauth_config'))
|
||||
{
|
||||
//Hybridauth configuration
|
||||
function get_hybridauth_config()
|
||||
{
|
||||
$config = array(
|
||||
|
||||
'callback' => site_url('login/auth/') ,
|
||||
|
||||
'providers' => array(
|
||||
'Google' => array(
|
||||
'enabled' => true,
|
||||
'keys' => array(
|
||||
'id' => '817021856543-ad9nsjgdpsu2s2jrl63j3ihrv7lbf6ma.apps.googleusercontent.com',
|
||||
'secret' => 'aozK_2G8UjaCmLgPPkv9abIm'
|
||||
) ,
|
||||
'scope' => 'https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/userinfo.email https://www.googleapis.com/auth/userinfo.profile',
|
||||
) ,
|
||||
|
||||
'Facebook' => array(
|
||||
'enabled' => true,
|
||||
'keys' => array(
|
||||
'id' => (ENVIRONMENT == 'development') ? '390204307987009' : '390204307987009',
|
||||
'secret' => (ENVIRONMENT == 'development') ? '19f778e312f2ab96d147bacb612910c2' : '19f778e312f2ab96d147bacb612910c2'
|
||||
) ,
|
||||
'scope' => 'email, public_profile'
|
||||
) ,
|
||||
|
||||
'Apple' => array(
|
||||
"enabled" => true,
|
||||
"keys" => [
|
||||
"id" => "Your Apple ID",
|
||||
"team_id" => "Your Apple team id",
|
||||
"key_id" => "Your Apple key id",
|
||||
"key_content" => "Your Apple key (content including BEGIN and END lines)",
|
||||
"key_file" => "Full path to your Apple key file (alternative to key_content)"
|
||||
],
|
||||
"scope" => "name email",
|
||||
"verifyTokenSignature" => true
|
||||
)
|
||||
) ,
|
||||
|
||||
'hybrid_debug' => array(
|
||||
'debug_mode' => 'info', /* none, debug, info, error */
|
||||
'debug_file' => APPPATH . '/logs/log-' . date('Y-m-d') . '.php'
|
||||
)
|
||||
);
|
||||
|
||||
return $config;
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('get_hybridauth_links'))
|
||||
{
|
||||
function get_hybridauth_links($hybrid, $router)
|
||||
{
|
||||
$login_links = array();
|
||||
|
||||
//Get enabled providers array
|
||||
$providers = $hybrid->getProviders();
|
||||
|
||||
$provider_icons = array(
|
||||
'Apple' => '/site3/assets/media/svg/brand-logos/apple-black.svg',
|
||||
'Facebook' => '/site3/assets/media/svg/brand-logos/facebook-4.svg',
|
||||
'Google' => '/site3/assets/media/svg/brand-logos/google-icon.svg'
|
||||
);
|
||||
|
||||
//List a link to login
|
||||
foreach ($providers as $provider)
|
||||
{
|
||||
$login_links[$provider] = "";
|
||||
//$href = sprintf(base_url('%s/auth/%s/') , strtolower($router->fetch_class()) , $provider);
|
||||
$href = sprintf("%s/%s/", site_url('login/auth'), $provider);
|
||||
$login_links[$provider] = $href; // .= '<a href="' . $href . '" class="btn btn-flex flex-center btn-light btn-lg w-100 mb-5">';
|
||||
if (array_key_exists($provider, $provider_icons)) {
|
||||
// $login_links[$provider] .= '<img alt="Logo" src="' . $provider_icons[$provider] . '" class="h-20px me-3">';
|
||||
}
|
||||
// $login_links[$provider] .= 'Continue with ' . $provider . '</a>';
|
||||
}
|
||||
|
||||
return $login_links;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,15 @@ class Bko_Controller extends WRB_Controller {
|
||||
$data = array();
|
||||
$this->load->library('table');
|
||||
$this->table->set_template($this->template);
|
||||
$mysql = "SELECT '<b>ADDED:</b>'||added::date||'<br><b>EXPIRE:</b>'||expire::date||'<br>'||username||'<br><b>Name:</b>'||firstname||' '||lastname AS signup,"
|
||||
$mysql = "SELECT '<b>ADDED:</b>'||added::date||'<br><b>EXPIRE:</b>'||expire::date||'<br>'||username||'<br><b>Name:</b>'||firstname||' '||lastname AS signup, country,"
|
||||
. " (CASE WHEN status=1 THEN '<div id=\"btu'||id||'\"><button id=\"acc'||id||'\" class=\"btn btn-info btn-xs\" onclick=\"return resendLink('''||id||''');\" >Resend</button></div>' ELSE ' ' END) AS action ,"
|
||||
. " (CASE WHEN status=1 THEN '<div id=\"dtu'||id||'\"><button id=\"del'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return deleteLink('''||id||''');\" >Del</button></div>' ELSE ' ' END) AS Del "
|
||||
. " FROM members_pending WHERE expire> now() AND status = 1"
|
||||
. " ORDER BY id desc limit 5";
|
||||
$query = $this->db->query($mysql);
|
||||
// $this->table->set_heading('Dates', 'Username', 'Name', 'Action');
|
||||
$this->table->set_heading(array('data' => 'Date/Email/Name', 'style' => 'width:180px'), array('data' => 'RES', 'style' => 'width:20px; cellpadding:0px;'), array('data' => 'Del', 'style' => 'width:20px; cellpadding:0px;'));
|
||||
$this->table->set_heading(array('data' => 'Date/Email/Name', 'style' => 'width:180px'),array('data' => 'Country', 'style' => 'width:20px; cellpadding:0px;'),
|
||||
array('data' => 'RES', 'style' => 'width:20px; cellpadding:0px;'), array('data' => 'Del', 'style' => 'width:20px; cellpadding:0px;'));
|
||||
|
||||
$data['pending_dash_table'] = $this->table->generate($query);
|
||||
|
||||
|
||||
@@ -39,11 +39,19 @@ class Users_Controller extends WRB_Controller {
|
||||
$out = $this->dash_model->getDashData($data);
|
||||
$data['active_task'] = $out['active_task'];
|
||||
$data['active_pass_due'] = $out['active_pass_due'];
|
||||
$data['current_balance'] = $out['current_balance'];
|
||||
//$data['current_balance'] = $out['current_balance'];
|
||||
$data['new_message'] = $out['new_message'];
|
||||
$data['escrow_balance'] = $out['escrow_balance'];
|
||||
$data['description'] = $out["description"];
|
||||
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($_SESSION['member_id'],$currency='NAIRA'); // $out['current_balance'];
|
||||
if (is_array($data['wallet']) && count($data['wallet'])>0 && array_key_exists('current_balance',$data['wallet'][0])) {
|
||||
$data['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
} else {
|
||||
$data['current_balance'] = 0;
|
||||
}
|
||||
|
||||
//$data = $_SESSION['secure_data'];
|
||||
$data['member_id'] = $_SESSION['member_id']; // = $ret->email;
|
||||
$_SESSION["active_offers_count"] = $out['active_offers_count'];
|
||||
@@ -58,7 +66,16 @@ class Users_Controller extends WRB_Controller {
|
||||
$this->load->model('account_model');
|
||||
$qr = $this->account_model->loadAccountData($member_id);
|
||||
// print_r($qr);
|
||||
$_SESSION['current_balance'] = $qr[0]['balance'];
|
||||
// $_SESSION['current_balance'] = $qr[0]['balance'];
|
||||
|
||||
$this->load->model('account_model');
|
||||
$data['wallet'] = $this->account_model->getUserWallet($member_id,$currency='NAIRA'); // $out['current_balance'];
|
||||
if (is_array($data['wallet']) && count($data['wallet'])>0 && array_key_exists('current_balance',$data['wallet'][0])) {
|
||||
$_SESSION['current_balance'] = $data['wallet'][0]['current_balance'];
|
||||
} else {
|
||||
$_SESSION['current_balance'] = 0;
|
||||
}
|
||||
|
||||
$_SESSION['active_task'] = $this->account_model->loadActiveTaskCount($member_id);
|
||||
$_SESSION['state'] = $qr[0]['state'];
|
||||
$_SESSION['city'] = $qr[0]['city'];
|
||||
@@ -70,6 +87,20 @@ class Users_Controller extends WRB_Controller {
|
||||
$in['action'] = WRENCHBOARD_SESSION_VERIFY;
|
||||
$in['sessionid'] = $_SESSION['session_id'];
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
|
||||
$_SESSION['wallet'] = false;
|
||||
$wallet_array = array(
|
||||
"ses66181+1@gmail.com",
|
||||
"ameye@chiefsoft.com",
|
||||
"obaxnoma@gmail.com",
|
||||
"ses66181@gmail.com",
|
||||
'cornelvaleriy@gmail.com',
|
||||
'lantagreece@gmail.com',
|
||||
'tokunbo.lawal1@gmail.com');
|
||||
if (in_array($_SESSION['username'], $wallet_array, true)) {
|
||||
$_SESSION['wallet'] = true;
|
||||
}
|
||||
|
||||
$this->load->model('backend_model');
|
||||
$out = array();
|
||||
$res = $this->backend_model->wrenchboard_api($in, $out);
|
||||
@@ -77,11 +108,20 @@ class Users_Controller extends WRB_Controller {
|
||||
redirect(home);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
protected function renderSecurePage($page_path_name, $data) {
|
||||
$this->load->view('site3/internal/template/view_securehead', $data);
|
||||
$this->load->view( $page_path_name, $data);
|
||||
$this->load->view('site3/internal/template/view_securefooter', $data);
|
||||
}
|
||||
|
||||
protected function RenderUserPage($page_name, $data) {
|
||||
return $this->renderSecurePage($page_name, $data);
|
||||
/*
|
||||
$this->load->view('users/view_header_user', $data);
|
||||
$this->load->view($page_name, $data);
|
||||
$this->load->view('users/view_footer_user', $data);
|
||||
*/
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,18 @@ class Account_model extends CI_Model {
|
||||
|
||||
}
|
||||
|
||||
public function getUserWallet($member_id,$currency='') {
|
||||
$num = 0;
|
||||
//$mysql = "SELECT * FROM members_wallet WHERE member_id = $member_id AND currency='".$currency."' ";
|
||||
$and_part = '';
|
||||
if ($currency =''){
|
||||
$and_part = " AND w.currency='$currency' ";
|
||||
}
|
||||
$mysql = "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 = $member_id ".$and_part." ORDER BY c.lorder DESC";
|
||||
$query = $this->db->query($mysql);
|
||||
return $query->result_array();
|
||||
}
|
||||
|
||||
public function verify_link($data) {
|
||||
$q = $this
|
||||
->db
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
|
||||
class Autopref_model extends CI_Model
|
||||
{
|
||||
|
||||
public function afterLoginPage(){
|
||||
$retArr = [];
|
||||
$retArr['returnPage'] = 'logout';
|
||||
$retArr['loginsteps'] = '4';
|
||||
$returnPage = 'logout';
|
||||
if (isset($_SESSION) && isset($_SESSION['member_id']) && $_SESSION['member_id'] > 0){
|
||||
|
||||
$accountAgeNumber = $this->accountAge( $_SESSION['member_id'] );
|
||||
|
||||
// echo $accountAgeNumber." -----";
|
||||
//exit;
|
||||
$retArr['returnPage'] ='dash';
|
||||
if ($accountAgeNumber < 60 ){
|
||||
$retArr['returnPage'] ='dash/help';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
return $retArr;
|
||||
}
|
||||
|
||||
private function accountAge($member_id){
|
||||
|
||||
$accAge = 10000000;
|
||||
|
||||
$ageQ = "SELECT ((DATE_PART('day', now()::timestamp - added::timestamp) * 24 +
|
||||
DATE_PART('hour', now()::timestamp - added::timestamp)) * 60 +
|
||||
DATE_PART('minute', now()::timestamp - added::timestamp)) * 60 +
|
||||
DATE_PART('second', now()::timestamp - added::timestamp) AS accage FROM members WHERE id =".$member_id;
|
||||
|
||||
$query = $this->db->query($ageQ);
|
||||
$row = $query->row();
|
||||
|
||||
if (isset($row))
|
||||
{
|
||||
$accAge = $row->accage;
|
||||
}
|
||||
|
||||
return $accAge;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,9 +20,21 @@ class Backend_model extends CI_Model {
|
||||
public function wrenchboard_api($in, $out = array()) {
|
||||
$this->wrenchboard_load();
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
|
||||
// var_dump($ret);
|
||||
// echo "-----";
|
||||
// var_dump($out);
|
||||
// exit();
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function wrenchboard_api2($in, $out) {
|
||||
$this->wrenchboard_load();
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function cfgReadChar($str) {
|
||||
$this->wrenchboard_load();
|
||||
$ret = $this->wrenchboard->cfgReadChar($str);
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
class Cardpay_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
public function verifyCardData($data){
|
||||
$error_status = false;
|
||||
$errorArray = array ();
|
||||
/*
|
||||
$cd['cardnumber'] = $this->input->post('cardnumber');
|
||||
$cd['exp_month'] = $this->input->post('exp_month');
|
||||
$cd['exp_year'] = $this->input->post('exp_year');
|
||||
$cd['cvc'] = $this->input->post('cvc');
|
||||
$cd['description']= $this->input->post('description');
|
||||
*/
|
||||
|
||||
if ( strlen( $data['cvc'] ) == 0 ){
|
||||
$error_status = true;
|
||||
$errorArray[]="Enter valid card CVV";
|
||||
}
|
||||
|
||||
if ( strlen( $data['cardnumber'] ) == 0 || $this->luhn_check( $data['cardnumber'] ) == false){
|
||||
$error_status = true;
|
||||
$errorArray[]="Enter valid card number";
|
||||
}
|
||||
|
||||
if ( strlen( $data['exp_year'] ) == 0 || $data['exp_year'] < date('Y') ){
|
||||
$error_status = true;
|
||||
$errorArray[]="Enter valid card expiration date";
|
||||
}
|
||||
else{
|
||||
|
||||
// let us test the month now
|
||||
}
|
||||
|
||||
if ( strlen( $data['description'] ) == 0 ){
|
||||
$error_status = true;
|
||||
$errorArray[]="Enter name on card";
|
||||
}
|
||||
|
||||
return [
|
||||
"error_status" => $error_status,
|
||||
"error_message" => $errorArray
|
||||
];
|
||||
}
|
||||
|
||||
public function verifyCCNumber($cardNumber) {
|
||||
|
||||
return $this->luhn_check($cardNumber);
|
||||
}
|
||||
|
||||
/* Luhn algorithm number checker - (c) 2005-2008 shaman - www.planzero.org *
|
||||
* This code has been released into the public domain, however please *
|
||||
* give credit to the original author where possible. */
|
||||
|
||||
private function luhn_check($number) {
|
||||
|
||||
// Strip any non-digits (useful for credit card numbers with spaces and hyphens)
|
||||
$number=preg_replace('/\D/', '', $number);
|
||||
|
||||
// Set the string length and parity
|
||||
$number_length=strlen($number);
|
||||
$parity=$number_length % 2;
|
||||
|
||||
// Loop through each digit and do the maths
|
||||
$total=0;
|
||||
for ($i=0; $i<$number_length; $i++) {
|
||||
$digit=$number[$i];
|
||||
// Multiply alternate digits by two
|
||||
if ($i % 2 == $parity) {
|
||||
$digit*=2;
|
||||
// If the sum is two digits, add them together (in effect)
|
||||
if ($digit > 9) {
|
||||
$digit-=9;
|
||||
}
|
||||
}
|
||||
// Total up the digits
|
||||
$total+=$digit;
|
||||
}
|
||||
|
||||
// If the total mod 10 equals 0, the number is valid
|
||||
return ($total % 10 == 0) ? TRUE : FALSE;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -12,6 +12,20 @@ class Combo_model extends CI_Model {
|
||||
|
||||
}
|
||||
|
||||
public function getJobPriceCombo($option_name,$description, $curVal){
|
||||
|
||||
$this->defaultComboMessage ='Select Price...';
|
||||
$cmbstr ="<option value='0'>". $this->defaultComboMessage ."</option>";
|
||||
for ($i = 2000; $i <= 10000; $i = $i + 1000) {
|
||||
// $amountArray[] = [$i,$i,'Naira'];
|
||||
$selV = '';
|
||||
if ($curVal == $i) {
|
||||
$selV = " selected ";
|
||||
}
|
||||
$cmbstr .= "<option value='".$i."' ".$selV.">".$i." ".$description."</option>";
|
||||
}
|
||||
return $this->comboFrame($option_name, $cmbstr);
|
||||
}
|
||||
public function getJobPostDuration($option_name, $duration)
|
||||
{
|
||||
$this->defaultComboMessage ='Select duration of post';
|
||||
@@ -22,7 +36,7 @@ class Combo_model extends CI_Model {
|
||||
}
|
||||
|
||||
for ($ii = 2; $ii <= 5; $ii++) {
|
||||
$days_c = $ii*7;
|
||||
$days_c = $ii*7;
|
||||
$cmbstr .= "<option value='$days_c'>$ii Weeks</option>";
|
||||
}
|
||||
return $this->comboFrame($option_name, $cmbstr);
|
||||
@@ -105,6 +119,19 @@ $days_c = $ii*7;
|
||||
return $this->comboFrame($option_name, $option_value);
|
||||
}
|
||||
|
||||
public function getCountryJobCombo($option_name, $curVal) {
|
||||
$q = $this
|
||||
->db
|
||||
->where('status', 1)
|
||||
->where('jobs is NOT NULL', NULL, FALSE)
|
||||
->order_by('country', 'ASC')
|
||||
->get('country');
|
||||
|
||||
$option_value = $this->optionValueObject($q->result(), "code", "country", $curVal);
|
||||
|
||||
return $this->comboFrame($option_name, $option_value);
|
||||
}
|
||||
|
||||
public function getBankCombo($option_name, $curVal) {
|
||||
/*
|
||||
wrenchboard=> Select code,name from bank_entity_codes WHERE country ='NG' ORDER BY name ASC;
|
||||
@@ -148,12 +175,12 @@ $days_c = $ii*7;
|
||||
}
|
||||
|
||||
private function comboFrame($option_name, $option_value) {
|
||||
$addReaOnly = "";
|
||||
if ($this->readOnlyMode == true) {
|
||||
$addReaOnly = " disabled ";
|
||||
}
|
||||
|
||||
return $cmb = "<select data-placeholder='".$this->defaultComboMessage."' class='" . $this->currentStyle . "' name='$option_name' $addReaOnly >$option_value</select>";
|
||||
$addReaOnly = "";
|
||||
if ($this->readOnlyMode == true) {
|
||||
$addReaOnly = " disabled ";
|
||||
}
|
||||
$style_line = "form-select form-select-solid form-select-lg";
|
||||
return $cmb = "<select $style_line data-placeholder='".$this->defaultComboMessage."' class='" . $this->currentStyle . "' name='$option_name' $addReaOnly >$option_value</select>";
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
class Coupon_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function loadMemberActiveCoupons($member_id,$fliters=[]){
|
||||
$sql="SELECT id, ca.code, ca.amount, ca.added::date,ca.status
|
||||
FROM coupons_allocation ca WHERE ca.member_id = $member_id AND ca.active IS NULL ORDER BY ca.id DESC";
|
||||
$q = $this->db->query($sql);
|
||||
return $q;
|
||||
}
|
||||
|
||||
public function loadMemberRedeemCoupons($member_id,$fliters=[]){
|
||||
$sql="SELECT id, ca.code, ca.amount, ca.added::date,ca.status ,ca.active::date
|
||||
FROM coupons_allocation ca WHERE ca.member_id = $member_id AND ca.active IS NOT NULL ORDER BY ca.id DESC";
|
||||
$q = $this->db->query($sql);
|
||||
return $q;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -54,6 +54,7 @@ class Dash_model extends CI_Model {
|
||||
return $out;
|
||||
}
|
||||
|
||||
|
||||
public function getNewMessageCount($member_id) {
|
||||
$out = array();
|
||||
$out['new_message'] =0;
|
||||
|
||||
@@ -6,6 +6,20 @@ class Job_model extends CI_Model {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
* Supply active list of jobs for this id
|
||||
*/
|
||||
|
||||
public function selectMarketJob($jobId){
|
||||
$mysql = 'SELECT jo.offer_code,mj.title,mj.description,mj.timeline_days,mj.price,jo.job_description,jo.expire::date FROM members_jobs_offer jo '
|
||||
. ' LEFT JOIN members_jobs mj ON mj.id=jo.job_id '
|
||||
. ' WHERE mj.status=1 AND jo.status=1 '
|
||||
. ' AND jo.expire> now() AND mj.id ='.$jobId;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
return $query->result();
|
||||
}
|
||||
|
||||
public function deleteMemberGroup($group_id) {
|
||||
$this->actionMessage = '';
|
||||
$x['member_id'] = $_SESSION['member_id'];
|
||||
@@ -174,7 +188,13 @@ class Job_model extends CI_Model {
|
||||
$in['member_id'] = $_SESSION['member_id'];
|
||||
*/
|
||||
$ret = false;
|
||||
if (trim($data['title']) != '' && trim($data['description']) != '' && trim($data['timeline_days']) != '' && trim($data['price']) != '' && trim($data['member_id']) > 0) {
|
||||
if (trim($data['title']) != ''
|
||||
&& trim($data['description']) != ''
|
||||
&& trim($data['timeline_days']) != ''
|
||||
&& $data['timeline_days'] > 0
|
||||
&& trim($data['price']) != ''
|
||||
&& $data['price']*100 > 0
|
||||
&& trim($data['member_id']) > 0) {
|
||||
$ret = true;
|
||||
}
|
||||
return $ret;
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
class Report_model extends CI_Model {
|
||||
|
||||
function __construct() {
|
||||
|
||||
}
|
||||
|
||||
|
||||
public function getCardPurchase($limit){
|
||||
$data = array();
|
||||
$mysql = "SELECT added::date,"
|
||||
." (CASE WHEN code ='MNCCD' THEN 'New Card Payment' "
|
||||
. "WHEN code ='MRCCD' THEN 'Repeat Card Payment' "
|
||||
. "ELSE '' END) AS Description,amount*0.01 AS amount,fee*0.01 as fee,confirmation "
|
||||
. "FROM members_payments "
|
||||
. "WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY id DESC LIMIT ". $limit; // OFFSET " . $page;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$data['card_payment_data_result'] = $query->result();
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function getRedeemCouponsList($limit){
|
||||
$data = array();
|
||||
$mysql = "SELECT id,code,amount,active::date ,added::date
|
||||
FROM coupons_allocation
|
||||
WHERE member_id =" . $_SESSION['member_id'] . " AND
|
||||
active IS NOT NULL ORDER BY active DESC LIMIT ". $limit;
|
||||
|
||||
$query = $this->db->query($mysql);
|
||||
$data['card_coupon_data_result'] = $query->result();
|
||||
return $data;
|
||||
}
|
||||
|
||||
}
|
||||
-11
@@ -1,11 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>403 Forbidden</title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<p>Directory access is forbidden.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,44 +1,50 @@
|
||||
|
||||
<!--begin::Root-->
|
||||
<div class="d-flex flex-column flex-root">
|
||||
<!--begin::Authentication - Error 500 -->
|
||||
<div class="d-flex flex-column flex-column-fluid">
|
||||
<!--begin::Content-->
|
||||
<div class="d-flex flex-column flex-column-fluid text-center p-10 py-lg-15">
|
||||
<!--begin::Logo-->
|
||||
<a href="/" class="mb-10 pt-lg-10">
|
||||
<img alt="Logo" src="/assets/ext/images/wrenchboard.png" class="h-40px mb-5" />
|
||||
</a>
|
||||
<!--end::Logo-->
|
||||
<!--begin::Wrapper-->
|
||||
<div class="pt-lg-10 mb-10">
|
||||
<!--begin::Logo-->
|
||||
<h1 class="fw-bolder fs-2qx text-gray-800 mb-10">System Error</h1>
|
||||
<!--end::Logo-->
|
||||
<!--begin::Message-->
|
||||
<div class="fw-bold fs-3 text-muted mb-15">Oops, an error has occurred. Page not found!
|
||||
<br />Please try another page or return home.</div>
|
||||
<!--end::Message-->
|
||||
<!--begin::Action-->
|
||||
<div class="text-center">
|
||||
<a href="/" class="btn btn-lg btn-primary fw-bolder">Go to homepage</a>
|
||||
</div>
|
||||
<!--end::Action-->
|
||||
</div>
|
||||
<!--end::Wrapper-->
|
||||
<!--begin::Illustration-->
|
||||
<div class="d-flex flex-row-auto bgi-no-repeat bgi-position-x-center bgi-size-contain bgi-position-y-bottom min-h-100px min-h-lg-350px" style="background-image: url(/site3/assets/img/404-error-message.png"></div>
|
||||
<!--end::Illustration-->
|
||||
</div>
|
||||
<!--end::Content-->
|
||||
<!--begin::Footer-->
|
||||
<div class="d-flex flex-center flex-column-auto p-10">
|
||||
<!--begin::Links-->
|
||||
<div class="d-flex align-items-center fw-bold fs-6">
|
||||
<a href="https://www.wrenchboard.com/about-us" class="text-muted text-hover-primary px-2">About</a>
|
||||
<a href="https://www.wrenchboard.com/service" class="text-muted text-hover-primary px-2">Services</a>
|
||||
<a href="https://www.wrenchboard.com/contact" class="text-muted text-hover-primary px-2">Contact Us</a>
|
||||
</div>
|
||||
<!--end::Links-->
|
||||
</div>
|
||||
<!--end::Footer-->
|
||||
</div>
|
||||
<!--end::Authentication - Error 500-->
|
||||
</div>
|
||||
<!--end::Root-->
|
||||
|
||||
|
||||
<!-- Page container -->
|
||||
<div class="page-container">
|
||||
|
||||
<!-- Page content -->
|
||||
<div class="page-content">
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
|
||||
<!-- Error title -->
|
||||
<div class="text-center content-group">
|
||||
<h1 class="error-title">404</h1>
|
||||
<h5>Oops, an error has occurred. Page not found!</h5>
|
||||
</div>
|
||||
<!-- /error title -->
|
||||
|
||||
|
||||
<!-- Error content -->
|
||||
<div class="row">
|
||||
<div class="col-lg-4 col-lg-offset-4 col-sm-6 col-sm-offset-3">
|
||||
<form action="#" class="main-search panel panel-body">
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<a href="/" class="btn bg-pink-400"><i class="icon-circle-left2 position-left"></i>Return Home</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /error wrapper -->
|
||||
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
|
||||
</div>
|
||||
<!-- /page content -->
|
||||
|
||||
</div>
|
||||
<!-- /page container -->
|
||||
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<meta name="author" content="SemiColonWeb" />
|
||||
<meta name="author" content="WrenchBoard" />
|
||||
|
||||
<meta name="description" content="wrenchboard.com is an online marketplace to make money from your skills, find, buy and sell professional services. Connect with freelancers to get work done faster. Trade your freelance services." />
|
||||
<meta name="title" content="WrenchBoard: Find a Freelancer | Sell Professional Services" />
|
||||
|
||||
@@ -0,0 +1,91 @@
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-3" style="height: 650px;">
|
||||
|
||||
<div class="card card-xl-stretch mb-xl-8" >
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 bg-info py-5">
|
||||
<h3 class="card-title fw-bolder text-white">Jobs</h3>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body p-0">
|
||||
<!--begin::Chart-->
|
||||
<div class="mixed-widget-2-chart card-rounded-bottom bg-info" data-kt-color="info" style="height: 100px; min-height: 100px;">
|
||||
</div>
|
||||
<!--end::Chart-->
|
||||
<!--begin::Stats-->
|
||||
<div class="card-p mt-n20 position-relative">
|
||||
<!--begin::Row-->
|
||||
<div class="row g-0">
|
||||
<!--begin::Col-->
|
||||
<div class="col bg-light-warning px-6 py-8 rounded-2 me-7 mb-7">
|
||||
<!--begin::Svg Icon | path: icons/duotune/general/gen032.svg-->
|
||||
<span class="svg-icon svg-icon-3x svg-icon-warning d-block my-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<rect x="8" y="9" width="3" height="10" rx="1.5" fill="currentColor"></rect>
|
||||
<rect opacity="0.5" x="13" y="5" width="3" height="14" rx="1.5" fill="currentColor"></rect>
|
||||
<rect x="18" y="11" width="3" height="8" rx="1.5" fill="currentColor"></rect>
|
||||
<rect x="3" y="13" width="3" height="6" rx="1.5" fill="currentColor"></rect>
|
||||
</svg>
|
||||
</span>
|
||||
<!--end::Svg Icon-->
|
||||
<a href="/jobs/manage" class="text-warning fw-bold fs-6">My Jobs</a>
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col bg-light-primary px-6 py-8 rounded-2 mb-7">
|
||||
<!--begin::Svg Icon | path: icons/duotune/finance/fin006.svg-->
|
||||
<span class="svg-icon svg-icon-3x svg-icon-primary d-block my-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path opacity="0.3" d="M20 15H4C2.9 15 2 14.1 2 13V7C2 6.4 2.4 6 3 6H21C21.6 6 22 6.4 22 7V13C22 14.1 21.1 15 20 15ZM13 12H11C10.5 12 10 12.4 10 13V16C10 16.5 10.4 17 11 17H13C13.6 17 14 16.6 14 16V13C14 12.4 13.6 12 13 12Z" fill="currentColor"></path>
|
||||
<path d="M14 6V5H10V6H8V5C8 3.9 8.9 3 10 3H14C15.1 3 16 3.9 16 5V6H14ZM20 15H14V16C14 16.6 13.5 17 13 17H11C10.5 17 10 16.6 10 16V15H4C3.6 15 3.3 14.9 3 14.7V18C3 19.1 3.9 20 5 20H19C20.1 20 21 19.1 21 18V14.7C20.7 14.9 20.4 15 20 15Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<!--end::Svg Icon-->
|
||||
<a href="/jobs/startcreate" class="text-primary fw-bold fs-6">New Job</a>
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
<!--begin::Row-->
|
||||
<div class="row g-0">
|
||||
<!--begin::Col-->
|
||||
<div class="col bg-light-danger px-6 py-8 rounded-2 me-7">
|
||||
<!--begin::Svg Icon | path: icons/duotune/abstract/abs027.svg-->
|
||||
<span class="svg-icon svg-icon-3x svg-icon-danger d-block my-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path opacity="0.3" d="M21.25 18.525L13.05 21.825C12.35 22.125 11.65 22.125 10.95 21.825L2.75 18.525C1.75 18.125 1.75 16.725 2.75 16.325L4.04999 15.825L10.25 18.325C10.85 18.525 11.45 18.625 12.05 18.625C12.65 18.625 13.25 18.525 13.85 18.325L20.05 15.825L21.35 16.325C22.35 16.725 22.35 18.125 21.25 18.525ZM13.05 16.425L21.25 13.125C22.25 12.725 22.25 11.325 21.25 10.925L13.05 7.62502C12.35 7.32502 11.65 7.32502 10.95 7.62502L2.75 10.925C1.75 11.325 1.75 12.725 2.75 13.125L10.95 16.425C11.65 16.725 12.45 16.725 13.05 16.425Z" fill="currentColor"></path>
|
||||
<path d="M11.05 11.025L2.84998 7.725C1.84998 7.325 1.84998 5.925 2.84998 5.525L11.05 2.225C11.75 1.925 12.45 1.925 13.15 2.225L21.35 5.525C22.35 5.925 22.35 7.325 21.35 7.725L13.05 11.025C12.45 11.325 11.65 11.325 11.05 11.025Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<!--end::Svg Icon-->
|
||||
<a href="/proj/pastdue" class="text-danger fw-bold fs-6 mt-2">Past due</a>
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col bg-light-success px-6 py-8 rounded-2">
|
||||
<!--begin::Svg Icon | path: icons/duotune/communication/com010.svg-->
|
||||
<span class="svg-icon svg-icon-3x svg-icon-success d-block my-2">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<path d="M6 8.725C6 8.125 6.4 7.725 7 7.725H14L18 11.725V12.925L22 9.725L12.6 2.225C12.2 1.925 11.7 1.925 11.4 2.225L2 9.725L6 12.925V8.725Z" fill="currentColor"></path>
|
||||
<path opacity="0.3" d="M22 9.72498V20.725C22 21.325 21.6 21.725 21 21.725H3C2.4 21.725 2 21.325 2 20.725V9.72498L11.4 17.225C11.8 17.525 12.3 17.525 12.6 17.225L22 9.72498ZM15 11.725H18L14 7.72498V10.725C14 11.325 14.4 11.725 15 11.725Z" fill="currentColor"></path>
|
||||
</svg>
|
||||
</span>
|
||||
<!--end::Svg Icon-->
|
||||
<a href="/proj/complete" class="text-success fw-bold fs-6 mt-2">History</a>
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
</div>
|
||||
<!--end::Stats-->
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Mixed Widget 2-->
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
@@ -12,30 +12,116 @@
|
||||
return false;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Quick stats boxes -->
|
||||
<?php include('common/jobstrip.php');?>
|
||||
<!-- /quick stats boxes -->
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading" style="height: 550px;">
|
||||
<div class="table-responsive">
|
||||
<h5 class="panel-title">Active Task</h5>
|
||||
<?php echo $job_table ?>
|
||||
</script>
|
||||
|
||||
<?php include('common/jobstrip.php');?>
|
||||
<div class="row g-5 g-xl-8">
|
||||
<div class="col-xl-6">
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
<span class="card-label fw-bolder fs-3 mb-1">Active Task </span>
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<div class="table-responsive">
|
||||
|
||||
<table class="table align-middle gs-0 gy-3">
|
||||
<!--begin::Table head-->
|
||||
<thead>
|
||||
|
||||
<tr style="font-weight: bolder;">
|
||||
<th class="p-0 " style="width: 120px;">Job</th>
|
||||
<th class="p-0 min-w-160px">Title/<br>Description</th>
|
||||
<th class="p-0 w-100px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<!--end::Table head-->
|
||||
<!--begin::Table body-->
|
||||
<tbody>
|
||||
<?php
|
||||
foreach( $job_table_result as $row){
|
||||
// var_dump($row);
|
||||
// echo $row['project'];
|
||||
?>
|
||||
<tr style="height: 60px;">
|
||||
<td>
|
||||
<?=$row->project?><br>
|
||||
</td>
|
||||
<td>
|
||||
<?=$row->description?>
|
||||
</td>
|
||||
|
||||
<td class="text-end">
|
||||
<?=$row->manage ?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</tbody>
|
||||
<!--end::Table body-->
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
<?php echo $links; ?>
|
||||
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-6">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<div class="table-responsive">
|
||||
<!--begin::Table-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
|
||||
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
@@ -85,11 +171,12 @@ function showJobModal(contact_id) {
|
||||
var post_data = {
|
||||
'interest_id': id,
|
||||
};
|
||||
//alert(contact_id);
|
||||
|
||||
$.ajax({
|
||||
url: "/jobs/jobdetail_modal?contact_id="+contact_id
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
// alert(data);
|
||||
$('#modal-content').html(data);
|
||||
});
|
||||
}
|
||||
@@ -100,12 +187,10 @@ function showJobModal(contact_id) {
|
||||
|
||||
<!-- Basic modal -->
|
||||
<div id="modal_theme_primary" class="modal fade">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-dialog mw-650px">
|
||||
<div class="modal-content" id="modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /basic modal -->
|
||||
|
||||
|
||||
<!-- /basic modal -->
|
||||
@@ -13,30 +13,52 @@
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<!-- /quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
|
||||
<h5> Completed Job(s)/Task(s)</h5>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel-heading" style="height: 550px;">
|
||||
<div class="table-responsive">
|
||||
<?php echo $job_table ?>
|
||||
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
|
||||
<?php include('common/jobside.php'); ?>
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-9">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
Completed Job(s)/Task(s)
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Header-->
|
||||
|
||||
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<?php echo $job_table ?>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,98 +1,198 @@
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<form method="post" name="post_nav_find" action="">
|
||||
<input type="hidden" name="jobID" value="">
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function post_nav_find_action(what, value) {
|
||||
// alert(what);
|
||||
document.post_nav_find.action = what + '';
|
||||
document.post_nav_find.jobID.value = value;
|
||||
document.post_nav_find.submit();
|
||||
return false;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading" style="background-color: lightgray; padding-top: 1px; padding-bottom: 3px; padding-left: 10px;">
|
||||
<h5>Create New Job</h5>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<form class="form-horizontal" action="/jobs/create" method='POST'>
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-9">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
Create New Job
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label"> Title [75] :</label>
|
||||
<div class="col-lg-10">
|
||||
<input type="text" class="form-control" name='title' placeholder="Proj title" maxlength="80">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">Description [250]:</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea rows="2" cols="5" class="form-control" name='description' placeholder="Job Description"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">Job Detail:</label>
|
||||
<div class="col-lg-10">
|
||||
<textarea rows="3" cols="5" class="textarea wysihtml5 wysihtml5-min form-control" style="height:180px;" name='job_detail' placeholder="Job Detail"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">Timeline:</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name='timeline'>
|
||||
<option value="opt1">Select Market Timeline for this job</option>
|
||||
<option value="2">2 days</option>
|
||||
<option value="3">3 days</option>
|
||||
<option value="4">4 days</option>
|
||||
<option value="5">5 days</option>
|
||||
<option value="6">6 days</option>
|
||||
<option value="7">1 week</option>
|
||||
<option value="14">2 weeks</option>
|
||||
<option value="21">3 weeks</option>
|
||||
<option value="30">1 Month</option>
|
||||
<option value="60">2 Months</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-lg-2 control-label">Price:</label>
|
||||
<div class="col-lg-10">
|
||||
<select class="form-control" name='price'>
|
||||
<option value="opt1">Select Price for this job</option>
|
||||
<?php
|
||||
for ($i = 2000; $i <= 10000; $i = $i + 1000) {
|
||||
echo "<option value='$i'>$i Naira</option>";
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary btn-xs">Add Job <i class="icon-arrow-right14 position-right"></i></button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><a href="/jobs/manage/">Return to job my list</a></div>
|
||||
<div class="col-sm-8">
|
||||
<div class="text-center">
|
||||
<?php echo $job_message; ?>
|
||||
</div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<form action="" class="form mb-15 fv-plugins-bootstrap5 fv-plugins-framework" action="/jobs/create" method='POST' id="kt_contact_form">
|
||||
<!--begin::Input group-->
|
||||
<div class="row mb-5">
|
||||
<!--begin::Col-->
|
||||
<div class="col-md-6 fv-row fv-plugins-icon-container">
|
||||
<!--begin::Label-->
|
||||
<label class="fs-5 fw-bold mb-2">Country</label>
|
||||
<!--end::Label-->
|
||||
<!--begin::Input-->
|
||||
<?=$country_job?>
|
||||
<!--end::Input-->
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div></div>
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col-md-6 fv-row fv-plugins-icon-container">
|
||||
<!--end::Label-->
|
||||
<label class="fs-5 fw-bold mb-2">Price</label>
|
||||
<!--end::Label-->
|
||||
<!--end::Input-->
|
||||
<?=$job_price?>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
</div>
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-5 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="fs-5 fw-bold mb-2">Title</label>
|
||||
<!--end::Label-->
|
||||
<!--begin::Input-->
|
||||
<input class="form-control form-control-solid" placeholder="" name="title" value="<?=isset($title)?$title:''?>" maxlength="80">
|
||||
<!--end::Input-->
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-5 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="fs-5 fw-bold mb-2">Description [250]:</label>
|
||||
<!--end::Label-->
|
||||
<!--begin::Input-->
|
||||
<input class="form-control form-control-solid" placeholder="" value="<?=isset($description)?$description:''?>" name="description">
|
||||
<!--end::Input-->
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-10 fv-row fv-plugins-icon-container">
|
||||
<label class="fs-6 fw-bold mb-2">Job Delivery Details:</label>
|
||||
<textarea class="form-control form-control-solid" rows="6" name="job_detail" placeholder=""><?=isset($job_detail)?$job_detail:''?></textarea>
|
||||
<div class="fv-plugins-message-container invalid-feedback"></div></div>
|
||||
<!--end::Input group-->
|
||||
|
||||
</form>
|
||||
<!--begin::Input group-->
|
||||
<div class="d-flex flex-column mb-5 fv-row">
|
||||
<!--begin::Label-->
|
||||
<label class="fs-5 fw-bold mb-2">Timeline</label>
|
||||
<!--end::Label-->
|
||||
<!--begin::Input-->
|
||||
<select class="form-select form-select-solid form-select-lg" name='timeline'>
|
||||
<option value="0">Select Market Timeline for this job</option>
|
||||
<option value="2">2 days</option>
|
||||
<option value="3">3 days</option>
|
||||
<option value="4">4 days</option>
|
||||
<option value="5">5 days</option>
|
||||
<option value="6">6 days</option>
|
||||
<option value="7">1 week</option>
|
||||
<option value="14">2 weeks</option>
|
||||
<option value="21">3 weeks</option>
|
||||
<option value="30">1 Month</option>
|
||||
<option value="60">2 Months</option>
|
||||
</select>
|
||||
<!--end::Input-->
|
||||
</div>
|
||||
<!--end::Input group-->
|
||||
|
||||
|
||||
|
||||
<div class="d-flex flex-column mb-5 fv-row">
|
||||
<div class="row mb-5">
|
||||
<div class="col-md-9 fv-row fv-plugins-icon-container">
|
||||
<?php
|
||||
$remS = strlen( $job_message ) > 0 ? "<div class='col-xl-12 bg-light-danger rounded p-5 mb-7'>$job_message </div>" : '';
|
||||
echo $remS;
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<div class="col-md-3 fv-row fv-plugins-icon-container" style="text-align: right;">
|
||||
<!--begin::Submit-->
|
||||
<button type="submit" class="btn btn-primary" >
|
||||
<!--begin::Indicator-->
|
||||
<span class="indicator-label">Add Job</span>
|
||||
<span class="indicator-progress">Please wait...
|
||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span></span>
|
||||
<!--end::Indicator-->
|
||||
</button>
|
||||
<!--end::Submit-->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-3">
|
||||
<!--begin::List Widget 3-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0">
|
||||
<h3 class="card-title fw-bolder text-dark">Previous Jobs</h3>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body pt-2">
|
||||
<!--begin::Item-->
|
||||
<?php
|
||||
foreach ($recentjobs as $row)
|
||||
{
|
||||
?>
|
||||
<div class="d-flex align-items-center mb-8" >
|
||||
<!--begin::Description-->
|
||||
<div class="flex-grow-1">
|
||||
<a href="#" onclick="return post_nav_find_action('/jobs/processjob', '<?=$row->id?>')" class="text-gray-800 text-hover-primary fw-bolder fs-6"><?=$row->title?></a>
|
||||
<span class="text-muted fw-bold d-block"><?=$row->created?></span>
|
||||
</div>
|
||||
<!--end::Description-->
|
||||
<a href="#" onclick="return post_nav_find_action('/jobs/processjob', '<?=$row->id?>')" class="badge badge-light-success fs-8 fw-bolder">View</a>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
|
||||
<!--end:Item-->
|
||||
|
||||
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end:List Widget 3-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
@@ -1,28 +1,92 @@
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
<div class="col-xl-12">
|
||||
<!--begin::Charts Widget 1-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<!--begin::Title-->
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
<span class="card-label fw-bolder fs-3 mb-1">Additional Terms for Jobs Posting.</span>
|
||||
</h3>
|
||||
<!--end::Title-->
|
||||
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<h4>All terms of sale must follow WrenchBoard policies for buying and selling. Setting and meeting expectations in a listing's terms of sale ensure a smooth transaction and buyer satisfaction while helping WrenchBoard remain a reputable marketplace.</h4>
|
||||
<br>
|
||||
<h3 class="text-dark mb-5 fw-boldest">What is the policy? </h3>
|
||||
|
||||
<h4> Task or Job owners should provide clear and accurate delivery terms and conditions required to meet the expectations they have set in their listings. These should include:</h4>
|
||||
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Delivery mode, timelines, and reviews</li>
|
||||
<li class="list-group-item">The forms of payment available for the task </li>
|
||||
<li class="list-group-item"> A returns policy:
|
||||
<ul class="list-group">
|
||||
<li class="list-group-item">Clearly stated criteria under which cancellation will be accepted.</li>
|
||||
<li class="list-group-item">Clearly stated the time period in which the buyer must notify the seller about the delivery delay.</li>
|
||||
<li class="list-group-item">How refunds/returns/cancellations will be issued</li>
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
|
||||
|
||||
|
||||
<br>
|
||||
<h4>Activity that doesn't follow WrenchBoard policy could result in a range of actions, including for example: administratively ending or canceling listings, hiding or demoting all listings from search results, lowering rating, buying or selling restrictions, and account suspension.
|
||||
<br>
|
||||
All fees paid or payable concerning listings or accounts on which we take any action will not be refunded or otherwise credited to your account.</h4>
|
||||
<br>
|
||||
<h3 class="text-dark mb-5 fw-boldest">Why does WrencBoard have this policy?</h3>
|
||||
<h4>Buyers and sellers enter a contract when they complete transactions, so it's necessary to have precise details on what the transaction entails to guarantee satisfaction. This policy also helps sellers meet our performance standards.</h4>
|
||||
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<form class="form-horizontal" action="/jobs/jobagree" method='POST'>
|
||||
<input type='hidden' name='agree_jobs' value='agree_jobs' >
|
||||
<div class="panel-body">
|
||||
<div class="row">
|
||||
<?php echo $txt_detail; ?>
|
||||
<div class="col-md-10 col-md-offset-1">
|
||||
<div class="text-right">
|
||||
<button type="submit" class="btn btn-primary">Agree to Terms <i class="icon-arrow-right14 position-right"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1" style=" padding-top: 35px; text-align: right">
|
||||
<form action="/jobs/jobagree" onclick="start_agree();"> <a class="btn btn-sm btn-primary">Agree to Terms <i class="icon-arrow-right14 position-right"></i></a> </form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Charts Widget 1-->
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
function start_agree() {
|
||||
alert(100);
|
||||
$.ajax({
|
||||
url: "/jobs/agreejobterms?interest_id=0"
|
||||
}).done(function (data) {
|
||||
$('#modal-content').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
@@ -13,94 +13,175 @@
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<!-- /quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
<div class="table-responsive">
|
||||
<?php echo $job_table ?>
|
||||
|
||||
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-6">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
<span class="card-label fw-bolder fs-3 mb-1"><a href='/jobs/manage'>Retrun</a> : <?=$job_table_row->title?> </span>
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<div class="table-responsive">
|
||||
<!--begin::Table-->
|
||||
|
||||
|
||||
<table class="table table-row-dashed table-row-gray-200 align-middle gs-0 gy-4">
|
||||
|
||||
<!--begin::Table body-->
|
||||
<tbody>
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" class="text-dark fw-bolder text-hover-primary mb-1 fs-6"> Description</a>
|
||||
</td>
|
||||
<td><?= $job_table_row->description ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" class="text-dark fw-bolder text-hover-primary mb-1 fs-6"> Timeline</a>
|
||||
</td>
|
||||
<td><?= $job_table_row->day_timeline ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" class="text-dark fw-bolder text-hover-primary mb-1 fs-6"> Price</a>
|
||||
</td>
|
||||
<td><?= $job_table_row->price ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" class="text-dark fw-bolder text-hover-primary mb-1 fs-6"> Created</a>
|
||||
</td>
|
||||
<td><?= $job_table_row->create_date ?></td>
|
||||
</tr>
|
||||
<tr><td colspan='2'>Please provide clear deliverables for this task.</td></tr>
|
||||
<tr>
|
||||
<td>
|
||||
<a href="#" class="text-dark fw-bolder text-hover-primary mb-1 fs-6"> Delivery Detail</a>
|
||||
|
||||
</td>
|
||||
<td>
|
||||
<form name="job_detail">
|
||||
<textarea cols="18" rows="3" name='jobdescription' class="wysihtml5 wysihtml5-min form-control" style="height:180px;" placeholder="Enter description here ..."> <?= $job_table_row->job_detail ?></textarea>
|
||||
</form>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</tbody>
|
||||
<!--end::Table body-->
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<form name="job_detail">
|
||||
<table class='table table-striped table-hover table-bordered table-condensed'>
|
||||
<thead>
|
||||
<tr>
|
||||
<th><b>Job Details: Please provide clear deliverables for this task.</b></th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><textarea cols="18" rows="3" name='jobdescription' class="wysihtml5 wysihtml5-min form-control" style="height:180px;" placeholder="Enter description here ..."><?php echo $job_description; ?></textarea></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-6">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<div class="table-responsive">
|
||||
<!--begin::Table-->
|
||||
<?php
|
||||
if (isset($active_job_data) && count($active_job_data) > 0 ){
|
||||
echo "<div class=\"col-xl-12 bg-light-info rounded p-5 mb-7\">";
|
||||
echo "This job is currently active : " ;
|
||||
foreach ($active_job_data as $jr){
|
||||
echo $jr->offer_code." - ". $jr->expire;
|
||||
}
|
||||
echo " </div>";
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="row">
|
||||
|
||||
|
||||
<div class="panel panel-flat">
|
||||
|
||||
<div class="panel-body">
|
||||
<div class="tabbable">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#basic-tab1" data-toggle="tab">Place Job/Task in public</a></li>
|
||||
<li><a href="#basic-tab2" data-toggle="tab">Send to Specific Email</a></li>
|
||||
<li><a href="#basic-tab3" data-toggle="tab">Send to my Group</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div class="tab-pane active" id="basic-tab1">
|
||||
<table class="table table-row-dashed table-row-gray-200 align-middle gs-0 gy-4">
|
||||
|
||||
<div class="col-xl-12 bg-light-danger rounded p-5 mb-7">
|
||||
<h5>Offer this job to public</h5>
|
||||
<form name="offer_public">
|
||||
<?php echo $my_post_duration; ?>
|
||||
<input id="public_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Show Task to Public' onclick="return offerPublic();"><div id="public_result"></div>
|
||||
<div style="text-align:right; padding-top:10px;"> <input id="public_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Show Task to Public' onclick="return offerPublic();"><div id="public_result"></div></div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="basic-tab2">
|
||||
<div class="col-xl-12 bg-light-danger rounded p-5 mb-7">
|
||||
|
||||
<h5>Offer this job to individual.</h5>
|
||||
<form name="offer_individual">
|
||||
<input type="text" class="form-control" id="rec_email" name="rec_email" value='' placeholder="Enter email to send offer...">
|
||||
<input id="individ_submit" type="button" class="btn btn-primary btn-sm" name='send' value='Send Offer to Individual' onclick="return offerIndividual();"><div id="individ_result"></div>
|
||||
<div style="text-align:right; padding-top:10px;"><input id="individ_submit" type="button" class="btn btn-primary btn-sm" name='send' value='Send Offer to Individual' onclick="return offerIndividual();"><div id="individ_result"></div></div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="tab-pane" id="basic-tab3">
|
||||
<h5>Offer this job to your Group.</h5>
|
||||
<div class="col-xl-12 bg-light-danger rounded p-5 mb-7">
|
||||
<h5>Offer this job to your <a href='/jobs/jobgrp'>Group</a>.</h5>
|
||||
<form name="offer_group">
|
||||
<?php echo $my_job_group; ?>
|
||||
<input id="group_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Send Offer to Group' onclick="return offerGroup();"><div id="group_result"></div>
|
||||
<div style="text-align:right; padding-top:10px;"><input id="group_submit" type="button" name='send' class="btn btn-primary btn-sm" value='Send Offer to Group' onclick="return offerGroup();"><div id="group_result"></div></div>
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</table>
|
||||
</div>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
|
||||
<!--end::Col-->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
function isEmail(email) {
|
||||
|
||||
@@ -21,50 +21,70 @@
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<!-- /quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
|
||||
<!--div class="btn-group btn-group-justified">
|
||||
<a href="#" class="btn bg-slate-700">Left</a>
|
||||
<a href="#" class="btn bg-slate-700">Middle</a>
|
||||
<a href="#" class="btn bg-slate-700">Right</a>
|
||||
</div -->
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
|
||||
<?php include('common/jobside.php'); ?>
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-9">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
Manage Jobs
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<p><a class="btn btn-secondary btn-xs btn-block" href="/jobs/manage">My Job(s)</a></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<p><a class="btn btn-success btn-xs btn-block" href="/jobs/create">Create Job</a></p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<p><a class="btn btn-info btn-xs btn-block" href="/proj/complete">Completed Jobs(s)</a></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-3">
|
||||
<p><a class="btn btn-warning btn-xs btn-block" href="/proj/pastdue">Past Due</a></p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="table-responsive" style='height: 550px;'>
|
||||
<?php echo $job_table ?>
|
||||
<div class="panel-heading">
|
||||
<!--end::Header-->
|
||||
|
||||
<!--begin::Header-->
|
||||
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
<div class="row">
|
||||
<a class="btn btn-secondary btn-xs btn-block" href="/jobs/manage">My Job(s)</a>
|
||||
</div>
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
<a class="btn btn-success btn-xs btn-block" href="/jobs/startcreate">Create New Job</a>
|
||||
<a class="btn btn-info btn-xs btn-block" href="/proj/complete">Completed</a>
|
||||
<a class="btn btn-warning btn-xs btn-block" href="/proj/pastdue">Past Due</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
|
||||
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<?php echo $job_table ?>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
<!--end::Col-->
|
||||
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -27,78 +27,121 @@
|
||||
// -->
|
||||
</script>
|
||||
<!-- Main content -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
|
||||
<?php include('common/jobside.php'); ?>
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-9">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" >Interest in <?php echo $offer_code; ?></a>
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Header-->
|
||||
|
||||
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!-- /main charts -->
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="panel panel-flat" >
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title"><b><?php echo $dash_title; ?> [<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" ><?php echo $offer_code; ?></a>]</b>-<?php echo $title; ?></h6>
|
||||
</div>
|
||||
<table class='table table-striped table-hover table-bordered'>
|
||||
<tbody>
|
||||
<tr style="background-color: #CEECF5;">
|
||||
<td>
|
||||
<b>Job Added : </b><?php echo $added; ?><br>
|
||||
<a href='#' onclick="showModal(<?php echo $interest_id; ?>);"><?php echo $client; ?><br>
|
||||
<b>Member Since : </b><?php echo $client_added; ?></a><br>
|
||||
|
||||
</td>
|
||||
<td style="width:190px;">
|
||||
<b>Jobs Completed : </b><?php echo $total_jobs_completed; ?><br>
|
||||
<b>Jobs Active : </b><?php echo $total_jobs_active; ?><br>
|
||||
<b>Jobs Uncompleted : </b><?php echo $total_jobs_uncompleted; ?><br>
|
||||
<b>Pending Offers : </b><?php echo $total_pending_offers; ?><br>
|
||||
% Completion
|
||||
</td>
|
||||
<td style="width:90px;">
|
||||
<table class='table table-condensed'>
|
||||
<tbody>
|
||||
<tr><td style='width: 33%;'><div id="cancdiv"><input type=submit id="submit_canc" name="rmview" onclick="return cancelInterest(<?php echo $interest_id; ?>);" class="btn btn-danger btn-xs btn-block" value="Cancel Job"></div></td> </tr>
|
||||
<tr><td><div id="rejtdiv"><input type=submit id="submit_rejt" name="rmview" onclick="return rejectInterest(<?php echo $interest_id; ?>);" class="btn btn-warning btn-xs btn-block" value="Reject"></div></td> </tr>
|
||||
<tr><td style='width: 33%;'><div id="accdiv"><input type=submit id="submit_acc" name="mview" onclick="return acceptInterest(<?php echo $interest_id; ?>);" class="btn btn-info btn-xs btn-block" value="Accept"></div></td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-flat" >
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title"><b>Others Interested in this Task</b></h6>
|
||||
</div>
|
||||
<?php echo $job_others_interest_table; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="thumbnail" style="background-color: #CEECF5;">
|
||||
Message to <b><?php echo $client; ?></b><hr size='1'>
|
||||
<form name='offer_message' >
|
||||
<div class="thumb">
|
||||
<textarea rows="3" name='offermessage' class="textarea form-control" placeholder="Enter message..."></textarea>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" id="submit_yourmessage_<?= $offer_code; ?>" onclick="return OMessage('<?= $offer_code; ?>',<?= $interest_id; ?>);" name='btn_submit' class="btn btn-primary btn-xs btn-block" onclick="SendMessage();return false;">Send</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="caption">
|
||||
<div id='msg_result_<?= $offer_code; ?>'>
|
||||
<? echo $message_list; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="content-wrapper">
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
<!-- Main charts -->
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!-- /main charts -->
|
||||
<div class="row">
|
||||
<div class="col-md-9">
|
||||
<div class="panel panel-flat" >
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title"><b><?php echo $dash_title; ?> [<a href="#" onclick="showOfferModal('<?= $offer_code; ?>');" ><?php echo $offer_code; ?></a>]</b>-<?php echo $title; ?></h6>
|
||||
</div>
|
||||
<table class='table table-striped table-hover table-bordered'>
|
||||
<tbody>
|
||||
<tr style="background-color: #CEECF5;">
|
||||
<td>
|
||||
<b>Job Added : </b><?php echo $added; ?><br>
|
||||
<a href='#' onclick="showModal(<?php echo $interest_id; ?>);"><?php echo $client; ?><br>
|
||||
<b>Member Since : </b><?php echo $client_added; ?></a><br>
|
||||
|
||||
</td>
|
||||
<td style="width:190px;">
|
||||
<b>Jobs Completed : </b><?php echo $total_jobs_completed; ?><br>
|
||||
<b>Jobs Active : </b><?php echo $total_jobs_active; ?><br>
|
||||
<b>Jobs Uncompleted : </b><?php echo $total_jobs_uncompleted; ?><br>
|
||||
<b>Pending Offers : </b><?php echo $total_pending_offers; ?><br>
|
||||
% Completion
|
||||
</td>
|
||||
<td style="width:90px;">
|
||||
<table class='table table-condensed'>
|
||||
<tbody>
|
||||
<tr><td style='width: 33%;'><div id="cancdiv"><input type=submit id="submit_canc" name="rmview" onclick="return cancelInterest(<?php echo $interest_id; ?>);" class="btn btn-danger btn-xs btn-block" value="Cancel Job"></div></td> </tr>
|
||||
<tr><td><div id="rejtdiv"><input type=submit id="submit_rejt" name="rmview" onclick="return rejectInterest(<?php echo $interest_id; ?>);" class="btn btn-warning btn-xs btn-block" value="Reject"></div></td> </tr>
|
||||
<tr><td style='width: 33%;'><div id="accdiv"><input type=submit id="submit_acc" name="mview" onclick="return acceptInterest(<?php echo $interest_id; ?>);" class="btn btn-info btn-xs btn-block" value="Accept"></div></td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td> </tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="panel panel-flat" >
|
||||
<div class="panel-heading">
|
||||
<h6 class="panel-title"><b>Others Interested in this Task</b></h6>
|
||||
</div>
|
||||
<?php echo $job_others_interest_table; ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="thumbnail" style="background-color: #CEECF5;">
|
||||
Message to <b><?php echo $client; ?></b><hr size='1'>
|
||||
<form name='offer_message' >
|
||||
<div class="thumb">
|
||||
<textarea rows="3" name='offermessage' class="textarea form-control" placeholder="Enter message..."></textarea>
|
||||
</div>
|
||||
<div class="text-right">
|
||||
<button type="submit" id="submit_yourmessage_<?= $offer_code; ?>" onclick="return OMessage('<?= $offer_code; ?>',<?= $interest_id; ?>);" name='btn_submit' class="btn btn-primary btn-xs" onclick="SendMessage();return false;">Send</button>
|
||||
</div>
|
||||
</form>
|
||||
<div class="caption">
|
||||
<div id='msg_result_<?= $offer_code; ?>'>
|
||||
<? echo $message_list; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
@@ -11,37 +11,152 @@
|
||||
return false;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<!-- Main content -->
|
||||
<div class="content-wrapper">
|
||||
<?php include('common/jobstrip.php');?>
|
||||
<!-- Main charts -->
|
||||
<!--div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="panel panel-flat" style="height: 45px; background-color: #f1fdd5;">
|
||||
Menu Here
|
||||
</div>
|
||||
</div>
|
||||
</div -->
|
||||
<!-- /main charts -->
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="panel panel-flat" >
|
||||
<?php echo $market_table; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--begin::Toolbar-->
|
||||
<div class="d-flex flex-wrap flex-stack my-5">
|
||||
<!--begin::Heading-->
|
||||
<h2 class="fs-2 fw-bold my-2">Available Jobs
|
||||
|
||||
<!--end::Heading-->
|
||||
<!--begin::Controls-->
|
||||
<div class="d-flex flex-wrap my-1">
|
||||
<!--begin::Select wrapper-->
|
||||
<!-- div class="m-0">
|
||||
<select name="status" data-control="select2" data-hide-search="true" class="form-select form-select-sm bg-body border-body fw-bolder w-125px">
|
||||
<option value="Active" selected="selected">Active</option>
|
||||
<option value="Approved">In Progress</option>
|
||||
<option value="Declined">To Do</option>
|
||||
<option value="In Progress">Completed</option>
|
||||
</select>
|
||||
</div -->
|
||||
<!--end::Select wrapper-->
|
||||
</div>
|
||||
<!--end::Controls-->
|
||||
</div>
|
||||
<!--end::Toolbar-->
|
||||
<!--begin::Row-->
|
||||
<div class="row g-6 g-xl-9">
|
||||
<?php
|
||||
// $market_table_result
|
||||
//onclick="showJobModal('2R05W439BR');"
|
||||
//onclick="return EDetail('$row->offer_code')
|
||||
foreach ($market_table_result as $row)
|
||||
{
|
||||
?>
|
||||
<!--begin::Col-->
|
||||
<div class="col-md-6 col-xl-4" >
|
||||
<!--begin::Card-->
|
||||
<a href="#" onclick="return showMarketJobModal('<?=$row->offer_code?>');" class="card border-hover-primary">
|
||||
<!--begin:: Card body-->
|
||||
<div class="card-body p-9" style="height: 300px">
|
||||
<!--begin::Name-->
|
||||
<div class="fs-3 fw-bolder text-dark" style="height: 50px;"><?=strlen($row->title)> 65? substr($row->title,0,65)."..." : $row->title ?></div>
|
||||
<!--end::Name-->
|
||||
<!--begin::Description-->
|
||||
<p class="text-gray-400 fw-bold fs-5 mt-1 mb-7" style="height: 65px;"><?=strlen($row->description)> 100 ? substr($row->description,0,100)."..." : $row->description ?></p>
|
||||
<!--end::Description-->
|
||||
<!--begin::Info-->
|
||||
<div class="d-flex flex-wrap mb-5">
|
||||
<!--begin::Due-->
|
||||
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 me-7 mb-3">
|
||||
<div class="fs-6 text-gray-800 fw-bolder"><?=$row->timeline_days?> day(s)</div>
|
||||
<div class="fw-bold text-gray-400">Timeline</div>
|
||||
</div>
|
||||
<!--end::Due-->
|
||||
<!--begin::Budget-->
|
||||
<div class="border border-gray-300 border-dashed rounded min-w-125px py-3 px-4 mb-3">
|
||||
<div class="fs-6 text-gray-800 fw-bolder">N <? echo money_format('%.2n', $row->price * 0.01); ?></div>
|
||||
<div class="fw-bold text-gray-400">Budget</div>
|
||||
</div>
|
||||
<!--end::Budget-->
|
||||
</div>
|
||||
<!--end::Info-->
|
||||
|
||||
<!--begin::Users-->
|
||||
<div class="symbol-group symbol-hover">
|
||||
<!--begin::User-->
|
||||
|
||||
<?=$row->offer_code?>
|
||||
|
||||
<!--begin::User-->
|
||||
</div>
|
||||
<!--end::Users-->
|
||||
</div>
|
||||
<!--end:: Card body-->
|
||||
</a>
|
||||
<!--end::Card-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- Basic modal -->
|
||||
<div id="modal_theme_primary" class="modal fade">
|
||||
<div class="modal-dialog modal-dialog-centered mw-650px">
|
||||
<div class="modal-content">
|
||||
<!--begin::Modal header-->
|
||||
<div class="modal-header pb-0 border-0 justify-content-end">
|
||||
<!--begin::Close-->
|
||||
<div class="btn btn-sm btn-icon btn-active-color-primary" data-bs-dismiss="modal">
|
||||
<!--begin::Svg Icon | path: icons/duotune/arrows/arr061.svg-->
|
||||
<span class="svg-icon svg-icon-1">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
|
||||
<rect opacity="0.5" x="6" y="17.3137" width="16" height="2" rx="1" transform="rotate(-45 6 17.3137)" fill="currentColor" />
|
||||
<rect x="7.41422" y="6" width="16" height="2" rx="1" transform="rotate(45 7.41422 6)" fill="currentColor" />
|
||||
</svg>
|
||||
</span>
|
||||
<!--end::Svg Icon-->
|
||||
</div>
|
||||
<!--end::Close-->
|
||||
</div>
|
||||
<!--begin::Modal header-->
|
||||
<div id="modal-content">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /basic modal -->
|
||||
<!-- /main content -->
|
||||
<script type="text/javascript">
|
||||
<!--
|
||||
|
||||
var current_job_contract = null;
|
||||
|
||||
function showMarketJobModal(job_contract) {
|
||||
//alert(job_contract);
|
||||
if (typeof event !== 'undefined') {
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
// load the modal content with a loader gif and message
|
||||
$('#modal-content').html('Loading...');
|
||||
|
||||
// show modal window
|
||||
$('#modal_theme_primary').modal('show');
|
||||
|
||||
|
||||
//alert("/jobs/marketdetail?proc=NCOMPLETE&job_contract=" + job_contract);
|
||||
|
||||
|
||||
$.ajax({
|
||||
url: "/jobs/marketdetail?proc=NCOMPLETE&job_contract=" + job_contract
|
||||
}).done(function (data) {
|
||||
//alert(data);
|
||||
$('#modal-content').html(data);
|
||||
});
|
||||
}
|
||||
|
||||
function EDetail(job_contract) {
|
||||
if (current_job_contract!=null) {
|
||||
$('#'+current_job_contract).html('');
|
||||
@@ -92,6 +207,10 @@ function OMessage(offer_code) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// -->
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
<?php //include('../users/common/userstrip.php'); ?>
|
||||
|
||||
<!-- Main content -->
|
||||
<form method="post" name="post_nav_find" action="">
|
||||
<input type="hidden" name="jobID" value="">
|
||||
@@ -13,30 +15,46 @@
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
<div class="content-wrapper">
|
||||
<!-- Quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
<!-- /quick stats boxes -->
|
||||
<?php include('common/jobstrip.php'); ?>
|
||||
|
||||
<!-- Marketing campaigns -->
|
||||
<div class="panel panel-flat">
|
||||
<div class="panel-heading">
|
||||
|
||||
<h5> Completed Job(s)/Task(s)</h5>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="panel-heading" style="height: 550px;">
|
||||
<div class="table-responsive">
|
||||
<?php echo $job_table ?>
|
||||
<!--begin::Row-->
|
||||
<div class="row g-5 g-xl-8">
|
||||
|
||||
<?php include('common/jobside.php'); ?>
|
||||
<!--begin::Col-->
|
||||
<div class="col-xl-9">
|
||||
<!--begin::Tables Widget 5-->
|
||||
<div class="card card-xl-stretch mb-5 mb-xl-8">
|
||||
<!--begin::Header-->
|
||||
<div class="card-header border-0 pt-5">
|
||||
<h3 class="card-title align-items-start flex-column">
|
||||
Completed Job(s)/Task(s)
|
||||
</h3>
|
||||
<div class="card-toolbar">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- /marketing campaigns -->
|
||||
</div>
|
||||
<!-- /main content -->
|
||||
<!--end::Header-->
|
||||
|
||||
|
||||
<!--begin::Body-->
|
||||
<div class="card-body py-3">
|
||||
<div class="tab-content">
|
||||
<!--begin::Tap pane-->
|
||||
<div class="tab-pane fade show active" id="kt_table_widget_5_tab_1">
|
||||
<!--begin::Table container-->
|
||||
<?php echo $job_table ?>
|
||||
<!--end::Table-->
|
||||
</div>
|
||||
<!--end::Tap pane-->
|
||||
<?php echo $links; ?>
|
||||
</div>
|
||||
</div>
|
||||
<!--end::Body-->
|
||||
</div>
|
||||
<!--end::Tables Widget 5-->
|
||||
</div>
|
||||
<!--end::Col-->
|
||||
|
||||
</div>
|
||||
<!--end::Row-->
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user