[ Index ]

PHP Cross Reference of Moodle 1.9.3 [Build 15-Oct-2008]

title

Body

[close]

/lib/editor/htmlarea/popups/ -> createanchor.php (source)

   1  <?php // $Id: createanchor.php,v 1.5 2007/01/27 23:23:45 skodak Exp $
   2      require("../../../../config.php");
   3  
   4      $id = optional_param('id', SITEID, PARAM_INT);
   5  
   6      require_course_login($id);
   7      @header('Content-Type: text/html; charset=utf-8');
   8  ?>
   9  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  10      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  11  <html>
  12  <head>
  13  <meta http-equiv="content-type" content="text/html; charset=utf-8" />
  14  <title>Create anchor</title>
  15  <script type="text/javascript" src="popup.js"></script>
  16  <script type="text/javascript">
  17  //<![CDATA[
  18  function Init() {
  19      __dlg_init();
  20  }
  21  
  22  function onOK() {
  23    var required = {
  24      "f_anc": "You must enter the URL where this link points to"
  25    };
  26    var txt = document.forms[0].anc.value;
  27    if (!txt) {
  28      alert(required[f_anc]);
  29      el.focus();
  30      return false;
  31    }
  32    // pass data back to the calling window
  33    var param = new Object();
  34    param.anchor = txt;
  35    __dlg_close(param);
  36    return false;
  37  };
  38  
  39  function onCancel() {
  40    __dlg_close(null);
  41    return false;
  42  };
  43  //]]>
  44  </script>
  45  <style type="text/css">
  46  <!--
  47  body { background: ButtonFace; font-family: Tahoma, sans-serif; }
  48  td, button, input { font-family: Tahoma, verdana, sans-serif; font-size: 8pt; }
  49  button { width: 70px; }
  50  .title { background: #ddf; color: #000; font-weight: bold; font-size: 10pt; padding: 3px 10px; margin-bottom: 10px;
  51  border-bottom: 1px solid black; letter-spacing: 2px;
  52  }
  53  .note { font-size: 8pt; }
  54  -->
  55  </style>
  56  </head>
  57  <body>
  58  <div class="title"><?php print_string("createanchor","editor");?></div>
  59  <form id="fie">
  60  <table border="0" cellpadding="2" cellspacing="0">
  61  <tr>
  62      <td><?php print_string("anchorname","editor");?>: <input id="f_anc" name="anc" type="text" size="30" /></td>
  63  </tr>
  64  <tr>
  65      <td align="right">
  66      <br />
  67      <button onclick="return onOK();" type="button"><?php print_string("ok","editor");?></button>&nbsp;<button onclick="return onCancel();" type="button"><?php print_string("cancel","editor");?></button>&nbsp;
  68      <button type="button" onclick="javascript: void(0); alert('<?php print_string("anchorhelp","editor");?>');"><?php print_string("help");?></button></td>
  69  </tr>
  70  </table>
  71  </form>
  72  </body>
  73  </html>


Generated: Wed Jan 14 11:33:29 2009 Cross-referenced by PHPXref 0.7