View file system/comm_del.php

File size: 405B
<?php

if ($u['access'] > 0) {
    $comm_r = mysql_query("SELECT `id_".$type."` FROM `".$type."_comm` WHERE `id` = '$id'");
    $comm = mysql_fetch_assoc($comm_r);
    if ($comm['id_'.$type]) {
        mysql_query("DELETE FROM `".$type."_comm` WHERE `id` = '$id'");
        redirect('?act=comm&id='.$comm['id_'.$type]);
    } else {
        redirect('?');	}
} else {
    redirect('?');
}

?>