当前位置: 首页>>代码示例>>PHP>>正文


PHP MooCutstr函数代码示例

本文整理汇总了PHP中MooCutstr函数的典型用法代码示例。如果您正苦于以下问题:PHP MooCutstr函数的具体用法?PHP MooCutstr怎么用?PHP MooCutstr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了MooCutstr函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index_index


//.........这里部分代码省略.........
                $u2 = MooFastdbGet('members_base', 'uid', $list['uid']);
                $u = array_merge($u, $u2);
            } else {
                $sql = "SELECT s.uid,s.nickname,s.gender,s.images_ischeck,s.province,s.city,s.birthyear,s.s_cid,s.city_star,b.mainimg,i.introduce FROM {$dbTablePre}members_search s left join {$dbTablePre}members_base b on s.uid=b.uid left join {$dbTablePre}members_introduce as i on s.uid=i.uid WHERE s.uid='{$list['uid']}'";
                $u = $_MooClass['MooMySQL']->getOne($sql);
            }
            if ($u) {
                foreach ($userList as $key => $val) {
                    if ($list['uid'] == $val['uid']) {
                        $user_key = $key;
                        break;
                    }
                }
                if (isset($user_key)) {
                    if (isset($userList[$sort])) {
                        $userList[$key] = $userList[$sort];
                    }
                    $userList[$sort] = $u;
                } else {
                    $userList[$sort] = $u;
                }
            }
        }
    }
    // }
    //删除数组中多余的部分
    array_splice($userList, 6);
    $userArr = array();
    $i = 0;
    $imgSrcSmall = $imgSrcMid = $imgSrcUrl = '';
    foreach ($userList as $v) {
        $introduce = '';
        if (isset($v['introduce'])) {
            $introduce = MooCutstr($v['introduce'], 50, '...');
        }
        $imgSrcSmall = MooGetphoto($v['uid'], 'small');
        $imgSrcMid = MooGetphoto($v['uid'], 'mid');
        if ($imgSrcSmall) {
            $imgSrc = $imgSrcMid;
        } elseif ($v['gender'] == '1') {
            $imgSrc = "module/index/templates/default/images/se_woman.gif";
        } else {
            $imgSrc = "module/index/templates/default/images/se_man.gif";
        }
        if (isset($v['mainimg']) && !empty($v['mainimg']) && isset($v['images_ischeck']) && $v['images_ischeck'] == 1) {
            $imgUrl = "<a href=\"index.php?n=space&uid={$v['uid']}\" target=\"_blank\"><img src={$imgSrc} width=\"120\"/> </a>";
        } else {
            if (isset($v['gender']) && $v['gender']) {
                $imgUrl = "<a href=\"index.php?n=space&uid={$v['uid']}\" target=\"_blank\"><img src=\"module/index/templates/default/images/se_woman.gif\" /> </a> ";
            } else {
                $imgUrl = "<a href=\"index.php?n=space&uid={$v['uid']}\" target=\"_blank\"><img src=\"module/index/templates/default/images/se_man.gif\" /></a> ";
            }
        }
        if ($v['birthyear']) {
            $age = date('Y') - $v['birthyear'] . '岁';
        } else {
            $age = '年龄保密';
        }
        $userArr[] = array("i" => $i, "uid" => $v['uid'], "mainimg" => $v['mainimg'], "images_ischeck" => $v['images_ischeck'], "gender" => $v['gender'], "introduce" => $introduce, "imgUrl" => $imgUrl, "nickname" => $v['nickname'], "age" => $age, "province" => $v['province'], "city" => $v['city']);
        $i++;
    }
    //===============最新注册会员,按照片数排序 ,男会员=========================
    $newMale = array();
    $param = "type=query/name=new_members_male/sql=SELECT s.uid,s.nickname,s.gender,s.images_ischeck,s.province,s.city,s.birthyear,s.s_cid,s.city_star,b.mainimg,i.introduce FROM {$dbTablePre}members_search as s left join {$dbTablePre}members_base as b on s.uid=b.uid  left join {$dbTablePre}members_introduce as i on s.uid=i.uid where  s.gender=0 and s.pic_num>4 and s.images_ischeck=1 and s.is_lock=1 and i.introduce!='' and s.nickname!='' order by s.uid desc limit 3/cachetime=10800";
    $_MooClass['MooCache']->getBlock($param);
    $new_reguser_male = isset($GLOBALS['_MooBlock']['new_members_male']) ? $GLOBALS['_MooBlock']['new_members_male'] : '';
开发者ID:noikiy,项目名称:zays,代码行数:67,代码来源:testindex.php

示例2: activetime

            ?>
',city)</script><?php 
        }
        ?>
</dd>
                                                <!-- <dd class="f-ed0a91">&lt; <?php 
        echo activetime($friend['s']['lastvisit'], $friend['s']['usertype']);
        ?>
 &gt;</dd> -->
                                            </dl>
                                        </li>
                                        <li class="fright">
                                            <dl class="r-service-heart">
                                                <dt>内心独白</dt>
                                                <dd class="r-service-heart-text"><?php 
        echo $friend['t']['introduce'] ? MooCutstr($friend['t']['introduce'], 148, $dot = ' ...') : '无内心独白内容';
        ?>
                                                </dd>
                                                <!-- <dd> <p><input name="" onclick="location.href='index.php?n=service&h=commission&t=sendcontact&sendid=<?php 
        echo $friend['s'][uid];
        ?>
'" type="button" class="btn btn-default" value="委托真爱一生联系TA" /></p></dd> -->
                                            </dl>	
                                        </li>
                                    </ul>
                                    <?php 
    }
    ?>

                                    <div class="clear"></div>
                                    <div class="pages"><span class="fleft" style="padding-left:40px;"><input name="" type="checkbox" onclick="checkAll(this)"  value="" />&nbsp;全选&nbsp;<input name="" type="submit" class="btn btn-default" value="删除信息" /><input type="hidden"  name="delfriend"  value="删除秋波"></span><?php 
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:service_friend_myfriendlist.tpl.php

示例3: sendcontact

function sendcontact()
{
    global $_MooClass, $dbTablePre, $timestamp, $user, $user_arr, $hzn, $serverid;
    $returnurl = 'index.php?' . $_SERVER['QUERY_STRING'];
    //返回的url
    $userid = $GLOBALS['MooUid'];
    //note 目前默认系统不审核
    $contact_sys_check = '0';
    //note 目前系统默认是委托真爱一生等待对方的回应
    $contact_stat = '1';
    $content = MooCutstr(safeFilter(MooGetGPC('content1', 'string')), 200, '');
    $sendid = MooGetGPC('sendid', 'integer');
    //客服不可模拟操作
    /*if($hzn == "hongniangwang"){
          MooMessage('对不起您不能模拟操作','javascript:history.go(-1);','04');
          exit;
      }*/
    if ($serverid) {
        MooMessage('对不起您不能模拟操作', 'javascript:history.go(-1);', '04');
        exit;
    }
    //自己不可委托真爱一生联系自己
    if ($sendid == $userid) {
        MooMessage('自己不可委托真爱一生联系自己', 'javascript:history.go(-1);', '02');
        exit;
    }
    //note 双方屏蔽不给操作
    if (MooGetScreen($userid, $sendid)) {
        MooMessage('因特殊原因,委托失败', "index.php?n=service&h=rose&t=getmorerose", '03');
        exit;
    }
    $formsubmit1 = MooGetGPC('formsubmit1', 'string');
    //委托联系人表
    $checkuser = $_MooClass['MooMySQL']->getOne("SELECT mid,sendtime FROM {$dbTablePre}service_contact WHERE you_contact_other='{$sendid}' AND other_contact_you = '{$userid}' and receive_del=0 and send_del=0 and is_server=0");
    //查今天委托次数
    $checkuser2 = $user_arr;
    //note 委托也要做性别限制
    if (MOOPHP_ALLOW_FASTDB) {
        $user_s = MooFastdbGet('members_search', 'uid', $sendid);
    } else {
        $user_s = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members_search WHERE uid = '{$sendid}'", true);
    }
    //note 获得照片总数
    $ret_count = $_MooClass['MooMySQL']->getOne("SELECT count(imgid) as c FROM {$dbTablePre}pic WHERE uid = '{$user_s['uid']}'");
    $pic_total = $ret_count['c'];
    if ($checkuser2['gender'] == $user_s['gender']) {
        MooMessage('同性之间不可委托真爱一生', 'javascript:history.go(-1);', '02');
        exit;
    }
    //note 检查绑定是否过期
    if ($user_s['isbind'] == 1) {
        //note 如果被绑定,检测绑定是否到期
        $user_s['isbind'] = check_bind($user_s['bind_id']);
        if ($user_s['isbind'] == 1) {
            MooMessage('不能向绑定中的会员发委托', 'javascript:history.go(-1);', '02');
            exit;
        }
    }
    if ($user_s['showinformation'] != 1) {
        MooMessage('发起委托失败,该会员已经关闭资料!', 'javascript:history.go(-1);', '02');
        exit;
    }
    //note 如果已经联系他就直接提示
    if ($checkuser['mid']) {
        MooMessage("对不起,您已经委托真爱一生联系TA了", 'javascript:history.go(-1);', '02');
    }
    //note 如果是今天超过3次就直接提示
    $mtime = date("Ymd");
    $contact_time_Ymd = date("Ymd", $checkuser2['contact_time']);
    if ($contact_time_Ymd == $mtime && $checkuser2['contact_num'] >= 3) {
        MooMessage("今天委托真爱一生已经超过3次", 'javascript:history.go(-1);', '02');
    }
    //提交时
    if ($formsubmit1 && $content && $sendid) {
        if (!$checkuser['mid']) {
            //发送短信和邮件
            include_once "./module/crontab/crontab_config.php";
            if (MOOPHP_ALLOW_FASTDB) {
                $res = MooFastdbGet('members_search', 'uid', $sendid);
            } else {
                $res = $_MooClass['MooMySQL']->getOne("select telphone,is_phone,username from {$dbTablePre}members_search where uid='{$sendid}'");
            }
            if (MOOPHP_ALLOW_FASTDB) {
                $send_user_info = MooFastdbGet('members_search', 'uid', $userid);
                $send_user_info = array_merge($send_user_info, MooFastdbGet('members_choice', 'uid', $userid));
            } else {
                $send_user_info = $_MooClass['MooMySQL']->getAll("select b.*,a.* from `{$dbTablePre}members_search` a  left join  {$dbTablePre}members_choice b  on a.uid=b.uid  where a.uid = '{$userid}'");
                $send_user_info = $send_user_info['0'];
            }
            //头像路径
            $path = thumbImgPath(2, $send_user_info['pic_date'], $send_user_info['pic_name'], $send_user_info['gender']);
            if (file_exists($path)) {
                $img_path = $path;
            } else {
                if ($send_user_info['gender'] == 1) {
                    $img_path = "/public/images/service_nopic_woman.gif";
                } else {
                    $img_path = "/public/images/service_nopic_man.gif";
                }
            }
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:zays,代码行数:101,代码来源:commission.php

示例4: to_send_hn_message

function to_send_hn_message()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr;
    $s_title = MooGetGPC('s_title', 'string', 'P');
    $s_title = rtrim($s_title);
    //对主题字数限制
    $s_title = MooCutstr($s_title, 30, $dot = '');
    $s_content = MooGetGPC('s_content', 'string', 'P');
    //note 特殊字符
    $s_content = rtrim($s_content);
    if ($s_title && $s_content) {
        //note 客服ID
        $user = $_MooClass['MooMySQL']->getOne("select uid,sid,telphone from {$dbTablePre}members_search where uid='{$userid}'");
        if (empty($user['sid'])) {
            $sid = 20;
        } else {
            $sid = $user['sid'];
        }
        //note 添回复的消息、添加发送的消息
        $remark_title = "{$userid}会员给给您发消息了,请速查看。";
        $awoketime = time() + 600;
        $sql = "INSERT INTO `{$dbTablePre}admin_remark` SET sid='{$sid}',title='{$remark_title}',content='{$s_content}',awoketime='{$awoketime}',dateline='{$GLOBALS['timestamp']}'";
        $send_status = $_MooClass['MooMySQL']->query($sql);
        //邮件回复提醒
        $sql = "INSERT INTO {$GLOBALS['dbTablePre']}services(s_cid,s_uid,s_fromid,s_title,s_content,s_time,is_server,sid,flag)\n\t\t\t\tVALUES(3,{$userid},'{$sid}','真爱一生消息','您好!您的消息红娘已经收到,我们将在一个工作日内解决!4008787920','{$GLOBALS['timestamp']}','1','{$sid}','1')";
        $ret = $GLOBALS['_MooClass']['MooMySQL']->query($sql);
        //短信回复提醒
        Push_message_intab($userid, $user['telphone'], "邮件回复", "您的消息红娘已经收到,我们将在一个工作日内解决。4008787920!", "system");
        //添加成功提示信息
        if ($send_status) {
            MooMessage('发送成功', 'javascript:history.go(-2)', '05');
        } else {
            MooMessage('发送失败', 'javascript:history.go(-1)', '03');
        }
    } else {
        MooMessage('数据填写不完整', 'javascript:history.go(-1)', '03');
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:38,代码来源:message.php

示例5: MooTemplate

    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title>升级钻石会员——真爱一生网</title>
        <?php 
include MooTemplate('system/js_css', 'public');
?>
        <link href="module/payment/templates/default/payment.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
        <div class="d">
            <?php 
if ($GLOBALS['MooUid']) {
    ?>
            <div class="logined">
                您的用户名是:<?php 
    echo $GLOBALS['MooUserName'] ? MooCutstr($GLOBALS['MooUserName'], 16) : $user_arr['nickname'];
    ?>
                &nbsp;&nbsp; 您的ID是:<?php 
    echo $GLOBALS['MooUid'];
    ?>
&nbsp;&nbsp;
                最新邮件(<a href="index.php?n=service&h=message"><?php 
    echo $GLOBALS['new_email_num'];
    ?>
) <a href="service.html">进入我的红娘&gt;&gt;</a> <a href="index.php?n=index&h=logout">安全退出</a>
            </div><?php 
}
?>
        </div>
        <div class="main">
开发者ID:noikiy,项目名称:zays,代码行数:30,代码来源:payment_diamond.tpl.php

示例6: advance_search


//.........这里部分代码省略.........
        $bloo_sql = array();
        foreach ($bloodtype as $v) {
            $bloodtype_str .= $bloodtype_list[$v] . " ";
            $bloo_sql[] = $v;
        }
        /*if($bloo_sql){
        		  $bloo_sql=join(",",$bloo_sql); 
        		}
        		$bloodtype_sql.=$bloo_sql.")";*/
        $filter[] = array('bloodtype', implode(' | ', $bloo_sql));
        $condition_str .= $bloodtype_str;
    }
    //if($bloodtype == '-1' || $bloodtype == '-2') $bloodtype_sql = '';
    //note 信仰查询sql语句
    if ($religion != 0 && $religion != '-1' && $religion != '-2' && is_array($religion)) {
        $religion_str = " 信仰:";
        //$religion_sql = "  and  sf.religion in(";
        $reli_sql = array();
        foreach ($religion as $v) {
            $religion_str .= $belief_list[$v] . " ";
            $reli_sql[] = $v;
        }
        /*	if($reli_sql){
        			  $reli_sql=join(",",$reli_sql);
        			}
        			$religion_sql.=$reli_sql.")";*/
        $filter[] = array('religion', implode(' | ', $reli_sql));
        $condition_str .= $religion_str;
    }
    // if($religion == '-1' || $religion == '-2') $religion_sql = '';
    //note 兄弟姐妹sql语句
    if ($family != '0' && $family != '-1' && $family != '-2' && is_array($family)) {
        $family_str = " 兄弟姐妹:";
        //$family_sql = " and  sf.family in(";
        $fami_sql = array();
        foreach ($family as $v) {
            $family_str .= $family_list[$v];
            $fami_sql[] = $v;
        }
        /*if($fami_sql){
        		    $fami_sql=join(",",$fami_sql);
        		}
        		$family_sql.=$fami_sql.")";*/
        $filter[] = array('family', implode(' | ', $fami_sql));
        $condition_str .= $family_str;
    }
    //if($family == '-1' || $family == '-2')  $family_sql = '';
    //note 语言能力sql语句,采用like查询
    $language_sql = "";
    if (is_array($language)) {
        $language_str = " 语言能力:";
        //$language_sql = " and(";
        //$lan_sql = "";
        $lan_sql = array();
        foreach ($language as $v) {
            $language_str .= $language_list[$v] . " ";
            $lan_sql[] = $v;
            /*if (empty($lan_sql)) {
            			$lan_sql .= " FIND_IN_SET('" . $v . "'," . "sf.language)";
            		} else {
            			$lan_sql .= " or FIND_IN_SET('" . $v . "'," . "sf.language)";
            		}*/
        }
        $filter[] = array('language', implode(' | ', $lan_sql));
        //$language_sql .= $lan_sql . ")";
        $condition_str .= $language_str;
    }
    //if($language == '-1' || $language == '-2') $language_sql = '';
    /*$sql = " on sf.uid=s.uid  where s.is_lock = 1 and s.gender='$gender' ".$age_sql.$area_sql.$marriage_sql.$salary_sql.$education_sql.$height_sql.$weight_sql.
    		$smoking_sql.$drinking_sql.$occupation_sql.$house_sql.$vehicle_sql.$corptype_sql.$children_sql.$wantchildren_sql.$hometown_sql.
    		$nation_sql.$body_sql.$animalyear_sql.$constellation_sql.$bloodtype_sql.$religion_sql.$family_sql.$language_sql.$photo_sql;*/
    $filter[] = array('is_lock', 1);
    $limit = array(16);
    $sp = searchApi($index);
    $sp->getResultOfReset($filter, $limit);
    $user_ids = $sp->getIds();
    //$user = $_MooClass['MooMySQL']->getAll("select s.*,sf.body, sf.hometownprovince, sf.hometowncity from `{$dbTablePre}members` s left join `{$dbTablePre}memberfield` sf $sql LIMIT 0, 16");
    //note 找不到匹配的结果返回单独提示页面
    if (count($user_ids) == '0') {
        return;
    }
    $sql = "select s.uid,s.nickname,s.birthyear,s.height,s.hometownprovince,s.hometowncity,b.pic_date,b.pic_name from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in (" . implode(',', $user_ids) . ")";
    $user = $_MooClass['MooMySQL']->getAll($sql);
    $recommend_member = $user[0];
    $recommend_member_href = '<a href="http://' . MOOPHP_HOST . '/index.php?n=space&h=viewpro&uid=' . $recommend_member["uid"] . '" style="color:#bd0000; text-decoration:underline" target="_blank">';
    if (!empty($recommend_member["nickname"])) {
        $recommend_member_href .= htmlspecialchars(MooCutstr($recommend_member["nickname"], 10));
    } else {
        $recommend_member_href .= htmlspecialchars($recommend_member["uid"]);
    }
    $recommend_member_href .= "</a>";
    $sql = "select introduce from " . $dbTablePre . "members_introduce where uid = '" . $recommend_member["uid"] . "'";
    $choice = $_MooClass['MooMySQL']->getOne($sql, true);
    ob_start();
    include MooTemplate('public/crontab_index', 'module');
    $content = ob_get_clean();
    //error_log($content, 0);
    //echo $email;
    $return = MooSendMail($email, "真爱一生网推荐会员", $content, "", false, $user_arr['uid']);
}
开发者ID:noikiy,项目名称:zays,代码行数:101,代码来源:index.php

示例7: payment_ifyouaretheone_reg

function payment_ifyouaretheone_reg()
{
    global $_MooClass, $dbTablePre, $userid, $timestamp, $user_arr;
    if ($_POST) {
        $name = safeFilter(MooGetGPC('name', 'string', 'P'));
        $profession = safeFilter(MooGetGPC('profession', 'string', 'P'));
        $mobile = safeFilter(MooGetGPC('mobile', 'string', 'P'));
        $telphone = safeFilter(MooGetGPC('telphone', 'string', 'P'));
        $qq = safeFilter(MooGetGPC('qq', 'string', 'P'));
        $msn = safeFilter(MooGetGPC('msn', 'string', 'P'));
        $email = safeFilter(MooGetGPC('email', 'string', 'P'));
        $lovede = safeFilter(MooGetGPC('lovede', 'string', 'P'));
        $description = safeFilter(MooGetGPC('description', 'string', 'P'));
        $lovede1 = safeFilter(MooGetGPC('lovede1', 'string', 'P'));
        $description1 = safeFilter(MooGetGPC('description1', 'string', 'P'));
        $ip = GetIP();
        $uid = $userid;
        $dateline = time();
        //note 如果用户没有填写爱情宣言或者自我描述
        if ($lovede == $lovede1) {
            $lovede = "";
        }
        if ($description == $description1) {
            $description = "";
        }
        //note 限制爱情宣言和自我描述进库的字数
        $lovede = MooCutstr($lovede, "1000");
        $description = MooCutstr($description, "1000");
        //note 表单每一项都要填写
        if (!empty($name) && !empty($profession) && !empty($mobile) && !empty($lovede) && !empty($description)) {
            $sql = "insert into {$dbTablePre}ifyouaretheone (uid,name,profession,mobile,telphone,qq,msn,email,lovede,description,ip,dateline) \n            values('{$uid}','{$name}','{$profession}','{$mobile}','{$telphone}','{$qq}','{$msn}','{$email}','{$lovede}','{$description}','{$ip}','{$dateline}')";
            $_MooClass['MooMySQL']->query($sql);
            MooMessage("您的注册报名成功!", "index.php", '05');
        } else {
            MooMessage("提交失败,请填写完整!", "index.php?n=payment&h=ifyouaretheone_reg", '02');
        }
    }
    include MooTemplate('public/payment_ifyouaretheone_reg', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:39,代码来源:index_bak.php

示例8: to_send_message

function to_send_message()
{
    global $_MooClass, $dbTablePre, $userid, $user_arr, $memcached, $timestamp, $serverid;
    $and_uuid = isset($_GET['uuid']) ? $_GET['uuid'] : '';
    $uid = isset($_GET['uid']) ? $_GET['uid'] : '';
    if ($uid) {
        $userid = $mem_uid = $memcached->get('uid_' . $uid);
    }
    $uuid = $memcached->get('uuid_' . $userid);
    //$error[] = array("getand_uuid"=>$and_uuid,"getuid"=>$uid,"userid"=>$userid,"mem_uuid"=>$uuid);
    $checkuuid = check_uuid($and_uuid, $userid);
    if (!$checkuuid) {
        $error = "uuid_error";
        echo return_data($error, false);
        exit;
    }
    $user_arr = MooMembersData($userid);
    $contentid = MooGetGPC('s_id', 'integer', 'P');
    //不可给同性别发送消息
    $receive_info = MooMembersData($contentid);
    $receive_gender = $receive_info['gender'];
    if ($user_arr['gender'] == $receive_gender) {
        $err = "不可给同性别发送消息";
        echo return_data($err, false);
        exit;
    }
    //系统管理员权限
    /*$result=$_MooClass['MooMySQL']->getOne("select groupid from web_admin_user where uid='{$serverid}'");
      $groupid=$result['groupid'];
      
      //$GLOBALS['system_admin'] = array(60);
      if(in_array($groupid,$GLOBALS['system_admin'])){
          $serverid=null;
      }*/
    $result = $_MooClass['MooMySQL']->getOne("select groupid from web_admin_user where uid='{$serverid}'");
    $groupid = $result['groupid'];
    if ($serverid && $user_arr['usertype'] != 3) {
        $err = "对不起您不能模拟操作";
        echo return_data($err, false);
        exit;
    }
    if ($serverid && $user_arr['usertype'] == 3 && !in_array($groupid, $GLOBALS['admin_aftersales'])) {
        $err = "对不起您不能模拟操作";
        echo return_data($err, false);
        exit;
    }
    //如果是本站注册会员
    if ($user_arr['usertype'] == 1) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level != 1) {
            //不是高级会员
            if (!checkIsMobileCertical($userid)) {
                //没有通过了手机验证
                $err = "您还没有进行手机验证,请先认证";
                echo return_data($err, false);
                exit;
            } else {
                //if(!checkIsOver($userid)){ //过了试用期
                $err = "只有钻石或高级会员才可以发送电子邮件给对方";
                echo return_data($err, false);
                exit;
                //}
            }
        }
    }
    //print_r($_POST);
    //note s_cid 发送者的权限(回复时才有)
    $s_cid = MooGetGPC('s_cid', 'integer', 'P');
    //echo $s_cid;exit;
    //收件人id
    $sid = $contentid;
    //发件人id
    $mid = $userid;
    ///echo $sid;exit;
    $s_title = MooGetGPC('s_title', 'string', 'P');
    $s_title = rtrim($s_title);
    //对主题字数限制
    $s_title = MooStrReplace(MooCutstr($s_title, 30, $dot = ''));
    $s_content = MooGetGPC('s_content', 'string', 'P');
    //note 特殊字符
    $s_content = rtrim(MooStrReplace(safeFilter($s_content)));
    $send_mymessage = MooGetGPC('send_mymessage', 'integer', 'P');
    $message_back = MooGetGPC('message_back', 'integer', 'P');
    //note 双方屏蔽不给操作
    if (MooGetScreen($mid, $sid)) {
        $err = "因特殊原因,消息发送失败";
        echo return_data($err, false);
        exit;
    }
    if ($mid && $sid && $s_title && $s_content) {
        $m_level = get_userrank($userid);
        //会员等级
        if ($m_level == 2 && $user_arr['usertype'] != 3) {
            //普通会员需要审核(除采集会员之外)
            //if($user_arr['gender'] == 0){	//如果是男方发的,需要审核,0表示
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','0')");
        } else {
            $send_status = $_MooClass['MooMySQL']->query("insert into {$dbTablePre}services (s_cid,s_uid,s_fromid,s_title,s_content,s_time,sid,flag) values ('{$s_cid}','{$sid}','{$mid}','{$s_title}','{$s_content}'," . time() . ",'{$user_arr['sid']}','1')");
        }
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:zays,代码行数:101,代码来源:message.php

示例9: MooGetstoryphoto

.html" target="_blank"><img src="<?php 
    echo MooGetstoryphoto($s['sid'], $s['uid'], 'medium');
    ?>
" class="lazy"  data-original="<?php 
    echo MooGetstoryphoto($s['sid'], $s['uid'], 'medium');
    ?>
" /></a> <span><?php 
    echo $s['name1'];
    ?>
&<?php 
    echo $s['name2'];
    ?>
</span>
                <div class="line_"></div>
                <div class="detail"><?php 
    echo MooCutstr($s['content'], 140);
    ?>
</div>
            </div>
            <?php 
}
?>

        </div>
    </div>
    <div class="footer">
	    <!-- <div style="position:fixed;top:300px;right:20px;"><img src="module/index/templates/default/images/vution/Animated_Xmas-tree-animation.gif" /></div> -->
        <div class="g">品牌:专业婚恋服务&nbsp; 专业:庞大的资深红娘队伍&nbsp; 真实:诚信会员验证体系&nbsp; </div>
        <div class="g">Copyright@<?php 
echo date('Y');
?>
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:indexTest.tpl.php

示例10: MooStrReplace

<dt><strong>内心独白:</strong></dt>
<dt>
<?php 
if (isset($vote_mem['introduce'])) {
    ?>
	<?php 
    if ($vote_mem['uid'] < 1599400) {
        ?>
	   <?php 
        echo MooStrReplace(Moorestr(strip_tags(MooCutstr($vote_mem['introduce'], 500))));
        ?>
	<?php 
    } else {
        ?>
	   <?php 
        echo Moorestr(strip_tags(MooCutstr($vote_mem['introduce'], 500)));
        ?>
	<?php 
    }
}
?>
</dt>
</dl>
</div>
<div class="vote-cnter-bottom"></div>	
</div>	
<!--中间结束-->
<!--右边开始-->
<div class="vote-right">
<div class="vote-right-content">		
<span class="right-title fleft">等您打分的会员</span>
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:vote.tpl.php

示例11: MooCutstr

echo $hot_story['title'];
?>
</h3>
                      <div class="detail">
                          <div class="m_title">
                            <span><?php 
echo $hot_story['name1'];
?>
</span> 与 <span><?php 
echo $hot_story['name2'];
?>
</span> 的爱情故事
                          </div>
                          <p>
                          <?php 
echo MooCutstr($hot_story['content'], 270, "……");
?>
<a target="_blank" href="index.php?n=story&h=content&sid=<?php 
echo $hot_story['sid'];
?>
">
                          [查看详情]</a></p>
                      </div>
                 </div>
				 <div class="clear"></div>
				</div>	
				<div class="storys-box">
				<?php 
foreach ((array) $index_story as $index_storys) {
    ?>
					<div class="singmarry">
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:story_index.tpl.php

示例12: elseif

							<dd><?php 
    if ($send_user1['s_cid'] == 20) {
        ?>
<a href="index.php?n=payment&h=diamond" target="_blank"><img src="module/index/templates/default/images/zuan0.gif" title="钻石会员" alt="钻石会员"/></a><?php 
    } elseif ($send_user1['s_cid'] == 30) {
        ?>
<a href="index.php?n=payment" target="_blank"><img src="module/index/templates/default/images/zuan1.gif" title="高级会员" alt="高级会员"/></a><?php 
    } else {
    }
    $nickname = $send_user1['nickname2'] ? $send_user1['nickname2'] : $send_user1['nickname'];
    if ($nickname) {
        echo MooCutstr($nickname, '10', '');
    } else {
        ?>
会员<?php 
        echo MooCutstr($send_user1['uid'], '10', '');
    }
    ?>
</dd>
							<dd><?php 
    if ($send_user1['birthyear']) {
        echo gmdate('Y', time()) - $send_user1['birthyear'];
        ?>
岁<?php 
    } else {
        ?>
年龄保密<?php 
    }
    ?>
</dd>
						</dl>
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:service_index.tpl.php

示例13: foreach

" width="120" height="150"></div>
          </div>
		  </a>
        </li>
        <?php 
}
?>
      </ul>
    </div>
    <div class="upgradeMember">
      <ul>
	    <?php 
foreach ((array) $textInfo_ as $k_ => $v_) {
    ?>
        <li><span><?php 
    echo MooCutstr(str_replace('您的', '', $v_['content']), 40, '');
    ?>
</span></li>
        <?php 
}
?>
      </ul>
    </div>
  </div>
  <div class="search"> 
    <form id="search" name="search" method="get" action="index.php" onSubmit="return checkSearchForm();">
	<input type="hidden" name="n" value="search">
	<input type="hidden" name="h" value="quick">
	<input name="search_type" type="hidden" value="1">
    <span class="isearch">我要找:</span>
    <select name="gender">
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:index2015.tpl.php

示例14: getcontactme

function getcontactme()
{
    global $_MooClass, $dbTablePre, $userid, $pagesize, $user_arr;
    $pagesize = 4;
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $currenturl2 = preg_replace("/(&page2=\\d+)/", "", $currenturl2);
    $currenturl2 = preg_replace("/(&page3=\\d+)/", "", $currenturl2);
    //note ---------------------等待回应的请求
    //note 获得第几页
    $page = empty($_GET['page']) ? 1 : $_GET['page'];
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    $ret = $_MooClass['MooMySQL']->getAll("SELECT stat,count(*) as c FROM {$dbTablePre}service_contact WHERE you_contact_other = '{$userid}'  and receive_del=0 and send_del=0 group by stat");
    $total = 0;
    $total2 = 0;
    $total3 = 0;
    foreach ($ret as $v) {
        switch ($v['stat']) {
            case 1:
                $total = $v['c'];
                break;
            case 2:
                $total2 = $v['c'];
                break;
            case 3:
                $total3 = $v['c'];
                break;
        }
    }
    //note 查询等待回应的请求
    if ($total) {
        $results = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_contact WHERE you_contact_other = '{$userid}' AND stat = 1 and receive_del=0 and send_del=0  order by sendtime desc LIMIT {$start},{$pagesize}");
        foreach ($results as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $contact = array();
            $send_user1 = leer_send_user1($v['other_contact_you']);
            $send_user2 = leer_send_user2($v['other_contact_you']);
            $contact['l'] = $v;
            $contact['s'] = $send_user1;
            $contact['t'] = $send_user2;
            $contact['t']['introduce'] = trim($contact['t']['introduce']) ? MooCutstr($contact['t']['introduce'], 148, $dot = ' ...') : '无内心独白内容';
            $contacts[$k] = $contact;
        }
    }
    $page2 = empty($_GET['page2']) ? 1 : $_GET['page2'];
    $start2 = ($page2 - 1) * $pagesize;
    if ($total2) {
        $results2 = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_contact WHERE you_contact_other = '{$userid}'  AND stat = 2 and receive_del=0 and send_del=0 order by sendtime desc  LIMIT {$start2},{$pagesize}");
        foreach ($results2 as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $contact = array();
            $send_user1 = leer_send_user1($v['other_contact_you']);
            $send_user2 = leer_send_user2($v['other_contact_you']);
            $contact['l'] = $v;
            $contact['s'] = $send_user1;
            $contact['t'] = $send_user2;
            $contact['t']['introduce'] = trim($contact['t']['introduce']) ? MooCutstr($contact['t']['introduce'], 148, $dot = ' ...') : '无内心独白内容';
            $contacts2[$k] = $contact;
        }
    }
    $page3 = empty($_GET['page3']) ? 1 : $_GET['page3'];
    $start3 = ($page3 - 1) * $pagesize;
    if ($total3) {
        $results3 = $_MooClass['MooMySQL']->getAll("SELECT * FROM {$dbTablePre}service_contact WHERE you_contact_other = '{$userid}' AND stat = 3 and receive_del=0 and send_del=0 order by sendtime desc LIMIT {$start3},{$pagesize}");
        foreach ($results3 as $k => $v) {
            $send_user1 = array();
            $send_user2 = array();
            $contact = array();
            $send_user1 = leer_send_user1($v['other_contact_you']);
            $send_user2 = leer_send_user2($v['other_contact_you']);
            $contact['l'] = $v;
            $contact['s'] = $send_user1;
            $contact['t'] = $send_user2;
            $contact['t']['introduce'] = trim($contact['t']['introduce']) ? MooCutstr($contact['t']['introduce'], 148, $dot = ' ...') : '无内心独白内容';
            $contacts3[$k] = $contact;
        }
    }
    require MooTemplate('public/service_contact_getcontactme', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:83,代码来源:commission.php

示例15: isset

        ?>
女士<?php 
    } else {
        ?>
男士<?php 
    }
    ?>
            

            
                
            </dd>
			 <dd>
                <p class="c999">
                    <?php 
    echo isset($seach['introduce']) && $seach['introduce'] ? Moorestr(MooCutstr($seach['introduce'], 120, $dot = ' ...')) : '无内心独白内容';
    ?>
                </p>
            </dd>
			 <dd class="modalContainer">
			    <a  class="modalLink  bt5"   data-uid="<?php 
    echo $users['uid'];
    ?>
"  href="#modalLeer">送秋波</a>
				<a  class="modalLink  bt55"  data-uid="<?php 
    echo $users['uid'];
    ?>
"  href="#modalLiker">加关注</a>
                <a  class="modalLink  bt555" data-uid="<?php 
    echo $users['uid'];
    ?>
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:search_page_left.tpl.php


注:本文中的MooCutstr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。