first commit

This commit is contained in:
Olu Amey
2021-10-09 21:59:14 -04:00
commit 2e1a4017c3
6336 changed files with 864678 additions and 0 deletions
+1
View File
@@ -0,0 +1 @@
UID=1000
+36
View File
@@ -0,0 +1,36 @@
<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>
File diff suppressed because one or more lines are too long
+43
View File
@@ -0,0 +1,43 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$randd = rand(1, 5) * 1000;
$data['member_id'] = 1;
$data['group_id'] = 1;
$data['firstname'] = "Firstnme" . $randd;
$data['lastname'] = "Lastname" . $randd;
$data['email'] = "ses66181+$randd@gmail.com";
$data['action'] = WRENCHBOARD_JOB_GROUP_MEMBER;
print_r($data);
$out = array();
$ret = $wrenchboard->wrenchboard_api($data, $out);
print_r($out);
var_dump($ret);
//phpinfo();
/*
*
* //**************************************************************
#define WRENCHBOARD_JOBS_START 13000
#define WRENCHBOARD_JOB_CREATEJOB 13010
#define WRENCHBOARD_JOBS_END 13999
//**************************************************************
*
*/
?>
+30
View File
@@ -0,0 +1,30 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$email = 'ses66181+1@gmail.com';
$email = 'ameye@chiefsoft.com';
$data['email'] = $email;
$data['username'] = 'admin'; //$email;
$data['password'] = 'may12002';
$data['terms'] = 1; // $terms;
$data['news'] = 1; //$news;
$data['loc'] = "38.101.241.200";
$data['sessionid'] = rand(10000,99999)."A".rand(10000,99999);
$data['action'] = 10010;
$out = array();
$ret = $wrenchboard->wrenchboard_api($data,$out);
print_r($out);
var_dump($ret);
//phpinfo();
?>
+13
View File
@@ -0,0 +1,13 @@
<?php
include '../backend.php';
$base_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
$local_url = 'https://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
$base_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
$local_url = 'http://fluxtra:fl0xtra!@oameye.works.wrenchboard.com/svs/user';
//$base_url = 'https://www.wrenchboard.com/svs/user';
//$local_url = 'https://www.wrenchboard.com/svs/user';
?>
+47
View File
@@ -0,0 +1,47 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$data['title'] = rand(100,999).'Job Title Job Title Job Title Job Title'.rand(100,999);
for ($i=0; $i<= rand(2,5); $i++){
$data['description'] .= 'Job description';
}
for ($i=0; $i<= rand(5,15); $i++){
$data['job_detail'] .= 'Job job_detail ';
}
$data['timeline_days'] = rand(1,3);
$data['price'] = rand(1,5)*1000;
$data['member_id'] = 1;
$data['action'] = 13010;
print_r($data);
$out = array();
$ret = $wrenchboard->wrenchboard_api($data, $out);
print_r($out);
var_dump($ret);
//phpinfo();
/*
*
* //**************************************************************
#define WRENCHBOARD_JOBS_START 13000
#define WRENCHBOARD_JOB_CREATEJOB 13010
#define WRENCHBOARD_JOBS_END 13999
//**************************************************************
*
*/
?>
+107
View File
@@ -0,0 +1,107 @@
<?php
define('PHP_API_OK', 0);
define('PHP_API_BAD_PARAM', -1);
define('WRENCHBOARD_SESSION_CHECK', 299);
define('WRENCHBOARD_USER_LOGIN', 300);
define('WRENCHBOARD_USER_LOGOUT', 301);
define('WRENCHBOARD_CREATE_ACCOUNT', 320);
//**************************************************************
define('WRENCHBOARD_BKO_START', 10000);
define('WRENCHBOARD_BKO_LOGIN', 10010);
define('WRENCHBOARD_BKO_CREATEUSER', 10015);
define('WRENCHBOARD_BKO_UPDATEUSER', 10020);
define('WRENCHBOARD_BKO_END', 10999);
//**************************************************************
define('WRENCHBOARD_ACCOUNT_START', 11000);
define('WRENCHBOARD_ACCOUNT_TESTEMAIL', 11001);
define('WRENCHBOARD_ACCOUNT_PENDING', 11010);
define('WRENCHBOARD_VERIFY_PENDING_LINK', 11015);
define('WRENCHBOARD_ACCOUNT_CREATEACC', 11020);
define('WRENCHBOARD_ACCOUNT_LOGIN', 11025);
define('WRENCHBOARD_ACCOUNT_END', 11999);
//**************************************************************
define('WRENCHBOARD_JOB_GROUP_MEMBER', 13015) ;
define('WRENCHBOARD_JOB_DELETE_GROUPMEMBER',13017);
define('WRENCHBOARD_JOB_CREATE_GROUP', 13020);
define('WRENCHBOARD_JOB_DELETE_GROUP',13023);
define('WRENCHBOARD_GROUP_START', 12000);
define('WRENCHBOARD_GROUP_CREATEGROUP', 12010);
define('WRENCHBOARD_GROUP_INVITEGROUP', 12015);
define('WRENCHBOARD_GROUP_ACCEPTGROUP', 12020);
define('WRENCHBOARD_GROUP_END', 12999);
//**************************************************************
define('WRENCHBOARD_LOGIN_SHOP', 50501);
define('WRENCHBOARD_LOGIN_ADMIN', 50502);
define('WRENCHBOARD_LOGIN_MANAGER', 50503);
define('WRENCHBOARD_SURVEY_DATA', 55000);
define('WRENCHBOARD_ADD_SURVEY', 55050);
define('WRENCHBOARD_LOAD_SURVEY', 55055);
define('WRENCHBOARD_COMPLETE_SENDMONEY_INTERSW', 555);
define('WRENCHBOARD_GETBILLER_INTERSW', 556);
define('WRENCHBOARD_BILL_PAYMENT_ADVICE_INTERSW', 557);
define('WRENCHBOARD_INTERSW_GETBILLER', 556);
define('WRENCHBOARD_INTERSW_BILL_PAYMENT_ADVICE', 557);
define('WRENCHBOARD_INTERSW_GETBILLERPAYMENTINTEMS', 558);
define('WRENCHBOARD_INTERSW_GETBILLERCATEGORIES', 559);
define('WRENCHBOARD_INTERSW_DO_TRANSFER', 560);
define('WRENCHBOARD_INTERSW_QUERY_TRANSACTION', 561);
define('WRENCHBOARD_ADD_MONEYRECIPIENT', 600);
define('WRENCHBOARD_CREATE_USER_ACCOUNT', 700);
define('WRENCHBOARD_USER_ACCOUNT_LOGIN', 710);
define('WRENCHBOARD_START_PASSWORDRESET', 720);
define('WRENCHBOARD_COMPLETE_PASSWORDRESET', 730);
//#define WRENCHBOARD_START_ADDMONEY', 770 );
//#define WRENCHBOARD_COMPLETE_ADDMONEY' 775 );
define('WRENCHBOARD_ADD_MOBILE_TOPUPNUM', 900);
define('WRENCHBOARD_PROMO_CALL', 990);
define('WRENCHBOARD_STOREFACE_GET_ACCOUNT_BALANCE', 891);
define('WRENCHBOARD_LOG_ENTRY', 900000);
define('WRENCHBOARD_CREDIT_TOPUP', 900010);
define('WRENCHBOARD_TOPUP_ORDER', 900020);
define('WRENCHBOARD_TOPUP_ORDER_PURCHASE', 900030);
define('WRENCHBOARD_PAYPAL_IPNMSG', 900090);
define('WRENCHBOARD_BULKTOPUP_ORDER', 700010);
define('WRENCHBOARD_BULKTOPUP_ITEM', 700020);
define('WRENCHBOARD_BULKTOPUP_ITEMUPDATE', 700030);
define('WRENCHBOARD_BULKTOPUP_DELIVER', 700040);
define('WRENCHBOARD_BALANCE_TOPUP_ORDER', 800020);
define('WRENCHBOARD_BALANCE_TOPUP_PURCHASE', 800030);
define('WRENCHBOARD_BALANCE_TOPUP_PAYMENT', 800040);
define('VIRTUAL_AIRTOPUP', 70011);
define('PAY_MODE_BALANCE', 0);
define('PAY_MODE_CCARD', 1);
define('PAY_MODE_BONUS', 9);
define('APPROVED_BALANCE', 5);
define('DISAPROVE_BALANCE', 3);
+58
View File
@@ -0,0 +1,58 @@
<?php
// Include and instantiate the class.
require_once 'Mobile_Detect.php';
$detect = new Mobile_Detect;
// Any mobile device (phones or tablets).
if ( $detect->isMobile() ) {
echo 'mobile -> '.$detect->isMobile();
}
// Any tablet device.
if( $detect->isTablet() ){
}
// Exclude tablets.
if( $detect->isMobile() && !$detect->isTablet() ){
}
// Check for a specific platform with the help of the magic methods:
if( $detect->isiOS() ){
}
if( $detect->isAndroidOS() ){
}
// Alternative method is() for checking specific properties.
// WARNING: this method is in BETA, some keyword properties will change in the future.
$detect->is('Chrome');
$detect->is('iOS');
$detect->is('UC Browser');
// [...]
// Batch mode using setUserAgent():
$userAgents = array(
'Mozilla/5.0 (Linux; Android 4.0.4; Desire HD Build/IMM76D) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.166 Mobile Safari/535.19',
'BlackBerry7100i/4.1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 VendorID/103',
// [...]
);
foreach($userAgents as $userAgent){
$detect->setUserAgent($userAgent);
$isMobile = $detect->isMobile();
$isTablet = $detect->isTablet();
// Use the force however you want.
}
// Get the version() of components.
// WARNING: this method is in BETA, some keyword properties will change in the future.
$detect->version('iPad'); // 4.3 (float)
$detect->version('iPhone'); // 3.1 (float)
$detect->version('Android'); // 2.1 (float)
$detect->version('Opera Mini'); // 5.0 (float)
// [...]
+2
View File
@@ -0,0 +1,2 @@
+12
View File
@@ -0,0 +1,12 @@
<?
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$ret = $wrenchboard->wrenchboard_api($in,$out);
var_dump($ret);
phpinfo();
?>
+35
View File
@@ -0,0 +1,35 @@
<?php
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
Array ( [title] => Re:Week 1 CAT 2: “Muddiest” Point [description] => sffss [timeline] => 3 [job_detail] => sgsagsagashas [price] => 5000 [action] => 0 )
$data['firstname'] = 'Olu';
$data['lastname'] = 'Amey';
$email = 'ses66181+1@gmail.com';
$data['email'] = $email;
$data['username'] = $email;
$data['password'] = 'may12002';
$data['terms'] = 1; // $terms;
$data['news'] = 1; //$news;
$data['loc'] = "38.101.241.200";
$data['sessionid'] = rand(10000,99999)."A".rand(10000,99999);
$data['action'] = WRENCHBOARD_ACCOUNT_LOGIN;
$out = array();
$ret = $wrenchboard->wrenchboard_api($data,$out);
print_r($out);
var_dump($ret);
//phpinfo();
?>
+26
View File
@@ -0,0 +1,26 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$data['action'] = 11040;
$data['mlog'] = "Account login";
$data['member_id'] = 1;
$ret = $wrenchboard->wrenchboard_api($data,$out);
var_dump($ret);
phpinfo();
?>
+104
View File
@@ -0,0 +1,104 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
echo "TEST - SEND OFFER<br>";
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
define('WRENCHBOARD_JOB_OFFER_CONCLUDE',13035);
if ($_POST) {
$data["offer_code"] = $_POST['offer_code'];
$data["offer_result"] = 100;
$data['action'] = WRENCHBOARD_JOB_OFFER_CONCLUDE; // test EMAIL
$data["member_id"]=3;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
}
//$data['email'] = "ameye+".rand(100,999)."@chiefsoft.com";
$data['offer_code'] = "2R89783R2B";
// $data['ses66181+2@gmail.com'] = "ses66181+2@gmail.com";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Offer Test Page</title>
<style type="text/css">
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
</style>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="#">Home page</a>
</ul>
<!-- Main content -->
<h1>Manage Offer Test Page</h1>
<p>Welcome to my test page!
<form action="#" method="POST">
<div>
<input type="text" name="offer_code" value="<?echo $data["offer_code"]?>" style="width: 300px;">
<input type="submit" name="submit" value="Submit">
</div>
</form>
<p>
<!-- Sign and date the page, it's only polite! -->
<address>Made 5 March 2017<br>
by myself.</address>
</body>
</html>
+11024
View File
File diff suppressed because it is too large Load Diff
+62
View File
@@ -0,0 +1,62 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$data['member_id'] = 3;
$data['action'] = 33020;
$data["InitiatingEntityCode"] = "MBA"; //isset($_POST["InitiatingEntityCode"])?$_POST["InitiatingEntityCode"]:"";
// $data["senderid"] = 1;
$data["senderid"] = "1"; // isset($_POST["customerid"])?((int)$_POST["customerid"]):0;
$data["InitiatingAmount"] = 120000 + rand(999, 99999);
$data["Fee"] = 120;
$data["InitiatingChannel"] = 7;
$data["InitiatingPaymentMethodCode"] = "CA";
$data["InitiatingCurrencyCode"] = '566'; // 566 - NRN - Naira
$data["recipientid"] = 1;
$data["TerminatingPaymentMethodCode"] = "AC";
$data["TerminatingAmount"] = $data["InitiatingAmount"];
$data["TerminatingCurrencyCode"] = '566'; // 566 - NRN - Naira
$data["TerminatingCountryCode"] = 'NG'; // NG - Nigeria
$data["TerminatingAccountNumber"] = "";
// $data["TerminatingAccountType"] = isset($_POST["TerminatingAccountType"])?$_POST["TerminatingAccountType"]:"";
$data["TerminatingEntityCode"] = "";
$data["transaction_id"] = "T".rand(120000,999999);
print_r($data);
$out = array();
$ret = $wrenchboard->wrenchboard_api($data, $out);
echo "<hr>";
print_r($out);
var_dump($ret);
/*
*
* //**************************************************************
#define WRENCHBOARD_SMONEY_START 33000
#define WRENCHBOARD_SMONEY_ADDRECIPIENT 33010
#define WRENCHBOARD_SMONEY_MEMBER 33020
#define WRENCHBOARD_SMONEY_END 33999
//**************************************************************
*
*/
?>
+34
View File
@@ -0,0 +1,34 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$data['firstname'] = 'Olu';
$data['lastname'] = 'Amey';
$email = 'ses66181+'.rand(1000,9999).'@gmail.com';
$email = 'ameye+'.rand(1000,9999).'@chiefsoft.com';
$data['email'] = $email;
$data['username'] = $email;
$data['password'] = 'may12002';
$data['terms'] = 1; // $terms;
$data['news'] = 1; //$news;
$data['loc'] = "38.101.241.200";
$data['action'] = WRENCHBOARD_ACCOUNT_PENDING;
$ret = $wrenchboard->wrenchboard_api($data,$out);
var_dump($ret);
phpinfo();
?>
+68
View File
@@ -0,0 +1,68 @@
<?php
require_once 'config.php';
$url = $local_url . "/account";
/*
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
*/
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+62
View File
@@ -0,0 +1,62 @@
<?php
require_once 'config.php';
$url = $local_url . "/activejoblist";
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
$username = "ses66181+1@gmail.com";
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP",
"limit" => 10,
"page" => "1"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+73
View File
@@ -0,0 +1,73 @@
<?php
require_once 'config.php';
$url = $local_url . "/createuser";
$username = urlencode("ses66181+" . rand(1000, 9999) . "@gmail.com");
$username = "ses66181+" . rand(1000, 9999) . "@gmail.com";
$phone = (rand(1, 2) > 1) ? "770222" . rand(2222, 9999) : '';
include 'sample_data.php'; // just for sample data
$firstname = random_name(); //
$lastname = random_name(); //
$data = array(
"country" => 'NG',
"username" => $username,
"password" => "wrenchboard",
"email" => $username,
"firstname" => $firstname,
"lastname" => $lastname,
"phone" => $phone,
"news" =>0 ,
"terms" => 1
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($status != 200) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
var_dump($response);
echo "<hr/>";
var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+73
View File
@@ -0,0 +1,73 @@
<?php
require_once 'config.php';
$url = $local_url . "/createuser";
$username = urlencode("tokslaw7+" . rand(1000, 9999) . "@gmail.com");
$username = "tokslaw7+" . rand(1000, 9999) . "@gmail.com";
$phone = (rand(1, 2) > 1) ? "770222" . rand(2222, 9999) : '';
include 'sample_data.php'; // just for sample data
$firstname = random_name(); //
$lastname = random_name(); //
$data = array(
"country" => 'NG',
"username" => $username,
"password" => "wrenchboard",
"email" => $username,
"firstname" => $firstname,
"lastname" => $lastname,
"phone" => $phone,
"news" =>0 ,
"terms" => 1
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($status != 200) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
var_dump($response);
echo "<hr/>";
var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+61
View File
@@ -0,0 +1,61 @@
<?php
require_once 'config.php';
$url = $local_url . "/createuser";
$username = urlencode("ses66181+" . rand(1000, 9999) . "@gmail.com");
$username = "ses66181+" . rand(1000, 9999) . "@gmail.com";
$phone = (rand(1, 2) > 1) ? "770222" . rand(2222, 9999) : '';
include 'sample_data.php'; // just for sample data
$firstname = random_name(); //
$lastname = random_name(); //
$data = array(
"country" => 'NG',
"username" => $username,
"password" => "wrenchboard",
"email" => $username,
"firstname" => $firstname,
"lastname" => $lastname,
"phone" => $phone,
"login" => 1
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ($status != 200) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//var_dump($response);
echo "<hr/>";
var_dump($data);
echo "<hr/><pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre><hr/>";
echo "<hr/>";
echo highlight_string(file_get_contents(__FILE__));
?>
+89
View File
@@ -0,0 +1,89 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
echo "TEST - EMAIL<br>";
if ($_POST) {
$data["email"] = $_POST['email'];
$data['action'] = 9999099; // test EMAIL
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>My first styled page</title>
<style type="text/css">
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
</style>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="#">Home page</a>
</ul>
<!-- Main content -->
<h1>Email Test Page</h1>
<p>Welcome to my test page!
<form action="#" method="POST">
<div>
<input type="text" name="email" value="ameye@fluxtra.net">
<input type="submit" name="submit" value="Submit">
</div>
</form>
<p>
<!-- Sign and date the page, it's only polite! -->
<address>Made 55 March 2017<br>
by myself.</address>
</body>
</html>
+68
View File
@@ -0,0 +1,68 @@
<?php
require_once 'config.php';
$url = $local_url . "/dashdata";
/*
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
*/
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+68
View File
@@ -0,0 +1,68 @@
<?php
require_once 'config.php';
$url = $local_url . "/loadprofile";
/*
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
*/
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+25
View File
@@ -0,0 +1,25 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
$email = 'ses66181+1@gmail.com';
$data['email'] = 'ses66181@gmail.com';
$data['action'] = 9090919;
$out = array();
$ret = $wrenchboard->wrenchboard_api($data, $out);
print_r($out);
var_dump($ret);
//phpinfo();
?>
+68
View File
@@ -0,0 +1,68 @@
<?php
require_once 'config.php';
$url = $local_url . "/message";
/*
* 9 | ses66181+3215@gmail.com | d0fbea2563b377ea7074bced45c88dcb
8 | ses66181+2566@gmail.com | d0fbea2563b377ea7074bced45c88dcb
7 | ses66181+13@gmail.com | d0fbea2563b377ea7074bced45c88dcb
6 | obaxnoma@gmail.com | 7c539a49b2bad0570cd0f5dc1cf28df0
5 | ses66181+9478@gmail.com | d0fbea2563b377ea7074bced45c88dcb
4 | ses66181+6018@gmail.com | d0fbea2563b377ea7074bced45c88dcb
3 | ses66181+3@gmail.com | d0fbea2563b377ea7074bced45c88dcb
2 | ses66181+2@gmail.com | d0fbea2563b377ea7074bced45c88dcb
1 | ses66181+1@gmail.com | d0fbea2563b377ea7074bced45c88dcb
*/
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+104
View File
@@ -0,0 +1,104 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
echo "TEST - SEND OFFER<br>";
define('WRENCHBOARD_JOB_OFFER_INDVI',13030);
define('WRENCHBOARD_JOB_OFFER_GROUP',13031);
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
if ($_POST) {
$data["email"] = $_POST['email'];
$data['action'] = WRENCHBOARD_JOB_OFFER_INDVI; // test EMAIL
$data["job_id"]=35;
// $data["email"]="ameye@chiefsoft.com";
$data["job_description"]= "Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail";
$data["member_id"] = 1;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
}
$data['email'] = "ameye+".rand(100,999)."@chiefsoft.com";
$data['email'] = "ses66181+".rand(1,9)."@gmail.com";
$data['ses66181+2@gmail.com'] = "ses66181+2@gmail.com";
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Offer Test Page</title>
<style type="text/css">
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
</style>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="#">Home page</a>
</ul>
<!-- Main content -->
<h1>Offer Test Page</h1>
<p>Welcome to my test page!
<form action="#" method="POST">
<div>
<input type="text" name="email" value="<?echo $data["email"]?>" style="width: 300px;">
<input type="submit" name="submit" value="Submit">
</div>
</form>
<p>
<!-- Sign and date the page, it's only polite! -->
<address>Made 5 March 2017<br>
by myself.</address>
</body>
</html>
+62
View File
@@ -0,0 +1,62 @@
<?php
require_once 'config.php';
$url = $local_url . "/offerslist";
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
$username = "ses66181+1@gmail.com";
$data = array(
"member_id" => 1,
"sessionid" => "ABCDEFGHIJKLMNOP",
"limit" => 10,
"page" => "1"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+38
View File
@@ -0,0 +1,38 @@
<?php
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
echo "TEST - SKILL<br>";
define('WRENCHBOARD_ACCOUNT_SAVESKILL', 11038);
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
$data["member_id"] = 1;
$data["skill_id"] = 1;
$data['category_id'] = 1;
$data['action'] = WRENCHBOARD_ACCOUNT_SAVESKILL;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
$data["skill_id"] = 2;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
$data["skill_id"] = 3;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
+60
View File
@@ -0,0 +1,60 @@
<?php
require_once 'config.php';
$url = $local_url . "/startjoblist";
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
$username = "ses66181+1@gmail.com";
$data = array(
"limit" => 10,
"page" => "1"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+31
View File
@@ -0,0 +1,31 @@
<pre>
<?php
include('../backend.php');
$hostname = $wrenchboard->cfgReadChar("database.host");
$username = $wrenchboard->cfgReadChar("database.user");
$password = $wrenchboard->cfgReadChar("database.pass");
$database = $wrenchboard->cfgReadChar("database.name");
$dbconn = pg_connect("host=${hostname} dbname=${database} user=${username} password=${password}");
$q = "SELECT * FROM members WHERE stripe_customer_id IS NULL ORDER BY id LIMIT 1";
$r = pg_query($q);
$f = pg_fetch_assoc($r);
$in=array(
"action" => 90005, /* WRENCHBOARD_STRIPE_CHARGE_NEW */
"ccnum" => "4242424242424242",
"ccexpm" => "12",
"ccexpy" => "18",
"cccvc" => "123",
"amount" => "100",
"customer_id" => $f["id"],
"email" => $f["email"],
"description" => "This is a test charge for new stripe account"
);
$out=array();
$ret = $wrenchboard->wrenchboard_api($in, $out);
var_dump($ret);
var_dump($out);
pg_close($dbconn);
+61
View File
@@ -0,0 +1,61 @@
<?php
require_once 'config.php';
$url = $local_url . "/userlogin";
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
$username = "ses66181+1@gmail.com";
$data = array(
"username" => $username,
"password" => "may12002",
"sessionid" => "DUMMYSESSION"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
//echo "<hr/>";
//var_dump($data);
//echo "<hr/><pre>";
echo "<pre>";
echo str_replace(array("{","}",","),array("{\n\t","}\n",",\n\t"),$json_response);
echo "</pre>";
//echo "</pre><hr/>";
//echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
//echo highlight_string(file_get_contents(__FILE__));
?>
+57
View File
@@ -0,0 +1,57 @@
<?php
require_once 'config.php';
$url = $local_url . "/userlogin";
$username = urlencode("support+ademo".rand(1,3000)."@medtransgo.net");
// NOTE - THIS TEST RANDOMLY PICK ACCOUNTS - Some will be invalid
$data = array(
"username" => $username,
"password" => "medtransgoBAD",
"sessionid" => "DUMMYSESSION"
);
$content = json_encode($data);
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_HEADER, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER,
array("Content-type" => "application/json"));
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $content);
$json_response = curl_exec($curl);
$status = curl_getinfo($curl, CURLINFO_HTTP_CODE);
if ( $status != 200 ) {
echo ("Error: call to URL $url failed with status $status, response $json_response, curl_error " . curl_error($curl) . ", curl_errno " . curl_errno($curl));
}
curl_close($curl);
$response = json_decode($json_response, true);
echo "<b>RESPONSE</b><br>";
var_dump($response);
echo "<hr/><b>INPUT</b><br>";
var_dump($data);
echo "<hr/>";
echo "<hr/>";
// saving the session in a file for other call use
$myfile = fopen("fl/sample_session.txt", "w") ;
$txt = $response['sessionid']."\n";
fwrite($myfile, $txt);
$txt = $response['member_id']."\n";
fwrite($myfile, $txt);
fclose($myfile);
echo highlight_string(file_get_contents(__FILE__));
?>
+101
View File
@@ -0,0 +1,101 @@
<?
include('def.php');
$USER = $_SERVER['SCRIPT_FILENAME'];
$USER = str_replace('/home', '', $USER);
$USER = strtok($USER, '/');
//echo $USER;
// Load API class
$wrenchboard_class = 'wrenchboard_api_' . $USER . '\\WrenchBoard';
$wrenchboard = new $wrenchboard_class();
echo "TEST - SEND SMS<br>";
//#define WRENCHBOARD_JOB_OFFER_INDVI 13030
//#define WRENCHBOARD_JOB_OFFER_GROUP 13031
if ($_POST) {
$data["phone"] = $_POST['phone'];
$data['action'] = 9090909; // test EMAIL
$data["job_id"]=35;
// $data["phone"]="ameye@chiefsoft.com";
$data["job_description"]= "Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail Job job_detail";
$data["member_id"] = 1;
$ret = $wrenchboard->wrenchboard_api($data, $out);
var_dump($out);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<title>Offer Test Page</title>
<style type="text/css">
body {
padding-left: 11em;
font-family: Georgia, "Times New Roman",
Times, serif;
color: purple;
background-color: #d8da3d }
ul.navbar {
list-style-type: none;
padding: 0;
margin: 0;
position: absolute;
top: 2em;
left: 1em;
width: 9em }
h1 {
font-family: Helvetica, Geneva, Arial,
SunSans-Regular, sans-serif }
ul.navbar li {
background: white;
margin: 0.5em 0;
padding: 0.3em;
border-right: 1em solid black }
ul.navbar a {
text-decoration: none }
a:link {
color: blue }
a:visited {
color: purple }
address {
margin-top: 1em;
padding-top: 1em;
border-top: thin dotted }
</style>
</head>
<body>
<!-- Site navigation menu -->
<ul class="navbar">
<li><a href="#">Home page</a>
</ul>
<!-- Main content -->
<h1>Offer Test Page</h1>
<p>Welcome to my test page!
<form action="#" method="POST">
<div>
<input type="text" name="phone" value="<?echo $data["phone"]?>" style="width: 300px;">
<input type="submit" name="submit" value="Send">
</div>
</form>
<p>
<!-- Sign and date the page, it's only polite! -->
<address>Made 5 March 2017<br>
by myself.</address>
</body>
</html>
View File
View File
+6
View File
@@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
+6
View File
@@ -0,0 +1,6 @@
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+136
View File
@@ -0,0 +1,136 @@
<?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
@@ -0,0 +1,523 @@
<?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'] = '';
+536
View File
@@ -0,0 +1,536 @@
<?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'] = '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
/*
|--------------------------------------------------------------------------
| 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'] = 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.
|
| 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'] = '';
+271
View File
@@ -0,0 +1,271 @@
<?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',72000);
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_SENDTOME',777);
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_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_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);
+109
View File
@@ -0,0 +1,109 @@
<?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
@@ -0,0 +1,24 @@
<?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
@@ -0,0 +1,29 @@
<?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
@@ -0,0 +1,103 @@
<?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
@@ -0,0 +1,13 @@
<?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
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>
+19
View File
@@ -0,0 +1,19 @@
<?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
@@ -0,0 +1,84 @@
<?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
@@ -0,0 +1,167 @@
<?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
@@ -0,0 +1,14 @@
<?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
|
*/
+55
View File
@@ -0,0 +1,55 @@
<?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'] = 'site';
$route['404_override'] = 'Wrb404';
$route['translate_uri_dashes'] = FALSE;
+64
View File
@@ -0,0 +1,64 @@
<?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
@@ -0,0 +1,214 @@
<?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
@@ -0,0 +1,20 @@
<?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);
}
}
+71
View File
@@ -0,0 +1,71 @@
<?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);
}
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
@@ -0,0 +1,17 @@
<?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
@@ -0,0 +1,43 @@
<?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
@@ -0,0 +1,134 @@
<?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);
}
}
+53
View File
@@ -0,0 +1,53 @@
<?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);
}
}
+540
View File
@@ -0,0 +1,540 @@
<?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 "
. "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, "
. "'<input type=submit id=\"accs'||m.id||'\" onclick=\"return smoneyDetail('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Detail\">' As Detail, "
. "'<input type=submit id=\"acc'||m.id||'\" onclick=\"return smoneyProcess('||m.id||')\" name=\"manage\" class=\"btn btn-info btn-sm\" value=\"Process\">' As Process "
. "FROM money_transfer m "
. "LEFT JOIN members me ON me.id=m.member_id "
. "LEFT JOIN sendmoney_recipient sr ON sr.id=m.recipientid "
. "LEFT JOIN members_payments mp ON mp.what_sendmoney = m.id "
. "LEFT JOIN bank_entity_codes be ON be.code=sr.bank_code WHERE m.id=" . $sendmoney_id;
$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;
$data['action'] = WRENCHBOARD_SMONEY_BKOPROC;
$data['action_mode'] = SMONEY_PROCC_MANUAL;
$this->load->model('backend_model');
$out = array();
$this->backend_model->wrenchboard_api($data, $out);
echo $out['status'];
break;
}
}
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 "
. "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;
$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><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> [another tabble]";
return $myTable;
}
private function sendmoneyProcessPage($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>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('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-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 =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/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
@@ -0,0 +1,625 @@
<?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
@@ -0,0 +1,34 @@
<?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
@@ -0,0 +1,100 @@
<?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
@@ -0,0 +1,154 @@
<?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
@@ -0,0 +1,91 @@
<?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);
}
}
+306
View File
@@ -0,0 +1,306 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Dash extends Users_Controller {
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;
$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('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);
$x = $this->dashTaskMessage();
$data['job_message_table'] = $x['job_message_table'];
/// End table data ===========================
/*
$this->load->library('table');
$this->table->set_template($this->template);
//$this->table->set_heading('Job', 'Client', 'Terms', 'Description', 'Manage', 'Status');
$mysql = 'SELECT jo.added::date,jo.member_id,j.title,'
. 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status'
. 'FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id LIMIT 5';
// $sqb =" ,'<button type=\"button\" class=\"btn btn-primary btn-xs\">View</button>' As View ";
$jbx = "''jobs/viewjob''";
$mysql = "SELECT jo.added::date,j.title,"
. 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status,'
. "'<input type=submit onclick=\"return post_nav_find_action($jbx,'''||jo.offer_code||''')\" name=\"manage\" class=\"btn btn-primary btn-xs\" value=\"View\">' AS View "
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
. "WHERE jo.expire > now() AND jo.status = 1 "
. "AND jo.client_id = " . $_SESSION['member_id'] . "LIMIT 4";
$query = $this->db->query($mysql);
$num = $query->num_rows();
$data["dash_title"] = "Pending Offer(s)";
if ($num > 0) {
$this->table->set_heading('Added', 'Title', 'Status', '');
$data['offer_dash'] = $this->table->generate($query);
} else {
$data["offer_dash"] = "<div class=\"thumb\"><img src='assets/images/notask.png' alt=\"Active Projects\"></div>";
}
*/
$ya = array();
$ya = $this->dash_title();
$data["dash_title"] = $ya["dash_title"];
$data["offer_dash"] = $ya["offer_dash"];
$_SESSION['secure_data'] = $data; // all data needed for secure page
// print_r($_SESSION);
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_dash', $data);
$this->load->view('users/view_footer_user', $data);
}
}
private function dashTaskMessage() {
$data = array();
/*
wrenchboard=> select s.created,j.contract,j.title,j.id,j.status,j.delivery_date,substring(s.message,0,100) FROM members_jobs_contract j RIGHT JOIN jobs_contract_message s ON s.contract=j.contract WHERE j.member_id=3 or j.client_id = 3 AND j.status IN (1,4);
created | contract | title | id | status | delivery_date | substring
----------------------------+------------+-----------------------------------------------+----+--------+----------------------------+-----------------------------------------------------------------------------------------------------
2017-05-18 11:53:20.569399 | 7BW9B9R8BB | five thousand naira | 13 | 1 | 2017-08-02 14:19:38.711257 | This is a test of ajax send message
2017-05-18 12:03:30.685328 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | dldldldldldl
2017-05-18 12:03:44.137005 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | This is an empty list test
2017-05-18 12:04:00.228586 | 7B27RRBRB7 | 595Job Title Job Title Job Title Job Title932 | 15 | 4 | 2017-05-10 19:23:26.115394 | List should be populated now
2017-05-18 20:49:12.996077 | 7BW9B9R8BB | five thousand naira | 13 | 1 | 2017-08-02 14:19:38.711257 | About PayQuic\r +
| | | | | | PayQuic is global payments and airtime top-up company. Open for business 24/7, 365 d
2017-06-12 10:28:32.720786 | 601BBWRW48 | 595Job Title Job Title Job Title Job Title932 | 10 | 1 | 2017-08-09 16:08:43.503739 | <table><tbody><tr><td><div><span><br>can you share your controller method and did you tried&nbsp;<c
2017-06-12 10:28:41.932836 | 601BBWRW48 | 595Job Title Job Title Job Title Job Title932 | 10 | 1 | 2017-08-09 16:08:43.503739 | <table><tbody><tr><td><div><span><br>can you share your controller method and did you tried&nbsp;<c
*/
$jbx = "''/proj/thisjob''";
$mysql = " SELECT s.created,j.contract,j.title,j.id,j.status,j.delivery_date,substring(s.message,0,100),"
. " '<input type=submit onclick=\"return post_nav_find_action($jbx, '||j.id||')\" name=\"manage\" class=\"btn btn-success btn-xs btn-block\" value=\"View\">' "
. " FROM members_jobs_contract j "
. " RIGHT JOIN jobs_contract_message s ON s.contract=j.contract "
. " WHERE j.member_id=" . $_SESSION['member_id'] . " OR j.client_id = " . $_SESSION['member_id'] . " AND j.status IN (1,4)";
$mysql = " SELECT s.created::date ||'<br>'||j.contract AS date_contract,'<b>Title:</b>'||j.title||'<br>'||substring(s.message,0,90) as title_message,"
. " '<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);
return $data;
}
private function dash_title() {
$offer_found = false;
$data = array();
$data['offer_dash'] = '';
$this->load->library('table');
$this->table->set_template($this->template);
$jbx = "''/jobs/viewjob''";
$mysql = "SELECT jo.added::date,j.title,"
. "'<input type=submit onclick=\"return post_nav_find_action($jbx,'''||jo.offer_code||''')\" name=\"manage\" class=\"btn btn-primary btn-xs\" value=\"View\">' AS View "
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
. "WHERE jo.expire > now() AND jo.status = 1 "
. "AND jo.client_id = " . $_SESSION['member_id'] . " LIMIT 4";
// . 'CASE WHEN jo.status = 1 THEN \'Pending\' ELSE \'Other\' END AS status,'
$query = $this->db->query($mysql);
$num = $query->num_rows();
$data["dash_title"] = "Pending Offer(s)";
if ($num > 0) {
// 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);
$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'>My Pending Offer(s)</a>";
$jbx = "''/jobs/viewmyjob''";
$mysql = "SELECT jo.added::date||'<br>'||jo.expire::date,j.title||'<br><b>To :</b>'||(CASE WHEN jo.public_view > 0 THEN '-Public View' ELSE jo.email END) AS tRec,"
. '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 "
. "FROM members_jobs_offer jo LEFT JOIN members_jobs j ON j.id = jo.job_id "
. "WHERE jo.expire > now() AND jo.status = 1 "
. "AND jo.member_id = " . $_SESSION['member_id'] . " ORDER BY jo.id DESC LIMIT 4";
$query = $this->db->query($mysql);
$num = $query->num_rows();
if ($num > 0) {
// 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);
$offer_found = true;
}
}
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";
}
}
+24
View File
@@ -0,0 +1,24 @@
<?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');
}
}
+32
View File
@@ -0,0 +1,32 @@
<?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');
}
}
+17
View File
@@ -0,0 +1,17 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Home extends WRB_Controller {
public function index() {
$this->home1('');
}
public function about() {
$this->home2('home2/about');
}
}
+20
View File
@@ -0,0 +1,20 @@
<?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);
redirect('/registration');
}
}
File diff suppressed because it is too large Load Diff
+667
View File
@@ -0,0 +1,667 @@
<?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'];
}
}
+167
View File
@@ -0,0 +1,167 @@
<?php
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'));
}
public function index() {
$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('dash');
}
} 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'];
$proceed = false;
//$data["login_message"] = $user["id"]."/".$user["name"]."/".$user["email"]."<a href='".$this->lib_login->getLogoutUrl()."'>Logout</a>";
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "') AND password IS NULL AND fb_id='" . $user["id"] . "'";
$query = $this->db->query($q);
if (count($query->result_array)) {
// Account exists
$proceed = true;
} else {
$q = "SELECT * FROM members WHERE lower(email)=lower('" . $user["name"] . "')";
$query = $this->db->query($q);
if (count($query->result_array)) {
$data["login_message"] = "The e-mail " . $user["email"] . " is already registered. You should login with your username and password.";
} else {
// Create account
$proceed = true;
}
}
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();
$this->logUser('Account login');
$this->refreshAccountDetail($_SESSION['member_id']);
$this->getSessionArray();
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"] . "</div></div>";
}
$data['title'] = "Login"; // Capitalize the first letter
$data['page_title'] = "Login WrenchBoard";
//$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_login', $data);
$this->load->view('users/view_external_footer');
}
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);
}
public function logout() {
$this->lib_login->destroy_session();
redirect('login', redirect);
}
}
+17
View File
@@ -0,0 +1,17 @@
<?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
@@ -0,0 +1,143 @@
<?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();
}
}
+15
View File
@@ -0,0 +1,15 @@
<?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);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?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');
}
}
@@ -0,0 +1,55 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
class Password_recovery extends CI_Controller {
public function index() {
//echo "ameye kvkgkg";
$data['action_message'] = "";
if ($_POST) {
$data['email'] = $this->input->post('email');
if ($data['email'] == '') {
$out['error'] = 'Please specify valid emal to continue';
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-danger no-border\">" . $out['error'] . "</div></div>";
} else {
//WRENCHBOARD_ACCOUNT_RESETPASS
$this->resetMemberPass($data['email']);
$out['error'] = "If we find your email, you will receive a link to reset your password. Please use or <a href='/contact'>contact form</a> if you did not get our message after few minutes. ";
$data['action_message'] = "<div class=\"text-left\"><div class=\"alert alert-info no-border\">" . $out['error'] . "</div></div>";
}
}
$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');
}
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;
}
}
+29
View File
@@ -0,0 +1,29 @@
<?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();
}
}
+105
View File
@@ -0,0 +1,105 @@
<?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;
$this->jobViewPage($offerCode);
}
private function jobViewPage($offerCode) {
/* $data['sitename'] = 'home';
$this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_index');
$this->load->view('users/view_external_footer');
* */
// $this->load->view('users/view_index');
// $this->load->view('users/view_external_footer');
$data = array();
$mysql = "SELECT jo.expire,jo.id AS offer_id, jo.offer_code,mj.title,mj.description,mj.timeline_days,mj.price,jo.job_description FROM members_jobs_offer jo "
. " LEFT JOIN members_jobs mj ON mj.id=jo.job_id "
. " WHERE mj.status=1 AND jo.status=1 "
. " 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>";
// $this->table->set_heading('Added/Expire', 'Title/Recipient', 'Status', '');
$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();
/*
$mysql2 = " SELECT o.*,j.title,j.description,j.timeline_days,j.price,j FROM members_jobs_offer o "
. " LEFT JOIN members_jobs j ON j.id =o.job_id "
. " WHERE o.public_view =1 AND o.offer_code<>'" . $offerCode . "' AND o.expire> now() ORDER BY o.id DESC LIMIT 50";
$query = $this->db->query($mysql2);
$data["numof_other_jobs"] = $query->num_rows();
$data["job_data"] = $query->result();
*/
$this->load->view('templates/view_header_market', $data);
$this->load->view('site/view_market', $data);
$this->load->view('templates/view_footer_market', $data);
}
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-striped table-hover table-bordered table-condensed'><tr><td colspan='2' ><b> Timeline:</b>" . $row['timeline_days'] . " day(s) - <b>Budget: </b> " . $row['price'] * 0.01 . " Naira</td></tr>"
. "<tr><td style='width:100px;'><b>Title</b></td><td>" . $row['title'] . "</td></tr>"
. "<tr><td><b>Description</b></td><td>" . $row['description'] . "</td></tr>"
. "<tr><td><b>Detail</b></td><td>" . $row['job_description'] . "</td></tr>"
. "<tr><td colspan='2' >Interests : <b>" . $data['interest'] . "</b> Expire:<b> " . $row['expire'] . "</b> </td></tr>"
. "<tr><td><b></b></td><td style='text-align:right;'><input type=submit id='submit_interest_" . $row['offer_code'] . "' name=\"mview\" onclick=\"return LoginInterest('" . $row['offer_code'] . "');\" class=\"btn btn-success btn-xs\" value=\"see more ?
\"></td></tr>"
. "</table> ";
}
}
+20
View File
@@ -0,0 +1,20 @@
<?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
+141
View File
@@ -0,0 +1,141 @@
<?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');
$data['ref_firstname'] = $ref_firstname;
$data['ref_lastname'] = $ref_lastname;
$data['ref_email'] = $ref_email;
$data['action'] = WRENCHBOARD_ACCOUNT_SENDREFER;
// print_r( $data );
$this->load->model('backend_model');
$out = array();
$res = $this->backend_model->wrenchboard_api($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');
$config = array();
$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["total_rows"] = $query->num_rows();
$config["base_url"] = base_url() . "/refer/refpage";
$config["per_page"] = 5;
$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;
$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['page_title'] ="Refer a Friend";
$this->load->view('users/view_header_user', $data);
$this->load->view('users/view_refer', $data);
$this->load->view('users/view_footer_user', $data);
}
public function refagree() {
$data = $this->getSessionArray();
if ($_SESSION['refer'] != '') {
redirect('/refer');
}
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();
$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);
}
}
+90
View File
@@ -0,0 +1,90 @@
<?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
@@ -0,0 +1,134 @@
<?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
@@ -0,0 +1,86 @@
<?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
@@ -0,0 +1,90 @@
<?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);
$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);
}
}
+29
View File
@@ -0,0 +1,29 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
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');
* */
$this->home1();
}
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
@@ -0,0 +1,56 @@
<?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
@@ -0,0 +1,20 @@
<?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
@@ -0,0 +1,32 @@
<?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');
}
}
+51
View File
@@ -0,0 +1,51 @@
<?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'] = "About WrenchBoard";
$data['email'] = "ameye@chiefsoft.com";
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('users/view_vemail', $data);
}
// 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
// $this->load->view('templates/header_boxed', $data);
$this->load->view('users/view_error', $data);
// $this->load->view('templates/footer_boxed', $data);
}
}
+25
View File
@@ -0,0 +1,25 @@
<?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');
}
}
+23
View File
@@ -0,0 +1,23 @@
<?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['content'] = 'error_4042'; // View name
$this->load->view('templates/header_boxed', $data);
$this->load->view('errors/cli/error_wrb_404', $data); //loading in my template
$this->load->view('users/view_external_footer');
}
}
+11
View File
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<html>
<head>
<title>403 Forbidden</title>
</head>
<body>
<p>Directory access is forbidden.</p>
</body>
</html>

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