Improvements and typos

This commit is contained in:
genuineparts 2025-06-23 20:13:52 +02:00
parent 3bdbc74b0e
commit 5b27274fa7
13 changed files with 78 additions and 75 deletions

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /admin/addusers.apnl.php

View file

@ -49,7 +49,7 @@ class config_panel extends admin_module{
$config[$row["name"]] = $row["value"];
}
}
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "config` v LEFT JOIN `" . $config["prefix"] . "config_categorys` c ON v.`category`=c.`cid`");
$result = $db->query("SELECT * FROM `" . $config["prefix"] . "config` v LEFT JOIN `" . $config["prefix"] . "config_categories` c ON v.`category`=c.`cid`");
while ($row = $db->fetch_array($result)){
$data[$row["categoryname"]][]=$row;
}

View file

@ -1,4 +1,4 @@
<?php
<?php global $session;
/**
* Project: BeCast WebEngine - simple site engine
* File: /admin/editusers.apnl.php
@ -111,12 +111,12 @@ class editusers_panel extends admin_module{
$panel->content.="<table id=\"users\" width=\"90%\" cellspacing=\"2\">
<thead>
<tr>
<th align=\"center\">".$lang->_('ID')."</th>
<th align=\"center\">".$lang->_('USERNAME')."</th>
<th align=\"center\">".$lang->_('REALNAME')."</th>
<th align=\"center\">".$lang->_('ROLE')."</th>
<th align=\"center\">".$lang->_('STATUS')."</th>
<th align=\"center\">".$lang->_('ACTION')."</th>
<th style=\"text-align='center';\">".$lang->_('ID')."</th>
<th style=\"text-align='center';\">".$lang->_('USERNAME')."</th>
<th style=\"text-align='center';\">".$lang->_('REALNAME')."</th>
<th style=\"text-align='center';\">".$lang->_('ROLE')."</th>
<th style=\"text-align='center';\">".$lang->_('STATUS')."</th>
<th style=\"text-align='center';\">".$lang->_('ACTION')."</th>
</tr></thead><tbody>";
if(!empty($user)){
foreach($user as $u){
@ -131,22 +131,22 @@ class editusers_panel extends admin_module{
$u['activestyle']='style="font-style:italic;"';
}
$panel->content.="<tr ".$u['activestyle'].">
<td align=\"center\">".$u["uid"]."</td>
<td align=\"center\">".$u["username"]."</td>
<td align=\"center\">".$u["realname"]."</td>
<td align=\"center\">".$u["role_name"]."</td>
<td align=\"center\">".$u['activetext']."</td>";
<td style=\"text-align='center';\">".$u["uid"]."</td>
<td style=\"text-align='center';\">".$u["username"]."</td>
<td style=\"text-align='center';\">".$u["realname"]."</td>
<td style=\"text-align='center';\">".$u["role_name"]."</td>
<td style=\"text-align='center';\">".$u['activetext']."</td>";
if($u["uid"]==$session->userdata["uid"]){
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this,'".$lang->_('BADIDEA')."')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
$panel->content.="<td style=\"text-align='center';\"><a onclick=\"return confirmLink(this,'".$lang->_('BADIDEA')."')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}else{
$panel->content.="<td align=\"center\"><a onclick=\"return confirmLink(this, '".sprintf($lang->_('DELETEUSER'),$u["username"])."')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
$panel->content.="<td style=\"text-align='center';\"><a onclick=\"return confirmLink(this, '".sprintf($lang->_('DELETEUSER'),$u["username"])."')\" href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;action=delete&amp;user=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/delete.png\" /></a> <a href=\"".$config["path"]."/admin/index.php?panel=editusers&amp;edituser=".$u["uid"]."\"><img src=\"".$config["path"]."/admin/images/icons/wrench.png\" /></a></td>
</tr>";
}
}
}else{
$panel->content.="<tr>
<td align=\"center\" colspan=\"5\">".$lang->_('NOUSERS')."</td>
<td style=\"text-align='center';\" colspan=\"5\">".$lang->_('NOUSERS')."</td>
</tr>";
}
$panel->content.="</tbody></table><br />";