當前位置: 首頁>>代碼示例>>PHP>>正文


PHP mc_get_page_field函數代碼示例

本文整理匯總了PHP中mc_get_page_field函數的典型用法代碼示例。如果您正苦於以下問題:PHP mc_get_page_field函數的具體用法?PHP mc_get_page_field怎麽用?PHP mc_get_page_field使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。


在下文中一共展示了mc_get_page_field函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: edit

 public function edit($id)
 {
     if (is_numeric($id)) {
         if (mc_is_admin() || mc_is_bianji() || mc_author_id($id) == mc_user_id()) {
             $this->page = M('page')->where("id='{$id}'")->order('id desc')->select();
             if (mc_get_page_field($id, 'type') == 'pro') {
                 $this->theme('admin')->display('Publish/edit_pro');
             } elseif (mc_get_page_field($id, 'type') == 'publish' || mc_get_page_field($id, 'type') == 'pending') {
                 $this->theme(mc_option('theme'))->display('Publish/edit');
             } elseif (mc_get_page_field($id, 'type') == 'group') {
                 $this->theme('admin')->display('Publish/edit_group');
             } elseif (mc_get_page_field($id, 'type') == 'article') {
                 $this->theme('admin')->display('Publish/edit_article');
             } elseif (mc_get_page_field($id, 'type') == 'topic') {
                 $this->theme('admin')->display('Publish/edit_topic');
             } elseif (mc_get_page_field($id, 'type') == 'zhongchou') {
                 $this->theme(mc_option('theme'))->display('Publish/edit_zhongchou');
             } else {
                 $this->error('哥們,你放棄治療了嗎?', U('home/index/index'));
             }
         } else {
             $this->error('哥們,你放棄治療了嗎?', U('home/index/index'));
         }
     } else {
         $this->error('哥們,你放棄治療了嗎?', U('home/index/index'));
     }
 }
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:27,代碼來源:IndexController.class.php

示例2: single

 public function single($id = 1)
 {
     if (is_numeric($id)) {
         mc_set_views($id);
         if (mc_option('paixu') != 2) {
             if (mc_get_page_field($id, 'date') <= strtotime("now")) {
                 mc_update_page($id, strtotime("now"), 'date');
             }
         }
         $this->page = M('page')->field('id,title,content,type,date')->where("id='{$id}'")->select();
         $this->theme(mc_option('theme'))->display('Post/single');
     } else {
         $this->error('參數錯誤!');
     }
 }
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:15,代碼來源:IndexController.class.php

示例3: U

    ?>
" data-toggle="modal" data-target="#myModal">
							<i class="glyphicon glyphicon-trash"></i> 刪除
						</button>
						<button class="btn btn-default btn-sm user-ip-false" user-data="<?php 
    echo U('home/perform/ip_false?id=' . $val['id']);
    ?>
" data-toggle="modal" data-target="#myModal2">
							<i class="glyphicon glyphicon-trash"></i> 屏蔽IP並刪除
						</button>
						<?php 
}
?>
					</h4>
					<?php 
echo mc_cut_str(strip_tags(mc_get_page_field($_GET['id'], 'content')), 65);
?>
				</div>
				<div id="user-header-cover"></div>
			</div>
		</div>
	</div>
</div>
<?php 
if (mc_is_admin()) {
    ?>
	<!-- Modal -->
	<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-hidden="true">
		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:31,代碼來源:head-user.php

示例4: pro_down

 public function pro_down($id)
 {
     if (mc_is_admin() || mc_is_bianji()) {
         $pro_id = mc_prev_page_id($id);
         if ($pro_id > 0) {
             $date = mc_get_page_field($pro_id, 'date');
             $page['date'] = $date - 1;
             M('page')->where("id='{$id}' AND type='pro'")->save($page);
         }
         $this->success('操作成功!');
     } else {
         $this->error('請不要放棄治療');
     }
 }
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:14,代碼來源:PerformController.class.php

示例5: mc_get_meta

						<div class="row">
							<div class="col-sm-6 col-md-7 col-lg-8">
								<div class="media">
									<?php 
        $author = mc_get_meta($val['id'], 'author', true);
        ?>
									<div class="media-body">
										<h4 class="media-heading">
											<a href="<?php 
        echo mc_get_url($val['id']);
        ?>
"><span class="wto"><?php 
        echo $val['title'];
        ?>
</span><?php 
        if (mc_get_page_field($val['id'], 'date') > strtotime("now")) {
            ?>
<span class="label label-danger">置頂</span><?php 
        }
        ?>
</a>
										</h4>
										<p class="post-info wto">
											<i class="glyphicon glyphicon-user"></i><a href="<?php 
        echo mc_get_url($author);
        ?>
"><?php 
        echo mc_user_display_name($author);
        ?>
</a>
											<i class="glyphicon glyphicon-time"></i><?php 
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:group.php

示例6: U

		<div class="modal-dialog">
			<div class="modal-content">
				<div class="modal-header">
					
				</div>
				<form role="form" method="post" action="<?php 
    echo U('home/perform/edit_term');
    ?>
">
				<div class="modal-body">
					<div class="form-group">
						<label>
							分類名稱
						</label>
						<input name="title" type="text" class="form-control" value="<?php 
    echo mc_get_page_field($id, 'title');
    ?>
" placeholder="">
					</div>
					<input type="hidden" name="id" value="<?php 
    echo $id;
    ?>
">
				</div>
				<div class="modal-footer">
					<button type="submit" class="btn btn-warning btn-block">
						<i class="glyphicon glyphicon-ok"></i> 保存
					</button>
				</div>
				</form>
			</div>
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:term.php

示例7: mc_get_page_field

    ?>
							<img class="media-object" src="<?php 
    echo $fmimg_args[0];
    ?>
" alt="<?php 
    echo mc_get_page_field($pro_id, 'title');
    ?>
">
						</a>
						<div class="media-body">
							<h4 class="media-heading">
								<a href="<?php 
    echo U('pro/index/single?id=' . $pro_id);
    ?>
"><?php 
    echo mc_get_page_field($pro_id, 'title');
    ?>
</a>
							</h4>
							<span class="btn btn-danger btn-sm">總價:<?php 
    echo mc_total_wish_for($val['id']);
    ?>
 元</span>
							<span class="btn btn-info btn-sm">數量:<?php 
    echo mc_get_meta($val['page_id'], 'number');
    ?>
</span>
							<?php 
    $parameter = mc_get_meta($val['page_id'], 'parameter', false);
    if ($parameter) {
        ?>
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:wish.php

示例8: mc_get_url

    echo mc_get_url($_GET['id']);
    ?>
"><img src="<?php 
    echo $fmimg_args[0];
    ?>
" alt="<?php 
    echo mc_get_page_field($_GET['id'], 'title');
    ?>
"></a>
					<div class="caption">
						<h4>
							<a href="<?php 
    echo mc_get_url($_GET['id']);
    ?>
"><?php 
    echo mc_get_page_field($_GET['id'], 'title');
    ?>
</a>
						</h4>
						<p class="price pull-left">
							<span><?php 
    echo mc_price_now($_GET['id']);
    ?>
</span> <small>元</small>
						</p>
						<?php 
    if (mc_get_meta($_GET['id'], 'kucun') <= 0) {
        ?>
						<button type="button" class="btn btn-default btn-xs pull-right">
							<i class="icon-umbrella"></i> 暫時缺貨
						</button>
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:31,代碼來源:group.php

示例9: review

 public function review($id)
 {
     if (mc_is_admin() || mc_is_bianji()) {
         $type = mc_get_page_field($id, 'type');
         if ($type == 'pending') {
             mc_update_page($id, 'publish', 'type');
             $this->success('審核成功!', U('post/index/single?id=' . $id));
         } else {
             $this->error('未知頁麵類型');
         }
     } else {
         $this->error('請不要放棄治療');
     }
 }
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:14,代碼來源:PerformController.class.php

示例10: mc_get_url

        echo mc_get_url($group_id);
        ?>
"><img src="<?php 
        echo $fmimg_args[0];
        ?>
" alt="<?php 
        echo mc_get_page_field($group_id, 'title');
        ?>
"></a>
					<div class="caption">
						<h4>
							<a href="<?php 
        echo mc_get_url($group_id);
        ?>
"><?php 
        echo mc_get_page_field($group_id, 'title');
        ?>
</a>
						</h4>
						<p class="price pull-left">
							<span><?php 
        echo mc_price_now($group_id);
        ?>
</span> <small>元</small>
						</p>
						<?php 
        if (mc_get_meta($group_id, 'kucun') <= 0) {
            ?>
						<button type="button" class="btn btn-default btn-xs pull-right">
							<i class="icon-umbrella"></i> 暫時缺貨
						</button>
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:31,代碼來源:index.php

示例11: mc_get_url

                ?>
										<?php 
                if ($type == 'pro') {
                    ?>
										<p><a href="<?php 
                    echo mc_get_url($page_id);
                    ?>
"><img src="<?php 
                    echo mc_fmimg($page_id);
                    ?>
"</a></p>
										<?php 
                } else {
                    ?>
										<p><?php 
                    echo mc_cut_str(strip_tags(mc_magic_out(mc_get_page_field($page_id, 'content'))), 250);
                    ?>
</p>
										<?php 
                }
                ?>
									<?php 
            }
            ?>
								<?php 
        } elseif ($key == 'comment' || $key == 'comment2') {
            ?>
								<div class="mb-10"><?php 
            echo mc_magic_out($value);
            ?>
</div>
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:index.php

示例12: mc_get_url

    ?>
">
							</a>
						</div>
						<div class="media-body">
							<h4 class="media-heading mb-10">
								<a href="<?php 
    echo mc_get_url($author);
    ?>
"><?php 
    echo mc_user_display_name($author);
    ?>
</a>
								<span class="label label-default">作者</span>
							</h4>
							<?php 
    echo mc_get_page_field($author, 'content');
    ?>
						</div>
					</div>
					<hr>
					<?php 
    echo W("Comment/index", array($val['id']));
    ?>
				</div>
			</div>
		</div>
	</div>
	<?php 
}
mc_template_part('footer');
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:single.php

示例13: mc_get_meta

						</div>
						<div class="col-sm-8 col-lg-9">
							<div class="form-group">
								<label>
									標題
								</label>
								<input name="title" type="text" class="form-control" placeholder="" value="">
							</div>
						</div>
					</div>
					<div class="form-group">
						<label>
							主題內容
						</label>
						<textarea name="content" class="form-control" rows="3"><?php 
if ($_GET['wish'] && mc_get_page_field($_GET['group'], 'type') == 'pro') {
    ?>
<h4 class="mb-20">我為什麽想要這件商品</h4><p>寫下自己需要這款商品的原因,大家支持你完成這個心願後,你會如何回報大家。寫的越詳細,心願就越容易實現哦。</p><?php 
}
?>
</textarea>
					</div>
					<div class="form-group">
						<label>
							收貨信息 - 心願達成後,我們會發貨到以下地址
						</label>
						<div class="row">
							<div class="col-sm-4">
								<input type="text" name="buyer_name" class="form-control" placeholder="收貨人姓名" value="<?php 
echo mc_get_meta(mc_user_id(), 'buyer_name', true, 'user');
?>
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:31,代碼來源:add_post.php

示例14: mc_get_page_field

">
					<?php 
        echo mc_get_page_field($parent, 'title');
        ?>
				</a>
			</li>
			<?php 
    }
    ?>
			<li>
				<a href="<?php 
    echo U('pro/index/term?id=' . $term_id);
    ?>
">
					<?php 
    echo mc_get_page_field($term_id, 'title');
    ?>
				</a>
			</li>
			<li class="active hidden-xs">
				<?php 
    echo $val['title'];
    ?>
			</li>
		</ol>
	</div>

	<div id="single-top">
		<div class="container">
			<div class="row f-detail">
				<div class="col-sm-6" id="pro-index-tl">
開發者ID:dalinhuang,項目名稱:shouzhangmall,代碼行數:31,代碼來源:single.php

示例15: mc_get_url

    echo mc_get_url($val['id']);
    ?>
"><span class="wto"><?php 
    echo $val['title'];
    ?>
</span><?php 
    if ($val['date'] > strtotime("now")) {
        ?>
<span class="label label-danger">置頂</span><?php 
    }
    ?>
</a>
										</h4>
										<p class="post-info wto">
											<i class="glyphicon glyphicon-user"></i> <?php 
    $type = mc_get_page_field($val['id'], 'type');
    if ($type == 'pro') {
        $type_name = '<a class="pull-left">商品</a>';
    } elseif ($type == 'group') {
        $type_name = '<a class="pull-left">版塊</a>';
    } elseif ($type == 'pending') {
        $type_name = '<a class="pull-left">主題-待審</a>';
    } elseif ($type == 'article') {
        $type_name = '<a class="pull-left">新聞</a>';
    } else {
        $type_name = '<a class="pull-left">主題</a>';
    }
    echo $type_name;
    ?>
											<i class="glyphicon glyphicon-time"></i><?php 
    echo date('Y-m-d H:i:s', mc_get_meta($val['id'], 'time'));
開發者ID:xiaowei521,項目名稱:vamshop,代碼行數:31,代碼來源:pages.php


注:本文中的mc_get_page_field函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。