Removed old www

This commit is contained in:
CHIEFSOFT\ameye
2024-09-01 17:59:48 -04:00
parent 4771e93f2b
commit 56ae06a850
5414 changed files with 0 additions and 800713 deletions
-477
View File
@@ -1,477 +0,0 @@
##### Windows
# Windows thumbnail cache files
Thumbs.db
Thumbs.db:encryptable
ehthumbs.db
ehthumbs_vista.db
# Dump file
*.stackdump
# Folder config file
[Dd]esktop.ini
# Recycle Bin used on file shares
$RECYCLE.BIN/
# Windows Installer files
*.cab
*.msi
*.msix
*.msm
*.msp
# Windows shortcuts
*.lnk
##### Linux
*~
# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*
# KDE directory preferences
.directory
# Linux trash folder which might appear on any partition or disk
.Trash-*
# .nfs files are created when an open file is removed but is still being accessed
.nfs*
##### MacOS
# General
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
##### Backup
*.bak
*.gho
*.ori
*.orig
*.tmp
##### GPG
secring.*
##### Dropbox
# Dropbox settings and caches
.dropbox
.dropbox.attr
.dropbox.cache
##### SynopsysVCS
# Waveform formats
*.vcd
*.vpd
*.evcd
*.fsdb
# Default name of the simulation executable. A different name can be
# specified with this switch (the associated daidir database name is
# also taken from here): -o <path>/<filename>
simv
# Generated for Verilog and VHDL top configs
simv.daidir/
simv.db.dir/
# Infrastructure necessary to co-simulate SystemC models with
# Verilog/VHDL models. An alternate directory may be specified with this
# switch: -Mdir=<directory_path>
csrc/
# Log file - the following switch allows to specify the file that will be
# used to write all messages from simulation: -l <filename>
*.log
# Coverage results (generated with urg) and database location. The
# following switch can also be used: urg -dir <coverage_directory>.vdb
simv.vdb/
urgReport/
# DVE and UCLI related files.
DVEfiles/
ucli.key
# When the design is elaborated for DirectC, the following file is created
# with declarations for C/C++ functions.
vc_hdrs.h
##### SVN
.svn/
##### Mercurial
.hg/
.hgignore
.hgsigs
.hgsub
.hgsubstate
.hgtags
##### Bazaar
.bzr/
.bzrignore
##### CVS
/CVS/*
**/CVS/*
.cvsignore
*/.cvsignore
##### TortoiseGit
# Project-level settings
/.tgitconfig
##### PuTTY
# Private key
*.ppk
##### Vim
# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]
# Session
Session.vim
Sessionx.vim
# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~
##### Emacs
# -*- mode: gitignore; -*-
*~
\#*\#
/.emacs.desktop
/.emacs.desktop.lock
*.elc
auto-save-list
tramp
.\#*
# Org-mode
.org-id-locations
*_archive
# flymake-mode
*_flymake.*
# eshell files
/eshell/history
/eshell/lastdir
# elpa packages
/elpa/
# reftex files
*.rel
# AUCTeX auto folder
/auto/
# cask packages
.cask/
dist/
# Flycheck
flycheck_*.el
# server auth directory
/server/
# projectiles files
.projectile
# directory configuration
.dir-locals.el
# network security
/network-security.data
##### SublimeText
# Cache files for Sublime Text
*.tmlanguage.cache
*.tmPreferences.cache
*.stTheme.cache
# Workspace files are user-specific
*.sublime-workspace
# Project files should be checked into the repository, unless a significant
# proportion of contributors will probably not be using Sublime Text
# *.sublime-project
# SFTP configuration file
sftp-config.json
sftp-config-alt*.json
# Package control specific files
Package Control.last-run
Package Control.ca-list
Package Control.ca-bundle
Package Control.system-ca-bundle
Package Control.cache/
Package Control.ca-certs/
Package Control.merged-ca-bundle
Package Control.user-ca-bundle
oscrypto-ca-bundle.crt
bh_unicode_properties.cache
# Sublime-github package stores a github token in this file
# https://packagecontrol.io/packages/sublime-github
GitHub.sublime-settings
##### Notepad++
# Notepad++ backups #
*.bak
##### TextMate
*.tmproj
*.tmproject
tmtags
##### VisualStudioCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace
# Local History for Visual Studio Code
.history/
##### NetBeans
**/nbproject/private/
**/nbproject/Makefile-*.mk
**/nbproject/Package-*.bash
build/
nbbuild/
dist/
nbdist/
.nb-gradle/
##### JetBrains
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
##### Eclipse
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# PyDev specific (Python IDE for Eclipse)
*.pydevproject
# CDT-specific (C/C++ Development Tooling)
.cproject
# CDT- autotools
.autotools
# Java annotation processor (APT)
.factorypath
# PDT-specific (PHP Development Tools)
.buildpath
# sbteclipse plugin
.target
# Tern plugin
.tern-project
# TeXlipse plugin
.texlipse
# STS (Spring Tool Suite)
.springBeans
# Code Recommenders
.recommenders/
# Annotation Processing
.apt_generated/
.apt_generated_test/
# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet
# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project
##### Dreamweaver
# DW Dreamweaver added files
_notes
_compareTemp
configs/
dwsync.xml
dw_php_codehinting.config
*.mno
##### CodeKit
# General CodeKit files to ignore
config.codekit
config.codekit3
/min
##### Gradle
.gradle
**/build/
!src/**/build/
# Ignore Gradle GUI config
gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
!gradle-wrapper.jar
# Cache of project
.gradletasknamecache
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
# gradle/wrapper/gradle-wrapper.properties
##### Composer
composer.phar
/vendor/
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
composer.lock
##### CodeIgniter
/writable/
##### PHP CodeSniffer
# gitignore for the PHP Codesniffer framework
# website: https://github.com/squizlabs/PHP_CodeSniffer
#
# Recommended template: PHP.gitignore
/wpcs/*
##### SASS
.sass-cache/
*.css.map
*.sass.map
*.scss.map
-36
View File
@@ -1,36 +0,0 @@
<IfModule mod_rewrite.c>
RewriteEngine On
#RewriteBase /wrenchboard/
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#When your application folder isn't in the system folder
#This snippet prevents user access to the application folder
#Submitted by: Fabdrol
#Rename 'application' to your applications folder name.
RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
#Checks to
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>
<IfModule !mod_rewrite.c>
# If we don't have mod_rewrite installed, all 404's
# can be sent to index.php, and everything works as normal.
# Submitted by: ElliotHaughin
ErrorDocument 404 /index.php
</IfModule>
-3
View File
@@ -1,3 +0,0 @@
if( 'function' === typeof importScripts) {
importScripts('https://cdn.onesignal.com/sdks/OneSignalSDKWorker.js');
}
-6
View File
@@ -1,6 +0,0 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
-6
View File
@@ -1,6 +0,0 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-136
View File
@@ -1,136 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| AUTO-LOADER
| -------------------------------------------------------------------
| This file specifies which systems should be loaded by default.
|
| In order to keep the framework as light-weight as possible only the
| absolute minimal resources are loaded by default. For example,
| the database is not connected to automatically since no assumption
| is made regarding whether you intend to use it. This file lets
| you globally define which systems you would like loaded with every
| request.
|
| -------------------------------------------------------------------
| Instructions
| -------------------------------------------------------------------
|
| These are the things you can load automatically:
|
| 1. Packages
| 2. Libraries
| 3. Drivers
| 4. Helper files
| 5. Custom config files
| 6. Language files
| 7. Models
|
*/
/*
| -------------------------------------------------------------------
| Auto-load Packages
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['packages'] = array(APPPATH.'third_party', '/usr/local/shared');
|
*/
$autoload['packages'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Libraries
| -------------------------------------------------------------------
| These are the classes located in system/libraries/ or your
| application/libraries/ directory, with the addition of the
| 'database' library, which is somewhat of a special case.
|
| Prototype:
|
| $autoload['libraries'] = array('database', 'email', 'session');
|
| You can also supply an alternative library name to be assigned
| in the controller:
|
| $autoload['libraries'] = array('user_agent' => 'ua');
*/
//$autoload['libraries'] = array();
$autoload['libraries'] = array('database','session','form_validation');
/*
| -------------------------------------------------------------------
| Auto-load Drivers
| -------------------------------------------------------------------
| These classes are located in system/libraries/ or in your
| application/libraries/ directory, but are also placed inside their
| own subdirectory and they extend the CI_Driver_Library class. They
| offer multiple interchangeable driver options.
|
| Prototype:
|
| $autoload['drivers'] = array('cache');
|
| You can also supply an alternative property name to be assigned in
| the controller:
|
| $autoload['drivers'] = array('cache' => 'cch');
|
*/
$autoload['drivers'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Helper Files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['helper'] = array('url', 'file');
*/
//$autoload['helper'] = array();
$autoload['helper'] = array('form','url');
/*
| -------------------------------------------------------------------
| Auto-load Config files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['config'] = array('config1', 'config2');
|
| NOTE: This item is intended for use ONLY if you have created custom
| config files. Otherwise, leave it blank.
|
*/
$autoload['config'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Language files
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['language'] = array('lang1', 'lang2');
|
| NOTE: Do not include the "_lang" part of your file. For example
| "codeigniter_lang.php" would be referenced as array('codeigniter');
|
*/
$autoload['language'] = array();
/*
| -------------------------------------------------------------------
| Auto-load Models
| -------------------------------------------------------------------
| Prototype:
|
| $autoload['model'] = array('first_model', 'second_model');
|
| You can also supply an alternative model name to be assigned
| in the controller:
|
| $autoload['model'] = array('first_model' => 'first');
*/
$autoload['model'] = array();
-523
View File
@@ -1,523 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = '';
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';
/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = FALSE;
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| Allow $_GET array
|--------------------------------------------------------------------------
|
| By default CodeIgniter enables access to the $_GET array. If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['allow_get_array'] = TRUE;
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
| integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| Date Format for Logs
|--------------------------------------------------------------------------
|
| Each item that is logged has an associated date. You can use PHP date
| codes to set your own date formatting
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
| FALSE = Disabled
| TRUE = Enabled, take all query parameters into account.
| Please be aware that this may result in numerous cache
| files generated for the same page over and over again.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
| Whether to match the user's IP address when reading the session data.
|
| WARNING: If you're using the database driver, don't forget to update
| your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
| Whether to destroy session data associated with the old session ID
| when auto-regenerating the session ID. When set to FALSE, the data
| will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
| Global XSS Filtering
|--------------------------------------------------------------------------
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery
|--------------------------------------------------------------------------
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
| checked on a submitted form. If you are accepting user data, it is strongly
| recommended CSRF protection be enabled.
|
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
-546
View File
@@ -1,546 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/* function __autoload($classname) {
if (strpos($classname, 'CL_') !== 0) {
$file = APPPATH . 'libraries/' . $classname . '.php';
if (file_exists($file) && is_file($file)) {
@include_once($file);
}
}
} */
spl_autoload_register(function($classname) {
if (strpos($classname, 'CL_') !== 0) {
$file = APPPATH . 'libraries/' . $classname . '.php';
if (file_exists($file) && is_file($file)) {
@include_once($file);
}
}
});
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
// load back end here -----
//require_once('backend.php');
//$config['base_url'] = $wrenchboard->cfgReadChar("system.base_url"); //'http://oameye.works.wrenchboard.com/';
$config['base_url'] = ''; // https://'.$_SERVER['SERVER_NAME'].'/';
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = '';
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'AUTO'; // 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';
/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
//$config['subclass_prefix'] = 'MY_';
$config['subclass_prefix'] = 'WRB_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
//$config['composer_autoload'] = TRUE; // FALSE; // Tolik
$config['composer_autoload'] = APPPATH.'../vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| By default CodeIgniter enables access to the $_GET array. If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 1;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = APPPATH.'../writable/logs/';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
| integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| Date Format for Logs
|--------------------------------------------------------------------------
|
| Each item that is logged has an associated date. You can use PHP date
| codes to set your own date formatting
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = APPPATH.'../writable/cache/';
/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
| FALSE = Disabled
| TRUE = Enabled, take all query parameters into account.
| Please be aware that this may result in numerous cache
| files generated for the same page over and over again.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
| Whether to match the user's IP address when reading the session data.
|
| WARNING: If you're using the database driver, don't forget to update
| your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
| Whether to destroy session data associated with the old session ID
| when auto-regenerating the session ID. When set to FALSE, the data
| will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = APPPATH.'../writable/session';
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| This is particularly useful for portability between UNIX-based OSes,
| (usually \n) and Windows (\r\n).
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
| Global XSS Filtering
|--------------------------------------------------------------------------
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery
|--------------------------------------------------------------------------
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
| checked on a submitted form. If you are accepting user data, it is strongly
| recommended CSRF protection be enabled.
|
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
/*
|--------------------------------------------------------------------------
| Graylog GELF IP/PORT
|--------------------------------------------------------------------------
*/
$config['gelf_host'] = '10.0.0.112';
$config['gelf_port'] = '12201';
-296
View File
@@ -1,296 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Display Debug backtrace
|--------------------------------------------------------------------------
|
| If set to TRUE, a backtrace will be displayed along with php errors. If
| error_reporting is disabled, the backtrace will not display, regardless
| of this setting
|
*/
defined('SHOW_DEBUG_BACKTRACE') OR define('SHOW_DEBUG_BACKTRACE', TRUE);
/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system. The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.). Octal values should
| always be used to set the mode correctly.
|
*/
defined('FILE_READ_MODE') OR define('FILE_READ_MODE', 0644);
defined('FILE_WRITE_MODE') OR define('FILE_WRITE_MODE', 0666);
defined('DIR_READ_MODE') OR define('DIR_READ_MODE', 0755);
defined('DIR_WRITE_MODE') OR define('DIR_WRITE_MODE', 0755);
/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/
defined('FOPEN_READ') OR define('FOPEN_READ', 'rb');
defined('FOPEN_READ_WRITE') OR define('FOPEN_READ_WRITE', 'r+b');
defined('FOPEN_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_WRITE_CREATE_DESTRUCTIVE', 'wb'); // truncates existing file data, use with care
defined('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE') OR define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE', 'w+b'); // truncates existing file data, use with care
defined('FOPEN_WRITE_CREATE') OR define('FOPEN_WRITE_CREATE', 'ab');
defined('FOPEN_READ_WRITE_CREATE') OR define('FOPEN_READ_WRITE_CREATE', 'a+b');
defined('FOPEN_WRITE_CREATE_STRICT') OR define('FOPEN_WRITE_CREATE_STRICT', 'xb');
defined('FOPEN_READ_WRITE_CREATE_STRICT') OR define('FOPEN_READ_WRITE_CREATE_STRICT', 'x+b');
/*
|--------------------------------------------------------------------------
| Exit Status Codes
|--------------------------------------------------------------------------
|
| Used to indicate the conditions under which the script is exit()ing.
| While there is no universal standard for error codes, there are some
| broad conventions. Three such conventions are mentioned below, for
| those who wish to make use of them. The CodeIgniter defaults were
| chosen for the least overlap with these conventions, while still
| leaving room for others to be defined in future versions and user
| applications.
|
| The three main conventions used for determining exit status codes
| are as follows:
|
| Standard C/C++ Library (stdlibc):
| http://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
| (This link also contains other GNU-specific conventions)
| BSD sysexits.h:
| http://www.gsp.com/cgi-bin/man.cgi?section=3&topic=sysexits
| Bash scripting:
| http://tldp.org/LDP/abs/html/exitcodes.html
|
*/
defined('EXIT_SUCCESS') OR define('EXIT_SUCCESS', 0); // no errors
defined('EXIT_ERROR') OR define('EXIT_ERROR', 1); // generic error
defined('EXIT_CONFIG') OR define('EXIT_CONFIG', 3); // configuration error
defined('EXIT_UNKNOWN_FILE') OR define('EXIT_UNKNOWN_FILE', 4); // file not found
defined('EXIT_UNKNOWN_CLASS') OR define('EXIT_UNKNOWN_CLASS', 5); // unknown class
defined('EXIT_UNKNOWN_METHOD') OR define('EXIT_UNKNOWN_METHOD', 6); // unknown class member
defined('EXIT_USER_INPUT') OR define('EXIT_USER_INPUT', 7); // invalid user input
defined('EXIT_DATABASE') OR define('EXIT_DATABASE', 8); // database error
defined('EXIT__AUTO_MIN') OR define('EXIT__AUTO_MIN', 9); // lowest automatically-assigned error code
defined('EXIT__AUTO_MAX') OR define('EXIT__AUTO_MAX', 125); // highest automatically-assigned error code
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',900000);
define('SUPPORT_PHONE','+234 (818)-3866434');
define('UPLOAD_FILE_SIZE',1);
define('OFFER_ACCEPT',100);
define('OFFER_REJECT',333);
define('OFFER_CANCEL',222);
define('OFFER_EXPIRE',444);
define('OFFER_EXTEND',555);
define('OFFER_SENDTOME',777);
define('OFFER_RESEND',888);
define('WEBSITE_LOGIN', 1100);
define('JOB_INTEREST_ACCEPT',100);
define('JOB_INTEREST_REJECT',200);
define('JOB_INTEREST_CANCEL',300);
define('SMONEY_PROCC_MANUAL',100);
define('SMONEY_PROCC_AUTO',200);
define('SMONEY_PROCC_INTERSWITCH',300);
define('ACCOUNT_AGREE_JOBS',100);
define('ACCOUNT_AGREE_REFER',200);
define('WRENCHBOARD_SESSION_CHECK', 299);
define('WRENCHBOARD_USER_LOGIN', 300);
define('WRENCHBOARD_USER_LOGOUT', 301);
define('WRENCHBOARD_CREATE_ACCOUNT', 320);
define('CONTRACT_CANCEL_CONTRACT', 7);
define('CONTRACT_EXTEND_TIMELINE', 9);
define('CONTRACT_NOTIFY_COMPLETE', 4);
define('CONTRACT_REQUEST_CANCEL', 3);
define('CONTRACT_ACCEPT_COMPLETE', 5);
define('CONTRACT_REJECT_COMPLETE', 1);
//**************************************************************
define('WRENCHBOARD_BKO_START', 10000);
define('WRENCHBOARD_BKO_LOGIN', 10010);
define('WRENCHBOARD_BKO_CREATEUSER', 10015);
define('WRENCHBOARD_BKO_UPDATEUSER', 10020);
define('WRENCHBOARD_BKO_END', 10999);
//**************************************************************
define('WRENCHBOARD_ACCOUNT_START', 11000);
define('WRENCHBOARD_ACCOUNT_TESTEMAIL', 11001);
define('WRENCHBOARD_ACCOUNT_PENDING', 11010);
define('WRENCHBOARD_VERIFY_PENDING_LINK', 11015);
define('WRENCHBOARD_ACCOUNT_RESETPASS', 11016);
define('WRENCHBOARD_ACCOUNT_SETPASSWD', 11017);
define('WRENCHBOARD_DELETE_PENDING_LINK', 11018);
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);
define('WRENCHBOARD_SESSION_VERIFY', 11034);
define('WRENCHBOARD_UPDATE_PROFILE',11035);
define('WRENCHBOARD_ACCOUNT_TERMS',11036);
define('WRENCHBOARD_ACCOUNT_MDESCRIPTION',11037);
define('WRENCHBOARD_ACCOUNT_SAVESKILL', 11038);
define('WRENCHBOARD_ACCOUNT_DELSKILL', 11039);
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_ACCOUNT_PREPARE_TOPUP', 11062);
define('WRENCHBOARD_ACCOUNT_COMPLETE_TOPUP', 11063);
define('WRENCHBOARD_USER_DELETEACC', 11990);
define('WRENCHBOARD_ACCOUNT_END', 11999);
//**************************************************************
define('WRENCHBOARD_JOB_CREATEJOB',13010 );
define('WRENCHBOARD_JOB_DELETEJOB',13011 );
define('WRENCHBOARD_JOB_GROUP_MEMBER', 13015) ;
define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017);
define('WRENCHBOARD_JOB_CREATE_GROUP', 13020);
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
define('WRENCHBOARD_JOB_OFFER_PUBLIC',13032);
define('WRENCHBOARD_JOB_SEND_INTEREST',13033);
define('WRENCHBOARD_JOB_PROC_INTEREST',13034);
define('WRENCHBOARD_JOB_OFFER_CONCLUDE',13035);
define('WRENCHBOARD_JOB_SEND_QUESTION',13036);
define('WRENCHBOARD_JOB_MRKTINT_QUEST',13037);
define('WRENCHBOARD_JOB_REPLY_QUESTION',13038);
define('WRENCHBOARD_GROUP_START', 12000);
define('WRENCHBOARD_GROUP_CREATEGROUP', 12010);
define('WRENCHBOARD_GROUP_INVITEGROUP', 12015);
define('WRENCHBOARD_GROUP_ACCEPTGROUP', 12020);
define('WRENCHBOARD_GROUP_END', 12999);
//**************************************************************
define('WRENCHBOARD_CONTRACT_MESSAGE', 14010);
define('WRENCHBOARD_CONTRACT_STATUS', 14015);
define('WRENCHBOARD_SMONEY_ADDRECIPIENT', 33010);
define('WRENCHBOARD_SMONEY_MEMBER', 33020);
define('WRENCHBOARD_SMONEY_PROCFEE', 33025);
define('WRENCHBOARD_SMONEY_BKOPROC', 33030 );
define('WRENCHBOARD_LOGIN_SHOP', 50501);
define('WRENCHBOARD_LOGIN_ADMIN', 50502);
define('WRENCHBOARD_LOGIN_MANAGER', 50503);
define('WRENCHBOARD_SURVEY_DATA', 55000);
define('WRENCHBOARD_ADD_SURVEY', 55050);
define('WRENCHBOARD_LOAD_SURVEY', 55055);
define('WRENCHBOARD_COMPLETE_SENDMONEY_INTERSW', 555);
define('WRENCHBOARD_GETBILLER_INTERSW', 556);
define('WRENCHBOARD_BILL_PAYMENT_ADVICE_INTERSW', 557);
define('WRENCHBOARD_INTERSW_GETBILLER', 556);
define('WRENCHBOARD_INTERSW_BILL_PAYMENT_ADVICE', 557);
define('WRENCHBOARD_INTERSW_GETBILLERPAYMENTINTEMS', 558);
define('WRENCHBOARD_INTERSW_GETBILLERCATEGORIES', 559);
define('WRENCHBOARD_INTERSW_DO_TRANSFER', 560);
define('WRENCHBOARD_INTERSW_QUERY_TRANSACTION', 561);
define('WRENCHBOARD_ADD_MONEYRECIPIENT', 600);
define('WRENCHBOARD_CREATE_USER_ACCOUNT', 700);
define('WRENCHBOARD_USER_ACCOUNT_LOGIN', 710);
define('WRENCHBOARD_START_PASSWORDRESET', 720);
define('WRENCHBOARD_COMPLETE_PASSWORDRESET', 730);
//#define WRENCHBOARD_START_ADDMONEY', 770 );
//#define WRENCHBOARD_COMPLETE_ADDMONEY' 775 );
define('WRENCHBOARD_ADD_MOBILE_TOPUPNUM', 900);
define('WRENCHBOARD_PROMO_CALL', 990);
define('WRENCHBOARD_STOREFACE_GET_ACCOUNT_BALANCE', 891);
define('WRENCHBOARD_LOG_ENTRY', 900000);
define('WRENCHBOARD_CREDIT_TOPUP', 900010);
define('WRENCHBOARD_TOPUP_ORDER', 900020);
define('WRENCHBOARD_TOPUP_ORDER_PURCHASE', 900030);
define('WRENCHBOARD_PAYPAL_IPNMSG', 900090);
define('WRENCHBOARD_BULKTOPUP_ORDER', 700010);
define('WRENCHBOARD_BULKTOPUP_ITEM', 700020);
define('WRENCHBOARD_BULKTOPUP_ITEMUPDATE', 700030);
define('WRENCHBOARD_BULKTOPUP_DELIVER', 700040);
define('WRENCHBOARD_BALANCE_TOPUP_ORDER', 800020);
define('WRENCHBOARD_BALANCE_TOPUP_PURCHASE', 800030);
define('WRENCHBOARD_BALANCE_TOPUP_PAYMENT', 800040);
define('VIRTUAL_AIRTOPUP', 70011);
define('PAY_MODE_BALANCE', 0);
define('PAY_MODE_CCARD', 1);
define('PAY_MODE_BONUS', 9);
define('APPROVED_BALANCE', 5);
define('DISAPROVE_BALANCE', 3);
// define('WRENCHBOARD_COUPON_CREATE', 85010);
// define('WRENCHBOARD_COUPON_ACTIVATE',85015);
define('WRENCHBOARD_COUPON_REDEEM', 85020);
define('WRENCHBOARD_USER_SENDMONEY', 11051);
-109
View File
@@ -1,109 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| DATABASE CONNECTIVITY SETTINGS
| -------------------------------------------------------------------
| This file will contain the settings needed to access your database.
|
| For complete instructions please consult the 'Database Connection'
| page of the User Guide.
|
| -------------------------------------------------------------------
| EXPLANATION OF VARIABLES
| -------------------------------------------------------------------
|
| ['dsn'] The full DSN string describe a connection to the database.
| ['hostname'] The hostname of your database server.
| ['username'] The username used to connect to the database
| ['password'] The password used to connect to the database
| ['database'] The name of the database you want to connect to
| ['dbdriver'] The database driver. e.g.: mysqli.
| Currently supported:
| cubrid, ibase, mssql, mysql, mysqli, oci8,
| odbc, pdo, postgre, sqlite, sqlite3, sqlsrv
| ['dbprefix'] You can add an optional prefix, which will be added
| to the table name when using the Query Builder class
| ['pconnect'] TRUE/FALSE - Whether to use a persistent connection
| ['db_debug'] TRUE/FALSE - Whether database errors should be displayed.
| ['cache_on'] TRUE/FALSE - Enables/disables query caching
| ['cachedir'] The path to the folder where cache files should be stored
| ['char_set'] The character set used in communicating with the database
| ['dbcollat'] The character collation used in communicating with the database
| NOTE: For MySQL and MySQLi databases, this setting is only used
| as a backup if your server is running PHP < 5.2.3 or MySQL < 5.0.7
| (and in table creation queries made with DB Forge).
| There is an incompatibility in PHP with mysql_real_escape_string() which
| can make your site vulnerable to SQL injection if you are using a
| multi-byte character set and are running versions lower than these.
| Sites using Latin-1 or UTF-8 database character set and collation are unaffected.
| ['swap_pre'] A default table prefix that should be swapped with the dbprefix
| ['encrypt'] Whether or not to use an encrypted connection.
|
| 'mysql' (deprecated), 'sqlsrv' and 'pdo/sqlsrv' drivers accept TRUE/FALSE
| 'mysqli' and 'pdo/mysql' drivers accept an array with the following options:
|
| 'ssl_key' - Path to the private key file
| 'ssl_cert' - Path to the public key certificate file
| 'ssl_ca' - Path to the certificate authority file
| 'ssl_capath' - Path to a directory containing trusted CA certificats in PEM format
| 'ssl_cipher' - List of *allowed* ciphers to be used for the encryption, separated by colons (':')
| 'ssl_verify' - TRUE/FALSE; Whether verify the server certificate or not ('mysqli' only)
|
| ['compress'] Whether or not to use client compression (MySQL only)
| ['stricton'] TRUE/FALSE - forces 'Strict Mode' connections
| - good for ensuring strict SQL while developing
| ['ssl_options'] Used to set various SSL options that can be used when making SSL connections.
| ['failover'] array - A array with 0 or more data for connections if the main should fail.
| ['save_queries'] TRUE/FALSE - Whether to "save" all executed queries.
| NOTE: Disabling this will also effectively disable both
| $this->db->last_query() and profiling of DB queries.
| When you run a query, with this setting set to TRUE (default),
| CodeIgniter will store the SQL statement for debugging purposes.
| However, this may cause high memory usage, especially if you run
| a lot of SQL queries ... disable this to avoid that problem.
|
| The $active_group variable lets you choose which connection group to
| make active. By default there is only one group (the 'default' group).
|
| The $query_builder variables lets you determine whether or not to load
| the query builder class.
*/
$active_group = 'default';
$query_builder = TRUE;
// load back end here -----
require_once('backend.php');
$show_database_error = true;
$is_live = $wrenchboard->cfgReadChar("system.live");
if ($is_live == false) {
$show_database_error = false;
}
$db['default'] = array(
'dsn' => '',
'hostname' => $wrenchboard->cfgReadChar("database.host"),
'username' => $wrenchboard->cfgReadChar("database.user"),
'password' => $wrenchboard->cfgReadChar("database.pass"),
'database' => $wrenchboard->cfgReadChar("database.name"),
'dbdriver' => 'postgre',
'dbprefix' => '',
'pconnect' => FALSE,
'db_debug' => $show_database_error,
'db_debug2' => (ENVIRONMENT !== 'production'),
'cache_on' => FALSE,
'cachedir' => '',
'char_set' => 'utf8',
'dbcollat' => 'utf8_general_ci',
'swap_pre' => '',
'encrypt' => FALSE,
'compress' => FALSE,
'stricton' => FALSE,
'failover' => array(),
'save_queries' => TRUE
);
-24
View File
@@ -1,24 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
$_doctypes = array(
'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
'xhtml1-strict' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
'xhtml1-trans' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">',
'xhtml1-frame' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
'xhtml-basic11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.1//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic11.dtd">',
'html5' => '<!DOCTYPE html>',
'html4-strict' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">',
'html4-trans' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">',
'html4-frame' => '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">',
'mathml1' => '<!DOCTYPE math SYSTEM "http://www.w3.org/Math/DTD/mathml1/mathml.dtd">',
'mathml2' => '<!DOCTYPE math PUBLIC "-//W3C//DTD MathML 2.0//EN" "http://www.w3.org/Math/DTD/mathml2/mathml2.dtd">',
'svg10' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">',
'svg11' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">',
'svg11-basic' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd">',
'svg11-tiny' => '<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">',
'xhtml-math-svg-xh' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-math-svg-sh' => '<!DOCTYPE svg:svg PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN" "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg.dtd">',
'xhtml-rdfa-1' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.0//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-1.dtd">',
'xhtml-rdfa-2' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML+RDFa 1.1//EN" "http://www.w3.org/MarkUp/DTD/xhtml-rdfa-2.dtd">'
);
-29
View File
@@ -1,29 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Facebook App details
| -------------------------------------------------------------------
|
| To get an facebook app details you have to be a registered developer
| at http://developer.facebook.com and create an app for your project.
|
| facebook_app_id string Your facebook app ID.
| facebook_app_secret string Your facebook app secret.
| facebook_login_type string Set login type. (web, js, canvas)
| facebook_login_redirect_url string URL tor redirect back to after login. Do not include domain.
| facebook_logout_redirect_url string URL tor redirect back to after login. Do not include domain.
| facebook_permissions array The permissions you need.
| facebook_graph_version string Set Facebook Graph version to be used. Eg v2.6
| facebook_auth_on_load boolean Set to TRUE to have the library to check for valid access token on every page load.
*/
$config['facebook_app_id'] = '390204307987009';
$config['facebook_app_secret'] = '19f778e312f2ab96d147bacb612910c2';
$config['facebook_default_scope'] = 'email,public_profile';
$config['facebook_login_type'] = 'web';
$config['facebook_login_redirect_url'] = 'login';
$config['facebook_logout_redirect_url'] = 'login/logout';
$config['facebook_permissions'] = array('public_profile', 'email');
$config['facebook_graph_version'] = 'v2.2';
$config['facebook_auth_on_load'] = TRUE;
-103
View File
@@ -1,103 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| Foreign Characters
| -------------------------------------------------------------------
| This file contains an array of foreign characters for transliteration
| conversion used by the Text helper
|
*/
$foreign_characters = array(
'/ä|æ|ǽ/' => 'ae',
'/ö|œ/' => 'oe',
'/ü/' => 'ue',
'/Ä/' => 'Ae',
'/Ü/' => 'Ue',
'/Ö/' => 'Oe',
'/À|Á|Â|Ã|Ä|Å|Ǻ|Ā|Ă|Ą|Ǎ|Α|Ά|Ả|Ạ|Ầ|Ẫ|Ẩ|Ậ|Ằ|Ắ|Ẵ|Ẳ|Ặ|А/' => 'A',
'/à|á|â|ã|å|ǻ|ā|ă|ą|ǎ|ª|α|ά|ả|ạ|ầ|ấ|ẫ|ẩ|ậ|ằ|ắ|ẵ|ẳ|ặ|а/' => 'a',
'/Б/' => 'B',
'/б/' => 'b',
'/Ç|Ć|Ĉ|Ċ|Č/' => 'C',
'/ç|ć|ĉ|ċ|č/' => 'c',
'/Д/' => 'D',
'/д/' => 'd',
'/Ð|Ď|Đ|Δ/' => 'Dj',
'/ð|ď|đ|δ/' => 'dj',
'/È|É|Ê|Ë|Ē|Ĕ|Ė|Ę|Ě|Ε|Έ|Ẽ|Ẻ|Ẹ|Ề|Ế|Ễ|Ể|Ệ|Е|Э/' => 'E',
'/è|é|ê|ë|ē|ĕ|ė|ę|ě|έ|ε|ẽ|ẻ|ẹ|ề|ế|ễ|ể|ệ|е|э/' => 'e',
'/Ф/' => 'F',
'/ф/' => 'f',
'/Ĝ|Ğ|Ġ|Ģ|Γ|Г|Ґ/' => 'G',
'/ĝ|ğ|ġ|ģ|γ|г|ґ/' => 'g',
'/Ĥ|Ħ/' => 'H',
'/ĥ|ħ/' => 'h',
'/Ì|Í|Î|Ï|Ĩ|Ī|Ĭ|Ǐ|Į|İ|Η|Ή|Ί|Ι|Ϊ|Ỉ|Ị|И|Ы/' => 'I',
'/ì|í|î|ï|ĩ|ī|ĭ|ǐ|į|ı|η|ή|ί|ι|ϊ|ỉ|ị|и|ы|ї/' => 'i',
'/Ĵ/' => 'J',
'/ĵ/' => 'j',
'/Ķ|Κ|К/' => 'K',
'/ķ|κ|к/' => 'k',
'/Ĺ|Ļ|Ľ|Ŀ|Ł|Λ|Л/' => 'L',
'/ĺ|ļ|ľ|ŀ|ł|λ|л/' => 'l',
'/М/' => 'M',
'/м/' => 'm',
'/Ñ|Ń|Ņ|Ň|Ν|Н/' => 'N',
'/ñ|ń|ņ|ň|ʼn|ν|н/' => 'n',
'/Ò|Ó|Ô|Õ|Ō|Ŏ|Ǒ|Ő|Ơ|Ø|Ǿ|Ο|Ό|Ω|Ώ|Ỏ|Ọ|Ồ|Ố|Ỗ|Ổ|Ộ|Ờ|Ớ|Ỡ|Ở|Ợ|О/' => 'O',
'/ò|ó|ô|õ|ō|ŏ|ǒ|ő|ơ|ø|ǿ|º|ο|ό|ω|ώ|ỏ|ọ|ồ|ố|ỗ|ổ|ộ|ờ|ớ|ỡ|ở|ợ|о/' => 'o',
'/П/' => 'P',
'/п/' => 'p',
'/Ŕ|Ŗ|Ř|Ρ|Р/' => 'R',
'/ŕ|ŗ|ř|ρ|р/' => 'r',
'/Ś|Ŝ|Ş|Ș|Š|Σ|С/' => 'S',
'/ś|ŝ|ş|ș|š|ſ|σ|ς|с/' => 's',
'/Ț|Ţ|Ť|Ŧ|τ|Т/' => 'T',
'/ț|ţ|ť|ŧ|т/' => 't',
'/Þ|þ/' => 'th',
'/Ù|Ú|Û|Ũ|Ū|Ŭ|Ů|Ű|Ų|Ư|Ǔ|Ǖ|Ǘ|Ǚ|Ǜ|Ũ|Ủ|Ụ|Ừ|Ứ|Ữ|Ử|Ự|У/' => 'U',
'/ù|ú|û|ũ|ū|ŭ|ů|ű|ų|ư|ǔ|ǖ|ǘ|ǚ|ǜ|υ|ύ|ϋ|ủ|ụ|ừ|ứ|ữ|ử|ự|у/' => 'u',
'/Ý|Ÿ|Ŷ|Υ|Ύ|Ϋ|Ỳ|Ỹ|Ỷ|Ỵ|Й/' => 'Y',
'/ý|ÿ|ŷ|ỳ|ỹ|ỷ|ỵ|й/' => 'y',
'/В/' => 'V',
'/в/' => 'v',
'/Ŵ/' => 'W',
'/ŵ/' => 'w',
'/Ź|Ż|Ž|Ζ|З/' => 'Z',
'/ź|ż|ž|ζ|з/' => 'z',
'/Æ|Ǽ/' => 'AE',
'/ß/' => 'ss',
'/IJ/' => 'IJ',
'/ij/' => 'ij',
'/Œ/' => 'OE',
'/ƒ/' => 'f',
'/ξ/' => 'ks',
'/π/' => 'p',
'/β/' => 'v',
'/μ/' => 'm',
'/ψ/' => 'ps',
'/Ё/' => 'Yo',
'/ё/' => 'yo',
'/Є/' => 'Ye',
'/є/' => 'ye',
'/Ї/' => 'Yi',
'/Ж/' => 'Zh',
'/ж/' => 'zh',
'/Х/' => 'Kh',
'/х/' => 'kh',
'/Ц/' => 'Ts',
'/ц/' => 'ts',
'/Ч/' => 'Ch',
'/ч/' => 'ch',
'/Ш/' => 'Sh',
'/ш/' => 'sh',
'/Щ/' => 'Shch',
'/щ/' => 'shch',
'/Ъ|ъ|Ь|ь/' => '',
'/Ю/' => 'Yu',
'/ю/' => 'yu',
'/Я/' => 'Ya',
'/я/' => 'ya'
);
-13
View File
@@ -1,13 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Hooks
| -------------------------------------------------------------------------
| This file lets you define "hooks" to extend CI without hacking the core
| files. Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/hooks.html
|
*/
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-19
View File
@@ -1,19 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Memcached settings
| -------------------------------------------------------------------------
| Your Memcached servers can be specified below.
|
| See: https://codeigniter.com/user_guide/libraries/caching.html#memcached
|
*/
$config = array(
'default' => array(
'hostname' => '127.0.0.1',
'port' => '11211',
'weight' => '1',
),
);
-84
View File
@@ -1,84 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Enable/Disable Migrations
|--------------------------------------------------------------------------
|
| Migrations are disabled by default for security reasons.
| You should enable migrations whenever you intend to do a schema migration
| and disable it back when you're done.
|
*/
$config['migration_enabled'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migration Type
|--------------------------------------------------------------------------
|
| Migration file names may be based on a sequential identifier or on
| a timestamp. Options are:
|
| 'sequential' = Sequential migration naming (001_add_blog.php)
| 'timestamp' = Timestamp migration naming (20121031104401_add_blog.php)
| Use timestamp format YYYYMMDDHHIISS.
|
| Note: If this configuration value is missing the Migration library
| defaults to 'sequential' for backward compatibility with CI2.
|
*/
$config['migration_type'] = 'timestamp';
/*
|--------------------------------------------------------------------------
| Migrations table
|--------------------------------------------------------------------------
|
| This is the name of the table that will store the current migrations state.
| When migrations runs it will store in a database table which migration
| level the system is at. It then compares the migration level in this
| table to the $config['migration_version'] if they are not the same it
| will migrate up. This must be set.
|
*/
$config['migration_table'] = 'migrations';
/*
|--------------------------------------------------------------------------
| Auto Migrate To Latest
|--------------------------------------------------------------------------
|
| If this is set to TRUE when you load the migrations class and have
| $config['migration_enabled'] set to TRUE the system will auto migrate
| to your latest migration (whatever $config['migration_version'] is
| set to). This way you do not have to call migrations anywhere else
| in your code to have the latest migration.
|
*/
$config['migration_auto_latest'] = FALSE;
/*
|--------------------------------------------------------------------------
| Migrations version
|--------------------------------------------------------------------------
|
| This is used to set migration version that the file system should be on.
| If you run $this->migration->current() this is the version that schema will
| be upgraded / downgraded to.
|
*/
$config['migration_version'] = 0;
/*
|--------------------------------------------------------------------------
| Migrations Path
|--------------------------------------------------------------------------
|
| Path to your migrations folder.
| Typically, it will be within your application path.
| Also, writing permission is required within the migrations path.
|
*/
$config['migration_path'] = APPPATH.'migrations/';
-167
View File
@@ -1,167 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| MIME TYPES
| -------------------------------------------------------------------
| This file contains an array of mime types. It is used by the
| Upload class to help identify allowed file types.
|
*/
return array(
'hqx' => array('application/mac-binhex40', 'application/mac-binhex', 'application/x-binhex40', 'application/x-mac-binhex40'),
'cpt' => 'application/mac-compactpro',
'csv' => array('text/x-comma-separated-values', 'text/comma-separated-values', 'application/octet-stream', 'application/vnd.ms-excel', 'application/x-csv', 'text/x-csv', 'text/csv', 'application/csv', 'application/excel', 'application/vnd.msexcel', 'text/plain'),
'bin' => array('application/macbinary', 'application/mac-binary', 'application/octet-stream', 'application/x-binary', 'application/x-macbinary'),
'dms' => 'application/octet-stream',
'lha' => 'application/octet-stream',
'lzh' => 'application/octet-stream',
'exe' => array('application/octet-stream', 'application/x-msdownload'),
'class' => 'application/octet-stream',
'psd' => array('application/x-photoshop', 'image/vnd.adobe.photoshop'),
'so' => 'application/octet-stream',
'sea' => 'application/octet-stream',
'dll' => 'application/octet-stream',
'oda' => 'application/oda',
'pdf' => array('application/pdf', 'application/force-download', 'application/x-download', 'binary/octet-stream'),
'ai' => array('application/pdf', 'application/postscript'),
'eps' => 'application/postscript',
'ps' => 'application/postscript',
'smi' => 'application/smil',
'smil' => 'application/smil',
'mif' => 'application/vnd.mif',
'xls' => array('application/vnd.ms-excel', 'application/msexcel', 'application/x-msexcel', 'application/x-ms-excel', 'application/x-excel', 'application/x-dos_ms_excel', 'application/xls', 'application/x-xls', 'application/excel', 'application/download', 'application/vnd.ms-office', 'application/msword'),
'ppt' => array('application/powerpoint', 'application/vnd.ms-powerpoint', 'application/vnd.ms-office', 'application/msword'),
'pptx' => array('application/vnd.openxmlformats-officedocument.presentationml.presentation', 'application/x-zip', 'application/zip'),
'wbxml' => 'application/wbxml',
'wmlc' => 'application/wmlc',
'dcr' => 'application/x-director',
'dir' => 'application/x-director',
'dxr' => 'application/x-director',
'dvi' => 'application/x-dvi',
'gtar' => 'application/x-gtar',
'gz' => 'application/x-gzip',
'gzip' => 'application/x-gzip',
'php' => array('application/x-httpd-php', 'application/php', 'application/x-php', 'text/php', 'text/x-php', 'application/x-httpd-php-source'),
'php4' => 'application/x-httpd-php',
'php3' => 'application/x-httpd-php',
'phtml' => 'application/x-httpd-php',
'phps' => 'application/x-httpd-php-source',
'js' => array('application/x-javascript', 'text/plain'),
'swf' => 'application/x-shockwave-flash',
'sit' => 'application/x-stuffit',
'tar' => 'application/x-tar',
'tgz' => array('application/x-tar', 'application/x-gzip-compressed'),
'z' => 'application/x-compress',
'xhtml' => 'application/xhtml+xml',
'xht' => 'application/xhtml+xml',
'zip' => array('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/s-compressed', 'multipart/x-zip'),
'rar' => array('application/x-rar', 'application/rar', 'application/x-rar-compressed'),
'mid' => 'audio/midi',
'midi' => 'audio/midi',
'mpga' => 'audio/mpeg',
'mp2' => 'audio/mpeg',
'mp3' => array('audio/mpeg', 'audio/mpg', 'audio/mpeg3', 'audio/mp3'),
'aif' => array('audio/x-aiff', 'audio/aiff'),
'aiff' => array('audio/x-aiff', 'audio/aiff'),
'aifc' => 'audio/x-aiff',
'ram' => 'audio/x-pn-realaudio',
'rm' => 'audio/x-pn-realaudio',
'rpm' => 'audio/x-pn-realaudio-plugin',
'ra' => 'audio/x-realaudio',
'rv' => 'video/vnd.rn-realvideo',
'wav' => array('audio/x-wav', 'audio/wave', 'audio/wav'),
'bmp' => array('image/bmp', 'image/x-bmp', 'image/x-bitmap', 'image/x-xbitmap', 'image/x-win-bitmap', 'image/x-windows-bmp', 'image/ms-bmp', 'image/x-ms-bmp', 'application/bmp', 'application/x-bmp', 'application/x-win-bitmap'),
'gif' => 'image/gif',
'jpeg' => array('image/jpeg', 'image/pjpeg'),
'jpg' => array('image/jpeg', 'image/pjpeg'),
'jpe' => array('image/jpeg', 'image/pjpeg'),
'jp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'j2k' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpf' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpg2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpx' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'jpm' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mj2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'mjp2' => array('image/jp2', 'video/mj2', 'image/jpx', 'image/jpm'),
'png' => array('image/png', 'image/x-png'),
'tiff' => 'image/tiff',
'tif' => 'image/tiff',
'css' => array('text/css', 'text/plain'),
'html' => array('text/html', 'text/plain'),
'htm' => array('text/html', 'text/plain'),
'shtml' => array('text/html', 'text/plain'),
'txt' => 'text/plain',
'text' => 'text/plain',
'log' => array('text/plain', 'text/x-log'),
'rtx' => 'text/richtext',
'rtf' => 'text/rtf',
'xml' => array('application/xml', 'text/xml', 'text/plain'),
'xsl' => array('application/xml', 'text/xsl', 'text/xml'),
'mpeg' => 'video/mpeg',
'mpg' => 'video/mpeg',
'mpe' => 'video/mpeg',
'qt' => 'video/quicktime',
'mov' => 'video/quicktime',
'avi' => array('video/x-msvideo', 'video/msvideo', 'video/avi', 'application/x-troff-msvideo'),
'movie' => 'video/x-sgi-movie',
'doc' => array('application/msword', 'application/vnd.ms-office'),
'docx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword', 'application/x-zip'),
'dot' => array('application/msword', 'application/vnd.ms-office'),
'dotx' => array('application/vnd.openxmlformats-officedocument.wordprocessingml.document', 'application/zip', 'application/msword'),
'xlsx' => array('application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/zip', 'application/vnd.ms-excel', 'application/msword', 'application/x-zip'),
'word' => array('application/msword', 'application/octet-stream'),
'xl' => 'application/excel',
'eml' => 'message/rfc822',
'json' => array('application/json', 'text/json'),
'pem' => array('application/x-x509-user-cert', 'application/x-pem-file', 'application/octet-stream'),
'p10' => array('application/x-pkcs10', 'application/pkcs10'),
'p12' => 'application/x-pkcs12',
'p7a' => 'application/x-pkcs7-signature',
'p7c' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7m' => array('application/pkcs7-mime', 'application/x-pkcs7-mime'),
'p7r' => 'application/x-pkcs7-certreqresp',
'p7s' => 'application/pkcs7-signature',
'crt' => array('application/x-x509-ca-cert', 'application/x-x509-user-cert', 'application/pkix-cert'),
'crl' => array('application/pkix-crl', 'application/pkcs-crl'),
'der' => 'application/x-x509-ca-cert',
'kdb' => 'application/octet-stream',
'pgp' => 'application/pgp',
'gpg' => 'application/gpg-keys',
'sst' => 'application/octet-stream',
'csr' => 'application/octet-stream',
'rsa' => 'application/x-pkcs7',
'cer' => array('application/pkix-cert', 'application/x-x509-ca-cert'),
'3g2' => 'video/3gpp2',
'3gp' => array('video/3gp', 'video/3gpp'),
'mp4' => 'video/mp4',
'm4a' => 'audio/x-m4a',
'f4v' => array('video/mp4', 'video/x-f4v'),
'flv' => 'video/x-flv',
'webm' => 'video/webm',
'aac' => 'audio/x-acc',
'm4u' => 'application/vnd.mpegurl',
'm3u' => 'text/plain',
'xspf' => 'application/xspf+xml',
'vlc' => 'application/videolan',
'wmv' => array('video/x-ms-wmv', 'video/x-ms-asf'),
'au' => 'audio/x-au',
'ac3' => 'audio/ac3',
'flac' => 'audio/x-flac',
'ogg' => array('audio/ogg', 'video/ogg', 'application/ogg'),
'kmz' => array('application/vnd.google-earth.kmz', 'application/zip', 'application/x-zip'),
'kml' => array('application/vnd.google-earth.kml+xml', 'application/xml', 'text/xml'),
'ics' => 'text/calendar',
'ical' => 'text/calendar',
'zsh' => 'text/x-scriptzsh',
'7zip' => array('application/x-compressed', 'application/x-zip-compressed', 'application/zip', 'multipart/x-zip'),
'cdr' => array('application/cdr', 'application/coreldraw', 'application/x-cdr', 'application/x-coreldraw', 'image/cdr', 'image/x-cdr', 'zz-application/zz-winassoc-cdr'),
'wma' => array('audio/x-ms-wma', 'video/x-ms-asf'),
'jar' => array('application/java-archive', 'application/x-java-application', 'application/x-jar', 'application/x-compressed'),
'svg' => array('image/svg+xml', 'application/xml', 'text/xml'),
'vcf' => 'text/x-vcard',
'srt' => array('text/srt', 'text/plain'),
'vtt' => array('text/vtt', 'text/plain'),
'ico' => array('image/x-icon', 'image/x-ico', 'image/vnd.microsoft.icon')
);
-14
View File
@@ -1,14 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| Profiler Sections
| -------------------------------------------------------------------------
| This file lets you determine whether or not various sections of Profiler
| data are displayed when the Profiler is enabled.
| Please see the user guide for info:
|
| https://codeigniter.com/user_guide/general/profiling.html
|
*/
-57
View File
@@ -1,57 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------------
| URI ROUTING
| -------------------------------------------------------------------------
| This file lets you re-map URI requests to specific controller functions.
|
| Typically there is a one-to-one relationship between a URL string
| and its corresponding controller class/method. The segments in a
| URL normally follow this pattern:
|
| example.com/class/method/id/
|
| In some instances, however, you may want to remap this relationship
| so that a different class/function is called than the one
| corresponding to the URL.
|
| Please see the user guide for complete details:
|
| https://codeigniter.com/user_guide/general/routing.html
|
| -------------------------------------------------------------------------
| RESERVED ROUTES
| -------------------------------------------------------------------------
|
| There are three reserved routes:
|
| $route['default_controller'] = 'welcome';
|
| This route indicates which controller class should be loaded if the
| URI contains no data. In the above example, the "welcome" class
| would be loaded.
|
| $route['404_override'] = 'errors/page_missing';
|
| This route will tell the Router which controller/method to use if those
| provided in the URL cannot be matched to a valid route.
|
| $route['translate_uri_dashes'] = FALSE;
|
| This is not exactly a route, but allows you to automatically route
| controller and method names that contain dashes. '-' isn't a valid
| class or method name character, so it requires translation.
| When you set this option to TRUE, it will replace ALL dashes in the
| controller and method URI segments.
|
| Examples: my-controller/index -> my_controller/index
| my-controller/my-method -> my_controller/my_method
*/
$route['default_controller'] = 'login';
$route['404_override'] = 'Wrb404';
$route['translate_uri_dashes'] = FALSE;
$route['auth/(.+)'] = 'home/auth/$1';
$route['cardreciepts/(.+)'] = 'paymnt/cardreciepts/$1';
-64
View File
@@ -1,64 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| SMILEYS
| -------------------------------------------------------------------
| This file contains an array of smileys for use with the emoticon helper.
| Individual images can be used to replace multiple smileys. For example:
| :-) and :) use the same image replacement.
|
| Please see user guide for more info:
| https://codeigniter.com/user_guide/helpers/smiley_helper.html
|
*/
$smileys = array(
// smiley image name width height alt
':-)' => array('grin.gif', '19', '19', 'grin'),
':lol:' => array('lol.gif', '19', '19', 'LOL'),
':cheese:' => array('cheese.gif', '19', '19', 'cheese'),
':)' => array('smile.gif', '19', '19', 'smile'),
';-)' => array('wink.gif', '19', '19', 'wink'),
';)' => array('wink.gif', '19', '19', 'wink'),
':smirk:' => array('smirk.gif', '19', '19', 'smirk'),
':roll:' => array('rolleyes.gif', '19', '19', 'rolleyes'),
':-S' => array('confused.gif', '19', '19', 'confused'),
':wow:' => array('surprise.gif', '19', '19', 'surprised'),
':bug:' => array('bigsurprise.gif', '19', '19', 'big surprise'),
':-P' => array('tongue_laugh.gif', '19', '19', 'tongue laugh'),
'%-P' => array('tongue_rolleye.gif', '19', '19', 'tongue rolleye'),
';-P' => array('tongue_wink.gif', '19', '19', 'tongue wink'),
':P' => array('raspberry.gif', '19', '19', 'raspberry'),
':blank:' => array('blank.gif', '19', '19', 'blank stare'),
':long:' => array('longface.gif', '19', '19', 'long face'),
':ohh:' => array('ohh.gif', '19', '19', 'ohh'),
':grrr:' => array('grrr.gif', '19', '19', 'grrr'),
':gulp:' => array('gulp.gif', '19', '19', 'gulp'),
'8-/' => array('ohoh.gif', '19', '19', 'oh oh'),
':down:' => array('downer.gif', '19', '19', 'downer'),
':red:' => array('embarrassed.gif', '19', '19', 'red face'),
':sick:' => array('sick.gif', '19', '19', 'sick'),
':shut:' => array('shuteye.gif', '19', '19', 'shut eye'),
':-/' => array('hmm.gif', '19', '19', 'hmmm'),
'>:(' => array('mad.gif', '19', '19', 'mad'),
':mad:' => array('mad.gif', '19', '19', 'mad'),
'>:-(' => array('angry.gif', '19', '19', 'angry'),
':angry:' => array('angry.gif', '19', '19', 'angry'),
':zip:' => array('zip.gif', '19', '19', 'zipper'),
':kiss:' => array('kiss.gif', '19', '19', 'kiss'),
':ahhh:' => array('shock.gif', '19', '19', 'shock'),
':coolsmile:' => array('shade_smile.gif', '19', '19', 'cool smile'),
':coolsmirk:' => array('shade_smirk.gif', '19', '19', 'cool smirk'),
':coolgrin:' => array('shade_grin.gif', '19', '19', 'cool grin'),
':coolhmm:' => array('shade_hmm.gif', '19', '19', 'cool hmm'),
':coolmad:' => array('shade_mad.gif', '19', '19', 'cool mad'),
':coolcheese:' => array('shade_cheese.gif', '19', '19', 'cool cheese'),
':vampire:' => array('vampire.gif', '19', '19', 'vampire'),
':snake:' => array('snake.gif', '19', '19', 'snake'),
':exclaim:' => array('exclaim.gif', '19', '19', 'exclaim'),
':question:' => array('question.gif', '19', '19', 'question')
);
-214
View File
@@ -1,214 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
| -------------------------------------------------------------------
| USER AGENT TYPES
| -------------------------------------------------------------------
| This file contains four arrays of user agent data. It is used by the
| User Agent Class to help identify browser, platform, robot, and
| mobile device data. The array keys are used to identify the device
| and the array values are used to set the actual name of the item.
*/
$platforms = array(
'windows nt 10.0' => 'Windows 10',
'windows nt 6.3' => 'Windows 8.1',
'windows nt 6.2' => 'Windows 8',
'windows nt 6.1' => 'Windows 7',
'windows nt 6.0' => 'Windows Vista',
'windows nt 5.2' => 'Windows 2003',
'windows nt 5.1' => 'Windows XP',
'windows nt 5.0' => 'Windows 2000',
'windows nt 4.0' => 'Windows NT 4.0',
'winnt4.0' => 'Windows NT 4.0',
'winnt 4.0' => 'Windows NT',
'winnt' => 'Windows NT',
'windows 98' => 'Windows 98',
'win98' => 'Windows 98',
'windows 95' => 'Windows 95',
'win95' => 'Windows 95',
'windows phone' => 'Windows Phone',
'windows' => 'Unknown Windows OS',
'android' => 'Android',
'blackberry' => 'BlackBerry',
'iphone' => 'iOS',
'ipad' => 'iOS',
'ipod' => 'iOS',
'os x' => 'Mac OS X',
'ppc mac' => 'Power PC Mac',
'freebsd' => 'FreeBSD',
'ppc' => 'Macintosh',
'linux' => 'Linux',
'debian' => 'Debian',
'sunos' => 'Sun Solaris',
'beos' => 'BeOS',
'apachebench' => 'ApacheBench',
'aix' => 'AIX',
'irix' => 'Irix',
'osf' => 'DEC OSF',
'hp-ux' => 'HP-UX',
'netbsd' => 'NetBSD',
'bsdi' => 'BSDi',
'openbsd' => 'OpenBSD',
'gnu' => 'GNU/Linux',
'unix' => 'Unknown Unix OS',
'symbian' => 'Symbian OS'
);
// The order of this array should NOT be changed. Many browsers return
// multiple browser types so we want to identify the sub-type first.
$browsers = array(
'OPR' => 'Opera',
'Flock' => 'Flock',
'Edge' => 'Spartan',
'Chrome' => 'Chrome',
// Opera 10+ always reports Opera/9.80 and appends Version/<real version> to the user agent string
'Opera.*?Version' => 'Opera',
'Opera' => 'Opera',
'MSIE' => 'Internet Explorer',
'Internet Explorer' => 'Internet Explorer',
'Trident.* rv' => 'Internet Explorer',
'Shiira' => 'Shiira',
'Firefox' => 'Firefox',
'Chimera' => 'Chimera',
'Phoenix' => 'Phoenix',
'Firebird' => 'Firebird',
'Camino' => 'Camino',
'Netscape' => 'Netscape',
'OmniWeb' => 'OmniWeb',
'Safari' => 'Safari',
'Mozilla' => 'Mozilla',
'Konqueror' => 'Konqueror',
'icab' => 'iCab',
'Lynx' => 'Lynx',
'Links' => 'Links',
'hotjava' => 'HotJava',
'amaya' => 'Amaya',
'IBrowse' => 'IBrowse',
'Maxthon' => 'Maxthon',
'Ubuntu' => 'Ubuntu Web Browser'
);
$mobiles = array(
// legacy array, old values commented out
'mobileexplorer' => 'Mobile Explorer',
// 'openwave' => 'Open Wave',
// 'opera mini' => 'Opera Mini',
// 'operamini' => 'Opera Mini',
// 'elaine' => 'Palm',
'palmsource' => 'Palm',
// 'digital paths' => 'Palm',
// 'avantgo' => 'Avantgo',
// 'xiino' => 'Xiino',
'palmscape' => 'Palmscape',
// 'nokia' => 'Nokia',
// 'ericsson' => 'Ericsson',
// 'blackberry' => 'BlackBerry',
// 'motorola' => 'Motorola'
// Phones and Manufacturers
'motorola' => 'Motorola',
'nokia' => 'Nokia',
'palm' => 'Palm',
'iphone' => 'Apple iPhone',
'ipad' => 'iPad',
'ipod' => 'Apple iPod Touch',
'sony' => 'Sony Ericsson',
'ericsson' => 'Sony Ericsson',
'blackberry' => 'BlackBerry',
'cocoon' => 'O2 Cocoon',
'blazer' => 'Treo',
'lg' => 'LG',
'amoi' => 'Amoi',
'xda' => 'XDA',
'mda' => 'MDA',
'vario' => 'Vario',
'htc' => 'HTC',
'samsung' => 'Samsung',
'sharp' => 'Sharp',
'sie-' => 'Siemens',
'alcatel' => 'Alcatel',
'benq' => 'BenQ',
'ipaq' => 'HP iPaq',
'mot-' => 'Motorola',
'playstation portable' => 'PlayStation Portable',
'playstation 3' => 'PlayStation 3',
'playstation vita' => 'PlayStation Vita',
'hiptop' => 'Danger Hiptop',
'nec-' => 'NEC',
'panasonic' => 'Panasonic',
'philips' => 'Philips',
'sagem' => 'Sagem',
'sanyo' => 'Sanyo',
'spv' => 'SPV',
'zte' => 'ZTE',
'sendo' => 'Sendo',
'nintendo dsi' => 'Nintendo DSi',
'nintendo ds' => 'Nintendo DS',
'nintendo 3ds' => 'Nintendo 3DS',
'wii' => 'Nintendo Wii',
'open web' => 'Open Web',
'openweb' => 'OpenWeb',
// Operating Systems
'android' => 'Android',
'symbian' => 'Symbian',
'SymbianOS' => 'SymbianOS',
'elaine' => 'Palm',
'series60' => 'Symbian S60',
'windows ce' => 'Windows CE',
// Browsers
'obigo' => 'Obigo',
'netfront' => 'Netfront Browser',
'openwave' => 'Openwave Browser',
'mobilexplorer' => 'Mobile Explorer',
'operamini' => 'Opera Mini',
'opera mini' => 'Opera Mini',
'opera mobi' => 'Opera Mobile',
'fennec' => 'Firefox Mobile',
// Other
'digital paths' => 'Digital Paths',
'avantgo' => 'AvantGo',
'xiino' => 'Xiino',
'novarra' => 'Novarra Transcoder',
'vodafone' => 'Vodafone',
'docomo' => 'NTT DoCoMo',
'o2' => 'O2',
// Fallback
'mobile' => 'Generic Mobile',
'wireless' => 'Generic Mobile',
'j2me' => 'Generic Mobile',
'midp' => 'Generic Mobile',
'cldc' => 'Generic Mobile',
'up.link' => 'Generic Mobile',
'up.browser' => 'Generic Mobile',
'smartphone' => 'Generic Mobile',
'cellphone' => 'Generic Mobile'
);
// There are hundreds of bots but these are the most common.
$robots = array(
'googlebot' => 'Googlebot',
'msnbot' => 'MSNBot',
'baiduspider' => 'Baiduspider',
'bingbot' => 'Bing',
'slurp' => 'Inktomi Slurp',
'yahoo' => 'Yahoo',
'ask jeeves' => 'Ask Jeeves',
'fastcrawler' => 'FastCrawler',
'infoseek' => 'InfoSeek Robot 1.0',
'lycos' => 'Lycos',
'yandex' => 'YandexBot',
'mediapartners-google' => 'MediaPartners Google',
'CRAZYWEBCRAWLER' => 'Crazy Webcrawler',
'adsbot-google' => 'AdsBot Google',
'feedfetcher-google' => 'Feedfetcher Google',
'curious george' => 'Curious George',
'ia_archiver' => 'Alexa Crawler',
'MJ12bot' => 'Majestic-12',
'Uptimebot' => 'Uptimebot'
);
-20
View File
@@ -1,20 +0,0 @@
<?php
class About extends WRB_Controller {
public function index() {
$data['title'] = "About"; // Capitalize the first letter
$data['page_title'] = "About WrenchBoard";
$data['page_key'] = 'WRB_MAIN_ABOUT_US';
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_about', $data);
$this->load->view('users/view_external_footer');
// $this->load->view('templates/footer_boxed', $data);
}
}
-72
View File
@@ -1,72 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bko extends CI_Controller {
public function index() {
$data["username"] = "";
//$this->load->view('bko/view_bko_login', $data);
echo '';
}
public function logout() {
$data['username'] = $data['password'] = '';
$this->load->view('bko/view_bko_login', $data);
}
public function login() {
$data = array();
$data['username'] = $data['password'] = '';
$data['bko_username'] = $data['bko_password'] = '';
if ($_POST) {
$data['username'] = trim($this->input->post('username'));
$data['password'] = $this->input->post('password');
if ($data['username'] != '' && $data['password'] != '') { // NOTE THAT IT msg_type is IMPORTTANT
$this->load->model('backend_model');
$data['action'] = WRENCHBOARD_BKO_LOGIN;
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
// echo "~~~~~~~~ ".$res." ~~~~~~~~~";
// print_r($out);
/*
*
* - 10:36:20.728 INFO [14300]: RET: backoffice_id=1
- 10:36:20.728 INFO [14300]: RET: created=2017-03-26 00:32:07.062577
- 10:36:20.728 INFO [14300]: RET: email=ameye@chiefsoft.com
- 10:36:20.728 INFO [14300]: RET: group_id=1
- 10:36:20.728 INFO [14300]: RET: id=1
- 10:36:20.728 INFO [14300]: RET: pass=d0fbea2563b377ea7074bced45c88dcb
- 10:36:20.728 INFO [14300]: RET: result=YES I GET TO BACK END
- 10:36:20.728 INFO [14300]: RET: sessionid=3ff02565e39c84d56cb01360f8a0ab4f
- 10:36:20.728 INFO [14300]: RET: status=1
- 10:36:20.728 INFO [14300]: RET: stauts=OK
- 10:36:20.728 INFO [14300]: RET: username=admin
*/
$this->populate_bko_session($res, $out);
}
}
$this->load->view('bko/view_bko_login', $data);
}
private function populate_bko_session($res, $out) {
if ($res == PHP_API_OK && $out["sessionid"] != '' && $out["backoffice_id"] > 0) {
$_SESSION['backoffice_id'] = $out["backoffice_id"];
$_SESSION['bko_email'] = $out["email"];
$_SESSION['bko_sessionid'] = $out["sessionid"];
$_SESSION['bko_username'] = $out["username"];
$_SESSION['bko_selected_memberd_id'] = 0;
$_SESSION['bko_group'] = $out['group_id'];
$_SESSION['bkodata'] = $out;
redirect('bkouser/dash');
}
}
}
-17
View File
@@ -1,17 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bkoadmin extends Bko_Controller {
public function users() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
-43
View File
@@ -1,43 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bkomember extends Bko_Controller {
public function mtransfer() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mpayments() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mjobsdone() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mjobposted() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
-134
View File
@@ -1,134 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bkoreport extends Bko_Controller {
/*
var $template = array(
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
'thead_open' => '<thead>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
*
*/
public function index() {
$data["username"] = "";
$this->load->view('bko/view_bko_login', $data);
}
public function logout() {
$data['username'] = $data['password'] = '';
$this->load->view('bko/view_bko_login', $data);
}
public function withdraws() {
$data["title"] = "Withdraws Report";
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
. "mm.firstname||' '||mm.lastname||'<br>Email:'||mm.email AS Sender,"
. "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 members mm ON mm.id = m.member_id "
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
. "WHERE mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4000";
// $query = $this->db->query($mysql);
// $this->table->set_heading('Date', 'Amount', 'Fee', 'Recipient', 'Confirmation', 'Status')
//$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
$data['mysql'] = $mysql;
$this->renderbkoreportpage($data);
}
public function pendpay() {
$data["title"] = "Pending withdraws Report";
$mysql = "SELECT * FROM members";
$data['mysql'] = $mysql;
$this->renderbkoreportpage($data);
}
public function payments() {
$data["title"] = "Payment Report";
$mysql = "SELECT * FROM members_payments";
$data['mysql'] = $mysql;
$this->renderbkoreportpage($data);
}
public function signup() {
$data["title"] = "Signup Report";
$mysql = "SElECT added::date,username,firstname||' '||lastname AS Name,loc,last_login::date FROM members ORDER BY id DESC LIMIT 7000";
$data['mysql'] = $mysql;
$this->renderbkoreportpage($data);
}
public function pendsignup() {
$data["page_title"] = "Pending Signup Report";
$mysql = "SELECT '<b>ADDED:</b>'||added::date||'<br><b>EXPIRE:</b>'||expire::date As Dates,'<b>Username:</b>'||username||'<br> <b>Name:</b>'||firstname||' '||lastname AS Name,"
. " (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=\"btu'||id||'\"><button id=\"acc'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return resendLink('''||id||''');\" >Del</button></div>' ELSE ' ' END) AS Del "
. " FROM members_pending WHERE expire> now() AND status = 1"
. " ORDER BY id desc limit 5000";
// $data['mysql'] = $mysql;
//$this->renderbkoreportpage($data);
//
$this->load->library('table');
$this->table->set_template($this->template);
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:180px'), 'Email/Name', array('data' => 'RES', 'style' => 'width:40px; cellpadding:0px;'), array('data' => 'Del', 'style' => 'width:40px; cellpadding:0px;'));
//$mysql = $ydata['mysql'];
$query = $this->db->query($mysql);
$data['pendingsignup_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_pendingsignup', $data);
$this->load->view('bko/view_bko_footer', $data);
}
private function renderbkoreportpage($ydata) {
$data = array();
$data["page_title"] = $ydata["title"];
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM money_transfer LIMIT 100";
$sdate = '2016-01-01';
$edate = '2018-01-01';
$mysql = $ydata['mysql'];
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_report_generic', $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
@@ -1,53 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bkosmember extends Bkomember_Controller {
public function userdash() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoUserDashData($_SESSION['bko_selected_id']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_userdash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mtransfer() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mpayments() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mjobsdone() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function mjobposted() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
@@ -1,644 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
function smart_htmlspecialchars($str) {
if (substr($str, 0, 1) == '<')
return $str;
return htmlspecialchars($str);
}
class Bkotransaction extends Bko_Controller {
public function index() {
$data["username"] = "";
$this->load->view('bko/view_bko_login', $data);
}
public function smprocess() {
// 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, "
. "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);
break;
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 "
. "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->TransmitSendmoneyProcessPage($row);
break;
case 'DETAIL':
echo 'detail';
break;
case 'COMPLETE':
//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;
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');
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();
echo $this->sendmoneyProcessPage($row);
break;
case 'DETAIL':
echo 'detail';
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> ";
return $myTable;
}
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);
$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>";
$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>Trans Code</b></td><td><input type=\"text\" class=\"form-control\" id='tcode' name='tcode'></td></tr>";
$myTable .="<tr><td style='width:100px;'><b>Trans Ref</b></td><td><input type=\"text\" class=\"form-control\" id='tref' name='tref'></td></tr>";
$myTable .="<tr><td style='width:100px;'><b></b></td><td><div id='btump" . $out['id'] . "'><input type=submit id=\"acmp" . $out['id'] . "\" onclick=\"return smoneyProcessComplete('" . $out['id'] . "')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Complete\"></div></td></tr>";
$myTable .="</table></form>";
return $myTable;
}
public function moneytransfer() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$this->load->library('pagination');
$config = array();
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT m.* FROM money_transfer m LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id WHERE m.status =1 AND m.completed IS NULL AND mp.confirmation IS NOT NULL";
$query = $this->db->query($mysql);
$config["total_rows"] = $query->num_rows();
$config["base_url"] = base_url() . "/bkotransaction/moneytransfer";
$config["per_page"] = 15;
$config["uri_segment"] = 3;
$config["num_links"] = 5;
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = "<li>";
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = "<li>";
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = "<li>";
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = "<li>";
$config['last_tagl_close'] = "</li>";
$this->pagination->initialize($config);
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$page = is_numeric($page) ? $page : 0;
$sdate = '2016-01-01';
$edate = '2018-01-01';
$mysql = "SELECT m.added,mp.confirmation,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-danger btn-sm\" value=\"Process\">' As Process "
. "FROM money_transfer m "
. "LEFT JOIN members me ON me.id=m.member_id "
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code "
. "WHERE m.status =1 AND m.completed IS NULL AND mp.confirmation IS NOT NULL ORDER BY m.added DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
$this->table->set_heading(
array('data' => 'Added', 'style' => 'width:120px'),
array('data' => 'Confirmation', 'style' => 'width:120px'),
'Sender',
'Recipient',
array('data' => 'Amount', 'style' => 'width:10px'),
array('data' => 'Fee', 'style' => 'width:50px'),
array('data' => 'Details', 'style' => 'width:100px'),
array('data' => 'Process', 'style' => 'width:10px')
);
$data["links"] = $this->pagination->create_links();
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_pendingsm', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function completedtransfer() {
$data = array();
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM money_transfer LIMIT 100";
$sdate = '2016-01-01';
$edate = '2018-01-01';
$mysql = "SELECT m.completed||'<br>'||m.added AS COMPLETE_ADD,mp.confirmation,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 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 members_payments mp ON mp.what_sendmoney = m.id "
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code "
. "WHERE m.status =5 AND m.completed IS NOT NULL ORDER BY m.completed DESC ";
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_pendingsm', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function transmittransfer() {
$this->listPendingTransfer('view_bko_transmitsm');
}
private function listPendingTransfer($pageName) {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM money_transfer LIMIT 100";
$sdate = '2016-01-01';
$edate = '2018-01-01';
$mysql = "SELECT m.added,mp.confirmation,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 onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Detail\">' As Detail, "
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyTransmit('||m.id||')\" name=\"manage\" class=\"btn btn-warning btn-xs\" value=\"Transmit >> \">' As Transmit "
. "FROM money_transfer m "
. "LEFT JOIN members me ON me.id=m.member_id "
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code "
. "WHERE m.status =1 AND m.completed IS NULL ORDER BY m.added DESC ";
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/' . $pageName, $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function pendingcontract() {
$data["title"] = "Pending Offers";
$mysql = "SELECT j.added||'<br>'||j.offer_code AS cc1,'<b>From: </b> '||m1.email||'-'||m1.firstname||' '||m1.lastname||'<br><b>To: </b> '||m2.email||'-'||m2.firstname||' '||m2.lastname AS client ,"
. "j.job_description "
. "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.payment_id IS NOT NULL";
$data['mysql'] = $mysql;
$this->renderbkopage($data);
}
/* public function recentrefer() {
$data["title"] = "Recent Referrer Activities";
$mysql = "select mb.email AS from_email,m.* from members_refer_friend m left join members mb ON mb.id = m.member_id order by m.id desc limit 20";
$data['mysql'] = $mysql;
$this->renderbkopage($data);
}
*
*/
public function recentrefer() {
$data["title"] = "Recent Referrer Activities";
//$mysql = "select m.id,mb.email AS from_email,m.status,m.member_id,m.firstname,m.lastname,m.email from members_refer_friend m left join members mb ON mb.id = m.member_id order by m.id desc limit 20";
$mysql = "select m.id,mb.email AS from_email,m.firstname||' '||m.lastname||'<br>'||m.email AS ref_name_email,m.status from members_refer_friend m left join members mb ON mb.id = m.member_id order by m.id desc limit 200";
$data['mysql'] = $mysql;
$this->renderbkopage($data);
}
public function referactivity() {
$data["title"] = "Referrer Activities";
$mysql = "select mb.email AS from_email,m.* from members_refer_friend m left join members mb ON mb.id = m.member_id order by m.id desc";
$data['mysql'] = $mysql;
$this->renderbkopage($data);
}
public function refund_offer() {
// $out = array();
$out['member_id'] = 0;
$offer_result = OFFER_EXPIRE;
$jobOfferID = $this->input->get('link_id');
$mysql = "SELECT member_id,offer_code FROM members_jobs_offer WHERE id = " . $jobOfferID . " AND status IN (1,2) AND payment_id IS NOT NULL";
$query = $this->db->query($mysql);
$out = $query->result_array();
// print_r($out);
// echo 'got here '.$out[0]['member_id'];
$in = array();
if ($out[0]['member_id'] > 0 && $jobOfferID > 0) {
$in['offer_code'] = $out[0]['offer_code']; //
$in['member_id'] = $out[0]['member_id'];
$in['offer_result'] = $offer_result;
$in['action'] = WRENCHBOARD_JOB_OFFER_CONCLUDE;
$this->load->model('backend_model');
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($out["result"] == "OK") {
switch ($offer_result) {
case OFFER_ACCEPT:
// echo "You have accepted this offer and we have notified the client. Please go to <a href='/proj/active'>manage page</a> to continue ";
break;
case OFFER_REJECT:
// echo "You have rejected this offer and we have notified the client.";
break;
case OFFER_EXPIRE:
echo "You have cancelled this offer and refunded the user.";
break;
}
}
}
}
public function expiredoffers() {
$data["page_title"] = "Expired Offers";
$mysql = "SELECT "
. "'<div id=\"btu'||id||'\"><input type=submit id=\"acc'||id||'\" onclick=\"return refundOffer('||id||')\" name=\"refund\" class=\"btn btn-info btn-sm\" value=\"Refund\"></div>' As Refund "
. ",* "
. " FROM members_jobs_offer WHERE expire < now() AND status = 1 AND payment_id IS NOT NULL";
$mysql = "SELECT j.added||'<br>'||j.offer_code AS cc1,'<b>From: </b> '||m1.email||'-'||m1.firstname||' '||m1.lastname||'<br><b>To: </b> '||m2.email||'-'||m2.firstname||' '||m2.lastname AS client ,"
. "'<div id=\"btu'||j.id||'\"><input type=submit id=\"acc'||j.id||'\" onclick=\"return refundOffer('||j.id||')\" name=\"refund\" class=\"btn btn-info btn-sm\" value=\"Refund\"></div>' As Refund, "
. "j.job_description "
. "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.payment_id IS NOT NULL";
$this->load->library('table');
$this->table->set_template($this->template);
$query = $this->db->query($mysql);
$this->table->function = 'smart_htmlspecialchars';
$data['expired_offer_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_expiredoffer', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function activecontract() {
$data["page_title"] = "Active Contracts";
$mysql = "SELECT mj.id,'<b><a href=\"#\" onclick=\"return viewJobdetail('||mj.id||')\" >'||mj.contract||'</a></b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status IN (1,4) ORDER by mj.id DESC ";
// $data['mysql'] = $mysql;
// $this->renderbkopage($data);
$this->load->library('table');
$this->table->set_template($this->template);
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_completedjob', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function pastduecontract() {
$data["page_title"] = "Past Due Contracts";
$mysql = "SELECT mj.id,'<b><a href=\"#\" onclick=\"return viewJobdetail('||mj.id||')\" >'||mj.contract||'</a></b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status =1 AND mj.delivery_date < now() ORDER by mj.id DESC ";
// $data['mysql'] = $mysql;
// $this->renderbkopage($data);
$this->load->library('table');
$this->table->set_template($this->template);
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_completedjob', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function completedcontract() {
$data["page_title"] = "Completed Jobs";
$data["title"] = "Completed Contracts";
$mysql = "SELECT mj.id,'<b><a href=\"#\" onclick=\"return viewJobdetail('||mj.id||')\" >'||mj.contract||'</a></b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status =5 ORDER by mj.id DESC ";
// $data['mysql'] = $mysql;
// $this->renderbkopage($data);
$this->load->library('table');
$this->table->set_template($this->template);
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_completedjob', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function jobdetail() {
$job_id = $this->input->get('job_id');
if ($this->input->get() && $job_id != '' && $job_id > 0) {
// echo 'jobdetail ' . $job_id;
$detail_button = " '<button type=\"button\" class=\"btn btn-primary btn-xs\" data-toggle=\"modal\" data-target=\"#modal_theme_primary\">Delvery Detail<i class=\"icon-play3 position-right\"></i></button>' ";
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
$this->load->library('table');
$this->table->set_template($this->template);
$jbx = "''thisjob''";
$mysql = "SELECT '<b>Project ID :</b>'||mc.contract||' - <b>Name: </b>'||m.firstname||'<br><b>Title:</b>'||mc.title||'<br>'||'<b>Description: </b>'||mc.description||'<br><b>Timeline: </b> '||mc.timeline_days||' day(s) <b>Price: </b>'||mc.price*0.01||'Naira'||' <b>Expected Delivery: </b>'||mc.delivery_date AS this_job,"
. " mc.contract AS contract_id, mc.job_detail AS job_detail "
. "FROM members_jobs_contract mc LEFT JOIN members m ON m.id=mc.client_id WHERE mc.id=" . $job_id;
$query = $this->db->query($mysql);
$jbD = $query->row();
// $this->table->set_heading('Job', 'Client', 'Terms', 'Price', 'Manage', 'Status');
echo $data['job_table'] = $this->table->generate($query);
$data['this_job'] = $jbD->this_job;
$data['contract_id'] = $jbD->contract_id;
$data['job_detail'] = $jbD->job_detail;
$sqlMsg = "SELECT (CASE WHEN jc.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/" . $data['contract_id'] . "/'||jc.message||'\">'||jc.message||'</a>' ELSE '<b>['||m.firstname||']->'||jc.created||'</b><br>'||jc.message END) AS msg "
. "FROM jobs_contract_message jc "
. "LEFT JOIN members m ON m.id=jc.member_id "
. "WHERE jc.contract='" . $data['contract_id'] . "' ORDER by jc.id ASC";
$query_message = $this->db->query($sqlMsg);
$this->table->set_template($this->template_nohead);
$this->table->set_heading('');
echo $data['message_table'] = $this->table->generate($query_message);
}
}
public function jobcontractreport() {
$data["title"] = "Job and Contracts Report";
$mysql = "SELECT * FROM members_jobs_offer";
$data['mysql'] = $mysql;
$this->renderbkopage($data);
}
private function renderbkopage($ydata) {
$data = array();
$data["page_title"] = $ydata["title"];
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM money_transfer LIMIT 100";
$sdate = '2016-01-01';
$edate = '2018-01-01';
$mysql = $ydata['mysql'];
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_generic1', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function accountdeposit() {
$data = array();
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM members";
$query = $this->db->query($mysql);
$data['sendmoney_dash_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_accountdeposit', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function memberdetail() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
-625
View File
@@ -1,625 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
function smart_htmlspecialchars($str) {
return htmlspecialchars_decode($str);
/*
if (substr($str, 0, 1) == '<')
return $str;
return htmlspecialchars($str);
*/
}
class Bkouser extends Bko_Controller {
public function index() {
$data["username"] = "";
$this->load->view('bko/view_bko_login', $data);
}
public function logout() {
$data['username'] = $data['password'] = '';
$this->load->view('bko/view_bko_login', $data);
}
public function dash() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data = $this->bkoDashData();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function wrbwhy() {
$data = array();
$data = $this->bkoDashData();
$data["why_title"] = $data["why_detail"] = $data["why_flag"] = '';
$data["why_flag"] = '0';
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
//$data = array();
if ($_POST) {
$data['why_title'] = trim($this->input->post('why_title'));
$data['why_detail'] = htmlspecialchars($this->input->post('why_detail'));
$data['why_flag'] = $this->input->post('why_flag');
$xar = array();
$query = $this->db->query("SELECT id FROM why WHERE lower(title)=lower('" . $data['why_title'] . "') ");
if ($query->num_rows() > 0) {
echo "Duplicate!";
} else {
$xar['title'] = $data['why_title'];
$xar['msg'] = $data['why_detail'];
$xar['flags'] = $data['why_flag'];
$this->db->insert('why', $xar);
}
}
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT '<b>'||title||'</b><br>'||msg AS FQ,"
. " '<div id=\"subdel_'||id||'\" ><input type=button onclick=\"return post_nav_find_action('||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Edit\">"
. " <input type=button id=\"dacc'||id||'\" onclick=\"return deleteFaq('||id||')\" name=\"delete\" class=\"btn btn-warning btn-xs\" value=\"Del\"></div>' AS option "
. " FROM why ORDER BY id DESC";
$query = $this->db->query($mysql);
// $this->table->set_heading('Dates', 'Username', 'Name', 'Status', 'Verify Link', 'Action');
$this->table->function = 'smart_htmlspecialchars';
$data['why_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_why', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function uploads(){
$data = array();
$data = $this->bkoDashData();
$data["faq_title"] = $data["faq_detail"] = $data["faq_flag"] = '';
$data["faq_flag"] = '0';
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
//$data = array();
if ($_POST) {
$data['faq_title'] = trim($this->input->post('faq_title'));
$data['faq_detail'] = htmlspecialchars($this->input->post('faq_detail'));
$data['faq_flag'] = $this->input->post('faq_flag');
$xar = array();
$query = $this->db->query("SELECT id FROM faq WHERE lower(title)=lower('" . $data['faq_title'] . "') ");
if ($query->num_rows() > 0) {
echo "Duplicate!";
} else {
$xar['title'] = $data['faq_title'];
$xar['msg'] = $data['faq_detail'];
$xar['flags'] = $data['faq_flag'];
$this->db->insert('faq', $xar);
}
}
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT '<b>'||title||'</b><br>'||msg AS FQ,"
. " '<div id=\"subdel_'||id||'\" ><input type=button onclick=\"return post_nav_find_action('||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Edit\">"
. " <input type=button id=\"dacc'||id||'\" onclick=\"return deleteFaq('||id||')\" name=\"delete\" class=\"btn btn-warning btn-xs\" value=\"Del\"></div>' AS option "
. " FROM faq ORDER BY id DESC";
$query = $this->db->query($mysql);
// $this->table->set_heading('Dates', 'Username', 'Name', 'Status', 'Verify Link', 'Action');
$this->table->function = 'smart_htmlspecialchars';
$data['faq_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_uploads', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function faq() {
$data = array();
$data = $this->bkoDashData();
$data["faq_title"] = $data["faq_detail"] = $data["faq_flag"] = '';
$data["faq_flag"] = '0';
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
//$data = array();
if ($_POST) {
$data['faq_title'] = trim($this->input->post('faq_title'));
$data['faq_detail'] = htmlspecialchars($this->input->post('faq_detail'));
$data['faq_flag'] = $this->input->post('faq_flag');
$xar = array();
$query = $this->db->query("SELECT id FROM faq WHERE lower(title)=lower('" . $data['faq_title'] . "') ");
if ($query->num_rows() > 0) {
echo "Duplicate!";
} else {
$xar['title'] = $data['faq_title'];
$xar['msg'] = $data['faq_detail'];
$xar['flags'] = $data['faq_flag'];
$this->db->insert('faq', $xar);
}
}
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT '<b>'||title||'</b><br>'||msg AS FQ,"
. " '<div id=\"subdel_'||id||'\" ><input type=button onclick=\"return post_nav_find_action('||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Edit\">"
. " <input type=button id=\"dacc'||id||'\" onclick=\"return deleteFaq('||id||')\" name=\"delete\" class=\"btn btn-warning btn-xs\" value=\"Del\"></div>' AS option "
. " FROM faq ORDER BY id DESC";
$query = $this->db->query($mysql);
// $this->table->set_heading('Dates', 'Username', 'Name', 'Status', 'Verify Link', 'Action');
$this->table->function = 'smart_htmlspecialchars';
$data['faq_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_faq', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function deletefaq() {
$faq_id = $this->input->get('faq_id');
$mysql = "DELETE FROM faq WHERE id = " . $faq_id;
$this->db->query($mysql);
echo 'Deleted - ' . $faq_id;
}
public function deletewhy() {
$why_id = $this->input->get('why_id');
$mysql = "DELETE FROM why WHERE id = " . $why_id;
$this->db->query($mysql);
echo 'Deleted - ' . $why_id;
}
public function seluser() {
//url: "/bkouser/seluser?proc=SEL&member_id="+link_id
$member_id = $this->input->get('member_id');
$mysql = "SElECT * "
. " FROM members WHERE id = " . $member_id;
$query = $this->db->query($mysql);
$row = $query->row();
if (isset($row)) {
$_SESSION['bko_selected_id'] = $row->id;
$_SESSION['bko_selected_username'] = $row->username;
$_SESSION['bko_selected_row'] = $row;
$_SESSION['bko_selected_memberd_id'] = $member_id;
}
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT firstname,lastname,balance,email FROM members WHERE id=" . $_SESSION['bko_selected_id'];
$query = $this->db->query($mysql);
$data['user_table'] = $this->table->generate($query);
$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['bko_selected_id'] . " AND mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 20";
$query = $this->db->query($mysql);
$this->table->set_heading('Date', 'Amount', 'Fee', 'Recipient', 'Confirmation', 'Status');
$data['sendmoney_table'] = $this->table->generate($query);
$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 ='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['bko_selected_id'] . " AND status = 1 ORDER BY id DESC ";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:100px'), '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);
echo "<b>User:</b><br>" . $data['user_table'] . "<br><b> Withdraw Last 20:</b> <br>" . $data['sendmoney_table'] . "<br><b>Payments:</b><br>" . $data['payment_result'];
}
public function terms() {
$data = array();
$data['page_name'] = 'terms';
$data['page_title'] = 'Terms & Condition';
$data['page_key'] = 'WRB_MAIN_SIGNUP_TERM';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function about() {
$data = array();
$data['page_name'] = 'about';
$data['page_title'] = 'About us';
$data['page_key'] = 'WRB_MAIN_ABOUT_US';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function privacy() {
$data = array();
$data['page_name'] = 'privacy';
$data['page_title'] = 'Privacy Policy';
$data['page_key'] = 'WRB_MAIN_PRIVACY';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function libraryedit() {
$lib_id = $this->input->get('lib_id');
if ($this->input->get('PROC') == 'EDIT' && $lib_id != '' && $lib_id > 0) {
echo 'Ameye';
}
}
public function library() {
$data = array();
$data = $this->bkoDashData();
$new_mode = true;
$data['lib_id'] = 0;
$data["lib_title"] = $data["lib_detail"] = $data["lib_flag"] = '';
$data["lib_flag"] = '0';
$lib_id = $this->input->get('lib_id');
if ($this->input->get('PROC') == 'EDIT' && $lib_id != '' && $lib_id > 0) {
$rs = $this->libraryContent($lib_id);
$data["lib_title"] = $rs['title'];
$data["lib_detail"] = $rs['detail'];
$data["lib_flag"] = 0;
$new_mode = false;
}
if ($_POST) {
$lib_id = $this->input->post('lib_id');
$data['lib_title'] = trim($this->input->post('lib_title'));
$data['lib_detail'] = htmlspecialchars($this->input->post('lib_detail'));
$data['lib_flag'] = $this->input->post('lib_flag');
if ($lib_id == 0) {
$xar = array();
$query = $this->db->query("SELECT id FROM library WHERE lower(title)=lower('" . $data['lib_title'] . "') ");
if ($query->num_rows() > 0) {
echo "Duplicate!";
} else {
$xar['title'] = $data['lib_title'];
$xar['description'] = $data['lib_title']; // for now
$xar['detail'] = $data['lib_detail'];
// $xar['flags'] = $data['lib_flag'];
$this->db->insert('library', $xar);
}
} else {
// updating now
$xr = array(
'detail' => $data['lib_detail']
);
$this->db->where('id', $lib_id);
$this->db->update('library', $xr);
}
}
$data['lib_id'] = $lib_id;
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT '<b>'||title||'</b><br>'||description||'<br>'||detail AS Library,"
. " '<a href=\"/bkouser/library?lib_id='||id||'&PROC=EDIT\">Edit</a><div id=\"subdel_'||id||'\" ><input type=button onclick=\"return post_nav_find_action('||id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Edit\">"
. " <input type=button id=\"dacc'||id||'\" onclick=\"return deleteFaq('||id||')\" name=\"delete\" class=\"btn btn-warning btn-xs\" value=\"Del\"></div>' AS option "
. " FROM library ORDER BY id DESC";
$query = $this->db->query($mysql);
// $this->table->set_heading('Dates', 'Username', 'Name', 'Status', 'Verify Link', 'Action');
$this->table->function = 'smart_htmlspecialchars';
$data['lib_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_library', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function deletelibrary() {
$lib_id = $this->input->get('lib_id');
$mysql = "DELETE FROM library WHERE id = " . $lib_id;
$this->db->query($mysql);
echo 'Deleted - ' . $lib_id;
}
/*
* CREATE TABLE library (
id SERIAL,
title VARCHAR(150) UNIQUE NOT NULL,
description VARCHAR(500) NOT NULL,
detail TEXT,
updated timestamp without time zone DEFAULT now()
);
ALTER TABLE ONLY library
ADD CONSTRAINT library_id_key UNIQUE (id);
*/
public function referterms() {
$data = array();
$data['page_name'] = 'referterms';
$data['page_title'] = 'Referer Terms';
$data['page_key'] = 'WRB_MAIN_REFER_TERM';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function postjob() {
$data = array();
$data['page_name'] = 'postjob';
$data['page_title'] = 'Post Job Terms';
$data['page_key'] = 'WRB_POST_JOB_TERM';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function howitwork() {
$data = array();
$data['page_name'] = 'howitwork';
$data['page_title'] = 'How it works';
$data['page_key'] = 'WRB_MAIN_HOWIT_WORK';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function fundaccount() {
$data = array();
$data['page_name'] = 'fundaccount';
$data['page_title'] = 'Fund Account';
$data['page_key'] = 'WRB_FUND_ACCOUNT';
if ($this->input->post()) {
$this->savepagetext();
}
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_fixededitor', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function savepagetext() {
$textline = $this->sql_escape_func($this->input->post('txt_detail'));
$page_key = trim($this->input->post('page_key'));
$finalsql = "";
if ($page_key != '') {
$mysql = "SELECT id FROM general_text WHERE page_key='$page_key'";
$query = $this->db->query($mysql);
if ($query->num_rows() == 0) {
$finalsql = "INSERT INTO general_text (page_key,txt_detail) VALUES('$page_key',E'$textline')";
} else {
$row = $query->row();
$finalsql = "UPDATE general_text SET txt_detail=E'$textline' WHERE page_key='$page_key' AND id=" . $row->id;
}
}
if ($finalsql != '') {
$this->db->query($finalsql);
// echo 'Saved';
}
}
public function PrepPagination($perpage, $urlSegment, $pagePath) {
$config = array();
$config["base_url"] = base_url() . $pagePath;
$config["per_page"] = $perpage;
$config["uri_segment"] = $urlSegment;
$config["num_links"] = 5;
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = '<li>';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='disabled'><li class='active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = "<li>";
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = "<li>";
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = "<li>";
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = "<li>";
$config['last_tagl_close'] = "</li>";
return $config;
}
public function locate() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data['page_title'] = 'Find User';
// $config = array();
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$page = is_numeric($page) ? $page : 0;
$config = $this->PrepPagination(10, 3, '/bkouser/locate');
$mysql0 = "SELECT * FROM members";
$q = $this->db->query($mysql0);
$config["total_rows"] = $q->num_rows();
$this->load->library('pagination');
$this->pagination->initialize($config);
$data["pagination_links"] = $this->pagination->create_links();
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SElECT added::date||'<br>'||loc||'<br>'||(CASE WHEN last_login::date IS NULL THEN ' ' ELSE last_login::date::text END) AS Act,"
. " username||'<br>'||firstname||' '||lastname AS Name, "
. " '<div id=\"sdd'||id||'\"><button id=\"sel'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return selectMember('''||id||''');\" >Select['||id||']</button></div>' AS select "
. " FROM members ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page; ;
$query = $this->db->query($mysql);
// $this->table->set_heading('Account', 'Created', 'Action');
$data['member_search_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_findmembers', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function memberdetail() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_dash', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function contact() {
// $this->load->view('bko/view_bko_header', $data);
$data = array();
$data['page_title'] = 'Site Contacts';
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SElECT added::date||'<br>'||loc||'<br>'||(CASE WHEN last_login::date IS NULL THEN ' ' ELSE last_login::date::text END) AS Act,"
. " username||'<br>'||firstname||' '||lastname AS Name, "
. " '<div id=\"sdd'||id||'\"><button id=\"sel'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return selectMember('''||id||''');\" >Select['||id||']</button></div>' AS select "
. " FROM members ORDER BY id DESC LIMIT 100";
$mysql = " SELECT created||'<br>'||email||'<br>'||member_id||'<div id=\"sdd'||id||'\"><button id=\"sel'||id||'\" class=\"btn btn-warning btn-xs\" onclick=\"return selectMessage('''||id||''');\" >Select['||id||']</button></div>' AS sender,your_message FROM contacts ORDER BY id desc";
$query = $this->db->query($mysql);
// $this->table->set_heading('Account', 'Created', 'Action');
$data['member_search_table'] = $this->table->generate($query);
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/view_bko_contact', $data);
$this->load->view('bko/view_bko_footer', $data);
}
public function replymessage() {
//url: "/bkouser/seluser?proc=SEL&member_id="+link_id
$contact_id = $this->input->get('contact_id');
$mysql = "SElECT * "
. " FROM contacts WHERE id = " . $contact_id;
$query = $this->db->query($mysql);
$row = $query->row();
if (isset($row)) {
// echo $row->id;
// echo $row->firstname;
// echo $row->lastname;
//$_SESSION['bko_selected_id'] = $row->id;
//$_SESSION['bko_selected_username'] = $row->username;
//$_SESSION['bko_selected_row'] = $row;
//$_SESSION['bko_selected_memberd_id'] = $member_id;
}
echo 'aaaa ' . $contact_id;
}
public function resend_pending() {
$this->load->model('backend_model');
$link_id = $this->input->get('link_id');
$in = array();
$in['pending_id'] = $link_id;
$in['action'] = WRENCHBOARD_RESEND_PENDING_LINK;
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
echo 'Sent';
}
public function delete_pending() {
$this->load->model('backend_model');
$link_id = $this->input->get('link_id');
$in = array();
$in['pending_id'] = $link_id;
$in['action'] = WRENCHBOARD_DELETE_PENDING_LINK;
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
echo 'Deleted';
}
}
-34
View File
@@ -1,34 +0,0 @@
<?php
class Browse extends WRB_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
$data = array();
$data['page_title'] = "Login WrenchBoard";
//$this->load->view('templates/header_boxed', $data);
$this->load->view('browse/view_browse', $data);
$this->load->view('users/view_external_footer');
}
private function browsePageData()
{
$mysql = "SELECT id,firstname FROM members";
}
}
-100
View File
@@ -1,100 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Complereset extends CI_Controller {
public function index() {
//echo "ameye kvkgkg";
$data['action_message'] = "";
$data["message"] = "Enter your new password to reset.<br> We will send you an email to confirm reset";
if ($_GET) {//this is first load of page
$data['passlink'] = $this->input->get('passlink');
if ($this->loadLinkData($data['passlink']) == false) {
redirect('/home'); // if link is not good - GET OUT
}
$this->load->view('users/view_external_header');
$this->load->view('users/view_cmppass', $data);
$this->load->view('users/view_external_footer');
} else {
if ($_POST) {
$message = "";
$data['pass_link'] = $this->input->post('passlink');
$data['passlink'] = $this->input->post('passlink');
$confirmnewpass = $this->input->post('confirmnewpass');
$newpass = $this->input->post('newpass');
if ($this->loadLinkData($data['pass_link']) == true) {
if ($newpass == $confirmnewpass && strlen($confirmnewpass) >= 8) {
// call backend now
$data['description'] = trim($this->input->post('description'));
$data['newpass'] = $newpass;
$outx = array();
$this->load->model('backend_model');
$data['action'] = WRENCHBOARD_ACCOUNT_SETPASSWD;
$outx['error'] = '';
if ($this->backend_model->wrenchboard_api($data, $outx) == PHP_API_OK) {
$message = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $outx["status"] . "</div></div>";
$message = $outx["status"];
} else {
$message = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $outx["status"] . "</div></div>";
$message = $outx["status"];
}
}
} else {
$message = "Password must be same and over eight characters in length.";
}
} else {
$message = "Invalid or expired password reset link. Please restart the process.";
}
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $message . "</div></div>";
$this->load->view('users/view_external_header');
$this->load->view('users/view_cmppass', $data);
$this->load->view('users/view_external_footer');
}
}
private function loadLinkData($passlink) {
$ret = false;
$query = $this->db->get_where('password_reset', array('pass_link' => $passlink, 'status' => 0));
if ($query->num_rows() == 1) {
$ret = true;
} else {
}
return $ret;
}
var $actionMessage = '';
private function resetMemberPass($email) {
$this->actionMessage = '';
//$group_id = $group_id + 0; // just making sure it is number
$x['email'] = $email;
$x['action'] = WRENCHBOARD_ACCOUNT_RESETPASS;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
$this->actionMessage = 'Group Created';
} else {
$this->actionMessage = 'Unable to create job group...';
}
return $this->actionMessage;
}
}
-154
View File
@@ -1,154 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Confg extends Bko_Controller {
public function siteitems() {
$data["title"] = "Withdraws Report";
$mysql = "SELECT m.added::date AS date,m.terminatingamount*0.01 AS amount,m.fee*0.01 as fee, "
. "mm.firstname||' '||mm.lastname||'<br>Email:'||mm.email AS Sender,"
. "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 members mm ON mm.id = m.member_id "
. "LEFT JOIN bank_entity_codes b ON b.code = r.bank_code "
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
. "WHERE mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4000";
// $query = $this->db->query($mysql);
// $this->table->set_heading('Date', 'Amount', 'Fee', 'Recipient', 'Confirmation', 'Status')
//$this->table->set_heading('Date', 'Amount','Fee','Recipient','Confirmation', 'Status');
// $data['mysql'] = $mysql;
// $this->renderbkoreportpage($data);
$data = array();
$data['page_title'] = "Configurations";
$this->renderAdminPage('configure/view_bko_configure', $data);
}
public function selpage() {
$data = array();
$data['page_id'] = trim($this->input->get('page_id'));
if ($data['page_id'] != '') {
switch ($data['page_id']) {
case "JOBCATEG":
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM skill_category ORDER BY category ASC";
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['skill_category_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/jobcaregory_form', $data);
break;
case "JOBSKILLTYPE":
echo 'akkfkkg';
break;
case "AREASON":
case "MREASON":
$mysql = "SELECT * FROM reason_type WHERE rkey='" . $data['page_id'] . "'";
$q = $this->db->query($mysql);
$row = $q->row();
if (isset($row)) {
$data['reason_name'] = $row->rname;
$data['reason_key'] = $row->rkey;
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT lkey,name,'<button onclick=\"deleteReason('||id||'.'||lkey||');\">Del</button>' FROM reason_items WHERE rkey='" . $data['page_id'] . "'"; // WHERE agent_id = " . $data['agent_id'];
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['reason_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/reason_form', $data);
}
break;
case "LANGUAGE":
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM languages ORDER BY language ASC"; // WHERE agent_id = " . $data['agent_id'];
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['language_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/language_form', $data);
break;
case "COUNTRY":
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM country ORDER BY country ASC"; // WHERE agent_id = " . $data['agent_id'];
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['country_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/country_form', $data);
break;
case "UTRANSPRICE":
$data["form_title"] = "User Transport Pricing";
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM country ORDER BY country ASC"; // WHERE agent_id = " . $data['agent_id'];
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['country_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/pricing_form', $data);
break;
case "ULATORPRICE":
$data["form_title"] = "User Translator Pricing";
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT * FROM country ORDER BY country ASC"; // WHERE agent_id = " . $data['agent_id'];
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Key', 'style' => 'width:60px'), 'Reason', array('data' => 'Action', 'style' => 'width:100px'));
$data['country_table'] = $this->table->generate($query);
$this->load->view('bko/configure/extra/pricing_form', $data);
break;
default:
echo "Your favorite color is neither red, blue, nor green!";
}
}
}
public function addSkill() {
$data = array();
$data['rkey'] = trim($this->input->get('page_id'));
$data['skill_name'] = trim($this->input->get('skill_name'));
$mysql = "SELECT * FROM skill_category WHERE LOWER(category) = LOWER('" . $data['skill_name'] . "')";
$q = $this->db->query($mysql);
$nr = $q->num_rows();
if ($nr > 0) {
echo 'Duplicate Detected';
} else {
// echo 'Now Insert';
$mysql = "INSERT INTO skill_category (category) VALUES('" . $data['skill_name'] . "')";
$q = $this->db->query($mysql);
}
echo '0';
}
private function renderAdminPage($page_name, $data) {
$this->load->view('bko/view_bko_header', $data);
$this->load->view('bko/' . $page_name, $data);
$this->load->view('bko/view_bko_footer', $data);
}
}
-91
View File
@@ -1,91 +0,0 @@
<?php
class Contact extends CI_Controller {
public function index() {
$data['title'] = "Contact"; // Capitalize the first letter
$data['page_title'] = "Contact WrenchBoard";
$message = "";
$email = NULL;
$firstname = NULL;
$lastname = NULL;
$your_message = NULL;
$submit = NULL;
$data['message'] ='';
extract($_POST);
if ($_POST) {
$resp = $this->input->post('h-captcha-response');
$secret = "0x608809f0227f7FA577E069524805cC25f5E732C0";
$url = "https://hcaptcha.com/siteverify";
$data = array(
"secret" => $secret,
"response" => $resp
);
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POST, count($data));
curl_setopt($ch,CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch,CURLOPT_RETURNTRANSFER, TRUE);
$result = curl_exec($ch);
curl_close($ch);
$captcha = json_decode($result,true);
if (is_array($captcha) && array_key_exists("success",$captcha) && $captcha["success"]) {
// Ok
$message = '';
} else {
$message = 'Please verify that you are human';
}
$email = $this->input->post('email');
$firstname = $this->input->post('firstname');
$lastname = $this->input->post('lastname');
$your_message = $this->input->post('msg');
if ($firstname == '' || $lastname == '') {
$message = 'Both first and last name are required';
}
if ($your_message=='' || strlen($your_message)>500) {
$message = 'Message is required and must be up to 500 characters long';
}
if ($email=='' || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
$message = 'Invalid e-mail';
}
if ($message == '') {
$data['email'] = $email;
$data['firstname'] = $firstname;
$data['lastname'] = $lastname;
$data['your_message'] = $your_message;
$data['loc'] = $_SERVER['REMOTE_ADDR']; //'38.101.241.200';
$data['action'] = WRENCHBOARD_SEND_CONTACTUS;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
$message = "Your message was sent";
$email = $firstname = $lastname = $your_message = "";
} else {
//$message = 'Invalid input';
$your_message = substr($your_message,0,500);
}
$data['message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $message . "</div></div>";
}
// $data['message'] = $message;
$data['email'] = $email;
$data['firstname'] = $firstname;
$data['lastname'] = $lastname;
$data['msg'] = $your_message;
//print_r($data);
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_contact', $data);
$this->load->view('users/view_external_footer', $data);
}
}
-58
View File
@@ -1,58 +0,0 @@
<?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';
}
}
}
}
-275
View File
@@ -1,275 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dash extends Users_Controller {
function __construct() {
parent::__construct();
$this->logger->error('Dash::__construct extends Users_Controller pong');
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
}
}
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');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
$data['member_id'] = $_SESSION['member_id']; // = $ret->email;
// print_r($_SESSION);
//Array ( [__ci_last_regenerate] => 1474689025 [username] => ses66181+1@gmail.com [name] => ses66181+1@gmail.com [firstname] => Olusesan [lastname] => Amey [email] => ses66181+1@gmail.com )
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
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);
$data = $this->getSessionArray();
// print_r($out[0]);
$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['total_jobs'] = $out['total_jobs'];
$data['offer_dash'] = '';
// Review to another location
$mysql = "SELECT to_char(mi.added, 'YYYY-MM-DD HH24:MI') AS added,jo.offer_code,mjs.title,"
. "m.firstname||' '||m.lastname AS Client "
. "FROM members_offer_interest mi "
. "LEFT JOIN members m ON m.id = mi.member_id "
. "LEFT JOIN members_jobs_offer jo ON jo.id=mi.offer_id "
. "LEFT JOIN members_jobs mjs ON mjs.id=jo.job_id "
. "WHERE jo.member_id =" . $_SESSION['member_id'] . " "
. "AND mi.status=1 AND jo.expire> now() + '-3 days' ORDER BY mi.added ASC";
$query = $this->db->query($mysql);
$data["offer_interest_count"] = $query->num_rows();
$_SESSION['offer_interest_count'] = $data["offer_interest_count"];
$mysql = "SELECT '<b>Project ID:</b>'||mc.contract||'<br><b>Title:</b>'||mc.title AS Project,m.firstname||' '||m.lastname AS Client,"
. " '<b>Timeline:</b> '||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 ,mc.description, "
. " (CASE WHEN mc.status = 1 AND mc.delivery_date > now() THEN 'Active' WHEN mc.status = 1 AND mc.delivery_date <now() THEN 'Past Due' "
. " WHEN mc.status = 4 THEN 'Review' ELSE 'Not Set' END) AS status "
. " 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) "
. " AND delivery_date < now()";
$query = $this->db->query($mysql);
$data["past_duejobs_count"] = $query->num_rows();
$_SESSION['past_duejobs_count'] = $data["past_duejobs_count"];
//======================= move it
/* Table Slider Data */
/* $jbx = "''/proj/thisjob''";
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br><b>Timeline:</b>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,"
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
. " 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.
*/
$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 ===========================
$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( 4 );
$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
//var_dump( $_SESSION);
//exit;
$data['page_title'] ="Dashboard";
$this->renderSecurePage('users/view_dash', $data);
}
}
private function dashTaskMessage() {
$data = array();
$jbx = "''/proj/thisjob''";
$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 "
. " WHERE j.member_id=" . $_SESSION['member_id'] . " AND j.delivery_date IS NOT NULL AND j.delivery_date > now() OR j.client_id = " . $_SESSION['member_id'] . " AND j.status IN (1,4) AND j.delivery_date IS NOT NULL AND j.delivery_date > now() LIMIT 5";
$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;
}
private function dash_title($listLimit) {
$offer_found = false;
$data = array();
$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 AS pdate, 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 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 $listLimit";
$query = $this->db->query($mysql);
$num = $query->num_rows();
$data["dash_title"] = "Pending Offer(s)";
if ($num > 0) {
// array('data' => 'Added', 'style' => 'width:80px')
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:80px'), 'Title', array('data' => '', 'style' => 'width:80px'));
$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>";
}
if ($offer_found == false) {
$data["dash_title"] = "<a href='/jobs/pendingoffer'>Active Offer(s)</a>";
$jbx = "''/jobs/viewmyjob''";
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date AS pdate, 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 tRec,'\/jobs\/viewmyjob' AS qpath,"
. 'CASE WHEN jo.status = 1 AND jo.public_view =0 THEN \'Pending\' WHEN jo.status = 1 AND jo.public_view >0 THEN \'Active\' ELSE \'Other\' END AS status,'
. "'<input type=submit onclick=\"return post_nav_find_action($jbx,'''||jo.offer_code||''')\" name=\"manage\" class=\"btn btn-primary btn-xs\" value=\"View\">' AS View,jo.offer_code AS offer_code "
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
. "WHERE jo.expire > now() AND jo.status = 1 "
. "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT $listLimit";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
// array('data' => 'Status', 'style' => 'width:150px')
//array('data' => 'Added', 'style' => 'width:150px')
//array('data' => 'Added', 'style' => 'width:150px')
$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;
}
public function howitworks() {
$data = $this->getSessionArray();
$data['page_key'] = 'WRB_MAIN_HOWIT_WORK';
$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']);
$data['page_title'] = "How it Works";
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_howitworks', $data);
$this->load->view('users/view_footer_user', $data);
//echo "here-here";
}
public function howfindwork() {
$data = $this->getSessionArray();
$data['page_key'] = 'WRB_MAIN_HOWIT_WORK';
$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']);
$data['page_title'] = "How to find Job";
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_howfindjob', $data);
$this->load->view('users/view_footer_user', $data);
//echo "here-here";
}
public function howpostjob() {
$data = $this->getSessionArray();
$data['page_key'] = 'WRB_MAIN_HOWIT_WORK';
$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']);
$data['page_title'] = "How to Post Job";
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_howpostjob', $data);
$this->load->view('users/view_footer_user', $data);
//echo "here-here";
}
}
-25
View File
@@ -1,25 +0,0 @@
<?php
class Eoffer extends CI_Controller {
public function __construct() {
parent::__construct();
// Load library and url helper
//$this->load->library('facebook');
//$this->load->helper('url');
$this->load->library(array('session', 'lib_login'));
}
public function index() {
$data["login_message"] = "";
$data['offerID'] = $this->input->get('offerID'); // '08174596144';
$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');
redirect('login');
}
}
-32
View File
@@ -1,32 +0,0 @@
<?php
class Faq extends WRB_Controller {
public function index() {
$data['faq_table'] = '';
$query = $this->db->query('SELECT * FROM faq');
foreach ($query->result() as $row) {
$data['faq_table'] .= "<div class=\"panel panel-white\"> "
. "<div class=\"panel-heading\"> "
. " <h6 class=\"panel-title\">"
. " <a data-toggle=\"collapse\" data-parent=\"#accordion-control\" href=\"#accordion-control-group" . $row->id . "\">" . $row->title . "</a> "
. " </h6> "
. " </div> "
. " <div id=\"accordion-control-group" . $row->id . "\" class=\"panel-collapse collapse out\"> "
. " <div class=\"panel-body\">" .htmlspecialchars_decode( $row->msg ) . " "
. " </div>"
. " </div> "
. " </div>";
}
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_homefaq', $data);
$this->load->view('users/view_external_footer');
}
}
-56
View File
@@ -1,56 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
* handlethe return for money top up from flutrerwave here
*/
class Fltw extends WRB_Controller {
function __construct()
{
parent::__construct();
//Load URL helper
$this->load->helper('url');
//Load session library
$this->load->library('session');
}
//Displays social login links
public function index() {
}
public function complete() {
$in= [];
// //https://oameye.work.wrenchboard.com/dash?status=successful&tx_ref=wrench-1161918567&transaction_id=3631794
$in['tx_ref'] = $this->input->get('tx_ref');
$in['transaction_id'] = $this->input->get('transaction_id');
$in['return_status'] = $this->input->get('status'); // this cabe back as string, I need INT
if ( $in['tx_ref'] !='' && $in['transaction_id'] !='' && $in['return_status']!='' ){
switch ($in['return_status']){
case 'successful':
$in['status'] = 5;
break;
default:
$in['status'] = 0;
break;
}
$in['action'] = WRENCHBOARD_ACCOUNT_COMPLETE_TOPUP;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res > 0) {
}
}
redirect('/dash', 'refresh');
}
}
-49
View File
@@ -1,49 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//Import Hybridauth's namespace
use Hybridauth\Hybridauth;
class Home extends WRB_Controller {
function __construct()
{
parent::__construct();
//Load URL helper
$this->load->helper('url');
//Load session library
$this->load->library('session');
}
//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');
}
}
-42
View File
@@ -1,42 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Invite extends CI_Controller {
public function index() {
//echo "ameye kvkgkg";
/* $data['sitename'] = 'home';
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_index');
$this->load->view('users/view_external_footer');
*/
//define('WRENCHBOARD_ACCOUNT_REFERLINK',11033);
//https://oameye.work.wrenchboard.com/invite?refer_link=WRENREF-368681216-703766272-36774144
// HOW DO I SECURE THIS FROM ATTACK DDOS
//
if($_GET){
$refer_link = substr(trim($this->input->get('refer_link')),0,37);
$in_data=[];
$in_data['refer_link'] = $refer_link;
$in_data['action'] = WRENCHBOARD_ACCOUNT_REFERLINK;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in_data, $out);
if ($res == PHP_API_OK) {
redirect('/signup');
} else {
redirect('/signup');
}
}
redirect('/registration');
}
}
File diff suppressed because it is too large Load Diff
-667
View File
@@ -1,667 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Jobs extends CI_Controller {
var $actionMessage = '';
var $template = array(
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
'thead_open' => '<thead>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
function __construct() {
parent::__construct();
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
}
}
public function index() {
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
// print_r($_SESSION);
//Array ( [__ci_last_regenerate] => 1474689025 [username] => ses66181+1@gmail.com [name] => ses66181+1@gmail.com [firstname] => Olusesan [lastname] => Amey [email] => ses66181+1@gmail.com )
//
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_active', $data);
$this->load->view('users/view_footer_user', $data);
}
}
public function active() {
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
// print_r($_SESSION);
//Array ( [__ci_last_regenerate] => 1474689025 [username] => ses66181+1@gmail.com [name] => ses66181+1@gmail.com [firstname] => Olusesan [lastname] => Amey [email] => ses66181+1@gmail.com )
//
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_active', $data);
$this->load->view('users/view_footer_user', $data);
}
}
public function viewjob() {
$data = $this->getSessionArray();
$jobOfferID = $this->input->post('jobOfferID');
$data['jobOfferID'] = $jobOfferID;
if ($jobOfferID != '') {
$this->load->model('job_model');
$out = $this->job_model->loadJobOffer($_SESSION['member_id'], $jobOfferID);
// print_r($out);
if ($out['result'] == 1) {
$data["added_date"] = $out["added_date"];
$data["title"] = $out["title"];
$data["description"] = $out["description"];
$data["timeline_days"] = $out["timeline_days"];
$data["price"] = $out["price"];
$data["offer_code"] = $out["offer_code"];
$data["job_description"] = $out["job_description"];
$date = date_create($out["expire"]);
$out["expire"] = date_format($date, 'Y-m-d H:i');
$data["expire"] = $out["expire"];
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_viewjoboffer', $data);
$this->load->view('users/view_footer_user', $data);
} else {
redirect('dash'); // go back to dash if not valid
}
} else {
redirect('dash'); // go back to dash if not valid
}
}
public function market() {
$data = array();
$data = $this->getSessionArray();
$data['offer_dash'] = '';
$this->load->library('table');
$this->table->set_template($this->template);
/*
*
* wrenchboard=> SELECT 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 LIMIT 5;
title | description | timeline_days | price | job_description
-----------------------------------------------+-----------------------------------------------------------------------------+---------------+-------+----------------------------------------------------------------------------------------------------------------------------------------
595Job Title Job Title Job Title Job Title932 | Job descriptionJob descriptionJob descriptionJob descriptionJob description | 2 | 4000 | Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail
351Job Title Job Title Job Title Job Title923 | Job descriptionJob descriptionJob descriptionJob descriptionJob description | 3 | 1000 | Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail
595Job Title Job Title Job Title Job Title932 | Job descriptionJob descriptionJob descriptionJob descriptionJob description | 2 | 4000 | Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail
Test the ste for erro | Yes I am test | 7 | 10000 | Yes I am test
595Job Title Job Title Job Title Job Title932 | Job descriptionJob descriptionJob descriptionJob descriptionJob description | 2 | 4000 | Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail
(5 rows)
*
*/
$data["dash_title"] = "Available Jobs & Tasks";
$mysql = 'SELECT 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 '
. ' AND expire> now() AND public_view > 0';
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
$myTable = "<table class='table table-striped table-hover table-bordered table-condensed'>";
foreach ($query->result_array() as $row) {
$myTable .= $this->makeMarketTableRow($row);
}
$myTable .="</table>";
// $this->table->set_heading('Added/Expire', 'Title/Recipient', 'Status', '');
$data['market_table'] = $myTable; // $this->table->generate($query);
// $offer_found = true;
}
$_SESSION['secure_data'] = $data; // all data needed for secure page
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_market', $data);
$this->load->view('users/view_footer_user', $data);
}
private function makeMarketTableRow($row) {
return "<tr><td style='width:100px;'><b>" . $row['offer_code'] . "</b></td><td>" . $row['title'] . "</td><td style='width:100px;'><input type=submit id='submit_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return EDetail('" . $row['offer_code'] . "');\" class=\"btn btn-info btn-sm\" value=\"View\"></td></tr>"
. "<tr><td colspan = '3'><div id='" . $row['offer_code'] . "'></div></td></tr>";
}
public function showinterest()
{
$data = $this->getSessionArray();
$data['offer_code'] = $this->input->get('job_contract');
$data['member_id'] = $_SESSION['member_id']; // just maing sure
echo 'yes I hot here';
}
public function marketdetail() {
$offer_code = $this->input->get('job_contract');
$mysql = "SELECT 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 AND jo.offer_code ='".$offer_code."' ";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
$row = $query->row_array();
$myTable = "<table class='table table-sm table-hover table-bordered table-condensed' style=' background-color: #f1fdd5;'>";
$myTable .= $this->makeMarketDetailTableRow($row);
$myTable .="</table>";
}
echo $myTable ;
}
private function makeMarketDetailTableRow($row) {
return "<tr><td style='width:100px;'><b>Task Code</b></td><td><b>" . $row['offer_code'] . "</b></td></tr>"
. "<tr><td><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><b>Duration</b></td><td>" . $row['timeline_days'] . " day(s)</td></tr>"
. "<tr><td><b>Price</b></td><td>" . $row['price'] * 0.01 . " Naira</td></tr>"
. "<tr><td><b></b></td><td><input type=submit id='submit_interest_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return SInterest('" . $row['offer_code'] . "');\" class=\"btn btn-success btn-sm\" value=\"Send Interest Request
\"></td></tr>"
. " ";
}
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["job_description"];
$data["timeline_days"] = $out["timeline_days"];
$data["price"] = $out["price"];
$data["offer_code"] = $out["offer_code"];
$data["job_description"] = $out["job_description"];
$date = date_create($out["expire"]);
$out["expire"] = date_format($date, 'Y-m-d H:i');
$data["expire"] = $out["expire"];
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_viewmyjoboffer', $data);
$this->load->view('users/view_footer_user', $data);
} else {
redirect('dash'); // go back to dash if not valid
}
} else {
redirect('dash'); // go back to dash if not valid
}
}
public function pendingoffer() {
$data = array();
$data = $this->getSessionArray();
$data['offer_dash'] = '';
$this->load->library('table');
$this->table->set_template($this->template);
$data["offer_dash"] = "<div class=\"thumb\"><img src='assets/images/notask.png' alt=\"Active Projects\"></div>";
$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>'||jo.email AS tRec,"
. '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-sm\" 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'] . "LIMIT 400";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
$this->table->set_heading('Added/Expire', 'Title/Recipient', 'Status', '');
$data['offer_dash'] = $this->table->generate($query);
$offer_found = true;
}
$_SESSION['secure_data'] = $data; // all data needed for secure page
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_pendingoffer', $data);
$this->load->view('users/view_footer_user', $data);
}
public function jobgrp() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
return;
}
$data = $this->getSessionArray();
$data["job_message"] = "";
$data["group_id"] = 0;
if ($_POST && isset($_POST['del'])) {
$group_id = $this->input->post('del');
$data['job_message'] = $this->deleteMemberGroup($group_id);
} else if ($_POST && isset($_POST['delmember'])) {
$data["group_id"] = $this->input->post('group_id') + 0;
$member_id = $this->input->post('delmember') + 0;
$data['job_message'] = $this->deleteMemberGroupMember($data["group_id"], $member_id);
} else if ($_POST && isset($_POST['group_id'])) {
$data["group_id"] = $this->input->post('group_id') + 0;
$data['job_message'] = $this->addMemberGroupMember($data["group_id"]);
} else if ($_POST) {
$group_name = trim($this->input->post('group_name'));
// echo 'ameye....'.$group_name ;
$x = array();
$x['member_id'] = $_SESSION['member_id'];
$x['group_name'] = $group_name;
$x['action'] = WRENCHBOARD_JOB_CREATE_GROUP;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
// print_r($out);
} else {
$data['job_message'] = 'Unable to create job group...';
}
}
list($data['group_table'], $groups) = $this->getMembersJobGroup($data["group_id"]);
if (count($groups) > 0) {
if ($data["group_id"] > 0) {
$data["group_name"] = $groups[$data["group_id"]];
} else {
$data["group_name"] = reset($groups);
$data["group_id"] = key($groups);
}
$data['group_member_table'] = $this->addGroupMemberForm($data["group_id"]) . $this->getJobGroupMembers($data["group_id"]);
} else {
$data["group_id"] = 0;
$data["group_name"] = "";
$data["group_member_table"] = "Please add a group";
}
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_jobgroup', $data);
$this->load->view('users/view_footer_user', $data);
}
public function jobgrp_members() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
echo "Denied";
return;
}
$group_id = $this->input->get('group_id');
echo $this->addGroupMemberForm($group_id) . $this->getJobGroupMembers($group_id);
}
private function deleteMemberGroup($group_id) {
$this->load->model('job_model');
return $this->job_model->deleteMemberGroup($group_id);
}
private function deleteMemberGroupMember($group_id, $group_member_id) {
$this->load->model('job_model');
return $this->job_model->deleteMemberGroupMember($group_id, $group_member_id);
}
private function addMemberGroupMember($group_id) {
$firstname = $this->input->post('firstname');
$lastname = $this->input->post('lastname');
$email = $this->input->post('email');
if ($firstname == '')
return 'Invalid first name';
if ($lastname == '')
return 'Invalid last name';
if ($email == '' || !filter_var($email, FILTER_VALIDATE_EMAIL))
return 'Invalid_e-mail';
$this->load->model('job_model');
return $this->job_model->addMemberGroupMember($group_id, $firstname, $lastname, $email);
}
private function getJobGroupMembers($group_id) {
$this->load->model('job_model');
return $this->job_model->getJobGroupMembers($group_id);
}
private function getMembersJobGroup($sel) {
$this->load->model('job_model');
return $this->job_model->getMembersJobGroup($sel);
}
private function addGroupMemberForm($group_id) {
$this->load->model('job_model');
return $this->job_model->addGroupMemberForm($group_id);
}
public function create() {
$data = $this->getSessionArray();
$mybalance = 0;
$data['job_message'] = '';
// print_r($_SESSION);
$title = NULL;
$description = NULL;
$job_detail = NULL;
$timeline = NULL;
// $timeline_days = NULL;
$price = NULL;
$submit = NULL;
extract($_POST);
$redirected = false;
if ($_POST) {
$in = array();
$in['title'] = $title;
$in['description'] = $description;
$in['timeline_days'] = $timeline;
$in['job_detail'] = $job_detail;
$in['price'] = $price * 100;
$in['member_id'] = $_SESSION['member_id'];
$this->load->model('job_model');
if ($this->job_model->verifyJobInputs($in) == true) {
$in['action'] = WRENCHBOARD_JOB_CREATEJOB;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res == PHP_CREATED_OK) {
// print_r($out);
if ($out['job_id'] > 0) {
$this->processingJob($out['job_id']);
$redirected = true;
}
} else {
$data['job_message'] = 'Unable to create job...';
}
} else {
$data['job_message'] = 'Enter all required fields';
}
}
if ($redirected == false) {
$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'];
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_create', $data);
$this->load->view('users/view_footer_user', $data);
}
}
public function processjob() {
$jobID = $this->input->post('jobID');
if ($jobID > 0) {
$this->processingJob($jobID);
// $data = $this->getSessionArray();
} else {
redirect('/jobs/manage');
}
}
private function processingJob($jobID) {
// $jobID = $this->input->post('jobID');
if ($jobID > 0) {
$data = $this->getSessionArray();
$this->load->model('combo_model');
$data['my_job_group'] = $this->combo_model->getUserJobGroupCombo('job_group', $_SESSION['member_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"
. " FROM members_jobs WHERE id =" . $jobID . " AND member_id = " . $_SESSION['member_id'];
$query = $this->db->query($mysql);
$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);
} else {
redirect('/jobs/manage');
}
// echo "process job " . $jobID;
}
public function viewjob_accept() {
// echo 'home....0';
$this->concludeOffer(OFFER_ACCEPT);
}
public function viewjob_reject() {
//echo 'home....1';
$this->concludeOffer(OFFER_REJECT);
}
public function viewjob_cancel() {
//echo 'home....1';
$this->concludeOffer(OFFER_CANCEL);
}
private function concludeOffer($offer_result) {
//WRENCHBOARD_JOB_OFFER_CONCLUDE
$jobOfferID = $this->input->get('jobOfferID');
$in = array();
$in['offer_code'] = $jobOfferID;
$in['member_id'] = $_SESSION['member_id'];
$in['offer_result'] = $offer_result;
$in['action'] = WRENCHBOARD_JOB_OFFER_CONCLUDE;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($out["result"] == "OK") {
switch ($offer_result) {
case OFFER_ACCEPT:
echo "You have accepted this offer and we have notified the client. Please go to <a href='/proj/active'>manage page</a> to continue ";
break;
case OFFER_REJECT:
echo "You have rejected this offer and we have notified the client.";
break;
case OFFER_CANCEL:
echo "You have cancelled this offer and we have notified the recipient.";
break;
}
}
// print_r($out);
}
public function processjob_individ() {
$jobID = $this->input->get('jobID');
$email = $this->input->get('rec_email');
$descr = $this->input->get('jobdescription');
if ($jobID == '' || $jobID < 1) {
echo "Invalid job ID";
return;
}
if ($email == '' || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo "Invalid recipient e-mail";
return;
}
if ($descr == '') {
echo "Missing job description";
return;
}
$this->sendIndividualJobOffer($jobID, $email, $descr);
}
public function processjob_group() {
$jobID = $this->input->get('jobID');
$group = $this->input->get('job_group');
$descr = $this->input->get('jobdescription');
if ($jobID == '' || $jobID < 1) {
echo "Invalid job ID";
return;
}
if ($group == '' || $group < 1) {
echo "Invalid group";
return;
}
if ($descr == '') {
echo "Missing job description";
return;
}
$this->sendGroupJobOffer($jobID, $group, $descr);
}
private function sendIndividualJobOffer($jobID, $email, $descr) {
// this function will handle sending offer to invidual
$in["job_id"] = $jobID;
$in["email"] = $email;
$in["job_description"] = $descr;
$in['member_id'] = $_SESSION['member_id'];
// var_dump($in);
$in['action'] = WRENCHBOARD_JOB_OFFER_INDVI;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res == PHP_CREATED_OK) {
echo "Offer sent";
} else {
echo "Unable to send offer";
}
// echo 'Individual Result';
}
private function sendGroupJobOffer($jobID, $group, $descr) {
// this function will handle the call to backend
// to manage the sending of offer to group of people
$in["job_id"] = $jobID;
$in["group_id"] = $group;
$in["job_description"] = $descr;
$in['member_id'] = $_SESSION['member_id'];
//var_dump($in);
$in['action'] = WRENCHBOARD_JOB_OFFER_GROUP;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res == PHP_CREATED_OK) {
echo "Offer sent to group";
} else {
echo "Unable to send offer";
}
//echo 'Group Result';
}
public function manage() {
$data = $this->getSessionArray();
$this->load->library('table');
$this->table->set_template($this->template);
$jbx = "''processjob''";
$mysql = "SELECT title,description,timeline_days||' day(s)', price*0.01||'Naira' AS price,"
. " created::date,'<input type=submit onclick=\"return post_nav_find_action($jbx, '||id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Offer Job\">' AS manage,"
. "'<input type=submit onclick=\"return post_nav_del_action($jbx, '||id||')\" name=\"manage\" class=\"btn btn-warning btn-sm\" value=\"Del\">' As Del "
. " FROM members_jobs WHERE member_id = " . $_SESSION['member_id'] . " ORDER BY id DESC";
$query = $this->db->query($mysql);
$this->table->set_heading('Title', 'Description', 'Timeline', 'Price', 'Created', 'Manage', 'Del.');
$data['job_table'] = $this->table->generate($query);
$this->load->view('users/view_header_user', $data);
$this->load->view('jobs/view_manage', $data);
$this->load->view('users/view_footer_user', $data);
}
private function getSessionArray() {
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
$data['member_id'] = $_SESSION['member_id'];
$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 = $_SESSION['secure_data'];
$data['member_id'] = $_SESSION['member_id']; // = $ret->email;
$this->refreshAccountDetail($_SESSION['member_id']);
return $data;
}
private function refreshAccountDetail($member_id) {
$this->load->model('account_model');
$qr = $this->account_model->loadAccountData($member_id);
$_SESSION['current_balance'] = $qr[0]['balance'];
}
}
-524
View File
@@ -1,524 +0,0 @@
<?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() {
parent::__construct();
// Load library and url helper
//$this->load->library('facebook');
//$this->load->helper('url');
$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"] = $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');
if ($this->form_validation->run() !== false) {
$data['username'] = strtolower($this->input->post('username')); // '08174596144';
$data['password'] = $this->input->post('password'); //'7978';
$data['sessionid'] = rand(10000, 99999) . "A" . rand(10000, 99999);
$data['action'] = WRENCHBOARD_ACCOUNT_LOGIN;
$data['login_mode'] = WEBSITE_LOGIN;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
$is_live = $this->backend_model->cfgReadChar("system.live");
// print_r($out);
if ($res == PHP_LOGIN_OK) {
$this->load->model('account_model');
$ret = $this->account_model->username_data($data);
if ($res !== false) {
$data["login_message"] = "Welcome...";
// yes person has an account
$_SESSION['session_id'] = $out["session"];
$_SESSION['username'] = $this->input->post('username');
$_SESSION['name'] = $this->input->post('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['total_jobs'] = 0;
if (trim($ret->profile_pic) == '') {
// Show default picture
$_SESSION['profile_picture'] = "../smedia/DEFAULTS/default-profile.png";
} else {
// show the profile picture
$_SESSION['profile_picture'] = "../smedia/" . ($is_live ? "LIVE" : "TEST") . "/profile/" . $ret->profile_pic;
}
$this->logUser('Account login');
$this->refreshAccountDetail($_SESSION['member_id']);
$this->getSessionArray();
$this->excudedEmails();
$this->load->model('autopref_model');
$prefArray = $this->autopref_model->afterLoginPage();
redirect($prefArray['returnPage']);
}
} else {
$data["login_message"] = "Invalid username or password";
}
$res = false; // $this->login_model->verify_login($data);
} 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'];
$user['facebook'] = 1;
list($proceed, $data) = $this->checkUserExists($user, $data);
if ($proceed) {
$name = (string) $user["name"];
if (trim($name) == "")
$name = strtok($user["email"], "@");
$data['fb_id'] = $user["id"];
$data['firstname'] = strtok($name, " ");
$data['lastname'] = strtok(" ");
$data['email'] = $user["email"];
$data['sessionid'] = rand(10000, 99999) . "A" . rand(10000, 99999);
$data['action'] = WRENCHBOARD_FACEBOOK_LOGIN;
$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 if ($data["login_message"] == "") {
//$data["login_message"] = "Facebook login failed";
}
}
if( strlen( $data["login_message"]) > 0 )
{
$data["login_message"] = "<div class=\"text-left\">
<div class=\"alert alert-danger no-border\">" . $data["login_message"] . "- Please <a href=\"/password_recovery\">reset your password</a> or create a <a href='/signup'>new account</a> </div></div>";
}
$data['title'] = "Login"; // Capitalize the first letter
$data['page_title'] = "Login WrenchBoard";
//----- 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) {
$this->load->model('account_model');
$qr = $this->account_model->loadAccountData($member_id);
$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 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 - 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();
}
}
-17
View File
@@ -1,17 +0,0 @@
<?php
class Logout extends CI_Controller {
public function index() {
// delete session
$_SESSION['username'] = ""; //$this->input->post('username');
$_SESSION['name'] = ""; //$this->input->post('username');
$_SESSION['firstname'] = ""; //= $ret->firstname;
$_SESSION['lastname'] = ""; //= $ret->lastname;
redirect(home);
}
}
File diff suppressed because it is too large Load Diff
-143
View File
@@ -1,143 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Mobile extends Mobile_Controller {
public function index() {
$data = array();
$this->login();
}
public function login() {
$data = array();
$data["login_message"] = "";
$this->load->library('form_validation');
$this->form_validation->set_rules('username', 'Username', 'required');
$this->form_validation->set_rules('password', 'Password', 'required');
if ($this->form_validation->run() !== false) {
$data['username'] = strtolower($this->input->post('username')); // '08174596144';
$data['password'] = $this->input->post('password'); //'7978';
$data['sessionid'] = rand(10000, 99999) . "A" . rand(10000, 99999);
$data['action'] = WRENCHBOARD_ACCOUNT_LOGIN;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
$is_live = $this->backend_model->cfgReadChar("system.live");
//print_r($out);
if ($res == PHP_LOGIN_OK) {
$this->load->model('account_model');
$ret = $this->account_model->username_data($data);
if ($res !== false) {
$data["login_message"] = "Welcome...";
// yes person has an account
$_SESSION['session_id'] = $out["session"];
$_SESSION['username'] = $this->input->post('username');
$_SESSION['name'] = $this->input->post('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['total_jobs'] = 0;
if (trim($ret->profile_pic) == '') {
// Show default picture
$_SESSION['profile_picture'] = "../smedia/DEFAULTS/default-profile.png";
} else {
// show the profile picture
$_SESSION['profile_picture'] = "../smedia/" . ($is_live ? "LIVE" : "TEST") . "/profile/" . $ret->profile_pic;
}
$this->logUser('Account login');
$this->refreshAccountDetail($_SESSION['member_id']);
// $this->getSessionArray();
redirect('mobile/mobiledash');
}
} else {
//$data["login_message"] = "<div class=\"alert alert-danger no-border\">Invalid username or password</div>";
$data["login_message"] = "Invalid username or password";
}
$res = false; // $this->login_model->verify_login($data);
} else {
echo validation_errors();
}
$this->renderMobileExtPage('mobile_index', $data);
// $this->home2();
}
public function mobiledash() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function signup() {
$data = array();
$data["signup_error"] = "";
$firstname = NULL;
$country = 'NG';
$lastname = NULL;
$email = NULL;
$password = NULL;
$terms = NULL;
$news = NULL;
$terms = NULL;
$submit = NULL;
extract($_POST);
$this->load->model('combo_model');
$this->combo_model->defaultComboMessage = 'Select your Country';
$data['country_combo'] = $this->combo_model->getCountryCombo('country', $country);
$this->renderMobileExtPage('mobile_signup', $data);
// $this->home2();
}
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'];
$_SESSION['active_task'] = $this->account_model->loadActiveTaskCount($member_id);
}
private function renderMobileExtPage($mobile_page_name, $data) {
$this->load->view('mobile/mobile_ext_header', $data);
$this->load->view('mobile/' . $mobile_page_name, $data);
$this->load->view('mobile/mobile_ext_footer', $data);
}
private function renderMobileSecurePage22($mobile_page_name, $data) {
$this->load->view('mobile/secure/mobile_secure_header', $data);
$this->load->view('mobile/secure/' . $mobile_page_name, $data);
$this->load->view('mobile/secure/mobile_secure_footer', $data);
}
public function logout() {
$data = array();
$this->login();
}
}
@@ -1,16 +0,0 @@
<?php
class Outmessage extends CI_Controller {
public function index() {
$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('site3/external/view_signup_started',$data);
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Partners extends WRB_Controller {
public function index() {
/* $data['sitename'] = 'home';
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_index');
$this->load->view('users/view_external_footer');
* */
$this->agenthome();
}
public function agenthome() {
$this->load->view('agent/agent_home');
}
public function login() {
// $this->load->view('users/view_index');
// $this->load->view('users/view_external_footer');
}
}
@@ -1,85 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Password_recovery extends CI_Controller {
public function index() {
$data = [];
$data['hcaptcha_site_key'] = "416c2382-9d6e-4131-bb58-e61b33f46a8b";
$data['hcaptcha_secret'] = "0x371da01B1407137aCb0FcCB387753450DFD096BC";
$data['action_message'] = "";
if ($_POST) {
$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'] = "&nbsp;&nbsp;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 {
$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('site3/external/view_resetpass',$data);
//
}
var $actionMessage = '';
private function resetMemberPass($email) {
$this->actionMessage = '';
//$group_id = $group_id + 0; // just making sure it is number
$x['email'] = $email;
$x['action'] = WRENCHBOARD_ACCOUNT_RESETPASS;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
$this->actionMessage = 'Group Created';
} else {
$this->actionMessage = 'Unable to create job group...';
}
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;
}
}
-156
View File
@@ -1,156 +0,0 @@
<?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
}
}
-29
View File
@@ -1,29 +0,0 @@
<?php
class Paypal extends Users_Controller {
public function index() {
$data = $this->getSessionArray();
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
}
}
public function retn() {
$data = $this->getSessionArray();
}
public function canc() {
$data = $this->getSessionArray();
redirect('/member/addfund');
}
public function ipn() {
$data = $this->getSessionArray();
}
}
-86
View File
@@ -1,86 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Plb extends WRB_Controller {
public function index() {
$this->jobViewPage('');
}
public function viewjob() {
$offerCode = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
if ( strlen($offerCode) == 10 && !preg_match('/'.preg_quote('^\'£$%^&*()}{@#~?><,@|-=-_+-¬', '/').'/', $offerCode) )
{
$this->jobViewPage($offerCode);
}
else{
redirect('/login');
}
}
private function jobViewPage($offerCode) {
$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 "
. " AND jo.expire> now() AND jo.offer_code='" . $offerCode . "' AND jo.public_view > 0";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
$myTable = "<table class='table table-striped table-hover table-bordered table-condensed'>";
foreach ($query->result_array() as $row) {
$myTable .= $this->makeMarketTableRow($row);
}
$myTable .="</table>";
$data['market_table'] = $myTable; // $this->table->generate($query);
// $offer_found = true;
} else {
$data['market_table'] = '';
}
$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() 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()[0];
$this->load->view('site3/external/view_market',$data);
}
private function makeMarketTableRow($row) {
return "<tr><td style='width:100px;'><b>" . $row['offer_code'] . "</b></td><td>" . $row['title'] . "</td><td style='width:100px;'></td></tr>"
. "<tr><td colspan = '3'>" . $this->makeMarketDetailTableRow($row) . "</td></tr>";
}
private function makeMarketDetailTableRow($row) {
$data['interest'] = 0;
$mysql = "SELECT count(*) AS interest FROM members_offer_interest WHERE offer_id=" . $row['offer_id'];
$query = $this->db->query($mysql);
if ($query->num_rows() > 0) {
$data = $query->row_array();
}
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;'><a class=\"btn btn-primary btn-xs\" href='/login'>See More</a></td></tr>"
. "</table> ";
}
}
-20
View File
@@ -1,20 +0,0 @@
<?php
class Privacy extends WRB_Controller {
public function index() {
$data['title'] = "Terms"; // Capitalize the first letter
$data['page_title'] = "Terms & Conditions";
$data['page_key'] = 'WRB_MAIN_PRIVACY';
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_terms', $data);
$this->load->view('users/view_external_footer');
// $this->load->view('templates/footer_boxed', $data);
}
}
File diff suppressed because it is too large Load Diff
-116
View File
@@ -1,116 +0,0 @@
<?php
class Refer extends Users_Controller {
public function index() {
$data = $this->getSessionArray();
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
redirect('/refer/refpage');
}
}
public function refpage() {
$data = $this->getSessionArray();
if ($_SESSION['refer'] == '') {
redirect('/refer/refagree');
}
$data['ref_firstname'] = $data['ref_lastname'] = $data['ref_email'] = "";
$data["status"] = '';
if ($_POST) {
$ref_firstname = $this->input->post('ref_firstname');
$ref_lastname = $this->input->post('ref_lastname');
$ref_email = $this->input->post('ref_email');
$in_data=[];
$in_data['ref_firstname'] = $ref_firstname;
$in_data['ref_lastname'] = $ref_lastname;
$in_data['ref_email'] = $ref_email;
$in_data['member_id'] = $_SESSION['member_id'];
$in_data['action'] = WRENCHBOARD_ACCOUNT_SENDREFER;
$data['ref_firstname'] = $in_data['ref_firstname'];
$data['ref_lastname'] = $in_data['ref_lastname'];
$data['ref_email'] = $in_data['ref_email'];
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($in_data, $out);
if ($res == PHP_API_OK) {
$data['ref_firstname'] = $data['ref_lastname'] = $data['ref_email'] = "";
$data["status"] = 'Success - ' . $out['status'];
} else {
$data["status"] = 'Error - ' . $out['status'];
}
}
$this->load->library('pagination');
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
. "(CASE WHEN status=1 THEN 'Pending' WHEN status=5 THEN 'Completed' ElSE '' END) As status "
. "FROM members_refer_friend "
. "WHERE member_id =" . $_SESSION['member_id'];
$query = $this->db->query($mysql);
$config =$this->paginationConfig(3,5,$query->num_rows(),"/refer/refpage",5);
$this->pagination->initialize($config);
$page = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;
$page = is_numeric($page) ? $page : 0;
$mysql = "SELECT added::date||'<br>'||firstname||' '||lastname,email as date_name,"
. "(CASE WHEN status=1 THEN 'Pending' WHEN status=5 THEN 'Completed' ElSE '' END) As status "
. "FROM members_refer_friend "
. "WHERE member_id =" . $_SESSION['member_id'] . " ORDER BY id DESC LIMIT " . $config["per_page"] . " OFFSET " . $page;
$query = $this->db->query($mysql);
$this->load->library('table');
$this->table->set_template($this->template);
$data["links"] = $this->pagination->create_links();
$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->RenderUserPage('users/view_refer', $data);
}
public function refagree() {
$data = $this->getSessionArray();
if ($_SESSION['refer'] != '') {
redirect('/refer');
}
// print_r($_POST);
if ($_POST) {
$in = array();
$in['action'] = WRENCHBOARD_ACCOUNT_TERMS;
$in['action_item'] = ACCOUNT_AGREE_REFER;
$in['member_id'] = $_SESSION['member_id'];
$this->load->model('backend_model');
$out = array();
// print_r( $in );
// exit;
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res == PHP_API_OK) {
redirect('/refer');
}
}
$data['page_name'] = 'referterms';
$data['page_title'] = 'Referer Terms';
$data['page_key'] = 'WRB_MAIN_REFER_TERM';
$data['txt_detail'] = $this->readFixedText( $data['page_key'] );
// $this->load->view('users/view_header_user', $data);
// $this->load->view('users/view_refagree', $data);
// $this->load->view('users/view_footer_user', $data);
$this->RenderUserPage('users/view_refagree', $data);
}
}
@@ -1,90 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Registration extends CI_Controller {
public function index() {
$data["signup_error"] = "";
$firstname = NULL;
$country = 'NG';
$lastname = NULL;
$email = NULL;
$password = NULL;
$terms = NULL;
$news = NULL;
$terms = NULL;
$submit = NULL;
extract($_POST);
$data['firstname'] = $firstname;
$data['lastname'] = $lastname;
$data['email'] = strtolower($email);
$data['username'] = strtolower($email);
$data['password'] = $password;
$data['country'] = $country;
$data['news'] = 1; //$news;
$data['terms'] = $terms;
$ip = $this->input->ip_address();
$data['loc'] = $ip; //"38.101.241.200";
$this->load->model('combo_model');
$this->combo_model->defaultComboMessage = 'Select your Country';
$data['country_combo'] = $this->combo_model->getCountryCombo('country', $country);
$terms_checked = '';
// is anybody using this email already
$this->load->model('account_model');
$data['signup_error'] = '';
if ($_POST) { // post
if ($data['terms'] == 'on') {
$terms_checked = 'checked';
}
// $data['terms'] = 1; // note terms is turned to 1
//
// print_r($_POST);
if ($this->account_model->verifySignupInputs($data) == true) {
$email_in_use = false;
$data['terms'] = 1; // $terms is interger in backend;
if ($this->account_model->checkUsernameDuplicate($data) > 0) {
$email_in_use = true;
}
if ($email_in_use == false) {
$data['action'] = WRENCHBOARD_ACCOUNT_PENDING;
if ($_POST) {
if ($firstname !== '' && $lastname !== '') {
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
if ($res > 0) {
$data['account_email'] = strtolower($email);
redirect('outmessage', $data);
} else {
$data['signup_error'] = "Unable to create account";
}
}
}
} else {
$data['signup_error'] = "Please use another username";
}
} else {
$data['signup_error'] = "Enter all required fields";
}
} // if post
$data['signup_error_style'] = '';
if (strlen($data['signup_error']) > 0) {
$data['signup_error_style'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $data["signup_error"] . "</div></div>";
}
$data['terms'] = $terms_checked;
// $this->load->view('users/view_registration', $data);
// $this->load->view('users/view_external_footer', $data);
}
}
-134
View File
@@ -1,134 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Res extends Users_Controller {
public function index() {
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
// print_r($_SESSION);
//Array ( [__ci_last_regenerate] => 1474689025 [username] => ses66181+1@gmail.com [name] => ses66181+1@gmail.com [firstname] => Olusesan [lastname] => Amey [email] => ses66181+1@gmail.com )
//
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_dash', $data);
$this->load->view('users/view_footer_user', $data);
}
}
public function vmedia() {
$data = $this->getSessionArray();
$this->load->library('table');
$this->table->set_template($this->template);
$this->table->set_heading('No', 'Video');
//$dir = getcwd() . '/smedia/media/Angularjs';
$group = '';
$get_group = $this->input->post('group');
$dir = '/opt/wrenchboard/media';
$folders_found = scandir($dir);
for ($ii = 0; $ii < count($folders_found); $ii++) {
if (strlen($folders_found[$ii]) > 5 && $get_group == md5($folders_found[$ii])) {
$group = $folders_found[$ii];
}
}
if ($group == '')
redirect(home);
$video = '';
$get_video = $this->input->post('video');
$dir = '/opt/wrenchboard/media/' . $group;
$folders_found = scandir($dir);
$ik = 1;
for ($ii = 0; $ii < count($folders_found); $ii++) {
if (strlen($folders_found[$ii]) > 5) {
//echo $get_video." / ".md5($folders_found[$ii])." / ".$folders_found[$ii]."<br>";
if ($get_video == md5($folders_found[$ii]))
$video = $folders_found[$ii];
$out['folder_' . $ik] = $folders_found[$ii];
$folderClick = '<a href="#" onclick="return loadVideo(\'' . md5($group) . '\',\'' . md5($folders_found[$ii]) . '\')">' . $folders_found[$ii] . '</a>';
$this->table->add_row($ik, $folderClick);
$ik++;
}
}
if ($video == '')
$video = $out['folder_1'];
$data['video'] = '/smedia/media/' . $group . '/' . $video;
$data['group'] = md5($group);
$data['folders_data'] = $out;
$data['video_table'] = $this->table->generate();
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_viewmedia', $data);
$this->load->view('users/view_footer_user', $data);
}
public function media() {
$data = $this->getSessionArray();
$this->load->library('table');
$this->table->set_template($this->template);
$this->table->set_heading('No', 'Video');
//$dir = getcwd() . '/smedia/media';
$dir = '/opt/wrenchboard/media';
$folders_found = scandir($dir);
$ik = 1;
for ($ii = 0; $ii < count($folders_found); $ii++) {
if (strlen($folders_found[$ii]) > 5) {
$out['folder_' . $ik] = $folders_found[$ii];
$folderClick = '<a href="#" onclick="return loadGroup(\'' . md5($folders_found[$ii]) . '\')">' . $folders_found[$ii] . '</a>';
$this->table->add_row($ik, $folderClick);
$ik++;
}
}
$data['folders_data'] = $out;
$data['video_table'] = $this->table->generate();
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_vmedia', $data);
$this->load->view('users/view_footer_user', $data);
}
public function prints() {
$data = $this->getSessionArray();
// get libary contents
$mysql = "SELECT '<a onclick=\"return viewLibr('||id||')\" >'||title||'</a>' FROM library";
$this->load->library('table');
$this->table->set_template($this->template);
$query = $this->db->query($mysql);
$this->table->set_heading('');
$data['library_table'] = $this->table->generate($query);
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_prints', $data);
$this->load->view('users/view_footer_user', $data);
}
public function getlibary() {
$library_id = $this->input->get('libary_id');
$out = $this->libraryContent($library_id);
// echo $this->smart_htmlspecialchars ( $out['detail'] );
echo html_entity_decode($out['detail']);
}
}
-86
View File
@@ -1,86 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Secmobile extends WRB_Controller {
public function index() {
$this->mobiledash();
}
public function mobiledash() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function active() {
$data = array();
$jbx = "''/proj/thisjob''";
$mysql = "SELECT '<b>ID:</b><a href=\"#\" onclick=\"showJobModal('''||mc.contract||''');\" >'||mc.contract||'</a><br><b>Timeline:</b>'||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
. " '<b>Title: </b>'||mc.title||'<br><b>Description: </b>'||mc.description AS description,"
. " (CASE WHEN mc.status=4 THEN '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs btn-block\" value=\"Review\">' "
. " 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) OR mc.client_id =" . $_SESSION['member_id'] . " AND mc.status IN (1,2,4)"; // LIMIT " . $config["per_page"] . " OFFSET " . $page;
$query = $this->db->query($mysql);
$data['activejob_table'] = $query->result();
$this->renderMobileSecurePage('mobile_active_task', $data);
}
public function market() {
$data = array();
$data['offer_dash'] = '';
$data["dash_title"] = "Available Jobs & Tasks";
$mysql = ' SELECT 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 '
. ' AND expire> now() AND public_view > 0';
$query = $this->db->query($mysql);
$num = $query->num_rows();
$data['job_no'] = $num;
if ($num > 0) {
$data['job_table'] = $query->result();
} else {
}
$data['page_title'] = 'Marketplace';
$this->renderMobileSecurePage('mobile_market_task', $data);
}
public function account() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function messages() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function mypage() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function manage() {
$data = array();
$this->renderMobileSecurePage('mobile_dash', $data);
}
public function myjobs() {
$data = array();
$this->renderMobileSecurePage('mobile_manage_task', $data);
}
}
-90
View File
@@ -1,90 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Signup extends CI_Controller {
public function index() {
$data["signup_error"] = "";
$firstname = NULL;
$country = 'NG';
$lastname = NULL;
$email = NULL;
$password = NULL;
$terms = NULL;
$news = NULL;
$terms = NULL;
$submit = NULL;
extract($_POST);
//var_dump($_POST);
$data['firstname'] = $firstname;
$data['lastname'] = $lastname;
$data['email'] = strtolower($email);
$data['username'] = strtolower($email);
$data['password'] = $password;
$data['country'] = $country;
$data['news'] = 1; //$news;
$data['terms'] = $terms;
$ip = $this->input->ip_address();
$data['loc'] = $ip; //"38.101.241.200";
$this->load->model('combo_model');
$this->combo_model->defaultComboMessage = 'Select your Country';
$data['country_combo'] = $this->combo_model->getCountryCombo('country', $country);
$terms_checked = '';
// is anybody using this email already
$this->load->model('account_model');
$data['signup_error'] = '';
if ($_POST) { // post
if ($data['terms'] == 'on' || $data['terms'] == '1') {
$data['terms'] == 'on';
$terms_checked = 'checked';
}
// $data['terms'] = 1; // note terms is turned to 1
//
// print_r($_POST);
if ($this->account_model->verifySignupInputs($data) == true) {
$email_in_use = false;
$data['terms'] = 1; // $terms is interger in backend;
if ($this->account_model->checkUsernameDuplicate($data) > 0) {
$email_in_use = true;
}
if ($email_in_use == false) {
$data['action'] = WRENCHBOARD_ACCOUNT_PENDING;
if ($_POST) {
if ($firstname !== '' && $lastname !== '') {
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
if ($res > 0) {
$data['account_email'] = strtolower($email);
redirect('outmessage', $data);
} else {
$data['signup_error'] = "Unable to create account";
}
}
}
} else {
$data['signup_error'] = "Please use another username";
}
} else {
$data['signup_error'] = "Enter all required fields";
}
//exit;
} // if post
$data['signup_error_style'] = '';
if (strlen($data['signup_error']) > 0) {
$data['signup_error_style'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $data["signup_error"] . "</div></div>";
}
$data['terms'] = $terms_checked;
$this->load->view('site3/external/view_signup',$data);
}
}
-51
View File
@@ -1,51 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
//Import Hybridauth's namespace
use Hybridauth\Hybridauth;
class Site extends WRB_Controller {
public function index() {
/* $data['sitename'] = 'home';
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_index');
$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');
///home/oameye/wrenchboard/www/application/views/site3/external
}
public function registration() {
$this->load->view('users/view_registration');
}
public function login() {
// $this->load->view('users/view_index');
// $this->load->view('users/view_external_footer');
}
}
-56
View File
@@ -1,56 +0,0 @@
<?php
class Smedia extends CI_Controller {
public function index() {
$this->serve_file('');
}
private function serve_file($filename) {
if ($filename=='' || !file_exists($filename)) {
$filename = 'assets/images/accessdenied.png';
}
// Any additional path checks should go here
// TODO: realpath check to /opt/wrenchboard
header('Content-type: ' . mime_content_type($filename));
readfile($filename);
}
public function DEFAULTS() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
$this->serve_file('');
return;
}
//var_dump($_SERVER);
$filename = str_replace("/smedia/","/opt/wrenchboard/",$_SERVER["SCRIPT_URL"]);
//echo $filename;
$this->serve_file($filename);
}
public function LIVE() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
$this->serve_file('');
return;
}
$filename = str_replace("/smedia/","/opt/wrenchboard/",$_SERVER["SCRIPT_URL"]);
$this->serve_file($filename);
}
public function media() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
$this->serve_file('');
return;
}
$filename = str_replace("/smedia/","/opt/wrenchboard/",$_SERVER["SCRIPT_URL"]);
$this->serve_file($filename);
}
public function TEST() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
$this->serve_file('');
return;
}
$filename = str_replace("/smedia/","/opt/wrenchboard/",$_SERVER["SCRIPT_URL"]);
$this->serve_file($filename);
}
}
-20
View File
@@ -1,20 +0,0 @@
<?php
class Terms extends WRB_Controller {
public function index() {
$data['title'] = "Terms"; // Capitalize the first letter
$data['page_title'] = "Terms & Conditions";
$data['page_key'] = 'WRB_MAIN_SIGNUP_TERM';
$data['txt_detail'] = $this->readFixedText($data['page_key']);
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_terms', $data);
$this->load->view('users/view_external_footer');
// $this->load->view('templates/footer_boxed', $data);
}
}
-32
View File
@@ -1,32 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class User extends CI_Controller {
public function index()
{
// echo "ameye kvkgkg";
$this->load->view('users/view_index');
}
public function registration(){
$this->load->view('users/view_registration');
}
public function login()
{
$submit = NULL;
extract($_POST);
if ($submit)
{
redirect('member');
}
// redirect('member');
$this->load->view('users/view_index');
}
}
-50
View File
@@ -1,50 +0,0 @@
<?php
class Vemail extends CI_Controller {
public function index() {
//http://oameye.works.wrenchboard.com/vemail?vlnk=WRENCHB-872626432-43593472-432449792
$vlnk = NULL;
$data['title'] = "Verify Email"; // Capitalize the first letter
$data['page_title'] = "Verify Signup";
$data['email'] = "ameye@chiefsoft.com";
$show_error=true;
extract($_GET);
if (trim($vlnk) !== '') {
$data['vlink'] = trim($vlnk);
$this->load->model('account_model');
$ret = $this->account_model->verify_link($data);
if ($ret !== false) {
$data['email'] = $ret->email;
if ($ret->status == 1) {
// let us work on the back end now
// CONSTRUCT THE ACCOUNT NOW
$this->load->model('backend_model');
$out = array();
$data['action'] = WRENCHBOARD_ACCOUNT_CREATEACC;
$data['verify_link'] = trim($vlnk);
$data['username'] = $ret->username;
$res1 = $this->backend_model->wrenchboard_api($data, $out);
if ($res1 > 0) {
$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
// print_r($ret);
} else {
}
}
// IF YOU GET HERE - ERROR PAGE
if ($show_error == true){
$this->load->view('site3/external/view_error', $data);
}
}
}
-19
View File
@@ -1,19 +0,0 @@
<?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);
}
}
}
-25
View File
@@ -1,25 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Welcome extends CI_Controller {
/**
* Index Page for this controller.
*
* Maps to the following URL
* http://example.com/index.php/welcome
* - or -
* http://example.com/index.php/welcome/index
* - or -
* Since this controller is set as the default controller in
* config/routes.php, it's displayed at http://example.com/
*
* So any other public methods not prefixed with an underscore will
* map to /index.php/welcome/<method_name>
* @see https://codeigniter.com/user_guide/general/urls.html
*/
public function index()
{
$this->load->view('welcome_message');
}
}
-30
View File
@@ -1,30 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Wrb404 extends CI_Controller {
public function __construct() {
parent::__construct();
}
public function index() {
//echo 'Ameye';
// $this->output->set_status_header('404');
// $data['error_content'] = 'error_4042'; // View name
//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);
}
}
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
@@ -1,16 +0,0 @@
<?php
class secureUserPage {
function __construct() {
if (!isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
} else {
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_active', $data);
$this->load->view('users/view_footer_user', $data);
}
}
}
-392
View File
@@ -1,392 +0,0 @@
<?php
use Gelf\Transport;
use Monolog\Level;
use Monolog\Logger;
use Monolog\Handler\GelfHandler;
class WRB_Controller extends CI_Controller {
var $template = array(
'table_open' => "<table class='table table-row-bordered table-row-gray-100 align-middle gs-0 gy-3'>",
'thead_open' => '<thead class=\'bg-indigo\'>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
var $template_nohead = array(
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
'thead_open' => '<thead>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
public $data = array();
var $logger;
function __construct() {
parent::__construct();
$this->load->library(array('session', 'lib_login'));
$gelf_host = $this->config->item('gelf_host');
$gelf_port = $this->config->item('gelf_port');
if ($gelf_host != '' && $gelf_port != '') {
// Create the logger
$this->logger = new Logger($_SERVER['SERVER_ADDR']);
// Create Graylog GELF TCP transport
$transport = new Gelf\Transport\TcpTransport($gelf_host, $gelf_port);
// Create GELF handler
$handler = new GelfHandler(new Gelf\Publisher($transport));
// Now add GELF handler to logger
$this->logger->pushHandler($handler);
} else {
// Create shim to use regular logger
$logger = new class {
public function log($lvl,$msg,$ctx=[]) { log_message($lvl, $msg, $ctx); }
public function debug($msg,$ctx=[]) { log_message('debug', $msg, $ctx); }
public function info($msg,$ctx=[]) { log_message('info', $msg, $ctx); }
public function notice($msg,$ctx=[]) { log_message('notice', $msg, $ctx); }
public function warning($msg,$ctx=[]) { log_message('warning', $msg, $ctx); }
public function error($msg,$ctx=[]) { log_message('error', $msg, $ctx); }
public function critical($msg,$ctx=[]) { log_message('critical', $msg, $ctx); }
public function alert($msg,$ctx=[]) { log_message('alert', $msg, $ctx); }
public function emergency($msg,$ctx=[]) { log_message('emergency', $msg, $ctx); }
};
$this->logger = $logger;
}
//*/
}
public function paginationConfig($urlSeg,$perPage,$numRows,$linkPath,$numLnk){
$config = array();
$config["total_rows"] =$numRows;
$config["base_url"] = base_url() . $linkPath;
$config["per_page"] = $perPage;
$config["uri_segment"] = $urlSeg;
$config["num_links"] = $numLnk;
$config['full_tag_open'] = "<ul class='pagination'>";
$config['full_tag_close'] = "</ul>";
$config['num_tag_open'] = '<li class="page-item">';
$config['num_tag_close'] = '</li>';
$config['cur_tag_open'] = "<li class='page-item active'><a href='#'>";
$config['cur_tag_close'] = "<span class='sr-only'></span></a></li>";
$config['next_tag_open'] = '<li class="page-item">';
$config['next_tagl_close'] = "</li>";
$config['prev_tag_open'] = '<li class="page-item">';
$config['prev_tagl_close'] = "</li>";
$config['first_tag_open'] = '<li class="page-item">';
$config['first_tagl_close'] = "</li>";
$config['last_tag_open'] = '<li class="page-item">';
$config['last_tagl_close'] = "</li>";
return $config;
}
public function wrenchboard_api($in, $out) {
$this->load->model('backend_model');
// $out = array();
return $this->backend_model->wrenchboard_api($in, $out);
}
protected function smart_htmlspecialchars($str) {
if (substr($str, 0, 1) == '<')
return $str;
return htmlspecialchars($str);
}
protected function getSessionArray() {
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
$data['member_id'] = $_SESSION['member_id'];
$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['new_message'] = $out['new_message'];
$_SESSION["active_offers_count"] = $out['active_offers_count'];
$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;
$data['mlog'] = $mlog;
$data['member_id'] = $_SESSION['member_id'];
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($data, $out);
$this->load->model('userlog_model');
$xy["member_id"] = $_SESSION['member_id'];
$_SESSION['member_log'] = $this->userlog_model->loadUserLog($xy);
// print_r($out);
}
protected function myMessagesSnapshot() {
$str = "<li class='media'>
<div class='media-left'>
<img src='/assets/images/placeholder.jpg' class='img-circle img-sm' alt=''>
</div>
<div class='media-body'>
<a href='#' class='media-heading'>
<span class='text-semibold'>System</span>
<span class='media-annotation pull-right'>00:00</span>
</a>
<span class='text-muted'>You have no pending messages</span>
</div>
</li>";
return $str;
/*
<li class="media">
<div class="media-left">
<img src="/assets/images/placeholder.jpg" class="img-circle img-sm" alt="">
<span class="badge bg-danger-400 media-badge">5</span>
</div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">James Alexander</span>
<span class="media-annotation pull-right">04:58</span>
</a>
<span class="text-muted">who knows, maybe that would be the best thing for me...</span>
</div>
</li>
<li class="media">
<div class="media-left">
<img src="/assets/images/placeholder.jpg" class="img-circle img-sm" alt="">
<span class="badge bg-danger-400 media-badge">4</span>
</div>
<div class="media-body">
<a href="#" class="media-heading">
<span class="text-semibold">Margo Baker</span>
<span class="media-annotation pull-right">12:16</span>
</a>
<span class="text-muted">That was something he was unable to do because...</span>
</div>
</li>
*
*/
}
protected function sql_escape_func($inp) {
if (is_array($inp)) {
return array_map(__METHOD__, $inp);
}
if (!empty($inp) && is_string($inp)) {
return str_replace(array('\\', "\0", "\n", "\r", "'", '"', "\x1a"), array('\\\\', '\\0', '\\n', '\\r', "\\'", '\\"', '\\Z'), $inp);
}
return $inp;
}
protected function findOffers($email) {
$this->load->model('offers_model');
$this->offers_model->attachOffers($email);
}
protected function home1($pagename='') {
$data['sitename'] = 'home';
$res = $this->getExtJobList();
$data['market_data'] = $res;
$data['why_list'] = $this->getExtWhyList();
//$this->load->view('templates/header_boxed', $data);
//
$this->load->view('home/view_index1', $data);
//$this->load->view('users/view_external_footer');
}
protected function home2($pagename = '') {
$data['sitename'] = 'home';
$res = $this->getExtJobList();
$data['market_data'] = $res;
$data['why_list'] = $this->getExtWhyList();
$this->load->view('home2/header', $data);
if ($pagename == '') {
$this->load->view('home2/view_index2', $data);
} else {
$this->load->view($pagename, $data);
}
$this->load->view('home2/footer', $data);
}
protected function readFixedText($text_key) {
$page_key = trim($text_key);
$finaltxt = "";
if ($page_key != '') {
$mysql = "SELECT * FROM general_text WHERE page_key='$page_key'";
$query = $this->db->query($mysql);
if ($query->num_rows() == 0) {
$finaltxt = "";
} else {
$row = $query->row();
$finaltxt = $row->txt_detail;
}
}
return $finaltxt;
}
protected function libraryContent($content_id) {
$out = array();
$query = $this->db->query("SELECT * FROM library WHERE id = " . $content_id);
if ($query->num_rows() > 0) {
$row = $query->row();
$out['title'] = $row->title;
$out['description'] = $row->description;
$out['detail'] = $row->detail;
}
return $out;
}
protected function getExtJobList() {
$mysql = "SELECT j.title,j.description,m.job_id,m.expire "
. "FROM members_jobs_offer m "
. "LEFT JOIN members_jobs j ON j.id=m.job_id "
. "WHERE m.status = 1 AND m.client_id=0 "
. "AND m.expire IS NOT NULL "
. "AND m.public_view = 1 "
. "ORDER BY m.expire DESC LIMIT 6";
$query = $this->db->query($mysql);
return $query->result();
}
protected function getExtWhyList() {
$mysql = "SELECT * FROM why ORDER BY flags DESC";
$query = $this->db->query($mysql);
return $query->result();
}
protected function getClientJobStats($client_id) {
$out = array();
$out['total_jobs_completed'] = $out['total_jobs_active'] = $data['total_jobs_uncompleted'] = 0;
$out['total_pending_offers'] = 0;
$mysql = " SELECT count(*) AS total_jobs_completed FROM members_jobs_contract WHERE client_id =$client_id AND status = 5";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['total_jobs_completed'] = $q->row()->total_jobs_completed;
}
$mysql = " SELECT count(*) AS total_jobs_active FROM members_jobs_contract WHERE client_id =$client_id AND status IN (1,2)";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['total_jobs_active'] = $q->row()->total_jobs_active;
}
$mysql = " SELECT count(*) AS total_jobs_uncompleted FROM members_jobs_contract WHERE client_id =$client_id AND status NOT IN (1,2,5)";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['total_jobs_uncompleted'] = $q->row()->total_jobs_uncompleted;
}
$mysql = " SELECT count(*) AS total_pending_offers FROM members_jobs_offer WHERE client_id =$client_id AND status=1";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['total_pending_offers'] = $q->row()->total_pending_offers;
}
return $out; //['escrow_c_offer'] + $out['escrow_balance'];
}
protected function renderMobileSecurePage($mobile_page_name, $data) {
$this->load->view('mobile/secure/mobile_secure_header', $data);
$this->load->view('mobile/secure/' . $mobile_page_name, $data);
$this->load->view('mobile/secure/mobile_secure_footer', $data);
}
/*
* wrenchboard=> \d library
Table "public.library"
Column | Type | Modifiers
-------------+-----------------------------+------------------------------------------------------
id | integer | not null default nextval('library_id_seq'::regclass)
title | character varying(150) | not null
description | character varying(500) | not null
detail | text |
updated | timestamp without time zone | default now()
Indexes:
"library_id_key" UNIQUE CONSTRAINT, btree (id)
"library_title_key" UNIQUE CONSTRAINT, btree (title)
*/
}
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
@@ -1,185 +0,0 @@
<?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;
}
}
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
@@ -1,174 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bko_Controller extends WRB_Controller {
var $template = array(
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
'thead_open' => '<thead class=\'bg-indigo\'>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
public $data = array();
function __construct() {
parent::__construct();
if (!isset($_SESSION['bko_username']) or $_SESSION['bko_username'] == '') {
redirect(home);
}
//print_r($_SESSION);
}
// protected
protected function bkoDashData() {
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
$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, 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' => '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);
$this->table->set_template($this->template);
$mysql = "SElECT added::date||'<br>'||loc AS dates,email||'<br>'||firstname||' '||lastname AS Name FROM members ORDER BY id DESC LIMIT 7";
$query = $this->db->query($mysql);
// $this->table->set_heading('Account', 'Created', 'Action');
$this->table->set_heading(array('data' => 'Date/LOC', 'style' => 'width:140px'), 'Email/Name');
$data['signup_dash_table'] = $this->table->generate($query);
// PUBIC active JOB table
$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 "
. " AND jo.expire> now() AND jo.public_view > 0";
$query = $this->db->query($mysql);
// $this->table->set_heading(array('data' => 'Date/LOC', 'style' => 'width:140px'), 'Email/Name');
$data['active_publicjob_table'] = $this->table->generate($query);
// Active Jobs
$jbx = "";
$mysql = "SELECT '<b>Project ID:</b>'||mc.contract||'<br><b>Title:</b>'||mc.title AS Project,m.firstname||' '||m.lastname||'<br>'||m.email AS Client,"
. " '<b>Timeline:</b> '||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS terms ,mc.description||'<br><b>Delivery Date :</b>'||mc.delivery_date As Description,"
. " '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"Manage\">' AS manage,mc.status "
. "FROM members_jobs_contract mc LEFT JOIN members m ON m.id=mc.client_id LIMIT 10"; // WHERE mc.member_id = " . $_SESSION['member_id']." OR mc.client_id =". $_SESSION['member_id'];
$mysql = "SELECT '<b>'||mj.contract||'</b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status IN (1,2) AND mj.delivery_date > now() ORDER by mj.id DESC LIMIT 5 ";
$query = $this->db->query($mysql);
//$this->table->set_heading('Job', 'Client', 'Terms', 'Description', 'Manage', 'Status');
$this->table->set_heading(array('data' => 'Task', 'style' => 'width:180px'), 'Members');
$data['job_active_dash_table'] = $this->table->generate($query);
$mysql = "SELECT '<b>'||mj.contract||'</b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status IN (1,2) AND mj.delivery_date < now() ORDER by mj.id DESC LIMIT 5 ";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Task', 'style' => 'width:180px'), 'Members');
$data['job_pastdue_dash_table'] = $this->table->generate($query);
$mysql = "SELECT '<b>Added: </b>'||m.added::date ||'<br><b>Amount: </b>'||m.terminatingamount*0.01||'<br><b>Fee: </b>'|| m.fee*0.01 as trans, "
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name||'<br><b>Confirm: </b>'||mp.confirmation AS Recitient,"
. "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 mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
$query = $this->db->query($mysql);
$this->table->set_heading('Trans', 'Target', 'Status');
$data['sendmoney_dash_table'] = $this->table->generate($query);
$mysql = "SELECT created,'From: <b>'||email||'</b><br>'|| ( CASE WHEN status=1 THEn '<input type=submit id=\"dacc'||id||'\" onclick=\"return replyMessage('||id||')\" name=\"reply\" class=\"btn btn-info btn-xs\" value=\"Reply\">' ELSE '' END )||'<br>'||your_message AS your_message "
. " FROM contacts order by id desc lIMIT 6";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:110px'), 'Message');
$data['contact_dash_table'] = $this->table->generate($query);
$data['members_dash_online'] = 0;
// Jobs Messages
$sqlMsg = "SELECT created, (CASE WHEN msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/'||contract||'/'||message||'\">'||message||'</a>' "
. "ELSE '<b>'||created||'</b><br>'||message END) as msg FROM jobs_contract_message ORDER BY id DESC LIMIT 10"; // WHERE contract='".$data['contract_id']."'";
// Jobs Messages
$sqlMsg = "SELECT j.created, (CASE WHEN j.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/'||j.contract||'/'||j.message||'\">'||j.message||'</a>' "
. "ELSE '<b>['||m.firstname||'-'||m.username||']->'||j.created||'</b><br>'||j.message END) as msg FROM jobs_contract_message j LEFT JOIN members m ON m.id=j.member_id ORDER BY j.id DESC LIMIT 10"; // WHERE contract='".$data['contract_id']."'";
$query_message = $this->db->query($sqlMsg);
//$this->table->set_heading('');
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:110px'), 'Activity Message');
$data['message_dash_table'] = $this->table->generate($query_message);
$data['total_members'] = 0;
$data['total_balance'] = 0;
$data['total_active_jobs'] = 0;
$mysql = "SELECT count(id) AS total_members FROM members WHERE status =1";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_members'] = $row['total_members'];
$mysql = "SELECT sum(balance)AS total_balance FROM members WHERE status =1";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_balance'] = $row['total_balance'];
$mysql = "SELECT count(id) AS total_active_jobs FROM members_jobs_contract WHERE status IN (1,2)";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_active_jobs'] = $row['total_active_jobs'];
return $data;
}
}
@@ -1,27 +0,0 @@
<?php
class Mobile_Controller extends WRB_Controller {
public $data = array();
function __construct() {
parent::__construct();
//$this->renderMobileExtPage('mobile_index', $data);
$this->load->model('mobile_detect');
$phoneH = $this->mobile_detect->getMobileHeaders();
$imb = $this->mobile_detect->isMobile();
$mob_strict = false;
if ($mob_strict == true) {
if ($img == false) {
redirect('/');
} else {
}
}
}
}
@@ -1,189 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Bkomember_Controller extends Bko_Controller {
var $template = array(
'table_open' => "<table class='table table-striped table-hover table-bordered table-condensed'>",
'thead_open' => '<thead class=\'bg-indigo\'>',
'thead_close' => '</thead>',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'tbody_open' => '<tbody>',
'tbody_close' => '</tbody>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
public $data = array();
function __construct() {
parent::__construct();
if (!isset($_SESSION['bko_selected_id']) or $_SESSION['bko_selected_id'] == '' or $_SESSION['bko_selected_id'] <= 0 ) {
redirect('/bkouser/locate');
}
}
// protected
protected function bkoUserDashData($member_id) {
$this->load->model('backend_model');
$is_live = $this->backend_model->cfgReadChar("system.live");
$data = array();
$this->load->library('table');
$this->table->set_template($this->template);
$short_limit = 10;
// MY JOBS
$mysql = "SELECT created,title FROM members_jobs WHERE member_id = $member_id ORDER BY id DESC limit $short_limit";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:110px'), 'Title');
$data['member_job_table'] = $this->table->generate($query);
// MY CONTRACTS
$mysql = "SELECT created,title,status,client_id FROM members_jobs_contract WHERE member_id = $member_id ORDER BY id DESC LIMIT $short_limit";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Date', 'style' => 'width:110px'), 'Title', array('data' => 'ST', 'style' => 'width:40px'), 'client');
$data['member_contract_table'] = $this->table->generate($query);
// Jobs Messages
$sqlMsg = " SELECT j.created, (CASE WHEN j.msg_type='FILE' THEN '<a target=\"_blank\" href=\"/smedia/" . ($is_live ? "LIVE" : "TEST") . "/contract/'||j.contract||'/'||j.message||'\">'||j.message||'</a>' "
. " ELSE '<b>['||m.firstname||'-'||m.username||']->'||j.created||'</b><br>'||j.message END) as msg "
. " FROM jobs_contract_message j LEFT JOIN members m ON m.id=j.member_id "
. " WHERE j.member_id = $member_id ORDER BY j.id DESC LIMIT $short_limit";
$query_message = $this->db->query($sqlMsg);
//$this->table->set_heading('');
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:110px'), 'Activity Message');
$data['message_dash_table'] = $this->table->generate($query_message);
// Active Jobs
$mysql = "SELECT '<b>'||mj.contract||'</b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status IN (1,2) AND mj.delivery_date > now() AND mj.member_id = $member_id ORDER by mj.id DESC LIMIT $short_limit ";
$query = $this->db->query($mysql);
$this->table->set_heading('Task', array('data' => 'Members', 'style' => 'width:150px'));
$data['job_active_dash_table'] = $this->table->generate($query);
// PAST DUE JOBS
$mysql = "SELECT '<b>'||mj.contract||'</b><br>'||mo.title AS thejob,'<b>Owner: </b>'||m1.firstname||' '||m1.lastname||' <br>'|| m1.email||'<br><b>Client: </b>'||m2.firstname||' '||m2.lastname||' <br>'|| m2.email AS Team1 "
. "FROM members_jobs_contract mj "
. "LEFT JOIN members_jobs mo ON mo.id=mj.job_id "
. "LEFT JOIN members m1 ON m1.id=mj.member_id "
. "LEFT JOIN members m2 ON m2.id=mj.client_id "
. "WHERE mj.status IN (1,2) AND mj.delivery_date < now() AND mj.member_id = $member_id ORDER by mj.id DESC LIMIT $short_limit ";
$query = $this->db->query($mysql);
$this->table->set_heading('Task', array('data' => 'Members', 'style' => 'width:150px'));
$data['job_pastdue_dash_table'] = $this->table->generate($query);
$jbx = "";
$mysql = "SELECT '<b>ADDED:</b>'||added::date||'<br><b>EXPIRE:</b>'||expire::date As Dates,username||'<br><b>Name:</b>'||firstname||' '||lastname AS signup,"
. " (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', 'style' => 'width:180px'), 'Email/Name', array('data' => 'RES', 'style' => 'width:40px; cellpadding:0px;'), array('data' => 'Del', 'style' => 'width:40px; cellpadding:0px;'));
$data['pending_dash_table'] = $this->table->generate($query);
$this->table->set_template($this->template);
$mysql = "SElECT added::date||'<br>'||loc AS dates,email||'<br>'||firstname||' '||lastname AS Name FROM members ORDER BY id DESC LIMIT 7";
$query = $this->db->query($mysql);
// $this->table->set_heading('Account', 'Created', 'Action');
$this->table->set_heading(array('data' => 'Date/LOC', 'style' => 'width:140px'), 'Email/Name');
$data['signup_dash_table'] = $this->table->generate($query);
$mysql = "SELECT '<b>Added: </b>'||m.added::date ||'<br><b>Amount: </b>'||m.terminatingamount*0.01||'<br><b>Fee: </b>'|| m.fee*0.01 as trans, "
. "r.firstname||' '||r.lastname||'<br><b>Acc:</b>'||r.account_no||'-'||b.name||'<br><b>Confirm: </b>'||mp.confirmation AS Recitient,"
. "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 mp.confirmation IS NOT NULL ORDER BY m.id DESC LIMIT 4";
$query = $this->db->query($mysql);
$this->table->set_heading('Trans', 'Target', 'Status');
$data['sendmoney_dash_table'] = $this->table->generate($query);
$mysql = "SELECT created,'From: <b>'||email||'</b><br>'|| ( CASE WHEN status=1 THEn '<input type=submit id=\"dacc'||id||'\" onclick=\"return replyMessage('||id||')\" name=\"reply\" class=\"btn btn-info btn-xs\" value=\"Reply\">' ELSE '' END )||'<br>'||your_message AS your_message "
. " FROM contacts order by id desc lIMIT 6";
$query = $this->db->query($mysql);
$this->table->set_heading(array('data' => 'Added', 'style' => 'width:110px'), 'Message');
$data['contact_dash_table'] = $this->table->generate($query);
$data['members_dash_online'] = 0;
$data['total_members'] = 0;
$data['total_balance'] = 0;
$data['total_active_jobs'] = 0;
$mysql = "SELECT count(id) AS total_members FROM members WHERE status =1";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_members'] = $row['total_members'];
$mysql = "SELECT sum(balance)AS total_balance FROM members WHERE status =1";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_balance'] = $row['total_balance'];
$mysql = "SELECT count(id) AS total_active_jobs FROM members_jobs_contract WHERE status IN (1,2)";
$query = $this->db->query($mysql);
$row = $query->row_array();
$data['total_active_jobs'] = $row['total_active_jobs'];
return $data;
}
}
-407
View File
@@ -1,407 +0,0 @@
<?php defined('BASEPATH') OR exit('No direct script access allowed');
require_once 'vendor/facebook/php-sdk-v4/src/Facebook/autoload.php';
/**
* Facebook PHP SDK for CodeIgniter 3
*
* Library wrapper for Facebook PHP SDK. Check user login status, publish to feed
* and more with easy to use CodeIgniter syntax.
*
* This library requires the Facebook PHP SDK to be installed with Composer, and that CodeIgniter
* config is set to autoload the vendor folder. More information in the CodeIgniter user guide at
* http://www.codeigniter.com/userguide3/general/autoloader.html?highlight=composer
*
* It also requires CodeIgniter session library to be correctly configured.
*
* @package CodeIgniter
* @category Libraries
* @author Mattias Hedman
* @license MIT
* @link https://github.com/darkwhispering/facebook-sdk-codeigniter
* @version 3.0.0
*/
use Facebook\Facebook as FB;
use Facebook\Authentication\AccessToken;
use Facebook\Exceptions\FacebookResponseException;
use Facebook\Exceptions\FacebookSDKException;
use Facebook\FacebookBatchResponse;
use Facebook\Helpers\FacebookCanvasHelper;
use Facebook\Helpers\FacebookJavaScriptHelper;
use Facebook\Helpers\FacebookPageTabHelper;
use Facebook\Helpers\FacebookRedirectLoginHelper;
Class Facebook
{
const UPLOAD_TYPE_VIDEO = 'video';
const UPLOAD_TYPE_IMAGE = 'image';
/**
* @var FB
*/
private $fb;
/**
* @var FacebookRedirectLoginHelper|FacebookCanvasHelper|FacebookJavaScriptHelper|FacebookPageTabHelper
*/
private $helper;
/**
* @var array
*/
private $batch_request_pool = [];
/**
* Facebook constructor.
*/
public function __construct()
{
// Load config
$this->load->config('facebook');
// Load required libraries and helpers
$this->load->library('session');
$this->load->helper('url');
if (!isset($this->fb))
{
$this->fb = new FB([
'app_id' => $this->config->item('facebook_app_id'),
'app_secret' => $this->config->item('facebook_app_secret'),
'default_graph_version' => $this->config->item('facebook_graph_version')
]);
}
// Load correct helper depending on login type
// set in the config file
switch ($this->config->item('facebook_login_type'))
{
case 'js':
$this->helper = $this->fb->getJavaScriptHelper();
break;
case 'canvas':
$this->helper = $this->fb->getCanvasHelper();
break;
case 'page_tab':
$this->helper = $this->fb->getPageTabHelper();
break;
case 'web':
$this->helper = $this->fb->getRedirectLoginHelper();
break;
}
if ($this->config->item('facebook_auth_on_load') === TRUE)
{
// Try and authenticate the user right away (aka, get valid access token)
$this->authenticate();
}
}
/**
* @return FB
*/
public function object()
{
return $this->fb;
}
/**
* Check if user are logged in by checking if we have a Facebook
* session active.
*
* @return mixed|boolean
*/
public function is_authenticated()
{
$access_token = $this->authenticate();
if (isset($access_token))
{
return $access_token;
}
return false;
}
/**
* Do Graph request
*
* @param $method
* @param $endpoint
* @param array $params
* @param null $access_token
*
* @return array
*/
public function request($method, $endpoint, $params = [], $access_token = null)
{
try
{
$response = $this->fb->{strtolower($method)}($endpoint, $params, $access_token);
return $response->getDecodedBody();
}
catch(FacebookResponseException $e)
{
return $this->logError($e->getCode(), $e->getMessage());
}
catch (FacebookSDKException $e)
{
return $this->logError($e->getCode(), $e->getMessage());
}
}
/**
* Upload image or video to user profile
*
* @param $path_to_file
* @param array $params
* @param string $type
* @param null $access_token
*
* @return array
*/
public function user_upload_request($path_to_file, $params = [], $type = self::UPLOAD_TYPE_IMAGE, $access_token = null)
{
if ($type === self::UPLOAD_TYPE_IMAGE)
{
$data = ['source' => $this->fb->fileToUpload($path_to_file)] + $params;
$endpoint = '/me/photos';
}
elseif ($type === self::UPLOAD_TYPE_VIDEO)
{
$data = ['source' => $this->fb->videoToUpload($path_to_file)] + $params;
$endpoint = '/me/videos';
}
else
{
return $this->logError(400, 'Invalid upload type');
}
try
{
$response = $this->fb->post($endpoint, $data, $access_token);
return $response->getDecodedBody();
}
catch(FacebookSDKException $e)
{
return $this->logError($e->getCode(), $e->getMessage());
}
}
/**
* Add request to batch
*
* @param $key
* @param $method
* @param $endpoint
* @param array $params
* @param null $access_token
*/
public function add_to_batch_pool($key, $method, $endpoint, $params = [], $access_token = null)
{
$this->batch_request_pool = array_merge(
$this->batch_request_pool,
[$key => $this->fb->request($method, $endpoint, $params, $access_token)]
);
}
/**
* Remove request from batch
*
* @param $key
*/
public function remove_from_batch_pool($key)
{
if (isset($this->batch_request_pool[$key]))
{
unset($this->batch_request_pool[$key]);
}
}
/**
* Send all request in the batch pool
*
* @return array|FacebookBatchResponse
*/
public function send_batch_pool()
{
try
{
$responses = $this->fb->sendBatchRequest($this->batch_request_pool);
$this->batch_request_pool = [];
$data = [];
foreach ($responses as $key => $response)
{
$data[$key] = $response->getDecodedBody();
}
return $data;
}
catch(FacebookResponseException $e)
{
return $this->logError($e->getCode(), $e->getMessage());
}
catch(FacebookSDKException $e)
{
return $this->logError($e->getCode(), $e->getMessage());
}
}
/**
* Generate Facebook login url for Facebook Redirect Login (web)
*
* @return string
*/
public function login_url()
{
// Login type must be web, else return empty string
if ($this->config->item('facebook_login_type') != 'web')
{
return '';
}
return $this->helper->getLoginUrl(
base_url() . $this->config->item('facebook_login_redirect_url'),
$this->config->item('facebook_permissions')
);
}
/**
* Generate Facebook login url for Facebook Redirect Login (web)
*
* @return string
* @throws FacebookSDKException
*/
public function logout_url()
{
// Login type must be web, else return empty string
if ($this->config->item('facebook_login_type') != 'web')
{
return '';
}
// Create logout url
return $this->helper->getLogoutUrl(
$this->get_access_token(),
base_url() . $this->config->item('facebook_logout_redirect_url')
);
}
/**
* Destroy our local Facebook session
*/
public function destroy_session()
{
$this->session->unset_userdata('fb_access_token');
}
/**
* Get a new access token from Facebook
*
* @return array|AccessToken|null|object|void
*/
private function authenticate()
{
$access_token = $this->get_access_token();
if ($access_token && $this->get_expire_time() > (time() + 30) || $access_token && !$this->get_expire_time())
{
$this->fb->setDefaultAccessToken($access_token);
return $access_token;
}
// If we did not have a stored access token or if it has expired, try get a new access token
if (!$access_token)
{
try
{
$access_token = $this->helper->getAccessToken();
}
catch (FacebookSDKException $e)
{
$this->logError($e->getCode(), $e->getMessage());
return null;
}
// If we got a session we need to exchange it for a long lived session.
if (isset($access_token))
{
$access_token = $this->long_lived_token($access_token);
$this->set_expire_time($access_token->getExpiresAt());
$this->set_access_token($access_token);
$this->fb->setDefaultAccessToken($access_token);
return $access_token;
}
}
// Collect errors if any when using web redirect based login
if ($this->config->item('facebook_login_type') === 'web')
{
if ($this->helper->getError())
{
// Collect error data
$error = array(
'error' => $this->helper->getError(),
'error_code' => $this->helper->getErrorCode(),
'error_reason' => $this->helper->getErrorReason(),
'error_description' => $this->helper->getErrorDescription()
);
return $error;
}
}
return $access_token;
}
/**
* Exchange short lived token for a long lived token
*
* @param AccessToken $access_token
*
* @return AccessToken|null
*/
private function long_lived_token(AccessToken $access_token)
{
if (!$access_token->isLongLived())
{
$oauth2_client = $this->fb->getOAuth2Client();
try
{
return $oauth2_client->getLongLivedAccessToken($access_token);
}
catch (FacebookSDKException $e)
{
$this->logError($e->getCode(), $e->getMessage());
return null;
}
}
return $access_token;
}
/**
* Get stored access token
*
* @return mixed
*/
private function get_access_token()
{
return $this->session->userdata('fb_access_token');
}
/**
* Store access token
*
* @param AccessToken $access_token
*/
private function set_access_token(AccessToken $access_token)
{
$this->session->set_userdata('fb_access_token', $access_token->getValue());
}
/**
* @return mixed
*/
private function get_expire_time()
{
return $this->session->userdata('fb_expire');
}
/**
* @param DateTime $time
*/
private function set_expire_time(DateTime $time = null)
{
if ($time) {
$this->session->set_userdata('fb_expire', $time->getTimestamp());
}
}
/**
* @param $code
* @param $message
*
* @return array
*/
private function logError($code, $message)
{
log_message('error', '[FACEBOOK PHP SDK] code: ' . $code.' | message: '.$message);
return ['error' => $code, 'message' => $message];
}
/**
* Enables the use of CI super-global without having to define an extra variable.
* I can't remember where I first saw this, so thank you if you are the original author.
*
* Borrowed from the Ion Auth library (http://benedmunds.com/ion_auth/)
*
* @param $var
*
* @return mixed
*/
public function __get($var)
{
return get_instance()->$var;
}
}
-348
View File
@@ -1,348 +0,0 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
require_once 'vendor/autoload.php';
# Imports the Google Cloud client library
use Google\Cloud\Storage\StorageClient;
class GoogleStorage {
private $storage;
private $projectId;
private $authFile;
public $prefix = 'adminsavvy';
public function __construct() {
}
public function Init($projectId, $authFile) {
// Your Google Cloud Platform project ID
$this->projectId = $projectId; // 'float-app-224118';
// The file path to credentials JSON
$this->authFile = $authFile; // './float-app-224118-52ef1783d2c5.json';
// Instantiates a client
$this->storage = new StorageClient([
'projectId' => $projectId,
'keyFile' => json_decode(file_get_contents($authFile), true)
]);
}
/*
* @type array $keyFile The contents of the service account credentials
* .json file retrieved from the Google Developer's Console.
* Ex: `json_decode(file_get_contents($path), true)`.
* @type string $keyFilePath The full path to your service account
* credentials .json file retrieved from the Google Developers
* Console.
*/
/**
* Create a Cloud Storage Bucket.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName name of the bucket to create.
* @param string $options options for the new bucket.
*
* @return Google\Cloud\Storage\Bucket the newly created bucket.
*/
public function CreateBucket($bucketName) {
// Creates the new bucket
$bucket = $this->storage->createBucket($bucketName);
//echo 'Bucket ' . $bucket->name() . ' created.';
return $bucket;
}
/**
* Delete a Cloud Storage Bucket.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of the bucket to delete.
*
* @return void
*/
function DeleteBucket($bucketName)
{
$this->storage = new StorageClient();
$bucket = $this->storage->bucket($bucketName);
$bucket->delete();
printf('Bucket deleted: %s' . PHP_EOL, $bucket->name());
}
/**
* Upload a file.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Google Cloud bucket.
* @param string $objectName the name of the object.
* @param string $source the path to the file to upload.
*
* @return Psr\Http\Message\StreamInterface
*/
function UploadObject($bucketName, $objectName, $source)
{
$file = fopen($source, 'r');
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->upload($file, [
'name' => $objectName
]);
printf('Uploaded %s to gs://%s/%s' . PHP_EOL, basename($source), $bucketName, $objectName);
return $object;
}
/**
* Download an object from Cloud Storage and return it as a BLOB.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Google Cloud bucket.
* @param string $objectName the name of your Google Cloud object.
*
* @return BLOB
*/
function DownloadObject($bucketName, $objectName)
{
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->object($objectName);
$stream = $object->downloadAsStream();
return $stream->getContents();
}
/**
* Delete an object.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Cloud Storage bucket.
* @param string $objectName the name of your Cloud Storage object.
* @param array $options
*
* @return void
*/
function DeleteObject($bucketName, $objectName, $options = [])
{
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->object($objectName);
$object->delete();
printf('Deleted gs://%s/%s' . PHP_EOL, $bucketName, $objectName);
}
/**
* Make an object publically accessible.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Cloud Storage bucket.
* @param string $objectName the name of your Cloud Storage object.
*
* @return void
*/
function MakePublic($bucketName, $objectName)
{
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->object($objectName);
$object->update(['acl' => []], ['predefinedAcl' => 'PUBLICREAD']);
printf('gs://%s/%s is now public' . PHP_EOL, $bucketName, $objectName);
}
/**
* List object metadata.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Cloud Storage bucket.
* @param string $objectName the name of your Cloud Storage object.
*
* @return void
*/
function ObjectMetadata($bucketName, $objectName)
{
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->object($objectName);
$info = $object->info();
printf('Blob: %s' . PHP_EOL, $info['name']);
printf('Bucket: %s' . PHP_EOL, $info['bucket']);
printf('Storage class: %s' . PHP_EOL, $info['storageClass']);
printf('ID: %s' . PHP_EOL, $info['id']);
printf('Size: %s' . PHP_EOL, $info['size']);
printf('Updated: %s' . PHP_EOL, $info['updated']);
printf('Generation: %s' . PHP_EOL, $info['generation']);
printf('Metageneration: %s' . PHP_EOL, $info['metageneration']);
printf('Etag: %s' . PHP_EOL, $info['etag']);
printf('Crc32c: %s' . PHP_EOL, $info['crc32c']);
printf('MD5 Hash: %s' . PHP_EOL, $info['md5Hash']);
printf('Content-type: %s' . PHP_EOL, $info['contentType']);
printf("Temporary hold: " . (isset($info['temporaryHold']) ? "enabled" : "disabled") . PHP_EOL);
printf("Event-based hold: " . (isset($info['eventBasedHold']) ? "enabled" : "disabled") . PHP_EOL);
if (isset($info['retentionExpirationTime'])) {
printf("retentionExpirationTime: " . $info['retentionExpirationTime'] . PHP_EOL);
}
if (isset($info['metadata'])) {
printf('Metadata: %s', print_r($info['metadata'], true));
}
}
/**
* List all Cloud Storage buckets for the current project.
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @return void
*/
function ListBuckets()
{
$buckets = array();
foreach ($this->storage->buckets() as $bucket) {
//printf('Bucket: %s' . PHP_EOL, $bucket->name());
$buckets[$bucket->name()] = $bucket;
}
return $buckets;
}
/**
* List Cloud Storage bucket objects.
* https://cloud.google.com/storage/docs/listing-objects
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Cloud Storage bucket.
*
* @return void
*/
function ListObjects($bucketName)
{
$objects = array();
$bucket = $this->storage->bucket($bucketName);
foreach ($bucket->objects() as $object) {
//printf('Object: %s' . PHP_EOL, $object->name());
$objects[$object->name()] = $object;
}
return $objects;
}
/**
* List Cloud Storage bucket objects.
* https://cloud.google.com/storage/docs/listing-objects
*
* @param Google\Cloud\Storage\StorageClient $storage Google storage service client
* @param string $bucketName the name of your Cloud Storage bucket.
* @param string $objectName the name of your Cloud Storage object.
* @param string $responseType Response content-type for the object URL
* @param integer $duration Number of seconds before the signature expires
* @param string $method Optional HTTP verb for URL
*
* @return string Signed google storage URL
*/
function SignedUrl($bucketName, $objectName, $responseType, $duration = 60, $method = 'GET')
{
$bucket = $this->storage->bucket($bucketName);
$object = $bucket->object($objectName);
$url = $object->signedUrl(
new \DateTime('+ ' . $duration . ' seconds'),
array(
'method' => $method,
'responseType' => $responseType,
'allowPost' => $method=='POST'
));
return $url;
}
/*
'method' => 'GET',
'cname' => self::DEFAULT_DOWNLOAD_URL,
'contentMd5' => null,
'contentType' => null,
'headers' => [],
'saveAsName' => null,
'responseDisposition' => null,
'responseType' => null,
'keyFile' => null,
'keyFilePath' => null,
'allowPost' => false,
'forceOpenssl' => false
*/
private function BaseEncode($num, $alphabet) {
$base_count = strlen($alphabet);
$encoded = '';
while ($num >= $base_count) {
$div = $num/$base_count;
$mod = ($num-($base_count*intval($div)));
$encoded = $alphabet[$mod] . $encoded;
$num = intval($div);
}
if ($num) $encoded = $alphabet[$num] . $encoded;
return $encoded;
}
private function BaseDecode($num, $alphabet) {
$decoded = 0;
$multi = 1;
while (strlen($num) > 0) {
$digit = $num[strlen($num)-1];
$decoded += $multi * strpos($alphabet, $digit);
$multi = $multi * strlen($alphabet);
$num = substr($num, 0, -1);
}
return $decoded;
}
public function UniqueId() {
// 123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ
$alphabet = "pRFsNvKifkJtA5Umy9QSD8PTYcZH23dCeWg6aqVXwnr7jxuGMLhE4zBob1";
return $this->BaseEncode(
filter_var(microtime(),FILTER_SANITIZE_NUMBER_INT),
$alphabet);
}
}
//*
// run with GOOGLE_STORAGE_TEST=1 php -f GoogleStorage.php
if (isset($_SERVER['GOOGLE_STORAGE_TEST']) && $_SERVER['GOOGLE_STORAGE_TEST']==1) {
// Create bucket 'adminsavvy-card-images' and list buckets
//TestGoogleStorage(1,1,0,0,0,0,0,0);
// Upload 'singapore.jpg' file to 'adminsavvy-card-images' bucket and make the object public
//TestGoogleStorage(0,0,1,1,0,0,0,0);
// Download 'singapore.jpg' object from 'adminsavvy-card-images' bucket
//TestGoogleStorage(0,0,0,0,0,0,1,0);
// List buckets, List objects in 'adminsavvy-card-images' bucket, get 'singapore.jpg' object metadata, get signed URL
TestGoogleStorage(0,1,0,0,1,1,0,1);
}
//*/
/*
* Run the test suite for above defined function
*
* @param integer $testCreateBucket 1 to run the create bucket test
* @param integer $testListBuckets 1 to run the list buckets test
* @param integer $testUploadObject 1 to run the upload object test
* @param integer $testMakePublic 1 to run the make public test
* @param integer $testListObjects 1 to run the list objects test
* @param integer $testObjectMetadata 1 to run the object metadata test
* @param integer $testDownloadObject 1 to run the download object test
* @param integer $testSignedUrl 1 to run the signed URL test
*
* @return void
*/
function TestGoogleStorage(
$testCreateBucket,
$testListBuckets,
$testUploadObject,
$testMakePublic,
$testListObjects,
$testObjectMetadata,
$testDownloadObject,
$testSignedUrl) {
// Your Google Cloud Platform project ID
$projectId = 'float-app-224118';
// The name for the new bucket
$bucketName = 'adminsavvy-card-images';
// The file path to upload
$filePath = '/home/savvy/savvy/savvyoauth2/public/test/singapore.jpg';
// The file path to credentials JSON
$authFile = '/home/savvy/savvy/savvyoauth2/public/include/float-app-224118-52ef1783d2c5.json';
// Instantiates a client
$storage = new GoogleStorage($projectId, $authFile);
if ($testCreateBucket) var_dump($storage->CreateBucket($bucketName));
if ($testListBuckets) $storage->ListBuckets();
if ($testUploadObject) var_dump($storage->UploadObject($bucketName, basename($filePath), $filePath));
if ($testMakePublic) $storage->MakePublic($bucketName, basename($filePath));
if ($testListObjects) $storage->ListObjects($bucketName);
if ($testObjectMetadata) $storage->ObjectMetadata($bucketName, basename($filePath));
if ($testDownloadObject) file_put_contents('test.jpg',$storage->DownloadObject($bucketName, basename($filePath)));
if ($testSignedUrl) var_dump($storage->SignedUrl($bucketName, basename($filePath), mime_content_type($filePath), 864000));
}
-217
View File
@@ -1,217 +0,0 @@
<?php if (! defined('BASEPATH')) exit('No direct script access allowed');
/**
* Name: Facebook Login Library
*
* Author: appleboy
*
*/
require 'vendor/autoload.php';
//require_once 'vendor/facebook/php-sdk-v4/src/Facebook/autoload.php';
use Facebook\Facebook;
use Facebook\FacebookRequestException;
use Facebook\FacebookRedirectLoginHelper;
class Lib_login
{
/**
* CodeIgniter global
*
* @var string
**/
protected $ci;
/**
* @var FB
*/
private $fb;
private $helper;
private $facebook_default_scope;
private $facebook_login_url;
private $facebook_logout_url;
/**
* __construct
*
* @return void
* @author Ben
**/
public function __construct()
{
if (!session_id()) {
session_start();
}
$this->ci =& get_instance();
$this->ci->load->library('session');
$this->ci->config->load('facebook');
$this->ci->load->helper('url');
if (! isset($_SESSION)) {
session_start();
}
$this->facebook_default_scope = explode(',', $this->ci->config->item("facebook_default_scope"));
$facebook_app_id = $this->ci->config->item("facebook_app_id");
$facebook_app_secret = $this->ci->config->item("facebook_app_secret");
$this->facebook_login_url = base_url() . $this->ci->config->item("facebook_login_redirect_url").'/';
$this->facebook_logout_url = base_url() . $this->ci->config->item("facebook_logout_redirect_url").'/';
// init app with app id and secret
$this->fb = new Facebook([
'app_id' => $facebook_app_id, // Replace {app-id} with your app id
'app_secret' => $facebook_app_secret,
'default_graph_version' => 'v2.2',
]);
$this->helper = $this->fb->getRedirectLoginHelper();
}
/**
* @return FB
*/
public function object()
{
return $this->fb;
}
/**
* Check if user are logged in by checking if we have a Facebook
* session active.
*
* @return mixed|boolean
*/
public function is_authenticated()
{
$access_token = $this->authenticate();
if (isset($access_token))
{
return $access_token;
}
return false;
}
/**
* Destroy our local Facebook session
*/
public function destroy_session()
{
$this->session->unset_userdata('fb_access_token');
}
public function getLoginUrl() {
return $this->helper->getLoginUrl($this->facebook_login_url, $this->facebook_default_scope);
}
public function getLogoutUrl() {
return $this->helper->getLogoutUrl($this->get_access_token(), $this->facebook_logout_url);
}
public function get_access_token() {
return $this->session->userdata('fb_access_token');
}
/**
* @return mixed
*/
private function get_expire_time()
{
return $this->session->userdata('fb_expire');
}
/**
* @param DateTime $time
*/
private function set_expire_time(DateTime $time = null)
{
if ($time) {
$this->session->set_userdata('fb_expire', $time->getTimestamp());
}
}
public function authenticate()
{
$accessToken = $this->get_access_token();
if ($accessToken && $this->get_expire_time() > (time() + 30) || $accessToken && !$this->get_expire_time())
{
$this->fb->setDefaultAccessToken($accessToken);
return $accessToken;
}
// If we did not have a stored access token or if it has expired, try get a new access token
try {
$accessToken = $this->helper->getAccessToken($this->facebook_login_url);
} catch(Facebook\Exceptions\FacebookResponseException $e) {
// When Graph returns an error
return $this->constructResult(NULL, 'Graph returned an error: ' . $e->getMessage());
} catch(Facebook\Exceptions\FacebookSDKException $e) {
// When validation fails or other local issues
return $this->constructResult(NULL, 'Facebook SDK returned an error: ' . $e->getMessage());
}
if (! isset($accessToken)) {
if ($this->helper->getError()) {
/*header('HTTP/1.0 401 Unauthorized');
echo "Error: " . $helper->getError() . "\n";
echo "Error Code: " . $helper->getErrorCode() . "\n";
echo "Error Reason: " . $helper->getErrorReason() . "\n";
echo "Error Description: " . $helper->getErrorDescription() . "\n";
*/
return $this->constructResult(NULL, 'Unauthorized: '.$this->helper->getErrorDescription());
} else {
return $this->constructResult(NULL, 'Bad request');
}
}
// The OAuth 2.0 client handler helps us manage access tokens
$oAuth2Client = $this->fb->getOAuth2Client();
// Get the access token metadata from /debug_token
///$tokenMetadata = $oAuth2Client->debugToken($accessToken);
if (! $accessToken->isLongLived()) {
// Exchanges a short-lived access token for a long-lived one
try {
$accessToken = $oAuth2Client->getLongLivedAccessToken($accessToken);
$this->set_expire_time($accessToken->getExpiresAt());
$this->set_access_token($accessToken);
$this->fb->setDefaultAccessToken($accessToken);
} catch (Facebook\Exceptions\FacebookSDKException $e) {
return $this->constructResult(NULL, "<p>Error getting long-lived access token: " . $this->helper->getMessage() . "</p>\n\n");
}
//var_dump($accessToken->getValue());
}
$_SESSION['fb_access_token'] = (string) $accessToken;
return $accessToken;
}
public function getData($accessToken) {
$user = NULL;
try {
// Returns a `Facebook\FacebookResponse` object
if ($accessToken!="") {
$response = $this->fb->get('/me?fields=id,name,email', $accessToken);
$user = $response->getGraphUser();
}
} catch(Facebook\Exceptions\FacebookResponseException $e) {
return $this->constructResult(NULL,'Graph returned an error: ' . $e->getMessage());
} catch(Facebook\Exceptions\FacebookSDKException $e) {
return $this->constructResult(NULL,'Facebook SDK returned an error: ' . $e->getMessage());
}
return $this->constructResult($user, NULL);
}
private function constructResult($me,$error) {
$fb_data = array(
'me' => $me,
'error' => $error
);
$this->ci->session->set_userdata('fb_data', $fb_data);
return $fb_data;
}
/**
* Enables the use of CI super-global without having to define an extra variable.
* I can't remember where I first saw this, so thank you if you are the original author.
*
* Borrowed from the Ion Auth library (http://benedmunds.com/ion_auth/)
*
* @param $var
*
* @return mixed
*/
public function __get($var)
{
return get_instance()->$var;
}
}
@@ -1,27 +0,0 @@
<?php
class Mobile_Controller extends WRB_Controller {
public $data = array();
function __construct() {
parent::__construct();
//$this->renderMobileExtPage('mobile_index', $data);
$this->load->model('mobile_model');
// $phoneH = $this->mobile_model->getMobileHeaders();
$imb = $this->mobile_model->isMobile();
//echo "hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh=". $imb;
$mob_strict = true;
if ($mob_strict == true) {
if ($imb !=1) {
// redirect('/');
} else {
}
}
}
}
@@ -1,181 +0,0 @@
<?php
class Users_Controller extends WRB_Controller {
public $data = array();
function __construct() {
parent::__construct();
// you dont have bussines here if you are not in session
if (!isset($_SESSION['session_id']) or ! isset($_SESSION['username']) or $_SESSION['username'] == '') {
redirect(home);
}
$out = array();
$in = array();
$this->load->model('backend_model');
$in["action"] = WRENCHBOARD_SESSION_VERIFY;
$in['sessionid'] = $_SESSION['session_id'];
$in['member_id'] = $_SESSION['member_id'];
$res = $this->backend_model->wrenchboard_api($in, $out);
if ($res != PHP_API_OK) {
redirect(home);
}
$this->data = $this->getSessionArray();
}
public function jobHistory($listLimit = 0){
if ($listLimit == 0 ){
$listLimit = 50;
}
$jbx = "''/proj/compltjob''";
$mysql = "SELECT '<b>Date:</b>'||mc.created::date||'<br><b>Timeline:</b> '||mc.timeline_days||' day(s)<br><b>Price:</b>'||mc.price*0.01 AS Project,"
. " "
. " '<b>Project:</b>'||mc.contract||' by <a href=\"#\"><span class=\"label label-info\">'||m.firstname||'</span></a><br><b>Title:</b>'||mc.title||'<br><b>Description:</b>'||mc.description,"
. " '<input type=submit onclick=\"return post_nav_find_action($jbx, '||mc.id||')\" name=\"manage\" class=\"btn btn-info btn-xs\" value=\"View\">' AS manage , mc.id AS offer_id "
. " FROM members_jobs_contract mc LEFT JOIN members m ON m.id=mc.client_id WHERE mc.status=5 AND mc.member_id = " . $_SESSION['member_id'] . " ORDER BY mc.created DESC LIMIT " . $listLimit ;
$mysql = "SELECT '<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,'\/proj\/compltjob' 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.client_id = " . $_SESSION['member_id'] . " AND mc.status IN (5) AND mc.delivery_date > now() LIMIT 4";
$query = $this->db->query($mysql);
return $query->result();
}
public function activeProjects(){
$jbx = "''/proj/thisjob''";
$mysql = "SELECT '<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,'\/proj\/thisjob' AS qpath, mc.id AS offer_id,mc.delivery_date::date,"
. " (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;
}
public function getSessionArray() {
$data["current_date"] = date('l jS \of F Y h:i:s A');
$data['username'] = $_SESSION['username']; // = $this->input->post('username');
$data['name'] = $_SESSION['name']; // = $this->input->post('username');
$data['firstname'] = $_SESSION['firstname']; // = $ret->firstname;
$data['lastname'] = $_SESSION['lastname']; // = $ret->lastname;
$data['email'] = $_SESSION['email']; // = $ret->email;
$data['member_id'] = $_SESSION['member_id'];
$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['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'];
$_SESSION["offers_interest_count"] = $out["offers_interest_count"];
$_SESSION['new_message'] = $out["new_message"];
$this->refreshAccountDetail($_SESSION['member_id']);
return $data;
}
private 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');
$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'];
$_SESSION['country'] = $qr[0]['country'];
$_SESSION['post_jobs'] = $qr[0]['post_jobs'];
$_SESSION['refer'] = $qr[0]['refer'];
$in = array();
$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);
if ($res != PHP_API_OK) {
redirect(home);
}
}
protected function renderSecurePage($page_path_name, $data) {
$this->load->model('backend_model');
$data["OneSignalAppId"] = $this->backend_model->cfgReadChar("onesignal.app_id");
$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);
*/
}
}
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-11
View File
@@ -1,11 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
-119
View File
@@ -1,119 +0,0 @@
<?php
class Account_model extends CI_Model {
function __construct() {
}
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 getUserEscrowWallet($member_id) {
$mysql = "SELECT sum(amount),currency FROM members_payments WHERE code ='OFDPS' AND member_id = $member_id AND confirmation IS NOT NULL AND flags = 4 GROUP BY currency";
$query = $this->db->query($mysql);
return $query->result_array();
}
public function verify_link($data) {
$q = $this
->db
->where('verify_link', $data['vlink'])
->limit(1)
->get('members_pending');
// print_r($q->row());
//echo "--AAA--" . $q->num_rows();
if ($q->num_rows() > 0) {
// echo '<pre>';
// print_r($q->row());
// echo '</pre>';
return $q->row();
} else {
//echo '<pre>';
// echo "No rows " . $this->db->last_query();
//print_r($data);
//echo '</pre>';
return false;
}
}
public function verifySignupInputs($data) {
$ret = false;
if (trim($data['firstname']) != '' && trim($data['lastname']) != '' && trim($data['email']) != '' && trim($data['username']) != '' && trim($data['password']) != '' && trim($data['country']) != '' && isset($data['terms']) && $data['terms'] == 'on') {
$ret = true;
}
return $ret;
}
public function checkUsernameDuplicate($data) {
$q = $this
->db
->where('username', $data['username'])
->limit(1)
->get('members');
$q2 = $this
->db
->where('username', $data['username'])
->limit(10)
->get('members_pending');
return $q->num_rows() + $q2->num_rows();
}
public function username_data($data) {
$q = $this
->db
->where('username', $data['username'])
->limit(1)
->get('members');
if ($q->num_rows() > 0) {
return $q->row();
} else {
return false;
}
}
public function loadAccountData($member_id) {
$q = $this
->db
->where('id', $member_id)
->limit(1)
->get('members');
if ($q->num_rows() > 0) {
// return $q->row();
return $q->result_array();
} else {
return false;
}
}
public function loadActiveTaskCount($member_id) {
$num = 0;
$mysql = "SELECT id FROM members_jobs_contract WHERE client_id = $member_id AND status IN (1,2) "
. "UNION "
. "SELECT id FROM members_jobs_contract WHERE member_id = $member_id AND status IN (1,2) ";
$query = $this->db->query($mysql);
$num = $query->num_rows();
return $num;
}
}
-54
View File
@@ -1,54 +0,0 @@
<?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;
}
}
-107
View File
@@ -1,107 +0,0 @@
<?php
class Backend_model extends CI_Model {
var $thisUser = 'oameye';
var $USER = '';
var $wrenchboard;
const DEBUG_API_CALLS = true;
function __construct() {
$this->USER = $_SERVER['SCRIPT_FILENAME'];
$this->USER = str_replace('/home', '', $this->USER);
$this->USER = strtok($this->USER, '/');
if ($this->USER == 'opt') {
$this->USER = 'root';
}
$this->thisUser = $this->USER;
}
public function wrenchboard_api($in, $out = array()) {
$this->wrenchboard_load();
if (!is_array($in)) {
$in = array();
}
if (!is_array($out)) {
$out = array();
}
if (self::DEBUG_API_CALLS) {
$stack = debug_backtrace();
$log = json_encode($stack);
error_log($log);
error_log(json_encode($in));
}
$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 logMessage($str) {
$this->wrenchboard_load();
if ($str == NULL || trim($str) == '') {
return NULL;
}
if (self::DEBUG_API_CALLS) {
$stack = debug_backtrace();
$log = json_encode($stack);
error_log($log);
error_log($str);
}
$ret = $this->wrenchboard->logMessage($str);
return $ret;
}
public function cfgReadChar($str) {
$this->wrenchboard_load();
if ($str == NULL || trim($str) == '') {
return NULL;
}
if (self::DEBUG_API_CALLS) {
$stack = debug_backtrace();
$log = json_encode($stack);
error_log($log);
error_log($str);
}
$ret = $this->wrenchboard->cfgReadChar($str);
return $ret;
}
public function cfgReadLong($str) {
$this->wrenchboard_load();
if ($str == NULL || trim($str) == '') {
return 0;
}
if (self::DEBUG_API_CALLS) {
$stack = debug_backtrace();
$log = json_encode($stack);
error_log($log);
error_log($str);
}
$ret = $this->wrenchboard->cfgReadLong($str);
return $ret;
}
private function wrenchboard_load() {
//global $wrenchboard;
// $this->$USER = $_SERVER['SCRIPT_FILENAME'];
$wrenchboard_class = 'wrenchboard_api_' . $this->USER . '\\WrenchBoard';
/* if (is_object($wrenchboard) && is_object($wrenchboard->wrenchboard)) {
$this->wrenchboard = $wrenchboard->wrenchboard;
} else if (is_object($wrenchboard)) {
$this->wrenchboard = $wrenchboard;
} else */ if (!is_object($this->wrenchboard)) {
$this->wrenchboard = new $wrenchboard_class();
}
}
}
-89
View File
@@ -1,89 +0,0 @@
<?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;
}
}
-221
View File
@@ -1,221 +0,0 @@
<?php
class Combo_model extends CI_Model {
var $optCons = '';
var $currentStyle = 'form-control select';
var $readOnlyMode = false;
var $defaultComboMessage = 'Select...';
var $showDefaultSelect = true;
function __construct() {
}
public function marketTimeline($option_name, $curVal)
{
$marketArray = [];
for ($i = 2; $i <= 6; $i = $i + 1) {
$marketArray[] = [$i,$i,'Days'];
}
$ic=0;
for ($i = 7; $i <= 21; $i = $i + 7) {
$ic++;
$marketArray[] = [$i,$ic,'Week(s)'];
}
$ic=0;
for ($i = 30; $i <= 90; $i = $i + 30) {
$ic++;
$marketArray[] = [$i,$ic,'Month(s)'];
}
$cmbstr ="<option value='0'>Select Market Timeline for this job</option>";
foreach ($marketArray as $item) {
$i = $item[0];
$ii = $item[1];
$description =$item[2];
$selV = '';
if ($curVal == $i) {
$selV = " selected ";
}
$cmbstr .= "<option value='".$i."' ".$selV.">".$ii." ".$description."</option>";
}
return $this->comboFrame($option_name, $cmbstr);
}
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';
$cmbstr ="";
for ($ii = 2; $ii <= 10; $ii++) {
$cmbstr .= "<option value='$ii'>$ii day(s)</option>";
}
for ($ii = 2; $ii <= 5; $ii++) {
$days_c = $ii*7;
$cmbstr .= "<option value='$days_c'>$ii Weeks</option>";
}
return $this->comboFrame($option_name, $cmbstr);
}
public function getUserJobGroupCombo($option_name, $member_id, $curVal) {
// $sql = "SELECT id,group_name FROM members_job_group WHERE member_id = $member_id AND status = 1 ORDER BY group_name ASC ";
$sql = "SELECT m.id,m.group_name, m.group_name||' ['||count(g.group_id)||' members]' AS member_group_count "
. "FROM members_job_group m "
. "LEFT JOIN members_job_groupmember g ON g.group_id = m.id "
. "WHERE m.member_id = $member_id "
. "AND m.status = 1 GROUP BY m.id,m.group_name ORDER BY m.group_name ASC";
$q = $this->db->query($sql);
$option_value = $this->optionValueObject($q->result(), "id", "member_group_count", $curVal);
return $this->comboFrame($option_name, $option_value);
}
public function getUserRecipientCombo($option_name, $member_id, $curVal) {
$sql = "SELECT b.id,b.firstname||' '||b.lastname||' '||b.account_no||' '||k.name AS recipient "
. "FROM sendmoney_recipient b "
. "LEFT JOIN bank_entity_codes k ON k.code=b.bank_code "
. "WHERE b.member_id = $member_id AND b.status=1";
$q = $this->db->query($sql);
$option_value = $this->optionValueObject($q->result(), "id", "recipient", $curVal);
return $this->comboFrame($option_name, $option_value);
}
public function getAccountTypeCombo($option_name, $curVal) {
$q = $this
->db
->where('status', 1)
->order_by('type_name', 'ASC')
->get('account_types');
$option_value = $this->optionValueObject($q->result(), "type_value", "type_name", $curVal);
return $this->comboFrame($option_name, $option_value);
}
public function getGeneralSkillCombo($option_name, $curVal) {
$this->showDefaultSelect = false;
$q = $this
->db
->where('status', 1)
->order_by('lorder', 'DESC')
->get('skill_category');
$option_value = $this->optionValueObject($q->result(), "id", "category", $curVal);
return $this->comboFrame($option_name, $option_value);
}
public function getUserNewSkillCombo($option_name, $curVal, $category_id, $member_id) {
$q = $this
->db
->where('status', 1)
->where('category_id', $category_id)
->order_by('lorder', 'DESC')
->get('skill_types');
$option_value = $this->optionValueObject($q->result(), "id", "skill", $curVal);
return $this->comboFrame($option_name, $option_value);
}
public function setReadOnly($bl) {
$this->readOnlyMode = $bl;
}
public function getCountryCombo($option_name, $curVal) {
$q = $this
->db
->where('status', 1)
->order_by('country', 'ASC')
->get('country');
$option_value = $this->optionValueObject($q->result(), "code", "country", $curVal);
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;
code | name
------+------------------------------------------------
044 | Access Bank
014 | Afri Bank
023 | Citi Bank
063 | Diamond Bank
050 | Ecobank
040 | Equitorial Trust Bank
*/
$q = $this
->db
->where('status', 1)
->order_by('name', 'ASC')
->get('bank_entity_codes');
$option_value = $this->optionValueObject($q->result(), "code", "name", $curVal);
return $this->comboFrame($option_name, $option_value);
}
private function optionValueObject($sdStd, $val, $valname, $curVal) {
$this->optCons = '';
if ($this->showDefaultSelect == true) {
$this->optCons .= "<option value=''>" . $this->defaultComboMessage . "</option>";
}
foreach ($sdStd as $row) {
$selV = '';
if ($curVal == $row->$val) {
$selV = " selected ";
}
$this->optCons .= "<option value='" . $row->$val . "' " . $selV . ">" . $row->$valname . "</option>";
}
return $this->optCons;
}
private function comboFrame($option_name, $option_value) {
$addReaOnly = "";
if ($this->readOnlyMode == true) {
$addReaOnly = " disabled ";
}
//form-select form-select-solid form-select-lg
$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>";
}
}
-28
View File
@@ -1,28 +0,0 @@
<?php
class Contact_model extends CI_Model {
function __construct() {
}
public function addContractMessage($data)
{
/*
$in['title'] = $title;
$in['description'] = $description;
$in['timeline_days'] = $timeline;
$in['job_detail'] = $job_detail;
$in['price'] = $price;
$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 )
{
$ret = true;
}
return $ret;
}
}
-21
View File
@@ -1,21 +0,0 @@
<?php
class Country_model extends CI_Model {
function __construct() {
}
public function loadCountry($data) {
$q = $this
->db
->where('status', $data['status'])
->order_by('country', 'ASC')
->get('country');
// $this->db->order_by('name', 'ASC');
return $q->result();
}
//$this->db->order_by('title', 'DESC');
}
-24
View File
@@ -1,24 +0,0 @@
<?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;
}
}
-133
View File
@@ -1,133 +0,0 @@
<?php
class Dash_model extends CI_Model {
function __construct() {
}
public function getDashData($data) {
$out = array();
$out['active_task'] = 0;
$out['active_pass_due'] = 0;
$out['current_balance'] = 0;
$out['new_message'] = 0;
$out['total_jobs'] = 0;
$q = $this
->db
->where('id', $data['member_id'])
->limit(1)
->get('members');
if ($q->num_rows() > 0) {
$out = $q->result_array();
$out['current_balance'] = $out[0]['balance']; //pay attention to row 1
$out['new_message'] = 0;
$out['active_task'] = 0;
$out['active_pass_due'] = 0;
$out['total_jobs'] = 0;
} else {
return false;
}
$y = $this->getNewMessageCount($data['member_id']);
$out['new_message'] = $y['new_message'];
$y = $this->getEscrowBalance($data['member_id']);
$out['escrow_balance'] = $y['escrow_balance'] + $y['escrow_c_offer'];
$y = $this->getPeningOfferCount($data['member_id']);
$out['active_offers_count'] = $y['active_offers_count'];
$z = $this->getOfferInterestCount($data['member_id']);
$out["offers_interest_count"] = $z['offers_interest_count'];
$k = $this->getAccountDetail($data['member_id']);
$out["description"] = $k['description'];
return $out;
}
public function getNewMessageCount($member_id) {
$out = array();
$out['new_message'] =0;
$mysql = " SELECT count(id) AS new_message FROM members_messages WHERE member_id =$member_id AND reply IS NULL AND added > now() +'-2 day(s)' ";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['new_message'] = $q->row()->new_message;
}
return $out;
}
public function getEscrowBalance($member_id) {
$out = array();
$out['escrow_balance'] = $out['escrow_c_offer'] = 0;
$mysql = "SELECT sum(jb.price) AS escrow_offer FROM members_jobs_offer j LEFT JOIN members_jobs jb ON jb.id=j.job_id WHERE j.status = 1 AND client_id> 0 AND j.member_id = " . $member_id;
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['escrow_balance'] = $q->row()->escrow_offer;
}
$mysql = "SELECT sum(j.price) AS escrow_c_offer FROM members_jobs_contract j WHERE j.status IN(1,2) AND j.member_id = " . $member_id;
$q2 = $this->db->query($mysql);
if ($q2->num_rows() > 0) {
$out['escrow_c_offer'] = $q2->row()->escrow_c_offer;
}
return $out; //['escrow_c_offer'] + $out['escrow_balance'];
}
public function getAccountDetail($member_id) {
$out['description'] = "";
$mysql = "SELECT * FROM members_detail WHERE member_id = " . $member_id;
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['description'] = $q->row()->description;
}
return $out;
}
public function getOfferInterestCount($member_id) {
$out['active_offers_count'] = 0;
$mysql = " SELECT count(mi.id) AS offers_interest_count"
. " FROM members_offer_interest mi "
. " LEFT JOIN members_jobs_offer jo ON jo.id=mi.offer_id "
. " WHERE mi.status=1 AND jo.expire> now() "
. " AND mi.member_id = " . $member_id;
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['offers_interest_count'] = $q->row()->offers_interest_count;
}
return $out;
}
/*
select * from members_offer_interest order by id desc;
id | member_id | offer_id | status | added
----+-----------+----------+--------+----------------------------
56 | 18 | 71 | 1 | 2017-06-22 09:36:25.576627
55 | 23 | 71 | 1 | 2017-06-22 09:36:08.856582
*/
public function getPeningOfferCount($member_id) {
$out['active_offers_count'] = 0;
$mysql = " SELECT count(id) AS active_offers_count FROM members_jobs_offer WHERE status=1 AND expire> now() AND member_id = " . $member_id;
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['active_offers_count'] = $q->row()->active_offers_count;
}
return $out;
}
}
-30
View File
@@ -1,30 +0,0 @@
<?php
class Faq_model extends CI_Model {
var $optCons = '';
var $currentStyle = 'form-control select';
function __construct() {
}
public function attachOffers($email) {
$emailTrim = trim($email);
$mysql = "SELECT id AS member_id FROM members WHERE username = '$emailTrim' LIMIT 1 ";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num == 1) {
// $out = $query->result_array();
// print_r($out);
$mysqlU = " UPDATE members_jobs_offer SET client_id ='". $query->row()->member_id ."' WHERE client_id = 0 AND email='$emailTrim' AND expire> now()";
$this->db->query($mysqlU);
}
}
}
-241
View File
@@ -1,241 +0,0 @@
<?php
class Job_model extends CI_Model {
var $actionMessage = '';
function __construct() {
}
public function selectUserJobUid($member_id,$uuid){
$mysql = "SELECT * FROM members_jobs WHERE member_id = $member_id AND uid='$uuid' ";
$query = $this->db->query($mysql);
return $query->result_array();
}
/*
* 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'];
$x['group_id'] = $group_id;
$x['action'] = WRENCHBOARD_JOB_DELETE_GROUP;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
$this->actionMessage = "Group Deleted";
} else {
$this->actionMessage = 'Unable to delete group...';
}
return $this->actionMessage;
}
public function deleteMemberGroupMember($group_id, $group_member_id) {
$this->actionMessage = '';
$x['member_id'] = $_SESSION['member_id'];
$x['group_id'] = $group_id;
$x['group_member_id'] = $group_member_id;
$x['action'] = WRENCHBOARD_JOB_DELETE_GROUPMEMBER;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
$this->actionMessage = "Group Deleted";
} else {
$this->actionMessage = 'Unable to delete group...';
}
return $this->actionMessage;
}
public function addMemberGroupMember($group_id, $firstname, $lastname, $email) {
$this->actionMessage = '';
//$group_id = $group_id + 0; // just making sure it is number
$x['member_id'] = $_SESSION['member_id'];
$x['group_id'] = $group_id;
$x['firstname'] = $firstname;
$x['lastname'] = $lastname;
$x['email'] = $email;
$x['action'] = WRENCHBOARD_JOB_GROUP_MEMBER;
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($x, $out);
if ($res == PHP_CREATED_OK) {
$this->actionMessage = 'Group Created';
} else {
$this->actionMessage = 'Unable to create job group...';
}
return $this->actionMessage;
}
var $tableJobMember = '';
public function getJobGroupMembers($group_id) {
$this->tableJobMember = '';
$this->load->library('table');
$this->table->set_template($this->template);
$mysql = "SELECT firstname,lastname,email,'<button type=\"button\" class=\"btn btn-danger btn-sm btn-xs\" onclick=''deleteJobGroupMember('||id||',${group_id},\"'||firstname||' '||lastname||'\")''>X</button>' FROM members_job_groupmember WHERE member_id = " . $_SESSION['member_id'] . " AND group_id = " . $group_id . " AND status = 1";
$query = $this->db->query($mysql);
$this->table->set_heading('Firstname', 'Lastname', 'Email', '');
$this->tableJobMember = $this->table->generate($query);
return $this->tableJobMember;
}
var $tableStr = '';
public function getMembersJobGroup($sel) {
$this->tableStr = '';
$groups = array();
$mysql = "SELECT id,group_name FROM members_job_group WHERE member_id = " . $_SESSION['member_id'] . " AND status = 1 ORDER BY group_name ASC";
$query = $this->db->query($mysql);
$this->tableStr = '<table class=\'table table-striped table-hover table-bordered table-condensed\' style=\'border-spacing: 1px; padding: 0px; border-collapse: separate;\' >';
$i = 0;
foreach ($query->result() as $row) {
$this->tableStr .="<tr><td style='width:10px;'><input type=\"radio\" name=\"unstyled-radio-left\" value=\"" . $row->id . "\" onchange=\"jobGroupChanged(this,'".str_replace("'","\\'",stripslashes($row->group_name))."')\"".(($sel==$row->id || ($sel<1 && $i==0))?"checked":"")."></td><td>" . $row->group_name . "</td><td><button class=\"btn btn-danger btn-sm\" type=\"button\" onclick=\"deleteJobGroup(".$row->id.",'".str_replace("'","\\'",stripslashes($row->group_name))."')\">X</button></td></tr>";
$groups[$row->id] = $row->group_name;
$i++;
}
$this->tableStr .= '</table>';
return array($this->tableStr,$groups);
}
public function addGroupMemberForm($group_id) {
$str = "<form method='post' name='addgrpmem' action='?'>
<input type='hidden' name='group_id' value='${group_id}'>
<table class='table table-striped table-hover table-nobordered table-condensed'>
<tr>
<td><input type='text' class='form-control' name='firstname' placeholder='Firstname...'></td>
<td><input type='text' class='form-control' name='lastname' placeholder='Lastname...'></td>
<td><input type='text' class='form-control' name='email' placeholder='Email...'></td>
<td><button type='submit' class='btn btn-primary btn-sm'>Add</button></td></tr>
<tr>
</table>
</form>
<hr size=1>";
return $str;
}
public function loadJobOffer($member_id, $offer_code) {
$out = array();
$out['result'] = 0;
$mysql = "SELECT jo.added::date AS added_date,j.title,j.description, j.timeline_days, j.price*0.01 AS price,jo.offer_code,jo.job_description,jo.expire "
. "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 = " . $member_id . " AND jo.offer_code='" . $offer_code . "' ";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['added_date'] = $q->row()->added_date;
$out['title'] = $q->row()->title;
$out['description'] = $q->row()->description;
$out['timeline_days'] = $q->row()->timeline_days;
$out['price'] = $q->row()->price;
$out['offer_code'] = $q->row()->offer_code;
$out['job_description'] = $q->row()->job_description;
$out['expire'] = $q->row()->expire;
$out['result'] = 1;
} else {
}
return $out;
}
public function getComboJobListOrdered($member_id, $list_limit){
/*
*SELECT uid,title FROM members_jobs WHERE status = 1 AND member_id = 1 ORDER BY title ASC LIMIT 100;
uid | title
--------------------------------------+----------------------------------------------------------------------------------
f13c2850-d1a4-4c87-be03-5fcd18a0643a | Another 2 days job
01d9da51-8290-46aa-902c-279203b9b85f | ChiefSoftWorks
00ce0c85-17c2-49f8-86e0-4c8ce70540a0 | Control Selected GPIO Pin on a Raspberry Pi Raspberry Pi 3
0c17f4f0-a2c2-449e-8b5c-61b1ac3eeeea | Different Screen,15 and 5 different Email Subject Capture
*/
$mysql = "SELECT uid,title FROM members_jobs WHERE status = 1 AND member_id = " . $member_id . " ORDER BY title ASC LIMIT ".$list_limit;
$query = $this->db->query($mysql);
return $query->result_array();
}
public function readMyloadJobOffer($member_id, $offer_code) {
$out = array();
$out['result'] = 0;
$mysql = "SELECT jo.added::date AS added_date,j.title,j.description, j.timeline_days, j.price*0.01 AS price,public_view,"
." jo.offer_code,jo.job_description,jo.expire,(CASE WHEN jo.public_view > 0 THEN 'Public View' ELSE jo.email END ) AS job_sent_to "
. "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 = " . $member_id . " AND jo.offer_code='" . $offer_code . "' ";
$q = $this->db->query($mysql);
if ($q->num_rows() > 0) {
$out['job_sent_to'] = $q->row()->job_sent_to;
$out['added_date'] = $q->row()->added_date;
$out['title'] = $q->row()->title;
$out['description'] = $q->row()->description;
$out['timeline_days'] = $q->row()->timeline_days;
$out['price'] = $q->row()->price;
$out['offer_code'] = $q->row()->offer_code;
$out['job_description'] = $q->row()->job_description;
$out['expire'] = $q->row()->expire;
$out['public_view'] = $q->row()->public_view;
$out['result'] = 1;
} else {
}
return $out;
}
public function verifyJobInputs($data) {
/*
$in['title'] = $title;
$in['description'] = $description;
$in['timeline_days'] = $timeline;
$in['job_detail'] = $job_detail;
$in['price'] = $price;
$in['member_id'] = $_SESSION['member_id'];
*/
$ret = false;
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;
}
public function getJob($job_id) {
$q = $this
->db
->where('id', $job_id)
->limit(1)
->get('members_jobs');
if ($q->num_rows() > 0) {
return $q->row();
} else {
return false;
}
}
}

Some files were not shown because too many files have changed in this diff Show More