コード例 #1
0
ファイル: AvatarWidget.php プロジェクト: alextravin/yupe
 /**
  * @throws CException
  */
 public function run()
 {
     $this->imageSrc = $this->user->getAvatar($this->size);
     $this->imageAlt = $this->user->nick_name;
     $this->width = $this->size . 'px';
     $this->htmlOptions = ['class' => 'avatar avatar-' . $this->user->id];
     if (!$this->height) {
         $this->height = $this->width;
     }
     Yii::app()->clientScript->registerCssFile(Yii::app()->assetManager->publish(Yii::getPathOfAlias('user.assets.css') . '/image-wrapper.css'));
     $htmlOptions = ['class' => 'img-wrapper-tocenter', 'style' => 'width: ' . $this->width . '; height: ' . $this->height . '; background-color: ' . $this->backgroundColor . ';'];
     if (isset($this->htmlOptions['class'])) {
         $class = $this->htmlOptions['class'];
         unset($this->htmlOptions['class']);
         $htmlOptions['class'] .= ' ' . $class;
     }
     if (isset($this->htmlOptions['style'])) {
         $style = $this->htmlOptions['style'];
         unset($this->htmlOptions['style']);
         $htmlOptions['style'] .= ' ' . $style;
     }
     if (is_array($this->htmlOptions) && count($this->htmlOptions) > 0) {
         $htmlOptions = array_merge($htmlOptions, $this->htmlOptions);
     }
     echo CHtml::tag('div', $htmlOptions, CHtml::image($this->imageSrc . ($this->noCache ? '?' . microtime(true) : ''), $this->imageAlt, $this->imageHtmlOptions));
 }
コード例 #2
0
 public function orders()
 {
     $data = array();
     $seo['seo_title'] = 'Управления заказами';
     Funcs::setMeta($seo);
     if (Funcs::$uri[2] == '') {
         $data['list'] = Manager::getManagerOrders();
         View::render('manager/orders', $data);
     } else {
         $data = Orders::getOne(Funcs::$uri[2]);
         $data['avatar'] = User::getAvatar($data['iuser']);
         View::render('manager/order', $data);
     }
 }
コード例 #3
0
ファイル: UserManager.class.php プロジェクト: Hollux/mvcBase2
 public function update(User $user)
 {
     $id = $user->getId();
     $login = $this->db->quote($user->getLogin());
     $password = $this->db->quote($user->getPassword());
     $email = $this->db->quote($user->getEmail());
     $avatar = $this->db->quote($user->getAvatar());
     $query = "UPDATE\t user \n\t\t\t\t\t\tSET \tlogin\t\t='" . $login . "', \n\t\t\t\t\t\t\t\tpassword\t='" . $password . "',\n\t\t\t\t\t\t\t\temail\t\t='" . $email . "', \n\t\t\t\t\t\t\t\tavatar\t\t='" . $avatar . "' \n\t\t\t\t\t\t\t\tWHERE id\t='" . $id . "'";
     $res = $this->db->exec($query);
     if ($res) {
         return $this->findById($id);
     } else {
         throw new Exception("Internal Server Error");
     }
 }
コード例 #4
0
ファイル: TComment.php プロジェクト: GsHatRed/Yiitest
 public function run()
 {
     $data = $this->_getComment();
     echo "<legend>讨论区</legend>";
     if (empty($data)) {
         echo "<center><div class='well well-small'>暂无会签意见!</div>  </center>";
     } else {
         $this->render($this->_listView, array("dataArr" => $data, 'enableReply' => $this->enableReply, 'model' => $this->_model, 'pk' => $this->_pk, 'viewTemplate' => $this->_listViewTemplate));
     }
     if ($this->enableEdit) {
         $loginUser = Yii::app()->user->id;
         $userInfo = User::model()->getUserInfoById($loginUser);
         $avatar = User::getAvatar($loginUser, $userInfo['avatar'], 'm', $userInfo['gender'], TOrgUtil::userIsOnline($loginUser));
         $this->render($this->_formView, array("model" => $this->_model, "pk" => $this->_pk, "avatar" => $avatar));
     }
 }
コード例 #5
0
ファイル: UserManager.class.php プロジェクト: Hollux/Fennec
 public function update(User $user)
 {
     $id = $user->getId();
     $login = mysqli_real_escape_string($this->db, $user->getLogin());
     $password = mysqli_real_escape_string($this->db, $user->getHash());
     $email = mysqli_real_escape_string($this->db, $user->getEmail());
     $avatar = mysqli_real_escape_string($this->db, $user->getAvatar());
     /*/!\*/
     $query = "UPDATE user SET login='******', password='******', email='" . $email . "', avatar='" . $avatar . "' WHERE id='" . $id . "'";
     $res = mysqli_query($this->db, $query);
     if ($res) {
         return $this->findById($id);
     } else {
         return "Internal Server Error";
     }
 }
コード例 #6
0
 public function run($template)
 {
     //Remove the whole string as the first result
     array_shift($this->URLMatch);
     //Get the database
     $dbh = Engine::getDatabase();
     //Get result ID
     $resultID = $this->URLMatch[0];
     //Check if the result is in the array and return results
     $sql = "SELECT * FROM Results WHERE Result_ID IN (SELECT Result_ID FROM Result_History WHERE Result_ID= :result) LIMIT 1";
     $stmt = $dbh->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
     $stmt->execute(array(':result' => $resultID));
     $result = $stmt->fetchObject('Result');
     if ($result == false) {
         exit;
     }
     //There's no result to give an image for
     $result->Data = json_decode($result->Data, true);
     $data = $result->Data;
     $blueBackground = imagecreatefromstring(file_get_contents(__DIR__ . '/../public/images/share-background.png', "r"));
     $friends = array_keys($data['interaction']);
     $friend1 = imagecreatefromstring(file_get_contents(User::getAvatar($friends[0])));
     //200,200 (width x height)
     $friend2 = imagecreatefromstring(file_get_contents(User::getAvatar($friends[1])));
     $friend3 = imagecreatefromstring(file_get_contents(User::getAvatar($friends[2])));
     $gaussian = array(array(1.0, 2.0, 1.0), array(2.0, 4.0, 2.0), array(1.0, 2.0, 1.0));
     for ($i = 0; $i < 60; $i++) {
         imageconvolution($friend1, $gaussian, 16, 0);
         imageconvolution($friend2, $gaussian, 16, 0);
         imageconvolution($friend3, $gaussian, 16, 0);
     }
     $graph = imagecreatefromstring(file_get_contents(__DIR__ . '/../public/images/white-logo-transparent-medium.png', "r"));
     $foreground = imagecreatefromstring(file_get_contents(__DIR__ . '/../public/images/share-foreground.png', "r"));
     imagecopy($blueBackground, $friend1, -50, 25, 0, 0, imagesx($friend1), imagesy($friend1));
     imagecopy($blueBackground, $friend2, 150, 25, 0, 0, imagesx($friend2), imagesy($friend2));
     imagecopy($blueBackground, $friend3, 350, 25, 0, 0, imagesx($friend3), imagesy($friend3));
     $graph = imagescale($graph, imagesx($friend1) * 2);
     imagecopy($blueBackground, $graph, 80, -20, 0, 0, imagesx($graph), imagesy($graph));
     imagecopy($blueBackground, $foreground, 0, 0, 0, 0, imagesx($foreground), imagesy($foreground));
     ob_clean();
     ob_start();
     header('Content-Type: image/png');
     imagepng($blueBackground);
 }
コード例 #7
0
ファイル: UserManager.class.php プロジェクト: jmgerber/forum
 public function create($login, $email, $password, $avatar)
 {
     $user = new User($this->link);
     $user->setLogin($login);
     $user->setEmail($email);
     $user->setPassword($password);
     $user->setAvatar($avatar);
     $login = mysqli_real_escape_string($this->link, $user->getLogin());
     $email = mysqli_real_escape_string($this->link, $user->getEmail());
     $password = mysqli_real_escape_string($this->link, $user->getPassword());
     $avatar = mysqli_real_escape_string($this->link, $user->getAvatar());
     $request = "INSERT INTO user VALUES(NULL, '" . $login . "', '" . $email . "', '" . $password . "', '" . $avatar . "','')";
     $res = mysqli_query($this->link, $request);
     if ($res) {
         return $this->select(mysqli_insert_id($this->link));
     } else {
         throw new Exception("Internal server error");
     }
 }
コード例 #8
0
ファイル: body.php プロジェクト: MenZil-Team/cms
	<?php 
$widget_p_top = Widgets::instance()->render('post_top');
$widget_p_bot = Widgets::instance()->render('post_bottom');
?>

	<?php 
if ($post->taxonomy or $config->use_submitted) {
    ?>
		<div class="row meta">
			<?php 
    if ($config->use_submitted) {
        ?>
				<div class="col-md-7">
					<span class="author">
						<?php 
        echo HTML::anchor($post->user->url, User::getAvatar($post->user));
        ?>
						<?php 
        echo HTML::anchor($post->user->url, $post->user->nick, array('title' => $post->user->nick));
        ?>
					</span>
					<span class="date-created">
						<?php 
        echo Date::date_format($post->created);
        ?>
					</span>
				</div>
			<?php 
    }
    ?>
	
コード例 #9
0
 private function getTopThreeCatergory()
 {
     //Returns three friends that are the first in the 3 categories in a presentable HTML format
     $topLike = null;
     $topComment = null;
     $topTag = null;
     foreach ($this->Data['interaction'] as $id => $person) {
         if ($topLike['likes'] < $person['likes']) {
             $topLike = array_merge($person, array('id' => $id));
         }
         if ($topComment['comments'] < $person['comments']) {
             $topComment = array_merge($person, array('id' => $id));
         }
         if ($topTag['tags'] < $person['tags']) {
             $topTag = array_merge($person, array('id' => $id));
         }
     }
     $result = "";
     if (!is_null($topLike)) {
         $result .= "\n\t\t\t\t<div class='friend starred'>\n\t\t\t\t\t<p><b>Likes</b></p>\n\t\t\t\t\t<div class='avatar' style='background: url(\"" . User::getAvatar($topLike['id']) . "\") no-repeat; background-position: center; background-size: cover;'>\n\t\t\t\t\t\t<span>1<sup>st</sup></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>" . $topLike['name'] . "</p>\n\t\t\t\t</div>\n\t\t\t";
     }
     if (!is_null($topComment)) {
         $result .= "\n\t\t\t\t<div class='friend starred'>\n\t\t\t\t<p><b>Comments</b></p>\n\t\t\t\t\t<div class='avatar' style='background: url(\"" . User::getAvatar($topComment['id']) . "\") no-repeat; background-position: center; background-size: cover;'>\n\t\t\t\t\t<span>1<sup>st</sup></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>" . $topComment['name'] . "</p>\n\t\t\t\t</div>\n\t\t\t";
     }
     if (!is_null($topTag)) {
         $result .= "\n\t\t\t\t<div class='friend starred'>\n\t\t\t\t\t<p><b>Tagged</b></p>\n\t\t\t\t\t<div class='avatar' style='background: url(\"" . User::getAvatar($topTag['id']) . "\") no-repeat; background-position: center; background-size: cover;'>\n\t\t\t\t\t\t<span>1<sup>st</sup></span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p>" . $topTag['name'] . "</p>\n\t\t\t\t</div>\n\t\t\t";
     }
     if ($result != "") {
         $result = "\n\t\t\t\t<div class='topThree category'>\n\t\t\t\t<h5>" . $this->getPronoun() . " top interactive friends!</h5>\n\t\t\t\t{$result}\n\t\t\t\t</div>\n\t\t\t";
     }
     return $result;
 }
コード例 #10
0
 /**
  * 
  * @param User $user
  * @return int id of the User inserted in base. False if it didn't work.
  */
 public static function flush($user)
 {
     $userId = $user->getId();
     $login = $user->getLogin();
     $password = $user->getPassword();
     $mail = $user->getMail();
     $inscriptionDate = $user->getInscriptionDate();
     $firstName = $user->getFirstName();
     $lastName = $user->getLastName();
     $birthDate = $user->getBirthDate();
     $address = $user->getAddress();
     $phoneNumber = $user->getPhoneNumber();
     $avatar = $user->getAvatar();
     $role = $user->getRole()->getId();
     if ($userId > 0) {
         $sql = 'UPDATE user u SET ' . 'u.login = ?, ' . 'u.passwd = ?, ' . 'u.mail = ?, ' . 'u.inscription_date = ?, ' . 'u.first_name = ?, ' . 'u.last_name = ?, ' . 'u.birth_date = ?, ' . 'u.address = ?, ' . 'u.phone_number = ?, ' . 'u.avatar = ?, ' . 'u.ROLE_id_role = ? ' . 'WHERE u.id_user = ?';
         $params = array('ssssssssssii', &$login, &$password, &$mail, &$inscriptionDate, &$firstName, &$lastName, &$birthDate, &$address, &$phoneNumber, &$avatar, &$role, &$userId);
     } else {
         $sql = 'INSERT INTO user ' . '(login, passwd, mail, inscription_date, first_name, ' . 'last_name, birth_date, address, phone_number, avatar, ROLE_id_role) ' . 'VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)';
         $params = array('ssssssssssi', &$login, &$password, &$mail, &$inscriptionDate, &$firstName, &$lastName, &$birthDate, &$address, &$phoneNumber, &$avatar, &$role);
     }
     $idInsert = BaseSingleton::insertOrEdit($sql, $params);
     if ($idInsert !== false && $userId > 0) {
         $idInsert = $userId;
     }
     return $idInsert;
 }
コード例 #11
0
ファイル: profile.php プロジェクト: MenZil-Team/cms
				<div class="panel-heading">
					<h3 class="panel-title"><?php 
    echo __('Friends');
    ?>
</h3>
				</div>

				<?php 
    foreach ($friends as $id) {
        ?>
					<div class="list-group-item friends panel-body">
						<?php 
        $accept = User::lookup($id);
        ?>
						<?php 
        echo HTML::anchor("user/view/" . $accept->id, User::getAvatar($accept), array('class' => 'action-view', 'rel' => "popover", 'data-placement' => "right", 'rel1' => "tooltip", 'data-html' => "true", 'data-original-title' => "<strong>{$accept->nick}</strong>"));
        ?>
						<?php 
        echo HTML::anchor("user/view/" . $accept->id, $accept->nick, array('class' => 'action-view', 'title' => __('view profile')));
        ?>

						<?php 
        if ($is_owner) {
            ?>
							<?php 
            echo HTML::anchor("buddy/delete/" . $accept->id, '<i class="fa fa-trash-o"></i>', array('class' => 'action-delete pull-right', 'title' => __('Delete')));
            ?>
						<?php 
        }
        ?>
					</div>
コード例 #12
0
ファイル: UserMapper.php プロジェクト: raledon/runningOwl
 public static function toArray(User $user)
 {
     $params = array(':userId' => $user->getId(), ':password' => $user->getPassword(), ':name' => $user->getName(), ':gender' => $user->getGender(), ':telephone' => $user->getTelephone(), ':email' => $user->getEmail(), ':avatar' => $user->getAvatar(), ':slogan' => $user->getSlogan(), ':birthday' => $user->getBirthday(), ':createdAt' => $user->getCreatedAt(), ':character' => $user->getCharacter());
     return $params;
 }
コード例 #13
0
 function setAvatar(User $user)
 {
     $parametros["avatar"] = $user->getAvatar();
     $parametrosWhere = array();
     $parametrosWhere["email"] = $user->getEmail();
     return $this->bd->update2($this->tabla, $parametros, $parametrosWhere);
 }
コード例 #14
0
    function getProfileX($mid)
    {
        global $people_allow_sexe, $people_allow_birthday, $people_allow_zodiac, $people_allow_website, $people_allow_nation;
        $html = "";
        // from User.class.php
        $musername = getUsernameByMembershipID($this->Database, $mid);
        $user = new User($musername);
        $avat = $user->getAvatar();
        $name_surname = $user->getNameSurname();
        $age = $user->getAge();
        $zsign = $this->evaluateZSign($user->getZSign());
        $exact_birthday = date('m/d/Y', strtotime($user->getBirthday()));
        $birthday = date('F, j', strtotime($user->getBirthday()));
        $nationality_1 = $user->getNationality();
        $nationality_flag_1 = $user->getNationalityFlag($nationality_1);
        $sexe = $user->getSexe();
        $sexeicon = $user->getSexeIcon($sexe);
        $contact_icq = $user->getContactICQ();
        $contact_jabber = $user->getContactJabber();
        $contact_msn = $user->getContactMSN();
        $contact_yahoo = $user->getContactYahoo();
        $contact_aim = $user->getContactAIM();
        $contact_email = $user->getEmail();
        $website = $user->getWebSite();
        $html .= <<<EOS
\t <div style="position:absolute;visibility:hidden;">
\t 
\t 
\t <textarea id="inf_namesurname">{$name_surname}</textarea>
\t <textarea id="inf_sexe">{$sexe}</textarea>"
\t <textarea id="inf_birthday">{$exact_birthday}</textarea>
\t <textarea id="inf_nationality">{$nationality_1}</textarea>
\t <textarea id="inf_myspace">{$website}</textarea>
\t 
\t <textarea id="inf_email"></textarea>
\t <textarea id="inf_aim">{$contact_aim}</textarea>"
\t <textarea id="inf_msn">{$contact_msn}</textarea>
\t <textarea id="inf_yahoo">{$contact_yahoo}</textarea>
\t <textarea id="inf_jabber">{$contact_jabber}</textarea>
\t <textarea id="inf_icq">{$contact_icq}</textarea>
\t 
\t 
\t </div>
\t 
EOS;
        // and start the HTML
        $html .= "<div class=\"vcard\">";
        $html .= "<img class=\"photo\" src=\"{$avat}?" . rand(0, 1000) . "\" width=\"80\" alt=\"{$name_surname}\" height=\"80\" border=\"0\" align=\"left\" style=\"margin-bottom: 5px;margin-left: 15px; margin-right: 25px;\" />";
        $html .= "<div style=\"font-size: 1.2em;\"><b><span class=\"fn\">{$name_surname}</span>";
        if ($people_allow_birthday) {
            $html .= " ({$age})";
        }
        $html .= "</b> ";
        if ($people_allow_nation) {
            $html .= "<img src=\"{$nationality_flag_1}\" width=\"16\" height=\"11\" border=\"0\" />";
        }
        $html .= "</div>";
        if ($people_allow_website) {
            $html .= "<div style=\"font-size: 1.1em;margin-bottom: 10px;\"><a class=\"url\" href=\"{$website}\">{$website}</a></div>";
        }
        $html .= "<div style=\"margin-bottom: 10px;\">";
        if ($people_allow_sexe) {
            $html .= "<img align=\"bottom\" src=\"{$sexeicon}\" border=\"0\" alt=\"\" width=\"16\" height=\"16\" /> ";
        }
        if ($people_allow_zodiac) {
            $html .= $zsign . " (<span class=\"bday\">{$birthday}</span>)";
        }
        $html .= "</div>";
        $html .= "";
        /*
        $html .= "<div>";
        $html .= "<a class=\"url\" type=\"application/x-icq\" href=\"http://www.icq.com/people/cmd.php?uin={$contact_icq}&action=message\"><img src=\"{$this->OnlineStatusIndicator}icq/{$contact_icq}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"xmpp:{$contact_jabber}\"><img src=\"{$this->OnlineStatusIndicator}jabber/{$contact_jabber}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"msnim:chat?contact={$contact_msn}\"><img src=\"{$this->OnlineStatusIndicator}msn/{$contact_msn}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"ymsgr:sendIM?{$contact_yahoo}\"><img src=\"{$this->OnlineStatusIndicator}yahoo/{$contact_yahoo}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "<a class=\"url\" href=\"aim:goim?screenname={$contact_aim}\"><img src=\"{$this->OnlineStatusIndicator}aim/{$contact_aim}\" alt=\"\" border=\"0\" style=\"margin-right: 5px; margin-right: 25px;\" /></a>";
        $html .= "</div>";
        */
        $html .= "</div>";
        if (isset($_SESSION['valid_user']) && $musername == $_SESSION['valid_user']) {
            $html .= <<<EOS

        
        <script type="text/javascript" src="http://grou.ps/includes/wz_dragdrop.js"></script>
        <script type="text/javascript">
        <!--
        
        function crop_preloader() {
                
            SET_DHTML('theCrop');
                
        }
            
        crop_preloader();
            
            

        function my_DragFunc()
        {
            var z = xHeight('theImage')<=xWidth('theImage')?xHeight('theImage'):xWidth('theImage');
            
            dd.elements.theCrop.maxoffr = xWidth('theImage') - dd.elements.theCrop.w;
            dd.elements.theCrop.maxoffb = xHeight('theImage') - dd.elements.theCrop.h;
            dd.elements.theCrop.maxoffl = 0;
            dd.elements.theCrop.maxofft = 0;
            dd.elements.theCrop.minw = 80;
            dd.elements.theCrop.minh = 80;
            dd.elements.theCrop.maxw = (xWidth('theImage') + xPageX('theImage')) - dd.elements.theCrop.x;
            dd.elements.theCrop.maxh = (xHeight('theImage') + xPageY('theImage')) - dd.elements.theCrop.y;
        }

        function my_ResizeFunc()
        {
            var z = xHeight('theImage')<=xWidth('theImage')?xHeight('theImage'):xWidth('theImage');
            
            dd.elements.theCrop.maxoffr = xWidth('theImage') - dd.elements.theCrop.w;
            dd.elements.theCrop.maxoffb = xHeight('theImage') - dd.elements.theCrop.h;
            dd.elements.theCrop.maxoffl = 0;
            dd.elements.theCrop.maxofft = 0;
            dd.elements.theCrop.minw = 80;
            dd.elements.theCrop.minh = 80;
            dd.elements.theCrop.maxw = (xWidth('theImage') + xPageX('theImage')) - dd.elements.theCrop.x;
            dd.elements.theCrop.maxh = (xHeight('theImage') + xPageY('theImage')) - dd.elements.theCrop.y;
        }

   

        //-->
        </script>
        
        

\t\t
EOS;
        }
        return $html;
    }
コード例 #15
0
ファイル: welcome.php プロジェクト: MenZil-Team/cms
							<?php 
    }
    ?>
							<li><a href="<?php 
    echo URL::site('/user/login');
    ?>
"><i class="fa fa-fw fa-chevron-left"></i><?php 
    echo __('Sign In');
    ?>
</a></li>
						<?php 
} else {
    ?>
						<li class="dropdown">
							<?php 
    echo HTML::anchor('#', User::getAvatar($_user, array('size' => 20)) . ' ' . $_user->name . '<b class="caret"></b>', array('data-toggle' => 'dropdown', 'class' => 'dropdown-toggle'));
    ?>

							<ul class="dropdown-menu">
								<li class="dropdown-header"><strong><?php 
    echo $_user->nick;
    ?>
</strong></li>
								<li class="dropdown-header"><?php 
    echo $_user->mail;
    ?>
</li>
								<li class="divider"></li>
								<li class="dropdown-header"><?php 
    _e('Profile');
    ?>
コード例 #16
0
ファイル: viewUser.php プロジェクト: rosslagerwall/floobb
		<table class='list'>
			<?php 
$temp = new User(file_get_contents("db/Users/" . $_GET['userId'] . ".dat"));
echo "<tr><td class='listLeft'>Name</td><td class='listRight'>" . $temp->getUserId() . "</td></tr>";
if ($temp->isBanned() == 'false') {
    echo "<tr><td class='listLeft'>Banned</td><td class='listRight'>No</td></tr>";
} else {
    echo "<tr><td class='listLeft'>Banned</td><td class='listRight'>Yes</td></tr>";
}
if ($temp->isHideEmail() == false && $_SESSION['loggedIn'] == true) {
    echo "<tr><td class='listLeft'>Email Address</td><td class='listRight'>" . $temp->getEmail() . "</td></tr>";
}
echo "<tr><td class='listLeft'>Join Date</td><td class='listRight'>" . $temp->getJoinDate() . "</td></tr>";
echo "<tr><td class='listLeft'>No Of Posts</td><td class='listRight'>" . $temp->getNoPosts() . "</td></tr>";
echo "<tr><td class='listLeft'>No Of Topics</td><td class='listRight'>" . $temp->getNoTopics() . "</td></tr>";
echo "<tr><td class='listLeft'>Level</td><td class='listRight'>" . $temp->getLevel() . "</td></tr>";
if ($temp->getSig() != "") {
    echo "<tr><td class='listLeft'>Signature</td><td class='listRight'>" . $temp->getSig() . "</td></tr>";
}
if ($temp->getAvatar() != "") {
    echo "<tr><td class='listLeft'>Avatar</td><td class='listRight'><img src='" . $temp->getAvatar() . "' /></td></tr>";
}
?>
		</table>
		
		<?php 
if ($_SESSION['loggedIn'] == true) {
    echo "<div align='center' style='margin-top: 5px;'><a href='pmCompose.php?userId=" . htmlentities($_GET['userId']) . "'>PM User</a></div>";
}
outHtml3();
コード例 #17
0
ファイル: pending.php プロジェクト: MenZil-Team/cms
			<div class="clearfix"></div>
		</div>
		
		<?php 
foreach ($pendings as $pending) {
    ?>
			<div class="list-group-item allusers panel-body col-md-12">
				<?php 
    $accept = User::lookup($pending['request_from']);
    ?>
				<?php 
    if ($accept) {
        ?>
					<div class="col-md-2">
					    <?php 
        echo HTML::anchor("user/view/" . $accept->id, User::getAvatar($accept, array('size' => 80)), array('class' => 'action-view', 'title' => __('view profile')));
        ?>
					</div>
					<div class="col-md-5">
					    <?php 
        echo HTML::anchor("user/view/" . $accept->id, $accept->nick, array('class' => 'action-view', 'title' => __('view profile')));
        ?>
</br>
					    <?php 
        echo HTML::anchor("#", $accept->mail, array('title' => __('mail')));
        ?>
</br>
						<?php 
        echo $accept->dob != 0 ? $accept->dob : '__';
        ?>
</br>
コード例 #18
0
ファイル: list.php プロジェクト: MenZil-Team/cms
>
	<?php 
foreach ($comments as $i => $comment) {
    ?>
		<li class="comment <?php 
    echo $comment->status;
    ?>
" id="comment-<?php 
    echo $comment->id;
    ?>
" >
			<div class="row">
				<div class="col-sm-1 col-md-1">
					<span class="author thumbnail">
						<?php 
    echo HTML::anchor($comment->user->url, User::getAvatar($comment->user, array('size' => 50)));
    ?>
					</span>
				</div>

				<div class="col-sm-11 col-md-11">
					<div class="data">
						<?php 
    echo HTML::anchor($comment->user->url, $comment->user->nick, array('title' => $comment->user->nick));
    ?>
						<span class="date-created">
							<?php 
    echo Date::date_format($comment->created, 'd M Y');
    ?>
						</span>
コード例 #19
0
 function insertUserTagsAdmin(User $user, User $administrador)
 {
     $admin = '<li class="sub-menu">
             <a href="index.php?action=view&target=admin" >
                 <i class="fa fa-cog"></i>
                 <span>Administración</span>
             </a>
         </li>';
     $this->insertTag("admin", $admin);
     $this->insertTag("avatar", $administrador->getAvatar());
     $this->insertTag("alias", $administrador->getAlias());
     $tema = $administrador->getPlantilla();
     $link = "<img class='img-responsive' src='./plantillas/gallery/temas/tema{$tema}.png'  align=''>";
     $this->insertTag("tema", $link);
     $this->insertTag("avatar2", $user->getAvatar());
     $this->insertTag("alias2", $user->getAlias());
     $this->insertTag("descripcion", $user->getDescripcion());
     $this->insertTag("email", $user->getEmail());
     $this->insertTag("planti", $user->getPlantilla());
     $this->insertTag("fecha", $user->getFechalta());
     if ($user->getPrivado() == 1) {
         $checked = "checked";
     } else {
         $checked = "";
     }
     $this->insertTag("checked", $checked);
     if ($user->getAdministrador() == 1) {
         $checked2 = "checked";
     } else {
         $checked2 = "";
     }
     $this->insertTag("checked2", $checked2);
     switch ($user->getActivo()) {
         case -1:
             $this->insertTag("activo-1", "checked");
             break;
         case 0:
             $this->insertTag("activo0", "checked");
             break;
         case 1:
             $this->insertTag("activo1", "checked");
             break;
     }
     $this->insertTag("activo1", "");
     $this->insertTag("activo0", "");
     $this->insertTag("activo-1", "");
 }
コード例 #20
0
ファイル: User.php プロジェクト: TopFamily/group
 public function beforeValidationOnCreate()
 {
     $this->avatar = User::getAvatar($this->email);
     $this->groupid = 2;
 }
コード例 #21
0
ファイル: index.php プロジェクト: jeezybrick/light
<?php

require_once ROOT . '/views/partials/head.php';
?>

<?php 
if (User::checkIfAuth()) {
    ?>
    <div class="row">
        <div class="col-lg-12 col-md-12 col-sm-12 col-xs-12" style="margin-bottom: 70px;">
            <div id="avatar_on_index" class="col-lg-3 col-md-4 col-sm-5 hidden-xs">
                <img src="<?php 
    echo User::getAvatar($_SESSION['user']['id']);
    ?>
"
                     class="img-rounded img-responsive" alt="Avatar">
            </div>
            <div class="col-lg-5 col-md-8 col-sm-7 col-xs-12">
                <h2 style="margin-top: 0">
                    <?php 
    echo $userInfo['last_name'] . ' ' . $userInfo['first_name'];
    ?>
                </h2>

                <div class="row">
                    <div class="user_info_block col-lg-12 col-md-12 col-sm-12 col-xs-12">
                        <div class="col-lg-3 col-md-3 col-sm-4 col-xs-5">
                            <h3>
                                <small>Ваш логин:</small>
                            </h3>
                        </div>
コード例 #22
0
ファイル: admin.php プロジェクト: MenZil-Team/cms
echo __('Toggle navigation');
?>
</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<?php 
echo HTML::anchor($site_url, $site_name, array('class' => 'navbar-brand', 'title' => $site_name));
?>
			</div>
			<nav class="navbar-collapse collapse" role="navigation">
				<ul class="nav navbar-nav navbar-right">
					<li>
						<?php 
echo HTML::anchor(Route::get('user')->uri(array('action' => 'profile')), User::getAvatar($_user, array('size' => 20)) . ' ' . $_user->name);
?>
					</li>
					<li>
						<a href="<?php 
echo URL::site('/user/logout');
?>
" title="<?php 
echo __('Sign Out');
?>
"><i class="fa fa-fw fa-power-off"></i></a>
					</li>
				</ul>
			</nav><!--/.nav-collapse -->
		</div>
	</header>
コード例 #23
0
ファイル: compte.php プロジェクト: Semrom/Picstore
        <div class="container">
	    <?php 
if (isset($_SESSION['user'])) {
    ?>
            <div class="page-header" id="banner">
                <div class="row">
                    <div class="col-lg-12 col-md-7 col-sm-6" id="sous-titre-bloc">
                    </div>
                </div>
            </div>
        </div>

        <div class="container">
		    
		    <div class="alert alert-dismissible alert-success centrer" id="ok-zone">
		      <button type="button" class="close" data-dismiss="alert">×</button>
		      <strong>C'est fait !</strong> <br />Vos informations ont bien été mises à jour.
		    </div>
		    
            <!-- AVATAR -->
            <div id="avatar-container" class="container">
                <div class="ratio img-responsive img-circle" <?php 
    $user = new User($bdd);
    $img = $user->getAvatar($_SESSION['user']['id_user']);
    echo 'style="background-image:url(img/avatar/' . $img['avatar_user'] . ');"';
    ?>
></div>
            </div>
            <div id="pseudo_user" class="centrer">
                <h1 id="pseudo_user" data-id="<?php 
    echo $_SESSION['user']['id_user'];
コード例 #24
0
ファイル: widgets.php プロジェクト: s-nice/24int
if (isset($this->breadcrumbs)) {
    $this->widget('zii.widgets.CBreadcrumbs', array('homeLink' => CHtml::link('<i class="fa fa-home"> Home</i>', Yii::app()->createUrl('admin/default/index')), 'links' => $this->breadcrumbs));
}
?>
                    </ul>
					
                </div>		
                <div class='pull-right'>
                    <ul class="info-menu right-links list-inline list-unstyled">
                        <li class="profile">
                            <a href="<?php 
echo Yii::app()->createUrl('admin/user/profile');
?>
" data-toggle="dropdown" class="toggle">
                                <img src="<?php 
echo User::getAvatar();
?>
" alt="user-image" class="img-circle img-inline">
                                <span><?php 
echo Yii::app()->user->user_name;
?>
 <i class="fa fa-angle-down"></i></span>
                            </a>
                            <ul class="dropdown-menu profile animated fadeIn">
                                <li>
                                    <a href="<?php 
echo Yii::app()->createUrl('admin/user/pwd');
?>
">
                                        <i class="fa fa-wrench"></i>
                                        修改密码
コード例 #25
0
 public function actionGetcourier()
 {
     $connection = Yii::app()->db;
     $sql = 'select * from (select * from driver_location ORDER BY id DESC) AS x GROUP BY driver_user_id';
     //		$sql = 'select * from (select * from driver_location where driver_user_id=1 ORDER BY id DESC) AS x GROUP BY driver_user_id';
     $drivers = $connection->createCommand($sql)->queryAll();
     $data = array();
     $mapMethod = Yii::app()->user->getState('map_method');
     $mapUserId = Yii::app()->user->getState('map_user_id');
     foreach ($drivers as $driver) {
         $user_id = $driver['driver_user_id'];
         if ($mapMethod == 'one') {
             if ($user_id == $mapUserId) {
                 $data[$user_id] = array('name' => User::getUsername($driver['driver_user_id']), 'lat' => $driver['lat'], 'long' => $driver['long'], 'time' => $driver['time'], 'counter' => 1, 'poto' => User::getAvatar($driver['driver_user_id']));
             } else {
                 $data[$user_id] = array();
             }
         } else {
             $data[$user_id] = array('name' => User::getUsername($driver['driver_user_id']), 'lat' => $driver['lat'], 'long' => $driver['long'], 'time' => $driver['time'], 'counter' => 1, 'poto' => User::getAvatar($driver['driver_user_id']));
         }
     }
     echo json_encode($data);
     Yii::app()->end();
 }
コード例 #26
0
ファイル: editUser.php プロジェクト: rosslagerwall/floobb
			<table class='list'>
				<?php 
$temp = new User(file_get_contents("db/Users/" . $_GET['userId'] . ".dat"));
echo "<tr><td class='listleftb'>Name</td><td colspan='2' class='listrightb'>" . $temp->getUserId() . "</td></tr>";
echo "<tr><td class='listleftb'>Password</td><td colspan='2' class='listrightb'><input type='password' class='inputBox' name='password' value='" . $temp->getPassword() . "' /></td></tr>";
echo "<tr><td class='listleftb'>Email Address</td><td colspan='2' class='listrightb'><input type='text' class='inputBox' name='email' value='" . $temp->getEmail() . "' /></td></tr>";
echo "<tr><td class='listleftb'>Join Date</td><td colspan='2' class='listrightb'>" . $temp->getJoinDate() . "</td></tr>";
echo "<tr><td class='listleftb'>No Of Posts</td><td colspan='2' class='listrightb'>" . $temp->getNoPosts() . "</td></tr>";
echo "<tr><td class='listleftb'>No Of Topics</td><td colspan='2' class='listrightb'>" . $temp->getNoTopics() . "</td></tr>";
echo "<tr><td class='listleftb'>Level</td><td colspan='2' class='listrightb'>" . $temp->getLevel() . "</td></tr>";
echo "<tr><td class='listleftb'>Signature</td><td colspan='2' class='listrightb'><textarea name='sig'>" . $temp->getSig() . "</textarea></td></tr>";
if ($temp->ishideEmail()) {
    $hideEmail = " checked";
}
echo "<tr><td class='listleftb'>Hide Email</td><td colspan='2' class='listrightb' style='text-align: center;'><input type='checkbox' name='hideEmail' value='yes'" . $hideEmail . " /></td></tr>";
if ($temp->getAvatar() != "") {
    $imgAvatar = "<img src='" . $temp->getAvatar() . "' />";
} else {
    $imgAvatar = "";
}
echo "<tr><td class='listleftb'>Avatar</td><td class='listrightb'><input type='text' style='width: 265px' name='avatar' value='" . $temp->getAvatar() . "' /></td>\r\n\t\t\t\t\t\t<td style='background-color: #e9f3ff; padding: 10px 0px 10px 20px; border-left: 1px solid;'>" . $imgAvatar . "</td></tr>";
?>
			</table>
			
			<?php 
if ($_SESSION['user']->getLevel() == 3) {
    echo "<div align='center' style='margin-top: 5px;'><a href='userAdmin.php'>User Admin</a><br /><a href='editBoardSettings.php'>Edit Board Settings</a></div>";
}
?>
			<?php 
if ($_GET['error'] == 1) {