'.$title_d.$title_g.$title_s.''.$title; $adm_description=$title.''.$mt_dr.''; $adm_meta_keywords=''.$mt_ml.''.$meta_keywords.''.$mt_mr.''; } //Page info generate $title=$mt_tl.$title_d.$title_g.$title_s.$title; $description=$title.$mt_dr; $meta_keywords=$mt_ml.$meta_keywords.$mt_mr; //Administrative part ---------------------------------------------------------------------------------------------------------------------------- if (auth()){ if ($adm_do_mt&&$part){ if ($adm_do_mt=="add_o"&&mysql_num_rows(mysql_query ("select id from $table_mt where mt_did=$part"))) {$adm_do_mt="mod_o"; $query_mt="select * from $table_mt where mt_did=$part"; } $mt_did=$part; } else if ($adm_do_mt&&!$part&&$group){ if ($adm_do_mt=="add_o"&&mysql_num_rows(mysql_query ("select id from $table_mt where mt_gid=$group"))) {$adm_do_mt="mod_o"; $query_mt="select * from $table_mt where mt_gid=$group"; } $mt_gid=$group; } else if ($adm_do_mt&&!$part&&!$group&&$section){ if ($adm_do_mt=="add_o"&&mysql_num_rows(mysql_query ("select id from $table_mt where mt_sid=$section"))) {$adm_do_mt="mod_o"; $query_mt="select * from $table_mt where mt_sid=$section"; } $mt_sid=$section; } else if ($adm_do_mt&&!$part&&!$group&&!$section){ if ($adm_do_mt=="add_o"&&mysql_num_rows(mysql_query ("select id from $table_mt where mt_sid=' ' and mt_gid=' ' and mt_did=' '"))) {$adm_do_mt="mod_o"; $query_mt="select * from $table_mt where mt_sid=' ' and mt_gid=' ' and mt_did=' '"; } } switch ($adm_do_mt) { //--------------------------------------------------------------------- // modify meta tags //--------------------------------------------------------------------- case add_i: //add process $smartmsg=_AD_MT_ADD; $poster.=$smartmsg; mysql_query ("insert into $table_mt (mt_sid, mt_gid, mt_did, mt_mleft, mt_mright, mt_tleft, mt_tright, mt_dright) values ('$mt_sid', '$mt_gid', '$mt_did', '$mt_mleft', '$mt_mright', '$mt_tleft', '$mt_tright', '$mt_dright')") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; unset ($adm_do_mt); break; case add_o: //add prepare $smartmsg=_AD_MT_ADD; $poster.=$smartmsg; $form_action='?adm_do_mt=add_i&view='.$view.'&section='.$section.'&group='.$group.'&part='.$part; $preset_1= '
Заголовок
title
Допись в начале заголовка

Стандартно:
'.$title.'

Допись в конце заголовка
Ключевые слова
keywords
Допись в начале ключевых слов (в формате "слово, слово, слово, ")

Стандартно:
'.$meta_keywords.'


Допись в конце ключевых слов (в формате ", слово, слово, слово")
Описание
discription
Стандартно:
'.$description.'


Допись в конце описания страницы
'; $poster.= $preset_1; unset ($form_action, $adm_do_mt); break; case mod_o: //modify prepare $smartmsg=_AD_MT_EDIT; $poster.=$smartmsg; $result_mt=mysql_query ($query_mt); $data_mt=mysql_fetch_array ($result_mt); $mt_mleft=$data_mt[mt_mleft]; $mt_mright=$data_mt[mt_mright]; $mt_tleft=$data_mt[mt_tleft]; $mt_tright=$data_mt[mt_tright]; $mt_dright=$data_mt[mt_dright]; $form_action='?adm_do_mt=mod_i&view='.$view.'&section='.$section.'&group='.$group.'&part='.$part; $preset_1= '
Заголовок
title
Допись в начале заголовка

Стандартно:
'.$adm_title.'

Допись в конце заголовка
Ключевые слова
keywords
Допись в начале ключевых слов (в формате "слово, слово, слово, ")

Стандартно:
'.$adm_meta_keywords.'


Допись в конце ключевых слов (в формате ", слово, слово, слово")
Описание
discription
Стандартно:
'.$adm_description.'


Допись в конце описания страницы
'; $poster.= $preset_1; mysql_free_result($result); unset ($form_action, $adm_do_mt); break; case mod_i://modify process $smartmsg=_AD_MT_MOD; $poster.=$smartmsg; $mt_mleft=html_parse ($mt_mleft, "cut_ends"); $mt_mright=html_parse ($mt_mright, "cut_ends"); $mt_tleft=html_parse ($mt_tleft, "cut_ends"); $mt_tright=html_parse ($mt_tright, "cut_ends"); $mt_dright=html_parse ($mt_dright, "cut_ends"); mysql_query ("update $table_mt set mt_mleft='$mt_mleft' where id=$mt_id") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table_mt set mt_mright='$mt_mright' where id=$mt_id") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table_mt set mt_tleft='$mt_tleft' where id=$mt_id") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table_mt set mt_tright='$mt_tright' where id=$mt_id") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table_mt set mt_dright='$mt_dright' where id=$mt_id") or die (message(_SQL_UPD_NF,$server)); $smartmsg="

"._EDT_OK."
\n"; $poster.=$smartmsg; unset ($adm_do_mt); break; //--------------------------------------------------------------------- } //--------------------------------------------------------------------- // manage section //--------------------------------------------------------------------- switch ($adm_do_fs) { //--------------------------------------------------------------------- case move: //move sec left&right $result_sps=mysql_query ("select * from $table3 where id=$spp"); $pin=mysql_fetch_array ($result_sps); $result_sps_to=mysql_query ("select * from $table3 where id=$spp_to"); $pint=mysql_fetch_array ($result_sps_to); mysql_query ("update $table3 set sps_stamp=$pin[sps_stamp] where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table3 set sps_stamp=$pint[sps_stamp] where id=$spp") or die (message(_SQL_UPD_NF,$server)); unset ($adm_do_fs); break; //--------------------------------------------------------------------- case add_i: //add process $smartmsg=_AD_FS_ADD; $poster.=$smartmsg; $sps_cpu=translitit($sps_name); $sps_name=html_parse ($sps_name, "from"); $stamp=time(); mysql_query ("insert into $table3 (sps_name, sps_cpu, sps_m_lvl, sps_sign, sps_img, sps_lnk, sps_stamp) values ('$sps_name', '$sps_cpu', '$sps_m_lvl', '', '', '', '$stamp')") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; unset($adm_do_fs); break; case add_o: //add prepare $smartmsg=_AD_FS_ADD; $poster.=$smartmsg; $form_action='?adm_do_fs=add_i&view='.$view; $preset_1= '
Название раздела


Установка отображения в меню


'; $poster.= $preset_1; unset($adm_do_fs, $form_action); break; case mod_o: //modify prepare if ($section&&$section!=null){ $smartmsg=_AD_FS_EDIT; $poster.=$smartmsg; $result=mysql_query ("select * from $table3 where id=$section"); $d=mysql_fetch_array ($result); $sps_name = html_parse ($d["sps_name"], "from"); $form_action='?adm_do_fs=mod_i&view='.$view.'&section='.$section; $preset_1= '
Название раздела


Установка отображения в меню


'; $poster.= $preset_1; mysql_free_result($result); } unset($adm_do_fs, $form_action); break; case mod_i://modify process $smartmsg=_AD_FS_MOD; $poster.=$smartmsg; $sps_cpu=translitit($sps_name); $sps_name=html_parse ($sps_name, "from"); @mysql_query ("update $table3 set sps_name='$sps_name' where id=$section") or die (message(_SQL_UPD_NF,$server)); @mysql_query ("update $table3 set sps_m_lvl='$sps_m_lvl' where id=$section") or die (message(_SQL_UPD_NF,$server)); @mysql_query ("update $table3 set sps_cpu='$sps_cpu' where id=$section") or die (message(_SQL_UPD_NF,$server)); $smartmsg="

"._EDT_OK."
\n"; $poster.=$smartmsg; unset($adm_do_fs); break; case delete://delete if ($del_ok=="ok") { @mysql_query ("delete from $table2 where spd_sid=$section") or die (message(_SQL_DEL_NF,$server)); @mysql_query ("delete from $table where spg_sid=$section") or die (message(_SQL_DEL_NF,$server)); @mysql_query ("delete from $table3 where id=$section") or die (message(_SQL_DEL_NF,$server)); $smartmsg="

"._DEL_OK."
\n"; $poster.=$smartmsg; } else { $smartmsg=_AD_FS_DEL; $poster.=$smartmsg; $smartmsg='


ДА
'."\n"; $poster.=$smartmsg; } unset($adm_do_fs); break; //--------------------------------------------------------------------- } //--------------------------------------------------------------------- // manage group //--------------------------------------------------------------------- switch ($adm_do_fg) { case move: //move sec left&right $result_sps=mysql_query ("select * from $table where id=$spp"); $pin=mysql_fetch_array ($result_sps); $result_sps_to=mysql_query ("select * from $table where id=$spp_to"); $pint=mysql_fetch_array ($result_sps_to); mysql_query ("update $table set spg_stamp=$pin[spg_stamp] where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table set spg_stamp=$pint[spg_stamp] where id=$spp") or die (message(_SQL_UPD_NF,$server)); unset($adm_do_fg); break; //--------------------------------------------------------------------- //add process case add_i: $smartmsg=_AD_FG_ADD; $poster.=$smartmsg; $spg_cpu=translitit($spg_name); $spg_name=html_parse ($spg_name, "from"); if ($spg_top!="1"){$spg_top="0";} $stamp=time(); mysql_query ("insert into $table (spg_sid, spg_name, spg_cpu, spg_sign, spg_img, spg_lnk, spg_stamp) values ('$section','$spg_name', '$spg_cpu','', '', '', $stamp)") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; unset($adm_do_fg); break; //add prepare case add_o: $smartmsg=_AD_FG_ADD; $poster.=$smartmsg; $form_action='?adm_do_fg=add_i&view='.$view.'&section='.$section; $preset_1= '
Название группы

'; $poster.= $preset_1; unset($adm_do_fg, $form_action); break; //modify prepare case mod_o: if ($section&&$group&&$group!=null){ $smartmsg=_AD_FG_EDIT; $poster.=$smartmsg; $result=mysql_query ("select * from $table where id=$group"); $d=mysql_fetch_array ($result); $spg_name=html_parse ($d["spg_name"], "from"); $form_action='?adm_do_fg=mod_i&view='.$view.'&section='.$section.'&group='.$group; $preset_1= '
Название группы

'; $poster.= $preset_1; mysql_free_result($result); } unset($adm_do_fg, $form_action); break; //modify process case mod_i: $smartmsg=_AD_FG_MOD; $poster.=$smartmsg; $spg_cpu=translitit($spg_name); $spg_name=html_parse ($spg_name, "from"); @mysql_query ("update $table set spg_sid='$section' where id=$group") or die (message(_SQL_UPD_NF,$server)); @mysql_query ("update $table set spg_name='$spg_name' where id=$group") or die (message(_SQL_UPD_NF,$server)); @mysql_query ("update $table set spg_cpu='$spg_cpu' where id=$group") or die (message(_SQL_UPD_NF,$server)); $smartmsg="

"._EDT_OK."
\n"; $poster.=$smartmsg; unset($adm_do_fg); break; //delete case delete: if ($del_ok=="ok") { @mysql_query ("delete from $table2 where spd_gid=$group") or die (message(_SQL_DEL_NF,$server)); @mysql_query ("delete from $table where id=$group") or die (message(_SQL_DEL_NF,$server)); $smartmsg="

"._DEL_OK."
\n"; $poster.=$smartmsg; } else { $smartmsg=_AD_FG_DEL; $poster.=$smartmsg; $smartmsg='


ДА
'."\n"; $poster.=$smartmsg; } unset($adm_do_fg); break; //--------------------------------------------------------------------- } //--------------------------------------------------------------------- // manage document //--------------------------------------------------------------------- switch ($adm_do_fd) { //--------------------------------------------------------------------- case mod_dub: //dub to id mysql_query ("update $table2 set spd_dub='$spp' where id=$part") or die (message(_SQL_UPD_NF,$server)); if ($pin[spd_did]){$part=$pin[spd_did];} else if ($pin[spd_local]=="0"){$part=$part;} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]) {$part=""; $group=$pin[spd_gid];} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]=="") {$part=""; $section=$pin[spd_sid];} unset ($adm_do_fd); break; //--------------------------------------------------------------------- //--------------------------------------------------------------------- case move: //move document left&right $result_spd=mysql_query ("select * from $table2 where id=$spp"); $pin=mysql_fetch_array ($result_spd); $result_spd_to=mysql_query ("select * from $table2 where id=$spp_to"); $pint=mysql_fetch_array ($result_spd_to); mysql_query ("update $table2 set spd_stamp=$pin[spd_stamp] where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_stamp=$pint[spd_stamp] where id=$spp") or die (message(_SQL_UPD_NF,$server)); if ($pin[spd_did]){$part=$pin[spd_did];} else if ($pin[spd_local]=="0"){$part=$part;} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]) {$part=""; $group=$pin[spd_gid];} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]=="") {$part=""; $section=$pin[spd_sid];} unset ($adm_do_fd); break; //--------------------------------------------------------------------- case mod_split: //mode split mysql_query ("update $table2 set spd_cols='$spp' where id=$part") or die (message(_SQL_UPD_NF,$server)); $result_spd=mysql_query ("select * from $table2 where id=$part"); $pin=mysql_fetch_array ($result_spd); if ($pin[spd_did]){$part=$pin[spd_did];} else if ($pin[spd_local]=="0"){$part=$part;} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]) {$part=""; $group=$pin[spd_gid];} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]=="") {$part=""; $section=$pin[spd_sid];} unset ($adm_do_fd); break; //--------------------------------------------------------------------- case mod_resize: //resize mysql_query ("update $table2 set spd_break='$spp' where id=$part") or die (message(_SQL_UPD_NF,$server)); $result_spd=mysql_query ("select * from $table2 where id=$part"); $pin=mysql_fetch_array ($result_spd); if ($pin[spd_did]){$part=$pin[spd_did];} else if ($pin[spd_local]=="0"){$part=$part;} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]) {$part=""; $group=$pin[spd_gid];} else if ($pin[spd_local]=="1"&&$pin[spd_did]==""&&$pin[spd_gid]=="") {$part=""; $section=$pin[spd_sid];} unset ($adm_do_fd); break; //--------------------------------------------------------------------- //add process case add_i: $spd_cpu=translitit($spd_name); $spd_name=html_parse ($spd_name, "from"); $spd_info=html_parse ($spd_info, "html"); if ($spd_did){$spd_local="1";} $smartmsg=_AD_FD_ADD; $poster.=$smartmsg; $r_tim=time(); mysql_query ("insert into $table2 (spd_sid, spd_gid, spd_did, spd_name, spd_cpu, spd_info, spd_local, spd_counter, spd_type, spd_plugin, spd_sign, spd_stamp, spd_gall_col, spd_break, spd_cols, spd_dub) values ('$section', '$spd_gid', '$spd_did', '$spd_name', '$spd_cpu', '$spd_info', '$spd_local', '0' ,'$spd_type', '$spd_plugin', '', $r_tim, $spd_gall_col, $spd_break, '', '')") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; unset ($adm_do_fd); break; //add prepare case add_o: $smartmsg=_AD_FD_ADD; $poster.=$smartmsg; if ($group&&!$part) { $select="
отношение документа к группе
"; $select.='

'."\n"; mysql_free_result($result2); } if ($part) { $select_2=' '."\n".' '."\n".' '; } else { $select_2=''; } $select_3=' '; $select_4=''; $form_action='?adm_do_fd=add_i&view='.$view.'&section='.$section.'&group='.$group; $preset_1= '


Имя документа

'.$select.'
Положение галереи картинок
'.$select_3.'

если выбран режим галереи
укажите колличество столбцов

'.$select_4.'

Вложенность нового документа относительно нынешнего положения на сайте
'.$select_2.'


Подключение модуля разширений


Содержание



Расширить блок в размер?
'."\n"; $poster.= $preset_1; unset ($adm_do_fd, $form_action); break; //modify prepare case mod_o: $smartmsg=_AD_FD_EDIT; $poster.=$smartmsg; $result=mysql_query ("select * from $table2 where id=$part"); $d=mysql_fetch_array ($result); $spd_gid=$d["spd_gid"]; $spd_name=html_parse ($d[spd_name], "to"); $spd_info=html_parse ($d[spd_info], "html"); if ($group&&!$d[spd_did]){ $select="
отношение документа к группе
"; $select.='

'."\n"; } if (!$d["spd_did"]){ $select2=''."\n"; } else { $select2=''."\n".''."\n".''; } $select3=''."\n"; $select_4=''; unset ($sel); if ($d[spd_break]=="1"){$sel=' selected';} $select5=''; if ($d[spd_sign]=="1"){$sel=' selected';} $select6=''; $form_action='?adm_do_fd=mod_i&view='.$view.'&section='.$section.'&group='.$group.'&part='.$d[id]; $preset_1= '


Имя документа


'.$select.'
Положение галереи картинок
'.$select3.'

если выбран режим галереи
укажите колличество столбцов

'.$select_4.'
Вложенность нового документа относительно нынешнего положения на сайте
'.$select2.'

Содержание


Расширить блок в размер?
'.$select5.'
Вид вывода блока
'.$select6.'

'."\n"; $poster.= $preset_1; mysql_free_result($result); unset ($adm_do_fd, $form_action); break; //modify process case mod_i: if ($part){ $smartmsg=_AD_FD_MOD; $poster.=$smartmsg; $spd_cpu=translitit($spd_name); $spd_info=html_parse ($spd_info,"html"); $spd_name=html_parse ($spd_name,"from"); if ($spd_gid){ $result = mysql_query ("select * from $table where id=$spd_gid"); $d = mysql_fetch_array($result); $spd_sid=$d['spg_sid']; mysql_free_result($result); } else { $spd_sid=$section; } mysql_query ("update $table2 set spd_sid='$spd_sid' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_gid='$spd_gid' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_name='$spd_name' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_info='$spd_info' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_local='$spd_local' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_type='$spd_type' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_cpu='$spd_cpu' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_break='$spd_break' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_gall_col='$spd_gall_col' where id=$part") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table2 set spd_sign='$spd_sign' where id=$part") or die (message(_SQL_UPD_NF,$server)); } $smartmsg="

".$part._EDT_OK."
\n"; $poster.=$smartmsg; unset ($adm_do_fd); break; //delete case delete: if ($del_ok=="ok") { $result= mysql_query ("select * from $table4 where spp_did=$part"); while($d = mysql_fetch_array($result)){ $file_full_path=$ilocation."/".$d[spp_name]; $tmb_full_path=$ilocation."/tmb_".$d[spp_name]; if (file_exists($file_full_path)) { if (@unlink ($file_full_path)) { $poster.= _FILE_DEL_OK;} else {$poster.= _FILE_DEL_ERR;} } else {$poster.= _FILE_DEL_NF;} if (file_exists($tmb_full_path)){ if (@unlink ($tmb_full_path)){ $poster.= _FILE_DEL_OK; }else {$poster.= _FILE_DEL_ERR;}}else {$poster.= _FILE_DEL_NF;} @mysql_query ("delete from $table4 where id=$d[id]") or die (message(_SQL_DEL_NF,$server)); } @mysql_query ("delete from $table2 where spd_did=$part") or die (message(_SQL_DEL_NF,$server)); @mysql_query ("delete from $table2 where id=$part") or die (message(_SQL_DEL_NF,$server)); $smartmsg="

"._DEL_OK."
\n"; $poster.=$smartmsg; } else { $smartmsg=_AD_FD_DEL; $poster.=$smartmsg; $smartmsg='


ДА
'."\n"; $poster.=$smartmsg; } unset ($adm_do_fd, $part); break; //--------------------------------------------------------------------- } //--------------------------------------------------------------------- // manage photo //--------------------------------------------------------------------- switch ($adm_do_fp) { case add_i: //add process $smartmsg=_AD_FP_ADD; $poster.=$smartmsg; $spp_desc=html_parse ($spp_desc, from); if ($spp_top=='1'){ } else if ($spp_top=='2'){ $spp_link=$spp_link_2; } else if ($spp_top=='3'){ $spp_link=$spp_link_3; } else {$spp_top='0';} if ($spp_name and $spp_name!="none"){ $image_name=rndtime().".jpg"; upload ($ilocation,'spp_name',$image_name); $image=@ImageLoad($ilocation."/".$image_name); $image2=$image; if ($spp_img_size!="0"){ $image2=@resize ($image2,$spp_img_size,$spp_img_size); } $image2=@addcopyright($image2,$wt_text); ImageJPEG($image2, $ilocation."/".$image_name,80); if ($spp_tmb_size!="0"){ $image=@cut ($image, $spp_tmb_size, $spp_tmb_size); } ImageJPEG($image, $ilocation."/tmb_".$image_name,85); ImageDestroy($image); ImageDestroy($image2); @chmod($ilocation."/tmb_".$image_name, 0755); @chmod($ilocation."/".$image_name, 0755); } else {$image_name="";} mysql_query ("insert into $table4 (spp_did, spp_name, spp_desc, spp_top, spp_link, spp_tmb, spp_ban) values ('$part', '$image_name', '$spp_desc', '$spp_top', '$spp_link', '$spp_tmb_size', '')") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; $adm_do_fp=""; break; case add_o: //add prepare $smartmsg=_AD_FP_ADD; $poster.=$smartmsg; $select=''."\n"; $spp_tmb_size=array("0", "60","80","100","120","150","180","200"); $select2=''."\n"; $spp_img_size=array("0", "400","600","800","1024","1280"); $select3=''."\n"; $preset_1= '
Фото:


  размер миниатюры
'.$select2.'
размер фото
'.$select3.'
стандартное маленькое фото
разрешить просмотр большого фото
ссылаться на документ
'.$select.'
ссылаться на www, email

подпись:
'; @mysql_free_result($result2); $poster.= $preset_1; $adm_do_fp=""; break; case mod_o: //modify prepare $smartmsg=_AD_FP_EDIT; $poster.=$smartmsg; $result=mysql_query ("select * from $table4 where id=$spp"); $p=mysql_fetch_array ($result); $p[spp_desc]=html_parse ($p[spp_desc], "to"); $p[spp_link]=html_parse ($p[spp_link], "to"); $spp_img_size=array("0", "400","600","800","1024","1280"); $select3=''."\n"; $spp_tmb_size=array("0","60","80","100","120","150","180","200"); $select2=''."\n"; $select=''."\n"; if ($p[spp_top]=="3"){$spp_link_3=$p[spp_link];} $preset_2=' checked="checked"'; if ($p[spp_top]=='1'){ $sw_2[1]=$preset_2; } else if ($p[spp_top]=='2'){ $sw_2[2]=$preset_2; } else if ($p[spp_top]=='3'){ $sw_2[3]=$preset_2; } else {$sw_2[0]=$preset_2;} if ($p[spp_name]) { $tmbpatch=$ilocation.'/tmb_'.$p["spp_name"]; $preset_3="\n"; }else { $preset_3="Фото отсутствует";} $preset_1= '
Фото:

'.$preset_3.' размер миниатюры
'.$select2.'
размер фото
'.$select3.'


стандартное маленькое фото
разрешить просмотр большого фото
ссылаться на документ
'.$select.'
ссылаться на www, email

подпись:
'; $poster.= $preset_1; mysql_free_result($result); $adm_do_fp=""; break; case mod_i://modify process $smartmsg=_AD_FP_MOD; $poster.=$smartmsg; $result=mysql_query ("select * from $table4 where id=$spp"); $d=mysql_fetch_array ($result); $spp_desc=html_parse ($spp_desc, "from"); $spp_link=html_parse ($spp_link, "from"); if ($spp_top=='1'){ } else if ($spp_top=='2'){ $spp_link=$spp_link_2; } else if ($spp_top=='3'){ $spp_link=$spp_link_3; } else {$spp_top='0';} if ($spp_name and $spp_name!="none"){ if ($d[spp_name]) { $image_name=$d[spp_name]; } else { $image_name=rndtime().".jpg"; $spp_name=$image_name; mysql_query ("update $table4 set spp_name='$spp_name' where id=$spp") or die (message(_SQL_UPD_NF,$server)); } upload ($ilocation,'spp_name',$image_name); $image=@ImageLoad($ilocation."/".$image_name); $image2=$image; if ($spp_img_size!="0"){ $image2=@resize ($image2,$spp_img_size,$spp_img_size); } if ($spp_tmb_size!="0"){ $image=@cut ($image, $spp_tmb_size, $spp_tmb_size); } ImageJPEG($image, $ilocation."/tmb_".$image_name,85); $image2=@addcopyright($image2,$wt_text); ImageJPEG($image2, $ilocation."/".$image_name,80); ImageDestroy($image); ImageDestroy($image2); @chmod($ilocation."/tmb_".$image_name, 0755); @chmod($ilocation."/".$image_name, 0755); }else {$image_name="";} if ($spp_name==""&&$d[spp_name]&&$d[spp_tmb]!=$spp_tmb_size){ $image_name=$d[spp_name]; $image=@ImageLoad($ilocation."/".$image_name); $poster.= "Загрузка большого изображения - ОК.
"; if ($spp_tmb_size!="0"){ $image=@cut ($image, $spp_tmb_size, $spp_tmb_size); } $poster.= "
Выполнение процедуры изменения размеров ......
"; $poster.= "
Удаление старой миниатюры
"; if (file_exists($ilocation."/tmb_".$image_name)) { if (@unlink ($ilocation."/tmb_".$image_name)) { $poster.= _FILE_DEL_OK;} else {$poster.= _FILE_DEL_ERR;} } else {$poster.= _FILE_DEL_NF;} $poster.= "Добавление новой
"; if ( ImageJPEG($image, $ilocation."/tmb_".$image_name,85)){ $poster.= _FILE_ADD_OK;} else {$poster.= _FILE_ADD_ERR;} ImageDestroy($image); @chmod($ilocation."/tmb_".$image_name, 0755); } mysql_query ("update $table4 set spp_tmb='$spp_tmb_size' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_desc='$spp_desc' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_top='$spp_top' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_link='$spp_link' where id=$spp") or die (message(_SQL_UPD_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; $adm_do_fp=""; break; case delete://delete $smartmsg=_AD_FP_DEL; $poster.=$smartmsg; $result= mysql_query ("select * from $table4 where id=$spp"); $d = mysql_fetch_array($result); $file_full_path=$ilocation."/".$d[spp_name]; $tmb_full_path=$ilocation."/tmb_".$d[spp_name]; $smartmsg="Фотография:
\n$prob$prob$prob$prob"; $poster.=$smartmsg; if (file_exists($file_full_path)) { if (@unlink ($file_full_path)) { $poster.= _FILE_DEL_OK;} else {$poster.= _FILE_DEL_ERR;} } else {$poster.= _FILE_DEL_NF;} $smartmsg="Мини фото:
\n$prob$prob$prob$prob"; $poster.=$smartmsg; if (file_exists($tmb_full_path)){ if (@unlink ($tmb_full_path)){ $poster.= _FILE_DEL_OK; }else {$poster.= _FILE_DEL_ERR;}}else {$poster.= _FILE_DEL_NF;} @mysql_query ("delete from $table4 where id=$spp") or die (message(_SQL_DEL_NF,$server)); $part=$d[spp_did]; mysql_free_result($result); $adm_do_fp=""; break; //--------------------------------------------------------------------- case move: //move photo left&right $result_spp=mysql_query ("select * from $table4 where id=$spp"); $pin=mysql_fetch_array ($result_spp); $result_spp_to=mysql_query ("select * from $table4 where id=$spp_to"); $pint=mysql_fetch_array ($result_spp_to); mysql_query ("update $table4 set spp_did='$pin[spp_did]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_name='$pin[spp_name]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_desc='$pin[spp_desc]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_top='$pin[spp_top]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_link='$pin[spp_link]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_tmb='$pin[spp_tmb]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_ban='$pin[spp_ban]' where id=$spp_to") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_did='$pint[spp_did]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_name='$pint[spp_name]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_desc='$pint[spp_desc]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_top='$pint[spp_top]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_link='$pint[spp_link]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_tmb='$pint[spp_tmb]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); mysql_query ("update $table4 set spp_ban='$pint[spp_ban]' where id=$spp") or die (message(_SQL_UPD_NF,$server)); $adm_do_fp=""; break; //--------------------------------------------------------------------- } //--------------------------------------------------------------------- // manage banner //--------------------------------------------------------------------- switch ($adm_do_bn) { case add_i: //add process $smartmsg="Добавление баннера
\n"; $poster.=$smartmsg; $file_name = $HTTP_POST_FILES['bn_photo']['name']; $file_name = strToLower ($file_name); $r = array ("/ /"); $p = array ("_"); $file_name=preg_replace ($r, $p, $file_name); upload ($banner_loc,'bn_photo',$file_name); echo $file_name; $bn_text=html_parse ($bn_text, "from"); mysql_query ("insert into $table_bn (bn_photo, bn_link, bn_text, bn_level, bn_prc) values ('$file_name', '$bn_link', '$bn_text', '', '')") or die (message(_SQL_INS_NF,$server)); $smartmsg="


"._ADD_OK."
\n"; $poster.=$smartmsg; $adm_do_bn=""; break; case add_o: //add prepare $smartmsg="Добавление баннера:
"; $poster.=$smartmsg; $preset_1= '
Ссылка


Баннер



Текст под баннером


'; $poster.= $preset_1; $adm_do_bn=""; break; case mod_o: //modify prepare if ($id){ $smartmsg="Редактирование баннера:
"; $poster.=$smartmsg; $result=mysql_query ("select * from $table_bn where id=$id"); $bn=mysql_fetch_array ($result); $preset_1= '
Ссилка


Текст под баннером


'; $poster.= $preset_1; } $adm_do_bn=""; break; case mod_i://modify process $smartmsg="Изменение баннера:
"; $poster.=$smartmsg; @mysql_query ("update $table_bn set bn_link='$bn_link' where id=$id") or die (message(_SQL_DEL_NF,$server)); @mysql_query ("update $table_bn set bn_text='$bn_text' where id=$id") or die (message(_SQL_DEL_NF,$server)); $smartmsg="

"._EDT_OK."
\n"; $poster.=$smartmsg; $adm_do_bn=""; break; case delete: //delete if ($del_ok=="ok") { @mysql_query ("delete from $table_bn where id=$id") or die (message(_SQL_DEL_NF,$server)); $smartmsg="

"._DEL_OK."
\n"; $poster.=$smartmsg; } else { $smartmsg="

Вы уверены что хотите удалить?
\n"; $poster.=$smartmsg; $smartmsg='


ДА
'."\n"; $poster.=$smartmsg; } $adm_do_bn=""; break; //--------------------------------------------------------------------- } $preset_1=""; } //Page Render Start ---------------------------------------------------- //---------------------------------------------------------------------- ?> <? echo $title;?>