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


PHP MooTemplate函数代码示例

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


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

示例1: hnintro_index

function hnintro_index()
{
    if (empty($_GET['hnid'])) {
        $hnid = '';
    } else {
        $hnid = (int) $_GET['hnid'];
    }
    if ($hnid < 1 || $hnid > 14) {
        $hnid = 1;
    }
    include MooTemplate('public/hnintroduce_index', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:12,代码来源:index.php

示例2: loveing_hntesta

function loveing_hntesta()
{
    //$test_lists = get_test_lists(1);
    $test = get_test_one(1);
    if ($test['num'] == $test['count']) {
        $tc_id = $test['tc_id'];
        unset($test);
        loveing_result($tc_id);
        exit;
    }
    //echo 'aaaaaaaaaaaaaaaaa';
    include MooTemplate('public/loveing_hntesta', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:13,代码来源:index.php

示例3: company

function company()
{
    global $cooperation_config, $user_arr, $userid, $memcached;
    $cooperation = MooGetGPC('cooptype', 'integer', 'G');
    $cooperation = empty($cooperation) ? 5 : $cooperation;
    $cooperation = array_key_exists($cooperation, $cooperation_config) ? $cooperation : 5;
    $disabled = '';
    $user_arr = array();
    $seccode = md5(uniqid(rand(), true));
    MooSetCookie('seccode', $seccode, 3600, '');
    $session_seccode = $memcached->set($seccode, '', 0, 300);
    require MooTemplate('public/cooperation', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:13,代码来源:index.php

示例4: show_message

/**
 * 提示信息
 * 描述:例如用户在登录的用户名为空就进入一个提示页面
 * @param string $str 提示页面显示的内容
 * @param string $url 提示信息返回网址
 */
function show_message($str, $url)
{
    if (!empty($str)) {
        $notice = $str;
    } else {
        $notice = "没有提示信息";
    }
    //notice 如果url为空返回首页
    if (empty($url)) {
        $notice = "返回地址为空";
        $url = "index.php";
    }
    require MooTemplate("public/index_showmessage", 'module');
    exit;
}
开发者ID:noikiy,项目名称:zays,代码行数:21,代码来源:function.php

示例5: video_show

function video_show()
{
    global $_MooClass, $_MooCookie, $dbTablePre, $userid;
    $val = MooGetGPC('val', 'integer', 'G');
    $tmp_order = isset($_MooCookie['tmp_order']) ? $_MooCookie['tmp_order'] : null;
    if (!empty($tmp_order)) {
        $tmporder_sql = "and tmp_order={$tmp_order}";
    } else {
        $tmporder_sql = null;
    }
    $user_pic = $_MooClass['MooMySQL']->getOne("SELECT count(*) as c FROM {$dbTablePre}pic WHERE isimage='0' and uid='{$userid}'");
    $sql = "SELECT * FROM {$dbTablePre}tmp WHERE uid='{$userid}' and staus='0' " . $tmporder_sql . " order by tmp_id desc ";
    $rs = $_MooClass['MooMySQL']->getAll($sql);
    $flash_pic = $rs ? $rs : "";
    $acc_pic = $_MooClass['MooMySQL']->getOne("select  mainimg from {$dbTablePre}members_base where uid='{$userid}'", true);
    //取出形象照 改变形象照的操作状态
    $acc_pic = $acc_pic['mainimg'];
    include MooTemplate('public/myaccount_video_ajax', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:19,代码来源:ajax.php

示例6: index_index

function index_index()
{
    global $_MooClass, $dbTablePre, $userid, $memcached;
    $uid = MooGetGPC('uid', 'integer');
    $puid = MooGetGPC('puid', 'integer');
    if (!$uid) {
        if (!$userid) {
            MooMessage('没有找到此会员', 'register.html');
        } else {
            MooMessage('没有找到此会员', 'index.php?n=search');
        }
    }
    if (MOOPHP_ALLOW_FASTDB) {
        $user = MooFastdbGet('members', 'uid', $uid);
        $user = array_merge($user, MooFastdbGet('memberfield', 'uid', $uid));
        $c = MooFastdbGet('choice', 'uid', $uid);
    } else {
        $user = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}members where uid='{$uid}'");
        $user2 = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}memberfield where uid='{$uid}'");
        $user = array_merge($user, $user2);
        unset($user2);
        $c = $_MooClass['MooMySQL']->getOne("SELECT * FROM {$dbTablePre}choice as mf WHERE uid='{$uid}'");
    }
    //$tuijian=$_MooClass['MooMySQL']->getAll("select * from {$dbTablePre}members where gender='$user[gender]' and is_vote='1' order by uid limit 7");
    $en_year = $user['birthyear'];
    $st_year = $en_year - 2;
    $en_year += 2;
    $sql_new = "SELECT uid,nickname,gender,birthyear,mainimg,images_ischeck FROM {$dbTablePre}members where birthyear between {$st_year} and {$en_year} and gender='{$user['gender']}' and images_ischeck=1 and is_lock=1 order by regdate desc limit 6";
    $tuijian = $_MooClass['MooMySQL']->getAll($sql_new);
    if (!$user) {
        if (!$userid) {
            MooMessage('没有您查看的会员', 'register.html');
        } else {
            MooMessage('没有您查看的会员', 'index.php?n=search');
        }
    } else {
        MooSetCookie('puid', $puid, time() + 3600, '');
        include MooTemplate('public/recommend_index', 'module');
    }
}
开发者ID:noikiy,项目名称:zays,代码行数:40,代码来源:index.php

示例7: black_member

function black_member()
{
    global $_MooClass, $dbTablePre, $timestamp, $user_arr;
    $is_action = MooGetGPC("is_post", "string", 'G');
    if ($is_action == "add") {
        $black_uid = MooGetGPC("black_uid", 'integer', 'P');
        $uid = 0;
        if ($user_arr['uid'] != $black_uid) {
            if ($black_uid) {
                $uid = $_MooClass['MooMySQL']->getOne("SELECT uid FROM {$dbTablePre}members WHERE uid='{$black_uid}' LIMIT 1 ");
                $uid = $uid['uid'];
            } else {
                $msg = '没有此会员,请确保您输入的会员ID存在。';
            }
            if ($uid) {
                $_MooClass['MooMySQL']->query("INSERT INTO {$dbTablePre}screen set uid='{$user_arr['uid']}',mid='{$black_uid}'");
                $msg = '成功将会员(ID:' . $uid . ')加入黑名单。';
            }
        } else {
            $msg = '你不能将自己加到黑名单!';
        }
        MooMessage($msg, 'index.php?n=service&h=black');
    }
    if ($is_action == "delblack") {
        $del_id_arr = MooGetGPC('id', 'string', 'P');
        if (empty($del_id_arr)) {
            MooMessage('请选择要删除的内容', 'javascript:history.go(-1);');
        }
        if (!empty($del_id_arr)) {
            $del_id_list = implode(',', $del_id_arr);
            $sql = "DELETE FROM {$dbTablePre}screen WHERE mid IN({$del_id_list})";
            $_MooClass['MooMySQL']->query($sql);
        }
        MooMessage("删除成功", 'index.php?n=service&h=black', '05');
    }
    $pagesize = 4;
    //note 获得当前url
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    //note 获得第几页
    $page = max(1, intval($_GET['page']));
    //note limit查询开始位置
    $start = ($page - 1) * $pagesize;
    $query = $_MooClass['MooMySQL']->getOne("SELECT count(1) as c FROM {$dbTablePre}screen where uid='{$user_arr['uid']}'");
    $total = $query['c'];
    $sql = "SELECT * FROM {$dbTablePre}screen where uid='{$user_arr['uid']}' LIMIT {$start},{$pagesize}";
    $black_uid = $_MooClass['MooMySQL']->getAll($sql);
    $page_list = multimail($total, $pagesize, $page, $currenturl2);
    require MooTemplate('public/service_black_list', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:50,代码来源:index.bak.php

示例8: register_incenter

function register_incenter()
{
    include MooTemplate('public/register_incenter', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:4,代码来源:index.php

示例9: 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

示例10: date

			<li><a href="story.html" target="_blank">成功故事</a>|</li>
			<li><a href="diamond.html" target="_blank">汇款信息</a></li>
		</ul>
	</div>

	<p>Copyright 2006-<?php 
echo date('Y');
?>
 真爱一生网.All Right Reserved.皖ICP备14002819</p>
  
</div><!--foot end-->
<?php 
if ($GLOBALS['userid'] && !in_array(MooGetGPC('h', 'string'), array('return', 'pay', 'picflash', 'makepic', 'history', 'chat')) && $_GET['n'] != 'register') {
    ?>
	<?php 
    include MooTemplate('system/rightbottom', 'public');
}
?>


<!--登录模态框-->
<div class="modal fade" id="myModal" tabindex="0" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false" >
  <div class="modal-dialog">
	<div class="modal-content">
	  <div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
		<h5 class="modal-title" id="myModalLabel">登录真爱一生网,您将获取更多会员的征婚信息和更多的会员关注 </h5>
	  </div>
	  <div class="modal-body">
			<div class="login-box">
				<form id="loginform" name="loginform" action="index.php?n=index&h=submit" method="post" onsubmit="return checkLoginForm();">
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:space_footer.tpl.php

示例11: index_add_vip

function index_add_vip()
{
    global $_MooClass, $user_arr;
    if (isset($user_arr['s_cid'])) {
        $back_url = 'index.php?n=index&h=add_vip&s_cid=' . $user_arr['s_cid'];
    } else {
        $back_url = 'index.php?n=index&h=add_vip';
    }
    if (!$user_arr['s_cid']) {
        header("location:index.php?n=login&back_url=" . urlencode($back_url));
    } else {
        $s_cid = MooGetGPC('s_cid', 'int', 'R');
    }
    require MooTemplate('public/add_vip', 'module');
}
开发者ID:noikiy,项目名称:zays,代码行数:15,代码来源:testindex.php

示例12: delmessage

/**
 * 删除数据提醒页面
 *
 * @param string $content 提示内容
 * @param integer $button 按钮上的文本
 * @param integer $url 点击按钮转向的URL
 */
function delmessage($content, $button, $url)
{
    //提示消息
    $prompt['content'] = $content;
    $prompt['button'] = $button;
    $prompt['url'] = $url;
    require MooTemplate('public/service_email_remove', 'module');
    exit;
}
开发者ID:noikiy,项目名称:zays,代码行数:16,代码来源:function.php

示例13: basic_search_page


//.........这里部分代码省略.........
            $isdispmore = true;
        }
    }
    if (is_array($marriage) && !empty($marriage) && !in_array('0', $marriage)) {
        $cond[] = array('marriage', implode(' | ', $marriage));
    }
    if (is_array($salary) && !empty($salary) && !in_array('0', $salary)) {
        $cond[] = array('salary', implode(' | ', $salary));
    }
    if (is_array($education) && !empty($education) && !in_array('0', $education)) {
        $cond[] = array('education', implode(' | ', $education));
    }
    if ($height1 || $height2) {
        if ($height1 == 0) {
            $cond_height1 = 154;
        } else {
            $cond_height1 = $height1;
        }
        if ($height2 == 0) {
            $cond_height2 = 201;
        } else {
            $cond_height2 = $height2;
        }
        $cond[] = array('height', array($cond_height1, $cond_height2), false);
    }
    $sortway = MooGetGPC('sortway');
    $sort_str = getSortsStr($sortway, $cond);
    //$rs = $cl -> getResult($cond,$limit,$sort_str);
    $rs = sphinx_search($index, $cond, $sort_str, $page, $pagesize);
    $total = 0;
    if (!$rs || is_array($rs) && empty($rs)) {
        //没有结果
        //MooMessage('您指定的搜索不存在或已过期', 'index.php?n=search', '03');
        include MooTemplate('public/search_error', 'module');
        exit;
    } else {
        $data = $rs['user'];
        $total = $rs['total'];
        if ($total > 600) {
            $total = 600;
        }
        $user_list = implode(',', $data);
        if (empty($data)) {
            //MooMessage('您指定的搜索不存在或已过期', 'index.php?n=search', '03');
            include MooTemplate('public/search_error', 'module');
            exit;
        } else {
            $user = array();
            $sortway = isset($_GET['sortway']) ? $_GET['sortway'] : '1';
            $sql = "select s.*,b.mainimg from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in ({$user_list})";
            //echo $sql;
            $user = $_MooClass['MooMySQL']->getAll($sql);
        }
        //会员基本信息补充
        if (isset($user) && $user) {
            $user = userbasicadd($user);
            //排序
            $tmp_user = array();
            foreach ($data as $k => $v) {
                foreach ($user as $key => $val) {
                    if ($v == $val['uid']) {
                        $tmp_user[] = $user[$key];
                        break;
                    }
                }
            }
开发者ID:noikiy,项目名称:zays,代码行数:67,代码来源:basic_search.php

示例14: MooTemplate

    }
    ?>
<span class="r-title">音乐</span></div>
					<div class="rightbox-in"><audio autoplay controls loop src="<?php 
    echo MOOPHP_HOST . '/' . $music_url;
    ?>
">您的浏览器不支持播放</audio></div>						
				</div>
				<?php 
}
?>

			</div><!--c-right end-->
			
			<?php 
include MooTemplate('public/space_leftmenu_new', 'module');
?>
			<div class="clear"></div>
		</div><!--content end-->
		
	</div><!--center end-->
	</div>
	
	<?php 
include MooTemplate('public/space_footer', 'module');
?>
	<!--[if lte IE 6]>
	<script type="text/javascript" src="./public/default/js/bootstrap-ie.js"></script>
	<![endif]-->
</body>
</html>
开发者ID:noikiy,项目名称:zays,代码行数:31,代码来源:space_colorzone.tpl.php

示例15: quick_search_page1

/**
 * 新快速查询
 * 采用sphinx查询
 * @author likefei
 * @date 2011-11-14
 */
function quick_search_page1($gender, $age_start, $age_end, $work_province, $work_city, $marriage, $salary, $education, $height1, $height2)
{
    global $_MooClass, $dbTablePre;
    global $user_arr, $userid, $last_login_time, $isdelcond, $isselectarea, $isdispmore, $isresult;
    $currenturl = 'http://' . $_SERVER['SERVER_NAME'] . ':' . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
    $currenturl2 = preg_replace("/(&page=\\d+)/", "", $currenturl);
    $pagesize = 12;
    $page = 1;
    if (isset($_GET['page']) && $_GET['page']) {
        $page = $_GET['page'];
    }
    $offset = ($page - 1) * $pagesize;
    $blacklist = BlackList();
    $index = 'members_women';
    if ($gender == 0) {
        $index = 'members_man';
    }
    if ($age_start || $age_end) {
        if ($age_start == 0) {
            $age_start = 18;
        }
        if ($age_end == 0) {
            $age_end = 99;
        }
    }
    //	$sort_str = 'city_star desc,s_cid asc,@weight desc,city desc,province asc';
    //	$sortway = '1';
    //	if(isset($_GET['sortway']) && $_GET['sortway'] == '2'){
    //		//note 最新注册
    //		$sortway = '2';
    //		$sort_str = 'regdate desc,city_star desc,s_cid asc,@weight desc,city desc';
    //	}elseif(isset($_GET['sortway']) && $_GET['sortway'] == '3'){
    //		//note 诚信等级
    //		$sortway = '3';
    //		$sort_str = 'certification desc,city_star desc,s_cid asc,@weight desc,city desc';
    //	}
    //
    $cond[] = array('is_lock', '1', false);
    //if($photo) $cond[] = array('images_ischeck','1',false);
    $cond[] = array('usertype', '1', false);
    if (is_array($blacklist) && !empty($blacklist)) {
        $cond[] = array('@id', implode('|', $blacklist), true);
    }
    if ($age_start && $age_end) {
        $year = date('Y', time());
        $cond[] = array('birthyear', array($year - $age_end, $year - $age_start), false);
    }
    if ($work_province) {
        $cond[] = array('province', $work_province, false);
    } elseif (isset($user_arr['province']) && $user_arr['province'] && !$work_city) {
        $cond[] = array('province', $user_arr['province'], false);
    }
    if ($work_city) {
        $cond[] = array('city', $work_city, false);
    } elseif (isset($user_arr['city']) && $user_arr['city'] && !$work_province) {
        $cond[] = array('city', $user_arr['city'], false);
    }
    $dispmore = false;
    if ($work_province || $work_city) {
        $isselectarea = true;
        $isdispmore = false;
        $dispmore = MooGetGPC('dm');
        if ($dispmore) {
            $isdispmore = true;
        }
    }
    $sortway = MooGetGPC('sortway');
    $sort_str = getSortsStr($sortway, $cond);
    $rs = sphinx_search($index, $cond, $sort_str, $page, $pagesize);
    if (!$rs || is_array($rs) && empty($rs)) {
        //没有结果
        //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
        include MooTemplate('public/search_error', 'module');
        exit;
    } else {
        $data = $rs['user'];
        $total = $rs['total'];
        if ($total > 600) {
            $total = 600;
        }
        $user_list = implode(',', $data);
        if (empty($data)) {
            //MooMessage("您指定的搜索不存在或已过期", "index.php?n=search", '03');
            include MooTemplate('public/search_error', 'module');
            exit;
        } else {
            $user = array();
            $sortway = isset($_GET['sortway']) ? $_GET['sortway'] : '1';
            $sql = "select s.*,b.mainimg,b.showinformation_val from `{$dbTablePre}members_search` s left join `{$dbTablePre}members_base` b on s.uid=b.uid where s.uid in ({$user_list})";
            $user = $_MooClass['MooMySQL']->getAll($sql);
            $sql = "select lastvisit from web_members_login where uid in ({$user_list})";
            $user_lastvisit = $_MooClass['MooMySQL']->getAll($sql);
            foreach ($user_lastvisit as $key => $val) {
                $user[$key]['lastvisit'] = $val['lastvisit'];
//.........这里部分代码省略.........
开发者ID:noikiy,项目名称:zays,代码行数:101,代码来源:index.php


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