コード例 #1
0
ファイル: score.php プロジェクト: UiL-OTS-labs/babylab-admin
 /** Specifies the contents of the edit score page */
 public function edit($score_id)
 {
     $score = $this->scoreModel->get_score_by_id($score_id);
     $data['test'] = $this->scoreModel->get_test_by_score($score);
     $data['testcat'] = $this->scoreModel->get_testcat_by_score($score);
     $data['testsurvey'] = $this->scoreModel->get_testsurvey_by_score($score);
     $data['participant'] = $this->scoreModel->get_participant_by_score($score);
     $data['page_title'] = lang('edit_score');
     $data['new_score'] = FALSE;
     $data['action'] = 'score/edit_submit/' . $score_id;
     $data = add_fields($data, 'score', $score);
     $data['date'] = output_date($score->date, TRUE);
     $this->load->view('templates/header', $data);
     $this->load->view('score_edit_view', $data);
     $this->load->view('templates/footer');
 }
コード例 #2
0
 /** Creates the table with score data, but only totals (for root test categories) */
 function create_total_score_table($testcats, $testinvites)
 {
     $CI =& get_instance();
     base_table();
     $CI->table->set_heading(lang('participant'), lang('score'), lang('date'), lang('age'), lang('percentile'), lang('language_age'), lang('actions'));
     foreach ($testcats as $tc) {
         foreach ($testinvites as $ti) {
             $score = $CI->testCatModel->total_score($tc->id, $ti->id);
             $t = $CI->testCatModel->get_test_by_testcat($tc);
             if ($score->score > 0) {
                 $p = $CI->testInviteModel->get_participant_by_testinvite($ti);
                 $score_age = age_in_months($p, $score->date);
                 $p_link = participant_get_link($p);
                 $percentile = $CI->percentileModel->find_percentile($tc->id, $p->gender, $score_age, $score->score);
                 $language_age = $CI->percentileModel->find_50percentile_age($tc->id, $p->gender, $score->score);
                 $edit_link = anchor('score/edit_all/' . $t->id . '/' . $p->id, img_edit());
                 $actions = implode(' ', array($edit_link));
                 $CI->table->add_row($p_link, $score->score, output_date($score->date), $score_age, $percentile, $language_age, $actions);
             }
         }
     }
     return $CI->table->generate();
 }
コード例 #3
0
ファイル: backups.php プロジェクト: promil23/GetSimpleCMS
            $pagesArray_tmp[$count]['url'] = $data->url;
            $pagesArray_tmp[$count]['date'] = $data->pubDate;
            $count++;
        }
    }
    $pagesSorted = subval_sort($pagesArray_tmp, 'title');
}
if (count($pagesSorted) != 0) {
    foreach ($pagesSorted as $page) {
        $counter++;
        $table .= '<tr id="tr-' . $page['url'] . '" >';
        if ($page['title'] == '') {
            $page['title'] = '[No Title] &nbsp;&raquo;&nbsp; <em>' . $page['url'] . '</em>';
        }
        $table .= '<td class="pagetitle"><a title="' . i18n_r('VIEWPAGE_TITLE') . ' ' . cl($page['title']) . '" href="backup-edit.php?p=view&amp;id=' . $page['url'] . '">' . cl($page['title']) . '</a></td>';
        $table .= '<td style="width:80px;text-align:right;" ><span>' . output_date($page['date']) . '</span></td>';
        $table .= '<td class="delete" ><a class="delconfirm" title="' . i18n_r('DELETEPAGE_TITLE') . ' ' . cl($page['title']) . '?" href="backup-edit.php?p=delete&amp;id=' . $page['url'] . '&amp;nonce=' . get_nonce("delete", "backup-edit.php") . '">&times;</a></td>';
        $table .= '</tr>';
    }
}
$pagetitle = i18n_r('BAK_MANAGEMENT');
get_template('header');
?>
	
<?php 
include 'template/include-nav.php';
?>

<div class="bodycontent clearfix">
	
	<div id="maincontent">
コード例 #4
0
/**
 * get table row for pages display
 *
 * @since 3.4
 * @param  array $page   page array
 * @param  int $level    current level
 * @param  int $index    current index
 * @param  int $parent   parent index
 * @param  int $children number of children
 * @return str           html for table row
 */
function getPagesRow($page, $level, $index, $parent, $children)
{
    $indentation = $menu = '';
    // indentation
    $indent = '<span class="tree-indent"></span>';
    $last = '<span class="tree-indent indent-last">&ndash;</span>';
    // add indents based on level
    $indentation .= $level > 0 ? str_repeat($indent, $level - 1) : '';
    $indentation .= $level > 0 ? $last : '';
    // add indents or expanders
    $isParent = $children > 0;
    // add expanders in php
    // $expander = '<span class="tree-expander tree-expander-expanded"></span>';
    // $expander = $isParent ? $expander : '<span class="tree-indent"></span>';
    // $indentation = $indentation . $expander;
    // depth level identifiers
    $class = 'depth-' . $level;
    $class .= $isParent ? ' tree-parent' : '';
    $menu .= '<tr id="tr-' . $page['url'] . '" class="' . $class . '" data-depth="' . $level . '">';
    $pagetitle = $pagemenustatus = $pageprivate = $pagedraft = $pageindex = '';
    if ($page['title'] == '') {
        $pagetitle = '[No Title] &nbsp;&raquo;&nbsp; <em>' . $page['url'] . '</em>';
    } else {
        $pagetitle = $page['title'];
    }
    if ($page['menuStatus'] != '') {
        $pagemenustatus = ' <span class="label label-ghost">' . i18n_r('MENUITEM_SUBTITLE') . '</span>';
    }
    if ($page['private'] != '') {
        $pageprivate = ' <span class="label label-ghost">' . i18n_r('PRIVATE_SUBTITLE') . '</span>';
    }
    if (pageHasDraft($page['url'])) {
        $pagedraft = ' <span class="label label-ghost">' . lowercase(i18n_r('LABEL_DRAFT')) . '</span>';
    }
    if ($page['url'] == getDef('GSINDEXSLUG')) {
        $pageindex = ' <span class="label label-ghost">' . i18n_r('HOMEPAGE_SUBTITLE') . '</span>';
    }
    if (dateIsToday($page['pubDate'])) {
        $pagepubdate = ' <span class="datetoday">' . output_date($page['pubDate']) . '</span>';
    } else {
        $pagepubdate = '<span>' . output_date($page['pubDate']) . "</span>";
    }
    $pagetitle = cl($pagetitle);
    $menu .= '<td class="pagetitle">' . $indentation . '<a title="' . i18n_r('EDITPAGE_TITLE') . ': ' . var_out($pagetitle) . '" href="edit.php?id=' . $page['url'] . '" >' . $pagetitle . '</a>';
    $menu .= '<div class="showstatus toggle" >' . $pageindex . $pagedraft . $pageprivate . $pagemenustatus . '</div></td>';
    // keywords used for filtering
    $menu .= '<td style="width:80px;text-align:right;" ><span>' . $pagepubdate . '</span></td>';
    $menu .= '<td class="secondarylink" >';
    $menu .= '<a title="' . i18n_r('VIEWPAGE_TITLE') . ': ' . var_out($pagetitle) . '" target="_blank" href="' . find_url($page['url'], $page['parent']) . '">#</a>';
    $menu .= '</td>';
    // add delete buttons, exclude index page
    if ($page['url'] != 'index') {
        $menu .= '<td class="delete" ><a class="delconfirm" href="deletefile.php?id=' . $page['url'] . '&amp;nonce=' . get_nonce("delete", "deletefile.php") . '" title="' . i18n_r('DELETEPAGE_TITLE') . ': ' . cl($page['title']) . '" >&times;</a></td>';
    } else {
        $menu .= '<td class="delete" ></td>';
    }
    // add indexcolumn and tagcolumn for filtering
    $menu .= '<td class="indexColumn hidden">' . strip_tags(lowercase($pagetitle . $pageindex . $pagemenustatus . $pageprivate . $pagedraft)) . '</div></td>';
    // keywords used for filtering
    $menu .= '<td class="tagColumn hidden">' . str_replace(',', ' ', $page['meta']) . '</div></td>';
    // keywords used for filtering
    $menu .= '</tr>';
    return $menu;
}
コード例 #5
0
 /** Gets the impediment dates in readable format */
 function impediment_dates($impediment)
 {
     return output_date($impediment->from) . ' - ' . output_date($impediment->to);
 }
コード例 #6
0
					<th><?php 
echo lang('last_called');
?>
</th>
					<td><?php 
echo $last_called;
?>
</td>
				</tr>
				<tr>
					<th><?php 
echo lang('registered');
?>
</th>
					<td><?php 
echo output_date($participant->created);
?>
</td>
				</tr>
			</table>
		</div>
		<div class="pure-u-2-5">
			<?php 
if (!$participant->activated) {
    $reason = $participant->deactivated_reason;
    $new = $reason == DeactivateReason::NewParticipant;
    $class = $new ? 'warning' : 'info';
    echo '<div class="' . $class . '"';
    echo "<p>" . lang('p_not_yet_active') . "</p>";
    echo "<p>" . lang('reason') . br();
    echo lang('reason_' . $reason) . ' (' . output_datetime($participant->deactivated) . ")</p>";
コード例 #7
0
<?php 
echo form_fieldset_close();
echo form_fieldset(lang('selfservice_pps_heading'));
?>
<p><?php 
echo lang('selfservice_pps_help');
?>
</p>

<?php 
$tmpl = array('table_open' => '<table class="pure-table">');
$this->table->set_template($tmpl);
$this->table->set_heading(ucfirst(lang('child')), lang('gender'), lang('dob'), 'Babylab Utrecht', lang('other_babylabs'));
foreach ($participants as $p) {
    $this->table->add_row(name($p), gender_sex($p->gender), output_date($p->dateofbirth), form_checkbox('active_' . $p->id, TRUE, $p->activated), form_checkbox('other_' . $p->id, TRUE, $p->otherbabylabs));
}
echo $this->table->generate();
?>

<div class="pure-controls">
<?php 
echo form_submit('submit', lang('save_changes'), 'class="pure-button pure-button-primary"');
?>
 
<?php 
echo form_submit('register', lang('selfservice_reg_pp'), 'class="pure-button pure-button-primary"');
?>
</div>
<?php 
echo form_fieldset_close();
コード例 #8
0
		<th><?php 
echo lang('test');
?>
</th>
		<td><?php 
echo $test->name;
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo lang('date');
?>
</th>
		<td><?php 
echo output_date($result->submitdate);
?>
</td>
	</tr>
	<tr>
		<th><?php 
echo lang('token');
?>
</th>
		<td><?php 
echo $result->token;
?>
</td>
	</tr>

	<?php 
コード例 #9
0
ファイル: upload.php プロジェクト: HelgeSverre/GetSimpleCMS
        // name column linked
        echo '</td><td>' . getUploadIcon($upload['name']) . '<a title="' . i18n_r('VIEW_FILE') . ': ' . htmlspecialchars($upload['name']) . '" href="' . $pathlink . '" class="primarylink" data-fileurl="' . $primarylink . '">' . htmlspecialchars($upload['name']) . '</a>' . $thumbnailLink . '</td>';
        // size column
        echo '<td class="file_size right"><span>' . $upload['size'] . '</span></td>';
        // file perms column
        if ($showperms) {
            $filePerms = substr(sprintf('%o', fileperms($path . $upload['name'])), -4);
            if ($isUnixHost) {
                $fileOwner = function_exists('posix_getpwuid') ? posix_getpwuid(fileowner($path . $upload['name'])) : '';
                $fileOwnerName = isset($fileOwner['name']) ? $fileOwner['name'] : '';
            } else {
                $fileOwnerName = getenv('USERNAME');
            }
            echo '<td style="width:70px;text-align:right;"><span>' . $fileOwnerName . '/' . $filePerms . '</span></td>';
        }
        echo '<td class="file_date right"><span class="' . (dateIsToday($upload['date']) ? 'datetoday' : '') . '">' . output_date($upload['date']) . '</span></td>';
        // delete
        echo '<td class="delete">';
        if ($allowdelete) {
            echo '<a class="delconfirm" title="' . i18n_r('DELETE_FILE') . ': ' . htmlspecialchars($upload['name']) . '" href="deletefile.php?file=' . rawurlencode($upload['name']) . '&amp;path=' . $urlPath . '&amp;nonce=' . get_nonce("delete", "deletefile.php") . '">&times;</a>';
        }
        echo '</td></tr>';
    }
}
exec_action('file-extras');
// @hook file-extras after file list table rows
echo '</tbody></table>';
if ($counter > 0) {
    $sizedesc = '(' . fSize($totalsize) . ')';
} else {
    $sizedesc = '';
コード例 #10
0
 /** Returns the date on and the experiment in the participant last participated */
 public function last_experiment($participant_id)
 {
     $this->db->where('participant_id', $participant_id);
     $this->db->where('completed', TRUE);
     // only completed experiments
     $this->db->order_by('appointment', 'DESC');
     $this->db->limit(1);
     $participation = $this->db->get('participation')->row();
     if (empty($participation)) {
         return lang('never_participated');
     }
     $last_exp = $participation->appointment;
     $experiment_id = $participation->experiment_id;
     $experiment = $this->experimentModel->get_experiment_by_id($experiment_id);
     return sprintf(lang('last_exp'), output_date($last_exp), $experiment->name);
 }
コード例 #11
0
 /** Returns the date of birth of the participant */
 function dob($dateofbirth)
 {
     return output_date($dateofbirth);
 }
コード例 #12
0
<?php 
echo heading($page_title, 2);
?>
<div id="accordion">
	<?php 
echo heading(lang('contact_details'), 3);
?>
	<div class="pure-g">
		<div class="pure-u-3-5">	
			<?php 
echo sprintf(lang('now_calling'), name($participant), gender($participant->gender), dob($participant->dateofbirth), age_in_months($participant));
?>
			<?php 
if ($participation->nrcalls > 0 && !empty($previous_call)) {
    echo '<p><em>';
    echo sprintf(lang('already_called'), name($participant), $participation->nrcalls, output_date($participation->lastcalled), lcfirst(lang($previous_call->status)));
    echo '</em></p>';
}
?>
		
				<!-- Contact details -->
			<?php 
echo sprintf(lang('call_contact'), $participant->firstname, parent_name($participant));
?>
		
			<br> <br>
			<table class="pure-table">
				<tr>
					<th><?php 
echo lang('phone');
?>
コード例 #13
0
 function get_min_max_days($participant, $experiment)
 {
     $min = $participant->dateofbirth . '+' . $experiment->agefrommonths . ' months +' . $experiment->agefromdays . ' days';
     $max = $participant->dateofbirth . '+' . $experiment->agetomonths . ' months +' . $experiment->agetodays . ' days';
     $data['min_date'] = output_date($min);
     $data['max_date'] = output_date($max);
     $data['min_date_js'] = output_date($min, TRUE);
     $data['max_date_js'] = output_date($max, TRUE);
     // Don't allow planning of an appointment before today.
     if (input_date($min) < input_date('now')) {
         $data['min_date_js'] = output_date('now', TRUE);
     }
     return $data;
 }
コード例 #14
0
ファイル: filebrowser.php プロジェクト: promil23/GetSimpleCMS
                    $thumbnailLink = '<span>&nbsp;&ndash;&nbsp;&nbsp;</span><a href="javascript:void(0)" onclick="submitLink(' . $CKEditorFuncNum . ',\'' . $sitepath . getRelPath(GSTHUMBNAILPATH) . $thumbLinkExternal . '\')">' . i18n_r('THUMBNAIL') . '</a>';
                }
            } else {
                continue;
            }
        }
        $counter++;
        echo '<tr class="All ' . $upload['type'] . '" >';
        echo $thumb == '' ? '<td style="display: none"></td>' : $thumb;
        echo '<td><a ' . $selectLink . ' class="primarylink">' . htmlspecialchars($upload['name']) . '</a>' . $thumbnailLink . '</td>';
        echo '<td style="width:80px;text-align:right;" ><span>' . $upload['size'] . '</span></td>';
        // get the file permissions.
        if ($isUnixHost && isDebug() && function_exists('posix_getpwuid')) {
            $filePerms = substr(sprintf('%o', fileperms($path . $upload['name'])), -4);
            $fileOwner = posix_getpwuid(fileowner($path . $upload['name']));
            echo '<td style="width:70px;text-align:right;"><span>' . $fileOwner['name'] . '/' . $filePerms . '</span></td>';
        }
        echo '<td style="width:85px;text-align:right;" ><span>' . output_date($upload['date']) . '</span></td>';
        echo '</tr>';
    }
}
echo '</table>';
echo '<p><em><b>' . $counter . '</b> ' . i18n_r('TOTAL_FILES') . ' (' . fSize($totalsize) . ')</em></p>';
?>
	
	</div>
  </div>
 </div>	
</body>
</html>
コード例 #15
0
 /**
  * Shows an age overview of all participants
  */
 public function age_overview()
 {
     // Get the number of months to look in the future
     $date = $this->input->post('date') ? $this->input->post('date') : output_date('now', TRUE);
     // Set up the table
     base_table();
     $this->table->set_heading('Leeftijd in maanden', 'Aantal actieve proefpersonen', 'Aantal dyslectisch', 'Aantal tweetalig', lang('actions'));
     // Calculate the number of participants per month, given the data
     foreach ($this->participantModel->get_participants_per_month($date) as $p) {
         $this->table->add_row($p->age, $p->count, $p->dyslexic, $p->multilingual, anchor('participant/age_overview_detail/' . $p->age . '/' . $date, img_zoom('participants')));
     }
     $data['table'] = $this->table->generate();
     $data['date'] = $date;
     $data['page_info'] = $this->load->view('participant_age_overview', $data, TRUE);
     $data['page_title'] = lang('participants');
     $this->load->view('templates/header', $data);
     $this->load->view('templates/table_view', $data);
     $this->load->view('templates/footer');
 }
コード例 #16
0
    <h3>
        Ondertekening
    </h3>
    <table class="pure-table" style="margin-bottom: 10px;">
        <tbody>
            <tr>
                <th>Naam:</th>
                <td><?php 
echo $user_full_name;
?>
</td>
            </tr>
            <tr>
                <th>Datum:</th>
                <td><?php 
echo output_date();
?>
</td>
            </tr>
            <tr>
                <th>Plaats:</th>
                <td>Utrecht</td>
            </tr>
        </tbody>
    </table>
    <a href="<?php 
echo $action;
?>
" class="pure-button pure-button-primary">
        Ik ga akkoord
    </a>
コード例 #17
0
 /** Shows a timeline of experiments */
 public function timeline()
 {
     $experiments = $this->experimentModel->get_all_experiments(FALSE);
     // Retrieve the months between the selected dates
     $date_start = $this->input->post('date_start');
     $date_end = $this->input->post('date_end');
     $min_date = $date_start ? input_date($date_start) : input_date(date('Y-01-01'));
     $max_date = $date_end ? input_date($date_end) : input_date(date('Y-12-31'));
     $months = months_between($min_date, $max_date);
     // Loop over experiments, count participations per year/month
     $tested = array();
     foreach ($experiments as $experiment) {
         // For every new experiment, add default counts
         foreach ($months as $month) {
             $default_counts[$month] = 0;
         }
         $tested[$experiment->name] = $default_counts;
         $month_counts = $this->experimentModel->count_participations_per_month($experiment->id, $min_date, $max_date);
         foreach ($month_counts as $mc) {
             $tested[$experiment->name][$mc->month] = array();
             $tested[$experiment->name][$mc->month]['count'] = $mc->count;
             $tested[$experiment->name][$mc->month]['color'] = 'none';
         }
         if ($experiment->date_start) {
             $e_months = months_between(max(input_date($experiment->date_start), $min_date), min(input_date($experiment->date_end), $max_date));
             foreach ($e_months as $month) {
                 if (!isset($tested[$experiment->name][$month]['count'])) {
                     $tested[$experiment->name][$month] = array();
                     $tested[$experiment->name][$month]['count'] = 0;
                 }
                 $tested[$experiment->name][$month]['color'] = $experiment->experiment_color;
             }
         }
     }
     ksort($tested);
     $data['page_title'] = lang('timeline');
     $data['action'] = 'experiment/timeline/';
     $data['tested'] = $tested;
     $data['date_start'] = output_date($min_date, TRUE);
     $data['date_end'] = output_date($max_date, TRUE);
     $this->load->view('templates/header', $data);
     $this->load->view('experiment_timeline_view', $data);
     $this->load->view('templates/footer');
 }
コード例 #18
0
ファイル: basic.php プロジェクト: kix23/GetSimpleCMS
function shtDate($dt = null)
{
    return output_date($dt);
}
コード例 #19
0
ファイル: chart.php プロジェクト: UiL-OTS-labs/babylab-admin
 private function set_token_data($data, $token)
 {
     // Check whether we received a token
     if ($token) {
         // Check whether this is an existing token
         $testinvite = $this->testInviteModel->get_testinvite_by_token($token);
         if ($testinvite) {
             // Check whether this token is for the correct test
             $testsurvey = $this->testInviteModel->get_testsurvey_by_testinvite($testinvite);
             if ($testsurvey->test_id === $data['test_id']) {
                 // OK, fill data!
                 $data['token'] = $token;
                 $data['valid_token'] = TRUE;
                 $data['testinvite'] = $testinvite;
                 $data['testinvite_id'] = $testinvite->id;
                 $data['test_date'] = output_date($testinvite->datecompleted);
                 $participant = $this->testInviteModel->get_participant_by_testinvite($testinvite);
                 $data['participant_id'] = $participant->id;
                 $data['gender'] = gender_sex($participant->gender);
                 $data['gender_child'] = gender_child($participant->gender);
                 $data['age_in_months'] = age_in_months($participant, $testinvite->datecompleted);
                 return $data;
             }
         }
     }
     // Default values
     $data['valid_token'] = FALSE;
     $data['participant_id'] = 0;
     $data['gender'] = gender_sex(Gender::Male);
     return $data;
 }