OSDN Git Service

Ver 0.5.9.2
[nucleus-jp/nucleus-plugins.git] / trunk / NP_MitasNom / mitasnom / popup.php
1 <?php
2 /*
3  * NP_MitasNom
4  * Written by Katsumi
5  * This library is GPL
6  */
7         $strRel = '../../../'; 
8         require($strRel . 'config.php');
9
10         // create the admin area page
11         if (!$member->isLoggedIn()) exit;
12         include($DIR_LIBS . 'PLUGINADMIN.php');
13         $oPluginAdmin = new PluginAdmin('MitasNom');
14         $p=&$oPluginAdmin->plugin;
15         
16         if (!class_exists('NucleusFCKeditor')) include (dirname(__FILE__).'/fckclass.php');
17         
18         $id=htmlspecialchars(requestVar('id'),ENT_QUOTES);
19         $blogid=(int)requestVar('blogid');
20 ?><html>
21 <head>
22 <script type="text/javascript">
23 function getId(){
24 <?php echo "return '$id';\n"; ?>
25 }
26 function event_onload(){
27   var id=getId();
28   if (!id) return;
29   document.getElementById('inputbody').value=window.opener.WYSIWYGgettext(id);
30 }
31 function event_onsubmit(){
32   var id=getId();
33   if (!id) return;
34   window.opener.focus(); 
35   window.opener.WYSIWYGsettext(id,document.getElementById('inputbody').value);
36   window.close();
37 }
38 </script>
39 <body onload="event_onload();">
40 <form method="get" action="javascript:event_onsubmit();">
41 <?php
42         $FCKedit=new NucleusFCKEditor('inputbody',$p);
43         $FCKedit->Width='100%';
44         $FCKedit->Height='100%';
45         $FCKedit->Create();
46 ?>
47 </form>
48 </body></html>