Beispiel #1
0
<?php

require_once '../sub/init.php';
require_once wrzc_net . 'sub/conn.php';
if (!ereg("^[0-9]{1,8}\$", $cook_userid) || empty($cook_userid)) {
    header("Location: " . $Global['www_2domain'] . "/login.php");
    exit;
} else {
    $cook_password = trimm($cook_password);
    $rt = $db->query("SELECT id FROM " . __TBL_MAIN__ . " WHERE id='{$cook_userid}' AND password='******' AND flag>0");
    if (!$db->num_rows($rt)) {
        header("Location: " . $Global['www_2domain'] . "/login.php");
        exit;
    }
}
if ($submitok == "addupdate") {
    if ($Temp_diarynum >= 1) {
        callmsg("一天只能发一篇", "-1");
    }
    if (empty($title)) {
        callmsg("标题不能为空", "-1");
    }
    if (empty($content)) {
        callmsg("内容不能为空", "-1");
    }
    if (strlen($title) > 100) {
        callmsg("标题太长,请控制在100个字节以内", "-1");
    }
    if (strlen($content) > 30000 || strlen($content) < 20) {
        callmsg("内容过多或过少,请控制在20~20000字节以内", "-1");
    }
Beispiel #2
0
.main .right .C .box .R .tt{width:140px;height:20px;color:#999}
.main .right .C .box .R .tt span{color:#f00}
.main .right .C .box .R .mm{width:140px;height:35px;color:#7e7e7e;line-height:18px}
.main .right .C .box .R .bb{width:140px;height:25px;text-align:center}
</style>
</head>
<body>
<?php 
require_once wrzc_net . 'top.php';
?>
<div class="main">
	<div class="left">
		<?php 
$tempsql = '';
if ($t == 1 && !empty($k)) {
    $k = trimm($k);
    $tmpsort = " ORDER BY zhenghun_jingjia DESC,logintime DESC ";
    $tempsql .= " (username LIKE '%" . $k . "%' OR nickname LIKE '%" . $k . "%') AND ";
    $Tfield = "id,username,nickname,grade,sex,birthday,love,kind,area1,area2,photo_s,video_s,heigh,weigh,house,car,edu,job,pay,ifphoto,ifbirthday,ifedu,iflove,ifpay,zhenghun_jingjia ";
    $tmpsql .= "SELECT {$Tfield} FROM " . __TBL_MAIN__ . " WHERE {$tempsql} flag=1 {$tmpsort} LIMIT 50";
} elseif ($t == 2) {
    $Tfield = "id,username,nickname,grade,sex,birthday,love,kind,area1,area2,photo_s,video_s,heigh,weigh,house,car,edu,job,pay,ifphoto,ifbirthday,ifedu,iflove,ifpay,zhenghun_jingjia ";
    $tmpsql = "SELECT {$Tfield} FROM " . __TBL_MAIN__ . " WHERE flag=1 ORDER BY id DESC LIMIT 500";
} else {
    if ($sex == 1) {
        $tempsql .= " sex=1 AND ";
    }
    if ($sex == 2) {
        $tempsql .= " sex=2 AND ";
    }
    if ($photo == 1) {
Beispiel #3
0
}
?>
</b></font></td>
<td width="7%" align="right" valign="bottom"><a href="article<?php 
echo $mainid;
?>
.html"></a></td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr></table>
<?php 
if (!empty($keyword)) {
    $tmpkeyword = trimm($keyword);
    $tmpkeyword = " title LIKE '%" . $tmpkeyword . "%'";
} else {
    $tmpkeyword = " 1=1 ";
}
if (!empty($bkid)) {
    $tmpbkid = "bkid='{$bkid}'";
} else {
    $tmpbkid = "1=1";
}
switch ($listtype) {
    case 1:
        $tmplisttype = " AND ifjh=1 ORDER BY iftop DESC,endtime DESC";
        break;
    case 2:
        $tmplisttype = " AND iftop=1 ORDER BY endtime DESC";
Beispiel #4
0
 }
 if (!$ifnext) {
     unset($_SESSION["supdesverify"]);
     setcookie("cook_userid", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_username", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_nickname", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_password", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_grade", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_sex", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_photo_s", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_if2", "", null, "/", $Global['m_cookdomain']);
     setcookie("cook_stealth", "", null, "/", $Global['m_cookdomain']);
     callmsg($varmsg, "-1");
 } else {
     $form_username = trim($form_username);
     $password = trimm($form_password1);
     $password = md5($password);
     $regtime = date("Y-m-d H:i:s");
     $regip = getip();
     $db->query("INSERT INTO " . __TBL_MAIN__ . "  (username,nickname,password,loveb,regtime,regip,logintime,loginip,sex,birthday,love,kind,area1,area2,email,yctel) VALUES ('{$form_username}','{$form_username}','{$password}','" . $Global['m_regloveb'] . "','{$regtime}','{$regip}','{$regtime}','{$regip}','{$form_sex}','{$form_birthday}','{$form_love}','{$form_kind}','{$province}','{$city}','{$form_email}','{$yctel}')");
     $tmpid = $db->insert_id();
     if (empty($stealth)) {
         $stealth = 0;
     }
     setcookie("cook_userid", $tmpid, null, "/", $Global['m_cookdomain']);
     setcookie("cook_username", $form_username, null, "/", $Global['m_cookdomain']);
     setcookie("cook_nickname", $form_username, null, "/", $Global['m_cookdomain']);
     setcookie("cook_grade", 1, null, "/", $Global['m_cookdomain']);
     setcookie("cook_password", $password, null, "/", $Global['m_cookdomain']);
     setcookie("cook_sex", $form_sex, null, "/", $Global['m_cookdomain']);
     setcookie("cook_photo_s", "", null, "/", $Global['m_cookdomain']);
Beispiel #5
0
     header("Location: detail" . $fid . ".html");
     break;
 default:
     $rt = $db->query("SELECT a.username,a.nickname,a.grade,a.loveb,a.sex,b.userid,b.title,b.content,b.content2,b.xsloveb,b.addtime,b.click,b.hfnum,b.flag,b.ifopen,b.ifjh FROM " . __TBL_MAIN__ . " a," . __TBL_ASK__ . " b WHERE a.id=b.userid  AND a.flag=1 AND b.id=" . $fid);
     if ($db->num_rows($rt)) {
         $row = $db->fetch_array($rt);
         $uid = $row['userid'];
         $username = $row['username'];
         $nickname = badstr($row['nickname']);
         $grade = $row['grade'];
         $loveb = $row['loveb'];
         $sex = $row['sex'];
         $click = $row['click'];
         $title = htmlout(stripslashes($row['title']));
         $content = htmlout(stripslashes($row['content']));
         $content2 = badstr(trimm(stripslashes($row['content2'])));
         $xsloveb = $row['xsloveb'];
         $addtime = $row['addtime'];
         $click = $row['click'];
         $hfnum = $row['hfnum'];
         $flag = $row['flag'];
         $ifopen = $row['ifopen'];
         $ifjh = $row['ifjh'];
         if (empty($content2)) {
             $content2 = '<h1>暂无补充内容</h1>';
         }
         $ifjh = $ifjh == 1 ? ' <img src=images/j.gif title=推荐病历 />' : '';
         switch ($flag) {
             case 1:
                 $flagP = "<img src=images/56.gif>";
                 break;