CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 FileFolder Dinamyc

Print topic Send  topic

Author Message
imroza

Posts: 21
Posted: 07/25/2008, 10:02 AM

I Have found many discussion about problem in object. I found this solution

Step 1. to change FileFolder on Insert/Update. Insert this code in BeforeProcessFile ( For Example $form->id->Value is folder name that i want create; $form->perc->FileFolder is FileUpload Control)
--------------------------------------------------------

global $form;

//create folder if not exist
$directoryname=$form->id->Value;

if(!is_dir("../dir/".$directoryname."/")) {
mkdir("../dir/".$directoryname."/");
}

//Change FileFolder
$form->perc->FileFolder = "../dir/".$directoryname."/" ;




Step 2. to change FileFolder where Form find file
--------------------------------------------------------
in FileFolder Property of "perc" insert:

../dir/".trocar('idprot')."

where "trocar('$prot)" is a function that generate folder name


Hope Useful

Rob ;-);-);-);-)
View profile  Send private message
lachof

Posts: 14
Posted: 10/29/2008, 4:29 PM

I need to do something similar but the folder changes according to a URL variable, any suggestions?

thnx in advance!

lachof
View profile  Send private message
Gena

Posts: 591
Posted: 10/29/2008, 4:41 PM

get URL parameter and do what you want...

$param = CCGetParam("paramname","");

....
_________________
Gena
View profile  Send private message
kirchaj

Posts: 215
Posted: 10/30/2008, 5:46 AM

I do something similar with a session variable in the beforeprocessfile event

$NewRecord1->FileUpload1->FileFolder = "/var/www/html/portfolio/uploads/" . CCGetUserLogin() . "/";


Hope this helps.
TK
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.