Tutorials
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOtherTutorials

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
  #1  
Old March 24th, 2006, 12:47 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
spaces in folder names in file manager script

it doesnt seem to like them how would i go about making the script like them ?

Reply With Quote
  #2  
Old March 27th, 2006, 11:53 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Click here for more information.
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,775 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 13 h 47 m 18 sec
Reputation Power: 7
RE: spaces in folder names in file manager script

Wow - that is an open ended question... what tutorial are you refering to first?

Reply With Quote
  #3  
Old March 28th, 2006, 09:30 AM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: spaces in folder names in file manager script

sorry the file manager script. it doesnt seem to support folders with spaces. i would be greate if this was possible. sorry about that


thanks alot

Reply With Quote
  #4  
Old March 28th, 2006, 09:06 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Click here for more information.
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,775 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 13 h 47 m 18 sec
Reputation Power: 7
RE: spaces in folder names in file manager script

script or tutorial? Script - you should get ahold of the author and talk to them... tutorial - don't recall that one on this site. link please so we can see the code.

Reply With Quote
  #5  
Old March 29th, 2006, 01:32 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 25
RE: spaces in folder names in file manager script

i cant seem to find it but it is from here lol

file / backup manager

here the code

php Code:
Original - php Code
  1.  
  2. <HTML>
  3. <HEAD>
  4. <TITLE>File/Backup management screen</TITLE>
  5. <link href='default.css' rel='stylesheet' type='text/css'>
  6. </HEAD>
  7. <BODY>
  8. <?php
  9.  
  10. $file_dir="ross";
  11.  
  12. function place($path)
  13. {
  14.     echo "
  15.                 <span class='title'>File/backup upload</span><img src="spacer.gif" width='100%' height='10'><br>
  16.                 <span class='text'>This is an area where you can upload and manage your files for school.<br>To upload the file click browse for the image in your computer and press upload.</span>
  17.                 <img src="spacer.gif" width='100%' height='7'><br>
  18.         <table border='0' bgcolor='#000000' cellpadding='1' cellspacing='1'>
  19.           <tr>
  20.             <td align='center'>  
  21.                   <table border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
  22.                     <tr>
  23.                 <td align='center' valign='top'><img src="spacer.gif" width='100%' height='15'></td>
  24.               </tr>
  25.               <tr>
  26.                       <td align='center'>
  27.                         <FORM ENCTYPE='multipart/form-data' ACTION='' METHOD='POST'>
  28.                 &nbsp;&nbsp;&nbsp;File: <INPUT TYPE='FILE' NAME='uploadfile' maxlength='255'>&nbsp;&nbsp;&nbsp;
  29.                 <INPUT TYPE='hidden' name='action' VALUE='5'>
  30.                 <INPUT TYPE='hidden' name='path' VALUE='$path'>
  31.               </td>
  32.             </tr>
  33.             <tr>
  34.               <td align='center'>
  35.                 <INPUT TYPE='submit' VALUE='Upload'>
  36.                   </td></FORM>
  37.               </tr>
  38.               <tr>
  39.                 <td align='center' valign='top'><img src="spacer.gif" width='100%' height='15'></td>
  40.               </tr>
  41.           </table>
  42.         </td>
  43.       </tr>
  44.     </table>
  45.    ";
  46. }
  47.  
  48. function place_bottom($path)
  49. {
  50.     echo "
  51.                 <span class='title'>Directory Create</span><img src="spacer.gif" width='100%' height='10'><br>
  52.                 <span class='text'>This is an area where you can create a directory.<br>To create one you type the name in the field and push create.</span>
  53.                 <img src="spacer.gif" width='100%' height='7'><br>
  54.     <table border='0' bgcolor='#000000' cellpadding='1' cellspacing='1'>
  55.           <tr>
  56.             <td align='center'>  
  57.                   <table border='0' cellpadding='0' cellspacing='0' bgcolor='#FFFFFF'>
  58.                     <tr>
  59.                 <td align='center' valign='top'><img src="spacer.gif" width='100%' height='15'></td>
  60.               </tr>
  61.               <tr>
  62.                       <td align='center'>
  63.                         <FORM ACTION='' METHOD='POST'>
  64.                 &nbsp;&nbsp;&nbsp;Create directory: <INPUT TYPE='text' NAME='create_dir'>&nbsp;&nbsp;&nbsp;
  65.                 <INPUT TYPE='hidden' name='action' VALUE='1'>
  66.                 <INPUT TYPE='hidden' name='path' VALUE='$path'>
  67.               </td>
  68.             </tr>
  69.             <tr>
  70.               <td align='center'>
  71.                 <INPUT TYPE='submit' VALUE='Create'>
  72.                   </td></FORM>
  73.               </tr>
  74.               <tr>
  75.                 <td align='center' valign='top'><img src="spacer.gif" width='100%' height='15'></td>
  76.               </tr>
  77.           </table>
  78.         </td>
  79.       </tr>
  80.     </table>
  81.   ";
  82. }      // einde place_bottom()
  83.  
  84. function pics_onsite($path,$DOCUMENT_ROOT,$subdir)
  85. {
  86. global $file_dir;
  87. if (!chdir($path))
  88. {
  89.     echo "Error: directory: $path not found....";
  90. }
  91.  
  92.     $handle=opendir('.');
  93.     $count=0;
  94.     $list= "<table border='0' cellspacing='1' cellpadding='1' bgcolor='#000000'>
  95.               <tr><td valign='top' bgcolor='#FFFFFF'><img src="spacer.gif" width='100%' height='7'><br>";
  96.     $directory= "<table border='0' cellspacing='1' cellpadding='1' bgcolor='#000000'>
  97.               <tr><td valign='top' bgcolor='#FFFFFF' align='center'><img src="spacer.gif" width='100%' height='7'><br>";
  98.     if (ereg_replace("$DOCUMENT_ROOT/$file_dir","",$path)!="")
  99.   {
  100.     $subdir=1;
  101.   }
  102.   else
  103.   {
  104.     $subdir=0;
  105.   }
  106.     while (($file = readdir($handle))!==false)
  107.     {
  108.         if (($file != ".") && ($file != ".."))
  109.         {
  110.             if (is_dir($file))
  111.             {
  112.                 $directory.="|&nbsp;&nbsp;<a class='text' href=?action=3&change_path=$path/$file>$file</a>&nbsp;&nbsp;|";
  113.             }
  114.             if (is_file($file))
  115.             {
  116.                 $file_del=ereg_replace(" ","_",$file);
  117.                 $list.="&nbsp;&nbsp;<a class='text' href=?action=4&file=$file_del&path=$path&subdir=$subdir>[delete]</a>&nbsp;&nbsp;&nbsp;<a class='text' href='" . ereg_replace("$DOCUMENT_ROOT","",$path) ."/$file' target='_blank'>$file</a>&nbsp;&nbsp;<br>";
  118.               $count++;
  119.               if ($count==10){$list.="<img src="spacer.gif" width='100%' height='7'></td><td valign='top' bgcolor='#FFFFFF'><img src="spacer.gif" width='100%' height='7'><br>"; $count=0;}
  120.               $wel=1;
  121.             }
  122.         }
  123.     }
  124.     if (!$wel){$list.="<center><img src="spacer.gif" width='10' height='7'><span class='textbold'>No files in this directory try another</span><img src="spacer.gif" width='10' height='7'></center>";}
  125.     $list.="<img src="spacer.gif" width='100%' height='7'></td></tr></table>";
  126.     if ($subdir){$directory.="<a class='text' href=?action=2>|&nbsp;&nbsp;Back&nbsp;&nbsp;|</a>";}
  127.     $directory.="<img src="spacer.gif" width='100%' height='7'></td></tr></table>";
  128.     echo "
  129.     <center>
  130.     <span class='textbold'>Carefull with the delete function, it wil delete it all (no control).</span>
  131.     <table border=0>
  132.       <tr>";
  133. if (ereg_replace("$DOCUMENT_ROOT/$file_dir","",$path)!="")
  134. {
  135.     echo "<td align='center' valign='top' class='text'>
  136.     You are in directory:  <span class='title'>" . ereg_replace("$DOCUMENT_ROOT/$file_dir","",$path) ."</span>
  137.     &nbsp;&nbsp;<a class='text' href=?action=6&del_path=$path>[delete_DIR]</a></td>";
  138. }
  139. else
  140. {
  141.     echo "<td align='center' valign='top'><img src="spacer.gif" width='100%' height='10'></td>";
  142. }
  143.       echo "
  144.       </tr>
  145.       <tr>
  146.         <td align='center' class='text'>Below you will view list of existing files.</td>
  147.       </tr>
  148.       <tr>
  149.         <td align='center' valign='top'><img src="spacer.gif" width='100%' height='7'></td>
  150.       </tr><tr>
  151.         <td align='center' valign='top'>$directory</td>
  152.       </tr>
  153.       <tr>
  154.         <td align='center' valign='top'><img src="spacer.gif" width='100%' height='7'></td>
  155.       </tr>
  156.       <tr>
  157.         <td align='center' valign='top'>$list</td>
  158.       </tr>
  159.     </table>
  160.     </center>
  161.     ";
  162. }            // einde pics_onsite()
  163.  
  164. function delete($file)
  165. {
  166. global $message,$path;
  167.   if (file_exists($file))
  168.   {
  169.     chmod($file,0777);
  170.     if (is_dir($file))
  171.     {
  172.       $handle = opendir($file);
  173.       while ($filename = readdir($handle))
  174.       {
  175.         if ($filename != "." && $filename != "..")
  176.         {
  177.           delete ($file."/".$filename);
  178.         }
  179.       }
  180.       closedir($handle);
  181.       if (rmdir($file)){$message.="Directory: " . ereg_replace("$path","",$file) .", deleted<br>";}
  182.     }
  183.     else
  184.     {
  185.       if (unlink($file)){$message.="File: " . ereg_replace("$path","",$file) .", deleted<br>";}
  186.     }
  187.   }
  188. }         // einde delete($file)
  189.  
  190. if (!$path)
  191. {
  192. $path="$DOCUMENT_ROOT/$file_dir";
  193. }
  194.  
  195. switch ($action)
  196. {      
  197.       case 1:
  198.         $path="$path/$create_dir";
  199.         mkdir("$path", 0777);
  200.     break;
  201.    
  202.       case 2:
  203.         $subdir=0;
  204.     break;
  205.  
  206.       case 3:
  207.         $path="$change_path";
  208.         $subdir=1;
  209.     break;
  210.       
  211.       case 4:
  212.         $message="<br><br><center><table border='0' cellspacing='1' cellpadding='1' bgcolor='#000000'>
  213.               <tr><td valign='top' bgcolor='#FFFFFF' class='text'><img src="spacer.gif" width='100%' height='7'><br>";
  214.         IF (@is_file("$path/$file"))
  215.                 {
  216.                     @unlink ("$path/$file");
  217.                 }
  218.                 ELSE
  219.                 {
  220.             $file=ereg_replace("_"," ",$file);
  221.             IF (is_file("$path/$file"))
  222.                   {
  223.                       unlink ("$path/$file") or die ("error: $path/$file");
  224.                   }
  225.                 }
  226.         break
  227.            
  228.         case 5:
  229.       
  230.         $doel="$path/$uploadfile_name";
  231.       IF (!copy ($uploadfile,$doel))
  232.       {
  233.         echo "Error copying: ($uploadfile) to: ($doel)";
  234.       }
  235.         break;
  236.        
  237.         case 6:
  238.           $message="<br><br><center><table border='0' cellspacing='1' cellpadding='1' bgcolor='#000000'>
  239.               <tr><td valign='top' bgcolor='#FFFFFF' class='text'><img src="spacer.gif" width='100%' height='7'><br>";
  240.         delete($del_path);
  241.         $message.="<img src="spacer.gif" width='100%' height='7'></td></tr></table></center>";
  242.         break;
  243. }
  244. <center>
  245. <table border='0' bgcolor='#000000' cellpadding='1' cellspacing='1'>
  246.   <tr>
  247.     <td align='center'>"; place($path); echo "<br></td><td align='center'>"; place_bottom($path); echo "<br></td>
  248.   </tr>
  249.   <tr>
  250.     <td align='center' colspan='2'>"; pics_onsite($path,$DOCUMENT_ROOT,$subdir); echo "</td>
  251.   </tr>
  252. </table>
  253. $message
  254. </center>
  255. ";
  256. ?>
  257. </BODY>
  258. </HTML>

Reply With Quote
  #6  
Old March 29th, 2006, 09:36 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Click here for more information.
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,775 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 13 h 47 m 18 sec
Reputation Power: 7
RE: spaces in folder names in file manager script

Again contact the author of the script for help. They are your best bet for getting something done.

Unless you want to try and fix it yourself - then you need to post a thread to the php Coding Forum. Read this to learn the proper way to ask a technical question and get back a the best responses.

If you want someone else to fix the code for you - you need to post to the Barter Zone. When you do it is best if you indicate whether or not this is pro bono or work for hire.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOtherTutorials > spaces in folder names in file manager script


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2010 by Developer Shed. All rights reserved. DS Cluster 7 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek