";
function category($category){
$query=("SELECT * FROM newscats WHERE cid='".$category."'");
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
$cid=mysql_result($result,0,"cid");
$cat=mysql_result($result,0,"cat");
$navnisan=mysql_result($result,0,"navnisan");
echo "
";
echo"
$title
";
function resimler($id){
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_eyar.php");
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_vekirin.php");
$query=("SELECT * FROM newsmedia where nid='$id' AND type LIKE '%image%' order by rank ASC");
//echo $query;
$result = mysql_query($query) or die(mysql_error());
$num_rows = mysql_num_rows($result);
if($num_rows==true){
//$filetype=mysql_result($result,0,"type");
echo"
";
}
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_girtin.php");
}
if($showfiles=="1"){
resimler($id);
}
echo $head;
function wp($id){
if($id=="46"){
function distinctwp(){
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_eyar.php");
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_vekirin.php");
$query=("SELECT distinct d.dwp, u.groupname,u.leader,u.groupdesc FROM delivinfo d, usergroups u WHERE d.dwp=u.wpid ORDER by groupname ASC");
//echo $query;
$result=mysql_query("$query") or die(mysql_error());
$num_rows=mysql_num_rows($result);
if($num_rows==true){
echo "";
echo "";
$counter="0";
while($row = mysql_fetch_array($result)){
$titre=html_entity_decode($row['1'], ENT_COMPAT, 'utf-8');
$titre=htmlentities($titre, ENT_COMPAT, 'utf-8');
$counter=$counter+1;
echo"";
echo"";
}
echo"
Groupes de travail | Leader / Objectifs |
---|
".$titre." | ".$row['2'];
/*
if($row['3']==true){
echo" ".$row['3']." ";
}
*/
echo" |
";
}
mysql_free_result($result);
}
echo distinctwp();
}
}
echo wp($id);
//echo "
";
echo $full;
echo "
";
function fichiers($id){
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_eyar.php");
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_vekirin.php");
//$query=("SELECT * FROM newsmedia where `type` NOT LIKE 'image/%' AND nid='$id' order by titre");
$query=("SELECT * FROM newsmedia where `type` NOT LIKE 'image/%' AND nid='$id' order BY LENGTH(titre), titre");
//echo $query;
$plus_photos=mysql_query($query);
$hucre_sayisi=mysql_num_rows($plus_photos);
if($hucre_sayisi==true){
echo"
";
if($hucre_sayisi=="1"){
echo"
Ci-dessous le fichier lié:
";
}else{
echo"
Ci-dessous les fichiers liés:
";
}
echo"
";
while ($row=mysql_fetch_array($plus_photos)) {
$filetype=$row['type'];
$filesize=$row['size'];
if ($filesize>=1024){
$filesize=round($filesize/1024,2);
$filesize=round($filesize/1024,2);
$filesized=$filesize." MB";
}else{
if ($filesize>=1){
$filesized=$filesize." KB";
}else{
$filesize=$filesize*1000;
$filesized="~".$filesize." B";
}
}
switch($filetype){
case "application/download";
case "application/pdf";
$downloadfileurl=($_SERVER['DOCUMENT_ROOT']."/images/mediapdf/".$row['randomid'].".pdf");
if(file_exists($downloadfileurl)){
$downloadfileurl=("/images/mediapdf/".$row['randomid'].".pdf");
}else{
$downloadfileurl=("/images/mediapdf/fichier.php?id=".$row['randomid']."");
}
echo"
-
";
break;
}
/*
fichier.php?id=".$row['randomid']."
*/
if($filetype!="application/pdf"){
switch($filetype){
case "application/rtf": $ext="rtf"; break;
case "application/doc": $ext="doc"; break;
case "application/docx": $ext="docx"; break;
case "application/dot": $ext="dot"; break;
case "application/plain": $ext="txt"; break;
case "application/vnd.ms-excel": $ext="xls"; break;
case "application/vnd.ms-excel": $ext="xlsx"; break;
case "application/msword": $ext="doc"; break;
case "text/plain": $ext="txt"; break;
case "application/xlsx": $ext="xlsx"; break;
}
echo"
-
";
}
}
echo"
";
echo"
";
}
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_girtin.php");
}
fichiers($id);
echo "