Beispiel #1
0
echo '</div>';
echo Form::label('published', 'Published', array('class' => 'pull-left', 'style' => 'clear:left;margin:15px;'));
if ($tutorial->published === 1) {
    $checked = 'checked="checked"';
} else {
    $checked = '';
}
echo '<div style="margin:20px;position:relative;padding-top:10px;"><input 
                            data-no-uniform="true" type="checkbox" ' . $checked . ' name="published" id="published" class="iphone-toggle"></div>';
echo Form::label('attachment', 'Attachment', array('class' => 'pull-left', 'style' => 'clear:left;margin:15px;'));
echo Form::file('attachment[]', array('class' => "pull-right", 'style' => 'clear:right;margin:20px;padding-top:10px;', 'multiple' => 'true'));
echo "<br>";
echo "<br>";
$checkexams = DB::select(DB::raw('SELECT COUNT(`id`) as `exists` FROM `exams` WHERE `subjectid` = ' . $tutorial->subjectid . ''));
if (!$checkexams) {
    $possibleexams = Exams::where('subjectid', '=', $tutorial->subjectid)->get();
    $exams = array();
    foreach ($possibleexams as $possibleexam) {
        $exams[$possibleexam->id] = $possibleexam->title;
        $possibleexamid = $possibleexam->id;
    }
} else {
    $exams[0] = "No Matched Exams found. Please create a Exam before attaching it.";
    $possibleexamid = 0;
}
$exame = $tutorial->exams;
$exame = unserialize($exame);
echo Form::label('examstruth', 'Enable Exam', array('class' => 'pull-left', 'style' => 'clear:left;margin:15px;'));
if ($exame['true'] == true) {
    $checked = 'checked="checked"';
} else {