Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <?php
- header('Content-type: text/html; charset=iso-8859-1');
- include("D:/applwww/connection/YU - Suivi/connect2008.php");
- include("D:/applwww/librairie/var/userbur.php");
- $userbur = new userbur;
- $user = $userbur->getLogonName();
- $query = "Select * from CT_FORUM.dbo.T_USAGERS where CH_CIP ='".$user."'";
- $result = odbc_exec($conn,$query);
- $id_usr= odbc_result($result,"ID_USER");
- $poste = odbc_result($result,"CH_POSTE");
- $query = "ct_forum.dbo.get_question ".$question;
- $result = odbc_exec($conn,$query);
- ?>
- </head>
- <link href="styles.css" rel="stylesheet" type="text/css" media="screen" />
- <!-- Skin CSS file -->
- <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.9.0/build/assets/skins/sam/skin.css">
- <!-- Utility Dependencies -->
- <script src="http://yui.yahooapis.com/2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
- <script src="http://yui.yahooapis.com/2.9.0/build/element/element-min.js"></script>
- <!-- Needed for Menus, Buttons and Overlays used in the Toolbar -->
- <script src="http://yui.yahooapis.com/2.9.0/build/container/container_core-min.js"></script>
- <script src="http://yui.yahooapis.com/2.9.0/build/menu/menu-min.js"></script>
- <script src="http://yui.yahooapis.com/2.9.0/build/button/button-min.js"></script>
- <!-- Source file for Rich Text Editor-->
- <script src="http://yui.yahooapis.com/2.9.0/build/editor/editor-min.js"></script>
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js" type="text/javascript"></script>
- <style>
- .reponse{
- width:950px;
- border:1px solid #333;
- background-color:#fafafa;
- padding-top:5px;
- margin-left:10px;
- margin-bottom:11px;
- }
- </style>
- <script>
- var frm = window.parent.document.getElementById("frm");
- var myEditor = new YAHOO.widget.Editor('msgpost', {
- height: '300px',
- width: '950px',
- dompath: true, //Turns on the bar at the bottom
- animate: true, //Animates the opening, closing and moving of Editor windows
- toolbar: {
- collapse: true,
- titlebar: 'Commenter',
- draggable: false,
- buttonType: 'advanced',
- buttons: [
- { group: 'fontstyle', label: 'Font Name and Size',
- buttons: [
- { type: 'select', label: 'Arial', value: 'fontname', disabled: true,
- menu: [
- { text: 'Arial', checked: true },
- { text: 'Arial Black' },
- { text: 'Comic Sans MS' },
- { text: 'Courier New' },
- { text: 'Lucida Console' },
- { text: 'Tahoma' },
- { text: 'Times New Roman' },
- { text: 'Trebuchet MS' },
- { text: 'Verdana' }
- ]
- },
- { type: 'spin', label: '13', value: 'fontsize', range: [ 9, 75 ], disabled: true }
- ]
- },
- { type: 'separator' },
- { group: 'textstyle', label: 'Font Style',
- buttons: [
- { type: 'push', label: 'Bold CTRL + SHIFT + B', value: 'bold' },
- { type: 'push', label: 'Italic CTRL + SHIFT + I', value: 'italic' },
- { type: 'push', label: 'Underline CTRL + SHIFT + U', value: 'underline' },
- { type: 'separator' },
- { type: 'push', label: 'Subscript', value: 'subscript', disabled: true },
- { type: 'push', label: 'Superscript', value: 'superscript', disabled: true },
- { type: 'separator' },
- { type: 'color', label: 'Font Color', value: 'forecolor', disabled: true },
- { type: 'color', label: 'Background Color', value: 'backcolor', disabled: true },
- { type: 'separator' },
- { type: 'push', label: 'Remove Formatting', value: 'removeformat', disabled: true },
- { type: 'push', label: 'Show/Hide Hidden Elements', value: 'hiddenelements' }
- ]
- },
- { type: 'separator' },
- { group: 'alignment', label: 'Alignment',
- buttons: [
- { type: 'push', label: 'Align Left CTRL + SHIFT + [', value: 'justifyleft' },
- { type: 'push', label: 'Align Center CTRL + SHIFT + |', value: 'justifycenter' },
- { type: 'push', label: 'Align Right CTRL + SHIFT + ]', value: 'justifyright' },
- { type: 'push', label: 'Justify', value: 'justifyfull' }
- ]
- },
- { type: 'separator' },
- { group: 'parastyle', label: 'Paragraph Style',
- buttons: [
- { type: 'select', label: 'Normal', value: 'heading', disabled: true,
- menu: [
- { text: 'Normal', value: 'none', checked: true },
- { text: 'Header 1', value: 'h1' },
- { text: 'Header 2', value: 'h2' },
- { text: 'Header 3', value: 'h3' },
- { text: 'Header 4', value: 'h4' },
- { text: 'Header 5', value: 'h5' },
- { text: 'Header 6', value: 'h6' }
- ]
- }
- ]
- },
- { type: 'separator' },
- { group: 'insertitem', label: 'Insert Item',
- buttons: [
- { type: 'push', label: 'HTML Link CTRL + SHIFT + L', value: 'createlink', disabled: true },
- { type: 'push', label: 'Insert Image', value: 'insertimage' }
- ]
- }
- ]
- }
- });
- myEditor.render();
- YAHOO.util.Event.on('Ajouter', 'click', function() {
- //Put the HTML back into the text area
- myEditor.saveHTML();
- //The var html will now have the contents of the textarea
- var html = myEditor.get('element').value;
- //document.getElementById("__html").value = html;
- //frm.action = "sauvInfos.php?action=ReponseAjouter&idQuestion=<?php echo $question;?>";
- frm.action = "sauvInfos.php?action=ReponseAjouter&quest_test=<?php echo $question;?>&mon_txt="+html+"&bonne_test=0";
- frm.target = "frameSQL";
- frm.submit();
- });
- $(document).ready (
- function() {
- if ( $.browser.mozilla == true ) {
- $(".test_div").css("margin-top","5px");
- }
- }
- );
- </script>
- <body class="yui-skin-sam">
- <form id="frm" name="frm" method="post" action="">
- <input type="hidden" id="html" name="html" value="test"/>
- <input type="textbox" id="idQuestion" name="idQuestion" value="<?php echo $question;?>" style="display:none"/>
- <input type="textbox" id="idUsager" name="idUsager" value="<?php echo $user;?>" style="display:none"/>
- <input type="textbox" id="bonne" name="bonne" value="0" style="display:none"/>
- <div id="details">
- <div id="question">
- <iframe id="frameSQL" name="frameSQL" frameborder="0" scrolling="no" style="display:none"></iframe>
- <h4>
- <div style="margin-left:51px">
- <textarea name="msgpost" id="msgpost" cols="50" rows="10" style="display:none;">
- </textarea>
- <input type="button" id="Ajouter" value="Ajouter" class="btn" onmouseover="this.className='btn btnhov'" onmouseout="this.className='btn'"/>
- </div>
- </div>
- </form>
- <script>
- document.getElementById("details").style.height = document.getElementById("details").offsetHeight+500;
- window.parent.document.getElementById("frame").style.height = document.getElementById("details").style.height;
- document.getElementById("Ajouter").style.display="inline";
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement