コード例 #1
0
ファイル: addUser.php プロジェクト: BigeyeDestroyer/biogas
<?php

require_once '../include.php';
checkLogined();
$rows = getAllProv();
if (!$rows) {
    alertMes("没有相应省份,请先添加省份!!", "addProv.php");
}
$rows_city = getAllCity();
if (!$rows_city) {
    alertMes("没有相应城市,请先添加城市!!", "addCity.php");
}
?>

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>-.-</title>
<link href="./styles/global.css"  rel="stylesheet"  type="text/css" media="all" />
<script type="text/javascript" charset="utf-8" src="../plugins/kindeditor/kindeditor.js"></script>
<script type="text/javascript" charset="utf-8" src="../plugins/kindeditor/lang/zh_CN.js"></script>
<script type="text/javascript" src="./scripts/jquery-1.6.4.js"></script>
<script>
        KindEditor.ready(function(K) {
                window.editor = K.create('#editor_id');
        });
        $(document).ready(function(){
        	$("#selectFileBtn").click(function(){
        		$fileField = $('<input type="file" name="thumbs[]"/>');
        		$fileField.hide();
コード例 #2
0
  <div class="box-header"><h3 class="box-title">Les villes de vos EPN</h3></div>
  <div class="box-body"> 
    <h4>Enregistrer une nouvelle ville</h4>
    <form method="post" action="index.php?a=41&amp;act=1">
      <div class="row">
        <div class="col-xs-4"><input type="text" class="form-control" name="newcity" placeholder="Nom"></div>
        <div class="col-xs-3"><input type="text" class="form-control" name="newcodepost" placeholder="Code Postal"></div>
        <div class="col-xs-3"><input type="text" name="newpays" class="form-control" placeholder="Pays"></div>
        <button type="submit" class="btn btn-success">Cr&eacute;er</button>
      </div>
    </form>
  </div><!-- box-body -->
		   
  <div class="box-body">
<?php 
$city = getAllCity();
$nbc = mysqli_num_rows($city);
if ($nbc > 0) {
    ?>
    <table class="table">
<?php 
    for ($i = 0; $i < $nbc; $i++) {
        $row = mysqli_fetch_array($city);
        ?>
      <form action="index.php?a=41&amp;act=2&amp;idcity=<?php 
        echo $row["id_city"];
        ?>
" method="post" role="form">
        <tr>
        <td><input class="form-control" type="text" name="city" value="<?php 
        echo stripslashes($row["nom_city"]);
コード例 #3
0
$utilisation = $row["utilisation_user"];
$connaissance = $row["connaissance_user"];
$info = $row["info_user"];
$loginn = $row["login_user"];
// Tableau des mois
$month = array(1 => "Janvier", 2 => "F&eacute;vrier", 3 => "Mars", 4 => "Avril", 5 => "Mai", 6 => "Juin", 7 => "Juillet", 8 => "Aout", 9 => "Septembre", 10 => "Octobre", 11 => "Novembre", 12 => "D&eacute;cembre");
// type de csp défini
$csparray = array(0 => "Élève", 1 => "Collégien", 2 => "Lycéen", 3 => "Étudiant", 4 => "Demandeur d'emploi", 5 => "Agriculteur exploitant", 6 => "Artisan-commerçant-chef d'entreprise", 7 => "Cadres et professions libérales", 8 => "Profession intermédiaires", 9 => "Employé", 10 => "Ouvrier", 11 => "Retraité");
// type d'équipement défini
$equipementarray = array(0 => "Aucun équipement", 1 => "Ordinateur seul", 2 => "Ordinateur et Internet");
// type d'utilisation défini
$utilisationarray = array(0 => "Aucun Lieu", 1 => "A la maison", 2 => "Au bureau ou à l'école", 3 => "A la maison et au bureau ou à l'école");
// type de connaissance défini
$connaissancearray = array(0 => "Débutant", 1 => "Intermédiaire", 2 => "Confirmé");
// recupere les villes
$resultville = getAllCity();
$nbville = mysqli_num_rows($resultville);
for ($i = 0; $i < $nbville; $i++) {
    $rowville = mysqli_fetch_array($resultville);
    $townarray[$i] = $rowville["id_city"];
    $townnomarray[$i] = $rowville["nom_city"];
}
//$row=mysql_fetch_array($result);
//Affichage -----
echo $mess;
?>
<table align="center">
<form name="formcompte" method="post" action="<?php 
echo $post_url;
?>
">
コード例 #4
0
ファイル: getHero.php プロジェクト: jbauson/malf
    $json = str_replace("})", "}", $json);
    return json_decode($json, true);
}
function getHeroes($key, $city)
{
    getHero:
    $time = time();
    $var = @file_get_contents("http://159.203.92.38/server1/game/gen_conscribe_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&city=" . $city . "&action=gen_list&_l=en&_p=EW-DROID-KR-");
    if (!(strpos($var, '})') !== false)) {
        goto getHero;
    }
    $hero = stripTojSon($var, $time);
    echo json_encode($hero);
}
function getAllCity($key)
{
    start:
    $time = time();
    $var = @file_get_contents("http://159.203.92.38/server1/game/get_userinfo_api.php?jsonpcallback=jsonp" . $time . "&_=" . ($time + 1485495) . "&key=" . $key . "&_l=en&_p=EW-DROID-KR-");
    if (!(strpos($var, '})') !== false)) {
        goto start;
    }
    $city = stripTojSon($var, $time);
    if (count(@$city['ret']['user']['city']) > 0) {
        //for($ctr=0;$ctr<count($city['ret']['user']['city']);$ctr++){
        getHeroes($key, $city['ret']['user']['city'][0]['id']);
        //}
    }
}
getAllCity($_REQUEST['key']);
//echo json_encode($list);