Added export button to Pipework
This commit is contained in:
@@ -11,8 +11,7 @@ require_once(LIBDIR."/mvcfronk/mfRouter/mfRouter.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseModel.php");
|
||||
require_once(LIBDIR."/mvcfronk/mfBase/mfBaseController.php");
|
||||
|
||||
$me = new User(1);
|
||||
mfValuecache::singleton()->set("me", $me);
|
||||
|
||||
|
||||
$request=array();
|
||||
|
||||
@@ -30,6 +29,14 @@ if(count($argv)) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!$request['user_id']) {
|
||||
die("User id missing");
|
||||
}
|
||||
|
||||
$me = new User($request['user_id']);
|
||||
mfValuecache::singleton()->set("me", $me);
|
||||
|
||||
//var_dump($request);exit;
|
||||
|
||||
|
||||
@@ -45,7 +52,14 @@ if(array_key_exists("uid", $request)) {
|
||||
|
||||
$filter = [];
|
||||
|
||||
$type = false;
|
||||
|
||||
foreach($request as $key => $value) {
|
||||
if($key == "user_id") continue;
|
||||
if($key == "type") {
|
||||
$type = $value;
|
||||
continue;
|
||||
}
|
||||
if(strlen($value)) {
|
||||
$filter[$key] = $value;
|
||||
} else {
|
||||
@@ -59,9 +73,16 @@ $params = ['export_progress' => 1, 'uid' => $uid, 'filter' => $filter];
|
||||
|
||||
//var_dump($uid, $filter);exit;
|
||||
|
||||
$Layout=Layout::singleton();
|
||||
$Layout = Layout::singleton();
|
||||
|
||||
$lc = new LineworkController();
|
||||
$lc->startExport($params);
|
||||
if($type == "Linework") {
|
||||
$app = new LineworkController();
|
||||
$app->startExport($params);
|
||||
}
|
||||
|
||||
if($type == "Pipework") {
|
||||
$app = new PipeworkController();
|
||||
$app->startExport($params);
|
||||
}
|
||||
|
||||
$Layout->display();
|
||||
Reference in New Issue
Block a user