Пример #1
0
function deleteComentario($params)
{
    $result = array();
    $okValidacionComentario = true;
    $id_comment = isset($params) ? $params : null;
    if (!$id_comment || $id_comment == false) {
        $result[] = "El comentario no existe.";
        $okValidacionComentario = false;
    }
    if ($okValidacionComentario) {
        $result = delComment($id_comment);
    }
    return $result;
}
Пример #2
0
function delAppAction($type, $typeid)
{
    delFeed($type, $typeid);
    return delComment($type, $typeid);
}
Пример #3
0
<?php

if (isset($_POST['delrating'])) {
    include "addtocomment.php";
    $id_user = $_POST['id_user'];
    $id_articles = $_POST['id_articles'];
    delUserRating($id_user, $id_articles);
    exit;
}
if (isset($_GET['comment']) and !empty($_GET['del'])) {
    include "addtocomment.php";
    delComment($_GET['del']);
}
if (!empty($_POST['rating1'])) {
    include "addtocomment.php";
    $id_articles = $_POST['id_articles'];
    $profile = getProfile($_SESSION['name']);
    $id_user = $profile[0]['id'];
    $user_rating = $_POST['user_rating'];
    setRating($id_articles, $id_user, $user_rating);
}
//rating
include "addtocomment.php";
if (isset($_GET['id']) and isset($_SESSION['name'])) {
    $profile = getProfile($_SESSION['name']);
    $id_user = $profile[0]['id'];
    $id_articles = $_GET['id'];
    $torating = getUserRating($id_user, $id_articles);
    if ($torating) {
        echo "<div align='right'><b>You rating: " . $torating['user_rating'] . "</b></div>";
        echo "<div align='right'><form action='comment.php' method='post'>\n<input type='hidden' name='id_user' value='" . $id_user . "'>\n<input type='hidden' name='id_articles' value='" . $id_articles . "'>\n<input type='submit' name='delrating' value='Delete rating'>\n</form></div>";
Пример #4
0
     editImageTitle();
     break;
 case 'editdesc':
     editImageDesc();
     break;
 case 'savepic':
     savePic();
     break;
 case 'deletepic':
     deletePic($uid);
     break;
 case 'commentadd':
     commentAdd();
     break;
 case 'deletecomment':
     delComment();
     break;
 case 'approvecomment':
     approveComment();
     break;
 case 'unapprovecomment':
     unapproveComment();
     break;
 case 'spamcomment':
     spamComment();
     break;
 case 'editcomment':
     editComment();
     break;
 case "showupload":
     if (!$user->id) {
Пример #5
0
<?php

session_start();
if (!$_SESSION["username"]) {
    $url = $_SERVER['REQUEST_URI'];
    echo "<meta http-equiv=\"refresh\" content=\"0;url=Login.php?url={$url}\">";
}
include 'connect.php';
require 'Header.php';
$username = $_SESSION['username'];
$uid = $_SESSION['id'];
echo "<div class='form'>";
if (isset($_GET['id']) && (isset($_GET['cat']) && isset($_GET['url']))) {
    $cid = $_GET['id'];
    $cat = $_GET['cat'];
    $url = $_GET['url'];
    if (strcmp($cat, 'del') == 0) {
        delComment($uid, $cid, $url);
    } else {
        echo "Something went wrong here :(";
    }
} else {
}
echo "</div>";