Example #1
0
 function savePost($postdata)
 {
     $id = htmlentities($postdata['id']);
     $alias = Helper::createAlias($postdata['title']);
     $title = htmlentities($postdata['title']);
     $text = htmlentities($postdata['text']);
     $posted_by = htmlentities($postdata['posted_by']);
     $date = date("Y-m-d H:i:s");
     $post = new PostModel();
     $post->edit($id, $date, $title, $text, $posted_by, $alias);
     $post->save();
 }
Example #2
0
 function __construct()
 {
     $visitor = new Visitor();
     $visitor->add(Helper::getIP(), Helper::getBrowser());
     $page = new Page();
     if (isset($_GET['adress']) && !isset($_POST)) {
         $page->register($_GET['adress']);
         Route::get($_GET['adress']);
     } else {
         if (isset($_GET['adress']) && isset($_POST)) {
             $page->register($_GET['adress']);
             Route::get($_GET['adress'], $_POST);
         } else {
             $page->register('/');
             Route::get('/');
         }
     }
 }
Example #3
0
 function stats()
 {
     if (Session::isSession('user')) {
         $getstat = new Visitor();
         $daily = $getstat->getDaily();
         $bpercent = $getstat->getBrowser();
         $getstat2 = new Page();
         $pages = $getstat2->getDaily();
         $this->view->addIp($_SERVER['REMOTE_ADDR']);
         $this->view->addBrowser(Helper::getBrowser());
         $this->view->addDaily($daily);
         $this->view->addPages($pages);
         $this->view->addBrowserpercent($bpercent);
         $this->view->forAjax('stats');
     } else {
         Error::authFail();
     }
 }
Example #4
0
        if ($t['value'] > 0) {
            echo '<span class="addressReceive">+';
        } else {
            echo '<span class="addressSend">';
        }
        ?>
				<?php 
        echo \lib\Helper::formatXPY($t['value']);
        echo '</span>';
        if ($t['type'] == 'stake') {
            echo '<span class="label label-info" style="margin-left: 15px">Stake</span>';
        }
        ?>
			</td>
			<td class="text-right"><?php 
        echo \lib\Helper::formatXPY($t['balance']);
        ?>
</td>
		</tr>
		<?php 
    }
    ?>
		</tbody>
	</table>

	<div>
		<?php 
    if ($addressInformation['totalTransactions'] > $limit) {
        $showing = 'all';
        if ($limit != 'all') {
            $showing = $limit . ' of';
Example #5
0
					<input type="hidden" id="id" class="form-control" value="<?php 
echo $data['id'];
?>
">

					<input type="text" id="post_title" class="form-control" placeholder="Post title" value="<?php 
echo $data['title'];
?>
">
					<br>
					<textarea name="" id="post_text" class="form-control" rows="3" required="required" placeholder="Post text"><?php 
echo $data['text'];
?>
</textarea>
					<br>
					<button type="button" class="btn btn-success" id="savebtn">Save post</button>
					<a href="http://<?php 
echo __MAIN__;
?>
">
						<button type="button" class="btn btn-warning" id="cancelbtn">Cancel</button>
					</a>
				</form>
		  </div>
	
	</div>
</div>

<?php 
Helper::addJS('edit');
    echo $bids['bidrank'];
    ?>
</td>
				<td ><?php 
    echo \lib\Helper::getAddressLink($bids['address'], $addressTagMap);
    ?>
</td>
				<td ><?php 
    echo \lib\Helper::formatXPY($bids['bid'], $addressTagMap);
    ?>
</td>
				<td ><?php 
    echo $bids['percent'];
    ?>
 %</td>
				<td ><?php 
    echo $bids['rank'];
    ?>
</td>
				<td class="text-right"><?php 
    echo \lib\Helper::formatXPY($bids['balance'], $addressTagMap);
    ?>
</td>
			</tr>
		<?php 
}
?>
	</table>

</div>
Example #7
0
	<?php 
use Lib\Helper;
?>


	</div>
	</div>
	
	
	 
<?php 
Helper::addJS('main');
?>
	
</body>
</html>
    echo $primeStake['hash'];
    ?>
"><?php 
    echo $primeStake['block_height'];
    ?>
</td>
				<td><?php 
    echo \lib\Helper::getTxHashLink($primeStake['txid']);
    ?>
</td>
				<td><?php 
    echo \lib\Helper::getAddressLink($primeStake['address'], $addressTagMap);
    ?>
</td>
				<td><?php 
    echo \lib\Helper::formatXPY($primeStake['value']);
    ?>
</td>
				<td><?php 
    echo \lib\Helper::formatTime($primeStake['time']);
    ?>
</td>
			</tr>
		<?php 
}
?>
	</table>

</div>

Example #9
0
		<input type="password" class="form-control" id="regpass" placeholder="******">
	</div>
	
	<div class="form-group">
		<label for="regname">Password again</label>
		<input type="password" class="form-control" id="regpass2" placeholder="******">
	</div>
	<div class="form-group">
	<label for="authlevel">Authentication level</label>
	<select name="authlevel" id="authlevel" class="form-control" required="required">
		<option value="1">View only</option>
		<option value="2">View & Create</option>
		<option value="3">View & Create & Edit</option>
		<option value="4">View & Create & Edit & Delete</option>
	</select>
</div>
	<div>
	Restrictions:
		<ul>
			<li>Username : >5 characters</li>
			<li>Password : >5 characters</li>
		</ul>
	</div>

	<button type="button" class="btn btn-primary" id="regbtn">Register</button>
</form>	
</div>

<?php 
Helper::addJS('register');
Example #10
0
					</tr>
				<?php 
} else {
    foreach ($distribution as &$row) {
        $row['percent'] = 0;
        if ($last['holdings'] > 0) {
            $row['percent'] = round($row['holdings'] / $last['holdings'] * 100, 2);
        }
        ?>
						<tr>
							<td><?php 
        echo $row['top'];
        ?>
</td>
							<td><?php 
        echo \lib\Helper::formatXPY($row['holdings']);
        ?>
</td>
							<td><?php 
        echo $row['percent'];
        ?>
 %</td>
						</tr>
					<?php 
    }
    ?>
					<script>
						var options = {
							chart: {
								type: 'pie',
								options3d: {
						><?php 
    echo date('c', $transaction['time']);
    ?>
</time></td>
				<td><?php 
    echo \lib\Helper::getTxHashLink($transaction['txid']);
    ?>
</td>
				<td class="text-right">
					<?php 
    if ($transaction['value'] > 0) {
        echo '<span class="addressReceive">+ ';
    } else {
        echo '<span class="addressSend">';
    }
    echo \lib\Helper::formatXPY($transaction['value']);
    ?>
</span>
				</td>
				<td ><?php 
    echo \lib\Helper::getAddressLink($transaction['address'], $addressTagMap);
    ?>
</td>
			</tr>
		<?php 
}
?>
	</table>

</div>
Example #12
0
        if ($out['type'] == 'nonstandard' && $i == 0 && $k == 0) {
            echo "<tr><td>Included in following transaction(s)</td>" . "<td class='text-right'>" . \lib\Helper::formatXPY($created) . "</td>";
            continue;
        }
        if (empty($out['address'])) {
            continue;
        }
        ?>

							<tr>
								<td><?php 
        echo \lib\Helper::getAddressLink($out['address']);
        ?>
</td>
								<td class="text-right"><?php 
        echo \lib\Helper::formatXPY($out['value']);
        ?>
</td>
							</tr>
							<?php 
    }
    ?>
						</table>


					</td>
					<td class="text-right"></td>
				</tr>
			<?php 
}
?>
Example #13
0
	<h6><b>Author:</b> <?php 
    echo $post['posted_by'];
    ?>
</h6>
	<h6><b>Date:</b> <?php 
    echo $post['date'];
    ?>
</h6>
	<p style="word-break: break-all;"><?php 
    echo $post['text'];
    ?>
...</p>
	

	<button type="button" class="btn btn-sm btn-success readmore"  data-alias="<?php 
    echo $post['alias'];
    ?>
" >Read more</button>
	

	<hr>

	<?php 
}
?>

	<?php 
Helper::addJS('index');
?>
	
</div>
Example #14
0
	<!DOCTYPE html>
	<html lang="hu">
		<head>
			<meta charset="utf-8">
			<meta http-equiv="X-UA-Compatible" content="IE=edge">
			<meta name="viewport" content="width=device-width, initial-scale=1">
			<title>My Blog</title>
	
			<!-- Bootstrap CSS -->
			<link href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet">
			<script src="//code.jquery.com/jquery.js"></script>
			<script src="//netdna.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>

			<?php 
Helper::addCSS('main');
?>
			
		</head>
		<body>
		<input type="hidden" id="site_folder" value="<?php 
echo SITE_FOLDER;
?>
">

		<nav class="navbar navbar-default" role="navigation">
			<!-- Brand and toggle get grouped for better mobile display -->
			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
					<span class="sr-only">Toggle navigation</span>
					<span class="icon-bar"></span>