Exemple #1
0
<div id="commentDescription" style="display:none">
<p>※デフォルトは登録順です。「並び替えモード」にて並び順の変更が可能です。ドラッグ&ドロップし、「並び替えを反映する」ボタンを押して下さい。<br />
※画像の変更が反映されない場合はブラウザのキャッシュが原因です。→のボタンまたはF5キーで更新してください。
<button onclick="f5()">更新する</button>
<br />※アップ画像は幅、または高さが現在サムネイルのサイズとして設定されている<span class="col19"><?php echo $imgWidthHeightThumb;?>px</span>以上である必要があります。(設定ファイルで変更可)
</p>
</div>

<?php if($mode == 'img_order'){//並び替えモード時?>
<div class="orderButton"><a href="?">通常モードへ</a></div>
<?php }else{ ?>
<div class="orderButton"><a href="?mode=img_order">並び替えモードへ</a></div>
<?php } ?>
</div><!-- /positionBase -->
<?php 
$lines = newsListSort(file($file_path));
$max_i = count($lines);
?>
<p class="taR pr10 pt10">[ 登録数:<?php echo $max_i;?> ]</p>
<div id="gallery_wrap">
<?php if($mode != 'img_order') echo '<div class="pager_link">'.$pager['pager_res'].'</div>';//ページャー表示?>

<?php if($mode == 'img_order'){//並び替えモード時?>
<form method="post" action="admin.php?mode=img_order" enctype="multipart/form-data">
<ul id="gallery_list" class="clearfix gallery_list_order">
<?php }else{ ?>
<ul id="gallery_list" class="clearfix">
<?php } ?>

<?php
//----------------------------------------------------------------------
-->
</script>
<!--▲▲PCポップアップ用JS。PCのトップページ埋め込み時 要コピー(head部分)▲▲-->
</head>
<body>
<!--▼▼トップページ埋め込み時はここから以下をコピーして任意の場所に貼り付けてください▼▼-->
<div id="news_wrap">
<ul id="news_list">
<?php 
//設定ファイルインクルード
include_once "news-admin/config.php";
//データファイル(news.dat)のパス
$file_path = 'news-admin/data/news.dat';
//ファイルの内容を取得 表示
$lines = file("{$file_path}");
$lines = newsListSort($lines);
$count = 0;
foreach ($lines as $val) {
    if ($count >= $news_dsp_count) {
        break;
    }
    $lines_array = explode(",", $val);
    $lines_array[3] = str_replace("\n", "", $lines_array[3]);
    if ($val != strpos($val, 'no_disp')) {
        $lines_array[2] = htmlspecialchars($lines_array[2]);
        if ($encodingType != 'UTF-8') {
            $lines_array[2] = mb_convert_encoding($lines_array[2], "{$encodingType}", 'UTF-8');
        }
        //UTF-8以外であれば文字コード変更
        if (empty($lines_array[3])) {
            $title = $lines_array[2];