コード例 #1
0
ファイル: pcltar.lib.php プロジェクト: chegestar/catroxs
 function PclTarDelete($p_tarname, $p_filelist, $p_mode = "")
 {
     TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='{$p_tarname}', list='{$p_filelist}', mode='{$p_mode}'");
     $v_result = 1;
     // ----- Extract the tar format from the extension
     if ($p_mode == "" || $p_mode != "tar" && $p_mode != "tgz") {
         if (($p_mode = PclTarHandleExtension($p_tarname)) == "") {
             // ----- Return
             TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
             return 0;
         }
     }
     // ----- Look if the $p_filelist is really an array
     if (is_array($p_filelist)) {
         // ----- Call the extracting fct
         if (($v_result = PclTarHandleDelete($p_tarname, $p_filelist, $p_list, $p_mode)) != 1) {
             TrFctEnd(__FILE__, __LINE__, 0, PclErrorString());
             return 0;
         }
     } else {
         if (is_string($p_filelist)) {
             // ----- Create a list with the elements from the string
             $v_list = explode(" ", $p_filelist);
             // ----- Call the extracting fct
             if (($v_result = PclTarHandleDelete($p_tarname, $v_list, $p_list, $p_mode)) != 1) {
                 TrFctEnd(__FILE__, __LINE__, 0, PclErrorString());
                 return 0;
             }
         } else {
             // ----- Error log
             PclErrorLog(-3, "Invalid variable type p_filelist");
             // ----- Return
             TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
             return 0;
         }
     }
     // ----- Return
     TrFctEnd(__FILE__, __LINE__, $p_list);
     return $p_list;
 }
コード例 #2
0
ファイル: pcltar.lib.php プロジェクト: janus57/PHPBoost_v3c
 function PclTarDelete($p_tarname, $p_filelist, $p_mode = "")
 {
     TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='{$p_tarname}', list='{$p_filelist}', mode='{$p_mode}'");
     $v_result = 1;
     if ($p_mode == "" || $p_mode != "tar" && $p_mode != "tgz") {
         if (($p_mode = PclTarHandleExtension($p_tarname)) == "") {
             TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
             return 0;
         }
     }
     if (is_array($p_filelist)) {
         if (($v_result = PclTarHandleDelete($p_tarname, $p_filelist, $p_list, $p_mode)) != 1) {
             TrFctEnd(__FILE__, __LINE__, 0, PclErrorString());
             return 0;
         }
     } else {
         if (is_string($p_filelist)) {
             $v_list = explode(" ", $p_filelist);
             if (($v_result = PclTarHandleDelete($p_tarname, $v_list, $p_list, $p_mode)) != 1) {
                 TrFctEnd(__FILE__, __LINE__, 0, PclErrorString());
                 return 0;
             }
         } else {
             PclErrorLog(-3, "Invalid variable type p_filelist");
             TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString());
             return 0;
         }
     }
     TrFctEnd(__FILE__, __LINE__, $p_list);
     return $p_list;
 }