Exemple #1
0
function router()
{
    $page = isset($_GET['page']) ? $_GET['page'] : "";
    switch ($page) {
        case 'review':
            review();
            break;
        default:
            main();
            break;
    }
}
 /**
  * function play( $id, $id_param, $back_url )
  * @param int $id contains the resource id
  * @param int $id_param contains the id needed for params retriving
  * @param string $back_url contain the back url
  * @return nothing return
  **/
 function play($id, $id_param, $back_url)
 {
     require_once $GLOBALS['where_lms'] . '/modules/poll/do.poll.php';
     $this->id = $id;
     $this->back_url = $back_url;
     $step = importVar('next_step');
     switch ($step) {
         case "poll_review":
             review($this, $id_param);
             break;
         case "play":
             playPollDispatch($this, $id_param);
             break;
         default:
             intro($this, $id_param);
             break;
     }
 }
    ?>
</dd>
					<?php 
}
?>
					
				</dl>
			</div>
			
			<div id="review">
			
				<?php 
$reviews = glob("{$movie}/review*.txt");
$num_reviews = count($reviews);
review($reviews, 0, $num_reviews / 2);
review($reviews, round($num_reviews / 2), $num_reviews);
?>
				
			</div>
			
			<p>(1-<?php 
echo $num_reviews;
?>
) of <?php 
echo $num_reviews;
?>
</p>
			
			<?php 
rating($score);
?>
    if (empty($error)) {
        $DataCustomers = database($CustomersFile, $email);
        if (empty($DataCustomers[6])) {
            $error[] = $lang['alert_authentification_db_customer'];
        }
    }
    @($pass = password_decode($key, $DataCustomers[14]));
    if ($password != $pass && empty($error)) {
        $error[] = $lang['alert_authentification_error_password'];
    }
    if (empty($error)) {
        @($_SESSION["review"] = $DataCustomers[6]);
    }
}
if (isset($email) && empty($error)) {
    $DataReviews = review($ReviewFile, $email);
    if (!empty($DataReviews)) {
        $LastReviews = end($DataReviews);
        $DataReview = explode('|', $LastReviews);
    }
}
@($textarea = isset($_GET['edit']) ? str_replace("<br>", "\n", $DataReview[8]) : $comments);
$textname = isset($_GET['edit']) ? @$DataReview[4] : $name;
$score = isset($_GET['edit']) || !empty($error) ? @$DataReview[5] : '0';
$status = isset($_GET['edit']) ? 'edit' : 'new';
if (isset($_POST['sendpass'])) {
    if (empty($_POST['email'])) {
        $error[] = $lang['alert_authentification_email'];
    } else {
        $email = $_POST['email'];
    }
Exemple #5
0
        return substr($model->SIG3_NM, 0, 16);
    } else {
        return substr($model->SIG3_NM, 0, 14) . '..';
    }
}, 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '125px', 'font-family' => 'verdana, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '125px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'PERIOD_END', 'label' => 'Tanggal Berakhir Perjanjian', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'PERIOD_END', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']], 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'PERIOD_START', 'label' => 'Tanggal awal Perjanjian', 'filterType' => \kartik\grid\GridView::FILTER_DATE_RANGE, 'filterWidgetOptions' => ['attribute' => 'PERIOD_START', 'presetDropdown' => TRUE, 'convertFormat' => true, 'pluginOptions' => ['format' => 'Y-m-d', 'separator' => ' TO ', 'opens' => 'left']], 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['attribute' => 'STATUS', 'filter' => $valStt, 'format' => 'raw', 'hAlign' => 'center', 'value' => function ($model) {
    if ($model->STATUS == 100) {
        return Html::a('<i class="glyphicon glyphicon-time"></i> Proccess', '#', ['class' => 'btn btn-warning btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } elseif ($model->STATUS == 101) {
        return Html::a('<i class="glyphicon glyphicon-ok"></i> Checked', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } elseif ($model->STATUS == 102) {
        return Html::a('<i class="glyphicon glyphicon-ok"></i> Approved', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } else {
        return Html::a('<i class="glyphicon glyphicon-sign"></i> NEW', '#', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    }
}, 'hAlign' => 'left', 'vAlign' => 'middle', 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'center', 'width' => '80px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]], ['class' => 'kartik\\grid\\ActionColumn', 'dropdown' => true, 'template' => '{review}{view}{delete}', 'dropdownOptions' => ['class' => 'pull-right dropup'], 'dropdownButton' => ['class' => 'btn btn-default btn-xs'], 'buttons' => ['review' => function ($url, $model) {
    return review($url, $model);
}, 'view' => function ($url, $model, $key) {
    return tombolview($url, $model);
    // return  '<li>' . Html::a('<span class="fa fa-eye fa-dm"></span>'.Yii::t('app', 'View'),
    //               ['/master/term-customers/view-term-cus','id'=>$model->ID_TERM],[
    //               // 'data-toggle'=>"modal",
    //               // 'data-target'=>"#modal-create",
    //               'data-title'=> $model->ID_TERM,
    //               ]). '</li>' . PHP_EOL;
}, 'delete' => function ($url, $model) {
    return delete($url, $model);
}], 'headerOptions' => ['style' => ['text-align' => 'center', 'width' => '150px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt', 'background-color' => 'rgba(97, 211, 96, 0.3)']], 'contentOptions' => ['style' => ['text-align' => 'left', 'width' => '150px', 'height' => '10px', 'font-family' => 'tahoma, arial, sans-serif', 'font-size' => '9pt']]]];
?>


<div class="container-full">