PageSourceSearch

https://reklamnay.ru/templates/coolmini/moduls/doska/js_abuse_adv.js

js reklamnay.ru collected 2026-10-05 23:57:17 UTC 8,249 bytes, 284 lines download raw bytes

1
2
3/* файл js */
4
5var obj_proces_abuse_advert = 
6 {
7  num_advert : 0,
8  name_block_up : "#block_up_abuse_advert",
9  name_block_fon : "#block_fon_abuse_advert",
10  obj_up_block : false,
11  
12  name_abuse : "",
13  description_abuse : "",
14  
15  init_obj : function ()
16    {
17     
18    },
19  
20  call_abuse_advert : function ( num_advert )
21    {
22     this.num_advert = num_advert;
23     this.show_block();
24    },
25  
26  show_block : function ()
27    {
28     var a = this;
29     this.obj_up_block = obj_processing_block.write_up_block(this.name_block_fon,this.name_block_up,500,350, "#333333", 50, function(){ a.call_close_block(); }, "#fff");
30     
31     var t = this.forming_all_text_up_block();
32     this.obj_up_block.innerHTML = t;
33    },
34  
35  call_close_block : function ()
36    {
37     obj_processing_block.close_up_block(this.name_block_fon, this.name_block_up);
38    },
39  
40  forming_all_text_up_block : function ()
41    {
42     var t = "";
43     
44     t += "<div>";
45     
46     t += "<div>";
47     t += "<div class='block_title_window_abuse_advert'>";
48     t += "Пожаловаться на объявление";
49     
50     t += "</div>";
51     t += "</div>";
52     
53     t += "<div><div class='block_text_content_window_abuse_advert'><div class='block_text_content_contr_2_window_abuse_advert'>";
54     t += this.forming_text_content_up_block();
55     t += "</div></div></div>";
56     
57     t += "</div>";
58     
59     return (t);
60    },
61  
62  forming_text_content_up_block : function ()
63    {
64     var t = "";
65     
66     t += "<div>";
67     t += "<span class='name_pf_one_windows_abuse_advert'>Укажите причину</span>";
68     t += "</div>";
69     t += "<div style='margin: 5px 0px 0px 0px;'>";
70     
71     t += "<select name='pf_name_abuse_advert' class='pf_name_abuse_advert'>";
72     t += "<option value=''>Выберите причину...</option>";
73     var one_abuse;
74     for ( var i = 0; i < mas_init_list_abuse_advert.length; i++ )
75       {
76        one_abuse = mas_init_list_abuse_advert[i];
77        t += "<option value='"+jsCodeHtmlChars(one_abuse[0])+"'>"+jsCodeHtmlChars(one_abuse[0])+"</option>";
78       }
79     t += "</select>";
80     
81     t += "</div>";
82     
83     t += "<div style='margin: 10px 0px 0px 0px;'>";
84     t += "<span class='name_pf_one_windows_abuse_advert'>Пояснение</span>";
85     t += "</div>";
86     t += "<div style='margin: 5px 0px 0px 0px;'>";
87     t += "<textarea name='pf_description_abuse_advert' class='pf_description_abuse_advert'></textarea>";
88     t += "</div>";
89     
90     t += "<div class='block_button_manager_window_abuse_advert'>";
91     t += "<input type='button' name='_button_ok_abuse_advert' value='Отправить' onclick='obj_proces_abuse_advert.call_send_abuse();'>";
92     t += " <input type='button' name='_button_cancel_abuse_advert' onclick='obj_proces_abuse_advert.call_close_block();' value='Отмена'>";
93     
94     t += "</div>";
95     
96     return (t);
97    },
98  
99  call_send_abuse : function ()
100    {
101     
102     var obj_pf_name = document.getElementsByName("pf_name_abuse_advert")[0];
103     var obj_pf_description = document.getElementsByName("pf_description_abuse_advert")[0];
104     
105     this.name_abuse = js_trim(obj_pf_name.value);
106     this.description_abuse = js_trim(obj_pf_description.value);
107     
108     if ( this.name_abuse == "" )
109       {
110        alert ("Выберите причину!");
111        return;
112       }
113     
114     if ( this.description_abuse == "" )
115       {
116        alert ("Напишите пояснение!");
117        return;
118       }
119     
120     this.send_server_abuse();
121    },
122  
123  send_server_abuse : function ()
124    {
125     var dir_include=dir_http+"/moduls/doska/include";
126     //alert(num_abuse_adv+" dir_http="+dir_http);
127     var data_send = "id_adv="+this.num_advert
128      + "&name_abuse="+encodeURIComponent(this.name_abuse)
129      + "&description_abuse="+encodeURIComponent(this.description_abuse);
130     //alert (data_send);
131     var url = dir_include+"/set_abuse_adv.php";
132     var a = this;
133     loadHTTPjc(url,function (answer){ a.obr_send_server_abuse(answer); },data_send,true);
134    },
135  
136  obr_send_server_abuse : function ( answer )
137    {
138     
139     if (answer.error.code==1)
140       {
141        alert (answer.error.text);
142        return;
143       }
144     
145     document.getElementById("link_abuse_to_adv").innerHTML="<img src='"+dir_http_template+"/moduls/doska/images/icon_info_alert.png' style='vertical-align: middle;'> Спасибо! Администрация сайта оповещена!";
146     this.call_close_block();
147    }
148  
149 };
150
151function abuse_to_adv(num_abuse_adv)
152  {
153   
154   obj_proces_abuse_advert.call_abuse_advert( num_abuse_adv );
155   
156  }
157
158/*
159function send_server_abuse_to_adv(num_abuse_adv)
160  {
161   var dir_include=dir_http+"/moduls/doska/include";
162   //alert(num_abuse_adv+" dir_http="+dir_http);
163   var data_send = "id_adv="+num_abuse_adv;
164   var url = dir_include+"/set_abuse_adv.php";
165   loadHTTPjc(url,ob_save_abuse_adv,data_send,true);
166   
167  }
168  
169function ob_save_abuse_adv(answer)
170  {
171   
172   if (answer.error.code==1)
173     {
174      alert (answer.error.text);
175      return;
176     }
177   
178   document.getElementById("link_abuse_to_adv").innerHTML="<img src='"+dir_http_template+"/moduls/doska/images/icon_info_alert_advert.png' style='vertical-align: middle;'> Спасибо! Администрация сайта оповещена!";
179   
180  }
181*/
182
183//добавление объявления в закладки 
184
185function add_mark_advert_user(num_advert)
186  {
187   //alert(num_advert);
188   var dir_include=dir_http+"/moduls/doska/include";
189   //alert(num_abuse_adv+" dir_http="+dir_http);
190   var data_send = "num_advert="+num_advert;
191   var url = dir_include+"/add_mark.php";
192   loadHTTPjc(url,ob_add_mark_advert_user,data_send,true);
193   
194  }
195
196
197function ob_add_mark_advert_user(answer)
198  {
199   /*
200   if (answer.error.code==1)
201     {
202      alert (answer.error.text);
203      return;
204     }
205   */
206   var on_add = answer.on_add;
207   var num_advert = answer.num_advert;
208   var kolvo_mark_advert = answer.kolvo_mark;
209   //alert("Добавлено!");
210   
211   var t = "";
212   
213   if ( on_add )
214     {
215      t = "Объявление успешно добавлено в <a href='"+dir_http+"/mark_advert/'>закладки</a>.";
216     }
217    else
218      {
219       t = "Данное объявление уже есть в <a href='"+dir_http+"/mark_advert/'>закладках</a>.";
220      }
221   
222   var obj_span = document.getElementById("link_add_mart_advert_num_"+num_advert);
223   if ( obj_span )
224     obj_span.innerHTML=t;
225   
226   obj_span_kolvo = document.getElementById("elm_kolvo_mark_advert");
227   if ( obj_span_kolvo )
228     obj_span_kolvo.innerHTML = kolvo_mark_advert;
229   
230  }
231
232
233
234var view_mask_phone_advert = 
235  {
236   
237   num_advert : 0,
238   id_elm_mask_phone : "elm_mask_phone_advert",
239   
240   action_view : function ( num_advert )
241     {
242      this.num_advert = num_advert;
243      //alert(this.num_advert);
244      
245      this.send_server_query();
246      
247     },
248   
249   send_server_query : function ()
250    {
251     var dir_include=dir_http+"/moduls/doska/include";
252     //alert(num_abuse_adv+" dir_http="+dir_http);
253     var data_send = "id_advert="+this.num_advert
254      +"&type_data=phone";
255     //alert (data_send);
256     var url = dir_include+"/get_type_data_elm_doska.php";
257     var a = this;
258     loadHTTPjc(url,function (answer){ a.obr_send_server_query(answer); },data_send,true);
259    },
260  
261  obr_send_server_query : function ( answer )
262    {
263     
264     if (answer.error.code==1)
265       {
266        alert (answer.error.text);
267        return;
268       }
269     var on_data = answer.on_data;
270     var data = answer.data;
271     decode_mas(data);
272     this.view_data_phone(on_data, data);
273    },
274  
275  view_data_phone : function (on_data,data)
276    {
277     
278     document.getElementById(this.id_elm_mask_phone).innerHTML = (( on_data == 1 ) ? ( js_trim(data.phone) ? data.phone : "телефон не указан" ) : "нет данных" );
279     
280    }
281   
282  };
283
284

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.