当前位置: 首页>>代码示例>>PHP>>正文


PHP user_online函数代码示例

本文整理汇总了PHP中user_online函数的典型用法代码示例。如果您正苦于以下问题:PHP user_online函数的具体用法?PHP user_online怎么用?PHP user_online使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了user_online函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: login_check

function login_check()
{
    global $smarty;
    $email = @$_POST['email'];
    $pass = @$_POST['loginpass'];
    if (login_needcaptcha()) {
        if (recaptcha_verify() !== true) {
            login_error(_('The CAPTCHA you entered is incorrect'));
            die;
        }
    }
    $ret = user_verify($email, $pass);
    if ($ret !== true) {
        login_incfail();
        login_error($ret);
        die;
    } else {
        user_online($email);
        login_resetfail();
        $url = 'account.php';
        header("Location: {$url}");
        $smarty->assign('url', $url);
        $smarty->display('templates/redirect.html');
    }
}
开发者ID:iwarsong,项目名称:seavpn,代码行数:25,代码来源:login.php

示例2: check_permissions

 function check_permissions()
 {
     if (user_online()) {
         log_write("error", "You are already logged in, there is no need to revisit the login page.");
         return 0;
     } else {
         return 1;
     }
 }
开发者ID:carriercomm,项目名称:amberdms-bs,代码行数:9,代码来源:login.php

示例3: check_permissions

 function check_permissions()
 {
     if (!user_online()) {
         return 0;
     }
     if ($GLOBALS["config"]["AUTH_METHOD"] != "sql") {
         log_write("error", "page", "User options can only be configured when using local user authentication");
         return 0;
     }
     return 1;
 }
开发者ID:kissingwolf,项目名称:namedmanager,代码行数:11,代码来源:options.php

示例4: error_render_noperms

function error_render_noperms()
{
    // display a different message if the user isn't online
    if (user_online()) {
        $_SESSION["error"]["message"] = array("Sorry, your login permissions do not permit you to access this content.");
        // end the page
        $_SESSION["error"]["pagestate"] = 0;
    } else {
        error_render_nologin();
    }
    return 1;
}
开发者ID:claybbs,项目名称:namedmanager,代码行数:12,代码来源:inc_errors.php

示例5: reg_save

function reg_save()
{
    global $smarty;
    $email = @$_POST['email'];
    $pass = @$_POST['loginpass'];
    $pass2 = @$_POST['loginpass2'];
    if ($pass == '' || $email == '') {
        reg_main(_('Please enter email and password'));
        return false;
    }
    if (strpos($email, '@') == false || strpos($email, '.') == false) {
        reg_main(_('Invalid email address'));
        return false;
    }
    if ($pass != $pass2) {
        reg_main(_('Password does not match'));
        return false;
    }
    if (recaptcha_verify() !== true) {
        reg_main(_('The CAPTCHA you enter is not correct'));
        return false;
    }
    if (INVITECODE_ENABLED == 1 && reg_checkinvite(@$_POST['invitecode']) == false) {
        reg_main(_('The invite code is invalid or have been used'));
        return false;
    }
    $ret = user_add($email, $pass);
    if ($ret !== true) {
        reg_main("<p>{$ret}</p>" . _('<p>Register fail, please contact us for help if you need.</p>'));
        return false;
    }
    $user = user_get($email);
    if (INVITECODE_ENABLED == 1) {
        invite_use($_POST['invitecode'], $user['id']);
    }
    user_online($email);
    $smarty->assign('tip_title', _('Register successed'));
    $smarty->assign('tip_msg', _('You have registerd successfully'));
    $smarty->assign('redirect_url', 'account.php');
    $smarty->display('tip.html');
}
开发者ID:iwarsong,项目名称:seavpn,代码行数:41,代码来源:reg.php

示例6: abs

     ############################################################################################
     ##                                    Изменение заметки                                   ##
     ############################################################################################
 ############################################################################################
 ##                                    Изменение заметки                                   ##
 ############################################################################################
 case 'note':
     if (isset($_GET['id'])) {
         $id = abs(intval($_GET['id']));
     } else {
         $id = 0;
     }
     if ($id > 0) {
         $data = DB::run()->queryFetch("SELECT * FROM contact WHERE contact_id=? AND contact_user=? LIMIT 1;", array($id, $log));
         if (!empty($data)) {
             echo '<img src="/images/img/edit.gif" alt="image" /> Заметка для пользователя <b>' . nickname($data['contact_name']) . '</b> ' . user_online($data['contact_name']) . ':<br /><br />';
             echo '<div class="form">';
             echo '<form method="post" action="contact.php?act=editnote&amp;id=' . $id . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '">';
             echo 'Заметка:<br />';
             echo '<textarea cols="25" rows="5" name="msg">' . $data['contact_text'] . '</textarea><br />';
             echo '<input value="Редактировать" name="do" type="submit" /></form></div><br />';
         } else {
             show_error('Ошибка редактирования заметки!');
         }
     } else {
         show_error('Ошибка! Не выбран пользователь для добавления заметки!');
     }
     echo '<img src="/images/img/back.gif" alt="image" /> <a href="contact.php?start=' . $start . '">Вернуться</a><br />';
     break;
     ############################################################################################
     ##                                   Добавление заметки                                   ##
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:contact.php

示例7: bb_code

		(<?php 
    echo $data['topics_posts'];
    ?>
)
	</div>
	<div>
		<?php 
    echo bb_code($data['posts_text']);
    ?>
<br />

		Написал: <?php 
    echo nickname($data['posts_user']);
    ?>
 <?php 
    echo user_online($data['posts_user']);
    ?>
 <small>(<?php 
    echo date_fixed($data['posts_time']);
    ?>
)</small><br />

		<?php 
    if (is_admin() || empty($config['anonymity'])) {
        ?>
			<span class="data">(<?php 
        echo $data['posts_brow'];
        ?>
, <?php 
        echo $data['posts_ip'];
        ?>
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:new_posts.php

示例8: profile

		<?php 
    }
    ?>

		<b><?php 
    echo profile($data['commblog_author']);
    ?>
</b> <small>(<?php 
    echo date_fixed($data['commblog_time']);
    ?>
)</small><br />
		<?php 
    echo user_title($data['commblog_author']);
    ?>
 <?php 
    echo user_online($data['commblog_author']);
    ?>
	</div>

		<?php 
    if (!empty($log) && $log != $data['commblog_author']) {
        ?>
			<div class="right">
				<a href="blog.php?act=reply&amp;id=<?php 
        echo $blogs['blogs_id'];
        ?>
&amp;pid=<?php 
        echo $data['commblog_id'];
        ?>
&amp;start=<?php 
        echo $start;
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:blog_comments.php

示例9: explode

     $start = 0;
 }
 if ($total < $start + $config['lifelist']) {
     $end = $total;
 } else {
     $end = $start + $config['lifelist'];
 }
 for ($i = $start; $i < $end; $i++) {
     $data = explode("|", $file[$i]);
     echo '<div class="b">' . $data[1] . '. <img src="../images/img/chel.gif" alt="image" /> ';
     if ($uz == $data[2]) {
         echo '<b><big><a href="../pages/anketa.php?uz=' . $data[2] . '&amp;' . SID . '"><span style="color:#ff0000">' . nickname($data[2]) . '</span></a></big></b> ';
     } else {
         echo '<b><a href="../pages/anketa.php?uz=' . $data[2] . '&amp;' . SID . '">' . nickname($data[2]) . '</a></b> ';
     }
     echo user_online($data[2]) . '</div>';
     echo '<div>Провел на сайте: ' . makestime($data[3]) . '</div>';
 }
 page_jumpnavigation('lifelist.php?', $config['userlist'], $start, $total);
 page_strnavigation('lifelist.php?', $config['userlist'], $start, $total);
 ############################################################################################
 ##                                 Поиск пользователя                                     ##
 ############################################################################################
 if (empty($uz)) {
     echo '<hr /><b>Поиск пользователя:</b><br />';
     echo '<form action="lifelist.php?start=' . $start . '&amp;' . SID . '" method="post">';
     echo '<input name="uz" value="' . $log . '" />';
     echo '<input type="submit" value="Искать" /></form><hr />';
 } else {
     $string = search_string(DATADIR . "datatmp/lifelist.dat", $uz, 2);
     if ($string) {
开发者ID:sirkadirov,项目名称:wap-motor,代码行数:31,代码来源:lifelist.php

示例10: isset

 ############################################################################################
 ##                                Просмотр по пользователям                               ##
 ############################################################################################
 case 'view':
     $uz = isset($_GET['uz']) ? check($_GET['uz']) : '';
     if (user($uz)) {
         $total = DB::run()->querySingle("SELECT COUNT(*) FROM `transfers` WHERE `trans_user`=?;", array($uz));
         if ($total > 0) {
             if ($start >= $total) {
                 $start = 0;
             }
             $queryhist = DB::run()->query("SELECT * FROM `transfers` WHERE `trans_user`=? ORDER BY `trans_time` DESC LIMIT " . $start . ", " . $config['listtransfers'] . ";", array($uz));
             while ($data = $queryhist->fetch()) {
                 echo '<div class="b">';
                 echo '<div class="img">' . user_avatars($data['trans_user']) . '</div>';
                 echo '<b>' . profile($data['trans_user']) . '</b> ' . user_online($data['trans_user']) . ' ';
                 echo '<small>(' . date_fixed($data['trans_time']) . ')</small>';
                 echo '</div>';
                 echo '<div>';
                 echo 'Кому: ' . profile($data['trans_login']) . '<br />';
                 echo 'Сумма: ' . moneys($data['trans_summ']) . '<br />';
                 echo 'Комментарий: ' . $data['trans_text'] . '<br />';
                 echo '</div>';
             }
             page_strnavigation('transfers.php?act=view&amp;uz=' . $uz . '&amp;', $config['listtransfers'], $start, $total);
             echo 'Всего операций: <b>' . $total . '</b><br /><br />';
         } else {
             show_error('Истории операций еще нет!');
         }
     } else {
         show_error('Ошибка! Данный пользователь не найден!');
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:transfers.php

示例11: array_reverse

     $file = array_reverse($file);
     $total = count($file);
     if ($total > 0) {
         echo '<form action="kontakt.php?action=del&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '&amp;' . SID . '" method="post">';
         if ($start < 0 || $start > $total) {
             $start = 0;
         }
         if ($total < $start + $config['kontaktlist']) {
             $end = $total;
         } else {
             $end = $start + $config['kontaktlist'];
         }
         for ($i = $start; $i < $end; $i++) {
             $data = explode("|", $file[$i]);
             $num = $total - $i - 1;
             echo '<div class="b">' . user_avatars($data[1]) . ' ' . ($i + 1) . '. <b><a href="anketa.php?uz=' . $data[1] . '&amp;' . SID . '">' . nickname($data[1]) . '</a></b> ' . user_online($data[1]) . '</div>';
             echo '<div>Дабавлен: ' . date_fixed($data[2]) . '<br />';
             echo '<input type="checkbox" name="del[]" value="' . $num . '" /> ';
             echo '<a href="privat.php?action=submit&amp;uz=' . $data[1] . '&amp;' . SID . '">Написать</a> | ';
             echo '<a href="../games/perevod.php?uz=' . $data[1] . '&amp;' . SID . '">Перевод</a></div>';
         }
         echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
         page_jumpnavigation('kontakt.php?', $config['kontaktlist'], $start, $total);
         page_strnavigation('kontakt.php?', $config['kontaktlist'], $start, $total);
     } else {
         echo '<img src="../images/img/reload.gif" alt="image" /> <b>Контакт-лист пуст!</b><br />';
     }
 } else {
     echo '<img src="../images/img/reload.gif" alt="image" /> <b>Контакт-лист пуст!</b><br />';
 }
 echo '<hr /><form method="post" action="kontakt.php?action=add&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '&amp;' . SID . '">';
开发者ID:sirkadirov,项目名称:wap-motor,代码行数:31,代码来源:kontakt.php

示例12: last_page

     if ($start >= $total) {
         $start = last_page($total, $config['postgallery']);
     }
     $is_admin = is_admin();
     if ($is_admin) {
         echo '<form action="index.php?act=delcomm&amp;gid=' . $gid . '&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
     }
     $querycomm = DB::run()->query("SELECT * FROM `commphoto` WHERE `commphoto_gid`=? ORDER BY `commphoto_time` ASC LIMIT " . $start . ", " . $config['postgallery'] . ";", array($gid));
     while ($data = $querycomm->fetch()) {
         echo '<div class="b">';
         echo '<div class="img">' . user_avatars($data['commphoto_user']) . '</div>';
         if ($is_admin) {
             echo '<span class="imgright"><input type="checkbox" name="del[]" value="' . $data['commphoto_id'] . '" /></span>';
         }
         echo '<b>' . profile($data['commphoto_user']) . '</b> <small>(' . date_fixed($data['commphoto_time']) . ')</small><br />';
         echo user_title($data['commphoto_user']) . ' ' . user_online($data['commphoto_user']) . '</div>';
         if ($log == $data['commphoto_user'] && $data['commphoto_time'] + 600 > SITETIME) {
             echo '<div class="right"><a href="index.php?act=editcomm&amp;gid=' . $gid . '&amp;cid=' . $data['commphoto_id'] . '&amp;start=' . $start . '">Редактировать</a></div>';
         }
         echo '<div>' . bb_code($data['commphoto_text']) . '<br />';
         if (is_admin() || empty($config['anonymity'])) {
             echo '<span class="data">(' . $data['commphoto_brow'] . ', ' . $data['commphoto_ip'] . ')</span>';
         }
         echo '</div>';
     }
     if ($is_admin) {
         echo '<span class="imgright"><input type="submit" value="Удалить выбранное" /></span></form>';
     }
     page_strnavigation('index.php?act=comments&amp;gid=' . $gid . '&amp;', $config['postgallery'], $start, $total);
 }
 if (empty($photo['photo_closed'])) {
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:index.php

示例13: isset

 ##                                Просмотр по пользователям                               ##
 ############################################################################################
 case 'view':
     $uz = isset($_GET['uz']) ? check($_GET['uz']) : '';
     if (user($uz)) {
         $total = DB::run()->querySingle("SELECT COUNT(*) FROM `banhist` WHERE `ban_user`=?;", array($uz));
         if ($total > 0) {
             if ($start >= $total) {
                 $start = 0;
             }
             $queryhist = DB::run()->query("SELECT * FROM `banhist` WHERE `ban_user`=? ORDER BY `ban_time` DESC LIMIT " . $start . ", " . $config['listbanhist'] . ";", array($uz));
             echo '<form action="banhist.php?act=del&amp;start=' . $start . '&amp;uid=' . $_SESSION['token'] . '" method="post">';
             while ($data = $queryhist->fetch()) {
                 echo '<div class="b">';
                 echo '<div class="img">' . user_avatars($data['ban_user']) . '</div>';
                 echo '<b>' . profile($data['ban_user']) . '</b> ' . user_online($data['ban_user']) . ' ';
                 echo '<small>(' . date_fixed($data['ban_time']) . ')</small><br />';
                 echo '<input type="checkbox" name="del[]" value="' . $data['ban_id'] . '" /> ';
                 echo '<a href="zaban.php?act=editban&amp;uz=' . $data['ban_user'] . '">Изменить</a></div>';
                 echo '<div>';
                 if (!empty($data['ban_type'])) {
                     echo 'Причина: ' . bb_code($data['ban_reason']) . '<br />';
                     echo 'Срок: ' . formattime($data['ban_term']) . '<br />';
                 }
                 switch ($data['ban_type']) {
                     case '1':
                         $stat = '<span style="color:#ff0000">Забанил</span>:';
                         break;
                     case '2':
                         $stat = '<span style="color:#ffa500">Изменил</span>:';
                         break;
开发者ID:visavi,项目名称:rotorcms4,代码行数:31,代码来源:banhist.php

示例14: explode

             }
             if ($total < $start + $config['postgallery']) {
                 $end = $total;
             } else {
                 $end = $start + $config['postgallery'];
             }
             for ($i = $start; $i < $end; $i++) {
                 $data = explode("|", $file[$i]);
                 $num = $total - $i - 1;
                 $data[0] = bb_code($data[0]);
                 echo '<div class="b"> ';
                 if ($is_admin) {
                     echo '<input type="checkbox" name="del[]" value="' . $num . '" /> ';
                 }
                 echo user_avatars($data[3]);
                 echo '<b><a href="../pages/anketa.php?uz=' . $data[3] . '&amp;' . SID . '"> ' . nickname($data[3]) . ' </a></b> ' . user_title($data[3]) . user_online($data[3]);
                 echo '<small> (' . date_fixed($data[2]) . ')</small></div>';
                 echo '<div>' . $data[0] . '</div>';
             }
             if ($is_admin) {
                 echo '<br /><input type="submit" value="Удалить выбранное" /></form>';
             }
             page_jumpnavigation('index.php?action=komm&amp;gid=' . $gid . '&amp;', $config['postgallery'], $start, $total);
             page_strnavigation('index.php?action=komm&amp;gid=' . $gid . '&amp;', $config['postgallery'], $start, $total);
         } else {
             show_error('Комментариев еще нет, будь первым!');
         }
     } else {
         show_error('Комментариев еще нет, будь первым!');
     }
 } else {
开发者ID:sirkadirov,项目名称:wap-motor,代码行数:31,代码来源:index.php

示例15: die

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
**************************************************************************/
if (!defined('SCOUT_NUKE')) {
    die("You have accessed this page illegally, please go use the main menu");
}
$username = $check['uname'];
$sql = $data->select_query("pms", "WHERE touser={$userid} AND type=3 ORDER BY date DESC");
$numpm = $data->num_rows($sql);
$inboxpm = array();
while ($temp = $data->fetch_array($sql)) {
    $temp['touserid'] = $temp['touser'];
    $temp['touser'] = get_username($temp['touser']);
    $temp2 = $data->select_fetch_one_row("users", "WHERE id={$temp['fromuser']}", "uname");
    $temp['fromuserid'] = $temp['fromuser'];
    $temp['fromuser'] = get_username($temp['fromuser']);
    $temp['subject'] = censor($temp['subject']);
    $temp['userstatus'] = user_online($temp['fromuser']);
    $inboxpm[] = $temp;
}
$location = "User Control Panel >> Saved Messages";
$tpl->assign("pm", $inboxpm);
$tpl->assign("numpm", $numpm);
$tpl->assign("onpage", "Savebox");
$pagenum = 1;
开发者ID:burak-tekin,项目名称:CMScout2,代码行数:31,代码来源:savebox.php


注:本文中的user_online函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。