commision page and header user image
This commit is contained in:
@@ -102,9 +102,13 @@
|
|||||||
<div class="agent-header">
|
<div class="agent-header">
|
||||||
<div class="agent-header-title">
|
<div class="agent-header-title">
|
||||||
<?php
|
<?php
|
||||||
if(isset($_SESSION['profile_pic']) || !empty($_SESSION['profile_pic'])){
|
if (!empty($_SESSION['profile_pic'])) {
|
||||||
echo '<img src="/CONTENT/ROOT_URI/Admin/'.$_SESSION['profile_pic'].'" style="width: 35px; height: 35px; border-radius:50%; object-fit:cover;" alt="Profile" />';
|
$profilePicPath = '/CONTENT/ROOT_URI/Admin/' . $_SESSION['profile_pic'];
|
||||||
}else{
|
echo '<img src="' . htmlspecialchars($profilePicPath) . '" style="width: 35px; height: 35px; border-radius:50%; object-fit:cover;" alt="Profile" onerror="this.style.display=\'none\'; this.nextElementSibling.style.display=\'block\'" />';
|
||||||
|
|
||||||
|
// SVG fallback (initially hidden)
|
||||||
|
echo '<svg style="border-radius:50%; object-fit:cover; border: 1px solid #ffffff; display: none;" class="img-responsive" version="1.1" width="28px" height="28px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="#ffffff" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill="#ffffff" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0z"></path></g></svg>';
|
||||||
|
} else {
|
||||||
echo '<svg style="border-radius:50%; object-fit:cover; border: 1px solid #ffffff;" class="img-responsive" version="1.1" width="28px" height="28px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="#ffffff" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill="#ffffff" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0z"></path></g></svg>';
|
echo '<svg style="border-radius:50%; object-fit:cover; border: 1px solid #ffffff;" class="img-responsive" version="1.1" width="28px" height="28px" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" fill="#ffffff" stroke="#ffffff"><g id="SVGRepo_bgCarrier" stroke-width="0"></g><g id="SVGRepo_tracerCarrier" stroke-linecap="round" stroke-linejoin="round"></g><g id="SVGRepo_iconCarrier"><path fill="#ffffff" d="M628.736 528.896A416 416 0 0 1 928 928H96a415.872 415.872 0 0 1 299.264-399.104L512 704l116.736-175.104zM720 304a208 208 0 1 1-416 0 208 208 0 0 1 416 0z"></path></g></svg>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user