<?
if($_GET['action']==”download”){
$file = “./images/”.$_GET['filename'].”.”;
header(“Content-type: application/force-download”); //optional
header(“Content-Transfer-Encoding: Binary”);
header(“Content-length: “.filesize($file));
header(“Content-Disposition: attachment; filename=”.basename($file).””);
readfile(“$file”);
}else{
$folder = “./images/”;
if (is_dir($folder)){
$contents = scandir($folder);
$bad = array(“.”, “..”, “.DS_Store”, “_notes”, “Thumbs.db”);
$files = array_diff($contents, $bad);
}
echo<<<FILES
?>
<table>
<?
FILES;
while(list($key,$value) = each($files)){
$rCtr++;
echo<<<FILES
?>
<tr><td align=”right”>$value</td>
<td><img src=”images/download.png”
onmousedown=”window.open(‘$PHP_SELF?action=download&filename=$value’,’_self’)”
style=”cursor:pointer” /></td></tr>
<?
FILES;
}
?>
</table>
<?
}
?>
<?
if($_GET['action']==”download”){
$file = “./images/”.$_GET['filename'].”.”;
header(“Content-type: application/force-download”); //optional
header(“Content-Transfer-Encoding: Binary”);
header(“Content-length: “.filesize($file));
header(“Content-Disposition: attachment; filename=”.basename($file).””);
readfile(“$file”);
}else{
[...]
<?php
// place this code inside a php file and call it f.e. “download.php”
$path = $_SERVER['DOCUMENT_ROOT'].”/path2file/”; // change the path to fit your websites document structure
$fullPath = $path.$_GET['download_file'];
if ($fd = fopen ($fullPath, “r”)) {
$fsize = filesize($fullPath);
$path_parts = pathinfo($fullPath);
$ext = strtolower($path_parts["extension"]);
switch [...]
List of Passers PSU – Lingayen College Admission Test
Date of Exam: November 5 & 6, 2009
1 ARESPI, Mary Grace C.
2 BRAVO, Mark Jayson Z.
3 CACATIAN, Jan paul F.
4 CARIG, Ali-Rose
5 CASTILLO, Clarissa A.
6 CASTILLO, Kaye One J.
7 CORRE, Michelle Joy
8 DE GUZMAN Jr, Alfredo M.
9 DOMAGAS, [...]
30 Oct
Posted by admin as Announcements
Ade, Saint Raymond T.
Ayala, Michael Angelo P.
Balois, Mary Jane C.
Barnachea, John Carl S.
Biag, Anabelle G.
Braza, Jhon Kirby F.
Camba, Leilani O.
Cayabyab, Sarah Rhea C.
Clemente, Josephine S.
Corla, Cherry Lhen M.
De Castro, Levi Dan L.
Dorognan, Jenelyn G.
Isleta, Clarizze Anne C.
Licuanan, Crystal Jade V.
Ocon, Cherry Mae T.
Ramos Jr., Loreto G.
Ramos, Mary Ann A.
Repato, Art Wilson G.
Sino Cruz, Virgie Lizza [...]
Final checking of project proposal documents and prototype will be on November 6, 2009. Revisions should be at least 15% finish before your final grades will be given.
Schedule for Proposal Presentation and group sequence can be viewed using the following link:
October 21, 2009 (Wednesday)
October 22, 2009 (Thursday)
The proposal presentation will start at 8:30am of the said date. Each group will be given a 45 minutes to 1 hour of discussion of proposal and prototype. Your power point or flash presentation should be [...]
15 Oct
Posted by admin as Announcements, PHP Scripts and Tools
Students who are interested to try this problem can earn and extra points or exemption for finals. Solve the problem using PHP scripting language.
Show your codes on October 19, 2008 (9:00) to your instructor for checking and evaluation.
The problem was excerpt from HP CodeWars 2009.
Redundant Acronym Syndrome Syndrome
Task Description
From Wikipedia, the free encyclopedia:
The term RAS [...]
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « May | ||||||
| 1 | 2 | 3 | 4 | |||
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | |