~ubuntu-branches/ubuntu/lucid/boinc/lucid

« back to all changes in this revision

Viewing changes to html/inc/bolt_util.inc

  • Committer: Bazaar Package Importer
  • Author(s): Frank S. Thomas, Frank S. Thomas
  • Date: 2008-05-31 08:02:47 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20080531080247-4ce890lp2rc768cr
Tags: 6.2.7-1
[ Frank S. Thomas ]
* New upstream release.
  - BOINC Manager: Redraw disk usage charts immediately after connecting to
    a (different) client. (closes: 463823)
* debian/copyright:
  - Added the instructions from debian/README.Debian-source about how
    repackaged BOINC tarballs can be reproduced because DevRef now
    recommends to put this here instead of in the afore-mentioned file.
  - Updated for the new release.
* Removed the obsolete debian/README.Debian-source.
* For consistency upstream renamed the core client and the command tool
  ("boinc_client" to "boinc" and "boinc_cmd" to "boinccmd"). Done the same
  in all packages and created symlinks with the old names for the binaries
  and man pages. Also added an entry in debian/boinc-client.NEWS explaining
  this change.
* debian/rules: Do not list Makefile.ins in the clean target individually,
  just remove all that can be found.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?php
 
2
 
 
3
function info_incomplete($user) {
 
4
    if (!$user->bolt->birth_year) return true;
 
5
    if (!$user->bolt->sex) return true;
 
6
    return false;
 
7
}
 
8
 
 
9
function birth_year_select($user) {
 
10
    $this_year = date("Y");
 
11
    $x = "<select name=birth_year>\n";
 
12
    for ($i=$this_year-100; $i<$this_year; $i++) {
 
13
        $s = ($i == $user->bolt->birth_year)?"selected":"";
 
14
        $x .= "<option value=$i $s>$i</option>\n";
 
15
    }
 
16
    $s = (!$user->bolt->birth_year)?"selected":"";
 
17
        $x .= "<option value=$0 $s>Unspecified</option>\n";
 
18
    $x .= "</select>\n";
 
19
    return $x;
 
20
}
 
21
 
 
22
function sex_select($user) {
 
23
    $x = "<select name=sex>\n";
 
24
    $s = ($user->bolt->sex == 0)?"selected":"";
 
25
    $x .= "<option value=0 $s>Unspecified</option>\n";
 
26
    $s = ($user->bolt->sex == 1)?"selected":"";
 
27
    $x .= "<option value=1 $s>Male</option>\n";
 
28
    $s = ($user->bolt->sex == 2)?"selected":"";
 
29
    $x .= "<option value=2 $s>Female</option>\n";
 
30
    $x .= "</select>\n";
 
31
    return $x;
 
32
}
 
33
 
 
34
function request_info($user, $course) {
 
35
    page_head("About you");
 
36
    echo "
 
37
        You may optionally tell us some facts about yourself.
 
38
        This information will help us improve this course,
 
39
        and will be kept private.
 
40
        <p>
 
41
        <form action=bolt_sched.php>
 
42
        <input type=hidden name=action value=update_info>
 
43
        <input type=hidden name=course_id value=$course->id>
 
44
    ";
 
45
    start_table();
 
46
    row2("Birth year", birth_year_select($user));
 
47
    row2("Sex", sex_select($user));
 
48
    row2("", "<input type=submit value=OK>");
 
49
    end_table();
 
50
    echo "</form>\n";
 
51
    page_tail();
 
52
}
 
53
 
 
54
?>