Exemplo n.º 1
0
 if (isset($del_license)) {
     // License in database and we want to delete it
     if (!strcmp($del_license, 'warning')) {
         // You've got another chance before it's deleted ;-)
         // We inform the administrator how many
         // projects will be affected by this deletion
         $db->query("SELECT COUNT(*) FROM developing WHERE " . "license='{$license}'");
         $db->next_record();
         $number_of_projects = $db->f('COUNT(*)');
         $be->box_full($t->translate('Warning!'), $t->translate('If you press another time the ' . 'Delete-button you will alter') . ' ' . $number_of_projects . ' ' . $t->translate('projects that have ' . 'actually license') . ' ' . $license);
         $bx->box_begin();
         $bx->box_title($t->translate('Delete License'));
         $bx->box_body_begin();
         $bx->box_columns_begin(2);
         $bx->box_column('left', '76%', '', '<b>' . $t->translate('License') . '</b>: ' . $license);
         $bx->box_column('right', '12%', '', html_form_action('PHP_SELF') . html_form_hidden('license', $license) . html_form_hidden('del_license', 'too_late') . html_form_submit($t->translate('Delete')) . html_form_end());
         $bx->box_columns_end();
         $bx->box_body_end();
         $bx->box_end();
         $bx->box_body_end();
         $bx->box_end();
     } else {
         $db->query("DELETE from licenses WHERE license='{$license}'");
         $bx->box_full($t->translate('Administration'), $t->translate('Deletion succesfully completed.'));
     }
 } else {
     if (empty($new_license) && empty($new_url) && empty($del_license)) {
         // It's already in our database
         // but no rename and no deletion and no new url... ->error
         $be->box_full($t->translate('Error'), $t->translate('That license already exists!'));
     }
Exemplo n.º 2
0
start_content();
if ($config_perm_admdoco != 'all' && (!isset($perm) || !$perm->have_perm($config_perm_admdoco))) {
    $be->box_full($t->translate('Error'), $t->translate('Access denied'));
} else {
    if (isset($delete)) {
        if ($delete == 1) {
            $query = "SELECT * FROM doco WHERE docoid='{$docoid}' " . "AND language='{$la}'";
            $db->query($query);
            $db->next_record();
            doco_show($db);
            $bx->box_begin();
            $bx->box_title($t->translate('Do you really want to delete ' . 'this Page Documentation entry?'));
            $bx->box_body_begin();
            $bx->box_columns_begin(2);
            $bx->box_column('left', '76%', '', $t->translate('There is no way for undeletion.'));
            $bx->box_column('right', '12%', '', html_form_action('PHP_SELF') . html_form_hidden('modify', 0) . html_form_hidden('delete', 2) . html_form_hidden('docoid', $db->f('docoid')) . html_form_submit($t->translate('Yes, Delete')) . html_form_end() . html_form_action('PHP_SELF') . html_form_hidden('modify', 1) . html_form_hidden('delete', 0) . html_form_hidden('docoid', $db->f('docoid')) . html_form_submit($t->translate('No, just modify')) . html_form_end());
            $bx->box_columns_end();
            $bx->box_body_end();
            $bx->box_end();
        }
        if ($delete == 2) {
            // We remove it from our DB
            $db->query("DELETE FROM doco WHERE docoid='{$docoid}' " . "AND language='{$la}'");
            if ($db->affected_rows() < 1) {
                $be->box_full($t->translate('Error'), $t->translate('Database Error'));
            } else {
                $bx->box_full($t->translate('Page Documentation ' . 'Administration'), $t->translate('The documentation for that ' . 'page has been deleted'));
            }
        }
    }
    if (isset($modify)) {
Exemplo n.º 3
0
$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);
start_content();
if ($config_perm_admdoco != 'all' && (!isset($perm) || !$perm->have_perm($config_perm_admdoco))) {
    $be->box_full($t->translate('Error'), $t->translate('Access denied'));
} else {
    $db->query("SELECT * FROM doco WHERE language='{$la}'");
    $bx->box_begin();
    $bx->box_title($t->translate('Page Documentation Administration'));
    $bx->box_body_begin();
    $bx->box_columns_begin(2);
    $bx->box_column('left', '88%', '', $t->translate('Enter a new ' . 'documentation entry ' . 'for a page'));
    $bx->box_column('right', '12%', '', html_form_action('insdoco.php') . html_form_hidden('create', 1) . html_form_submit($t->translate('Insert'), 'Insert') . html_form_end());
    $bx->box_columns_end();
    $bx->box_body_end();
    $bx->box_end();
    while ($db->next_record()) {
        $bx->box_begin();
        $bx->box_title($t->translate('Page') . ': ' . $db->f('page') . ', ' . $t->translate('Header') . ': ' . $db->f('header'));
        $bx->box_body_begin();
        $bx->box_columns_begin(2);
        $bx->box_column('left', '76%', '', $db->f('doco'));
        $bx->box_column('right', '12%', '', html_form_action('insdoco.php') . html_form_hidden('modify', 1) . html_form_hidden('delete', 0) . html_form_hidden('docoid', $db->f('docoid')) . html_form_submit($t->translate('Change'), 'Change') . html_form_end());
        $bx->box_column('right', '12%', '', html_form_action('insdoco.php') . html_form_hidden('modify', 0) . html_form_hidden('delete', 1) . html_form_hidden('docoid', $db->f('docoid')) . html_form_submit($t->translate('Delete'), 'Delete') . html_form_end());
        $bx->box_columns_end();
        $bx->box_body_end();
        $bx->box_end();
    }
}
end_content();
require 'include/footer.inc';
@page_close();
        $bx->box_next_row_of_columns();
        $bx->box_column("left", "30%", $bgcolor, "<B>" . $t->translate("Sender") . ":</B> &nbsp; ");
        $pmessfrom = $db->f("pmessfrom");
        $pmessfrom = ereg_replace("mailto:", "", $pmessfrom);
        $bx->box_column("left", "70%", $bgcolor, $pmessfrom);
        $bx->box_next_row_of_columns();
        $bx->box_column("left", "30%", $bgcolor, "<B>" . $t->translate("Time") . ":</B> &nbsp; ");
        $timestamp = mktimestamp($db->f("pmesstime"));
        $bx->box_column("left", "70%", $bgcolor, timestr_short($timestamp));
        $bx->box_next_row_of_columns();
        $bx->box_colspan(2, "center", $bgcolor, "<b>&nbsp;</b>", "");
        $bgcolor = "#F0F0F0";
        $bx->box_next_row_of_columns();
        $pmessmessage = $db->f("pmessmessage");
        $bx->box_colspan(2, "left", $bgcolor, "<B>" . $t->translate("Content") . ":</B> &nbsp;<BR>\n" . "<PRE>" . $pmessmessage . "</PRE>");
        $bx->box_next_row_of_columns();
        $bgcolor = "#FFFFFF";
        $bx->box_colspan(2, "center", $bgcolor, html_form_action("pmess_edit.php", array(), "POST") . html_form_hidden("pmessid", $pmessid) . html_form_submit($t->translate("Reply"), "") . html_form_action("req_manage.php", array(), "POST") . html_form_hidden("pmessid", $pmessid) . html_form_hidden("option", "delete") . html_form_submit($t->translate("Delete"), ""));
        $bx->box_next_row_of_columns();
        $bx->box_columns_end();
        $bx->box_body_end();
        $bx->box_end();
        $db->query("UPDATE pmessages SET pmessstatus='read' WHERE pmessid='{$pmessid}' AND pmessto='{$username}'");
    }
}
?>
<!-- end content -->

<?php 
require "./include/footer.inc";
@page_close();