$planGraphList = GraphConversion::convertStringPrologPlansToGraphs($plans); $workFlowvalues = array(); $workFlowvalues['timestamp'] = $modified = time::ts_unix_mysql(time::timestamp()); //Create a new workflow item $keyinserted = dbs::irrecord('workflow', $workFlowvalues, false); //Link all plans to this workflow item $newstoptime = time::stoptiming() - $stoptime; $stoptime = time::stoptiming(); performance::message("Stop Prolog Planner parsing"); if ($model['workflowCaching']) { saveCachePlans($planGraphList, $keyinserted, $modelId); } else { savePlans($planGraphList, $keyinserted, true); } $newstoptime = time::stoptiming() - $stoptime; performance::message("Database updating"); echo '<br><Br>'; systemMessages::message("Plan generation complete!"); systemMessages::message("Number of plans:" . sizeof($planGraphList)); } } else { $workFlowvalues = array(); $workFlowvalues['timestamp'] = $modified = time::ts_unix_mysql(time::timestamp()); //Create a new workflow item $keyinserted = dbs::irrecord('workflow', $workFlowvalues, false); $planGraphList = dbs::selrecord('plan', 'workflowcachingstore', "modelId={$modelId}", 0, 3); savePlans($planGraphList, $keyinserted, false); echo '<br><Br>'; systemMessages::message("Plan generation using caching feature complete!"); systemMessages::message("Number of plans:" . sizeof($planGraphList)); }
protected $page = 20; //用于分页 //获取用户的邀请码 protected function get_key() { $this->key = $_GET['key']; } //获取该用户的业绩详情 protected function performance_data() { $remote = new maindb(); $num = $remote->count('p_user', '*', array('invite' => $this->key)); $re = $remote->select('p_user', array('nickname', 'phone', 'auth'), array('invite' => $this->key, 'LIMIT' => 20)); if ($num != 0) { $pages = ceil($num / 20); //分多少页 } else { $pages = 0; } //推送总数和数据 $this->assign('data', array('num' => $num, 'list' => $re, 'pages' => $pages, 'index' => 1, 'key' => $this->key)); } protected function init() { $this->get_key(); $this->performance_data(); $this->display('performance.tpl'); } } $demo = new performance(); $demo->run();