All pastes #2082782 Raw Edit

Stuff

public text v1 · immutable
#2082782 ·published 2011-09-25 17:06 UTC
rendered paste body
			echo'<div class="itemName" id="itemName">
    				Statistieken
					<div class="uitlegItem" id="uitlegItem">
						Dit zijn de statistieken van de gehele
						website.
					</div>
                 </div>';
			
			$totalcountlinks = mysql_query("SELECT count FROM am_statics") or die(mysql_error());
			
			if(mysql_num_rows($totalcountlinks))
			{
			
				while ($counting = mysql_fetch_array($totalcountlinks)) 
				{
					$totalcount += $counting['count'];
									
				}
				
				echo '
					 <table width="20%" border="0">
						<tr>
							<td width="20%" scope="col"></td>
							<td width="60%" scope="col"></td>
							<td width="20%" scope="col"></td>
						</tr>
							<tr>
								<td></td>
								<td></td>
								<td><table width="550" border="0">
        <tr>
          <th scope="col" width="50">0</th>
          <th scope="col" width="50">10</th>
          <th scope="col" width="50">20</th>
          <th scope="col" width="50">30</th>
          <th scope="col" width="50">40</th>
          <th scope="col" width="50">50</th>
          <th scope="col" width="50">60</th>
          <th scope="col" width="50">70</th>
          <th scope="col" width="50">80</th>
          <th scope="col" width="50">90</th>
		  <th scope="col" width="50">100</th>
        </tr>
      </table></td>
							</tr>
						
						      
						
						
					';
				
				$differentfilehosting = mysql_query("SELECT DISTINCT filehosting FROM am_statics") or die(mysql_error());
				
				while ($filehosting = mysql_fetch_array($differentfilehosting)) 
				{ 
				
					$countlinks = mysql_query("SELECT count FROM am_statics WHERE filehosting='".$filehosting['filehosting']."'") or die(mysql_error());
	
					while ($counting = mysql_fetch_array($countlinks)) 
					{ 
						$count += $counting['count'];
					}
					
					if (!$count == 0)
					{
						
						echo '
							<tr>
								<td></td>
								<td>'.$filehosting['filehosting'].'</td>
								<td><div class="staticProc" id="StaticProc" style="width: '.($count / $totalcount * 100 * 5).'px; background-color: #7698B4">'.sprintf('%01.2f', ($count / $totalcount * 100)).'</div></td>
							</tr>
							';
							
					}
					
					$count = 0;
				}
				
				echo '</tr>
					</table>';
				
			}
			else
			{
				echo 'Geen statistieken beschikbaar!';
			}