示例#1
0
function createTree(&$smarty, $interface_name)
{
    $req = new GetTree($interface_name);
    $resp = $req->sendAndRecv();
    if (!$resp->isSuccessful()) {
        $resp->setErrorInSmarty($smarty);
        return "";
    }
    $root_node = $resp->getResult();
    return createSubTree($smarty, $root_node, "nothing");
}
 public function getMemberThisMonth($user_id)
 {
     require_once 'getTree.php';
     $Obj_tree = new GetTree();
     $current_date = date("Y-m-d");
     $month_arr = $this->getCurrentMonthStartEndDates($current_date);
     $from_date = $month_arr["month_first_date"] . " 00:00:00";
     $to_date = $month_arr["month_end_date"] . " 23:59:59";
     //$count_ref=$Obj_tree->getMemberMonth($from_date,$to_date);
     $count = $Obj_tree->getDownlineUsersNewThisMonth($user_id, $from_date, $to_date);
     return $count;
 }