示例#1
0
 public static function showListTable($carID = null)
 {
     if (is_null($carID)) {
         $carID = MyCar::getDefaultCarID();
     }
     $arList = static::getTsList($carID);
     if ($arList) {
         echo '<div id="tsList"></div><div id="tsPager"></div>';
         $dateHelper = new CoreLib\DateHelper();
         $imgSrcPath = CoreLib\Tools::getSitePath(CoreLib\Loader::getTemplate('icar') . "images/");
         //msDebug($arList);
         $arDatas = array();
         foreach ($arList as $list) {
             $arDatas[] = array('id' => $list['ID'], 'ts' => "ТО-" . $list['TS_NUM'], 'date' => $list['DATE'], 'timestamp' => "=" . $dateHelper->getDateTimestamp($list['DATE']), 'odo' => "=" . $list['ODO'], 'cost' => "=" . $list['COST'], 'executors_name' => $list['EXECUTORS_NAME'], 'point_name' => $list['POINT_NAME'], 'point_latitude' => $list['POINT_LATITUDE'], 'point_longitude' => $list['POINT_LONGITUDE'], 'yandex_map' => "<img src='https://static-maps.yandex.ru/1.x/?l=map&z=12&size=600,450&pt=" . $list['POINT_LONGITUDE'] . "," . $list['POINT_LATITUDE'] . ",pm2blm'>", 'point_type' => $list['POINT_TYPE_NAME'], 'info' => strlen($list['INFO']) > 0 ? "<img src='" . $imgSrcPath . "info.png'>" : "", 'comment' => $list['INFO'], 'edit' => "<a href='edit.php?id=" . $list['ID'] . "'><img src='" . $imgSrcPath . "edit.png'></a>", 'delete' => "<a href='delete.php?id=" . $list['ID'] . "'><img src='" . $imgSrcPath . "delete.png'></a>");
         }
         $webixHelper = new IcarWebixHelper();
         $webixHelper->addFunctionSortByTimestamp();
         $arData = array('grid' => 'tsGrid', 'container' => 'tsList', 'footer' => true, 'tooltip' => true, 'pager' => array('container' => 'tsPager'), 'columns' => array($webixHelper->getColumnArray('DATE', array('footer' => '={text:"Итого:", colspan:3}')), $webixHelper->getColumnArray('TS'), $webixHelper->getColumnArray('ODO'), $webixHelper->getColumnArray('EXECUTORS'), $webixHelper->getColumnArray('COST', array('footer' => '={ content:"summColumn" }')), $webixHelper->getColumnArray('POINT'), $webixHelper->getColumnArray('INFO'), $webixHelper->getColumnArray('EDIT'), $webixHelper->getColumnArray('DELETE')), 'data' => $arDatas);
         return CoreLib\Webix::showDataTable($arData);
     } else {
         echo 'Нет данных о прохождении ТО';
         return false;
     }
 }
示例#2
0
<?php

__include_once(\MSergeev\Core\Lib\Loader::getTemplate("calendar") . "footer.php");
示例#3
0
<?php

__include_once(\MSergeev\Core\Lib\Loader::getTemplate("apihelp") . "footer.php");
示例#4
0
<?php

$usePackage = "finances";
/*
if ($curDir == $usePackage) $curDir = "main";
?><script type="text/javascript">
	$(document).on("ready",function(){
		$(".top_menu_link").each(function(){
			$(this).removeClass("selected");
		});
		$("#<?=$curDir?>").addClass("selected");
	});
</script><?*/
__include_once(\MSergeev\Core\Lib\Loader::getTemplate($usePackage) . "footer.php");
示例#5
0
<?php

use MSergeev\Core\Lib;
$path = Lib\Tools::getSitePath(Lib\Loader::getPublic("icar"));
$imgPath = Lib\Tools::getSitePath(Lib\Loader::getTemplate("icar") . "images/");
$imgWidth = $imgHeight = 50;
Lib\Loc::setModuleMessages('icar');
?>
<table class="top_menu">
	<tr>
		<td>
			<div style="text-align: center;">
				<a href="<?php 
echo $path;
?>
" id="main" class="top_menu_link">
					<img src="<?php 
echo $imgPath;
?>
main.png" width="<?php 
echo $imgWidth;
?>
" height="<?php 
echo $imgHeight;
?>
" border="0" alt="Главная">
					<br><?php 
echo Lib\Loc::getMessage('ms_icar_menu_main');
?>
				</a>
			</div>