Skip to content
This repository has been archived by the owner on Feb 27, 2021. It is now read-only.

Commit

Permalink
コールバックにリダイレクトするのを三段構えに変更 全ユーザー一覧も作ってみた
Browse files Browse the repository at this point in the history
  • Loading branch information
slime-hatena committed Sep 10, 2016
1 parent 87018d4 commit 06d3032
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 4 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ Network Trash Folder
Temporary Items
.apdisk

#Composer関連
/Composer
vendor/
composer.json
composer.lock

#自分で追加したやつ
admin/
hidden/
Expand Down
44 changes: 44 additions & 0 deletions AllUser.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
include_once ($_SERVER['DOCUMENT_ROOT'] . "/fcMgt4slStage/include/header.php");

require_once $_SERVER['DOCUMENT_ROOT'] . "/../undefined/DSN.php";
try {
$pdo = new PDO ( 'mysql:host=' . $dsn ['host'] . ';dbname=' . $dsn ['dbname'] . ';charset=utf8', $dsn ['user'], $dsn ['pass'], array (
PDO::ATTR_EMULATE_PREPARES => false,
));
} catch ( PDOException $e ) {
$logWrite ="unSuccessful データベースの接続中にエラーが発生しました (twitterLoader)
sqlServer : connection unsuccess" . $e->getMessage ();
include($_SERVER['DOCUMENT_ROOT'] . "/fcMgt4slStage/log/logWriter.php");
exit ("ユーザーデータを取得中にエラーが発生しました。管理者にお問い合わせください。");
}

$sql = "SELECT * FROM `fcmgtuser`";
$stmt=$pdo->prepare($sql);
$res=$stmt->execute();

$arr = $stmt->fetchAll();
echo '
<p>このサイトに登録している全てのプロデューサーさんです。<br>
取り敢えず作ってみました。<br>
登録順で全件表示されます。<br>
プロフィールを1度も編集したことのないプロデューサーさんは表示されません。</p>
<div style="font-size : 1.2em">
';




foreach ($arr as $value) {
if (!($value['name'] == "")){
echo '<p><a href="user.php?s=' . $value['shortid'] . '">' . $value['shortid']. '.' . $value['name'] . ' PLv:' . $value['level']
.'</a><br>' . mb_strimwidth($value['bio'], 0, 60, "...") . '</p>';
}
}

echo '</div>';


include ($_SERVER['DOCUMENT_ROOT'] . "/fcMgt4slStage/include/ad.php");

include_once ($_SERVER['DOCUMENT_ROOT'] . "/fcMgt4slStage/include/footer.php");
1 change: 1 addition & 0 deletions include/footer.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<li><a href="user.php?my">マイページ</a></li>
<li><a href="generate.php">画像生成(準備中)</a></li>
<li><a href="search.php">検索(準備中)</a></li>
<li><a href="AllUser.php">全ユーザー一覧</a></li>
<li><a href="fcRate.php">参考フルコンボレート(準備中)</a></li>
<li><a href="change.php">更新履歴</a></li>
<li><a href="policy.php">免責事項・プライバシーポリシー</a></li>
Expand Down
1 change: 0 additions & 1 deletion style/userPage.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ div.Information {

@media screen and (max-width: 450px) {
/* 難易度関連が変な改行になってしまうのを治す */

.difficulty_img {
margin-right: 50%;
margin-right: calc(100% - 100px);
Expand Down
4 changes: 3 additions & 1 deletion twitter/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,4 +294,6 @@
include($_SERVER['DOCUMENT_ROOT'] . "/fcMgt4slStage/log/logWriter.php");
}

header("Refresh: 3; URL=../index.php");
echo '<br><a href="../index.php">自動的に移動しない場合はこちら</a>';
header("Refresh: 1; URL=../index.php");
echo '<meta http-equiv="refresh"content="1;URL=../index.php">';
5 changes: 3 additions & 2 deletions twitter/logout.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@


echo "ログアウトしました。自動的にトップページに戻ります。";
header("Refresh: 3; URL=../index.php");
?>
echo '<br><a href="../index.php">自動的に移動しない場合はこちら</a>';
header("Refresh: 1; URL=../index.php");
echo '<meta http-equiv="refresh"content="1;URL=../index.php">';

0 comments on commit 06d3032

Please sign in to comment.