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


PHP is_online函数代码示例

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


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

示例1: Pretest

function Pretest()
{
    global $qcount;
    global $uid;
    //chk onlne
    if (!is_online()) {
        echo ': APPLICATION OFFLINE';
    }
    //TestEnd();
    $loggedInUser = $_SESSION["userCakeUser"];
    $_SESSION['mode'] = 'train';
    $uid = $loggedInUser->user_id;
    $_SESSION['uid'] = $uid;
    GetUserInfo();
    GetMyBattingside();
    ChkStarted();
    ChkConnect();
    if (!isset($_SESSION['curquest'])) {
        $_SESSION['curquest'] = 1;
    }
    echo '<a href="op/views/index.html" class="btn btn-primary"> START</a>';
}
开发者ID:pablit07,项目名称:sportanticipation,代码行数:22,代码来源:test_funcs.php

示例2: session_start

Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

To contact any of the authors about special permissions send
an e-mail to cerescp@gmail.com
*/
session_start();
include_once 'config.php';
// loads config variables
include_once 'query.php';
// imports queries
include_once 'functions.php';
if (!empty($_SESSION[$CONFIG_name . 'account_id'])) {
    if ($_SESSION[$CONFIG_name . 'account_id'] > 0) {
        if (!empty($GET_opt)) {
            if ($GET_opt == 1 && $CONFIG_marry_enable) {
                if (is_online()) {
                    alert($lang['NEED_TO_LOGOUT_F']);
                }
                if (inject($GET_GID1) && inject($GET_GID2)) {
                    alert($lang['INCORRECT_CHARACTER']);
                }
                if (isset($GET_divorce) && $GET_divorce > 0) {
                    $query = sprintf(PARTNER_ONLINE, $GET_GID2);
                    $result = execute_query($query, "marriage.php");
                    if ($result->fetch_row()) {
                        alert($lang['MARRIAGE_COUPLE_OFF']);
                    }
                    $query = sprintf(PARTNER_NULL, $GET_GID1);
                    $result = execute_query($query, "marriage.php");
                    $query = sprintf(PARTNER_NULL, $GET_GID2);
                    $result = execute_query($query, "marriage.php");
开发者ID:icxbb-xx,项目名称:eamod,代码行数:31,代码来源:marriage.php

示例3: session_start

 */
session_start();
include 'header.php';
include 'functions.php';
//include ('leftmain.php');
echo "<title>{$title} - Contacto</title>\n";
$current_page = "contacto.php";
if (!isset($_SESSION['lector_user']) and !isset($_SESSION['admin_user'])) {
    echo "<table width=100% border=0 cellpadding=7 cellspacing=1>\n";
    echo "  <tr class=right_main_text><td height=10 align=center valign=top scope=row class=title_underline>Login BIBLIOTECA FOCIM</td></tr>\n";
    echo "  <tr class=right_main_text>\n";
    echo "    <td align=center valign=top scope=row>\n";
    echo "      <table width=200 border=0 cellpadding=5 cellspacing=0>\n";
    echo "        <tr class=right_main_text><td align=center>No estas registado<br>o<br>No tienes permiso de acceder a esta pagina.</td></tr>\n";
    echo "        <tr class=right_main_text><td align=center>Click <a class=admin_headings href='login.php'><u>aqui</u></a> para logearse.</td></tr>\n";
    echo "      </table><br /></td></tr></table>\n";
    exit;
}
is_online();
// informacion de contacto
echo "<center>";
echo "Cualquier duda, comentario y/o sugerencia relativa a la biblioteca, favor de comunicarse a cualquiera de nuestros siguientes contactos:" . "<br><br>";
echo "</center>";
echo "Tel. 8347-9829" . "<br><br>";
echo "E-Mail: biblioteca@focim.com (actualmente no activo)" . "<br><br>";
echo "Direccion: " . "<br>";
echo "Xicotencatl #975 Nte. Col. Centro" . "<br>";
echo "Monterrey, N.L. C.P. 64000" . "<br>";
echo "Esquina con Arteaga, 3er Piso" . "<br>";
// fin informacion de contacto
include 'footer.php';
开发者ID:kolajo,项目名称:php-e-book,代码行数:31,代码来源:contacto.php

示例4: send_notice_mail

function send_notice_mail($data)
{
    if (intval(kget('mqueue_on')) != 1) {
        return false;
    }
    if (intval(kget('mqueue_usettings_' . $data['uid'])) == 1) {
        // 未设置,或者设置为接受
        // 检查是否在线
        // 只有不在线的时候发送邮件通知
        $send = true;
        if (intval(kget('mqueue_not_online')) == 1 && is_online($data['uid'])) {
            $send = false;
        }
        if ($send) {
            $user = get_user_info_by_id($data['uid']);
            $dd = array();
            $dd['to'] = $email = $user['email'];
            $dd['subject'] = __('PL_MAIL_QUEUE_NOTICE_MAIL_TITLE', array(c('site_name'), mb_strimwidth($data['content'], 0, 20, '...', 'UTF-8')));
            $dd['body'] = $data['content'] . __('PL_MAIL_QUEUE_NOTICE_MAIL_CONTENT_POSTFIX', c('site_url') . '/?c=inbox');
            $sql = "INSERT INTO `mail_queue` ( `email` , `data` , `timeline` ) VALUES ( '" . s($email) . "' , '" . s(serialize($dd)) . "' , '" . s(date("Y-m-d H:i:s")) . "' )";
            run_sql($sql);
        }
    }
}
开发者ID:xianliflc,项目名称:teamirr,代码行数:24,代码来源:app.php

示例5: tpl_content

function tpl_content()
{
    global $page, $webimroot, $errors;
    ?>

<?php 
    echo getlocal("page.groups.intro");
    ?>
<br />
<br />
<?php 
    require_once 'inc_errors.php';
    ?>

<?php 
    if ($page['canmodify']) {
        ?>
<div class="tabletool">
	<img src='<?php 
        echo $webimroot;
        ?>
/images/buttons/createdep.gif' border="0" alt="" />
	<a href='<?php 
        echo $webimroot;
        ?>
/operator/group.php' title="<?php 
        echo getlocal("page.groups.new");
        ?>
">
		<?php 
        echo getlocal("page.groups.new");
        ?>
	</a>
</div>
<br clear="all"/>
<?php 
    }
    ?>

<table class="list">
<thead>
<tr class="header">
<th>
	<?php 
    echo getlocal("form.field.groupname");
    ?>
</th><th>
	<?php 
    echo getlocal("form.field.groupdesc");
    ?>
</th><th>
	<?php 
    echo getlocal("page_agents.status");
    ?>
</th><th>
	<?php 
    echo getlocal("page.group.membersnum");
    if ($page['canmodify']) {
        ?>
</th><th>
<?php 
    }
    ?>
</th>
</tr>
</thead>
<tbody>
<?php 
    if (count($page['groups']) > 0) {
        foreach ($page['groups'] as $grp) {
            ?>
<tr>
	<td class="notlast">
   		<a href="<?php 
            echo $webimroot;
            ?>
/operator/group.php?gid=<?php 
            echo $grp['groupid'];
            ?>
" id="ti<?php 
            echo $grp['groupid'];
            ?>
" class="man">
   			<?php 
            echo htmlspecialchars(topage($grp['vclocalname']));
            ?>
   		</a>
	</td>
	<td class="notlast">
   		<?php 
            echo $grp['vclocaldescription'] ? htmlspecialchars(topage($grp['vclocaldescription'])) : "&lt;none&gt;";
            ?>
	</td>
	<td class="notlast">
<?php 
            if (is_online($grp)) {
                ?>
		<?php 
                echo getlocal("page.groups.isonline");
            } else {
//.........这里部分代码省略.........
开发者ID:paulcn,项目名称:mibew,代码行数:101,代码来源:groups.php

示例6: ui_sex

            echo $m['college'];
            ?>
</span> &nbsp; <span class="fs_12 f_6"> <img src="<?php 
            echo $urlstatic;
            ?>
/img/ico_<?php 
            echo ui_sex($m['sex'], 7);
            ?>
.<?php 
            echo is_online($m['login_time'], 1);
            ?>
"/></span>&nbsp;&nbsp;<span class="f_green <?php 
            echo is_online($m['login_time'], 2);
            ?>
"><?php 
            echo is_online($m['login_time']);
            ?>
</span></p>
                      <p class="fs_12"><span class="pr15">身高:<?php 
            echo $m['height'];
            ?>
cm</span><?php 
            if (!empty($m['constellation'])) {
                ?>
<span>星座:<?php 
                echo $m['constellation'];
                ?>
</span><?php 
            }
            ?>
</p>
开发者ID:laiello,项目名称:qinhan,代码行数:31,代码来源:60a82d71d539f5b0da41f892b01fe476.php

示例7: is_online

//   Copyright (c) 2006-2008     //
//    http://www.ajaxim.com/     //
//   Do not remove this notice   //
///////////////////////////////////
require '../config.php';
// checks if a user is online or not //
function is_online($username)
{
    $query = @mysql_query("SELECT is_online FROM " . SQL_PREFIX . "users WHERE username='" . mysql_real_escape_string($username) . "'");
    $result = @mysql_fetch_assoc($query);
    return $result['is_online'];
}
// connect to database //
$link = mysql_connect($sql_host, $sql_user, $sql_pass);
mysql_select_db($sql_db);
header("Content-type: image/gif");
$isonline = is_online($_GET['user']);
switch ($isonline) {
    case 1:
        readfile('images/online.gif');
        break;
    case 2:
        readfile('images/away.gif');
        break;
    case 0:
    case 50:
    case 100:
        readfile('images/offline.gif');
        break;
}
mysql_close($link);
开发者ID:marcfeather,项目名称:Multiplayer-PHP-Ajax-Games,代码行数:31,代码来源:is_online.php

示例8: time

 $mshv = $_POST["mshv"];
 //$pass=md5($_POST["pass"]);
 $pass = $_POST["pass"];
 //$str="SELECT count(username) as num FROM ".$dbTable." where username='".$mshv."' and password=md5('".$pass."')";
 //$res = mysql_query($str) or die(mysql_error());
 $num = 0;
 if ($pass == '12345678') {
     $num = 1;
 }
 // $num = mysql_result($res, 0, 0);
 //CH1201150 : 20041979
 //CH1201091 : 03121988
 //CH1201001 : 04061983
 //09730049  :  19031989
 if ($num > 0) {
     if (is_online($mshv) == true) {
         echo "online";
     } else {
         $last_active = time();
         $str = "UPDATE " . $dbTable . " set online='1', active={$last_active} where username='" . $mshv . "'";
         $_SESSION['user'] = $mshv;
         $res = mysql_query($str) or die(mysql_error());
         $str = "SELECT type FROM " . $dbTable . " where username='" . $mshv . "'";
         $res = mysql_query($str) or die(mysql_error());
         $num = mysql_result($res, 0, 0);
         if ($num == 1) {
             $_SESSION['room'] = 'caohoc';
         } else {
             $_SESSION['room'] = 'tuxa';
         }
         echo "success";
开发者ID:rinodung,项目名称:mo-phong-hoc-truc-tuyen,代码行数:31,代码来源:authen.php

示例9: elseif

     if (empty($_GET['player'])) {
         echo '未定义玩家!<br />';
     } elseif (!is_online($_GET['player'])) {
         echo '该玩家不在线!<br />';
     } else {
         $tname = getname($_GET['player']);
         showmsg($my['name'], '请求已发送至 ' . $tname);
         showmsg($tname, $my['name'] . ' 想要传送到你这里来,请前往网页端接受请求.');
         $db->query("UPDATE user SET tpid='{$_GET['player']}' WHERE id='{$my['id']}'");
     }
 } elseif ($_GET['action'] == 'tpaccept') {
     $q = $db->query("SELECT * FROM user WHERE tpid='{$my['id']}'");
     $tplayer = $db->fetch_array($q);
     if (empty($tplayer['id'])) {
         echo '没有玩家向你发出过请求!<br />';
     } elseif (!is_online($tplayer['name'])) {
         echo '请求已失效!<br />';
     } else {
         showmsg($my['name'], '成功接受请求.');
         showmsg($tplayer['name'], '对方已接受你的传送请求.');
         $db->query("UPDATE user SET tpid='0' WHERE tpid='{$my['id']}'");
         tp($tplayer['name'], $my['name']);
     }
 }
 echo '你的id是: ' . $my['id'] . '<br />';
 echo '你的用户名是: ' . $my['name'] . '<br />';
 echo '你的UUID是: ' . $my['uuid'] . '<br /><form method="post" action="index.php?action=changepassword">';
 echo '修改密码: <input type="text" value="' . $my['password'] . '" name="password" /><br /><input type="submit" value="修改" /></form>';
 echo '<hr />【功能】<br />';
 echo '<br />传送(tpa):';
 $q = $db->query("SELECT id,name FROM user WHERE logged='1'");
开发者ID:pentyum,项目名称:WebEssentials,代码行数:31,代码来源:index.php

示例10: trim

    return trim(shell_exec("cat " . $status_path . "/" . $host . ".uptime"));
}
?>

<html><head>
<title>LXC Cluster RB</title>
</head>
<body>
<center>
<table border=0 cellspacing=10><tr>

<?php 
foreach ($hosts as $host) {
    echo '<td>
		<table border=1><tr><th>Node</th><th>Power</th><th>Network</th><th>Temperature</th><th>Power control</th></tr>
			<tr><td><a href=?console=' . $host["hostname"] . '>' . $host["hostname"] . '</a></td><td>' . has_power($host["hostname"]) . '</td><td>' . is_online($host["hostname"]) . '</td>
			<td>' . shell_exec("cat " . $status_path . "/" . $host["hostname"] . ".temp") . 'C</td><td>' . show_power_form($host["hostname"]) . '</td></tr>
		</table>
	<td>' . show_uptime($host["hostname"]) . '</td></td></tr>';
}
?>
</tr></table>

<?php 
//FIXME: Static Hostnames & URL
if (isset($_GET["console"]) && ($_GET["console"] == "lxc01" || $_GET["console"] == "lxc02")) {
    echo '<iframe width="90%" height="80%" src="http://192.168.1.115/' . $_GET["console"] . '"></iframe>';
} else {
    echo "</center>";
    //This is a "ClusterMon" generated HTML-File:
    include 'status.html';
开发者ID:viviparous,项目名称:odroid-u3,代码行数:31,代码来源:index.php

示例11: proc_msg

function proc_msg()
{
    global $msg;
    global $uid;
    global $fuid;
    if (!is_buddy($uid, $fuid)) {
        return 0;
    }
    if (strlen($msg) > 255) {
        return 0;
    }
    if (!is_online($fuid)) {
        return 0;
    }
    if (buddy_msg($fuid, $uid, addslashes($msg))) {
        set_reload($fuid);
        echo "Message sent!";
    } else {
        echo "An error occured!<br>";
    }
}
开发者ID:spaceregents,项目名称:spaceregents,代码行数:21,代码来源:buddy.php

示例12: dataclear

 function dataclear($serial)
 {
     if (!is_numeric($serial)) {
         redirect(base_url());
     }
     if (config('dataclear', 'core') == FALSE) {
         redirect(base_url());
     }
     if (is_online($serial) == FALSE) {
         redirect(base_url());
     }
     if (!secure_serial_check($serial)) {
         redirect('#warn');
     }
     $world = get_world();
     if (is_online($serial) == FALSE) {
         $query = $this->MSSQL->query("SELECT Lv FROM {$world}.dbo.tbl_base WHERE Serial = '{$serial}'");
         if ($query->num_rows() > 0) {
             $row = $query->row_array();
             $now = $row['Lv'];
             $max = 50;
             if ($now < 50) {
                 $max = 50;
             } elseif ($now == 50) {
                 $max = 50;
             } elseif ($now <= 55 && $now >= 51) {
                 $max = 55;
             } elseif ($now >= 56) {
                 $max = 65;
             }
             $this->MSSQL->query("UPDATE {$world}.dbo.tbl_base SET Lv ='" . $row['Lv'] . "' WHERE Serial = '{$serial}'");
             $this->MSSQL->query("UPDATE {$world}.dbo.tbl_general SET MaxLevel='{$max}' WHERE Serial = '{$serial}'");
             //$this->MSSQL->query("DELETE {$world}.dbo.tbl_NpcData WHERE Serial = '$serial'");
         }
         $this->data['content'] = icon('32x32/edit_profile.png') . lang('off_clearsucc');
     } else {
         $this->data['content'] = icon('64x64/warning.png') . lang('off_online_chk');
     }
     compile();
 }
开发者ID:SelFish131,项目名称:rf_office,代码行数:40,代码来源:main.php

示例13: send_notice_mail

function send_notice_mail($data)
{
    if (intval(kget('mqueue_on')) != 1) {
        return false;
    }
    if (intval(kget('mqueue_usettings_' . $data['uid'])) == 1) {
        // 未设置,或者设置为接受
        // 检查是否在线
        // 只有不在线的时候发送邮件通知
        if (!is_online($data['uid'])) {
            $user = get_user_info_by_id($data['uid']);
            $dd = array();
            $dd['to'] = $email = $user['email'];
            $dd['subject'] = c('site_name') . '邮件通知 - ' . mb_strimwidth($data['content'], 0, 20, '...', 'UTF-8');
            $dd['body'] = $data['content'] . ' - <a href="' . c('site_url') . '/?c=inbox">点击这里查看详情</a>';
            $sql = "INSERT INTO `mail_queue` ( `email` , `data` , `timeline` ) VALUES ( '" . s($email) . "' , '" . s(serialize($dd)) . "' , '" . s(date("Y-m-d H:i:s")) . "' )";
            run_sql($sql);
        }
    }
}
开发者ID:ramo01,项目名称:1kapp,代码行数:20,代码来源:app.php

示例14:

 </div></td>	
	<td><div class="filename"><?php 
            echo $row['userole'];
            ?>
 </div></td>
	<td><div><input type="button" value="View Profile" onclick="popup ('includes/profile.php?id=<?php 
            echo $row['userid'];
            ?>
', 'profile', 500, 420)"></td>
	<td><input type="button" value="Send Message" onclick="popup ('includes/send_mess.php?id=<?php 
            echo $row['userid'];
            ?>
', 'profile', 500, 420)"></div></td>

	<td>ONLINE STATUS : <?php 
            if (is_online($row['userid'])) {
                echo '<b style="font-family:arial;color:green;">ONLINE</b>';
            } else {
                echo 'offline';
            }
            ?>
</td>

<?php 
            if ($_SESSION['isTist'] == "1") {
                if ($row_trance['userid']) {
                    ?>
		
		<td><button onClick="window.open('includes/check_trance.php?id=<?php 
                    echo $row['userid'];
                    ?>
开发者ID:Nekrose483,项目名称:hypnotranceme,代码行数:31,代码来源:members.php


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