asusg_gantt_old_21.01.2020.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653
  1. <?php
  2. defined('YII_DEBUG') or define('YII_DEBUG', true);
  3. defined('YII_ENV') or define('YII_ENV', 'dev');
  4. require __DIR__ . '/api/vendor/autoload.php';
  5. require __DIR__ . '/api/vendor/yiisoft/yii2/Yii.php';
  6. $config = require __DIR__ . '/api/config/web.php';
  7. (new yii\web\Application($config));
  8. require_once "doctrine/bootstrap.php";
  9. include 'CheckPoint.php';
  10. include 'CheckPointType.php';
  11. use CheckPoints\CheckPoint;
  12. use CheckPointTypes\CheckPointType;
  13. header("Expires: 0");
  14. header("Content-Type: text/html; charset=utf-8");
  15. session_start();
  16. require_once 'PHPExcel-1.8.2/Classes/PHPExcel.php';
  17. $url = explode('?',$_SERVER["REQUEST_URI"])[0];
  18. if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > 6000)) {
  19. // last request was more than 30 minutes ago
  20. session_unset(); // unset $_SESSION variable for the run-time
  21. session_destroy(); // destroy session data in storage
  22. }
  23. $_SESSION['LAST_ACTIVITY'] = time(); // update last activity time stamp
  24. $add = 'Login Area';
  25. foreach (array_keys($_REQUEST) as $var) {
  26. ${$var} = $_REQUEST[$var];
  27. //if ($name == "Admin12") {
  28. // echo "<b>$var:</b> ${$var} <br>";
  29. //}
  30. }
  31. if ($act == "exit")
  32. {
  33. session_unset();
  34. session_destroy();
  35. session_start();
  36. }
  37. if ($_SESSION['cmdlevel'])
  38. $cmdlevel = $_SESSION['cmdlevel'];
  39. if ($_SESSION['hostid'])
  40. $agent_id = $_SESSION['hostid'];
  41. if ($_SESSION['add'])
  42. $add = $_SESSION['add'];
  43. if ($_SESSION['id'])
  44. $id = $_SESSION['id'];
  45. if ($_SESSION['login'])
  46. $login = $_SESSION['login'];
  47. if ($_SESSION['name'])
  48. $name = $_SESSION['name'];
  49. foreach (array_keys($_SESSION) as $var) {
  50. ${$var} = $_SESSION[$var];
  51. //if ($name == "Admin12") {
  52. //echo "from session: <b>$var:</b> ${$var} <br>";
  53. //}
  54. }
  55. include 'functions.php';
  56. include 'auth.php';
  57. $logged_me_in_successfully234 = 0;
  58. $incl = '';
  59. if (!$_SESSION['pass'] && !$_SESSION['login'])
  60. {
  61. $table = 'accounts';
  62. $result=mysqli_query($link, "SELECT id, login, name, cmdlevel FROM $table WHERE login='".$login."' AND password='".md5($pass)."'");
  63. $res1 = mysqli_fetch_array($result);
  64. $cmdlevel = $res1['cmdlevel'];
  65. $name = $res1['name'];
  66. $id = $res1['id'];
  67. if ($cmdlevel == '10')
  68. {
  69. $add = "Head Administrator";
  70. }
  71. else if ($cmdlevel == '1')
  72. {
  73. $add = "Company Administrator";
  74. }
  75. else if ($cmdlevel == '2')
  76. {
  77. $add = "Company Operator";
  78. }
  79. if (mysqli_num_rows($result))
  80. {
  81. $_SESSION['pass']=$pass;
  82. $_SESSION['login']=$login;
  83. $_SESSION['name']=$name;
  84. $_SESSION['add']=$add;
  85. $_SESSION['cmdlevel']=$cmdlevel;
  86. $_SESSION['id']=$id;
  87. $logged_me_in_successfully234 = 1;
  88. }
  89. }
  90. else
  91. $logged_me_in_successfully234 = 1;
  92. $query = mysqli_query($link, "update accounts set last_seen_web =NOW() where id=".$id);
  93. $getincl = GetInclude($act, intval($cmdlevel));
  94. $incl = $getincl[0];
  95. $accnum = $getincl[1];
  96. $project_id = \Yii::$app->request->get('project_id');
  97. $projEntity = \app\models\entity\ProjectsLocotech::findOne(['id' => $project_id]);
  98. //$taskEntity = \app\models\entity\Tasks::find()->where(['input_id' => $project_id])->orderBy(['parent_id' => SORT_ASC,'priority'=> SORT_ASC,'type'=> SORT_ASC,'text'=> SORT_ASC])->all();
  99. $taskEntity = \app\models\entity\Tasks::find()->where(['input_id' => $project_id])->orderBy(['parent_id' => SORT_ASC,'priority'=> SORT_ASC])->all();
  100. $arrayTest = explode(',',$projEntity->tasks);
  101. $priorityarray = [];
  102. $count = 1;
  103. foreach ( $arrayTest as $m ) {
  104. $priorityarray[$count * 1000] = $m;
  105. $count++;
  106. }
  107. $priorityarray = array_flip($priorityarray);
  108. //var_dump($priorityarray);
  109. $data = '{
  110. "data": [';
  111. $currentTime = strtotime(date("Y-m-d H:i:s"));
  112. $start_date = $currentTime;
  113. $tempArrayForTasks = [];
  114. $tempArrayDuringForTasks = [];
  115. $parent_id = '';
  116. $tempArrayForStartTime = [];
  117. $start_date_str = date ( "d-m-Y H:i",$currentTime );
  118. $tempArrayCountDuringForTasks = [];
  119. $tempArrayDuringForTasksPlus = [];
  120. $progress = 0;
  121. $counter = 0;
  122. foreach ( $taskEntity as $task ) {
  123. $duration = $task->tasktypes->time_to_complete_minutes;
  124. $tempArrayDuringForTasks[$task->parent_id][] = $duration;
  125. }
  126. foreach( $tempArrayDuringForTasks as $key => &$a) {
  127. $tempArrayDuringForTasks[$key] = array_sum($a)*60;
  128. }
  129. $e = 0;
  130. foreach ( $taskEntity as $task ) {
  131. $text = \app\models\HelperModel::stripWhitespaces($task->text);
  132. $readonly = 'true';
  133. if ( (null != $task->created) and (null == $task->accepted_time) and (null == $task->finished_time) ) {
  134. $readonly = 'false';
  135. }
  136. if ( 0 == $task->parent_id) {//echo "<br>";
  137. preg_match('/#(.*)#/', $text, $matches);
  138. $id_job = $matches[1];
  139. if ( null == $tempArrayDuringForTasksPlus[$id_job]) {
  140. $tempArrayForStartTime[$task->id] = 0;
  141. } else {
  142. $tempArrayForStartTime[$task->id] += $tempArrayDuringForTasksPlus[$id_job]/60;
  143. }
  144. if ( null != $task->accepted_time && null == $task->finished_time){
  145. $start_date_str = date ( "d-m-Y H:i",strtotime($task->accepted_time) );
  146. }
  147. } else {
  148. $start_date = $currentTime + ($tempArrayForStartTime[$task->parent_id] * 60 );
  149. $start_date_str = date ( "d-m-Y H:i",$start_date );
  150. if ( null != $task->finished_time ){
  151. $start_date_str = date ( "d-m-Y H:i",strtotime($task->accepted_time) );
  152. }
  153. if ( null != $task->accepted_time && null == $task->finished_time){
  154. $start_date_str = date ( "d-m-Y H:i",strtotime($task->accepted_time) );
  155. }
  156. //var_dump($tempArrayForStartTime[$task->parent_id]);
  157. $tempArrayForStartTime[$task->parent_id] += $task->tasktypes->time_to_complete_minutes;
  158. }
  159. if ( 0 != $task->parent_id) {
  160. $parent_id = ', "parent": "'.$task->parent_id.'"';
  161. }
  162. switch ($task->status) {
  163. case 5:
  164. $progress = 1.0;
  165. break;
  166. case 1:
  167. $progress = 0.0;
  168. break;
  169. default:
  170. $progress = 0.5;
  171. break;
  172. }
  173. $start_finish_time = '';
  174. $duration = $task->tasktypes->time_to_complete_minutes;
  175. if ( null != $task->accepted_time ){
  176. $start_finish_time = '/' . date ('H:i' , strtotime($task->accepted_time));
  177. }
  178. if ( 'true' === $readonly ) {
  179. $start_finish_time = '/' . date ('H:i' , strtotime($task->accepted_time)). ' - ' . date ('H:i' , strtotime($task->finished_time));
  180. }
  181. // ЕСЛИ ККОМАНДА ЗАВЕРШЕНА НАЧАЛО
  182. if ( null != $task->finished_time ){
  183. $duration_sec = strtotime($task->finished_time) - strtotime($task->accepted_time);
  184. $duration = floor($duration_sec/60);
  185. }
  186. // ЕСЛИ ККОМАНДА ЗАВЕРШЕНА КОНЕЦ
  187. // ЕСЛИ ККОМАНДА ВЫПОЛНЯЕТСЯ НО НЕ ЗАВЕРШЕНА НАЧАЛО
  188. if ( null != $task->accepted_time && null == $task->finished_time){
  189. $duration_sec = $currentTime - strtotime($task->accepted_time);
  190. $duration = floor($duration_sec/60);
  191. }
  192. // ЕСЛИ ККОМАНДА ВЫПОЛНЯЕТСЯ НО НЕ ЗАВЕРШЕНА КОНЕЦ
  193. if ( 0 == $task->parent_id) {
  194. preg_match('/#(.*)#/', $text, $matches);
  195. $id_job = $matches[1];
  196. $query = 'SELECT min(coalesce(accepted_time, NOW())) as time FROM tasks WHERE parent_id = ' . $task->id;
  197. $res = \Yii::$app->db->createCommand($query)->queryOne();
  198. $timeCompare = $start_date_str = date ('d-m-Y H:i' , strtotime($res['time']));
  199. $start_date_str = date ('d-m-Y H:i' ,strtotime($start_date_str)+$tempArrayCountDuringForTasks[$id_job]);
  200. if(strtotime($timeCompare) == (strtotime($start_date_str)+$tempArrayCountDuringForTasks[$id_job])) {
  201. $prior[$id_job] = $priorityarray[$task->id];
  202. //var_dump($prior[$id_job], '$priorityarray['.$task->id.']'); echo "<br>";
  203. } else {//echo $prior[$task->id];
  204. $prior[$id_job] += 100;
  205. //var_dump($prior[$id_job], '$priorityarray['.$task->id.']');
  206. }
  207. //var_dump($task->id);
  208. //var_dump($id_job, $prior[$id_job],$task->id,$priorityarray[$task->id]); echo "<br>";
  209. $priorParent[$task->id] = $prior[$id_job];
  210. $tempArrayCountDuringForTasks[$id_job] += $tempArrayDuringForTasks[$task->id];
  211. $tempArrayDuringForTasksPlus[$id_job] = $tempArrayCountDuringForTasks[$id_job];
  212. // ЕСЛИ ККОМАНДА ЗАВЕРШЕНА НАЧАЛО
  213. $oneTaskEntity = \app\models\entity\Tasks::find()->where(['parent_id' => $task->id])->orderBy(['priority'=> SORT_ASC ])->all();
  214. $Finished = false;
  215. $Accepted = false;
  216. foreach( $oneTaskEntity as $one) {
  217. if ( 1 == $one->priority ){
  218. $Accepted = $one->accepted_time;
  219. }
  220. $Finished = $one->finished_time;
  221. }
  222. if ( null != $Finished and null != $Accepted ){
  223. $duration_sec = strtotime($Finished) - strtotime($Accepted);
  224. $duration = floor($duration_sec/60);
  225. }
  226. if ( null != $Accepted ){
  227. $start_date_str = date ( "d-m-Y H:i",strtotime($Accepted) );
  228. }
  229. // ЕСЛИ ККОМАНДА ЗАВЕРШЕНА КОНЕЦ
  230. } else {
  231. $prior[$id_job] = $priorParent[$task->parent_id] + $task->priority;
  232. }
  233. //var_dump($prior[$id_job], $task->id);
  234. $text = preg_replace('/#(.*)#/', '', $text);
  235. $text = preg_replace('/([0-9]|[0-9][0-9])\/[АБВГ](.*)$/u', '', $text);
  236. if ( 0 != $task->parent_id && 0 != $task->assignees_arr) {
  237. $accountsEntity = \app\models\entity\Accounts::findOne($task->assignees_arr);
  238. $text = $accountsEntity->name;
  239. }
  240. //echo " |name=". $task->id."=>".$prior[$id_job]." |" ;
  241. $tasktypesName = \app\models\HelperModel::stripWhitespaces($task->tasktypes->name);
  242. $tasktypesName = addslashes($tasktypesName);
  243. //echo $priorityarray[$task->id].'-';
  244. $prior[$id_job] = sprintf("%08d", $prior[$id_job]);
  245. $tempArrayForTasks[$id_job][] = '{ "id": ' . $task->id . ', "calendar_id": "global", "text": " ' . $tasktypesName . ':' . $text . ''.$start_finish_time.' ", "type": "project", "start_date": "' . $start_date_str . '", "duration": "' . $duration . '","progress": '.$progress.', "open": true, "readonly" : '.$readonly.$parent_id.',"sort": "'.$prior[$id_job].'"}';
  246. $counter++;
  247. //$prior = '';
  248. }
  249. foreach( $tempArrayForTasks as &$items){
  250. $items = implode(',', $items);
  251. }
  252. ksort($tempArrayForTasks);
  253. $data .= implode(',', $tempArrayForTasks);
  254. $data .= '],
  255. "links": []
  256. }';
  257. ?>
  258. <!DOCTYPE html>
  259. <head>
  260. <meta http-equiv="Content-type" content="text/html; charset=utf-8">
  261. <title>Project level calendars</title>
  262. <script src="/gantt_source/codebase/dhtmlxgantt.js?v=6.2.7"></script>
  263. <!-- Basic Page Needs
  264. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  265. <meta charset="utf-8">
  266. <title>ASUSG</title>
  267. <meta name="description" content="">
  268. <meta name="author" content="">
  269. <!-- Mobile Specific Metas
  270. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  271. <meta name="viewport" content="width=device-width, initial-scale=1">
  272. <!-- FONT
  273. –––––––––––––––––––––––––––––––––––––––––––––––––– -->
  274. <link rel="stylesheet" href="/lte/bower_components/bootstrap/dist/css/bootstrap.min.css">
  275. <!-- Font Awesome -->
  276. <link rel="stylesheet" href="/lte/bower_components/font-awesome/css/font-awesome.min.css">
  277. <!-- Ionicons -->
  278. <link rel="stylesheet" href="/lte/bower_components/Ionicons/css/ionicons.min.css">
  279. <!-- Theme style -->
  280. <link rel="stylesheet" href="/lte/dist/css/AdminLTE.min.css">
  281. <!-- AdminLTE Skins. Choose a skin from the css/skins
  282. folder instead of downloading all of them to reduce the load. -->
  283. <link rel="stylesheet" href="/lte/dist/css/skins/_all-skins.min.css">
  284. <!-- Morris chart -->
  285. <link rel="stylesheet" href="/lte/bower_components/morris.js/morris.css">
  286. <!-- jvectormap -->
  287. <link rel="stylesheet" href="/lte/bower_components/jvectormap/jquery-jvectormap.css">
  288. <!-- Date Picker -->
  289. <link rel="stylesheet" href="/lte/bower_components/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
  290. <!-- Daterange picker -->
  291. <link rel="stylesheet" href="/lte/bower_components/bootstrap-daterangepicker/daterangepicker.css">
  292. <!-- bootstrap wysihtml5 - text editor -->
  293. <link rel="stylesheet" href="/lte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
  294. <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,600,700,300italic,400italic,600italic">
  295. <link rel="stylesheet" href="/lte/bower_components/select2/dist/css/select2.min.css">
  296. <link rel="stylesheet" href="/gantt_source/codebase/dhtmlxgantt.css?v=6.2.7">
  297. <style>
  298. html,
  299. body {
  300. height: 100%;
  301. padding: 0px;
  302. margin: 0px;
  303. overflow: hidden;
  304. }
  305. </style>
  306. <style>
  307. .gantt_task_cell.week_end {
  308. background-color: #e8e8e8;
  309. }
  310. .gantt_task_row.gantt_selected .gantt_task_cell.week_end {
  311. background-color: #e0e0dd;
  312. }
  313. </style>
  314. </head>
  315. <body>
  316. <?
  317. $mycompany = getCompanyByAccount($id);
  318. if (!isset($companyID))
  319. {
  320. if ($_SESSION['company'])
  321. $companyID = $_SESSION['company'];
  322. else
  323. {
  324. $companyID = $mycompany[0];
  325. $_SESSION['company'] = $companyID;
  326. }
  327. }
  328. else
  329. {
  330. $_SESSION['company'] = $companyID;
  331. }
  332. $companyname = getCompanyByID($companyID)[1];
  333. if ((int)$_POST['appMykey'] == 123465) {$logged_me_in_successfully234 = 1;}
  334. if ($logged_me_in_successfully234 == 0)
  335. {
  336. echo "<center>";
  337. GetEnterForm();
  338. echo("<font color='red'><b>Access denied. Incorrect login or password</b><font>");
  339. echo "</center>";
  340. return;
  341. }
  342. ?>
  343. <div class="wrapper">
  344. <header class="main-header">
  345. <!-- Logo -->
  346. <a href="/asusg_plan.php" class="logo">
  347. <!-- mini logo for sidebar mini 50x50 pixels -->
  348. <span class="logo-mini"><b>A</b>LT</span>
  349. <!-- logo for regular state and mobile devices -->
  350. <span class="logo-lg"><b>АСУ</b>СГ</span>
  351. </a>
  352. <!-- Header Navbar: style can be found in header.less -->
  353. <nav class="navbar navbar-static-top">
  354. <!-- Sidebar toggle button-->
  355. <a href="#" class="sidebar-toggle" data-toggle="push-menu" role="button">
  356. <span class="sr-only">Toggle navigation</span>
  357. </a>
  358. </nav>
  359. </header>
  360. <div id="gantt_here" style='width:100%; height:90%;'></div>
  361. <div class="box-body">
  362. <div class="row">
  363. <div class="col-xs-2">
  364. <div class="form-group">
  365. <button id="gantt_compl_edit" type="button" class="btn btn-block btn-primary" data_id="<?php echo \Yii::$app->request->get('project_id');?>">Сохранить</button><br>
  366. </div>
  367. </div>
  368. </div>
  369. </div>
  370. </div>
  371. <script>
  372. gantt.config.work_time = false;
  373. gantt.config.scale_unit = "day";
  374. gantt.config.date_scale = "%D, %d";
  375. gantt.config.min_column_width = 15;
  376. gantt.config.duration_unit = "minute";
  377. gantt.config.scale_height = 20 * 3;
  378. gantt.config.row_height = 25;
  379. gantt.config.inherit_calendar = true;
  380. //gantt.config.smart_scales = true;
  381. gantt.config.smart_rendering = false;
  382. gantt.config.order_branch = "marker";
  383. gantt.config.order_branch_free = true;
  384. var weekScaleTemplate = function (date) {
  385. var dateToStr = gantt.date.date_to_str("%d %M");
  386. var weekNum = gantt.date.date_to_str("(week %W)");
  387. var endDate = gantt.date.add(gantt.date.add(date, 1, "week"), -1, "day");
  388. return dateToStr(date) + " - " + dateToStr(endDate) + " " + weekNum(date);
  389. };
  390. gantt.config.subscales = [
  391. //{ unit: "month", step: 1, date: "%F, %Y" },
  392. //{ unit: "week", step: 1, template: weekScaleTemplate },
  393. {unit: "hour", step: 1, date: "%G"},
  394. {unit: "minute", step: 5, date: "%i"}
  395. ];
  396. gantt.addCalendar({
  397. id: "custom",
  398. worktime: {
  399. hours: [8, 17],
  400. days: [1, 1, 1, 1, 1, 1, 1]
  401. }
  402. });
  403. gantt.templates.timeline_cell_class = function (task, date) {
  404. if (!gantt.isWorkTime({ date: date, task: task }))
  405. return "week_end";
  406. return "";
  407. };
  408. gantt.templates.task_text = function (syart, end, task) {
  409. var calendar = gantt.getTaskCalendar(task);
  410. return task.text ;//+ ", <b>" + (calendar.id == "custom" ? "Full week" : "Workweek") + "</b> calendar";
  411. };
  412. gantt.locale.labels.section_calendar = "Calendar";
  413. gantt.config.lightbox.project_sections = gantt.config.lightbox.sections = [
  414. { name: "description", height: 38, map_to: "text", type: "textarea", focus: true },
  415. {
  416. name: "calendar", height: 22, map_to: "calendar_id", type: "select", options: [
  417. { key: "", label: "Default" },
  418. { key: "global", label: "Workweek" },
  419. { key: "custom", label: "Full week" }
  420. ]
  421. },
  422. { name: "time", type: "duration", map_to: "auto" }
  423. ];
  424. function updateTaskTiming(task) {
  425. task.start_date = gantt.getClosestWorkTime({
  426. dir: "future",
  427. date: task.start_date,
  428. unit: gantt.config.duration_unit,
  429. task: task
  430. });
  431. task.end_date = gantt.calculateEndDate(task);
  432. }
  433. var summaryCalendarChanged = false;
  434. gantt.attachEvent("onLightboxSave", function (id, task, is_new) {
  435. summaryCalendarChanged = false;
  436. if (gantt.isSummaryTask(task) && gantt.getTaskCalendar(task).id != gantt.getTaskCalendar(gantt.getTask(id)).id) {
  437. summaryCalendarChanged = id;
  438. }
  439. updateTaskTiming(task);
  440. gantt.eachTask(function (child) {
  441. updateTaskTiming(child);
  442. }, id);
  443. return true;
  444. });
  445. gantt.attachEvent("onAfterTaskMove", function (id, parent, tindex) {
  446. var task = gantt.getTask(id);
  447. updateTaskTiming(task);
  448. return true;
  449. });
  450. gantt.attachEvent("onAfterTaskUpdate", function (id, task) {
  451. if (summaryCalendarChanged == id) {
  452. summaryCalendarChanged = false;
  453. gantt.eachTask(function (child) {
  454. updateTaskTiming(child);
  455. gantt.updateTask(child.id)
  456. }, id)
  457. }
  458. });
  459. var det = <?php echo $data;?>;
  460. gantt.init("gantt_here");
  461. gantt.parse(det);
  462. //gantt.sort("text",true);
  463. gantt.sort("sort",false);
  464. </script>
  465. <script src="/lte/bower_components/jquery/dist/jquery.min.js"></script>
  466. <!-- jQuery UI 1.11.4 -->
  467. <script src="/lte/bower_components/jquery-ui/jquery-ui.min.js"></script>
  468. <!-- Resolve conflict in jQuery UI tooltip with Bootstrap tooltip -->
  469. <script>
  470. $.widget.bridge('uibutton', $.ui.button);
  471. </script>
  472. <!-- Bootstrap 3.3.7 -->
  473. <script src="/lte/bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
  474. <!-- Morris.js charts -->
  475. <script src="/lte/bower_components/raphael/raphael.min.js"></script>
  476. <script src="/lte/bower_components/morris.js/morris.min.js"></script>
  477. <!-- Sparkline -->
  478. <script src="/lte/bower_components/jquery-sparkline/dist/jquery.sparkline.min.js"></script>
  479. <!-- jvectormap -->
  480. <script src="/lte/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
  481. <script src="/lte/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>
  482. <!-- jQuery Knob Chart -->
  483. <script src="/lte/bower_components/jquery-knob/dist/jquery.knob.min.js"></script>
  484. <!-- daterangepicker -->
  485. <script src="/lte/bower_components/moment/min/moment.min.js"></script>
  486. <script src="/lte/bower_components/bootstrap-daterangepicker/daterangepicker.js"></script>
  487. <!-- datepicker -->
  488. <script src="/lte/bower_components/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
  489. <!-- Bootstrap WYSIHTML5 -->
  490. <script src="/lte/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js"></script>
  491. <!-- Slimscroll -->
  492. <script src="/lte/bower_components/jquery-slimscroll/jquery.slimscroll.min.js"></script>
  493. <!-- FastClick -->
  494. <script src="/lte/bower_components/fastclick/lib/fastclick.js"></script>
  495. <!-- AdminLTE App -->
  496. <script src="/lte/dist/js/adminlte.min.js"></script>
  497. <!-- AdminLTE dashboard demo (This is only for demo purposes) -->
  498. <script src="/lte/dist/js/pages/dashboard.js"></script>
  499. <!-- AdminLTE for demo purposes -->
  500. <script src="/lte/dist/js/demo.js"></script>
  501. <script src="/loco.js"></script>
  502. <script src="/mail.js"></script>
  503. <script src="/lte/bower_components/select2/dist/js/select2.full.min.js"></script>
  504. <script>
  505. $( function() {
  506. $( ".sortable" ).sortable();
  507. $( ".sortable" ).disableSelection();
  508. } );
  509. </script>
  510. </body>
  511. <?php
  512. function GetEnterForm()
  513. {
  514. echo "<article>
  515. <form method='post' action='?login'>
  516. <table>
  517. <tr>
  518. <td width=70>
  519. <b>Login</b>
  520. </td>
  521. <td>
  522. &nbsp;
  523. </td>
  524. <td>
  525. <input type='text' name=login value=''><br/>
  526. </td>
  527. </tr>
  528. <tr>
  529. <td>
  530. <b>Password </b>
  531. </td>
  532. <td>
  533. &nbsp;
  534. </td>
  535. <td>
  536. <input type='password' name=pass value=''>
  537. </td>
  538. </tr>
  539. <tr>
  540. <td></td>
  541. <td>&nbsp;</td>
  542. <td>
  543. <input type='submit' value='Enter'>
  544. </td>
  545. </tr>
  546. </table>
  547. </form>
  548. </article>";
  549. }
  550. ?>