";
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 "".$cat."";
}
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"
";
while ($row=mysql_fetch_array($result)) {
echo"";
echo"";
echo"";
//echo"
".$row['legende']."
";
}
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 "
";
}
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"
";
function listdecategoriesimg($id){
include($_SERVER['DOCUMENT_ROOT']."/test/databases/new/db_eyar.php");
include($_SERVER['DOCUMENT_ROOT']."/test/databases/new/db_vekirin.php");
$query=("SELECT * FROM newsmedia where nid='".$id."' AND type LIKE '%image%' order by rank ASC");
$result = mysqli_query($conn,$query) or die(mysqli_error($conn));
$num_rows = mysqli_num_rows($result);
if($num_rows=='1'){
$data = mysqli_fetch_object($result);
$id=$data->id;
$img="https://www.nazandbegikhani.com/info/images/crop/photo-270X181-".$id.".jpg";
}
return $img;
}
function listdecategories($category){
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_eyar.php");
include($_SERVER['DOCUMENT_ROOT']."/test/databases/4/db_vekirin.php");
$query=("SELECT * FROM newsarticles WHERE status='1' AND category='".$category."' order by classement ASC");
$result=mysql_query($query) or die(mysql_error($query));
$num_rows=mysql_num_rows($result);
if($num_rows==true){
while($row = mysql_fetch_array($result)){
echo"