コード例 #1
0
ファイル: index.php プロジェクト: xiaoyueer98/wap.rrl.com
function to_pc()
{
    $referurl = $_SERVER['QUERY_STRING'];
    if (!empty($referurl)) {
        $arShare = conn_db();
        foreach ($arShare as $v) {
            if (strpos("s=" . $v['wapurl'], rtrim($referurl, ".html")) !== false) {
                header("location:" . "http://www.renrenlie.com" . $v['pcurl']);
                die;
            }
        }
    }
}
コード例 #2
0
ファイル: lookback.php プロジェクト: alpaca-nemesis/xxl
<?php

require_once 'func.php';
//$chapter = xss($_POST['c']);
session_begin();
if (!isset($_SESSION['user']) || !isset($_SESSION['pass'])) {
    jump('unit.php');
}
require_once 'config.php';
$link = conn_db($hostname, $username, $password, $database);
if (!$link) {
    echo "Mysql conncet ERROR";
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>错题回顾</title>
<link href="http://libs.baidu.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
<script src="http://libs.baidu.com/bootstrap/3.0.3/js/bootstrap.min.js"></script>
</head>

<body>
<h1><center>信息论课程在线答题系统</center></h1>

<div align="right">
<table width="20%" style="margin-right:20px;margin_top:0px" border='0'>
<tr align="right">
<td>
コード例 #3
0
ファイル: info.php プロジェクト: hikillhikai/Language
<?php
if (!isset($_SESSION)) {
	session_start();
}
if (!isset($_SESSION["name"]) || !isset($_SESSION["pw"]) || !isset($_SESSION["level"])) {
	header("Location: index.php");
	exit;
}
echo("Level : ".$_SESSION["level"]."<br />");
include("lib.php");
conn_db("password", "game");
$query = "select attack, defence, critical, avoid from game_status where name=\"".$_SESSION["name"]."\" and level=".$_SESSION["level"]."limit 1";
$query_result = sql_query($query);
if (empty($query_result)) {
	exit;
}
$user = new User_Char ($_SESSION["level"], $query_result["attack"], $query_result["avoid"], $query_result["critical"], $query_result["defence"]);
echo("Attack : ".$user->get_attk()."<br />Defence : ".$user->get_defen()."<br />Critical : ".$user->get_cri()."<br />Avoid : ".$user->get_avoid());
unset($user);
?>