Example #1
0
function yjl_user_info()
{
    global $user_id, $udb, $cuid, $uadb, $xqid, $xqdb, $a_tsgz, $yjl_dbprefix, $dbprefix, $isgz;
    $c = '<div class="box2 owner clearfix">
				<div class="pic_text clearfix">
					<a href="user-' . $cuid . '.html"><img src="' . yjl_face($cuid, $uadb[$cuid]['face']) . '" /></a>
					<p class="memb"><a href="user-' . $cuid . '.html">' . $uadb[$cuid]['nc'] . '</a>';
    if ($uadb[$cuid]['qx'] == 10) {
        $c .= '管理员';
    } elseif ($uadb[$cuid]['qx'] == 5 || $uadb[$cuid]['qx'] == 6) {
        $c .= $a_tsgz[$uadb[$cuid]['qx']][$uadb[$cuid]['gzfl']];
    } else {
        $c .= '业主';
    }
    $c .= '</p>';
    if ($uadb[$cuid]['xqid'] > 0) {
        if ($uadb[$cuid]['xqid'] != $xqid) {
            $q_reu = sprintf('select name from %s where xqid=%s limit 1', $yjl_dbprefix . 'xq', $uadb[$cuid]['xqid']);
            $reu = mysql_query($q_reu) or die('');
            $r_reu = mysql_fetch_assoc($reu);
            if (mysql_num_rows($reu) > 0) {
                $xqname = $r_reu['name'];
            }
            mysql_free_result($reu);
        } else {
            $xqname = $xqdb['name'];
        }
        $c .= '<a href="square-' . $uadb[$cuid]['xqid'] . '.html">' . $xqname . '</a>';
    }
    $q_res = sprintf('select a.hdid from %s as a, %s as b where a.hdid=b.hdid and b.uid=%s and b.iscy=0', $yjl_dbprefix . 'hd', $yjl_dbprefix . 'hd_user', $cuid);
    $res = mysql_query($q_res) or die('');
    $c0 = mysql_num_rows($res);
    mysql_free_result($res);
    $q_res = sprintf('select uid from %s where uid=%s', $dbprefix . 'buddys', $cuid);
    $res = mysql_query($q_res) or die('');
    $c1 = mysql_num_rows($res);
    mysql_free_result($res);
    $q_res = sprintf('select uid from %s where uid=%s and type<>%s', $dbprefix . 'topic', $cuid, yjl_SQLString('reply', 'text'));
    $res = mysql_query($q_res) or die('');
    $c2 = mysql_num_rows($res);
    mysql_free_result($res);
    $c .= '</div>';
    if ($user_id > 0) {
        if ($user_id != $cuid) {
            $c .= '<div class="owner_btn"><span id="gz_' . $cuid . '"><a href="#" onclick="$(\'#gz_' . $cuid . '\').load(\'j/gz.php?id=' . $cuid . '\');return false;"' . ($isgz > 0 ? '>取消关注' : ' class="btn bt_nomblue">关 注') . '</a></span><a href="msg.php?id=' . $cuid . '" class="btn bt_nomgray">发私信</a></div>';
        }
        $c .= '<div class="count">
					<a href="user_active.php?id=' . $cuid . '" style="padding-left:0px;"><b>' . $c0 . '</b><br />活动</a><a href="follow.php?id=' . $cuid . '"><b>' . $c1 . '</b><br />好友</a><a href="user-' . $cuid . '.html" style="border:none;"><b>' . $c2 . '</b><br />微博</a>
				</div>
				<p>' . $uadb[$cuid]['aboutme'] . '</p>';
        if ($user_id == $cuid) {
            $c .= '<a href="profile.php" class="eadit">编辑</a>';
        } elseif ($udb['qx'] == 10 || $udb['isxg'] > 0) {
            $c .= '<a href="a_uinfo.php?id=' . $cuid . '" class="eadit">查看用户详细信息</a>';
        }
    }
    $c .= '</div>';
    return $c;
}
Example #2
0
            if ($c_rep > 0) {
                $_SESSION[$esid] = 5;
            } else {
                $uSQL = sprintf('update %s set code=%s, url=%s where suid=%s', $yjl_dbprefix . 'surl', yjl_SQLString($code, 'text'), yjl_SQLString($url, 'text'), $edb['suid']);
                $result = mysql_query($uSQL) or die('');
                $_SESSION[$esid] = 2;
            }
        } else {
            $q_rep = sprintf('select code from %s where code=%s limit 1', $yjl_dbprefix . 'surl', yjl_SQLString($code, 'text'));
            $rep = mysql_query($q_rep) or die('');
            $c_rep = mysql_num_rows($rep);
            mysql_free_result($rep);
            if ($c_rep > 0) {
                $_SESSION[$esid] = 5;
            } else {
                $iSQL = sprintf('insert into %s (uid, code, url, datetime) values (%s, %s, %s, %s)', $yjl_dbprefix . 'surl', $user_id, yjl_SQLString($code, 'text'), yjl_SQLString($url, 'text'), time());
                $result = mysql_query($iSQL) or die('');
                $_SESSION[$esid] = 1;
            }
        }
        echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . ($exqid > 0 ? '&id=' . $exqid : '') . (isset($edb) && $_SESSION[$esid] == 5 ? '&eid=' . $edb['suid'] : '') . '\';</script>';
        exit;
    } else {
        $_SESSION[$esid] = 4;
        echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . ($exqid > 0 ? '&id=' . $exqid : '') . (isset($edb) ? '&eid=' . $edb['suid'] : '') . '\';</script>';
        exit;
    }
}
$c .= '<form method="post" actin="" onsubmit="if(document.form1.code.value==\'\' || document.form1.url.value==\'\'){alert(\'请输入相关信息!\');return false;}" name="form1"><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder">';
if (isset($edb)) {
    $c .= '<tr class="header"><td colspan="2">修改短网址</td></tr><tr class="altbg1"><td>短网址:</td><td>' . $yjl_url . 'u/<input name="code" value="' . $edb['code'] . '"/></td></tr><tr class="altbg2"><td>对应网址:</td><td><input name="url" value="' . $edb['url'] . '"/></td></tr>';
Example #3
0
                        $e = 5;
                    }
                }
            } else {
                $e = 5;
            }
        }
        if (isset($edb)) {
            if ($url != '' && $edb['url'] != '' && file_exists($edb['url'])) {
                unlink($edb['url']);
            }
            $uSQL = sprintf('update %s set name=%s, content=%s, url=%s, width=%s, height=%s where fxid=%s', $yjl_dbprefix . 'xq_fx', yjl_SQLString($name, 'text'), yjl_SQLString($content, 'text'), yjl_SQLString($url, 'text'), $width, $height, $edb['fxid']);
            $result = mysql_query($uSQL) or die('');
            $_SESSION[$esid] = 2;
        } else {
            $iSQL = sprintf('insert into %s (name, content, url, width, height, xqid) values (%s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'xq_fx', yjl_SQLString($name, 'text'), yjl_SQLString($content, 'text'), yjl_SQLString($url, 'text'), $width, $height, $exqid);
            $result = mysql_query($iSQL) or die('');
            $_SESSION[$esid] = 1;
        }
        echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . ($exqid > 0 ? '&id=' . $exqid : '') . '\';</script>';
        exit;
    } else {
        $_SESSION[$esid] = 4;
        echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . ($exqid > 0 ? '&id=' . $exqid : '') . (isset($edb) ? '&eid=' . $edb['fxid'] : '') . '\';</script>';
        exit;
    }
}
$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">';
if (isset($edb)) {
    $c .= '<tr class="header"><td colspan="2">修改户型:' . $edb['name'] . '</td></tr><tr class="altbg1"><td>名称:</td><td><input name="name" value="' . $edb['name'] . '"/></td></tr><tr class="altbg2"><td>描述:</td><td><input name="content" value="' . $edb['content'] . '"/></td></tr><tr class="altbg1"><td valign="top">图片:</td><td>' . ($edb['url'] != '' ? '<img src="' . $edb['url'] . '" width="' . $fxt_w . '" title="点击查看大图" onclick="openimg(\'' . $edb['url'] . '\', \'' . $edb['width'] . '\', \'' . $edb['height'] . '\');"/><br/>' : '') . '<input type="file" name="url"/><br/>图片宽度:' . $fxt_w . 'px,允许类型:' . join('、', $u_ea) . ',最大:' . $max_file . 'KB<br/>上传新图片将自动删除原图片</td></tr>';
} else {
Example #4
0
 } else {
     $c .= '<a href="login.php?u=' . urlencode('active-' . $r_res['xqid'] . '-' . $r_res['hdid'] . '.html') . '" rel="#overlay_login">我感兴趣(' . $r_res['c_gz'] . ')</a>';
 }
 if ($r_res['isxzrs'] == 0 || $r_res['c_cy'] < $r_res['xzrs']) {
     if ($user_id == 0 || $udb['xqid'] == $xqid || $r_res['xqid'] == 0 || $udb['qx'] > 0) {
         if ($user_id == 0 || $iscy == 0 && $ispz == 0) {
             if (isset($_POST['iscj']) && $_POST['iscj'] == 1) {
                 echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">';
                 if (isset($_POST['name']) && trim($_POST['name']) != '' && isset($_POST['lxfs']) && trim($_POST['lxfs']) != '' && isset($_POST['email']) && trim($_POST['email']) != '' && isset($_POST['xqname']) && trim($_POST['xqname']) != '') {
                     $name = htmlspecialchars(trim($_POST['name']), ENT_QUOTES);
                     $lxfs = htmlspecialchars(trim($_POST['lxfs']), ENT_QUOTES);
                     $email = htmlspecialchars(trim($_POST['email']), ENT_QUOTES);
                     $xqid = $user_id > 0 ? $udb['xqid'] : 0;
                     $xqname = htmlspecialchars(trim($_POST['xqname']), ENT_QUOTES);
                     $iscy = $r_res['isxzrs'] > 0 ? 1 : 0;
                     $iSQL = sprintf('insert into %s (uid, hdid, name, lxfs, email, xqid, xqname, iscy, datetime) values (%s, %s, %s, %s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'hd_user', $user_id, $hdid, yjl_SQLString($name, 'text'), yjl_SQLString($lxfs, 'text'), yjl_SQLString($email, 'text'), $xqid, yjl_SQLString($xqname, 'text'), $iscy, time());
                     $result = mysql_query($iSQL) or die('');
                     if ($iscy > 0) {
                         if ($user_id > 0) {
                             yjl_addlog('[uid]申请参加活动:<a href="active-' . $xqid . '-' . $hdid . '.html">' . $r_res['name'] . '</a>', md5('hdcj|' . $r_res['uid'] . '|' . $user_id . '|' . $hdid), 1, $r_res['uid'], $user_id);
                         } else {
                             yjl_addlog($name . '申请参加活动:<a href="active-' . $xqid . '-' . $hdid . '.html">' . $r_res['name'] . '</a>', md5('hdcj|' . $r_res['uid'] . '|' . time() . '|' . $hdid), 1, $r_res['uid']);
                         }
                         echo 'alert(\'已申请参加,请等待审核。\');';
                     } else {
                         $uSQL = sprintf('update %s set c_cy=c_cy+1, lasttime=%s where hdid=%s', $yjl_dbprefix . 'hd', time(), $r_res['hdid']);
                         $result = mysql_query($uSQL) or die('');
                         if ($user_id > 0) {
                             yjl_addlog('[uid]参加活动:<a href="active-' . $xqid . '-' . $hdid . '.html">' . $r_res['name'] . '</a>', md5('hdcj|' . $r_res['uid'] . '|' . $user_id . '|' . $hdid), 0, $r_res['uid'], $user_id);
                         } else {
                             yjl_addlog($name . '参加活动:<a href="active-' . $xqid . '-' . $hdid . '.html">' . $r_res['name'] . '</a>', md5('hdcj|' . $r_res['uid'] . '|' . time() . '|' . $hdid), 0, $r_res['uid']);
Example #5
0
 do {
     $up = yjl_imgpath($r_res['id']);
     if (isset($_GET['did']) && $_GET['did'] == $r_res['id']) {
         $q_rep = sprintf('select imageid from %s where tid=%s limit 1', $dbprefix . 'topic', $r_res['tid']);
         $rep = mysql_query($q_rep) or die('');
         $r_rep = mysql_fetch_assoc($rep);
         if (mysql_num_rows($rep)) {
             $ai = explode(',', $r_rep['imageid']);
             foreach ($ai as $v) {
                 if ($v != $r_res['id'] && $v != '') {
                     $ai_n[] = $v;
                 }
             }
             $imageid = isset($ai_n) ? join(',', $ai_n) : '';
             if ($imageid != $r_rep['imageid']) {
                 $uSQL = sprintf('update %s set imageid=%s where tid=%s', $dbprefix . 'topic', yjl_SQLString($imageid, 'text'), $r_res['tid']);
                 $result = mysql_query($uSQL) or die('');
             }
         }
         mysql_free_result($rep);
         if (file_exists($yjl_tpath . 'images/topic/' . $up[1] . $r_res['id'] . '_s.jpg')) {
             unlink($yjl_tpath . 'images/topic/' . $up[1] . $r_res['id'] . '_s.jpg');
         }
         if (file_exists($yjl_tpath . 'images/topic/' . $up[1] . $r_res['id'] . '_o.jpg')) {
             unlink($yjl_tpath . 'images/topic/' . $up[1] . $r_res['id'] . '_o.jpg');
         }
         $dSQL = sprintf('delete from %s where id=%s', $dbprefix . 'topic_image', $r_res['id']);
         $result = mysql_query($dSQL) or die('');
         echo '<script type="text/javascript">location.href=\'' . $f . '?xqid=' . $xqid . '&m=' . $a_pm[$mid][1] . '&p=' . $page . '\';</script>';
         exit;
     }
Example #6
0
            $c .= '<td><a href="?p=' . $page . '&delid=' . $r_res['inid'] . '&t=' . $tid . '&isjl=' . $isjl . '" style="color: #f00;" onclick="if(!confirm(\'确定删除?\'))return false;">删除</a></td>';
        }
        $c .= '</tr>';
        $i++;
    } while ($r_res = mysql_fetch_assoc($res));
    mysql_free_result($res);
    if ($tp_res > 1) {
        $paa[] = yjl_getpage($page, $tp_res);
    }
    $c .= '</table>' . (isset($paa) ? '<center>' . join(' | ', $paa) . '</center>' : '') . '<br/>';
} else {
    $c .= '没有符合条件的结果<br/><br/>';
}
mysql_free_result($a_res);
if ($tid == 0) {
    if ($_SERVER['REQUEST_METHOD'] == 'POST') {
        if (isset($_POST['sl']) && intval($_POST['sl']) > 0) {
            $sl = intval($_POST['sl']);
            for ($i = 0; $i < $sl; $i++) {
                $code = substr(md5(time . '|' . $i . '|' . $udb['uid'] . '|' . rand(0, 9999)), 0, 16);
                $iSQL = sprintf('insert into %s (uid, datetime, code, isjl) values (%s, %s, %s, %s)', $yjl_dbprefix . 'invite', $udb['uid'], time(), yjl_SQLString($code, 'text'), $_POST['isjl']);
                $result = mysql_query($iSQL);
            }
            $_SESSION[$esid] = 1;
        }
        echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>';
        exit;
    }
    $c .= '<form method="post" action=""><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">生成邀请码</td></tr><tr class="altbg1"><td>数量:</td><td><input name="sl" size="5"/></td></tr><tr class="altbg2"><td>&nbsp;</td><td><input name="isjl" type="radio" value="0"' . ($isjl == 0 ? ' checked="checked"' : '') . '/>业主 <input name="isjl" type="radio" value="1"' . ($isjl == 1 ? ' checked="checked"' : '') . '/>专业人员</td></tr></table><br><center><input type="submit" class="button" name="settingsubmit" value="生 成"></center><br></form>';
}
echo yjl_adminhtml($c);
Example #7
0
        $wz = $w[$r_res['l1id'] . '-' . $r_res['l2id'] . '-' . $r_res['l3id'] . '-' . $r_res['l4id']];
        $c .= '<tr class="altbg' . ($i % 2 + 1) . '"><td>' . $r_res['xqname'] . '</td><td>' . ($wz != '' ? $wz : '-') . '</td><td>' . ($r_res['address'] != '' ? $r_res['address'] : '-') . '</td><td>' . $r_res['nc'] . ' (' . $r_res['nickname'] . ')' . '</td><td><a href="?p=' . $page . '&amp;shid=' . $r_res['uid'] . '">通过审核</a> | <a href="?p=' . $page . '&amp;bid=' . $r_res['uid'] . '">并入现有小区</a></td></tr>';
        $i++;
    } while ($r_res = mysql_fetch_assoc($res));
    mysql_free_result($res);
    if ($tp_res > 1) {
        $paa[] = yjl_getpage($page, $tp_res);
    }
    $c .= '</table>' . (isset($paa) ? '<center>' . join(' | ', $paa) . '</center>' : '') . '<br/>';
    if (isset($bbd)) {
        if (isset($_POST['xqid']) && intval($_POST['xqid']) > 0) {
            $xqid = intval($_POST['xqid']);
            $iswc = $bbd['misyz'] > 0 ? 1 : 0;
            $uSQL = sprintf('update %s set iswc=%s, xqid=%s where uid=%s', $yjl_dbprefix . 'members', $iswc, $xqid, $bbd['uid']);
            $result = mysql_query($uSQL) or die('');
            $uSQL = sprintf('update %s set xqname=%s, l1id=0, l2id=0, l3id=0, l4id=0, address=%s where uid=%s', $yjl_dbprefix . 'uyz', yjl_SQLString('', 'text'), yjl_SQLString('', 'text'), $bbd['uid']);
            $result = mysql_query($uSQL) or die('');
            $_SESSION[$esid] = 1;
            echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . ${$page} . '\';</script>';
            exit;
        }
        $n_l1id = $bbd['l1id'] > 0 ? $bbd['l1id'] : $d_l1id;
        $c .= '<form method="post" action="" onsubmit="if($(\'#xqid\').val()==\'0\'){alert(\'请选择小区。\');return false;}"><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">' . $bbd['xqname'] . ' 并入现有小区</td></tr><tr class="altbg1"><td valign="top">现有小区:</td><td><span id="xq_s">无</span><input type="hidden" name="xqid" id="xqid" value="0"/><br/><br/><select id="l1id" onchange="changel1();search_xq_h(1);">';
        foreach ($a_l1p as $k => $v) {
            $c .= '<option value="' . $k . '"' . ($k == $n_l1id ? ' selected="selected"' : '') . '>' . $v . '</option>';
        }
        $c .= '</select> <span id="l2_s"></span><input style="display: none;" id="xq_q" onkeyup="search_xq_h(1);"/><div id="xqs_div" style="width: 600px;height: 300px; padding: 10px;border: 1px solid #eee;margin: 3px;overflow: auto;"></div></td></tr></table><br><center><input type="submit" class="button" name="settingsubmit" value="提 交"> <a href="?p=' . $page . '">取消</a></center></form><div id="xq_v" style="position: absolute;top: 0;left: 0;border: 1px solid #333;padding: 10px;display: none;background: #fff;"></div>';
        $js_c = 'changel1();search_xq_h(1);';
    }
} else {
    $c .= '没有符合条件的结果';
Example #8
0
    if ($udb['qx'] > 0) {
        echo '<script type="text/javascript">location.href=\'./\';</script>';
        exit;
    }
} else {
    echo '<script type="text/javascript">location.href=\'login.php?u=' . urlencode($f) . '\';</script>';
    exit;
}
$page_title = '请监理师到现场';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['name']) && trim($_POST['name']) != '' && isset($_POST['mobile']) && trim($_POST['mobile']) != '' && isset($_POST['address']) && trim($_POST['address']) != '' && isset($_POST['content']) && trim($_POST['content']) != '') {
        $name = htmlspecialchars(trim($_POST['name']), ENT_QUOTES);
        $mobile = htmlspecialchars(trim($_POST['mobile']), ENT_QUOTES);
        $address = htmlspecialchars(trim($_POST['address']), ENT_QUOTES);
        $content = htmlspecialchars(trim($_POST['content']), ENT_QUOTES);
        $iSQL = sprintf('insert into %s (uid, name, mobile, address, content, datetime) values (%s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'jlsm', $user_id, yjl_SQLString($name, 'text'), yjl_SQLString($mobile, 'text'), yjl_SQLString($address, 'text'), yjl_SQLString($content, 'text'), time());
        $result = mysql_query($iSQL) or die('');
    }
    echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">alert(\'信息已保存,我们会尽快和您联系!\');location.href=\'' . $f . '\';</script>';
    exit;
}
$c = '<h2>请监理师到现场</h2>
		<div class="main clearfix">
			<form method="post" class="main_form" action="">
				<table>
				<tbody>
					<tr>
						<th></th><td><span class="form_tip" style="margin:0;">请留下您的信息,我们会尽快和您联系</span></td>
					</tr>
					<tr>
						<th width="100">姓名<b>*</b></th>
Example #9
0
             $q_res = sprintf('select uid from %s where email=%s limit 1', $dbprefix . 'members', yjl_SQLString($email, 'text'));
             $res = mysql_query($q_res) or die('');
             if (mysql_num_rows($res) > 0) {
                 $em_c = 1;
             }
             mysql_free_result($res);
             if ($un_c == 0 && $em_c == 0) {
                 if ($yjl_isdebug == 0) {
                     require_once 'lib/smtp.php';
                 }
                 $uid = yjl_adduser($u, $p, $ip, $email, 1);
                 $iSQL = sprintf('insert into %s (uid) values (%s)', $yjl_dbprefix . 'uyz', $uid);
                 $result = mysql_query($iSQL) or die('');
                 $a_nc = explode('@', $email);
                 $nc = $a_nc[0];
                 $uSQL = sprintf('update %s set nc=%s, isnc=1, qx=0 where uid=%s', $yjl_dbprefix . 'members', yjl_SQLString($nc, 'text'), $uid);
                 $result = mysql_query($uSQL) or die('');
                 $nf = 'a_yz.php';
                 $_SESSION[md5($nf)] = 2;
                 echo '<script type="text/javascript">location.href=\'' . $nf . '\';</script>';
                 exit;
             } else {
                 $_SESSION[$esid] = 2;
             }
         } else {
             $_SESSION[$esid] = 3;
         }
     } else {
         $_SESSION[$esid] = 4;
     }
 } else {
Example #10
0
    $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);
if (isset($_GET['delimg']) && $_GET['delimg'] == 1) {
    $uSQL = sprintf('update %s set jl_url=%s', $yjl_dbprefix . 'main', yjl_SQLString('', 'text'));
    $result = mysql_query($uSQL) or die('');
    if ($r_main['jl_url'] != '' && file_exists($r_main['jl_url'])) {
        unlink($r_main['jl_url']);
    }
    $_SESSION[$esid] = 1;
    echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>';
    exit;
}
$c .= '</td></tr></table><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">系统设置</td></tr><tr class="altbg2"><td>网站名称:</td><td><input name="site_name" value="' . $r_main['site_name'] . '" size="50"/></td></tr><tr class="altbg1"><td>网站邮件地址:</td><td><input name="site_admin_email" value="' . $r_main['site_admin_email'] . '" size="50"/></td></tr><tr class="altbg2"><td>业主邀请码注册:</td><td><input type="radio" name="yzqc" value="1"' . ($r_main['yzqc'] == 1 ? ' checked="checked"' : '') . '/>是 <input type="radio" name="yzqc" value="0"' . ($r_main['yzqc'] == 0 ? ' checked="checked"' : '') . '/>否</td></tr><tr class="altbg1"><td>监理邀请码注册:</td><td><input type="radio" name="yzqc_jl" value="1"' . ($r_main['yzqc_jl'] == 1 ? ' checked="checked"' : '') . '/>是 <input type="radio" name="yzqc_jl" value="0"' . ($r_main['yzqc_jl'] == 0 ? ' checked="checked"' : '') . '/>否</td></tr><tr class="altbg2"' . ($r_main['site_email_verify'] > 0 ? ' style="display: none;"' : '') . '><td>新用户验证邮箱:</td><td><input type="radio" name="site_email_verify" value="1"' . ($r_main['site_email_verify'] == 1 ? ' checked="checked"' : '') . '/>是 <input type="radio" name="site_email_verify" value="0"' . ($r_main['site_email_verify'] == 0 ? ' checked="checked"' : '') . '/>否</td></tr><tr class="altbg1" style="display: none;"><td>照片式监理左侧广告链接:</td><td><input name="jl_link" value="' . $r_main['jl_link'] . '" size="50"/></td></tr><tr class="altbg2" style="display: none;"><td valign="top">照片式监理左侧广告图片:</td><td>' . ($r_main['jl_url'] != '' ? '<img src="' . $r_main['jl_url'] . '" width="' . $fxt_w . '"/><br/><a href="?delimg=1" onclick="if(!confirm(\'确定删除?\'))return false;" style="color: #f00;">删除</a><br/>' : '') . '<input type="file" name="url"/><br/>图片宽度:' . $fxt_w . 'px,允许类型:' . join('、', $u_ea) . ',最大:' . $max_file . 'KB<br/>上传新图片将自动删除原图片</td></tr></table><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">新浪微博</td></tr><tr class="altbg2"><td>App Key:</td><td><input name="sina_k" value="' . $r_main['sina_k'] . '" size="50"/></td></tr><tr class="altbg1"><td>App Secret:</td><td><input name="sina_s" value="' . $r_main['sina_s'] . '" size="50"/></td></tr><tr class="altbg2"><td>官方微博:</td><td>http://weibo.com/<input name="sina_uid" value="' . $r_main['sina_uid'] . '" size="30"/></td></tr></table><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">腾讯微博</td></tr><tr class="altbg2"><td>App Key:</td><td><input name="tqq_k" value="' . $r_main['tqq_k'] . '" size="50"/></td></tr><tr class="altbg1"><td>App Secret:</td><td><input name="tqq_s" value="' . $r_main['tqq_s'] . '" size="50"/></td></tr><tr class="altbg2"><td>官方微博:</td><td>http://t.qq.com/<input name="tqq_uid" value="' . $r_main['tqq_uid'] . '" size="30"/></td></tr></table><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">短信通道</td></tr><tr class="altbg2"><td>软件序列号:</td><td><input name="sms_n" value="' . $r_main['sms_n'] . '" size="50"/></td></tr><tr class="altbg1"><td>密码:</td><td><input name="sms_p" value="' . $r_main['sms_p'] . '" size="50"/></td></tr><tr class="altbg2"><td>签名:</td><td><input name="sms_qm" value="' . $r_main['sms_qm'] . '" size="50"/></td></tr></table><br/><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td colspan="2">邮件</td></tr><tr class="altbg2"><td>SMTP服务器:</td><td><input name="smtp_server" value="' . $r_main['smtp_server'] . '" size="50"/></td></tr><tr class="altbg1"><td>SMTP端口:</td><td><input name="smtp_port" value="' . $r_main['smtp_port'] . '" size="50"/></td></tr><tr class="altbg2"><td>邮箱:</td><td><input name="smtp_email" value="' . $r_main['smtp_email'] . '" size="50"/></td></tr><tr class="altbg1"><td></td><td><input type="checkbox" name="smtp_isa" value="1"' . ($r_main['smtp_isa'] > 0 ? ' checked="checked"' : '') . '/>需要身份验证</td></tr><tr class="altbg2"><td>用户名:</td><td><input name="smtp_user" value="' . $r_main['smtp_user'] . '" size="50"/></td></tr><tr class="altbg1"><td>密码:</td><td><input name="smtp_pwd" type="password" value="' . $r_main['smtp_pwd'] . '" size="50"/></td></tr></table><br><center><input type="submit" class="button" name="settingsubmit" value="提 交"></center><br></form>';
echo yjl_adminhtml($c);
Example #11
0
        $c .= yjl_newpage($page, $tp_res);
    }
}
mysql_free_result($a_res);
$c .= '<br class="clear" /><br /><br /></div>';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['name']) && trim($_POST['name']) != '') {
        $name = htmlspecialchars(trim($_POST['name']), ENT_QUOTES);
        $mobile = htmlspecialchars(trim($_POST['mobile']), ENT_QUOTES);
        $address = htmlspecialchars(trim($_POST['address']), ENT_QUOTES);
        $bz = htmlspecialchars(trim($_POST['bz']), ENT_QUOTES);
        if (isset($edb)) {
            $uSQL = sprintf('update %s set cid=%s, name=%s, mobile=%s, address=%s, bz=%s where txlid=%s', $yjl_dbprefix . 'txl', $_POST['cid'], yjl_SQLString($name, 'text'), yjl_SQLString($mobile, 'text'), yjl_SQLString($address, 'text'), yjl_SQLString($bz, 'text'), $edb['txlid']);
            $result = mysql_query($uSQL) or die('');
        } else {
            $iSQL = sprintf('insert into %s (uid, cid, name, mobile, address, bz, datetime) values (%s, %s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'txl', $user_id, $_POST['cid'], yjl_SQLString($name, 'text'), yjl_SQLString($mobile, 'text'), yjl_SQLString($address, 'text'), yjl_SQLString($bz, 'text'), time());
            $result = mysql_query($iSQL) or die('');
        }
        echo '<script type="text/javascript">location.href=\'' . $f . '?p=' . $page . '\';</script>';
    } else {
        echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">alert(\'请输入姓名。\');location.href=\'' . $f . '?p=' . $page . (isset($edb) ? '&eid=' . $edb['txlid'] : '') . '\';</script>';
    }
    exit;
}
$c .= '<div class="overlay" id="overlay_newct">';
if (isset($edb)) {
    $c .= '<h3>修改联系人:' . $edb['name'] . '</h3>
		<div class="overlay_cont">
			<form method="post" class="main_form" name="form1" action="" onsubmit="if(document.form1.name.value==\'\'){alert(\'请输入姓名。\');return false;}">
				<table>
				<tr>
Example #12
0
            if ($hxqid > 0) {
                $uSQL = sprintf('update %s set c_hd=c_hd+1 where xqid=%s', $yjl_dbprefix . 'xq', $hxqid);
                $result = mysql_query($uSQL) or die('');
            }
            $iSQL = sprintf('insert into %s (uid, hdid, datetime) values (%s, %s, %s)', $yjl_dbprefix . 'hd_user', $user_id, $hdid, time());
            $result = mysql_query($iSQL) or die('');
            $app_a = yjl_app('活动 ' . $name, $hdid, $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html', 'hd');
            $uSQL = sprintf('update %s set app_id=%s where hdid=%s', $yjl_dbprefix . 'hd', $app_a[0], $hdid);
            $result = mysql_query($uSQL) or die('');
            require_once 'lib/jishigouapi.class.php';
            $JishiGouAPI = new JishiGouAPI($yjl_url . $yjl_tpath . 'api.php', $app_a[1], $app_a[2], $udb['nickname'], md5($udb['nickname'] . $udb['password']));
            $content = '添加活动:' . $_POST['name'] . ' ' . $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html';
            $jsg_result = $JishiGouAPI->AddTopic($content);
            if (!isset($jsg_result['error']) && isset($jsg_result['result']['tid'])) {
                $tid = $jsg_result['result']['tid'];
                $uSQL = sprintf('update %s set tid=%s, uname=%s where hdid=%s', $yjl_dbprefix . 'hd', $tid, yjl_SQLString($udb['username'], 'text'), $hdid);
                $result = mysql_query($uSQL) or die('');
                yjl_uwb($user_id, $content . ' ' . $yjl_url . 'active-' . $hxqid . '-' . $hdid . '.html', $tid);
            }
            echo '<script type="text/javascript">location.href=\'' . $f . '?xqid=' . $hxqid . '&id=' . $hdid . '\';</script>';
        } else {
            echo '<script type="text/javascript">location.href=\'' . $f . '?xqid=' . $xqid . '\';</script>';
        }
        exit;
    }
    $is_mce = 1;
    $js_c .= '
	$(\'#form_text\').tinymce({
		script_url : \'lib/tiny_mce/tiny_mce.js\',
		theme : "advanced",
		plugins : "inlinepopups,paste,xhtmlxtras",
Example #13
0
    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 != '') {
        $a_qc[] = $q;
        $qdb = ' and name like ' . yjl_SQLString($q, 'search');
    }
    $c .= '查看:' . join(',', $a_qc) . ' | <a href="' . $f . ($tid > 0 ? '?t=' . $tid : '') . '">查看全部</a><br/><br/>';
}
$tdb = $tid > 0 ? 0 : 1;
$q_res = sprintf('select * from %s where iskf=%s%s%s order by xqid desc', $yjl_dbprefix . 'xq', $tdb, $ldb, $qdb);
$a_res = mysql_query($q_res) or die('');
$tr_res = mysql_num_rows($a_res);
if ($tr_res > 0) {
    $c .= '<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td>小区名称</td><td>地区</td><td>业主数</td><td>&nbsp;</td><td>&nbsp;</td></tr>';
    $tp_res = ceil($tr_res / $p_size);
    if ($page > $tp_res) {
        $page = $tp_res;
    }
    $q_l_res = sprintf('%s limit %d, %d', $q_res, ($page - 1) * $p_size, $p_size);
    $res = mysql_query($q_l_res) or die('');
Example #14
0
             					yjl_SQLString($u, 'text'),
             					yjl_SQLString('点评监理'.$n, 'text'),
             					yjl_SQLString($app_k, 'text'),
             					yjl_SQLString($app_s, 'text'),
             					time());
             				$result=mysql_query($iSQL) or die('');
             				$app_id=mysql_insert_id();
             				**/
             $iSQL = sprintf('insert into %s (uid) values (%s)', $yjl_dbprefix . 'ujl', $uid);
             $result = mysql_query($iSQL) or die('');
             $a_qx = explode('|', $_POST['qx']);
             $uSQL = sprintf('update %s set nc=%s, qx=%s, gzfl=%s, isnc=1 where uid=%s', $yjl_dbprefix . 'members', yjl_SQLString($n, 'text'), $a_qx[0], $a_qx[1], $uid);
             $result = mysql_query($uSQL) or die('');
             $uSQL = sprintf('update %s set validate=1 where uid=%s', $dbprefix . 'members', $uid);
             $result = mysql_query($uSQL) or die('');
             $uSQL = sprintf('update %s set validate_remark=%s where uid=%s', $dbprefix . 'memberfields', yjl_SQLString('监理', 'text'), $uid);
             $result = mysql_query($uSQL) or die('');
             $nf = 'a_jl.php';
             $_SESSION[md5($nf)] = 1;
             echo '<script type="text/javascript">location.href=\'' . $nf . '\';</script>';
             exit;
         } else {
             $_SESSION[$esid] = 2;
         }
     } else {
         $_SESSION[$esid] = 3;
     }
 } else {
     $_SESSION[$esid] = 1;
 }
 echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>';
Example #15
0
$c = isset($t_m) ? yjl_getMsg($t_m) : '';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (isset($_POST['name']) && trim($_POST['name']) != '' && isset($_POST['l1id']) && intval($_POST['l1id']) > 0) {
        $name = htmlspecialchars(trim($_POST['name']), ENT_QUOTES);
        $l1id = intval($_POST['l1id']);
        $l2id = isset($_POST['l2id']) ? $_POST['l2id'] : 0;
        $l3id = isset($_POST['l3id']) ? $_POST['l3id'] : 0;
        $l4id = isset($_POST['l4id']) ? $_POST['l4id'] : 0;
        $address = htmlspecialchars(trim($_POST['address']), ENT_QUOTES);
        $iSQL = sprintf('insert into %s (name, l1id, l2id, l3id, l4id, address) values (%s, %s, %s, %s, %s, %s)', $yjl_dbprefix . 'xq', yjl_SQLString($name, 'text'), $l1id, $l2id, $l3id, $l4id, yjl_SQLString($address, 'text'));
        $result = mysql_query($iSQL) or die('');
        $xqid = mysql_insert_id();
        $u = $yjl_url . 'square-' . $xqid . '.html';
        $app_s = md5(time() . '-' . rand(1, 1000) . '-xq-' . $xqid);
        $app_k = md5($app_s);
        $iSQL = sprintf('insert into %s (uid, username, app_name, source_url, show_from, app_desc, app_key, app_secret, status, create_time) values (%s, %s, %s, %s, 1, %s, %s, %s, 1, %s)', $dbprefix . 'app', $admin_db['uid'], yjl_SQLString($admin_db['username'], 'text'), yjl_SQLString($name, 'text'), yjl_SQLString($u, 'text'), yjl_SQLString($name . ' 小区广场', 'text'), yjl_SQLString($app_k, 'text'), yjl_SQLString($app_s, 'text'), time());
        $result = mysql_query($iSQL) or die('');
        $app_id = mysql_insert_id();
        $uSQL = sprintf('update %s set app_id=%s where xqid=%s', $yjl_dbprefix . 'xq', $app_id, $xqid);
        $result = mysql_query($uSQL) or die('');
        $nf = 'a_xq.php';
        $_SESSION[md5($nf)] = 1;
        echo '<script type="text/javascript">location.href=\'' . $nf . '\';</script>';
    } else {
        $_SESSION[$esid] = 1;
        echo '<script type="text/javascript">location.href=\'' . $f . '\';</script>';
    }
    exit;
}
if ($r_main['dq'] == '') {
    $r_main['dq'] = $d_l1id;
Example #16
0
     $ldb = $l2id > 0 ? ' and l3id=' . $l2id : '';
     $q_rep = sprintf('select xqid, name, c_user, c_user+c_wb+c_jl+c_xz+c_hd as c_hot from %s where l2id = 175 and c_user+c_wb+c_jl+c_xz+c_hd>0 and iskf=1%s order by c_hot desc limit 12', $yjl_dbprefix . 'xq', $ldb);
 }
 $rep = mysql_query($q_rep) or die('');
 $r_rep = mysql_fetch_assoc($rep);
 if (mysql_num_rows($rep) > 0) {
     $c .= '<div class="hotvge clearfix"><h3>热门小区</h3><ul>';
     do {
         $c .= '<li><a href="' . str_replace('[xqid]', $r_rep['xqid'], $a_t[$tid]) . '">' . $r_rep['name'] . '(' . $r_rep['c_user'] . ')</a></li>';
     } while ($r_rep = mysql_fetch_assoc($rep));
     $c .= '</ul></div>';
 }
 mysql_free_result($rep);
 $c .= '<div class="list_village clearfix"><ul>';
 $pydb = $pyid > 0 ? ' and pyid=' . $pyid : '';
 $qdb = $q != '' ? ' and (name like ' . yjl_SQLString($q, 'search') . ' or address like ' . yjl_SQLString($q, 'search') . ')' : '';
 if ($c_l1id == 9) {
     $q_rep = sprintf('select xqid, name, c_user from %s where l1id=%s%s%s%s and iskf=1 order by name', $yjl_dbprefix . 'xq', $c_l1id, $ldb, $pydb, $qdb);
 } else {
     $q_rep = sprintf('select xqid, name, c_user from %s where l2id=%s%s%s%s and iskf=1 order by name', $yjl_dbprefix . 'xq', $c_l1id, $ldb, $pydb, $qdb);
 }
 $rep = mysql_query($q_rep) or die(mysql_error());
 $r_rep = mysql_fetch_assoc($rep);
 $c_rep = mysql_num_rows($rep);
 if ($c_rep > 0) {
     $m = 4;
     $p = ceil($c_rep / $m);
     $i = 0;
     do {
         if ($i > 0 && $i % $p == 0) {
             $c .= '<ul>';
Example #17
0
         unset($_SESSION[$seid . '_code']);
     }
     unset($_SESSION[$seid]);
 } else {
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         if (isset($_POST['email']) && trim($_POST['email']) != '') {
             $email = htmlspecialchars(trim($_POST['email']), ENT_QUOTES);
             $q_res = sprintf('select a.uid, b.pwdrcode, b.pwdrdate from %s as a, %s as b where a.email=%s and a.uid=b.uid limit 1', $dbprefix . 'members', $yjl_dbprefix . 'members', yjl_SQLString($email, 'text'));
             echo $q_res;
             $res = mysql_query($q_res) or die('');
             $r_res = mysql_fetch_assoc($res);
             if (mysql_num_rows($res) > 0) {
                 if ($r_res['pwdrdate'] <= time() - 86400 * $yxts || $r_res['pwdrcode'] == '') {
                     $r_res['pwdrcode'] = md5($email . '|' . time() . '|' . rand(0, 9999));
                 }
                 $uSQL = sprintf('update %s set pwdrcode=%s, pwdrdate=%s where uid=%s', $yjl_dbprefix . 'members', yjl_SQLString($r_res['pwdrcode'], 'text'), time(), $r_res['uid']);
                 $result = mysql_query($uSQL) or die('');
                 $ec = "您好:\n您收到这封邮件,是因为在“" . $r_main['site_name'] . "”网站的用户注册中使用了该邮箱地址\n且用户请求使用找回密码功能所致。\n\n如果您没有进行上述操作,请忽略这封邮件。您不需要退订或进行其他进一步的操作。\n------------------------------------------------------\n重设密码说明:\n如果是您发起了找回密码申请,请在" . $yxts . "天之内,通过点击下面的链接重设您的密码:\n" . $yjl_url . $f . "?c=" . $r_res['pwdrcode'] . "\n\n(如果上面不是链接形式,请将地址手工粘贴到浏览器地址栏再访问)\n上面的页面打开后,输入新的密码后提交,之后您即可使用新的密码登录" . $r_main['site_name'] . "了。您可以在个人中心中随时修改您的密码。\n本请求提交者的 IP 为:" . yjl_getIP() . "\n\n感谢您的访问,祝您使用愉快!\n\n此致,\n" . $r_main['site_name'] . " 管理团队.\n" . $yjl_url . "\n";
                 if ($yjl_isdebug == 0) {
                     require_once 'lib/smtp.php';
                     yjl_mail($email, $r_main['site_name'] . ' 找回密码', $ec);
                 }
                 $_SESSION[$seid] = 1;
                 //delete
                 if ($yjl_isdebug > 0) {
                     $_SESSION[$seid . '_code'] = $r_res['pwdrcode'];
                 }
             } else {
                 echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">alert(\'没有用户使用此邮箱地址。\');</script>';
             }
             mysql_free_result($res);
Example #18
0
        }
        $uSQL = sprintf('update %s set name=%s, l1id=%s, l2id=%s, l3id=%s, l4id=%s, address=%s, url=%s, xqjj=%s, jtzk=%s, zbxx=%s, map_q=%s, pyid=%s where xqid=%s', $yjl_dbprefix . 'xq', yjl_SQLString($name, 'text'), $l1id, $l2id, $l3id, $l4id, yjl_SQLString($address, 'text'), yjl_SQLString($url, 'text'), yjl_SQLString($xqjj, 'text'), yjl_SQLString($jtzk, 'text'), yjl_SQLString($zbxx, 'text'), yjl_SQLString($map_q, 'text'), $_POST['pyid'], $exqdb['xqid']);
        $result = mysql_query($uSQL) or die('');
        if ($name != $exqdb['name']) {
            $uSQL = sprintf('update %s set app_name=%s, app_desc=%s where id=%s', $dbprefix . 'app', yjl_SQLString($name, 'text'), yjl_SQLString($name . ' 小区广场', 'text'), $exqdb['app_id']);
            $result = mysql_query($uSQL) or die('');
        }
        $_SESSION[$esid] = 1;
    } else {
        $_SESSION[$esid] = 2;
    }
    echo '<script type="text/javascript">location.href=\'' . $f . '?id=' . $exqid . '\';</script>';
    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('');
Example #19
0
    exit;
}
$f = 'a_jl.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) : '';
$c_pj = count($a_dpfl[0]);
$q = isset($_GET['q']) && trim($_GET['q']) != '' ? htmlspecialchars(trim($_GET['q']), ENT_QUOTES) : '';
$qdb = $q != '' ? ' and (a.nc like ' . yjl_SQLString($q, 'search') . ' or b.nickname like ' . yjl_SQLString($q, 'search') . ')' : '';
$tid = isset($_GET['t']) && $_GET['t'] == 1 ? 1 : 0;
$c .= '<form method="get" action=""><table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td>' . ($tid > 0 ? '待审核' : '') . '专业人员列表' . ($q != '' ? ',搜索:' . $q : '') . '</td></tr><tr class="altbg1"><td><input name="q" size="120" value="' . $q . '"/>' . ($tid > 0 ? '<input type="hidden" name="t" value="' . $tid . '"/>' : '') . '</td></tr></table><br><center><input type="submit" class="button" name="settingsubmit" value="搜 索">' . ($q != '' ? ' <a href="' . $f . ($tid > 0 ? '?t=' . $tid : '') . '">查看全部</a>' : '') . '</center></form><br/><br/>';
if ($tid > 0) {
    $c .= '<a href="' . $f . '">返回</a>';
} else {
    $c .= '<a href="?t=1">待审核专业人员</a>';
}
$c .= '<br/><br/>';
$tdb = $tid > 0 ? 'a.iswc=3' : '(a.iswc=0 or a.iswc=1)';
$q_res = sprintf('select a.qx, a.gzfl, a.iswc, a.misyz, a.nc, a.iszxjl, b.nickname, b.email, c.* from %s as a, %s as b, %s as c where a.uid=b.uid and a.uid=c.uid and (a.qx=5 or a.qx=6) and %s%s order by a.uid desc', $yjl_dbprefix . 'members', $dbprefix . 'members', $yjl_dbprefix . 'ujl', $tdb, $qdb);
$a_res = mysql_query($q_res) or die('');
$tr_res = mysql_num_rows($a_res);
if ($tr_res > 0) {
    $c .= '<table cellspacing="1" cellpadding="4" width="100%" align="center" class="tableborder"><tr class="header"><td rowspan="2">姓名</td><td rowspan="2">工种</td><td rowspan="2">年龄</td><td rowspan="2">从业时间(月)</td><td colspan="' . $c_pj . '">点评</td><td rowspan="2">状态</td><td rowspan="2">&nbsp;</td><td rowspan="2">&nbsp;</td></tr><tr class="header">';
    foreach ($a_dpfl[0] as $v) {
Example #20
0
function yjl_addlog($c, $mid, $isgk = 0, $luid = 0, $uid = 0)
{
    global $user_id, $yjl_dbprefix;
    if ($user_id > 0 && $uid == 0) {
        $uid = $user_id;
    }
    $q_rep = sprintf('select loid from %s where uid=%s and luid=%s and mid=%s and isgk=%s limit 1', $yjl_dbprefix . 'log', $uid, $luid, yjl_SQLString($mid, 'text'), $isgk);
    $rep = mysql_query($q_rep) or die(mysql_error());
    $r_rep = mysql_fetch_assoc($rep);
    if (mysql_num_rows($rep) > 0) {
        $uSQL = sprintf('update %s set content=%s, datetime=%s, isnew=1 where loid=%s', $yjl_dbprefix . 'log', yjl_SQLString($c, 'text'), time(), $r_rep['loid']);
        $result = mysql_query($uSQL) or die(mysql_error());
    } else {
        $iSQL = sprintf('insert into %s (uid, luid, datetime, mid, content, isnew, isgk) values (%s, %s, %s, %s, %s, 1, %s)', $yjl_dbprefix . 'log', $uid, $luid, time(), yjl_SQLString($mid, 'text'), yjl_SQLString($c, 'text'), $isgk);
        $result = mysql_query($iSQL) or die(mysql_error());
    }
    mysql_free_result($rep);
}