View file dl/admin_setup.php

File size: 14.17Kb
<?php
#********************************** AgS MOD DOWNLOAD CENTR SEA *************************************#
#***************************************************************************************************#
#  /||||||||||||||| *********************  /||||||||||||||| *********************  /||||||||||||||| #
# | ||||||||||||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | |||||/////||||| ********************* | |||||/////////  ********************* | |||||/////////  #
# | |||||   | ||||| ****** E-MAIL ******* | |||||           ****** WAP/WEB ****** | |||||           #
# | |||||   | ||||| *** [email protected] *** | |||||           * http://ags.h2m.ru * | ||||||||||||||| #
# | |||||   | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# | |||||   | ||||| ********************* | |||||/////||||| ********************* |///////////||||| #
# | ||||||||||||||| ****** SKYPE ******** | |||||   | ||||| ***** MOD AUTHOR ****           | ||||| #
# | |||||////|||||| ***** agrizz15 ****** | |||||   | ||||| ***** Agris Cišs ****  /||||||||||||||| #
# | |||||   | ||||| ********************* | ||||||||||||||| ********************* | ||||||||||||||| #
# |/////    |/////  ********************* |///////////////  ********************* |///////////////  #
#***************************************************************************************************#
#********************************* MOD by AgS in 2010 @ LATVIA *************************************#


require_once"system/start.php";
require_once"system/config.php";
require_once"system/db.php";
require_once"system/head.php";
require_once"lng/$setup[lng]/lng.php";
require_once"system/functions.php";
require_once"system/cookies.php";
require_once"system/counter.php";
include_once"thm/$setup[thm]/index.php";
include_once"system/msg.php";

if ($setup['adnick']==$_SESSION['log'] && $setup['adpass']==md5($_SESSION['par']) && $_SESSION['log']!="" && md5($_SESSION['par'])!="") {


if(!isset($act)){
echo '<img src="pic/main/head.gif" alt=""> <b>'.dl_000.'</b><br><br>';
echo '<form method="post" action="admin_setup.php?act=set&amp;'.SID.'"><br>';

echo sys_prew.': <br>'.sys_yes;
if($setup['modulis_preview']=="ON"){
echo '<input name="modulis_preview" type="radio" value="ON" checked>';} else {
echo '<input name="modulis_preview" type="radio" value="ON" />';} 
echo ' &nbsp; &nbsp; ';
if($setup['modulis_preview']=="OFF"){
echo '<input name="modulis_preview" type="radio" value="OFF" checked>';} else {
echo '<input name="modulis_preview" type="radio" value="OFF" />';}
echo sys_nop.'<br>';



echo dl_109.': <br>'.sys_yes;
if($setup['marker']=="1"){
echo '<input name="marker" type="radio" value="1" checked>';} else {
echo '<input name="marker" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
if($setup['marker']=="0"){
echo '<input name="marker" type="radio" value="0" checked>';} else {
echo '<input name="marker" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_110.': <br>'.sys_yes;
if($setup['ext']=="1"){
echo '<input name="ext" type="radio" value="1" checked>';} else {
echo '<input name="ext" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
if($setup['ext']=="0"){
echo '<input name="ext" type="radio" value="0" checked>';} else {
echo '<input name="ext" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_111.': <br>'.sys_yes;
if($setup['modulis_komentari']=="1"){
echo '<input name="modulis_komentari" type="radio" value="1" checked>';} else {
echo '<input name="modulis_komentari" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
if($setup['modulis_komentari']=="0"){
echo '<input name="modulis_komentari" type="radio" value="0" checked>';} else {
echo '<input name="modulis_komentari" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_112.': <br>'.sys_yes;
        if($setup['eval_change']=="1"){
echo '<input name="eval_change" type="radio" value="1" checked>';} else {
echo '<input name="eval_change" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
        if($setup['eval_change']=="0"){
echo '<input name="eval_change" type="radio" value="0" checked>';} else {
echo '<input name="eval_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_113.': <br>'.sys_yes;
        if($setup['jad_change']=="1"){
echo '<input name="jad_change" type="radio" value="1" checked>';} else {
echo '<input name="jad_change" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
        if($setup['jad_change']=="0"){
echo '<input name="jad_change" type="radio" value="0" checked>';} else {
echo '<input name="jad_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo sys_shreder.': <br>'.sys_yes;
        if($setup['cut_change']=="1"){
echo '<input name="cut_change" type="radio" value="1" checked>';} else {
echo '<input name="cut_change" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
        if($setup['cut_change']=="0"){
echo '<input name="cut_change" type="radio" value="0" checked>';} else {
echo '<input name="cut_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_115.': <br>'.sys_yes;
        if($setup['zip_change']=="1"){
echo '<input name="zip_change" type="radio" value="1" checked>';} else {
echo '<input name="zip_change" type="radio" value="1" />';} 
echo ' &nbsp; &nbsp; ';
        if($setup['zip_change']=="0"){
echo '<input name="zip_change" type="radio" value="0" checked>';} else {
echo '<input name="zip_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_116.': <br>'.sys_yes;
        if($setup['zakaz']=="1"){
echo '<input name="zakaz" type="radio" value="1" checked>';} else {
echo '<input name="zakaz" type="radio" value="1" />';} 
 echo ' &nbsp; &nbsp; ';
       if($setup['zakaz']=="0"){
echo '<input name="zakaz" type="radio" value="0" checked>';} else {
echo '<input name="zakaz" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_117.': <br>'.sys_yes;
        if($setup['onpage_change']=="1"){
echo '<input name="onpage_change" type="radio" value="1" checked>';} else {
echo '<input name="onpage_change" type="radio" value="1" />';} 
 echo ' &nbsp; &nbsp; ';
       if($setup['onpage_change']=="0"){
echo '<input name="onpage_change" type="radio" value="0" checked>';} else {
echo '<input name="onpage_change" type="radio" value="0" />';}
echo sys_nop.'<br>';


echo dl_118.': <br>'.sys_yes;
        if($setup['preview_change']=="1"){
echo '<input name="preview_change" type="radio" value="1" checked>';} else {
echo '<input name="preview_change" type="radio" value="1" />';} 
 echo ' &nbsp; &nbsp; ';
       if($setup['preview_change']=="0"){
echo '<input name="preview_change" type="radio" value="0" checked>';} else {
echo '<input name="preview_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_119.': <br>'.sys_yes;
        if($setup['top_change']=="1"){
echo '<input name="top_change" type="radio" value="1" checked>';} else {
echo '<input name="top_change" type="radio" value="1" />';} 
 echo ' &nbsp; &nbsp; ';
       if($setup['top_change']=="0"){
echo '<input name="top_change" type="radio" value="0" checked>';} else {
echo '<input name="top_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo sys_stat.': <br>'.sys_yes;
        if($setup['stat_change']=="1"){
echo '<input name="stat_change" type="radio" value="1" checked>';} else {
echo '<input name="stat_change" type="radio" value="1" />';} 
   echo ' &nbsp; &nbsp; ';
     if($setup['stat_change']=="0"){
echo '<input name="stat_change" type="radio" value="0" checked>';} else {
echo '<input name="stat_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_121.': <br>'.sys_yes;
        if($setup['pagehand_change']=="1"){
echo '<input name="pagehand_change" type="radio" value="1" checked>';} else {
echo '<input name="pagehand_change" type="radio" value="1" />';} 
   echo ' &nbsp; &nbsp; ';
     if($setup['pagehand_change']=="0"){
echo '<input name="pagehand_change" type="radio" value="0" checked>';} else {
echo '<input name="pagehand_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo sys_src.': <br>'.sys_yes;
        if($setup['search_change']=="1"){
echo '<input name="search_change" type="radio" value="1" checked>';} else {
echo '<input name="search_change" type="radio" value="1" />';} 
  echo ' &nbsp; &nbsp; ';
      if($setup['search_change']=="0"){
echo '<input name="search_change" type="radio" value="0" checked>';} else {
echo '<input name="search_change" type="radio" value="0" />';}
echo sys_nop.'<br>';

echo dl_082.':<br>';
echo '<select name="lng">';
echo '<option value="'.$setup['lng'].'">'.$setup['lng'].'</option>';
$dir = opendir ("lng"); 
while ($lngi = readdir ($dir)) {
if (is_dir(BASE."lng/$lngi")) {
if($lngi=="." || $lngi==".." || $lngi==$setup['lng']) continue;
echo '<option value="'.$lngi.'">'.$lngi.'</option>';
}}
echo '</select><br>';
closedir ($dir);

echo dl_130.':<br>';
echo '<select name="thm">';
echo '<option value="'.$setup['thm'].'">'.$setup['thm'].'</option>';
$dir = opendir ("thm"); 
while ($wapthemes = readdir ($dir)) {

if (is_dir(BASE."thm/$wapthemes")) {
if($wapthemes=="." || $wapthemes==".." || $wapthemes==$setup['thm']) continue;
echo '<option value="'.$wapthemes.'">'.$wapthemes.'</option>';
}}
echo '</select><br>';
closedir ($dir);

echo dl_093.':<br><input name="mailing" value="'.$setup['mailing'].'" maxlength="50" /><br><br>';
echo dl_132.':<br><input name="home" value="'.$setup['home'].'" maxlength="50" /><br>';
echo dl_133.':<br><input name="dl_name" value="'.$setup['dl_name'].'" maxlength="50" /><br>';
echo dl_134.':<br><input name="dl_copyright" value="'.$setup['dl_copyright'].'" maxlength="50" /><br>';
echo dl_135.':<br><input name="dl_set_dir" value="'.$dir_script.'" maxlength="20" /><br>';
echo dl_136.':<br><input name="dir_faili" type="text" value="'.$setup['dir_faili'].'"><br>';
echo dl_137.':<br><input name="dir_about" type="text" value="'.$setup['dir_about'].'"><br>';
echo dl_138.':<br><input name="dir_screen" type="text" value="'.$setup['dir_screen'].'"><br>';
echo dl_139.':<br><input name="dir_zip" type="text" value="'.$setup['dir_zip'].'"><br>';
echo dl_140.':<br><input name="dir_themes" type="text" value="'.$setup['dir_themes'].'"><br>';
echo dl_141.':<br><input name="dir_video" type="text" value="'.$setup['dir_video'].'"><br>';
echo dl_142.':<br><input name="dir_audio" type="text" value="'.$setup['dir_audio'].'"><br>';
echo dl_143.':<br><input name="limit" type="text" value="'.$setup['limit'].'"><br>';
echo dl_144.':<br><input name="klimit" type="text" value="'.$setup['klimit'].'"><br>';
echo dl_145.':<br><input name="prev_size" type="text" value="'.$setup['prev_size'].'"><br>';
echo dl_146.':<br><input name="text_marker" type="text" value="'.$setup['text_marker'].'"><br>';
echo dl_147.':<br><input name="day_new" type="text" value="'.$setup['day_new'].'"><br>';
echo dl_148.':<br><input name="pagehand" type="text" value="'.$setup['pagehand'].'"><br>';
echo dl_149.':<br><input name="top_num" type="text" value="'.$setup['top_num'].'"><br>';
echo dl_150.':<br><input name="hackmess" type="text" value="'.$setup['hackmess'].'"><br>';
echo dl_176.':<br><input name="del_automp3" type="text" value="'.$setup['del_automp3'].'"><br>';
echo dl_177.':<br><input name="del_autozip" type="text" value="'.$setup['del_autozip'].'"><br><br>';

echo sys_sortby.':<br>';
echo'<select name="sort">';
echo'<option value="name" '.izvele_option('name',$setup['sort']).'>'.sys_soname.'</option>';
echo'<option value="size" '.izvele_option('size',$setup['sort']).'>'.sys_sosize.'</option>';
echo'<option value="data" '.izvele_option('data',$setup['sort']).'>'.sys_sodate.'</option>';
echo'<option value="load" '.izvele_option('load',$setup['sort']).'>'.sys_dwtime.'</option>';
echo'<option value="eval" '.izvele_option('eval',$setup['sort']).'>'.sys_rate.'</option></select><br>';

echo dl_152.':<br><select name="onpage">';
echo'<option '.izvele_option(10,$setup['onpage']).'>10</option>';
echo'<option '.izvele_option(15,$setup['onpage']).'>15</option>';
echo'<option '.izvele_option(20,$setup['onpage']).'>20</option>';
echo'<option '.izvele_option(25,$setup['onpage']).'>25</option>';
echo'<option '.izvele_option(30,$setup['onpage']).'>30</option></select>';
echo'<br><br>';




echo '<input value="'.sys_edit.'" type="submit" /></form><br><br>';
}


if($act=="set"){
if ($home!="" && $dl_copyright!="" && $dl_name!="" && $dl_set_dir!="" && $dir_faili!="" && $dir_about!="" && $dir_screen!="" && $dir_zip!="" && $dir_themes!="" && $dir_audio!="" && $dir_video!="" && $limit!="" && $klimit!="" && $prev_size!="" && $text_marker!="" && $day_new!="" && $pagehand!="" && $top_num!="" && $hackmess!="" && $onpage!="" && $sort!=""){
if ($modulis_preview!="" && $marker!="" && $ext!="" && $modulis_komentari!="" && $eval_change!="" && $jad_change!="" && $cut_change!="" && $zip_change!="" && $zakaz!="" && $onpage_change!="" && $preview_change!="" && $top_change!="" && $stat_change!="" && $pagehand_change!="" && $search_change!="" && $del_automp3!="" && $del_autozip!=""){
if(!empty($mailing)){


$ufile = file_get_contents(BASE."dati/cfg.dat"); 
$udata = explode("|",$ufile);

$udata[4] = $dl_set_dir;

for ($u=0; $u<$config_configkeys; $u++){
$utext.=$udata[$u].'|';}

if(!empty($dl_set_dir)){
$fp=fopen(BASE."dati/cfg.dat","a+");    
flock($fp,LOCK_EX);           
ftruncate($fp,0);                                                                
fputs($fp,$utext);
fflush($fp);
flock($fp,LOCK_UN);
fclose($fp);  
unset($utext); 
} else {
header ("Location: admin_setup.php?sayer=mp_set_no&".SID);}



foreach($_POST as $key => $value) {
mysql_query("UPDATE `".$MY_pre."iestatijumi` SET `value` = '".tirit($value)."' WHERE `name` = '$key';");


}

header ("Location: admin.php?sayer=mp_set_yes&".SID);


} else {echo '<b>'.dl_100.'</b><br>';}
} else {echo '<b>'.dl_125.'</b><br>';}
} else {echo '<b>'.dl_162.'</b><br>';}
}//set act
	echo '<br><img src="pic/main/dot.gif" alt=""> <a href="index.php?'.SID.'">'.sys_dl.'</a><br>';
	echo '<img src="pic/main/home.gif" alt=""> <a href="'.$setup['home'].'/?'.SID.'">'.sys_home.'</a><br>';

}//admin
include_once"thm/$setup[thm]/foot.php";


?>