Example #1
0
function get_comments($post_id)
{
    global $post_id;
    //get comments for a given post
    $c = fetch_comments($post_id);
    for ($i = 0; $i < count($c); $i++) {
        $g_url = get_gravatar($c[$i]['email']);
        ?>
		<div class="comment" >
		<img src="<?php 
        echo $g_url;
        ?>
" style="float:left;margin:0 20px 0 0 "/> 
		<a href="<?php 
        echo $c[$i]['website'];
        ?>
"><?php 
        echo $c[$i]['name'];
        ?>
</a>
		<p><?php 
        echo $c[$i]['comment'];
        ?>
</p>
		<p><?php 
        echo $c[$i]['timestamp'];
        ?>
</p>
		<br style="clear:both" />
		</div>
		
		<?php 
    }
}
Example #2
0
 function parse()
 {
     $userExists = false;
     if (count($this->argsIndexed) > 0) {
         //Find the user:
         $userResult = $this->db->buildQuery("SELECT * FROM users WHERE username=%s", $this->argsIndexed[0]);
         if ($this->db->getHasRows($userResult)) {
             $userExists = true;
             $user = $this->db->fetchAssoc($userResult);
             $user['gravatarUrl'] = get_gravatar($user['email'], 150);
             //Fetch his objects
             $objectsResult = $this->db->buildQuery("SELECT * FROM objects WHERE seller=%s ORDER BY end_moment DESC", $user['username']);
             $user['objects'] = parseObjects($objectsResult);
             $feedbackResult = $this->db->buildQuery("SELECT isseller, rating, date, comment, buyer, seller AS username FROM feedback F LEFT OUTER JOIN objects O ON F.objectid = O.id WHERE (seller=%s AND isseller=1) OR (buyer=%s AND F.isseller=0)", $user['username'], $user['username']);
             $user['feedback'] = $this->db->fetchAllAssoc($feedbackResult);
             $this->website->assign("profileUser", $user);
         } else {
             $error = "Deze gebruiker bestaat niet";
             $userExists = false;
         }
     }
     if ($userExists) {
         $this->addToBreadcrumbs("Home", baseurl(""));
         $this->addToBreadcrumbs("Profiel");
         $this->render('Profiel', 'users/profile.tpl');
     } else {
         //Render a page here, telling the user that this user doesn't exist
     }
 }
Example #3
0
function get_user_pic($pic = FALSE, $email = FALSE)
{
    if ($pic != 'no-pic.png') {
        return base_url() . "files/media/" . $pic;
    } else {
        return get_gravatar($email);
    }
}
Example #4
0
 public function build_session($field, $key)
 {
     $data = $this->db->where($field, $key)->get($this->_table, 1)->row();
     $this->load->helper('gravatar');
     $this->session->set_userdata('session_gravatar', get_gravatar($data->mail, 128));
     $this->session->set_userdata('session_username', $data->user);
     $this->session->set_userdata('session_mail', $data->mail);
     $this->session->set_userdata('session_name', $data->name);
     $this->session->set_userdata('session_id', $data->id);
 }
    function listar_comentario($comentario)
    {
        ?>
<li class="clearfix">
    <img src="<?php 
        echo get_gravatar($comentario->email, 65);
        ?>
" class="avatar" alt="<?php 
        echo $comentario->nome;
        ?>
" />
    <div class="post-comments">
        <p class="meta"><?php 
        echo $comentario->data;
        ?>
 <a href="#"><?php 
        echo $comentario->nome;
        ?>
</a> disse : 
            <i class="pull-right"><a href="#" class="responder" data-comentario="<?php 
        echo $comentario->id_comentario;
        ?>
"><small>Responder</small></a></i>
        </p>
        <p><?php 
        echo $comentario->texto;
        ?>
</p>
    </div>
    <?php 
        if (count($comentario->comentarios) > 0) {
            ?>
    <ul class="comments">
        <?php 
            foreach ($comentario->comentarios as $comentario2) {
                ?>
        <?php 
                listar_comentario($comentario2);
                ?>
        <?php 
            }
            ?>
    </ul>
    <?php 
        }
        ?>
</li>
<?php 
    }
Example #6
0
</th>
		</thead>
		<?php 
foreach ($company->clients as $value) {
    ?>

		<tr id="<?php 
    echo $value->id;
    ?>
" >
			<td style="width:10px"><img class="minipic" src="
               <?php 
    if ($value->userpic != 'no-pic.png') {
        echo base_url() . "files/media/" . $value->userpic;
    } else {
        echo get_gravatar($value->email, '20');
    }
    ?>
                " /></td>
			<td><?php 
    echo $value->firstname;
    ?>
 <?php 
    echo $value->lastname;
    ?>
</td>
			<td class="hidden-xs"><?php 
    echo $value->email;
    ?>
</td>
			<td class="hidden-xs"><?php 
Example #7
0
</p></span>
              <span class="pull-right">
                                  <?php 
        if ($value->user_id != 0) {
            ?>
<img class="img-circle list-profile-img tt"  title="<?php 
            echo $value->user->firstname;
            ?>
 <?php 
            echo $value->user->lastname;
            ?>
"  src="<?php 
            if ($value->user->userpic != 'no-pic.png') {
                echo base_url() . "files/media/" . $value->user->userpic;
            } else {
                echo get_gravatar($value->user->email);
            }
            ?>
"><?php 
        }
        ?>
                                   
                                  </span>
                    <div class="todo-details">
                    <div class="row">
                        <div class="col-sm-3">
                        <ul class="details">
                            <li><span><?php 
        echo $this->lang->line('application_priority');
        ?>
:</span> <?php 
Example #8
0
            } elseif ($c['feedback'] == "1") {
                $feedback = "<span class=\"neutral_comment\">Neutral</span>";
            } elseif ($c['feedback'] == "2") {
                $feedback = "<span class=\"negative_comment\">Negative</span>";
            }
            $modify = "";
            if (isset($_SESSION['admin'])) {
                $modify = "<a href=\"?base=gmcp&amp;page=manblog&amp;action=pdel&amp;id=" . $c['id'] . "\">Delete</a> | ";
            }
            $quote = "";
            $pm = "";
            if (isset($_SESSION['id'])) {
                $quote = "<a href=\"#comment-" . $c['id'] . "-" . $c['author'] . "\" class=\"quote\">Quote</a> | ";
                $pm = " | <a href=\"?base=ucp&page=mail&uc=" . $c['author'] . "\">PM</a>";
            }
            echo "\n\t\t\t<div class=\"well\"><img src=\"" . get_gravatar($c['email']) . "\" alt=\"" . $c['author'] . "\" class=\"img-responsive\" style=\"float:left;padding-right:10px;\"/>\n\t\t\t<h4 style=\"margin:0px;\">" . $c['author'] . "</h4>\n\t\t\t\t<b>Feedback:</b> " . $feedback . "<br/>\n\t\t\t\t<small>Posted " . ago($c['date']) . ", on " . date('M j, Y', $c['date']) . "</small><br/>\n\t\t\t\t<small>" . $modify . $quote . "<a href=\"#comment-link-" . $c['id'] . "\" class=\"permalink\">Permalink</a><a href=\"?base=main&page=gmblog&id=" . $id . "#comment-" . $c['id'] . "\" class=\"permalinkshow linkid-" . $c['id'] . "\">?base=main&page=gmblog&id=" . $id . "#comment-" . $c['id'] . "</a>" . $pm . "</small><hr/>\n\t\t\t\t<div id=\"comment-" . $c['id'] . "\">" . $clean_comment . "</div>\n\t\t\t\t</div>";
        }
    }
} else {
    $gb = $mysqli->query("SELECT * FROM " . $prefix . "gmblog ORDER BY id DESC") or die;
    $rows = $gb->num_rows;
    if ($rows < 1) {
        echo "<div class=\"alert alert-danger\">Oops! No blogs to display right now!</div>";
    } else {
        echo "<h2 class=\"text-left\">" . $servername . " GM Blogs</h2><hr/>";
        while ($b = $gb->fetch_assoc()) {
            $gc = $mysqli->query("SELECT * FROM " . $prefix . "bcomments WHERE bid='" . $b['id'] . "' ORDER BY id ASC") or die;
            $cc = $gc->num_rows;
            echo "\n\t\t\t[" . $b['date'] . "]\n\t\t\t\t<b><a href=\"?base=main&amp;page=gmblog&amp;id=" . $b['id'] . "\">" . $b['title'] . "</a></b> by\n\t\t\t\t<a href=\"?base=main&amp;page=members&amp;name=" . $b['author'] . "\">" . $b['author'] . "</a> \n\t\t<span class=\"commentbubble\">\n\t\t\t<b>" . $b['views'] . "</b> views | <b>" . $cc . "</b> comments\n\t\t";
            if (isset($_SESSION['gm'])) {
                echo "\n\t\t\t<span class=\"commentbubble\">\n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=edit&amp;id=" . $b['id'] . "\">Edit</a> | \n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=del\">Delete</a> | \n\t\t\t\t<a href=\"?base=admin&amp;page=manblog&amp;action=lock\">Lock</a>&nbsp;\n\t\t\t";
Example #9
0
function Header_body_menu()
{
    global $sLanguage, $bDefectiveBrowser, $bExportCSV, $sMetaRefresh, $bToolTipsOn, $iNavMethod, $bRegistered, $sHeader, $sGlobalMessage;
    global $MenuFirst, $sPageTitle, $sPageTitleSub, $sURLPath;
    $sURLPath = $_SESSION['sURLPath'];
    $MenuFirst = 1;
    ?>


    <?php 
    if (!$bDefectiveBrowser) {
        echo "<div style=\"position:fixed; top:0; left:0; width: 100%;\">";
    }
    if ($sHeader) {
        // Optional Header Code (Entered on General Settings page - sHeader)
        // Must first set a table with a background color, or content scrolls across
        // the background of the custom code when using a non-defective browser
        echo "<table width=\"100%\" bgcolor=white cellpadding=0 cellspacing=0 border=0><tr><td width=\"100%\">";
        echo html_entity_decode($sHeader, ENT_QUOTES);
        echo "</td></tr></table>";
    }
    ?>
    <header class="header">
        <a href="Menu.php" class="logo">
            Church Web CRM
        </a>
        <!-- Header Navbar: style can be found in header.less -->
        <nav class="navbar navbar-static-top" role="navigation">
            <!-- Sidebar toggle button-->
            <a href="#" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </a>
            <div class="navbar-right">
                <ul class="nav navbar-nav">
                    <?php 
    if ($_SESSION['bAdmin']) {
        ?>
                    <li class="dropdown profile-dropdown">
                        <a class="btn" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-cog"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <?php 
        addMenu("admin");
        ?>
                        </ul>
                    </li>
                    <?php 
    }
    ?>
                    <li class="dropdown profile-dropdown">
                        <a class="btn" class="dropdown-toggle" data-toggle="dropdown">
                            <i class="fa fa-question-circle"></i>
                        </a>
                        <ul class="dropdown-menu">
                            <?php 
    addMenu("help");
    ?>
                        </ul>
                    </li>
                    <li class="dropdown profile-dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <img src="<?php 
    echo get_gravatar($_SESSION['sEmailAddress']);
    ?>
" class="img-circle" />
                            <span class="hidden-xs"><?php 
    echo $_SESSION['UserFirstName'] . " " . $_SESSION['UserLastName'];
    ?>
 </span> <b class="caret"></b>
                        </a>
                        <ul class="dropdown-menu">
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
PersonView.php?PersonID=<?php 
    echo $_SESSION['iUserID'];
    ?>
"><i class="fa fa-user"></i>Profile</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
UserPasswordChange.php">Change My Password</a></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
SettingsIndividual.php">Change My Settings</a></li>
                            <li class="divider"></li>
                            <li><a href="<?php 
    echo $sURLPath . "/";
    ?>
Default.php?Logoff=True"><i class="fa fa-power-off"></i>Log Off</a></li>
                        </ul>
                    </li>
                    <li class="hidden-xxs">
                        <a class="btn" href="<?php 
    echo $sURLPath . "/";
    ?>
Default.php?Logoff=True">
                            <i class="fa fa-power-off"></i>
                        </a>
                    </li>
                </ul>
            </div>
        </nav>
    </header>
    <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- Sidebar user panel -->
                    <div class="user-panel">
                        <div class="pull-left image">
                            <img src="<?php 
    echo get_gravatar($_SESSION['sEmailAddress'], 70);
    ?>
" class="img-circle" />
                        </div>
                        <div class="pull-left info">
                            <p>Welcome, <?php 
    echo $_SESSION['UserFirstName'];
    ?>
</p>
                        </div>
                    </div>
                    <!-- search form -->
                    <div class="sidebar-form">
                        <input type="text" class="form-control searchPerson" placeholder="Search..." onfocus="ClearFieldOnce(this);"/>
                    </div>
                    <!-- /.search form -->
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                        <li>
                            <a href="<?php 
    echo $sURLPath . "/";
    ?>
Menu.php">
                                <i class="fa fa-dashboard"></i> <span>Dashboard</span>
                            </a>
                        </li>
                        <?php 
    addMenu("root");
    ?>
                    </ul>
                </section>
            </aside>
            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">
                <section class="content-header">
                    <h1>
                        <?php 
    echo $sPageTitle . "\n";
    if ($sPageTitleSub != "") {
        echo "<small>" . $sPageTitleSub . "</small>";
    }
    ?>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="<?php 
    echo $sURLPath . "/Menu.php";
    ?>
"><i class="fa fa-dashboard"></i> Home</a></li>
                        <li class="active"><?php 
    echo $sPageTitle;
    ?>
</li>
                    </ol>
                </section>
                <!-- Main content -->
                <section class="content">
                    <?php 
    if ($sGlobalMessage) {
        ?>
                    <div class="main-box-body clearfix">
                        <div class="alert alert-info fade in">
                            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>
                            <i class="fa fa-exclamation-triangle fa-fw fa-lg"></i>
                            <?php 
        echo $sGlobalMessage;
        ?>
                        </div>
                    </div>
                    <?php 
    }
}
Example #10
0
function get_gravatar($email, $s = 80, $d = 'mm')
{
    $url = 'http://www.gravatar.com/avatar/';
    $url .= md5(strtolower(trim($email)));
    $url .= "?s={$s}&d={$d}";
    return $url;
}
session_start();
include_once 'config/mysql_config.php';
include_once 'functions/load_session.php';
include_once 'functions/get_new_messages_c.php';
$login = load_session();
?>
<link rel="stylesheet" href="css_styles/header.css" type="text/css">
<div id = "header">
<span id = "header_navigation">
<span id = "header_seetnau_title">seetnau</a>
<span id = "header_page_navigation">
<?php 
if ($login == True) {
    $avatar = get_gravatar($_SESSION['mail']);
    $username = $_SESSION['username'];
    $user_id = $_SESSION['user_id'];
    echo '<span class = "hdr_nav_button"><a href = "main.php">' . $username . '</a></span>' . ' - <span class = "hdr_nav_button"><a href = "messages.php">Messages (' . get_messages_count() . ')</a></span> - <span class = "hdr_nav_button"><a href = "signout.php">Sign out</a></span>';
} else {
    echo '<span class = "hdr_nav_button"><a href = "signin.php">Sign in</a></span> - <span class = "hdr_nav_button"><a href = "signup.php">Sign up</a></span>';
}
?>
</span>
</span>
</div>
Example #11
0
if (isset($settings['version'])) {
    echo $settings['version'];
}
?>
 by Cyberbyte Studios</b></a>
</header>

<aside>
    <div id="sidebar" class="nav-collapse ">
        <ul class="sidebar-menu" id="nav-accordion">
            <p class="centered">
                <?php 
if (!isset($_SESSION['profile_link'])) {
    if (isset($_SESSION['user_email']) && $settings['gravatar']) {
        echo '<a href="' . $settings['url'] . 'profile">';
        echo '<img src="' . get_gravatar($_SESSION['user_email'], 64, 'retro') . '" class="img-circle" width="60" height="60"></a></p>';
    } else {
        echo '<a href="' . $settings['url'] . 'profile">';
        echo '<img src="' . $settings['url'] . 'assets/img/profile/' . $_SESSION['user_profile'] . '.jpg"';
        echo 'class="img-circle" width="60" height="60"></a></p>';
    }
} else {
    echo '<a href="' . $_SESSION['profile_link'] . '" target="_blank">';
    echo '<img src="' . $_SESSION['user_profile'] . '"';
    echo 'class="img-circle" width="64" height="64"></a></p>';
}
?>
            <h5 class="centered">
                <?php 
if ($_SESSION['steamsignon']) {
    echo '<i class="fa fa-steam-square"></i>';
Example #12
0
 $chandle = mysql_connect($dbhost, $dbusername, $dbpassword) or die(mysql_error());
 mysql_select_db($dbname, $chandle);
 $recieve_user_info = mysql_query("SELECT * FROM users WHERE Username = '******'", $chandle);
 $user_info_o = mysql_fetch_object($recieve_user_info);
 //Friendlist
 $friend_friends = "";
 if ($user_info_o->Friends_IDs !== "" and $user_info_o->Friends_IDs !== null) {
     echo '<div class = "list">';
     echo '<div class = "list_title">Friendlist</div>';
     echo '<div class = "list_body">';
     $friends = explode(',', $user_info_o->Friends_IDs);
     foreach ($friends as $friend) {
         echo '<div class = "friend">';
         $find_username = mysql_query("SELECT * From users WHERE ID = '{$friend}'");
         $friend_info = mysql_fetch_object($find_username);
         $friend_avatar = get_gravatar($friend_info->Mail);
         echo '<div class = "friend_a"><img src = "' . $friend_avatar . '" alt = "' . $friend_info->Username . ' avatar"></div>';
         echo '<div class = "friend_n"><a href = "main.php?user='******'">' . $friend_info->Username . '</a></div>';
         echo '<div class = "friend_f">';
         echo '<form name = "friend_control" method = "POST" action = "friends.php">';
         echo '<input type = "hidden" name = "f_ID" value = "' . $friend_info->ID . '">';
         echo '<input type = "hidden" name = "f_fds" value = "' . $friend_info->Friends_IDs . '">';
         echo '<input type = "submit" name = "answer" value = "Delete">';
         echo '<input type = "button" name = "send_m" value = "Send message" class = "send_message_b" data-name="' . $friend_info->Username . '">';
         echo '</form>';
         echo '</div>';
         echo '</div>';
     }
     echo '</div>';
     echo '</div>';
 }
Example #13
0
            <!-- User information -->
            <div class="col-md-4">
                <ul class="list-inline">
                    <li>Asked <?php 
    echo $question->created_post;
    ?>
</li>
                </ul>
                <ul class="list-inline">
                    <li> <a href="<?php 
    echo $this->url->create("user/profile/{$question->acronym}");
    ?>
">
                            <img  src=" <?php 
    echo get_gravatar($question->email);
    ?>
" alt="gravatar" width="20"></a>
                    </li>
                    <li> <a href="<?php 
    echo $this->url->create("user/profile/{$question->acronym}");
    ?>
">
                            <?php 
    echo $this->di->textFilter->doFilter($question->name, 'shortcode, markdown');
    ?>
</a>
                    </li>
                    <?php 
    if ($question->solved == 1) {
        ?>
?>
          </ul>
            
    
          
        </div>
    </div>

    <div class="content-area">
      <div class="row mainnavbar">
      <div class="topbar">
      <?php 
if ($this->client->userpic != 'no-pic.png') {
    $userimage = base_url() . "files/media/" . $this->client->userpic;
} else {
    $userimage = get_gravatar($this->client->email);
}
?>
      <span class="inline visible-xs"><a href="<?php 
echo site_url("agent");
?>
" data-toggle="mainmodal" title="<?php 
echo $this->lang->line('application_profile');
?>
"><img class="img-circle topbar-userpic" src="<?php 
echo $userimage;
?>
" height="21px"></a></span>
      <img class="img-circle topbar-userpic hidden-xs" src="<?php 
echo $userimage;
?>
Example #15
0
 /**
  * Add Directus default user
  *
  * @param array $data
  * @return array
  */
 public static function addDefaultUser($data)
 {
     $db = Bootstrap::get('ZendDb');
     $tableGateway = new TableGateway('directus_users', $db);
     $hash = password_hash($data['directus_password'], PASSWORD_DEFAULT, ['cost' => 12]);
     $data['user_salt'] = StringUtils::randomString();
     $data['user_token'] = StringUtils::randomString(32);
     $data['avatar'] = get_gravatar($data['directus_email']);
     $tableGateway->insert(['active' => 1, 'first_name' => 'Admin', 'last_name' => 'User', 'email' => $data['directus_email'], 'password' => $hash, 'salt' => $data['user_salt'], 'avatar' => $data['avatar'], 'group' => 1, 'token' => $data['user_token'], 'language' => ArrayUtils::get($data, 'default_language', 'en')]);
     return $data;
 }
Example #16
0
        echo $news->title;
        ?>
</a></h4><?php 
    }
    ?>
			<img src="<?php 
    echo assets_url('uploads/' . $news->image);
    ?>
" alt="<?php 
    echo $news->title;
    ?>
" class="img-responsive" />
			<p class="alert alert-warning author-info">
				<?php 
    $author = get_user_profile($news->iduser);
    echo ($author->gravatar_email ? '<img src="' . get_gravatar($author->gravatar_email, 16) . '" class="gravatar" title="' . ($author->display_name ? $author->display_name : $author->first_name . ' ' . substr($author->last_name, 0, 1)) . '" /> ' : '<i class="fa fa-fw fa-user"></i> ') . ($author ? $author->display_name : $author->first_name . ' ' . substr($author->last_name, 0, 1));
    ?>
				<i class="fa fa-fw fa-calendar-o"></i> <?php 
    echo date('d M, Y h:i a', strtotime($news->add_date));
    ?>
			</p>
			<div class="news-excerpt">
				<?php 
    echo substr(strip_tags($news->body), 0, $length);
    ?>
 ... <a href="<?php 
    echo base_url('news/detail/' . $news->idpost);
    ?>
">read more <i class="fa fa-fw fa-external-link"></i></a>
			</div>
		</div>
Example #17
0
            }
        }
        echo '{"solved":', rtrim($solved, ','), '},"failed":', rtrim($failed, ','), '}}';
    }
} else {
    if (!$row) {
        echo _('There\'s no such user...');
        exit;
    }
    header('Content-Type: text/html; charset=utf-8');
    ?>
 
<div class="media">
    <a class="pull-left">
        <img src="<?php 
    echo get_gravatar($row[1], 100);
    ?>
" class="media-object img-circle" width="100" height="100">
    </a>
    <div class="media-body">
        <h1 class="media-heading"><?php 
    echo htmlspecialchars($user);
    ?>
</h1>
        <p class="motto-text"><?php 
    echo htmlspecialchars($row[8]);
    ?>
</p>
        <label class="label label-<?php 
    echo $status_col;
    ?>
Example #18
0
        $hasil = $koneksi_db->sql_query("SELECT * FROM testimonial  where status='ya' ORDER BY pid DESC LIMIT {$offset}, {$limit}");
        while ($data = $koneksi_db->sql_fetchrow($hasil)) {
            $td = $no % 2;
            $pid = $data['pid'];
            $nama = $data['nama'];
            $email = $data['email'];
            $testimonial = $data['testimonial'];
            $website = $data['website'];
            $tgl = datetimes($data['tgl']);
            if ($td == 0) {
                $bgcolor = 'bgcolor="#f2f2f2"';
            } else {
                $bgcolor = '';
            }
            $tengah .= '<tr ' . $bgcolor . '>
<td style="padding:10px 10px 10px 10px; border-bottom:1px solid #dddddd;"><img src="' . get_gravatar($email) . '" style="float:left; margin-right:10px;"><div class="date">' . $tgl . '</div><b>' . $nama . '</b><br/>' . $testimonial . '</td></tr>';
            $no++;
        }
        if ($jumlah > $limit) {
            $tengah .= '<tr>
<td colspan="4" valign="top" style="background:#ffffff; text-align:center; padding:4px 10px 4px 10px;">';
            $tengah .= '<div class="border">';
            $tengah .= "<center>";
            if (empty($_GET['offset']) and !isset($_GET['offset'])) {
                $offset = 0;
            }
            if (empty($_GET['pg']) and !isset($_GET['pg'])) {
                $pg = 1;
            }
            if (empty($_GET['stg']) and !isset($_GET['stg'])) {
                $stg = 1;
Example #19
0
function c2r_get_user_info_object($id)
{
    $data = '{"method": "get_user_info", "params": [' . $id . '], "id": 0}';
    $r = post($data);
    $u->id = $r[0];
    $u->name = $r[1];
    $u->email = $r[2];
    $u->company_id = $r[3];
    $u->company = c2r_companies_get($u->company_id);
    $u->default_location_id = $r[4];
    $u->default_location = c2r_locations_get($u->default_location_id);
    $u->group_id = $r[5];
    $u->group = c2r_groupnames($u->group_id);
    $u->is_active = $r[6];
    $u->is_active_text = $r[6] ? 'Yes' : 'No';
    $u->language = $r[7];
    $u->gravatar_big = get_gravatar($u->email, 80);
    $u->gravatar_small = get_gravatar($u->email, 32);
    return $u;
}
Example #20
0
 public function testGetGravatar()
 {
     $email = 'admin@localhost';
     $s = 200;
     $d = 'identicon';
     $r = 'g';
     $avatarURL = get_gravatar($email, $s, $d, $r);
     $expected = '//www.gravatar.com/avatar/' . md5($email) . "?s={$s}&d={$d}&r={$r}";
     $this->assertSame($expected, $avatarURL);
     $avatarImg = get_gravatar($email, $s, $d, $r, true);
     $this->assertSame('<img src="' . $expected . '" />', $avatarImg);
     $avatarImg = get_gravatar($email, $s, $d, $r, true, ['alt' => 'image']);
     $this->assertSame('<img src="' . $expected . '" alt="image" />', $avatarImg);
 }
Example #21
0
echo $client->id;
?>
" class="btn" data-toggle="modal"><i class="icon-info-sign"></i> <?php 
echo $this->lang->line('application_show_login_details');
?>
</a>
		</div>
		<hr>
		<div class="row">
		<div class="span12 marginbottom20">
		<div class="table_head"><img class="minipic" src="
               <?php 
if ($client->userpic != 'no-pic.png') {
    echo base_url() . "files/media/" . $client->userpic;
} else {
    echo get_gravatar($client->email, '20');
}
?>
                " /><h6><?php 
echo $this->lang->line('application_client_details');
?>
</h6></div>
		<div class="subcont">
		<ul class="details span6">
			<li><span><?php 
echo $this->lang->line('application_company_name');
?>
:</span> <?php 
echo $client->company->name = empty($client->company->name) ? "-" : $client->company->name;
?>
</li>
/**
 * DokuWiki Bootstrap3 Template: User Menu
 *
 * @link     http://dokuwiki.org/template:bootstrap3
 * @author   Giuseppe Di Terlizzi <*****@*****.**>
 * @license  GPL 2 (http://www.gnu.org/licenses/gpl.html)
 */
// must be run from within DokuWiki
if (!defined('DOKU_INC')) {
    die;
}
$gravatar_check = false;
if (bootstrap3_conf('useGravatar')) {
    $HTTP = new DokuHTTPClient();
    $gravatar_img_small = get_gravatar($INFO['userinfo']['mail'], 30);
    $gravatar_img = get_gravatar($INFO['userinfo']['mail'], 64);
    $gravatar_check = $HTTP->get($gravatar_img . '&d=404');
}
if (!empty($_SERVER['REMOTE_USER'])) {
    ?>
<ul class="nav navbar-nav" id="dw__user_menu">
  <li class="dropdown">

    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
      <?php 
    if ($gravatar_check) {
        ?>
        <img src="<?php 
        echo $gravatar_img_small;
        ?>
" class="img-circle profile-image" />
Example #23
0
                        <input id="search_input" name="q" type="text" class="form-control" autocomplete="off" placeholder="<?php 
echo _('Search...');
?>
">
                    </div>
                </div>
            </form>

            <ul class="nav navbar-nav navbar-right">
                <?php 
if (isset($_SESSION['user'])) {
    ?>
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                            <?php 
    echo '<img src=' . get_gravatar($_SESSION['email'], 40) . ' class="img-circle navbar-img" width="20" height="20"> ' . $_SESSION['user'];
    ?>
 <strong class="notifier"></strong> <span class="caret"></span>
                        </a>  
                        <ul class="dropdown-menu dropdown-menu-right" id="nav_right">
                            <li><a href="/mail.php" id="nav_mail"><i class="fa fa-fw fa-envelope"></i> <?php 
    echo _('Mails');
    ?>
 <strong class="notifier"></strong></a></li>
                            <li><a href="/marked.php"><i class="fa fa-fw fa-star"></i> <?php 
    echo _('Marked');
    ?>
</a></li>
                            <li><a href="/profile.php"><i class="fa fa-fw fa-github-alt"></i> <?php 
    echo _('Profile');
    ?>
Example #24
0
		'text' => _('Remove moderator'),
		'plug' => _('Are you sure you want to remove this user from the moderator group?')
	);


echo buttoner();
echo $table;
?>
<div class="section"><?php _("Profile") ?></div>

<?php
$CI->buttoner = array();

if ($CI->tank_auth->get_user_id() == $user->id)
	$CI->buttoner[] = array(
		'text' => _('Edit'),
		'href' => '',
		'onclick' => "slideToggle('.plain'); slideToggle('.edit'); return false;"
	);

echo buttoner();
echo form_open();
echo $profile;
echo form_close();
?>

<br/>
Gravatar:
<br/>
<img src="<?php echo get_gravatar($user->email, 150); ?>" />
Example #25
0
include_once "modele/connexionsql.php";
//Inclusion des fonctions relatives aux membres
include_once "modele/fonctionsdb.php";
//Test si maintenance
if (returnValueFromParam("maintenanceMode") == "true") {
    header("Location: maintenance.php");
}
if (isset($_GET["pseudo"]) and !empty($_GET["pseudo"])) {
    $user = getUserByPseudo($_GET["pseudo"]);
    if (!empty($user)) {
        $title = "Profil de " . $user["pseudo"];
    } else {
        $title = "Profil inexistant";
    }
    //Gravatar
    $url = get_gravatar($user["mail"]);
    //Select comms
    $nbcomms = selectComms($user["pseudo"]);
    //Select posts
    $nbposts = selectPosts($user["pseudo"]);
    //Select comms G
    $nbcommstempG = selectCommsGlobal();
    //comms autres
    $nbcommsG = $nbcommstempG - $nbcomms;
    //Select posts G
    $nbpoststempG = selectPostsGlobal();
    //Posts autres
    $nbpostsG = $nbpoststempG - $nbposts;
    //Ranking
    $rank = Ranking($user["pseudo"]);
    //Date inscription
Example #26
0
        echo base_url();
        ?>
messages">
                            <img class="userpic img-rounded" src="
            <?php 
        if ($value->userpic_u) {
            if ($value->userpic_u != 'no-pic.png') {
                echo base_url() . "files/media/" . $value->userpic_u;
            } else {
                echo get_gravatar($value->email_u);
            }
        } else {
            if ($value->userpic_c != 'no-pic.png') {
                echo base_url() . "files/media/" . $value->userpic_c;
            } else {
                echo get_gravatar($value->email_c);
            }
        }
        ?>
            "/>
                            <h5><?php 
        if (isset($value->sender_u)) {
            echo $value->sender_u;
        } else {
            echo $value->sender_c;
        }
        ?>
</h5>
                            <small><?php 
        $unix = human_to_unix($value->time);
        echo date($core_settings->date_format . ' ' . $core_settings->date_time_format, $unix);
Example #27
0
        <div class="post-tools">
          <p class="ico"><a href="" class="comments"><?php 
    echo $post->post_reply_count;
    ?>
</a>Comments</p>
          <p class="ico"><a href="" class="likes"><?php 
    echo $post->post_like_count;
    ?>
</a>likes</p>  
          <p class="ico"><a href="" class="rebound">&nbsp;</a>likes</p>     
        </div>        
      </div>
      <div class="post-user-info">
        <a href="/">
          <?php 
    echo get_gravatar($post->user_email, 18);
    echo $post->user_name;
    ?>
        </a>
      </div>  
    </li>  
  <?php 
}
?>
  </ul>
  <hr />
  <?php 
echo $paging;
?>
  
  </div>
Example #28
0
						<a href="<?php 
    echo $this->url->create('login');
    ?>
">Logga in för att kunna skriva frågor</a> 
					</nav>
				<?php 
}
if (isset($questions[0])) {
    $questions = array_reverse($questions);
    $html = "<div class='all-questions'>";
    foreach ($questions as $question) {
        $user = $this->UserController->getUserAction($question->userId);
        $tags = $this->TagsController->getTagsByQuestion($question->id);
        $answers = $this->AnswersController->getAnswers($question->id);
        $html .= "<div class='question'><h3><a href=" . $this->url->create('questions/id/' . $question->id) . ">" . $question->subject . "</a><span class='number-answers'> (" . count($answers) . " svar) </span></h3> <h6>by " . $user->acronym . "</h6>";
        $html .= "<img src=" . get_gravatar($user->email, 80) . ">";
        $html .= "<article>" . $this->textFilter->doFilter($question->text, 'shortcode, markdown') . "</article><hr><span class='tags'> ";
        foreach ($tags as $id => $name) {
            $html .= "<a href=" . $this->url->create('tags/id/' . $id) . ">" . $name . "</a> ";
        }
        $html .= "</span>";
        $html .= "<span class='date'>" . $question->created . "</span>";
        $html .= "</div>";
    }
    $html .= "</div>";
    echo $html;
}
?>
 

                }
            }
        }
    }
    $attachments = array();
    if ($thread->attachment_ids) {
        $attachments = explode(',', $thread->attachment_ids);
    }
    $body = stripcslashes($thread->body);
    $body = preg_replace("/(\r\n|\n|\r)/", '<br>', $body);
    $body .= $signature;
    ?>
			<table class="replyUserInfo" style="width: 95%;margin-top: -9px;">
				<tr>
					<td style="width: 60px;padding-top: 9px;vertical-align:top;"><img src="<?php 
    echo get_gravatar($user_email, 60);
    ?>
"></td>
					<td style="padding-left: 5px;vertical-align:top;">
						<div class="threadUserName"><?php 
    echo $user_name;
    ?>
</div>
						<div><small class="threadUserType"><?php 
    echo $user_email;
    ?>
</small></div>
						<div><small class="threadCreateTime"><?php 
    echo $modified;
    ?>
</small></div>
Example #30
0
<?php 
$html = "<div class='col-md-12 spacer'>";
$html .= "<img style='float:left; margin-right:4px;' class='user-list' src=" . get_gravatar($user->email, 80) . ">";
$html .= "<h1 style='margin:0; padding:0;'>" . $user->acronym . "</h1><p class='OpenSans'>Blev medlem: " . $user->created . "<br>Användar ID: " . $user->id . "</p>";
$html .= "</div>";
// IF logged in view edit link
$html .= "<div class='col-md-12 spacer'>";
if ($edit) {
    $editLink = "<a href=" . $this->url->create('user/edit/' . $user->id) . ">Redigera profil <i class='fa fa-long-arrow-right'></i></a>";
} else {
    $editLink = "<a href='http://www.student.bth.se/~maem14/phpmvc/project/audiobox/webroot/login'><i class='fa fa-lock'></i> Logga in för att editera</a>";
}
$html .= "</div>";
///////////////////////////////////
// Presentation
$html .= "<div class='col-md-12 spacer'>";
if (empty($user->text)) {
    $html .= "<p>" . $user->acronym . " har inte skrivit någon presentation ännu </p>" . $editLink;
} else {
    $html .= "<p>" . $this->textFilter->doFilter($user->text, 'shortcode, markdown') . "</p>" . $editLink;
}
$html .= "<hr /></div>";
///////////////////////////////////
// Questions
$html .= "<div class='col-md-12 spacer'>";
if (!empty($questions)) {
    $html .= "<h2 class='questions-form-heading'>Frågor som " . $user->acronym . " har ställt &#40;" . count($questions) . "&#41; <i class='fa fa-comments-o'></i></h2>";
    foreach ($questions as $question) {
        $tags = $this->TagsController->getTagsByQuestion($question->id);
        $answers = $this->AnswersController->getAnswers($question->id);