1 2/* Ñайл js */ 3 4 5var obj_proces_abuse_object = 6 { 7 num_object : 0, 8 name_block_up : "#block_up_abuse_object", 9 name_block_fon : "#block_fon_abuse_object", 10 obj_up_block : false, 11 12 name_abuse : "", 13 description_abuse : "", 14 15 init_obj : function () 16 { 17 18 }, 19 20 call_abuse_object : function ( num_object ) 21 { 22 this.num_object = num_object; 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_object'>"; 48 t += "ÐожаловаÑÑÑÑ Ð½Ð° обÑекÑ"; 49 50 t += "</div>"; 51 t += "</div>"; 52 53 t += "<div><div class='block_text_content_window_abuse_object'><div class='block_text_content_contr_2_window_abuse_object'>"; 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_object'>УкажиÑе пÑиÑинÑ</span>"; 68 t += "</div>"; 69 t += "<div style='margin: 5px 0px 0px 0px;'>"; 70 71 t += "<select name='pf_name_abuse_object' class='pf_name_abuse_object'>"; 72 t += "<option value=''>ÐÑбеÑиÑе пÑиÑинÑ...</option>"; 73 var one_abuse; 74 for ( var i = 0; i < mas_init_list_abuse_object.length; i++ ) 75 { 76 one_abuse = mas_init_list_abuse_object[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_object'>ÐоÑÑнение</span>"; 85 t += "</div>"; 86 t += "<div style='margin: 5px 0px 0px 0px;'>"; 87 t += "<textarea name='pf_description_abuse_object' class='pf_description_abuse_object'></textarea>"; 88 t += "</div>"; 89 90 t += "<div class='block_button_manager_window_abuse_object'>"; 91 t += "<input type='button' name='_button_ok_abuse_object' value='ÐÑпÑавиÑÑ' onclick='obj_proces_abuse_object.call_send_abuse();'>"; 92 t += " <input type='button' name='_button_cancel_abuse_object' onclick='obj_proces_abuse_object.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_object")[0]; 103 var obj_pf_description = document.getElementsByName("pf_description_abuse_object")[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/catalog/include"; 126 //alert(num_abuse_adv+" dir_http="+dir_http); 127 var data_send = "id_object="+this.num_object 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_object.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_object").innerHTML="<img src='"+dir_http_template+"/moduls/catalog/images/icon_info_alert_object.png' style='vertical-align: middle;'> СпаÑибо! ÐдминиÑÑÑаÑÐ¸Ñ ÑайÑа оповеÑена!"; 146 this.call_close_block(); 147 } 148 149 }; 150 151 152function abuse_to_object(num_abuse_object) 153 { 154 155 obj_proces_abuse_object.call_abuse_object( num_abuse_object ); 156 /* 157 var dir_include=dir_http+"/moduls/catalog/include"; 158 //alert(num_abuse_adv+" dir_http="+dir_http); 159 var data_send = "id_object="+num_abuse_object; 160 var url = dir_include + "/set_abuse_object.php"; 161 loadHTTPjc(url,ob_save_abuse_object,data_send,true); 162 */ 163 } 164 165/* 166function ob_save_abuse_object(answer) 167 { 168
169 if (answer.error.code==1) 170 { 171 alert (answer.error.text); 172 return; 173 } 174 175 document.getElementById("link_abuse_to_object").innerHTML="<img src='"+dir_http_template+"/moduls/catalog/images/icon_info_alert_object.png' style='vertical-align: middle;'> СпаÑибо! ÐдминиÑÑÑаÑÐ¸Ñ ÑайÑа оповеÑена!"; 176 177 } 178 179*/ 180 181 182 183var view_mask_phone_object = 184 { 185 186 num_object : 0, 187 id_elm_mask_phone : "elm_mask_phone_object", 188 189 action_view : function ( num_object ) 190 { 191 this.num_object = num_object; 192 //alert(this.num_object); 193 194 this.send_server_query(); 195 196 }, 197 198 send_server_query : function () 199 { 200 var dir_include=dir_http+"/moduls/catalog/include"; 201 //alert(num_abuse_adv+" dir_http="+dir_http); 202 var data_send = "id_object="+this.num_object 203 +"&type_data=phone"; 204 //alert (data_send); 205 var url = dir_include+"/get_type_data_object.php"; 206 var a = this; 207 loadHTTPjc(url,function (answer){ a.obr_send_server_query(answer); },data_send,true); 208 }, 209 210 obr_send_server_query : function ( answer ) 211 { 212 213 if (answer.error.code==1) 214 { 215 alert (answer.error.text); 216 return; 217 } 218 var on_data = answer.on_data; 219 var data = answer.data; 220 decode_mas(data); 221 this.view_data_phone(on_data, data); 222 }, 223 224 view_data_phone : function (on_data,data) 225 { 226 227 document.getElementById(this.id_elm_mask_phone).innerHTML = (( on_data == 1 ) ? ( js_trim(data.phone) ? data.phone : "ÑелеÑон не Ñказан" ) : "Ð½ÐµÑ Ð´Ð°Ð½Ð½ÑÑ " ); 228 229 } 230 231 }; 232 233
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.