Дипломная работа: Автоматизация приема и обработки заявок отделом техподдержки Богородском филиале АО "НПО "Прибор"

Внимание! Если размещение файла нарушает Ваши авторские права, то обязательно сообщите нам
112
181. if (!in_array($value, array(".", ".."))){
182. if(is_file($dir.'/'.$value)){$i = $i + 1;}
183. if(is_dir($dir.'/'.$value)){$i += count_files($dir.'/'.$value);}
184. }
185. if ($i > 1000) {
186. $i = 'более 1000';
187. break;
188. }
189. }
190. return $i;
191. }
192. while(readdir($f_path)) {
193. if (is_dir($full_path) && readdir($f_path) != '.' && readdir($f_path) != '..') {
194. $quantity = new FilesystemIterator($full_path,
FilesystemIterator::SKIP_DOTS);
195. if (!iterator_count($quantity)) {
196. $end = "ей";
197. }
198. if (iterator_count($quantity) <= 20) {
199. if (iterator_count($quantity) == 11) {
200. $end = "ей";
201. }
202. else {
203. if (iterator_count($quantity) > 1 && iterator_count($quantity) < 21) {
204. $end = "ей";
205. }
206. else {
207. if (iterator_count($quantity) == 1) {
208. $end = "я";
209. }
210. }
211. }
212. }
213. else {
214. if (substr(iterator_count($quantity), -2) <= 20) {
215. if (substr(iterator_count($quantity), -2) == 11) {
216. $end = "ей";
217. }
218. else {
219. if (substr(iterator_count($quantity), -1) > 1 &&
substr(iterator_count($quantity), -1) < 21) {
220. $end = "ей";
221. }
222. else {
223. if (substr(iterator_count($quantity), -1) == 1) {
224. $end = "я";
225. }
226. }
113
227. }
228. }
229. else {
230. $cnt = substr(iterator_count($quantity), -1);
231. if ($cnt == 1) {
232. $end = "я";
233. }
234. else {
235. $end = "ей";
236. }
237. }
238. }
239.
240. }
241. if (round(microtime(true) - $start, 0) > 25) {
242. break;
243. }
244. }
245. $units = explode(' ', 'B KB MB GB TB PB');
246. $disk_used = foldersize($full_path);
247. echo '<h4 class="color_a"><hr><img src="images/folder1.svg" alt="Папка">
'.$full_path.'<hr>
248. <img src="images/size.svg" alt="Размер"> Размер: ' .
format_size($disk_used) . '<hr>
249. <img src="images/task.svg" alt="Заявка"> Заявок: '.count_files($full_path).'
шт.<hr>
250. <img src="images/user.svg" alt="Пользователь"> От:
'.iterator_count($quantity).' пользовател'.$end.'<hr></h4>
251. <h4 class="color_b" onclick="window.history.go(-1)" onselectstart="return
false">
252. <img src="images/back.svg" alt="Назад"> Назад
253. </h4>';
254.
255. }
256. $move = $_GET['move'];
257. if ($sort == complite && $move > 0) {
258. if (is_dir("C:\share\complite\\$move")) {
259. //echo 'CMD /Q /C XCOPY /Y /E /H /C /I C:\share\complite\\'.$move.'
C:\archive\\'.$move.' && RMDIR /Q /S C:\share\complite\\'.$move;
260. `"CMD /Q /C XCOPY /Y /E /H /C /I C:\share\complite\\$move
C:\archive\\$move && RMDIR /Q /S C:\share\complite\\$move"`;
261. echo '<script
type="text/javascript">setTimeout("window.location.href=\'arc.php?sort=complite\'",100
0)</script>';
262. }
263. else {
114
264. echo '<script
type="text/javascript">setTimeout("window.location.href=\'arc.php?sort=complite\'",500
)</script>';
265. }
266. }
267. if ($sort == inarchive && $move > 0) {
268. if (is_dir("C:\archive\\$move")) {
269. `"CMD /Q /C XCOPY /Y /E /H /C /I C:\archive\\$move
C:\share\complite\\$move && RMDIR /Q /S C:\archive\\$move"`;
270. echo '<script
type="text/javascript">setTimeout("window.location.href=\'arc.php?sort=inarchive\'",100
0)</script>';
271. }
272. else {
273. echo '<script
type="text/javascript">setTimeout("window.location.href=\'arc.php?sort=inarchive\'",500
)</script>';
274. }
275. }
276. //echo 'Время выполнения скрипта: '.round(microtime(true) - $start, 4).'
сек.';
277. echo '</tbody></table></div>';
278. if(!$directory) {
279. echo '<div class="color_a" id="controls" onselectstart="return false">
280. <div class="hidden-print" id="perpage">
281. <select onchange="sorter.size(this.value)">
282. <option value="10" selected="selected">10</option>
283. <option value="25">25</option>
284. <option value="50">50</option>
285. <option value="100">100</option>
286. <option value="250">250</option>
287. <option value="500">500</option>
288. </select>
289. <span>Записей на стр.&nbsp;</span>
290. </div>
291. <div class="hidden-print">
292. <div class="color_a" id="navigation">
293. <img src="images/first.gif" width="18" height="18" alt="First Page"
onclick="sorter.move(-1,true)" />
294. <img src="images/previous.gif" width="18" height="18" alt="First Page"
onclick="sorter.move(-1)" />
295. <img src="images/next.gif" width="18" height="18" alt="First Page"
onclick="sorter.move(1)" />
296. <img src="images/last.gif" width="18" height="18" alt="Last Page"
onclick="sorter.move(1,true)" />
297. </div>
298. <div class="color_a" id="text">Стр. <span id="currentpage"></span> из
<span id="pagelimit"></span>
115
299. </div>
300. </div>
301. </div>
302. <script type="text/javascript">
303. var sorter = new TINY.table.sorter("sorter");
304. sorter.head = "head";
305. sorter.asc = "asc";
306. sorter.desc = "desc";
307. sorter.even = "evenrow";
308. sorter.odd = "oddrow";
309. sorter.evensel = "evenselected";
310. sorter.oddsel = "oddselected";
311. sorter.paginate = true;
312. sorter.currentid = "currentpage";
313. sorter.limitid = "pagelimit";
314. sorter.init("table",1);
315. </script>';
316. echo '<div class="hidden-print">
317. <h4 class="color_b" onclick="location.href=\'main.php\'"
onselectstart="return false"><img src="images/back.svg" alt="Назад"> Назад</h4>
318. </div>';
319. }
320. ?>
321. <script type="text/javascript">
322. //листнер скроллинга страницы
323. window.onscroll = function() {
324. let table = window.document.getElementById("table").offsetTop;
325. let stick = document.querySelector(".stick");
326. let pagetop = document.querySelector(".pagetop");
327. let pagebottom = document.querySelector(".pagebottom");
328. let footer = document.querySelector(".footer").offsetTop;
329. let scrolled = window.pageYOffset;
330. let height = document.documentElement.clientHeight;
331. pagebottom.style = 'display: block';
332. if(scrolled > table) {
333. stick.style = 'display: block';
334. pagetop.style = 'display: block';
335. }
336. else {
337. stick.style = 'display: none';
338. pagetop.style = 'display: none';
339. }
340. if(footer < scrolled+height+53) {
341. pagebottom.style = 'display: none';
342. }
343. };
344. //листнер загрузки страницы
345. window.onload = function() {
116
346. let table = window.document.getElementById("table").offsetTop;
347. let footer = document.querySelector(".footer").offsetTop;
348. let height = document.documentElement.clientHeight;
349. let pagebottom = document.querySelector(".pagebottom");
350. let scrolled = window.pageYOffset;
351. if(scrolled > table) {
352. stick.style = 'display: block';
353. pagetop.style = 'display: block';
354. }
355. if(footer > height) {
356. pagebottom.style = 'display: block';
357. }
358. };
359. </script>
360. <div class="hidden-print" id="updown">
361. <img class="pagetop" onclick="window.scrollTo(0,0);" src="images/up.svg"
alt="Вверх">
362. <img class="pagebottom"
onclick="window.scrollTo(0,document.body.scrollHeight);" src="images/dwn.svg"
alt="Вниз">
363. </div>
364. </div><!-- .content -->
365. <div class="hidden-print">
366. <div class="footer" onselectstart="return false">Отдел ИТ. Тел. или sip: <a
href="sip:2288@94.253.8.238">22-88</a>, <a href="sip:2289@94.253.8.238">22-
89</a>, <a href="sip:2480@94.253.8.238">24-80</a>. БФ АО "НПО "Прибор" <?php
echo date("Y") ?>г.</div>
367. </div>
368. </div><!-- .wrapper -->
369. </body>
370. </html>
371. <?php } ?>
Источник: https://baza.diplomsite.ru/previewfile/1972