html – Reffffference https://ivan.reallusiondesign.com For my personal reference purposes Sun, 28 Aug 2016 13:59:39 +0000 en-US hourly 1 https://wordpress.org/?v=6.5.5 106465655 HTML5 Blank page https://ivan.reallusiondesign.com/html5-blank-page/ https://ivan.reallusiondesign.com/html5-blank-page/#disqus_thread Wed, 17 Aug 2016 22:29:08 +0000 https://ivan.reallusiondesign.com/?p=711 Bare bones html5 markup page for copy/pasting purposes 🙂

<!doctype html>

<html lang="en">
<head>
  <meta charset="utf-8">

  <title>Page title</title>
  <meta name="description" content="HTML5 Blank">
  <meta name="author" content="idenkov">

  <link rel="stylesheet" href="css/styles.css">
  <script src="js/scripts.js"></script>

  <!--[if lt IE 9]>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.js"></script>
  <![endif]-->
</head>

<body>

</body>

</html>
]]>
https://ivan.reallusiondesign.com/html5-blank-page/feed/ 0 711
Get the value from multiple checkboxes https://ivan.reallusiondesign.com/get-the-value-from-multiple-checkboxes/ https://ivan.reallusiondesign.com/get-the-value-from-multiple-checkboxes/#disqus_thread Tue, 29 Jul 2014 05:07:26 +0000 https://ivan.reallusiondesign.com/?p=325 <html> <body> <h3>Get Value from multiple checkbox in PHP</h3> <form action="test.php" method="post"> <input type="checkbox" name="fruit_list[]" value="1">Apple  <input type="checkbox" name="fruit_list[]" value="2">Banana  <input type="checkbox" name="fruit_list[]" value="3">Mango <input type="checkbox" name="fruit_list[]" value="4">Guava</br></br> <input type="checkbox" name="fruit_list[]" value="5">Orange</br></br> <input type="submit" value="Save" /> </form> <body> </html> <?php if(isset($_POST['fruit_list'])) { $fruit_list = array(); foreach($_POST['fruit_list'] as $val) { $fruit_list[] = (int) $val; } $fruit_list = implode(',', $fruit_list); echo "Fruits Value are :- ".''.$fruit_list; exit; } ?> ]]> https://ivan.reallusiondesign.com/get-the-value-from-multiple-checkboxes/feed/ 0 325 Apache Landing Page https://ivan.reallusiondesign.com/apache-landing-page/ https://ivan.reallusiondesign.com/apache-landing-page/#disqus_thread Tue, 24 Apr 2012 18:28:29 +0000 https://localhost/Reference/?p=53 This code list the directories and files in a table.

<!DOCTYPE html>
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>Ze Master Server of The Universe</title>
   <style>
     *{
         padding:0;
         margin:0;
     }
     html,body {
         color:#333;
         font-family: "Lucida Console", Courier, monospace;
         font-size:14px;
         text-shadow:1px 1px 1px #cacaca;
         -webkit-text-shadow:1px 1px 1px #cacaca;
         -moz-text-shadow:1px 1px 1px #cacaca;
     }
     a{
         padding: 2px 0 0 24px;
         color:#FE4902;
         text-decoration:none;
     }
     a:hover{
         color:#000;
         cursor:url(hand.gif), progress;
     }
     #container{
         margin:0 auto;
         width:700px;
         margin-top:20px;
         padding-top:10px;
         border:1px solid #EEE;
         border-radius:10px;
         -moz-border-radius:10px;
     }
     .head{
         background-color:#38AF64;
         color:#FFF;
         font-weight:bold;
         padding:7px 0 5px 10px;
         font-size:14px;
         letter-spacing:1px;
         font-family: Verdana, Arial, Helvetica, sans-serif;
     }
     .head:hover{background-color:#FE4902;}
     .head span{font-size:9px; letter-spacing:0;}
     td{
         background-color:#F3F3F3;
         padding:6px;
     }
     td:hover{background-color:#EFEFEF;}
     h1{
         font-size:18px;
         font-weight:bold;
         padding:0 0 10px 10px;
     }

     /*icons for file types (add more to suit your needs - icons by famfamfam.)*/

     /*images*/
     a[href$=".jpg"] {background: url(image.gif) no-repeat left 50%;}
     a[href$=".gif"] {background: url(image.gif) no-repeat left 50%;}
     a[href$=".png"] {background: url(image.gif) no-repeat left 0%;}

     /*pdfs*/
     a[href$=".pdf"] {background: url(pdf.gif) no-repeat left 50%;}

     /*psds*/
     a[href$=".psd"] {background: url(psd.gif) no-repeat left 50%;}

     /*docs*/
     a[href$=".doc"] {background: url(doc.gif) no-repeat left 50%;}
     a[href$=".txt"] {background: url(doc.gif) no-repeat left 50%;}

     /*videos*/
     a[href$=".avi"] {background: url(video.gif) no-repeat left 50%;}
     a[href$=".m4a"] {background: url(video.gif) no-repeat left 50%;}
     a[href$=".mov"] {background: url(video.gif) no-repeat left 50%;}
     a[href$=".mp4"] {background: url(video.gif) no-repeat left 50%;}
     a[href$=".wmv"] {background: url(video.gif) no-repeat left 50%;}

     /*audio*/
     a[href$=".mp3"] {background: url(audio.gif) no-repeat left 50%;}
     a[href$=".wma"] {background: url(audio.gif) no-repeat left 50%;}
     a[href$=".aac"] {background: url(audio.gif) no-repeat left 50%;}

     /*web pages*/
     a[href$=".html"] {background: url(html.gif) no-repeat left 50%;}
     a[href$=".php"] {background: url(html.gif) no-repeat left 50%;}

   </style>

</head>
<body>
   <div id="container">
       <?php
         // opens this directory
         $myDirectory = opendir(".");

         // gets each entry
         while($entryName = readdir($myDirectory)) {
           $dirArray[] = $entryName;
         }

         // finds extention of file
         function findexts ($filename)
         {
           $filename = strtolower($filename) ;
           $exts = split("[/\\.]", $filename) ;
           $n = count($exts)-1;
           $exts = $exts[$n];
           return $exts;
         }

         // closes directory
         closedir($myDirectory);

         //  counts elements in array
         $indexCount   = count($dirArray);

         // sorts files
         sort($dirArray);

         // print 'em
         print("<h1>Directory Contents</h1>");
         print("<table width='100%' cellspacing='10'>
                 <tr>
                   <td class='head'>Directory/File</td>
                   <td class='head'>Type</td>
                   <td class='head'>Size <span>(bytes)</span></td></tr>\n");

         // loops through the array of files and print them all
         for($index=0; $index < $indexCount; $index++) {
               if (substr("$dirArray[$index]", 0, 1) != "."){ // don't list hidden files
               print("<tr><td><a href='$dirArray[$index]'>$dirArray[$index]</a></td>");
               print("<td>");
               print(findexts($dirArray[$index]));
               print("</td>");
               print("<td>");
               print(filesize($dirArray[$index]));
               print("</td>");
               print("</tr>\n");
           }
         }
         print("</table>\n");
       ?>
   </div>

</body>
</html>
]]>
https://ivan.reallusiondesign.com/apache-landing-page/feed/ 0 53
Contact Form and send e-mail https://ivan.reallusiondesign.com/contact-form-and-send-e-mail/ https://ivan.reallusiondesign.com/contact-form-and-send-e-mail/#disqus_thread Mon, 23 Apr 2012 16:57:18 +0000 https://localhost/Reference/?p=43 <?php if ($_POST["email"]<>'') { $ToEmail = 'youremail@site.com'; $EmailSubject = 'Site contact form'; $mailheader = "From: ".$_POST["email"]."\r\n"; $mailheader .= "Reply-To: ".$_POST["email"]."\r\n"; $mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n"; $MESSAGE_BODY = "Name: ".$_POST["name"].""; $MESSAGE_BODY .= "Email: ".$_POST["email"].""; $MESSAGE_BODY .= "Comment: ".nl2br($_POST["comment"]).""; mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure"); ?> Your message was sent <?php } else { ?> <form action="test.php" method="post"> <table width="400" border="0" cellspacing="2" cellpadding="0"> <tr> <td width="29%" class="bodytext">Your name:</td> <td width="71%"><input name="name" type="text" id="name" size="32"></td> </tr> <tr> <td class="bodytext">Email address:</td> <td><input name="email" type="text" id="email" size="32"></td> </tr> <tr> <td class="bodytext">Comment:</td> <td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td> </tr> <tr> <td class="bodytext"> </td> <td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td> </tr> </table> </form> <?php }; ?> ]]> https://ivan.reallusiondesign.com/contact-form-and-send-e-mail/feed/ 0 43