public function sendPassword($oneCode = null, $email = null)
 {
     /////////////////////////////////Email//////////////////////////////////////////////////
     $emaildata = array('oneCode' => $oneCode, 'email' => $email);
     $function = new Functions();
     $compact = array('data' => $emaildata);
     $from = array(NOREPLY => "noreply@" . COMPANY_URL);
     $email = $email;
     $function->sendEmailTo($email, $compact, 'process', 'sendOneCode', "XGCWallet - Email Verify", $from, '', '', '', null);
     /////////////////////////////////Email//////////////////////////////////////////////////
     return $this->render(array('json' => array('success' => 1)));
 }
 public function login($walletid = null, $msg = null)
 {
     Session::delete('default');
     if ($this->request->data) {
         if (stristr($_SERVER['HTTP_REFERER'], COMPANY_URL) === FALSE) {
             return $this->redirect('/wallet/login');
             exit;
         }
         $user = Users::find("first", array("conditions" => array("walletid" => $this->request->data['uuid'])));
         $details = Details::find('first', array('conditions' => array('walletid' => $this->request->data['uuid'])));
         if ($details['password']['send']['email'] === true) {
             //				print_r($this->request->data['signinpassword']);
             //print_r($deails['password']['send']['email']);exit;
             $signinpass = $this->request->data['signinpassword'];
             if ($signinpass != $details['signinCode']) {
                 return $this->redirect('wallet::login');
             } else {
                 $data = array('signinCodeused' => 'Yes');
                 Details::find('first', array('conditions' => array('walletid' => $this->request->data['uuid'])))->save($data);
             }
         }
         if (password_verify($this->request->data['password'], $user['password'])) {
             $uuid = new Uuid();
             $default = array("_id" => (string) $user['_id'], "code" => $user['code'], "email" => $user['email'], "phone" => $user['phone'], "password" => $this->request->data['password'], "walletid" => $user['walletid'], "xwalletid" => $uuid->hashme($user['walletid']), "xcode" => $user['xcode'], "xemail" => $user['xemail'], "xphone" => $user['xphone'], "greencoinAddress" => $user['greencoinAddress'][0], "ip" => $user['ip'], "created" => $user['created']);
             Session::write('default', $default);
             /////////////////////////////////////Check for signin alerts and alert user==================================
             $details = Details::find('first', array('conditions' => array('walletid' => $this->request->data['uuid'])));
             if ($details['alert']['email']['signin'] === true) {
                 $user = Users::find('first', array('conditions' => array('walletid' => $this->request->data['uuid'])));
                 $email = $user['email'];
                 // sending email to the users
                 /////////////////////////////////Email//////////////////////////////////////////////////
                 $emaildata = array('walletid' => $this->request->data['uuid'], 'email' => $email);
                 $function = new Functions();
                 $compact = array('data' => $emaildata);
                 $from = array(NOREPLY => "noreply@" . COMPANY_URL);
                 $email = $email;
                 $function->sendEmailTo($email, $compact, 'ex', 'sendEmailSignIn', "XGCWallet - Sign in", $from, '', '', '', null);
                 /////////////////////////////////Email//////////////////////////////////////////////////
             }
             /////////////////////////////////////Check for signin alerts and alert user==================================
             return $this->redirect('wallet::wallet');
         } else {
             return $this->redirect('wallet::login');
         }
     }
     return compact('walletid', 'msg');
 }
Esempio n. 3
0
<?php

use app\extensions\action\Functions;
$function = new Functions();
ini_set('memory_limit', '-1');
$pdf =& $this->Pdf;
$this->Pdf->setCustomLayout(array('header' => function () use($pdf) {
    list($r, $g, $b) = array(200, 200, 200);
    $pdf->SetFillColor($r, $g, $b);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->Cell(0, 15, 'Paper / Cold Storage', 0, 1, 'C', 1);
    $pdf->Ln();
}, 'footer' => function () use($pdf) {
    $footertext = sprintf('Copyright © %d https://SiiCrypto.com. All rights reserved.', date('Y'));
    $pdf->SetY(-10);
    $pdf->SetTextColor(0, 0, 0);
    $pdf->SetFont(PDF_FONT_NAME_MAIN, '', 8);
    $pdf->Cell(0, 8, $footertext, 'T', 1, 'C');
}));
$pdf->SetHeaderMargin(0);
$pdf->SetFooterMargin(0);
$pdf->SetAuthor('https://SiiCrypto.com');
$pdf->SetCreator('*****@*****.**');
$pdf->SetSubject('In Bitcoin We Trust, Print ');
$pdf->SetKeywords('SiiCrypto.com, Print');
$pdf->SetTitle('https://SiiCrypto.com');
$pdf->SetAutoPageBreak(true);
foreach ($data as $d) {
    $value = "";
    if ($d['address'] != "") {
        $address = $d['address'];
Esempio n. 4
0
 public function add()
 {
     //assume there's no problem with authentication
     $noauth = false;
     //perform the authentication check and redirect on success
     Session::delete('default');
     $response = file_get_contents("http://ipinfo.io/{$_SERVER['REMOTE_ADDR']}");
     $IPResponse = json_decode($response);
     if ($IPResponse->tor) {
         // Display error message or something
         $user = "";
         Session::delete('default');
         return false;
     }
     $user = Users::find("first", array("conditions" => array("username" => $this->request->data['username'])));
     $default = array('username' => $user['username'], '_id' => $user['_id'], 'firstname' => $user['firstname'], 'lastname' => $user['lastname'], 'email' => $user['email'], 'walletid' => $user['walletid']);
     if (password_verify($this->request->data['password'], $user['password'])) {
         //Redirect on successful login
         $loginpassword = $this->request->data['loginpassword'];
         Session::write('default', $default);
         $details = Details::find('first', array('conditions' => array('username' => $default['username'], 'user_id' => (string) $default['_id'])));
         if ($details['active'] == "No") {
             Session::delete('default');
             return $this->redirect('/');
             exit;
         }
         if ($details["EmailPasswordSecurity"] === "true" || $details["EmailPasswordSecurity"] === null) {
             if ($details['oneCode'] === $this->request->data['loginpassword']) {
                 $data = array('oneCodeused' => 'Yes', 'lastconnected' => array('IP' => $IPResponse->ip, 'ISO' => $IPResponse->country, 'hostname' => $IPResponse->hostname, 'city' => $IPResponse->city, 'region' => $IPResponse->region, 'loc' => $IPResponse->loc, 'org' => $IPResponse->org, 'postal' => $IPResponse->postal, 'DateTime' => new \MongoDate()));
                 $details = Details::find('first', array('conditions' => array('username' => $default['username'], 'user_id' => (string) $default['_id'])))->save($data);
                 $details = Details::find('first', array('conditions' => array('username' => $default['username'], 'user_id' => (string) $default['_id'])));
                 if ($details["TOTP.Validate"] == 1 && $details["TOTP.Login"] == true) {
                     $totp = $this->request->data['totp'];
                     $ga = new GoogleAuthenticator();
                     if ($totp == "") {
                         Session::delete('default');
                     } else {
                         $checkResult = $ga->verifyCode($details['secret'], $totp, 2);
                         if ($checkResult == 1) {
                             Session::write('default', $default);
                             $user = Session::read('default');
                             /////////////////////////////////////////////////////////////////////////////////
                             $function = new Functions();
                             $IP = $function->get_ip_address();
                             $data = array('username' => $user['username'], 'IP' => $IPResponse->ip, 'ISO' => $IPResponse->country, 'hostname' => $IPResponse->hostname, 'city' => $IPResponse->city, 'region' => $IPResponse->region, 'loc' => $IPResponse->loc, 'org' => $IPResponse->org, 'postal' => $IPResponse->postal, 'DateTime' => new \MongoDate());
                             Logins::create()->save($data);
                             /////////////////////////////////////////////////////////////////////////////////
                             $user = Session::read('default');
                             return $this->redirect('ex::dashboard');
                             exit;
                         } else {
                             Session::delete('default');
                         }
                     }
                 } else {
                     Session::write('default', $default);
                     $user = Session::read('default');
                     /////////////////////////////////////////////////////////////////////////////////
                     $function = new Functions();
                     $IP = $function->get_ip_address();
                     $data = array('username' => $user['username'], 'IP' => $IPResponse->ip, 'ISO' => $IPResponse->country, 'hostname' => $IPResponse->hostname, 'city' => $IPResponse->city, 'region' => $IPResponse->region, 'loc' => $IPResponse->loc, 'org' => $IPResponse->org, 'postal' => $IPResponse->postal, 'DateTime' => new \MongoDate());
                     Logins::create()->save($data);
                     /////////////////////////////////////////////////////////////////////////////////
                     $user = Session::read('default');
                     return $this->redirect('ex::dashboard');
                     exit;
                 }
             } else {
                 Session::delete('default');
             }
         } else {
             $data = array('oneCodeused' => 'Yes', 'lastconnected' => array('IP' => $IPResponse->ip, 'ISO' => $IPResponse->country, 'hostname' => $IPResponse->hostname, 'city' => $IPResponse->city, 'region' => $IPResponse->region, 'loc' => $IPResponse->loc, 'org' => $IPResponse->org, 'postal' => $IPResponse->postal, 'DateTime' => new \MongoDate()));
             $details = Details::find('first', array('conditions' => array('username' => $default['username'], 'user_id' => (string) $default['_id'])))->save($data);
             $details = Details::find('first', array('conditions' => array('username' => $default['username'], 'user_id' => (string) $default['_id'])));
             Session::write('default', $default);
             $user = Session::read('default');
             /////////////////////////////////////////////////////////////////////////////////
             $function = new Functions();
             $IP = $function->get_ip_address();
             $data = array('username' => $user['username'], 'IP' => $IPResponse->ip, 'ISO' => $IPResponse->country, 'hostname' => $IPResponse->hostname, 'city' => $IPResponse->city, 'region' => $IPResponse->region, 'loc' => $IPResponse->loc, 'org' => $IPResponse->org, 'postal' => $IPResponse->postal, 'DateTime' => new \MongoDate());
             Logins::create()->save($data);
             /////////////////////////////////////////////////////////////////////////////////
             $user = Session::read('default');
             return $this->redirect('ex::dashboard');
         }
     }
     //if theres still post data, and we weren't redirected above, then login failed
     if ($this->request->data) {
         //Login failed, trigger the error message
         if (isset($this->request->query['check']) && $this->request->query['check'] == SECURITY_CHECK) {
             $check = $this->request->query['check'];
         }
         $noauth = true;
     }
     //Return noauth status
     $page = Pages::find('first', array('conditions' => array('pagename' => 'login')));
     $title = $page['title'];
     $keywords = $page['keywords'];
     $description = $page['description'];
     return compact('noauth', 'title', 'keywords', 'description');
     return $this->redirect('/');
     exit;
     // Handle failed authentication attempts
 }
Esempio n. 5
0
<?php

use app\extensions\action\Functions;
$function = new Functions();
?>
<h4>Company</h4>
<table class="table table-condensed table-bordered table-hover" style="font-size:12px ">
<tr>
<th>Username</th>
<th>Company</th>
<th>Short</th>
<th>Address</th>
<th>Country</th>
<th>Registration</th>
<th>URL</th>
<th>Verified</th>
</tr>


<?php 
foreach ($details as $detail) {
    ?>
<tr>
<td><a href="/Admin/companyverify/<?php 
    echo $detail['_id'];
    ?>
"><?php 
    echo $detail['username'];
    ?>
</a></td>
<td><?php 
Esempio n. 6
0
 public function array_sort($arr)
 {
     if (empty($arr)) {
         return $arr;
     }
     foreach ($arr as $k => $a) {
         if (!is_array($a)) {
             arsort($arr);
             // could be any kind of sort
             return $arr;
         } else {
             $arr[$k] = Functions::array_sort($a);
         }
     }
     return $arr;
 }
Esempio n. 7
0
 public function dashboard()
 {
     if ($this->request->query['json'] == true) {
         $this->_render['type'] = 'json';
     }
     $user = Session::read('default');
     $id = $user['_id'];
     if ($user == "") {
         return $this->redirect('/login');
         exit;
     }
     $details = Details::find('first', array('conditions' => array('user_id' => $id)));
     $trades = Trades::find('all');
     $YourOrders = array();
     foreach ($trades as $t) {
         $YourOrders['Buy'] = $this->YourOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourOrders['Sell'] = $this->YourOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourCompleteOrders['Buy'] = $this->YourCompleteOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourCompleteOrders['Sell'] = $this->YourCompleteOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
     }
     $Commissions = $this->TotalCommissions($id);
     $CompletedCommissions = $this->CompletedTotalCommissions($id);
     $RequestFriends = $this->RequestFriend($id);
     $UsersRegistered = Details::count();
     $functions = new Functions();
     $OnlineUsers = $functions->OnlineUsers();
     foreach ($trades as $t) {
         $TotalOrders['Buy'] = $this->TotalOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalOrders['Sell'] = $this->TotalOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalCompleteOrders['Buy'] = $this->TotalCompleteOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalCompleteOrders['Sell'] = $this->TotalCompleteOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
     }
     $title = "Dashboard";
     $keywords = "Dashboard, trading platform, bitcoin exchange, we trust, United Kingdom, UK";
     $description = "Dashboard for trading platform for bitcoin exchange in United Kingdom, UK";
     $settings = Settings::find('first');
     return compact('title', 'details', 'YourOrders', 'Commissions', 'CompletedCommissions', 'YourCompleteOrders', 'RequestFriends', 'UsersRegistered', 'OnlineUsers', 'TotalOrders', 'TotalCompleteOrders', 'keywords', 'description', 'settings');
 }
Esempio n. 8
0
 public function detail($username = null)
 {
     if ($this->__init() == false) {
         $this->redirect('ex::dashboard');
     }
     $transactions = Transactions::find('all', array('conditions' => array('username' => $username, 'Currency' => 'BTC'), 'order' => array('DateTime' => 'DESC')));
     $transactionsXGC = Transactions::find('all', array('conditions' => array('username' => $username, 'Currency' => 'XGC'), 'order' => array('DateTime' => 'DESC')));
     $Fiattransactions = Transactions::find('all', array('conditions' => array('username' => $username, 'Currency' => array('$nin' => array('BTC', 'XGC'))), 'order' => array('DateTime' => -1)));
     $details = Details::find('all', array('conditions' => array('username' => $username)));
     $userdetail = Details::find('first', array('conditions' => array('username' => $username)));
     $id = $userdetail['user_id'];
     $user = Users::find('all', array('conditions' => array('username' => $username)));
     $logins = Logins::find('first', array('conditions' => array('username' => $username), 'order' => array('DateTime' => -1)));
     $loginCount = Logins::find('count', array('conditions' => array('username' => $username)));
     $UserOrders = Orders::find('all', array('conditions' => array('username' => $username, 'Completed' => 'N'), 'order' => array('DateTime' => -1)));
     $UserCompleteOrders = Orders::find('all', array('conditions' => array('username' => $username, 'Completed' => 'Y'), 'order' => array('DateTime' => -1)));
     $title = "Detail user";
     $keywords = "Admin, Detail user";
     $description = "Admin Panel for user";
     $trades = Trades::find('all');
     $ex = new ExController();
     $YourOrders = array();
     foreach ($trades as $t) {
         $YourOrders['Buy'] = $ex->YourOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourOrders['Sell'] = $ex->YourOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourCompleteOrders['Buy'] = $ex->YourCompleteOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $YourCompleteOrders['Sell'] = $ex->YourCompleteOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
     }
     $Commissions = $ex->TotalCommissions($id);
     $CompletedCommissions = $ex->CompletedTotalCommissions($id);
     $RequestFriends = $ex->RequestFriend($id);
     $UsersRegistered = Details::count();
     $functions = new Functions();
     $OnlineUsers = $functions->OnlineUsers();
     foreach ($trades as $t) {
         $TotalOrders['Buy'] = $ex->TotalOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalOrders['Sell'] = $ex->TotalOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalCompleteOrders['Buy'] = $ex->TotalCompleteOrders($id, 'Buy', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
         $TotalCompleteOrders['Sell'] = $ex->TotalCompleteOrders($id, 'Sell', substr($t['trade'], 0, 3), substr($t['trade'], 4, 3));
     }
     return compact('title', 'transactions', 'transactionsXGC', 'details', 'user', 'UserOrders', 'Fiattransactions', 'UserCompleteOrders', 'title', 'keywords', 'description', 'logins', 'loginCount', 'YourOrders', 'YourCompleteOrders', 'Commissions', 'CompletedCommissions', 'TotalOrders', 'TotalCompleteOrders');
 }
Esempio n. 9
0
<?php

use app\extensions\action\Functions;
$functions = new Functions();
echo $this->_render('element', 'menu');
?>
				
<div class="row container-fluid">
	<div class="col-md-12">
		<div class="table-responsive">
			<table class="table table-bordered table-striped ">
				<tr>
					<th colspan="3"><small><?php 
echo $greencoinAddress;
?>
</small> &nbsp; <?php 
echo $wallet['email'];
?>
 &nbsp; +<?php 
echo $wallet['phone'];
?>
</th>
				</tr>
				<tr>
					<th>Total Received (XGC)</th>
					<th>Total Sent (XGC)</th>
					<th>Balance (XGC)</th>
				</tr>
				<tr>
					<th><?php 
echo substr(number_format($address['received'] / 100000000, 8), 0, -6);
Esempio n. 10
0
 public function checkCompanyemail()
 {
     $email = strtolower($this->request->query['email']);
     $uuid = new Uuid();
     $emails = Documents::find('first', array('conditions' => array('email' => $email)));
     if (count($emails) === 0) {
         $kyc_id = $uuid->v4v();
         $email_code = substr($kyc_id, 0, 4);
         $data = array('kyc_id' => $kyc_id, 'email_code' => $email_code, 'email' => $email, 'hash' => md5($email), 'IP' => $_SERVER['REMOTE_ADDR']);
         $Companies = Companies::create($data);
         $saved = $Companies->save();
     } else {
         $emails = Companies::find('first', array('conditions' => array('email' => $email)));
         $kyc_id = $emails['kyc_id'];
         if ($emails['Verify']['Score'] >= 80) {
             return $this->render(array('json' => array('success' => 0, 'reason' => 'Aleredy KYC complete')));
         }
     }
     /////////////////////////////////Email//////////////////////////////////////////////////
     $emaildata = array('kyc_id' => $kyc_id, 'email' => $email);
     $function = new Functions();
     $compact = array('data' => $emaildata);
     $from = array(NOREPLY => "noreply@" . COMPANY_URL);
     $email = $email;
     $function->sendEmailTo($email, $compact, 'process', 'sendKYCCompany', "KYCGlobal - Email Code", $from, '', '', '', null);
     /////////////////////////////////Email//////////////////////////////////////////////////
     return $this->render(array('json' => array('success' => 1)));
 }
Esempio n. 11
0
 public function updatex()
 {
     $email = $this->request->query['email'];
     $phone = $this->request->query['phoneNumber'];
     $code = $this->request->query['code'];
     $walletid = $this->request->query['walletid'];
     $passphrase = $this->request->query['passphrase'];
     $privkey = $this->request->query['privkey'];
     $ip = $this->request->query['ip'];
     $greencoinAddress = $this->request->query['greencoinAddress'];
     $user = Users::find("first", array("conditions" => array("walletid" => $walletid)));
     $greencoin = new Greencoin('http://' . GREENCOIN_WALLET_SERVER . ':' . GREENCOIN_WALLET_PORT, GREENCOIN_WALLET_USERNAME, GREENCOIN_WALLET_PASSWORD);
     $createWallet = $greencoin->importprivkey($privkey, $walletid, false);
     $filename = "Wallet_" + gmdate('Y-m-d_H-i-s', time()) . ".txt";
     $dumpwallet = $greencoin->dumpwallet($filename);
     $printdata = array('email' => $email, 'phone' => $phone, 'walletid' => $walletid, 'passphrase' => $passphrase, 'code' => $code, 'privkey' => $privkey, 'greencoinAddress' => $greencoinAddress, 'ip' => $ip, 'DateTime' => new \MongoDate());
     //create all QR Codes
     $qrcode = new QRcode();
     $qrcode->png($passphrase, QR_OUTPUT_DIR . "XGCWallet-" . $walletid . "-passphrase.png", 'H', 7, 2);
     $qrcode->png($walletid, QR_OUTPUT_DIR . "XGCWallet-" . $walletid . "-walletid.png", 'H', 7, 2);
     $qrcode->png($code, QR_OUTPUT_DIR . "XGCWallet-" . $walletid . "-code.png", 'H', 7, 2);
     $qrcode->png($privkey, QR_OUTPUT_DIR . "XGCWallet-" . $walletid . "-privkey.png", 'H', 7, 2);
     $qrcode->png($greencoinAddress, QR_OUTPUT_DIR . "XGCWallet-" . $walletid . "-greencoinAddress.png", 'H', 7, 2);
     // send email for password and QRCode print --------- start
     $view = new View(array('paths' => array('template' => '{:library}/views/{:controller}/{:template}.{:type}.php', 'layout' => '{:library}/views/layouts/{:layout}.{:type}.php')));
     echo $view->render('all', compact('printdata'), array('controller' => 'print', 'template' => 'walletsetup', 'type' => 'pdf', 'layout' => 'print'));
     // sending email to the users
     /////////////////////////////////Email//////////////////////////////////////////////////
     $function = new Functions();
     $compact = array('data' => $printdata);
     $from = array(NOREPLY => "noreply@" . COMPANY_URL);
     $email = $email;
     $function->sendEmailTo($email, $compact, 'ex', 'setupwd', "XGCWallet - important document", $from, '', '', '', null);
     $attach = QR_OUTPUT_DIR . 'XGCWallet-' . $printdata['walletid'] . "-Wallet" . ".pdf";
     $function->sendEmailTo($email, $compact, 'ex', 'setup', "XGCWallet - important document", $from, '', '', '', $attach);
     /////////////////////////////////Email//////////////////////////////////////////////////
     // send email for password and QRCode print --------- end
     $data = array('greencoinAddress.0' => $greencoinAddress);
     $conditions = array("walletid" => $walletid);
     Users::update($data, $conditions);
     //delete all QR code files from the server
     if ($handle = opendir(QR_OUTPUT_DIR)) {
         while (false !== ($entry = readdir($handle))) {
             if ($entry != "." && $entry != "..") {
                 if (strpos($entry, $printdata['walletid'])) {
                     unlink(QR_OUTPUT_DIR . $entry);
                 }
             }
         }
         closedir($handle);
     }
     Users::update($data, $conditions);
     return $this->render(array('json' => array('success' => 1)));
 }
Esempio n. 12
0
 public function submitcompany($id = null)
 {
     $company = Companies::find('first', array('conditions' => array('hash' => $id)));
     if (count($company) == 0) {
         return $this->redirect('kyc::index');
     }
     if (substr(Environment::get('locale'), 0, 2) == "en") {
         $locale = "en";
     } else {
         $locale = Environment::get('locale');
     }
     /////////////////////////////////Email//////////////////////////////////////////////////
     $emaildata = array('kyc_id' => $company['kyc_id'], 'email' => $company['email'], 'hash' => $company['hash'], 'name' => $company['company']['Name'], 'locale' => $locale);
     $email = $company['email'];
     $function = new Functions();
     $compact = array('data' => $emaildata);
     $from = array(NOREPLY => "noreply@" . COMPANY_URL);
     $email = SUPPORT;
     $function->sendEmailTo($email, $compact, 'process', 'verifyCompany', "XGCWallet - Verify KYC", $from, MAIL_2, '*****@*****.**', '*****@*****.**', null);
     /////////////////////////////////Email//////////////////////////////////////////////////
     $msg = "submit";
     $data = array('kyc_id' => $company['kyc_id'], 'email' => $company['email'], 'DateTime' => new \MongoDate());
     Submits::create()->save($data);
     return $this->redirect(array('kyc::index', '?' => compact('msg')));
     exit;
     //		return compact('document');
 }