⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stats.php

📁 一个页面界面的邮件程序
💻 PHP
字号:
<?phprequire_once("access.inc.php");define("C1", "#FFEFDE");define("C2", "#E8ECFE");?><html>	<head>		<title>Admin - Stats</title>		<link rel="StyleSheet" type="text/css" href="../css/common.css" title="Default"  media="screen" />			</head>	<body>		<a href="createUser.php">Create an user</a>&nbsp;|&nbsp;<u>Stats</u><hr/>		<h1>Stats</h1>		<table style="width: 800px; background-color: #DEE1FF;">						<thead valign="top">				<tr>					<th>id</th>					<th>email</th>					<th>language</th>					<th>notifybirthday</th>					<th>lastmailsent</th>					<th>nb persons</th>					<th>nb groups</th>					<th>nb mailings</th>								</tr>			</thead>			<tbody><?php	$i = 0;	$sqlUser = "SELECT * FROM user";	$resultUser = mysql_query($sqlUser) or die("Error in SQL : " . $sqlUser);	if ($resultUser && mysql_num_rows($resultUser) > 0) {		while ($user = mysql_fetch_assoc($resultUser)) {?>			<tr style="background-color: <?php echo ($i % 2 == 0) ? C1 : C2; ?>">				<td align="center"><?php echo $user['id']; ?></td>				<td align="center" style="font-weight: bold;"><?php echo $user['email']; ?></td>				<td align="center"><?php echo $user['language']; ?></td>				<td align="right"><?php echo $user['notifybirthday']; ?></td>				<td align="center"><?php echo $user['lastmailsent']; ?></td><?php	$sqlPerson = "SELECT count(P.id) as nb FROM `person` P, `user_person` UP WHERE P.id = UP.idperson AND UP.iduser = ". $user['id'];	$resultPerson = mysql_query($sqlPerson) or die("Error in SQL : " . $sqlPerson);	if ($resultPerson && mysql_num_rows($resultPerson) > 0) {		if ($person = mysql_fetch_assoc($resultPerson)) { ?>				<td align="right" style="font-weight: bold;"><?php echo $person['nb']; ?></td>				<?php		}	}?><?php	$sqlGroup = "SELECT count(G.id) as nb FROM `group` G WHERE G.iduser = ". $user['id'];	$resultGroup = mysql_query($sqlGroup) or die("Error in SQL : " . $sqlGroup);	if ($resultGroup && mysql_num_rows($resultGroup) > 0) {		if ($group = mysql_fetch_assoc($resultGroup)) { ?>				<td align="right"><?php echo $group['nb']; ?></td>				<?php		}	}?><?php	$sqlML = "SELECT count(M.id) as nb FROM `mailing_list` M WHERE M.iduser = ". $user['id'];	$resultML = mysql_query($sqlML) or die("Error in SQL : " . $sqlML);	if ($resultML && mysql_num_rows($resultML) > 0) {		if ($mailing = mysql_fetch_assoc($resultML)) { ?>				<td align="right"><?php echo $mailing['nb']; ?></td>				<?php		}	}?>			</tr><?		$i++;		}	}?>			</tbody>		</table>	</body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -