Advertisement
Guest User

Untitled

a guest
Apr 11th, 2012
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 9.42 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <?php
  4.            header('Content-type: text/html; charset=iso-8859-1');
  5.            include("D:/applwww/connection/YU - Suivi/connect2008.php");
  6.            include("D:/applwww/librairie/var/userbur.php");
  7.            $userbur = new userbur;
  8.            $user = $userbur->getLogonName();
  9.             $query = "Select * from CT_FORUM.dbo.T_USAGERS where CH_CIP ='".$user."'";
  10.             $result = odbc_exec($conn,$query);
  11.             $id_usr= odbc_result($result,"ID_USER");
  12.             $poste = odbc_result($result,"CH_POSTE");
  13.             $query = "ct_forum.dbo.get_question ".$question;
  14.             $result = odbc_exec($conn,$query);
  15.         ?>
  16.     </head>
  17.     <link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
  18.  
  19.     <!-- Skin CSS file -->
  20.     <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/skin.css">
  21.     <!-- Utility Dependencies -->
  22.    
  23.     <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
  24.     <script src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
  25.     <!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
  26.     <script src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"></script>
  27.     <script src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
  28.     <script src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
  29.     <!-- Source file for Rich Text Editor-->
  30.     <script src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"></script>
  31.     <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
  32.     <style>
  33.         .reponse{
  34.             width:950px;
  35.             border:1px solid #333;
  36.             background-color:#fafafa;
  37.             padding-top:5px;
  38.             margin-left:10px;
  39.             margin-bottom:11px;
  40.         }
  41.     </style>
  42.     <script>
  43.     var frm = window.parent.document.getElementById("frm");
  44.         var myEditor = new YAHOO.widget.Editor('msgpost', {
  45.             height: '300px',
  46.             width: '950px',
  47.             dompath: true, //Turns on the bar at the bottom
  48.             animate: true, //Animates the opening, closing and moving of Editor windows
  49.             toolbar: {
  50.                     collapse: true,
  51.                     titlebar: 'Commenter',
  52.                     draggable: false,
  53.                     buttonType: 'advanced',
  54.                     buttons: [
  55.                          { group: 'fontstyle', label: 'Font Name and Size',
  56.                              buttons: [
  57.                                  { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
  58.                                      menu: [
  59.                                          { text: 'Arial', checked: true },
  60.                                          { text: 'Arial Black' },
  61.                                          { text: 'Comic Sans MS' },
  62.                                          { text: 'Courier New' },
  63.                                          { text: 'Lucida Console' },
  64.                                          { text: 'Tahoma' },
  65.                                          { text: 'Times New Roman' },
  66.                                          { text: 'Trebuchet MS' },
  67.                                          { text: 'Verdana' }
  68.                                      ]
  69.                                  },
  70.                                  { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
  71.                              ]
  72.                          },
  73.                          { type: 'separator' },
  74.                          { group: 'textstyle', label: 'Font Style',
  75.                              buttons: [
  76.                                  { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
  77.                                  { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
  78.                                  { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
  79.                                  { type: 'separator' },
  80.                                  { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
  81.                                  { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
  82.                                  { type: 'separator' },
  83.                                  { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
  84.                                  { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
  85.                                  { type: 'separator' },
  86.                                  { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
  87.                                  { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
  88.                              ]
  89.                          },
  90.                          { type: 'separator' },
  91.                          { group: 'alignment', label: 'Alignment',
  92.                              buttons: [
  93.                                  { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
  94.                                  { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
  95.                                  { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
  96.                                  { type: 'push', label: 'Justify', value: 'justifyfull' }
  97.                              ]
  98.                          },
  99.                          { type: 'separator' },
  100.                          { group: 'parastyle', label: 'Paragraph Style',
  101.                              buttons: [
  102.                              { type: 'select', label: 'Normal', value: 'heading', disabled: true,
  103.                                  menu: [
  104.                                      { text: 'Normal', value: 'none', checked: true },
  105.                                      { text: 'Header 1', value: 'h1' },
  106.                                      { text: 'Header 2', value: 'h2' },
  107.                                      { text: 'Header 3', value: 'h3' },
  108.                                      { text: 'Header 4', value: 'h4' },
  109.                                      { text: 'Header 5', value: 'h5' },
  110.                                      { text: 'Header 6', value: 'h6' }
  111.                                  ]
  112.                              }
  113.                              ]
  114.                          },
  115.  
  116.                          { type: 'separator' },
  117.                          { group: 'insertitem', label: 'Insert Item',
  118.                              buttons: [
  119.                                  { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
  120.                                  { type: 'push', label: 'Insert Image', value: 'insertimage' }
  121.                              ]
  122.                          }
  123.                      ]
  124.  
  125.                 }
  126.  
  127.         });
  128.         myEditor.render();
  129.  
  130.         YAHOO.util.Event.on('Ajouter', 'click', function() {
  131.             //Put the HTML back into the text area
  132.             myEditor.saveHTML();
  133.             //The var html will now have the contents of the textarea
  134.             var html = myEditor.get('element').value;
  135.             //document.getElementById("__html").value = html;
  136.             //frm.action = "sauvInfos.php?action=ReponseAjouter&idQuestion=<?php echo $question;?>";
  137.             frm.action = "sauvInfos.php?action=ReponseAjouter&quest_test=<?php echo $question;?>&mon_txt="+html+"&bonne_test=0";
  138.             frm.target = "frameSQL";
  139.             frm.submit();
  140.         });
  141.  
  142.         $(document).ready (
  143.                 function() {
  144.                     if ( $.browser.mozilla == true ) {
  145.                             $(".test_div").css("margin-top","5px");
  146.                            
  147.                     }
  148.                 }
  149.             );
  150.  
  151.  
  152.     </script>
  153.     <body class="yui-skin-sam">
  154.         <form id="frm" name="frm" method="post" action="">
  155.             <input type="hidden" id="html" name="html" value="test"/>
  156.             <input type="textbox" id="idQuestion" name="idQuestion" value="<?php echo $question;?>" style="display:none"/>
  157.             <input type="textbox" id="idUsager" name="idUsager" value="<?php echo $user;?>" style="display:none"/>
  158.             <input type="textbox" id="bonne" name="bonne" value="0" style="display:none"/>
  159.         <div id="details">
  160.             <div id="question">
  161.             <iframe id="frameSQL" name="frameSQL" frameborder="0" scrolling="no" style="display:none"></iframe>
  162.                 <h4>
  163.                
  164.                 <div style="margin-left:51px">
  165.                     <textarea name="msgpost" id="msgpost" cols="50" rows="10" style="display:none;">
  166.                     </textarea>
  167.                     <input type="button" id="Ajouter" value="Ajouter" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'"/>
  168.                 </div>
  169.             </div>
  170.  
  171.         </form>
  172.         <script>
  173.             document.getElementById("details").style.height = document.getElementById("details").offsetHeight+500;
  174.             window.parent.document.getElementById("frame").style.height = document.getElementById("details").style.height;
  175.             document.getElementById("Ajouter").style.display="inline";
  176.         </script>
  177.     </body>
  178. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement