[ PHPXref.com ] [ Generated: Sun Jul 20 18:58:10 2008 ] [ Netious 0.4 ]
[ Index ]     [ Variables ]     [ Functions ]     [ Classes ]     [ Constants ]     [ Statistics ]

title

Body

[close]

/ -> insert_link.php (source)

   1  <?
   2  
   3  $directory="../sections/$pageid/files";
   4  
   5  
   6  
   7  echo "
   8  <!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
   9  <html>
  10  <head>
  11      <title>Insert link</title>
  12      <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">
  13  <script language=\"JavaScript\" type=\"text/javascript\">
  14  <!--
  15  function AddLink() {
  16      var oForm = document.linkForm;
  17      
  18      //validate form

  19      if (oForm.url.value == '') {
  20          alert('Write URL.');
  21          return false;
  22      }
  23      if (oForm.linkText.value == '') {
  24          alert('Write the link text.');
  25          return false;
  26      }
  27      
  28      var html = '<a href=\"' + document.linkForm.url.value + '\" target=\"' + document.linkForm.linkTarget.options[document.linkForm.linkTarget.selectedIndex].value + '\">' + document.linkForm.linkText.value + '</a>';
  29      window.opener.insertHTML(html);
  30      window.close();
  31      return true;
  32  }
  33  //-->

  34  </script>
  35  </head>
  36  
  37  <body style=\"margin: 10px; background: #EEEEEE;\">
  38  <form name=\"linkForm\" onSubmit=\"return AddLink();\">
  39  <table cellpadding=\"4\" cellspacing=\"0\" border=\"0\">
  40      <tr><td colspan=\"2\"><span style=\"font-style: italic; font-size: x-small;\"><b>Hint:</b> To insert an e-mail link, start the URL with \"mailto:\"</span></td></tr>
  41      <tr>
  42          <td align=\"right\">URL:</td>
  43          <td><input name=\"url\" type=\"text\" id=\"url\" size=\"40\"></td>
  44      </tr>
  45      <tr>
  46          <td align=\"right\">Text:</td>
  47          <td><input name=\"linkText\" type=\"text\" id=\"linkText\" size=\"40\"></td>
  48      </tr>
  49      <tr>
  50          <td align=\"right\">Target:</td>
  51          <td align=\"left\">
  52              <select name=\"linkTarget\" id=\"linkTarget\">
  53                  <option value=\"_blank\">_blank</option>
  54                  <option value=\"_parent\">_parent</option>
  55                  <option value=\"_self\" selected>_self</option>
  56                  <option value=\"_top\">_top</option>
  57              </select>
  58          </td>
  59      </tr>
  60      <tr>
  61          <td colspan=\"3\" align=\"center\">
  62              <input type=\"submit\" value=\"Insert\" />
  63              <input type=\"button\" value=\"Cancel\" onClick=\"window.close();\" />
  64          </td>
  65      </tr>
  66  </table>
  67  
  68  </form>
  69  
  70  </body>
  71  </html>
  72  ";
  73  
  74  ?>


[ Powered by PHPXref - Served by Debian GNU/Linux ]