示例#1
0
if ($conversation["startMemberId"] == ET::$session->user) {
    $className .= " mine";
}
?>
<li id='c<?php 
echo $conversation["conversationId"];
?>
' class='<?php 
echo $className;
?>
'>
<?php 
if (ET::$session->user) {
    ?>
<div class='col-star'><?php 
    echo star($conversation["conversationId"], $conversation["starred"]);
    ?>
</div>
<?php 
}
?>
<div class='col-conversation'><?php 
$conversationURL = conversationURL($conversation["conversationId"], $conversation["title"]);
// Output the conversation title, highlighting search keywords.
echo "<strong class='title'><a href='" . URL($conversationURL) . "'>" . highlight(sanitizeHTML($conversation["title"]), ET::$session->get("highlight")) . "</a></strong> ";
// Output the conversation's labels.
echo "<span class='labels'>";
foreach ($conversation["labels"] as $label) {
    echo "<span class='label label-{$label}'>" . T("label.{$label}") . "</span> ";
}
echo "</span> ";
示例#2
0
         $liste_ancienne_star[$cle]["id_utilisateur"] = nl2br(htmlspecialchars($result2["id_utilisateur"]));
         $liste_ancienne_star[$cle]["pseudo"] = nl2br(htmlspecialchars($result2["pseudo"]));
     }
     $alerte = "Le nom de domaine a bien été ajouté";
     include "./vue/vue_admin.php";
 } else {
     if (isset($_POST["refuser_relais"])) {
     } else {
         if (isset($_POST["remplacer"])) {
             $pseudoold = $_POST["pseudoold"];
             $idold = id($pseudoold);
             $pseudonew = $_POST["pseudonew"];
             $idnew = id($pseudonew);
             no_star($pseudoold);
             date_no_star($pseudoold);
             star($pseudonew);
             no_devenir_star($pseudonew);
             date_star($pseudonew);
             // On recupere la liste des utilisateurs
             $results = liste_utilisateur();
             foreach ($results as $cle => $result) {
                 $results[$cle]["id_utilisateur"] = nl2br(htmlspecialchars($result["id_utilisateur"]));
                 $results[$cle]["pseudo"] = nl2br(htmlspecialchars($result["pseudo"]));
             }
             //On recupere la liste des demandeurs de devenir star
             $liste_demande_star = liste_demande_star();
             foreach ($liste_demande_star as $cle => $result1) {
                 $liste_demande_star[$cle]["id_utilisateur"] = nl2br(htmlspecialchars($result1["id_utilisateur"]));
                 $liste_demande_star[$cle]["pseudo"] = nl2br(htmlspecialchars($result1["pseudo"]));
             }
             //On recupere la liste des anciennes stars
示例#3
0
<?php

include "./modele/modele_connexion_bdd.php";
include "./modele/modele_fonction.php";
$pseudo = $_SESSION["pseudo"];
$id = $_SESSION["id"];
$nb_star = nb_star();
//echo $nb_star;
if ($nb_star < 24) {
    star($pseudo);
    date_star($pseudo);
    $results = liste_relais($id);
    foreach ($results as $cle => $result) {
        $results[$cle]["nom_domain"] = nl2br(htmlspecialchars($result["nom_domain"]));
        $results[$cle]["ip"] = nl2br(htmlspecialchars($result["ip"]));
    }
    include "./vue/vue_gestion_blog.php";
} else {
    devenir_star($pseudo);
    $results = liste_relais($id);
    foreach ($results as $cle => $result) {
        $results[$cle]["nom_domain"] = nl2br(htmlspecialchars($result["nom_domain"]));
        $results[$cle]["ip"] = nl2br(htmlspecialchars($result["ip"]));
    }
    include "./vue/vue_gestion_blog.php";
}
示例#4
0
        echo $mecr['title'];
        ?>
</a></td>
                                </tr>
                                <tr>
                                    <td colspan="3" class="text-left mycomment">
                                        总评:<div class="star"><?php 
        echo star($r['field1'], 5);
        ?>
</div>
                                        环境:<div class="star"><?php 
        echo star($r['field2'], 5);
        ?>
</div>
                                        服务:<div class="star"><?php 
        echo star($r['field3'], 5);
        ?>
</div>
                                        <div class="price">费用:¥<?php 
        echo $r['field4'];
        ?>
</div>
                                        <div class="comment"><p><?php 
        echo $r['field5'];
        ?>
</p><p>停车信息:<?php 
        echo $r['field6'];
        ?>
</p></div>
                                        <?php 
        if ($r['data']) {
示例#5
0
function showLucky()
{
    $result = "";
    global $activities, $iday, $drinks, $directions;
    $result .= "今天是" . date("Y年m月d日 l", time());
    $_activities = filter($activities);
    $numGood = random($iday, 98) % 3 + 2;
    $numBad = random($iday, 87) % 3 + 2;
    $eventArr = pickRandomActivity($_activities, $numGood + $numBad);
    $result .= "\n\n宜:\n";
    for ($i = 0; $i < $numGood; $i++) {
        $result .= $i . ".「" . $eventArr[$i]['name'] . "」" . $eventArr[$i]['good'] . "\n";
    }
    $result .= "\n不宜:\n";
    for ($i = 0; $i < $numBad; $i++) {
        $result .= $i . ".「" . $eventArr[$i + $numGood]['name'] . "」" . $eventArr[$i + $numGood]['bad'] . "\n";
    }
    $result .= "\n座位朝向:\n";
    $result .= "面向「" . $directions[random($iday, 2) % sizeof($directions)] . "」写程序,bug最少\n";
    $result .= "\n今日宜饮:\n";
    $todayDrink = pickRandom($drinks, 2);
    $result .= $todayDrink[0] . "、" . $todayDrink[1];
    $result .= "\n\n女神亲近指数:\n";
    $result .= star(random($iday, 6) % 5 + 1);
    return $result;
}
示例#6
0
<?php

//***********
if (!isset($query)) {
    $query = <<<EOD
{query}
EOD;
}
function star($full_name)
{
    global $username, $password;
    $url = "https://api.github.com/user/starred/{$full_name}";
    exec('sh auth.sh -X PUT -u ' . escapeshellarg($username) . ' -p ' . escapeshellarg($password) . ' --url ' . escapeshellarg($url), $output);
}
// URL to username/repo
//preg_match("/\w*\/\w*$/", $query, $matches);
//$query = $matches[0];
star($query);
echo $query;
                                    <tr>
                                        <td><?php 
    echo $playercount;
    ?>
.</td>
                                        <td>
                                            <div class="star-container">
                                                <a href="player.php?name=<?php 
    echo $name;
    ?>
"><?php 
    echo $name;
    ?>
</a>
                                                <div class="star star-<?php 
    echo star($stars);
    ?>
"></div>
                                            </div>
                                        </td>
                                        <td><?php 
    if ($guild > 0) {
        ?>
<a href="/guild/<?php 
        echo $guildname;
        ?>
"><?php 
        echo $guildname;
        ?>
</a><?php 
    }
示例#8
0
function drawFormRow($val)
{
    global $db_entry_fields, $db_entry_fields_session, $db_entry_fields_optional, $db_entry_all_fields_set, $lang, ${$val[0]};
    if (isset($_GET[$val[0]])) {
        $value = strip_tags($_GET[$val[0]]);
    } else {
        $value = strip_tags(${$val[0]});
    }
    $offset = array_search($val[0], $db_entry_fields);
    #$db_entry_all_fields_set=true;
    #everything saved in session? then do nothing
    if (isset($_SESSION['db_entry_all_fields_set']) && $db_entry_fields_session[$offset]) {
        return;
    }
    echo "<tr><td width=150 align=right nowrap><b>", $val[3], "</b></td><td CLASS=CL style=\"background-color:#DDDDDD\" width=250><table border=0 cellspacing=0 cellpadding=0><tr><td>";
    switch ($val[1]) {
        case 0:
            echo "<input type=text name=\"", $val[0], "\" value=\"", $value, "\"";
            drawInputParams($val[2]);
            echo ">";
            break;
        case 1:
            echo "<textarea name=\"", $val[0], "\"";
            drawInputParams($val[2]);
            echo ">", $value, "</textarea>";
            break;
            //note: checkbox and radio are not finished yet
        //note: checkbox and radio are not finished yet
        case 2:
            echo "<input type=checkbox name=\"", $val[0], "\" value=\"", $value, "\"";
            drawInputParams($val[2]);
            echo ">";
            break;
        case 3:
            echo "<input type=checkbox name=\"", $val[0], "\" value=\"", $value, "\"";
            drawInputParams($val[2]);
            echo ">";
            break;
        case 4:
            echo "<select name=\"", $val[0], "\"";
            drawInputParams($val[2]);
            echo ">";
            foreach ($val[2] as $oname => $ovalue) {
                if (substr($oname, 0, 7) == "option:") {
                    echo "<option value=\"" . substr($oname, 7) . "\"", $value == substr($oname, 7) ? " selected" : "", ">", $ovalue, "</option>";
                }
            }
            echo "</select>";
    }
    if (!$db_entry_fields_optional[$offset]) {
        echo "</td><td>";
        star();
    }
    echo "</td></tr></table></td><td width=650 style=\"background-color:#e0e4f1\">";
    if (@constant($val[4]) != '') {
        echo constant($val[4]);
    } else {
        echo "&nbsp;";
    }
    echo "</td></tr>";
}