Esempio n. 1
0
session_start();
//pub
$pub = "";
//Inclusion connexionBDD
include_once "modele/connexionsql.php";
//Inclusion fonctions SQL
include_once "modele/fonctionsdb.php";
//Inclusion api
include_once "apivariables.php";
//Test si maintenance
if (returnValueFromParam("maintenanceMode") == "true") {
    header("Location: maintenance.php");
}
//Ajouter un commentaire
if (isset($_SESSION["pseudo"]) and isset($_POST["id_billet"]) and isset($_POST["commentaire"])) {
    PostComment($_POST["id_billet"], $_SESSION["pseudo"], $_POST["commentaire"]);
    $published = true;
}
//PRINT COMMENT FORM
if (isset($_SESSION["pseudo"])) {
    //Ranking
    $usercomment = RankingComment($_SESSION["pseudo"]);
    if ($usercomment["write_comment"] == "1") {
        $form = true;
    } else {
        $form = false;
        $error = "<h4>Poster un commentaire :</h4><p><i class=\"fa fa-times\"></i> Vous n'avez pas les permissions requises pour poster un commentaire !</p><br />";
    }
} else {
    $form = false;
    $error = "<h4>Poster un commentaire :</h4><p><i class=\"fa fa-times\"></i> Merci de vous connecter pour pouvoir poster un commentaire !</p><br />";
Esempio n. 2
0
     } else {
         Redirect('../');
     }
     break;
 case 'search':
     $q = urlencode(trim(strip_tags(GetVars('q', 'POST'))));
     Redirect($zbp->searchurl . '?q=' . $q);
     break;
 case 'misc':
     require './function/c_system_misc.php';
     break;
 case 'cmt':
     if (GetVars('isajax', 'POST')) {
         Add_Filter_Plugin('Filter_Plugin_Zbp_ShowError', 'RespondError', PLUGIN_EXITSIGNAL_RETURN);
     }
     PostComment();
     $zbp->BuildModule();
     $zbp->SaveCache();
     if (GetVars('isajax', 'POST')) {
         die;
     } else {
         Redirect(GetVars('HTTP_REFERER', 'SERVER'));
     }
     break;
 case 'getcmt':
     ViewComments((int) GetVars('postid', 'GET'), (int) GetVars('page', 'GET'));
     die;
     break;
 case 'ArticleEdt':
     Redirect('admin/edit.php?' . GetVars('QUERY_STRING', 'SERVER'));
     break;
Esempio n. 3
0
     echo "<br />";
     break;
     // Diaporama sur un album
 // Diaporama sur un album
 case "diapo":
     ViewDiapo($galid, $pos, $pid);
     break;
     // Ecard sur une image
 // Ecard sur une image
 case "ecard":
     PrintFormEcard($galid, $pos, $pid);
     break;
     // Post d'un commentaire
 // Post d'un commentaire
 case "postcomment":
     PostComment($gal_id, $pos, $pic_id, $comm);
     break;
     // Top des commentaires
 // Top des commentaires
 case "topcomment":
     TopCV("comment", $nbtopcomment);
     break;
     // Top des commentaires
 // Top des commentaires
 case "topvote":
     TopCV("vote", $nbtopvote);
     break;
     // Vote pour une image
 // Vote pour une image
 case "vote":
     PostVote($gal_id, $pos, $pic_id, $value);