#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/..')); $shortoptions = 'i::u::y'; $longoptions = array('id=', 'uri=', 'yes'); $helptext = <<getMessage()}\n"; exit(1); } if (!have_option('y', 'yes')) { print "About to PERMANENTLY delete notice ".$notice->getID()." by '".$notice->getProfile()->getNickname()."'. Are you sure? [y/N] "; $response = fgets(STDIN); if (strtolower(trim($response)) != 'y') { print "Aborting.\n"; exit(0); } } print "Deleting..."; $notice->delete(); print "DONE.\n";