[ Index ]
 

Code source de PHP NUKE 7.9

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/includes/ -> javascript.php (source)

   1  <?php
   2  
   3  /************************************************************************/

   4  /* PHP-NUKE: Web Portal System                                          */

   5  /* ===========================                                          */

   6  /*                                                                      */

   7  /* Copyright (c) 2005 by Francisco Burzi                                */

   8  /* http://phpnuke.org                                                   */

   9  /*                                                                      */

  10  /* This program is free software. You can redistribute it and/or modify */

  11  /* it under the terms of the GNU General Public License as published by */

  12  /* the Free Software Foundation; either version 2 of the License.       */

  13  /************************************************************************/

  14          
  15  if (stristr(htmlentities($_SERVER['PHP_SELF']), "javascript.php")) {
  16      Header("Location: ../index.php");
  17      die();
  18  }
  19  
  20  ##################################################

  21  # Include for some common javascripts functions  #

  22  ##################################################

  23  
  24  global $module, $name, $admin, $advanced_editor, $lang, $nuke_editor;
  25  
  26  if (file_exists("themes/".$ThemeSel."/style/editor.css")) {
  27      $edtcss = "editor_css : \"themes/".$ThemeSel."/style/editor.css\",";
  28  } else {
  29      $edtcss = "editor_css : \"includes/tiny_mce/themes/default/editor_ui.css\",";
  30  }
  31  
  32  if ($nuke_editor == 1) {
  33      if (is_admin($admin) AND $name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) {
  34          echo "<!-- tinyMCE -->
  35              <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script>
  36              <script language=\"javascript\" type=\"text/javascript\">
  37                 tinyMCE.init({
  38                    mode : \"textareas\",
  39                  theme : \"basic\",
  40                  language : \"$lang\",
  41                  $edtcss
  42                  force_p_newlines: \"false\",
  43                  force_br_newlines: \"true\"
  44                 });
  45              </script>
  46              <!-- /tinyMCE -->";
  47      } elseif ($name != "Private_Messages" AND $name != "Forums" AND !defined('NO_EDITOR')) {
  48          echo "<!-- tinyMCE -->
  49              <script language=\"javascript\" type=\"text/javascript\" src=\"includes/tiny_mce/tiny_mce.js\"></script>
  50              <script language=\"javascript\" type=\"text/javascript\">
  51                 tinyMCE.init({
  52                    mode : \"textareas\",
  53                  theme : \"default\",
  54                  language : \"$lang\",
  55                  $edtcss
  56                  force_p_newlines: \"false\",
  57                  force_br_newlines: \"true\"
  58                 });
  59              </script>
  60              <!-- /tinyMCE -->";
  61      }
  62  }
  63  
  64  if (is_admin($admin)) {
  65      ?>
  66      <script language="javascript"> 
  67      <!-- 
  68      var state = 'none'; 
  69      
  70  	function showhide(layer_ref) { 
  71      
  72      if (state == 'block') { 
  73      state = 'none'; 
  74      } 
  75      else { 
  76      state = 'block'; 
  77      } 
  78      if (document.all) { //IS IE 4 or 5 (or 6 beta) 
  79      eval( "document.all." + layer_ref + ".style.display = state"); 
  80      } 
  81      if (document.layers) { //IS NETSCAPE 4 or below 
  82      document.layers[layer_ref].display = state; 
  83      } 
  84      if (document.getElementById &&!document.all) { 
  85      hza = document.getElementById(layer_ref); 
  86      hza.style.display = state; 
  87      } 
  88      } 
  89      //--> 

  90      </script> 
  91      <?php
  92  }
  93  
  94  if ($userpage == 1) {
  95      echo "<SCRIPT type=\"text/javascript\">\n";
  96      echo "<!--\n";
  97      echo "function showimage() {\n";
  98      echo "if (!document.images)\n";
  99      echo "return\n";
 100      echo "document.images.avatar.src=\n";
 101      echo "'$nukeurl/modules/Forums/images/avatars/gallery/' + document.Register.user_avatar.options[document.Register.user_avatar.selectedIndex].value\n";
 102      echo "}\n";
 103      echo "//-->\n";
 104      echo "</SCRIPT>\n\n";
 105  }
 106  
 107  if (defined('MODULE_FILE') AND file_exists("modules/".$name."/copyright.php")) {
 108      echo "<script type=\"text/javascript\">\n";
 109      echo "<!--\n";
 110      echo "function openwindow(){\n";
 111      echo "    window.open (\"modules/".$name."/copyright.php\",\"Copyright\",\"toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=400,height=200\");\n";
 112      echo "}\n";
 113      echo "//-->\n";
 114      echo "</SCRIPT>\n\n";
 115  }
 116  
 117  ?>


Généré le : Sun Apr 1 11:11:59 2007 par Balluche grâce à PHPXref 0.7