⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 search.php

📁 通达OA2007SE源代码 非常好的
💻 PHP
📖 第 1 页 / 共 4 页
字号:
        $liste[$cle] = $val;
      }
    }
    return $liste;
  }
  function txt_vers_html ($chaine)
  {
    $chaine = str_replace ('‘', '\'', $chaine);
    $chaine = str_replace ('œ', 'oe', $chaine);
    $chaine = str_replace ('’', '\'', $chaine);
    $chaine = str_replace ('…', '...', $chaine);
    $chaine = str_replace ('&', '&', $chaine);
    $chaine = str_replace ('<', '&lt;', $chaine);
    $chaine = str_replace ('>', '&gt;', $chaine);
    $chaine = str_replace ('"', '&quot;', $chaine);
    return $chaine;
  }
  function show_hidden_files ($fichier)
  {
    global $showhidden;
    $retour = 1;
    if (((substr ($fichier, 0, 1) == '.') AND ($showhidden == 0)))
    {
      $retour = 0;
    }
    return $retour;
  }
  function listing ($nom_rep)
  {
    global $sens;
    global $ordre;
    global $size_unit;
    $poidstotal = 0;
    $handle = opendir ($nom_rep);
    while ($fichier = readdir ($handle))
    {
      if (((($fichier != '.') AND ($fichier != '..')) AND (show_hidden_files ($fichier) == 1)))
      {
        $poidsfic = filesize ((((''.$nom_rep).'/').$fichier));
        ($poidstotal += $poidsfic);
        if (is_dir ((((''.$nom_rep).'/').$fichier)))
        {
          if (($ordre == 'mod'))
          {
            $liste_rep[$fichier] = filemtime ((((''.$nom_rep).'/').$fichier));
            continue;
          }
          else
          {
            $liste_rep[$fichier] = $fichier;
            continue;
          }
          continue;
        }
        else
        {
          if (($ordre == 'nom'))
          {
            $liste_fic[$fichier] = mimetype ((((''.$nom_rep).'/').$fichier), 'image');
            continue;
          }
          else
          {
            if (($ordre == 'taille'))
            {
              $liste_fic[$fichier] = $poidsfic;
              continue;
            }
            else
            {
              if (($ordre == 'mod'))
              {
                $liste_fic[$fichier] = filemtime ((((''.$nom_rep).'/').$fichier));
                continue;
              }
              else
              {
                if (($ordre == 'type'))
                {
                  $liste_fic[$fichier] = mimetype ((((''.$nom_rep).'/').$fichier), 'type');
                  continue;
                }
                else
                {
                  $liste_fic[$fichier] = mimetype ((((''.$nom_rep).'/').$fichier), 'image');
                  continue;
                }
                continue;
              }
              continue;
            }
            continue;
          }
          continue;
        }
        continue;
      }
    }
    closedir ($handle);
    if (is_array ($liste_fic))
    {
      if (($ordre == 'nom'))
      {
        if (($sens == 0))
        {
          ksort ($liste_fic);
        }
        else
        {
          krsort ($liste_fic);
        }
      }
      else
      {
        if (($ordre == 'mod'))
        {
          if (($sens == 0))
          {
            arsort ($liste_fic);
          }
          else
          {
            asort ($liste_fic);
          }
        }
        else
        {
          if ((($ordre == 'taille') OR ($ordre == 'type')))
          {
            if (($sens == 0))
            {
              asort ($liste_fic);
            }
            else
            {
              arsort ($liste_fic);
            }
          }
          else
          {
            if (($sens == 0))
            {
              ksort ($liste_fic);
            }
            else
            {
              krsort ($liste_fic);
            }
          }
        }
      }
    }
    if (is_array ($liste_rep))
    {
      if (($ordre == 'mod'))
      {
        if (($sens == 0))
        {
          arsort ($liste_rep);
        }
        else
        {
          asort ($liste_rep);
        }
      }
      else
      {
        if (($sens == 0))
        {
          ksort ($liste_rep);
        }
        else
        {
          krsort ($liste_rep);
        }
      }
    }
    $liste = assemble_tableaux ($liste_rep, $liste_fic);
    if ((1073741824 <= $poidstotal))
    {
      $poidstotal = (((round ((($poidstotal / 1073741824) * 100)) / 100).' G').$size_unit);
    }
    else
    {
      if ((1048576 <= $poidstotal))
      {
        $poidstotal = (((round ((($poidstotal / 1048576) * 100)) / 100).' M').$size_unit);
      }
      else
      {
        if ((1024 <= $poidstotal))
        {
          $poidstotal = (((round ((($poidstotal / 1024) * 100)) / 100).' K').$size_unit);
        }
        else
        {
          $poidstotal = (($poidstotal.' ').$size_unit);
        }
      }
    }
    return array ($liste, $poidstotal);
  }
  function contenu_dir ($nom_rep)
  {
    global $font;
    global $id;
    global $sens;
    global $ordre;
    global $rep;
    global $rep1;
    global $poidstotal;
    global $LINE_COUNT;
    global $RESULT_ARRAY;
    global $MANAGE_USER;
    global $DOWN_USER;
    global $LOGIN_USER_ID;
    global $DISK_ID;
    global $DISK_PATH;
    global $ATTACHMENT_NAME;
    global $key;
    global $SEARCH_DOC;
    list ($liste, $poidstotal) = listing ($nom_rep);
    if (is_array ($liste))
    {
      while (true)
      {
        while (list ($fichier, $mime) = each ($liste))
        {
          $nom_rep = str_replace ('//', '/', $nom_rep);
          $str = (($DISK_PATH.'/').$rep);
          $str = str_replace ('//', '/', $str);
          $rep1 = str_replace ($str, '', $nom_rep);
          if (is_dir ((((''.$nom_rep).'/').$fichier)))
          {
            contenu_dir ((((''.$nom_rep).'/').$fichier));
            continue;
          }
          if (((($ATTACHMENT_NAME == '') AND !is_editable ($fichier)) AND !stristr ($fichier, '.doc')))
          {
            continue;
          }
          else
          {
            if (((($key != '') AND stristr ($fichier, '.doc')) AND ($SEARCH_DOC != 'on')))
            {
              continue;
            }
            else
            {
              $lien = '';
              if (($rep != ''))
              {
                ($lien .= ((''.$rep).'/'));
              }
              ($lien .= (($rep1.'/').$fichier));
              $lien1 = $lien;
              $FLAG1 = 0;
              $FLAG2 = 0;
              if (($ATTACHMENT_NAME != ''))
              {
                if (stristr ($fichier, $ATTACHMENT_NAME))
                {
                  $FLAG1 = 1;
                  break;
                }
                continue;
              }
              continue;
            }
            continue;
          }
        }
        break;
      }
    }
  }
  function lister_rep ($nom_rep)
  {
    global $rep;
    global $url_racine;
    global $racine;
    global $mess;
    global $sens;
    global $user;
    global $users;
    global $id;
    global $font;
    global $tablecolor;
    global $ordre;
    global $poidstotal;
    global $DISK_ID;
    global $DISK_NAME;
    if (eregi ('\\.\\.', $rep))
    {
      $rep = '';
    }
    $nom_rep = init ($rep);
    $nom_rep = str_replace ('//', '/', $nom_rep);
    if (($sens == 1))
    {
      $sens = 0;
    }
    else
    {
      $sens = 1;
    }
    if (($sens == 1))
    {
      $sens = 0;
    }
    else
    {
      $sens = 1;
    }
    echo '<script language="javascript">
';
    echo 'function popup(lien) {
';
    echo (((((''.'var fen=window.open(\'netdisk.php?DISK_ID=').$DISK_ID).'&id=').$id).'&action=voir&fichier=\'+lien,\'filemanager\',\'menubar=yes,status=yes,scrollbars=yes,resizable=yes,width=500,height=400\');
');
    echo '}
';
    echo '</script>
';
    echo '        <div class="Big1" align="left">
        <b> 搜索目录:';
    if (($rep == ''))
    {
      echo $DISK_NAME;
    }
    else
    {
      echo (($DISK_NAME.'/').$rep);
    }
    echo '</b>
        </div>
        <table border="0" cellspacing="0" width="95%" class="small" bgcolor="#000000" cellpadding="3" align="center">
';
    echo '<tr class="TableHeader">
';
    if (($rep != ''))
    {
      $lien = ('&rep='.$rep);
    }
    echo (((''.'<td><b>').$mess['1']).'</b></td>
');
    echo (((''.'<td width="11%" align=center><b>').$mess['2']).'</b></td>
');
    echo (((''.'<td width="20%" align=center><b>').$mess['4']).'</b></td>
');
    echo (((''.'<td width="22%" align="center"><b>').$mess['5']).'</b></td>
');
    echo '</tr>
';
    if (($sens == 1))
    {
      $sens = 0;
    }
    else
    {
      $sens = 1;
    }
    contenu_dir ($nom_rep);
  }
  function deldir ($location)
  {
    if (is_dir ($location))
    {
      $all = opendir ($location);
      while ($file = readdir ($all))
      {
        if (((is_dir ((((''.$location).'/').$file)) AND ($file != '..')) AND ($file != '.')))
        {
          deldir ((((''.$location).'/').$file));
          if (file_exists ((((''.$location).'/').$file)))
          {
            rmdir ((((''.$location).'/').$file));
          }
          unset ($file);
          continue;
        }
        else
        {
          if (!is_dir ((((''.$location).'/').$file)))
          {
            if (file_exists ((((''.$location).'/').$file)))
            {
              unlink ((((''.$location).'/').$file));
            }
            unset ($file);
            continue;
          }
          continue;
        }
      }
      closedir ($all);
      rmdir ($location);
    }
    else
    {
      if (file_exists ((''.$location)))
      {
        unlink ((''.$location));
      }
    }
  }
  function enlever_controlm ($fichier)
  {
    $fic = file ($fichier);
    $fp = fopen ($fichier, 'w');
    while (list ($cle, $val) = each ($fic))
    {
      $val = str_replace (chr (10), '', $val);
      $val = str_replace (chr (13), '', $val);
      fputs ($fp, ((''.$val).'
'));
    }
    fclose ($fp);
  }
  function traite_nom_fichier ($nom)
  {
    global $max_caracteres;
    $nom = stripslashes ($nom);
    $nom = str_replace ('\'', '', $nom);
    $nom = str_replace ('"', '', $nom);
    $nom = str_replace ('"', '', $nom);
    $nom = str_replace ('&', '', $nom);
    $nom = str_replace (',', '', $nom);
    $nom = str_replace (';', '', $nom);
    $nom = str_replace ('/', '', $nom);
    $nom = str_replace ('\\', '', $nom);
    $nom = str_replace ('`', '', $nom);
    $nom = str_replace ('<', '', $nom);
    $nom = str_replace ('>', '', $nom);
    $nom = str_replace (':', '', $nom);
    $nom = str_replace ('*', '', $nom);
    $nom = str_replace ('|', '', $nom);
    $nom = str_replace ('@', '', $nom);
    $nom = str_replace ('!', '', $nom);
    $nom = str_replace ('+', '', $nom);
    $nom = str_replace ('^', '', $nom);
    $nom = str_replace ('=', '', $nom);
    $nom = str_replace ((''.'$'), '', $nom);
    $nom = str_replace ('%', '', $nom);
    return $nom;
  }
  include_once 'inc/auth.php';
  include_once 'inc/utility_all.php';
  $FB_STR1 = urldecode ($fichier);
  if ((strstr ($FB_STR1, '../') OR strstr ($FB_STR1, '..\\')))
  {
    exit ();
  }
  $ATTACHMENT_NAME = strtolower ($ATTACHMENT_NAME);
  $rep = $REP;
  $key = chop ($key);
  $query = ((''.'select * from NETDISK where DISK_ID=').$DISK_ID);
  $cursor = exequery ($connection, $query);
  if ($ROW = mysql_fetch_array ($cursor))
  {
    $MANAGE_USER = $ROW['MANAGE_USER'];
    $DISK_PATH = $ROW['DISK_PATH'];
    $DISK_NAME = $ROW['DISK_NAME'];
    $DOWN_USER = $ROW['DOWN_USER'];
  }
  $LINE_COUNT = 0;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -