Skip to content

Instantly share code, notes, and snippets.

View Alex-Bond's full-sized avatar
🏠
Working from home

Alex Bondarevskyi Alex-Bond

🏠
Working from home
View GitHub Profile
<div class="row">
<div class="span12">
<h1><?php echo $h1; ?></h1>
</div>
</div>
<form action="" method="POST">
<div class="row">
<div class="span6">
<div class="row">
<div class="span12">
public function actionLogger()
{
$base = Yii::app()->db->createCommand()->select('*')->from('cr_log')->order("when DESC");
$where = array();
$where_replace = array();
if (isset($_GET['username']) AND strlen($_GET['username']) > 0) {
$where[] = 'username LIKE \'%' . $_GET['username'] . '%\'';
}
if (isset($_GET['type']) AND $_GET['type'] != 0) {
$where[] = 'type=:type';