ÿØÿà JFIF ` ` ÿþxØ
| Server IP : 109.234.164.53 / Your IP : 216.73.216.110 Web Server : Apache System : Linux cervelle.o2switch.net 4.18.0-553.32.1.lve.el8.x86_64 #1 SMP Thu Dec 19 13:14:03 UTC 2024 x86_64 User : computer3 ( 1098) PHP Version : 7.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/computer3/la-chistera.com/seo-mailing/settings/ |
Upload File : |
<?php
if(isset($_GET['del_lang']) && ($_GET['del_lang'].'php' <> $_SET['lang']) && $_SESSION['PERM'][14]['r'] == 1){
$set_lang = explode('.',$_SET['lang']);
echo $set_lang[0];
unlink($INFO['lang'].$_GET['del_lang'].".php");
?>
<script type="text/javascript">
document.location.href="?settings&edit_lang=<?php echo $set_lang[0];?>";
</script>
<?php }
if(count($_POST) && isset($_POST['la']) && $_SESSION['PERM'][14]['e'] == 1){
if(fopen($INFO['lang'].$_POST['la'].".php", "r")){
$code = '<?php $name_lang = "'.$_POST['name_lang'].'";
$lang = array(';
foreach($_POST['lang'] as $key => $val){
$key = str_replace("\'", '', $key);
$code .= "'".$key."' => '".$val."',\n";
}
$code .=')'."\n";
$code .='?>';
$code = str_replace("''", "\"", $code);
$fp = fopen($INFO['lang'].$_POST['la'].".php", 'w+');
$conf_test = fwrite($fp, $code);
fclose($fp);
}?>
<script type="text/javascript">
document.location.href="?settings&edit_lang=<?php echo $_POST['la']?>";
</script>
<?php }elseif(count($_POST) && isset($_POST['language']) && $_SESSION['PERM'][14]['a'] == 1){
$trans = include("lang/".$_SET['lang']);
$_POST['name_file'] = strtolower($_POST['name_file']);
if(@filesize("lang/".$_POST['name_file'].".php") < 1){
$code = '<?php $name_lang = "'.trim($_POST['language']).'";
$lang = array(';
foreach($lang as $key => $val){
$val = str_replace("'", '', $key);
$code .= '"'.$key.'" => "'.$key.'",'."\n";
}
$code .=')'."\n";
$code .='?>';
$fp = fopen($INFO['lang'].$_POST['name_file'].".php", 'w+');
$conf_test = fwrite($fp, $code);
fclose($fp);
}?>
<script type="text/javascript">
document.location.href="?settings&edit_lang=<?php echo $_POST['name_file']?>";
</script>
<?php }
if(isset($_GET['generation']) && $_SESSION['PERM'][14]['e'] == 1){
$files_array = array('groups','settings','tasks','users','archives','nav','tools','login','embed','autoresponders');
include($INFO['lang'].$_GET['generation'].".php");
if(fopen($INFO['lang'].$_GET['generation'].".php", "r")){
$code_array =array();
$code = '<?php $name_lang = "'.$name_lang.'";
$lang = array(';
foreach($files_array as $dir){
$res=array();
$fp=scandir($dir);
if($fp[2]){
for($i=2,$c=count($fp);$i<$c;$i++){
if(is_dir($fd=$dir."/".$fp[$i])){
$res[$dir][$fd]=array_shift(scandir($fd));
}else{
$res[$dir][]=$fp[$i];
}
}
}
foreach($res as $file_name){
foreach($file_name as $file){
$regexp_text = file_get_contents($dir."/".$file);
$regexp_code = "|__\((.*)\)|imuUs";
preg_match_all($regexp_code,$regexp_text,$out);
asort($out[1]);
foreach($out[1] as $val){
$val = str_replace("'", '', $val);
if(isset($lang[$val])){
$code_array[$val] = $lang[$val];
}else{
$code_array[$val] = $val;
}
}
}
}
}
$code_array=array_unique($code_array);
ksort($code_array);
foreach($code_array as $key => $val){
$pos = strpos($key,'[');
if(strlen($key) > 0 && ($pos == false)){
$val = str_replace("'", '', $val);
if(isset($lang[$key])){
$code .= '"'.$key.'" => "'.$val.'",'."\n";
}else{
$code .= '"'.$val.'" => "'.$val.'",'."\n";
}
}
}
$code .=')'."\n";
$code .='?>';
if(file_perms($INFO['lang'].$_GET['generation'].".php") <> 66) {
chmod($INFO['lang'].$_GET['generation'].".php",0666);
}
$fp = fopen($INFO['lang'].$_GET['generation'].".php", 'w+');
$conf_test = fwrite($fp, $code);
fclose($fp);
}
?>
<script type="text/javascript">
document.location.href="?settings&edit_lang=<?php echo $_GET['edit_lang']?>";
</script>
<?php } ?>
<?php if(strlen($_GET['edit_lang'])>1) include($INFO['lang'].$_GET['edit_lang'].".php"); ?>
<?php if($_SESSION['PERM'][14]['a'] == 1){?>
<div id="form-content" style="display:none">
<h3><?php echo __('New language');?></h3>
<form class="form-horizontal" id="add_newsletter" method="post" action="" enctype="multipart/form-data">
<div class="control-group">
<label class="control-label" for="language"><?php echo __('Language');?></label>
<div class="controls">
<input type="text" class="input-xlarge" id="language" name="language" value="" required="required">
</div>
</div>
<div class="control-group">
<label class="control-label" for="name_file"><?php echo __('Short name - 2 character');?></label>
<div class="controls">
<input type="text" class="input-xlarge" maxlength="2" id="name_file" name="name_file" required="required" value="">
</div>
</div>
<div class="form-actions">
<br />
<br />
A modifier dans les pages PHP
<br />
<br />
<!-- <button type="submit" class="btn btn-primary"><?php echo __('Save');?></button> -->
</div>
</form>
</div>
<?php } ?>
<h4><?php echo $name_lang?></h4><hr>
<?php foreach($lang as $key=> $val){
$lang_alf[$key[0]][] = array($key=>$val);
}
array_unique($lang_alf);
ksort($lang_alf);
echo '<div class="btn-group" style="margin-bottom:15px;">';
$edit_lang = explode(".",$v);
$edit_lang = $edit_lang[0];
foreach($lang_alf as $key => $val){
echo '<a href="?settings&edit_lang='.$_GET['edit_lang'].'#'.$key.'" class="btn btn-small btn-inverse loot">'.$key.'</a>';
}?>
<?php if(($_SESSION['PERM'][14]['r'] == 1 && $_SESSION['PERM'][14]['e'] == 1) ||
$_SESSION['PERM'][14]['r'] + $_SESSION['PERM'][14]['e'] > 0
){?>
<a class="btn btn-primary btn-small dropdown-toggle" data-toggle="dropdown" href="#">
<?php echo __('Action');?>
<span class="caret"></span>
</a>
<ul class="dropdown-menu pull-right">
<?php if($_SESSION['PERM'][14]['e'] == 1){?>
<!-- dropdown menu links -->
<li><a href="?settings&edit_lang=<?php echo $_GET['edit_lang']?>&generation=<?php echo $_GET['edit_lang']?>" title="<?php echo __('Refresh language');?>"><i class="icon-refresh"></i> <?php echo __('Refresh language');?></a></li>
<?php } ?>
<?php if($_SESSION['PERM'][14]['r'] == 1){?>
<?php if($_GET['edit_lang'] != 'gb'){?>
<li class="divider"></li>
<li><a href="?settings&edit_lang=<?php echo $_GET['edit_lang']?>&del_lang=<?php echo $_GET['edit_lang']?>" onClick="return confirm('<?php echo __('Remove?');?>');"><i class="icon-remove-sign"></i> <?php echo __('Remove');?></a></li>
<?php } } ?>
</ul>
<?php } ?>
</div>
<form action="" method="post">
<input type="hidden" name="la" value="<?php echo $_GET['edit_lang']?>">
<input type="hidden" name="name_lang" value="<?php echo $name_lang?>">
<div id="alf">
</div>
<table class="table table-bordered table-hover">
<thead>
<tr>
<th class="span1">##</th>
<th class="span7"><?php echo __('Key');?></th>
<th class="span6"><?php echo __('Value');?></th>
</tr>
</thead>
<tbody>
<?php ksort($lang);
$nn=1;
$af = "";
foreach($lang as $key => $val){
echo "<tr";
if($af == "" || $key[0] != $af){
$af = $key[0];
echo " id='".$af."'";
}
if($key == $val && $name_lang != 'English'){
echo " class ='warning'";
}
echo ">";
?>
<td><?php echo $nn++;?></td>
<td><?php echo $key?></td>
<td><input type="text" value="<?php echo $val?>" name="lang['<?php echo $key?>']" style="margin-bottom:0; width:97%" <?php if($_SESSION['PERM'][14]['e'] == 0){?> readonly="readonly"<?php }?>></td>
</tr>
<?php }?>
</tbody>
<tfoot>
<tr>
<th colspan="3">
<br />
<button type="submit" class="btn btn-primary"><?php echo __('Save');?></button>
<br />
<br />
<br />
<br />
</th>
</tr>
</tfoot>
</table>
</form>
</div>
</div>