if ($value=="Process")
$str.='<img src="1.png">';
if ($value=="Receive")
$str.='<img src="2.png">';
if ($value=="Reject")
$str.='<img src="3.png">';
$value=$str;
| <p>The .table-bordered class adds borders to a table:</p> <table class="table table-bordered"> <thead> <th>No</th> <th>DocName</th> <th>CurrentDate</th> <th>EmpId</th> <th>Page</th> <th>DocFile</th> </thead> <tr> <?php $no = 1; ?> <?php $query = mysql_query("SELECT * FROM hr WHERE (DATE(`currentdate`) = CURDATE()) ORDER BY id DESC") or die(mysql_error()); while ($row = mysql_fetch_array($query)) { ?> <td><?php echo $no; $no++ ?></td> <td> <?php echo $row['DocName'] . ''; ?> </td> <td> <?php echo $row['currentdate'] . ''; ?> </td> <td> <?php echo $row['EmpId'] . ''; ?> </td> <td> <?php echo $row['page'] . ''; ?> </td> <td> <?php echo $row['DocFile'] . ''; ?> </td> </tr> <?php }; ?> </table> </div> |
<html><body><table> <tr><td>Text to Save:</td></tr> <tr> <td colspan="3"> <textarea id="inputTextToSave" cols="80" rows="25"></textarea> </td> </tr> <tr> <td>Filename to Save As:</td> <td><input id="inputFileNameToSaveAs"></input></td> <td><button onclick="saveTextAsFile()">Save Text to File</button></td> </tr> <tr> <td>Select a File to Load:</td> <td><input type="file" id="fileToLoad"></td> <td><button onclick="loadFileAsText()">Load Selected File</button><td> </tr></table><script type="text/javascript">function saveTextAsFile(){ var textToSave = document.getElementById("inputTextToSave").value; var textToSaveAsBlob = new Blob([textToSave], {type:"text/plain"}); var textToSaveAsURL = window.URL.createObjectURL(textToSaveAsBlob); var fileNameToSaveAs = document.getElementById("inputFileNameToSaveAs").value; var downloadLink = document.createElement("a"); downloadLink.download = fileNameToSaveAs; downloadLink.innerHTML = "Download File"; downloadLink.href = textToSaveAsURL; downloadLink.onclick = destroyClickedElement; downloadLink.style.display = "none"; document.body.appendChild(downloadLink); downloadLink.click();}function destroyClickedElement(event){ document.body.removeChild(event.target);}function loadFileAsText(){ var fileToLoad = document.getElementById("fileToLoad").files[0]; var fileReader = new FileReader(); fileReader.onload = function(fileLoadedEvent) { var textFromFileLoaded = fileLoadedEvent.target.result; document.getElementById("inputTextToSave").value = textFromFileLoaded; }; fileReader.readAsText(fileToLoad, "UTF-8");}</script>http://www.turningturnip.co.uk/php-mysql-generator/?q=1</body></html>if ($value=="Process") $str.='<img src="1.png">'; if ($value=="Receive") $str.='<i...