3 require_once 'CRM/Core/Page.php';
5 define('DIR_SPOOL', '/var/www/html/sites/default/files/civicrm/lp/spool');
6 define('DIR_STORE', '/var/www/html/sites/default/files/civicrm/lp/store');
7 define('DIR_TEMP', '/var/www/html/sites/default/files/civicrm/lp/tmp');
9 class CRM_Lp_Page_Namer
extends CRM_Core_Page
{
13 if(array_key_exists('batchname', $_POST)) {
14 $file = '/tmp/'.$_POST['file'];
17 $ph = popen('/usr/local/bin/splitletters.sh '.$file.' '.$_POST['batchname'].' '.$_POST['batchsize'], 'r');
25 header('Location: /civicrm/lp-admin');
31 if(!array_key_exists('file', $_GET)) {
32 header('Location: /civicrm/lp-admin');
39 $this->assign('file',$_GET['file']);
40 // Example: Set the page-title dynamically; alternatively, declare a static title in xml/Menu/*.xml
41 CRM_Utils_System
::setTitle(ts('CiviCRM LPAdmin'));
45 // Example: Assign a variable for use in a template