DCMS | Как убрат
Пожалуста говарите нада каком код удалит для не отправит уведомления на оповешини вот код пожалуста:
<?php
/**
* Вывод части текста
* @param undefined $text
* @param undefined $limit
*
* @return string
*/
function wordtextwrap($text, $limit = 32) {
$rows = explode(" ", strip_tags($text));
if (count($rows) > $limit) {
$text = '';
foreach($rows AS $key => $str) {
$text .= " " . $str;
if ($key >= $limit) {
$text .= '...';
$text .= ' <div class="text-next">••• подробнее</div>';
BREAK;
}
}
}
return $text;
}
function redirect_url($msg = null, $url) {
$_SESSION['message'] = $msg;
header('Location: ' . $url);
exit;
}
/**
* Удаление фотоальбомов
*/
function groups_delete_albums($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_albums WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'albums', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_albums WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'albums', $uid);
}
}
elseif ($type == 'albums') {
$q = mysql_query("SELECT * FROM groups_photos WHERE id_albums = '$uid' AND id_group = '$group_id'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'photo', $post['id_group']);
}
mysql_query("DELETE FROM groups_albums WHERE uid = '$uid' LIMIT 1");
}
elseif ($type == 'photo') {
$photo = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_photos` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_photos` WHERE `hash` = '$photo[hash]' AND `uid` != '$uid'"), 0) == 0) {
@unlink(H.'sys/files/groups/photos/' . $photo['hash'] . '.jpg');
}
mysql_query("DELETE FROM groups_photos WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'photo'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_photo'");
send_tape('albums', $photo['id_group'], $photo['id_albums'], $photo['id_user'], $uid, true, true);
}
}
function groups_delete_videos($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_videos WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_videos($post['uid'], 'video', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_videos WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_videos($post['uid'], 'video', $uid);
}
}
elseif ($type == 'video') {
$video = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_videos` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_videos` WHERE `hash` = '$video[hash]' AND `uid` != '$uid'"), 0) == 0) {
@unlink(H.'sys/files/groups/videos/files/' . $video['hash'] . '.video');
@unlink(H.'sys/files/groups/videos/screen/' . $video['hash'] . '.jpg');
}
mysql_query("DELETE FROM groups_videos WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'video'");
mysql_query("DELETE FROM groups_tape WHERE id_object = '$uid' AND type = 'videos'");
mysql_query("DELETE FROM tape WHERE id_file = '$uid' AND type = 'groups_videos'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_video'");
}
}
function groups_delete_topic($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_topic WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_topic($post['uid'], 'topic', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_topic WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_topic($post['uid'], 'topic', $uid);
}
}
elseif ($type == 'topic') {
$topic = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_topic` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
mysql_query("DELETE FROM groups_topic WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'topic'");
mysql_query("DELETE FROM groups_tape WHERE id_object = '$uid' AND type = 'topic'");
mysql_query("DELETE FROM tape WHERE id_file = '$uid' AND type = 'groups_topic'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_topic'");
}
}
function groups_delete_tape($uid = 0, $type = false, $group_id = 0) {
if ($type == 'group') {
mysql_query("DELETE FROM groups_tape WHERE i
<?php
/**
* Вывод части текста
* @param undefined $text
* @param undefined $limit
*
* @return string
*/
function wordtextwrap($text, $limit = 32) {
$rows = explode(" ", strip_tags($text));
if (count($rows) > $limit) {
$text = '';
foreach($rows AS $key => $str) {
$text .= " " . $str;
if ($key >= $limit) {
$text .= '...';
$text .= ' <div class="text-next">••• подробнее</div>';
BREAK;
}
}
}
return $text;
}
function redirect_url($msg = null, $url) {
$_SESSION['message'] = $msg;
header('Location: ' . $url);
exit;
}
/**
* Удаление фотоальбомов
*/
function groups_delete_albums($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_albums WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'albums', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_albums WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'albums', $uid);
}
}
elseif ($type == 'albums') {
$q = mysql_query("SELECT * FROM groups_photos WHERE id_albums = '$uid' AND id_group = '$group_id'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_albums($post['uid'], 'photo', $post['id_group']);
}
mysql_query("DELETE FROM groups_albums WHERE uid = '$uid' LIMIT 1");
}
elseif ($type == 'photo') {
$photo = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_photos` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_photos` WHERE `hash` = '$photo[hash]' AND `uid` != '$uid'"), 0) == 0) {
@unlink(H.'sys/files/groups/photos/' . $photo['hash'] . '.jpg');
}
mysql_query("DELETE FROM groups_photos WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'photo'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_photo'");
send_tape('albums', $photo['id_group'], $photo['id_albums'], $photo['id_user'], $uid, true, true);
}
}
function groups_delete_videos($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_videos WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_videos($post['uid'], 'video', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_videos WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_videos($post['uid'], 'video', $uid);
}
}
elseif ($type == 'video') {
$video = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_videos` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `groups_videos` WHERE `hash` = '$video[hash]' AND `uid` != '$uid'"), 0) == 0) {
@unlink(H.'sys/files/groups/videos/files/' . $video['hash'] . '.video');
@unlink(H.'sys/files/groups/videos/screen/' . $video['hash'] . '.jpg');
}
mysql_query("DELETE FROM groups_videos WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'video'");
mysql_query("DELETE FROM groups_tape WHERE id_object = '$uid' AND type = 'videos'");
mysql_query("DELETE FROM tape WHERE id_file = '$uid' AND type = 'groups_videos'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_video'");
}
}
function groups_delete_topic($uid = 0, $type = false, $group_id = 0) {
if ($type == 'user') {
$q = mysql_query("SELECT * FROM groups_topic WHERE id_user = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_topic($post['uid'], 'topic', $post['id_group']);
}
}
elseif ($type == 'group') {
$q = mysql_query("SELECT * FROM groups_topic WHERE id_group = '$uid'");
while($post = mysql_fetch_assoc($q)) {
groups_delete_topic($post['uid'], 'topic', $uid);
}
}
elseif ($type == 'topic') {
$topic = mysql_fetch_assoc(mysql_query("SELECT * FROM `groups_topic` WHERE `uid` = '$uid' AND id_group = '$group_id' LIMIT 1"));
mysql_query("DELETE FROM groups_topic WHERE uid = '$uid' LIMIT 1");
mysql_query("DELETE FROM groups_comments WHERE id_object = '$uid' AND type = 'topic'");
mysql_query("DELETE FROM groups_tape WHERE id_object = '$uid' AND type = 'topic'");
mysql_query("DELETE FROM tape WHERE id_file = '$uid' AND type = 'groups_topic'");
mysql_query("DELETE FROM discussions WHERE id_sim = '$uid' AND type = 'groups_topic'");
}
}
function groups_delete_tape($uid = 0, $type = false, $group_id = 0) {
if ($type == 'group') {
mysql_query("DELETE FROM groups_tape WHERE i
а сейчас переведи на русский) ни понял ни чего, из того что ты написал.
DELETED
4 июля 2017, в 20:59
Delete
Пожалуста говарите нада каком код удалит для не отправит уведомления на оповешини вот код пожалуста:
Что прости
Челябинский, какой код нужна убрат для не отправит уведмлени на оповешине
А ты точно русский
НИхера не понятно, пиши на английском