Files
EasySoft-ZenTaoPMS/test/model/productplan/reorderchildren.php
T
2022-03-31 09:46:12 +08:00

29 lines
948 B
PHP
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
include dirname(dirname(dirname(__FILE__))) . '/class/productplan.class.php';
/**
title=productplanModel->reorder4Children();
cid=1
pid=1
传入三个子计划id100,102,101,排序第一个 >> 100
第二个 >> 101
第三个,会输出正序排列的数组100101102 >> 102
传入不存在的id时 >> 0
*/
$plan = new productPlan('admin');
$planID = array();
$planID[0] = array(100, 102, 101);
$planID[1] = array(1000, 10000);
r($plan->reorder4Children($planID[0])) && p('100:id') && e('100'); //传入三个子计划id100,102,101,排序第一个
r($plan->reorder4Children($planID[0])) && p('101:id') && e('101'); //第二个
r($plan->reorder4Children($planID[0])) && p('102:id') && e('102'); //第三个,会输出正序排列的数组100,101,102
r($plan->reorder4Children($planID[1])) && p() && e('0'); //传入不存在的id时
?>