Beispiel #1
0
function getAreaById($id)
{
    $csql = "select cId from biogas_user where id={$id}";
    $cId = fetchOne($csql)['cId'];
    $psql = "select pId from biogas_user where id={$id}";
    $pId = fetchOne($psql)['pId'];
    $res = getProvById($pId)['province'] . "省" . getCityById($cId)['city'] . "市";
    return $res;
}
Beispiel #2
0
<?php

require_once '../include.php';
$id = $_REQUEST['id'];
$row = getCityById($id);
//print_r($row);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Insert title here</title>
</head>
<body>
<h3>修改城市</h3>
<form action="doAdminAction.php?act=editCity&id=<?php 
echo $id;
?>
" method="post">
    <table width="70%" border="1" cellpadding="5" cellspacing="0" bgcolor="#cccccc">
        <tr>
            <td align="right">城市名称</td>
            <td><input type="text" name="city" placeholder="<?php 
echo $row['city'];
?>
"/></td>
        </tr>

        <tr>
            <td colspan="2"><input type="submit" value="修改城市"/></td>
        </tr>
<?php

/**
 * Created by PhpStorm.
 * User: ray
 * Date: 7/27/15
 * Time: 6:56 PM
 */
require_once "../include.php";
$id = $_REQUEST['id'];
$arr_res = queryTempCity($id);
$city = getCityById($id)['city'];
$gas_res = $arr_res[0];
$d_res = $arr_res[1];
$gas_total = $arr_res[2];
$mid_res = $arr_res[3];
$gas_avg = $gas_total / count($d_res);
?>

<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Highcharts Example</title>

    <script type="text/javascript" src="http://cdn.hcharts.cn/jquery/jquery-1.8.2.min.js"></script>
    <style type="text/css">
        ${demo.css}
    </style>
    <script type="text/javascript">
        $(function () {