Tuesday, February 28, 2017

Iframe Allow Full Screen

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Pdf LIst FIle</title>

  <meta http-equiv="content-type" content="text/html;charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="robots" content="noindex, nofollow">
  <meta name="googlebot" content="noindex, nofollow">
<link href='//fonts.googleapis.com/css?family=Oxygen:400,700,300' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>


  <style type="text/css">
li a{color:#fafafa;background:#333;padding:0px;display:block;text-decoration:none;}
a:link {
        background-color: rgba(rgb(0, 10, 1)); /* Green */
  padding: 0px 0px;
    cursor: pointer;
    font-size: 14px;
    margin: 0px 0px
}
a:hover {
    background-color: #333333;}

 li{

    list-style-type: none;
}
  .style1 {
 color: #FFFFFF;
 font-weight:900;
}

  </style>



<style>
div.img {
    border: 3px solid #fff;

}
div.img:hover {
    border: 0px solid #777;
}

div.img img {
    width: 100%;
    height: 87%;

}

div.desc {
    padding: 15px;
    text-align: justify;
 font-weight:900;
 background:rgb(59, 60, 57);
}

* {
    box-sizing: border-box;

}

.responsive {
    padding: 2px 2px;
    float: left;
    width: 19.99999%;
}

@media only screen and (max-width: 700px){
    .responsive {
        width: 49.99999%;
        margin: 2px 0;
    }
}

@media only screen and (max-width: 500px){
    .responsive {
     width: 49.99999%;
   margin: 0px 0;
   padding-bottom:0px;
   position:relative;
   height:250px
   width:100%;
    }
}

.clearfix:after {
    content: "";
    display: table;
    clear: both;
}
 li{

    list-style-type: none;
}

</style>







<style>
.thumb {position: relative; width: 100%; height: 320px;}
.thumb a {position: absolute; top: 0px; display: block; width: 100%; height: 100%; text-align: center; text-decoration: none;}
.thumb a:hover .play, .thumb a:hover .overlay {display: block; transition: opacity .25s ease-in-out;-moz-transition: opacity .20s ease-in-out;-webkit-transition: opacity .4s ease-in-out;}
.thumb a:hover .play {position: relative; font-size: 135px; color: #34a728; margin-top: -252px; z-index: 1000; opacity: 1;}
.thumb a:hover .overlay {position: absolute; top: 0; width: 100%; height: 100%; background-color: #000000; opacity: .4;}
.thumb a {
    color: #uuuFF0;
    text-decoration: none;
</style>

</style>

<script src="/js/pdfobject.min.js"></script>

</head>

<body>

   <div id="container">
 
 

 
 
                  <?php
    include('connect.php');
    $result = mysql_query(" SELECT * FROM archive ORDER BY Rand() LIMIT 12");
    while($row=mysql_fetch_assoc($result))
    {
   
     echo '<li class="responsive">';
     echo '<div>



  <div class="img">   <div class="thumb">

 
   <a target="_blank" href="viewspdf.php?id='.$row['id'].'" title="'.$row['Name'].'">


   <embed src="http://10.1.42.18/archive/ViewerJS/#../files/'.$row['Attach'].'" alt="'.$row['Name'].'" width="100%" height="300">

 
    <div class="desc">'.$row['Name'].'</div>


   
   <span class="play">&#9658;</span>
    <div class="overlay">
    </div> </a>      
 
     </div>';
     echo '</li>';
    }
    ?>
       
   
   
   

</body>
</html>










__________________________________
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>FIle PDf View</title>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">
  <meta name="robots" content="noindex, nofollow">
  <meta name="googlebot" content="noindex, nofollow">
<link href='//fonts.googleapis.com/css?family=Oxygen:400,700,300' rel='stylesheet' type='text/css'>
<link href='//fonts.googleapis.com/css?family=Open+Sans:400,300,600,700,800' rel='stylesheet' type='text/css'>

<style>
.element {
    position: relative;
}

/*replace the content value with the
corresponding value from the list below*/

.element:before {
    content: "\f000";
    font-family: FontAwesome;
    font-style: normal;
    font-weight: normal;
    text-decoration: inherit;
/*--adjust as necessary--*/
    color: #000;
    font-size: 18px;
    padding-right: 0.5em;
    position: absolute;
    top: 10px;
    left: 0;
}
</style>

 

</head>
   <?php
$con=mysqli_connect("localhost","root","","archive");
// Check connection
if (mysqli_connect_errno())
 {
 echo "Failed to connect to MySQL: " . mysqli_connect_error();
 }
?>
   <?php


$id=$_GET['id'];
$query = mysqli_query($con, "SELECT * FROM archive WHERE id='$id'");

while($row = mysqli_fetch_assoc($query)){
$id= $row['id'];
$Name = $row['Name'];
$Location = $row['Location'];
$Attach = $row['Attach'];




?>


<body>


<iframe src="http://10.1.42.18/archive/ViewerJS/#../files/<?php echo $row ['Attach']; ?>" style="position:fixed; top:0px; left:0px; bottom:0px; right:0px; width:100%; height:100%; border:none; margin:0; padding:0; overflow:hidden; z-index:999999;"allowfullscreen></iframe></iframe>








<?php
mysqli_close($con);
?>
    <?php } ?>

</body>
</html>





sample phprunner display image if no image show file no image,jpg

if ($value)
$value = "<img width=100 height=100 src=/it/files/empphoto/".$value.">";
else
$value = "<img width=100 height=100 src=\"no.jpg\">";

sample notofication phprunner red color


$time_limit = 180 * 24 * 60;
if ((strtotime($data["ExpDate"]) - time()) <= $time_limit)
 {  $value= '<b>'.$value.'<img src="e.png">';
$color="red";

} else{
$value ='<b>'.$value.'<img src="ok.png">';
$color="black";
}

$value="<font color='$color'>$value</font>";

phprunner view custom filed status

if ($value=="Process") $str.='<img src="1.png">'; if ($value=="Receive") $str.='<i...