コード例 #1
0
ファイル: editContent.php プロジェクト: WNJXYK/AppManager
			</div>
		</nav>
		
		<!-- 内容 -->
		<div class="container">
			<div class="row">
				<?
					if ($_COOKIE["isLogin"]!=true) die("<h1>Access Denied!</h1>");
					setcookie("isLogin", true, time()+3600);
					$sql_con = getSqlCon();
					if ($_COOKIE["isLogin"]!=true) die("<h1>Access Denied!</h1>");
					
					$sql_con = getSqlCon();
					$Page=1;
					if($_GET['Page']!=null) $Page=$_GET['Page'];
					$Content_Num=getMulNum($sql_con,"appmanager_content");
						
					$Content_Limit=30;
					$AllPage=(integer)($Content_Num/$Content_Limit)+($Content_Num%$Content_Limit!=0?1:0);	
				?>
					<ul class="collection with-header">
						<li class="collection-header"><h4>All contents(<? echo $Content_Num; ?>):</h4></li>
						<li class="collection-item"><div>新建产品<a href="./editApp.php" class="secondary-content"><i class="material-icons">send</i></a></div></li>
						<?
							$result=getMulLimit($sql_con,"appmanager_content",($Page-1)*$Content_Limit,$Content_Limit);
							while($row = mysql_fetch_array($result))
							{
								echo '<li class="collection-item"><div>'.'ID='.$row['id'].'  '.$row['title'].' --- '.$row['link'].'<a href="./editApp.php?ID='.$row['id'].'" class="secondary-content"><i class="material-icons">send</i></a></div></li>';
							}
						?>
					</ul>	
コード例 #2
0
ファイル: List.php プロジェクト: WNJXYK/CodePaste
				<th>Title(View)</th>
				<th>Author</th>
				<th>Language</th>
				<th>Length</th>
				<th>Time</th>
				</tr>
		  	</thread>
			<tbody>
				<?php 
$sql_con = getSqlCon();
$page = $_GET["Page"];
if ($page == 0) {
    $page = 1;
}
$pagePost = 15;
$content_Num = getMulNum('codepaste');
$contents = getMulLimit('codepaste', ($page - 1) * $pagePost, $pagePost);
while ($row = mysql_fetch_array($contents)) {
    echo "<tr><td><a href=\"./Edit.php?ID=" . $row['id'] . "\" >" . $row['id'] . "</a></td><td><cn><a href=\"./Code.php?ID=" . $row['id'] . "\" >" . $row['title'] . "</a></cn></td><td>" . $row['author'] . "</td><td>" . $row['language'] . "</td><td>" . $row['length'] . " bytes</td><td>" . $row['date'] . "</td></tr>";
}
?>
			</tbody>
		</table>

	<div align = "center">
	  <nav>
	  	  <ul class="pagination">
			
			
			<? 
				$pageNum = ceil($content_Num/$pagePost);