Skip to content

Commit

Permalink
Merge pull request #270 from npds/v16-beta-dev
Browse files Browse the repository at this point in the history
V16 beta dev
  • Loading branch information
jipexu authored Dec 22, 2017
2 parents 4f11d53 + b15109a commit cbb876b
Show file tree
Hide file tree
Showing 7 changed files with 101 additions and 94 deletions.
24 changes: 13 additions & 11 deletions revolution_16/admin/meta_lang.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (!stristr($_SERVER['PHP_SELF'],"admin.php")) { Access_Error(); }
if (!stristr($_SERVER['PHP_SELF'],"admin.php")) Access_Error();
$f_meta_nom ='MetaLangAdmin';
$f_titre = 'META-LANG';
//==> controle droit
Expand All @@ -22,7 +22,7 @@

function go_back($label) {
if (!$label) $label = adm_translate("Retour en arrière");
echo '
echo '
<script type="text/javascript">
//<![CDATA[
function precedent() {
Expand All @@ -41,7 +41,7 @@ function list_meta($meta, $type_meta) {
if (!empty($type_meta)) $Q = sql_query("SELECT def FROM ".$NPDS_Prefix."metalang WHERE type_meta = '".$type_meta."' ORDER BY type_meta, def ASC");
else $Q = sql_query("SELECT def FROM ".$NPDS_Prefix."metalang ORDER BY 'def' ASC");
while ($resultat = sql_fetch_row($Q)) {
if ($meta == $resultat[0]) { $sel = 'selected="selected"'; }
if ($meta == $resultat[0]) $sel = 'selected="selected"';
$list .= '
<option '.$sel.' value="admin.php?op=Meta-LangAdmin&amp;meta='.$resultat[0].'">'.$resultat[0].'</option>';
$sel = '';
Expand Down Expand Up @@ -71,11 +71,13 @@ function list_type_meta($type_meta) {
$Q = sql_query("SELECT type_meta FROM ".$NPDS_Prefix."metalang GROUP BY type_meta ORDER BY 'type_meta' ASC");
while ($resultat = sql_fetch_row($Q)) {
if ($type_meta == $resultat[0]) $sel = 'selected="selected"';
$list .= '<option '.$sel.' value="admin.php?op=Meta-LangAdmin&amp;type_meta='.$resultat[0].'">'.$resultat[0].'</option>';
$list .= '
<option '.$sel.' value="admin.php?op=Meta-LangAdmin&amp;type_meta='.$resultat[0].'">'.$resultat[0].'</option>';
$sel = '';
}
sql_free_result($Q);
$list .= '</select>';
$list .= '
</select>';
return $list;
}
function List_Meta_Lang() {
Expand Down Expand Up @@ -240,12 +242,12 @@ function Edit_Meta_Lang() {
<label class="col-form-label col-sm-4" for="type_uri">'.adm_translate("Restriction").'</label>';
$sel0='';$sel1='';
if ($Q['type_uri'] == '+') {
if ($Q['obligatoire'] == true) {$sel1 = 'selected="selected"';}
else {$sel1 = ' selected';}
if ($Q['obligatoire'] == true) $sel1 = 'selected="selected"';
else $sel1 = ' selected';
}
else {
if ($Q['obligatoire'] == true) {$sel0 = 'selected="selected"';}
else {$sel0 = ' selected';}
if ($Q['obligatoire'] == true) $sel0 = 'selected="selected"';
else $sel0 = ' selected';
}
echo '
<div class="col-sm-8">
Expand Down Expand Up @@ -328,8 +330,8 @@ function Creat_Meta_Lang() {
<label class="col-form-label col-sm-12" for="type_uri">'.adm_translate("Restriction").'</label>
<div class="col-sm-12">
<select class="custom-select form-control" name="type_uri">
<option'.$sel.' value="moins">'.adm_translate("Tous sauf pour ...").'</option>
<option'.$sel.' value="plus">'.adm_translate("Seulement pour ...").'</option>
<option value="moins">'.adm_translate("Tous sauf pour ...").'</option>
<option value="plus">'.adm_translate("Seulement pour ...").'</option>
</select>
</div>
</div>
Expand Down
6 changes: 4 additions & 2 deletions revolution_16/modules/include/sample.user.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
// OBJET : Ce fichier vous permet de personnaliser la page de Login et le plan du site

echo '<p class="text-xs-center"><a class="btn btn-outline-primary btn-xs" href="static.php?op=charte.html&amp;npds=1&amp;metalang=1">'.aff_langue("[french]Charte d'utilisation du site[/french][english]Terms of use[/english]").'</a></p>';
echo '
<p class="text-center my-3">
<a class="btn btn-outline-primary btn-xs" href="static.php?op=charte.html&amp;npds=1&amp;metalang=1">'.aff_langue("[french]Charte d'utilisation du site[/french][english]Terms of use[/english]").'</a>
</p>';
?>
5 changes: 4 additions & 1 deletion revolution_16/modules/include/user.inc
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
// OBJET : Ce fichier vous permet de personnaliser la page de Login et le plan du site
echo '<p class="text-center"><a class="btn btn-outline-primary btn-xs" href="static.php?op=charte.html&amp;npds=1&amp;metalang=1">'.aff_langue("[french]Charte d'utilisation du site[/french][english]Terms of use[/english]").'</a></p>';
echo '
<p class="text-center my-3">
<a class="btn btn-outline-primary btn-xs" href="static.php?op=charte.html&amp;npds=1&amp;metalang=1">'.aff_langue("[french]Charte d'utilisation du site[/french][english]Terms of use[/english]").'</a>
</p>';
?>
25 changes: 0 additions & 25 deletions revolution_16/static/central.html

This file was deleted.

15 changes: 0 additions & 15 deletions revolution_16/static/edito_membres.txt

This file was deleted.

56 changes: 39 additions & 17 deletions revolution_16/themes/npds-boost_sk/html/header.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
global $cookie, $anonymous, $NPDS_Prefix;
$con='';$ava='';$cha='';$bal='';
global $cookie, $anonymous, $NPDS_Prefix, $mns;
$con='';$ava='';$cha='';$bal='';$menuser='';
if ($user) {
$username = $cookie[1];
$skinname = $cookie[11];
Expand Down Expand Up @@ -30,18 +30,26 @@
}
if (!isset($powerpack)) include_once ("powerpack.php");

$auto=autorisation_block("chat_membres");
$PopUp = JavaPopUp("chat.php?id=".$auto[0]."&amp;auto=".encrypt(serialize($auto[0])),"chat".$auto[0],380,480);

if (if_chat('chat_membres')) $cha= '
<li class="nav-item"><a class="nav-link faa-pulse animated faa-slow" href="javascript:void(0);" onclick="window.open('.$PopUp.');" title="'.translate("click here to open the chat window...").'" data-toggle="tooltip" data-placement="right"><i class="fa fa-comments fa-lg "></i></a></li>';


if (autorisation(-1)) {
$con = '!nb_online! - <a href="user.php">Se connecter</a>';
$btn_con = '<a class="dropdown-item" href="user.php"><i class="fa fa-sign-in fa-lg"></i>&nbsp;'.translate("Connection").'</a>';
$ava='<a class="dropdown-item" href="user.php"><i class="fa fa-user fa-4x"></i></a>';
$ava='<a class="dropdown-item" href="user.php"><i class="fa fa-user fa-4x text-muted"></i></a>';
} elseif (autorisation(1)) {
$menuser .='
<li><a class="dropdown-item" href="user.php?op=edituser" title="'.translate("Edit User").'" ><i class="fa fa-user fa-lg mr-2"></i>'.translate("Edit User").'</a></li>
<li><a class="dropdown-item" href="user.php?op=editjournal" title="'.translate("Edit Journal").'" ><i class="fa fa-edit fa-lg mr-2"></i>'.translate("Journal").'</a></li>';
include_once ("modules/upload/upload.conf.php");
if (($mns) and ($autorise_upload_p)) {
include ("modules/blog/upload_minisite.php");
$PopUp=win_upload("popup");
$menuser .= '
<li><a class="dropdown-item" href="javascript:void(0);" onclick="window.open('.$PopUp.')" title="'.translate("Manage my Mini-Web site").'"><i class="fa fa-desktop fa-lg mr-2"></i>'.translate("Mini-Web site").'</a></li>';
}
$menuser .= '
<li><a class="dropdown-item " href="user.php?op=edithome" title="'.translate("Change the home").'" ><i class="fa fa-edit fa-lg mr-2 "></i>'.translate("Page").'</a></li>
<li><a class="dropdown-item " href="user.php?op=chgtheme" title="'.translate("Change Theme").'" ><i class="fa fa-paint-brush fa-lg mr-2"></i>'.translate("Theme").'</a></li>
<li><a class="dropdown-item " href="modules.php?ModPath=reseaux-sociaux&amp;ModStart=reseaux-sociaux" title="'.translate("Social networks").'" ><i class="fa fa-share-alt-square fa-lg mr-2"></i>'.translate("Social networks").'</a></li>
<li><a class="dropdown-item " href="viewpmsg.php" title="'.translate("Private Message").'" ><i class="fa fa-envelope fa-lg mr-2"></i>'.translate("Message").'</a></li>';
settype($cookie[0], 'integer');
list($user_avatar)=sql_fetch_row(sql_query("SELECT user_avatar FROM ".$NPDS_Prefix."users WHERE uname='".$username."'"));

Expand All @@ -56,8 +64,9 @@

list($nbmes)=sql_fetch_row(sql_query("SELECT COUNT(*) FROM ".$NPDS_Prefix."priv_msgs WHERE to_userid='".$cookie[0]."' AND read_msg='0'"));
if ($nbmes>0)
$bal = '<li class="dropdown-divider"></li><li><a class="dropdown-item" href="viewpmsg.php"><i class="fa fa-envelope fa-lg faa-shake animated"></i> '.translate("Private Message").' <span class="tag-pill tag-default">'.$nbmes.'</span></a></li>';
$ava='<a class="dropdown-item" href="user.php" ><img src="'.$imgtmp.'" width="64" height="64" alt="avatar" title="'.translate("Your account").'" data-toggle="tooltip" data-placement="right" /></a>';
$bal = '<li class="nav-item"><a class="nav-link" href="viewpmsg.php"><i class="fa fa-envelope fa-lg faa-shake animated" title="'.translate("Private Message").' <span class=\'badge-pill badge-danger ml-2\'>'.$nbmes.'</span>" data-html="true" data-toggle="tooltip" data-placement="right"></i></a></li>';

$ava='<a class="dropdown-item" href="user.php" ><img src="'.$imgtmp.'" width="64" height="64" alt="avatar" title="'.translate("Your account").'" data-toggle="tooltip" data-placement="right" /></a><li class="dropdown-divider"></li>';
$btn_con='<a class="dropdown-item" href="user.php?op=logout"><i class="fa fa-sign-out fa-lg text-danger"></i>'.translate("Logout").'</a>';
}
?>
Expand All @@ -79,18 +88,16 @@
<li class="nav-item"><a class="nav-link" href="forum.php">Forums</a></li>
<li class="nav-item"><a class="nav-link" href="download.php">[french]T&eacute;l&eacute;chargements[/french][english]Downloads[/english][chinese]Downloads[/chinese][spanish]Descargas[/spanish][german]Downloads[/german]</a></li>
<li class="nav-item"><a class="nav-link" href="modules.php?ModPath=links&amp;ModStart=links">[french]Liens[/french][english]Links[/english][chinese]&#x7F51;&#x9875;&#x94FE;&#x63A5;[/chinese][spanish]Enlaces web[/spanish][german]Internetlinks[/german]</a></li>
<li class="nav-item"><a class="nav-link" href="modules.php?ModPath=contact&amp;ModStart=contact">[french]Contact[/french][english]Contact[/english][chinese]&#x8054;&#x7CFB;&#x6211;&#x4EEC;[/chinese][spanish]Cont&aacute;ctenos[/spanish][german]Kontakt[/german]</a></li>
<li class="nav-item dropdown">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown"><i class="fa fa-user fa-lg"></i>&nbsp;<?php echo $username; ?></a>
<ul class="dropdown-menu">
<li><?php echo $ava; ?></li>

<?php echo $bal; ?>
</li><?php echo $menuser; ?>
<li class="dropdown-divider"></li>
<li><?php echo $btn_con; ?></li>
</ul>
</li>
<?php echo $cha; ?>
<?php echo $bal; ?>
</ul>
</div>
</nav>
Expand All @@ -106,4 +113,19 @@ <h1 class="my-4">NPDS<br /><small class="text-muted">Responsive</small></h1>
<div id="slogan" class="col-sm-8 text-muted slogan"><strong>!slogan!</strong></div>
<div id="online" class="col-sm-4 text-muted text-right">!nb_online!</div>
</div>
</div>
</div>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
var chat_pour=['chat_tous','chat_membres','chat_anonyme','chat_admin'];
chat_pour.forEach(function(ele) {
if ($('#'+ele+'_encours').length) {
var clon = $('#'+ele+'_encours').clone()
.attr('id',ele+'_ico');
$( ".navbar-nav" ).append( clon );
$('#'+ele+'_ico').wrapAll('<li class="nav-item" />');
}
})
})
//]]>
</script>
Loading

0 comments on commit cbb876b

Please sign in to comment.