Beispiel #1
0
 public static function listContacts()
 {
     global $smarty, $user;
     $contacts = get_contact_list($user["id"]);
     $smarty->assign("contacts", $contacts);
     $smarty->display("contacts.list.tpl.html");
 }
Beispiel #2
0
     $order_analyse['average'] = bcdiv($order_analyse['amount'], $count, 2);
     unset($o);
     $smarty->assign('order_analyse', $order_analyse);
 }
 $service_list = get_user_services($user_id);
 // 获取顾客服务记录
 $addr_list = get_addr_list($user_id);
 // 顾客地址列表
 $contact_list = get_contact_list($user_id);
 // 顾客联系方式列表
 $user_info = get_user_info($user_id);
 // 获取顾客基本资料
 $mem = new Memcache();
 $mem->connect('127.0.0.1', 11211);
 if (!$mem->get("freeze_{$_SESSION['admin_id']}")) {
     $contact_list = get_contact_list($user_id);
     // 顾客联系方式列表
 }
 //$return_list = get_return_list($user_id); // 获取顾客的退货记录
 $user_friends = get_user_friends($user_id);
 //$case = get_before_case();         //既往病例
 //获取家长成员
 if ($user_info['family_id'] != 0) {
     $sql_select = 'SELECT u.user_id,u.user_name,u.mobile_phone,u.home_phone,g.grade_name,g.grade_id,f.family_name,m.input_time,m.real_parent FROM ' . $GLOBALS['ecs']->table('user_family_member') . ' AS m LEFT JOIN ' . $GLOBALS['ecs']->table('users') . ' AS u ON u.user_id=m.user_id LEFT JOIN ' . $GLOBALS['ecs']->table('user_family_grade') . ' AS g ON m.grade_id=g.grade_id LEFT JOIN ' . $GLOBALS['ecs']->table('user_family') . ' AS f ON u.family_id=f.family_id ' . 'WHERE m.family_id=' . $user_info['family_id'] . ' AND m.status=0 AND g.type=0';
     $family_users = $GLOBALS['db']->getAll($sql_select);
     $family = array('family_name' => $family_users[0]['family_name'], 'family_total' => count($family_users));
     $smarty->assign('family', $family);
     for ($i = 0; $i < count($family_users); $i++) {
         //$sql_select = 'SELECT COUNT(*) FROM '.$GLOBALS['ecs']->table('other_examination_test').
         //    " WHERE user_id={$family_users[$i]['user_id']}";
         //$family_users[$i]['healthy_file'] = $GLOBALS['db']->getOne($sql_select);