当前位置: 首页>>代码示例>>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;未经允许,请勿转载。