Skip to content

Commit

Permalink
[wip] app start page + dashboard - pagination + state
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Dec 2, 2022
1 parent a488951 commit f27b847
Show file tree
Hide file tree
Showing 68 changed files with 937 additions and 1,186 deletions.
10 changes: 5 additions & 5 deletions html/class/errorhandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ public function renderErrors()
$out = 'Notice [PHP]: ';
break;
case E_WARNING:
$out = 'Warning [PHP7]: ';
$out = 'Warning [PHP]: ';
break;
case E_DEPRECATED:
$out = 'Deprecated [PHP7]: ';
$out = 'Deprecated [PHP]: ';
break;
case E_STRICT:
$out = 'Strict [PHP7]: ';
$out = 'Strict [PHP]: ';
break;
case E_ERROR:
$out = 'Fatal [PHP7]: ';
$out = 'Fatal [PHP]: ';
break;
default:
$out = 'Unknown Condition [' . $error['errno'] . ']: ';
Expand All @@ -179,7 +179,7 @@ public function renderErrors()
$count[$md5] = 1;
}
}
$ret = '<div class="error">';
$ret = '<div class="alert error">';
$ret .= implode("<br>\n", $output);
$ret .= '</div>';
return $ret;
Expand Down
5 changes: 3 additions & 2 deletions html/core/XCube_FormFile.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
* But, we should move it to another directory in a later stage.
*/

//The default umask for the root user is 022 result into
// default directory permissions are 755 and default file permissions are 644.

//define("XCUBE_FORMFILE_PREVMASK", "0022");
const XCUBE_FORMFILE_CHMOD = 0644;
define("XCUBE_FORMFILE_PREVMASK", "0022");


class XCube_FormFile {
Expand Down
2 changes: 1 addition & 1 deletion html/core/XCube_Root.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class XCube_Root {

/**
* @private
* @brief Hash-Map Array - std::map<string, XCube_RenderSystem*> - Caches for genereted render-systems.
* @brief Hash-Map Array - std::map<string, XCube_RenderSystem*> - Caches for generated render-systems.
* @attention
* Only the kernel system should access this member property.
*/
Expand Down
8 changes: 3 additions & 5 deletions html/core/XCube_Utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,8 @@ public static function encrypt(string $plain_text, string $key = null ) {
}

// @todo @gigamaster
// Condition is unnecessary because it is checked by '! is_string( $key )'
// if ( null === $key || ! is_string( $key ) ) {
if (! is_string( $key )) {
// TODO check if ondition is unnecessary because it is checked by '! is_string( $key )'
if ( null === $key || ! is_string( $key ) ) {
if ( ! defined( 'XOOPS_SALT' ) ) {
return $plain_text;
}
Expand Down Expand Up @@ -168,8 +167,7 @@ public static function decrypt(string $crypt_text, string $key = null ) {

// @todo @gigamaster
// Condition is unnecessary because it is checked by '! is_string( $key )'
//if ( null === $key || ! is_string( $key ) ) {
if (! is_string( $key )) {
if ( null === $key || ! is_string( $key ) ) {
if ( ! defined( 'XOOPS_SALT' ) ) {
return $crypt_text;
}
Expand Down
60 changes: 1 addition & 59 deletions html/install/include/makedata.php
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function make_data( &$dbm, &$cm, $adminname, $adminpass, $adminmail, $language,
$dbm->insert( 'config', " VALUES (48, 0, 1, 'cool_uri', '_MD_AM_COOLURI', '0', '_MD_AM_COOLURIDSC', 'yesno', 'int', 17)" );
$dbm->insert( 'config', " VALUES (53, 0, 1, 'use_mysession', '_MD_AM_USEMYSESS', '0', '_MD_AM_USEMYSESSDSC', 'yesno', 'int', 19)" );
$dbm->insert( 'config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '1', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)" );
$dbm->insert( 'config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)" );
$dbm->insert( 'config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '1', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)" );
$dbm->insert( 'config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '" . addslashes( serialize( [ '1' ] ) ) . "', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)" );
$dbm->insert( 'config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '" . _INSTALL_L165 . "', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)" );
$dbm->insert( 'config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'wap_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)" );
Expand Down Expand Up @@ -111,64 +111,6 @@ function make_data( &$dbm, &$cm, $adminname, $adminpass, $adminmail, $language,

// Block Welcome
// $dbm->insert( 'groups_users_link', ' VALUES (11, ' . $gruops['XOOPS_GROUP_ADMIN'] . ', 9)' );
/*
// install modules
installModule($dbm, 1, "system", _MI_SYSTEM_NAME, $language, $gruops);
// data for table 'group_permission'
$dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'module_admin')");
$dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1, 'module_read')");
$dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_USERS'].",1,1,'module_read')");
$dbm->insert("group_permission", " VALUES (0,".$gruops['XOOPS_GROUP_ANONYMOUS'].",1,1,'module_read')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",1,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",2,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",3,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",4,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",5,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",6,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",7,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",8,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",9,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",10,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",11,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",12,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",13,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",14,1,'system_admin')");
$dbm->insert("group_permission", " VALUES(0,".$gruops['XOOPS_GROUP_ADMIN'].",15,1,'system_admin')");
installModule($dbm, 2, "legacy", _MI_LEGACY_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 2, 1, 'module_admin')");
installModule($dbm, 3, "legacyRender", _MI_LEGACYRENDER_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 3, 1, 'module_admin')");
installModule($dbm, 4, "user", _MI_USER_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 4, 1, 'module_admin')");
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 4, 1, 'module_read')");
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 4, 1, 'module_read')");
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ANONYMOUS'].", 4, 1, 'module_read')");
installModule($dbm, 5, "pm", _MI_PM_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 5, 1, 'module_admin')");
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 5, 1, 'module_read')");
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_USERS'].", 5, 1, 'module_read')");
installModule($dbm, 6, "stdCache", _MI_STDCACHE_NAME, $language, $gruops, true);
$dbm->insert("group_permission", " VALUES (0, ".$gruops['XOOPS_GROUP_ADMIN'].", 6, 1, 'module_admin')");
// data for table 'block_module_link'
$sql = 'SELECT bid, side FROM '.$dbm->prefix('newblocks');
$result = $dbm->query($sql);
while ($myrow = $dbm->fetchArray($result)) {
if ($myrow['side'] == 0) {
$dbm->insert("block_module_link", " VALUES (".$myrow['bid'].", 0)");
} else {
$dbm->insert("block_module_link", " VALUES (".$myrow['bid'].", -1)");
}
}
*/

return $gruops;
}
Expand Down
4 changes: 4 additions & 0 deletions html/install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@
echo $exceptions[$code];
} */

/*
* error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE);
*/

include_once './passwd.php';

if ( INSTALL_USER !== '' || INSTALL_PASSWD !== '' ) {
Expand Down
2 changes: 1 addition & 1 deletion html/install/wizards/install_updateConfig_go.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
$dbm->insert( 'config', " VALUES (47, 0, 1, 'enable_badips', '_MD_AM_DOBADIPS', '0', '_MD_AM_DOBADIPSDSC', 'yesno', 'int', 40)" );
$dbm->insert( 'config', " VALUES (53, 0, 1, 'use_mysession', '_MD_AM_USEMYSESS', '0', '_MD_AM_USEMYSESSDSC', 'yesno', 'int', 19)" );
$dbm->insert( 'config', " VALUES (57, 0, 1, 'theme_fromfile', '_MD_AM_THEMEFILE', '1', '_MD_AM_THEMEFILEDSC', 'yesno', 'int', 13)" );
$dbm->insert( 'config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '0', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)" );
$dbm->insert( 'config', " VALUES (58, 0, 1, 'closesite', '_MD_AM_CLOSESITE', '1', '_MD_AM_CLOSESITEDSC', 'yesno', 'int', 26)" );
$dbm->insert( 'config', " VALUES (59, 0, 1, 'closesite_okgrp', '_MD_AM_CLOSESITEOK', '" . addslashes( serialize( [ '1' ] ) ) . "', '_MD_AM_CLOSESITEOKDSC', 'group_multi', 'array', 27)" );
$dbm->insert( 'config', " VALUES (60, 0, 1, 'closesite_text', '_MD_AM_CLOSESITETXT', '" . _INSTALL_L165 . "', '_MD_AM_CLOSESITETXTDSC', 'textarea', 'text', 28)" );
$dbm->insert( 'config', " VALUES (61, 0, 1, 'sslpost_name', '_MD_AM_SSLPOST', 'xcl_wap_ssl', '_MD_AM_SSLPOSTDSC', 'textbox', 'text', 31)" );
Expand Down
16 changes: 10 additions & 6 deletions html/modules/legacy/admin/templates/block_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ <h2 class="admintitle"><{$smarty.const._MI_LEGACY_MENU_BLOCKLIST}></h2>

<div class="control-view">
<button id="list" class="button" data-id="1" type="button" aria-label="View List">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="1em" height="1em" viewBox="0 0 24 24">
<path d="M9 5v4h12V5M9 19h12v-4H9m0-1h12v-4H9M4 9h4V5H4m0 14h4v-4H4m0-1h4v-4H4v4z" fill="currentColor"/></svg>
</button>

<button id="grid" class="button" data-id="2" type="button" aria-label="View Grid">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="1em" height="1em" viewBox="0 0 24 24">
<path d="M16 5v6h5V5m-11 6h5V5h-5m6 13h5v-6h-5m-6 6h5v-6h-5m-6 6h5v-6H4m0-1h5V5H4v6z" fill="currentColor"/></svg>
</button>

<button id="filter" class="button" type="button" data-id="3" onclick="slideToggle('.block-filter', this)" aria-label="View Filter">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" width="1em" height="1em" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" role="img" width="1em" height="1em" viewBox="0 0 24 24">
<path d="M7 11h10v2H7zM4 7h16v2H4zm6 8h4v2h-4z" fill="currentColor"/></svg>
</button>

Expand Down Expand Up @@ -98,10 +98,14 @@ <h2 class="admintitle"><{$smarty.const._MI_LEGACY_MENU_BLOCKLIST}></h2>

<hr>

<div class="ui-card-full foot">
<div class="ui-card-full foot-sticky">
<input class="button-submit" type="submit" value="<{$smarty.const._SUBMIT}>">
</div>

<div class="ui-card-full">
<input class="button-submit" type="submit" value="<{$smarty.const._SUBMIT}>">
<{* Smarty generates nav pagination + ul pagenavi *}>
<nav class="pagination"><{xoops_pagenavi pagenavi=$pageNavi}></nav>
</div>
</form>
<{* Smarty generates nav pagination + ul pagenavi *}>
<div class="pagination"><{xoops_pagenavi pagenavi=$pageNavi}></div>

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<form action="<{$xoops_url}>/modules/legacy/admin/index.php?action=actSearch" method="post">
<input type="search" name="keywords" pattern=".{3,}" title="3 or more characters" required>
<button class="btnav" value="<{$smarty.const._SEARCH}>">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" width="20px" height="20px" data-self="centered mt-5" viewBox="0 0 24 24">
<svg xmlns="http://www.w3.org/2000/svg" width="20px" height="20px" data-self="centered mt-5" viewBox="0 0 24 24">
<path fill="currentColor" d="M10 18a7.952 7.952 0 0 0 4.897-1.688l4.396 4.396l1.414-1.414l-4.396-4.396A7.952 7.952 0 0 0 18 10c0-4.411-3.589-8-8-8s-8 3.589-8 8s3.589 8 8 8zm0-14c3.309 0 6 2.691 6 6s-2.691 6-6 6s-6-2.691-6-6s2.691-6 6-6z"/></svg>
</button>
</form>
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,13 @@
<div class="ui-block-online-stats-info">
<a id="open-online" href="#">
<div class="ui-block-online-stats-title">
<{$smarty.const._MB_LEGACY_ONLINEINFO}>?
<{$smarty.const._WHOSONLINE}>?
</div>
<div class="ui-block-online-stats-text">
<img class="svg user-online"src="<{"icons/icon-user-online.svg"|theme}>"> <{$smarty.const._MB_USER_MORE}></div>
<img class="svg user-online" src="<{'icons/icon-user-online.svg'|theme}>"> <{$smarty.const._MB_USER_MORE}></div>
</a>
</div>
<div class="display:none ui-widget-shadow " id="dialog-online" title="<{$smarty.const._MB_LEGACY_ONLINEINFO}>">
<div class="display:none ui-widget-shadow" id="dialog-online" title="<{$smarty.const._WHOSONLINE}>">
<div id="online-users"></div>
</div>
</div><{* ui-block-online-stats *}>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<{* ---------- ---------- ---------- ---------- ---------- Block System-Info *}>

<div class="tips text-warning">
Mod - <{$smarty.const._MB_LEGACY_SYSTEMINFO}>
<{$smarty.const._MB_LEGACY_SYSTEMINFO}>
</div>

<div id="t<{$blockid}>" class="head">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</a>
<li>
<a class="btnav" href="<{$xoops_url}>/" target="_blank" title="<{$smarty.const._YOURHOME}>">
<i class="i-home"></i></a>
<img class="svg home" src="<{'icons/icon-home.svg'|theme}>" alt="home"></a></a>
<li>
<a class="btnav" href="<{$xoops_url}>/admin.php" arial-label="Admin Dashboard">
<img class="svg settings" src="<{'icons/icon-settings.svg'|theme}>" alt="settings"></a>
Expand All @@ -28,42 +28,37 @@

<li class="ui-color-mode">

<{$xoops_lblocks.action_search.content}>

<{$xoops_lblocks.action_search.content}>


<button id="themeToggle" class="btnav nav-icon" title="Color Mode"><span>&#x263C;</span></button>



<button id="themeToggle" class="btnav nav-icon" title="Color Mode"><span>&#x263C;</span></button>

<div class="dropdown">
<a href="#" class="dropdown-toggle btnav" aria-label="Edit">
<img src="<{$uid|xoops_user_avatarize}>" width="20px" height="20px" data-self="centered radius-circle mt-4 ml-2" alt="">
</a>
<div class="dropdown-content">

<a href="<{$xoops_url}>/" target="_blank" title="<{$smarty.const._YOURHOME}>" class="button button-small" style="width: 100%; text-align:left; margin: 0">
<svg xmlns="http://www.w3.org/2000/svg" aria-hidden="true" role="img" viewBox="0 0 24 24" class="svg-ui-icon">
<a href="<{$xoops_url}>/" target="_blank" title="<{$smarty.const._YOURHOME}>" class="button button-small">
<svg xmlns="http://www.w3.org/2000/svg" role="img" viewBox="0 0 24 24" class="svg-ui-icon">
<path d="M10 20v-6h4v6h5v-8h3L12 3L2 12h3v8h5z" fill="currentColor"/>
</svg> <{$smarty.const._YOURHOME}></a>

<a href="<{$xoops_url}>/edituser.php" target="_blank" title="Account Setting" class="button button-small" style="width: 100%; text-align:left; margin: 0">
<a href="<{$xoops_url}>/edituser.php" target="_blank" title="Account Setting" class="button button-small">
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="svg-ui-icon">
<path d="M12 4a4 4 0 0 1 4 4a4 4 0 0 1-4 4a4 4 0 0 1-4-4a4 4 0 0 1 4-4m0 10c4.42 0 8 1.79 8 4v2H4v-2c0-2.21 3.58-4 8-4z" fill="currentColor"></path>
</svg> Account</a>

<a href="<{$xoops_url}>/viewpmsg.php" target="_blank" title="Inbox" class="button button-small" style="width: 100%; text-align:left; margin: 0">
<a href="<{$xoops_url}>/viewpmsg.php" target="_blank" title="Inbox" class="button button-small">
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="svg-ui-icon">
<path d="M2 6v14h18v2H2c-1.105 0-2-.89-2-2V6h2m22-2c0-1.1-.9-2-2-2H6c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4m-2 0l-8 5l-8-5h16m0 12H6V6l8 5l8-5v10z" fill="currentColor"></path>
</svg> Inbox</a>

<a href="<{$xoops_url}>/notifications.php" target="_blank" title="Notifications" class="button button-small" style="width: 100%; text-align:left; margin: 0">
<a href="<{$xoops_url}>/notifications.php" target="_blank" title="Notifications" class="button button-small">
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="svg-ui-icon">
<path d="M16 17H7v-6.5C7 8 9 6 11.5 6S16 8 16 10.5m2 5.5v-5.5c0-3.07-2.14-5.64-5-6.32V3.5A1.5 1.5 0 0 0 11.5 2A1.5 1.5 0 0 0 10 3.5v.68c-2.87.68-5 3.25-5 6.32V16l-2 2v1h17v-1m-8.5 4a2 2 0 0 0 2-2h-4a2 2 0 0 0 2 2z" fill="currentColor"></path>
</svg> Notifications</a>

<a href="<{$xoops_url}>/user.php?op=logout" target="_blank" title="<{$smarty.const._LOGOUT}>" class="button button-small" style="width: 100%; text-align:left; margin: 0">
<a href="<{$xoops_url}>/user.php?op=logout" target="_blank" title="<{$smarty.const._LOGOUT}>" class="button button-small">
<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" class="svg-ui-icon">
<path d="M14.08 15.59L16.67 13H7v-2h9.67l-2.59-2.59L15.5 7l5 5l-5 5l-1.42-1.41M19 3a2 2 0 0 1 2 2v4.67l-2-2V5H5v14h14v-2.67l2-2V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-1.11.89-2 2-2h14z" fill="currentColor"></path>
</svg> <{$smarty.const._LOGOUT}></a>
Expand Down

0 comments on commit f27b847

Please sign in to comment.