Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Открыть файл engine/ajax/complaint.php
- Найти:
- } elseif ($_POST['action'] == "news") {
- if( !$is_logged ) die( "error" );
- ....
- ....
- $db->query( "INSERT INTO ....
- }
- Добавить ниже:
- elseif( $_POST['action'] == "news_g" ) {
- if( !$id OR !$text) die( "error" );
- $row = $db->super_query( "SELECT id FROM " . PREFIX . "_post WHERE id='{$id}'" );
- if( !$row['id'] ) die("Operation not Allowed");
- include_once ENGINE_DIR . '/classes/mail.class.php';
- $mail = new dle_mail( $config, true );
- $text = $db->safesql( $text );
- $field = convert_unicode( $_POST['field'], $config['charset'] );
- $field = $is_logged ? $member_id['name'] : ($field ? $field : "No name");
- $url = $config['http_home_url'] . "index.php?newsid=" . $row['id'];
- $mail->send( $config['admin_mail'], "Уведомление о отсутствии видео на сайте", "Нет видео по адресу: " . $url . "<br /><br />Отправитель: " . $field . "<br /><br />Текст: " . $text );
- }
- _______________________________________________________________________________
- Идем сюда engine/classes/js/dle_js.js
- Найти:
- function AddComplaint(a,c){var b={};b[dle_act_lang[3]]=function(){$(this).dialog("close")};b[dle_p_send]=function(){if(1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var b=$("#dle-promt-text").val();$(this).dialog("close");$("#dlepopup").remove();$.post(dle_root+"engine/ajax/complaint.php",{id:a,text:b,action:c},function(a){"ok"==a?DLEalert(dle_p_send_ok,dle_info):DLEalert(a,dle_info)})}};$("#dlepopup").remove();$("body").append("<div id='dlepopup' title='"+
- dle_complaint+"' style='display:none'><br /><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;height:100px; padding: .4em;'></textarea></div>");$("#dlepopup").dialog({autoOpen:!0,width:500,dialogClass:"modalfixed",buttons:b});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",["0","0"])}
- Заменить на:
- /*function AddComplaint(a,c){var b={};b[dle_act_lang[3]]=function(){$(this).dialog("close")};b[dle_p_send]=function(){if(1>$("#dle-promt-text").val().length)$("#dle-promt-text").addClass("ui-state-error");else{var b=$("#dle-promt-text").val();$(this).dialog("close");$("#dlepopup").remove();$.post(dle_root+"engine/ajax/complaint.php",{id:a,text:b,action:c},function(a){"ok"==a?DLEalert(dle_p_send_ok,dle_info):DLEalert(a,dle_info)})}};$("#dlepopup").remove();$("body").append("<div id='dlepopup' title='"+
- dle_complaint+"' style='display:none'><br /><textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%;height:100px; padding: .4em;'></textarea></div>");$("#dlepopup").dialog({autoOpen:!0,width:500,dialogClass:"modalfixed",buttons:b});$(".modalfixed.ui-dialog").css({position:"fixed"});$("#dlepopup").dialog("option","position",["0","0"])}*/
- function AddComplaint(a,c,d) {
- var b = {};
- var t = "";
- if(d) {
- t = "Сериалы: указать сезон/серию.";
- } else {
- t = dle_complaint;
- }
- b[dle_act_lang[3]] = function() {
- $(this).dialog("close");
- };
- b[dle_p_send] = function() {
- if( 1 > $("#dle-promt-text").val().length ) {
- $("#dle-promt-text").addClass("ui-state-error");
- } else {
- var b = $("#dle-promt-text").val();
- var d = $("#dle-promt-field").val();
- $(this).dialog("close");
- $("#dlepopup").remove();
- $.post(dle_root + "engine/ajax/complaint.php", {id:a, text:b, action:c, field:d}, function(a) {
- "ok" == a ? DLEalert(dle_p_send_ok, dle_info) : DLEalert(a, dle_info);
- });
- }
- }
- $("#dlepopup").remove();
- $("body").append("<div id='dlepopup' title='"+t+"' style='display:none'><br />\
- <input type='text' id='dle-promt-field' class='ui-widget-content ui-corner-all' placeholder='Контакты для связи с вами' style='width:97%; padding: .4em;' /><br /><br />\
- <textarea name='dle-promt-text' id='dle-promt-text' class='ui-widget-content ui-corner-all' style='width:97%; height:100px; padding: .4em;'></textarea>\
- </div>");
- $("#dlepopup").dialog({autoOpen:!0, width:500, dialogClass:"modalfixed", buttons:b});
- $(".modalfixed.ui-dialog").css({position:"fixed"});
- $("#dlepopup").dialog("option","position",["0","0"]);
- }
- _______________________________________________________________________________
- В нужном месте прописать:
- <a href="javascript:AddComplaint('{news-id}', 'news_g', '1')">Изъяли видео!</a>
- Готово!
- В случае возникновения вопросов, пожалуйста, обращайтесь
- Автор: Виктор (vitnet)
- Сайт: http://quantum-soft.ru/
- Связь: 80-60-715
- Благодарность: R115600417591
Advertisement
Add Comment
Please, Sign In to add comment