当前位置: 首页>>代码示例>>PHP>>正文


PHP ortime__format函数代码示例

本文整理汇总了PHP中ortime__format函数的典型用法代码示例。如果您正苦于以下问题:PHP ortime__format函数的具体用法?PHP ortime__format怎么用?PHP ortime__format使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了ortime__format函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: mailqueue__show_mailqueue


//.........这里部分代码省略.........
        } else {
            echo '[' . lang('previous') . ']';
        }
        echo '  ';
        if ($num_rows >= $limit) {
            echo '[' . log__link('os=' . ($offset + $limit)) . lang('next') . '</A>]';
        } else {
            echo '[' . lang('next') . ']';
        }
        echo '<TABLE class="or_listtable" style="width: 90%;"><thead>';
        // header
        echo '
        <thead>
        <TR style="background: ' . $color['list_header_background'] . '; color: ' . $color['list_header_textcolor'] . ';">
        <TD>' . lang('id') . '</TD>
        <TD>' . lang('date_and_time') . '</TD>
        <TD>' . lang('email_type') . '</TD>
        <TD>' . lang('email_recipient') . '</TD>
        <TD>' . lang('reference') . '</TD>
        <TD>' . lang('error') . '</TD>';
        if (check_allow('mailqueue_edit_all')) {
            echo '<TD>
            ' . lang('select_all') . '
            <INPUT id="selall" type="checkbox" name="selall" value="y">
            <script language="JavaScript">
                $("#selall").change(function() {
                    if (this.checked) {
                        $("input[name*=\'del[\']").each(function() {
                            this.checked = true;
                        });
                    } else {
                        $("input[name*=\'del[\']").each(function() {
                            this.checked = false;
                        });
                    }
                });
            </script>
        </TD>';
        }
        echo '
          </TR>
          </thead>
          <tbody>
        ';
        $shade = false;
        $ids = array();
        $experiment_ids = array();
        $entries = array();
        while ($line = pdo_fetch_assoc($result)) {
            $ids[] = $line['mail_id'];
            if ($line['experiment_id']) {
                $experiment_ids[] = $line['experiment_id'];
            }
            $entries[] = $line;
        }
        $experiments = experiment__load_experiments_for_ids($experiment_ids);
        foreach ($entries as $line) {
            echo '<TR';
            if ($shade) {
                $shade = false;
            } else {
                $shade = true;
            }
            if ($shade) {
                echo ' bgcolor="' . $color['list_shade1'] . '"';
            } else {
                echo ' bgcolor="' . $color['list_shade2'] . '"';
            }
            echo '>
            <TD>' . $line['mail_id'] . '</TD>
            <TD>' . ortime__format($line['timestamp'], 'hide_second:false', lang('lang')) . '</TD>
            <TD>' . $line['mail_type'] . '</TD>
            <TD>' . $line['mail_recipient'] . '</TD>
            <TD>';
            $reference = array();
            if ($line['experiment_id']) {
                $reference[] = 'Experiment: <A HREF="experiment_show.php?experiment_id=' . $line['experiment_id'] . '">' . $experiments[$line['experiment_id']]['experiment_name'] . '</A>';
            }
            if ($line['session_id']) {
                $reference[] = 'Session: <A HREF="session_edit.php?session_id=' . $line['session_id'] . '">' . $line['session_id'] . '</A>';
            }
            if ($line['bulk_id']) {
                $reference[] = 'Bulk email: ' . $line['bulk_id'];
            }
            echo implode('<BR>', $reference);
            echo '</TD>
            <TD>' . $line['error'] . '</TD>';
            if (check_allow('mailqueue_edit_all')) {
                echo '<TD><INPUT type="checkbox" name="del[' . $line['mail_id'] . ']" value="y"></TD';
            }
            echo '</TR>';
        }
        echo '</tbody></TABLE>';
        if (check_allow('mailqueue_edit_all')) {
            echo '<INPUT type="hidden" name="allids" value="' . implode(",", $ids) . '">';
            echo '</FORM>';
        }
        return $num_rows;
    }
}
开发者ID:danorama,项目名称:orsee,代码行数:101,代码来源:mailqueue.php

示例2: query__get_pseudo_query_array

        $posted_query = $json->decode($line['json_query']);
        $pseudo_query_array = query__get_pseudo_query_array($posted_query['query']);
        $pseudo_query_display = query__display_pseudo_query($pseudo_query_array, $active);
        echo '<TR';
        if ($shade) {
            $shade = false;
        } else {
            $shade = true;
        }
        if ($shade) {
            echo ' bgcolor="' . $color['list_shade1'] . '"';
        } else {
            echo ' bgcolor="' . $color['list_shade2'] . '"';
        }
        echo '>
            <TD>' . ortime__format($line['query_time'], 'hide_second:false', lang('lang')) . '</TD>
            <TD>' . $pseudo_query_display . '</TD>';
        $reference = array();
        if (check_allow('pform_saved_queries_delete')) {
            echo '<TD><INPUT type="checkbox" name="del[' . $line['query_id'] . ']" value="y"></TD';
        }
        echo '</TR>';
    }
    echo '</tbody></TABLE>';
    if (check_allow('pform_saved_queries_delete')) {
        echo '</FORM>';
    }
    echo '<BR><BR><A href="options_main.php">' . icon('back') . ' ' . lang('back') . '</A><BR><BR>';
    echo '</center>';
}
include "footer.php";
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:options_saved_queries.php

示例3: foreach

 foreach ($queries as $q) {
     if ($shade) {
         $rowspec = ' class="or_orr_list_shade_even""';
         $shade = false;
     } else {
         $rowspec = ' class="or_orr_list_shade_odd"';
         $shade = true;
     }
     echo '<TR' . $rowspec . '>';
     echo '<TD valign="top"><B>' . ortime__format($q['query_time']) . '</B><BR>';
     if ($q['permanent'] || isset($q['properties']['is_permanent']) && $q['properties']['is_permanent']) {
         echo '<B>';
         echo lang('report_queries__permanent_query') . '</B><BR>';
         echo lang('from') . ' ' . ortime__format($q['properties']['permanent_start_time']) . ' ';
         if (isset($q['properties']['permanent_start_time']) && !$q['permanent']) {
             echo lang('to') . ' ' . ortime__format($q['query_time']);
         } else {
             echo lang('until_now');
         }
         echo '<BR>' . lang('report_queries__number_of_subjects_added') . ': <B>';
         if (isset($q['properties']['assigned_count'])) {
             echo $q['properties']['assigned_count'];
         } else {
             echo 0;
         }
         echo '</B>';
     } else {
         echo '<B>';
         if ($q['query_type'] == 'assign') {
             echo lang('report_queries__potential_participants_added');
         } else {
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:experiment_recruitment_report.php

示例4: sessions__get_first_last_date

function sessions__get_first_last_date($session_list)
{
    $first_d = 0;
    $last_d = 0;
    foreach ($session_list as $s) {
        if ($first_d == 0 || $s['session_start'] < $first_d) {
            $first_d = $s['session_start'];
        }
        if ($last_d == 0 || $s['session_start'] > $last_d) {
            $last_d = $s['session_start'];
        }
    }
    $first_s = $first_d == 0 ? '???' : ortime__format(ortime__sesstime_to_unixtime($first_d), 'hide_time:true');
    $last_s = $last_d == 0 ? '???' : ortime__format(ortime__sesstime_to_unixtime($last_d), 'hide_time:true');
    return array('first' => $first_s, 'last' => $last_s);
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:16,代码来源:sessions.php

示例5: log__show_log


//.........这里部分代码省略.........
            $selected = $_REQUEST['days'];
        } else {
            $selected = 90;
        }
        foreach ($ddays as $day) {
            echo '<option value="' . $day . '"';
            if ($day == $selected) {
                echo ' SELECTED';
            }
            echo '>' . $day . ' ';
            if ($day == 1) {
                echo lang('day');
            } else {
                echo lang('days');
            }
            echo '</option>
                ';
        }
        echo '  </select><input type=submit name="delete" value="' . lang('delete') . '">';
    }
    echo '</TD></TR></TABLE>';
    if ($offset > 0) {
        echo '[' . log__link('os=' . ($offset - $limit)) . lang('previous') . '</A>]';
    } else {
        echo '[' . lang('previous') . ']';
    }
    echo '&nbsp;&nbsp;';
    if ($num_rows >= $limit) {
        echo '[' . log__link('os=' . ($offset + $limit)) . lang('next') . '</A>]';
    } else {
        echo '[' . lang('next') . ']';
    }
    echo '<TABLE class="or_listtable" style="width: 90%;">';
    // header
    echo '<thead>
        <TR style="background: ' . $color['list_header_background'] . '; color: ' . $color['list_header_textcolor'] . ';">
        <TD>
            ' . lang('date_and_time') . '
        </TD>
        <TD>';
    if ($log == 'participant_actions') {
        echo lang('lastname') . ', ' . lang('firstname');
    } elseif ($log == 'experimenter_actions' || $log == 'regular_tasks') {
        echo lang('experimenter');
    }
    if (isset($_REQUEST['id']) && $_REQUEST['id']) {
        echo ' ' . log__link('id=', 'os=0') . '<FONT class="small">[' . lang('unrestrict') . ']</FONT></A>';
    }
    echo '  </TD><TD>' . lang('action');
    if (isset($_REQUEST['action']) && $_REQUEST['action']) {
        echo ' ' . log__link('action=', 'os=0') . '<FONT class="small">[' . lang('unrestrict') . ']</FONT></A>';
    }
    echo '  </TD><TD>' . lang('target');
    if (isset($_REQUEST['target']) && $_REQUEST['target']) {
        echo ' ' . log__link('target=', 'os=0') . '<FONT class="small">[' . lang('unrestrict') . ']</FONT></A>';
    }
    echo '  </TD></TR>
            </thead>
            <tbody>';
    $shade = false;
    while ($line = pdo_fetch_assoc($result)) {
        echo '<tr class="small"';
        if ($shade) {
            echo ' bgcolor="' . $color['list_shade1'] . '"';
        } else {
            echo 'bgcolor="' . $color['list_shade2'] . '"';
        }
        echo '>
            <TD>' . ortime__format($line['timestamp'], 'hide_seconds:false', lang('lang')) . '</TD>
            <TD>';
        if ($log == 'participant_actions') {
            if ($line['participant_id']) {
                echo $line['lname'] . ', ' . $line['fname'] . ' <A HREF="participants_edit.php?participant_id=' . $line['participant_id'] . '"><FONT class="small">[' . lang('edit') . ']</FONT></A>';
            } else {
                echo $line['id'];
            }
        } elseif ($log == 'experimenter_actions' || $log == 'regular_tasks') {
            echo $line['adminname'];
        }
        if (!isset($_REQUEST['id']) || $_REQUEST['id'] != $line['id']) {
            echo ' ' . log__restrict_link('id', $line['id']);
        }
        echo '  </TD><TD>' . $line['action'];
        if (!isset($_REQUEST['action']) || $_REQUEST['action'] != $line['action']) {
            echo ' ' . log__restrict_link('action', $line['action']);
        }
        echo '  </TD><TD>' . nl2br(stripslashes($line['target']));
        if (!isset($_REQUEST['target']) || $_REQUEST['target'] != $line['target'] && $log != 'regular_tasks') {
            echo ' ' . log__restrict_link('target', $line['target']);
        }
        echo '  </TD></TR>';
        if ($shade) {
            $shade = false;
        } else {
            $shade = true;
        }
    }
    echo '</tbody></TABLE>';
    return $num_rows;
}
开发者ID:danorama,项目名称:orsee,代码行数:101,代码来源:logfunctions.php

示例6: lang

        } else {
            echo lang('no');
        }
        echo '
						</td>
				</tr>
				
			<tr>
				<td align=right>
					' . lang('last_login_attempt') . ':
				</td>
				<td>&nbsp;&nbsp;</td>
				<td>
					';
        if ($admin['last_login_attempt']) {
            echo ortime__format($admin['last_login_attempt'], 'hide_second:false');
        } else {
            echo lang('never');
        }
        echo '
				</td>
			</tr>
			
			<tr>
				<td align=right>
					' . lang('failed_login_attempts') . ':
				</td>
				<td>&nbsp;&nbsp;</td>
				<td>
					' . $admin['failed_login_attempts'] . '
				</td>
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:31,代码来源:admin_edit.php

示例7: email__expsess_select

function email__expsess_select($email, $session = array(), $experiment = array(), $participant = array())
{
    global $lang;
    if (isset($session['session_id'])) {
        $selected = $session['experiment_id'] . ',' . $session['session_id'];
    } elseif (isset($experiment['experiment_id'])) {
        $selected = $experiment['experiment_id'] . ',0';
    } elseif (!$email['mailbox']) {
        $selected = '0,0';
    } else {
        $selected = '';
    }
    $pars = array();
    $query = "SELECT " . table('experiments') . ".*, " . table('sessions') . ".*\n            FROM " . table('experiments') . " LEFT JOIN " . table('sessions') . "\n            ON " . table('experiments') . ".experiment_id=" . table('sessions') . ".experiment_id\n            WHERE (" . table('experiments') . ".experiment_finished='n')";
    if (isset($session['experiment_id'])) {
        $query .= " OR (" . table('experiments') . ".experiment_id= :experiment_id) ";
        $pars[':experiment_id'] = $session['experiment_id'];
    } elseif (isset($experiment['experiment_id'])) {
        $query .= " OR (" . table('experiments') . ".experiment_id= :experiment_id) ";
        $pars[':experiment_id'] = $experiment['experiment_id'];
    }
    if (isset($participant['participant_id'])) {
        $query .= " OR (" . table('experiments') . ".experiment_id IN (\n                    SELECT experiment_id FROM " . table('participate_at') . "\n                    WHERE participant_id= :participant_id) ) ";
        $pars[':participant_id'] = $participant['participant_id'];
    }
    $query .= "ORDER BY session_start DESC ";
    $result = or_query($query, $pars);
    $experiments = array();
    while ($e = pdo_fetch_assoc($result)) {
        if ($e['session_id'] == NULL) {
            $e['session_id'] = 0;
        }
        $experiments[$e['experiment_id']]['sessions'][$e['session_id']] = $e;
        $experiments[$e['experiment_id']]['experiment_name'] = $e['experiment_name'];
        if (!isset($experiments[$e['experiment_id']]['lastsesstime']) || $e['session_start'] > $experiments[$e['experiment_id']]['lastsesstime']) {
            $experiments[$e['experiment_id']]['lastsesstime'] = $e['session_start'];
        }
    }
    // now order experiments by the date of the last session of the experiment, DESC!
    foreach ($experiments as $id => $arr) {
        $experiments[$id]['lastsesstime_reversed'] = 0 - $arr['lastsesstime'];
    }
    multi_array_sort($experiments, 'lastsesstime_reversed');
    echo '<SELECT name="expsess"><OPTION value="0,0">' . lang('select_none') . '</OPTION>';
    // list special mail boxes
    $mailboxes = email__load_mailboxes();
    foreach ($mailboxes as $k => $mb) {
        if ($k != 'trash' && $k != 'not_assigned') {
            echo '<OPTION value="box,' . $k . '"';
            if ($email['mailbox'] == $k) {
                echo ' SELECTED';
            }
            echo '>' . $mb . '</OPTION>';
        }
    }
    foreach ($experiments as $exp_id => $texperiment) {
        echo '<OPTION value="' . $exp_id . ',0"';
        if ($selected == $exp_id . ',0') {
            echo ' SELECTED';
        }
        echo '>' . $texperiment['experiment_name'] . '</OPTION>' . "\n";
        foreach ($texperiment['sessions'] as $tsession) {
            if ($tsession['session_id'] > 0) {
                $tsess_name = ortime__format(ortime__sesstime_to_unixtime($tsession['session_start']));
                echo '<OPTION value="' . $tsession['experiment_id'] . ',' . $tsession['session_id'] . '"';
                if ($selected == $tsession['experiment_id'] . ',' . $tsession['session_id']) {
                    echo ' SELECTED';
                }
                echo '>' . $tsession['experiment_name'] . ' - ' . $tsess_name . '</OPTION>';
            }
        }
    }
    if (isset($session['session_id']) && !isset($experiments[$session['experiment_id']]['sessions'][$session['session_id']])) {
        echo '<OPTION value="' . $session['experiment_id'] . ',' . $session['session_id'] . '" SELECTED>' . $experiment['experiment_name'] . ' - ' . ortime__format(ortime__sesstime_to_unixtime($session['session_start'])) . '</OPTION>';
    } elseif (isset($experiment['experiment_id']) && !isset($experiments[$experiment['experiment_id']])) {
        echo '<OPTION value="' . $experiment['experiment_id'] . ',0" SELECTED>' . $experiment['experiment_name'] . '</OPTION>';
    }
    echo '</SELECT>';
}
开发者ID:bgreiner,项目名称:orsee,代码行数:79,代码来源:email.php

示例8: query__get_pseudo_query_array


//.........这里部分代码省略.........
                    $clevel--;
                    $level = $clevel;
                    $text = ')';
                }
                break;
            case "experimentclasses":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('participants_participated_expclass');
                $text .= ': ' . experiment__experiment_class_field_to_list($params['ms_classes']);
                break;
            case "experimenters":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('participants_participated_experimenters');
                $text .= ': ' . experiment__list_experimenters($params['ms_experimenters'], false, true);
                break;
            case "experimentsassigned":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('participants_were_assigned_to');
                $text .= ': ' . experiment__exp_id_list_to_exp_names($params['ms_experiments']);
                break;
            case "experimentsparticipated":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('participants_have_participated_on');
                $text .= ': ' . experiment__exp_id_list_to_exp_names($params['ms_experiments']);
                break;
            case "statusids":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('participants_of_status');
                $text .= ': ' . participant__status_id_list_to_status_names($params['ms_status']);
                break;
            case "pformtextfields":
                $text = lang('where');
                $text .= ' "' . $params['search_string'] . '" ';
                $text .= query__pseudo_query_not_not($params);
                $text .= lang('in') . ' ';
                if ($params['search_field'] == 'all') {
                    $text .= lang('any_field');
                } else {
                    $text .= $params['search_field'];
                }
                break;
            case "pform":
                $f = array();
                foreach ($formfields as $p) {
                    if ($p['mysql_column_name'] == $pform_formfield) {
                        $f = $p;
                    }
                }
                if (isset($f['mysql_column_name'])) {
                    $text = lang('where') . ' ' . lang($f['name_lang']) . ' ';
                    if ($type == 'numberselect') {
                        $text .= $params['sign'] . $params['fieldvalue'];
                    } elseif ($type == 'simpleselect') {
                        $text .= query__pseudo_query_not_not($params) . '= "' . $params['fieldvalue'] . '"';
                    } else {
                        $text .= query__pseudo_query_not_not($params) . lang('in') . ': ' . participant__select_lang_idlist_to_names($f['mysql_column_name'], $params['ms_' . $pform_formfield]);
                    }
                } else {
                    $add = false;
                }
                break;
            case "noshows":
                $text = lang('where_nr_noshowups_is') . ' ';
                $text .= $params['sign'] . ' ' . $params['count'];
                break;
            case "participations":
                $text = lang('where_nr_participations_is') . ' ';
                $text .= $params['sign'] . ' ' . $params['count'];
                break;
            case "updaterequest":
                $text = lang('where_profile_update_request_is') . ' ';
                if ($params['update_request_status'] == 'y') {
                    $text .= lang('active');
                } else {
                    $text .= lang('inactive');
                }
                break;
            case "activity":
                $text = lang('where') . ' ' . lang($params['activity_type']) . ' ';
                $text .= query__pseudo_query_not_not($params);
                $text .= lang('before_date') . ' ';
                $sesstime_act = ortime__array_to_sesstime($params, 'dt_activity_');
                $text .= ortime__format(ortime__sesstime_to_unixtime($sesstime_act), 'hide_time:true');
                break;
            case "randsubset":
                $text = lang('limit_to_randomly_drawn') . ' ';
                $text .= $params['limit'];
                break;
            case "subsubjectpool":
                $text = query__pseudo_query_not_without($params);
                $text .= ' ' . lang('who_are_in_subjectpool');
                $text .= ': ' . subpools__idlist_to_namelist($params['ms_subpool']);
                break;
        }
        if ($add) {
            $pseudo_query_array[] = array('level' => $level, 'op_text' => $op_text, 'text' => $text);
        }
    }
    return $pseudo_query_array;
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:101,代码来源:query_modules.php

示例9: downloads__list_experiments

function downloads__list_experiments($showsize = false, $showtype = false, $showdate = false)
{
    global $lang, $color, $expadmindata;
    $out = '';
    $continue = true;
    if (check_allow('file_view_experiment_all')) {
        $experimenter_clause = '';
        $pars = array();
    } elseif (check_allow('file_view_experiment_my')) {
        $experimenter_clause = " AND " . table('experiments') . ".experimenter LIKE :experimenter ";
        $pars = array(':experimenter' => '%|' . $expadmindata['admin_id'] . '|%');
    } else {
        $continue = false;
    }
    if ($continue) {
        $query = "SELECT " . table('experiments') . ".*,\n                (SELECT min(session_start) from or_sessions as s1 WHERE s1.experiment_id=" . table('experiments') . ".experiment_id) as first_session_date,\n                (SELECT max(session_start) from or_sessions as s2 WHERE s2.experiment_id=" . table('experiments') . ".experiment_id) as last_session_date\n                FROM " . table('experiments') . "\n                WHERE " . table('experiments') . ".experiment_id IN\n                (SELECT DISTINCT experiment_id FROM " . table('uploads') . ")\n                " . $experimenter_clause . "\n                ORDER BY last_session_date DESC";
        $result = or_query($query, $pars);
        $experiments = array();
        while ($line = pdo_fetch_assoc($result)) {
            $experiments[] = $line;
        }
        if (count($experiments) > 0) {
            $out .= '<TABLE width=100% border=0>';
            $shade = true;
            foreach ($experiments as $exp) {
                if ($shade) {
                    $bgcolor = ' bgcolor="' . $color['list_shade1'] . '"';
                    $shade = false;
                } else {
                    $bgcolor = ' bgcolor="' . $color['list_shade2'] . '"';
                    $shade = true;
                }
                $out .= '<TR' . $bgcolor . '><TD>';
                $out .= $exp['experiment_name'] . '</TD><TD>(';
                $out .= lang('from') . ' ';
                if ($exp['first_session_date'] == 0) {
                    $out .= '???';
                } else {
                    $out .= ortime__format(ortime__sesstime_to_unixtime($exp['first_session_date']), 'hide_time:true');
                }
                $out .= ' ' . lang('to') . ' ';
                if ($exp['last_session_date'] == 0) {
                    $out .= '???';
                } else {
                    $out .= ortime__format(ortime__sesstime_to_unixtime($exp['last_session_date']), 'hide_time:true');
                }
                $out .= ')</TD><TD>';
                $out .= experiment__list_experimenters($exp['experimenter'], true, true);
                $out .= '</TD><TD><A HREF="download_main.php?experiment_id=' . $exp['experiment_id'] . '">' . lang('show_files') . '</A>';
                $out .= '</TD></TR>';
            }
            $out .= '</TABLE>';
        }
    }
    return $out;
}
开发者ID:bgreiner,项目名称:orsee,代码行数:56,代码来源:updownloads.php

示例10: experimentmail__send_participant_statistics

function experimentmail__send_participant_statistics()
{
    global $lang, $settings;
    $now = time();
    $from = $settings['support_mail'];
    $headers = "From: " . $from . "\r\n";
    // remember the current language for later reset
    $old_lang = lang('lang');
    // preload details with current language
    $maillang = $old_lang;
    $statistics = stats__get_textstats_for_email();
    $subject = load_language_symbol('subject_pool_statistics', $maillang) . ' ' . ortime__format($now, 'hide_time:true');
    // get experimenters who want to receive the statistics
    $query = "SELECT *\n            FROM " . table('admin') . "\n            WHERE get_statistics_mail='y'\n            AND disabled='n'\n            ORDER BY language";
    $result = or_query($query);
    $i = 0;
    $rec_count = pdo_num_rows($result);
    while ($admin = pdo_fetch_assoc($result)) {
        if ($admin['language'] != $maillang) {
            $maillang = $admin['language'];
            $lang = load_language($maillang);
            $statistics = stats__get_textstats_for_email();
            $subject = load_language_symbol('subject_pool_statistics', $maillang) . ' ' . ortime__format($now, 'hide_time:true', $maillang);
        }
        $mailtext = load_mail("admin_participant_statistics_mailtext", $maillang) . "\n\n" . $statistics . "\n" . experimentmail__get_admin_footer($maillang, $admin) . "\n";
        $message = process_mail_template($mailtext, $admin);
        $done = experimentmail__mail($admin['email'], $subject, $message, $headers);
        if ($done) {
            $i++;
        }
    }
    // reset language
    if ($maillang != $old_lang) {
        $lang = load_language($old_lang);
    }
    return "statistics sent to " . $i . " out of " . $rec_count . " administrators\n";
}
开发者ID:danorama,项目名称:orsee,代码行数:37,代码来源:experimentmail.php

示例11: lang

 echo '</TABLE></TD></TR>';
 echo '
 </TABLE>
 </center><BR><BR>';
 if ($experiment['experiment_type'] == "laboratory") {
     // session summary
     echo '<center>
     <BR>
     <table class="or_panel">
     <TR>
         <TD>
             <TABLE width="100%" border=0 class="or_panel_title"><TR>
             <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '">' . lang('sessions') . '</TD>';
     if ($min > 0) {
         echo '<TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '">' . lang('from') . ': ' . ortime__format(ortime__sesstime_to_unixtime($min), 'hide_time') . '
                     ' . lang('to') . ': ' . ortime__format(ortime__sesstime_to_unixtime($max), 'hide_time') . '
                     </TD>';
     }
     echo '      <TD style="background: ' . $color['panel_title_background'] . '; color: ' . $color['panel_title_textcolor'] . '">';
     if (check_allow('session_edit')) {
         echo button_link('session_edit.php?experiment_id=' . $experiment['experiment_id'], lang('create_new'), 'plus-circle');
     }
     echo '      </TD>
             </TR></TABLE>
         </TD>
     </TR>
     <TR>
         <TD>
             ' . count($sessions) . ' ' . lang('xxx_sessions_registered') . '<BR>
         </TD>
     </TR>
开发者ID:danorama,项目名称:orsee,代码行数:31,代码来源:experiment_show.php

示例12: expregister__list_invited_for

function expregister__list_invited_for($participant)
{
    global $lang, $color, $preloaded_laboratories, $token_string;
    if (!(is_array($preloaded_laboratories) && count($preloaded_laboratories) > 0)) {
        $preloaded_laboratories = laboratories__get_laboratories();
    }
    $invdata = expregister__get_invitations($participant['participant_id']);
    $invited = $invdata['invited'];
    $inv_experiments = $invdata['inv_experiments'];
    $now = time();
    echo '<TABLE width="100%" border="0" cellspacing="0">';
    $labs = array();
    foreach ($invited as $s) {
        if ($s['new_experiment']) {
            echo '<TR>
        			<TD colspan=3 bgcolor="' . $color['list_shade_subtitle'] . '">
                		<B>' . $s['experiment_public_name'] . '</B>';
            if (or_setting('allow_public_experiment_note') && isset($s['public_experiment_note']) && trim($s['public_experiment_note'])) {
                echo '<BR><i>' . lang('note') . ': ' . trim($s['public_experiment_note']) . '</i>';
            }
            echo '</TD></TR>';
        }
        echo '<TR><TD>&nbsp;&nbsp;&nbsp;</TD><TD bgcolor="' . $color['list_shade1'] . '">';
        echo '<B>' . $s['session_name'] . '</B>, ';
        if (isset($preloaded_laboratories[$s['laboratory_id']])) {
            echo $preloaded_laboratories[$s['laboratory_id']]['lab_name'];
        } else {
            echo lang('unknown_laboratory');
        }
        if (or_setting('include_sign_up_until_on_enrolment_page')) {
            echo ",  " . lang('registration_until') . " ";
            echo ortime__format($s['registration_unixtime'], '', lang('lang'));
        }
        if (or_setting('allow_public_session_note') && isset($s['public_session_note']) && trim($s['public_session_note'])) {
            echo '<BR><i>' . lang('note') . ': ' . trim($s['public_session_note']) . '</i>';
        }
        echo '</TD>';
        if (!$s['session_full'] && $s['registration_unixtime'] >= $now) {
            echo '<FORM action="participant_show.php">';
            if ($token_string) {
                echo '<INPUT type=hidden name="p" value="' . $participant['participant_id_crypt'] . '">';
            }
            echo '<INPUT type=hidden name="s" value="' . $s['session_id'] . '">
				<TD bgcolor="' . $color['list_shade1'] . '">
				<INPUT class="button small" style="font-size: 8pt;" type=submit name="register" value="' . lang('register') . '">
				</TD>
				</FORM>';
        } elseif ($s['registration_unixtime'] < $now) {
            echo '<TD bgcolor="' . $color['list_shade1'] . '">
				<span class="button disabled" style="font-size: 8pt; color: ' . $color['session_public_expired'] . ';">' . lang('expired') . '</span></TD>';
        } else {
            echo '<TD bgcolor="' . $color['list_shade1'] . '">
				<span class="button disabled" style="font-size: 8pt; color: ' . $color['session_public_complete'] . ';">' . lang('complete') . '</span></TD>';
        }
        echo '
			</TR>
			<TR><TD colpan=3>&nbsp;</TD></TR>';
        $labs[$s['laboratory_id']] = $s['laboratory_id'];
    }
    if (count($invited) == 0) {
        echo '<TD><B>' . lang('no_current_invitations') . '</B></TD>';
    }
    echo '</TABLE>';
    return $labs;
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:65,代码来源:expregister.php

示例13: participant__get_result_table_row_pdf

function participant__get_result_table_row_pdf($columns, $p)
{
    global $settings, $color;
    global $thislist_sessions;
    $pform_columns = participant__load_all_pform_fields();
    $row = array();
    foreach ($columns as $k => $arr) {
        switch ($k) {
            case 'number_noshowup':
                $row[] = $p['number_noshowup'] . '/' . $p['number_reg'];
                break;
            case 'rules_signed':
                if ($settings['enable_rules_signed_tracking'] == 'y') {
                    $row[] = $p['rules_signed'] != 'y' ? "X" : '';
                }
                break;
            case 'subscriptions':
                $exptypes = load_external_experiment_types();
                $inv_arr = db_string_to_id_array($p[$k]);
                $inv_names = array();
                foreach ($inv_arr as $inv) {
                    if (isset($exptypes[$inv]['exptype_name'])) {
                        $inv_names[] = $exptypes[$inv]['exptype_name'];
                    } else {
                        $inv_names[] = 'undefined';
                    }
                }
                $row[] = implode(", ", $inv_names);
                break;
            case 'subpool_id':
                $subpools = subpools__get_subpools();
                $subpool_name = isset($subpools[$p[$k]]['subpool_name']) ? $subpools[$p[$k]]['subpool_name'] : $p[$k];
                $row[] = $subpool_name;
                break;
            case 'status_id':
                $participant_statuses = participant_status__get_statuses();
                $pstatus_name = isset($participant_statuses[$p[$k]]['name']) ? $participant_statuses[$p[$k]]['name'] : $p[$k];
                $row[] = $pstatus_name;
                break;
            case 'creation_time':
            case 'deletion_time':
            case 'last_enrolment':
            case 'last_profile_update':
            case 'last_activity':
            case 'last_login_attempt':
                if ($p[$k]) {
                    $row[] = ortime__format($p[$k], 'hide_second:false');
                } else {
                    $row[] = '-';
                }
                break;
            case 'session_id':
                $row[] = session__build_name($thislist_sessions[$p['session_id']]);
                break;
            case 'payment_budget':
                if ($settings['enable_payment_module'] == 'y' && check_allow('payments_view')) {
                    $payment_budgets = payments__load_budgets();
                    if (isset($payment_budgets[$p['payment_budget']])) {
                        $row[] = $payment_budgets[$p['payment_budget']]['budget_name'];
                    } else {
                        $row[] = '-';
                    }
                }
                break;
            case 'payment_type':
                if ($settings['enable_payment_module'] == 'y' && check_allow('payments_view')) {
                    $payment_types = payments__load_paytypes();
                    if (isset($payment_types[$p['payment_type']])) {
                        $row[] = $payment_types[$p['payment_type']];
                    } else {
                        $row[] = '-';
                    }
                }
                break;
            case 'payment_amount':
                if ($settings['enable_payment_module'] == 'y' && check_allow('payments_view')) {
                    if ($p['payment_amt'] != '') {
                        $row[] = $p['payment_amt'];
                    } else {
                        $row[] = '-';
                    }
                }
                break;
            case 'pstatus_id':
                $pstatuses = expregister__get_participation_statuses();
                $row[] = $pstatuses[$p['pstatus_id']]['internal_name'];
                break;
            default:
                if (isset($pform_columns[$k])) {
                    if (preg_match("/(radioline|select_list|select_lang|radioline_lang)/", $pform_columns[$k]['type'])) {
                        if (isset($pform_columns[$k]['lang'][$p[$k]])) {
                            $row[] = lang($pform_columns[$k]['lang'][$p[$k]]);
                        } else {
                            $row[] = $p[$k];
                        }
                    } else {
                        $row[] = $p[$k];
                    }
                } else {
                    if (isset($p[$k])) {
//.........这里部分代码省略.........
开发者ID:danorama,项目名称:orsee,代码行数:101,代码来源:participant.php

示例14: select__sessions

function select__sessions($preval, $varname, $sessions, $hide_nosession = false, $with_exp = false)
{
    global $lang, $expadmindata;
    if (!$preval) {
        $preval = 0;
    }
    if (!$varname) {
        $varname = "session";
    }
    $out = '';
    $out .= '<SELECT name="' . $varname . '">';
    if (!$hide_nosession) {
        $out .= '<OPTION value="0"';
        if ($preval == 0) {
            $out .= " SELECTED";
        }
        $out .= '>' . lang('no_session') . '</OPTION>';
    }
    foreach ($sessions as $line) {
        $out .= '<OPTION value="' . $line['session_id'] . '"';
        if ($preval == $line['session_id']) {
            $out .= " SELECTED";
        }
        $out .= '>';
        if ($with_exp) {
            $out .= $line['experiment_name'] . ' - ';
        }
        $out .= ortime__format(ortime__sesstime_to_unixtime($line['session_start']), 'hide_second:true', lang('lang'));
        if (isset($line['p_is_assigned'])) {
            if ($line['p_is_assigned']) {
                $out .= ' - ' . lang('is_assigned_to_experiment_short');
            } else {
                $out .= ' - ' . lang('is_not_yet_assigned_to_experiment_short');
            }
        }
        $out .= '</OPTION>';
    }
    $out .= '</SELECT>';
    return $out;
}
开发者ID:danorama,项目名称:orsee,代码行数:40,代码来源:formhelpers.php

示例15: html__show_style_header

function html__show_style_header($area = 'public', $title = "")
{
    global $settings, $lang, $color, $expadmindata, $authdata, $navigation_disabled, $show_logged_in_menu;
    $tpl = file_get_contents('../style/' . $settings['style'] . '/html_header.php');
    // fill colors
    foreach ($color as $k => $o) {
        $tpl = str_replace("#" . $k . "#", $o, $tpl);
    }
    // add title
    $tpl = str_replace("#title#", $title, $tpl);
    // prepare menu
    if (!(isset($navigation_disabled) && $navigation_disabled)) {
        if ($area == 'admin' && isset($expadmindata['adminname'])) {
            $logged_in = true;
            $now = time();
            $current_user_data_box = lang('admin_area') . '<BR>' . lang('user') . ': <FONT color="' . $color['menu_item'] . '">' . $expadmindata['adminname'] . '</FONT><BR>' . lang('date') . ': <FONT color="' . $color['menu_item'] . '">' . ortime__format($now, 'hide_time:true,hide_year:true', $expadmindata['language']) . '</FONT><BR>' . lang('time') . ': <FONT color="' . $color['menu_item'] . '">' . ortime__format($now, 'hide_date:true', $expadmindata['language']) . '</FONT>';
            $menu = html__get_admin_menu();
        } else {
            $current_user_data_box = "";
            if (isset($_SESSION['pauthdata']['user_logged_in']) && $_SESSION['pauthdata']['user_logged_in'] || $show_logged_in_menu) {
                $logged_in = true;
            } else {
                $logged_in = false;
            }
            $menu = html__get_public_menu();
        }
        $tpl = str_replace("#navigation#", html__build_menu($menu, $logged_in, $current_user_data_box, 'vertical'), $tpl);
        $tpl = str_replace("#navigation_horizontal#", html__build_menu($menu, $logged_in, $current_user_data_box, 'horizontal'), $tpl);
    } else {
        $tpl = str_replace("#navigation#", '', $tpl);
        $tpl = str_replace("#navigation_horizontal#", '', $tpl);
    }
    // fill in language terms if any
    $pattern = "/lang\\[([^\\]]+)\\]/i";
    $replacement = "\$lang['\$1']";
    $tpl = preg_replace_callback($pattern, 'template_replace_callbackB', $tpl);
    echo $tpl;
}
开发者ID:kfarr2,项目名称:psu-orsee,代码行数:38,代码来源:html_stuff.php


注:本文中的ortime__format函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。