예제 #1
0
    <div id="c-console" style="background-color:#e9e9eb; padding:15px; margin-top:25px;">
      <a href="./admin-shop.php" class="btn" style="text-decoration:none;">Retour</a>
      <table style="margin-top:15px;margin-bottom:15px;width:100%; padding:15px;border:1px solid #9da3a6; border-radius:5px; background-color:#fff;">
          <tr style="padding:5px;font-size:1.2em;">
           <td style="width:60%;">Nom de l'article</td>
           <td>Acheteur</td>
           <td>Prix</td>

          </tr>
      <?php 
$db = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
$sql = "SELECT * FROM `web_shop_history_2` ORDER BY `date` DESC";
$req = $db->prepare($sql);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
while ($row = $req->fetch()) {
    echo '<form action="admin-shop-remove.php" method="POST">';
    echo '<input type="hidden" name="update_id" value="' . $row['id'] . '";';
    echo '<tr style="padding:5px;">';
    echo '<td>' . utf8_decode(stripslashes($row['name'])) . '';
    echo '<td>' . $dev->getName(utf8_decode(stripslashes($row['uuid']))) . '</td>';
    echo '<td>' . $row['price'] . '€</td>';
    echo '</tr>';
    echo '</form>';
}
?>
        </table>
    </div>
  </body>
</html>
예제 #2
0
            array_push($asked, $row);
        } else {
            array_push($friends, $row);
        }
    }
}
switch ($source) {
    case 'web':
        if (count($asked) > 0) {
            echo '<div id="title">- Demandes -</div>';
            foreach ($asked as $row) {
                $img = file_exists('../../uploads/avatars/' . $row['uuid2'] . '.png') ? '<img src="../../uploads/avatars/' . $row['uuid2'] . '.png" id="img_avatar"/>' : '<img src="../../uploads/avatars/default.png" id="img_avatar"/>';
                echo '<div id="friend">
    				<div id="friend_avatar">' . $img . '</div>
    				<div id="friend_container">
    					<div id="name">' . $dev->getName($row['uuid2']) . '</div>
    					<div id="status">
                <div id="button" style="float:left;margin-right:10px;height:16px;width:45px;font-size:0.8em;" onClick="confirmFriendShip(' . $row['uuid1'] . ',' . $row['uuid2'] . ');">Accepter</div>
                <div id="button" style="float:left;margin-right:10px;height:16px;width:45px;font-size:0.8em;" onClick="un_confirmFriendShip(' . $row['uuid1'] . ',' . $row['uuid2'] . ');">Refuser</div>
              </div>
              <div style="clear:both;"></div>
    				</div>
    			</div>';
            }
        }
        if (count($friends) > 0) {
            echo '<div id="title">- Amis -</div>';
            foreach ($friends as $row) {
                $img = file_exists('../../uploads/avatars/' . $row['uuid2'] . '.png') ? '<img src="../../uploads/avatars/' . $row['uuid2'] . '.png" id="img_avatar"/>' : '<img src="../../uploads/avatars/default.png" id="img_avatar"/>';
                $ip = $json->call('players.name', array($dev->getName($row['uuid2'])))[0]['success']['ip'];
                $online = $ip == 'offline' ? '<span style="color:red;">Déconnecté.</span>' : '<span style="color:green;">Connecté.</span>';
예제 #3
0
파일: index.php 프로젝트: StormxBlur/old-ll
        <div id="containermid"></div>
        <div id="container1">
          <table style="width:100%;">
            <?php 
$db = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
$sql = "SELECT * FROM `web_task` ORDER BY `task_level` DESC";
$req = $db->prepare($sql);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
while ($row = $req->fetch()) {
    echo '<div class="cnt">';
    echo '<div id="title">' . utf8_encode(stripslashes($row['task_name'])) . '</div>';
    echo '<div id="status">' . getTranslation($row['task_level'] . "_tlevel") . '</div>';
    echo '<div style="clear:both;"></div>';
    echo '<div id="more">';
    echo '<div id="creator">Tache créée par : ' . $dev->getName($row['uuid_creator']) . '</div>';
    echo '<div id="date">' . dateFR($row['date_created']) . '</div>';
    echo '<div style="clear:both;"></div>';
    echo '</br>';
    echo '<div id="desc">' . getHTMLfromBB($row['task_desc']) . '</div>';
    echo '</div>';
    echo '</div>';
}
?>
          </table>
        </div>
        <div id="container2"></div>
      </div>
    </div>
  </body>
</html>
예제 #4
0
파일: news.php 프로젝트: StormxBlur/old-ll
    die("error");
}
$req = $db->prepare($sql_req);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
if ($req->rowCount() > 0) {
    while ($row = $req->fetch()) {
        echo '<div id="news">
              <div id="date">
                <div id="month">' . getMonth($row["date"]) . '</div>
                <div id="day">' . getDay($row["date"]) . '</div>
              </div>
							<div id="header">' . stripslashes(utf8_encode($row["title"])) . '</div>
							<div id="content">
								<div id="detail">
									<div style="float:left;">Par <a id="link" href="/profiles/?id=' . $row["uuid_author"] . '">' . $dev->getName($row["uuid_author"]) . '</a></div>';
        $db_2 = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
        $sql_2 = "SELECT * FROM web_news_comments WHERE `news_id`= " . $row['id'] . ";";
        $req_res = $db_2->prepare($sql_2);
        $req_res->execute();
        $req_res->setFetchMode(PDO::FETCH_ASSOC);
        echo '<div class="clearfix"></div>
								</div></br>
							' . utf8_encode(getHTMLfromBB($row["content"])) . '
							</div>
						</div>';
    }
} else {
    ?>
			<div id="news">
				<div id="header">cette news n'existe pas</div>
예제 #5
0
        }
        echo '</div>
                   <table style="width:100%; margin:5px; margin-bottom:10px;">
                     <tr>
                       <td style="width:12%; vertical-align:top;">
                         <div id="profileholder">
                           <div id="avatar">';
        if (file_exists('../uploads/avatars/' . $key['uuid_author'] . '.png')) {
            echo '<img src="../uploads/avatars/' . $key['uuid_author'] . '.png" style="width:90%; margin:2.5%;"/>';
        } else {
            echo '<img src="../uploads/avatars/default.png" style="width:90%; margin:2.5%;"/>';
        }
        echo '
                           </div>
                           <div id="user">
                             <span id="username" onClick="window.location.href=`../profiles/?id=' . $key['uuid_author'] . '`">' . utf8_encode($dev->getName($key['uuid_author'])) . '</span></br>
                             <span id="rank">' . getTranslation($dev->getAdminLevel($key['uuid_author']) . '_level') . '</span>
                           </div>
                           <div id="desc">
                             <div id="row">Posté à ' . getTime($key['date_written']) . ' le ' . getDate2($key['date_written']) . '</div>
                           </div>
                         </div>
                       </td>
                       <td style="vertical-align:top; padding:10px;padding-top:0;">
                         ' . getHTMLfromBB(utf8_encode(stripslashes($key['content']))) . '
                       </td>
                       </tr>
                     </table>
                 </div>';
    }
}
예제 #6
0
    <div id="c-console" style="background-color:#e9e9eb; padding:15px; margin-top:25px;">
      <a href="./admin-news-add.php" class="btn" style="text-decoration:none;">Ajouter une news</a>
    </br>
    <table style="margin-bottom:15px;width:100%; padding:15px;border:1px solid #9da3a6; border-radius:5px; background-color:#fff;margin-top:15px;">
        <tr style="padding:5px;font-size:1.2em;">
         <td style="width:65%;">Titre</td>
         <td>Auteur</td>
         <td>Supprimer</td>
        </tr>
    <?php 
$db = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
$sql = "SELECT * FROM web_news ORDER BY `date` DESC";
$req = $db->prepare($sql);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
while ($row = $req->fetch()) {
    echo '<form action="admin-news-remove.php" method="POST">';
    echo '<input type="hidden" name="news_id" value="' . $row['id'] . '";';
    echo '<tr style="padding:5px;">';
    echo '<td>' . stripslashes($row['title']) . '</td>';
    echo '<td>' . $dev->getName($row['uuid_author']) . '</td>';
    echo '<td style="line-height:10px;"><input type="submit" Value="Supprimer" class="btn" name="delete" /></td>';
    echo '</tr>';
    echo '</form>';
}
?>
      </table>
    </div>
  </body>
</html>
예제 #7
0
파일: index.php 프로젝트: StormxBlur/old-ll
    $sql_req = "SELECT * FROM `web_news` ORDER BY `date` DESC LIMIT 5";
}
$req = $db->prepare($sql_req);
$req->execute();
$req->setFetchMode(PDO::FETCH_ASSOC);
if ($req->rowCount() > 0) {
    while ($row = $req->fetch()) {
        echo '<div id="news">
              <div id="date">
                <div id="month">' . getMonth($row["date"]) . '</div>
                <div id="day">' . getDay($row["date"]) . '</div>
              </div>
							<div id="header">' . stripslashes(utf8_encode($row["title"])) . '</div>
							<div id="content">
								<div id="detail">
									<div style="float:left;">Par <a id="link" href="/profiles/?id=' . $row["uuid_author"] . '">' . $dev->getName($row["uuid_author"]) . '</a></div>';
        $db_2 = new PDO('mysql:host=' . $mysql_hostname . ';dbname=' . $mysql_database, $mysql_username, $mysql_password);
        $sql_2 = "SELECT * FROM web_news_comments WHERE `news_id`= " . $row['id'] . ";";
        $req_res = $db_2->prepare($sql_2);
        $req_res->execute();
        $req_res->setFetchMode(PDO::FETCH_ASSOC);
        echo '<div style="float:right;"><a id="link" href="news.php?id=' . $row['id'] . '">' . $req_res->rowCount() . ' Commentaires</a></div>
									<div class="clearfix"></div>
								</div></br>
							' . utf8_encode(getHTMLfromBB($row["content"])) . '
							</div>
						</div>';
    }
} else {
    ?>
			<div id="news">