コード例 #1
0
            $sponsoring_text = $db->f('sponsoring_text');
            $ary = timestamp_to_date($db->f('valid'));
            global $valid_day, $valid_month, $valid_year;
            $valid_day = $ary['day'];
            $valid_month = $ary['month'];
            $valid_year = $ary['year'];
            $ary = timestamp_to_date($db->f('begin'));
            global $begin_day, $begin_month, $begin_year;
            $begin_day = $ary['day'];
            $begin_month = $ary['month'];
            $begin_year = $ary['year'];
            $ary = timestamp_to_date($db->f('finish'));
            global $finish_day, $finish_month, $finish_year;
            $finish_day = $ary['day'];
            $finish_month = $ary['month'];
            $finish_year = $ary['year'];
        }
        print $t->translate("Sponsors can modify their sponsoring wish " . "using this form") . ".\n<br><p>\n";
        sponsoring_form($proid);
    } else {
        /** Check that budget is positive **/
        if ($budget <= 0) {
            generate_failed_box($t->translate("Sponsoring"), $t->translate("Budget must be greater " . "than zero"));
        } else {
            sponsoring_insert($proid, $auth->auth['uname'], $sponsoring_text, $budget, $valid_day, $valid_month, $valid_year, $begin_day, $begin_month, $begin_year, $finish_day, $finish_month, $finish_year);
        }
    }
}
end_content();
require 'include/footer.inc';
@page_close();
コード例 #2
0
#
# $Id: doco.php,v 1.1 2003/11/21 12:55:58 helix Exp $
#
######################################################################
require 'include/prepend.php3';
page_open(array('sess' => 'SourceAgency_Session'));
if (isset($auth) && !empty($auth->auth['perm'])) {
    page_close();
    page_open(array('sess' => 'SourceAgency_Session', 'auth' => 'SourceAgency_Auth', 'perm' => 'SourceAgency_Perm'));
}
require 'include/header.inc';
$be = new box('80%', $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_error_font_color, $th_box_body_align);
$box_doco = new box('80%', $th_box_frame_color, $th_box_frame_width, $th_box_title_bgcolor, $th_box_title_font_color, $th_box_title_align, $th_box_body_bgcolor, $th_box_body_font_color, $th_box_body_align);
start_content();
if (is_not_set_or_empty($page)) {
    generate_failed_box('Page not Specified', 'Page was not specified for ' . 'documentation is required');
} else {
    $basename = basename($page);
    /* remove any extensions that may be left over (inc, php, php3) */
    $basename = preg_replace('/[.](inc|php).?$/', '', $basename);
    $db->query("SELECT * FROM doco WHERE page='{$basename}' AND language='{$la}'");
    if ($db->num_rows() == 0) {
        /* no doc in that language */
        /* let's see if there is at least some documentation in English */
        $db->query("SELECT * FROM doco WHERE page='{$basename}' " . "AND language='English'");
        if ($db->num_rows() == 0) {
            $be->box_full($page, $t->translate('Has no documentation'));
        } else {
            $db->next_record();
            $box_doco->box_strip($t->translate('Our apologies. Documentation ' . 'only available in English.'));
            $box_doco->box_full($db->f('header'), $db->f('doco'));