Esempio n. 1
0
    }
}
if ($isgl == 0) {
    exit;
}
$f = 'a_jlsm.php';
$esid = md5($f);
$page = isset($_GET['p']) && intval($_GET['p']) > 0 ? intval($_GET['p']) : 1;
if (isset($_SESSION[$esid]) && $_SESSION[$esid] != '') {
    $m = array(1 => '已修改!');
    if (isset($m[$_SESSION[$esid]])) {
        $t_m = $m[$_SESSION[$esid]];
    }
    unset($_SESSION[$esid]);
}
$c = isset($t_m) ? yjl_getMsg($t_m) : '';
$a_m = array('未联系', '已联系', '已上门');
$tid = isset($_GET['t']) && isset($a_m[$_GET['t']]) ? $_GET['t'] : 0;
foreach ($a_m as $k => $v) {
    if ($k > 0) {
        $c .= ' | ';
    }
    if ($k == $tid) {
        $c .= $v;
    } else {
        $c .= '<a href="' . ($k > 0 ? '?t=' . $k : $f) . '">' . $v . '</a>';
    }
}
$c .= '<br/><br/>';
switch ($tid) {
    case 2:
Esempio n. 2
0
    $_SESSION[$esid] = 1;
    echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>';
    exit;
}
if (isset($_SESSION[$esid]) && $_SESSION[$esid] != '') {
    $m = array(1 => '设置已保存!');
    if (isset($m[$_SESSION[$esid]])) {
        $t_m = $m[$_SESSION[$esid]];
    }
    unset($_SESSION[$esid]);
}
if ($r_main['dq'] == '') {
    $r_main['dq'] = $d_l1id;
}
$a_dq = explode('|', $r_main['dq']);
$c = (isset($t_m) ? yjl_getMsg($t_m) : '') . '<form method="post" action="" enctype="multipart/form-data" name="form1" onsubmit="if(document.form1.site_name.value==\'\'){alert(\'请输入网站名称。\');return false;}"><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td>开通省份</td></tr><tr class="altbg1"><td>';
$q_res = sprintf('select id, name from %s where level=1 and upid=0', $dbprefix . 'common_district');
$res = mysql_query($q_res) or die('');
$r_res = mysql_fetch_assoc($res);
if (mysql_num_rows($res) > 0) {
    do {
        $c .= '<div style="float: left;padding: 10px;">';
        if ($r_res['id'] != $d_l1id) {
            $c .= '<input type="checkbox" name="dq[]" value="' . $r_res['id'] . '"' . (in_array($r_res['id'], $a_dq) ? ' checked="checked"' : '') . '/>';
        } else {
            $c .= '<input type="checkbox" checked="checked" disabled="disabled"/>';
        }
        $c .= $r_res['name'] . '</div>';
    } while ($r_res = mysql_fetch_assoc($res));
}
mysql_free_result($res);