datadoit
|
| Posted: 01/15/2008, 6:26 AM |
|
CCS 3.2.0.4; PHP5; MySQL5
Curious if anyone's done something similar to this...
Is it possible to build an editable grid, but instead of the datasource
being from a database, have it be a folder's contents on disk?
It's easy enough to get folder contents using PHP functions such as
opendir(), readdir(), etc. I'm wondering if it's possible to take those
values and put them into the appropriate CCS variables needed for
working with an editable grid.
Ex:
if ($handle = opendir('/path/to/files')) {
while (false !== ($file = readdir($handle))) {
$Fields["FileName"] = $file;
$Fields["Modified"] = filemtime($file);
}
}
If folder contents information can be placed into the corresponding CCS
variables or arrays, then that would allow for using CCS built-in
conventions for sorting, page navigation, record/row management, etc.
Doable?
|
|
|
 |
wkempees
|
| Posted: 01/16/2008, 4:18 PM |
|
Long time ago, I tried it, but on a normal Grid.
I stopped trying as the need dissapeared.
My conclusion was that all available datasources/-types are databases.
If CCS would at least cater for array as datasource, this c/would work.
No luck on this sofar.
Walter
"datadoit" <datadoit@forum.codecharge> schreef in bericht
news:fmifqp$6r4$1@news.codecharge.com...
> CCS 3.2.0.4; PHP5; MySQL5
>
> Curious if anyone's done something similar to this...
>
> Is it possible to build an editable grid, but instead of the datasource
> being from a database, have it be a folder's contents on disk?
>
> It's easy enough to get folder contents using PHP functions such as
> opendir(), readdir(), etc. I'm wondering if it's possible to take those
> values and put them into the appropriate CCS variables needed for working
> with an editable grid.
>
> Ex:
>
> if ($handle = opendir('/path/to/files')) {
> while (false !== ($file = readdir($handle))) {
> $Fields["FileName"] = $file;
> $Fields["Modified"] = filemtime($file);
> }
> }
>
> If folder contents information can be placed into the corresponding CCS
> variables or arrays, then that would allow for using CCS built-in
> conventions for sorting, page navigation, record/row management, etc.
>
> Doable?
>
|
|
|
 |
|