Ejemplo n.º 1
0
    global $admin, $NPDS_Prefix;
    settype($id_del, "integer");
    if ($admin) {
        sql_query("DELETE FROM " . $NPDS_Prefix . "reviews WHERE id='{$id_del}'");
        // commentaires
        if (file_exists("modules/comments/reviews.conf.php")) {
            include "modules/comments/reviews.conf.php";
            sql_query("DELETE FROM " . $NPDS_Prefix . "posts WHERE forum_id='{$forum}' AND topic_id='{$id_del}'");
        }
    }
    redirect_url("reviews.php");
}
settype($op, 'string');
switch ($op) {
    case "showcontent":
        showcontent($id);
        break;
    case "write_review":
        write_review();
        break;
    case "preview_review":
        preview_review($title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id);
        break;
    case "add_reviews":
        send_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id, $asb_question, $asb_reponse);
        break;
    case "del_review":
        del_review($id_del);
        break;
    case "mod_review":
        mod_review($id);
Ejemplo n.º 2
0
function delete_page()
{
    global $out, $pagenum, $langmessage, $selected, $prefix;
    $out .= "<div align=\"center\">\n<h2>{$langmessage['131']}" . $selected['name'] . "?</h2>\n";
    $out .= "<form method=\"post\" action=\"\">\n<fieldset>\n";
    $out .= "<input type=\"hidden\" name=\"link\" value=\"" . $selected['link'] . "\" />\n";
    $out .= "<input type=\"hidden\" name=\"submit\" value=\"Delete Page\" />\n";
    $out .= "<input type=\"submit\" name=\"\" value=\"{$langmessage['136']}\" />\n";
    $out .= "</fieldset></form>\n</div>\n";
    $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"" . $pagenum . "\"");
    if ($row = fetch_array($result)) {
        $out .= showcontent(stripslashes(html_entity_decode($row['content'])));
    } else {
        $out .= "<h2>{$langmessage['116']}</h2>";
    }
}
Ejemplo n.º 3
0
    }
    cpg_error('ACCESS DENIED');
}
function del_comment()
{
    global $prefix, $db, $module_name;
    if (can_admin(strtolower($module_name))) {
        $db->sql_query("DELETE FROM " . $prefix . "_reviews_comments \n\t\tWHERE cid=" . intval($_GET['cid']));
        URL::redirect(URL::index("&amp;rop=showcontent&amp;id=" . intval($_GET['id'])));
    }
    cpg_error('ACCESS DENIED');
}
$rop = isset($_POST['rop']) ? $_POST['rop'] : (isset($_GET['rop']) ? $_GET['rop'] : '');
switch ($rop) {
    case 'showcontent':
        showcontent();
        break;
    case 'write_review':
        write_review();
        break;
    case 'preview_review':
        preview_review();
        break;
    case 'send_review':
        send_review();
        break;
    case 'del_review':
        del_review();
        break;
    case 'mod_review':
        mod_review();
Ejemplo n.º 4
0
function extra($id = 999)
{
    global $prefix, $selected;
    if ($id == 999) {
        $result = dbquery("SELECT * FROM " . $prefix . "paginas WHERE page=\"" . $selected['link'] . "\"");
        $row = fetch_array($result);
        $id = $row['m3'];
        if ($id == 0) {
            return;
        }
    }
    $result = dbquery("select content FROM " . $prefix . "extras WHERE id={$id}");
    if ($row = fetch_array($result)) {
        showcontent(stripslashes(html_entity_decode($row['content'])));
    } else {
        $result = dbquery("select content FROM " . $prefix . "extras WHERE id=1");
        if ($row = fetch_array($result)) {
            showcontent(stripslashes(html_entity_decode($row['content'])));
        }
    }
}
Ejemplo n.º 5
0
}
if (!isset($date)) {
    $date = "";
}
if (!isset($hits)) {
    $hits = "";
}
if (!isset($id)) {
    $id = "";
}
if (strlen($rop) == 1 and ctype_alnum($rop)) {
    reviews($rop, $field, $order);
} else {
    switch ($rop) {
        case "showcontent":
            showcontent($id, $page);
            break;
        case "write_review":
            write_review();
            break;
        case "preview_review":
            preview_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id, $rlanguage);
            break;
        case "" . _YES . "":
            send_review($date, $title, $text, $reviewer, $email, $score, $cover, $url, $url_title, $hits, $id, $rlanguage);
            break;
        case "del_review":
            del_review($id_del);
            break;
        case "mod_review":
            mod_review($id);