當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。