<?php

if(! defined('OT_ROOT')) {
	exit('Access Denied');
}


class AppXcxBabyDeve{
	public static $appName = '小程序宝宝喂养 - 成长记录';
	public static $appID = 176;

	public static function Jud(){
		return false;
	}

	public static function Show($str, $def=''){
			return $def;
	}

	public static function TypeArr(){
		return array(
			array('type'=>'heightWeight',	'name'=>'身高体重',	'color'=>'#2979ff'),
			array('type'=>'yimiao',			'name'=>'疫苗接种',	'color'=>'#be1919'),
			array('type'=>'shixiang',		'name'=>'意义事项',	'color'=>'#00a68b'),
			array('type'=>'shengbing',		'name'=>'生病记录',	'color'=>'#463d9d'),
			array('type'=>'qita',			'name'=>'其他',		'color'=>'#702829')
			);
	}

	public static function TypeOption($def=''){
		$typeArr = self::TypeArr();

		$retStr = '';
		foreach ($typeArr as $val){
			$retStr .= '<option value="'. $val['type'] .'" '. Is::Selected($val['type'], $def) .'>'. $val['name'] .'</option>';
		}
		return $retStr;
	}

	public static function TypeItem($str, $type='name'){
		$typeArr = self::TypeArr();

		foreach ($typeArr as $val){
			if ($val['type'] == $str){
				if (! in_array($type, array('name','color'))){ $type = 'name'; }
				return $val[$type];
			}
		}
		return '['. $str .','. $type .']';
	}

	public static function TypeJud($str){
		$typeArr = self::TypeArr();

		foreach ($typeArr as $val){
			if ($val['type'] == $str){
				return true;
			}
		}
		return false;
	}

	public static function ListData(){
		$dataArr	= array('res' => false, 'note' => '', 'size' => 0, 'page' => 0, 'pageCount' => 0, 'count' => 0, 'dataCount' => 0, 'data' => array());
		$dataArr['res']		= false;
		$dataArr['note']	= StrInfo::AlertStr('noApp');
		$dataArr['size']	= 0;
		$dataArr['page']	= 0;

		die( json_encode($dataArr) );
	}

	public static function Send(){
		$dataArr = array();
		$dataArr['res']		= false;
		$dataArr['note']	= StrInfo::AlertStr('noApp');
		$dataArr['data']	= null;

		die( json_encode($dataArr) );
	}

	public static function Deal(){
		$dataArr = array();
		$dataArr['res']		= false;
		$dataArr['note']	= StrInfo::AlertStr('noApp');
		$dataArr['data']	= null;

		die( json_encode($dataArr) );
	}

	public static function Del(){
		$dataArr = array();
		$dataArr['res']		= false;
		$dataArr['note']	= StrInfo::AlertStr('noApp');

		die( json_encode($dataArr) );
	}
}
?>