Пример #1
0
    $res = mysql_query($q_res) or die('');
    $r_res = mysql_fetch_assoc($res);
    if (mysql_num_rows($res) > 0) {
        $a_l1p[$r_res['id']] = $r_res['name'];
    }
    mysql_free_result($res);
}
$ldb = '';
$qdb = '';
$tid = isset($_GET['t']) && $_GET['t'] == 1 ? 1 : 0;
if ($tid > 0) {
    $c .= '<b>未开通小区</b> | <a href="' . $f . '">查看已开通小区</a>';
} else {
    $c .= '<b>已开通小区</b> | <a href="?t=1">查看未开通小区</a>';
}
$c .= '<br/><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td>小区列表</td></tr><tr class="altbg1"><td><form method="get" action="">' . yjl_sqse($a_l1p, $l1id, $l2id, $l3id, $l4id) . '<input name="q" value="' . $q . '"><input type="submit" value="查看"/>' . ($tid > 0 ? '<input type="hidden" name="t" value="' . $tid . '"/>' : '') . '</form></td></tr></table><br/>';
if ($l1id > 0 || $q != '') {
    if ($l1id > 0) {
        $ldb .= ' and l1id=' . $l1id;
        if ($l2id > 0) {
            $ldb .= ' and l2id=' . $l2id;
            if ($l3id > 0) {
                $ldb .= ' and l3id=' . $l3id;
                if ($l4id > 0) {
                    $ldb .= ' and l4id=' . $l4id;
                }
            }
        }
        $a_qc[] = yjl_getsq($l1id, $l2id, $l3id, $l4id);
    }
    if ($q != '') {
Пример #2
0
    exit;
}
if (isset($_GET['delimg']) && $_GET['delimg'] == 1) {
    $uSQL = sprintf('update %s set url=%s where xqid=%s', $yjl_dbprefix . 'xq', yjl_SQLString('', 'text'), $exqdb['xqid']);
    $result = mysql_query($uSQL) or die('');
    if ($exqdb['url'] != '' && file_exists($exqdb['url'])) {
        unlink($exqdb['url']);
    }
    $_SESSION[$esid] = 1;
    echo '<script type="text/javascript">location.href=\'' . $f . '?id=' . $exqid . '\';</script>';
    exit;
}
if ($r_main['dq'] == '') {
    $r_main['dq'] = $d_l1id;
}
$a_dq = explode('|', $r_main['dq']);
foreach ($a_dq as $v) {
    $q_res = sprintf('select id, name from %s where id=%s and level=1 and upid=0 limit 1', $dbprefix . 'common_district', $v);
    $res = mysql_query($q_res) or die('');
    $r_res = mysql_fetch_assoc($res);
    if (mysql_num_rows($res) > 0) {
        $a_l1p[$r_res['id']] = $r_res['name'];
    }
    mysql_free_result($res);
}
$c .= '<form method="post" actin="" onsubmit="if(document.form1.name.value==\'\'){alert(\'请输入名称!\');return false;}" enctype="multipart/form-data" name="form1"><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">修改小区:' . $exqdb['name'] . '</td></tr><tr class="altbg1"><td>名称:</td><td><input name="name" value="' . $exqdb['name'] . '"/></td></tr><tr class="altbg2"><td>地区:</td><td>' . yjl_sqse($a_l1p, $exqdb['l1id'], $exqdb['l2id'], $exqdb['l3id'], $exqdb['l4id']) . '</td></tr><tr class="altbg1"><td>地址:</td><td><input name="address" value="' . $exqdb['address'] . '"/></td></tr><tr class="altbg2"><td>拼音索引:</td><td><select name="pyid"><option value="0"></option>';
foreach ($a_py as $k => $v) {
    $c .= '<option value="' . $k . '"' . ($k == $exqdb['pyid'] ? ' selected="selected"' : '') . '>' . $v . '</option>';
}
$c .= '</select></td></tr><tr class="altbg1"><td>百度地图关键词:</td><td><input name="map_q" value="' . $exqdb['map_q'] . '"/></td></tr><tr class="altbg2"><td valign="top">图片:</td><td>' . ($exqdb['url'] != '' ? '<img src="' . $exqdb['url'] . '" width="' . $img_wh . '" height="' . $img_wh . '"/><br/><a href="?id=' . $exqid . '&amp;delimg=1" onclick="if(!confirm(\'确定删除?\'))return false;" style="color: #f00;">删除</a><br/>' : '') . '<input type="file" name="url"/><br/>图片尺寸:' . $img_wh . 'px*' . $img_wh . 'px,允许类型:' . join('、', $u_ea) . ',最大:' . $max_file . 'KB<br/>上传新图片将自动删除原图片</td></tr><tr class="altbg1"><td>小区简介:</td><td><textarea name="xqjj" cols="100" rows="5">' . $exqdb['xqjj'] . '</textarea></td></tr><tr class="altbg2"><td>交通状况:</td><td><textarea name="jtzk" cols="100" rows="5">' . $exqdb['jtzk'] . '</textarea></td></tr><tr class="altbg1"><td>周边信息:</td><td><textarea name="zbxx" cols="100" rows="5">' . $exqdb['zbxx'] . '</textarea></td></tr></table><br><center><input type="submit" class="button" name="settingsubmit" value="提 交"></center><br></form>';
echo yjl_adminhtml($c);
Пример #3
0
$l4id = isset($_GET['l4id']) && intval($_GET['l4id']) > 0 ? intval($_GET['l4id']) : 0;
if ($r_main['dq'] == '') {
    $r_main['dq'] = $d_l1id;
}
$a_dq = explode('|', $r_main['dq']);
foreach ($a_dq as $v) {
    $q_res = sprintf('select id, name from %s where id=%s and level=1 and upid=0 limit 1', $dbprefix . 'common_district', $v);
    $res = mysql_query($q_res) or die('');
    $r_res = mysql_fetch_assoc($res);
    if (mysql_num_rows($res) > 0) {
        $a_l1p[$r_res['id']] = $r_res['name'];
    }
    mysql_free_result($res);
}
$ldb = '';
$c .= '<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td>待审核小区</td></tr><tr class="altbg1"><td><form method="get" action="">' . yjl_sqse($a_l1p, $l1id, $l2id, $l3id, $l4id) . '<input type="submit" value="查看"/></form></td></tr></table><br/>';
if ($l1id > 0) {
    $ldb .= ' and a.l1id=' . $l1id;
    if ($l2id > 0) {
        $ldb .= ' and a.l2id=' . $l2id;
        if ($l3id > 0) {
            $ldb .= ' and a.l3id=' . $l3id;
            if ($l4id > 0) {
                $ldb .= ' and a.l4id=' . $l4id;
            }
        }
    }
    $c .= '查看:' . yjl_getsq($l1id, $l2id, $l3id, $l4id) . ' | <a href="' . $f . '">查看全部</a><br/><br/>';
}
$q_res = sprintf('select a.misyz, b.nickname, c.* from %s as a, %s as b, %s as c where a.uid=b.uid and a.uid=c.uid and a.xqid=0 and length(c.xqname)>0%s order by a.uid desc', $yjl_dbprefix . 'members', $dbprefix . 'members', $yjl_dbprefix . 'uyz', $ldb);
$a_res = mysql_query($q_res) or die('');