Ejemplo n.º 1
0
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>';
}
Ejemplo n.º 2
0
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");
Ejemplo n.º 3
0
 */
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';
Ejemplo n.º 4
0
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);
        }
    }
}
Ejemplo n.º 5
0
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 {
                if (is_away($grp)) {
                    ?>
		<?php 
                    echo getlocal("page.groups.isaway");
                } else {
                    ?>
		<?php 
                    echo date_to_text(time() - ($grp['ilastseen'] ? $grp['ilastseen'] : time()));
                }
            }
            ?>
	</td>
	<td>
   		<a href="<?php 
            echo $webimroot;
            ?>
/operator/groupmembers.php?gid=<?php 
            echo $grp['groupid'];
            ?>
">
	   		<?php 
            echo htmlspecialchars(topage($grp['inumofagents']));
            ?>
   		</a>
	</td>
<?php 
            if ($page['canmodify']) {
                ?>
	<td>
		<a href="<?php 
                echo $webimroot;
                ?>
/operator/groups.php?act=del&amp;gid=<?php 
                echo $grp['groupid'];
                ?>
" id="i<?php 
                echo $grp['groupid'];
                ?>
" class="removelink">
			remove
		</a>
	</td>
<?php 
            }
            ?>
</tr>
<?php 
        }
    } else {
        ?>
	<tr>
	<td colspan="4">
		<?php 
        echo getlocal("tag.pagination.no_items.elements");
        ?>
	</td>
	</tr>
<?php 
    }
    ?>
</tbody>
</table>
<script type="text/javascript" language="javascript"><!--
$('a.removelink').click(function(){
	var groupname = $("#t"+this.id).text();
	return confirm("<?php 
    echo getlocalforJS("page.groups.confirm", array('"+$.trim(groupname)+"'));
    ?>
");
});
//--></script>

<?php 
}
            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>
//   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='******'");
    $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);
Ejemplo n.º 8
0
 $mshv = $_POST["mshv"];
 //$pass=md5($_POST["pass"]);
 $pass = $_POST["pass"];
 //$str="SELECT count(username) as num FROM ".$dbTable." where username='******' 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='******'";
         $_SESSION['user'] = $mshv;
         $res = mysql_query($str) or die(mysql_error());
         $str = "SELECT type FROM " . $dbTable . " where username='******'";
         $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";
Ejemplo n.º 9
0
     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'");
Ejemplo n.º 10
0
    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';
Ejemplo n.º 11
0
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>";
    }
}
Ejemplo n.º 12
0
 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();
 }
Ejemplo n.º 13
0
Archivo: app.php Proyecto: ramo01/1kapp
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);
        }
    }
}
Ejemplo n.º 14
0
 </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'];
                    ?>