simpledecision /modules/structure/edit.materials.php

Language PHP Lines 508
MD5 Hash b69815ba7424d9cb67653269a0dfa5e3 Estimated Cost $10,838 (why?)
Repository https://bitbucket.org/ssimpledecision/simpledecision.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
<? include "../../inc/header_m.php";?>
<?
if (!empty($structure_home))
	$home_parent=" and parent='$structure_home' ";

if (isset($_GET['id_material'])||isset($_POST['id_material']))
	{
	if (count($_POST)>0)
		{
		$query=mysql_query("select * from {$pref}db_{$modul} where id={$_POST['pid']} $home_parent limit 1");
		if ($_POST['id_material']!=1) $res=mysql_fetch_array($query);
		if ($res['href']=='/') $hr='';
		else $hr=$res['href'];
		$id=$_POST['id_material'];
		$pid=$_POST['pid'];
		$parent=$pid;
		if ($parent<=1)
			$parent=$id;
		$parid=$pid;
		while ($parid<>0) {
			$parid=mysql_result(mysql_query("select * from {$pref}db_{$modul} where id=$parid $home_parent "),0, 'pid');
			if ($parid>1) $parent=$parid;
		}
		// $parent=$parent2;
		if (mysql_num_rows(mysql_query("select * from {$pref}db_{$modul} where id={$id} $home_parent limit 1"))==0) {die();}

		$typ=$_POST['typ'];
		$href=$hr.'/'.$_POST['href'];
		if (substr($_POST['href'], 0,7)=='http://')
		$href=$_POST['href'];
		$name=$_POST['href'];
		$menu1=0;
		$menu1=$_POST['menu1'];
		$menu2=0;
		$menu2=$_POST['menu2'];
		$menu3=0;
		$menu3=$_POST['menu3'];
		$menu4=0;
		$menu4=$_POST['menu4'];
		$menu4_par=0;
		$menu4_par=$_POST['menu4_par'];

		$title=$_POST['title'];
		$anons=$_POST['anons'];
		$error=intval($_POST['error']);
		$fname=$_POST['fname'];
		$mname=$_POST['mname'];
		$descr=$_POST['descr'];
		$key_w=$_POST['key'];
		$news_cat = substr($news_cat, 1);
		$text=addslashes($_POST['text']);
		$status=$_POST['status'];
		$materials=$_POST['materials'];
		$gallery=$_POST['gallery'];
		$news2=$_POST['news2'];
		$gallery2=$_POST['gallery2'];
		$catalog=$_POST['catalog'];
		$banners=$_POST['banners1'];
		$tpl=$_POST['tpl'];


		mysql_query("delete from {$pref}db_structure_alias where id_type=$id_modules and id_el={$id}");
		if (intval(mysql_num_rows(mysql_query("select * from {$pref}db_structure_alias where href='{$href}'")))>0)
		$mes_er="<font><b class='saveinfo'>Ошибка создания алиаса</b></font>";
		else
		mysql_query("insert into {$pref}db_structure_alias set href='{$href}',id_page='{$id}',id_type={$id_modules},id_el={$id}");

		mysql_query("delete from {$pref}db_structure_alias where id_type=2005 and id_page={$id}");
		mysql_query("delete from {$pref}db_structure_alias where id_type=2006 and id_page={$id}");
		$sql="select * from {$pref}db_catalog_rel where id_cat=$catalog";
		$query=mysql_query($sql);
		if ($query && mysql_num_rows($query)>0)
			while ($res=mysql_fetch_array($query)) {
				$alias=getdb('db_catalog',$res['id_el'],'alias');
				if (intval(mysql_num_rows(mysql_query("select * from {$pref}db_structure_alias where href='{$href}/{$alias}'")))>0)
				$mes_er="<font><b class='saveinfo'>Ошибка создания алиаса</b></font>";
				elseif (!empty($alias))
				mysql_query("insert into {$pref}db_structure_alias set href='{$href}/{$alias}',id_page='{$id}',id_type=2005,id_el={$res['id_el']}");
			}
		$sql="select * from {$pref}db_materials_rel where id_cat=$materials";
		$query=mysql_query($sql);
		if ($query && mysql_num_rows($query)>0)
			while ($res=mysql_fetch_array($query)) {
				$alias=getdb('db_materials',$res['id_el'],'alias');
				if (intval(mysql_num_rows(mysql_query("select * from {$pref}db_structure_alias where href='{$href}/{$alias}'")))>0)
				$mes_er="<font><b class='saveinfo'>Ошибка создания алиаса</b></font>";
				elseif (!empty($alias))
				mysql_query("insert into {$pref}db_structure_alias set href='{$href}/{$alias}',id_page='{$id}',id_type=2006,id_el={$res['id_el']}");
			}

		foreach ($banners as $key => $value) {
			if ($value>0)
			$banners1 .=','.$value;
		}
		$banners1=substr($banners1, 1);
		$banners=$_POST['banners2'];
		foreach ($banners as $key => $value) {
			if ($value>0)
			$banners2 .=','.$value;
		}
		$banners2=substr($banners2, 1);
		$banners=$_POST['banners3'];
		foreach ($banners as $key => $value) {
			if ($value>0)
			$banners3 .=','.$value;
		}
		$banners3=substr($banners3, 1);
		$banners=$_POST['banners4'];
		foreach ($banners as $key => $value) {
			if ($value>0)
			$banners4 .=','.$value;
		}
		$banners4=substr($banners4, 1);
		$banners=$_POST['banners5'];
		foreach ($banners as $key => $value) {
			if ($value>0)
			$banners5 .=','.$value;
		}
		$banners5=substr($banners5, 1);

		$access=$_POST['access_admin'];
		foreach ($access as $key => $value) {
			$access_admin .=','.$value;
		}
		$access_admin=substr($access_admin, 1);

		$access=$_POST['access_moder'];
		foreach ($access as $key => $value) {
			$access_moder .=','.$value;
		}
		$access_moder=substr($access_moder, 1);

		$access=$_POST['access_user'];
		foreach ($access as $key => $value) {
			$access_user .=','.$value;
		}
		$access_user=substr($access_user, 1);
		
		$access_notuser=$_POST['access_notuser'];

		$mes="<font color='green'><b class='saveinfo'>Сохранено</b></font>";
		mysql_query("update {$pref}db_{$modul} set href='{$href}',alias='{$name}',anons='{$anons}',title='{$title}',name='{$fname}',error='{$error}',menu_name='{$mname}',`description`='{$descr}',`keyword`='{$key_w}',text='{$text}',pid='{$pid}',parent='{$parent}',type='{$typ}',menu1='{$menu1}',menu2='{$menu2}',menu3='{$menu3}',menu4='{$menu4}',menu4_par='{$menu4_par}',catalog='{$catalog}',materials='{$materials}',catalog2='{$banners1}',materials2='{$banners2}',menu='{$banners3}',access_admin='{$access_admin}',access_moder='{$access_moder}',access_user='{$access_user}',access_notuser='{$access_notuser}',tpl='{$tpl}',status='{$status}' where id='{$id}'  $home_parent ");
		if (isset($_POST['sf1'])) header("Location: index.php");
		}
		else
		{
		unset($mes);
		$id=$_GET['id_material'];
		}
	$query=mysql_query("select * from {$pref}db_{$modul} where id={$id} $home_parent limit 1");
	$res=mysql_fetch_array($query);
	$query2=mysql_query("select * from {$pref}db_{$modul} where status=1 $home_parent order by href");
	$m_title="Изменить страницу";
	}
	
	
	
	else
	{
	foreach ($user_group as $key => $value) $ac.= ','.($key+1);
	$ac='0'.$ac;
	mysql_query("insert into {$pref}db_{$modul} set pid=0, access_admin='{$ac}',access_moder='{$ac}',access_user='{$ac}',access_notuser='1', date1=NOW(), date2=NOW(), user='{$_SESSION['user_id']}',parent='$structure_home'");
	$id=mysql_insert_id();
	$query=mysql_query("select * from {$pref}db_{$modul} where id={$id} $home_parent limit 1");
	$res=mysql_fetch_array($query);
	$query2=mysql_query("select * from {$pref}db_{$modul} where status=1 $home_parent order by href");
	
	$m_title="Добавить страницу";
	}
	$body0="";
	$body="";
	
	$body0.="
	<fieldset class='left'>
	<label>Добавить в</label>
	<select name='pid' ";if ($res['id']==1 || $res['id']==$structure_home) $body0.="disabled='true'";$body0.=">";
	if ($res['id']==1 || $res['id']==$structure_home)
	{$body0.="<option value='0' ";if ($res['pid']==0) $body0.="selected";$body0.=">../</option>";}
	elseif (!empty($structure_home))
	$body0.="<option value='".$structure_home."' ";if ($res['pid']==$structure_home) $body0.="selected";$body0.=">../</option>";



	$body.="</select></fieldset>
	<fieldset class='right'>
	<label>Тип страницы</label>
	<select name='typ' >";
	foreach($tree_type as $key=>$val){$body.="<option "; if ($res['type']==$key)$body.="selected"; $body.=" value='{$key}'>{$val}</option>";}
	$body.="
	</select></fieldset><div class='clear'></div>
	<fieldset class='left'>
	<label>Полное название*</label>
	<input type='text' class='validate[required]' name='fname' id='fname' value='{$res['name']}' /></fieldset>
	<fieldset class='right'>
	<label>URL (en)*</label>
	<input type='text' class='validate[required]' name='href' id='href' value='{$res['alias']}' ";if ($res['id']==1) $body.="disabled='true'";$body.="/></fieldset><div class='clear'></div>
	<fieldset class='left'>
	<label>название в меню</label>
	<input type='text' class='' name='mname' id='mname' value='{$res['menu_name']}' /></fieldset>
	<div class='clear'></div>
	<fieldset>
	<label>Анонс</label>
	<textarea style='height:100px;' name='anons' >{$res['anons']}</textarea></fieldset>
	<fieldset>
	<label>Текст страницы</label>
	<textarea name='text' id='elm1'>{$res['text']}</textarea></fieldset>
	<fieldset>
	<label>Заголовок</label>
	<textarea style='height:100px;' name='title' >{$res['title']}</textarea></fieldset>
	<fieldset>
	<label>Описание</label>
	<textarea style='height:100px;' name='descr' >{$res['description']}</textarea></fieldset>
	<fieldset>
	<label>Ключевые слова</label>
	<textarea style='height:100px;' name='key' >{$res['keyword']}</textarea></fieldset>
	<fieldset class='left'>
	<label>Статус*</label>
	<select class='validate[required]' name='status' id='status' >
		<option value='1' ";if ($res['status']==1) $body.="selected";$body.=">Опубликовано</option>
		<option value='2' ";if ($res['status']==2) $body.="selected";$body.=">Не опубликованно</option>
	</select></fieldset>
	<fieldset class='right'>
	<label>Код ошибки</label>
	<input type='text' name='error' id='error' value='{$res['error']}' /></fieldset>
	</fieldset><div class='clear'></div>
	<input type='hidden' value='{$id}' name='id_material' />
	Поля, отмеченные * являются обязательными для заполнения
	";








	$body01="";
	$body1="";
	$body11="";
	$body111="";
	
		$body01.="
	<fieldset class='left'>
	<label>Меню</label><br><br>
	<ul class='catdeleteinsert0'>";
	$banners3=explode(',', $res['menu']);
	foreach ($banners3 as $key => $value) if (!empty($value)){
		$body01.="
		<li class='catdelete'><div style='background: url($pt/$cmspatch/templates/img/drop.png) 10px 0px no-repeat;'><input type='hidden' name='banners3[]' value='{$value}'><label>".getdb("db_menu",$value,'name')."</label>&nbsp;&nbsp;<img class='deletecategorie' src='$pt/$cmspatch/templates/img/del_cat.png'></div></li>";
	}
	$body01.="
	</ul>

	<select class='addcategorie0' name='banners3[]' id='banners3' ><option value='0'>--</option>
		";

	$body1.="
	</select></fieldset><div class='clear'></div>
	<fieldset class='left'>
	<label>Меню</label><div class='clear'></div>
	<input type='checkbox' name='menu1' value='1' ";if ($res['menu1']==1) $body1.="checked";$body1.="/> Отображать на первом уровне меню<br>
	<input type='checkbox' name='menu2' value='1' ";if ($res['menu2']==1) $body1.="checked";$body1.="/> Отображать на втором уровне меню<br>
	<input type='checkbox' name='menu3' value='1' ";if ($res['menu3']==1) $body1.="checked";$body1.="/> Отображать на третьем уровне меню<br>
	<input type='checkbox' name='menu4' value='1' ";if ($res['menu4']==1) $body1.="checked";$body1.="/> Отображать во внутреннем меню<br>
	<input type='checkbox' name='menu4_par' value='1' ";if ($res['menu4_par']==1) $body1.="checked";$body1.="/> Отображать родительское внутреннее меню</fieldset>
	<fieldset class='right'>
	<label>Шаблон</label>
	<select class='' name='tpl' id='tpl' >";
	if (empty($structure_home))
	$body1.="<option value='0'>По умолчанию</option>";
		$tpl=opendir($pt.'templates/tpl/');
			while(($tpla=readdir($tpl))!==false)
			{
				if (strlen($tpla)>5 && $tpla!='Thumbs.db') $body1.="
				<option value='$tpla' ";if ($tpla==$res['tpl'])$body1.="selected";$body1.=">$tpla</option>";
			};
		$body1.="
	</select></fieldset><div class='clear'></div> 
	<fieldset class='left'>
	<label>Каталог</label>
	<select class='' name='catalog' id='catalog' ><option value='0'>--</option>
		";


		$body11.="
	</select></fieldset>
	<fieldset class='right'>
	<label>Материалы</label>
	<select class='' name='materials' id='materials' ><option value='0'>--</option>
		";

		$body111.="
	</select></fieldset><div class='clear'></div> ";


	$body2="";
	$body22="";
	$body222="";
	

		$body2.="
	<fieldset class='left'>
	<label>Каталог</label><br><br>
	<ul class='catdeleteinsert1'>";
	$banners1=explode(',', $res['catalog2']);
	foreach ($banners1 as $key => $value) if (!empty($value)){
		$body2.="
		<li class='catdelete'><div style='background: url($pt/$cmspatch/templates/img/drop.png) 10px 0px no-repeat;'><input type='hidden' name='banners1[]' value='{$value}'><label>".getdb("db_catalog_cat",$value,'name')."</label>&nbsp;&nbsp;<img class='deletecategorie' src='$pt/$cmspatch/templates/img/del_cat.png'></div></li>";
	}
	$body2.="
	</ul>

	<select class='addcategorie1' name='banners1[]' id='banners1' ><option value='0'>--</option>
		";

		$body22.="
	</select></fieldset>
	<fieldset class='right'>
	<label>Материалы</label><br><br>
	<ul class='catdeleteinsert2'>";
	$banners2=explode(',', $res['materials2']);
	foreach ($banners2 as $key => $value) if (!empty($value)){
		$body22.="
		<li class='catdelete'><div style='background: url($pt/$cmspatch/templates/img/drop.png) 10px 0px no-repeat;'><input type='hidden' name='banners2[]' value='{$value}'><label>".getdb("db_materials_cat",$value,'name')."</label>&nbsp;&nbsp;<img class='deletecategorie' src='$pt/$cmspatch/templates/img/del_cat.png'></div></li>";
	}
	$body22.="
	</ul>

	<select class='addcategorie2'  name='banners2[]' id='banners2' ><option value='0'>--</option>
		";


		$body222.="
	</select></fieldset><div class='clear'></div> 
		";


	$body3="";
	$access_admin = explode(',', $res['access_admin']);
	$access_moder = explode(',', $res['access_moder']);
	$access_user = explode(',', $res['access_user']);
	if (empty($structure_home)){
	$body3.="
	<fieldset class='left'>
	<label>Администратор</label><div class='clear'></div>
	Вне группы <input type='checkbox' onchange=\"javascript:$('.access_admin').attr('checked', 'checked');\" name='access_admin[]' value='0' ";if (in_array(0, $access_admin) && $res['access_admin']!='') $body3.="checked";$body3.="/><br>";
	foreach ($user_group as $key => $value) {
		$body3.=$value."<input type='checkbox' class='access_admin' name='access_admin[]' value='".($key+1)."' ";if (in_array(($key+1), $access_admin)) $body3.="checked";$body3.="/><br>";
	}
	$body3.="</fieldset>
	<fieldset class='right'>
	<label>Модератор</label><div class='clear'></div>
	Вне группы <input type='checkbox' onchange=\"javascript:$('.access_moder').attr('checked', 'checked');\" name='access_moder[]' value='0' ";if (in_array(0, $access_moder) && $res['access_moder']!='') $body3.="checked";$body3.="/><br>";
	foreach ($user_group as $key => $value) {
		$body3.=$value."<input type='checkbox' class='access_moder' name='access_moder[]' value='".($key+1)."' ";if (in_array(($key+1), $access_moder)) $body3.="checked";$body3.="/><br>";
	}
	$body3.="
	</fieldset><div class='clear'></div> 
	<fieldset class='left'>
	<label>Зарегистрированный пользователь</label><div class='clear'></div>
	Вне группы <input type='checkbox' onchange=\"javascript:$('.access_user').attr('checked', 'checked');\" name='access_user[]' value='0' ";if (in_array(0, $access_user) && $res['access_user']!='') $body3.="checked";$body3.="/><br>";
	foreach ($user_group as $key => $value) {
		$body3.=$value."<input type='checkbox' class='access_user' name='access_user[]' value='".($key+1)."' ";if (in_array(($key+1), $access_user)) $body3.="checked";$body3.="/><br>";
	}
	$body3.="</fieldset>";
	} else {
			$body3.=$value."<input type='hidden' class='access_admin' name='access_admin[]' value='0' />";
		foreach ($user_group as $key => $value) {
			$body3.=$value."<input type='hidden' class='access_admin' name='access_admin[]' value='".($key+1)."' />";
		}
			$body3.=$value."<input type='hidden' class='access_moder' name='access_moder[]' value='0' />";
		foreach ($user_group as $key => $value) {
			$body3.=$value."<input type='hidden' class='access_moder' name='access_moder[]' value='".($key+1)."' />";
		}
			$body3.=$value."<input type='hidden' class='access_user' name='access_user[]' value='0' />";
		foreach ($user_group as $key => $value) {
			$body3.=$value."<input type='hidden' class='access_user' name='access_user[]' value='".($key+1)."' />";
		}
	}
	$body3.="</fieldset>
	<fieldset class='right'>
	<label>Незарегистрированный пользователь</label><div class='clear'></div>
	<input type='checkbox' onchange=\"javascript:$('.access_notuser').attr('checked', 'checked');\" name='access_notuser' value='1' ";if ($res['access_notuser']==1) $body3.="checked";$body3.="/><br>";
	$body3.="
	</fieldset><div class='clear'></div> 

		";

	$body4="";

	$timestamp = time();
	$body4.="
	<fieldset class='left'>
	<label>Уменьшить размер</label>
	<input type='checkbox' class='' id='editsize2' value='' />
	<input type='hidden' class='' id='editsize' value='0' />
	<div class='clear'></div>
    <form>
        <input id='file_upload' name='file_upload' type='file' multiple='true'>
    </form>
	</fieldset>

    <script type='text/javascript'>
        $(function() {
            $('#file_upload').uploadify({
                'fileTypeExts' : '*.jpg; *.jpeg; *.gif; *.png',
                'formData'     : {
                    'editsize' : ''+$('#editsize').val()+'',
                    'folder' : '/files/images',
                    'id_type' : '{$id_modules}',
                    'id_el' : '{$id}',
                    'timestamp' : '{$timestamp}',
                    'token'     : '".md5('unique_salt' . $timestamp)."'
                },
                'swf' : '".$pt.$cmspatch."/templates/uploadify/uploadify.swf',
                'uploader' : '".$pt.$cmspatch."/templates/uploadify/uploadify.php',
                'uploadLimit' : 50,
                'onUploadSuccess' : function(file, data, response) {
                    $('.picmodules').append(data);
                }
            });
        });

    	$(document).ready(function(){
    		$('#editsize2').change(function(){
    			if ($(this).attr('checked')=='checked') $(this).next().val('1'); else $(this).next().val('0');
		        $(function() {
		            $('#file_upload').uploadify({
		                'formData'     : {
		                    'editsize' : ''+$('#editsize').val()+'',
		                    'folder' : '/files/images',
		                    'id_type' : '{$id_modules}',
		                    'id_el' : '{$id}',
		                    'timestamp' : '{$timestamp}',
		                    'token'     : '".md5('unique_salt' . $timestamp)."'
		                },
		                'swf' : '".$pt.$cmspatch."/templates/uploadify/uploadify.swf',
		                'uploader' : '".$pt.$cmspatch."/templates/uploadify/uploadify.php',
		                'uploadLimit' : 50,
		                'onUploadSuccess' : function(file, data, response) {
		                    $('.picmodules').append(data);
		                }
		            });
		        });
    		});
    	});

    </script>
	";
	$body4.=get_all_pic_modules($id_modules,$id);

?>

<form action='' class='userInform' method='post' enctype='multipart/form-data'>
<? if (count($_POST)>0){?><h4 class="alert_success"><?=$mes?></h4><?}?>
<? if (count($_POST)>0 && !empty($mes_er)){?><h4 class="alert_error"><?=$mes_er?></h4><?}?>

<article class="module width_full">
<header><h3 class="tabs_involved"><?=$m_title?></h3>
		<ul class="tabs">
   			<li><a href="#tab1">Контент</a></li>
   			<li><a href="#tab2">Опции</a></li>
   			<li><a href="#tab3">Расширения</a></li>
   			<li><a href="#tab4">Доступ</a></li>
   			<? if ($res['status']>0){?>
   			<li><a href="#tab5">Изображения</a></li>
   			<?}?>
		</ul>
</header>
			<div class="module_content">
				<div id="tab1" class="tab_content">
				<?=$body0?>
				<?tree($structure_home,1,$res['pid'],$modul,'name');?>
				<?=$body?>
				</div>
				<div id="tab2" class="tab_content">
				<?=$body01?>
				<?tree2(0,1,0,'menu','name');?>
				<?=$body1?>
				<?tree2(0,1,$res['catalog'],'catalog_cat','name');?>
				<?=$body11?>
				<?tree2(0,1,$res['materials'],'materials_cat','name');?>
				<?=$body111?>
				</div>
				<div id="tab3" class="tab_content">
				<?=$body2?>
				<?tree2(0,1,0,'catalog_cat','name');?>
				<?=$body22?>
				<?tree2(0,1,0,'materials_cat','name');?>
				<?=$body222?>
				</div>
				<div id="tab4" class="tab_content">
				<?=$body3?>
				</div>
				<div id="tab5" class="tab_content">
				<?=$body4?>
				</div>
			</div>
<footer>
				<div class="submit_link">
					<input type='submit' value='Сохранить' name='sf' />
					<input type='submit' value='Сохранить и закрыть' name='sf1' />
				</div>
			</footer>
</article>
</form>

<? include "../../inc/footer_m.php"; ?>
Back to Top