require_once('../brian_functions.php');
$dnum = date(Ymd)*4;
$from = $_GET['fr'];
if($from == ""){
$from = $_POST['fr'];
}
if($from != $dnum){
echo("<<<<Restricted Area>>>>" .
"
Sorry, you must Log In to view this Page
");
exit();
}
$usrn = $_GET['usrn'];
if($usrn == ""){
$usrn = $_POST['usrn'];
}
if($usrn == ""){
echo("<<<<Restricted Area>>>>" .
"
Problem with your username. Please Log In again.
");
exit();
}
$ID = $_GET['ID'];
// $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1');
// mysql_select_db('ecosmar_website', $dbcnx);
// $ok = @mysql_query("SELECT ID,category,title,link,description,type FROM repdocs WHERE ID='$ID'");
// if (!$ok) {
// echo 'Could not run query: ' . mysql_error();
// exit;
// }
// $row = mysql_fetch_array($ok);
$row = dbq("SELECT ID,category,title,link,description,type FROM repdocs WHERE ID='$ID'", "f");
if ($row){
$ID = $row[0];
$Category = $row[1];
$Title = $row[2];
$Link = $row[3];
$Description = $row[4];
$Type = $row[5];
}
if($Category == 'Email Cover Letters'){
$select1 = 'Email Cover Letters';
$select2 = 'Presentation';
$select3 = 'Press';
$select4 = 'Prices & Specs';
$select5 = 'Private';
$select6 = 'Miscellaneous';
}elseif($Category == 'Presentation'){
$select1 = 'Presentation';
$select2 = 'Email Cover Letters';
$select3 = 'Press';
$select4 = 'Prices & Specs';
$select5 = 'Private';
$select6 = 'Miscellaneous';
}elseif($Category == 'Press'){
$select1 = 'Press';
$select2 = 'Email Cover Letters';
$select3 = 'Presentation';
$select4 = 'Prices & Specs';
$select5 = 'Private';
$select6 = 'Miscellaneous';
}elseif($Category == 'Prices & Specs'){
$select1 = 'Prices & Specs';
$select2 = 'Email Cover Letters';
$select3 = 'Presentation';
$select4 = 'Prices & Specs';
$select5 = 'Private';
$select6 = 'Miscellaneous';
}elseif($Category == 'Private'){
$select1 = 'Private';
$select2 = 'Email Cover Letters';
$select3 = 'Presentation';
$select4 = 'Press';
$select5 = 'Prices & Specs';
$select6 = 'Miscellaneous';
}elseif($Category == 'Miscellaneous'){
$select1 = 'Miscellaneous';
$select2 = 'Email Cover Letters';
$select3 = 'Presentation';
$select4 = 'Press';
$select5 = 'Prices & Specs';
$select6 = 'Private';
}
if($Type == 'DOC'){
$seltype1 = 'DOC';
$seltype2 = 'GIF';
$seltype3 = 'JPG';
$seltype4 = 'PDF';
$seltype5 = 'PPT';
$seltype6 = 'XLS';
}elseif($Type == 'JPG'){
$seltype1 = 'JPG';
$seltype2 = 'DOC';
$seltype3 = 'GIF';
$seltype4 = 'PDF';
$seltype5 = 'PPT';
$seltype6 = 'XLS';
}elseif($Type == 'GIF'){
$seltype1 = 'GIF';
$seltype2 = 'DOC';
$seltype3 = 'JPG';
$seltype4 = 'PDF';
$seltype5 = 'PPT';
$seltype6 = 'XLS';
}elseif($Type == 'PDF'){
$seltype1 = 'PDF';
$seltype2 = 'DOC';
$seltype3 = 'GIF';
$seltype4 = 'JPG';
$seltype5 = 'PPT';
$seltype6 = 'XLS';
}elseif($Type == 'PPT'){
$seltype1 = 'PPT';
$seltype2 = 'DOC';
$seltype3 = 'GIF';
$seltype4 = 'JPG';
$seltype5 = 'PDF';
$seltype6 = 'XLS';
}elseif($Type == 'XLS'){
$seltype1 = 'XLS';
$seltype2 = 'DOC';
$seltype3 = 'GIF';
$seltype4 = 'JPG';
$seltype5 = 'PDF';
$seltype6 = 'PPT';
}
bb($select1);
bb($select2);
bb($select3);
bb($select4);
bb($select5);
bb($select6);
?>