Header PHP with Login Security Check Header PHP with Login Security Check
 

News:

CPG Release 1.6.27
change DB IP storage fields to accommodate IPv6 addresses
remove use of E_STRICT (PHP 8.4 deprecated)
update README to reflect new website
align code with new .com CPG website
correct deprecation in captcha

Main Menu

Header PHP with Login Security Check

Started by Dancefloor, March 19, 2026, 11:42:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dancefloor

Hyyy...
In my header.php are some things like Database backup and other useful admin tools included.

Unfortunately, it's displayed as a header and visible to EVERYONE who visits the site.

Isn't it possible to display it on a user-specific or admin-specific basis?

So... either EVERYONE sees it, or user groups, or ONLY ADMIN.

Could this query be included in the next version, or is there a simple way to query the admin status directly within the header file?

Regards, Daniel

406man

My gallery doesn't have a file with this name and the forum thread here says the same:
https://coppermine-gallery.com/forum/index.php?topic=80854.0

For a starting point could you clarify what your header.php file is doing and where it lives in your directory structure.

The admin tools are normally in the Admin menu which is displayed only for those users with Administrator privilege.

ron4mac

#2
You can use some of these variables and defines in your custom header include file to present different content according to the CPG state (logged in [USER_ID>0], user is an admin, etc.)
https://coppermine-gallery.com/docs/curr/en/dev_vars.htm