Ejemplo n.º 1
0
    echo '<tr><td valign="top">' . $fs[$i]['mount'] . '</td>';
    echo '<td valign="top">' . $fs[$i]['fstype'] . '</td>';
    echo '<td valign="top">' . $fs[$i]['disk'] . '</td>';
    echo '<td valign="top">';
    $statusbar = new statusbar();
    $statusbar->info_text = $si_used;
    $statusbar->turn_red_point = 90;
    $statusbar->print_bar($fs[$i]['used'], $fs[$i]['size']);
    echo '</td>';
    echo '<td align="right" valign="top">' . format_size($fs[$i]['free'] * 1024, 2) . '</td>';
    echo '<td align="right" valign="top">' . format_size($fs[$i]['used'] * 1024, 2) . '</td>';
    echo '<td align="right" valign="top">' . format_size($fs[$i]['size'] * 1024, 2) . '</td></tr>';
}
echo '<tr><td valign="top" align="right" colspan="3"><i>' . $si_total . ':</i></td>';
echo '<td valign="top">';
$statusbar = new statusbar();
$statusbar->info_text = $si_used;
$statusbar->turn_red_point = 90;
$statusbar->print_bar($sum['used'], $sum['size']);
echo '</td>';
echo '<td align="right" valign="top">' . format_size($sum['free'] * 1024, 2) . '</td>';
echo '<td align="right" valign="top">' . format_size($sum['used'] * 1024, 2) . '</td>';
echo '<td align="right" valign="top">' . format_size($sum['size'] * 1024, 2) . '</td></tr>';
?>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
Ejemplo n.º 2
0
$my_ticket->change_date = $change_date;
if (isset($_POST['complete'])) {
    $my_ticket->complete = Security::sqlsecure($_POST['complete']);
}
if (isset($_POST['t_priv_msg'])) {
    $my_ticket->notify_priv_msg = Security::sqlsecure($_POST['t_priv_msg']);
}
if (isset($_POST['t_email'])) {
    $my_ticket->notify_email = Security::sqlsecure($_POST['t_email']);
}
if (isset($_POST['project_id'])) {
    $my_ticket->project_id = Security::sqlsecure($_POST['project_id']);
}
$acl_read = $GO_SECURITY->get_new_acl('ticket read');
$acl_write = $GO_SECURITY->get_new_acl('ticket write');
$my_ticket->acl_read = $acl_read;
$my_ticket->acl_write = $acl_write;
$GO_SECURITY->add_user_to_acl($GO_SECURITY->user_id, $acl_read);
$GO_SECURITY->add_user_to_acl($my_ticket->assigned_id, $acl_write);
$my_ticket->sql_insert();
$Ticket_Number = $my_ticket->ticket_nr;
$textmenu = menu("Show_Tickets", '');
eval($textmenu);
$tabtable = new tabtable('newticket_tabtable', 'Adding new ticket ...', '100%', '400');
$tabtable->print_head();
$statusbar = new statusbar();
$statusbar->info_text = "Adding new ticket";
$statusbar->turn_red_point = 90;
echo "<center><br><br>" . $statusbar->print_bar(95, 100);
echo "<script language=\"Javascript\" type=\"text/javascript\">\n        <!--\n        function gotoThread(){\n        window.location.href=\"showline.php?Ticket_Number={$Ticket_Number}\";\n        }\n        window.setTimeout(\"gotoThread()\", 3000);\n        //-->\n        </script>\n\n";
$tabtable->print_foot();
Ejemplo n.º 3
0
function show_html($Ticket_Number, $result)
{
    global $name;
    $textmenu = menu("Show_Tickets", '');
    eval($textmenu);
    $tabtable = new tabtable('newticket_tabtable', 'modifing ticket', '100%', '400');
    $tabtable->print_head();
    $statusbar = new statusbar();
    $statusbar->info_text = "Modifing ticket {$Ticket_Number}";
    $statusbar->turn_red_point = 90;
    echo "<center><br><br>" . $statusbar->print_bar(95, 100);
    echo " <script language=\"Javascript\" type=\"text/javascript\">\n        <!--\n        function gotoThread(){\n        window.location.href=\"showline.php?Ticket_Number={$Ticket_Number}\";\n        }\n        window.setTimeout(\"gotoThread()\", 3000);\n        //-->\n        </script>\n";
    $tabtable->print_foot();
}
Ejemplo n.º 4
0
     echo '<br /><br />';
     //or direct database link:
     //this is how you should load a class:
     //this function gets all users
     $GO_USERS->get_users();
     //we can now pass the users object to the dropdown box and add all the users to it
     //declare the user var
     $user = isset($_POST['user']) ? $_POST['user'] : '******';
     $dropbox = new dropbox();
     //add the users class, use 'id' for value and 'name' for text
     $dropbox->add_sql_data('GO_USERS', 'id', 'first_name');
     //print the dropbox
     $dropbox->print_dropbox('user', $user);
     echo '<br /><br />';
     //statusbar control
     $statusbar = new statusbar();
     $statusbar->info_text = 'Group-Office usage';
     $statusbar->turn_red_point = 90;
     $statusbar->print_bar(75, 100);
     break;
 case 'acl_demo':
     //You can secure an object by giving it an ACL (Access Control List). When the user
     //you logged in with was created it also got an ACL. This acl is used to protect your personal profile.
     //We already got the user information in the above example so the user acl = stored in $user['acl_id'].
     //So if we want to set the permissions this can be done really easily with the acl control
     echo '<p>You are visible to:</p>';
     $user = $GO_USERS->get_user($GO_SECURITY->user_id);
     print_acl($user['acl_id']);
     //When you are creating your own secured objects you just call th e function: $GO_SECURITY->get_new_acl()
     //to create a new ACL. (See classes/base/*.security.class.inc)
     break;