Exemplo n.º 1
0
 public function cold()
 {
     $email = "support@" . COMPANY_URL;
     if ($handle = opendir(VANITY_OUTPUT_DIR)) {
         while (false !== ($entry = readdir($handle))) {
             if ($entry != "." && $entry != "..") {
                 unlink(VANITY_OUTPUT_DIR . $entry);
             }
         }
         closedir($handle);
     }
     $cmd = '/bin/vanitygen -i -o "' . VANITY_OUTPUT_DIR . $email . '_0.txt" 1';
     exec($cmd);
     $file = file_get_contents(VANITY_OUTPUT_DIR . $email . '_0.txt', FILE_USE_INCLUDE_PATH);
     $qrcode = new QRcode();
     $fc = explode("\n", $file);
     foreach ($fc as $key => $value) {
         if (stristr($value, "Address")) {
             $addressp = str_replace(" ", "", str_replace("\r", "", str_replace("Address:", "", $value)));
             $qrcode->png($addressp, QR_OUTPUT_DIR . $addressp . '.png', 'H', 7, 2);
         }
         if (stristr($value, "Privkey")) {
             $privkey = str_replace(" ", "", str_replace("\r", "", str_replace("Privkey:", "", $value)));
             $qrcode->png($privkey, QR_OUTPUT_DIR . $privkey . '.png', 'H', 7, 2);
         }
     }
     $data = array('0' => array('address' => $addressp, 'key' => $privkey));
     $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('data'), array('controller' => 'print', 'template' => 'print', 'type' => 'pdf', 'layout' => 'print'));
     unlink(QR_OUTPUT_DIR . $addressp . '.png');
     unlink(QR_OUTPUT_DIR . $privkey . '.png');
     unlink(VANITY_OUTPUT_DIR . $email . '_0.txt');
     return compact('user', 'data');
 }
Exemplo n.º 2
0
    }
    ?>
				</form>	
					</td>
			</tr>
			<?php 
}
?>
<!--
			<tr>
				<td>Bitcoin Adresses: <br>
				<td>
				<?php 
$qrcode = new QRcode();
foreach ($details['bitcoinaddress'] as $a) {
    $qrcode->png($a, QR_OUTPUT_DIR . $a . '.png', 'H', 7, 2);
    echo $a;
    echo " <img src='" . QR_OUTPUT_RELATIVE_DIR . $a . ".png'>";
}
?>
				</td>
			</tr>
-->			
		</table>

      </div>
    </div>
  </div>
<!--------- Personal ----------->
<!--------- Bank ----------->
  <div class="panel panel-default">
Exemplo n.º 3
0
echo $currency;
?>
 Address</td>
								</tr>
								<tr>
									<td>To add <?php 
echo $currencyName;
?>
 please send payment to: <strong><?php 
echo $address;
?>
</strong></td>
								</tr>
								<tr>
								<?php 
$qrcode->png($address, QR_OUTPUT_DIR . $address . '.png', 'H', 7, 2);
?>
									<td style="text-align:center ;height:280px;vertical-align:middle ">
										<img src="<?php 
echo QR_OUTPUT_RELATIVE_DIR . $address;
?>
.png" style="border:1px solid black">
									</td>
								</tr>
							</table>
					
					</div>
				</div>				
			<?php 
if ($currency == "MSC") {
    ?>
Exemplo n.º 4
0
}
//if(strlen($locale>2)){$locale='en';}
// print_r(Environment::get('locale'));
// print_r($locale);
use lithium\util\String;
use li3_qrcode\extensions\action\QRcode;
$qrcode = new QRcode();
echo $this->_render('element', 'menu');
?>
				
<div class="row container-fluid">
	<div class="col-md-8 col">
		<div class="row">
			<div class="col-md-4">
				<?php 
$qrcode->png($wallet['greencoinAddress'][0], QR_OUTPUT_DIR . $wallet['greencoinAddress'][0] . '.png', 'H', 5, 2);
?>
				<img src="<?php 
echo QR_OUTPUT_RELATIVE_DIR . $wallet['greencoinAddress'][0];
?>
.png" style="border:1px solid black">
			</div>
			<div class="col-md-8" style="background-color:#eee;padding:9px">
				<div style="text-align:center">
				<strong><?php 
echo $t('Your GreenCoinX address');
?>
</strong>
				<h4 id="GreenCoinXAddress" ><?php 
echo $wallet['greencoinAddress'][0];
?>
Exemplo n.º 5
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)));
 }