当前位置: 首页>>代码示例>>PHP>>正文


PHP is_super函数代码示例

本文整理汇总了PHP中is_super函数的典型用法代码示例。如果您正苦于以下问题:PHP is_super函数的具体用法?PHP is_super怎么用?PHP is_super使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了is_super函数的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: list_tickets

function list_tickets($sort_by_field = '', $sort_value = '', $my_offset = 0)
{
    // list tickets ===================================================
    global $istest, $iw_width, $units_side_bar_height, $do_blink, $nature, $disposition, $patient, $incident, $incidents, $gt_status;
    // 12/3/10
    $time = microtime(true);
    // Gets microseconds
    @session_start();
    //
    $captions = array(get_text("Current situation"), "{$incidents} closed today", "{$incidents} closed yesterday+", "{$incidents} closed this week", "{$incidents} closed last week", "{$incidents} closed last week+", "{$incidents} closed this month", "{$incidents} closed last month", "{$incidents} closed this year", "{$incidents} closed last year", "Scheduled");
    $by_severity = array(0, 0, 0);
    // counters // 5/2/10
    if (!array_key_exists('func', $_GET)) {
        //	3/15/11
        $func = 0;
    } else {
        extract($_GET);
    }
    if (array_key_exists('func', $_GET) && $_GET['func'] == 10) {
        //	3/15/11
        $func = 10;
    }
    $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}allocates` WHERE `type`= 4 AND `resource_id` = '{$_SESSION['user_id']}' ORDER BY `id` ASC;";
    //	6/10/11
    $result = mysql_query($query);
    //	6/10/11
    $al_groups = array();
    $al_names = "";
    $a_gp_bounds = array();
    while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
        //	6/10/11
        $al_groups[] = $row['group'];
        $query2 = "SELECT * FROM `{$GLOBALS['mysql_prefix']}region` WHERE `id`= '{$row['group']}';";
        //	6/10/11
        $result2 = mysql_query($query2);
        // 4/18/11
        while ($row2 = stripslashes_deep(mysql_fetch_assoc($result2))) {
            //	//	6/10/11
            $al_names .= $row2['group_name'] . ", ";
        }
    }
    if (is_super()) {
        //	6/10/11
        $al_names .= "Superadmin Level";
    }
    if (isset($_SESSION['list_type'])) {
        $func = $_SESSION['list_type'];
    }
    // 12/02/10	 persistance for the tickets list
    $cwi = get_variable('closed_interval');
    // closed window interval in hours
    $get_sortby = empty($_GET) || !empty($_GET) && empty($_GET['sortby']) ? "" : $_GET['sortby'];
    $get_offset = empty($_GET) || !empty($_GET) && empty($_GET['offset']) ? "" : $_GET['offset'];
    if (!isset($_GET['status'])) {
        $open = "Open";
    } else {
        $open = isset($_GET['status']) && $_GET['status'] == $GLOBALS['STATUS_OPEN'] ? "Open" : "";
        $open = isset($_GET['status']) && $_GET['status'] == $GLOBALS['STATUS_SCHEDULED'] ? "Scheduled" : "";
        //	11/29/10
    }
    if (isset($_SESSION['viewed_groups'])) {
        //	6/10/11
        $curr_viewed = explode(",", $_SESSION['viewed_groups']);
    } else {
        $curr_viewed = $al_groups;
    }
    $curr_names = "";
    //	6/10/11
    $z = 0;
    //	6/10/11
    foreach ($curr_viewed as $grp_id) {
        //	6/10/11
        $counter = count($curr_viewed) > $z + 1 ? ", " : "";
        $curr_names .= get_groupname($grp_id);
        $curr_names .= $counter;
        $z++;
    }
    $heading = $captions[$func] . " - " . get_variable('map_caption');
    $regs_string = "<FONT SIZE='-1'>Allocated " . get_text("Regions") . ":&nbsp;&nbsp;" . $al_names . "&nbsp;&nbsp;|&nbsp;&nbsp;Currently Viewing " . get_text("Regions") . ":&nbsp;&nbsp;" . $curr_names . "</FONT>";
    //	6/10/11
    $eols = array("\r\n", "\n", "\r");
    // all flavors of eol
    @session_start();
    $query = "SELECT `id` FROM `{$GLOBALS['mysql_prefix']}responder`";
    // 5/12/10
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), __FILE__, __LINE__);
    unset($result);
    $required = 48 + mysql_affected_rows() * 22;
    // derived by trial and error - emphasis the latter = 7/18/10
    $the_height = (int) min(round($units_side_bar_height * $_SESSION['scr_height']), $required);
    // see main for $units_side_bar_height value
    $buttons_width = (int) get_variable('map_width') - 50;
    $show_controls = isset($_SESSION['hide_controls']) && $_SESSION['hide_controls'] == "s" ? "" : "none";
    //	3/15/11
    $col_butt = isset($_SESSION['hide_controls']) && $_SESSION['hide_controls'] == "s" ? "" : "none";
    //	3/15/11
    $exp_butt = isset($_SESSION['hide_controls']) && $_SESSION['hide_controls'] == "h" ? "" : "none";
    //	3/15/11
    $show_resp = isset($_SESSION['resp_list']) && $_SESSION['resp_list'] == "s" ? "" : "none";
    //	3/15/11
//.........这里部分代码省略.........
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:101,代码来源:functions_major.inc.php

示例2: get_text

	</TD>
	</TR>
<TR CLASS='odd'>	<!--  3/15/11 -->
	<TD CLASS="td_label" onmouseout="UnTip()" onmouseover="Tip('<?php 
    print $titles["_proto"];
    ?>
');"><?php 
    print get_text("Protocol");
    ?>
</A>:</SPAN></TD>
	<TD></TD>
	<TD ID='proto_cell'></TD>
	</TR>
<?php 
    if (get_num_groups() > 1) {
        if (is_super() && get_num_groups() && COUNT(get_allocates(4, $_SESSION['user_id'])) > 1) {
            //	6/10/11
            ?>
		<TR CLASS='even' VALIGN="top">	<!--  6/10/11 -->
		<TD CLASS="td_label" onmouseout='UnTip()' onmouseover="Tip('Sets groups that Incident is allocated to - click + to expand, - to collapse');"><?php 
            print get_text("Groups");
            ?>
</A>: </TD>
		<TD>
		<SPAN id='expand_gps' onClick="$('groups_sh').style.display = 'inline-block'; $('expand_gps').style.display = 'none'; $('collapse_gps').style.display = 'inline-block';" style = 'display: inline-block; font-size: 16px; border: 1px solid;'><B>+</B></SPAN>
		<SPAN id='collapse_gps' onClick="$('groups_sh').style.display = 'none'; $('collapse_gps').style.display = 'none'; $('expand_gps').style.display = 'inline-block';" style = 'display: none; font-size: 16px; border: 1px solid;'><B>-</B></SPAN></TD>
		<TD>	
<?php 
            $alloc_groups = implode(',', get_allocates(4, $_SESSION['user_id']));
            //	6/10/11
            print get_user_group_butts($_SESSION['user_id']);
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:add.php

示例3: is_super

 // set the max
 $user_level = is_super() ? 9999 : $_SESSION['user_id'];
 $regions_inuse = get_regions_inuse($user_level);
 //	6/10/11
 $group = get_regions_inuse_numbers($user_level);
 //	6/10/11
 $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}allocates` WHERE `type`= 4 AND `resource_id` = '{$_SESSION['user_id']}' ORDER BY `id` ASC;";
 // 6/10/11
 $result = mysql_query($query);
 // 6/10/11
 $al_groups = array();
 $al_names = "";
 while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
     // 6/10/11
     $al_groups[] = $row['group'];
     if (!is_super()) {
         $query2 = "SELECT * FROM `{$GLOBALS['mysql_prefix']}region` WHERE `id`= '{$row['group']}';";
         // 6/10/11
         $result2 = mysql_query($query2);
         // 6/10/11
         while ($row2 = stripslashes_deep(mysql_fetch_assoc($result2))) {
             // 6/10/11
             $al_names .= $row2['group_name'] . ", ";
         }
     } else {
         $al_names = "ALL. Superadmin Level";
     }
 }
 if (isset($_SESSION['viewed_groups'])) {
     //	6/10/11
     $curr_viewed = explode(",", $_SESSION['viewed_groups']);
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:facilities.php

示例4: realpath

<div id="footer">
  <div id="footerText" class="vCenter">
    <?php 
$root = realpath($_SERVER["DOCUMENT_ROOT"]);
require_once "{$root}/includes/admin_tools.php";
require_once "{$root}/includes/connect_db.php";
if (isset($_SESSION['username'])) {
    # Let user known they are logged in and give them the option to log out
    $logout = "<a href='/admin/logout.php'>Logout</a>";
    $update = "<a href='/admin/update.php'>Update Information</a>";
    echo "Logged in as {$_SESSION['username']} | {$logout} | {$update}";
    if (is_super($dbc, $_SESSION['username'])) {
        $add = "<a href='/admin/add_admin.php'>Create/Delete Admin</a>";
        $query = "<a href='/admin/query.php'>Query</a>";
        echo " | {$add} | {$query}";
    }
} else {
    # Login link
    echo "<a href='/admin.php'>Login</a>";
}
?>
    <script type='text/javascript'>
	document.getElementsByTagName('body')[0].style.minHeight = window.innerHeight - 140;
    </script>
  </div>
</div>
开发者ID:brendon-boldt,项目名称:limbo-db,代码行数:26,代码来源:footer.php

示例5: get_butts

function get_butts($ticket_id, $unit_id)
{
    global $patient;
    $win_height = get_variable('map_height') + 120;
    $win_width = get_variable('map_width') + 10;
    if ($_SESSION['internet']) {
        print "<INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Map' onClick  = \"var popWindow = window.open('map_popup.php?id={$ticket_id}', 'PopWindow', 'resizable=1, scrollbars, height={$win_height}, width={$win_width}, left=250,top=50,screenX=250,screenY=50'); popWindow.focus();\" />\n";
        // 7/3/10
    }
    if (can_edit()) {
        // 5/23/11
        print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'New' onClick = \"var newWindow = window.open('add.php?mode=1', 'addWindow', 'resizable=1, scrollbars, height=640, width=800, left=100,top=100,screenX=100,screenY=100'); newWindow.focus();\" />\n";
        // 8/9/10
        print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Edit' onClick = \"var newWindow = window.open('edit_nm.php?mode=1&id={$ticket_id}', 'editWindow', 'resizable=1, scrollbars, height=600, width=600, left=100,top=100,screenX=100,screenY=100'); newWindow.focus();\" />\n";
        // 2/1/10
        if (!is_closed($ticket_id)) {
            // 10/5/09
            print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Close' onClick = \"var mailWindow = window.open('close_in.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=480, width=700, left=100,top=100,screenX=100,screenY=100'); mailWindow.focus();\" />\n";
            // 8/20/09
        }
    }
    // end if ($can_edit())
    if (is_administrator() || is_super() || is_unit()) {
        if (!is_closed($ticket_id)) {
            print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Action' onClick  = \"var actWindow = window.open('action_w.php?mode=1&ticket_id={$ticket_id}', 'ActWindow', 'resizable=1, scrollbars, height=480, width=900, left=250,top=50,screenX=250,screenY=50'); ActWindow.focus();\" />\n";
            // 7/3/10
            print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = '{$patient}' onClick  = \"var patWindow = window.open('patient_w.php?mode=1&ticket_id={$ticket_id}', 'patWindow', 'resizable=1, scrollbars, height=480,width=720, left=250,top=50,screenX=250,screenY=50'); patWindow.focus();\" />\n";
            // 7/3/10
        }
        print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Notify' onClick  = \"var notWindow = window.open('config.php?mode=1&func=notify&id={$ticket_id}', 'NotWindow', 'resizable=1, scrollbars, height=400, width=600, left=250,top=50,screenX=250,screenY=50'); notWindow.focus();\" />\n";
        // 7/3/10
    }
    print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Note' onClick = \"var noteWindow = window.open('add_note.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=240, width=600, left=100,top=100,screenX=100,screenY=100'); noteWindow.focus();\" />\n";
    // 10/8/08
    //	print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Print' onClick='main.php?print=true&id=$ticket_id;'>\n ";
    print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'E-mail' onClick = \"var mailWindow = window.open('mail.php?ticket_id={$ticket_id}', 'mailWindow', 'resizable=1, scrollbars, height=600, width=600, left=100,top=100,screenX=100,screenY=100'); mailWindow.focus();\" />\n";
    // 2/1/10
    print "<BR /><INPUT TYPE='button' CLASS = 'btn_smaller' VALUE = 'Dispatch' onClick = \"var dispWindow = window.open('routes_nm.php?frm_mode=1&ticket_id={$ticket_id}', 'dispWindow', 'resizable=1, scrollbars, height=480, width=" . round(0.8 * $_SESSION['scr_width']) . ", left=100,top=100,screenX=100,screenY=100'); dispWindow.focus();\" />\n";
    // 2/1/10
}
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:40,代码来源:mobile.php

示例6: is_administrator

			&nbsp;OSGB:<INPUT TYPE="text" NAME="frm_ngs" VALUE='{$osgb_val}' SIZE=19 disabled /></TD></TR>	<!-- 9/13/08 -->
<?php 
                break;
            default:
                ?>
			&nbsp;UTM:<INPUT TYPE="text" NAME="frm_ngs" VALUE='{$utm_val}' SIZE=19 disabled /></TD></TR>	<!-- 9/13/08 -->
<?php 
        }
        // end switch()
    }
    // end if (my_is_float($lat))
    $toedit = is_administrator() || is_super() ? "<INPUT TYPE='button' VALUE='to Edit' onClick= 'to_edit_Form.submit();'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" : "";
    ?>
			<TR><TD>&nbsp;</TD></TR>
<?php 
    if (is_administrator() || is_super()) {
        ?>
			<TR CLASS = "even"><TD COLSPAN=2 ALIGN='center'>
			<INPUT TYPE="button" VALUE="<?php 
        print get_text("Cancel");
        ?>
" onClick="document.can_Form.submit();" >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<INPUT TYPE="button" VALUE="to Edit" 	onClick= "to_edit_Form.submit();">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

			<INPUT TYPE="hidden" NAME="frm_lat" VALUE="<?php 
        print $lat;
        ?>
" />
			<INPUT TYPE="hidden" NAME="frm_lng" VALUE="<?php 
        print $lng;
        ?>
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:facilities_BU.php

示例7: delete_admin

function delete_admin($dbc, $username, $target_admin)
{
    $username = mysqli_real_escape_string($dbc, $username);
    $target_admin = mysqli_real_escape_string($dbc, $target_admin);
    # Only super admins may delete users
    if (!is_super($dbc, $username)) {
        return "Current user is not a super administrator";
    }
    $query = "DELETE FROM users WHERE username = '{$target_admin}'";
    $result = mysqli_query($dbc, $query);
    check_results($result);
    if ($result !== true) {
        return "Administrator deletion failed";
    }
    return "Administrator: '{$target_admin}' successfully deleted";
}
开发者ID:brendon-boldt,项目名称:limbo-db,代码行数:16,代码来源:admin_tools.php

示例8: session_start

<?php

require_once '../includes/connect_db.php';
require_once '../includes/admin_tools.php';
session_start();
if (!isset($_SESSION['username']) || !is_super($dbc, $_SESSION['username'])) {
    Header("Location: /admin.php");
    die;
}
?>
<head>
<title>Limbo - Query</title>
<link rel="stylesheet" type="text/css" href="/limbo.css">
</head>
<?php 
include '../header.php';
?>

<div id='content'>

<h1>SQL Query</h1>

<form id='form' action='/admin/query.php' method='POST'>
	<textarea name="query" form="form" rows=10 cols=100 placeholder="Type SQL here" ></textarea><br>
	<input type="submit" name='submit' value="Submit SQL"/>
</form>

<h2>Output</h2>
<?php 
require_once '../includes/helpers.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
开发者ID:brendon-boldt,项目名称:limbo-db,代码行数:31,代码来源:query.php

示例9: addslashes

$cylinders = addslashes($_POST["cylinders"]);
$valve = addslashes($_POST["valve"]);
$structure = addslashes($_POST["structure"]);
$drive = addslashes($_POST["drive"]);
$fuel = addslashes($_POST["fuel"]);
$fuel_feed = addslashes($_POST["fuel_feed"]);
$tecdoc = addslashes($_POST["tecdoc"]);
$engine_code = addslashes($_POST["engine_code"]);
$engine = addslashes($_POST["engine"]);
$time = addslashes($_POST["time"]);
$displacement_tech = addslashes($_POST["displacement_tech"]);
$word = addslashes($_POST["word"]);
$sql = "SELECT * FROM type WHERE id = '{$id}'";
$sqlresult = mysql_query($sql);
if ($row = mysql_fetch_assoc($sqlresult)) {
    if (!is_super($user) && $row["author_id"] != $user) {
        header("http/1.1 403 Forbidden");
        $result["error"] = "用户权限不足";
        echo json_encode($result);
        return;
    }
    $sql = "UPDATE type SET \n\t\t\tline_id = '{$line_id}' , \n\t\t\tname = '{$name}' , \n\t\t\tpower = '{$power}' ,\n\t\t\tdisplacement = '{$displacement}' ,\n\t\t\tcylinders = '{$cylinders}' ,\n\t\t\tvalve = '{$valve}' ,\n\t\t\tstructure = '{$structure}' ,\n\t\t\tdrive = '{$drive}' ,\n\t\t\tfuel = '{$fuel}' ,\n\t\t\tfuel_feed = '{$fuel_feed}' ,\n\t\t\ttecdoc = '{$tecdoc}' ,\n\t\t\tengine_code = '{$engine_code}' ,\n\t\t\tengine = '{$engine}' ,\n\t\t\ttime = '{$time}' ,\n\t\t\tdisplacement_tech = '{$displacement_tech}' ,\n\t\t\tword = '{$word}' \n\t\tWHERE id = '{$id}'";
} else {
    $sql = "INSERT INTO type ( \n\t\tline_id,\n\t\tname , \n\t\tpower , \n\t\tdisplacement, \n\t\tcylinders, \n\t\tvalve,\n\t\tstructure, \n\t\tdrive,\n\t\tfuel, \n\t\tfuel_feed, \n\t\ttecdoc, \n\t\tengine_code, \n\t\tengine, \n\t\ttime,\n\t\tdisplacement_tech,\n\t\tword,\n\t\tauthor_id) \n\tVALUES ( \n\t\t'{$line_id}',\n\t\t'{$name}' , \n\t\t'{$power}' , \n\t\t'{$displacement}', \n\t\t'{$cylinders}', \n\t\t'{$valve}', \n\t\t'{$structure}', \n\t\t'{$drive}',\n\t\t'{$fuel}', \n\t\t'{$fuel_feed}', \n\t\t'{$tecdoc}', \n\t\t'{$engine_code}', \n\t\t'{$engine}', \n\t\t'{$time}',\n\t\t'{$displacement_tech}',\n\t\t'{$word}',\n\t\t'{$user}'\n\t\t)";
}
if (mysql_query($sql)) {
    $result["info"] = "编辑成功";
} else {
    header("http/1.1 500 Internal Server Error");
    $result["error"] = "数据库错误:" . mysql_error();
}
开发者ID:Jude95,项目名称:automobile_web,代码行数:31,代码来源:type_add.php

示例10: can_edit

function can_edit()
{
    // 8/27/10
    $oper_can_edit = is_user() && get_variable('oper_can_edit') == 1;
    return is_administrator() || is_super() || $oper_can_edit;
}
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:6,代码来源:functions.inc.php

示例11: basename

    ?>


<FORM NAME="log_form" METHOD = "post" ACTION="<?php 
    print basename(__FILE__);
    ?>
">
<TABLE>
<TR CLASS = 'even' ><TH COLSPAN=2>Station Log</TH></TR>
<TR CLASS = 'odd'><TD>Log entry:</TD><TD><TEXTAREA NAME="frm_comment" COLS="45" ROWS="2" WRAP="virtual"></TEXTAREA></TD></TR>
<TR CLASS = 'even'><TD COLSPAN=2 ALIGN='center'>
<INPUT TYPE = 'button' VALUE='Submit' onClick="document.log_form.submit()" />&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE = 'button' VALUE='Reset' onClick="document.log_form.reset()" />&nbsp;&nbsp;&nbsp;&nbsp;
<INPUT TYPE = 'button' VALUE='Review' onClick="document.log_form.func.value='view';document.log_form.submit();" />&nbsp;&nbsp;&nbsp;&nbsp;
<?php 
    if (is_super()) {
        ?>
	<INPUT TYPE = 'button' VALUE='Deletion' onClick="document.log_form.func.value='del';document.log_form.submit();" />&nbsp;&nbsp;&nbsp;&nbsp;
<?php 
    }
    ?>
</TD></TR>
<TR><TD COLSPAN=2 ALIGN='center'><BR /><INPUT TYPE = 'button' VALUE='Cancel' onClick="window.close()" /></TD></TR>
</TABLE>
<INPUT TYPE='hidden' NAME='func' VALUE='add'>
</FORM>
<?php 
} else {
    // not empty
    function my_show_log()
    {
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:log_BU.php

示例12: mysql_query

                    $where = "ORDER BY `group` ASC";
                    //					dump($_POST);
                }
                ?>
			<DIV ID='to_bottom' style="position:fixed; top:4px; left:20px; height: 12px; width: 10px;" onclick = "location.href = '#bottom';"><IMG SRC="markers/down.png" BORDER=0 /></div>
			<A NAME="top" /> <!-- 11/11/09 -->

			<?php 
                $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}hints` {$where}";
                //				dump($query);
                $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
                $i = 1;
                print "\n<FORM NAME='hints_Form' METHOD = 'post' onSubmit='return validate_set(document.hints_Form);' ACTION='hints_config.php?func=hints&go=true'>\n\t\t\t\t\t<table border=0 STYLE = 'MARGIN-LEFT:100PX'>\n";
                print "\n<INPUT TYPE='hidden' NAME='func' VALUE='hints_update' />\n";
                print "\n<TR><TH COLSPAN=2>Hover over hints - enter revisions</TH></TR>\n";
                $dis = is_administrator() || is_super() ? "" : " DISABLED ";
                // 3/19/11
                while ($row = stripslashes_deep(mysql_fetch_array($result))) {
                    print "<TR CLASS = {$colors[$i % 2]} VALIGN='middle'><TD><INPUT SIZE='10' TYPE='text' NAME='{$row['group']}' VALUE='{$row['group']}' MAXLENGTH='24'></TD></TD><TD><BR />" . substr($row['tag'], 1) . "</TD>\n\t\t\t\t\t\t<TD><TEXTAREA COLS = 120 ROWS=1 NAME = '{$row['tag']}' {$dis}>" . trim($row['hint']) . "</TEXTAREA></TD></TR>\n";
                    $i++;
                }
                print "\n\t\t</FORM></TABLE>";
                ?>
			<A NAME="bottom" /> <!-- 11/11/09 -->
			<IMG SRC="markers/up.png" BORDER=0  onclick = "location.href = '#top';" STYLE = 'margin-left: 20px'></TD>

				<DIV ID="foo"><DIV ID="bar">		<!-- 9/26/09 -->
					<INPUT TYPE='button' VALUE='Cancel' onClick='history.back();'><BR /><BR />
					<INPUT TYPE='button' VALUE='Reset form'  onClick='document.hints_Form.reset();'><BR /><BR />
					<INPUT TYPE='button' VALUE='Apply changes'  onClick='document.hints_Form.submit();'>
				</DIV></DIV>
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:hints_config.php

示例13: die

// guess!
$radius = 10;
// radius of circle on default center (miles)
$do_hints = TRUE;
// if true, print data hints at input fields
if ($mysql_db == "" || $mysql_user == "") {
    print "<br><br><br><br>";
    die(" - - - - - - - - - -  - - - - - - - - - - Please set values for both \$mysql_db and \$mysql_user in settings.inc.php! - - - - - - - - - - ");
}
$FK_id = strtolower($key_str);
// set for case independence
$id_lg = strlen($FK_id);
// lgth of foreign key id string
$custom = FALSE;
// custom processor in use
$can_edit = is_super() || is_administrator();
// 3/19/11
if (!array_key_exists('func', $_POST)) {
    $func = "l";
    // Select table, of C R U D or Select
    $tablename = "";
    // set per user selection
    $indexname = "";
    // set per schema
}
extract($_POST);
$sortby = !isset($sortby) || empty($sortby) ? "id" : $sortby;
$sortdir = !isset($sortdir) || empty($sortdir) ? 0 : $sortdir;
$sortby = !isset($index) || empty($index) ? "id" : $index;
function get_comments($the_table)
{
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:31,代码来源:tables.php

示例14: list_tickets

function list_tickets($sort_by_field = '', $sort_value = '', $my_offset = 0)
{
    // list tickets ===================================================
    $time = microtime(true);
    // Gets microseconds
    global $istest, $units_side_bar_height, $do_blink, $nature, $disposition, $patient, $incident, $incidents;
    // 12/3/10
    $can_edit = get_can_edit();
    $query = "SELECT `id` FROM `{$GLOBALS['mysql_prefix']}responder` LIMIT 1";
    // 1/28/11
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
    $any_units = mysql_affected_rows() == 1;
    $query_sched = "SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE (\n\t\t`status`='{$GLOBALS['STATUS_OPEN']}' OR\n\t\t`status`='{$GLOBALS['STATUS_SCHEDULED']})' \n\t\t LIMIT 1";
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
    $any_open_tickets = mysql_affected_rows() == 1;
    $query_sched = "SELECT * FROM `{$GLOBALS['mysql_prefix']}ticket` WHERE (\n\t\t`status`='{$GLOBALS['STATUS_CLOSED']}')\n\t\t LIMIT 1";
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
    $any_closed_tickets = mysql_affected_rows() == 1;
    $query = "SELECT `id` FROM `{$GLOBALS['mysql_prefix']}facilities` LIMIT 1";
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), basename(__FILE__), __LINE__);
    $any_facilities = mysql_affected_rows() == 1;
    unset($result);
    @session_start();
    //
    $captions = array("Current situation", "{$incidents} closed today", "{$incidents} closed yesterday+", "{$incidents} closed this week", "{$incidents} closed last week", "{$incidents} closed last week+", "{$incidents} closed this month", "{$incidents} closed last month", "{$incidents} closed this year", "{$incidents} closed last year", "Scheduled {$incidents}");
    $by_severity = array(0, 0, 0);
    // counters // 5/2/10
    $query = "SELECT * FROM `{$GLOBALS['mysql_prefix']}allocates` WHERE `type`= 4 AND `resource_id` = '{$_SESSION['user_id']}' ORDER BY `id` ASC;";
    //	5/4/11
    $result = mysql_query($query);
    //	5/4/11
    $al_groups = array();
    $al_names = "";
    while ($row = stripslashes_deep(mysql_fetch_assoc($result))) {
        //	5/4/11
        $al_groups[] = $row['group'];
        $query2 = "SELECT * FROM `{$GLOBALS['mysql_prefix']}region` WHERE `id`= '{$row['group']}';";
        //	5/4/11
        $result2 = mysql_query($query2);
        // 4/18/11
        while ($row2 = stripslashes_deep(mysql_fetch_assoc($result2))) {
            //	//	5/4/11
            $al_names .= $row2['group_name'] . ", ";
        }
    }
    if (is_super()) {
        //	5/4/11
        $al_names .= "Superadmin Level";
    }
    if (array_key_exists('func', $_GET) && $_GET['func'] == 10) {
        //	3/15/11
        $func = 10;
    } else {
        extract($_GET);
    }
    $cwi = get_variable('closed_interval');
    // closed window interval in hours
    if (isset($_SESSION['list_type'])) {
        $func = $_SESSION['list_type'];
    }
    // 12/02/10	 persistance for the tickets list
    //	$get_status = ((empty($_GET) || ((!empty($_GET)) && (empty ($_GET['status'])))) ) ? "" : $_GET['status'] ;
    $get_sortby = empty($_GET) || !empty($_GET) && empty($_GET['sortby']) ? "" : $_GET['sortby'];
    $get_offset = empty($_GET) || !empty($_GET) && empty($_GET['offset']) ? "" : $_GET['offset'];
    if (!isset($_GET['status'])) {
        $open = "Open";
    } else {
        $open = isset($_GET['status']) && $_GET['status'] == $GLOBALS['STATUS_OPEN'] ? "Open" : "";
        $open = isset($_GET['status']) && $_GET['status'] == $GLOBALS['STATUS_SCHEDULED'] ? "Scheduled" : "";
        //	11/29/10
    }
    if (isset($_SESSION['viewed_groups'])) {
        //	5/4/11
        $curr_viewed = explode(",", $_SESSION['viewed_groups']);
    } else {
        $curr_viewed = $al_groups;
    }
    $curr_names = "";
    //	5/4/11
    $z = 0;
    //	5/4/11
    foreach ($curr_viewed as $grp_id) {
        //	5/4/11
        $counter = count($curr_viewed) > $z + 1 ? ", " : "";
        $curr_names .= get_groupname($grp_id);
        $curr_names .= $counter;
        $z++;
    }
    $heading = $captions[$func] . " - " . get_variable('map_caption');
    $regs_string = "<FONT SIZE='-1'>Allocated " . get_text("Regions") . ":&nbsp;&nbsp;" . $al_names . "&nbsp;&nbsp;|&nbsp;&nbsp;Currently Viewing " . get_text("Regions") . ":&nbsp;&nbsp;" . $curr_names . "</FONT>";
    //	5/4/11
    $eols = array("\r\n", "\n", "\r");
    // all flavors of eol
    $query = "SELECT `id` FROM `{$GLOBALS['mysql_prefix']}responder`";
    // 5/12/10
    $result = mysql_query($query) or do_error($query, 'mysql query failed', mysql_error(), __FILE__, __LINE__);
    unset($result);
    $required = 48 + mysql_affected_rows() * 22;
    // derived by trial and error - emphasis the latter = 7/18/10
    $the_large_height = (int) min(round($units_side_bar_height * $_SESSION['scr_height'] * 2), $required);
//.........这里部分代码省略.........
开发者ID:sharedgeo,项目名称:TicketsCAD-SharedGeo-Dev,代码行数:101,代码来源:functions_major_nm.inc.php


注:本文中的is_super函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。