| Name |
Type |
Frequency |
Country |
Delivery Method |
Expected Date/Day |
';
}
if(mysql_num_rows($data)>0){
while( $row = mysql_fetch_array($data)){
//Get frequency name
$frequency=mysql_fetch_assoc(mysql_query("select name_frequency from frequency where id_frequency=".$row['id_frequency']));
//Get Country details
$country=mysql_fetch_assoc(mysql_query("select name_country from country where id_country=".$row['country']));
//Get Type details
$get_type=mysql_fetch_assoc(mysql_query("select name_publication_type_en from publication_type where id_publication_type=".$row['id_publication_type']));
if($row['active']=='1')
{
$img = "images/greencircle.png";
}
else
{
$img = "images/redcircle.png";
}
if($row['active']=='1')
{
$status = "Active";
}
else
{
$status = "Inactive";
}
$delivery_method= !empty($row['del_method'])?$row['del_method']:'N/A';
if(!empty($row['expected_date']) && $row['expected_date']!='0000-00-00'){
$expected_date= date('d-m-Y',strtotime($row['expected_date']));
}
elseif(!empty($row['expected_day'])){
$expected_date= $row['expected_day'];
}else{
$expected_date= 'N/A';
}
$edit_link = "
";
$del_link = "
";
if($_SESSION['moms_uid'] == '1' && $_SESSION['moms_type'] == "super_admin")
{
$str.=" ".$row['name_publication_en']." | ".$get_type['name_publication_type_en']." |
".$frequency['name_frequency']." | ".$country['name_country']." | ".$delivery_method." | ".$expected_date." | ".$edit_link."|".$del_link." |
";
}
else
if($_SESSION['moms_uid'] == '1' && $_SESSION['moms_type'] == "admin")
{
$str.=" ".$row['name_publication_en']." | ".$get_type['name_publication_type_en']." |
".$frequency['name_frequency']." | ".$country['name_country']." | ".$delivery_method." | ".$expected_date." | ".$del_link." |
";
}
else
if($_SESSION['moms_uid'] == '1')
{
$str.=" ".$row['name_publication_en']." | ".$get_type['name_publication_type_en']." |
".$frequency['name_frequency']." | ".$country['name_country']." | ".$delivery_method." | ".$expected_date." | ".$del_link." |
";
}
else
if($_SESSION['moms_type'] == "super_admin")
{
$str.=" ".$row['name_publication_en']." | ".$get_type['name_publication_type_en']." |
".$frequency['name_frequency']." | ".$country['name_country']." | ".$delivery_method." | ".$expected_date." | ".$edit_link." |
";
}
else
if($_SESSION['moms_type'] == "admin")
{
$str.=" ".$row['name_publication_en']." | ".$get_type['name_publication_type_en']." |
".$frequency['name_frequency']." | ".$country['name_country']." | ".$delivery_method." | ".$expected_date." |
";
}
}
?>
No Record Found | ";
}
$str.='