Location: PHPKode > projects > Esvon Personals > esvon-personals/html_editor/jwysiwyg/render.phps
<?php

function HTML_Editor_jwysiwyg_getCode($textarea_name, $textarea_code){

    $s = '<table border=0 cellspacing=0><tr><td>'.$textarea_code.'</td></tr></table>';

    static $js_loaded;
    if(!isset($js_loaded)){
      $js_loaded = 1;

      $base_path = @parse_url(SITE_URL);
      $base_path = $base_path['path'] ? $base_path['path'] : '/';
      $base_path = $base_path;

      $class_id = class_exists('esAdmPage') ? 'esAdmPage' : 'esPage';
      $o_pg = &Factory::singleton($class_id);
      
      $buf = $o_pg->getHeader();
      if(strpos($buf,'jquery.js')===false) $o_pg->setHeader( preg_replace('/<\/head>/i','<script src="'.$base_path.'img/jquery.js"></script></head>', $buf) );

      $s.='<link rel="stylesheet" href="'.$base_path.'html_editor/jwysiwyg/jquery.wysiwyg.css" type="text/css" />
      <script src="'.$base_path.'html_editor/jwysiwyg/jquery.wysiwyg.js"></script>';
    }
    return $s.'<script>$(function(){ $(\'#'.$textarea_name.'\').wysiwyg(); });</script>';

}

?>
Return current item: Esvon Personals