Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
Вообще нашел раскодированный вариан но код кривой кто-то может перевести его в нормальный вид ?
<?php
// RSS Grabber 3.6.3 Andersoni
if (!defined('DATALIFEENGINE') AND !LOGED_IN) {
die("Hacking attempt!");
}
@ini_set('memory_limit', "64M");
@set_time_limit(0);
@ini_set('max_execution_time', 0);
@ini_set('2048M');
@ini_set('output_buffering', 'off');
@ob_end_clean();
clearstatcache();
ob_implicit_flush(TRUE);
$module_info = array(
'name' => 'RSS Grabber',
'version' => '3.6.4'
);
require_once ENGINE_DIR . '/inc/plugins/core.php';
require_once ENGINE_DIR . '/classes/templates.class.php';
require_once ENGINE_DIR . '/classes/parse.class.php';
include_once ENGINE_DIR . '/classes/rss.class.php';
$parse = new ParseFilter(array() , array() , 1, 1);
$tpl = new dle_template();
$tpl->dir = ENGINE_DIR . '/inc/plugins/templates/';
require_once ENGINE_DIR . '/inc/plugins/rss.classes.php';
require_once ENGINE_DIR . '/inc/plugins/rss.functions.php';
require_once ENGINE_DIR . '/inc/plugins/rss.parser.php';
@include (ENGINE_DIR . '/data/rss_config.php');
if ($_REQUEST['action'] != '') {
$action = $_REQUEST['action'];
}
else {
$action = '';
}
if ($_REQUEST['subaction'] != '') {
$subaction = $_REQUEST['subaction'];
}
else {
$subaction = '';
}
if ($_REQUEST['id'] != '') {
$id = intval($_REQUEST['id']);
}
else {
$id = '';
}
if (($action == 'channel') and ($subaction == 'add')) {
echoheader('', '');
opentable('Добавление новой RSS ленты');
$tpl->load_template('rss_addchannel.tpl');
$tpl->set('{title}', '');
$tpl->set('{category}', categorynewsselection(1, 0));
$tpl->set('{address}', '');
$tpl->set('{date-format}', gen_date_format($config_rss['date']));
$tpl->set('{load-images}', yesno($config_rss['down_image']));
$tpl->set('{hide}', yesno($config_rss['hide']));
$tpl->set('{leech}', yesno($config_rss['leech']));
$tpl->set('{thumb-images}', yesno($config_rss['cat']));
$tpl->set('{allow-mod}', yesno($config_rss['allow-mod']));
$tpl->set('{allow-main}', yesno($config_rss['allow-main']));
$tpl->set('{allow-comm}', yesno($config_rss['allow-comm']));
$tpl->set('{allow-rate}', yesno($config_rss['allow-rate']));
$tpl->set('{allow-full}', yesno($config_rss['allow-full']));
$tpl->set('{allow-auto}', yesno($config_rss['allow-auto']));
$tpl->set('{allow-water}', yesno($config_rss['allow-water']));
$tpl->set('{clear-short}', yesno($config_rss['clear-short']));
$tpl->set('{short-images}', yesno($config_rss['short-images']));
$tpl->set('{short-full}', yesno($config_rss['short-full']));
$tpl->set('{dop-watermark}', yesno($config_rss['dop-watermark']));
$tpl->set('{null}', yesno($config_rss['null']));
$tpl->set('{text-url}', yesno($config_rss['text-url']));
$tpl->set('{x}', gen_x($config_rss['x']));
$tpl->set('{y}', gen_y($config_rss['y']));
$tpl->set('{show_autor}', yesno($config_rss['show_autor']));
$tpl->set('{show_tegs}', yesno($config_rss['show_tegs']));
$tpl->set('{show_date}', yesno($config_rss['show_date']));
$tpl->set('{show_code}', yesno($config_rss['show_code']));
$tpl->set('{show_f}', yesno($config_rss['show_f']));
$tpl->set('{proxy}', yesno('no'));
$tpl->set('{start-template}', "<div id='news-id-{skip}'>{get}</div>");
$tpl->set('{delate}', '');
$tpl->set('{inser}', '');
$tpl->set('{cookies}', '');
$tpl->set('{keywords}', '');
$tpl->set('{xdescr}', '');
$tpl->set('{stkeywords}', '');
$tpl->set('{date}', '');
$tpl->set('{start}', '');
$tpl->set('{finish}', '');
$tpl->set('{groups}', get_groups(explode(',', $config_rss['reg_group'])));
$tpl->set('{Autors}', '');
$tpl->set('{ful-start}', "<div id='news-id-{skip}'>{get}</div>");
$tpl->set('{start-title}', '');
$tpl->set('{s-title}', '');
$tpl->set('{end-title}', '');
$tpl->set('{start-short}', "<div id='news-id-{skip}'>{get}</div>");
$tpl->set('{end-short}', yesno('no'));
$tpl->set('{sart-link}', '');
$tpl->set('{end-link}', yesno('no'));
$tpl->set('{sart-cat}', '');
$tpl->set('{full-link}', '');
$tpl->set('{so}', '');
$tpl->set('{po}', '');
$tpl->copy_template = '<form method="post"><input type="hidden" name="action" value="channel" /><input type="hidden" name="subaction" value="doadd" />' . $tpl->copy_template . '
<input align="left" type="submit" value=" Сохранить " >
<input type="button" value=" Выйти " onClick="document.location.href = \'' . $PHP_SELF . '?mod=rss\'" /></form>';
$tpl->compile('rss');
echo $tpl->result['rss'];
closetable();
echofooter();
return 1;
}
if (($action == 'channel') and ($subaction == 'doadd')) {
$stop = false;
$rss_url = stripslashes($_POST['rss_url']);
if ($_POST['category'] != '') {
$category = $db->safesql(implode(',', $_POST['category']));
}
else {
$category = '0';
}
$allow_more = intval($_POST['allow_more']);
$allow_mod = intval($_POST['allow_mod']);
$allow_main = intval($_POST['allow_main']);
$allow_comm = intval($_POST['allow_comm']);
$allow_rate = intval($_POST['allow_rate']);
$load_images = intval($_POST['load_img']);
$thumb_images = intval($_POST['thumb_img']);
$allow_watermark = intval($_POST['allow_watermark']);
$date_format = intval($_POST['news_date']);
$ctp = intval($_POST['so']) . '=' . intval($_POST['po']);
$dop_nast = intval($_POST['dop_watermark']) . '=' . intval($_POST['text_url']) . '=' . intval($_POST['proxy']) . '=' . intval($_POST['x']) . '=' . intval($_POST['y']) . '=' . intval($_POST['show_autor']) . '=' . intval($_POST['show_tegs']) . '=' . intval($_POST['show_date']) . '=' . intval($_POST['show_code']) . '=' . intval($_POST['show_f']) . '=' . intval($_POST['null']);
$full_link = stripslashes($_POST['full_link']);
$short_story = intval($_POST['clear_short']) . '=' . intval($_POST['short_im']) . '=' . intval($_POST['short_full']);
$start_template = $db->safesql($_POST['start_template']);
$finish_template = $db->safesql($_POST['finish_template']);
$start = $db->safesql(str_replace('
', '|', $_POST['start']));
$finish = $db->safesql(str_replace('
', '|', $_POST['finish']));
$delate = $db->safesql(str_replace('
', '|', $_POST['delate']));
$inser = $db->safesql(str_replace('
', '|', $_POST['inser']));
$ful_start = $db->safesql($_POST['ful_start']);
$ful_end = $db->safesql($_POST['ful_end']);
$start_title = $db->safesql($_POST['start_title']);
$end_title = $db->safesql($_POST['s_title']) . '==' . $db->safesql($_POST['end_title']);
$start_short = $db->safesql($_POST['start_short']);
$end_short = intval($_POST['end_short']) . '=' . intval($_POST['hide']) . '=' . intval($_POST['leech']);
$sart_link = $db->safesql($_POST['sart_link']);
$end_link = $db->safesql($_POST['end_link']);
$sart_cat = $db->safesql($_POST['sart_cat']);
$end_cat = $db->safesql($_POST['end_cat']);
$xdescr = $db->safesql($_POST['rss_xdescr']);
$date = $db->safesql(trim($_POST['date']));
$cookies = $db->safesql(str_replace('
', '|', $_POST['cookies']));
$keywords = $db->safesql(str_replace('
', '|', $_POST['keywords']));
$stkeywords = $db->safesql(str_replace('
', '|', $_POST['stkeywords']));
if ($_POST['groups'] != '') $autor_grups = implode(',', $_POST['groups']);
$Autors = $db->safesql(str_replace('
', '|', $_POST['Autors'])) . '=' . $autor_grups;
$proxy = '';
if (trim($rss_url) == '') {
msg('Информация', 'Информация', 'Необходимо указать URL !', $PHP_SELF . '?mod=rss&action=channel&subaction=add');
return 1;
}
if (!(ereg('http://', $rss_url))) {
msg('Информация', 'Информация', 'Неверно указана ссылка на канал!', $PHP_SELF . '?mod=rss&action=channel&subaction=add');
return 1;
}
$rss_url = $db->safesql($rss_url);
$inf = $db->super_query("SELECT id,title FROM " . PREFIX . "_rss WHERE url = '" . trim($rss_url) . "'");
$rss_result = get_rss_channel_info($rss_url, intval($_POST['proxy']));
if ($rss_result['title'] != '') {
$channel_title = $rss_result['title'];
$channel_descr = $rss_result['description'];
$rss = '1';
}
else {
$channel_title = $rss_result['html'];
$channel_descr = $rss_result['html'];
$rss = '0';
}
if ($rss == '1') {
$start_title = '';
$start_short = '';
$sart_link = '';
$ctp = '';
}
if ($stop == false) {
$channel_title = $db->safesql($channel_title);
$channel_descr = $db->safesql($channel_descr);
$sql_query = "INSERT INTO " . PREFIX . "_rss (url, title, descr, category, allow_main, allow_comm, allow_rate, allow_auto, load_img, allow_more, start_template, finish_template, cookies, allow_watermark, date_format, keywords, Autors, thumb_img, allow_mod, stkeywords, rss, ful_start, start_title, start_short, end_short, sart_link, end_link, sart_cat, xdescr, xpos, delate, inser, start, finish, end_title, short_story, dop_nast, ctp, full_link, date) VALUES ('$rss_url', '$channel_title', '$channel_descr', '$category', '$allow_main', '$allow_comm', '$allow_rate', '$auto', '$load_images', '$allow_more', '$start_template', '$finish_template', '$cookies', '$allow_watermark', '$date_format', '$keywords', '$Autors', '$thumb_images', '$allow_mod', '$stkeywords', '$rss', '$ful_start', '$start_title', '$start_short', '$end_short', '$sart_link', '$end_link', '$sart_cat', '$xdescr', '1', '$delate', '$inser', '$start', '$finish', '$end_title', '$short_story', '$dop_nast', '$ctp', '$full_link', '$date')";
$db->query($sql_query);
$out_title = stripslashes(strip_tags($channel_title));
if (100 < strlen($out_title)) {
$out_title = substr(0, 100, $out_title) . '...';
}
if ($rss == 1) {
msg('Информация', 'Информация', 'Канал - "' . $out_title . '" успешно добавлен в базу для грабинга по RSS ленте' . ($inf ? '<br />* * *<br /><b style="color:#ff0000;">Внимание введённый URL существует в базе как:</b><br /><br /><a class="list" href="admin.php?mod=rss&action=channel&subaction=edit&id=' . $inf['id'] . '"><b style="color:blue;">' . $inf['title'] . '</b></a>' : '') , $PHP_SELF . '?mod=rss');
return 1;
}
else {
msg('Информация', 'Информация', 'Канал - "' . $out_title . '" успешно добавлен в базу для грабинга по HTML шаблону ' . ($inf ? '<br />* * *<br /><b style="color:#ff0000;">Внимание введённый URL существует в базе как:</b><br /><br /><a class="list" href="admin.php?mod=rss&action=channel&subaction=edit&id=' . $inf['id'] . '"><b style="color:blue;">' . $inf['title'] . '</b></a>' : '') , $PHP_SELF . '?mod=rss');
return 1;
}
}
}
if (($action == 'channel') and ($subaction == 'do_change')) {
if (isset($id)) {
$stop = false;
if (!((!(trim($id) == '') AND !($id == 0)))) {
msg('Информация', 'Информация', 'Не указан ID ленты', $PHP_SELF . '?mod=rss');
return 1;
}
$row = $db->super_query("SELECT * FROM " . PREFIX . "_rss WHERE id ='$id'");
if ($_POST['category'] != '') {
$category = $db->safesql(implode(',', $_POST['category']));
}
else {
$category = '0';
}
$allow_main = intval($_POST['allow_main']);
$allow_mod = intval($_POST['allow_mod']);
$allow_comm = intval($_POST['allow_comm']);
$allow_auto = intval($_POST['allow_auto']);
$allow_load = intval($_POST['load_img']);
$thumb_images = intval($_POST['thumb_img']);
$allow_rate = intval($_POST['allow_rate']);
$allow_auto = intval($_POST['auto']);
$allow_more = intval($_POST['allow_more']);
$allow_water = intval($_POST['allow_watermark']);
$date_format = intval($_POST['news_date']);
$short_story = intval($_POST['clear_short']) . '=' . intval($_POST['short_im']) . '=' . intval($_POST['short_full']);
$ctp = intval($_POST['so']) . '=' . intval($_POST['po']);
$dop_nast = intval($_POST['dop_watermark']) . '=' . intval($_POST['text_url']) . '=' . intval($_POST['proxy']) . '=' . intval($_POST['x']) . '=' . intval($_POST['y']) . '=' . intval($_POST['show_autor']) . '=' . intval($_POST['show_tegs']) . '=' . intval($_POST['show_date']) . '=' . intval($_POST['show_code']) . '=' . intval($_POST['show_f']) . '=' . intval($_POST['null']);
$full_link = stripslashes($_POST['full_link']);
$date = $db->safesql(trim($_POST['date']));
$original_rss_url = $row['url'];
$rss_url = $db->safesql($_POST['rss_url']);
$rss = intval($_POST['rss_html']);
if (trim($rss_url) == '') {
msg('Информация', 'Информация', 'Необходимо указать URL канала!', $PHP_SELF . '?mod=rss&action=channel&subaction=edit&id=' . $id);
return 1;
}
if (!(ereg('http://', $rss_url))) {
msg('Информация', 'Информация', 'Неверно указана URL канала!', $PHP_SELF . '?mod=rss&action=channel&subaction=edit&id=' . $id);
return 1;
}
if ($original_rss_url != $rss_url) {
$inf = $db->super_query("SELECT title FROM " . PREFIX . "_rss WHERE url = '" . trim($rss_url) . "'");
$rss_result = get_rss_channel_info($rss_url, intval($_POST['proxy']));
if ($rss_result['title'] != '') {
$channel_title = $rss_result['title'];
$channel_descr = $rss_result['description'];
$rss = '1';
}
else {
$channel_title = $rss_result['html'];
$channel_descr = $rss_result['html'];
$rss = '0';
}
}
else {
$channel_title = $db->safesql($_POST['rss_title']);
}
if ($stop == false) {
$cookies = $db->safesql(str_replace('
', '|', $_POST['cookies']));
$keywords = $db->safesql(str_replace('
', '|', $_POST['keywords']));
$stkeywords = $db->safesql(str_replace('
', '|', $_POST['stkeywords']));
if ($_POST['groups'] != '') $autor_grups = implode(',', $_POST['groups']);
$Autors = $db->safesql(str_replace('
', '|', $_POST['Autors'])) . '=' . $autor_grups;
$xdescr = $db->safesql($_POST['rss_xdescr']);
$start_template = $db->safesql($_POST['start_template']);
$finish_template = $db->safesql($_POST['finish_template']);
$delate = $db->safesql(str_replace('
', '|', $_POST['delate']));
$inser = $db->safesql(str_replace('
', '|', $_POST['inser']));
$start = str_replace('
', '|', $_POST['start']);
$finish = str_replace('
', '|', $_POST['finish']);
$ful_start = $db->safesql($_POST['ful_start']);
$ful_end = $db->safesql($_POST['ful_end']);
$start_title = $db->safesql($_POST['start_title']);
$end_title = $db->safesql($_POST['s_title']) . '==' . $db->safesql($_POST['end_title']);
$start_short = $db->safesql($_POST['start_short']);
$end_short = intval($_POST['end_short']) . '=' . intval($_POST['hide']) . '=' . intval($_POST['leech']);
$sart_link = $db->safesql($_POST['sart_link']);
$end_link = $db->safesql($_POST['end_link']);
$sart_cat = $db->safesql($_POST['sart_cat']);
$end_cat = $db->safesql($_POST['end_cat']);
if ($rss == '1') {
$start_title = '';
$start_short = '';
$sart_link = '';
$ctp = '';
}
$db->query("UPDATE " . PREFIX . "_rss SET title = '$channel_title', descr = '$channel_descr', rss = '$rss',category='$category', allow_main = '$allow_main', allow_comm = '$allow_comm', allow_auto = '$allow_auto', allow_more ='$allow_more', allow_rate ='$allow_rate', cookies ='$cookies', start_template ='$start_template', finish_template ='$finish_template', delate = '$delate', load_img ='$allow_load', url ='$rss_url', allow_watermark ='$allow_water', date_format ='$date_format', keywords ='$keywords', Autors ='$Autors', thumb_img ='$thumb_images', allow_mod ='$allow_mod', stkeywords ='$stkeywords', ful_start='$ful_start', start_title='$start_title', start_short='$start_short', end_short='$end_short', sart_link='$sart_link', end_link='$end_link', sart_cat='$sart_cat', xdescr='$xdescr', inser='$inser', start='$start', finish='$finish', end_title = '$end_title', end_link = '$end_link', short_story='$short_story', dop_nast='$dop_nast', full_link='$full_link', ctp='$ctp', date= '$date' WHERE id ='$id'");
msg('Информация', 'Информация', 'Изменения канала "' . $channel_title . '" успешно сохранены!' . ($inf ? '<br />* * *<br /><b style="color:#ff0000;">Внимание введённый URL существует в базе как:</b><br /><br /><a class="list" href="admin.php?mod=rss&action=channel&subaction=edit&id=' . $inf['id'] . '"><b style="color:blue;">' . $inf['title'] . '</b></a>' : '') , $PHP_SELF . '?mod=rss');
return 1;
}
}
}