Skip to content

Commit

Permalink
Merge pull request #278 from npds/v16-beta-dev
Browse files Browse the repository at this point in the history
V16 beta dev
  • Loading branch information
jipexu authored Jan 17, 2018
2 parents b25fcfb + fbfb7d1 commit 86d2292
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 36 deletions.
13 changes: 5 additions & 8 deletions revolution_16/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/

if (!function_exists("Mysql_Connexion")) {
if (!function_exists("Mysql_Connexion"))
include ("mainfile.php");
}
include("language/lang-adm-$language.php");
function Access_Error () {
include("admin/die.php");
Expand Down Expand Up @@ -50,9 +49,8 @@ function adminhead($f_meta_nom, $f_titre, $adminimg) {
}

$filemanager=false;
if (file_exists("filemanager.conf")) {
if (file_exists("filemanager.conf"))
include_once("filemanager.conf");
}

function login() {
global $adminimg;
Expand Down Expand Up @@ -136,12 +134,11 @@ function GraphicAdmin($hlpfile) {

//==> construction des blocs menu : selection de fonctions actives ayant une interface graphique de premier niveau et dont l'administrateur connecté en posséde les droits d'accès
$Q = sql_fetch_assoc(sql_query("SELECT * FROM ".$NPDS_Prefix."authors WHERE aid='$aid' LIMIT 1"));
if ($Q['radminsuper']==1) {
// on prend tout ce qui a une interface
$R = sql_query("SELECT * FROM ".$NPDS_Prefix."fonctions f WHERE f.finterface =1 AND f.fetat != '0' ORDER BY f.fcategorie, f.fordre");}
else {
if ($Q['radminsuper']==1)
$R = sql_query("SELECT * FROM ".$NPDS_Prefix."fonctions f WHERE f.finterface =1 AND f.fetat != '0' ORDER BY f.fcategorie, f.fordre");
else
$R = sql_query("SELECT * FROM ".$NPDS_Prefix."fonctions f LEFT JOIN droits d ON f.fid = d.d_fon_fid LEFT JOIN authors a ON d.d_aut_aid =a.aid WHERE f.finterface =1 AND fetat!=0 AND d.d_aut_aid='$aid' AND d.d_droits REGEXP'^1' ORDER BY f.fcategorie, f.fordre");
}

$j=0;
while($SAQ=sql_fetch_assoc($R)) {
Expand Down
46 changes: 20 additions & 26 deletions revolution_16/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ function get_contributeurs($fid, $tid) {

function get_total_posts($fid, $tid, $type, $Mmod) {
global $NPDS_Prefix;
if ($Mmod) {
if ($Mmod)
$post_aff='';
} else {
else
$post_aff=" AND post_aff='1'";
}
switch($type) {
case 'forum':
$sql = "SELECT COUNT(*) AS total FROM ".$NPDS_Prefix."posts WHERE forum_id='$fid'$post_aff";
Expand Down Expand Up @@ -81,9 +80,9 @@ function get_last_post($id, $type, $cmd, $Mmod) {
return("ERROR");

if ($cmd=='infos') {
if (!$myrow = sql_fetch_row($result)) {
if (!$myrow = sql_fetch_row($result))
$val=translate("No posts");
} else {
else {
$rowQ1=Q_Select ($sql2."'".$myrow[1]."'", 3600);
$val='<span class="small">'.convertdate($myrow[0]).' <a href="user.php?op=userinfo&amp;uname='.$rowQ1[0]['uname'].'" >'.$rowQ1[0]['uname'].'</a></span>';
}
Expand Down Expand Up @@ -144,11 +143,10 @@ function user_is_moderator($uidX,$passwordX,$forum_accessX) {
$userX=sql_fetch_assoc($result1);
$password = $userX['pass'];
$userX=sql_fetch_assoc($result2);
if ((md5($password) == $passwordX) and ($forum_accessX<=$userX['level']) and ($userX['level']>1)) {
if ((md5($password) == $passwordX) and ($forum_accessX<=$userX['level']) and ($userX['level']>1))
return ($userX['level']);
} else {
else
return(false);
}
}

function get_userdata_from_id($userid) {
Expand Down Expand Up @@ -458,11 +456,11 @@ function member_qualif($poster, $posts, $rank) {
$tmp='<img class="n-smil" src="'.$imgtmpP.'" alt="" />'.$posts.'&nbsp;';
if ($poster!=$anonymous) {
$nux=0;
if ($posts>=10 and $posts<30) {$nux=1;}
if ($posts>=30 and $posts<100) {$nux=2;}
if ($posts>=100 and $posts<300) {$nux=3;}
if ($posts>=300 and $posts<1000) {$nux=4;}
if ($posts>=1000) {$nux=5;}
if ($posts>=10 and $posts<30) $nux=1;
if ($posts>=30 and $posts<100) $nux=2;
if ($posts>=100 and $posts<300) $nux=3;
if ($posts>=300 and $posts<1000) $nux=4;
if ($posts>=1000) $nux=5;
for ($i=0; $i<$nux; $i++) {
$tmp.='<i class="fa fa-star-o text-success mr-1"></i>';
}
Expand Down Expand Up @@ -591,16 +589,15 @@ function autorize() {
$myrow = sql_fetch_assoc(sql_query("SELECT forum_moderator FROM ".$NPDS_Prefix."forums WHERE (forum_id='$IdForum')"));
if ($myrow) {
$moderator = get_moderator($myrow['forum_moderator']);
$moderator=explode(" ",$moderator);
$moderator=explode(' ',$moderator);
if (isset($user)) {
$userX = base64_decode($user);
$userdata = explode(":", $userX);
for ($i = 0; $i < count($moderator); $i++) {
if (($userdata[1]==$moderator[$i])) { $Mmod=true; break;}
}
if ($userdata[0]==$poster_id) {
if ($userdata[0]==$poster_id)
$Mmod=true;
}
}
}
}
Expand All @@ -610,8 +607,7 @@ function autorize() {
function anti_flood ($modoX, $paramAFX, $poster_ipX, $userdataX, $gmtX) {
// anti_flood : nd de post dans les 90 puis 30 dernières minutes / les modérateurs echappent à cette règle
// security.log est utilisée pour enregistrer les tentatives
global $NPDS_Prefix;
global $anonymous;
global $NPDS_Prefix, $anonymous;
if (!array_key_exists('uname',$userdataX)) $compte=$anonymous; else $compte=$userdataX['uname'];

if ((!$modoX) AND ($paramAFX>0)) {
Expand All @@ -624,13 +620,13 @@ function anti_flood ($modoX, $paramAFX, $poster_ipX, $userdataX, $gmtX) {
$timebase=date("Y-m-d H:i",time()+($gmtX*3600)-5400);
list($time90)=sql_fetch_row(sql_query ($sql.$timebase.$sql2));
if ($time90>($paramAFX*2)) {
Ecr_Log("security", "Forum Anti-Flood : ".$compte, "");
Ecr_Log("security", "Forum Anti-Flood : ".$compte, '');
forumerror(translate("You are not allowed to post in this forum"));
} else {
$timebase=date("Y-m-d H:i",time()+($gmtX*3600)-1800);
list($time30)=sql_fetch_row(sql_query($sql.$timebase.$sql2));
if ($time30>$paramAFX) {
Ecr_Log("security", "Forum Anti-Flood : ".$compte, "");
Ecr_Log("security", "Forum Anti-Flood : ".$compte, '');
forumerror(translate("You are not allowed to post in this forum"));
}
}
Expand Down Expand Up @@ -774,13 +770,12 @@ function forum($rowQ1) {
$ibid.='
<span class="d-flex w-100 mt-1">
<label class="custom-control custom-checkbox">';
if ($tab_subscribe[$myrow['forum_id']]) {
if ($tab_subscribe[$myrow['forum_id']])
$ibid.='
<input class="custom-control-input n-ckbf" type="checkbox" name="Subforumid['.$myrow['forum_id'].']" checked="checked" title="" data-toggle="tooltip" />';
} else {
else
$ibid.='
<input class="custom-control-input n-ckbf" type="checkbox" name="Subforumid['.$myrow['forum_id'].']" title="'.translate("Check me and click on OK button to receive an Email when is a new submission in this forum.").'" data-toggle="tooltip" data-placement="right" />';
}
$ibid.='
<span class="custom-control-indicator"></span>
</label>
Expand Down Expand Up @@ -830,11 +825,10 @@ function sub_forum_folder($forum) {
if ($ibid=theme_image("forum/icons/red_sub_folder.gif")) {$imgtmpR=$ibid;} else {$imgtmpR="images/forum/icons/red_sub_folder.gif";}
if ($ibid=theme_image("forum/icons/sub_folder.gif")) {$imgtmp=$ibid;} else {$imgtmp="images/forum/icons/sub_folder.gif";}

if (($totalT-$totalF)>0) {
if (($totalT-$totalF)>0)
$ibid='<img src="'.$imgtmpR.'" alt="" />';
} else {
else
$ibid='<img src="'.$imgtmp.'" alt="" />';
}
return ($ibid);
}
#autodoc paginate_single($url, $urlmore, $total, $current, $adj, $topics_per_page, $start) : Retourne un bloc de pagination
Expand Down
Binary file added revolution_16/lib/fonts/jQueryTimeline.eot
Binary file not shown.
45 changes: 45 additions & 0 deletions revolution_16/lib/fonts/jQueryTimeline.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added revolution_16/lib/fonts/jQueryTimeline.ttf
Binary file not shown.
Binary file added revolution_16/lib/fonts/jQueryTimeline.woff
Binary file not shown.
10 changes: 9 additions & 1 deletion revolution_16/themes/npds-boost_sk/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,17 @@ table{table-layout: fixed;}
}
}

/
.dropdown:hover .dropdown-menu {
display: block;
margin-top: 0;
}

ul.dropdown-menu {
margin-top: 0;
}


/* <== adaptation menu */

.dropdown-submenu {
Expand Down Expand Up @@ -1250,6 +1254,7 @@ a.tooltip_ws:hover em span {
transform: scale(1.1);
}
}

.faa-pulse.animated,
.faa-pulse.animated-hover:hover,
.faa-parent.animated-hover:hover > .faa-pulse {
Expand Down Expand Up @@ -1421,7 +1426,6 @@ a.tooltip_ws:hover em span {
}

/* WAVE */

@-webkit-keyframes burst {
0% {opacity: .6;}
50% {
Expand Down Expand Up @@ -1720,4 +1724,8 @@ a.tooltip_ws:hover em span {
}
.ui-draggable {
z-index: 10;
}

input[required='required'] {
border-color: #d9534f;
}
2 changes: 1 addition & 1 deletion revolution_16/user.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function showimage() {
if ($ibid=theme_image("forum/avatar/blank.gif")) {$imgtmp=substr($ibid,0,strrpos($ibid,"/")+1);} else {$imgtmp="images/forum/avatar/";}
echo "'$imgtmp' + document.Register.user_avatar.options[document.Register.user_avatar.selectedIndex].value\n";
echo "}
//]]
//]]>
</script>";
}

Expand Down

0 comments on commit 86d2292

Please sign in to comment.