<?php header("Content-type: text/html; charset=utf-8"); session_start(); include_once "../config.php"; include_once ykfile("source/activity_service.php"); $id = $_GET['id']; $activityService = new ActivityService(); //根据id查询到单条的活动对象 $activity = $activityService->get_by_id($id); $page_title = "活动详情"; include_once ykfile("pages/activity/detail.php");
<?php require_once ykfile("source/activity_service.php"); require_once ykfile("source/tag_service.php"); // 判断是否有id 如果有 就是编辑 否则就是添加 $act_id = intval($_GET['act_id']); $activitySer = new ActivityService(); // 获取所有的标签对象 $tagSer = new TagService(); $tag_list = $tagSer->get_all(); $activity = $activitySer->get_by_id($act_id); if ($activity == NULL) { $activity = new ActivityModule(); $activity->type = ActivityModel::type_activity; $activity->author = new UserModel(); } include ykfile('pages/admin/edit_activity.php');
<?php require_once ykfile('source/activity_service.php'); $page_title = "提交活动"; $act_id = intval($_GET['act_id']); // 没有有效的活动ID if ($act_id <= 0) { echo "<script type='text/javascript'>alert('亲,该功能正在月球上开发'); window.location.href='/m/'</script>"; } $actsrv = new ActivityService(); $activity = $actsrv->get_by_id($act_id); if ($activity == NULL) { return; } include ykfile("pages/user/edit_activity.php");