Location: PHPKode > projects > Webshare > webshare/plugins/editor/index.php
<?php
/************************************************************************/
/*                                WEBSHARE                              */
/************************************************************************/
//
// Copyright (c) 2008 by Virginie Vivancos
// http://www.webshare.fr
//
// This program is free software. You can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License.
//
// =======================================================================
// Fonction : Edite un fichier de type texte
// Nom      : editer.php
// Version  : 0.6.5
// Date     : 30/06/08
// =======================================================================
header ("Content-type: text/html; charset=utf-8");
session_start();
include_once "../../moteur/auth.php";
include_once "../../moteur/fonctions.php";
$l_mysql = new class_mysql();
$l_mysql->connect();
?>
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <script type="text/javascript">
   top.menuEditer();
   
    function maj() {
      top.modifier();
      return false;
    }
 </script>
</head>

<body style='background:#666;border:0px;padding:0;margin:6px;overflow:hidden;font-size:13px' onload='r()' onresize='r()'>
<form name="editForm" id="editForm" onsubmit="maj();return false;">
<textarea name="editContent" id="editContent" style='position:relative;width:100%;height:100%;background:#fff;color:#000;overflow:auto;font-size:13px;font-family:Courier New'><?php

  $chemin= urldecode($_REQUEST["chemin"]);
  $url   = urldecode($_REQUEST["url"]);
  $name  = substr($chemin, strrpos($chemin,"/")+1,strlen($chemin));
  $chemin= blindeChemin($_SESSION["ws"]["cheminActif"].$_SESSION["ws"]["dossierActif"]."/".$name);
  echo str_replace("textarea","wstextarea",convertUTF8(file_get_contents($chemin)));
  $tabLog= array("18","1",$_SESSION["ws"]["dia"]["startEdit"]." ".$name,$_SESSION["ws"]["nomUser"],$_SESSION["ws"]["dossierActif"],$name,"");
  $l_mysql->logAction($tabLog);
  $l_mysql->disconnect();

?></textarea>
<input type="hidden" name="nomElement" id="nomElement" value="<?php echo $url; ?>">
<input type="hidden" name="editMode" id="editMode" value="1">
 <script type="text/javascript">
   function r() { <?php if ($navig=="IE") echo 'document.getElementById("editContent").style.height= eval(document.body.clientHeight-50)+"px";'; ?> }
 </script>
</form></body></html>
Return current item: Webshare