本文整理汇总了PHP中comment::create_comment方法的典型用法代码示例。如果您正苦于以下问题:PHP comment::create_comment方法的具体用法?PHP comment::create_comment怎么用?PHP comment::create_comment使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类comment
的用法示例。
在下文中一共展示了comment::create_comment方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: htmlentities
<?php
include_once '../includes/core/init.inc.php';
//Include necessary files
$layout_context = "public";
include "../includes/layouts/header.php";
utility::find_selected_content(true);
if ($current_page && isset($_POST['author'])) {
comment::create_comment();
}
?>
<div id="content-wrap">
<?php
include "../includes/layouts/public_navigation.php";
?>
<div id = "main">
<?php
if ($current_page) {
?>
<?php
$comment_set = comment::find_coments_by_page($current_page['id']);
?>
<div class="view-content">
<h1> <?php
echo htmlentities($current_page["menu_name"]);
?>
示例2: htmlentities
}
break;
case 'page':
if (isset($_POST['page_id']) && $_POST['page_id'] != 0) {
//update
post::update_page($_POST['title'], htmlentities($_POST["content_code"]), $_POST["status"], $_POST['page_id']);
header('Location: index.php?p=edit_page&id=' . $_POST["page_id"]);
} else {
//insert
$post_id = post::create_page($_POST["title"], $_POST["status"], htmlentities($_POST["content_code"]));
header('Location: index.php?p=edit_page&id=' . $post_id);
}
break;
case 'comment':
//létrehozunk egy új commentet
comment::create_comment(nl2br($_POST["com_content"]), $_POST["post_id"]);
header("Location: index.php?p=view_post&id=" . $_POST["post_id"]);
break;
case 'media':
//új kép feltöltése
if (!empty($_FILES['image'])) {
$upload = Upload::factory('easyaccessblog/' . $user->get_user_name() . '/uploads');
$upload->file($_FILES['image']);
//var_dump($_FILES);
$validation = new validation();
$upload->callbacks($validation, array('check_name_length'));
$results = $upload->upload();
$media_id = media::create_media($results);
header("Location: index.php?p=images");
//var_dump($results);
}