I no nothing about PHP. can any one reverse engineer this following in CF?
<?
switch($_REQUEST['op']){
case 'load':
$ff=join('',file(stripslashes($_REQUEST['reportname']).'.'.$_REQUEST['reportid'].'_sql'));
echo $ff;
break;
case 'save':
$querytosave=stripslashes($_REQUEST['querytosave']);
$fd=fopen($_REQUEST['reportname'].'.'.$_REQUEST['reportid'].'_sql','w');
fputs($fd,$querytosave);
fclose($fd);
echo $_REQUEST['reportname']." saved....";
break;
case 'list':
?>
<ul class='treeview' id='treeview_<?echo $_REQUEST['reportid'];?>'>
<li class='list'>Saved sql files
<ul>
<?
if ($dh = opendir('./')) {
while (($filenm = readdir($dh))) {
if(strstr($filenm,$_REQUEST['reportid'].'_sql')){
$parts = explode('.',$filenm);
echo "<li class='item'>".$parts[0]."</li>";
}
}
closedir($dh);
}
?>
</ul>
</li>
</ul>
<?
break;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive:
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332405
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm