echo $something; die(); // or die ($something);
die('Deleteids: ' . implode(', ',$deleteids) );die("File: " . $value);
//Set the associated template variable ids that need to be deleted
$tvID1 = "26";
global $modx;
$deletedids = $modx->event->params['ids'];
die('deletedids: ' . implode(', ',$deletedids) );
foreach ($deletedids as $key=>$value) {
//Get the filepath of the tv1 (tvID1)
$result = $modx->db->query( 'SELECT id, value FROM `modx_site_tmplvar_contentvalues` WHERE contentid = \'' .$modx->db->escape($value). '\' AND tmplvarid = \'' .$modx->db->escape($tvID1). '\' ORDER BY id ASC' );
while( $row = $modx->db->getRow( $result ) ) {
$output = $row['value'];
die("File: " . $value);
}
check that the file is not open already and then delete it
$fh = fopen($output, 'w') or die("can't open file");
fclose($fh);
echo $output;
die();
unlink($output);
}
return;
check that the file is not open already and then delete it
$deletedids = (array) $modx->event->params['ids'];
while( $row = $modx->db->getRow( $result ) ) {
$output = $row['value'];
die("File: " . $value);
}
//Set the associated template variable ids that need to be deleted
$tvID1 = "26";
global $modx;
$deletedids = (array) $modx->event->params['ids'];
foreach ($deletedids as $key=>$value) {
//Get the filepath of the tv1 (tvID1)
$result = $modx->db->query('SELECT id, value FROM `modx_site_tmplvar_contentvalues` WHERE contentid = \'' .$modx->db->escape($value). '\' AND tmplvarid = \'' .$modx->db->escape($tvID1). '\'');
while($row = $modx->db->getRow($result)) {
$output = $row['value'];
unlink($output);
}
return;