Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- switch($_GET['sector'])
- {
- case "1":
- $sector = "generalinformation";
- break;
- case "2":
- $sector = "education";
- break;
- case "3":
- $sector = "exhibitions";
- break;
- case "4":
- $sector = "contactus";
- break;
- }
- $pQuery = $Db->select($sector, $_GET['view']);
- if(@mysql_num_rows($pQuery) == 1)
- {
- $page = $Db->fetch_assoc($pQuery);
- echo "".stripslashes($page['body_txtbox'])."";
- if(!empty($page['attachment_file']) || !empty($page['attachment2_file']) || !empty($page['attachment3_file']) || !empty($page['attachment4_file']) || !empty($page['attachment5_file']))
- {
- $arr = array("", "2", "3", "4", "5");
- echo "<br style=\"margin-bottom: 10px;\"><p id=\"attach\">Downloadable Files:<br style=\"margin-bottom: 10px;\">";
- foreach($arr AS $a)
- {
- $uQuery = $Db->select("uploads", $page['attachment'.$a.'_file']);
- if(mysql_num_rows($uQuery) == 1 && !empty($page['attachment'.$a.'_file']))
- {
- $upload = $Db->fetch_assoc($uQuery);
- echo "<a href=\"uploads/".$upload['folder']."/".$upload['file']."\">".stripslashes($upload['file'])." (".file_size(filesize("uploads/".$upload['folder']."/".$upload['file'])).")</a><br />\n";
- }
- }
- echo "</p>\n";
- }
- }
- else
- {
- include("views/404.php");
- }
- ?>
Add Comment
Please, Sign In to add comment