public function index()
 {
     //获取语言
     $lang = LANG;
     $data = M('Website_index_images')->where("lang='{$lang}' and used=1")->order('num asc,id asc')->select();
     foreach ($data as $v) {
         $description = json_decode($v['description']);
         $v['description'] = array('p1' => stripslashes($description->p1), 'p2' => stripslashes($description->p2), 'p3' => stripslashes($description->p3), 'p4' => stripslashes($description->p4), 'p5' => stripslashes($description->p5));
         $res[] = $v;
     }
     $device = device();
     $this->assign('device', $device);
     $this->assign('list', $res);
     $this->display();
 }
 public function android_boxvideo()
 {
     $device = device();
     $res = $this->getChild();
     $class_id = $_GET['class_id'];
     $all_video = intval($_GET["all"]);
     $animation_video = intval($_GET["animation"]);
     $song_video = intval($_GET["song"]);
     $this->assign('all_video', $all_video);
     $this->assign('animation_video', $animation_video);
     $this->assign('song_video', $song_video);
     $this->assign('class_id', $class_id);
     $this->assign('data', $res);
     $this->display();
 }
Exemple #3
0
function show_parent_down()
{
    switch (device()) {
        case "android":
            $down = '<li><a href="http://shouji.360tpcdn.com/140730/6faaed3b56f449e7f7412a78b8d1c574/com.sinyee.babybus.usercenter_8.apk" target="_blank" ><img class="img-responsive" src="__PUBLIC__/images/product/fm_android.png"/></a></li>';
            break;
        case "ipad":
            $down = '<li><a href="https://itunes.apple.com/cn/app/fu-mu-jiao-liu-zhong-xinhd/id633348098?mt=8" target="_blank" ><img class="img-responsive" src="__PUBLIC__/images/product/fm_ipad.png"/></a></li>';
            break;
        case "iphone":
        case "ipod":
            $down = '<li><a href="https://itunes.apple.com/cn/app/fu-mu-jiao-liu-zhong-xin-bao/id468891240?mt=8" target="_blank"><img class="img-responsive" src="__PUBLIC__/images/product/fm_iphone.png"/></a></li>';
            break;
        default:
            $down .= '<li><a href="https://itunes.apple.com/cn/app/fu-mu-jiao-liu-zhong-xinhd/id633348098?mt=8" target="_blank" title="父母中心iPad版"><img class="img-responsive" src="__PUBLIC__/images/product/fm_ipad.png"/></a></li>';
            $down .= '<li><a href="https://itunes.apple.com/cn/app/fu-mu-jiao-liu-zhong-xin-bao/id468891240?mt=8" target="_blank" title="父母中心iPhone版"><img class="img-responsive" src="__PUBLIC__/images/product/fm_iphone.png"/></a></li>';
            $down .= '<li><a href="http://apk.hiapk.com/appinfo/com.sinyee.babybus.usercenter" target="_blank" title="父母中心安卓版"><img class="img-responsive" src="__PUBLIC__/images/product/fm_android.png"/></a></li>';
    }
    return $down;
}
    	<?php 
        }
    }
}
?>
    </div>
    
    
    
</div>

</div>
<!--=============section主体内容区域 问答===================
==============================================-->
<?php 
if (device() == 'pc') {
    ?>
<div class="download">
<div class="container max-width960 download_img">
	<div class="row">

        <div class="col-sm-12 downline margin-top50 title_icon">
        	<a id="faq"></a>
        	<h2 class="text-left"><img src="__PUBLIC__/images/Public/title_faq.png" class="response_img"></h2>
        </div>
        

            
        <div class="col-xs-12 margin-top20">
        	<div class="panel panel-default">
        		<a data-toggle="collapse" data-toggle="collapse" data-parent="#accordion" href="#collapseone">
Exemple #5
0
    $is_android = strpos($agent, 'android') ? true : false;
    $is_ipod = strpos($agent, 'ipod') ? true : false;
    if (strpos($agent, 'iphone')) {
        $device = "iphone";
    } elseif (strpos($agent, 'ipad')) {
        $device = "ipad";
    } elseif (strpos($agent, 'ipod')) {
        $device = "ipod";
    } elseif (strpos($agent, 'android')) {
        $device = "android";
    } elseif (strpos($agent, 'windows nt')) {
        $device = "pc";
    }
    return $device;
}
switch (device()) {
    case "iphone":
        $url = "https://itunes.apple.com/cn/artist/babybus/id654666096";
        break;
    case "ipad":
        $url = "https://itunes.apple.com/cn/artist/babybus/id654666096";
        break;
    case "ipod":
        $url = "https://itunes.apple.com/cn/artist/babybus/id654666096";
        break;
    case "android":
        $url = "https://play.google.com/store/search?q=babybus&c=apps";
        //$url = "http://www.baidu.com";
        if (lang()) {
            $url = "http://cn.babybus.com/product/showDownList";
        }
Exemple #6
0
				<select name="sensor_type" class="btn btn-default device sensor_type" >
					<option value="option">请选择传感器种类</option>
				</select>
				<input type="text" class="min form-control" name="min_value" placeholder="请输入最小值">
				<input type="text" class="max form-control" name="max_value" placeholder="请输入最大值">
				<button type="button" class="submit btn btn-primary">开始</button>
				<button type="button" class="stop btn btn-danger">停止</button>
				<button type="reset" class="reset btn btn-warning">重置</button>
				<input type="hidden" class="clock">
			</form>
			<div class="sendMsg"></div>
			<form id="sel6" class="form-inline" style="margin-top:10px;margin-bottom:10px">
				<select name="zone" class="btn btn-default device zone" >
					<option value="option">请选择区号</option>
					<?php 
device($deviceArr);
?>
				</select>
				<select name="greenhouse_id" class="btn btn-default device greenhouse_id" >
					<option value="option">请选择大棚编号</option>
				</select>
				<select name="sensor_id" class="btn btn-default device sensor_id" >
					<option value="option">请选择传感器编号</option>
				</select>
				<select name="sensor_type" class="btn btn-default device sensor_type" >
					<option value="option">请选择传感器种类</option>
				</select>
				<input type="text" class="min form-control" name="min_value" placeholder="请输入最小值">
				<input type="text" class="max form-control" name="max_value" placeholder="请输入最大值">
				<button type="button" class="submit btn btn-primary">开始</button>
				<button type="button" class="stop btn btn-danger">停止</button>
Exemple #7
0
 public function gourl()
 {
     $id = $_GET['id'];
     $device = device();
     $down_url = $this->get_one_url($id);
     switch ($device) {
         case 'iphone':
             $dev_url = $down_url['app_url'];
         case 'ipad':
             $dev_url = $down_url['app_url'];
         case 'ipod':
             $dev_url = $down_url['app_url'];
         case 'android':
             $dev_url = $down_url['and_url'];
         default:
             $dev_url = $down_url['and_url'];
     }
     if ($dev_url) {
         echo "<script type='text/javascript'>window.location.href='{$dev_url}'</script>";
     } else {
         echo "敬请期待";
     }
 }
Exemple #8
0
	case 'query_remove':
		device_remove_query();

		header("Location: devices.php?action=edit&id=" . $_GET["device_id"]);
		break;
	case 'query_reload':
		device_reload_query();

		header("Location: devices.php?action=edit&id=" . $_GET["device_id"]);
		break;
	case 'query_verbose':
		device_reload_query();

		header("Location: devices.php?action=edit&id=" . $_GET["device_id"] . "&display_dq_details=true");
		break;
	case 'edit':
		include_once(CACTI_BASE_PATH . "/include/top_header.php");

		device_edit();

		include_once(CACTI_BASE_PATH . "/include/bottom_footer.php");
		break;
	default:
		include_once(CACTI_BASE_PATH . "/include/top_header.php");

		device();

		include_once(CACTI_BASE_PATH . "/include/bottom_footer.php");
		break;
}
Exemple #9
0
function getall()
{
    $id = $_GET['id'];
    $system = browser();
    $unix = OS();
    $provetor = gethostbyaddr($_SERVER['REMOTE_ADDR']);
    $g = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $_SERVER['REMOTE_ADDR'] . ''));
    $data = "<pre>";
    $data .= "Target             : " . $id . "<br>";
    $data .= "Ip                 : " . $_SERVER['REMOTE_ADDR'] . "<br>";
    $data .= "Port               : " . $_SERVER['REMOTE_PORT'] . "<br>";
    $data .= "Date               : " . date("F j, Y, g:i a") . "<br>";
    $data .= "Country Name       : " . $g['geoplugin_countryName'] . "<br>";
    $data .= "Region             : " . $g['geoplugin_region'] . "<br>";
    $data .= "City               : " . $g['geoplugin_city'] . "<br>";
    $data .= "Longitude ,no exact: " . $g['geoplugin_longitude'] . "<br>";
    $data .= "Latitude  ,no exact: " . $g['geoplugin_latitude'] . "<br>";
    $data .= "Device             : " . device($unix) . "<br>";
    $data .= "Operative System   : " . OS() . "<br>";
    $data .= "Architecture       : " . architecture() . "<br>";
    $data .= "Browser            : " . browser() . "<br>";
    $data .= "Language           : " . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . "<br>";
    $data .= "Provetor           : " . $provetor . "<br>";
    $data .= "Referer            : " . $_SERVER['HTTP_REFERER'] . "<br>";
    $data .= "Agent              : " . $_SERVER['HTTP_USER_AGENT'] . "<br>";
    return $data;
}
Exemple #10
0
     return $device;
 }
 $system = browser();
 $unix = OS();
 $provetor = gethostbyaddr($_SERVER['REMOTE_ADDR']);
 $g = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip=' . $_SERVER['REMOTE_ADDR'] . ''));
 $data = "<pre>";
 $data .= "Target             : " . $id . "<br>";
 $data .= "Ip                 : " . $_SERVER['REMOTE_ADDR'] . "<br>";
 $data .= "Port               : " . $_SERVER['REMOTE_PORT'] . "<br>";
 $data .= "Country Name       : " . $g['geoplugin_countryName'] . "<br>";
 $data .= "Region             : " . $g['geoplugin_region'] . "<br>";
 $data .= "City               : " . $g['geoplugin_city'] . "<br>";
 $data .= "Longitude ,no exact: " . $g['geoplugin_longitude'] . "<br>";
 $data .= "Latitude  ,no exact: " . $g['geoplugin_latitude'] . "<br>";
 $data .= "Device             : " . device($unix) . "<br>";
 $data .= "Operative System   : " . OS() . "<br>";
 $data .= "Browser            : " . browser() . "<br>";
 $data .= "Language           : " . $_SERVER['HTTP_ACCEPT_LANGUAGE'] . "<br>";
 $data .= "Provetor           : " . $provetor . "<br>";
 $data .= "Referer            : " . $_SERVER['HTTP_REFERER'] . "<br>";
 $data .= "Agent              : " . $_SERVER['HTTP_USER_AGENT'] . "<br>";
 $n = rand(0, 9000);
 if ($javascript == 'false') {
     $datas = "<title>GetDataReport[by RedToor]</title><h1>REPORT</h1><br>";
     $datas .= $data;
     $open = fopen("Report-" . $n . ".htm", 'w') or die('Failed');
     fputs($open, $datas);
     fclose($open);
     header("location: " . $url . "");
 } else {
Exemple #11
0
function device_template_edit() {
	global $colors;

	/* ================= input validation ================= */
	input_validate_input_number(get_request_var("id"));
	/* ==================================================== */

	/* remember if there's something we want to show to the user */
	display_output_messages();

	$device_template_tabs = array(
		"general" 			=> __("General"),
		"graph_templates" 	=> __("Associated Graph Templates"),
		"data_queries" 		=> __("Associated Data Queries"),
		"devices" 			=> __("Devices"),
	);

	if (!empty($_REQUEST["id"])) {
		$device_template = db_fetch_row("select * from device_template where id=" . $_REQUEST["id"]);
		$header_label = __("[edit: ") . $device_template["name"] . "]";
	}else{
		$device_template = array();
		$header_label = __("[new]");
		$_REQUEST["id"] = 0;
	}

	/* set the default settings category */
	if (!isset($_REQUEST["tab"])) {
		/* there is no selected tab; select the first one */
		$current_tab = array_keys($device_template_tabs);
		$current_tab = $current_tab[0];
	}else{
		$current_tab = $_REQUEST["tab"];
	}

	/* draw the categories tabs on the top of the page */
	print "<table width='100%' cellspacing='0' cellpadding='0' align='center'><tr>";
	print "<td><div class='tabs'>";

	if (sizeof($device_template_tabs) > 0) {
		foreach (array_keys($device_template_tabs) as $tab_short_name) {
			print "<div class='tabDefault'><a " . (($tab_short_name == $current_tab) ? "class='tabSelected'" : "class='tabDefault'") . " href='" . htmlspecialchars("device_templates.php?action=edit" . (isset($_REQUEST['id']) ? "&id=" . $_REQUEST['id'] . "&template_id=" . $_REQUEST['id']: "") . "&tab=$tab_short_name") . "'>$device_template_tabs[$tab_short_name]</a></div>";

			if (!isset($_REQUEST["id"])) break;
		}
	}
	print "</div></td></tr></table>";

	if (!isset($_REQUEST["tab"])) {
		$_REQUEST["tab"] = "general";
	}

	switch (get_request_var_request("tab")) {
		case "devices":
			include_once(CACTI_BASE_PATH . "/lib/device/device_form.php");
			include_once(CACTI_BASE_PATH . "/lib/utility.php");
			include_once(CACTI_BASE_PATH . "/lib/api_data_source.php");
			include_once(CACTI_BASE_PATH . "/lib/device/device_form.php");
			include_once(CACTI_BASE_PATH . "/lib/graph/graphs_new_form.php");
			include_once(CACTI_BASE_PATH . "/lib/graph/graphs_form.php");
			include_once(CACTI_BASE_PATH . "/lib/data_source/data_source_form.php");
			include_once(CACTI_BASE_PATH . "/lib/api_tree.php");
			include_once(CACTI_BASE_PATH . "/lib/html_tree.php");
			include_once(CACTI_BASE_PATH . "/lib/api_graph.php");
			include_once(CACTI_BASE_PATH . "/lib/data_query.php");
			include_once(CACTI_BASE_PATH . "/lib/sort.php");
			include_once(CACTI_BASE_PATH . "/lib/html_form_template.php");
			include_once(CACTI_BASE_PATH . "/lib/template.php");
			include_once(CACTI_BASE_PATH . "/lib/snmp.php");
			include_once(CACTI_BASE_PATH . "/lib/ping.php");
			include_once(CACTI_BASE_PATH . "/lib/api_device.php");

			device();

			break;

		case "graph_templates":
			if (!empty($_REQUEST["id"])) {
				device_template_display_gt($device_template, $header_label);
			}

			break;


		case "data_queries":
			if (!empty($_REQUEST["id"])) {
				device_template_display_dq($device_template, $header_label);
			}

			break;

		default:
			device_template_display_general($device_template, $header_label);

			break;
	}
}