Пример #1
0
<?php

require_once './inc/func_main.php';
if (!$usrinfo['right_aud']) {
    unauthorizedAccess(11, 1, 0, 0);
}
function operationType($type)
{
    $sql_ga = "SELECT " . DB_PREFIX . "operation_type.name as 'name' FROM " . DB_PREFIX . "operation_type WHERE " . DB_PREFIX . "operation_type.id='" . $type . "'";
    $res_ga = MySQL_Query($sql_ga);
    if (MySQL_Num_Rows($res_ga)) {
        while ($rec_ga = MySQL_Fetch_Assoc($res_ga)) {
            $name = StripSlashes($rec_ga['name']);
            return $name;
        }
    } else {
        $name = 'neznámý typ';
        return $name;
    }
}
function recordType($type)
{
    $sql_ga = "SELECT " . DB_PREFIX . "record_type.name as 'name' FROM " . DB_PREFIX . "record_type WHERE " . DB_PREFIX . "record_type.id='" . $type . "'";
    $res_ga = MySQL_Query($sql_ga);
    if (MySQL_Num_Rows($res_ga)) {
        while ($rec_ga = MySQL_Fetch_Assoc($res_ga)) {
            $name = StripSlashes($rec_ga['name']);
            //					if ($name=='zlobody') {
            //						$name=$GLOBALS['point'].'y';
            //					}
            return $name;
Пример #2
0
require_once './inc/func_main.php';
if (is_numeric($_REQUEST['rid']) && $usrinfo['right_text']) {
    $sql_a = "SELECT * FROM " . DB_PREFIX . "c2s WHERE " . DB_PREFIX . "c2s.idsolver=" . $usrinfo['id'] . " AND " . DB_PREFIX . "c2s.idcase=" . $_REQUEST['rid'];
    $res_a = MySQL_Query($sql_a);
    $rec_a = MySQL_Fetch_array($res_a);
    $res = MySQL_Query("SELECT * FROM " . DB_PREFIX . "cases WHERE id=" . $_REQUEST['rid']);
    $rec = MySQL_Fetch_Assoc($res);
    if ($usrinfo['right_text'] && ($rec['secret'] == 0 || $usrinfo['right_power'] || $rec_a['iduser'])) {
        $symbolbutton = ' <a href="symbols.php">přiřadit symboly</a>';
    } else {
        $symbolbutton = '';
    }
    $res = MySQL_Query("SELECT * FROM " . DB_PREFIX . "cases WHERE id=" . $_REQUEST['rid']);
    if ($rec_c = MySQL_Fetch_Assoc($res)) {
        if (($rec_c['secret'] == 1 || $rec_c['deleted'] == 1) && !$usrinfo['right_power']) {
            unauthorizedAccess(3, $rec_c['secret'], $rec_c['deleted'], $_REQUEST['rid']);
        }
        auditTrail(3, 1, $_REQUEST['rid']);
        pageStart('Úprava případu');
        mainMenu(3);
        sparklets('<a href="./cases.php">případy</a> &raquo; <strong>úprava případu</strong>', $symbolbutton);
        if ($rec['secret'] == 1 && !$usrinfo['right_power'] && !$rec_a['iduser']) {
            echo '<div id="obsah"><p>Hezký pokus.</p></div>';
            goto end;
        }
        ?>
<div id="obsah">
	<script type="text/javascript">
	<!--
	window.onload=function(){
		//FixitRight('submitbutton', 'ramecek');
Пример #3
0
    $html .= "</select> ";
    // roletka let
    $html .= "<select class=\"year\" name=\"" . $name . "year\">";
    for ($i = $startyear; $i <= $endyear; $i++) {
        $html .= "<option " . ($i == $ayear ? ' selected' : '') . " value='{$i}'>{$i}</option>";
    }
    $html .= "</select> ";
    return $html;
}
if (is_numeric($_REQUEST['rid']) && ($usrinfo['right_text'] || $usrinfo['id'] == $author && $reportarray['status'] < 1)) {
    $sql = "SELECT\r\n\t\t" . DB_PREFIX . "reports.id AS 'id',\r\n\t\t" . DB_PREFIX . "reports.datum AS 'datum',\r\n\t\t" . DB_PREFIX . "reports.label AS 'label',\r\n\t\t" . DB_PREFIX . "reports.task AS 'task',\r\n                " . DB_PREFIX . "reports.deleted AS 'deleted',\r\n\t\t" . DB_PREFIX . "reports.summary AS 'summary',\r\n\t\t" . DB_PREFIX . "reports.impacts AS 'impacts',\r\n\t\t" . DB_PREFIX . "reports.details AS 'details',\r\n\t\t" . DB_PREFIX . "reports.secret AS 'secret',\r\n\t\t" . DB_PREFIX . "reports.status AS 'status',\r\n\t\t" . DB_PREFIX . "users.login AS 'autor',\r\n\t\t" . DB_PREFIX . "reports.type AS 'type',\r\n\t\t" . DB_PREFIX . "reports.adatum AS 'adatum',\r\n\t\t" . DB_PREFIX . "reports.start AS 'start',\r\n\t\t" . DB_PREFIX . "reports.end AS 'end',\r\n\t\t" . DB_PREFIX . "reports.energy AS 'energy',\r\n\t\t" . DB_PREFIX . "reports.inputs AS 'inputs'\r\n\t\tFROM " . DB_PREFIX . "reports, " . DB_PREFIX . "users\r\n\t\tWHERE " . DB_PREFIX . "reports.iduser="******"users.id AND " . DB_PREFIX . "reports.id=" . $_REQUEST['rid'];
    $res = MySQL_Query($sql);
    if ($rec_actr = MySQL_Fetch_Assoc($res)) {
        //test oprávněnosti přístupu
        if (($rec_actr['secret'] == 1 || $rec_actr['deleted'] == 1) && !$usrinfo['right_power']) {
            unauthorizedAccess(4, $rec_actr['secret'], $rec_actr['deleted'], $_REQUEST['rid']);
        }
        //auditní stopa
        auditTrail(4, 1, $_REQUEST['rid']);
        // následuje generování hlavičky
        pageStart('Úprava hlášení' . ($type == 1 ? ' z výjezdu' : ($type == 2 ? ' z výslechu' : '')));
        mainMenu(3);
        sparklets('<a href="./reports.php">hlášení</a> &raquo; <strong>úprava hlášení' . ($type == 1 ? ' z výjezdu' : ($type == 2 ? ' z výslechu' : '')) . '</strong>', '<a href="symbols.php">přiřadit symboly</a>');
        $aday = Date('j', $rec_actr['adatum']);
        $amonth = Date('n', $rec_actr['adatum']);
        $ayear = Date('Y', $rec_actr['adatum']);
        ?>
<div id="obsah">
	<script type="text/javascript">
	<!--
	window.onload=function(){
Пример #4
0
<?php

require_once './inc/func_main.php';
if (!$usrinfo['right_power']) {
    unauthorizedAccess(8, 1, 0, 0);
}
pageStart('Úprava uživatele');
mainMenu(2);
sparklets('<a href="./users.php">uživatelé</a> &raquo; <strong>úprava uživatele</strong>');
if (is_numeric($_REQUEST['rid'])) {
    $res = MySQL_Query("SELECT * FROM " . DB_PREFIX . "users WHERE id=" . $_REQUEST['rid']);
    if ($rec = MySQL_Fetch_Assoc($res)) {
        ?>
<div id="obsah">
<form action="procuser.php" method="post" id="inputform" class="inputform">
	<fieldset><legend><h2>Základní údaje</h2></legend>
	<div>
	  <h3><label for="login" id="login">Login:</label></h3>
	  <input type="text" name="login" id="login" value="<?php 
        echo StripSlashes($rec['login']);
        ?>
" />
	</div>
	<div>
	  <h3><label for="power" id="poweruser">Power user:</label></h3>
		<select name="power" id="poweruser">
			<option value="0"<?php 
        if ($rec['right_power'] == 0) {
            echo ' selected="selected"';
        }
        ?>