Ejemplo n.º 1
0
		$row = '';
		$vehRegTemp = formatvehicles($lastvar['title'], $lastvar['cntallowveh'], $vehReg);

		if($cntUniqID == 1) {
			$row = $lastvar['row'];
		}else {
			$row = $lastrow;
		}

		array_push($alarmRowInfo, array(
				'data' => $row,
				'vreg'	=> $vehRegTemp
			));

		$vehReg = formatRegistration($fontVeh, $alertrow);
		$cntUniqID = 1; //reset bidejke eden veke e pronajden
	}

}  // else ako ima uniqid

	$lastvar = array('title' => $Title, 'fontveh' => $fontVeh, 'cntallowveh' => $cntAllowVeh, 'row' => $alertrow);
	$lastuniqid = $alertrow["uniqid"];

} // glaven if za vid <> ""
} // end while fetch

if($lastuniqid != "") {	// proverka poradi toa sto moze da ne postoi nitu eden red so uniqid

	$vehRegTemp = formatvehicles($lastvar['title'], $lastvar['cntallowveh'], $vehReg);
	array_push($alarmRowInfo, array(
Ejemplo n.º 2
0
		));

		$vehReg="";

	} else {	// redovi kade uniqid <> ""

		if ($alertrow["uniqid"] == $ALL[$inx+1]["uniqid"]){		// redovi so isti uniqid
			echo "uniqid : " . $alertrow["vid"]. " " . $alertrow["description"] . "<br>";

			$vehReg .= formatRegistration($fontVeh, $alertrow);

			if($RowsNumber == $inx+2){		// vazi samo za posledniot red

				$last = true;
				$vehFlag = true;
				$vehRegLast .= $vehReg . formatRegistration($fontVeh, $alertrow);
				if($alertrow["typeofgroup"] == 2) $TitleLast = dlookup("select name from organisation where id=" . $alertrow["settings"]);
				if($alertrow["typeofgroup"] == 3) $TitleLast = dic_("Tracking.AllVehCompany");

			}
		}

		if(($alertrow["uniqid"] != $ALL[$inx+1]["uniqid"]) or $last) {	// ako uniqid na naredniot red ne e ist so prethodniot
			echo "uniqid : " . $alertrow["vid"]. " " . $alertrow["description"] . "<br>";
			echo "kraj na ist uniqid <br>";

			if ($alertrow["typeofgroup"] == 2) {
				$Title = dlookup("select name from organisation where id=" . $alertrow["settings"]);

				if ($roleID == "2") {
					$cntAllowVeh = dlookup("select count(*) from vehicles where clientID=" . $clientID . " and organisationid = " . $alertrow["settings"] . " and active='1'") ;